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,23 +23,26 @@ declare class TablesDB {
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 columns: 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
  */
29
30
  list(params?: {
30
31
  queries?: string[];
31
32
  search?: string;
33
+ total?: boolean;
32
34
  }): Promise<Models.DatabaseList>;
33
35
  /**
34
36
  * Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.
35
37
  *
36
38
  * @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 columns: name
37
39
  * @param {string} search - Search term to filter your list results. Max length: 256 chars.
40
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
38
41
  * @throws {AppwriteException}
39
42
  * @returns {Promise<Models.DatabaseList>}
40
43
  * @deprecated Use the object parameter style method for a better developer experience.
41
44
  */
42
- list(queries?: string[], search?: string): Promise<Models.DatabaseList>;
45
+ list(queries?: string[], search?: string, total?: boolean): Promise<Models.DatabaseList>;
43
46
  /**
44
47
  * Create a new Database.
45
48
  *
@@ -67,6 +70,129 @@ declare class TablesDB {
67
70
  * @deprecated Use the object parameter style method for a better developer experience.
68
71
  */
69
72
  create(databaseId: string, name: string, enabled?: boolean): Promise<Models.Database>;
73
+ /**
74
+ * List transactions across all databases.
75
+ *
76
+ * @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).
77
+ * @throws {AppwriteException}
78
+ * @returns {Promise<Models.TransactionList>}
79
+ */
80
+ listTransactions(params?: {
81
+ queries?: string[];
82
+ }): Promise<Models.TransactionList>;
83
+ /**
84
+ * List transactions across all databases.
85
+ *
86
+ * @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).
87
+ * @throws {AppwriteException}
88
+ * @returns {Promise<Models.TransactionList>}
89
+ * @deprecated Use the object parameter style method for a better developer experience.
90
+ */
91
+ listTransactions(queries?: string[]): Promise<Models.TransactionList>;
92
+ /**
93
+ * Create a new transaction.
94
+ *
95
+ * @param {number} params.ttl - Seconds before the transaction expires.
96
+ * @throws {AppwriteException}
97
+ * @returns {Promise<Models.Transaction>}
98
+ */
99
+ createTransaction(params?: {
100
+ ttl?: number;
101
+ }): Promise<Models.Transaction>;
102
+ /**
103
+ * Create a new transaction.
104
+ *
105
+ * @param {number} ttl - Seconds before the transaction expires.
106
+ * @throws {AppwriteException}
107
+ * @returns {Promise<Models.Transaction>}
108
+ * @deprecated Use the object parameter style method for a better developer experience.
109
+ */
110
+ createTransaction(ttl?: number): Promise<Models.Transaction>;
111
+ /**
112
+ * Get a transaction by its unique ID.
113
+ *
114
+ * @param {string} params.transactionId - Transaction ID.
115
+ * @throws {AppwriteException}
116
+ * @returns {Promise<Models.Transaction>}
117
+ */
118
+ getTransaction(params: {
119
+ transactionId: string;
120
+ }): Promise<Models.Transaction>;
121
+ /**
122
+ * Get a transaction by its unique ID.
123
+ *
124
+ * @param {string} transactionId - Transaction ID.
125
+ * @throws {AppwriteException}
126
+ * @returns {Promise<Models.Transaction>}
127
+ * @deprecated Use the object parameter style method for a better developer experience.
128
+ */
129
+ getTransaction(transactionId: string): Promise<Models.Transaction>;
130
+ /**
131
+ * Update a transaction, to either commit or roll back its operations.
132
+ *
133
+ * @param {string} params.transactionId - Transaction ID.
134
+ * @param {boolean} params.commit - Commit transaction?
135
+ * @param {boolean} params.rollback - Rollback transaction?
136
+ * @throws {AppwriteException}
137
+ * @returns {Promise<Models.Transaction>}
138
+ */
139
+ updateTransaction(params: {
140
+ transactionId: string;
141
+ commit?: boolean;
142
+ rollback?: boolean;
143
+ }): Promise<Models.Transaction>;
144
+ /**
145
+ * Update a transaction, to either commit or roll back its operations.
146
+ *
147
+ * @param {string} transactionId - Transaction ID.
148
+ * @param {boolean} commit - Commit transaction?
149
+ * @param {boolean} rollback - Rollback transaction?
150
+ * @throws {AppwriteException}
151
+ * @returns {Promise<Models.Transaction>}
152
+ * @deprecated Use the object parameter style method for a better developer experience.
153
+ */
154
+ updateTransaction(transactionId: string, commit?: boolean, rollback?: boolean): Promise<Models.Transaction>;
155
+ /**
156
+ * Delete a transaction by its unique ID.
157
+ *
158
+ * @param {string} params.transactionId - Transaction ID.
159
+ * @throws {AppwriteException}
160
+ * @returns {Promise<{}>}
161
+ */
162
+ deleteTransaction(params: {
163
+ transactionId: string;
164
+ }): Promise<{}>;
165
+ /**
166
+ * Delete a transaction by its unique ID.
167
+ *
168
+ * @param {string} transactionId - Transaction ID.
169
+ * @throws {AppwriteException}
170
+ * @returns {Promise<{}>}
171
+ * @deprecated Use the object parameter style method for a better developer experience.
172
+ */
173
+ deleteTransaction(transactionId: string): Promise<{}>;
174
+ /**
175
+ * Create multiple operations in a single transaction.
176
+ *
177
+ * @param {string} params.transactionId - Transaction ID.
178
+ * @param {object[]} params.operations - Array of staged operations.
179
+ * @throws {AppwriteException}
180
+ * @returns {Promise<Models.Transaction>}
181
+ */
182
+ createOperations(params: {
183
+ transactionId: string;
184
+ operations?: object[];
185
+ }): Promise<Models.Transaction>;
186
+ /**
187
+ * Create multiple operations in a single transaction.
188
+ *
189
+ * @param {string} transactionId - Transaction ID.
190
+ * @param {object[]} operations - Array of staged operations.
191
+ * @throws {AppwriteException}
192
+ * @returns {Promise<Models.Transaction>}
193
+ * @deprecated Use the object parameter style method for a better developer experience.
194
+ */
195
+ createOperations(transactionId: string, operations?: object[]): Promise<Models.Transaction>;
70
196
  /**
71
197
  * Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.
72
198
  *
@@ -136,6 +262,7 @@ declare class TablesDB {
136
262
  * @param {string} params.databaseId - Database ID.
137
263
  * @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 columns: name, enabled, rowSecurity
138
264
  * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
265
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
139
266
  * @throws {AppwriteException}
140
267
  * @returns {Promise<Models.TableList>}
141
268
  */
@@ -143,6 +270,7 @@ declare class TablesDB {
143
270
  databaseId: string;
144
271
  queries?: string[];
145
272
  search?: string;
273
+ total?: boolean;
146
274
  }): Promise<Models.TableList>;
