node-appwrite 20.1.0 → 20.3.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 (95) hide show
  1. package/dist/client.js +2 -2
  2. package/dist/client.js.map +1 -1
  3. package/dist/client.mjs +2 -2
  4. package/dist/client.mjs.map +1 -1
  5. package/dist/enums/execution-status.d.mts +2 -1
  6. package/dist/enums/execution-status.d.ts +2 -1
  7. package/dist/enums/execution-status.js +1 -0
  8. package/dist/enums/execution-status.js.map +1 -1
  9. package/dist/enums/execution-status.mjs +1 -0
  10. package/dist/enums/execution-status.mjs.map +1 -1
  11. package/dist/enums/framework.d.mts +1 -0
  12. package/dist/enums/framework.d.ts +1 -0
  13. package/dist/enums/framework.js +1 -0
  14. package/dist/enums/framework.js.map +1 -1
  15. package/dist/enums/framework.mjs +1 -0
  16. package/dist/enums/framework.mjs.map +1 -1
  17. package/dist/index.d.mts +1 -0
  18. package/dist/index.d.ts +1 -0
  19. package/dist/index.js +9 -0
  20. package/dist/index.js.map +1 -1
  21. package/dist/index.mjs +1 -0
  22. package/dist/index.mjs.map +1 -1
  23. package/dist/models.d.mts +43 -1
  24. package/dist/models.d.ts +43 -1
  25. package/dist/operator.d.mts +181 -0
  26. package/dist/operator.d.ts +181 -0
  27. package/dist/operator.js +268 -0
  28. package/dist/operator.js.map +1 -0
  29. package/dist/operator.mjs +266 -0
  30. package/dist/operator.mjs.map +1 -0
  31. package/dist/query.js +6 -6
  32. package/dist/query.js.map +1 -1
  33. package/dist/query.mjs +6 -6
  34. package/dist/query.mjs.map +1 -1
  35. package/dist/services/account.d.mts +8 -2
  36. package/dist/services/account.d.ts +8 -2
  37. package/dist/services/account.js +14 -4
  38. package/dist/services/account.js.map +1 -1
  39. package/dist/services/account.mjs +14 -4
  40. package/dist/services/account.mjs.map +1 -1
  41. package/dist/services/databases.d.mts +192 -18
  42. package/dist/services/databases.d.ts +192 -18
  43. package/dist/services/databases.js +268 -16
  44. package/dist/services/databases.js.map +1 -1
  45. package/dist/services/databases.mjs +268 -16
  46. package/dist/services/databases.mjs.map +1 -1
  47. package/dist/services/functions.d.mts +12 -3
  48. package/dist/services/functions.d.ts +12 -3
  49. package/dist/services/functions.js +18 -3
  50. package/dist/services/functions.js.map +1 -1
  51. package/dist/services/functions.mjs +18 -3
  52. package/dist/services/functions.mjs.map +1 -1
  53. package/dist/services/messaging.d.mts +116 -9
  54. package/dist/services/messaging.d.ts +116 -9
  55. package/dist/services/messaging.js +182 -9
  56. package/dist/services/messaging.js.map +1 -1
  57. package/dist/services/messaging.mjs +182 -9
  58. package/dist/services/messaging.mjs.map +1 -1
  59. package/dist/services/sites.d.mts +12 -3
  60. package/dist/services/sites.d.ts +12 -3
  61. package/dist/services/sites.js +18 -3
  62. package/dist/services/sites.js.map +1 -1
  63. package/dist/services/sites.mjs +18 -3
  64. package/dist/services/sites.mjs.map +1 -1
  65. package/dist/services/storage.d.mts +8 -2
  66. package/dist/services/storage.d.ts +8 -2
  67. package/dist/services/storage.js +12 -2
  68. package/dist/services/storage.js.map +1 -1
  69. package/dist/services/storage.mjs +12 -2
  70. package/dist/services/storage.mjs.map +1 -1
  71. package/dist/services/tables-db.d.mts +190 -16
  72. package/dist/services/tables-db.d.ts +190 -16
  73. package/dist/services/tables-db.js +268 -16
  74. package/dist/services/tables-db.js.map +1 -1
  75. package/dist/services/tables-db.mjs +268 -16
  76. package/dist/services/tables-db.mjs.map +1 -1
  77. package/dist/services/teams.d.mts +8 -2
  78. package/dist/services/teams.d.ts +8 -2
  79. package/dist/services/teams.js +12 -2
  80. package/dist/services/teams.js.map +1 -1
  81. package/dist/services/teams.mjs +12 -2
  82. package/dist/services/teams.mjs.map +1 -1
  83. package/dist/services/tokens.d.mts +4 -1
  84. package/dist/services/tokens.d.ts +4 -1
  85. package/dist/services/tokens.js +6 -1
  86. package/dist/services/tokens.js.map +1 -1
  87. package/dist/services/tokens.mjs +6 -1
  88. package/dist/services/tokens.mjs.map +1 -1
  89. package/dist/services/users.d.mts +24 -6
  90. package/dist/services/users.d.ts +24 -6
  91. package/dist/services/users.js +37 -7
  92. package/dist/services/users.js.map +1 -1
  93. package/dist/services/users.mjs +37 -7
  94. package/dist/services/users.mjs.map +1 -1
  95. package/package.json +1 -1
