react-native-appwrite 0.16.0 → 0.18.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 (64) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/cjs/sdk.js +707 -31
  3. package/dist/cjs/sdk.js.map +1 -1
  4. package/dist/esm/sdk.js +707 -32
  5. package/dist/esm/sdk.js.map +1 -1
  6. package/docs/examples/account/list-identities.md +2 -1
  7. package/docs/examples/account/list-logs.md +2 -1
  8. package/docs/examples/databases/create-document.md +3 -2
  9. package/docs/examples/databases/create-operations.md +24 -0
  10. package/docs/examples/databases/create-transaction.md +13 -0
  11. package/docs/examples/databases/decrement-document-attribute.md +2 -1
  12. package/docs/examples/databases/delete-document.md +2 -1
  13. package/docs/examples/databases/delete-transaction.md +13 -0
  14. package/docs/examples/databases/get-document.md +2 -1
  15. package/docs/examples/databases/get-transaction.md +13 -0
  16. package/docs/examples/databases/increment-document-attribute.md +2 -1
  17. package/docs/examples/databases/list-documents.md +3 -1
  18. package/docs/examples/databases/list-transactions.md +13 -0
  19. package/docs/examples/databases/update-document.md +3 -2
  20. package/docs/examples/databases/update-transaction.md +15 -0
  21. package/docs/examples/databases/upsert-document.md +3 -2
  22. package/docs/examples/functions/list-executions.md +2 -1
  23. package/docs/examples/storage/create-file.md +1 -1
  24. package/docs/examples/storage/list-files.md +2 -1
  25. package/docs/examples/storage/update-file.md +1 -1
  26. package/docs/examples/tablesdb/create-operations.md +24 -0
  27. package/docs/examples/tablesdb/create-row.md +3 -2
  28. package/docs/examples/tablesdb/create-transaction.md +13 -0
  29. package/docs/examples/tablesdb/decrement-row-column.md +2 -1
  30. package/docs/examples/tablesdb/delete-row.md +2 -1
  31. package/docs/examples/tablesdb/delete-transaction.md +13 -0
  32. package/docs/examples/tablesdb/get-row.md +2 -1
  33. package/docs/examples/tablesdb/get-transaction.md +13 -0
  34. package/docs/examples/tablesdb/increment-row-column.md +2 -1
  35. package/docs/examples/tablesdb/list-rows.md +3 -1
  36. package/docs/examples/tablesdb/list-transactions.md +13 -0
  37. package/docs/examples/tablesdb/update-row.md +3 -2
  38. package/docs/examples/tablesdb/update-transaction.md +15 -0
  39. package/docs/examples/tablesdb/upsert-row.md +3 -2
  40. package/docs/examples/teams/list-memberships.md +2 -1
  41. package/docs/examples/teams/list.md +2 -1
  42. package/package.json +2 -3
  43. package/src/client.ts +1 -1
  44. package/src/enums/execution-status.ts +1 -0
  45. package/src/index.ts +3 -0
  46. package/src/models.ts +45 -1
  47. package/src/operator.ts +308 -0
  48. package/src/query.ts +6 -6
  49. package/src/services/account.ts +30 -12
  50. package/src/services/databases.ts +422 -56
  51. package/src/services/functions.ts +15 -7
  52. package/src/services/storage.ts +15 -7
  53. package/src/services/tables-db.ts +422 -56
  54. package/src/services/teams.ts +30 -14
  55. package/types/enums/execution-status.d.ts +2 -1
  56. package/types/index.d.ts +3 -0
  57. package/types/models.d.ts +43 -1
  58. package/types/operator.d.ts +180 -0
  59. package/types/services/account.d.ts +8 -2
  60. package/types/services/databases.d.ts +158 -8
  61. package/types/services/functions.d.ts +4 -1
  62. package/types/services/storage.d.ts +4 -1
  63. package/types/services/tables-db.d.ts +158 -8
  64. package/types/services/teams.d.ts +8 -2