147
275
  /**
148
276
  * Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.
@@ -150,11 +278,12 @@ declare class TablesDB {
150
278
  * @param {string} databaseId - Database ID.
151
279
  * @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 columns: name, enabled, rowSecurity
152
280
  * @param {string} search - Search term to filter your list results. Max length: 256 chars.
281
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
153
282
  * @throws {AppwriteException}
154
283
  * @returns {Promise<Models.TableList>}
155
284
  * @deprecated Use the object parameter style method for a better developer experience.
156
285
  */
157
- listTables(databaseId: string, queries?: string[], search?: string): Promise<Models.TableList>;
286
+ listTables(databaseId: string, queries?: string[], search?: string, total?: boolean): Promise<Models.TableList>;
158
287
  /**
159
288
  * Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.
160
289
  *
@@ -273,6 +402,7 @@ declare class TablesDB {
273
402
  * @param {string} params.databaseId - Database ID.
274
403
  * @param {string} params.tableId - Table ID.
275
404
  * @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 columns: key, type, size, required, array, status, error
405
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
276
406
  * @throws {AppwriteException}
277
407
  * @returns {Promise<Models.ColumnList>}
278
408
  */
@@ -280,6 +410,7 @@ declare class TablesDB {
280
410
  databaseId: string;
281
411
  tableId: string;
282
412
  queries?: string[];
413
+ total?: boolean;
283
414
  }): Promise<Models.ColumnList>;