@@ -23,6 +23,7 @@ declare class Databases {
23
23
  *
24
24
  * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name
25
25
  * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
26
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
26
27
  * @throws {AppwriteException}
27
28
  * @returns {Promise<Models.DatabaseList>}
28
29
  * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.list` instead.
@@ -30,17 +31,19 @@ declare class Databases {
30
31
  list(params?: {
31
32
  queries?: string[];
32
33
  search?: string;
34
+ total?: boolean;
33
35
  }): Promise<Models.DatabaseList>;
34
36
  /**
35
37
  * Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.
36
38
  *
37
39
  * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name
38
40
  * @param {string} search - Search term to filter your list results. Max length: 256 chars.
41
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
39
42
  * @throws {AppwriteException}
40
43
  * @returns {Promise<Models.DatabaseList>}
41
44
  * @deprecated Use the object parameter style method for a better developer experience.
42
45
  */
43
- list(queries?: string[], search?: string): Promise<Models.DatabaseList>;
46
+ list(queries?: string[], search?: string, total?: boolean): Promise<Models.DatabaseList>;
44
47
  /**
45
48
  * Create a new Database.
46
49
  *
@@ -69,6 +72,129 @@ declare class Databases {
69
72
  * @deprecated Use the object parameter style method for a better developer experience.
70
73
  */
71
74
  create(databaseId: string, name: string, enabled?: boolean): Promise<Models.Database>;
75
+ /**
76
+ * List transactions across all databases.
77
+ *
78
+ * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries).
79
+ * @throws {AppwriteException}
80
+ * @returns {Promise<Models.TransactionList>}
81
+ */
82
+ listTransactions(params?: {
83
+ queries?: string[];
84
+ }): Promise<Models.TransactionList>;
85
+ /**
86
+ * List transactions across all databases.
87
+ *
88
+ * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries).
89
+ * @throws {AppwriteException}
90
+ * @returns {Promise<Models.TransactionList>}
91
+ * @deprecated Use the object parameter style method for a better developer experience.
92
+ */
93
+ listTransactions(queries?: string[]): Promise<Models.TransactionList>;
94
+ /**
95
+ * Create a new transaction.
96
+ *
97
+ * @param {number} params.ttl - Seconds before the transaction expires.
98
+ * @throws {AppwriteException}
99
+ * @returns {Promise<Models.Transaction>}
100
+ */
101
+ createTransaction(params?: {
102
+ ttl?: number;
103
+ }): Promise<Models.Transaction>;
104
+ /**
105
+ * Create a new transaction.
106
+ *
107
+ * @param {number} ttl - Seconds before the transaction expires.
108
+ * @throws {AppwriteException}
109
+ * @returns {Promise<Models.Transaction>}
110
+ * @deprecated Use the object parameter style method for a better developer experience.
111
+ */
112
+ createTransaction(ttl?: number): Promise<Models.Transaction>;
113
+ /**
114
+ * Get a transaction by its unique ID.
115
+ *
116
+ * @param {string} params.transactionId - Transaction ID.
117
+ * @throws {AppwriteException}
118
+ * @returns {Promise<Models.Transaction>}
119
+ */
120
+ getTransaction(params: {
121
+ transactionId: string;
122
+ }): Promise<Models.Transaction>;
123
+ /**
124
+ * Get a transaction by its unique ID.
125
+ *
126
+ * @param {string} transactionId - Transaction ID.
127
+ * @throws {AppwriteException}
128
+ * @returns {Promise<Models.Transaction>}
129
+ * @deprecated Use the object parameter style method for a better developer experience.
130
+ */
131
+ getTransaction(transactionId: string): Promise<Models.Transaction>;
132
+ /**
133
+ * Update a transaction, to either commit or roll back its operations.
134
+ *
135
+ * @param {string} params.transactionId - Transaction ID.
136
+ * @param {boolean} params.commit - Commit transaction?
137
+ * @param {boolean} params.rollback - Rollback transaction?
138
+ * @throws {AppwriteException}
139
+ * @returns {Promise<Models.Transaction>}
140
+ */
141
+ updateTransaction(params: {
142
+ transactionId: string;
143
+ commit?: boolean;
144
+ rollback?: boolean;
145
+ }): Promise<Models.Transaction>;
146
+ /**
147
+ * Update a transaction, to either commit or roll back its operations.
148
+ *
149
+ * @param {string} transactionId - Transaction ID.
150
+ * @param {boolean} commit - Commit transaction?
151
+ * @param {boolean} rollback - Rollback transaction?
152
+ * @throws {AppwriteException}
153
+ * @returns {Promise<Models.Transaction>}
154
+ * @deprecated Use the object parameter style method for a better developer experience.
155
+ */
156
+ updateTransaction(transactionId: string, commit?: boolean, rollback?: boolean): Promise<Models.Transaction>;
157
+ /**
158
+ * Delete a transaction by its unique ID.
159
+ *
160
+ * @param {string} params.transactionId - Transaction ID.
161
+ * @throws {AppwriteException}
162
+ * @returns {Promise<{}>}
163
+ */
164
+ deleteTransaction(params: {
165
+ transactionId: string;
166
+ }): Promise<{}>;
167
+ /**
168
+ * Delete a transaction by its unique ID.
169
+ *
170
+ * @param {string} transactionId - Transaction ID.
171
+ * @throws {AppwriteException}
172
+ * @returns {Promise<{}>}
173
+ * @deprecated Use the object parameter style method for a better developer experience.
174
+ */
175
+ deleteTransaction(transactionId: string): Promise<{}>;
176
+ /**
177
+ * Create multiple operations in a single transaction.
178
+ *
179
+ * @param {string} params.transactionId - Transaction ID.
180
+ * @param {object[]} params.operations - Array of staged operations.
181
+ * @throws {AppwriteException}
182
+ * @returns {Promise<Models.Transaction>}
183
+ */
184
+ createOperations(params: {
185
+ transactionId: string;
186
+ operations?: object[];
187
+ }): Promise<Models.Transaction>;
188
+ /**
189
+ * Create multiple operations in a single transaction.
190
+ *
191
+ * @param {string} transactionId - Transaction ID.
192
+ * @param {object[]} operations - Array of staged operations.
193
+ * @throws {AppwriteException}
194
+ * @returns {Promise<Models.Transaction>}
195
+ * @deprecated Use the object parameter style method for a better developer experience.
196
+ */
197
+ createOperations(transactionId: string, operations?: object[]): Promise<Models.Transaction>;
72
198
  /**
73
199
  * Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.
74
200
  *
@@ -141,6 +267,7 @@ declare class Databases {
141
267
  * @param {string} params.databaseId - Database ID.
142
268
  * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity
143
269
  * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
270
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
144
271
  * @throws {AppwriteException}
145
272
  * @returns {Promise<Models.CollectionList>}
146
273
  * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listTables` instead.
@@ -149,6 +276,7 @@ declare class Databases {
149
276
  databaseId: string;
150
277
  queries?: string[];
151
278
  search?: string;
279
+ total?: boolean;
152
280
  }): Promise<Models.CollectionList>;
