node-appwrite 17.1.0 → 18.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/README.md +67 -2
  2. package/dist/client.js +3 -3
  3. package/dist/client.js.map +1 -1
  4. package/dist/client.mjs +3 -3
  5. package/dist/client.mjs.map +1 -1
  6. package/dist/enums/{v-c-s-deployment-type.js → vcs-deployment-type.js} +1 -1
  7. package/dist/enums/vcs-deployment-type.js.map +1 -0
  8. package/dist/enums/{v-c-s-deployment-type.mjs → vcs-deployment-type.mjs} +2 -2
  9. package/dist/enums/vcs-deployment-type.mjs.map +1 -0
  10. package/dist/index.d.mts +2 -1
  11. package/dist/index.d.ts +2 -1
  12. package/dist/index.js +7 -2
  13. package/dist/index.js.map +1 -1
  14. package/dist/index.mjs +2 -1
  15. package/dist/index.mjs.map +1 -1
  16. package/dist/models.d.mts +829 -145
  17. package/dist/models.d.ts +829 -145
  18. package/dist/query.d.mts +70 -0
  19. package/dist/query.d.ts +70 -0
  20. package/dist/query.js +70 -0
  21. package/dist/query.js.map +1 -1
  22. package/dist/query.mjs +70 -0
  23. package/dist/query.mjs.map +1 -1
  24. package/dist/services/account.d.mts +656 -101
  25. package/dist/services/account.d.ts +656 -101
  26. package/dist/services/account.js +592 -292
  27. package/dist/services/account.js.map +1 -1
  28. package/dist/services/account.mjs +592 -292
  29. package/dist/services/account.mjs.map +1 -1
  30. package/dist/services/avatars.d.mts +176 -45
  31. package/dist/services/avatars.d.ts +176 -45
  32. package/dist/services/avatars.js +104 -93
  33. package/dist/services/avatars.js.map +1 -1
  34. package/dist/services/avatars.mjs +104 -93
  35. package/dist/services/avatars.mjs.map +1 -1
  36. package/dist/services/databases.d.mts +1274 -271
  37. package/dist/services/databases.d.ts +1274 -271
  38. package/dist/services/databases.js +939 -584
  39. package/dist/services/databases.js.map +1 -1
  40. package/dist/services/databases.mjs +939 -584
  41. package/dist/services/databases.mjs.map +1 -1
  42. package/dist/services/functions.d.mts +537 -114
  43. package/dist/services/functions.d.ts +537 -114
  44. package/dist/services/functions.js +393 -276
  45. package/dist/services/functions.js.map +1 -1
  46. package/dist/services/functions.mjs +393 -276
  47. package/dist/services/functions.mjs.map +1 -1
  48. package/dist/services/graphql.d.mts +24 -2
  49. package/dist/services/graphql.d.ts +24 -2
  50. package/dist/services/graphql.js +20 -16
  51. package/dist/services/graphql.js.map +1 -1
  52. package/dist/services/graphql.mjs +20 -16
  53. package/dist/services/graphql.mjs.map +1 -1
  54. package/dist/services/health.d.mts +176 -17
  55. package/dist/services/health.d.ts +176 -17
  56. package/dist/services/health.js +144 -115
  57. package/dist/services/health.js.map +1 -1
  58. package/dist/services/health.mjs +144 -115
  59. package/dist/services/health.mjs.map +1 -1
  60. package/dist/services/locale.d.mts +2 -2
  61. package/dist/services/locale.d.ts +2 -2
  62. package/dist/services/locale.js +7 -7
  63. package/dist/services/locale.js.map +1 -1
  64. package/dist/services/locale.mjs +7 -7
  65. package/dist/services/locale.mjs.map +1 -1
  66. package/dist/services/messaging.d.mts +1552 -270
  67. package/dist/services/messaging.d.ts +1552 -270
  68. package/dist/services/messaging.js +1417 -592
  69. package/dist/services/messaging.js.map +1 -1
  70. package/dist/services/messaging.mjs +1417 -592
  71. package/dist/services/messaging.mjs.map +1 -1
  72. package/dist/services/sites.d.mts +499 -103
  73. package/dist/services/sites.d.ts +499 -103
  74. package/dist/services/sites.js +371 -258
  75. package/dist/services/sites.js.map +1 -1
  76. package/dist/services/sites.mjs +371 -258
  77. package/dist/services/sites.mjs.map +1 -1
  78. package/dist/services/storage.d.mts +311 -68
  79. package/dist/services/storage.d.ts +311 -68
  80. package/dist/services/storage.js +225 -158
  81. package/dist/services/storage.js.map +1 -1
  82. package/dist/services/storage.mjs +225 -158
  83. package/dist/services/storage.mjs.map +1 -1
  84. package/dist/services/tables-db.d.mts +1549 -0
  85. package/dist/services/tables-db.d.ts +1549 -0
  86. package/dist/services/tables-db.js +2374 -0
  87. package/dist/services/tables-db.js.map +1 -0
  88. package/dist/services/tables-db.mjs +2373 -0
  89. package/dist/services/tables-db.mjs.map +1 -0
  90. package/dist/services/teams.d.mts +249 -55
  91. package/dist/services/teams.d.ts +249 -55
  92. package/dist/services/teams.js +170 -135
  93. package/dist/services/teams.js.map +1 -1
  94. package/dist/services/teams.mjs +170 -135
  95. package/dist/services/teams.mjs.map +1 -1
  96. package/dist/services/tokens.d.mts +76 -11
  97. package/dist/services/tokens.d.ts +76 -11
  98. package/dist/services/tokens.js +60 -45
  99. package/dist/services/tokens.js.map +1 -1
  100. package/dist/services/tokens.mjs +60 -45
  101. package/dist/services/tokens.mjs.map +1 -1
  102. package/dist/services/users.d.mts +867 -140
  103. package/dist/services/users.d.ts +867 -140
  104. package/dist/services/users.js +719 -408
  105. package/dist/services/users.js.map +1 -1
  106. package/dist/services/users.mjs +719 -408
  107. package/dist/services/users.mjs.map +1 -1
  108. package/package.json +1 -1
  109. package/dist/enums/v-c-s-deployment-type.js.map +0 -1
  110. package/dist/enums/v-c-s-deployment-type.mjs.map +0 -1
  111. /package/dist/enums/{v-c-s-deployment-type.d.mts → vcs-deployment-type.d.mts} +0 -0
  112. /package/dist/enums/{v-c-s-deployment-type.d.ts → vcs-deployment-type.d.ts} +0 -0