284
415
  /**
285
416
  * List columns in the table.
@@ -287,11 +418,12 @@ declare class TablesDB {
287
418
  * @param {string} databaseId - Database ID.
288
419
  * @param {string} tableId - Table ID.
289
420
  * @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 columns: key, type, size, required, array, status, error
421
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
290
422
  * @throws {AppwriteException}
291
423
  * @returns {Promise<Models.ColumnList>}
292
424
  * @deprecated Use the object parameter style method for a better developer experience.
293
425
  */
294
- listColumns(databaseId: string, tableId: string, queries?: string[]): Promise<Models.ColumnList>;
426
+ listColumns(databaseId: string, tableId: string, queries?: string[], total?: boolean): Promise<Models.ColumnList>;
295
427
  /**
296
428
  * Create a boolean column.
297
429
  *
@@ -1297,6 +1429,7 @@ declare class TablesDB {
1297
1429
  * @param {string} params.databaseId - Database ID.
1298
1430
  * @param {string} params.tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
1299
1431
  * @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 columns: key, type, status, attributes, error
1432
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
1300
1433
  * @throws {AppwriteException}
1301
1434
  * @returns {Promise<Models.ColumnIndexList>}
1302
1435
  */
@@ -1304,6 +1437,7 @@ declare class TablesDB {
1304
1437
  databaseId: string;
1305
1438
  tableId: string;
1306
1439
  queries?: string[];
1440
+ total?: boolean;
1307
1441
  }): Promise<Models.ColumnIndexList>;
1308
1442
  /**
1309
1443
  * List indexes on the table.
@@ -1311,11 +1445,12 @@ declare class TablesDB {
1311
1445
  * @param {string} databaseId - Database ID.
1312
1446
  * @param {string} tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
1313
1447
  * @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 columns: key, type, status, attributes, error
1448
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
1314
1449
  * @throws {AppwriteException}
1315
1450
  * @returns {Promise<Models.ColumnIndexList>}
1316
1451
  * @deprecated Use the object parameter style method for a better developer experience.
1317
1452
  */
1318
- listIndexes(databaseId: string, tableId: string, queries?: string[]): Promise<Models.ColumnIndexList>;
1453
+ listIndexes(databaseId: string, tableId: string, queries?: string[], total?: boolean): Promise<Models.ColumnIndexList>;
1319
1454
  /**
1320
1455
  * Creates an index on the columns listed. Your index should include all the columns you will query in a single request.
1321
1456
  * Type can be `key`, `fulltext`, or `unique`.
@@ -1411,6 +1546,8 @@ declare class TablesDB {
1411
1546
  * @param {string} params.databaseId - Database ID.
1412
1547
  * @param {string} params.tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/products/databases/tables#create-table).
1413
1548
  * @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.
1549
+ * @param {string} params.transactionId - Transaction ID to read uncommitted changes within the transaction.
1550
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
1414
1551
  * @throws {AppwriteException}
1415
1552
  * @returns {Promise<Models.RowList<Row>>}
1416
1553
  */
@@ -1418,6 +1555,8 @@ declare class TablesDB {
1418
1555
  databaseId: string;
1419
1556
  tableId: string;
1420
1557
  queries?: string[];
1558
+ transactionId?: string;
1559
+ total?: boolean;
1421
1560
  }): Promise<Models.RowList<Row>>;