@@ -3,12 +3,137 @@ import { Client } from '../client';
3
3
  import type { Models } from '../models';
4
4
  export declare class TablesDB extends Service {
5
5
  constructor(client: Client);
6
+ /**
7
+ * List transactions across all databases.
8
+ *
9
+ * @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).
10
+ * @throws {AppwriteException}
11
+ * @returns {Promise}
12
+ */
13
+ listTransactions(params?: {
14
+ queries?: string[];
15
+ }): Promise<Models.TransactionList>;
16
+ /**
17
+ * List transactions across all databases.
18
+ *
19
+ * @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).
20
+ * @throws {AppwriteException}
21
+ * @returns {Promise<Models.TransactionList>}
22
+ * @deprecated Use the object parameter style method for a better developer experience.
23
+ */
24
+ listTransactions(queries?: string[]): Promise<Models.TransactionList>;
25
+ /**
26
+ * Create a new transaction.
27
+ *
28
+ * @param {number} params.ttl - Seconds before the transaction expires.
29
+ * @throws {AppwriteException}
30
+ * @returns {Promise}
31
+ */
32
+ createTransaction(params?: {
33
+ ttl?: number;
34
+ }): Promise<Models.Transaction>;
35
+ /**
36
+ * Create a new transaction.
37
+ *
38
+ * @param {number} ttl - Seconds before the transaction expires.
39
+ * @throws {AppwriteException}
40
+ * @returns {Promise<Models.Transaction>}
41
+ * @deprecated Use the object parameter style method for a better developer experience.
42
+ */
43
+ createTransaction(ttl?: number): Promise<Models.Transaction>;
44
+ /**
45
+ * Get a transaction by its unique ID.
46
+ *
47
+ * @param {string} params.transactionId - Transaction ID.
48
+ * @throws {AppwriteException}
49
+ * @returns {Promise}
50
+ */
51
+ getTransaction(params: {
52
+ transactionId: string;
53
+ }): Promise<Models.Transaction>;
54
+ /**
55
+ * Get a transaction by its unique ID.
56
+ *
57
+ * @param {string} transactionId - Transaction ID.
58
+ * @throws {AppwriteException}
59
+ * @returns {Promise<Models.Transaction>}
60
+ * @deprecated Use the object parameter style method for a better developer experience.
61
+ */
62
+ getTransaction(transactionId: string): Promise<Models.Transaction>;
63
+ /**
64
+ * Update a transaction, to either commit or roll back its operations.
65
+ *
66
+ * @param {string} params.transactionId - Transaction ID.
67
+ * @param {boolean} params.commit - Commit transaction?
68
+ * @param {boolean} params.rollback - Rollback transaction?
69
+ * @throws {AppwriteException}
70
+ * @returns {Promise}
71
+ */
72
+ updateTransaction(params: {
73
+ transactionId: string;
74
+ commit?: boolean;
75
+ rollback?: boolean;
76
+ }): Promise<Models.Transaction>;
77
+ /**
78
+ * Update a transaction, to either commit or roll back its operations.
79
+ *
80
+ * @param {string} transactionId - Transaction ID.
81
+ * @param {boolean} commit - Commit transaction?
82
+ * @param {boolean} rollback - Rollback transaction?
83
+ * @throws {AppwriteException}
84
+ * @returns {Promise<Models.Transaction>}
85
+ * @deprecated Use the object parameter style method for a better developer experience.
86
+ */
87
+ updateTransaction(transactionId: string, commit?: boolean, rollback?: boolean): Promise<Models.Transaction>;
88
+ /**
89
+ * Delete a transaction by its unique ID.
90
+ *
91
+ * @param {string} params.transactionId - Transaction ID.
92
+ * @throws {AppwriteException}
93
+ * @returns {Promise}
94
+ */
95
+ deleteTransaction(params: {
96
+ transactionId: string;
97
+ }): Promise<{}>;
98
+ /**
99
+ * Delete a transaction by its unique ID.
100
+ *
101
+ * @param {string} transactionId - Transaction ID.
102
+ * @throws {AppwriteException}
103
+ * @returns {Promise<{}>}
104
+ * @deprecated Use the object parameter style method for a better developer experience.
105
+ */
106
+ deleteTransaction(transactionId: string): Promise<{}>;
107
+ /**
108
+ * Create multiple operations in a single transaction.
109
+ *
110
+ * @param {string} params.transactionId - Transaction ID.
111
+ * @param {object[]} params.operations - Array of staged operations.
112
+ * @throws {AppwriteException}
113
+ * @returns {Promise}
114
+ */
115
+ createOperations(params: {
116
+ transactionId: string;
117
+ operations?: object[];
118
+ }): Promise<Models.Transaction>;
119
+ /**
120
+ * Create multiple operations in a single transaction.
121
+ *
122
+ * @param {string} transactionId - Transaction ID.
123
+ * @param {object[]} operations - Array of staged operations.
124
+ * @throws {AppwriteException}
125
+ * @returns {Promise<Models.Transaction>}
126
+ * @deprecated Use the object parameter style method for a better developer experience.
127
+ */
128
+ createOperations(transactionId: string, operations?: object[]): Promise<Models.Transaction>;
6
129
  /**
7
130
  * Get a list of all the user's rows in a given table. You can use the query params to filter your results.
8
131
  *
9
132
  * @param {string} params.databaseId - Database ID.
10
133
  * @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).
11
134
  * @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.
135
+ * @param {string} params.transactionId - Transaction ID to read uncommitted changes within the transaction.
136
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
12
137
  * @throws {AppwriteException}
13
138
  * @returns {Promise}
14
139
  */
@@ -16,6 +141,8 @@ export declare class TablesDB extends Service {
16
141
  databaseId: string;
17
142
  tableId: string;
18
143
  queries?: string[];
144
+ transactionId?: string;
145
+ total?: boolean;
19
146
  }): Promise<Models.RowList<Row>>;