153
281
  /**
154
282
  * Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.
@@ -156,11 +284,12 @@ declare class Databases {
156
284
  * @param {string} databaseId - Database ID.
157
285
  * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity
158
286
  * @param {string} search - Search term to filter your list results. Max length: 256 chars.
287
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
159
288
  * @throws {AppwriteException}
160
289
  * @returns {Promise<Models.CollectionList>}
161
290
  * @deprecated Use the object parameter style method for a better developer experience.
162
291
  */
163
- listCollections(databaseId: string, queries?: string[], search?: string): Promise<Models.CollectionList>;
292
+ listCollections(databaseId: string, queries?: string[], search?: string, total?: boolean): Promise<Models.CollectionList>;
164
293
  /**
165
294
  * Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.
166
295
  *
@@ -283,6 +412,7 @@ declare class Databases {
283
412
  * @param {string} params.databaseId - Database ID.
284
413
  * @param {string} params.collectionId - Collection ID.
285
414
  * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error
415
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
286
416
  * @throws {AppwriteException}
287
417
  * @returns {Promise<Models.AttributeList>}
288
418
  * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listColumns` instead.
@@ -291,6 +421,7 @@ declare class Databases {
291
421
  databaseId: string;
292
422
  collectionId: string;
293
423
  queries?: string[];
424
+ total?: boolean;
294
425
  }): Promise<Models.AttributeList>;
295
426
  /**
296
427
  * List attributes in the collection.
@@ -298,11 +429,12 @@ declare class Databases {
298
429
  * @param {string} databaseId - Database ID.
299
430
  * @param {string} collectionId - Collection ID.
300
431
  * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error
432
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
301
433
  * @throws {AppwriteException}
302
434
  * @returns {Promise<Models.AttributeList>}
303
435
  * @deprecated Use the object parameter style method for a better developer experience.
304
436
  */