1422
1561
  /**
1423
1562
  * Get a list of all the user's rows in a given table. You can use the query params to filter your results.
@@ -1425,11 +1564,13 @@ declare class TablesDB {
1425
1564
  * @param {string} databaseId - Database ID.
1426
1565
  * @param {string} tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/products/databases/tables#create-table).
1427
1566
  * @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.
1567
+ * @param {string} transactionId - Transaction ID to read uncommitted changes within the transaction.
1568
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
1428
1569
  * @throws {AppwriteException}
1429
1570
  * @returns {Promise<Models.RowList<Row>>}
1430
1571
  * @deprecated Use the object parameter style method for a better developer experience.
1431
1572
  */
1432
- listRows<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, queries?: string[]): Promise<Models.RowList<Row>>;
1573
+ listRows<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, queries?: string[], transactionId?: string, total?: boolean): Promise<Models.RowList<Row>>;
1433
1574
  /**
1434
1575
  * Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.
1435
1576
  *
@@ -1438,6 +1579,7 @@ declare class TablesDB {
1438
1579
  * @param {string} params.rowId - Row 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.
1439
1580
  * @param {Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Omit<Row, keyof Models.Row>} params.data - Row data as JSON object.
1440
1581
  * @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).
1582
+ * @param {string} params.transactionId - Transaction ID for staging the operation.
1441
1583
  * @throws {AppwriteException}
1442
1584
  * @returns {Promise<Row>}
1443
1585
  */
@@ -1447,6 +1589,7 @@ declare class TablesDB {
1447
1589
  rowId: string;
1448
1590
  data: Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Omit<Row, keyof Models.Row>;
1449
1591
  permissions?: string[];
1592
+ transactionId?: string;
1450
1593
  }): Promise<Row>;
1451
1594
  /**
1452
1595
  * Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.
@@ -1456,17 +1599,19 @@ declare class TablesDB {
1456
1599
  * @param {string} rowId - Row 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.
1457
1600
  * @param {Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Omit<Row, keyof Models.Row>} data - Row data as JSON object.
1458
1601
  * @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).
1602
+ * @param {string} transactionId - Transaction ID for staging the operation.
1459
1603
  * @throws {AppwriteException}
1460
1604
  * @returns {Promise<Row>}
1461
1605
  * @deprecated Use the object parameter style method for a better developer experience.
1462
1606
  */
1463
- createRow<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rowId: string, data: Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Omit<Row, keyof Models.Row>, permissions?: string[]): Promise<Row>;
1607
+ createRow<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rowId: string, data: Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Omit<Row, keyof Models.Row>, permissions?: string[], transactionId?: string): Promise<Row>;
1464
1608
  /**
1465
1609
  * Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.
1466
1610
  *
1467
1611
  * @param {string} params.databaseId - Database ID.
1468
1612
  * @param {string} params.tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable). Make sure to define columns before creating rows.
1469
1613
  * @param {object[]} params.rows - Array of rows data as JSON objects.
1614
+ * @param {string} params.transactionId - Transaction ID for staging the operation.
1470
1615
  * @throws {AppwriteException}
1471
1616
  * @returns {Promise<Models.RowList<Row>>}
1472
1617
  */
@@ -1474,6 +1619,7 @@ declare class TablesDB {
1474
1619
  databaseId: string;
1475
1620
  tableId: string;
1476
1621
  rows: object[];
1622
+ transactionId?: string;
1477
1623
  }): Promise<Models.RowList<Row>>;
1478
1624
  /**
1479
1625
  * Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.
@@ -1481,11 +1627,12 @@ declare class TablesDB {
1481
1627
  * @param {string} databaseId - Database ID.
1482
1628
  * @param {string} tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable). Make sure to define columns before creating rows.
1483
1629
  * @param {object[]} rows - Array of rows data as JSON objects.
1630
+ * @param {string} transactionId - Transaction ID for staging the operation.
1484
1631
  * @throws {AppwriteException}
1485
1632
  * @returns {Promise<Models.RowList<Row>>}
1486
1633
  * @deprecated Use the object parameter style method for a better developer experience.
1487
1634
  */