20
147
  /**
21
148
  * Get a list of all the user's rows in a given table. You can use the query params to filter your results.
@@ -23,11 +150,13 @@ export declare class TablesDB extends Service {
23
150
  * @param {string} databaseId - Database ID.
24
151
  * @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).
25
152
  * @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.
153
+ * @param {string} transactionId - Transaction ID to read uncommitted changes within the transaction.
154
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
26
155
  * @throws {AppwriteException}
27
156
  * @returns {Promise<Models.RowList<Row>>}
28
157
  * @deprecated Use the object parameter style method for a better developer experience.
29
158
  */
30
- listRows<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, queries?: string[]): Promise<Models.RowList<Row>>;
159
+ listRows<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, queries?: string[], transactionId?: string, total?: boolean): Promise<Models.RowList<Row>>;
31
160
  /**
32
161
  * 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.
33
162
  *
@@ -36,6 +165,7 @@ export declare class TablesDB extends Service {
36
165
  * @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.
37
166
  * @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.
38
167
  * @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).
168
+ * @param {string} params.transactionId - Transaction ID for staging the operation.
39
169
  * @throws {AppwriteException}
40
170
  * @returns {Promise}
41
171
  */
@@ -45,6 +175,7 @@ export declare class TablesDB extends Service {
45
175
  rowId: string;
46
176
  data: Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Omit<Row, keyof Models.Row>;
47
177
  permissions?: string[];
178
+ transactionId?: string;
48
179
  }): Promise<Row>;
49
180
  /**
50
181
  * 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.
@@ -54,11 +185,12 @@ export declare class TablesDB extends Service {
54
185
  * @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.
55
186
  * @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.
56
187
  * @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).
188
+ * @param {string} transactionId - Transaction ID for staging the operation.
57
189
  * @throws {AppwriteException}
58
190
  * @returns {Promise<Row>}
59
191
  * @deprecated Use the object parameter style method for a better developer experience.
60
192
  */