305
- listAttributes(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.AttributeList>;
437
+ listAttributes(databaseId: string, collectionId: string, queries?: string[], total?: boolean): Promise<Models.AttributeList>;
306
438
  /**
307
439
  * Create a boolean attribute.
308
440
  *
@@ -1338,6 +1470,8 @@ declare class Databases {
1338
1470
  * @param {string} params.databaseId - Database ID.
1339
1471
  * @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
1340
1472
  * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
1473
+ * @param {string} params.transactionId - Transaction ID to read uncommitted changes within the transaction.
1474
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
1341
1475
  * @throws {AppwriteException}
1342
1476
  * @returns {Promise<Models.DocumentList<Document>>}
1343
1477
  * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listRows` instead.
@@ -1346,6 +1480,8 @@ declare class Databases {
1346
1480
  databaseId: string;
1347
1481
  collectionId: string;
1348
1482
  queries?: string[];
1483
+ transactionId?: string;
1484
+ total?: boolean;
1349
1485
  }): Promise<Models.DocumentList<Document>>;
1350
1486
  /**
1351
1487
  * Get a list of all the user's documents in a given collection. You can use the query params to filter your results.
@@ -1353,11 +1489,13 @@ declare class Databases {
1353
1489
  * @param {string} databaseId - Database ID.
1354
1490
  * @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
1355
1491
  * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
1492
+ * @param {string} transactionId - Transaction ID to read uncommitted changes within the transaction.
1493
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
1356
1494
  * @throws {AppwriteException}
1357
1495
  * @returns {Promise<Models.DocumentList<Document>>}
1358
1496
  * @deprecated Use the object parameter style method for a better developer experience.
1359
1497
  */
1360
- listDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.DocumentList<Document>>;
1498
+ listDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, queries?: string[], transactionId?: string, total?: boolean): Promise<Models.DocumentList<Document>>;
1361
1499
  /**
1362
1500
  * Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.
1363
1501
  *
@@ -1366,6 +1504,7 @@ declare class Databases {
1366
1504
  * @param {string} params.documentId - Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
1367
1505
  * @param {Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Omit<Document, keyof Models.Document>} params.data - Document data as JSON object.
1368
1506
  * @param {string[]} params.permissions - An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
1507
+ * @param {string} params.transactionId - Transaction ID for staging the operation.
1369
1508
  * @throws {AppwriteException}
1370
1509
  * @returns {Promise<Document>}
1371
1510
  * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createRow` instead.
@@ -1376,6 +1515,7 @@ declare class Databases {
1376
1515
  documentId: string;
1377
1516
  data: Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Omit<Document, keyof Models.Document>;
1378
1517
  permissions?: string[];
1518
+ transactionId?: string;
1379
1519
  }): Promise<Document>;
1380
1520
  /**
1381
1521
  * Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.
@@ -1385,17 +1525,19 @@ declare class Databases {
1385
1525
  * @param {string} documentId - Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
1386
1526
  * @param {Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Omit<Document, keyof Models.Document>} data - Document data as JSON object.
1387
1527
  * @param {string[]} permissions - An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
1528
+ * @param {string} transactionId - Transaction ID for staging the operation.
1388
1529
  * @throws {AppwriteException}
1389
1530
  * @returns {Promise<Document>}
1390
1531
  * @deprecated Use the object parameter style method for a better developer experience.
1391
1532
  */
1392
- createDocument<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, data: Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Omit<Document, keyof Models.Document>, permissions?: string[]): Promise<Document>;
1533
+ createDocument<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, data: Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Omit<Document, keyof Models.Document>, permissions?: string[], transactionId?: string): Promise<Document>;
1393
1534
  /**
1394
1535
  * 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.
1395
1536
  *
1396
1537
  * @param {string} params.databaseId - Database ID.
1397
1538
  * @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents.
1398
1539
  * @param {object[]} params.documents - Array of documents data as JSON objects.
1540
+ * @param {string} params.transactionId - Transaction ID for staging the operation.
1399
1541
  * @throws {AppwriteException}
1400
1542
  * @returns {Promise<Models.DocumentList<Document>>}
1401
1543
  * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createRows` instead.
@@ -1404,6 +1546,7 @@ declare class Databases {
1404
1546
  databaseId: string;
1405
1547
  collectionId: string;
1406
1548
  documents: object[];
1549
+ transactionId?: string;
1407
1550
  }): Promise<Models.DocumentList<Document>>;
1408
1551
  /**
1409
1552
  * 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.
@@ -1411,11 +1554,12 @@ declare class Databases {
1411
1554
  * @param {string} databaseId - Database ID.
1412
1555
  * @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents.
1413
1556
  * @param {object[]} documents - Array of documents data as JSON objects.
1557
+ * @param {string} transactionId - Transaction ID for staging the operation.
1414
1558
  * @throws {AppwriteException}
1415
1559
  * @returns {Promise<Models.DocumentList<Document>>}
1416
1560
  * @deprecated Use the object parameter style method for a better developer experience.
1417
1561
  */