1488
- createRows<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rows: object[]): Promise<Models.RowList<Row>>;
1635
+ createRows<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rows: object[], transactionId?: string): Promise<Models.RowList<Row>>;
1489
1636
  /**
1490
1637
  * Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.
1491
1638
  *
@@ -1493,6 +1640,7 @@ declare class TablesDB {
1493
1640
  * @param {string} params.databaseId - Database ID.
1494
1641
  * @param {string} params.tableId - Table ID.
1495
1642
  * @param {object[]} params.rows - Array of row data as JSON objects. May contain partial rows.
1643
+ * @param {string} params.transactionId - Transaction ID for staging the operation.
1496
1644
  * @throws {AppwriteException}
1497
1645
  * @returns {Promise<Models.RowList<Row>>}
1498
1646
  */
@@ -1500,6 +1648,7 @@ declare class TablesDB {
1500
1648
  databaseId: string;
1501
1649
  tableId: string;
1502
1650
  rows: object[];
1651
+ transactionId?: string;
1503
1652
  }): Promise<Models.RowList<Row>>;
1504
1653
  /**
1505
1654
  * Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.
@@ -1508,11 +1657,12 @@ declare class TablesDB {
1508
1657
  * @param {string} databaseId - Database ID.
1509
1658
  * @param {string} tableId - Table ID.
1510
1659
  * @param {object[]} rows - Array of row data as JSON objects. May contain partial rows.
1660
+ * @param {string} transactionId - Transaction ID for staging the operation.
1511
1661
  * @throws {AppwriteException}
1512
1662
  * @returns {Promise<Models.RowList<Row>>}
1513
1663
  * @deprecated Use the object parameter style method for a better developer experience.
1514
1664
  */
1515
- upsertRows<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rows: object[]): Promise<Models.RowList<Row>>;
1665
+ upsertRows<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rows: object[], transactionId?: string): Promise<Models.RowList<Row>>;
1516
1666
  /**
1517
1667
  * Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.
1518
1668
  *
@@ -1520,6 +1670,7 @@ declare class TablesDB {
1520
1670
  * @param {string} params.tableId - Table ID.
1521
1671
  * @param {object} params.data - Row data as JSON object. Include only column and value pairs to be updated.
1522
1672
  * @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.
1673
+ * @param {string} params.transactionId - Transaction ID for staging the operation.
1523
1674
  * @throws {AppwriteException}
1524
1675
  * @returns {Promise<Models.RowList<Row>>}
1525
1676
  */
@@ -1528,6 +1679,7 @@ declare class TablesDB {
1528
1679
  tableId: string;
1529
1680
  data?: object;
1530
1681
  queries?: string[];
1682
+ transactionId?: string;
1531
1683
  }): Promise<Models.RowList<Row>>;
1532
1684
  /**
1533
1685
  * Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.
@@ -1536,17 +1688,19 @@ declare class TablesDB {
1536
1688
  * @param {string} tableId - Table ID.
1537
1689
  * @param {object} data - Row data as JSON object. Include only column and value pairs to be updated.
1538
1690
  * @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.
1691
+ * @param {string} transactionId - Transaction ID for staging the operation.
1539
1692
  * @throws {AppwriteException}
1540
1693
  * @returns {Promise<Models.RowList<Row>>}
1541
1694
  * @deprecated Use the object parameter style method for a better developer experience.
1542
1695
  */
1543
- updateRows<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, data?: object, queries?: string[]): Promise<Models.RowList<Row>>;
1696
+ updateRows<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, data?: object, queries?: string[], transactionId?: string): Promise<Models.RowList<Row>>;
1544
1697
  /**
1545
1698
  * Bulk delete rows using queries, if no queries are passed then all rows are deleted.
1546
1699
  *
1547
1700
  * @param {string} params.databaseId - Database ID.
1548
1701
  * @param {string} params.tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
1549
1702
  * @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.
1703
+ * @param {string} params.transactionId - Transaction ID for staging the operation.
1550
1704
  * @throws {AppwriteException}
1551
1705
  * @returns {Promise<Models.RowList<Row>>}
1552
1706
  */