61
- 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>;
193
+ 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>;
62
194
  /**
63
195
  * Get a row by its unique ID. This endpoint response returns a JSON object with the row data.
64
196
  *
@@ -66,6 +198,7 @@ export declare class TablesDB extends Service {
66
198
  * @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).
67
199
  * @param {string} params.rowId - Row ID.
68
200
  * @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.
201
+ * @param {string} params.transactionId - Transaction ID to read uncommitted changes within the transaction.
69
202
  * @throws {AppwriteException}
70
203
  * @returns {Promise}
71
204
  */
@@ -74,6 +207,7 @@ export declare class TablesDB extends Service {
74
207
  tableId: string;
75
208
  rowId: string;
76
209
  queries?: string[];
210
+ transactionId?: string;
77
211
  }): Promise<Row>;
78
212
  /**
79
213
  * Get a row by its unique ID. This endpoint response returns a JSON object with the row data.
@@ -82,11 +216,12 @@ export declare class TablesDB extends Service {
82
216
  * @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).
83
217
  * @param {string} rowId - Row ID.
84
218
  * @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.
219
+ * @param {string} transactionId - Transaction ID to read uncommitted changes within the transaction.
85
220
  * @throws {AppwriteException}
86
221
  * @returns {Promise<Row>}
87
222
  * @deprecated Use the object parameter style method for a better developer experience.
88
223
  */
89
- getRow<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rowId: string, queries?: string[]): Promise<Row>;
224
+ getRow<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rowId: string, queries?: string[], transactionId?: string): Promise<Row>;
90
225
  /**
91
226
  * 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.
92
227
  *
@@ -95,6 +230,7 @@ export declare class TablesDB extends Service {
95
230
  * @param {string} params.rowId - Row ID.
96
231
  * @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.
97
232
  * @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).
233
+ * @param {string} params.transactionId - Transaction ID for staging the operation.
98
234
  * @throws {AppwriteException}
99
235
  * @returns {Promise}
100
236
  */
@@ -104,6 +240,7 @@ export declare class TablesDB extends Service {
104
240
  rowId: string;
105
241
  data?: Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Partial<Omit<Row, keyof Models.Row>>;
106
242
  permissions?: string[];
243
+ transactionId?: string;
107
244
  }): Promise<Row>;
108
245
  /**
109
246
  * 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.
@@ -113,11 +250,12 @@ export declare class TablesDB extends Service {
113
250
  * @param {string} rowId - Row ID.
114
251
  * @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.
115
252
  * @param {string[]} permissions - An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
253
+ * @param {string} transactionId - Transaction ID for staging the operation.
116
254
  * @throws {AppwriteException}
117
255
  * @returns {Promise<Row>}
118
256
  * @deprecated Use the object parameter style method for a better developer experience.
119
257
  */
120
- 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>;
258
+ 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>;
121
259
  /**
122
260
  * Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.
123
261
  *
@@ -126,6 +264,7 @@ export declare class TablesDB extends Service {
126
264
  * @param {string} params.rowId - Row ID.
127
265
  * @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.
128
266
  * @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).
267
+ * @param {string} params.transactionId - Transaction ID for staging the operation.
129
268
  * @throws {AppwriteException}
130
269
  * @returns {Promise}
131
270
  */
@@ -135,6 +274,7 @@ export declare class TablesDB extends Service {
135
274
  rowId: string;
136
275
  data?: Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Partial<Omit<Row, keyof Models.Row>>;
137
276
  permissions?: string[];
277
+ transactionId?: string;
138
278
  }): Promise<Row>;
