node-appwrite 20.1.0 → 20.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.js +2 -2
- package/dist/client.js.map +1 -1
- package/dist/client.mjs +2 -2
- package/dist/client.mjs.map +1 -1
- package/dist/enums/execution-status.d.mts +2 -1
- package/dist/enums/execution-status.d.ts +2 -1
- package/dist/enums/execution-status.js +1 -0
- package/dist/enums/execution-status.js.map +1 -1
- package/dist/enums/execution-status.mjs +1 -0
- package/dist/enums/execution-status.mjs.map +1 -1
- package/dist/enums/framework.d.mts +1 -0
- package/dist/enums/framework.d.ts +1 -0
- package/dist/enums/framework.js +1 -0
- package/dist/enums/framework.js.map +1 -1
- package/dist/enums/framework.mjs +1 -0
- package/dist/enums/framework.mjs.map +1 -1
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -0
- package/dist/index.mjs.map +1 -1
- package/dist/models.d.mts +43 -1
- package/dist/models.d.ts +43 -1
- package/dist/operator.d.mts +181 -0
- package/dist/operator.d.ts +181 -0
- package/dist/operator.js +268 -0
- package/dist/operator.js.map +1 -0
- package/dist/operator.mjs +266 -0
- package/dist/operator.mjs.map +1 -0
- package/dist/query.js +6 -6
- package/dist/query.js.map +1 -1
- package/dist/query.mjs +6 -6
- package/dist/query.mjs.map +1 -1
- package/dist/services/account.d.mts +8 -2
- package/dist/services/account.d.ts +8 -2
- package/dist/services/account.js +14 -4
- package/dist/services/account.js.map +1 -1
- package/dist/services/account.mjs +14 -4
- package/dist/services/account.mjs.map +1 -1
- package/dist/services/databases.d.mts +192 -18
- package/dist/services/databases.d.ts +192 -18
- package/dist/services/databases.js +268 -16
- package/dist/services/databases.js.map +1 -1
- package/dist/services/databases.mjs +268 -16
- package/dist/services/databases.mjs.map +1 -1
- package/dist/services/functions.d.mts +12 -3
- package/dist/services/functions.d.ts +12 -3
- package/dist/services/functions.js +18 -3
- package/dist/services/functions.js.map +1 -1
- package/dist/services/functions.mjs +18 -3
- package/dist/services/functions.mjs.map +1 -1
- package/dist/services/messaging.d.mts +116 -9
- package/dist/services/messaging.d.ts +116 -9
- package/dist/services/messaging.js +182 -9
- package/dist/services/messaging.js.map +1 -1
- package/dist/services/messaging.mjs +182 -9
- package/dist/services/messaging.mjs.map +1 -1
- package/dist/services/sites.d.mts +12 -3
- package/dist/services/sites.d.ts +12 -3
- package/dist/services/sites.js +18 -3
- package/dist/services/sites.js.map +1 -1
- package/dist/services/sites.mjs +18 -3
- package/dist/services/sites.mjs.map +1 -1
- package/dist/services/storage.d.mts +8 -2
- package/dist/services/storage.d.ts +8 -2
- package/dist/services/storage.js +12 -2
- package/dist/services/storage.js.map +1 -1
- package/dist/services/storage.mjs +12 -2
- package/dist/services/storage.mjs.map +1 -1
- package/dist/services/tables-db.d.mts +190 -16
- package/dist/services/tables-db.d.ts +190 -16
- package/dist/services/tables-db.js +268 -16
- package/dist/services/tables-db.js.map +1 -1
- package/dist/services/tables-db.mjs +268 -16
- package/dist/services/tables-db.mjs.map +1 -1
- package/dist/services/teams.d.mts +8 -2
- package/dist/services/teams.d.ts +8 -2
- package/dist/services/teams.js +12 -2
- package/dist/services/teams.js.map +1 -1
- package/dist/services/teams.mjs +12 -2
- package/dist/services/teams.mjs.map +1 -1
- package/dist/services/tokens.d.mts +4 -1
- package/dist/services/tokens.d.ts +4 -1
- package/dist/services/tokens.js +6 -1
- package/dist/services/tokens.js.map +1 -1
- package/dist/services/tokens.mjs +6 -1
- package/dist/services/tokens.mjs.map +1 -1
- package/dist/services/users.d.mts +24 -6
- package/dist/services/users.d.ts +24 -6
- package/dist/services/users.js +37 -7
- package/dist/services/users.js.map +1 -1
- package/dist/services/users.mjs +37 -7
- package/dist/services/users.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -13,11 +13,13 @@ class TablesDB {
|
|
|
13
13
|
} else {
|
|
14
14
|
params = {
|
|
15
15
|
queries: paramsOrFirst,
|
|
16
|
-
search: rest[0]
|
|
16
|
+
search: rest[0],
|
|
17
|
+
total: rest[1]
|
|
17
18
|
};
|
|
18
19
|
}
|
|
19
20
|
const queries = params.queries;
|
|
20
21
|
const search = params.search;
|
|
22
|
+
const total = params.total;
|
|
21
23
|
const apiPath = "/tablesdb";
|
|
22
24
|
const payload = {};
|
|
23
25
|
if (typeof queries !== "undefined") {
|
|
@@ -26,6 +28,9 @@ class TablesDB {
|
|
|
26
28
|
if (typeof search !== "undefined") {
|
|
27
29
|
payload["search"] = search;
|
|
28
30
|
}
|
|
31
|
+
if (typeof total !== "undefined") {
|
|
32
|
+
payload["total"] = total;
|
|
33
|
+
}
|
|
29
34
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
30
35
|
const apiHeaders = {};
|
|
31
36
|
return this.client.call(
|
|
@@ -77,6 +82,173 @@ class TablesDB {
|
|
|
77
82
|
payload
|
|
78
83
|
);
|
|
79
84
|
}
|
|
85
|
+
listTransactions(paramsOrFirst) {
|
|
86
|
+
let params;
|
|
87
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
88
|
+
params = paramsOrFirst || {};
|
|
89
|
+
} else {
|
|
90
|
+
params = {
|
|
91
|
+
queries: paramsOrFirst
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
const queries = params.queries;
|
|
95
|
+
const apiPath = "/tablesdb/transactions";
|
|
96
|
+
const payload = {};
|
|
97
|
+
if (typeof queries !== "undefined") {
|
|
98
|
+
payload["queries"] = queries;
|
|
99
|
+
}
|
|
100
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
101
|
+
const apiHeaders = {};
|
|
102
|
+
return this.client.call(
|
|
103
|
+
"get",
|
|
104
|
+
uri,
|
|
105
|
+
apiHeaders,
|
|
106
|
+
payload
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
createTransaction(paramsOrFirst) {
|
|
110
|
+
let params;
|
|
111
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
112
|
+
params = paramsOrFirst || {};
|
|
113
|
+
} else {
|
|
114
|
+
params = {
|
|
115
|
+
ttl: paramsOrFirst
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
const ttl = params.ttl;
|
|
119
|
+
const apiPath = "/tablesdb/transactions";
|
|
120
|
+
const payload = {};
|
|
121
|
+
if (typeof ttl !== "undefined") {
|
|
122
|
+
payload["ttl"] = ttl;
|
|
123
|
+
}
|
|
124
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
125
|
+
const apiHeaders = {
|
|
126
|
+
"content-type": "application/json"
|
|
127
|
+
};
|
|
128
|
+
return this.client.call(
|
|
129
|
+
"post",
|
|
130
|
+
uri,
|
|
131
|
+
apiHeaders,
|
|
132
|
+
payload
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
getTransaction(paramsOrFirst) {
|
|
136
|
+
let params;
|
|
137
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
138
|
+
params = paramsOrFirst || {};
|
|
139
|
+
} else {
|
|
140
|
+
params = {
|
|
141
|
+
transactionId: paramsOrFirst
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
const transactionId = params.transactionId;
|
|
145
|
+
if (typeof transactionId === "undefined") {
|
|
146
|
+
throw new client.AppwriteException('Missing required parameter: "transactionId"');
|
|
147
|
+
}
|
|
148
|
+
const apiPath = "/tablesdb/transactions/{transactionId}".replace("{transactionId}", transactionId);
|
|
149
|
+
const payload = {};
|
|
150
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
151
|
+
const apiHeaders = {};
|
|
152
|
+
return this.client.call(
|
|
153
|
+
"get",
|
|
154
|
+
uri,
|
|
155
|
+
apiHeaders,
|
|
156
|
+
payload
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
updateTransaction(paramsOrFirst, ...rest) {
|
|
160
|
+
let params;
|
|
161
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
162
|
+
params = paramsOrFirst || {};
|
|
163
|
+
} else {
|
|
164
|
+
params = {
|
|
165
|
+
transactionId: paramsOrFirst,
|
|
166
|
+
commit: rest[0],
|
|
167
|
+
rollback: rest[1]
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
const transactionId = params.transactionId;
|
|
171
|
+
const commit = params.commit;
|
|
172
|
+
const rollback = params.rollback;
|
|
173
|
+
if (typeof transactionId === "undefined") {
|
|
174
|
+
throw new client.AppwriteException('Missing required parameter: "transactionId"');
|
|
175
|
+
}
|
|
176
|
+
const apiPath = "/tablesdb/transactions/{transactionId}".replace("{transactionId}", transactionId);
|
|
177
|
+
const payload = {};
|
|
178
|
+
if (typeof commit !== "undefined") {
|
|
179
|
+
payload["commit"] = commit;
|
|
180
|
+
}
|
|
181
|
+
if (typeof rollback !== "undefined") {
|
|
182
|
+
payload["rollback"] = rollback;
|
|
183
|
+
}
|
|
184
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
185
|
+
const apiHeaders = {
|
|
186
|
+
"content-type": "application/json"
|
|
187
|
+
};
|
|
188
|
+
return this.client.call(
|
|
189
|
+
"patch",
|
|
190
|
+
uri,
|
|
191
|
+
apiHeaders,
|
|
192
|
+
payload
|
|
193
|
+
);
|
|
194
|
+
}
|
|
195
|
+
deleteTransaction(paramsOrFirst) {
|
|
196
|
+
let params;
|
|
197
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
198
|
+
params = paramsOrFirst || {};
|
|
199
|
+
} else {
|
|
200
|
+
params = {
|
|
201
|
+
transactionId: paramsOrFirst
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
const transactionId = params.transactionId;
|
|
205
|
+
if (typeof transactionId === "undefined") {
|
|
206
|
+
throw new client.AppwriteException('Missing required parameter: "transactionId"');
|
|
207
|
+
}
|
|
208
|
+
const apiPath = "/tablesdb/transactions/{transactionId}".replace("{transactionId}", transactionId);
|
|
209
|
+
const payload = {};
|
|
210
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
211
|
+
const apiHeaders = {
|
|
212
|
+
"content-type": "application/json"
|
|
213
|
+
};
|
|
214
|
+
return this.client.call(
|
|
215
|
+
"delete",
|
|
216
|
+
uri,
|
|
217
|
+
apiHeaders,
|
|
218
|
+
payload
|
|
219
|
+
);
|
|
220
|
+
}
|
|
221
|
+
createOperations(paramsOrFirst, ...rest) {
|
|
222
|
+
let params;
|
|
223
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
224
|
+
params = paramsOrFirst || {};
|
|
225
|
+
} else {
|
|
226
|
+
params = {
|
|
227
|
+
transactionId: paramsOrFirst,
|
|
228
|
+
operations: rest[0]
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
const transactionId = params.transactionId;
|
|
232
|
+
const operations = params.operations;
|
|
233
|
+
if (typeof transactionId === "undefined") {
|
|
234
|
+
throw new client.AppwriteException('Missing required parameter: "transactionId"');
|
|
235
|
+
}
|
|
236
|
+
const apiPath = "/tablesdb/transactions/{transactionId}/operations".replace("{transactionId}", transactionId);
|
|
237
|
+
const payload = {};
|
|
238
|
+
if (typeof operations !== "undefined") {
|
|
239
|
+
payload["operations"] = operations;
|
|
240
|
+
}
|
|
241
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
242
|
+
const apiHeaders = {
|
|
243
|
+
"content-type": "application/json"
|
|
244
|
+
};
|
|
245
|
+
return this.client.call(
|
|
246
|
+
"post",
|
|
247
|
+
uri,
|
|
248
|
+
apiHeaders,
|
|
249
|
+
payload
|
|
250
|
+
);
|
|
251
|
+
}
|
|
80
252
|
get(paramsOrFirst) {
|
|
81
253
|
let params;
|
|
82
254
|
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
@@ -174,12 +346,14 @@ class TablesDB {
|
|
|
174
346
|
params = {
|
|
175
347
|
databaseId: paramsOrFirst,
|
|
176
348
|
queries: rest[0],
|
|
177
|
-
search: rest[1]
|
|
349
|
+
search: rest[1],
|
|
350
|
+
total: rest[2]
|
|
178
351
|
};
|
|
179
352
|
}
|
|
180
353
|
const databaseId = params.databaseId;
|
|
181
354
|
const queries = params.queries;
|
|
182
355
|
const search = params.search;
|
|
356
|
+
const total = params.total;
|
|
183
357
|
if (typeof databaseId === "undefined") {
|
|
184
358
|
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
185
359
|
}
|
|
@@ -191,6 +365,9 @@ class TablesDB {
|
|
|
191
365
|
if (typeof search !== "undefined") {
|
|
192
366
|
payload["search"] = search;
|
|
193
367
|
}
|
|
368
|
+
if (typeof total !== "undefined") {
|
|
369
|
+
payload["total"] = total;
|
|
370
|
+
}
|
|
194
371
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
195
372
|
const apiHeaders = {};
|
|
196
373
|
return this.client.call(
|
|
@@ -379,12 +556,14 @@ class TablesDB {
|
|
|
379
556
|
params = {
|
|
380
557
|
databaseId: paramsOrFirst,
|
|
381
558
|
tableId: rest[0],
|
|
382
|
-
queries: rest[1]
|
|
559
|
+
queries: rest[1],
|
|
560
|
+
total: rest[2]
|
|
383
561
|
};
|
|
384
562
|
}
|
|
385
563
|
const databaseId = params.databaseId;
|
|
386
564
|
const tableId = params.tableId;
|
|
387
565
|
const queries = params.queries;
|
|
566
|
+
const total = params.total;
|
|
388
567
|
if (typeof databaseId === "undefined") {
|
|
389
568
|
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
390
569
|
}
|
|
@@ -396,6 +575,9 @@ class TablesDB {
|
|
|
396
575
|
if (typeof queries !== "undefined") {
|
|
397
576
|
payload["queries"] = queries;
|
|
398
577
|
}
|
|
578
|
+
if (typeof total !== "undefined") {
|
|
579
|
+
payload["total"] = total;
|
|
580
|
+
}
|
|
399
581
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
400
582
|
const apiHeaders = {};
|
|
401
583
|
return this.client.call(
|
|
@@ -2014,12 +2196,14 @@ class TablesDB {
|
|
|
2014
2196
|
params = {
|
|
2015
2197
|
databaseId: paramsOrFirst,
|
|
2016
2198
|
tableId: rest[0],
|
|
2017
|
-
queries: rest[1]
|
|
2199
|
+
queries: rest[1],
|
|
2200
|
+
total: rest[2]
|
|
2018
2201
|
};
|
|
2019
2202
|
}
|
|
2020
2203
|
const databaseId = params.databaseId;
|
|
2021
2204
|
const tableId = params.tableId;
|
|
2022
2205
|
const queries = params.queries;
|
|
2206
|
+
const total = params.total;
|
|
2023
2207
|
if (typeof databaseId === "undefined") {
|
|
2024
2208
|
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
2025
2209
|
}
|
|
@@ -2031,6 +2215,9 @@ class TablesDB {
|
|
|
2031
2215
|
if (typeof queries !== "undefined") {
|
|
2032
2216
|
payload["queries"] = queries;
|
|
2033
2217
|
}
|
|
2218
|
+
if (typeof total !== "undefined") {
|
|
2219
|
+
payload["total"] = total;
|
|
2220
|
+
}
|
|
2034
2221
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2035
2222
|
const apiHeaders = {};
|
|
2036
2223
|
return this.client.call(
|
|
@@ -2183,12 +2370,16 @@ class TablesDB {
|
|
|
2183
2370
|
params = {
|
|
2184
2371
|
databaseId: paramsOrFirst,
|
|
2185
2372
|
tableId: rest[0],
|
|
2186
|
-
queries: rest[1]
|
|
2373
|
+
queries: rest[1],
|
|
2374
|
+
transactionId: rest[2],
|
|
2375
|
+
total: rest[3]
|
|
2187
2376
|
};
|
|
2188
2377
|
}
|
|
2189
2378
|
const databaseId = params.databaseId;
|
|
2190
2379
|
const tableId = params.tableId;
|
|
2191
2380
|
const queries = params.queries;
|
|
2381
|
+
const transactionId = params.transactionId;
|
|
2382
|
+
const total = params.total;
|
|
2192
2383
|
if (typeof databaseId === "undefined") {
|
|
2193
2384
|
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
2194
2385
|
}
|
|
@@ -2200,6 +2391,12 @@ class TablesDB {
|
|
|
2200
2391
|
if (typeof queries !== "undefined") {
|
|
2201
2392
|
payload["queries"] = queries;
|
|
2202
2393
|
}
|
|
2394
|
+
if (typeof transactionId !== "undefined") {
|
|
2395
|
+
payload["transactionId"] = transactionId;
|
|
2396
|
+
}
|
|
2397
|
+
if (typeof total !== "undefined") {
|
|
2398
|
+
payload["total"] = total;
|
|
2399
|
+
}
|
|
2203
2400
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2204
2401
|
const apiHeaders = {};
|
|
2205
2402
|
return this.client.call(
|
|
@@ -2219,7 +2416,8 @@ class TablesDB {
|
|
|
2219
2416
|
tableId: rest[0],
|
|
2220
2417
|
rowId: rest[1],
|
|
2221
2418
|
data: rest[2],
|
|
2222
|
-
permissions: rest[3]
|
|
2419
|
+
permissions: rest[3],
|
|
2420
|
+
transactionId: rest[4]
|
|
2223
2421
|
};
|
|
2224
2422
|
}
|
|
2225
2423
|
const databaseId = params.databaseId;
|
|
@@ -2227,6 +2425,7 @@ class TablesDB {
|
|
|
2227
2425
|
const rowId = params.rowId;
|
|
2228
2426
|
const data = params.data;
|
|
2229
2427
|
const permissions = params.permissions;
|
|
2428
|
+
const transactionId = params.transactionId;
|
|
2230
2429
|
if (typeof databaseId === "undefined") {
|
|
2231
2430
|
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
2232
2431
|
}
|
|
@@ -2250,6 +2449,9 @@ class TablesDB {
|
|
|
2250
2449
|
if (typeof permissions !== "undefined") {
|
|
2251
2450
|
payload["permissions"] = permissions;
|
|
2252
2451
|
}
|
|
2452
|
+
if (typeof transactionId !== "undefined") {
|
|
2453
|
+
payload["transactionId"] = transactionId;
|
|
2454
|
+
}
|
|
2253
2455
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2254
2456
|
const apiHeaders = {
|
|
2255
2457
|
"content-type": "application/json"
|
|
@@ -2269,12 +2471,14 @@ class TablesDB {
|
|
|
2269
2471
|
params = {
|
|
2270
2472
|
databaseId: paramsOrFirst,
|
|
2271
2473
|
tableId: rest[0],
|
|
2272
|
-
rows: rest[1]
|
|
2474
|
+
rows: rest[1],
|
|
2475
|
+
transactionId: rest[2]
|
|
2273
2476
|
};
|
|
2274
2477
|
}
|
|
2275
2478
|
const databaseId = params.databaseId;
|
|
2276
2479
|
const tableId = params.tableId;
|
|
2277
2480
|
const rows = params.rows;
|
|
2481
|
+
const transactionId = params.transactionId;
|
|
2278
2482
|
if (typeof databaseId === "undefined") {
|
|
2279
2483
|
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
2280
2484
|
}
|
|
@@ -2289,6 +2493,9 @@ class TablesDB {
|
|
|
2289
2493
|
if (typeof rows !== "undefined") {
|
|
2290
2494
|
payload["rows"] = rows;
|
|
2291
2495
|
}
|
|
2496
|
+
if (typeof transactionId !== "undefined") {
|
|
2497
|
+
payload["transactionId"] = transactionId;
|
|
2498
|
+
}
|
|
2292
2499
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2293
2500
|
const apiHeaders = {
|
|
2294
2501
|
"content-type": "application/json"
|
|
@@ -2308,12 +2515,14 @@ class TablesDB {
|
|
|
2308
2515
|
params = {
|
|
2309
2516
|
databaseId: paramsOrFirst,
|
|
2310
2517
|
tableId: rest[0],
|
|
2311
|
-
rows: rest[1]
|
|
2518
|
+
rows: rest[1],
|
|
2519
|
+
transactionId: rest[2]
|
|
2312
2520
|
};
|
|
2313
2521
|
}
|
|
2314
2522
|
const databaseId = params.databaseId;
|
|
2315
2523
|
const tableId = params.tableId;
|
|
2316
2524
|
const rows = params.rows;
|
|
2525
|
+
const transactionId = params.transactionId;
|
|
2317
2526
|
if (typeof databaseId === "undefined") {
|
|
2318
2527
|
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
2319
2528
|
}
|
|
@@ -2328,6 +2537,9 @@ class TablesDB {
|
|
|
2328
2537
|
if (typeof rows !== "undefined") {
|
|
2329
2538
|
payload["rows"] = rows;
|
|
2330
2539
|
}
|
|
2540
|
+
if (typeof transactionId !== "undefined") {
|
|
2541
|
+
payload["transactionId"] = transactionId;
|
|
2542
|
+
}
|
|
2331
2543
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2332
2544
|
const apiHeaders = {
|
|
2333
2545
|
"content-type": "application/json"
|
|
@@ -2348,13 +2560,15 @@ class TablesDB {
|
|
|
2348
2560
|
databaseId: paramsOrFirst,
|
|
2349
2561
|
tableId: rest[0],
|
|
2350
2562
|
data: rest[1],
|
|
2351
|
-
queries: rest[2]
|
|
2563
|
+
queries: rest[2],
|
|
2564
|
+
transactionId: rest[3]
|
|
2352
2565
|
};
|
|
2353
2566
|
}
|
|
2354
2567
|
const databaseId = params.databaseId;
|
|
2355
2568
|
const tableId = params.tableId;
|
|
2356
2569
|
const data = params.data;
|
|
2357
2570
|
const queries = params.queries;
|
|
2571
|
+
const transactionId = params.transactionId;
|
|
2358
2572
|
if (typeof databaseId === "undefined") {
|
|
2359
2573
|
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
2360
2574
|
}
|
|
@@ -2369,6 +2583,9 @@ class TablesDB {
|
|
|
2369
2583
|
if (typeof queries !== "undefined") {
|
|
2370
2584
|
payload["queries"] = queries;
|
|
2371
2585
|
}
|
|
2586
|
+
if (typeof transactionId !== "undefined") {
|
|
2587
|
+
payload["transactionId"] = transactionId;
|
|
2588
|
+
}
|
|
2372
2589
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2373
2590
|
const apiHeaders = {
|
|
2374
2591
|
"content-type": "application/json"
|
|
@@ -2388,12 +2605,14 @@ class TablesDB {
|
|
|
2388
2605
|
params = {
|
|
2389
2606
|
databaseId: paramsOrFirst,
|
|
2390
2607
|
tableId: rest[0],
|
|
2391
|
-
queries: rest[1]
|
|
2608
|
+
queries: rest[1],
|
|
2609
|
+
transactionId: rest[2]
|
|
2392
2610
|
};
|
|
2393
2611
|
}
|
|
2394
2612
|
const databaseId = params.databaseId;
|
|
2395
2613
|
const tableId = params.tableId;
|
|
2396
2614
|
const queries = params.queries;
|
|
2615
|
+
const transactionId = params.transactionId;
|
|
2397
2616
|
if (typeof databaseId === "undefined") {
|
|
2398
2617
|
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
2399
2618
|
}
|
|
@@ -2405,6 +2624,9 @@ class TablesDB {
|
|
|
2405
2624
|
if (typeof queries !== "undefined") {
|
|
2406
2625
|
payload["queries"] = queries;
|
|
2407
2626
|
}
|
|
2627
|
+
if (typeof transactionId !== "undefined") {
|
|
2628
|
+
payload["transactionId"] = transactionId;
|
|
2629
|
+
}
|
|
2408
2630
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2409
2631
|
const apiHeaders = {
|
|
2410
2632
|
"content-type": "application/json"
|
|
@@ -2425,13 +2647,15 @@ class TablesDB {
|
|
|
2425
2647
|
databaseId: paramsOrFirst,
|
|
2426
2648
|
tableId: rest[0],
|
|
2427
2649
|
rowId: rest[1],
|
|
2428
|
-
queries: rest[2]
|
|
2650
|
+
queries: rest[2],
|
|
2651
|
+
transactionId: rest[3]
|
|
2429
2652
|
};
|
|
2430
2653
|
}
|
|
2431
2654
|
const databaseId = params.databaseId;
|
|
2432
2655
|
const tableId = params.tableId;
|
|
2433
2656
|
const rowId = params.rowId;
|
|
2434
2657
|
const queries = params.queries;
|
|
2658
|
+
const transactionId = params.transactionId;
|
|
2435
2659
|
if (typeof databaseId === "undefined") {
|
|
2436
2660
|
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
2437
2661
|
}
|
|
@@ -2446,6 +2670,9 @@ class TablesDB {
|
|
|
2446
2670
|
if (typeof queries !== "undefined") {
|
|
2447
2671
|
payload["queries"] = queries;
|
|
2448
2672
|
}
|
|
2673
|
+
if (typeof transactionId !== "undefined") {
|
|
2674
|
+
payload["transactionId"] = transactionId;
|
|
2675
|
+
}
|
|
2449
2676
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2450
2677
|
const apiHeaders = {};
|
|
2451
2678
|
return this.client.call(
|
|
@@ -2465,7 +2692,8 @@ class TablesDB {
|
|
|
2465
2692
|
tableId: rest[0],
|
|
2466
2693
|
rowId: rest[1],
|
|
2467
2694
|
data: rest[2],
|
|
2468
|
-
permissions: rest[3]
|
|
2695
|
+
permissions: rest[3],
|
|
2696
|
+
transactionId: rest[4]
|
|
2469
2697
|
};
|
|
2470
2698
|
}
|
|
2471
2699
|
const databaseId = params.databaseId;
|
|
@@ -2473,6 +2701,7 @@ class TablesDB {
|
|
|
2473
2701
|
const rowId = params.rowId;
|
|
2474
2702
|
const data = params.data;
|
|
2475
2703
|
const permissions = params.permissions;
|
|
2704
|
+
const transactionId = params.transactionId;
|
|
2476
2705
|
if (typeof databaseId === "undefined") {
|
|
2477
2706
|
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
2478
2707
|
}
|
|
@@ -2490,6 +2719,9 @@ class TablesDB {
|
|
|
2490
2719
|
if (typeof permissions !== "undefined") {
|
|
2491
2720
|
payload["permissions"] = permissions;
|
|
2492
2721
|
}
|
|
2722
|
+
if (typeof transactionId !== "undefined") {
|
|
2723
|
+
payload["transactionId"] = transactionId;
|
|
2724
|
+
}
|
|
2493
2725
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2494
2726
|
const apiHeaders = {
|
|
2495
2727
|
"content-type": "application/json"
|
|
@@ -2511,7 +2743,8 @@ class TablesDB {
|
|
|
2511
2743
|
tableId: rest[0],
|
|
2512
2744
|
rowId: rest[1],
|
|
2513
2745
|
data: rest[2],
|
|
2514
|
-
permissions: rest[3]
|
|
2746
|
+
permissions: rest[3],
|
|
2747
|
+
transactionId: rest[4]
|
|
2515
2748
|
};
|
|
2516
2749
|
}
|
|
2517
2750
|
const databaseId = params.databaseId;
|
|
@@ -2519,6 +2752,7 @@ class TablesDB {
|
|
|
2519
2752
|
const rowId = params.rowId;
|
|
2520
2753
|
const data = params.data;
|
|
2521
2754
|
const permissions = params.permissions;
|
|
2755
|
+
const transactionId = params.transactionId;
|
|
2522
2756
|
if (typeof databaseId === "undefined") {
|
|
2523
2757
|
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
2524
2758
|
}
|
|
@@ -2536,6 +2770,9 @@ class TablesDB {
|
|
|
2536
2770
|
if (typeof permissions !== "undefined") {
|
|
2537
2771
|
payload["permissions"] = permissions;
|
|
2538
2772
|
}
|
|
2773
|
+
if (typeof transactionId !== "undefined") {
|
|
2774
|
+
payload["transactionId"] = transactionId;
|
|
2775
|
+
}
|
|
2539
2776
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2540
2777
|
const apiHeaders = {
|
|
2541
2778
|
"content-type": "application/json"
|
|
@@ -2555,12 +2792,14 @@ class TablesDB {
|
|
|
2555
2792
|
params = {
|
|
2556
2793
|
databaseId: paramsOrFirst,
|
|
2557
2794
|
tableId: rest[0],
|
|
2558
|
-
rowId: rest[1]
|
|
2795
|
+
rowId: rest[1],
|
|
2796
|
+
transactionId: rest[2]
|
|
2559
2797
|
};
|
|
2560
2798
|
}
|
|
2561
2799
|
const databaseId = params.databaseId;
|
|
2562
2800
|
const tableId = params.tableId;
|
|
2563
2801
|
const rowId = params.rowId;
|
|
2802
|
+
const transactionId = params.transactionId;
|
|
2564
2803
|
if (typeof databaseId === "undefined") {
|
|
2565
2804
|
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
2566
2805
|
}
|
|
@@ -2572,6 +2811,9 @@ class TablesDB {
|
|
|
2572
2811
|
}
|
|
2573
2812
|
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{rowId}", rowId);
|
|
2574
2813
|
const payload = {};
|
|
2814
|
+
if (typeof transactionId !== "undefined") {
|
|
2815
|
+
payload["transactionId"] = transactionId;
|
|
2816
|
+
}
|
|
2575
2817
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2576
2818
|
const apiHeaders = {
|
|
2577
2819
|
"content-type": "application/json"
|
|
@@ -2594,7 +2836,8 @@ class TablesDB {
|
|
|
2594
2836
|
rowId: rest[1],
|
|
2595
2837
|
column: rest[2],
|
|
2596
2838
|
value: rest[3],
|
|
2597
|
-
min: rest[4]
|
|
2839
|
+
min: rest[4],
|
|
2840
|
+
transactionId: rest[5]
|
|
2598
2841
|
};
|
|
2599
2842
|
}
|
|
2600
2843
|
const databaseId = params.databaseId;
|
|
@@ -2603,6 +2846,7 @@ class TablesDB {
|
|
|
2603
2846
|
const column = params.column;
|
|
2604
2847
|
const value = params.value;
|
|
2605
2848
|
const min = params.min;
|
|
2849
|
+
const transactionId = params.transactionId;
|
|
2606
2850
|
if (typeof databaseId === "undefined") {
|
|
2607
2851
|
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
2608
2852
|
}
|
|
@@ -2623,6 +2867,9 @@ class TablesDB {
|
|
|
2623
2867
|
if (typeof min !== "undefined") {
|
|
2624
2868
|
payload["min"] = min;
|
|
2625
2869
|
}
|
|
2870
|
+
if (typeof transactionId !== "undefined") {
|
|
2871
|
+
payload["transactionId"] = transactionId;
|
|
2872
|
+
}
|
|
2626
2873
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2627
2874
|
const apiHeaders = {
|
|
2628
2875
|
"content-type": "application/json"
|
|
@@ -2645,7 +2892,8 @@ class TablesDB {
|
|
|
2645
2892
|
rowId: rest[1],
|
|
2646
2893
|
column: rest[2],
|
|
2647
2894
|
value: rest[3],
|
|
2648
|
-
max: rest[4]
|
|
2895
|
+
max: rest[4],
|
|
2896
|
+
transactionId: rest[5]
|
|
2649
2897
|
};
|
|
2650
2898
|
}
|
|
2651
2899
|
const databaseId = params.databaseId;
|
|
@@ -2654,6 +2902,7 @@ class TablesDB {
|
|
|
2654
2902
|
const column = params.column;
|
|
2655
2903
|
const value = params.value;
|
|
2656
2904
|
const max = params.max;
|
|
2905
|
+
const transactionId = params.transactionId;
|
|
2657
2906
|
if (typeof databaseId === "undefined") {
|
|
2658
2907
|
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
2659
2908
|
}
|
|
@@ -2674,6 +2923,9 @@ class TablesDB {
|
|
|
2674
2923
|
if (typeof max !== "undefined") {
|
|
2675
2924
|
payload["max"] = max;
|
|
2676
2925
|
}
|
|
2926
|
+
if (typeof transactionId !== "undefined") {
|
|
2927
|
+
payload["transactionId"] = transactionId;
|
|
2928
|
+
}
|
|
2677
2929
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2678
2930
|
const apiHeaders = {
|
|
2679
2931
|
"content-type": "application/json"
|