@@ -1554,6 +1708,7 @@ declare class TablesDB {
1554
1708
  databaseId: string;
1555
1709
  tableId: string;
1556
1710
  queries?: string[];
1711
+ transactionId?: string;
1557
1712
  }): Promise<Models.RowList<Row>>;
1558
1713
  /**
1559
1714
  * Bulk delete rows using queries, if no queries are passed then all rows are deleted.
@@ -1561,11 +1716,12 @@ declare class TablesDB {
1561
1716
  * @param {string} databaseId - Database ID.
1562
1717
  * @param {string} tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
1563
1718
  * @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.
1719
+ * @param {string} transactionId - Transaction ID for staging the operation.
1564
1720
  * @throws {AppwriteException}
1565
1721
  * @returns {Promise<Models.RowList<Row>>}
1566
1722
  * @deprecated Use the object parameter style method for a better developer experience.
1567
1723
  */
1568
- deleteRows<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, queries?: string[]): Promise<Models.RowList<Row>>;
1724
+ deleteRows<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, queries?: string[], transactionId?: string): Promise<Models.RowList<Row>>;
1569
1725
  /**
1570
1726
  * Get a row by its unique ID. This endpoint response returns a JSON object with the row data.
1571
1727
  *
@@ -1573,6 +1729,7 @@ declare class TablesDB {
1573
1729
  * @param {string} params.tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
1574
1730
  * @param {string} params.rowId - Row ID.
1575
1731
  * @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.
1732
+ * @param {string} params.transactionId - Transaction ID to read uncommitted changes within the transaction.
1576
1733
  * @throws {AppwriteException}
1577
1734
  * @returns {Promise<Row>}
1578
1735
  */
@@ -1581,6 +1738,7 @@ declare class TablesDB {
1581
1738
  tableId: string;
1582
1739
  rowId: string;
1583
1740
  queries?: string[];
1741
+ transactionId?: string;
1584
1742
  }): Promise<Row>;
1585
1743
  /**
1586
1744
  * Get a row by its unique ID. This endpoint response returns a JSON object with the row data.
@@ -1589,11 +1747,12 @@ declare class TablesDB {
1589
1747
  * @param {string} tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
1590
1748
  * @param {string} rowId - Row ID.
1591
1749
  * @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.
1750
+ * @param {string} transactionId - Transaction ID to read uncommitted changes within the transaction.
1592
1751
  * @throws {AppwriteException}
1593
1752
  * @returns {Promise<Row>}
1594
1753
  * @deprecated Use the object parameter style method for a better developer experience.
1595
1754
  */
1596
- getRow<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rowId: string, queries?: string[]): Promise<Row>;
1755
+ getRow<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rowId: string, queries?: string[], transactionId?: string): Promise<Row>;
1597
1756
  /**
1598
1757
  * Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.
1599
1758
  *
@@ -1602,6 +1761,7 @@ declare class TablesDB {
1602
1761
  * @param {string} params.rowId - Row ID.
1603
1762
  * @param {Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Partial<Omit<Row, keyof Models.Row>>} params.data - Row data as JSON object. Include all required columns of the row to be created or updated.
1604
1763
  * @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).
1764
+ * @param {string} params.transactionId - Transaction ID for staging the operation.
1605
1765
  * @throws {AppwriteException}
1606
1766
  * @returns {Promise<Row>}
1607
1767
  */
@@ -1611,6 +1771,7 @@ declare class TablesDB {
1611
1771
  rowId: string;
1612
1772
  data?: Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Partial<Omit<Row, keyof Models.Row>>;
1613
1773
  permissions?: string[];
1774
+ transactionId?: string;
1614
1775
  }): Promise<Row>;