1418
- createDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documents: object[]): Promise<Models.DocumentList<Document>>;
1562
+ createDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documents: object[], transactionId?: string): Promise<Models.DocumentList<Document>>;
1419
1563
  /**
1420
1564
  * 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.
1421
1565
  *
@@ -1423,6 +1567,7 @@ declare class Databases {
1423
1567
  * @param {string} params.databaseId - Database ID.
1424
1568
  * @param {string} params.collectionId - Collection ID.
1425
1569
  * @param {object[]} params.documents - Array of document data as JSON objects. May contain partial documents.
1570
+ * @param {string} params.transactionId - Transaction ID for staging the operation.
1426
1571
  * @throws {AppwriteException}
1427
1572
  * @returns {Promise<Models.DocumentList<Document>>}
1428
1573
  * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.upsertRows` instead.
@@ -1431,6 +1576,7 @@ declare class Databases {
1431
1576
  databaseId: string;
1432
1577
  collectionId: string;
1433
1578
  documents: object[];
1579
+ transactionId?: string;
1434
1580
  }): Promise<Models.DocumentList<Document>>;
1435
1581
  /**
1436
1582
  * 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.
@@ -1439,11 +1585,12 @@ declare class Databases {
1439
1585
  * @param {string} databaseId - Database ID.
1440
1586
  * @param {string} collectionId - Collection ID.
1441
1587
  * @param {object[]} documents - Array of document data as JSON objects. May contain partial documents.
1588
+ * @param {string} transactionId - Transaction ID for staging the operation.
1442
1589
  * @throws {AppwriteException}
1443
1590
  * @returns {Promise<Models.DocumentList<Document>>}
1444
1591
  * @deprecated Use the object parameter style method for a better developer experience.
1445
1592
  */
1446
- upsertDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documents: object[]): Promise<Models.DocumentList<Document>>;
1593
+ upsertDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documents: object[], transactionId?: string): Promise<Models.DocumentList<Document>>;
1447
1594
  /**
1448
1595
  * 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.
1449
1596
  *
@@ -1451,6 +1598,7 @@ declare class Databases {
1451
1598
  * @param {string} params.collectionId - Collection ID.
1452
1599
  * @param {object} params.data - Document data as JSON object. Include only attribute and value pairs to be updated.
1453
1600
  * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
1601
+ * @param {string} params.transactionId - Transaction ID for staging the operation.
1454
1602
  * @throws {AppwriteException}
1455
1603
  * @returns {Promise<Models.DocumentList<Document>>}
1456
1604
  * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateRows` instead.
@@ -1460,6 +1608,7 @@ declare class Databases {
1460
1608
  collectionId: string;
1461
1609
  data?: object;
1462
1610
  queries?: string[];
1611
+ transactionId?: string;
1463
1612
  }): Promise<Models.DocumentList<Document>>;
1464
1613
  /**
1465
1614
  * 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.
@@ -1468,17 +1617,19 @@ declare class Databases {
1468
1617
  * @param {string} collectionId - Collection ID.
1469
1618
  * @param {object} data - Document data as JSON object. Include only attribute and value pairs to be updated.
1470
1619
  * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
1620
+ * @param {string} transactionId - Transaction ID for staging the operation.
1471
1621
  * @throws {AppwriteException}
1472
1622
  * @returns {Promise<Models.DocumentList<Document>>}
1473
1623
  * @deprecated Use the object parameter style method for a better developer experience.
1474
1624
  */
