appwrite-cli 10.0.1 → 10.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/README.md +2 -2
- package/docs/examples/account/create-email-verification.md +2 -0
- package/docs/examples/account/update-email-verification.md +3 -0
- package/docs/examples/databases/create-operations.md +2 -0
- package/docs/examples/databases/create-transaction.md +1 -0
- package/docs/examples/databases/delete-transaction.md +2 -0
- package/docs/examples/databases/get-transaction.md +2 -0
- package/docs/examples/databases/list-transactions.md +1 -0
- package/docs/examples/databases/update-transaction.md +2 -0
- package/docs/examples/migrations/create-csv-migration.md +1 -1
- package/docs/examples/tablesdb/create-operations.md +2 -0
- package/docs/examples/tablesdb/create-transaction.md +1 -0
- package/docs/examples/tablesdb/delete-transaction.md +2 -0
- package/docs/examples/tablesdb/get-transaction.md +2 -0
- package/docs/examples/tablesdb/list-transactions.md +1 -0
- package/docs/examples/tablesdb/update-transaction.md +2 -0
- package/install.ps1 +2 -2
- package/install.sh +1 -1
- package/lib/client.js +2 -2
- package/lib/commands/account.js +91 -6
- package/lib/commands/databases.js +325 -13
- package/lib/commands/functions.js +1 -1
- package/lib/commands/sites.js +1 -1
- package/lib/commands/tables-db.js +369 -57
- package/lib/parser.js +1 -1
- package/package.json +1 -1
- package/scoop/appwrite.config.json +3 -3
|
@@ -119,6 +119,211 @@ const tablesDBCreate = async ({databaseId,name,enabled,parseOutput = true, overr
|
|
|
119
119
|
|
|
120
120
|
return response;
|
|
121
121
|
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* @typedef {Object} TablesDBListTransactionsRequestParams
|
|
125
|
+
* @property {string[]} queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries).
|
|
126
|
+
* @property {boolean} overrideForCli
|
|
127
|
+
* @property {boolean} parseOutput
|
|
128
|
+
* @property {libClient | undefined} sdk
|
|
129
|
+
*/
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* @param {TablesDBListTransactionsRequestParams} params
|
|
133
|
+
*/
|
|
134
|
+
const tablesDBListTransactions = async ({queries,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
135
|
+
let client = !sdk ? await sdkForProject() :
|
|
136
|
+
sdk;
|
|
137
|
+
let apiPath = '/tablesdb/transactions';
|
|
138
|
+
let payload = {};
|
|
139
|
+
if (typeof queries !== 'undefined') {
|
|
140
|
+
payload['queries'] = queries;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
let response = undefined;
|
|
144
|
+
|
|
145
|
+
response = await client.call('get', apiPath, {
|
|
146
|
+
}, payload);
|
|
147
|
+
|
|
148
|
+
if (parseOutput) {
|
|
149
|
+
if(console) {
|
|
150
|
+
showConsoleLink('tablesDB', 'listTransactions');
|
|
151
|
+
} else {
|
|
152
|
+
parse(response)
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
return response;
|
|
157
|
+
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* @typedef {Object} TablesDBCreateTransactionRequestParams
|
|
161
|
+
* @property {number} ttl Seconds before the transaction expires.
|
|
162
|
+
* @property {boolean} overrideForCli
|
|
163
|
+
* @property {boolean} parseOutput
|
|
164
|
+
* @property {libClient | undefined} sdk
|
|
165
|
+
*/
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* @param {TablesDBCreateTransactionRequestParams} params
|
|
169
|
+
*/
|
|
170
|
+
const tablesDBCreateTransaction = async ({ttl,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
171
|
+
let client = !sdk ? await sdkForProject() :
|
|
172
|
+
sdk;
|
|
173
|
+
let apiPath = '/tablesdb/transactions';
|
|
174
|
+
let payload = {};
|
|
175
|
+
if (typeof ttl !== 'undefined') {
|
|
176
|
+
payload['ttl'] = ttl;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
let response = undefined;
|
|
180
|
+
|
|
181
|
+
response = await client.call('post', apiPath, {
|
|
182
|
+
'content-type': 'application/json',
|
|
183
|
+
}, payload);
|
|
184
|
+
|
|
185
|
+
if (parseOutput) {
|
|
186
|
+
parse(response)
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
return response;
|
|
190
|
+
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* @typedef {Object} TablesDBGetTransactionRequestParams
|
|
194
|
+
* @property {string} transactionId Transaction ID.
|
|
195
|
+
* @property {boolean} overrideForCli
|
|
196
|
+
* @property {boolean} parseOutput
|
|
197
|
+
* @property {libClient | undefined} sdk
|
|
198
|
+
*/
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* @param {TablesDBGetTransactionRequestParams} params
|
|
202
|
+
*/
|
|
203
|
+
const tablesDBGetTransaction = async ({transactionId,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
204
|
+
let client = !sdk ? await sdkForProject() :
|
|
205
|
+
sdk;
|
|
206
|
+
let apiPath = '/tablesdb/transactions/{transactionId}'.replace('{transactionId}', transactionId);
|
|
207
|
+
let payload = {};
|
|
208
|
+
|
|
209
|
+
let response = undefined;
|
|
210
|
+
|
|
211
|
+
response = await client.call('get', apiPath, {
|
|
212
|
+
}, payload);
|
|
213
|
+
|
|
214
|
+
if (parseOutput) {
|
|
215
|
+
if(console) {
|
|
216
|
+
showConsoleLink('tablesDB', 'getTransaction', transactionId);
|
|
217
|
+
} else {
|
|
218
|
+
parse(response)
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
return response;
|
|
223
|
+
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* @typedef {Object} TablesDBUpdateTransactionRequestParams
|
|
227
|
+
* @property {string} transactionId Transaction ID.
|
|
228
|
+
* @property {boolean} commit Commit transaction?
|
|
229
|
+
* @property {boolean} rollback Rollback transaction?
|
|
230
|
+
* @property {boolean} overrideForCli
|
|
231
|
+
* @property {boolean} parseOutput
|
|
232
|
+
* @property {libClient | undefined} sdk
|
|
233
|
+
*/
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* @param {TablesDBUpdateTransactionRequestParams} params
|
|
237
|
+
*/
|
|
238
|
+
const tablesDBUpdateTransaction = async ({transactionId,commit,rollback,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
239
|
+
let client = !sdk ? await sdkForProject() :
|
|
240
|
+
sdk;
|
|
241
|
+
let apiPath = '/tablesdb/transactions/{transactionId}'.replace('{transactionId}', transactionId);
|
|
242
|
+
let payload = {};
|
|
243
|
+
if (typeof commit !== 'undefined') {
|
|
244
|
+
payload['commit'] = commit;
|
|
245
|
+
}
|
|
246
|
+
if (typeof rollback !== 'undefined') {
|
|
247
|
+
payload['rollback'] = rollback;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
let response = undefined;
|
|
251
|
+
|
|
252
|
+
response = await client.call('patch', apiPath, {
|
|
253
|
+
'content-type': 'application/json',
|
|
254
|
+
}, payload);
|
|
255
|
+
|
|
256
|
+
if (parseOutput) {
|
|
257
|
+
parse(response)
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
return response;
|
|
261
|
+
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* @typedef {Object} TablesDBDeleteTransactionRequestParams
|
|
265
|
+
* @property {string} transactionId Transaction ID.
|
|
266
|
+
* @property {boolean} overrideForCli
|
|
267
|
+
* @property {boolean} parseOutput
|
|
268
|
+
* @property {libClient | undefined} sdk
|
|
269
|
+
*/
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* @param {TablesDBDeleteTransactionRequestParams} params
|
|
273
|
+
*/
|
|
274
|
+
const tablesDBDeleteTransaction = async ({transactionId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
275
|
+
let client = !sdk ? await sdkForProject() :
|
|
276
|
+
sdk;
|
|
277
|
+
let apiPath = '/tablesdb/transactions/{transactionId}'.replace('{transactionId}', transactionId);
|
|
278
|
+
let payload = {};
|
|
279
|
+
|
|
280
|
+
let response = undefined;
|
|
281
|
+
|
|
282
|
+
response = await client.call('delete', apiPath, {
|
|
283
|
+
'content-type': 'application/json',
|
|
284
|
+
}, payload);
|
|
285
|
+
|
|
286
|
+
if (parseOutput) {
|
|
287
|
+
parse(response)
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
return response;
|
|
291
|
+
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* @typedef {Object} TablesDBCreateOperationsRequestParams
|
|
295
|
+
* @property {string} transactionId Transaction ID.
|
|
296
|
+
* @property {object[]} operations Array of staged operations.
|
|
297
|
+
* @property {boolean} overrideForCli
|
|
298
|
+
* @property {boolean} parseOutput
|
|
299
|
+
* @property {libClient | undefined} sdk
|
|
300
|
+
*/
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* @param {TablesDBCreateOperationsRequestParams} params
|
|
304
|
+
*/
|
|
305
|
+
const tablesDBCreateOperations = async ({transactionId,operations,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
306
|
+
let client = !sdk ? await sdkForProject() :
|
|
307
|
+
sdk;
|
|
308
|
+
let apiPath = '/tablesdb/transactions/{transactionId}/operations'.replace('{transactionId}', transactionId);
|
|
309
|
+
let payload = {};
|
|
310
|
+
operations = operations === true ? [] : operations;
|
|
311
|
+
if (typeof operations !== 'undefined') {
|
|
312
|
+
payload['operations'] = operations;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
let response = undefined;
|
|
316
|
+
|
|
317
|
+
response = await client.call('post', apiPath, {
|
|
318
|
+
'content-type': 'application/json',
|
|
319
|
+
}, payload);
|
|
320
|
+
|
|
321
|
+
if (parseOutput) {
|
|
322
|
+
parse(response)
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
return response;
|
|
326
|
+
|
|
122
327
|
}
|
|
123
328
|
/**
|
|
124
329
|
* @typedef {Object} TablesDBListUsageRequestParams
|
|
@@ -503,7 +708,7 @@ const tablesDBListColumns = async ({databaseId,tableId,queries,parseOutput = tru
|
|
|
503
708
|
/**
|
|
504
709
|
* @typedef {Object} TablesDBCreateBooleanColumnRequestParams
|
|
505
710
|
* @property {string} databaseId Database ID.
|
|
506
|
-
* @property {string} tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/
|
|
711
|
+
* @property {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).
|
|
507
712
|
* @property {string} key Column Key.
|
|
508
713
|
* @property {boolean} required Is column required?
|
|
509
714
|
* @property {boolean} xdefault Default value for column when not provided. Cannot be set when column is required.
|
|
@@ -550,7 +755,7 @@ const tablesDBCreateBooleanColumn = async ({databaseId,tableId,key,required,xdef
|
|
|
550
755
|
/**
|
|
551
756
|
* @typedef {Object} TablesDBUpdateBooleanColumnRequestParams
|
|
552
757
|
* @property {string} databaseId Database ID.
|
|
553
|
-
* @property {string} tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/
|
|
758
|
+
* @property {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).
|
|
554
759
|
* @property {string} key Column Key.
|
|
555
760
|
* @property {boolean} required Is column required?
|
|
556
761
|
* @property {boolean} xdefault Default value for column when not provided. Cannot be set when column is required.
|
|
@@ -1182,7 +1387,7 @@ const tablesDBUpdateIpColumn = async ({databaseId,tableId,key,required,xdefault,
|
|
|
1182
1387
|
/**
|
|
1183
1388
|
* @typedef {Object} TablesDBCreateLineColumnRequestParams
|
|
1184
1389
|
* @property {string} databaseId Database ID.
|
|
1185
|
-
* @property {string} tableId Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/server/
|
|
1390
|
+
* @property {string} tableId Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
1186
1391
|
* @property {string} key Column Key.
|
|
1187
1392
|
* @property {boolean} required Is column required?
|
|
1188
1393
|
* @property {any[]} xdefault Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when column is required.
|
|
@@ -1226,7 +1431,7 @@ const tablesDBCreateLineColumn = async ({databaseId,tableId,key,required,xdefaul
|
|
|
1226
1431
|
/**
|
|
1227
1432
|
* @typedef {Object} TablesDBUpdateLineColumnRequestParams
|
|
1228
1433
|
* @property {string} databaseId Database ID.
|
|
1229
|
-
* @property {string} tableId Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/server/
|
|
1434
|
+
* @property {string} tableId Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
1230
1435
|
* @property {string} key Column Key.
|
|
1231
1436
|
* @property {boolean} required Is column required?
|
|
1232
1437
|
* @property {any[]} xdefault Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when column is required.
|
|
@@ -1271,7 +1476,7 @@ const tablesDBUpdateLineColumn = async ({databaseId,tableId,key,required,xdefaul
|
|
|
1271
1476
|
/**
|
|
1272
1477
|
* @typedef {Object} TablesDBCreatePointColumnRequestParams
|
|
1273
1478
|
* @property {string} databaseId Database ID.
|
|
1274
|
-
* @property {string} tableId Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/server/
|
|
1479
|
+
* @property {string} tableId Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
1275
1480
|
* @property {string} key Column Key.
|
|
1276
1481
|
* @property {boolean} required Is column required?
|
|
1277
1482
|
* @property {any[]} xdefault Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.
|
|
@@ -1315,7 +1520,7 @@ const tablesDBCreatePointColumn = async ({databaseId,tableId,key,required,xdefau
|
|
|
1315
1520
|
/**
|
|
1316
1521
|
* @typedef {Object} TablesDBUpdatePointColumnRequestParams
|
|
1317
1522
|
* @property {string} databaseId Database ID.
|
|
1318
|
-
* @property {string} tableId Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/server/
|
|
1523
|
+
* @property {string} tableId Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
1319
1524
|
* @property {string} key Column Key.
|
|
1320
1525
|
* @property {boolean} required Is column required?
|
|
1321
1526
|
* @property {any[]} xdefault Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.
|
|
@@ -1360,7 +1565,7 @@ const tablesDBUpdatePointColumn = async ({databaseId,tableId,key,required,xdefau
|
|
|
1360
1565
|
/**
|
|
1361
1566
|
* @typedef {Object} TablesDBCreatePolygonColumnRequestParams
|
|
1362
1567
|
* @property {string} databaseId Database ID.
|
|
1363
|
-
* @property {string} tableId Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/server/
|
|
1568
|
+
* @property {string} tableId Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
1364
1569
|
* @property {string} key Column Key.
|
|
1365
1570
|
* @property {boolean} required Is column required?
|
|
1366
1571
|
* @property {any[]} xdefault Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.
|
|
@@ -1404,7 +1609,7 @@ const tablesDBCreatePolygonColumn = async ({databaseId,tableId,key,required,xdef
|
|
|
1404
1609
|
/**
|
|
1405
1610
|
* @typedef {Object} TablesDBUpdatePolygonColumnRequestParams
|
|
1406
1611
|
* @property {string} databaseId Database ID.
|
|
1407
|
-
* @property {string} tableId Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/server/
|
|
1612
|
+
* @property {string} tableId Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
1408
1613
|
* @property {string} key Column Key.
|
|
1409
1614
|
* @property {boolean} required Is column required?
|
|
1410
1615
|
* @property {any[]} xdefault Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.
|
|
@@ -1504,7 +1709,7 @@ const tablesDBCreateRelationshipColumn = async ({databaseId,tableId,relatedTable
|
|
|
1504
1709
|
/**
|
|
1505
1710
|
* @typedef {Object} TablesDBCreateStringColumnRequestParams
|
|
1506
1711
|
* @property {string} databaseId Database ID.
|
|
1507
|
-
* @property {string} tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/
|
|
1712
|
+
* @property {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).
|
|
1508
1713
|
* @property {string} key Column Key.
|
|
1509
1714
|
* @property {number} size Column size for text columns, in number of characters.
|
|
1510
1715
|
* @property {boolean} required Is column required?
|
|
@@ -1559,7 +1764,7 @@ const tablesDBCreateStringColumn = async ({databaseId,tableId,key,size,required,
|
|
|
1559
1764
|
/**
|
|
1560
1765
|
* @typedef {Object} TablesDBUpdateStringColumnRequestParams
|
|
1561
1766
|
* @property {string} databaseId Database ID.
|
|
1562
|
-
* @property {string} tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/
|
|
1767
|
+
* @property {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
1768
|
* @property {string} key Column Key.
|
|
1564
1769
|
* @property {boolean} required Is column required?
|
|
1565
1770
|
* @property {string} xdefault Default value for column when not provided. Cannot be set when column is required.
|
|
@@ -1805,7 +2010,7 @@ const tablesDBUpdateRelationshipColumn = async ({databaseId,tableId,key,onDelete
|
|
|
1805
2010
|
/**
|
|
1806
2011
|
* @typedef {Object} TablesDBListIndexesRequestParams
|
|
1807
2012
|
* @property {string} databaseId Database ID.
|
|
1808
|
-
* @property {string} tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/
|
|
2013
|
+
* @property {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).
|
|
1809
2014
|
* @property {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
|
|
1810
2015
|
* @property {boolean} overrideForCli
|
|
1811
2016
|
* @property {boolean} parseOutput
|
|
@@ -1843,7 +2048,7 @@ const tablesDBListIndexes = async ({databaseId,tableId,queries,parseOutput = tru
|
|
|
1843
2048
|
/**
|
|
1844
2049
|
* @typedef {Object} TablesDBCreateIndexRequestParams
|
|
1845
2050
|
* @property {string} databaseId Database ID.
|
|
1846
|
-
* @property {string} tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/
|
|
2051
|
+
* @property {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).
|
|
1847
2052
|
* @property {string} key Index Key.
|
|
1848
2053
|
* @property {IndexType} type Index type.
|
|
1849
2054
|
* @property {string[]} columns Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.
|
|
@@ -1897,7 +2102,7 @@ const tablesDBCreateIndex = async ({databaseId,tableId,key,type,columns,orders,l
|
|
|
1897
2102
|
/**
|
|
1898
2103
|
* @typedef {Object} TablesDBGetIndexRequestParams
|
|
1899
2104
|
* @property {string} databaseId Database ID.
|
|
1900
|
-
* @property {string} tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/
|
|
2105
|
+
* @property {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).
|
|
1901
2106
|
* @property {string} key Index Key.
|
|
1902
2107
|
* @property {boolean} overrideForCli
|
|
1903
2108
|
* @property {boolean} parseOutput
|
|
@@ -1928,7 +2133,7 @@ const tablesDBGetIndex = async ({databaseId,tableId,key,parseOutput = true, over
|
|
|
1928
2133
|
/**
|
|
1929
2134
|
* @typedef {Object} TablesDBDeleteIndexRequestParams
|
|
1930
2135
|
* @property {string} databaseId Database ID.
|
|
1931
|
-
* @property {string} tableId Table ID. You can create a new table using the
|
|
2136
|
+
* @property {string} tableId Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
1932
2137
|
* @property {string} key Index Key.
|
|
1933
2138
|
* @property {boolean} overrideForCli
|
|
1934
2139
|
* @property {boolean} parseOutput
|
|
@@ -1998,8 +2203,9 @@ const tablesDBListTableLogs = async ({databaseId,tableId,queries,parseOutput = t
|
|
|
1998
2203
|
/**
|
|
1999
2204
|
* @typedef {Object} TablesDBListRowsRequestParams
|
|
2000
2205
|
* @property {string} databaseId Database ID.
|
|
2001
|
-
* @property {string} tableId Table ID. You can create a new table using the
|
|
2206
|
+
* @property {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).
|
|
2002
2207
|
* @property {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.
|
|
2208
|
+
* @property {string} transactionId Transaction ID to read uncommitted changes within the transaction.
|
|
2003
2209
|
* @property {boolean} overrideForCli
|
|
2004
2210
|
* @property {boolean} parseOutput
|
|
2005
2211
|
* @property {libClient | undefined} sdk
|
|
@@ -2008,7 +2214,7 @@ const tablesDBListTableLogs = async ({databaseId,tableId,queries,parseOutput = t
|
|
|
2008
2214
|
/**
|
|
2009
2215
|
* @param {TablesDBListRowsRequestParams} params
|
|
2010
2216
|
*/
|
|
2011
|
-
const tablesDBListRows = async ({databaseId,tableId,queries,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
2217
|
+
const tablesDBListRows = async ({databaseId,tableId,queries,transactionId,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
2012
2218
|
let client = !sdk ? await sdkForProject() :
|
|
2013
2219
|
sdk;
|
|
2014
2220
|
let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
@@ -2016,6 +2222,9 @@ const tablesDBListRows = async ({databaseId,tableId,queries,parseOutput = true,
|
|
|
2016
2222
|
if (typeof queries !== 'undefined') {
|
|
2017
2223
|
payload['queries'] = queries;
|
|
2018
2224
|
}
|
|
2225
|
+
if (typeof transactionId !== 'undefined') {
|
|
2226
|
+
payload['transactionId'] = transactionId;
|
|
2227
|
+
}
|
|
2019
2228
|
|
|
2020
2229
|
let response = undefined;
|
|
2021
2230
|
|
|
@@ -2036,10 +2245,11 @@ const tablesDBListRows = async ({databaseId,tableId,queries,parseOutput = true,
|
|
|
2036
2245
|
/**
|
|
2037
2246
|
* @typedef {Object} TablesDBCreateRowRequestParams
|
|
2038
2247
|
* @property {string} databaseId Database ID.
|
|
2039
|
-
* @property {string} tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/
|
|
2248
|
+
* @property {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.
|
|
2040
2249
|
* @property {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.
|
|
2041
2250
|
* @property {object} data Row data as JSON object.
|
|
2042
2251
|
* @property {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).
|
|
2252
|
+
* @property {string} transactionId Transaction ID for staging the operation.
|
|
2043
2253
|
* @property {boolean} overrideForCli
|
|
2044
2254
|
* @property {boolean} parseOutput
|
|
2045
2255
|
* @property {libClient | undefined} sdk
|
|
@@ -2048,7 +2258,7 @@ const tablesDBListRows = async ({databaseId,tableId,queries,parseOutput = true,
|
|
|
2048
2258
|
/**
|
|
2049
2259
|
* @param {TablesDBCreateRowRequestParams} params
|
|
2050
2260
|
*/
|
|
2051
|
-
const tablesDBCreateRow = async ({databaseId,tableId,rowId,data,permissions,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
2261
|
+
const tablesDBCreateRow = async ({databaseId,tableId,rowId,data,permissions,transactionId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
2052
2262
|
let client = !sdk ? await sdkForProject() :
|
|
2053
2263
|
sdk;
|
|
2054
2264
|
let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
@@ -2063,6 +2273,9 @@ const tablesDBCreateRow = async ({databaseId,tableId,rowId,data,permissions,pars
|
|
|
2063
2273
|
if (typeof permissions !== 'undefined') {
|
|
2064
2274
|
payload['permissions'] = permissions;
|
|
2065
2275
|
}
|
|
2276
|
+
if (typeof transactionId !== 'undefined') {
|
|
2277
|
+
payload['transactionId'] = transactionId;
|
|
2278
|
+
}
|
|
2066
2279
|
|
|
2067
2280
|
let response = undefined;
|
|
2068
2281
|
|
|
@@ -2080,8 +2293,9 @@ const tablesDBCreateRow = async ({databaseId,tableId,rowId,data,permissions,pars
|
|
|
2080
2293
|
/**
|
|
2081
2294
|
* @typedef {Object} TablesDBCreateRowsRequestParams
|
|
2082
2295
|
* @property {string} databaseId Database ID.
|
|
2083
|
-
* @property {string} tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/
|
|
2296
|
+
* @property {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.
|
|
2084
2297
|
* @property {object[]} rows Array of rows data as JSON objects.
|
|
2298
|
+
* @property {string} transactionId Transaction ID for staging the operation.
|
|
2085
2299
|
* @property {boolean} overrideForCli
|
|
2086
2300
|
* @property {boolean} parseOutput
|
|
2087
2301
|
* @property {libClient | undefined} sdk
|
|
@@ -2090,7 +2304,7 @@ const tablesDBCreateRow = async ({databaseId,tableId,rowId,data,permissions,pars
|
|
|
2090
2304
|
/**
|
|
2091
2305
|
* @param {TablesDBCreateRowsRequestParams} params
|
|
2092
2306
|
*/
|
|
2093
|
-
const tablesDBCreateRows = async ({databaseId,tableId,rows,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
2307
|
+
const tablesDBCreateRows = async ({databaseId,tableId,rows,transactionId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
2094
2308
|
let client = !sdk ? await sdkForProject() :
|
|
2095
2309
|
sdk;
|
|
2096
2310
|
let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
@@ -2099,6 +2313,9 @@ const tablesDBCreateRows = async ({databaseId,tableId,rows,parseOutput = true, o
|
|
|
2099
2313
|
if (typeof rows !== 'undefined') {
|
|
2100
2314
|
payload['rows'] = rows;
|
|
2101
2315
|
}
|
|
2316
|
+
if (typeof transactionId !== 'undefined') {
|
|
2317
|
+
payload['transactionId'] = transactionId;
|
|
2318
|
+
}
|
|
2102
2319
|
|
|
2103
2320
|
let response = undefined;
|
|
2104
2321
|
|
|
@@ -2118,6 +2335,7 @@ const tablesDBCreateRows = async ({databaseId,tableId,rows,parseOutput = true, o
|
|
|
2118
2335
|
* @property {string} databaseId Database ID.
|
|
2119
2336
|
* @property {string} tableId Table ID.
|
|
2120
2337
|
* @property {object[]} rows Array of row data as JSON objects. May contain partial rows.
|
|
2338
|
+
* @property {string} transactionId Transaction ID for staging the operation.
|
|
2121
2339
|
* @property {boolean} overrideForCli
|
|
2122
2340
|
* @property {boolean} parseOutput
|
|
2123
2341
|
* @property {libClient | undefined} sdk
|
|
@@ -2126,7 +2344,7 @@ const tablesDBCreateRows = async ({databaseId,tableId,rows,parseOutput = true, o
|
|
|
2126
2344
|
/**
|
|
2127
2345
|
* @param {TablesDBUpsertRowsRequestParams} params
|
|
2128
2346
|
*/
|
|
2129
|
-
const tablesDBUpsertRows = async ({databaseId,tableId,rows,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
2347
|
+
const tablesDBUpsertRows = async ({databaseId,tableId,rows,transactionId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
2130
2348
|
let client = !sdk ? await sdkForProject() :
|
|
2131
2349
|
sdk;
|
|
2132
2350
|
let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
@@ -2135,6 +2353,9 @@ const tablesDBUpsertRows = async ({databaseId,tableId,rows,parseOutput = true, o
|
|
|
2135
2353
|
if (typeof rows !== 'undefined') {
|
|
2136
2354
|
payload['rows'] = rows;
|
|
2137
2355
|
}
|
|
2356
|
+
if (typeof transactionId !== 'undefined') {
|
|
2357
|
+
payload['transactionId'] = transactionId;
|
|
2358
|
+
}
|
|
2138
2359
|
|
|
2139
2360
|
let response = undefined;
|
|
2140
2361
|
|
|
@@ -2155,6 +2376,7 @@ const tablesDBUpsertRows = async ({databaseId,tableId,rows,parseOutput = true, o
|
|
|
2155
2376
|
* @property {string} tableId Table ID.
|
|
2156
2377
|
* @property {object} data Row data as JSON object. Include only column and value pairs to be updated.
|
|
2157
2378
|
* @property {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.
|
|
2379
|
+
* @property {string} transactionId Transaction ID for staging the operation.
|
|
2158
2380
|
* @property {boolean} overrideForCli
|
|
2159
2381
|
* @property {boolean} parseOutput
|
|
2160
2382
|
* @property {libClient | undefined} sdk
|
|
@@ -2163,7 +2385,7 @@ const tablesDBUpsertRows = async ({databaseId,tableId,rows,parseOutput = true, o
|
|
|
2163
2385
|
/**
|
|
2164
2386
|
* @param {TablesDBUpdateRowsRequestParams} params
|
|
2165
2387
|
*/
|
|
2166
|
-
const tablesDBUpdateRows = async ({databaseId,tableId,data,queries,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
2388
|
+
const tablesDBUpdateRows = async ({databaseId,tableId,data,queries,transactionId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
2167
2389
|
let client = !sdk ? await sdkForProject() :
|
|
2168
2390
|
sdk;
|
|
2169
2391
|
let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
@@ -2175,6 +2397,9 @@ const tablesDBUpdateRows = async ({databaseId,tableId,data,queries,parseOutput =
|
|
|
2175
2397
|
if (typeof queries !== 'undefined') {
|
|
2176
2398
|
payload['queries'] = queries;
|
|
2177
2399
|
}
|
|
2400
|
+
if (typeof transactionId !== 'undefined') {
|
|
2401
|
+
payload['transactionId'] = transactionId;
|
|
2402
|
+
}
|
|
2178
2403
|
|
|
2179
2404
|
let response = undefined;
|
|
2180
2405
|
|
|
@@ -2192,8 +2417,9 @@ const tablesDBUpdateRows = async ({databaseId,tableId,data,queries,parseOutput =
|
|
|
2192
2417
|
/**
|
|
2193
2418
|
* @typedef {Object} TablesDBDeleteRowsRequestParams
|
|
2194
2419
|
* @property {string} databaseId Database ID.
|
|
2195
|
-
* @property {string} tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/
|
|
2420
|
+
* @property {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).
|
|
2196
2421
|
* @property {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.
|
|
2422
|
+
* @property {string} transactionId Transaction ID for staging the operation.
|
|
2197
2423
|
* @property {boolean} overrideForCli
|
|
2198
2424
|
* @property {boolean} parseOutput
|
|
2199
2425
|
* @property {libClient | undefined} sdk
|
|
@@ -2202,7 +2428,7 @@ const tablesDBUpdateRows = async ({databaseId,tableId,data,queries,parseOutput =
|
|
|
2202
2428
|
/**
|
|
2203
2429
|
* @param {TablesDBDeleteRowsRequestParams} params
|
|
2204
2430
|
*/
|
|
2205
|
-
const tablesDBDeleteRows = async ({databaseId,tableId,queries,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
2431
|
+
const tablesDBDeleteRows = async ({databaseId,tableId,queries,transactionId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
2206
2432
|
let client = !sdk ? await sdkForProject() :
|
|
2207
2433
|
sdk;
|
|
2208
2434
|
let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
|
|
@@ -2211,6 +2437,9 @@ const tablesDBDeleteRows = async ({databaseId,tableId,queries,parseOutput = true
|
|
|
2211
2437
|
if (typeof queries !== 'undefined') {
|
|
2212
2438
|
payload['queries'] = queries;
|
|
2213
2439
|
}
|
|
2440
|
+
if (typeof transactionId !== 'undefined') {
|
|
2441
|
+
payload['transactionId'] = transactionId;
|
|
2442
|
+
}
|
|
2214
2443
|
|
|
2215
2444
|
let response = undefined;
|
|
2216
2445
|
|
|
@@ -2228,9 +2457,10 @@ const tablesDBDeleteRows = async ({databaseId,tableId,queries,parseOutput = true
|
|
|
2228
2457
|
/**
|
|
2229
2458
|
* @typedef {Object} TablesDBGetRowRequestParams
|
|
2230
2459
|
* @property {string} databaseId Database ID.
|
|
2231
|
-
* @property {string} tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/
|
|
2460
|
+
* @property {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).
|
|
2232
2461
|
* @property {string} rowId Row ID.
|
|
2233
2462
|
* @property {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.
|
|
2463
|
+
* @property {string} transactionId Transaction ID to read uncommitted changes within the transaction.
|
|
2234
2464
|
* @property {boolean} overrideForCli
|
|
2235
2465
|
* @property {boolean} parseOutput
|
|
2236
2466
|
* @property {libClient | undefined} sdk
|
|
@@ -2239,7 +2469,7 @@ const tablesDBDeleteRows = async ({databaseId,tableId,queries,parseOutput = true
|
|
|
2239
2469
|
/**
|
|
2240
2470
|
* @param {TablesDBGetRowRequestParams} params
|
|
2241
2471
|
*/
|
|
2242
|
-
const tablesDBGetRow = async ({databaseId,tableId,rowId,queries,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
2472
|
+
const tablesDBGetRow = async ({databaseId,tableId,rowId,queries,transactionId,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
2243
2473
|
let client = !sdk ? await sdkForProject() :
|
|
2244
2474
|
sdk;
|
|
2245
2475
|
let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{rowId}', rowId);
|
|
@@ -2247,6 +2477,9 @@ const tablesDBGetRow = async ({databaseId,tableId,rowId,queries,parseOutput = tr
|
|
|
2247
2477
|
if (typeof queries !== 'undefined') {
|
|
2248
2478
|
payload['queries'] = queries;
|
|
2249
2479
|
}
|
|
2480
|
+
if (typeof transactionId !== 'undefined') {
|
|
2481
|
+
payload['transactionId'] = transactionId;
|
|
2482
|
+
}
|
|
2250
2483
|
|
|
2251
2484
|
let response = undefined;
|
|
2252
2485
|
|
|
@@ -2271,6 +2504,7 @@ const tablesDBGetRow = async ({databaseId,tableId,rowId,queries,parseOutput = tr
|
|
|
2271
2504
|
* @property {string} rowId Row ID.
|
|
2272
2505
|
* @property {object} data Row data as JSON object. Include all required columns of the row to be created or updated.
|
|
2273
2506
|
* @property {string[]} permissions An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
2507
|
+
* @property {string} transactionId Transaction ID for staging the operation.
|
|
2274
2508
|
* @property {boolean} overrideForCli
|
|
2275
2509
|
* @property {boolean} parseOutput
|
|
2276
2510
|
* @property {libClient | undefined} sdk
|
|
@@ -2279,7 +2513,7 @@ const tablesDBGetRow = async ({databaseId,tableId,rowId,queries,parseOutput = tr
|
|
|
2279
2513
|
/**
|
|
2280
2514
|
* @param {TablesDBUpsertRowRequestParams} params
|
|
2281
2515
|
*/
|
|
2282
|
-
const tablesDBUpsertRow = async ({databaseId,tableId,rowId,data,permissions,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
2516
|
+
const tablesDBUpsertRow = async ({databaseId,tableId,rowId,data,permissions,transactionId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
2283
2517
|
let client = !sdk ? await sdkForProject() :
|
|
2284
2518
|
sdk;
|
|
2285
2519
|
let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{rowId}', rowId);
|
|
@@ -2291,6 +2525,9 @@ const tablesDBUpsertRow = async ({databaseId,tableId,rowId,data,permissions,pars
|
|
|
2291
2525
|
if (typeof permissions !== 'undefined') {
|
|
2292
2526
|
payload['permissions'] = permissions;
|
|
2293
2527
|
}
|
|
2528
|
+
if (typeof transactionId !== 'undefined') {
|
|
2529
|
+
payload['transactionId'] = transactionId;
|
|
2530
|
+
}
|
|
2294
2531
|
|
|
2295
2532
|
let response = undefined;
|
|
2296
2533
|
|
|
@@ -2312,6 +2549,7 @@ const tablesDBUpsertRow = async ({databaseId,tableId,rowId,data,permissions,pars
|
|
|
2312
2549
|
* @property {string} rowId Row ID.
|
|
2313
2550
|
* @property {object} data Row data as JSON object. Include only columns and value pairs to be updated.
|
|
2314
2551
|
* @property {string[]} permissions An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
2552
|
+
* @property {string} transactionId Transaction ID for staging the operation.
|
|
2315
2553
|
* @property {boolean} overrideForCli
|
|
2316
2554
|
* @property {boolean} parseOutput
|
|
2317
2555
|
* @property {libClient | undefined} sdk
|
|
@@ -2320,7 +2558,7 @@ const tablesDBUpsertRow = async ({databaseId,tableId,rowId,data,permissions,pars
|
|
|
2320
2558
|
/**
|
|
2321
2559
|
* @param {TablesDBUpdateRowRequestParams} params
|
|
2322
2560
|
*/
|
|
2323
|
-
const tablesDBUpdateRow = async ({databaseId,tableId,rowId,data,permissions,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
2561
|
+
const tablesDBUpdateRow = async ({databaseId,tableId,rowId,data,permissions,transactionId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
2324
2562
|
let client = !sdk ? await sdkForProject() :
|
|
2325
2563
|
sdk;
|
|
2326
2564
|
let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{rowId}', rowId);
|
|
@@ -2332,6 +2570,9 @@ const tablesDBUpdateRow = async ({databaseId,tableId,rowId,data,permissions,pars
|
|
|
2332
2570
|
if (typeof permissions !== 'undefined') {
|
|
2333
2571
|
payload['permissions'] = permissions;
|
|
2334
2572
|
}
|
|
2573
|
+
if (typeof transactionId !== 'undefined') {
|
|
2574
|
+
payload['transactionId'] = transactionId;
|
|
2575
|
+
}
|
|
2335
2576
|
|
|
2336
2577
|
let response = undefined;
|
|
2337
2578
|
|
|
@@ -2349,8 +2590,9 @@ const tablesDBUpdateRow = async ({databaseId,tableId,rowId,data,permissions,pars
|
|
|
2349
2590
|
/**
|
|
2350
2591
|
* @typedef {Object} TablesDBDeleteRowRequestParams
|
|
2351
2592
|
* @property {string} databaseId Database ID.
|
|
2352
|
-
* @property {string} tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/
|
|
2593
|
+
* @property {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).
|
|
2353
2594
|
* @property {string} rowId Row ID.
|
|
2595
|
+
* @property {string} transactionId Transaction ID for staging the operation.
|
|
2354
2596
|
* @property {boolean} overrideForCli
|
|
2355
2597
|
* @property {boolean} parseOutput
|
|
2356
2598
|
* @property {libClient | undefined} sdk
|
|
@@ -2359,11 +2601,14 @@ const tablesDBUpdateRow = async ({databaseId,tableId,rowId,data,permissions,pars
|
|
|
2359
2601
|
/**
|
|
2360
2602
|
* @param {TablesDBDeleteRowRequestParams} params
|
|
2361
2603
|
*/
|
|
2362
|
-
const tablesDBDeleteRow = async ({databaseId,tableId,rowId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
2604
|
+
const tablesDBDeleteRow = async ({databaseId,tableId,rowId,transactionId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
2363
2605
|
let client = !sdk ? await sdkForProject() :
|
|
2364
2606
|
sdk;
|
|
2365
2607
|
let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{rowId}', rowId);
|
|
2366
2608
|
let payload = {};
|
|
2609
|
+
if (typeof transactionId !== 'undefined') {
|
|
2610
|
+
payload['transactionId'] = transactionId;
|
|
2611
|
+
}
|
|
2367
2612
|
|
|
2368
2613
|
let response = undefined;
|
|
2369
2614
|
|
|
@@ -2425,6 +2670,7 @@ const tablesDBListRowLogs = async ({databaseId,tableId,rowId,queries,parseOutput
|
|
|
2425
2670
|
* @property {string} column Column key.
|
|
2426
2671
|
* @property {number} value Value to increment the column by. The value must be a number.
|
|
2427
2672
|
* @property {number} min Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.
|
|
2673
|
+
* @property {string} transactionId Transaction ID for staging the operation.
|
|
2428
2674
|
* @property {boolean} overrideForCli
|
|
2429
2675
|
* @property {boolean} parseOutput
|
|
2430
2676
|
* @property {libClient | undefined} sdk
|
|
@@ -2433,7 +2679,7 @@ const tablesDBListRowLogs = async ({databaseId,tableId,rowId,queries,parseOutput
|
|
|
2433
2679
|
/**
|
|
2434
2680
|
* @param {TablesDBDecrementRowColumnRequestParams} params
|
|
2435
2681
|
*/
|
|
2436
|
-
const tablesDBDecrementRowColumn = async ({databaseId,tableId,rowId,column,value,min,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
2682
|
+
const tablesDBDecrementRowColumn = async ({databaseId,tableId,rowId,column,value,min,transactionId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
2437
2683
|
let client = !sdk ? await sdkForProject() :
|
|
2438
2684
|
sdk;
|
|
2439
2685
|
let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/decrement'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{rowId}', rowId).replace('{column}', column);
|
|
@@ -2444,6 +2690,9 @@ const tablesDBDecrementRowColumn = async ({databaseId,tableId,rowId,column,value
|
|
|
2444
2690
|
if (typeof min !== 'undefined') {
|
|
2445
2691
|
payload['min'] = min;
|
|
2446
2692
|
}
|
|
2693
|
+
if (typeof transactionId !== 'undefined') {
|
|
2694
|
+
payload['transactionId'] = transactionId;
|
|
2695
|
+
}
|
|
2447
2696
|
|
|
2448
2697
|
let response = undefined;
|
|
2449
2698
|
|
|
@@ -2466,6 +2715,7 @@ const tablesDBDecrementRowColumn = async ({databaseId,tableId,rowId,column,value
|
|
|
2466
2715
|
* @property {string} column Column key.
|
|
2467
2716
|
* @property {number} value Value to increment the column by. The value must be a number.
|
|
2468
2717
|
* @property {number} max Maximum value for the column. If the current value is greater than this value, an error will be thrown.
|
|
2718
|
+
* @property {string} transactionId Transaction ID for staging the operation.
|
|
2469
2719
|
* @property {boolean} overrideForCli
|
|
2470
2720
|
* @property {boolean} parseOutput
|
|
2471
2721
|
* @property {libClient | undefined} sdk
|
|
@@ -2474,7 +2724,7 @@ const tablesDBDecrementRowColumn = async ({databaseId,tableId,rowId,column,value
|
|
|
2474
2724
|
/**
|
|
2475
2725
|
* @param {TablesDBIncrementRowColumnRequestParams} params
|
|
2476
2726
|
*/
|
|
2477
|
-
const tablesDBIncrementRowColumn = async ({databaseId,tableId,rowId,column,value,max,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
2727
|
+
const tablesDBIncrementRowColumn = async ({databaseId,tableId,rowId,column,value,max,transactionId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
2478
2728
|
let client = !sdk ? await sdkForProject() :
|
|
2479
2729
|
sdk;
|
|
2480
2730
|
let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/increment'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{rowId}', rowId).replace('{column}', column);
|
|
@@ -2485,6 +2735,9 @@ const tablesDBIncrementRowColumn = async ({databaseId,tableId,rowId,column,value
|
|
|
2485
2735
|
if (typeof max !== 'undefined') {
|
|
2486
2736
|
payload['max'] = max;
|
|
2487
2737
|
}
|
|
2738
|
+
if (typeof transactionId !== 'undefined') {
|
|
2739
|
+
payload['transactionId'] = transactionId;
|
|
2740
|
+
}
|
|
2488
2741
|
|
|
2489
2742
|
let response = undefined;
|
|
2490
2743
|
|
|
@@ -2586,6 +2839,47 @@ tablesDB
|
|
|
2586
2839
|
.option(`--enabled [value]`, `Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.`, (value) => value === undefined ? true : parseBool(value))
|
|
2587
2840
|
.action(actionRunner(tablesDBCreate))
|
|
2588
2841
|
|
|
2842
|
+
tablesDB
|
|
2843
|
+
.command(`list-transactions`)
|
|
2844
|
+
.description(`List transactions across all databases.`)
|
|
2845
|
+
.option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries).`)
|
|
2846
|
+
.option(`--console`, `Get the resource console url`)
|
|
2847
|
+
.action(actionRunner(tablesDBListTransactions))
|
|
2848
|
+
|
|
2849
|
+
tablesDB
|
|
2850
|
+
.command(`create-transaction`)
|
|
2851
|
+
.description(`Create a new transaction.`)
|
|
2852
|
+
.option(`--ttl <ttl>`, `Seconds before the transaction expires.`, parseInteger)
|
|
2853
|
+
.action(actionRunner(tablesDBCreateTransaction))
|
|
2854
|
+
|
|
2855
|
+
tablesDB
|
|
2856
|
+
.command(`get-transaction`)
|
|
2857
|
+
.description(`Get a transaction by its unique ID.`)
|
|
2858
|
+
.requiredOption(`--transaction-id <transaction-id>`, `Transaction ID.`)
|
|
2859
|
+
.option(`--console`, `Get the resource console url`)
|
|
2860
|
+
.action(actionRunner(tablesDBGetTransaction))
|
|
2861
|
+
|
|
2862
|
+
tablesDB
|
|
2863
|
+
.command(`update-transaction`)
|
|
2864
|
+
.description(`Update a transaction, to either commit or roll back its operations.`)
|
|
2865
|
+
.requiredOption(`--transaction-id <transaction-id>`, `Transaction ID.`)
|
|
2866
|
+
.option(`--commit [value]`, `Commit transaction?`, (value) => value === undefined ? true : parseBool(value))
|
|
2867
|
+
.option(`--rollback [value]`, `Rollback transaction?`, (value) => value === undefined ? true : parseBool(value))
|
|
2868
|
+
.action(actionRunner(tablesDBUpdateTransaction))
|
|
2869
|
+
|
|
2870
|
+
tablesDB
|
|
2871
|
+
.command(`delete-transaction`)
|
|
2872
|
+
.description(`Delete a transaction by its unique ID.`)
|
|
2873
|
+
.requiredOption(`--transaction-id <transaction-id>`, `Transaction ID.`)
|
|
2874
|
+
.action(actionRunner(tablesDBDeleteTransaction))
|
|
2875
|
+
|
|
2876
|
+
tablesDB
|
|
2877
|
+
.command(`create-operations`)
|
|
2878
|
+
.description(`Create multiple operations in a single transaction.`)
|
|
2879
|
+
.requiredOption(`--transaction-id <transaction-id>`, `Transaction ID.`)
|
|
2880
|
+
.option(`--operations [operations...]`, `Array of staged operations.`)
|
|
2881
|
+
.action(actionRunner(tablesDBCreateOperations))
|
|
2882
|
+
|
|
2589
2883
|
tablesDB
|
|
2590
2884
|
.command(`list-usage`)
|
|
2591
2885
|
.description(`List usage metrics and statistics for all databases in the project. You can view the total number of databases, tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.`)
|
|
@@ -2625,7 +2919,7 @@ tablesDB
|
|
|
2625
2919
|
|
|
2626
2920
|
tablesDB
|
|
2627
2921
|
.command(`create-table`)
|
|
2628
|
-
.description(`Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/server/
|
|
2922
|
+
.description(`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.`)
|
|
2629
2923
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
2630
2924
|
.requiredOption(`--table-id <table-id>`, `Unique 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.`)
|
|
2631
2925
|
.requiredOption(`--name <name>`, `Table name. Max length: 128 chars.`)
|
|
@@ -2673,7 +2967,7 @@ tablesDB
|
|
|
2673
2967
|
.command(`create-boolean-column`)
|
|
2674
2968
|
.description(`Create a boolean column. `)
|
|
2675
2969
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
2676
|
-
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/
|
|
2970
|
+
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`)
|
|
2677
2971
|
.requiredOption(`--key <key>`, `Column Key.`)
|
|
2678
2972
|
.requiredOption(`--required [value]`, `Is column required?`, (value) => value === undefined ? true : parseBool(value))
|
|
2679
2973
|
.option(`--xdefault [value]`, `Default value for column when not provided. Cannot be set when column is required.`, (value) => value === undefined ? true : parseBool(value))
|
|
@@ -2684,7 +2978,7 @@ tablesDB
|
|
|
2684
2978
|
.command(`update-boolean-column`)
|
|
2685
2979
|
.description(`Update a boolean column. Changing the 'default' value will not update already existing rows.`)
|
|
2686
2980
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
2687
|
-
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/
|
|
2981
|
+
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`)
|
|
2688
2982
|
.requiredOption(`--key <key>`, `Column Key.`)
|
|
2689
2983
|
.requiredOption(`--required [value]`, `Is column required?`, (value) => value === undefined ? true : parseBool(value))
|
|
2690
2984
|
.option(`--xdefault [value]`, `Default value for column when not provided. Cannot be set when column is required.`, (value) => value === undefined ? true : parseBool(value))
|
|
@@ -2837,7 +3131,7 @@ tablesDB
|
|
|
2837
3131
|
.command(`create-line-column`)
|
|
2838
3132
|
.description(`Create a geometric line column.`)
|
|
2839
3133
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
2840
|
-
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/server/
|
|
3134
|
+
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`)
|
|
2841
3135
|
.requiredOption(`--key <key>`, `Column Key.`)
|
|
2842
3136
|
.requiredOption(`--required [value]`, `Is column required?`, (value) => value === undefined ? true : parseBool(value))
|
|
2843
3137
|
.option(`--xdefault <xdefault>`, `Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when column is required.`)
|
|
@@ -2847,7 +3141,7 @@ tablesDB
|
|
|
2847
3141
|
.command(`update-line-column`)
|
|
2848
3142
|
.description(`Update a line column. Changing the 'default' value will not update already existing rows.`)
|
|
2849
3143
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
2850
|
-
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/server/
|
|
3144
|
+
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`)
|
|
2851
3145
|
.requiredOption(`--key <key>`, `Column Key.`)
|
|
2852
3146
|
.requiredOption(`--required [value]`, `Is column required?`, (value) => value === undefined ? true : parseBool(value))
|
|
2853
3147
|
.option(`--xdefault <xdefault>`, `Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when column is required.`)
|
|
@@ -2858,7 +3152,7 @@ tablesDB
|
|
|
2858
3152
|
.command(`create-point-column`)
|
|
2859
3153
|
.description(`Create a geometric point column.`)
|
|
2860
3154
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
2861
|
-
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/server/
|
|
3155
|
+
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`)
|
|
2862
3156
|
.requiredOption(`--key <key>`, `Column Key.`)
|
|
2863
3157
|
.requiredOption(`--required [value]`, `Is column required?`, (value) => value === undefined ? true : parseBool(value))
|
|
2864
3158
|
.option(`--xdefault <xdefault>`, `Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.`)
|
|
@@ -2868,7 +3162,7 @@ tablesDB
|
|
|
2868
3162
|
.command(`update-point-column`)
|
|
2869
3163
|
.description(`Update a point column. Changing the 'default' value will not update already existing rows.`)
|
|
2870
3164
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
2871
|
-
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/server/
|
|
3165
|
+
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`)
|
|
2872
3166
|
.requiredOption(`--key <key>`, `Column Key.`)
|
|
2873
3167
|
.requiredOption(`--required [value]`, `Is column required?`, (value) => value === undefined ? true : parseBool(value))
|
|
2874
3168
|
.option(`--xdefault <xdefault>`, `Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.`)
|
|
@@ -2879,7 +3173,7 @@ tablesDB
|
|
|
2879
3173
|
.command(`create-polygon-column`)
|
|
2880
3174
|
.description(`Create a geometric polygon column.`)
|
|
2881
3175
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
2882
|
-
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/server/
|
|
3176
|
+
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`)
|
|
2883
3177
|
.requiredOption(`--key <key>`, `Column Key.`)
|
|
2884
3178
|
.requiredOption(`--required [value]`, `Is column required?`, (value) => value === undefined ? true : parseBool(value))
|
|
2885
3179
|
.option(`--xdefault <xdefault>`, `Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.`)
|
|
@@ -2889,7 +3183,7 @@ tablesDB
|
|
|
2889
3183
|
.command(`update-polygon-column`)
|
|
2890
3184
|
.description(`Update a polygon column. Changing the 'default' value will not update already existing rows.`)
|
|
2891
3185
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
2892
|
-
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/server/
|
|
3186
|
+
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`)
|
|
2893
3187
|
.requiredOption(`--key <key>`, `Column Key.`)
|
|
2894
3188
|
.requiredOption(`--required [value]`, `Is column required?`, (value) => value === undefined ? true : parseBool(value))
|
|
2895
3189
|
.option(`--xdefault <xdefault>`, `Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.`)
|
|
@@ -2913,7 +3207,7 @@ tablesDB
|
|
|
2913
3207
|
.command(`create-string-column`)
|
|
2914
3208
|
.description(`Create a string column. `)
|
|
2915
3209
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
2916
|
-
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/
|
|
3210
|
+
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`)
|
|
2917
3211
|
.requiredOption(`--key <key>`, `Column Key.`)
|
|
2918
3212
|
.requiredOption(`--size <size>`, `Column size for text columns, in number of characters.`, parseInteger)
|
|
2919
3213
|
.requiredOption(`--required [value]`, `Is column required?`, (value) => value === undefined ? true : parseBool(value))
|
|
@@ -2926,7 +3220,7 @@ tablesDB
|
|
|
2926
3220
|
.command(`update-string-column`)
|
|
2927
3221
|
.description(`Update a string column. Changing the 'default' value will not update already existing rows. `)
|
|
2928
3222
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
2929
|
-
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/
|
|
3223
|
+
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`)
|
|
2930
3224
|
.requiredOption(`--key <key>`, `Column Key.`)
|
|
2931
3225
|
.requiredOption(`--required [value]`, `Is column required?`, (value) => value === undefined ? true : parseBool(value))
|
|
2932
3226
|
.option(`--xdefault <xdefault>`, `Default value for column when not provided. Cannot be set when column is required.`)
|
|
@@ -2987,7 +3281,7 @@ tablesDB
|
|
|
2987
3281
|
.command(`list-indexes`)
|
|
2988
3282
|
.description(`List indexes on the table.`)
|
|
2989
3283
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
2990
|
-
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/
|
|
3284
|
+
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`)
|
|
2991
3285
|
.option(`--queries [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`)
|
|
2992
3286
|
.option(`--console`, `Get the resource console url`)
|
|
2993
3287
|
.action(actionRunner(tablesDBListIndexes))
|
|
@@ -2996,7 +3290,7 @@ tablesDB
|
|
|
2996
3290
|
.command(`create-index`)
|
|
2997
3291
|
.description(`Creates an index on the columns listed. Your index should include all the columns you will query in a single request. Type can be 'key', 'fulltext', or 'unique'.`)
|
|
2998
3292
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
2999
|
-
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/
|
|
3293
|
+
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`)
|
|
3000
3294
|
.requiredOption(`--key <key>`, `Index Key.`)
|
|
3001
3295
|
.requiredOption(`--type <type>`, `Index type.`)
|
|
3002
3296
|
.requiredOption(`--columns [columns...]`, `Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.`)
|
|
@@ -3008,7 +3302,7 @@ tablesDB
|
|
|
3008
3302
|
.command(`get-index`)
|
|
3009
3303
|
.description(`Get index by ID.`)
|
|
3010
3304
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
3011
|
-
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/
|
|
3305
|
+
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`)
|
|
3012
3306
|
.requiredOption(`--key <key>`, `Index Key.`)
|
|
3013
3307
|
.action(actionRunner(tablesDBGetIndex))
|
|
3014
3308
|
|
|
@@ -3016,7 +3310,7 @@ tablesDB
|
|
|
3016
3310
|
.command(`delete-index`)
|
|
3017
3311
|
.description(`Delete an index.`)
|
|
3018
3312
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
3019
|
-
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the
|
|
3313
|
+
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`)
|
|
3020
3314
|
.requiredOption(`--key <key>`, `Index Key.`)
|
|
3021
3315
|
.action(actionRunner(tablesDBDeleteIndex))
|
|
3022
3316
|
|
|
@@ -3033,35 +3327,39 @@ tablesDB
|
|
|
3033
3327
|
.command(`list-rows`)
|
|
3034
3328
|
.description(`Get a list of all the user's rows in a given table. You can use the query params to filter your results.`)
|
|
3035
3329
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
3036
|
-
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the
|
|
3330
|
+
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/products/databases/tables#create-table).`)
|
|
3037
3331
|
.option(`--queries [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.`)
|
|
3332
|
+
.option(`--transaction-id <transaction-id>`, `Transaction ID to read uncommitted changes within the transaction.`)
|
|
3038
3333
|
.option(`--console`, `Get the resource console url`)
|
|
3039
3334
|
.action(actionRunner(tablesDBListRows))
|
|
3040
3335
|
|
|
3041
3336
|
tablesDB
|
|
3042
3337
|
.command(`create-row`)
|
|
3043
|
-
.description(`Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/
|
|
3338
|
+
.description(`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.`)
|
|
3044
3339
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
3045
|
-
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/
|
|
3340
|
+
.requiredOption(`--table-id <table-id>`, `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.`)
|
|
3046
3341
|
.requiredOption(`--row-id <row-id>`, `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.`)
|
|
3047
3342
|
.requiredOption(`--data <data>`, `Row data as JSON object.`)
|
|
3048
3343
|
.option(`--permissions [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).`)
|
|
3344
|
+
.option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`)
|
|
3049
3345
|
.action(actionRunner(tablesDBCreateRow))
|
|
3050
3346
|
|
|
3051
3347
|
tablesDB
|
|
3052
3348
|
.command(`create-rows`)
|
|
3053
|
-
.description(`Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/
|
|
3349
|
+
.description(`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.`)
|
|
3054
3350
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
3055
|
-
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/
|
|
3351
|
+
.requiredOption(`--table-id <table-id>`, `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.`)
|
|
3056
3352
|
.requiredOption(`--rows [rows...]`, `Array of rows data as JSON objects.`)
|
|
3353
|
+
.option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`)
|
|
3057
3354
|
.action(actionRunner(tablesDBCreateRows))
|
|
3058
3355
|
|
|
3059
3356
|
tablesDB
|
|
3060
3357
|
.command(`upsert-rows`)
|
|
3061
|
-
.description(`Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/
|
|
3358
|
+
.description(`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. `)
|
|
3062
3359
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
3063
3360
|
.requiredOption(`--table-id <table-id>`, `Table ID.`)
|
|
3064
3361
|
.requiredOption(`--rows [rows...]`, `Array of row data as JSON objects. May contain partial rows.`)
|
|
3362
|
+
.option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`)
|
|
3065
3363
|
.action(actionRunner(tablesDBUpsertRows))
|
|
3066
3364
|
|
|
3067
3365
|
tablesDB
|
|
@@ -3071,34 +3369,38 @@ tablesDB
|
|
|
3071
3369
|
.requiredOption(`--table-id <table-id>`, `Table ID.`)
|
|
3072
3370
|
.option(`--data <data>`, `Row data as JSON object. Include only column and value pairs to be updated.`)
|
|
3073
3371
|
.option(`--queries [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.`)
|
|
3372
|
+
.option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`)
|
|
3074
3373
|
.action(actionRunner(tablesDBUpdateRows))
|
|
3075
3374
|
|
|
3076
3375
|
tablesDB
|
|
3077
3376
|
.command(`delete-rows`)
|
|
3078
3377
|
.description(`Bulk delete rows using queries, if no queries are passed then all rows are deleted.`)
|
|
3079
3378
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
3080
|
-
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/
|
|
3379
|
+
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`)
|
|
3081
3380
|
.option(`--queries [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.`)
|
|
3381
|
+
.option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`)
|
|
3082
3382
|
.action(actionRunner(tablesDBDeleteRows))
|
|
3083
3383
|
|
|
3084
3384
|
tablesDB
|
|
3085
3385
|
.command(`get-row`)
|
|
3086
3386
|
.description(`Get a row by its unique ID. This endpoint response returns a JSON object with the row data.`)
|
|
3087
3387
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
3088
|
-
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/
|
|
3388
|
+
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`)
|
|
3089
3389
|
.requiredOption(`--row-id <row-id>`, `Row ID.`)
|
|
3090
3390
|
.option(`--queries [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.`)
|
|
3391
|
+
.option(`--transaction-id <transaction-id>`, `Transaction ID to read uncommitted changes within the transaction.`)
|
|
3091
3392
|
.option(`--console`, `Get the resource console url`)
|
|
3092
3393
|
.action(actionRunner(tablesDBGetRow))
|
|
3093
3394
|
|
|
3094
3395
|
tablesDB
|
|
3095
3396
|
.command(`upsert-row`)
|
|
3096
|
-
.description(`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/server/
|
|
3397
|
+
.description(`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.`)
|
|
3097
3398
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
3098
3399
|
.requiredOption(`--table-id <table-id>`, `Table ID.`)
|
|
3099
3400
|
.requiredOption(`--row-id <row-id>`, `Row ID.`)
|
|
3100
3401
|
.option(`--data <data>`, `Row data as JSON object. Include all required columns of the row to be created or updated.`)
|
|
3101
3402
|
.option(`--permissions [permissions...]`, `An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).`)
|
|
3403
|
+
.option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`)
|
|
3102
3404
|
.action(actionRunner(tablesDBUpsertRow))
|
|
3103
3405
|
|
|
3104
3406
|
tablesDB
|
|
@@ -3109,14 +3411,16 @@ tablesDB
|
|
|
3109
3411
|
.requiredOption(`--row-id <row-id>`, `Row ID.`)
|
|
3110
3412
|
.option(`--data <data>`, `Row data as JSON object. Include only columns and value pairs to be updated.`)
|
|
3111
3413
|
.option(`--permissions [permissions...]`, `An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).`)
|
|
3414
|
+
.option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`)
|
|
3112
3415
|
.action(actionRunner(tablesDBUpdateRow))
|
|
3113
3416
|
|
|
3114
3417
|
tablesDB
|
|
3115
3418
|
.command(`delete-row`)
|
|
3116
3419
|
.description(`Delete a row by its unique ID.`)
|
|
3117
3420
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
3118
|
-
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/
|
|
3421
|
+
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`)
|
|
3119
3422
|
.requiredOption(`--row-id <row-id>`, `Row ID.`)
|
|
3423
|
+
.option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`)
|
|
3120
3424
|
.action(actionRunner(tablesDBDeleteRow))
|
|
3121
3425
|
|
|
3122
3426
|
tablesDB
|
|
@@ -3138,6 +3442,7 @@ tablesDB
|
|
|
3138
3442
|
.requiredOption(`--column <column>`, `Column key.`)
|
|
3139
3443
|
.option(`--value <value>`, `Value to increment the column by. The value must be a number.`, parseInteger)
|
|
3140
3444
|
.option(`--min <min>`, `Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.`, parseInteger)
|
|
3445
|
+
.option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`)
|
|
3141
3446
|
.action(actionRunner(tablesDBDecrementRowColumn))
|
|
3142
3447
|
|
|
3143
3448
|
tablesDB
|
|
@@ -3149,6 +3454,7 @@ tablesDB
|
|
|
3149
3454
|
.requiredOption(`--column <column>`, `Column key.`)
|
|
3150
3455
|
.option(`--value <value>`, `Value to increment the column by. The value must be a number.`, parseInteger)
|
|
3151
3456
|
.option(`--max <max>`, `Maximum value for the column. If the current value is greater than this value, an error will be thrown.`, parseInteger)
|
|
3457
|
+
.option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`)
|
|
3152
3458
|
.action(actionRunner(tablesDBIncrementRowColumn))
|
|
3153
3459
|
|
|
3154
3460
|
tablesDB
|
|
@@ -3171,6 +3477,12 @@ module.exports = {
|
|
|
3171
3477
|
tablesDB,
|
|
3172
3478
|
tablesDBList,
|
|
3173
3479
|
tablesDBCreate,
|
|
3480
|
+
tablesDBListTransactions,
|
|
3481
|
+
tablesDBCreateTransaction,
|
|
3482
|
+
tablesDBGetTransaction,
|
|
3483
|
+
tablesDBUpdateTransaction,
|
|
3484
|
+
tablesDBDeleteTransaction,
|
|
3485
|
+
tablesDBCreateOperations,
|
|
3174
3486
|
tablesDBListUsage,
|
|
3175
3487
|
tablesDBGet,
|
|
3176
3488
|
tablesDBUpdate,
|