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