139
279
  /**
140
280
  * Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.
@@ -144,17 +284,19 @@ export declare class TablesDB extends Service {
144
284
  * @param {string} rowId - Row ID.
145
285
  * @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.
146
286
  * @param {string[]} permissions - An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
287
+ * @param {string} transactionId - Transaction ID for staging the operation.
147
288
  * @throws {AppwriteException}
148
289
  * @returns {Promise<Row>}
149
290
  * @deprecated Use the object parameter style method for a better developer experience.
150
291
  */
151
- 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>;
292
+ 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>;
152
293
  /**
153
294
  * Delete a row by its unique ID.
154
295
  *
155
296
  * @param {string} params.databaseId - Database ID.
156
297
  * @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).
157
298
  * @param {string} params.rowId - Row ID.
299
+ * @param {string} params.transactionId - Transaction ID for staging the operation.
158
300
  * @throws {AppwriteException}
159
301
  * @returns {Promise}
160
302
  */
@@ -162,6 +304,7 @@ export declare class TablesDB extends Service {
162
304
  databaseId: string;
163
305
  tableId: string;
164
306
  rowId: string;
307
+ transactionId?: string;
165
308
  }): Promise<{}>;
166
309
  /**
167
310
  * Delete a row by its unique ID.
@@ -169,11 +312,12 @@ export declare class TablesDB extends Service {
169
312
  * @param {string} databaseId - Database ID.
170
313
  * @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).
171
314
  * @param {string} rowId - Row ID.
315
+ * @param {string} transactionId - Transaction ID for staging the operation.
172
316
  * @throws {AppwriteException}
173
317
  * @returns {Promise<{}>}
174
318
  * @deprecated Use the object parameter style method for a better developer experience.
175
319
  */
176
- deleteRow(databaseId: string, tableId: string, rowId: string): Promise<{}>;
320
+ deleteRow(databaseId: string, tableId: string, rowId: string, transactionId?: string): Promise<{}>;
177
321
  /**
178
322
  * Decrement a specific column of a row by a given value.
179
323
  *
@@ -183,6 +327,7 @@ export declare class TablesDB extends Service {
183
327
  * @param {string} params.column - Column key.
184
328
  * @param {number} params.value - Value to increment the column by. The value must be a number.
185
329
  * @param {number} params.min - Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.
330
+ * @param {string} params.transactionId - Transaction ID for staging the operation.
186
331
  * @throws {AppwriteException}
187
332
  * @returns {Promise}
188
333
  */
@@ -193,6 +338,7 @@ export declare class TablesDB extends Service {
193
338
  column: string;
194
339
  value?: number;
195
340
  min?: number;
341
+ transactionId?: string;
196
342
  }): Promise<Row>;
197
343
  /**
198
344
  * Decrement a specific column of a row by a given value.
@@ -203,11 +349,12 @@ export declare class TablesDB extends Service {
203
349
  * @param {string} column - Column key.
204
350
  * @param {number} value - Value to increment the column by. The value must be a number.
205
351
  * @param {number} min - Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.
352
+ * @param {string} transactionId - Transaction ID for staging the operation.
206
353
  * @throws {AppwriteException}
207
354
  * @returns {Promise<Row>}
208
355
  * @deprecated Use the object parameter style method for a better developer experience.
209
356
  */
210
- decrementRowColumn<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rowId: string, column: string, value?: number, min?: number): Promise<Row>;
357
+ decrementRowColumn<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rowId: string, column: string, value?: number, min?: number, transactionId?: string): Promise<Row>;
211
358
  /**
212
359
  * Increment a specific column of a row by a given value.
213
360
  *
@@ -217,6 +364,7 @@ export declare class TablesDB extends Service {
217
364
  * @param {string} params.column - Column key.
218
365
  * @param {number} params.value - Value to increment the column by. The value must be a number.
219
366
  * @param {number} params.max - Maximum value for the column. If the current value is greater than this value, an error will be thrown.
367
+ * @param {string} params.transactionId - Transaction ID for staging the operation.
220
368
  * @throws {AppwriteException}
221
369
  * @returns {Promise}
222
370
  */