1615
1776
  /**
1616
1777
  * Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.
@@ -1620,11 +1781,12 @@ declare class TablesDB {
1620
1781
  * @param {string} rowId - Row ID.
1621
1782
  * @param {Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Partial<Omit<Row, keyof Models.Row>>} data - Row data as JSON object. Include all required columns of the row to be created or updated.
1622
1783
  * @param {string[]} permissions - An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
1784
+ * @param {string} transactionId - Transaction ID for staging the operation.
1623
1785
  * @throws {AppwriteException}
1624
1786
  * @returns {Promise<Row>}
1625
1787
  * @deprecated Use the object parameter style method for a better developer experience.
1626
1788
  */
1627
- upsertRow<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rowId: string, data?: Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Partial<Omit<Row, keyof Models.Row>>, permissions?: string[]): Promise<Row>;
1789
+ upsertRow<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rowId: string, data?: Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Partial<Omit<Row, keyof Models.Row>>, permissions?: string[], transactionId?: string): Promise<Row>;
1628
1790
  /**
1629
1791
  * Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.
1630
1792
  *
@@ -1633,6 +1795,7 @@ declare class TablesDB {
1633
1795
  * @param {string} params.rowId - Row ID.
1634
1796
  * @param {Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Partial<Omit<Row, keyof Models.Row>>} params.data - Row data as JSON object. Include only columns and value pairs to be updated.
1635
1797
  * @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).
1798
+ * @param {string} params.transactionId - Transaction ID for staging the operation.
1636
1799
  * @throws {AppwriteException}
1637
1800
  * @returns {Promise<Row>}
1638
1801
  */
@@ -1642,6 +1805,7 @@ declare class TablesDB {
1642
1805
  rowId: string;
1643
1806
  data?: Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Partial<Omit<Row, keyof Models.Row>>;
1644
1807
  permissions?: string[];
1808
+ transactionId?: string;
1645
1809
  }): Promise<Row>;
1646
1810
  /**
1647
1811
  * Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.
@@ -1651,17 +1815,19 @@ declare class TablesDB {
1651
1815
  * @param {string} rowId - Row ID.
1652
1816
  * @param {Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Partial<Omit<Row, keyof Models.Row>>} data - Row data as JSON object. Include only columns and value pairs to be updated.
1653
1817
  * @param {string[]} permissions - An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
1818
+ * @param {string} transactionId - Transaction ID for staging the operation.
1654
1819
  * @throws {AppwriteException}
1655
1820
  * @returns {Promise<Row>}
1656
1821
  * @deprecated Use the object parameter style method for a better developer experience.
1657
1822
  */
1658
- updateRow<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rowId: string, data?: Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Partial<Omit<Row, keyof Models.Row>>, permissions?: string[]): Promise<Row>;
1823
+ updateRow<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rowId: string, data?: Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Partial<Omit<Row, keyof Models.Row>>, permissions?: string[], transactionId?: string): Promise<Row>;
1659
1824
  /**
1660
1825
  * Delete a row by its unique ID.
1661
1826
  *
1662
1827
  * @param {string} params.databaseId - Database ID.
1663
1828
  * @param {string} params.tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
1664
1829
  * @param {string} params.rowId - Row ID.
1830
+ * @param {string} params.transactionId - Transaction ID for staging the operation.
1665
1831
  * @throws {AppwriteException}
1666
1832
  * @returns {Promise<{}>}
1667
1833
  */
@@ -1669,6 +1835,7 @@ declare class TablesDB {
1669
1835
  databaseId: string;
1670
1836
  tableId: string;
1671
1837
  rowId: string;
1838
+ transactionId?: string;
1672
1839
  }): Promise<{}>;
1673
1840
  /**
1674
1841
  * Delete a row by its unique ID.
@@ -1676,11 +1843,12 @@ declare class TablesDB {
1676
1843
  * @param {string} databaseId - Database ID.
1677
1844
  * @param {string} tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
1678
1845
  * @param {string} rowId - Row ID.
1846
+ * @param {string} transactionId - Transaction ID for staging the operation.
1679
1847
  * @throws {AppwriteException}
1680
1848
  * @returns {Promise<{}>}
1681
1849
  * @deprecated Use the object parameter style method for a better developer experience.
1682
1850
  */