1475
- updateDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, data?: object, queries?: string[]): Promise<Models.DocumentList<Document>>;
1625
+ updateDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, data?: object, queries?: string[], transactionId?: string): Promise<Models.DocumentList<Document>>;
1476
1626
  /**
1477
1627
  * Bulk delete documents using queries, if no queries are passed then all documents are deleted.
1478
1628
  *
1479
1629
  * @param {string} params.databaseId - Database ID.
1480
1630
  * @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
1481
1631
  * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
1632
+ * @param {string} params.transactionId - Transaction ID for staging the operation.
1482
1633
  * @throws {AppwriteException}
1483
1634
  * @returns {Promise<Models.DocumentList<Document>>}
1484
1635
  * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.deleteRows` instead.
@@ -1487,6 +1638,7 @@ declare class Databases {
1487
1638
  databaseId: string;
1488
1639
  collectionId: string;
1489
1640
  queries?: string[];
1641
+ transactionId?: string;
1490
1642
  }): Promise<Models.DocumentList<Document>>;
1491
1643
  /**
1492
1644
  * Bulk delete documents using queries, if no queries are passed then all documents are deleted.
@@ -1494,11 +1646,12 @@ declare class Databases {
1494
1646
  * @param {string} databaseId - Database ID.
1495
1647
  * @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
1496
1648
  * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
1649
+ * @param {string} transactionId - Transaction ID for staging the operation.
1497
1650
  * @throws {AppwriteException}
1498
1651
  * @returns {Promise<Models.DocumentList<Document>>}
1499
1652
  * @deprecated Use the object parameter style method for a better developer experience.
1500
1653
  */
1501
- deleteDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.DocumentList<Document>>;
1654
+ deleteDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, queries?: string[], transactionId?: string): Promise<Models.DocumentList<Document>>;
1502
1655
  /**
1503
1656
  * Get a document by its unique ID. This endpoint response returns a JSON object with the document data.
1504
1657
  *
@@ -1506,6 +1659,7 @@ declare class Databases {
1506
1659
  * @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
1507
1660
  * @param {string} params.documentId - Document ID.
1508
1661
  * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
1662
+ * @param {string} params.transactionId - Transaction ID to read uncommitted changes within the transaction.
1509
1663
  * @throws {AppwriteException}
1510
1664
  * @returns {Promise<Document>}
1511
1665
  * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.getRow` instead.
@@ -1515,6 +1669,7 @@ declare class Databases {
1515
1669
  collectionId: string;
1516
1670
  documentId: string;
1517
1671
  queries?: string[];
1672
+ transactionId?: string;
1518
1673
  }): Promise<Document>;
1519
1674
  /**
1520
1675
  * Get a document by its unique ID. This endpoint response returns a JSON object with the document data.
@@ -1523,11 +1678,12 @@ declare class Databases {
1523
1678
  * @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
1524
1679
  * @param {string} documentId - Document ID.
1525
1680
  * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
1681
+ * @param {string} transactionId - Transaction ID to read uncommitted changes within the transaction.
1526
1682
  * @throws {AppwriteException}
1527
1683
  * @returns {Promise<Document>}
1528
1684
  * @deprecated Use the object parameter style method for a better developer experience.
1529
1685
  */
1530
- getDocument<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, queries?: string[]): Promise<Document>;
1686
+ getDocument<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, queries?: string[], transactionId?: string): Promise<Document>;
1531
1687
  /**
1532
1688
  * 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.
1533
1689
  *
@@ -1536,6 +1692,7 @@ declare class Databases {
1536
1692
  * @param {string} params.documentId - Document ID.
1537
1693
  * @param {Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Partial<Omit<Document, keyof Models.Document>>} params.data - Document data as JSON object. Include all required attributes of the document to be created or updated.
1538
1694
  * @param {string[]} params.permissions - An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
1695
+ * @param {string} params.transactionId - Transaction ID for staging the operation.
1539
1696
  * @throws {AppwriteException}
1540
1697
  * @returns {Promise<Document>}
1541
1698
  * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.upsertRow` instead.
@@ -1546,6 +1703,7 @@ declare class Databases {
1546
1703
  documentId: string;
1547
1704
  data: Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Partial<Omit<Document, keyof Models.Document>>;
1548
1705
  permissions?: string[];
1706
+ transactionId?: string;
1549
1707
  }): Promise<Document>;
1550
1708
  /**
1551
1709
  * 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.
@@ -1555,11 +1713,12 @@ declare class Databases {
1555
1713
  * @param {string} documentId - Document ID.
1556
1714
  * @param {Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Partial<Omit<Document, keyof Models.Document>>} data - Document data as JSON object. Include all required attributes of the document to be created or updated.
1557
1715
  * @param {string[]} permissions - An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
1716
+ * @param {string} transactionId - Transaction ID for staging the operation.
1558
1717
  * @throws {AppwriteException}
1559
1718
  * @returns {Promise<Document>}
1560
1719
  * @deprecated Use the object parameter style method for a better developer experience.
1561
1720
  */