@@ -0,0 +1,2374 @@
1
+ 'use strict';
2
+
3
+ var client = require('../client');
4
+
5
+ class TablesDB {
6
+ constructor(client) {
7
+ this.client = client;
8
+ }
9
+ list(paramsOrFirst, ...rest) {
10
+ let params;
11
+ if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
12
+ params = paramsOrFirst || {};
13
+ } else {
14
+ params = {
15
+ queries: paramsOrFirst,
16
+ search: rest[0]
17
+ };
18
+ }
19
+ const queries = params.queries;
20
+ const search = params.search;
21
+ const apiPath = "/tablesdb";
22
+ const payload = {};
23
+ if (typeof queries !== "undefined") {
24
+ payload["queries"] = queries;
25
+ }
26
+ if (typeof search !== "undefined") {
27
+ payload["search"] = search;
28
+ }
29
+ const uri = new URL(this.client.config.endpoint + apiPath);
30
+ const apiHeaders = {};
31
+ return this.client.call(
32
+ "get",
33
+ uri,
34
+ apiHeaders,
35
+ payload
36
+ );
37
+ }
38
+ create(paramsOrFirst, ...rest) {
39
+ let params;
40
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
41
+ params = paramsOrFirst || {};
42
+ } else {
43
+ params = {
44
+ databaseId: paramsOrFirst,
45
+ name: rest[0],
46
+ enabled: rest[1]
47
+ };
48
+ }
49
+ const databaseId = params.databaseId;
50
+ const name = params.name;
51
+ const enabled = params.enabled;
52
+ if (typeof databaseId === "undefined") {
53
+ throw new client.AppwriteException('Missing required parameter: "databaseId"');
54
+ }
55
+ if (typeof name === "undefined") {
56
+ throw new client.AppwriteException('Missing required parameter: "name"');
57
+ }
58
+ const apiPath = "/tablesdb";
59
+ const payload = {};
60
+ if (typeof databaseId !== "undefined") {
61
+ payload["databaseId"] = databaseId;
62
+ }
63
+ if (typeof name !== "undefined") {
64
+ payload["name"] = name;
65
+ }
66
+ if (typeof enabled !== "undefined") {
67
+ payload["enabled"] = enabled;
68
+ }
69
+ const uri = new URL(this.client.config.endpoint + apiPath);
70
+ const apiHeaders = {
71
+ "content-type": "application/json"
72
+ };
73
+ return this.client.call(
74
+ "post",
75
+ uri,
76
+ apiHeaders,
77
+ payload
78
+ );
79
+ }
80
+ get(paramsOrFirst) {
81
+ let params;
82
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
83
+ params = paramsOrFirst || {};
84
+ } else {
85
+ params = {
86
+ databaseId: paramsOrFirst
87
+ };
88
+ }
89
+ const databaseId = params.databaseId;
90
+ if (typeof databaseId === "undefined") {
91
+ throw new client.AppwriteException('Missing required parameter: "databaseId"');
92
+ }
93
+ const apiPath = "/tablesdb/{databaseId}".replace("{databaseId}", databaseId);
94
+ const payload = {};
95
+ const uri = new URL(this.client.config.endpoint + apiPath);
96
+ const apiHeaders = {};
97
+ return this.client.call(
98
+ "get",
99
+ uri,
100
+ apiHeaders,
101
+ payload
102
+ );
103
+ }
104
+ update(paramsOrFirst, ...rest) {
105
+ let params;
106
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
107
+ params = paramsOrFirst || {};
108
+ } else {
109
+ params = {
110
+ databaseId: paramsOrFirst,
111
+ name: rest[0],
112
+ enabled: rest[1]
113
+ };
114
+ }
115
+ const databaseId = params.databaseId;
116
+ const name = params.name;
117
+ const enabled = params.enabled;
118
+ if (typeof databaseId === "undefined") {
119
+ throw new client.AppwriteException('Missing required parameter: "databaseId"');
120
+ }
121
+ if (typeof name === "undefined") {
122
+ throw new client.AppwriteException('Missing required parameter: "name"');
123
+ }
124
+ const apiPath = "/tablesdb/{databaseId}".replace("{databaseId}", databaseId);
125
+ const payload = {};
126
+ if (typeof name !== "undefined") {
127
+ payload["name"] = name;
128
+ }
129
+ if (typeof enabled !== "undefined") {
130
+ payload["enabled"] = enabled;
131
+ }
132
+ const uri = new URL(this.client.config.endpoint + apiPath);
133
+ const apiHeaders = {
134
+ "content-type": "application/json"
135
+ };
136
+ return this.client.call(
137
+ "put",
138
+ uri,
139
+ apiHeaders,
140
+ payload
141
+ );
142
+ }
143
+ delete(paramsOrFirst) {
144
+ let params;
145
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
146
+ params = paramsOrFirst || {};
147
+ } else {
148
+ params = {
149
+ databaseId: paramsOrFirst
150
+ };
151
+ }
152
+ const databaseId = params.databaseId;
153
+ if (typeof databaseId === "undefined") {
154
+ throw new client.AppwriteException('Missing required parameter: "databaseId"');
155
+ }
156
+ const apiPath = "/tablesdb/{databaseId}".replace("{databaseId}", databaseId);
157
+ const payload = {};
158
+ const uri = new URL(this.client.config.endpoint + apiPath);
159
+ const apiHeaders = {
160
+ "content-type": "application/json"
161
+ };
162
+ return this.client.call(
163
+ "delete",
164
+ uri,
165
+ apiHeaders,
166
+ payload
167
+ );
168
+ }
169
+ listTables(paramsOrFirst, ...rest) {
170
+ let params;
171
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
172
+ params = paramsOrFirst || {};
173
+ } else {
174
+ params = {
175
+ databaseId: paramsOrFirst,
176
+ queries: rest[0],
177
+ search: rest[1]
178
+ };
179
+ }
180
+ const databaseId = params.databaseId;
181
+ const queries = params.queries;
182
+ const search = params.search;
183
+ if (typeof databaseId === "undefined") {
184
+ throw new client.AppwriteException('Missing required parameter: "databaseId"');
185
+ }
186
+ const apiPath = "/tablesdb/{databaseId}/tables".replace("{databaseId}", databaseId);
187
+ const payload = {};
188
+ if (typeof queries !== "undefined") {
189
+ payload["queries"] = queries;
190
+ }
191
+ if (typeof search !== "undefined") {
192
+ payload["search"] = search;
193
+ }
194
+ const uri = new URL(this.client.config.endpoint + apiPath);
195
+ const apiHeaders = {};
196
+ return this.client.call(
197
+ "get",
198
+ uri,
199
+ apiHeaders,
200
+ payload
201
+ );
202
+ }
203
+ createTable(paramsOrFirst, ...rest) {
204
+ let params;
205
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
206
+ params = paramsOrFirst || {};
207
+ } else {
208
+ params = {
209
+ databaseId: paramsOrFirst,
210
+ tableId: rest[0],
211
+ name: rest[1],
212
+ permissions: rest[2],
213
+ rowSecurity: rest[3],
214
+ enabled: rest[4]
215
+ };
216
+ }
217
+ const databaseId = params.databaseId;
218
+ const tableId = params.tableId;
219
+ const name = params.name;
220
+ const permissions = params.permissions;
221
+ const rowSecurity = params.rowSecurity;
222
+ const enabled = params.enabled;
223
+ if (typeof databaseId === "undefined") {
224
+ throw new client.AppwriteException('Missing required parameter: "databaseId"');
225
+ }
226
+ if (typeof tableId === "undefined") {
227
+ throw new client.AppwriteException('Missing required parameter: "tableId"');
228
+ }
229
+ if (typeof name === "undefined") {
230
+ throw new client.AppwriteException('Missing required parameter: "name"');
231
+ }
232
+ const apiPath = "/tablesdb/{databaseId}/tables".replace("{databaseId}", databaseId);
233
+ const payload = {};
234
+ if (typeof tableId !== "undefined") {
235
+ payload["tableId"] = tableId;
236
+ }
237
+ if (typeof name !== "undefined") {
238
+ payload["name"] = name;
239
+ }
240
+ if (typeof permissions !== "undefined") {
241
+ payload["permissions"] = permissions;
242
+ }
243
+ if (typeof rowSecurity !== "undefined") {
244
+ payload["rowSecurity"] = rowSecurity;
245
+ }
246
+ if (typeof enabled !== "undefined") {
247
+ payload["enabled"] = enabled;
248
+ }
249
+ const uri = new URL(this.client.config.endpoint + apiPath);
250
+ const apiHeaders = {
251
+ "content-type": "application/json"
252
+ };
253
+ return this.client.call(
254
+ "post",
255
+ uri,
256
+ apiHeaders,
257
+ payload
258
+ );
259
+ }
260
+ getTable(paramsOrFirst, ...rest) {
261
+ let params;
262
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
263
+ params = paramsOrFirst || {};
264
+ } else {
265
+ params = {
266
+ databaseId: paramsOrFirst,
267
+ tableId: rest[0]
268
+ };
269
+ }
270
+ const databaseId = params.databaseId;
271
+ const tableId = params.tableId;
272
+ if (typeof databaseId === "undefined") {
273
+ throw new client.AppwriteException('Missing required parameter: "databaseId"');
274
+ }
275
+ if (typeof tableId === "undefined") {
276
+ throw new client.AppwriteException('Missing required parameter: "tableId"');
277
+ }
278
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
279
+ const payload = {};
280
+ const uri = new URL(this.client.config.endpoint + apiPath);
281
+ const apiHeaders = {};
282
+ return this.client.call(
283
+ "get",
284
+ uri,
285
+ apiHeaders,
286
+ payload
287
+ );
288
+ }
289
+ updateTable(paramsOrFirst, ...rest) {
290
+ let params;
291
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
292
+ params = paramsOrFirst || {};
293
+ } else {
294
+ params = {
295
+ databaseId: paramsOrFirst,
296
+ tableId: rest[0],
297
+ name: rest[1],
298
+ permissions: rest[2],
299
+ rowSecurity: rest[3],
300
+ enabled: rest[4]
301
+ };
302
+ }
303
+ const databaseId = params.databaseId;
304
+ const tableId = params.tableId;
305
+ const name = params.name;
306
+ const permissions = params.permissions;
307
+ const rowSecurity = params.rowSecurity;
308
+ const enabled = params.enabled;
309
+ if (typeof databaseId === "undefined") {
310
+ throw new client.AppwriteException('Missing required parameter: "databaseId"');
311
+ }
312
+ if (typeof tableId === "undefined") {
313
+ throw new client.AppwriteException('Missing required parameter: "tableId"');
314
+ }
315
+ if (typeof name === "undefined") {
316
+ throw new client.AppwriteException('Missing required parameter: "name"');
317
+ }
318
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
319
+ const payload = {};
320
+ if (typeof name !== "undefined") {
321
+ payload["name"] = name;
322
+ }
323
+ if (typeof permissions !== "undefined") {
324
+ payload["permissions"] = permissions;
325
+ }
326
+ if (typeof rowSecurity !== "undefined") {
327
+ payload["rowSecurity"] = rowSecurity;
328
+ }
329
+ if (typeof enabled !== "undefined") {
330
+ payload["enabled"] = enabled;
331
+ }
332
+ const uri = new URL(this.client.config.endpoint + apiPath);
333
+ const apiHeaders = {
334
+ "content-type": "application/json"
335
+ };
336
+ return this.client.call(
337
+ "put",
338
+ uri,
339
+ apiHeaders,
340
+ payload
341
+ );
342
+ }
343
+ deleteTable(paramsOrFirst, ...rest) {
344
+ let params;
345
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
346
+ params = paramsOrFirst || {};
347
+ } else {
348
+ params = {
349
+ databaseId: paramsOrFirst,
350
+ tableId: rest[0]
351
+ };
352
+ }
353
+ const databaseId = params.databaseId;
354
+ const tableId = params.tableId;
355
+ if (typeof databaseId === "undefined") {
356
+ throw new client.AppwriteException('Missing required parameter: "databaseId"');
357
+ }
358
+ if (typeof tableId === "undefined") {
359
+ throw new client.AppwriteException('Missing required parameter: "tableId"');
360
+ }
361
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
362
+ const payload = {};
363
+ const uri = new URL(this.client.config.endpoint + apiPath);
364
+ const apiHeaders = {
365
+ "content-type": "application/json"
366
+ };
367
+ return this.client.call(
368
+ "delete",
369
+ uri,
370
+ apiHeaders,
371
+ payload
372
+ );
373
+ }
374
+ listColumns(paramsOrFirst, ...rest) {
375
+ let params;
376
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
377
+ params = paramsOrFirst || {};
378
+ } else {
379
+ params = {
380
+ databaseId: paramsOrFirst,
381
+ tableId: rest[0],
382
+ queries: rest[1]
383
+ };
384
+ }
385
+ const databaseId = params.databaseId;
386
+ const tableId = params.tableId;
387
+ const queries = params.queries;
388
+ if (typeof databaseId === "undefined") {
389
+ throw new client.AppwriteException('Missing required parameter: "databaseId"');
390
+ }
391
+ if (typeof tableId === "undefined") {
392
+ throw new client.AppwriteException('Missing required parameter: "tableId"');
393
+ }
394
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
395
+ const payload = {};
396
+ if (typeof queries !== "undefined") {
397
+ payload["queries"] = queries;
398
+ }
399
+ const uri = new URL(this.client.config.endpoint + apiPath);
400
+ const apiHeaders = {};
401
+ return this.client.call(
402
+ "get",
403
+ uri,
404
+ apiHeaders,
405
+ payload
406
+ );
407
+ }
408
+ createBooleanColumn(paramsOrFirst, ...rest) {
409
+ let params;
410
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
411
+ params = paramsOrFirst || {};
412
+ } else {
413
+ params = {
414
+ databaseId: paramsOrFirst,
415
+ tableId: rest[0],
416
+ key: rest[1],
417
+ required: rest[2],
418
+ xdefault: rest[3],
419
+ array: rest[4]
420
+ };
421
+ }
422
+ const databaseId = params.databaseId;
423
+ const tableId = params.tableId;
424
+ const key = params.key;
425
+ const required = params.required;
426
+ const xdefault = params.xdefault;
427
+ const array = params.array;
428
+ if (typeof databaseId === "undefined") {
429
+ throw new client.AppwriteException('Missing required parameter: "databaseId"');
430
+ }
431
+ if (typeof tableId === "undefined") {
432
+ throw new client.AppwriteException('Missing required parameter: "tableId"');
433
+ }
434
+ if (typeof key === "undefined") {
435
+ throw new client.AppwriteException('Missing required parameter: "key"');
436
+ }
437
+ if (typeof required === "undefined") {
438
+ throw new client.AppwriteException('Missing required parameter: "required"');
439
+ }
440
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/boolean".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
441
+ const payload = {};
442
+ if (typeof key !== "undefined") {
443
+ payload["key"] = key;
444
+ }
445
+ if (typeof required !== "undefined") {
446
+ payload["required"] = required;
447
+ }
448
+ if (typeof xdefault !== "undefined") {
449
+ payload["default"] = xdefault;
450
+ }
451
+ if (typeof array !== "undefined") {
452
+ payload["array"] = array;
453
+ }
454
+ const uri = new URL(this.client.config.endpoint + apiPath);
455
+ const apiHeaders = {
456
+ "content-type": "application/json"
457
+ };
458
+ return this.client.call(
459
+ "post",
460
+ uri,
461
+ apiHeaders,
462
+ payload
463
+ );
464
+ }
465
+ updateBooleanColumn(paramsOrFirst, ...rest) {
466
+ let params;
467
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
468
+ params = paramsOrFirst || {};
469
+ } else {
470
+ params = {
471
+ databaseId: paramsOrFirst,
472
+ tableId: rest[0],
473
+ key: rest[1],
474
+ required: rest[2],
475
+ xdefault: rest[3],
476
+ newKey: rest[4]
477
+ };
478
+ }
479
+ const databaseId = params.databaseId;
480
+ const tableId = params.tableId;
481
+ const key = params.key;
482
+ const required = params.required;
483
+ const xdefault = params.xdefault;
484
+ const newKey = params.newKey;
485
+ if (typeof databaseId === "undefined") {
486
+ throw new client.AppwriteException('Missing required parameter: "databaseId"');
487
+ }
488
+ if (typeof tableId === "undefined") {
489
+ throw new client.AppwriteException('Missing required parameter: "tableId"');
490
+ }
491
+ if (typeof key === "undefined") {
492
+ throw new client.AppwriteException('Missing required parameter: "key"');
493
+ }
494
+ if (typeof required === "undefined") {
495
+ throw new client.AppwriteException('Missing required parameter: "required"');
496
+ }
497
+ if (typeof xdefault === "undefined") {
498
+ throw new client.AppwriteException('Missing required parameter: "xdefault"');
499
+ }
500
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/boolean/{key}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
501
+ const payload = {};
502
+ if (typeof required !== "undefined") {
503
+ payload["required"] = required;
504
+ }
505
+ if (typeof xdefault !== "undefined") {
506
+ payload["default"] = xdefault;
507
+ }
508
+ if (typeof newKey !== "undefined") {
509
+ payload["newKey"] = newKey;
510
+ }
511
+ const uri = new URL(this.client.config.endpoint + apiPath);
512
+ const apiHeaders = {
513
+ "content-type": "application/json"
514
+ };
515
+ return this.client.call(
516
+ "patch",
517
+ uri,
518
+ apiHeaders,
519
+ payload
520
+ );
521
+ }
522
+ createDatetimeColumn(paramsOrFirst, ...rest) {
523
+ let params;
524
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
525
+ params = paramsOrFirst || {};
526
+ } else {
527
+ params = {
528
+ databaseId: paramsOrFirst,
529
+ tableId: rest[0],
530
+ key: rest[1],
531
+ required: rest[2],
532
+ xdefault: rest[3],
533
+ array: rest[4]
534
+ };
535
+ }
536
+ const databaseId = params.databaseId;
537
+ const tableId = params.tableId;
538
+ const key = params.key;
539
+ const required = params.required;
540
+ const xdefault = params.xdefault;
541
+ const array = params.array;
542
+ if (typeof databaseId === "undefined") {
543
+ throw new client.AppwriteException('Missing required parameter: "databaseId"');
544
+ }
545
+ if (typeof tableId === "undefined") {
546
+ throw new client.AppwriteException('Missing required parameter: "tableId"');
547
+ }
548
+ if (typeof key === "undefined") {
549
+ throw new client.AppwriteException('Missing required parameter: "key"');
550
+ }
551
+ if (typeof required === "undefined") {
552
+ throw new client.AppwriteException('Missing required parameter: "required"');
553
+ }
554
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/datetime".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
555
+ const payload = {};
556
+ if (typeof key !== "undefined") {
557
+ payload["key"] = key;
558
+ }
559
+ if (typeof required !== "undefined") {
560
+ payload["required"] = required;
561
+ }
562
+ if (typeof xdefault !== "undefined") {
563
+ payload["default"] = xdefault;
564
+ }
565
+ if (typeof array !== "undefined") {
566
+ payload["array"] = array;
567
+ }
568
+ const uri = new URL(this.client.config.endpoint + apiPath);
569
+ const apiHeaders = {
570
+ "content-type": "application/json"
571
+ };
572
+ return this.client.call(
573
+ "post",
574
+ uri,
575
+ apiHeaders,
576
+ payload
577
+ );
578
+ }
579
+ updateDatetimeColumn(paramsOrFirst, ...rest) {
580
+ let params;
581
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
582
+ params = paramsOrFirst || {};
583
+ } else {
584
+ params = {
585
+ databaseId: paramsOrFirst,
586
+ tableId: rest[0],
587
+ key: rest[1],
588
+ required: rest[2],
589
+ xdefault: rest[3],
590
+ newKey: rest[4]
591
+ };
592
+ }
593
+ const databaseId = params.databaseId;
594
+ const tableId = params.tableId;
595
+ const key = params.key;
596
+ const required = params.required;
597
+ const xdefault = params.xdefault;
598
+ const newKey = params.newKey;
599
+ if (typeof databaseId === "undefined") {
600
+ throw new client.AppwriteException('Missing required parameter: "databaseId"');
601
+ }
602
+ if (typeof tableId === "undefined") {
603
+ throw new client.AppwriteException('Missing required parameter: "tableId"');
604
+ }
605
+ if (typeof key === "undefined") {
606
+ throw new client.AppwriteException('Missing required parameter: "key"');
607
+ }
608
+ if (typeof required === "undefined") {
609
+ throw new client.AppwriteException('Missing required parameter: "required"');
610
+ }
611
+ if (typeof xdefault === "undefined") {
612
+ throw new client.AppwriteException('Missing required parameter: "xdefault"');
613
+ }
614
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/datetime/{key}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
615
+ const payload = {};
616
+ if (typeof required !== "undefined") {
617
+ payload["required"] = required;
618
+ }
619
+ if (typeof xdefault !== "undefined") {
620
+ payload["default"] = xdefault;
621
+ }
622
+ if (typeof newKey !== "undefined") {
623
+ payload["newKey"] = newKey;
624
+ }
625
+ const uri = new URL(this.client.config.endpoint + apiPath);
626
+ const apiHeaders = {
627
+ "content-type": "application/json"
628
+ };
629
+ return this.client.call(
630
+ "patch",
631
+ uri,
632
+ apiHeaders,
633
+ payload
634
+ );
635
+ }
636
+ createEmailColumn(paramsOrFirst, ...rest) {
637
+ let params;
638
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
639
+ params = paramsOrFirst || {};
640
+ } else {
641
+ params = {
642
+ databaseId: paramsOrFirst,
643
+ tableId: rest[0],
644
+ key: rest[1],
645
+ required: rest[2],
646
+ xdefault: rest[3],
647
+ array: rest[4]
648
+ };
649
+ }
650
+ const databaseId = params.databaseId;
651
+ const tableId = params.tableId;
652
+ const key = params.key;
653
+ const required = params.required;
654
+ const xdefault = params.xdefault;
655
+ const array = params.array;
656
+ if (typeof databaseId === "undefined") {
657
+ throw new client.AppwriteException('Missing required parameter: "databaseId"');
658
+ }
659
+ if (typeof tableId === "undefined") {
660
+ throw new client.AppwriteException('Missing required parameter: "tableId"');
661
+ }
662
+ if (typeof key === "undefined") {
663
+ throw new client.AppwriteException('Missing required parameter: "key"');
664
+ }
665
+ if (typeof required === "undefined") {
666
+ throw new client.AppwriteException('Missing required parameter: "required"');
667
+ }
668
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/email".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
669
+ const payload = {};
670
+ if (typeof key !== "undefined") {
671
+ payload["key"] = key;
672
+ }
673
+ if (typeof required !== "undefined") {
674
+ payload["required"] = required;
675
+ }
676
+ if (typeof xdefault !== "undefined") {
677
+ payload["default"] = xdefault;
678
+ }
679
+ if (typeof array !== "undefined") {
680
+ payload["array"] = array;
681
+ }
682
+ const uri = new URL(this.client.config.endpoint + apiPath);
683
+ const apiHeaders = {
684
+ "content-type": "application/json"
685
+ };
686
+ return this.client.call(
687
+ "post",
688
+ uri,
689
+ apiHeaders,
690
+ payload
691
+ );
692
+ }
693
+ updateEmailColumn(paramsOrFirst, ...rest) {
694
+ let params;
695
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
696
+ params = paramsOrFirst || {};
697
+ } else {
698
+ params = {
699
+ databaseId: paramsOrFirst,
700
+ tableId: rest[0],
701
+ key: rest[1],
702
+ required: rest[2],
703
+ xdefault: rest[3],
704
+ newKey: rest[4]
705
+ };
706
+ }
707
+ const databaseId = params.databaseId;
708
+ const tableId = params.tableId;
709
+ const key = params.key;
710
+ const required = params.required;
711
+ const xdefault = params.xdefault;
712
+ const newKey = params.newKey;
713
+ if (typeof databaseId === "undefined") {
714
+ throw new client.AppwriteException('Missing required parameter: "databaseId"');
715
+ }
716
+ if (typeof tableId === "undefined") {
717
+ throw new client.AppwriteException('Missing required parameter: "tableId"');
718
+ }
719
+ if (typeof key === "undefined") {
720
+ throw new client.AppwriteException('Missing required parameter: "key"');
721
+ }
722
+ if (typeof required === "undefined") {
723
+ throw new client.AppwriteException('Missing required parameter: "required"');
724
+ }
725
+ if (typeof xdefault === "undefined") {
726
+ throw new client.AppwriteException('Missing required parameter: "xdefault"');
727
+ }
728
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/email/{key}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
729
+ const payload = {};
730
+ if (typeof required !== "undefined") {
731
+ payload["required"] = required;
732
+ }
733
+ if (typeof xdefault !== "undefined") {
734
+ payload["default"] = xdefault;
735
+ }
736
+ if (typeof newKey !== "undefined") {
737
+ payload["newKey"] = newKey;
738
+ }
739
+ const uri = new URL(this.client.config.endpoint + apiPath);
740
+ const apiHeaders = {
741
+ "content-type": "application/json"
742
+ };
743
+ return this.client.call(
744
+ "patch",
745
+ uri,
746
+ apiHeaders,
747
+ payload
748
+ );
749
+ }
750
+ createEnumColumn(paramsOrFirst, ...rest) {
751
+ let params;
752
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
753
+ params = paramsOrFirst || {};
754
+ } else {
755
+ params = {
756
+ databaseId: paramsOrFirst,
757
+ tableId: rest[0],
758
+ key: rest[1],
759
+ elements: rest[2],
760
+ required: rest[3],
761
+ xdefault: rest[4],
762
+ array: rest[5]
763
+ };
764
+ }
765
+ const databaseId = params.databaseId;
766
+ const tableId = params.tableId;
767
+ const key = params.key;
768
+ const elements = params.elements;
769
+ const required = params.required;
770
+ const xdefault = params.xdefault;
771
+ const array = params.array;
772
+ if (typeof databaseId === "undefined") {
773
+ throw new client.AppwriteException('Missing required parameter: "databaseId"');
774
+ }
775
+ if (typeof tableId === "undefined") {
776
+ throw new client.AppwriteException('Missing required parameter: "tableId"');
777
+ }
778
+ if (typeof key === "undefined") {
779
+ throw new client.AppwriteException('Missing required parameter: "key"');
780
+ }
781
+ if (typeof elements === "undefined") {
782
+ throw new client.AppwriteException('Missing required parameter: "elements"');
783
+ }
784
+ if (typeof required === "undefined") {
785
+ throw new client.AppwriteException('Missing required parameter: "required"');
786
+ }
787
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/enum".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
788
+ const payload = {};
789
+ if (typeof key !== "undefined") {
790
+ payload["key"] = key;
791
+ }
792
+ if (typeof elements !== "undefined") {
793
+ payload["elements"] = elements;
794
+ }
795
+ if (typeof required !== "undefined") {
796
+ payload["required"] = required;
797
+ }
798
+ if (typeof xdefault !== "undefined") {
799
+ payload["default"] = xdefault;
800
+ }
801
+ if (typeof array !== "undefined") {
802
+ payload["array"] = array;
803
+ }
804
+ const uri = new URL(this.client.config.endpoint + apiPath);
805
+ const apiHeaders = {
806
+ "content-type": "application/json"
807
+ };
808
+ return this.client.call(
809
+ "post",
810
+ uri,
811
+ apiHeaders,
812
+ payload
813
+ );
814
+ }
815
+ updateEnumColumn(paramsOrFirst, ...rest) {
816
+ let params;
817
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
818
+ params = paramsOrFirst || {};
819
+ } else {
820
+ params = {
821
+ databaseId: paramsOrFirst,
822
+ tableId: rest[0],
823
+ key: rest[1],
824
+ elements: rest[2],
825
+ required: rest[3],
826
+ xdefault: rest[4],
827
+ newKey: rest[5]
828
+ };
829
+ }
830
+ const databaseId = params.databaseId;
831
+ const tableId = params.tableId;
832
+ const key = params.key;
833
+ const elements = params.elements;
834
+ const required = params.required;
835
+ const xdefault = params.xdefault;
836
+ const newKey = params.newKey;
837
+ if (typeof databaseId === "undefined") {
838
+ throw new client.AppwriteException('Missing required parameter: "databaseId"');
839
+ }
840
+ if (typeof tableId === "undefined") {
841
+ throw new client.AppwriteException('Missing required parameter: "tableId"');
842
+ }
843
+ if (typeof key === "undefined") {
844
+ throw new client.AppwriteException('Missing required parameter: "key"');
845
+ }
846
+ if (typeof elements === "undefined") {
847
+ throw new client.AppwriteException('Missing required parameter: "elements"');
848
+ }
849
+ if (typeof required === "undefined") {
850
+ throw new client.AppwriteException('Missing required parameter: "required"');
851
+ }
852
+ if (typeof xdefault === "undefined") {
853
+ throw new client.AppwriteException('Missing required parameter: "xdefault"');
854
+ }
855
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/enum/{key}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
856
+ const payload = {};
857
+ if (typeof elements !== "undefined") {
858
+ payload["elements"] = elements;
859
+ }
860
+ if (typeof required !== "undefined") {
861
+ payload["required"] = required;
862
+ }
863
+ if (typeof xdefault !== "undefined") {
864
+ payload["default"] = xdefault;
865
+ }
866
+ if (typeof newKey !== "undefined") {
867
+ payload["newKey"] = newKey;
868
+ }
869
+ const uri = new URL(this.client.config.endpoint + apiPath);
870
+ const apiHeaders = {
871
+ "content-type": "application/json"
872
+ };
873
+ return this.client.call(
874
+ "patch",
875
+ uri,
876
+ apiHeaders,
877
+ payload
878
+ );
879
+ }
880
+ createFloatColumn(paramsOrFirst, ...rest) {
881
+ let params;
882
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
883
+ params = paramsOrFirst || {};
884
+ } else {
885
+ params = {
886
+ databaseId: paramsOrFirst,
887
+ tableId: rest[0],
888
+ key: rest[1],
889
+ required: rest[2],
890
+ min: rest[3],
891
+ max: rest[4],
892
+ xdefault: rest[5],
893
+ array: rest[6]
894
+ };
895
+ }
896
+ const databaseId = params.databaseId;
897
+ const tableId = params.tableId;
898
+ const key = params.key;
899
+ const required = params.required;
900
+ const min = params.min;
901
+ const max = params.max;
902
+ const xdefault = params.xdefault;
903
+ const array = params.array;
904
+ if (typeof databaseId === "undefined") {
905
+ throw new client.AppwriteException('Missing required parameter: "databaseId"');
906
+ }
907
+ if (typeof tableId === "undefined") {
908
+ throw new client.AppwriteException('Missing required parameter: "tableId"');
909
+ }
910
+ if (typeof key === "undefined") {
911
+ throw new client.AppwriteException('Missing required parameter: "key"');
912
+ }
913
+ if (typeof required === "undefined") {
914
+ throw new client.AppwriteException('Missing required parameter: "required"');
915
+ }
916
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/float".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
917
+ const payload = {};
918
+ if (typeof key !== "undefined") {
919
+ payload["key"] = key;
920
+ }
921
+ if (typeof required !== "undefined") {
922
+ payload["required"] = required;
923
+ }
924
+ if (typeof min !== "undefined") {
925
+ payload["min"] = min;
926
+ }
927
+ if (typeof max !== "undefined") {
928
+ payload["max"] = max;
929
+ }
930
+ if (typeof xdefault !== "undefined") {
931
+ payload["default"] = xdefault;
932
+ }
933
+ if (typeof array !== "undefined") {
934
+ payload["array"] = array;
935
+ }
936
+ const uri = new URL(this.client.config.endpoint + apiPath);
937
+ const apiHeaders = {
938
+ "content-type": "application/json"
939
+ };
940
+ return this.client.call(
941
+ "post",
942
+ uri,
943
+ apiHeaders,
944
+ payload
945
+ );
946
+ }
947
+ updateFloatColumn(paramsOrFirst, ...rest) {
948
+ let params;
949
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
950
+ params = paramsOrFirst || {};
951
+ } else {
952
+ params = {
953
+ databaseId: paramsOrFirst,
954
+ tableId: rest[0],
955
+ key: rest[1],
956
+ required: rest[2],
957
+ xdefault: rest[3],
958
+ min: rest[4],
959
+ max: rest[5],
960
+ newKey: rest[6]
961
+ };
962
+ }
963
+ const databaseId = params.databaseId;
964
+ const tableId = params.tableId;
965
+ const key = params.key;
966
+ const required = params.required;
967
+ const xdefault = params.xdefault;
968
+ const min = params.min;
969
+ const max = params.max;
970
+ const newKey = params.newKey;
971
+ if (typeof databaseId === "undefined") {
972
+ throw new client.AppwriteException('Missing required parameter: "databaseId"');
973
+ }
974
+ if (typeof tableId === "undefined") {
975
+ throw new client.AppwriteException('Missing required parameter: "tableId"');
976
+ }
977
+ if (typeof key === "undefined") {
978
+ throw new client.AppwriteException('Missing required parameter: "key"');
979
+ }
980
+ if (typeof required === "undefined") {
981
+ throw new client.AppwriteException('Missing required parameter: "required"');
982
+ }
983
+ if (typeof xdefault === "undefined") {
984
+ throw new client.AppwriteException('Missing required parameter: "xdefault"');
985
+ }
986
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/float/{key}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
987
+ const payload = {};
988
+ if (typeof required !== "undefined") {
989
+ payload["required"] = required;
990
+ }
991
+ if (typeof min !== "undefined") {
992
+ payload["min"] = min;
993
+ }
994
+ if (typeof max !== "undefined") {
995
+ payload["max"] = max;
996
+ }
997
+ if (typeof xdefault !== "undefined") {
998
+ payload["default"] = xdefault;
999
+ }
1000
+ if (typeof newKey !== "undefined") {
1001
+ payload["newKey"] = newKey;
1002
+ }
1003
+ const uri = new URL(this.client.config.endpoint + apiPath);
1004
+ const apiHeaders = {
1005
+ "content-type": "application/json"
1006
+ };
1007
+ return this.client.call(
1008
+ "patch",
1009
+ uri,
1010
+ apiHeaders,
1011
+ payload
1012
+ );
1013
+ }
1014
+ createIntegerColumn(paramsOrFirst, ...rest) {
1015
+ let params;
1016
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
1017
+ params = paramsOrFirst || {};
1018
+ } else {
1019
+ params = {
1020
+ databaseId: paramsOrFirst,
1021
+ tableId: rest[0],
1022
+ key: rest[1],
1023
+ required: rest[2],
1024
+ min: rest[3],
1025
+ max: rest[4],
1026
+ xdefault: rest[5],
1027
+ array: rest[6]
1028
+ };
1029
+ }
1030
+ const databaseId = params.databaseId;
1031
+ const tableId = params.tableId;
1032
+ const key = params.key;
1033
+ const required = params.required;
1034
+ const min = params.min;
1035
+ const max = params.max;
1036
+ const xdefault = params.xdefault;
1037
+ const array = params.array;
1038
+ if (typeof databaseId === "undefined") {
1039
+ throw new client.AppwriteException('Missing required parameter: "databaseId"');
1040
+ }
1041
+ if (typeof tableId === "undefined") {
1042
+ throw new client.AppwriteException('Missing required parameter: "tableId"');
1043
+ }
1044
+ if (typeof key === "undefined") {
1045
+ throw new client.AppwriteException('Missing required parameter: "key"');
1046
+ }
1047
+ if (typeof required === "undefined") {
1048
+ throw new client.AppwriteException('Missing required parameter: "required"');
1049
+ }
1050
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/integer".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
1051
+ const payload = {};
1052
+ if (typeof key !== "undefined") {
1053
+ payload["key"] = key;
1054
+ }
1055
+ if (typeof required !== "undefined") {
1056
+ payload["required"] = required;
1057
+ }
1058
+ if (typeof min !== "undefined") {
1059
+ payload["min"] = min;
1060
+ }
1061
+ if (typeof max !== "undefined") {
1062
+ payload["max"] = max;
1063
+ }
1064
+ if (typeof xdefault !== "undefined") {
1065
+ payload["default"] = xdefault;
1066
+ }
1067
+ if (typeof array !== "undefined") {
1068
+ payload["array"] = array;
1069
+ }
1070
+ const uri = new URL(this.client.config.endpoint + apiPath);
1071
+ const apiHeaders = {
1072
+ "content-type": "application/json"
1073
+ };
1074
+ return this.client.call(
1075
+ "post",
1076
+ uri,
1077
+ apiHeaders,
1078
+ payload
1079
+ );
1080
+ }
1081
+ updateIntegerColumn(paramsOrFirst, ...rest) {
1082
+ let params;
1083
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
1084
+ params = paramsOrFirst || {};
1085
+ } else {
1086
+ params = {
1087
+ databaseId: paramsOrFirst,
1088
+ tableId: rest[0],
1089
+ key: rest[1],
1090
+ required: rest[2],
1091
+ xdefault: rest[3],
1092
+ min: rest[4],
1093
+ max: rest[5],
1094
+ newKey: rest[6]
1095
+ };
1096
+ }
1097
+ const databaseId = params.databaseId;
1098
+ const tableId = params.tableId;
1099
+ const key = params.key;
1100
+ const required = params.required;
1101
+ const xdefault = params.xdefault;
1102
+ const min = params.min;
1103
+ const max = params.max;
1104
+ const newKey = params.newKey;
1105
+ if (typeof databaseId === "undefined") {
1106
+ throw new client.AppwriteException('Missing required parameter: "databaseId"');
1107
+ }
1108
+ if (typeof tableId === "undefined") {
1109
+ throw new client.AppwriteException('Missing required parameter: "tableId"');
1110
+ }
1111
+ if (typeof key === "undefined") {
1112
+ throw new client.AppwriteException('Missing required parameter: "key"');
1113
+ }
1114
+ if (typeof required === "undefined") {
1115
+ throw new client.AppwriteException('Missing required parameter: "required"');
1116
+ }
1117
+ if (typeof xdefault === "undefined") {
1118
+ throw new client.AppwriteException('Missing required parameter: "xdefault"');
1119
+ }
1120
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/integer/{key}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
1121
+ const payload = {};
1122
+ if (typeof required !== "undefined") {
1123
+ payload["required"] = required;
1124
+ }
1125
+ if (typeof min !== "undefined") {
1126
+ payload["min"] = min;
1127
+ }
1128
+ if (typeof max !== "undefined") {
1129
+ payload["max"] = max;
1130
+ }
1131
+ if (typeof xdefault !== "undefined") {
1132
+ payload["default"] = xdefault;
1133
+ }
1134
+ if (typeof newKey !== "undefined") {
1135
+ payload["newKey"] = newKey;
1136
+ }
1137
+ const uri = new URL(this.client.config.endpoint + apiPath);
1138
+ const apiHeaders = {
1139
+ "content-type": "application/json"
1140
+ };
1141
+ return this.client.call(
1142
+ "patch",
1143
+ uri,
1144
+ apiHeaders,
1145
+ payload
1146
+ );
1147
+ }
1148
+ createIpColumn(paramsOrFirst, ...rest) {
1149
+ let params;
1150
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
1151
+ params = paramsOrFirst || {};
1152
+ } else {
1153
+ params = {
1154
+ databaseId: paramsOrFirst,
1155
+ tableId: rest[0],
1156
+ key: rest[1],
1157
+ required: rest[2],
1158
+ xdefault: rest[3],
1159
+ array: rest[4]
1160
+ };
1161
+ }
1162
+ const databaseId = params.databaseId;
1163
+ const tableId = params.tableId;
1164
+ const key = params.key;
1165
+ const required = params.required;
1166
+ const xdefault = params.xdefault;
1167
+ const array = params.array;
1168
+ if (typeof databaseId === "undefined") {
1169
+ throw new client.AppwriteException('Missing required parameter: "databaseId"');
1170
+ }
1171
+ if (typeof tableId === "undefined") {
1172
+ throw new client.AppwriteException('Missing required parameter: "tableId"');
1173
+ }
1174
+ if (typeof key === "undefined") {
1175
+ throw new client.AppwriteException('Missing required parameter: "key"');
1176
+ }
1177
+ if (typeof required === "undefined") {
1178
+ throw new client.AppwriteException('Missing required parameter: "required"');
1179
+ }
1180
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/ip".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
1181
+ const payload = {};
1182
+ if (typeof key !== "undefined") {
1183
+ payload["key"] = key;
1184
+ }
1185
+ if (typeof required !== "undefined") {
1186
+ payload["required"] = required;
1187
+ }
1188
+ if (typeof xdefault !== "undefined") {
1189
+ payload["default"] = xdefault;
1190
+ }
1191
+ if (typeof array !== "undefined") {
1192
+ payload["array"] = array;
1193
+ }
1194
+ const uri = new URL(this.client.config.endpoint + apiPath);
1195
+ const apiHeaders = {
1196
+ "content-type": "application/json"
1197
+ };
1198
+ return this.client.call(
1199
+ "post",
1200
+ uri,
1201
+ apiHeaders,
1202
+ payload
1203
+ );
1204
+ }
1205
+ updateIpColumn(paramsOrFirst, ...rest) {
1206
+ let params;
1207
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
1208
+ params = paramsOrFirst || {};
1209
+ } else {
1210
+ params = {
1211
+ databaseId: paramsOrFirst,
1212
+ tableId: rest[0],
1213
+ key: rest[1],
1214
+ required: rest[2],
1215
+ xdefault: rest[3],
1216
+ newKey: rest[4]
1217
+ };
1218
+ }
1219
+ const databaseId = params.databaseId;
1220
+ const tableId = params.tableId;
1221
+ const key = params.key;
1222
+ const required = params.required;
1223
+ const xdefault = params.xdefault;
1224
+ const newKey = params.newKey;
1225
+ if (typeof databaseId === "undefined") {
1226
+ throw new client.AppwriteException('Missing required parameter: "databaseId"');
1227
+ }
1228
+ if (typeof tableId === "undefined") {
1229
+ throw new client.AppwriteException('Missing required parameter: "tableId"');
1230
+ }
1231
+ if (typeof key === "undefined") {
1232
+ throw new client.AppwriteException('Missing required parameter: "key"');
1233
+ }
1234
+ if (typeof required === "undefined") {
1235
+ throw new client.AppwriteException('Missing required parameter: "required"');
1236
+ }
1237
+ if (typeof xdefault === "undefined") {
1238
+ throw new client.AppwriteException('Missing required parameter: "xdefault"');
1239
+ }
1240
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/ip/{key}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
1241
+ const payload = {};
1242
+ if (typeof required !== "undefined") {
1243
+ payload["required"] = required;
1244
+ }
1245
+ if (typeof xdefault !== "undefined") {
1246
+ payload["default"] = xdefault;
1247
+ }
1248
+ if (typeof newKey !== "undefined") {
1249
+ payload["newKey"] = newKey;
1250
+ }
1251
+ const uri = new URL(this.client.config.endpoint + apiPath);
1252
+ const apiHeaders = {
1253
+ "content-type": "application/json"
1254
+ };
1255
+ return this.client.call(
1256
+ "patch",
1257
+ uri,
1258
+ apiHeaders,
1259
+ payload
1260
+ );
1261
+ }
1262
+ createRelationshipColumn(paramsOrFirst, ...rest) {
1263
+ let params;
1264
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
1265
+ params = paramsOrFirst || {};
1266
+ } else {
1267
+ params = {
1268
+ databaseId: paramsOrFirst,
1269
+ tableId: rest[0],
1270
+ relatedTableId: rest[1],
1271
+ type: rest[2],
1272
+ twoWay: rest[3],
1273
+ key: rest[4],
1274
+ twoWayKey: rest[5],
1275
+ onDelete: rest[6]
1276
+ };
1277
+ }
1278
+ const databaseId = params.databaseId;
1279
+ const tableId = params.tableId;
1280
+ const relatedTableId = params.relatedTableId;
1281
+ const type = params.type;
1282
+ const twoWay = params.twoWay;
1283
+ const key = params.key;
1284
+ const twoWayKey = params.twoWayKey;
1285
+ const onDelete = params.onDelete;
1286
+ if (typeof databaseId === "undefined") {
1287
+ throw new client.AppwriteException('Missing required parameter: "databaseId"');
1288
+ }
1289
+ if (typeof tableId === "undefined") {
1290
+ throw new client.AppwriteException('Missing required parameter: "tableId"');
1291
+ }
1292
+ if (typeof relatedTableId === "undefined") {
1293
+ throw new client.AppwriteException('Missing required parameter: "relatedTableId"');
1294
+ }
1295
+ if (typeof type === "undefined") {
1296
+ throw new client.AppwriteException('Missing required parameter: "type"');
1297
+ }
1298
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/relationship".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
1299
+ const payload = {};
1300
+ if (typeof relatedTableId !== "undefined") {
1301
+ payload["relatedTableId"] = relatedTableId;
1302
+ }
1303
+ if (typeof type !== "undefined") {
1304
+ payload["type"] = type;
1305
+ }
1306
+ if (typeof twoWay !== "undefined") {
1307
+ payload["twoWay"] = twoWay;
1308
+ }
1309
+ if (typeof key !== "undefined") {
1310
+ payload["key"] = key;
1311
+ }
1312
+ if (typeof twoWayKey !== "undefined") {
1313
+ payload["twoWayKey"] = twoWayKey;
1314
+ }
1315
+ if (typeof onDelete !== "undefined") {
1316
+ payload["onDelete"] = onDelete;
1317
+ }
1318
+ const uri = new URL(this.client.config.endpoint + apiPath);
1319
+ const apiHeaders = {
1320
+ "content-type": "application/json"
1321
+ };
1322
+ return this.client.call(
1323
+ "post",
1324
+ uri,
1325
+ apiHeaders,
1326
+ payload
1327
+ );
1328
+ }
1329
+ createStringColumn(paramsOrFirst, ...rest) {
1330
+ let params;
1331
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
1332
+ params = paramsOrFirst || {};
1333
+ } else {
1334
+ params = {
1335
+ databaseId: paramsOrFirst,
1336
+ tableId: rest[0],
1337
+ key: rest[1],
1338
+ size: rest[2],
1339
+ required: rest[3],
1340
+ xdefault: rest[4],
1341
+ array: rest[5],
1342
+ encrypt: rest[6]
1343
+ };
1344
+ }
1345
+ const databaseId = params.databaseId;
1346
+ const tableId = params.tableId;
1347
+ const key = params.key;
1348
+ const size = params.size;
1349
+ const required = params.required;
1350
+ const xdefault = params.xdefault;
1351
+ const array = params.array;
1352
+ const encrypt = params.encrypt;
1353
+ if (typeof databaseId === "undefined") {
1354
+ throw new client.AppwriteException('Missing required parameter: "databaseId"');
1355
+ }
1356
+ if (typeof tableId === "undefined") {
1357
+ throw new client.AppwriteException('Missing required parameter: "tableId"');
1358
+ }
1359
+ if (typeof key === "undefined") {
1360
+ throw new client.AppwriteException('Missing required parameter: "key"');
1361
+ }
1362
+ if (typeof size === "undefined") {
1363
+ throw new client.AppwriteException('Missing required parameter: "size"');
1364
+ }
1365
+ if (typeof required === "undefined") {
1366
+ throw new client.AppwriteException('Missing required parameter: "required"');
1367
+ }
1368
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/string".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
1369
+ const payload = {};
1370
+ if (typeof key !== "undefined") {
1371
+ payload["key"] = key;
1372
+ }
1373
+ if (typeof size !== "undefined") {
1374
+ payload["size"] = size;
1375
+ }
1376
+ if (typeof required !== "undefined") {
1377
+ payload["required"] = required;
1378
+ }
1379
+ if (typeof xdefault !== "undefined") {
1380
+ payload["default"] = xdefault;
1381
+ }
1382
+ if (typeof array !== "undefined") {
1383
+ payload["array"] = array;
1384
+ }
1385
+ if (typeof encrypt !== "undefined") {
1386
+ payload["encrypt"] = encrypt;
1387
+ }
1388
+ const uri = new URL(this.client.config.endpoint + apiPath);
1389
+ const apiHeaders = {
1390
+ "content-type": "application/json"
1391
+ };
1392
+ return this.client.call(
1393
+ "post",
1394
+ uri,
1395
+ apiHeaders,
1396
+ payload
1397
+ );
1398
+ }
1399
+ updateStringColumn(paramsOrFirst, ...rest) {
1400
+ let params;
1401
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
1402
+ params = paramsOrFirst || {};
1403
+ } else {
1404
+ params = {
1405
+ databaseId: paramsOrFirst,
1406
+ tableId: rest[0],
1407
+ key: rest[1],
1408
+ required: rest[2],
1409
+ xdefault: rest[3],
1410
+ size: rest[4],
1411
+ newKey: rest[5]
1412
+ };
1413
+ }
1414
+ const databaseId = params.databaseId;
1415
+ const tableId = params.tableId;
1416
+ const key = params.key;
1417
+ const required = params.required;
1418
+ const xdefault = params.xdefault;
1419
+ const size = params.size;
1420
+ const newKey = params.newKey;
1421
+ if (typeof databaseId === "undefined") {
1422
+ throw new client.AppwriteException('Missing required parameter: "databaseId"');
1423
+ }
1424
+ if (typeof tableId === "undefined") {
1425
+ throw new client.AppwriteException('Missing required parameter: "tableId"');
1426
+ }
1427
+ if (typeof key === "undefined") {
1428
+ throw new client.AppwriteException('Missing required parameter: "key"');
1429
+ }
1430
+ if (typeof required === "undefined") {
1431
+ throw new client.AppwriteException('Missing required parameter: "required"');
1432
+ }
1433
+ if (typeof xdefault === "undefined") {
1434
+ throw new client.AppwriteException('Missing required parameter: "xdefault"');
1435
+ }
1436
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/string/{key}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
1437
+ const payload = {};
1438
+ if (typeof required !== "undefined") {
1439
+ payload["required"] = required;
1440
+ }
1441
+ if (typeof xdefault !== "undefined") {
1442
+ payload["default"] = xdefault;
1443
+ }
1444
+ if (typeof size !== "undefined") {
1445
+ payload["size"] = size;
1446
+ }
1447
+ if (typeof newKey !== "undefined") {
1448
+ payload["newKey"] = newKey;
1449
+ }
1450
+ const uri = new URL(this.client.config.endpoint + apiPath);
1451
+ const apiHeaders = {
1452
+ "content-type": "application/json"
1453
+ };
1454
+ return this.client.call(
1455
+ "patch",
1456
+ uri,
1457
+ apiHeaders,
1458
+ payload
1459
+ );
1460
+ }
1461
+ createUrlColumn(paramsOrFirst, ...rest) {
1462
+ let params;
1463
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
1464
+ params = paramsOrFirst || {};
1465
+ } else {
1466
+ params = {
1467
+ databaseId: paramsOrFirst,
1468
+ tableId: rest[0],
1469
+ key: rest[1],
1470
+ required: rest[2],
1471
+ xdefault: rest[3],
1472
+ array: rest[4]
1473
+ };
1474
+ }
1475
+ const databaseId = params.databaseId;
1476
+ const tableId = params.tableId;
1477
+ const key = params.key;
1478
+ const required = params.required;
1479
+ const xdefault = params.xdefault;
1480
+ const array = params.array;
1481
+ if (typeof databaseId === "undefined") {
1482
+ throw new client.AppwriteException('Missing required parameter: "databaseId"');
1483
+ }
1484
+ if (typeof tableId === "undefined") {
1485
+ throw new client.AppwriteException('Missing required parameter: "tableId"');
1486
+ }
1487
+ if (typeof key === "undefined") {
1488
+ throw new client.AppwriteException('Missing required parameter: "key"');
1489
+ }
1490
+ if (typeof required === "undefined") {
1491
+ throw new client.AppwriteException('Missing required parameter: "required"');
1492
+ }
1493
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/url".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
1494
+ const payload = {};
1495
+ if (typeof key !== "undefined") {
1496
+ payload["key"] = key;
1497
+ }
1498
+ if (typeof required !== "undefined") {
1499
+ payload["required"] = required;
1500
+ }
1501
+ if (typeof xdefault !== "undefined") {
1502
+ payload["default"] = xdefault;
1503
+ }
1504
+ if (typeof array !== "undefined") {
1505
+ payload["array"] = array;
1506
+ }
1507
+ const uri = new URL(this.client.config.endpoint + apiPath);
1508
+ const apiHeaders = {
1509
+ "content-type": "application/json"
1510
+ };
1511
+ return this.client.call(
1512
+ "post",
1513
+ uri,
1514
+ apiHeaders,
1515
+ payload
1516
+ );
1517
+ }
1518
+ updateUrlColumn(paramsOrFirst, ...rest) {
1519
+ let params;
1520
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
1521
+ params = paramsOrFirst || {};
1522
+ } else {
1523
+ params = {
1524
+ databaseId: paramsOrFirst,
1525
+ tableId: rest[0],
1526
+ key: rest[1],
1527
+ required: rest[2],
1528
+ xdefault: rest[3],
1529
+ newKey: rest[4]
1530
+ };
1531
+ }
1532
+ const databaseId = params.databaseId;
1533
+ const tableId = params.tableId;
1534
+ const key = params.key;
1535
+ const required = params.required;
1536
+ const xdefault = params.xdefault;
1537
+ const newKey = params.newKey;
1538
+ if (typeof databaseId === "undefined") {
1539
+ throw new client.AppwriteException('Missing required parameter: "databaseId"');
1540
+ }
1541
+ if (typeof tableId === "undefined") {
1542
+ throw new client.AppwriteException('Missing required parameter: "tableId"');
1543
+ }
1544
+ if (typeof key === "undefined") {
1545
+ throw new client.AppwriteException('Missing required parameter: "key"');
1546
+ }
1547
+ if (typeof required === "undefined") {
1548
+ throw new client.AppwriteException('Missing required parameter: "required"');
1549
+ }
1550
+ if (typeof xdefault === "undefined") {
1551
+ throw new client.AppwriteException('Missing required parameter: "xdefault"');
1552
+ }
1553
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/url/{key}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
1554
+ const payload = {};
1555
+ if (typeof required !== "undefined") {
1556
+ payload["required"] = required;
1557
+ }
1558
+ if (typeof xdefault !== "undefined") {
1559
+ payload["default"] = xdefault;
1560
+ }
1561
+ if (typeof newKey !== "undefined") {
1562
+ payload["newKey"] = newKey;
1563
+ }
1564
+ const uri = new URL(this.client.config.endpoint + apiPath);
1565
+ const apiHeaders = {
1566
+ "content-type": "application/json"
1567
+ };
1568
+ return this.client.call(
1569
+ "patch",
1570
+ uri,
1571
+ apiHeaders,
1572
+ payload
1573
+ );
1574
+ }
1575
+ getColumn(paramsOrFirst, ...rest) {
1576
+ let params;
1577
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
1578
+ params = paramsOrFirst || {};
1579
+ } else {
1580
+ params = {
1581
+ databaseId: paramsOrFirst,
1582
+ tableId: rest[0],
1583
+ key: rest[1]
1584
+ };
1585
+ }
1586
+ const databaseId = params.databaseId;
1587
+ const tableId = params.tableId;
1588
+ const key = params.key;
1589
+ if (typeof databaseId === "undefined") {
1590
+ throw new client.AppwriteException('Missing required parameter: "databaseId"');
1591
+ }
1592
+ if (typeof tableId === "undefined") {
1593
+ throw new client.AppwriteException('Missing required parameter: "tableId"');
1594
+ }
1595
+ if (typeof key === "undefined") {
1596
+ throw new client.AppwriteException('Missing required parameter: "key"');
1597
+ }
1598
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/{key}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
1599
+ const payload = {};
1600
+ const uri = new URL(this.client.config.endpoint + apiPath);
1601
+ const apiHeaders = {};
1602
+ return this.client.call(
1603
+ "get",
1604
+ uri,
1605
+ apiHeaders,
1606
+ payload
1607
+ );
1608
+ }
1609
+ deleteColumn(paramsOrFirst, ...rest) {
1610
+ let params;
1611
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
1612
+ params = paramsOrFirst || {};
1613
+ } else {
1614
+ params = {
1615
+ databaseId: paramsOrFirst,
1616
+ tableId: rest[0],
1617
+ key: rest[1]
1618
+ };
1619
+ }
1620
+ const databaseId = params.databaseId;
1621
+ const tableId = params.tableId;
1622
+ const key = params.key;
1623
+ if (typeof databaseId === "undefined") {
1624
+ throw new client.AppwriteException('Missing required parameter: "databaseId"');
1625
+ }
1626
+ if (typeof tableId === "undefined") {
1627
+ throw new client.AppwriteException('Missing required parameter: "tableId"');
1628
+ }
1629
+ if (typeof key === "undefined") {
1630
+ throw new client.AppwriteException('Missing required parameter: "key"');
1631
+ }
1632
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/{key}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
1633
+ const payload = {};
1634
+ const uri = new URL(this.client.config.endpoint + apiPath);
1635
+ const apiHeaders = {
1636
+ "content-type": "application/json"
1637
+ };
1638
+ return this.client.call(
1639
+ "delete",
1640
+ uri,
1641
+ apiHeaders,
1642
+ payload
1643
+ );
1644
+ }
1645
+ updateRelationshipColumn(paramsOrFirst, ...rest) {
1646
+ let params;
1647
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
1648
+ params = paramsOrFirst || {};
1649
+ } else {
1650
+ params = {
1651
+ databaseId: paramsOrFirst,
1652
+ tableId: rest[0],
1653
+ key: rest[1],
1654
+ onDelete: rest[2],
1655
+ newKey: rest[3]
1656
+ };
1657
+ }
1658
+ const databaseId = params.databaseId;
1659
+ const tableId = params.tableId;
1660
+ const key = params.key;
1661
+ const onDelete = params.onDelete;
1662
+ const newKey = params.newKey;
1663
+ if (typeof databaseId === "undefined") {
1664
+ throw new client.AppwriteException('Missing required parameter: "databaseId"');
1665
+ }
1666
+ if (typeof tableId === "undefined") {
1667
+ throw new client.AppwriteException('Missing required parameter: "tableId"');
1668
+ }
1669
+ if (typeof key === "undefined") {
1670
+ throw new client.AppwriteException('Missing required parameter: "key"');
1671
+ }
1672
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/{key}/relationship".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
1673
+ const payload = {};
1674
+ if (typeof onDelete !== "undefined") {
1675
+ payload["onDelete"] = onDelete;
1676
+ }
1677
+ if (typeof newKey !== "undefined") {
1678
+ payload["newKey"] = newKey;
1679
+ }
1680
+ const uri = new URL(this.client.config.endpoint + apiPath);
1681
+ const apiHeaders = {
1682
+ "content-type": "application/json"
1683
+ };
1684
+ return this.client.call(
1685
+ "patch",
1686
+ uri,
1687
+ apiHeaders,
1688
+ payload
1689
+ );
1690
+ }
1691
+ listIndexes(paramsOrFirst, ...rest) {
1692
+ let params;
1693
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
1694
+ params = paramsOrFirst || {};
1695
+ } else {
1696
+ params = {
1697
+ databaseId: paramsOrFirst,
1698
+ tableId: rest[0],
1699
+ queries: rest[1]
1700
+ };
1701
+ }
1702
+ const databaseId = params.databaseId;
1703
+ const tableId = params.tableId;
1704
+ const queries = params.queries;
1705
+ if (typeof databaseId === "undefined") {
1706
+ throw new client.AppwriteException('Missing required parameter: "databaseId"');
1707
+ }
1708
+ if (typeof tableId === "undefined") {
1709
+ throw new client.AppwriteException('Missing required parameter: "tableId"');
1710
+ }
1711
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/indexes".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
1712
+ const payload = {};
1713
+ if (typeof queries !== "undefined") {
1714
+ payload["queries"] = queries;
1715
+ }
1716
+ const uri = new URL(this.client.config.endpoint + apiPath);
1717
+ const apiHeaders = {};
1718
+ return this.client.call(
1719
+ "get",
1720
+ uri,
1721
+ apiHeaders,
1722
+ payload
1723
+ );
1724
+ }
1725
+ createIndex(paramsOrFirst, ...rest) {
1726
+ let params;
1727
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
1728
+ params = paramsOrFirst || {};
1729
+ } else {
1730
+ params = {
1731
+ databaseId: paramsOrFirst,
1732
+ tableId: rest[0],
1733
+ key: rest[1],
1734
+ type: rest[2],
1735
+ columns: rest[3],
1736
+ orders: rest[4],
1737
+ lengths: rest[5]
1738
+ };
1739
+ }
1740
+ const databaseId = params.databaseId;
1741
+ const tableId = params.tableId;
1742
+ const key = params.key;
1743
+ const type = params.type;
1744
+ const columns = params.columns;
1745
+ const orders = params.orders;
1746
+ const lengths = params.lengths;
1747
+ if (typeof databaseId === "undefined") {
1748
+ throw new client.AppwriteException('Missing required parameter: "databaseId"');
1749
+ }
1750
+ if (typeof tableId === "undefined") {
1751
+ throw new client.AppwriteException('Missing required parameter: "tableId"');
1752
+ }
1753
+ if (typeof key === "undefined") {
1754
+ throw new client.AppwriteException('Missing required parameter: "key"');
1755
+ }
1756
+ if (typeof type === "undefined") {
1757
+ throw new client.AppwriteException('Missing required parameter: "type"');
1758
+ }
1759
+ if (typeof columns === "undefined") {
1760
+ throw new client.AppwriteException('Missing required parameter: "columns"');
1761
+ }
1762
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/indexes".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
1763
+ const payload = {};
1764
+ if (typeof key !== "undefined") {
1765
+ payload["key"] = key;
1766
+ }
1767
+ if (typeof type !== "undefined") {
1768
+ payload["type"] = type;
1769
+ }
1770
+ if (typeof columns !== "undefined") {
1771
+ payload["columns"] = columns;
1772
+ }
1773
+ if (typeof orders !== "undefined") {
1774
+ payload["orders"] = orders;
1775
+ }
1776
+ if (typeof lengths !== "undefined") {
1777
+ payload["lengths"] = lengths;
1778
+ }
1779
+ const uri = new URL(this.client.config.endpoint + apiPath);
1780
+ const apiHeaders = {
1781
+ "content-type": "application/json"
1782
+ };
1783
+ return this.client.call(
1784
+ "post",
1785
+ uri,
1786
+ apiHeaders,
1787
+ payload
1788
+ );
1789
+ }
1790
+ getIndex(paramsOrFirst, ...rest) {
1791
+ let params;
1792
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
1793
+ params = paramsOrFirst || {};
1794
+ } else {
1795
+ params = {
1796
+ databaseId: paramsOrFirst,
1797
+ tableId: rest[0],
1798
+ key: rest[1]
1799
+ };
1800
+ }
1801
+ const databaseId = params.databaseId;
1802
+ const tableId = params.tableId;
1803
+ const key = params.key;
1804
+ if (typeof databaseId === "undefined") {
1805
+ throw new client.AppwriteException('Missing required parameter: "databaseId"');
1806
+ }
1807
+ if (typeof tableId === "undefined") {
1808
+ throw new client.AppwriteException('Missing required parameter: "tableId"');
1809
+ }
1810
+ if (typeof key === "undefined") {
1811
+ throw new client.AppwriteException('Missing required parameter: "key"');
1812
+ }
1813
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/indexes/{key}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
1814
+ const payload = {};
1815
+ const uri = new URL(this.client.config.endpoint + apiPath);
1816
+ const apiHeaders = {};
1817
+ return this.client.call(
1818
+ "get",
1819
+ uri,
1820
+ apiHeaders,
1821
+ payload
1822
+ );
1823
+ }
1824
+ deleteIndex(paramsOrFirst, ...rest) {
1825
+ let params;
1826
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
1827
+ params = paramsOrFirst || {};
1828
+ } else {
1829
+ params = {
1830
+ databaseId: paramsOrFirst,
1831
+ tableId: rest[0],
1832
+ key: rest[1]
1833
+ };
1834
+ }
1835
+ const databaseId = params.databaseId;
1836
+ const tableId = params.tableId;
1837
+ const key = params.key;
1838
+ if (typeof databaseId === "undefined") {
1839
+ throw new client.AppwriteException('Missing required parameter: "databaseId"');
1840
+ }
1841
+ if (typeof tableId === "undefined") {
1842
+ throw new client.AppwriteException('Missing required parameter: "tableId"');
1843
+ }
1844
+ if (typeof key === "undefined") {
1845
+ throw new client.AppwriteException('Missing required parameter: "key"');
1846
+ }
1847
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/indexes/{key}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
1848
+ const payload = {};
1849
+ const uri = new URL(this.client.config.endpoint + apiPath);
1850
+ const apiHeaders = {
1851
+ "content-type": "application/json"
1852
+ };
1853
+ return this.client.call(
1854
+ "delete",
1855
+ uri,
1856
+ apiHeaders,
1857
+ payload
1858
+ );
1859
+ }
1860
+ listRows(paramsOrFirst, ...rest) {
1861
+ let params;
1862
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
1863
+ params = paramsOrFirst || {};
1864
+ } else {
1865
+ params = {
1866
+ databaseId: paramsOrFirst,
1867
+ tableId: rest[0],
1868
+ queries: rest[1]
1869
+ };
1870
+ }
1871
+ const databaseId = params.databaseId;
1872
+ const tableId = params.tableId;
1873
+ const queries = params.queries;
1874
+ if (typeof databaseId === "undefined") {
1875
+ throw new client.AppwriteException('Missing required parameter: "databaseId"');
1876
+ }
1877
+ if (typeof tableId === "undefined") {
1878
+ throw new client.AppwriteException('Missing required parameter: "tableId"');
1879
+ }
1880
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/rows".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
1881
+ const payload = {};
1882
+ if (typeof queries !== "undefined") {
1883
+ payload["queries"] = queries;
1884
+ }
1885
+ const uri = new URL(this.client.config.endpoint + apiPath);
1886
+ const apiHeaders = {};
1887
+ return this.client.call(
1888
+ "get",
1889
+ uri,
1890
+ apiHeaders,
1891
+ payload
1892
+ );
1893
+ }
1894
+ createRow(paramsOrFirst, ...rest) {
1895
+ let params;
1896
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
1897
+ params = paramsOrFirst || {};
1898
+ } else {
1899
+ params = {
1900
+ databaseId: paramsOrFirst,
1901
+ tableId: rest[0],
1902
+ rowId: rest[1],
1903
+ data: rest[2],
1904
+ permissions: rest[3]
1905
+ };
1906
+ }
1907
+ const databaseId = params.databaseId;
1908
+ const tableId = params.tableId;
1909
+ const rowId = params.rowId;
1910
+ const data = params.data;
1911
+ const permissions = params.permissions;
1912
+ if (typeof databaseId === "undefined") {
1913
+ throw new client.AppwriteException('Missing required parameter: "databaseId"');
1914
+ }
1915
+ if (typeof tableId === "undefined") {
1916
+ throw new client.AppwriteException('Missing required parameter: "tableId"');
1917
+ }
1918
+ if (typeof rowId === "undefined") {
1919
+ throw new client.AppwriteException('Missing required parameter: "rowId"');
1920
+ }
1921
+ if (typeof data === "undefined") {
1922
+ throw new client.AppwriteException('Missing required parameter: "data"');
1923
+ }
1924
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/rows".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
1925
+ const payload = {};
1926
+ if (typeof rowId !== "undefined") {
1927
+ payload["rowId"] = rowId;
1928
+ }
1929
+ if (typeof data !== "undefined") {
1930
+ payload["data"] = data;
1931
+ }
1932
+ if (typeof permissions !== "undefined") {
1933
+ payload["permissions"] = permissions;
1934
+ }
1935
+ const uri = new URL(this.client.config.endpoint + apiPath);
1936
+ const apiHeaders = {
1937
+ "content-type": "application/json"
1938
+ };
1939
+ return this.client.call(
1940
+ "post",
1941
+ uri,
1942
+ apiHeaders,
1943
+ payload
1944
+ );
1945
+ }
1946
+ createRows(paramsOrFirst, ...rest) {
1947
+ let params;
1948
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
1949
+ params = paramsOrFirst || {};
1950
+ } else {
1951
+ params = {
1952
+ databaseId: paramsOrFirst,
1953
+ tableId: rest[0],
1954
+ rows: rest[1]
1955
+ };
1956
+ }
1957
+ const databaseId = params.databaseId;
1958
+ const tableId = params.tableId;
1959
+ const rows = params.rows;
1960
+ if (typeof databaseId === "undefined") {
1961
+ throw new client.AppwriteException('Missing required parameter: "databaseId"');
1962
+ }
1963
+ if (typeof tableId === "undefined") {
1964
+ throw new client.AppwriteException('Missing required parameter: "tableId"');
1965
+ }
1966
+ if (typeof rows === "undefined") {
1967
+ throw new client.AppwriteException('Missing required parameter: "rows"');
1968
+ }
1969
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/rows".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
1970
+ const payload = {};
1971
+ if (typeof rows !== "undefined") {
1972
+ payload["rows"] = rows;
1973
+ }
1974
+ const uri = new URL(this.client.config.endpoint + apiPath);
1975
+ const apiHeaders = {
1976
+ "content-type": "application/json"
1977
+ };
1978
+ return this.client.call(
1979
+ "post",
1980
+ uri,
1981
+ apiHeaders,
1982
+ payload
1983
+ );
1984
+ }
1985
+ upsertRows(paramsOrFirst, ...rest) {
1986
+ let params;
1987
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
1988
+ params = paramsOrFirst || {};
1989
+ } else {
1990
+ params = {
1991
+ databaseId: paramsOrFirst,
1992
+ tableId: rest[0],
1993
+ rows: rest[1]
1994
+ };
1995
+ }
1996
+ const databaseId = params.databaseId;
1997
+ const tableId = params.tableId;
1998
+ const rows = params.rows;
1999
+ if (typeof databaseId === "undefined") {
2000
+ throw new client.AppwriteException('Missing required parameter: "databaseId"');
2001
+ }
2002
+ if (typeof tableId === "undefined") {
2003
+ throw new client.AppwriteException('Missing required parameter: "tableId"');
2004
+ }
2005
+ if (typeof rows === "undefined") {
2006
+ throw new client.AppwriteException('Missing required parameter: "rows"');
2007
+ }
2008
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/rows".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
2009
+ const payload = {};
2010
+ if (typeof rows !== "undefined") {
2011
+ payload["rows"] = rows;
2012
+ }
2013
+ const uri = new URL(this.client.config.endpoint + apiPath);
2014
+ const apiHeaders = {
2015
+ "content-type": "application/json"
2016
+ };
2017
+ return this.client.call(
2018
+ "put",
2019
+ uri,
2020
+ apiHeaders,
2021
+ payload
2022
+ );
2023
+ }
2024
+ updateRows(paramsOrFirst, ...rest) {
2025
+ let params;
2026
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
2027
+ params = paramsOrFirst || {};
2028
+ } else {
2029
+ params = {
2030
+ databaseId: paramsOrFirst,
2031
+ tableId: rest[0],
2032
+ data: rest[1],
2033
+ queries: rest[2]
2034
+ };
2035
+ }
2036
+ const databaseId = params.databaseId;
2037
+ const tableId = params.tableId;
2038
+ const data = params.data;
2039
+ const queries = params.queries;
2040
+ if (typeof databaseId === "undefined") {
2041
+ throw new client.AppwriteException('Missing required parameter: "databaseId"');
2042
+ }
2043
+ if (typeof tableId === "undefined") {
2044
+ throw new client.AppwriteException('Missing required parameter: "tableId"');
2045
+ }
2046
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/rows".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
2047
+ const payload = {};
2048
+ if (typeof data !== "undefined") {
2049
+ payload["data"] = data;
2050
+ }
2051
+ if (typeof queries !== "undefined") {
2052
+ payload["queries"] = queries;
2053
+ }
2054
+ const uri = new URL(this.client.config.endpoint + apiPath);
2055
+ const apiHeaders = {
2056
+ "content-type": "application/json"
2057
+ };
2058
+ return this.client.call(
2059
+ "patch",
2060
+ uri,
2061
+ apiHeaders,
2062
+ payload
2063
+ );
2064
+ }
2065
+ deleteRows(paramsOrFirst, ...rest) {
2066
+ let params;
2067
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
2068
+ params = paramsOrFirst || {};
2069
+ } else {
2070
+ params = {
2071
+ databaseId: paramsOrFirst,
2072
+ tableId: rest[0],
2073
+ queries: rest[1]
2074
+ };
2075
+ }
2076
+ const databaseId = params.databaseId;
2077
+ const tableId = params.tableId;
2078
+ const queries = params.queries;
2079
+ if (typeof databaseId === "undefined") {
2080
+ throw new client.AppwriteException('Missing required parameter: "databaseId"');
2081
+ }
2082
+ if (typeof tableId === "undefined") {
2083
+ throw new client.AppwriteException('Missing required parameter: "tableId"');
2084
+ }
2085
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/rows".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
2086
+ const payload = {};
2087
+ if (typeof queries !== "undefined") {
2088
+ payload["queries"] = queries;
2089
+ }
2090
+ const uri = new URL(this.client.config.endpoint + apiPath);
2091
+ const apiHeaders = {
2092
+ "content-type": "application/json"
2093
+ };
2094
+ return this.client.call(
2095
+ "delete",
2096
+ uri,
2097
+ apiHeaders,
2098
+ payload
2099
+ );
2100
+ }
2101
+ getRow(paramsOrFirst, ...rest) {
2102
+ let params;
2103
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
2104
+ params = paramsOrFirst || {};
2105
+ } else {
2106
+ params = {
2107
+ databaseId: paramsOrFirst,
2108
+ tableId: rest[0],
2109
+ rowId: rest[1],
2110
+ queries: rest[2]
2111
+ };
2112
+ }
2113
+ const databaseId = params.databaseId;
2114
+ const tableId = params.tableId;
2115
+ const rowId = params.rowId;
2116
+ const queries = params.queries;
2117
+ if (typeof databaseId === "undefined") {
2118
+ throw new client.AppwriteException('Missing required parameter: "databaseId"');
2119
+ }
2120
+ if (typeof tableId === "undefined") {
2121
+ throw new client.AppwriteException('Missing required parameter: "tableId"');
2122
+ }
2123
+ if (typeof rowId === "undefined") {
2124
+ throw new client.AppwriteException('Missing required parameter: "rowId"');
2125
+ }
2126
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{rowId}", rowId);
2127
+ const payload = {};
2128
+ if (typeof queries !== "undefined") {
2129
+ payload["queries"] = queries;
2130
+ }
2131
+ const uri = new URL(this.client.config.endpoint + apiPath);
2132
+ const apiHeaders = {};
2133
+ return this.client.call(
2134
+ "get",
2135
+ uri,
2136
+ apiHeaders,
2137
+ payload
2138
+ );
2139
+ }
2140
+ upsertRow(paramsOrFirst, ...rest) {
2141
+ let params;
2142
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
2143
+ params = paramsOrFirst || {};
2144
+ } else {
2145
+ params = {
2146
+ databaseId: paramsOrFirst,
2147
+ tableId: rest[0],
2148
+ rowId: rest[1],
2149
+ data: rest[2],
2150
+ permissions: rest[3]
2151
+ };
2152
+ }
2153
+ const databaseId = params.databaseId;
2154
+ const tableId = params.tableId;
2155
+ const rowId = params.rowId;
2156
+ const data = params.data;
2157
+ const permissions = params.permissions;
2158
+ if (typeof databaseId === "undefined") {
2159
+ throw new client.AppwriteException('Missing required parameter: "databaseId"');
2160
+ }
2161
+ if (typeof tableId === "undefined") {
2162
+ throw new client.AppwriteException('Missing required parameter: "tableId"');
2163
+ }
2164
+ if (typeof rowId === "undefined") {
2165
+ throw new client.AppwriteException('Missing required parameter: "rowId"');
2166
+ }
2167
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{rowId}", rowId);
2168
+ const payload = {};
2169
+ if (typeof data !== "undefined") {
2170
+ payload["data"] = data;
2171
+ }
2172
+ if (typeof permissions !== "undefined") {
2173
+ payload["permissions"] = permissions;
2174
+ }
2175
+ const uri = new URL(this.client.config.endpoint + apiPath);
2176
+ const apiHeaders = {
2177
+ "content-type": "application/json"
2178
+ };
2179
+ return this.client.call(
2180
+ "put",
2181
+ uri,
2182
+ apiHeaders,
2183
+ payload
2184
+ );
2185
+ }
2186
+ updateRow(paramsOrFirst, ...rest) {
2187
+ let params;
2188
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
2189
+ params = paramsOrFirst || {};
2190
+ } else {
2191
+ params = {
2192
+ databaseId: paramsOrFirst,
2193
+ tableId: rest[0],
2194
+ rowId: rest[1],
2195
+ data: rest[2],
2196
+ permissions: rest[3]
2197
+ };
2198
+ }
2199
+ const databaseId = params.databaseId;
2200
+ const tableId = params.tableId;
2201
+ const rowId = params.rowId;
2202
+ const data = params.data;
2203
+ const permissions = params.permissions;
2204
+ if (typeof databaseId === "undefined") {
2205
+ throw new client.AppwriteException('Missing required parameter: "databaseId"');
2206
+ }
2207
+ if (typeof tableId === "undefined") {
2208
+ throw new client.AppwriteException('Missing required parameter: "tableId"');
2209
+ }
2210
+ if (typeof rowId === "undefined") {
2211
+ throw new client.AppwriteException('Missing required parameter: "rowId"');
2212
+ }
2213
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{rowId}", rowId);
2214
+ const payload = {};
2215
+ if (typeof data !== "undefined") {
2216
+ payload["data"] = data;
2217
+ }
2218
+ if (typeof permissions !== "undefined") {
2219
+ payload["permissions"] = permissions;
2220
+ }
2221
+ const uri = new URL(this.client.config.endpoint + apiPath);
2222
+ const apiHeaders = {
2223
+ "content-type": "application/json"
2224
+ };
2225
+ return this.client.call(
2226
+ "patch",
2227
+ uri,
2228
+ apiHeaders,
2229
+ payload
2230
+ );
2231
+ }
2232
+ deleteRow(paramsOrFirst, ...rest) {
2233
+ let params;
2234
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
2235
+ params = paramsOrFirst || {};
2236
+ } else {
2237
+ params = {
2238
+ databaseId: paramsOrFirst,
2239
+ tableId: rest[0],
2240
+ rowId: rest[1]
2241
+ };
2242
+ }
2243
+ const databaseId = params.databaseId;
2244
+ const tableId = params.tableId;
2245
+ const rowId = params.rowId;
2246
+ if (typeof databaseId === "undefined") {
2247
+ throw new client.AppwriteException('Missing required parameter: "databaseId"');
2248
+ }
2249
+ if (typeof tableId === "undefined") {
2250
+ throw new client.AppwriteException('Missing required parameter: "tableId"');
2251
+ }
2252
+ if (typeof rowId === "undefined") {
2253
+ throw new client.AppwriteException('Missing required parameter: "rowId"');
2254
+ }
2255
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{rowId}", rowId);
2256
+ const payload = {};
2257
+ const uri = new URL(this.client.config.endpoint + apiPath);
2258
+ const apiHeaders = {
2259
+ "content-type": "application/json"
2260
+ };
2261
+ return this.client.call(
2262
+ "delete",
2263
+ uri,
2264
+ apiHeaders,
2265
+ payload
2266
+ );
2267
+ }
2268
+ decrementRowColumn(paramsOrFirst, ...rest) {
2269
+ let params;
2270
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
2271
+ params = paramsOrFirst || {};
2272
+ } else {
2273
+ params = {
2274
+ databaseId: paramsOrFirst,
2275
+ tableId: rest[0],
2276
+ rowId: rest[1],
2277
+ column: rest[2],
2278
+ value: rest[3],
2279
+ min: rest[4]
2280
+ };
2281
+ }
2282
+ const databaseId = params.databaseId;
2283
+ const tableId = params.tableId;
2284
+ const rowId = params.rowId;
2285
+ const column = params.column;
2286
+ const value = params.value;
2287
+ const min = params.min;
2288
+ if (typeof databaseId === "undefined") {
2289
+ throw new client.AppwriteException('Missing required parameter: "databaseId"');
2290
+ }
2291
+ if (typeof tableId === "undefined") {
2292
+ throw new client.AppwriteException('Missing required parameter: "tableId"');
2293
+ }
2294
+ if (typeof rowId === "undefined") {
2295
+ throw new client.AppwriteException('Missing required parameter: "rowId"');
2296
+ }
2297
+ if (typeof column === "undefined") {
2298
+ throw new client.AppwriteException('Missing required parameter: "column"');
2299
+ }
2300
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/decrement".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{rowId}", rowId).replace("{column}", column);
2301
+ const payload = {};
2302
+ if (typeof value !== "undefined") {
2303
+ payload["value"] = value;
2304
+ }
2305
+ if (typeof min !== "undefined") {
2306
+ payload["min"] = min;
2307
+ }
2308
+ const uri = new URL(this.client.config.endpoint + apiPath);
2309
+ const apiHeaders = {
2310
+ "content-type": "application/json"
2311
+ };
2312
+ return this.client.call(
2313
+ "patch",
2314
+ uri,
2315
+ apiHeaders,
2316
+ payload
2317
+ );
2318
+ }
2319
+ incrementRowColumn(paramsOrFirst, ...rest) {
2320
+ let params;
2321
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
2322
+ params = paramsOrFirst || {};
2323
+ } else {
2324
+ params = {
2325
+ databaseId: paramsOrFirst,
2326
+ tableId: rest[0],
2327
+ rowId: rest[1],
2328
+ column: rest[2],
2329
+ value: rest[3],
2330
+ max: rest[4]
2331
+ };
2332
+ }
2333
+ const databaseId = params.databaseId;
2334
+ const tableId = params.tableId;
2335
+ const rowId = params.rowId;
2336
+ const column = params.column;
2337
+ const value = params.value;
2338
+ const max = params.max;
2339
+ if (typeof databaseId === "undefined") {
2340
+ throw new client.AppwriteException('Missing required parameter: "databaseId"');
2341
+ }
2342
+ if (typeof tableId === "undefined") {
2343
+ throw new client.AppwriteException('Missing required parameter: "tableId"');
2344
+ }
2345
+ if (typeof rowId === "undefined") {
2346
+ throw new client.AppwriteException('Missing required parameter: "rowId"');
2347
+ }
2348
+ if (typeof column === "undefined") {
2349
+ throw new client.AppwriteException('Missing required parameter: "column"');
2350
+ }
2351
+ const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/increment".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{rowId}", rowId).replace("{column}", column);
2352
+ const payload = {};
2353
+ if (typeof value !== "undefined") {
2354
+ payload["value"] = value;
2355
+ }
2356
+ if (typeof max !== "undefined") {
2357
+ payload["max"] = max;
2358
+ }
2359
+ const uri = new URL(this.client.config.endpoint + apiPath);
2360
+ const apiHeaders = {
2361
+ "content-type": "application/json"
2362
+ };
2363
+ return this.client.call(
2364
+ "patch",
2365
+ uri,
2366
+ apiHeaders,
2367
+ payload
2368
+ );
2369
+ }
2370
+ }
2371
+
2372
+ exports.TablesDB = TablesDB;
2373
+ //# sourceMappingURL=out.js.map
2374
+ //# sourceMappingURL=tables-db.js.map