1683
- deleteRow(databaseId: string, tableId: string, rowId: string): Promise<{}>;
1851
+ deleteRow(databaseId: string, tableId: string, rowId: string, transactionId?: string): Promise<{}>;
1684
1852
  /**
1685
1853
  * Decrement a specific column of a row by a given value.
1686
1854
  *
@@ -1690,6 +1858,7 @@ declare class TablesDB {
1690
1858
  * @param {string} params.column - Column key.
1691
1859
  * @param {number} params.value - Value to increment the column by. The value must be a number.
1692
1860
  * @param {number} params.min - Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.
1861
+ * @param {string} params.transactionId - Transaction ID for staging the operation.
1693
1862
  * @throws {AppwriteException}
1694
1863
  * @returns {Promise<Row>}
1695
1864
  */
@@ -1700,6 +1869,7 @@ declare class TablesDB {
1700
1869
  column: string;
1701
1870
  value?: number;
1702
1871
  min?: number;
1872
+ transactionId?: string;
1703
1873
  }): Promise<Row>;
1704
1874
  /**
1705
1875
  * Decrement a specific column of a row by a given value.
@@ -1710,11 +1880,12 @@ declare class TablesDB {
1710
1880
  * @param {string} column - Column key.
1711
1881
  * @param {number} value - Value to increment the column by. The value must be a number.
1712
1882
  * @param {number} min - Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.
1883
+ * @param {string} transactionId - Transaction ID for staging the operation.
1713
1884
  * @throws {AppwriteException}
1714
1885
  * @returns {Promise<Row>}
1715
1886
  * @deprecated Use the object parameter style method for a better developer experience.
1716
1887
  */
1717
- decrementRowColumn<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rowId: string, column: string, value?: number, min?: number): Promise<Row>;
1888
+ decrementRowColumn<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rowId: string, column: string, value?: number, min?: number, transactionId?: string): Promise<Row>;
1718
1889
  /**
1719
1890
  * Increment a specific column of a row by a given value.
1720
1891
  *
@@ -1724,6 +1895,7 @@ declare class TablesDB {
1724
1895
  * @param {string} params.column - Column key.
1725
1896
  * @param {number} params.value - Value to increment the column by. The value must be a number.
1726
1897
  * @param {number} params.max - Maximum value for the column. If the current value is greater than this value, an error will be thrown.
1898
+ * @param {string} params.transactionId - Transaction ID for staging the operation.
1727
1899
  * @throws {AppwriteException}
1728
1900
  * @returns {Promise<Row>}
1729
1901
  */
@@ -1734,6 +1906,7 @@ declare class TablesDB {
1734
1906
  column: string;
1735
1907
  value?: number;
1736
1908
  max?: number;
1909
+ transactionId?: string;
1737
1910
  }): Promise<Row>;
1738
1911
  /**
1739
1912
  * Increment a specific column of a row by a given value.
@@ -1744,11 +1917,12 @@ declare class TablesDB {
1744
1917
  * @param {string} column - Column key.
1745
1918
  * @param {number} value - Value to increment the column by. The value must be a number.
1746
1919
  * @param {number} max - Maximum value for the column. If the current value is greater than this value, an error will be thrown.
1920
+ * @param {string} transactionId - Transaction ID for staging the operation.
1747
1921
  * @throws {AppwriteException}
1748
1922
  * @returns {Promise<Row>}
1749
1923
  * @deprecated Use the object parameter style method for a better developer experience.
1750
1924
  */
1751
- incrementRowColumn<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rowId: string, column: string, value?: number, max?: number): Promise<Row>;
1925
+ incrementRowColumn<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rowId: string, column: string, value?: number, max?: number, transactionId?: string): Promise<Row>;
1752
1926
  }
1753
1927
 
1754
1928
  export { TablesDB };