@@ -227,6 +375,7 @@ export declare class TablesDB extends Service {
227
375
  column: string;
228
376
  value?: number;
229
377
  max?: number;
378
+ transactionId?: string;
230
379
  }): Promise<Row>;
231
380
  /**
232
381
  * Increment a specific column of a row by a given value.
@@ -237,9 +386,10 @@ export declare class TablesDB extends Service {
237
386
  * @param {string} column - Column key.
238
387
  * @param {number} value - Value to increment the column by. The value must be a number.
239
388
  * @param {number} max - Maximum value for the column. If the current value is greater than this value, an error will be thrown.
389
+ * @param {string} transactionId - Transaction ID for staging the operation.
240
390
  * @throws {AppwriteException}
241
391
  * @returns {Promise<Row>}
242
392
  * @deprecated Use the object parameter style method for a better developer experience.
243
393
  */
244
- incrementRowColumn<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rowId: string, column: string, value?: number, max?: number): Promise<Row>;
394
+ incrementRowColumn<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rowId: string, column: string, value?: number, max?: number, transactionId?: string): Promise<Row>;
245
395
  }
@@ -8,23 +8,26 @@ export declare class Teams extends Service {
8
8
  *
9
9
  * @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, total, billingPlan
10
10
  * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
11
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
11
12
  * @throws {AppwriteException}
12
13
  * @returns {Promise}
13
14
  */
14
15
  list<Preferences extends Models.Preferences = Models.DefaultPreferences>(params?: {
15
16
  queries?: string[];
16
17
  search?: string;
18
+ total?: boolean;
17
19
  }): Promise<Models.TeamList<Preferences>>;
18
20
  /**
19
21
  * Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.
20
22
  *
21
23
  * @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, total, billingPlan
22
24
  * @param {string} search - Search term to filter your list results. Max length: 256 chars.
25
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
23
26
  * @throws {AppwriteException}
24
27
  * @returns {Promise<Models.TeamList<Preferences>>}
25
28
  * @deprecated Use the object parameter style method for a better developer experience.
26
29
  */
27
- list<Preferences extends Models.Preferences = Models.DefaultPreferences>(queries?: string[], search?: string): Promise<Models.TeamList<Preferences>>;
30
+ list<Preferences extends Models.Preferences = Models.DefaultPreferences>(queries?: string[], search?: string, total?: boolean): Promise<Models.TeamList<Preferences>>;
28
31
  /**
29
32
  * Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.
30
33
  *
@@ -116,6 +119,7 @@ export declare class Teams extends Service {
116
119
  * @param {string} params.teamId - Team ID.
117
120
  * @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: userId, teamId, invited, joined, confirm, roles
118
121
  * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
122
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
119
123
  * @throws {AppwriteException}
120
124
  * @returns {Promise}
121
125
  */
@@ -123,6 +127,7 @@ export declare class Teams extends Service {
123
127
  teamId: string;
124
128
  queries?: string[];
125
129
  search?: string;
130
+ total?: boolean;
126
131
  }): Promise<Models.MembershipList>;
127
132
  /**
128
133
  * Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes from the response by toggling membership privacy in the Console.
@@ -130,11 +135,12 @@ export declare class Teams extends Service {
130
135
  * @param {string} teamId - Team ID.
131
136
  * @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: userId, teamId, invited, joined, confirm, roles
132
137
  * @param {string} search - Search term to filter your list results. Max length: 256 chars.
138
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
133
139
  * @throws {AppwriteException}
134
140
  * @returns {Promise<Models.MembershipList>}
135
141
  * @deprecated Use the object parameter style method for a better developer experience.
136
142
  */
137
- listMemberships(teamId: string, queries?: string[], search?: string): Promise<Models.MembershipList>;
143
+ listMemberships(teamId: string, queries?: string[], search?: string, total?: boolean): Promise<Models.MembershipList>;
138
144
  /**
139
145
  * Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team.
140
146
  *