1562
- upsertDocument<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, data: Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Partial<Omit<Document, keyof Models.Document>>, permissions?: string[]): Promise<Document>;
1721
+ upsertDocument<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, data: Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Partial<Omit<Document, keyof Models.Document>>, permissions?: string[], transactionId?: string): Promise<Document>;
1563
1722
  /**
1564
1723
  * Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.
1565
1724
  *
@@ -1568,6 +1727,7 @@ declare class Databases {
1568
1727
  * @param {string} params.documentId - Document ID.
1569
1728
  * @param {Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Partial<Omit<Document, keyof Models.Document>>} params.data - Document data as JSON object. Include only attribute and value pairs to be updated.
1570
1729
  * @param {string[]} params.permissions - An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
1730
+ * @param {string} params.transactionId - Transaction ID for staging the operation.
1571
1731
  * @throws {AppwriteException}
1572
1732
  * @returns {Promise<Document>}
1573
1733
  * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateRow` instead.
@@ -1578,6 +1738,7 @@ declare class Databases {
1578
1738
  documentId: string;
1579
1739
  data?: Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Partial<Omit<Document, keyof Models.Document>>;
1580
1740
  permissions?: string[];
1741
+ transactionId?: string;
1581
1742
  }): Promise<Document>;
1582
1743
  /**
1583
1744
  * Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.
@@ -1587,17 +1748,19 @@ declare class Databases {
1587
1748
  * @param {string} documentId - Document ID.
1588
1749
  * @param {Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Partial<Omit<Document, keyof Models.Document>>} data - Document data as JSON object. Include only attribute and value pairs to be updated.
1589
1750
  * @param {string[]} permissions - An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
1751
+ * @param {string} transactionId - Transaction ID for staging the operation.
1590
1752
  * @throws {AppwriteException}
1591
1753
  * @returns {Promise<Document>}
1592
1754
  * @deprecated Use the object parameter style method for a better developer experience.
1593
1755
  */
1594
- updateDocument<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, data?: Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Partial<Omit<Document, keyof Models.Document>>, permissions?: string[]): Promise<Document>;
1756
+ updateDocument<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, data?: Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Partial<Omit<Document, keyof Models.Document>>, permissions?: string[], transactionId?: string): Promise<Document>;
1595
1757
  /**
1596
1758
  * Delete a document by its unique ID.
1597
1759
  *
1598
1760
  * @param {string} params.databaseId - Database ID.
1599
1761
  * @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
1600
1762
  * @param {string} params.documentId - Document ID.
1763
+ * @param {string} params.transactionId - Transaction ID for staging the operation.
1601
1764
  * @throws {AppwriteException}
1602
1765
  * @returns {Promise<{}>}
1603
1766
  * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.deleteRow` instead.
@@ -1606,6 +1769,7 @@ declare class Databases {
1606
1769
  databaseId: string;
1607
1770
  collectionId: string;
1608
1771
  documentId: string;
1772
+ transactionId?: string;
1609
1773
  }): Promise<{}>;
1610
1774
  /**
1611
1775
  * Delete a document by its unique ID.
@@ -1613,11 +1777,12 @@ declare class Databases {
1613
1777
  * @param {string} databaseId - Database ID.
1614
1778
  * @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
1615
1779
  * @param {string} documentId - Document ID.
1780
+ * @param {string} transactionId - Transaction ID for staging the operation.
1616
1781
  * @throws {AppwriteException}
1617
1782
  * @returns {Promise<{}>}
1618
1783
  * @deprecated Use the object parameter style method for a better developer experience.
1619
1784
  */
1620
- deleteDocument(databaseId: string, collectionId: string, documentId: string): Promise<{}>;
1785
+ deleteDocument(databaseId: string, collectionId: string, documentId: string, transactionId?: string): Promise<{}>;
1621
1786
  /**
1622
1787
  * Decrement a specific attribute of a document by a given value.
1623
1788
  *
@@ -1627,6 +1792,7 @@ declare class Databases {
1627
1792
  * @param {string} params.attribute - Attribute key.
1628
1793
  * @param {number} params.value - Value to increment the attribute by. The value must be a number.
1629
1794
  * @param {number} params.min - Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.
1795
+ * @param {string} params.transactionId - Transaction ID for staging the operation.
1630
1796
  * @throws {AppwriteException}
1631
1797
  * @returns {Promise<Document>}
1632
1798
  * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.decrementRowColumn` instead.
@@ -1638,6 +1804,7 @@ declare class Databases {
1638
1804
  attribute: string;
1639
1805
  value?: number;
1640
1806
  min?: number;
1807
+ transactionId?: string;
1641
1808
  }): Promise<Document>;
1642
1809
  /**
1643
1810
  * Decrement a specific attribute of a document by a given value.
@@ -1648,11 +1815,12 @@ declare class Databases {
1648
1815
  * @param {string} attribute - Attribute key.
1649
1816
  * @param {number} value - Value to increment the attribute by. The value must be a number.
1650
1817
  * @param {number} min - Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.
1818
+ * @param {string} transactionId - Transaction ID for staging the operation.
1651
1819
  * @throws {AppwriteException}
1652
1820
  * @returns {Promise<Document>}
1653
1821
  * @deprecated Use the object parameter style method for a better developer experience.
1654
1822
  */
1655
- decrementDocumentAttribute<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number, min?: number): Promise<Document>;
1823
+ decrementDocumentAttribute<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number, min?: number, transactionId?: string): Promise<Document>;
1656
1824
  /**
1657
1825
  * Increment a specific attribute of a document by a given value.
1658
1826
  *
@@ -1662,6 +1830,7 @@ declare class Databases {
1662
1830
  * @param {string} params.attribute - Attribute key.
1663
1831
  * @param {number} params.value - Value to increment the attribute by. The value must be a number.
1664
1832
  * @param {number} params.max - Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.
1833
+ * @param {string} params.transactionId - Transaction ID for staging the operation.
1665
1834
  * @throws {AppwriteException}
1666
1835
  * @returns {Promise<Document>}
1667
1836
  * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.incrementRowColumn` instead.
@@ -1673,6 +1842,7 @@ declare class Databases {
1673
1842
  attribute: string;
1674
1843
  value?: number;
1675
1844
  max?: number;
1845
+ transactionId?: string;
1676
1846
  }): Promise<Document>;
1677
1847
  /**
1678
1848
  * Increment a specific attribute of a document by a given value.
@@ -1683,17 +1853,19 @@ declare class Databases {
1683
1853
  * @param {string} attribute - Attribute key.
1684
1854
  * @param {number} value - Value to increment the attribute by. The value must be a number.
1685
1855
  * @param {number} max - Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.
1856
+ * @param {string} transactionId - Transaction ID for staging the operation.
1686
1857
  * @throws {AppwriteException}
1687
1858
  * @returns {Promise<Document>}
1688
1859
  * @deprecated Use the object parameter style method for a better developer experience.
1689
1860
  */
1690
- incrementDocumentAttribute<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number, max?: number): Promise<Document>;
1861
+ incrementDocumentAttribute<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number, max?: number, transactionId?: string): Promise<Document>;
1691
1862
  /**
1692
1863
  * List indexes in the collection.
1693
1864
  *
1694
1865
  * @param {string} params.databaseId - Database ID.
1695
1866
  * @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
1696
1867
  * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error
1868
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
1697
1869
  * @throws {AppwriteException}
1698
1870
  * @returns {Promise<Models.IndexList>}
1699
1871
  * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listIndexes` instead.
@@ -1702,6 +1874,7 @@ declare class Databases {
1702
1874
  databaseId: string;
1703
1875
  collectionId: string;
1704
1876
  queries?: string[];
1877
+ total?: boolean;
1705
1878
  }): Promise<Models.IndexList>;
1706
1879
  /**
1707
1880
  * List indexes in the collection.
@@ -1709,11 +1882,12 @@ declare class Databases {
1709
1882
  * @param {string} databaseId - Database ID.
1710
1883
  * @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
1711
1884
  * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error
1885
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
1712
1886
  * @throws {AppwriteException}
1713
1887
  * @returns {Promise<Models.IndexList>}
1714
1888
  * @deprecated Use the object parameter style method for a better developer experience.
1715
1889
  */
1716
- listIndexes(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.IndexList>;
1890
+ listIndexes(databaseId: string, collectionId: string, queries?: string[], total?: boolean): Promise<Models.IndexList>;
1717
1891
  /**
1718
1892
  * Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.
1719
1893
  * Attributes can be `key`, `fulltext`, and `unique`.
@@ -1755,7 +1929,7 @@ declare class Databases {
1755
1929
  */
1756
1930
  createIndex(databaseId: string, collectionId: string, key: string, type: IndexType, attributes: string[], orders?: string[], lengths?: number[]): Promise<Models.Index>;
1757
1931
  /**
1758
- * Get index by ID.
1932
+ * Get an index by its unique ID.
1759
1933
  *
1760
1934
  * @param {string} params.databaseId - Database ID.
1761
1935
  * @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
@@ -1770,7 +1944,7 @@ declare class Databases {
1770
1944
  key: string;
1771
1945
  }): Promise<Models.Index>;
1772
1946
  /**
1773
- * Get index by ID.
1947
+ * Get an index by its unique ID.
1774
1948
  *
1775
1949
  * @param {string} databaseId - Database ID.
1776
1950
  * @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).