@appwrite.io/console 2.1.2 → 2.2.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 (137) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +1 -1
  3. package/dist/cjs/sdk.js +2099 -520
  4. package/dist/cjs/sdk.js.map +1 -1
  5. package/dist/esm/sdk.js +2098 -521
  6. package/dist/esm/sdk.js.map +1 -1
  7. package/dist/iife/sdk.js +2003 -444
  8. package/docs/examples/account/create-key.md +15 -0
  9. package/docs/examples/account/delete-key.md +13 -0
  10. package/docs/examples/account/get-key.md +13 -0
  11. package/docs/examples/account/list-keys.md +13 -0
  12. package/docs/examples/account/update-key.md +16 -0
  13. package/docs/examples/avatars/get-screenshot.md +5 -5
  14. package/docs/examples/backups/create-archive.md +2 -2
  15. package/docs/examples/backups/create-policy.md +2 -2
  16. package/docs/examples/backups/create-restoration.md +2 -2
  17. package/docs/examples/console/{get-regions.md → list-regions.md} +1 -3
  18. package/docs/examples/databases/create-index.md +2 -2
  19. package/docs/examples/databases/create-longtext-attribute.md +18 -0
  20. package/docs/examples/databases/create-mediumtext-attribute.md +18 -0
  21. package/docs/examples/databases/create-text-attribute.md +18 -0
  22. package/docs/examples/databases/create-varchar-attribute.md +19 -0
  23. package/docs/examples/databases/update-collection.md +1 -1
  24. package/docs/examples/databases/update-longtext-attribute.md +18 -0
  25. package/docs/examples/databases/update-mediumtext-attribute.md +18 -0
  26. package/docs/examples/databases/update-text-attribute.md +18 -0
  27. package/docs/examples/databases/update-varchar-attribute.md +19 -0
  28. package/docs/examples/databases/update.md +1 -1
  29. package/docs/examples/functions/create.md +2 -2
  30. package/docs/examples/functions/list-templates.md +3 -3
  31. package/docs/examples/functions/update.md +2 -2
  32. package/docs/examples/migrations/create-appwrite-migration.md +2 -2
  33. package/docs/examples/migrations/create-firebase-migration.md +2 -2
  34. package/docs/examples/migrations/create-n-host-migration.md +2 -2
  35. package/docs/examples/migrations/create-supabase-migration.md +2 -2
  36. package/docs/examples/migrations/get-appwrite-report.md +2 -2
  37. package/docs/examples/migrations/get-firebase-report.md +2 -2
  38. package/docs/examples/migrations/get-n-host-report.md +2 -2
  39. package/docs/examples/migrations/get-supabase-report.md +2 -2
  40. package/docs/examples/organizations/create-key.md +16 -0
  41. package/docs/examples/organizations/create.md +2 -2
  42. package/docs/examples/organizations/delete-key.md +14 -0
  43. package/docs/examples/organizations/estimation-create-organization.md +2 -2
  44. package/docs/examples/organizations/estimation-update-plan.md +2 -2
  45. package/docs/examples/organizations/get-key.md +14 -0
  46. package/docs/examples/organizations/list-keys.md +14 -0
  47. package/docs/examples/organizations/list-regions.md +13 -0
  48. package/docs/examples/organizations/update-key.md +17 -0
  49. package/docs/examples/organizations/update-plan.md +2 -2
  50. package/docs/examples/projects/create-jwt.md +2 -2
  51. package/docs/examples/projects/create-key.md +2 -2
  52. package/docs/examples/projects/update-key.md +2 -2
  53. package/docs/examples/sites/list-templates.md +3 -3
  54. package/docs/examples/tablesdb/create-index.md +2 -2
  55. package/docs/examples/tablesdb/create-longtext-column.md +18 -0
  56. package/docs/examples/tablesdb/create-mediumtext-column.md +18 -0
  57. package/docs/examples/tablesdb/create-text-column.md +18 -0
  58. package/docs/examples/tablesdb/create-varchar-column.md +19 -0
  59. package/docs/examples/tablesdb/update-longtext-column.md +18 -0
  60. package/docs/examples/tablesdb/update-mediumtext-column.md +18 -0
  61. package/docs/examples/tablesdb/update-table.md +1 -1
  62. package/docs/examples/tablesdb/update-text-column.md +18 -0
  63. package/docs/examples/tablesdb/update-varchar-column.md +19 -0
  64. package/docs/examples/tablesdb/update.md +1 -1
  65. package/docs/examples/teams/create-membership.md +2 -2
  66. package/docs/examples/teams/update-membership.md +2 -2
  67. package/package.json +3 -2
  68. package/src/channel.ts +138 -0
  69. package/src/client.ts +54 -9
  70. package/src/enums/browser-permission.ts +22 -0
  71. package/src/enums/deployment-status.ts +1 -0
  72. package/src/enums/frameworks.ts +17 -0
  73. package/src/enums/order-by.ts +4 -0
  74. package/src/enums/resources.ts +13 -0
  75. package/src/enums/roles.ts +7 -0
  76. package/src/enums/runtimes.ts +66 -0
  77. package/src/enums/scopes.ts +65 -0
  78. package/src/enums/services.ts +5 -0
  79. package/src/enums/use-cases.ts +11 -0
  80. package/src/index.ts +10 -1
  81. package/src/models.ts +349 -1
  82. package/src/query.ts +42 -0
  83. package/src/services/account.ts +364 -56
  84. package/src/services/assistant.ts +1 -1
  85. package/src/services/avatars.ts +17 -16
  86. package/src/services/backups.ts +37 -36
  87. package/src/services/console.ts +11 -42
  88. package/src/services/databases.ts +1060 -280
  89. package/src/services/domains.ts +44 -44
  90. package/src/services/functions.ts +60 -57
  91. package/src/services/graphql.ts +2 -2
  92. package/src/services/health.ts +22 -20
  93. package/src/services/messaging.ts +56 -56
  94. package/src/services/migrations.ts +79 -78
  95. package/src/services/organizations.ts +466 -70
  96. package/src/services/project.ts +5 -5
  97. package/src/services/projects.ts +86 -85
  98. package/src/services/proxy.ts +8 -8
  99. package/src/services/realtime.ts +35 -12
  100. package/src/services/sites.ts +42 -40
  101. package/src/services/storage.ts +16 -16
  102. package/src/services/tables-db.ts +1050 -268
  103. package/src/services/teams.ts +31 -30
  104. package/src/services/tokens.ts +5 -5
  105. package/src/services/users.ts +49 -49
  106. package/src/services/vcs.ts +10 -10
  107. package/types/channel.d.ts +72 -0
  108. package/types/client.d.ts +11 -3
  109. package/types/enums/browser-permission.d.ts +22 -0
  110. package/types/enums/deployment-status.d.ts +1 -0
  111. package/types/enums/frameworks.d.ts +17 -0
  112. package/types/enums/order-by.d.ts +4 -0
  113. package/types/enums/resources.d.ts +13 -0
  114. package/types/enums/roles.d.ts +7 -0
  115. package/types/enums/runtimes.d.ts +66 -0
  116. package/types/enums/scopes.d.ts +65 -0
  117. package/types/enums/services.d.ts +5 -0
  118. package/types/enums/use-cases.d.ts +11 -0
  119. package/types/index.d.ts +10 -1
  120. package/types/models.d.ts +341 -1
  121. package/types/query.d.ts +30 -0
  122. package/types/services/account.d.ts +111 -0
  123. package/types/services/avatars.d.ts +5 -4
  124. package/types/services/backups.d.ts +13 -12
  125. package/types/services/console.d.ts +1 -13
  126. package/types/services/databases.d.ts +303 -8
  127. package/types/services/functions.d.ts +18 -15
  128. package/types/services/health.d.ts +2 -0
  129. package/types/services/migrations.d.ts +33 -32
  130. package/types/services/organizations.d.ts +161 -17
  131. package/types/services/projects.d.ts +13 -12
  132. package/types/services/realtime.d.ts +17 -8
  133. package/types/services/sites.d.ts +9 -7
  134. package/types/services/tables-db.d.ts +305 -8
  135. package/types/services/teams.d.ts +9 -8
  136. package/src/enums/billing-plan.ts +0 -17
  137. package/types/enums/billing-plan.d.ts +0 -17
package/dist/iife/sdk.js CHANGED
@@ -44,10 +44,10 @@
44
44
  (function (globalObject) {
45
45
 
46
46
  /*
47
- * bignumber.js v9.3.1
47
+ * bignumber.js v9.0.0
48
48
  * A JavaScript library for arbitrary-precision arithmetic.
49
49
  * https://github.com/MikeMcl/bignumber.js
50
- * Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
50
+ * Copyright (c) 2019 Michael Mclaughlin <M8ch88l@gmail.com>
51
51
  * MIT Licensed.
52
52
  *
53
53
  * BigNumber.prototype methods | BigNumber methods
@@ -187,7 +187,7 @@
187
187
 
188
188
  // The maximum number of significant digits of the result of the exponentiatedBy operation.
189
189
  // If POW_PRECISION is 0, there will be unlimited significant digits.
190
- POW_PRECISION = 0, // 0 to MAX
190
+ POW_PRECISION = 0, // 0 to MAX
191
191
 
192
192
  // The format specification used by the BigNumber.prototype.toFormat method.
193
193
  FORMAT = {
@@ -197,15 +197,14 @@
197
197
  groupSeparator: ',',
198
198
  decimalSeparator: '.',
199
199
  fractionGroupSize: 0,
200
- fractionGroupSeparator: '\xA0', // non-breaking space
200
+ fractionGroupSeparator: '\xA0', // non-breaking space
201
201
  suffix: ''
202
202
  },
203
203
 
204
204
  // The alphabet used for base conversion. It must be at least 2 characters long, with no '+',
205
205
  // '-', '.', whitespace, or repeated character.
206
206
  // '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_'
207
- ALPHABET = '0123456789abcdefghijklmnopqrstuvwxyz',
208
- alphabetHasNormalDecimalDigits = true;
207
+ ALPHABET = '0123456789abcdefghijklmnopqrstuvwxyz';
209
208
 
210
209
 
211
210
  //------------------------------------------------------------------------------------------
@@ -295,7 +294,7 @@
295
294
 
296
295
  // Allow exponential notation to be used with base 10 argument, while
297
296
  // also rounding to DECIMAL_PLACES as with other bases.
298
- if (b == 10 && alphabetHasNormalDecimalDigits) {
297
+ if (b == 10) {
299
298
  x = new BigNumber(v);
300
299
  return round(x, DECIMAL_PLACES + x.e + 1, ROUNDING_MODE);
301
300
  }
@@ -584,10 +583,9 @@
584
583
  if (obj.hasOwnProperty(p = 'ALPHABET')) {
585
584
  v = obj[p];
586
585
 
587
- // Disallow if less than two characters,
586
+ // Disallow if only one character,
588
587
  // or if it contains '+', '-', '.', whitespace, or a repeated character.
589
- if (typeof v == 'string' && !/^.?$|[+\-.\s]|(.).*\1/.test(v)) {
590
- alphabetHasNormalDecimalDigits = v.slice(0, 10) == '0123456789';
588
+ if (typeof v == 'string' && !/^.$|[+-.\s]|(.).*\1/.test(v)) {
591
589
  ALPHABET = v;
592
590
  } else {
593
591
  throw Error
@@ -679,7 +677,7 @@
679
677
  * arguments {number|string|BigNumber}
680
678
  */
681
679
  BigNumber.maximum = BigNumber.max = function () {
682
- return maxOrMin(arguments, -1);
680
+ return maxOrMin(arguments, P.lt);
683
681
  };
684
682
 
685
683
 
@@ -689,7 +687,7 @@
689
687
  * arguments {number|string|BigNumber}
690
688
  */
691
689
  BigNumber.minimum = BigNumber.min = function () {
692
- return maxOrMin(arguments, 1);
690
+ return maxOrMin(arguments, P.gt);
693
691
  };
694
692
 
695
693
 
@@ -948,7 +946,7 @@
948
946
 
949
947
  // xc now represents str converted to baseOut.
950
948
 
951
- // The index of the rounding digit.
949
+ // THe index of the rounding digit.
952
950
  d = e + dp + 1;
953
951
 
954
952
  // The rounding digit: the digit to the right of the digit that may be rounded up.
@@ -1312,7 +1310,7 @@
1312
1310
 
1313
1311
  // Fixed-point notation.
1314
1312
  } else {
1315
- i -= ne + (id === 2 && e > ne);
1313
+ i -= ne;
1316
1314
  str = toFixedPoint(str, e, '0');
1317
1315
 
1318
1316
  // Append zeros?
@@ -1333,20 +1331,24 @@
1333
1331
 
1334
1332
 
1335
1333
  // Handle BigNumber.max and BigNumber.min.
1336
- // If any number is NaN, return NaN.
1337
- function maxOrMin(args, n) {
1338
- var k, y,
1334
+ function maxOrMin(args, method) {
1335
+ var n,
1339
1336
  i = 1,
1340
- x = new BigNumber(args[0]);
1337
+ m = new BigNumber(args[0]);
1341
1338
 
1342
1339
  for (; i < args.length; i++) {
1343
- y = new BigNumber(args[i]);
1344
- if (!y.s || (k = compare(x, y)) === n || k === 0 && x.s === n) {
1345
- x = y;
1340
+ n = new BigNumber(args[i]);
1341
+
1342
+ // If any number is NaN, return NaN.
1343
+ if (!n.s) {
1344
+ m = n;
1345
+ break;
1346
+ } else if (method.call(m, n)) {
1347
+ m = n;
1346
1348
  }
1347
1349
  }
1348
1350
 
1349
- return x;
1351
+ return m;
1350
1352
  }
1351
1353
 
1352
1354
 
@@ -1465,7 +1467,7 @@
1465
1467
  n = xc[ni = 0];
1466
1468
 
1467
1469
  // Get the rounding digit at index j of n.
1468
- rd = mathfloor(n / pows10[d - j - 1] % 10);
1470
+ rd = n / pows10[d - j - 1] % 10 | 0;
1469
1471
  } else {
1470
1472
  ni = mathceil((i + 1) / LOG_BASE);
1471
1473
 
@@ -1496,7 +1498,7 @@
1496
1498
  j = i - LOG_BASE + d;
1497
1499
 
1498
1500
  // Get the rounding digit at index j of n.
1499
- rd = j < 0 ? 0 : mathfloor(n / pows10[d - j - 1] % 10);
1501
+ rd = j < 0 ? 0 : n / pows10[d - j - 1] % 10 | 0;
1500
1502
  }
1501
1503
  }
1502
1504
 
@@ -1744,7 +1746,7 @@
1744
1746
 
1745
1747
  // The sign of the result of pow when x is negative depends on the evenness of n.
1746
1748
  // If +n overflows to ±Infinity, the evenness of n would be not be known.
1747
- y = new BigNumber(Math.pow(+valueOf(x), nIsBig ? n.s * (2 - isOdd(n)) : +valueOf(n)));
1749
+ y = new BigNumber(Math.pow(+valueOf(x), nIsBig ? 2 - isOdd(n) : +valueOf(n)));
1748
1750
  return m ? y.mod(m) : y;
1749
1751
  }
1750
1752
 
@@ -2045,12 +2047,7 @@
2045
2047
  }
2046
2048
 
2047
2049
  // x < y? Point xc to the array of the bigger number.
2048
- if (xLTy) {
2049
- t = xc;
2050
- xc = yc;
2051
- yc = t;
2052
- y.s = -y.s;
2053
- }
2050
+ if (xLTy) t = xc, xc = yc, yc = t, y.s = -y.s;
2054
2051
 
2055
2052
  b = (j = yc.length) - (i = xc.length);
2056
2053
 
@@ -2204,14 +2201,7 @@
2204
2201
  ycL = yc.length;
2205
2202
 
2206
2203
  // Ensure xc points to longer array and xcL to its length.
2207
- if (xcL < ycL) {
2208
- zc = xc;
2209
- xc = yc;
2210
- yc = zc;
2211
- i = xcL;
2212
- xcL = ycL;
2213
- ycL = i;
2214
- }
2204
+ if (xcL < ycL) zc = xc, xc = yc, yc = zc, i = xcL, xcL = ycL, ycL = i;
2215
2205
 
2216
2206
  // Initialise the result array with zeros.
2217
2207
  for (i = xcL + ycL, zc = []; i--; zc.push(0));
@@ -2332,12 +2322,7 @@
2332
2322
  b = yc.length;
2333
2323
 
2334
2324
  // Point xc to the longer array, and b to the shorter length.
2335
- if (a - b < 0) {
2336
- t = yc;
2337
- yc = xc;
2338
- xc = t;
2339
- b = a;
2340
- }
2325
+ if (a - b < 0) t = yc, yc = xc, xc = t, b = a;
2341
2326
 
2342
2327
  // Only start adding at yc.length - 1 as the further digits of xc can be ignored.
2343
2328
  for (a = 0; b;) {
@@ -2453,7 +2438,7 @@
2453
2438
  e = bitFloor((e + 1) / 2) - (e < 0 || e % 2);
2454
2439
 
2455
2440
  if (s == 1 / 0) {
2456
- n = '5e' + e;
2441
+ n = '1e' + e;
2457
2442
  } else {
2458
2443
  n = s.toExponential();
2459
2444
  n = n.slice(0, n.indexOf('e') + 1) + e;
@@ -2623,12 +2608,7 @@
2623
2608
  intDigits = isNeg ? intPart.slice(1) : intPart,
2624
2609
  len = intDigits.length;
2625
2610
 
2626
- if (g2) {
2627
- i = g1;
2628
- g1 = g2;
2629
- g2 = i;
2630
- len -= i;
2631
- }
2611
+ if (g2) i = g1, g1 = g2, g2 = i, len -= i;
2632
2612
 
2633
2613
  if (g1 > 0 && len > 0) {
2634
2614
  i = len % g1 || g1;
@@ -2780,7 +2760,7 @@
2780
2760
  str = e <= TO_EXP_NEG || e >= TO_EXP_POS
2781
2761
  ? toExponential(coeffToString(n.c), e)
2782
2762
  : toFixedPoint(coeffToString(n.c), e, '0');
2783
- } else if (b === 10 && alphabetHasNormalDecimalDigits) {
2763
+ } else if (b === 10) {
2784
2764
  n = round(new BigNumber(n), DECIMAL_PLACES + e + 1, ROUNDING_MODE);
2785
2765
  str = toFixedPoint(coeffToString(n.c), n.e, '0');
2786
2766
  } else {
@@ -2960,6 +2940,8 @@
2960
2940
  })(commonjsGlobal);
2961
2941
  } (bignumber));
2962
2942
 
2943
+ var BigNumber$1 = bignumber.exports;
2944
+
2963
2945
  (function (module) {
2964
2946
  var BigNumber = bignumber.exports;
2965
2947
 
@@ -3848,6 +3830,14 @@
3848
3830
  * @returns {string}
3849
3831
  */
3850
3832
  Query.notEqual = (attribute, value) => new Query("notEqual", attribute, value).toString();
3833
+ /**
3834
+ * Filter resources where attribute matches a regular expression pattern.
3835
+ *
3836
+ * @param {string} attribute The attribute to filter on.
3837
+ * @param {string} pattern The regular expression pattern to match.
3838
+ * @returns {string}
3839
+ */
3840
+ Query.regex = (attribute, pattern) => new Query("regex", attribute, pattern).toString();
3851
3841
  /**
3852
3842
  * Filter resources where attribute is less than value.
3853
3843
  *
@@ -3894,6 +3884,20 @@
3894
3884
  * @returns {string}
3895
3885
  */
3896
3886
  Query.isNotNull = (attribute) => new Query("isNotNull", attribute).toString();
3887
+ /**
3888
+ * Filter resources where the specified attributes exist.
3889
+ *
3890
+ * @param {string[]} attributes The list of attributes that must exist.
3891
+ * @returns {string}
3892
+ */
3893
+ Query.exists = (attributes) => new Query("exists", undefined, attributes).toString();
3894
+ /**
3895
+ * Filter resources where the specified attributes do not exist.
3896
+ *
3897
+ * @param {string[]} attributes The list of attributes that must not exist.
3898
+ * @returns {string}
3899
+ */
3900
+ Query.notExists = (attributes) => new Query("notExists", undefined, attributes).toString();
3897
3901
  /**
3898
3902
  * Filter resources where attribute is between start and end (inclusive).
3899
3903
  *
@@ -4091,6 +4095,14 @@
4091
4095
  * @returns {string}
4092
4096
  */
4093
4097
  Query.and = (queries) => new Query("and", undefined, queries.map((query) => JSONbig$1.parse(query))).toString();
4098
+ /**
4099
+ * Filter array elements where at least one element matches all the specified queries.
4100
+ *
4101
+ * @param {string} attribute The attribute containing the array to filter on.
4102
+ * @param {string[]} queries The list of query strings to match against array elements.
4103
+ * @returns {string}
4104
+ */
4105
+ Query.elemMatch = (attribute, queries) => new Query("elemMatch", attribute, queries.map((query) => JSONbig$1.parse(query))).toString();
4094
4106
  /**
4095
4107
  * Filter resources where attribute is at a specific distance from the given coordinates.
4096
4108
  *
@@ -4196,7 +4208,28 @@
4196
4208
  */
4197
4209
  Query.notTouches = (attribute, values) => new Query("notTouches", attribute, [values]).toString();
4198
4210
 
4199
- const JSONbig = jsonBigint.exports({ useNativeBigInt: true });
4211
+ const JSONbigParser = jsonBigint.exports({ storeAsString: false });
4212
+ const JSONbigSerializer = jsonBigint.exports({ useNativeBigInt: true });
4213
+ const MAX_SAFE = BigInt(Number.MAX_SAFE_INTEGER);
4214
+ const MIN_SAFE = BigInt(Number.MIN_SAFE_INTEGER);
4215
+ function reviver(_key, value) {
4216
+ if (BigNumber$1.isBigNumber(value)) {
4217
+ if (value.isInteger()) {
4218
+ const str = value.toFixed();
4219
+ const bi = BigInt(str);
4220
+ if (bi >= MIN_SAFE && bi <= MAX_SAFE) {
4221
+ return Number(str);
4222
+ }
4223
+ return bi;
4224
+ }
4225
+ return value.toNumber();
4226
+ }
4227
+ return value;
4228
+ }
4229
+ const JSONbig = {
4230
+ parse: (text) => JSONbigParser.parse(text, reviver),
4231
+ stringify: JSONbigSerializer.stringify
4232
+ };
4200
4233
  /**
4201
4234
  * Exception thrown by the package
4202
4235
  */
@@ -4246,7 +4279,7 @@
4246
4279
  'x-sdk-name': 'Console',
4247
4280
  'x-sdk-platform': 'console',
4248
4281
  'x-sdk-language': 'web',
4249
- 'x-sdk-version': '2.1.2',
4282
+ 'x-sdk-version': '2.2.0',
4250
4283
  'X-Appwrite-Response-Format': '1.8.0',
4251
4284
  };
4252
4285
  this.realtime = {
@@ -4548,8 +4581,8 @@
4548
4581
  * @deprecated Use the Realtime service instead.
4549
4582
  * @see Realtime
4550
4583
  *
4551
- * @param {string|string[]} channels
4552
- * Channel to subscribe - pass a single channel as a string or multiple with an array of strings.
4584
+ * @param {string|string[]|Channel<any>|ActionableChannel|ResolvedChannel|(Channel<any>|ActionableChannel|ResolvedChannel)[]} channels
4585
+ * Channel to subscribe - pass a single channel as a string or Channel builder instance, or multiple with an array.
4553
4586
  *
4554
4587
  * Possible channels are:
4555
4588
  * - account
@@ -4567,21 +4600,40 @@
4567
4600
  * - teams.[ID]
4568
4601
  * - memberships
4569
4602
  * - memberships.[ID]
4603
+ *
4604
+ * You can also use Channel builders:
4605
+ * - Channel.database('db').collection('col').document('doc').create()
4606
+ * - Channel.bucket('bucket').file('file').update()
4607
+ * - Channel.function('func').execution('exec').delete()
4608
+ * - Channel.team('team').create()
4609
+ * - Channel.membership('membership').update()
4570
4610
  * @param {(payload: RealtimeMessage) => void} callback Is called on every realtime update.
4571
4611
  * @returns {() => void} Unsubscribes from events.
4572
4612
  */
4573
4613
  subscribe(channels, callback) {
4574
- let channelArray = typeof channels === 'string' ? [channels] : channels;
4575
- channelArray.forEach(channel => this.realtime.channels.add(channel));
4614
+ const channelArray = Array.isArray(channels) ? channels : [channels];
4615
+ // Convert Channel instances to strings
4616
+ const channelStrings = channelArray.map(ch => {
4617
+ if (typeof ch === 'string') {
4618
+ return ch;
4619
+ }
4620
+ // All Channel instances have toString() method
4621
+ if (ch && typeof ch.toString === 'function') {
4622
+ return ch.toString();
4623
+ }
4624
+ // Fallback to generic string conversion
4625
+ return String(ch);
4626
+ });
4627
+ channelStrings.forEach(channel => this.realtime.channels.add(channel));
4576
4628
  const counter = this.realtime.subscriptionsCounter++;
4577
4629
  this.realtime.subscriptions.set(counter, {
4578
- channels: channelArray,
4630
+ channels: channelStrings,
4579
4631
  callback
4580
4632
  });
4581
4633
  this.realtime.connect();
4582
4634
  return () => {
4583
4635
  this.realtime.subscriptions.delete(counter);
4584
- this.realtime.cleanUp(channelArray);
4636
+ this.realtime.cleanUp(channelStrings);
4585
4637
  this.realtime.connect();
4586
4638
  };
4587
4639
  }
@@ -5158,6 +5210,149 @@
5158
5210
  };
5159
5211
  return this.client.call('post', uri, apiHeaders, payload);
5160
5212
  }
5213
+ listKeys(paramsOrFirst) {
5214
+ let params;
5215
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
5216
+ params = (paramsOrFirst || {});
5217
+ }
5218
+ else {
5219
+ params = {
5220
+ total: paramsOrFirst
5221
+ };
5222
+ }
5223
+ const total = params.total;
5224
+ const apiPath = '/account/keys';
5225
+ const payload = {};
5226
+ if (typeof total !== 'undefined') {
5227
+ payload['total'] = total;
5228
+ }
5229
+ const uri = new URL(this.client.config.endpoint + apiPath);
5230
+ const apiHeaders = {};
5231
+ return this.client.call('get', uri, apiHeaders, payload);
5232
+ }
5233
+ createKey(paramsOrFirst, ...rest) {
5234
+ let params;
5235
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
5236
+ params = (paramsOrFirst || {});
5237
+ }
5238
+ else {
5239
+ params = {
5240
+ name: paramsOrFirst,
5241
+ scopes: rest[0],
5242
+ expire: rest[1]
5243
+ };
5244
+ }
5245
+ const name = params.name;
5246
+ const scopes = params.scopes;
5247
+ const expire = params.expire;
5248
+ if (typeof name === 'undefined') {
5249
+ throw new AppwriteException('Missing required parameter: "name"');
5250
+ }
5251
+ if (typeof scopes === 'undefined') {
5252
+ throw new AppwriteException('Missing required parameter: "scopes"');
5253
+ }
5254
+ const apiPath = '/account/keys';
5255
+ const payload = {};
5256
+ if (typeof name !== 'undefined') {
5257
+ payload['name'] = name;
5258
+ }
5259
+ if (typeof scopes !== 'undefined') {
5260
+ payload['scopes'] = scopes;
5261
+ }
5262
+ if (typeof expire !== 'undefined') {
5263
+ payload['expire'] = expire;
5264
+ }
5265
+ const uri = new URL(this.client.config.endpoint + apiPath);
5266
+ const apiHeaders = {
5267
+ 'content-type': 'application/json',
5268
+ };
5269
+ return this.client.call('post', uri, apiHeaders, payload);
5270
+ }
5271
+ getKey(paramsOrFirst) {
5272
+ let params;
5273
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
5274
+ params = (paramsOrFirst || {});
5275
+ }
5276
+ else {
5277
+ params = {
5278
+ keyId: paramsOrFirst
5279
+ };
5280
+ }
5281
+ const keyId = params.keyId;
5282
+ if (typeof keyId === 'undefined') {
5283
+ throw new AppwriteException('Missing required parameter: "keyId"');
5284
+ }
5285
+ const apiPath = '/account/keys/{keyId}'.replace('{keyId}', keyId);
5286
+ const payload = {};
5287
+ const uri = new URL(this.client.config.endpoint + apiPath);
5288
+ const apiHeaders = {};
5289
+ return this.client.call('get', uri, apiHeaders, payload);
5290
+ }
5291
+ updateKey(paramsOrFirst, ...rest) {
5292
+ let params;
5293
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
5294
+ params = (paramsOrFirst || {});
5295
+ }
5296
+ else {
5297
+ params = {
5298
+ keyId: paramsOrFirst,
5299
+ name: rest[0],
5300
+ scopes: rest[1],
5301
+ expire: rest[2]
5302
+ };
5303
+ }
5304
+ const keyId = params.keyId;
5305
+ const name = params.name;
5306
+ const scopes = params.scopes;
5307
+ const expire = params.expire;
5308
+ if (typeof keyId === 'undefined') {
5309
+ throw new AppwriteException('Missing required parameter: "keyId"');
5310
+ }
5311
+ if (typeof name === 'undefined') {
5312
+ throw new AppwriteException('Missing required parameter: "name"');
5313
+ }
5314
+ if (typeof scopes === 'undefined') {
5315
+ throw new AppwriteException('Missing required parameter: "scopes"');
5316
+ }
5317
+ const apiPath = '/account/keys/{keyId}'.replace('{keyId}', keyId);
5318
+ const payload = {};
5319
+ if (typeof name !== 'undefined') {
5320
+ payload['name'] = name;
5321
+ }
5322
+ if (typeof scopes !== 'undefined') {
5323
+ payload['scopes'] = scopes;
5324
+ }
5325
+ if (typeof expire !== 'undefined') {
5326
+ payload['expire'] = expire;
5327
+ }
5328
+ const uri = new URL(this.client.config.endpoint + apiPath);
5329
+ const apiHeaders = {
5330
+ 'content-type': 'application/json',
5331
+ };
5332
+ return this.client.call('put', uri, apiHeaders, payload);
5333
+ }
5334
+ deleteKey(paramsOrFirst) {
5335
+ let params;
5336
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
5337
+ params = (paramsOrFirst || {});
5338
+ }
5339
+ else {
5340
+ params = {
5341
+ keyId: paramsOrFirst
5342
+ };
5343
+ }
5344
+ const keyId = params.keyId;
5345
+ if (typeof keyId === 'undefined') {
5346
+ throw new AppwriteException('Missing required parameter: "keyId"');
5347
+ }
5348
+ const apiPath = '/account/keys/{keyId}'.replace('{keyId}', keyId);
5349
+ const payload = {};
5350
+ const uri = new URL(this.client.config.endpoint + apiPath);
5351
+ const apiHeaders = {
5352
+ 'content-type': 'application/json',
5353
+ };
5354
+ return this.client.call('delete', uri, apiHeaders, payload);
5355
+ }
5161
5356
  listLogs(paramsOrFirst, ...rest) {
5162
5357
  let params;
5163
5358
  if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
@@ -7093,7 +7288,7 @@
7093
7288
  }
7094
7289
  createArchive(paramsOrFirst, ...rest) {
7095
7290
  let params;
7096
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
7291
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'services' in paramsOrFirst)) {
7097
7292
  params = (paramsOrFirst || {});
7098
7293
  }
7099
7294
  else {
@@ -7573,25 +7768,15 @@
7573
7768
  };
7574
7769
  return this.client.call('post', uri, apiHeaders, payload);
7575
7770
  }
7576
- getRegions(paramsOrFirst) {
7577
- let params;
7578
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
7579
- params = (paramsOrFirst || {});
7580
- }
7581
- else {
7582
- params = {
7583
- organizationId: paramsOrFirst
7584
- };
7585
- }
7586
- const organizationId = params.organizationId;
7587
- if (typeof organizationId === 'undefined') {
7588
- throw new AppwriteException('Missing required parameter: "organizationId"');
7589
- }
7771
+ /**
7772
+ * Get all available regions for the console.
7773
+ *
7774
+ * @throws {AppwriteException}
7775
+ * @returns {Promise<Models.ConsoleRegionList>}
7776
+ */
7777
+ listRegions() {
7590
7778
  const apiPath = '/console/regions';
7591
7779
  const payload = {};
7592
- if (typeof organizationId !== 'undefined') {
7593
- payload['organizationId'] = organizationId;
7594
- }
7595
7780
  const uri = new URL(this.client.config.endpoint + apiPath);
7596
7781
  const apiHeaders = {};
7597
7782
  return this.client.call('get', uri, apiHeaders, payload);
@@ -8044,9 +8229,6 @@
8044
8229
  if (typeof databaseId === 'undefined') {
8045
8230
  throw new AppwriteException('Missing required parameter: "databaseId"');
8046
8231
  }
8047
- if (typeof name === 'undefined') {
8048
- throw new AppwriteException('Missing required parameter: "name"');
8049
- }
8050
8232
  const apiPath = '/databases/{databaseId}'.replace('{databaseId}', databaseId);
8051
8233
  const payload = {};
8052
8234
  if (typeof name !== 'undefined') {
@@ -8233,9 +8415,6 @@
8233
8415
  if (typeof collectionId === 'undefined') {
8234
8416
  throw new AppwriteException('Missing required parameter: "collectionId"');
8235
8417
  }
8236
- if (typeof name === 'undefined') {
8237
- throw new AppwriteException('Missing required parameter: "name"');
8238
- }
8239
8418
  const apiPath = '/databases/{databaseId}/collections/{collectionId}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
8240
8419
  const payload = {};
8241
8420
  if (typeof name !== 'undefined') {
@@ -9214,7 +9393,7 @@
9214
9393
  };
9215
9394
  return this.client.call('patch', uri, apiHeaders, payload);
9216
9395
  }
9217
- createPointAttribute(paramsOrFirst, ...rest) {
9396
+ createLongtextAttribute(paramsOrFirst, ...rest) {
9218
9397
  let params;
9219
9398
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
9220
9399
  params = (paramsOrFirst || {});
@@ -9225,7 +9404,8 @@
9225
9404
  collectionId: rest[0],
9226
9405
  key: rest[1],
9227
9406
  required: rest[2],
9228
- xdefault: rest[3]
9407
+ xdefault: rest[3],
9408
+ array: rest[4]
9229
9409
  };
9230
9410
  }
9231
9411
  const databaseId = params.databaseId;
@@ -9233,6 +9413,7 @@
9233
9413
  const key = params.key;
9234
9414
  const required = params.required;
9235
9415
  const xdefault = params.xdefault;
9416
+ const array = params.array;
9236
9417
  if (typeof databaseId === 'undefined') {
9237
9418
  throw new AppwriteException('Missing required parameter: "databaseId"');
9238
9419
  }
@@ -9245,7 +9426,7 @@
9245
9426
  if (typeof required === 'undefined') {
9246
9427
  throw new AppwriteException('Missing required parameter: "required"');
9247
9428
  }
9248
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/point'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
9429
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/longtext'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
9249
9430
  const payload = {};
9250
9431
  if (typeof key !== 'undefined') {
9251
9432
  payload['key'] = key;
@@ -9256,13 +9437,16 @@
9256
9437
  if (typeof xdefault !== 'undefined') {
9257
9438
  payload['default'] = xdefault;
9258
9439
  }
9440
+ if (typeof array !== 'undefined') {
9441
+ payload['array'] = array;
9442
+ }
9259
9443
  const uri = new URL(this.client.config.endpoint + apiPath);
9260
9444
  const apiHeaders = {
9261
9445
  'content-type': 'application/json',
9262
9446
  };
9263
9447
  return this.client.call('post', uri, apiHeaders, payload);
9264
9448
  }
9265
- updatePointAttribute(paramsOrFirst, ...rest) {
9449
+ updateLongtextAttribute(paramsOrFirst, ...rest) {
9266
9450
  let params;
9267
9451
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
9268
9452
  params = (paramsOrFirst || {});
@@ -9295,7 +9479,10 @@
9295
9479
  if (typeof required === 'undefined') {
9296
9480
  throw new AppwriteException('Missing required parameter: "required"');
9297
9481
  }
9298
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/point/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
9482
+ if (typeof xdefault === 'undefined') {
9483
+ throw new AppwriteException('Missing required parameter: "xdefault"');
9484
+ }
9485
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/longtext/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
9299
9486
  const payload = {};
9300
9487
  if (typeof required !== 'undefined') {
9301
9488
  payload['required'] = required;
@@ -9312,7 +9499,7 @@
9312
9499
  };
9313
9500
  return this.client.call('patch', uri, apiHeaders, payload);
9314
9501
  }
9315
- createPolygonAttribute(paramsOrFirst, ...rest) {
9502
+ createMediumtextAttribute(paramsOrFirst, ...rest) {
9316
9503
  let params;
9317
9504
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
9318
9505
  params = (paramsOrFirst || {});
@@ -9323,7 +9510,8 @@
9323
9510
  collectionId: rest[0],
9324
9511
  key: rest[1],
9325
9512
  required: rest[2],
9326
- xdefault: rest[3]
9513
+ xdefault: rest[3],
9514
+ array: rest[4]
9327
9515
  };
9328
9516
  }
9329
9517
  const databaseId = params.databaseId;
@@ -9331,6 +9519,7 @@
9331
9519
  const key = params.key;
9332
9520
  const required = params.required;
9333
9521
  const xdefault = params.xdefault;
9522
+ const array = params.array;
9334
9523
  if (typeof databaseId === 'undefined') {
9335
9524
  throw new AppwriteException('Missing required parameter: "databaseId"');
9336
9525
  }
@@ -9343,7 +9532,7 @@
9343
9532
  if (typeof required === 'undefined') {
9344
9533
  throw new AppwriteException('Missing required parameter: "required"');
9345
9534
  }
9346
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/polygon'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
9535
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/mediumtext'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
9347
9536
  const payload = {};
9348
9537
  if (typeof key !== 'undefined') {
9349
9538
  payload['key'] = key;
@@ -9354,13 +9543,16 @@
9354
9543
  if (typeof xdefault !== 'undefined') {
9355
9544
  payload['default'] = xdefault;
9356
9545
  }
9546
+ if (typeof array !== 'undefined') {
9547
+ payload['array'] = array;
9548
+ }
9357
9549
  const uri = new URL(this.client.config.endpoint + apiPath);
9358
9550
  const apiHeaders = {
9359
9551
  'content-type': 'application/json',
9360
9552
  };
9361
9553
  return this.client.call('post', uri, apiHeaders, payload);
9362
9554
  }
9363
- updatePolygonAttribute(paramsOrFirst, ...rest) {
9555
+ updateMediumtextAttribute(paramsOrFirst, ...rest) {
9364
9556
  let params;
9365
9557
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
9366
9558
  params = (paramsOrFirst || {});
@@ -9393,7 +9585,10 @@
9393
9585
  if (typeof required === 'undefined') {
9394
9586
  throw new AppwriteException('Missing required parameter: "required"');
9395
9587
  }
9396
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/polygon/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
9588
+ if (typeof xdefault === 'undefined') {
9589
+ throw new AppwriteException('Missing required parameter: "xdefault"');
9590
+ }
9591
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/mediumtext/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
9397
9592
  const payload = {};
9398
9593
  if (typeof required !== 'undefined') {
9399
9594
  payload['required'] = required;
@@ -9410,7 +9605,7 @@
9410
9605
  };
9411
9606
  return this.client.call('patch', uri, apiHeaders, payload);
9412
9607
  }
9413
- createRelationshipAttribute(paramsOrFirst, ...rest) {
9608
+ createPointAttribute(paramsOrFirst, ...rest) {
9414
9609
  let params;
9415
9610
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
9416
9611
  params = (paramsOrFirst || {});
@@ -9419,50 +9614,246 @@
9419
9614
  params = {
9420
9615
  databaseId: paramsOrFirst,
9421
9616
  collectionId: rest[0],
9422
- relatedCollectionId: rest[1],
9423
- type: rest[2],
9424
- twoWay: rest[3],
9425
- key: rest[4],
9426
- twoWayKey: rest[5],
9427
- onDelete: rest[6]
9617
+ key: rest[1],
9618
+ required: rest[2],
9619
+ xdefault: rest[3]
9428
9620
  };
9429
9621
  }
9430
9622
  const databaseId = params.databaseId;
9431
9623
  const collectionId = params.collectionId;
9432
- const relatedCollectionId = params.relatedCollectionId;
9433
- const type = params.type;
9434
- const twoWay = params.twoWay;
9435
9624
  const key = params.key;
9436
- const twoWayKey = params.twoWayKey;
9437
- const onDelete = params.onDelete;
9625
+ const required = params.required;
9626
+ const xdefault = params.xdefault;
9438
9627
  if (typeof databaseId === 'undefined') {
9439
9628
  throw new AppwriteException('Missing required parameter: "databaseId"');
9440
9629
  }
9441
9630
  if (typeof collectionId === 'undefined') {
9442
9631
  throw new AppwriteException('Missing required parameter: "collectionId"');
9443
9632
  }
9444
- if (typeof relatedCollectionId === 'undefined') {
9445
- throw new AppwriteException('Missing required parameter: "relatedCollectionId"');
9633
+ if (typeof key === 'undefined') {
9634
+ throw new AppwriteException('Missing required parameter: "key"');
9446
9635
  }
9447
- if (typeof type === 'undefined') {
9448
- throw new AppwriteException('Missing required parameter: "type"');
9636
+ if (typeof required === 'undefined') {
9637
+ throw new AppwriteException('Missing required parameter: "required"');
9449
9638
  }
9450
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/relationship'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
9639
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/point'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
9451
9640
  const payload = {};
9452
- if (typeof relatedCollectionId !== 'undefined') {
9453
- payload['relatedCollectionId'] = relatedCollectionId;
9454
- }
9455
- if (typeof type !== 'undefined') {
9456
- payload['type'] = type;
9457
- }
9458
- if (typeof twoWay !== 'undefined') {
9459
- payload['twoWay'] = twoWay;
9460
- }
9461
9641
  if (typeof key !== 'undefined') {
9462
9642
  payload['key'] = key;
9463
9643
  }
9464
- if (typeof twoWayKey !== 'undefined') {
9465
- payload['twoWayKey'] = twoWayKey;
9644
+ if (typeof required !== 'undefined') {
9645
+ payload['required'] = required;
9646
+ }
9647
+ if (typeof xdefault !== 'undefined') {
9648
+ payload['default'] = xdefault;
9649
+ }
9650
+ const uri = new URL(this.client.config.endpoint + apiPath);
9651
+ const apiHeaders = {
9652
+ 'content-type': 'application/json',
9653
+ };
9654
+ return this.client.call('post', uri, apiHeaders, payload);
9655
+ }
9656
+ updatePointAttribute(paramsOrFirst, ...rest) {
9657
+ let params;
9658
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
9659
+ params = (paramsOrFirst || {});
9660
+ }
9661
+ else {
9662
+ params = {
9663
+ databaseId: paramsOrFirst,
9664
+ collectionId: rest[0],
9665
+ key: rest[1],
9666
+ required: rest[2],
9667
+ xdefault: rest[3],
9668
+ newKey: rest[4]
9669
+ };
9670
+ }
9671
+ const databaseId = params.databaseId;
9672
+ const collectionId = params.collectionId;
9673
+ const key = params.key;
9674
+ const required = params.required;
9675
+ const xdefault = params.xdefault;
9676
+ const newKey = params.newKey;
9677
+ if (typeof databaseId === 'undefined') {
9678
+ throw new AppwriteException('Missing required parameter: "databaseId"');
9679
+ }
9680
+ if (typeof collectionId === 'undefined') {
9681
+ throw new AppwriteException('Missing required parameter: "collectionId"');
9682
+ }
9683
+ if (typeof key === 'undefined') {
9684
+ throw new AppwriteException('Missing required parameter: "key"');
9685
+ }
9686
+ if (typeof required === 'undefined') {
9687
+ throw new AppwriteException('Missing required parameter: "required"');
9688
+ }
9689
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/point/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
9690
+ const payload = {};
9691
+ if (typeof required !== 'undefined') {
9692
+ payload['required'] = required;
9693
+ }
9694
+ if (typeof xdefault !== 'undefined') {
9695
+ payload['default'] = xdefault;
9696
+ }
9697
+ if (typeof newKey !== 'undefined') {
9698
+ payload['newKey'] = newKey;
9699
+ }
9700
+ const uri = new URL(this.client.config.endpoint + apiPath);
9701
+ const apiHeaders = {
9702
+ 'content-type': 'application/json',
9703
+ };
9704
+ return this.client.call('patch', uri, apiHeaders, payload);
9705
+ }
9706
+ createPolygonAttribute(paramsOrFirst, ...rest) {
9707
+ let params;
9708
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
9709
+ params = (paramsOrFirst || {});
9710
+ }
9711
+ else {
9712
+ params = {
9713
+ databaseId: paramsOrFirst,
9714
+ collectionId: rest[0],
9715
+ key: rest[1],
9716
+ required: rest[2],
9717
+ xdefault: rest[3]
9718
+ };
9719
+ }
9720
+ const databaseId = params.databaseId;
9721
+ const collectionId = params.collectionId;
9722
+ const key = params.key;
9723
+ const required = params.required;
9724
+ const xdefault = params.xdefault;
9725
+ if (typeof databaseId === 'undefined') {
9726
+ throw new AppwriteException('Missing required parameter: "databaseId"');
9727
+ }
9728
+ if (typeof collectionId === 'undefined') {
9729
+ throw new AppwriteException('Missing required parameter: "collectionId"');
9730
+ }
9731
+ if (typeof key === 'undefined') {
9732
+ throw new AppwriteException('Missing required parameter: "key"');
9733
+ }
9734
+ if (typeof required === 'undefined') {
9735
+ throw new AppwriteException('Missing required parameter: "required"');
9736
+ }
9737
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/polygon'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
9738
+ const payload = {};
9739
+ if (typeof key !== 'undefined') {
9740
+ payload['key'] = key;
9741
+ }
9742
+ if (typeof required !== 'undefined') {
9743
+ payload['required'] = required;
9744
+ }
9745
+ if (typeof xdefault !== 'undefined') {
9746
+ payload['default'] = xdefault;
9747
+ }
9748
+ const uri = new URL(this.client.config.endpoint + apiPath);
9749
+ const apiHeaders = {
9750
+ 'content-type': 'application/json',
9751
+ };
9752
+ return this.client.call('post', uri, apiHeaders, payload);
9753
+ }
9754
+ updatePolygonAttribute(paramsOrFirst, ...rest) {
9755
+ let params;
9756
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
9757
+ params = (paramsOrFirst || {});
9758
+ }
9759
+ else {
9760
+ params = {
9761
+ databaseId: paramsOrFirst,
9762
+ collectionId: rest[0],
9763
+ key: rest[1],
9764
+ required: rest[2],
9765
+ xdefault: rest[3],
9766
+ newKey: rest[4]
9767
+ };
9768
+ }
9769
+ const databaseId = params.databaseId;
9770
+ const collectionId = params.collectionId;
9771
+ const key = params.key;
9772
+ const required = params.required;
9773
+ const xdefault = params.xdefault;
9774
+ const newKey = params.newKey;
9775
+ if (typeof databaseId === 'undefined') {
9776
+ throw new AppwriteException('Missing required parameter: "databaseId"');
9777
+ }
9778
+ if (typeof collectionId === 'undefined') {
9779
+ throw new AppwriteException('Missing required parameter: "collectionId"');
9780
+ }
9781
+ if (typeof key === 'undefined') {
9782
+ throw new AppwriteException('Missing required parameter: "key"');
9783
+ }
9784
+ if (typeof required === 'undefined') {
9785
+ throw new AppwriteException('Missing required parameter: "required"');
9786
+ }
9787
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/polygon/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
9788
+ const payload = {};
9789
+ if (typeof required !== 'undefined') {
9790
+ payload['required'] = required;
9791
+ }
9792
+ if (typeof xdefault !== 'undefined') {
9793
+ payload['default'] = xdefault;
9794
+ }
9795
+ if (typeof newKey !== 'undefined') {
9796
+ payload['newKey'] = newKey;
9797
+ }
9798
+ const uri = new URL(this.client.config.endpoint + apiPath);
9799
+ const apiHeaders = {
9800
+ 'content-type': 'application/json',
9801
+ };
9802
+ return this.client.call('patch', uri, apiHeaders, payload);
9803
+ }
9804
+ createRelationshipAttribute(paramsOrFirst, ...rest) {
9805
+ let params;
9806
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
9807
+ params = (paramsOrFirst || {});
9808
+ }
9809
+ else {
9810
+ params = {
9811
+ databaseId: paramsOrFirst,
9812
+ collectionId: rest[0],
9813
+ relatedCollectionId: rest[1],
9814
+ type: rest[2],
9815
+ twoWay: rest[3],
9816
+ key: rest[4],
9817
+ twoWayKey: rest[5],
9818
+ onDelete: rest[6]
9819
+ };
9820
+ }
9821
+ const databaseId = params.databaseId;
9822
+ const collectionId = params.collectionId;
9823
+ const relatedCollectionId = params.relatedCollectionId;
9824
+ const type = params.type;
9825
+ const twoWay = params.twoWay;
9826
+ const key = params.key;
9827
+ const twoWayKey = params.twoWayKey;
9828
+ const onDelete = params.onDelete;
9829
+ if (typeof databaseId === 'undefined') {
9830
+ throw new AppwriteException('Missing required parameter: "databaseId"');
9831
+ }
9832
+ if (typeof collectionId === 'undefined') {
9833
+ throw new AppwriteException('Missing required parameter: "collectionId"');
9834
+ }
9835
+ if (typeof relatedCollectionId === 'undefined') {
9836
+ throw new AppwriteException('Missing required parameter: "relatedCollectionId"');
9837
+ }
9838
+ if (typeof type === 'undefined') {
9839
+ throw new AppwriteException('Missing required parameter: "type"');
9840
+ }
9841
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/relationship'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
9842
+ const payload = {};
9843
+ if (typeof relatedCollectionId !== 'undefined') {
9844
+ payload['relatedCollectionId'] = relatedCollectionId;
9845
+ }
9846
+ if (typeof type !== 'undefined') {
9847
+ payload['type'] = type;
9848
+ }
9849
+ if (typeof twoWay !== 'undefined') {
9850
+ payload['twoWay'] = twoWay;
9851
+ }
9852
+ if (typeof key !== 'undefined') {
9853
+ payload['key'] = key;
9854
+ }
9855
+ if (typeof twoWayKey !== 'undefined') {
9856
+ payload['twoWayKey'] = twoWayKey;
9466
9857
  }
9467
9858
  if (typeof onDelete !== 'undefined') {
9468
9859
  payload['onDelete'] = onDelete;
@@ -9597,7 +9988,7 @@
9597
9988
  };
9598
9989
  return this.client.call('patch', uri, apiHeaders, payload);
9599
9990
  }
9600
- createUrlAttribute(paramsOrFirst, ...rest) {
9991
+ createTextAttribute(paramsOrFirst, ...rest) {
9601
9992
  let params;
9602
9993
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
9603
9994
  params = (paramsOrFirst || {});
@@ -9630,7 +10021,7 @@
9630
10021
  if (typeof required === 'undefined') {
9631
10022
  throw new AppwriteException('Missing required parameter: "required"');
9632
10023
  }
9633
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/url'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
10024
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/text'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
9634
10025
  const payload = {};
9635
10026
  if (typeof key !== 'undefined') {
9636
10027
  payload['key'] = key;
@@ -9650,7 +10041,7 @@
9650
10041
  };
9651
10042
  return this.client.call('post', uri, apiHeaders, payload);
9652
10043
  }
9653
- updateUrlAttribute(paramsOrFirst, ...rest) {
10044
+ updateTextAttribute(paramsOrFirst, ...rest) {
9654
10045
  let params;
9655
10046
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
9656
10047
  params = (paramsOrFirst || {});
@@ -9686,7 +10077,7 @@
9686
10077
  if (typeof xdefault === 'undefined') {
9687
10078
  throw new AppwriteException('Missing required parameter: "xdefault"');
9688
10079
  }
9689
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/url/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
10080
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/text/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
9690
10081
  const payload = {};
9691
10082
  if (typeof required !== 'undefined') {
9692
10083
  payload['required'] = required;
@@ -9703,7 +10094,7 @@
9703
10094
  };
9704
10095
  return this.client.call('patch', uri, apiHeaders, payload);
9705
10096
  }
9706
- getAttribute(paramsOrFirst, ...rest) {
10097
+ createUrlAttribute(paramsOrFirst, ...rest) {
9707
10098
  let params;
9708
10099
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
9709
10100
  params = (paramsOrFirst || {});
@@ -9712,12 +10103,18 @@
9712
10103
  params = {
9713
10104
  databaseId: paramsOrFirst,
9714
10105
  collectionId: rest[0],
9715
- key: rest[1]
10106
+ key: rest[1],
10107
+ required: rest[2],
10108
+ xdefault: rest[3],
10109
+ array: rest[4]
9716
10110
  };
9717
10111
  }
9718
10112
  const databaseId = params.databaseId;
9719
10113
  const collectionId = params.collectionId;
9720
10114
  const key = params.key;
10115
+ const required = params.required;
10116
+ const xdefault = params.xdefault;
10117
+ const array = params.array;
9721
10118
  if (typeof databaseId === 'undefined') {
9722
10119
  throw new AppwriteException('Missing required parameter: "databaseId"');
9723
10120
  }
@@ -9727,13 +10124,30 @@
9727
10124
  if (typeof key === 'undefined') {
9728
10125
  throw new AppwriteException('Missing required parameter: "key"');
9729
10126
  }
9730
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
10127
+ if (typeof required === 'undefined') {
10128
+ throw new AppwriteException('Missing required parameter: "required"');
10129
+ }
10130
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/url'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
9731
10131
  const payload = {};
10132
+ if (typeof key !== 'undefined') {
10133
+ payload['key'] = key;
10134
+ }
10135
+ if (typeof required !== 'undefined') {
10136
+ payload['required'] = required;
10137
+ }
10138
+ if (typeof xdefault !== 'undefined') {
10139
+ payload['default'] = xdefault;
10140
+ }
10141
+ if (typeof array !== 'undefined') {
10142
+ payload['array'] = array;
10143
+ }
9732
10144
  const uri = new URL(this.client.config.endpoint + apiPath);
9733
- const apiHeaders = {};
9734
- return this.client.call('get', uri, apiHeaders, payload);
10145
+ const apiHeaders = {
10146
+ 'content-type': 'application/json',
10147
+ };
10148
+ return this.client.call('post', uri, apiHeaders, payload);
9735
10149
  }
9736
- deleteAttribute(paramsOrFirst, ...rest) {
10150
+ updateUrlAttribute(paramsOrFirst, ...rest) {
9737
10151
  let params;
9738
10152
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
9739
10153
  params = (paramsOrFirst || {});
@@ -9742,10 +10156,212 @@
9742
10156
  params = {
9743
10157
  databaseId: paramsOrFirst,
9744
10158
  collectionId: rest[0],
9745
- key: rest[1]
9746
- };
9747
- }
9748
- const databaseId = params.databaseId;
10159
+ key: rest[1],
10160
+ required: rest[2],
10161
+ xdefault: rest[3],
10162
+ newKey: rest[4]
10163
+ };
10164
+ }
10165
+ const databaseId = params.databaseId;
10166
+ const collectionId = params.collectionId;
10167
+ const key = params.key;
10168
+ const required = params.required;
10169
+ const xdefault = params.xdefault;
10170
+ const newKey = params.newKey;
10171
+ if (typeof databaseId === 'undefined') {
10172
+ throw new AppwriteException('Missing required parameter: "databaseId"');
10173
+ }
10174
+ if (typeof collectionId === 'undefined') {
10175
+ throw new AppwriteException('Missing required parameter: "collectionId"');
10176
+ }
10177
+ if (typeof key === 'undefined') {
10178
+ throw new AppwriteException('Missing required parameter: "key"');
10179
+ }
10180
+ if (typeof required === 'undefined') {
10181
+ throw new AppwriteException('Missing required parameter: "required"');
10182
+ }
10183
+ if (typeof xdefault === 'undefined') {
10184
+ throw new AppwriteException('Missing required parameter: "xdefault"');
10185
+ }
10186
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/url/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
10187
+ const payload = {};
10188
+ if (typeof required !== 'undefined') {
10189
+ payload['required'] = required;
10190
+ }
10191
+ if (typeof xdefault !== 'undefined') {
10192
+ payload['default'] = xdefault;
10193
+ }
10194
+ if (typeof newKey !== 'undefined') {
10195
+ payload['newKey'] = newKey;
10196
+ }
10197
+ const uri = new URL(this.client.config.endpoint + apiPath);
10198
+ const apiHeaders = {
10199
+ 'content-type': 'application/json',
10200
+ };
10201
+ return this.client.call('patch', uri, apiHeaders, payload);
10202
+ }
10203
+ createVarcharAttribute(paramsOrFirst, ...rest) {
10204
+ let params;
10205
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
10206
+ params = (paramsOrFirst || {});
10207
+ }
10208
+ else {
10209
+ params = {
10210
+ databaseId: paramsOrFirst,
10211
+ collectionId: rest[0],
10212
+ key: rest[1],
10213
+ size: rest[2],
10214
+ required: rest[3],
10215
+ xdefault: rest[4],
10216
+ array: rest[5]
10217
+ };
10218
+ }
10219
+ const databaseId = params.databaseId;
10220
+ const collectionId = params.collectionId;
10221
+ const key = params.key;
10222
+ const size = params.size;
10223
+ const required = params.required;
10224
+ const xdefault = params.xdefault;
10225
+ const array = params.array;
10226
+ if (typeof databaseId === 'undefined') {
10227
+ throw new AppwriteException('Missing required parameter: "databaseId"');
10228
+ }
10229
+ if (typeof collectionId === 'undefined') {
10230
+ throw new AppwriteException('Missing required parameter: "collectionId"');
10231
+ }
10232
+ if (typeof key === 'undefined') {
10233
+ throw new AppwriteException('Missing required parameter: "key"');
10234
+ }
10235
+ if (typeof size === 'undefined') {
10236
+ throw new AppwriteException('Missing required parameter: "size"');
10237
+ }
10238
+ if (typeof required === 'undefined') {
10239
+ throw new AppwriteException('Missing required parameter: "required"');
10240
+ }
10241
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/varchar'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
10242
+ const payload = {};
10243
+ if (typeof key !== 'undefined') {
10244
+ payload['key'] = key;
10245
+ }
10246
+ if (typeof size !== 'undefined') {
10247
+ payload['size'] = size;
10248
+ }
10249
+ if (typeof required !== 'undefined') {
10250
+ payload['required'] = required;
10251
+ }
10252
+ if (typeof xdefault !== 'undefined') {
10253
+ payload['default'] = xdefault;
10254
+ }
10255
+ if (typeof array !== 'undefined') {
10256
+ payload['array'] = array;
10257
+ }
10258
+ const uri = new URL(this.client.config.endpoint + apiPath);
10259
+ const apiHeaders = {
10260
+ 'content-type': 'application/json',
10261
+ };
10262
+ return this.client.call('post', uri, apiHeaders, payload);
10263
+ }
10264
+ updateVarcharAttribute(paramsOrFirst, ...rest) {
10265
+ let params;
10266
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
10267
+ params = (paramsOrFirst || {});
10268
+ }
10269
+ else {
10270
+ params = {
10271
+ databaseId: paramsOrFirst,
10272
+ collectionId: rest[0],
10273
+ key: rest[1],
10274
+ required: rest[2],
10275
+ xdefault: rest[3],
10276
+ size: rest[4],
10277
+ newKey: rest[5]
10278
+ };
10279
+ }
10280
+ const databaseId = params.databaseId;
10281
+ const collectionId = params.collectionId;
10282
+ const key = params.key;
10283
+ const required = params.required;
10284
+ const xdefault = params.xdefault;
10285
+ const size = params.size;
10286
+ const newKey = params.newKey;
10287
+ if (typeof databaseId === 'undefined') {
10288
+ throw new AppwriteException('Missing required parameter: "databaseId"');
10289
+ }
10290
+ if (typeof collectionId === 'undefined') {
10291
+ throw new AppwriteException('Missing required parameter: "collectionId"');
10292
+ }
10293
+ if (typeof key === 'undefined') {
10294
+ throw new AppwriteException('Missing required parameter: "key"');
10295
+ }
10296
+ if (typeof required === 'undefined') {
10297
+ throw new AppwriteException('Missing required parameter: "required"');
10298
+ }
10299
+ if (typeof xdefault === 'undefined') {
10300
+ throw new AppwriteException('Missing required parameter: "xdefault"');
10301
+ }
10302
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/varchar/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
10303
+ const payload = {};
10304
+ if (typeof required !== 'undefined') {
10305
+ payload['required'] = required;
10306
+ }
10307
+ if (typeof xdefault !== 'undefined') {
10308
+ payload['default'] = xdefault;
10309
+ }
10310
+ if (typeof size !== 'undefined') {
10311
+ payload['size'] = size;
10312
+ }
10313
+ if (typeof newKey !== 'undefined') {
10314
+ payload['newKey'] = newKey;
10315
+ }
10316
+ const uri = new URL(this.client.config.endpoint + apiPath);
10317
+ const apiHeaders = {
10318
+ 'content-type': 'application/json',
10319
+ };
10320
+ return this.client.call('patch', uri, apiHeaders, payload);
10321
+ }
10322
+ getAttribute(paramsOrFirst, ...rest) {
10323
+ let params;
10324
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
10325
+ params = (paramsOrFirst || {});
10326
+ }
10327
+ else {
10328
+ params = {
10329
+ databaseId: paramsOrFirst,
10330
+ collectionId: rest[0],
10331
+ key: rest[1]
10332
+ };
10333
+ }
10334
+ const databaseId = params.databaseId;
10335
+ const collectionId = params.collectionId;
10336
+ const key = params.key;
10337
+ if (typeof databaseId === 'undefined') {
10338
+ throw new AppwriteException('Missing required parameter: "databaseId"');
10339
+ }
10340
+ if (typeof collectionId === 'undefined') {
10341
+ throw new AppwriteException('Missing required parameter: "collectionId"');
10342
+ }
10343
+ if (typeof key === 'undefined') {
10344
+ throw new AppwriteException('Missing required parameter: "key"');
10345
+ }
10346
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
10347
+ const payload = {};
10348
+ const uri = new URL(this.client.config.endpoint + apiPath);
10349
+ const apiHeaders = {};
10350
+ return this.client.call('get', uri, apiHeaders, payload);
10351
+ }
10352
+ deleteAttribute(paramsOrFirst, ...rest) {
10353
+ let params;
10354
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
10355
+ params = (paramsOrFirst || {});
10356
+ }
10357
+ else {
10358
+ params = {
10359
+ databaseId: paramsOrFirst,
10360
+ collectionId: rest[0],
10361
+ key: rest[1]
10362
+ };
10363
+ }
10364
+ const databaseId = params.databaseId;
9749
10365
  const collectionId = params.collectionId;
9750
10366
  const key = params.key;
9751
10367
  if (typeof databaseId === 'undefined') {
@@ -12533,7 +13149,7 @@
12533
13149
  }
12534
13150
  listTemplates(paramsOrFirst, ...rest) {
12535
13151
  let params;
12536
- if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
13152
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'runtimes' in paramsOrFirst)) {
12537
13153
  params = (paramsOrFirst || {});
12538
13154
  }
12539
13155
  else {
@@ -17006,7 +17622,7 @@
17006
17622
  }
17007
17623
  createAppwriteMigration(paramsOrFirst, ...rest) {
17008
17624
  let params;
17009
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17625
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'resources' in paramsOrFirst)) {
17010
17626
  params = (paramsOrFirst || {});
17011
17627
  }
17012
17628
  else {
@@ -17055,7 +17671,7 @@
17055
17671
  }
17056
17672
  getAppwriteReport(paramsOrFirst, ...rest) {
17057
17673
  let params;
17058
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17674
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'resources' in paramsOrFirst)) {
17059
17675
  params = (paramsOrFirst || {});
17060
17676
  }
17061
17677
  else {
@@ -17216,7 +17832,7 @@
17216
17832
  }
17217
17833
  createFirebaseMigration(paramsOrFirst, ...rest) {
17218
17834
  let params;
17219
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17835
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'resources' in paramsOrFirst)) {
17220
17836
  params = (paramsOrFirst || {});
17221
17837
  }
17222
17838
  else {
@@ -17249,7 +17865,7 @@
17249
17865
  }
17250
17866
  getFirebaseReport(paramsOrFirst, ...rest) {
17251
17867
  let params;
17252
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17868
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'resources' in paramsOrFirst)) {
17253
17869
  params = (paramsOrFirst || {});
17254
17870
  }
17255
17871
  else {
@@ -17280,7 +17896,7 @@
17280
17896
  }
17281
17897
  createNHostMigration(paramsOrFirst, ...rest) {
17282
17898
  let params;
17283
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17899
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'resources' in paramsOrFirst)) {
17284
17900
  params = (paramsOrFirst || {});
17285
17901
  }
17286
17902
  else {
@@ -17358,7 +17974,7 @@
17358
17974
  }
17359
17975
  getNHostReport(paramsOrFirst, ...rest) {
17360
17976
  let params;
17361
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17977
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'resources' in paramsOrFirst)) {
17362
17978
  params = (paramsOrFirst || {});
17363
17979
  }
17364
17980
  else {
@@ -17434,7 +18050,7 @@
17434
18050
  }
17435
18051
  createSupabaseMigration(paramsOrFirst, ...rest) {
17436
18052
  let params;
17437
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
18053
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'resources' in paramsOrFirst)) {
17438
18054
  params = (paramsOrFirst || {});
17439
18055
  }
17440
18056
  else {
@@ -17504,7 +18120,7 @@
17504
18120
  }
17505
18121
  getSupabaseReport(paramsOrFirst, ...rest) {
17506
18122
  let params;
17507
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
18123
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'resources' in paramsOrFirst)) {
17508
18124
  params = (paramsOrFirst || {});
17509
18125
  }
17510
18126
  else {
@@ -17743,7 +18359,7 @@
17743
18359
  }
17744
18360
  estimationCreateOrganization(paramsOrFirst, ...rest) {
17745
18361
  let params;
17746
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'billingPlan' in paramsOrFirst)) {
18362
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17747
18363
  params = (paramsOrFirst || {});
17748
18364
  }
17749
18365
  else {
@@ -18388,7 +19004,7 @@
18388
19004
  const apiHeaders = {};
18389
19005
  return this.client.call('get', uri, apiHeaders, payload);
18390
19006
  }
18391
- setDefaultPaymentMethod(paramsOrFirst, ...rest) {
19007
+ listKeys(paramsOrFirst, ...rest) {
18392
19008
  let params;
18393
19009
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
18394
19010
  params = (paramsOrFirst || {});
@@ -18396,54 +19012,222 @@
18396
19012
  else {
18397
19013
  params = {
18398
19014
  organizationId: paramsOrFirst,
18399
- paymentMethodId: rest[0]
19015
+ total: rest[0]
18400
19016
  };
18401
19017
  }
18402
19018
  const organizationId = params.organizationId;
18403
- const paymentMethodId = params.paymentMethodId;
19019
+ const total = params.total;
18404
19020
  if (typeof organizationId === 'undefined') {
18405
19021
  throw new AppwriteException('Missing required parameter: "organizationId"');
18406
19022
  }
18407
- if (typeof paymentMethodId === 'undefined') {
18408
- throw new AppwriteException('Missing required parameter: "paymentMethodId"');
18409
- }
18410
- const apiPath = '/organizations/{organizationId}/payment-method'.replace('{organizationId}', organizationId);
19023
+ const apiPath = '/organizations/{organizationId}/keys'.replace('{organizationId}', organizationId);
18411
19024
  const payload = {};
18412
- if (typeof paymentMethodId !== 'undefined') {
18413
- payload['paymentMethodId'] = paymentMethodId;
19025
+ if (typeof total !== 'undefined') {
19026
+ payload['total'] = total;
18414
19027
  }
18415
19028
  const uri = new URL(this.client.config.endpoint + apiPath);
18416
- const apiHeaders = {
18417
- 'content-type': 'application/json',
18418
- };
18419
- return this.client.call('patch', uri, apiHeaders, payload);
19029
+ const apiHeaders = {};
19030
+ return this.client.call('get', uri, apiHeaders, payload);
18420
19031
  }
18421
- deleteDefaultPaymentMethod(paramsOrFirst) {
19032
+ createKey(paramsOrFirst, ...rest) {
18422
19033
  let params;
18423
19034
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
18424
19035
  params = (paramsOrFirst || {});
18425
19036
  }
18426
19037
  else {
18427
19038
  params = {
18428
- organizationId: paramsOrFirst
19039
+ organizationId: paramsOrFirst,
19040
+ name: rest[0],
19041
+ scopes: rest[1],
19042
+ expire: rest[2]
18429
19043
  };
18430
19044
  }
18431
19045
  const organizationId = params.organizationId;
19046
+ const name = params.name;
19047
+ const scopes = params.scopes;
19048
+ const expire = params.expire;
18432
19049
  if (typeof organizationId === 'undefined') {
18433
19050
  throw new AppwriteException('Missing required parameter: "organizationId"');
18434
19051
  }
18435
- const apiPath = '/organizations/{organizationId}/payment-method'.replace('{organizationId}', organizationId);
18436
- const payload = {};
18437
- const uri = new URL(this.client.config.endpoint + apiPath);
18438
- const apiHeaders = {
18439
- 'content-type': 'application/json',
18440
- };
18441
- return this.client.call('delete', uri, apiHeaders, payload);
18442
- }
18443
- setBackupPaymentMethod(paramsOrFirst, ...rest) {
18444
- let params;
18445
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
18446
- params = (paramsOrFirst || {});
19052
+ if (typeof name === 'undefined') {
19053
+ throw new AppwriteException('Missing required parameter: "name"');
19054
+ }
19055
+ if (typeof scopes === 'undefined') {
19056
+ throw new AppwriteException('Missing required parameter: "scopes"');
19057
+ }
19058
+ const apiPath = '/organizations/{organizationId}/keys'.replace('{organizationId}', organizationId);
19059
+ const payload = {};
19060
+ if (typeof name !== 'undefined') {
19061
+ payload['name'] = name;
19062
+ }
19063
+ if (typeof scopes !== 'undefined') {
19064
+ payload['scopes'] = scopes;
19065
+ }
19066
+ if (typeof expire !== 'undefined') {
19067
+ payload['expire'] = expire;
19068
+ }
19069
+ const uri = new URL(this.client.config.endpoint + apiPath);
19070
+ const apiHeaders = {
19071
+ 'content-type': 'application/json',
19072
+ };
19073
+ return this.client.call('post', uri, apiHeaders, payload);
19074
+ }
19075
+ getKey(paramsOrFirst, ...rest) {
19076
+ let params;
19077
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
19078
+ params = (paramsOrFirst || {});
19079
+ }
19080
+ else {
19081
+ params = {
19082
+ organizationId: paramsOrFirst,
19083
+ keyId: rest[0]
19084
+ };
19085
+ }
19086
+ const organizationId = params.organizationId;
19087
+ const keyId = params.keyId;
19088
+ if (typeof organizationId === 'undefined') {
19089
+ throw new AppwriteException('Missing required parameter: "organizationId"');
19090
+ }
19091
+ if (typeof keyId === 'undefined') {
19092
+ throw new AppwriteException('Missing required parameter: "keyId"');
19093
+ }
19094
+ const apiPath = '/organizations/{organizationId}/keys/{keyId}'.replace('{organizationId}', organizationId).replace('{keyId}', keyId);
19095
+ const payload = {};
19096
+ const uri = new URL(this.client.config.endpoint + apiPath);
19097
+ const apiHeaders = {};
19098
+ return this.client.call('get', uri, apiHeaders, payload);
19099
+ }
19100
+ updateKey(paramsOrFirst, ...rest) {
19101
+ let params;
19102
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
19103
+ params = (paramsOrFirst || {});
19104
+ }
19105
+ else {
19106
+ params = {
19107
+ organizationId: paramsOrFirst,
19108
+ keyId: rest[0],
19109
+ name: rest[1],
19110
+ scopes: rest[2],
19111
+ expire: rest[3]
19112
+ };
19113
+ }
19114
+ const organizationId = params.organizationId;
19115
+ const keyId = params.keyId;
19116
+ const name = params.name;
19117
+ const scopes = params.scopes;
19118
+ const expire = params.expire;
19119
+ if (typeof organizationId === 'undefined') {
19120
+ throw new AppwriteException('Missing required parameter: "organizationId"');
19121
+ }
19122
+ if (typeof keyId === 'undefined') {
19123
+ throw new AppwriteException('Missing required parameter: "keyId"');
19124
+ }
19125
+ if (typeof name === 'undefined') {
19126
+ throw new AppwriteException('Missing required parameter: "name"');
19127
+ }
19128
+ if (typeof scopes === 'undefined') {
19129
+ throw new AppwriteException('Missing required parameter: "scopes"');
19130
+ }
19131
+ const apiPath = '/organizations/{organizationId}/keys/{keyId}'.replace('{organizationId}', organizationId).replace('{keyId}', keyId);
19132
+ const payload = {};
19133
+ if (typeof name !== 'undefined') {
19134
+ payload['name'] = name;
19135
+ }
19136
+ if (typeof scopes !== 'undefined') {
19137
+ payload['scopes'] = scopes;
19138
+ }
19139
+ if (typeof expire !== 'undefined') {
19140
+ payload['expire'] = expire;
19141
+ }
19142
+ const uri = new URL(this.client.config.endpoint + apiPath);
19143
+ const apiHeaders = {
19144
+ 'content-type': 'application/json',
19145
+ };
19146
+ return this.client.call('put', uri, apiHeaders, payload);
19147
+ }
19148
+ deleteKey(paramsOrFirst, ...rest) {
19149
+ let params;
19150
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
19151
+ params = (paramsOrFirst || {});
19152
+ }
19153
+ else {
19154
+ params = {
19155
+ organizationId: paramsOrFirst,
19156
+ keyId: rest[0]
19157
+ };
19158
+ }
19159
+ const organizationId = params.organizationId;
19160
+ const keyId = params.keyId;
19161
+ if (typeof organizationId === 'undefined') {
19162
+ throw new AppwriteException('Missing required parameter: "organizationId"');
19163
+ }
19164
+ if (typeof keyId === 'undefined') {
19165
+ throw new AppwriteException('Missing required parameter: "keyId"');
19166
+ }
19167
+ const apiPath = '/organizations/{organizationId}/keys/{keyId}'.replace('{organizationId}', organizationId).replace('{keyId}', keyId);
19168
+ const payload = {};
19169
+ const uri = new URL(this.client.config.endpoint + apiPath);
19170
+ const apiHeaders = {
19171
+ 'content-type': 'application/json',
19172
+ };
19173
+ return this.client.call('delete', uri, apiHeaders, payload);
19174
+ }
19175
+ setDefaultPaymentMethod(paramsOrFirst, ...rest) {
19176
+ let params;
19177
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
19178
+ params = (paramsOrFirst || {});
19179
+ }
19180
+ else {
19181
+ params = {
19182
+ organizationId: paramsOrFirst,
19183
+ paymentMethodId: rest[0]
19184
+ };
19185
+ }
19186
+ const organizationId = params.organizationId;
19187
+ const paymentMethodId = params.paymentMethodId;
19188
+ if (typeof organizationId === 'undefined') {
19189
+ throw new AppwriteException('Missing required parameter: "organizationId"');
19190
+ }
19191
+ if (typeof paymentMethodId === 'undefined') {
19192
+ throw new AppwriteException('Missing required parameter: "paymentMethodId"');
19193
+ }
19194
+ const apiPath = '/organizations/{organizationId}/payment-method'.replace('{organizationId}', organizationId);
19195
+ const payload = {};
19196
+ if (typeof paymentMethodId !== 'undefined') {
19197
+ payload['paymentMethodId'] = paymentMethodId;
19198
+ }
19199
+ const uri = new URL(this.client.config.endpoint + apiPath);
19200
+ const apiHeaders = {
19201
+ 'content-type': 'application/json',
19202
+ };
19203
+ return this.client.call('patch', uri, apiHeaders, payload);
19204
+ }
19205
+ deleteDefaultPaymentMethod(paramsOrFirst) {
19206
+ let params;
19207
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
19208
+ params = (paramsOrFirst || {});
19209
+ }
19210
+ else {
19211
+ params = {
19212
+ organizationId: paramsOrFirst
19213
+ };
19214
+ }
19215
+ const organizationId = params.organizationId;
19216
+ if (typeof organizationId === 'undefined') {
19217
+ throw new AppwriteException('Missing required parameter: "organizationId"');
19218
+ }
19219
+ const apiPath = '/organizations/{organizationId}/payment-method'.replace('{organizationId}', organizationId);
19220
+ const payload = {};
19221
+ const uri = new URL(this.client.config.endpoint + apiPath);
19222
+ const apiHeaders = {
19223
+ 'content-type': 'application/json',
19224
+ };
19225
+ return this.client.call('delete', uri, apiHeaders, payload);
19226
+ }
19227
+ setBackupPaymentMethod(paramsOrFirst, ...rest) {
19228
+ let params;
19229
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
19230
+ params = (paramsOrFirst || {});
18447
19231
  }
18448
19232
  else {
18449
19233
  params = {
@@ -18646,6 +19430,26 @@
18646
19430
  };
18647
19431
  return this.client.call('patch', uri, apiHeaders, payload);
18648
19432
  }
19433
+ listRegions(paramsOrFirst) {
19434
+ let params;
19435
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
19436
+ params = (paramsOrFirst || {});
19437
+ }
19438
+ else {
19439
+ params = {
19440
+ organizationId: paramsOrFirst
19441
+ };
19442
+ }
19443
+ const organizationId = params.organizationId;
19444
+ if (typeof organizationId === 'undefined') {
19445
+ throw new AppwriteException('Missing required parameter: "organizationId"');
19446
+ }
19447
+ const apiPath = '/organizations/{organizationId}/regions'.replace('{organizationId}', organizationId);
19448
+ const payload = {};
19449
+ const uri = new URL(this.client.config.endpoint + apiPath);
19450
+ const apiHeaders = {};
19451
+ return this.client.call('get', uri, apiHeaders, payload);
19452
+ }
18649
19453
  getScopes(paramsOrFirst) {
18650
19454
  let params;
18651
19455
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
@@ -21718,7 +22522,7 @@
21718
22522
  }
21719
22523
  listTemplates(paramsOrFirst, ...rest) {
21720
22524
  let params;
21721
- if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
22525
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'frameworks' in paramsOrFirst)) {
21722
22526
  params = (paramsOrFirst || {});
21723
22527
  }
21724
22528
  else {
@@ -23461,9 +24265,6 @@
23461
24265
  if (typeof databaseId === 'undefined') {
23462
24266
  throw new AppwriteException('Missing required parameter: "databaseId"');
23463
24267
  }
23464
- if (typeof name === 'undefined') {
23465
- throw new AppwriteException('Missing required parameter: "name"');
23466
- }
23467
24268
  const apiPath = '/tablesdb/{databaseId}'.replace('{databaseId}', databaseId);
23468
24269
  const payload = {};
23469
24270
  if (typeof name !== 'undefined') {
@@ -23650,9 +24451,6 @@
23650
24451
  if (typeof tableId === 'undefined') {
23651
24452
  throw new AppwriteException('Missing required parameter: "tableId"');
23652
24453
  }
23653
- if (typeof name === 'undefined') {
23654
- throw new AppwriteException('Missing required parameter: "name"');
23655
- }
23656
24454
  const apiPath = '/tablesdb/{databaseId}/tables/{tableId}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
23657
24455
  const payload = {};
23658
24456
  if (typeof name !== 'undefined') {
@@ -23735,7 +24533,447 @@
23735
24533
  const apiHeaders = {};
23736
24534
  return this.client.call('get', uri, apiHeaders, payload);
23737
24535
  }
23738
- createBooleanColumn(paramsOrFirst, ...rest) {
24536
+ createBooleanColumn(paramsOrFirst, ...rest) {
24537
+ let params;
24538
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
24539
+ params = (paramsOrFirst || {});
24540
+ }
24541
+ else {
24542
+ params = {
24543
+ databaseId: paramsOrFirst,
24544
+ tableId: rest[0],
24545
+ key: rest[1],
24546
+ required: rest[2],
24547
+ xdefault: rest[3],
24548
+ array: rest[4]
24549
+ };
24550
+ }
24551
+ const databaseId = params.databaseId;
24552
+ const tableId = params.tableId;
24553
+ const key = params.key;
24554
+ const required = params.required;
24555
+ const xdefault = params.xdefault;
24556
+ const array = params.array;
24557
+ if (typeof databaseId === 'undefined') {
24558
+ throw new AppwriteException('Missing required parameter: "databaseId"');
24559
+ }
24560
+ if (typeof tableId === 'undefined') {
24561
+ throw new AppwriteException('Missing required parameter: "tableId"');
24562
+ }
24563
+ if (typeof key === 'undefined') {
24564
+ throw new AppwriteException('Missing required parameter: "key"');
24565
+ }
24566
+ if (typeof required === 'undefined') {
24567
+ throw new AppwriteException('Missing required parameter: "required"');
24568
+ }
24569
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/boolean'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
24570
+ const payload = {};
24571
+ if (typeof key !== 'undefined') {
24572
+ payload['key'] = key;
24573
+ }
24574
+ if (typeof required !== 'undefined') {
24575
+ payload['required'] = required;
24576
+ }
24577
+ if (typeof xdefault !== 'undefined') {
24578
+ payload['default'] = xdefault;
24579
+ }
24580
+ if (typeof array !== 'undefined') {
24581
+ payload['array'] = array;
24582
+ }
24583
+ const uri = new URL(this.client.config.endpoint + apiPath);
24584
+ const apiHeaders = {
24585
+ 'content-type': 'application/json',
24586
+ };
24587
+ return this.client.call('post', uri, apiHeaders, payload);
24588
+ }
24589
+ updateBooleanColumn(paramsOrFirst, ...rest) {
24590
+ let params;
24591
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
24592
+ params = (paramsOrFirst || {});
24593
+ }
24594
+ else {
24595
+ params = {
24596
+ databaseId: paramsOrFirst,
24597
+ tableId: rest[0],
24598
+ key: rest[1],
24599
+ required: rest[2],
24600
+ xdefault: rest[3],
24601
+ newKey: rest[4]
24602
+ };
24603
+ }
24604
+ const databaseId = params.databaseId;
24605
+ const tableId = params.tableId;
24606
+ const key = params.key;
24607
+ const required = params.required;
24608
+ const xdefault = params.xdefault;
24609
+ const newKey = params.newKey;
24610
+ if (typeof databaseId === 'undefined') {
24611
+ throw new AppwriteException('Missing required parameter: "databaseId"');
24612
+ }
24613
+ if (typeof tableId === 'undefined') {
24614
+ throw new AppwriteException('Missing required parameter: "tableId"');
24615
+ }
24616
+ if (typeof key === 'undefined') {
24617
+ throw new AppwriteException('Missing required parameter: "key"');
24618
+ }
24619
+ if (typeof required === 'undefined') {
24620
+ throw new AppwriteException('Missing required parameter: "required"');
24621
+ }
24622
+ if (typeof xdefault === 'undefined') {
24623
+ throw new AppwriteException('Missing required parameter: "xdefault"');
24624
+ }
24625
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/boolean/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
24626
+ const payload = {};
24627
+ if (typeof required !== 'undefined') {
24628
+ payload['required'] = required;
24629
+ }
24630
+ if (typeof xdefault !== 'undefined') {
24631
+ payload['default'] = xdefault;
24632
+ }
24633
+ if (typeof newKey !== 'undefined') {
24634
+ payload['newKey'] = newKey;
24635
+ }
24636
+ const uri = new URL(this.client.config.endpoint + apiPath);
24637
+ const apiHeaders = {
24638
+ 'content-type': 'application/json',
24639
+ };
24640
+ return this.client.call('patch', uri, apiHeaders, payload);
24641
+ }
24642
+ createDatetimeColumn(paramsOrFirst, ...rest) {
24643
+ let params;
24644
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
24645
+ params = (paramsOrFirst || {});
24646
+ }
24647
+ else {
24648
+ params = {
24649
+ databaseId: paramsOrFirst,
24650
+ tableId: rest[0],
24651
+ key: rest[1],
24652
+ required: rest[2],
24653
+ xdefault: rest[3],
24654
+ array: rest[4]
24655
+ };
24656
+ }
24657
+ const databaseId = params.databaseId;
24658
+ const tableId = params.tableId;
24659
+ const key = params.key;
24660
+ const required = params.required;
24661
+ const xdefault = params.xdefault;
24662
+ const array = params.array;
24663
+ if (typeof databaseId === 'undefined') {
24664
+ throw new AppwriteException('Missing required parameter: "databaseId"');
24665
+ }
24666
+ if (typeof tableId === 'undefined') {
24667
+ throw new AppwriteException('Missing required parameter: "tableId"');
24668
+ }
24669
+ if (typeof key === 'undefined') {
24670
+ throw new AppwriteException('Missing required parameter: "key"');
24671
+ }
24672
+ if (typeof required === 'undefined') {
24673
+ throw new AppwriteException('Missing required parameter: "required"');
24674
+ }
24675
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/datetime'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
24676
+ const payload = {};
24677
+ if (typeof key !== 'undefined') {
24678
+ payload['key'] = key;
24679
+ }
24680
+ if (typeof required !== 'undefined') {
24681
+ payload['required'] = required;
24682
+ }
24683
+ if (typeof xdefault !== 'undefined') {
24684
+ payload['default'] = xdefault;
24685
+ }
24686
+ if (typeof array !== 'undefined') {
24687
+ payload['array'] = array;
24688
+ }
24689
+ const uri = new URL(this.client.config.endpoint + apiPath);
24690
+ const apiHeaders = {
24691
+ 'content-type': 'application/json',
24692
+ };
24693
+ return this.client.call('post', uri, apiHeaders, payload);
24694
+ }
24695
+ updateDatetimeColumn(paramsOrFirst, ...rest) {
24696
+ let params;
24697
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
24698
+ params = (paramsOrFirst || {});
24699
+ }
24700
+ else {
24701
+ params = {
24702
+ databaseId: paramsOrFirst,
24703
+ tableId: rest[0],
24704
+ key: rest[1],
24705
+ required: rest[2],
24706
+ xdefault: rest[3],
24707
+ newKey: rest[4]
24708
+ };
24709
+ }
24710
+ const databaseId = params.databaseId;
24711
+ const tableId = params.tableId;
24712
+ const key = params.key;
24713
+ const required = params.required;
24714
+ const xdefault = params.xdefault;
24715
+ const newKey = params.newKey;
24716
+ if (typeof databaseId === 'undefined') {
24717
+ throw new AppwriteException('Missing required parameter: "databaseId"');
24718
+ }
24719
+ if (typeof tableId === 'undefined') {
24720
+ throw new AppwriteException('Missing required parameter: "tableId"');
24721
+ }
24722
+ if (typeof key === 'undefined') {
24723
+ throw new AppwriteException('Missing required parameter: "key"');
24724
+ }
24725
+ if (typeof required === 'undefined') {
24726
+ throw new AppwriteException('Missing required parameter: "required"');
24727
+ }
24728
+ if (typeof xdefault === 'undefined') {
24729
+ throw new AppwriteException('Missing required parameter: "xdefault"');
24730
+ }
24731
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/datetime/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
24732
+ const payload = {};
24733
+ if (typeof required !== 'undefined') {
24734
+ payload['required'] = required;
24735
+ }
24736
+ if (typeof xdefault !== 'undefined') {
24737
+ payload['default'] = xdefault;
24738
+ }
24739
+ if (typeof newKey !== 'undefined') {
24740
+ payload['newKey'] = newKey;
24741
+ }
24742
+ const uri = new URL(this.client.config.endpoint + apiPath);
24743
+ const apiHeaders = {
24744
+ 'content-type': 'application/json',
24745
+ };
24746
+ return this.client.call('patch', uri, apiHeaders, payload);
24747
+ }
24748
+ createEmailColumn(paramsOrFirst, ...rest) {
24749
+ let params;
24750
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
24751
+ params = (paramsOrFirst || {});
24752
+ }
24753
+ else {
24754
+ params = {
24755
+ databaseId: paramsOrFirst,
24756
+ tableId: rest[0],
24757
+ key: rest[1],
24758
+ required: rest[2],
24759
+ xdefault: rest[3],
24760
+ array: rest[4]
24761
+ };
24762
+ }
24763
+ const databaseId = params.databaseId;
24764
+ const tableId = params.tableId;
24765
+ const key = params.key;
24766
+ const required = params.required;
24767
+ const xdefault = params.xdefault;
24768
+ const array = params.array;
24769
+ if (typeof databaseId === 'undefined') {
24770
+ throw new AppwriteException('Missing required parameter: "databaseId"');
24771
+ }
24772
+ if (typeof tableId === 'undefined') {
24773
+ throw new AppwriteException('Missing required parameter: "tableId"');
24774
+ }
24775
+ if (typeof key === 'undefined') {
24776
+ throw new AppwriteException('Missing required parameter: "key"');
24777
+ }
24778
+ if (typeof required === 'undefined') {
24779
+ throw new AppwriteException('Missing required parameter: "required"');
24780
+ }
24781
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/email'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
24782
+ const payload = {};
24783
+ if (typeof key !== 'undefined') {
24784
+ payload['key'] = key;
24785
+ }
24786
+ if (typeof required !== 'undefined') {
24787
+ payload['required'] = required;
24788
+ }
24789
+ if (typeof xdefault !== 'undefined') {
24790
+ payload['default'] = xdefault;
24791
+ }
24792
+ if (typeof array !== 'undefined') {
24793
+ payload['array'] = array;
24794
+ }
24795
+ const uri = new URL(this.client.config.endpoint + apiPath);
24796
+ const apiHeaders = {
24797
+ 'content-type': 'application/json',
24798
+ };
24799
+ return this.client.call('post', uri, apiHeaders, payload);
24800
+ }
24801
+ updateEmailColumn(paramsOrFirst, ...rest) {
24802
+ let params;
24803
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
24804
+ params = (paramsOrFirst || {});
24805
+ }
24806
+ else {
24807
+ params = {
24808
+ databaseId: paramsOrFirst,
24809
+ tableId: rest[0],
24810
+ key: rest[1],
24811
+ required: rest[2],
24812
+ xdefault: rest[3],
24813
+ newKey: rest[4]
24814
+ };
24815
+ }
24816
+ const databaseId = params.databaseId;
24817
+ const tableId = params.tableId;
24818
+ const key = params.key;
24819
+ const required = params.required;
24820
+ const xdefault = params.xdefault;
24821
+ const newKey = params.newKey;
24822
+ if (typeof databaseId === 'undefined') {
24823
+ throw new AppwriteException('Missing required parameter: "databaseId"');
24824
+ }
24825
+ if (typeof tableId === 'undefined') {
24826
+ throw new AppwriteException('Missing required parameter: "tableId"');
24827
+ }
24828
+ if (typeof key === 'undefined') {
24829
+ throw new AppwriteException('Missing required parameter: "key"');
24830
+ }
24831
+ if (typeof required === 'undefined') {
24832
+ throw new AppwriteException('Missing required parameter: "required"');
24833
+ }
24834
+ if (typeof xdefault === 'undefined') {
24835
+ throw new AppwriteException('Missing required parameter: "xdefault"');
24836
+ }
24837
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/email/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
24838
+ const payload = {};
24839
+ if (typeof required !== 'undefined') {
24840
+ payload['required'] = required;
24841
+ }
24842
+ if (typeof xdefault !== 'undefined') {
24843
+ payload['default'] = xdefault;
24844
+ }
24845
+ if (typeof newKey !== 'undefined') {
24846
+ payload['newKey'] = newKey;
24847
+ }
24848
+ const uri = new URL(this.client.config.endpoint + apiPath);
24849
+ const apiHeaders = {
24850
+ 'content-type': 'application/json',
24851
+ };
24852
+ return this.client.call('patch', uri, apiHeaders, payload);
24853
+ }
24854
+ createEnumColumn(paramsOrFirst, ...rest) {
24855
+ let params;
24856
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
24857
+ params = (paramsOrFirst || {});
24858
+ }
24859
+ else {
24860
+ params = {
24861
+ databaseId: paramsOrFirst,
24862
+ tableId: rest[0],
24863
+ key: rest[1],
24864
+ elements: rest[2],
24865
+ required: rest[3],
24866
+ xdefault: rest[4],
24867
+ array: rest[5]
24868
+ };
24869
+ }
24870
+ const databaseId = params.databaseId;
24871
+ const tableId = params.tableId;
24872
+ const key = params.key;
24873
+ const elements = params.elements;
24874
+ const required = params.required;
24875
+ const xdefault = params.xdefault;
24876
+ const array = params.array;
24877
+ if (typeof databaseId === 'undefined') {
24878
+ throw new AppwriteException('Missing required parameter: "databaseId"');
24879
+ }
24880
+ if (typeof tableId === 'undefined') {
24881
+ throw new AppwriteException('Missing required parameter: "tableId"');
24882
+ }
24883
+ if (typeof key === 'undefined') {
24884
+ throw new AppwriteException('Missing required parameter: "key"');
24885
+ }
24886
+ if (typeof elements === 'undefined') {
24887
+ throw new AppwriteException('Missing required parameter: "elements"');
24888
+ }
24889
+ if (typeof required === 'undefined') {
24890
+ throw new AppwriteException('Missing required parameter: "required"');
24891
+ }
24892
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/enum'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
24893
+ const payload = {};
24894
+ if (typeof key !== 'undefined') {
24895
+ payload['key'] = key;
24896
+ }
24897
+ if (typeof elements !== 'undefined') {
24898
+ payload['elements'] = elements;
24899
+ }
24900
+ if (typeof required !== 'undefined') {
24901
+ payload['required'] = required;
24902
+ }
24903
+ if (typeof xdefault !== 'undefined') {
24904
+ payload['default'] = xdefault;
24905
+ }
24906
+ if (typeof array !== 'undefined') {
24907
+ payload['array'] = array;
24908
+ }
24909
+ const uri = new URL(this.client.config.endpoint + apiPath);
24910
+ const apiHeaders = {
24911
+ 'content-type': 'application/json',
24912
+ };
24913
+ return this.client.call('post', uri, apiHeaders, payload);
24914
+ }
24915
+ updateEnumColumn(paramsOrFirst, ...rest) {
24916
+ let params;
24917
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
24918
+ params = (paramsOrFirst || {});
24919
+ }
24920
+ else {
24921
+ params = {
24922
+ databaseId: paramsOrFirst,
24923
+ tableId: rest[0],
24924
+ key: rest[1],
24925
+ elements: rest[2],
24926
+ required: rest[3],
24927
+ xdefault: rest[4],
24928
+ newKey: rest[5]
24929
+ };
24930
+ }
24931
+ const databaseId = params.databaseId;
24932
+ const tableId = params.tableId;
24933
+ const key = params.key;
24934
+ const elements = params.elements;
24935
+ const required = params.required;
24936
+ const xdefault = params.xdefault;
24937
+ const newKey = params.newKey;
24938
+ if (typeof databaseId === 'undefined') {
24939
+ throw new AppwriteException('Missing required parameter: "databaseId"');
24940
+ }
24941
+ if (typeof tableId === 'undefined') {
24942
+ throw new AppwriteException('Missing required parameter: "tableId"');
24943
+ }
24944
+ if (typeof key === 'undefined') {
24945
+ throw new AppwriteException('Missing required parameter: "key"');
24946
+ }
24947
+ if (typeof elements === 'undefined') {
24948
+ throw new AppwriteException('Missing required parameter: "elements"');
24949
+ }
24950
+ if (typeof required === 'undefined') {
24951
+ throw new AppwriteException('Missing required parameter: "required"');
24952
+ }
24953
+ if (typeof xdefault === 'undefined') {
24954
+ throw new AppwriteException('Missing required parameter: "xdefault"');
24955
+ }
24956
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/enum/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
24957
+ const payload = {};
24958
+ if (typeof elements !== 'undefined') {
24959
+ payload['elements'] = elements;
24960
+ }
24961
+ if (typeof required !== 'undefined') {
24962
+ payload['required'] = required;
24963
+ }
24964
+ if (typeof xdefault !== 'undefined') {
24965
+ payload['default'] = xdefault;
24966
+ }
24967
+ if (typeof newKey !== 'undefined') {
24968
+ payload['newKey'] = newKey;
24969
+ }
24970
+ const uri = new URL(this.client.config.endpoint + apiPath);
24971
+ const apiHeaders = {
24972
+ 'content-type': 'application/json',
24973
+ };
24974
+ return this.client.call('patch', uri, apiHeaders, payload);
24975
+ }
24976
+ createFloatColumn(paramsOrFirst, ...rest) {
23739
24977
  let params;
23740
24978
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
23741
24979
  params = (paramsOrFirst || {});
@@ -23746,14 +24984,18 @@
23746
24984
  tableId: rest[0],
23747
24985
  key: rest[1],
23748
24986
  required: rest[2],
23749
- xdefault: rest[3],
23750
- array: rest[4]
24987
+ min: rest[3],
24988
+ max: rest[4],
24989
+ xdefault: rest[5],
24990
+ array: rest[6]
23751
24991
  };
23752
24992
  }
23753
24993
  const databaseId = params.databaseId;
23754
24994
  const tableId = params.tableId;
23755
24995
  const key = params.key;
23756
24996
  const required = params.required;
24997
+ const min = params.min;
24998
+ const max = params.max;
23757
24999
  const xdefault = params.xdefault;
23758
25000
  const array = params.array;
23759
25001
  if (typeof databaseId === 'undefined') {
@@ -23768,7 +25010,7 @@
23768
25010
  if (typeof required === 'undefined') {
23769
25011
  throw new AppwriteException('Missing required parameter: "required"');
23770
25012
  }
23771
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/boolean'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
25013
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/float'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
23772
25014
  const payload = {};
23773
25015
  if (typeof key !== 'undefined') {
23774
25016
  payload['key'] = key;
@@ -23776,6 +25018,12 @@
23776
25018
  if (typeof required !== 'undefined') {
23777
25019
  payload['required'] = required;
23778
25020
  }
25021
+ if (typeof min !== 'undefined') {
25022
+ payload['min'] = min;
25023
+ }
25024
+ if (typeof max !== 'undefined') {
25025
+ payload['max'] = max;
25026
+ }
23779
25027
  if (typeof xdefault !== 'undefined') {
23780
25028
  payload['default'] = xdefault;
23781
25029
  }
@@ -23788,7 +25036,7 @@
23788
25036
  };
23789
25037
  return this.client.call('post', uri, apiHeaders, payload);
23790
25038
  }
23791
- updateBooleanColumn(paramsOrFirst, ...rest) {
25039
+ updateFloatColumn(paramsOrFirst, ...rest) {
23792
25040
  let params;
23793
25041
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
23794
25042
  params = (paramsOrFirst || {});
@@ -23800,7 +25048,9 @@
23800
25048
  key: rest[1],
23801
25049
  required: rest[2],
23802
25050
  xdefault: rest[3],
23803
- newKey: rest[4]
25051
+ min: rest[4],
25052
+ max: rest[5],
25053
+ newKey: rest[6]
23804
25054
  };
23805
25055
  }
23806
25056
  const databaseId = params.databaseId;
@@ -23808,6 +25058,8 @@
23808
25058
  const key = params.key;
23809
25059
  const required = params.required;
23810
25060
  const xdefault = params.xdefault;
25061
+ const min = params.min;
25062
+ const max = params.max;
23811
25063
  const newKey = params.newKey;
23812
25064
  if (typeof databaseId === 'undefined') {
23813
25065
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -23824,11 +25076,17 @@
23824
25076
  if (typeof xdefault === 'undefined') {
23825
25077
  throw new AppwriteException('Missing required parameter: "xdefault"');
23826
25078
  }
23827
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/boolean/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
25079
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/float/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
23828
25080
  const payload = {};
23829
25081
  if (typeof required !== 'undefined') {
23830
25082
  payload['required'] = required;
23831
25083
  }
25084
+ if (typeof min !== 'undefined') {
25085
+ payload['min'] = min;
25086
+ }
25087
+ if (typeof max !== 'undefined') {
25088
+ payload['max'] = max;
25089
+ }
23832
25090
  if (typeof xdefault !== 'undefined') {
23833
25091
  payload['default'] = xdefault;
23834
25092
  }
@@ -23841,7 +25099,7 @@
23841
25099
  };
23842
25100
  return this.client.call('patch', uri, apiHeaders, payload);
23843
25101
  }
23844
- createDatetimeColumn(paramsOrFirst, ...rest) {
25102
+ createIntegerColumn(paramsOrFirst, ...rest) {
23845
25103
  let params;
23846
25104
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
23847
25105
  params = (paramsOrFirst || {});
@@ -23852,14 +25110,18 @@
23852
25110
  tableId: rest[0],
23853
25111
  key: rest[1],
23854
25112
  required: rest[2],
23855
- xdefault: rest[3],
23856
- array: rest[4]
25113
+ min: rest[3],
25114
+ max: rest[4],
25115
+ xdefault: rest[5],
25116
+ array: rest[6]
23857
25117
  };
23858
25118
  }
23859
25119
  const databaseId = params.databaseId;
23860
25120
  const tableId = params.tableId;
23861
25121
  const key = params.key;
23862
25122
  const required = params.required;
25123
+ const min = params.min;
25124
+ const max = params.max;
23863
25125
  const xdefault = params.xdefault;
23864
25126
  const array = params.array;
23865
25127
  if (typeof databaseId === 'undefined') {
@@ -23874,7 +25136,7 @@
23874
25136
  if (typeof required === 'undefined') {
23875
25137
  throw new AppwriteException('Missing required parameter: "required"');
23876
25138
  }
23877
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/datetime'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
25139
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/integer'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
23878
25140
  const payload = {};
23879
25141
  if (typeof key !== 'undefined') {
23880
25142
  payload['key'] = key;
@@ -23882,6 +25144,12 @@
23882
25144
  if (typeof required !== 'undefined') {
23883
25145
  payload['required'] = required;
23884
25146
  }
25147
+ if (typeof min !== 'undefined') {
25148
+ payload['min'] = min;
25149
+ }
25150
+ if (typeof max !== 'undefined') {
25151
+ payload['max'] = max;
25152
+ }
23885
25153
  if (typeof xdefault !== 'undefined') {
23886
25154
  payload['default'] = xdefault;
23887
25155
  }
@@ -23894,7 +25162,7 @@
23894
25162
  };
23895
25163
  return this.client.call('post', uri, apiHeaders, payload);
23896
25164
  }
23897
- updateDatetimeColumn(paramsOrFirst, ...rest) {
25165
+ updateIntegerColumn(paramsOrFirst, ...rest) {
23898
25166
  let params;
23899
25167
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
23900
25168
  params = (paramsOrFirst || {});
@@ -23906,7 +25174,9 @@
23906
25174
  key: rest[1],
23907
25175
  required: rest[2],
23908
25176
  xdefault: rest[3],
23909
- newKey: rest[4]
25177
+ min: rest[4],
25178
+ max: rest[5],
25179
+ newKey: rest[6]
23910
25180
  };
23911
25181
  }
23912
25182
  const databaseId = params.databaseId;
@@ -23914,6 +25184,8 @@
23914
25184
  const key = params.key;
23915
25185
  const required = params.required;
23916
25186
  const xdefault = params.xdefault;
25187
+ const min = params.min;
25188
+ const max = params.max;
23917
25189
  const newKey = params.newKey;
23918
25190
  if (typeof databaseId === 'undefined') {
23919
25191
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -23930,11 +25202,17 @@
23930
25202
  if (typeof xdefault === 'undefined') {
23931
25203
  throw new AppwriteException('Missing required parameter: "xdefault"');
23932
25204
  }
23933
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/datetime/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
25205
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/integer/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
23934
25206
  const payload = {};
23935
25207
  if (typeof required !== 'undefined') {
23936
25208
  payload['required'] = required;
23937
25209
  }
25210
+ if (typeof min !== 'undefined') {
25211
+ payload['min'] = min;
25212
+ }
25213
+ if (typeof max !== 'undefined') {
25214
+ payload['max'] = max;
25215
+ }
23938
25216
  if (typeof xdefault !== 'undefined') {
23939
25217
  payload['default'] = xdefault;
23940
25218
  }
@@ -23947,7 +25225,7 @@
23947
25225
  };
23948
25226
  return this.client.call('patch', uri, apiHeaders, payload);
23949
25227
  }
23950
- createEmailColumn(paramsOrFirst, ...rest) {
25228
+ createIpColumn(paramsOrFirst, ...rest) {
23951
25229
  let params;
23952
25230
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
23953
25231
  params = (paramsOrFirst || {});
@@ -23980,7 +25258,7 @@
23980
25258
  if (typeof required === 'undefined') {
23981
25259
  throw new AppwriteException('Missing required parameter: "required"');
23982
25260
  }
23983
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/email'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
25261
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/ip'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
23984
25262
  const payload = {};
23985
25263
  if (typeof key !== 'undefined') {
23986
25264
  payload['key'] = key;
@@ -24000,7 +25278,7 @@
24000
25278
  };
24001
25279
  return this.client.call('post', uri, apiHeaders, payload);
24002
25280
  }
24003
- updateEmailColumn(paramsOrFirst, ...rest) {
25281
+ updateIpColumn(paramsOrFirst, ...rest) {
24004
25282
  let params;
24005
25283
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
24006
25284
  params = (paramsOrFirst || {});
@@ -24036,7 +25314,7 @@
24036
25314
  if (typeof xdefault === 'undefined') {
24037
25315
  throw new AppwriteException('Missing required parameter: "xdefault"');
24038
25316
  }
24039
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/email/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
25317
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/ip/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
24040
25318
  const payload = {};
24041
25319
  if (typeof required !== 'undefined') {
24042
25320
  payload['required'] = required;
@@ -24053,7 +25331,7 @@
24053
25331
  };
24054
25332
  return this.client.call('patch', uri, apiHeaders, payload);
24055
25333
  }
24056
- createEnumColumn(paramsOrFirst, ...rest) {
25334
+ createLineColumn(paramsOrFirst, ...rest) {
24057
25335
  let params;
24058
25336
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
24059
25337
  params = (paramsOrFirst || {});
@@ -24063,19 +25341,15 @@
24063
25341
  databaseId: paramsOrFirst,
24064
25342
  tableId: rest[0],
24065
25343
  key: rest[1],
24066
- elements: rest[2],
24067
- required: rest[3],
24068
- xdefault: rest[4],
24069
- array: rest[5]
25344
+ required: rest[2],
25345
+ xdefault: rest[3]
24070
25346
  };
24071
25347
  }
24072
25348
  const databaseId = params.databaseId;
24073
25349
  const tableId = params.tableId;
24074
25350
  const key = params.key;
24075
- const elements = params.elements;
24076
25351
  const required = params.required;
24077
25352
  const xdefault = params.xdefault;
24078
- const array = params.array;
24079
25353
  if (typeof databaseId === 'undefined') {
24080
25354
  throw new AppwriteException('Missing required parameter: "databaseId"');
24081
25355
  }
@@ -24085,36 +25359,27 @@
24085
25359
  if (typeof key === 'undefined') {
24086
25360
  throw new AppwriteException('Missing required parameter: "key"');
24087
25361
  }
24088
- if (typeof elements === 'undefined') {
24089
- throw new AppwriteException('Missing required parameter: "elements"');
24090
- }
24091
25362
  if (typeof required === 'undefined') {
24092
25363
  throw new AppwriteException('Missing required parameter: "required"');
24093
25364
  }
24094
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/enum'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
25365
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/line'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
24095
25366
  const payload = {};
24096
25367
  if (typeof key !== 'undefined') {
24097
25368
  payload['key'] = key;
24098
25369
  }
24099
- if (typeof elements !== 'undefined') {
24100
- payload['elements'] = elements;
24101
- }
24102
25370
  if (typeof required !== 'undefined') {
24103
25371
  payload['required'] = required;
24104
25372
  }
24105
25373
  if (typeof xdefault !== 'undefined') {
24106
25374
  payload['default'] = xdefault;
24107
25375
  }
24108
- if (typeof array !== 'undefined') {
24109
- payload['array'] = array;
24110
- }
24111
25376
  const uri = new URL(this.client.config.endpoint + apiPath);
24112
25377
  const apiHeaders = {
24113
25378
  'content-type': 'application/json',
24114
25379
  };
24115
25380
  return this.client.call('post', uri, apiHeaders, payload);
24116
25381
  }
24117
- updateEnumColumn(paramsOrFirst, ...rest) {
25382
+ updateLineColumn(paramsOrFirst, ...rest) {
24118
25383
  let params;
24119
25384
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
24120
25385
  params = (paramsOrFirst || {});
@@ -24124,16 +25389,14 @@
24124
25389
  databaseId: paramsOrFirst,
24125
25390
  tableId: rest[0],
24126
25391
  key: rest[1],
24127
- elements: rest[2],
24128
- required: rest[3],
24129
- xdefault: rest[4],
24130
- newKey: rest[5]
25392
+ required: rest[2],
25393
+ xdefault: rest[3],
25394
+ newKey: rest[4]
24131
25395
  };
24132
25396
  }
24133
25397
  const databaseId = params.databaseId;
24134
25398
  const tableId = params.tableId;
24135
25399
  const key = params.key;
24136
- const elements = params.elements;
24137
25400
  const required = params.required;
24138
25401
  const xdefault = params.xdefault;
24139
25402
  const newKey = params.newKey;
@@ -24146,20 +25409,11 @@
24146
25409
  if (typeof key === 'undefined') {
24147
25410
  throw new AppwriteException('Missing required parameter: "key"');
24148
25411
  }
24149
- if (typeof elements === 'undefined') {
24150
- throw new AppwriteException('Missing required parameter: "elements"');
24151
- }
24152
25412
  if (typeof required === 'undefined') {
24153
25413
  throw new AppwriteException('Missing required parameter: "required"');
24154
25414
  }
24155
- if (typeof xdefault === 'undefined') {
24156
- throw new AppwriteException('Missing required parameter: "xdefault"');
24157
- }
24158
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/enum/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
25415
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/line/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
24159
25416
  const payload = {};
24160
- if (typeof elements !== 'undefined') {
24161
- payload['elements'] = elements;
24162
- }
24163
25417
  if (typeof required !== 'undefined') {
24164
25418
  payload['required'] = required;
24165
25419
  }
@@ -24175,7 +25429,7 @@
24175
25429
  };
24176
25430
  return this.client.call('patch', uri, apiHeaders, payload);
24177
25431
  }
24178
- createFloatColumn(paramsOrFirst, ...rest) {
25432
+ createLongtextColumn(paramsOrFirst, ...rest) {
24179
25433
  let params;
24180
25434
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
24181
25435
  params = (paramsOrFirst || {});
@@ -24186,18 +25440,14 @@
24186
25440
  tableId: rest[0],
24187
25441
  key: rest[1],
24188
25442
  required: rest[2],
24189
- min: rest[3],
24190
- max: rest[4],
24191
- xdefault: rest[5],
24192
- array: rest[6]
25443
+ xdefault: rest[3],
25444
+ array: rest[4]
24193
25445
  };
24194
25446
  }
24195
25447
  const databaseId = params.databaseId;
24196
25448
  const tableId = params.tableId;
24197
25449
  const key = params.key;
24198
25450
  const required = params.required;
24199
- const min = params.min;
24200
- const max = params.max;
24201
25451
  const xdefault = params.xdefault;
24202
25452
  const array = params.array;
24203
25453
  if (typeof databaseId === 'undefined') {
@@ -24212,7 +25462,7 @@
24212
25462
  if (typeof required === 'undefined') {
24213
25463
  throw new AppwriteException('Missing required parameter: "required"');
24214
25464
  }
24215
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/float'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
25465
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/longtext'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
24216
25466
  const payload = {};
24217
25467
  if (typeof key !== 'undefined') {
24218
25468
  payload['key'] = key;
@@ -24220,12 +25470,6 @@
24220
25470
  if (typeof required !== 'undefined') {
24221
25471
  payload['required'] = required;
24222
25472
  }
24223
- if (typeof min !== 'undefined') {
24224
- payload['min'] = min;
24225
- }
24226
- if (typeof max !== 'undefined') {
24227
- payload['max'] = max;
24228
- }
24229
25473
  if (typeof xdefault !== 'undefined') {
24230
25474
  payload['default'] = xdefault;
24231
25475
  }
@@ -24238,7 +25482,7 @@
24238
25482
  };
24239
25483
  return this.client.call('post', uri, apiHeaders, payload);
24240
25484
  }
24241
- updateFloatColumn(paramsOrFirst, ...rest) {
25485
+ updateLongtextColumn(paramsOrFirst, ...rest) {
24242
25486
  let params;
24243
25487
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
24244
25488
  params = (paramsOrFirst || {});
@@ -24250,9 +25494,7 @@
24250
25494
  key: rest[1],
24251
25495
  required: rest[2],
24252
25496
  xdefault: rest[3],
24253
- min: rest[4],
24254
- max: rest[5],
24255
- newKey: rest[6]
25497
+ newKey: rest[4]
24256
25498
  };
24257
25499
  }
24258
25500
  const databaseId = params.databaseId;
@@ -24260,8 +25502,6 @@
24260
25502
  const key = params.key;
24261
25503
  const required = params.required;
24262
25504
  const xdefault = params.xdefault;
24263
- const min = params.min;
24264
- const max = params.max;
24265
25505
  const newKey = params.newKey;
24266
25506
  if (typeof databaseId === 'undefined') {
24267
25507
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -24278,17 +25518,11 @@
24278
25518
  if (typeof xdefault === 'undefined') {
24279
25519
  throw new AppwriteException('Missing required parameter: "xdefault"');
24280
25520
  }
24281
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/float/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
25521
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/longtext/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
24282
25522
  const payload = {};
24283
25523
  if (typeof required !== 'undefined') {
24284
25524
  payload['required'] = required;
24285
25525
  }
24286
- if (typeof min !== 'undefined') {
24287
- payload['min'] = min;
24288
- }
24289
- if (typeof max !== 'undefined') {
24290
- payload['max'] = max;
24291
- }
24292
25526
  if (typeof xdefault !== 'undefined') {
24293
25527
  payload['default'] = xdefault;
24294
25528
  }
@@ -24301,7 +25535,7 @@
24301
25535
  };
24302
25536
  return this.client.call('patch', uri, apiHeaders, payload);
24303
25537
  }
24304
- createIntegerColumn(paramsOrFirst, ...rest) {
25538
+ createMediumtextColumn(paramsOrFirst, ...rest) {
24305
25539
  let params;
24306
25540
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
24307
25541
  params = (paramsOrFirst || {});
@@ -24312,18 +25546,14 @@
24312
25546
  tableId: rest[0],
24313
25547
  key: rest[1],
24314
25548
  required: rest[2],
24315
- min: rest[3],
24316
- max: rest[4],
24317
- xdefault: rest[5],
24318
- array: rest[6]
25549
+ xdefault: rest[3],
25550
+ array: rest[4]
24319
25551
  };
24320
25552
  }
24321
25553
  const databaseId = params.databaseId;
24322
25554
  const tableId = params.tableId;
24323
25555
  const key = params.key;
24324
25556
  const required = params.required;
24325
- const min = params.min;
24326
- const max = params.max;
24327
25557
  const xdefault = params.xdefault;
24328
25558
  const array = params.array;
24329
25559
  if (typeof databaseId === 'undefined') {
@@ -24338,7 +25568,7 @@
24338
25568
  if (typeof required === 'undefined') {
24339
25569
  throw new AppwriteException('Missing required parameter: "required"');
24340
25570
  }
24341
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/integer'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
25571
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/mediumtext'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
24342
25572
  const payload = {};
24343
25573
  if (typeof key !== 'undefined') {
24344
25574
  payload['key'] = key;
@@ -24346,12 +25576,6 @@
24346
25576
  if (typeof required !== 'undefined') {
24347
25577
  payload['required'] = required;
24348
25578
  }
24349
- if (typeof min !== 'undefined') {
24350
- payload['min'] = min;
24351
- }
24352
- if (typeof max !== 'undefined') {
24353
- payload['max'] = max;
24354
- }
24355
25579
  if (typeof xdefault !== 'undefined') {
24356
25580
  payload['default'] = xdefault;
24357
25581
  }
@@ -24364,7 +25588,7 @@
24364
25588
  };
24365
25589
  return this.client.call('post', uri, apiHeaders, payload);
24366
25590
  }
24367
- updateIntegerColumn(paramsOrFirst, ...rest) {
25591
+ updateMediumtextColumn(paramsOrFirst, ...rest) {
24368
25592
  let params;
24369
25593
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
24370
25594
  params = (paramsOrFirst || {});
@@ -24376,9 +25600,7 @@
24376
25600
  key: rest[1],
24377
25601
  required: rest[2],
24378
25602
  xdefault: rest[3],
24379
- min: rest[4],
24380
- max: rest[5],
24381
- newKey: rest[6]
25603
+ newKey: rest[4]
24382
25604
  };
24383
25605
  }
24384
25606
  const databaseId = params.databaseId;
@@ -24386,8 +25608,6 @@
24386
25608
  const key = params.key;
24387
25609
  const required = params.required;
24388
25610
  const xdefault = params.xdefault;
24389
- const min = params.min;
24390
- const max = params.max;
24391
25611
  const newKey = params.newKey;
24392
25612
  if (typeof databaseId === 'undefined') {
24393
25613
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -24404,17 +25624,11 @@
24404
25624
  if (typeof xdefault === 'undefined') {
24405
25625
  throw new AppwriteException('Missing required parameter: "xdefault"');
24406
25626
  }
24407
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/integer/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
25627
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/mediumtext/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
24408
25628
  const payload = {};
24409
25629
  if (typeof required !== 'undefined') {
24410
25630
  payload['required'] = required;
24411
25631
  }
24412
- if (typeof min !== 'undefined') {
24413
- payload['min'] = min;
24414
- }
24415
- if (typeof max !== 'undefined') {
24416
- payload['max'] = max;
24417
- }
24418
25632
  if (typeof xdefault !== 'undefined') {
24419
25633
  payload['default'] = xdefault;
24420
25634
  }
@@ -24427,7 +25641,7 @@
24427
25641
  };
24428
25642
  return this.client.call('patch', uri, apiHeaders, payload);
24429
25643
  }
24430
- createIpColumn(paramsOrFirst, ...rest) {
25644
+ createPointColumn(paramsOrFirst, ...rest) {
24431
25645
  let params;
24432
25646
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
24433
25647
  params = (paramsOrFirst || {});
@@ -24438,8 +25652,7 @@
24438
25652
  tableId: rest[0],
24439
25653
  key: rest[1],
24440
25654
  required: rest[2],
24441
- xdefault: rest[3],
24442
- array: rest[4]
25655
+ xdefault: rest[3]
24443
25656
  };
24444
25657
  }
24445
25658
  const databaseId = params.databaseId;
@@ -24447,7 +25660,6 @@
24447
25660
  const key = params.key;
24448
25661
  const required = params.required;
24449
25662
  const xdefault = params.xdefault;
24450
- const array = params.array;
24451
25663
  if (typeof databaseId === 'undefined') {
24452
25664
  throw new AppwriteException('Missing required parameter: "databaseId"');
24453
25665
  }
@@ -24460,7 +25672,7 @@
24460
25672
  if (typeof required === 'undefined') {
24461
25673
  throw new AppwriteException('Missing required parameter: "required"');
24462
25674
  }
24463
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/ip'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
25675
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/point'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
24464
25676
  const payload = {};
24465
25677
  if (typeof key !== 'undefined') {
24466
25678
  payload['key'] = key;
@@ -24471,16 +25683,13 @@
24471
25683
  if (typeof xdefault !== 'undefined') {
24472
25684
  payload['default'] = xdefault;
24473
25685
  }
24474
- if (typeof array !== 'undefined') {
24475
- payload['array'] = array;
24476
- }
24477
25686
  const uri = new URL(this.client.config.endpoint + apiPath);
24478
25687
  const apiHeaders = {
24479
25688
  'content-type': 'application/json',
24480
25689
  };
24481
25690
  return this.client.call('post', uri, apiHeaders, payload);
24482
25691
  }
24483
- updateIpColumn(paramsOrFirst, ...rest) {
25692
+ updatePointColumn(paramsOrFirst, ...rest) {
24484
25693
  let params;
24485
25694
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
24486
25695
  params = (paramsOrFirst || {});
@@ -24513,10 +25722,7 @@
24513
25722
  if (typeof required === 'undefined') {
24514
25723
  throw new AppwriteException('Missing required parameter: "required"');
24515
25724
  }
24516
- if (typeof xdefault === 'undefined') {
24517
- throw new AppwriteException('Missing required parameter: "xdefault"');
24518
- }
24519
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/ip/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
25725
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/point/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
24520
25726
  const payload = {};
24521
25727
  if (typeof required !== 'undefined') {
24522
25728
  payload['required'] = required;
@@ -24533,7 +25739,7 @@
24533
25739
  };
24534
25740
  return this.client.call('patch', uri, apiHeaders, payload);
24535
25741
  }
24536
- createLineColumn(paramsOrFirst, ...rest) {
25742
+ createPolygonColumn(paramsOrFirst, ...rest) {
24537
25743
  let params;
24538
25744
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
24539
25745
  params = (paramsOrFirst || {});
@@ -24564,7 +25770,7 @@
24564
25770
  if (typeof required === 'undefined') {
24565
25771
  throw new AppwriteException('Missing required parameter: "required"');
24566
25772
  }
24567
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/line'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
25773
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/polygon'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
24568
25774
  const payload = {};
24569
25775
  if (typeof key !== 'undefined') {
24570
25776
  payload['key'] = key;
@@ -24581,7 +25787,7 @@
24581
25787
  };
24582
25788
  return this.client.call('post', uri, apiHeaders, payload);
24583
25789
  }
24584
- updateLineColumn(paramsOrFirst, ...rest) {
25790
+ updatePolygonColumn(paramsOrFirst, ...rest) {
24585
25791
  let params;
24586
25792
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
24587
25793
  params = (paramsOrFirst || {});
@@ -24608,30 +25814,93 @@
24608
25814
  if (typeof tableId === 'undefined') {
24609
25815
  throw new AppwriteException('Missing required parameter: "tableId"');
24610
25816
  }
24611
- if (typeof key === 'undefined') {
24612
- throw new AppwriteException('Missing required parameter: "key"');
25817
+ if (typeof key === 'undefined') {
25818
+ throw new AppwriteException('Missing required parameter: "key"');
25819
+ }
25820
+ if (typeof required === 'undefined') {
25821
+ throw new AppwriteException('Missing required parameter: "required"');
25822
+ }
25823
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/polygon/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
25824
+ const payload = {};
25825
+ if (typeof required !== 'undefined') {
25826
+ payload['required'] = required;
25827
+ }
25828
+ if (typeof xdefault !== 'undefined') {
25829
+ payload['default'] = xdefault;
25830
+ }
25831
+ if (typeof newKey !== 'undefined') {
25832
+ payload['newKey'] = newKey;
25833
+ }
25834
+ const uri = new URL(this.client.config.endpoint + apiPath);
25835
+ const apiHeaders = {
25836
+ 'content-type': 'application/json',
25837
+ };
25838
+ return this.client.call('patch', uri, apiHeaders, payload);
25839
+ }
25840
+ createRelationshipColumn(paramsOrFirst, ...rest) {
25841
+ let params;
25842
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
25843
+ params = (paramsOrFirst || {});
25844
+ }
25845
+ else {
25846
+ params = {
25847
+ databaseId: paramsOrFirst,
25848
+ tableId: rest[0],
25849
+ relatedTableId: rest[1],
25850
+ type: rest[2],
25851
+ twoWay: rest[3],
25852
+ key: rest[4],
25853
+ twoWayKey: rest[5],
25854
+ onDelete: rest[6]
25855
+ };
25856
+ }
25857
+ const databaseId = params.databaseId;
25858
+ const tableId = params.tableId;
25859
+ const relatedTableId = params.relatedTableId;
25860
+ const type = params.type;
25861
+ const twoWay = params.twoWay;
25862
+ const key = params.key;
25863
+ const twoWayKey = params.twoWayKey;
25864
+ const onDelete = params.onDelete;
25865
+ if (typeof databaseId === 'undefined') {
25866
+ throw new AppwriteException('Missing required parameter: "databaseId"');
25867
+ }
25868
+ if (typeof tableId === 'undefined') {
25869
+ throw new AppwriteException('Missing required parameter: "tableId"');
25870
+ }
25871
+ if (typeof relatedTableId === 'undefined') {
25872
+ throw new AppwriteException('Missing required parameter: "relatedTableId"');
24613
25873
  }
24614
- if (typeof required === 'undefined') {
24615
- throw new AppwriteException('Missing required parameter: "required"');
25874
+ if (typeof type === 'undefined') {
25875
+ throw new AppwriteException('Missing required parameter: "type"');
24616
25876
  }
24617
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/line/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
25877
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/relationship'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
24618
25878
  const payload = {};
24619
- if (typeof required !== 'undefined') {
24620
- payload['required'] = required;
25879
+ if (typeof relatedTableId !== 'undefined') {
25880
+ payload['relatedTableId'] = relatedTableId;
24621
25881
  }
24622
- if (typeof xdefault !== 'undefined') {
24623
- payload['default'] = xdefault;
25882
+ if (typeof type !== 'undefined') {
25883
+ payload['type'] = type;
24624
25884
  }
24625
- if (typeof newKey !== 'undefined') {
24626
- payload['newKey'] = newKey;
25885
+ if (typeof twoWay !== 'undefined') {
25886
+ payload['twoWay'] = twoWay;
25887
+ }
25888
+ if (typeof key !== 'undefined') {
25889
+ payload['key'] = key;
25890
+ }
25891
+ if (typeof twoWayKey !== 'undefined') {
25892
+ payload['twoWayKey'] = twoWayKey;
25893
+ }
25894
+ if (typeof onDelete !== 'undefined') {
25895
+ payload['onDelete'] = onDelete;
24627
25896
  }
24628
25897
  const uri = new URL(this.client.config.endpoint + apiPath);
24629
25898
  const apiHeaders = {
24630
25899
  'content-type': 'application/json',
24631
25900
  };
24632
- return this.client.call('patch', uri, apiHeaders, payload);
25901
+ return this.client.call('post', uri, apiHeaders, payload);
24633
25902
  }
24634
- createPointColumn(paramsOrFirst, ...rest) {
25903
+ createStringColumn(paramsOrFirst, ...rest) {
24635
25904
  let params;
24636
25905
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
24637
25906
  params = (paramsOrFirst || {});
@@ -24641,15 +25910,21 @@
24641
25910
  databaseId: paramsOrFirst,
24642
25911
  tableId: rest[0],
24643
25912
  key: rest[1],
24644
- required: rest[2],
24645
- xdefault: rest[3]
25913
+ size: rest[2],
25914
+ required: rest[3],
25915
+ xdefault: rest[4],
25916
+ array: rest[5],
25917
+ encrypt: rest[6]
24646
25918
  };
24647
25919
  }
24648
25920
  const databaseId = params.databaseId;
24649
25921
  const tableId = params.tableId;
24650
25922
  const key = params.key;
25923
+ const size = params.size;
24651
25924
  const required = params.required;
24652
25925
  const xdefault = params.xdefault;
25926
+ const array = params.array;
25927
+ const encrypt = params.encrypt;
24653
25928
  if (typeof databaseId === 'undefined') {
24654
25929
  throw new AppwriteException('Missing required parameter: "databaseId"');
24655
25930
  }
@@ -24659,27 +25934,39 @@
24659
25934
  if (typeof key === 'undefined') {
24660
25935
  throw new AppwriteException('Missing required parameter: "key"');
24661
25936
  }
25937
+ if (typeof size === 'undefined') {
25938
+ throw new AppwriteException('Missing required parameter: "size"');
25939
+ }
24662
25940
  if (typeof required === 'undefined') {
24663
25941
  throw new AppwriteException('Missing required parameter: "required"');
24664
25942
  }
24665
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/point'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
25943
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/string'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
24666
25944
  const payload = {};
24667
25945
  if (typeof key !== 'undefined') {
24668
25946
  payload['key'] = key;
24669
25947
  }
25948
+ if (typeof size !== 'undefined') {
25949
+ payload['size'] = size;
25950
+ }
24670
25951
  if (typeof required !== 'undefined') {
24671
25952
  payload['required'] = required;
24672
25953
  }
24673
25954
  if (typeof xdefault !== 'undefined') {
24674
25955
  payload['default'] = xdefault;
24675
25956
  }
25957
+ if (typeof array !== 'undefined') {
25958
+ payload['array'] = array;
25959
+ }
25960
+ if (typeof encrypt !== 'undefined') {
25961
+ payload['encrypt'] = encrypt;
25962
+ }
24676
25963
  const uri = new URL(this.client.config.endpoint + apiPath);
24677
25964
  const apiHeaders = {
24678
25965
  'content-type': 'application/json',
24679
25966
  };
24680
25967
  return this.client.call('post', uri, apiHeaders, payload);
24681
25968
  }
24682
- updatePointColumn(paramsOrFirst, ...rest) {
25969
+ updateStringColumn(paramsOrFirst, ...rest) {
24683
25970
  let params;
24684
25971
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
24685
25972
  params = (paramsOrFirst || {});
@@ -24691,7 +25978,8 @@
24691
25978
  key: rest[1],
24692
25979
  required: rest[2],
24693
25980
  xdefault: rest[3],
24694
- newKey: rest[4]
25981
+ size: rest[4],
25982
+ newKey: rest[5]
24695
25983
  };
24696
25984
  }
24697
25985
  const databaseId = params.databaseId;
@@ -24699,6 +25987,7 @@
24699
25987
  const key = params.key;
24700
25988
  const required = params.required;
24701
25989
  const xdefault = params.xdefault;
25990
+ const size = params.size;
24702
25991
  const newKey = params.newKey;
24703
25992
  if (typeof databaseId === 'undefined') {
24704
25993
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -24712,7 +26001,10 @@
24712
26001
  if (typeof required === 'undefined') {
24713
26002
  throw new AppwriteException('Missing required parameter: "required"');
24714
26003
  }
24715
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/point/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
26004
+ if (typeof xdefault === 'undefined') {
26005
+ throw new AppwriteException('Missing required parameter: "xdefault"');
26006
+ }
26007
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/string/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
24716
26008
  const payload = {};
24717
26009
  if (typeof required !== 'undefined') {
24718
26010
  payload['required'] = required;
@@ -24720,6 +26012,9 @@
24720
26012
  if (typeof xdefault !== 'undefined') {
24721
26013
  payload['default'] = xdefault;
24722
26014
  }
26015
+ if (typeof size !== 'undefined') {
26016
+ payload['size'] = size;
26017
+ }
24723
26018
  if (typeof newKey !== 'undefined') {
24724
26019
  payload['newKey'] = newKey;
24725
26020
  }
@@ -24729,7 +26024,7 @@
24729
26024
  };
24730
26025
  return this.client.call('patch', uri, apiHeaders, payload);
24731
26026
  }
24732
- createPolygonColumn(paramsOrFirst, ...rest) {
26027
+ createTextColumn(paramsOrFirst, ...rest) {
24733
26028
  let params;
24734
26029
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
24735
26030
  params = (paramsOrFirst || {});
@@ -24740,7 +26035,8 @@
24740
26035
  tableId: rest[0],
24741
26036
  key: rest[1],
24742
26037
  required: rest[2],
24743
- xdefault: rest[3]
26038
+ xdefault: rest[3],
26039
+ array: rest[4]
24744
26040
  };
24745
26041
  }
24746
26042
  const databaseId = params.databaseId;
@@ -24748,6 +26044,7 @@
24748
26044
  const key = params.key;
24749
26045
  const required = params.required;
24750
26046
  const xdefault = params.xdefault;
26047
+ const array = params.array;
24751
26048
  if (typeof databaseId === 'undefined') {
24752
26049
  throw new AppwriteException('Missing required parameter: "databaseId"');
24753
26050
  }
@@ -24760,7 +26057,7 @@
24760
26057
  if (typeof required === 'undefined') {
24761
26058
  throw new AppwriteException('Missing required parameter: "required"');
24762
26059
  }
24763
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/polygon'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
26060
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/text'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
24764
26061
  const payload = {};
24765
26062
  if (typeof key !== 'undefined') {
24766
26063
  payload['key'] = key;
@@ -24771,13 +26068,16 @@
24771
26068
  if (typeof xdefault !== 'undefined') {
24772
26069
  payload['default'] = xdefault;
24773
26070
  }
26071
+ if (typeof array !== 'undefined') {
26072
+ payload['array'] = array;
26073
+ }
24774
26074
  const uri = new URL(this.client.config.endpoint + apiPath);
24775
26075
  const apiHeaders = {
24776
26076
  'content-type': 'application/json',
24777
26077
  };
24778
26078
  return this.client.call('post', uri, apiHeaders, payload);
24779
26079
  }
24780
- updatePolygonColumn(paramsOrFirst, ...rest) {
26080
+ updateTextColumn(paramsOrFirst, ...rest) {
24781
26081
  let params;
24782
26082
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
24783
26083
  params = (paramsOrFirst || {});
@@ -24810,7 +26110,10 @@
24810
26110
  if (typeof required === 'undefined') {
24811
26111
  throw new AppwriteException('Missing required parameter: "required"');
24812
26112
  }
24813
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/polygon/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
26113
+ if (typeof xdefault === 'undefined') {
26114
+ throw new AppwriteException('Missing required parameter: "xdefault"');
26115
+ }
26116
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/text/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
24814
26117
  const payload = {};
24815
26118
  if (typeof required !== 'undefined') {
24816
26119
  payload['required'] = required;
@@ -24827,70 +26130,7 @@
24827
26130
  };
24828
26131
  return this.client.call('patch', uri, apiHeaders, payload);
24829
26132
  }
24830
- createRelationshipColumn(paramsOrFirst, ...rest) {
24831
- let params;
24832
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
24833
- params = (paramsOrFirst || {});
24834
- }
24835
- else {
24836
- params = {
24837
- databaseId: paramsOrFirst,
24838
- tableId: rest[0],
24839
- relatedTableId: rest[1],
24840
- type: rest[2],
24841
- twoWay: rest[3],
24842
- key: rest[4],
24843
- twoWayKey: rest[5],
24844
- onDelete: rest[6]
24845
- };
24846
- }
24847
- const databaseId = params.databaseId;
24848
- const tableId = params.tableId;
24849
- const relatedTableId = params.relatedTableId;
24850
- const type = params.type;
24851
- const twoWay = params.twoWay;
24852
- const key = params.key;
24853
- const twoWayKey = params.twoWayKey;
24854
- const onDelete = params.onDelete;
24855
- if (typeof databaseId === 'undefined') {
24856
- throw new AppwriteException('Missing required parameter: "databaseId"');
24857
- }
24858
- if (typeof tableId === 'undefined') {
24859
- throw new AppwriteException('Missing required parameter: "tableId"');
24860
- }
24861
- if (typeof relatedTableId === 'undefined') {
24862
- throw new AppwriteException('Missing required parameter: "relatedTableId"');
24863
- }
24864
- if (typeof type === 'undefined') {
24865
- throw new AppwriteException('Missing required parameter: "type"');
24866
- }
24867
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/relationship'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
24868
- const payload = {};
24869
- if (typeof relatedTableId !== 'undefined') {
24870
- payload['relatedTableId'] = relatedTableId;
24871
- }
24872
- if (typeof type !== 'undefined') {
24873
- payload['type'] = type;
24874
- }
24875
- if (typeof twoWay !== 'undefined') {
24876
- payload['twoWay'] = twoWay;
24877
- }
24878
- if (typeof key !== 'undefined') {
24879
- payload['key'] = key;
24880
- }
24881
- if (typeof twoWayKey !== 'undefined') {
24882
- payload['twoWayKey'] = twoWayKey;
24883
- }
24884
- if (typeof onDelete !== 'undefined') {
24885
- payload['onDelete'] = onDelete;
24886
- }
24887
- const uri = new URL(this.client.config.endpoint + apiPath);
24888
- const apiHeaders = {
24889
- 'content-type': 'application/json',
24890
- };
24891
- return this.client.call('post', uri, apiHeaders, payload);
24892
- }
24893
- createStringColumn(paramsOrFirst, ...rest) {
26133
+ createUrlColumn(paramsOrFirst, ...rest) {
24894
26134
  let params;
24895
26135
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
24896
26136
  params = (paramsOrFirst || {});
@@ -24900,21 +26140,17 @@
24900
26140
  databaseId: paramsOrFirst,
24901
26141
  tableId: rest[0],
24902
26142
  key: rest[1],
24903
- size: rest[2],
24904
- required: rest[3],
24905
- xdefault: rest[4],
24906
- array: rest[5],
24907
- encrypt: rest[6]
26143
+ required: rest[2],
26144
+ xdefault: rest[3],
26145
+ array: rest[4]
24908
26146
  };
24909
26147
  }
24910
26148
  const databaseId = params.databaseId;
24911
26149
  const tableId = params.tableId;
24912
26150
  const key = params.key;
24913
- const size = params.size;
24914
26151
  const required = params.required;
24915
26152
  const xdefault = params.xdefault;
24916
26153
  const array = params.array;
24917
- const encrypt = params.encrypt;
24918
26154
  if (typeof databaseId === 'undefined') {
24919
26155
  throw new AppwriteException('Missing required parameter: "databaseId"');
24920
26156
  }
@@ -24924,20 +26160,14 @@
24924
26160
  if (typeof key === 'undefined') {
24925
26161
  throw new AppwriteException('Missing required parameter: "key"');
24926
26162
  }
24927
- if (typeof size === 'undefined') {
24928
- throw new AppwriteException('Missing required parameter: "size"');
24929
- }
24930
26163
  if (typeof required === 'undefined') {
24931
26164
  throw new AppwriteException('Missing required parameter: "required"');
24932
26165
  }
24933
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/string'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
26166
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/url'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
24934
26167
  const payload = {};
24935
26168
  if (typeof key !== 'undefined') {
24936
26169
  payload['key'] = key;
24937
26170
  }
24938
- if (typeof size !== 'undefined') {
24939
- payload['size'] = size;
24940
- }
24941
26171
  if (typeof required !== 'undefined') {
24942
26172
  payload['required'] = required;
24943
26173
  }
@@ -24947,16 +26177,13 @@
24947
26177
  if (typeof array !== 'undefined') {
24948
26178
  payload['array'] = array;
24949
26179
  }
24950
- if (typeof encrypt !== 'undefined') {
24951
- payload['encrypt'] = encrypt;
24952
- }
24953
26180
  const uri = new URL(this.client.config.endpoint + apiPath);
24954
26181
  const apiHeaders = {
24955
26182
  'content-type': 'application/json',
24956
26183
  };
24957
26184
  return this.client.call('post', uri, apiHeaders, payload);
24958
26185
  }
24959
- updateStringColumn(paramsOrFirst, ...rest) {
26186
+ updateUrlColumn(paramsOrFirst, ...rest) {
24960
26187
  let params;
24961
26188
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
24962
26189
  params = (paramsOrFirst || {});
@@ -24968,8 +26195,7 @@
24968
26195
  key: rest[1],
24969
26196
  required: rest[2],
24970
26197
  xdefault: rest[3],
24971
- size: rest[4],
24972
- newKey: rest[5]
26198
+ newKey: rest[4]
24973
26199
  };
24974
26200
  }
24975
26201
  const databaseId = params.databaseId;
@@ -24977,7 +26203,6 @@
24977
26203
  const key = params.key;
24978
26204
  const required = params.required;
24979
26205
  const xdefault = params.xdefault;
24980
- const size = params.size;
24981
26206
  const newKey = params.newKey;
24982
26207
  if (typeof databaseId === 'undefined') {
24983
26208
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -24994,7 +26219,7 @@
24994
26219
  if (typeof xdefault === 'undefined') {
24995
26220
  throw new AppwriteException('Missing required parameter: "xdefault"');
24996
26221
  }
24997
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/string/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
26222
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/url/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
24998
26223
  const payload = {};
24999
26224
  if (typeof required !== 'undefined') {
25000
26225
  payload['required'] = required;
@@ -25002,9 +26227,6 @@
25002
26227
  if (typeof xdefault !== 'undefined') {
25003
26228
  payload['default'] = xdefault;
25004
26229
  }
25005
- if (typeof size !== 'undefined') {
25006
- payload['size'] = size;
25007
- }
25008
26230
  if (typeof newKey !== 'undefined') {
25009
26231
  payload['newKey'] = newKey;
25010
26232
  }
@@ -25014,7 +26236,7 @@
25014
26236
  };
25015
26237
  return this.client.call('patch', uri, apiHeaders, payload);
25016
26238
  }
25017
- createUrlColumn(paramsOrFirst, ...rest) {
26239
+ createVarcharColumn(paramsOrFirst, ...rest) {
25018
26240
  let params;
25019
26241
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
25020
26242
  params = (paramsOrFirst || {});
@@ -25024,14 +26246,16 @@
25024
26246
  databaseId: paramsOrFirst,
25025
26247
  tableId: rest[0],
25026
26248
  key: rest[1],
25027
- required: rest[2],
25028
- xdefault: rest[3],
25029
- array: rest[4]
26249
+ size: rest[2],
26250
+ required: rest[3],
26251
+ xdefault: rest[4],
26252
+ array: rest[5]
25030
26253
  };
25031
26254
  }
25032
26255
  const databaseId = params.databaseId;
25033
26256
  const tableId = params.tableId;
25034
26257
  const key = params.key;
26258
+ const size = params.size;
25035
26259
  const required = params.required;
25036
26260
  const xdefault = params.xdefault;
25037
26261
  const array = params.array;
@@ -25044,14 +26268,20 @@
25044
26268
  if (typeof key === 'undefined') {
25045
26269
  throw new AppwriteException('Missing required parameter: "key"');
25046
26270
  }
26271
+ if (typeof size === 'undefined') {
26272
+ throw new AppwriteException('Missing required parameter: "size"');
26273
+ }
25047
26274
  if (typeof required === 'undefined') {
25048
26275
  throw new AppwriteException('Missing required parameter: "required"');
25049
26276
  }
25050
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/url'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
26277
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/varchar'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
25051
26278
  const payload = {};
25052
26279
  if (typeof key !== 'undefined') {
25053
26280
  payload['key'] = key;
25054
26281
  }
26282
+ if (typeof size !== 'undefined') {
26283
+ payload['size'] = size;
26284
+ }
25055
26285
  if (typeof required !== 'undefined') {
25056
26286
  payload['required'] = required;
25057
26287
  }
@@ -25067,7 +26297,7 @@
25067
26297
  };
25068
26298
  return this.client.call('post', uri, apiHeaders, payload);
25069
26299
  }
25070
- updateUrlColumn(paramsOrFirst, ...rest) {
26300
+ updateVarcharColumn(paramsOrFirst, ...rest) {
25071
26301
  let params;
25072
26302
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
25073
26303
  params = (paramsOrFirst || {});
@@ -25079,7 +26309,8 @@
25079
26309
  key: rest[1],
25080
26310
  required: rest[2],
25081
26311
  xdefault: rest[3],
25082
- newKey: rest[4]
26312
+ size: rest[4],
26313
+ newKey: rest[5]
25083
26314
  };
25084
26315
  }
25085
26316
  const databaseId = params.databaseId;
@@ -25087,6 +26318,7 @@
25087
26318
  const key = params.key;
25088
26319
  const required = params.required;
25089
26320
  const xdefault = params.xdefault;
26321
+ const size = params.size;
25090
26322
  const newKey = params.newKey;
25091
26323
  if (typeof databaseId === 'undefined') {
25092
26324
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -25103,7 +26335,7 @@
25103
26335
  if (typeof xdefault === 'undefined') {
25104
26336
  throw new AppwriteException('Missing required parameter: "xdefault"');
25105
26337
  }
25106
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/url/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
26338
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/varchar/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
25107
26339
  const payload = {};
25108
26340
  if (typeof required !== 'undefined') {
25109
26341
  payload['required'] = required;
@@ -25111,6 +26343,9 @@
25111
26343
  if (typeof xdefault !== 'undefined') {
25112
26344
  payload['default'] = xdefault;
25113
26345
  }
26346
+ if (typeof size !== 'undefined') {
26347
+ payload['size'] = size;
26348
+ }
25114
26349
  if (typeof newKey !== 'undefined') {
25115
26350
  payload['newKey'] = newKey;
25116
26351
  }
@@ -28681,11 +29916,31 @@
28681
29916
  sleep(ms) {
28682
29917
  return new Promise(resolve => setTimeout(resolve, ms));
28683
29918
  }
29919
+ /**
29920
+ * Convert a channel value to a string
29921
+ *
29922
+ * @private
29923
+ * @param {string | Channel<any> | ActionableChannel | ResolvedChannel} channel - Channel value (string or Channel builder instance)
29924
+ * @returns {string} Channel string representation
29925
+ */
29926
+ channelToString(channel) {
29927
+ if (typeof channel === 'string') {
29928
+ return channel;
29929
+ }
29930
+ // All Channel instances have toString() method
29931
+ if (channel && typeof channel.toString === 'function') {
29932
+ return channel.toString();
29933
+ }
29934
+ return String(channel);
29935
+ }
28684
29936
  subscribe(channelsOrChannel, callback) {
28685
29937
  return __awaiter(this, void 0, void 0, function* () {
28686
- const channels = Array.isArray(channelsOrChannel)
28687
- ? new Set(channelsOrChannel)
28688
- : new Set([channelsOrChannel]);
29938
+ const channelArray = Array.isArray(channelsOrChannel)
29939
+ ? channelsOrChannel
29940
+ : [channelsOrChannel];
29941
+ // Convert all channels to strings
29942
+ const channelStrings = channelArray.map(ch => this.channelToString(ch));
29943
+ const channels = new Set(channelStrings);
28689
29944
  this.subscriptionsCounter++;
28690
29945
  const count = this.subscriptionsCounter;
28691
29946
  for (const channel of channels) {
@@ -28989,6 +30244,99 @@
28989
30244
  return hexTimestamp;
28990
30245
  };
28991
30246
 
30247
+ function normalize(id) {
30248
+ const trimmed = id.trim();
30249
+ return trimmed === "" ? "*" : trimmed;
30250
+ }
30251
+ class Channel {
30252
+ constructor(segments) {
30253
+ this.segments = segments;
30254
+ }
30255
+ next(segment, id = "*") {
30256
+ return new Channel([...this.segments, segment, normalize(id)]);
30257
+ }
30258
+ resolve(action) {
30259
+ return new Channel([...this.segments, action]);
30260
+ }
30261
+ toString() {
30262
+ return this.segments.join(".");
30263
+ }
30264
+ // --- DATABASE ROUTE ---
30265
+ // Only available on Channel<Database>
30266
+ collection(id = "*") {
30267
+ return this.next("collections", id);
30268
+ }
30269
+ // Only available on Channel<Collection>
30270
+ document(id = "*") {
30271
+ return this.next("documents", id);
30272
+ }
30273
+ // --- TABLESDB ROUTE ---
30274
+ table(id = "*") {
30275
+ return this.next("tables", id);
30276
+ }
30277
+ row(id = "*") {
30278
+ return this.next("rows", id);
30279
+ }
30280
+ // --- BUCKET ROUTE ---
30281
+ file(id = "*") {
30282
+ return this.next("files", id);
30283
+ }
30284
+ // --- FUNCTION ROUTE ---
30285
+ execution(id = "*") {
30286
+ return this.next("executions", id);
30287
+ }
30288
+ // --- TERMINAL ACTIONS ---
30289
+ // Restricted to the Actionable union
30290
+ create() {
30291
+ return this.resolve("create");
30292
+ }
30293
+ update() {
30294
+ return this.resolve("update");
30295
+ }
30296
+ delete() {
30297
+ return this.resolve("delete");
30298
+ }
30299
+ // --- ROOT FACTORIES ---
30300
+ static database(id = "*") {
30301
+ return new Channel(["databases", normalize(id)]);
30302
+ }
30303
+ static tablesdb(id = "*") {
30304
+ return new Channel(["tablesdb", normalize(id)]);
30305
+ }
30306
+ static bucket(id = "*") {
30307
+ return new Channel(["buckets", normalize(id)]);
30308
+ }
30309
+ static function(id = "*") {
30310
+ return new Channel(["functions", normalize(id)]);
30311
+ }
30312
+ static team(id = "*") {
30313
+ return new Channel(["teams", normalize(id)]);
30314
+ }
30315
+ static membership(id = "*") {
30316
+ return new Channel(["memberships", normalize(id)]);
30317
+ }
30318
+ static account(userId = "") {
30319
+ const id = normalize(userId);
30320
+ return id === "*" ? "account" : `account.${id}`;
30321
+ }
30322
+ // Global events
30323
+ static documents() {
30324
+ return "documents";
30325
+ }
30326
+ static rows() {
30327
+ return "rows";
30328
+ }
30329
+ static files() {
30330
+ return "files";
30331
+ }
30332
+ static executions() {
30333
+ return "executions";
30334
+ }
30335
+ static teams() {
30336
+ return "teams";
30337
+ }
30338
+ }
30339
+
28992
30340
  exports.Condition = void 0;
28993
30341
  (function (Condition) {
28994
30342
  Condition["Equal"] = "equal";
@@ -29254,6 +30602,73 @@
29254
30602
  */
29255
30603
  Operator.dateSetNow = () => new Operator("dateSetNow", []).toString();
29256
30604
 
30605
+ exports.Scopes = void 0;
30606
+ (function (Scopes) {
30607
+ Scopes["SessionsWrite"] = "sessions.write";
30608
+ Scopes["UsersRead"] = "users.read";
30609
+ Scopes["UsersWrite"] = "users.write";
30610
+ Scopes["TeamsRead"] = "teams.read";
30611
+ Scopes["TeamsWrite"] = "teams.write";
30612
+ Scopes["DatabasesRead"] = "databases.read";
30613
+ Scopes["DatabasesWrite"] = "databases.write";
30614
+ Scopes["CollectionsRead"] = "collections.read";
30615
+ Scopes["CollectionsWrite"] = "collections.write";
30616
+ Scopes["TablesRead"] = "tables.read";
30617
+ Scopes["TablesWrite"] = "tables.write";
30618
+ Scopes["AttributesRead"] = "attributes.read";
30619
+ Scopes["AttributesWrite"] = "attributes.write";
30620
+ Scopes["ColumnsRead"] = "columns.read";
30621
+ Scopes["ColumnsWrite"] = "columns.write";
30622
+ Scopes["IndexesRead"] = "indexes.read";
30623
+ Scopes["IndexesWrite"] = "indexes.write";
30624
+ Scopes["DocumentsRead"] = "documents.read";
30625
+ Scopes["DocumentsWrite"] = "documents.write";
30626
+ Scopes["RowsRead"] = "rows.read";
30627
+ Scopes["RowsWrite"] = "rows.write";
30628
+ Scopes["FilesRead"] = "files.read";
30629
+ Scopes["FilesWrite"] = "files.write";
30630
+ Scopes["BucketsRead"] = "buckets.read";
30631
+ Scopes["BucketsWrite"] = "buckets.write";
30632
+ Scopes["FunctionsRead"] = "functions.read";
30633
+ Scopes["FunctionsWrite"] = "functions.write";
30634
+ Scopes["SitesRead"] = "sites.read";
30635
+ Scopes["SitesWrite"] = "sites.write";
30636
+ Scopes["LogRead"] = "log.read";
30637
+ Scopes["LogWrite"] = "log.write";
30638
+ Scopes["ExecutionRead"] = "execution.read";
30639
+ Scopes["ExecutionWrite"] = "execution.write";
30640
+ Scopes["LocaleRead"] = "locale.read";
30641
+ Scopes["AvatarsRead"] = "avatars.read";
30642
+ Scopes["HealthRead"] = "health.read";
30643
+ Scopes["ProvidersRead"] = "providers.read";
30644
+ Scopes["ProvidersWrite"] = "providers.write";
30645
+ Scopes["MessagesRead"] = "messages.read";
30646
+ Scopes["MessagesWrite"] = "messages.write";
30647
+ Scopes["TopicsRead"] = "topics.read";
30648
+ Scopes["TopicsWrite"] = "topics.write";
30649
+ Scopes["SubscribersRead"] = "subscribers.read";
30650
+ Scopes["SubscribersWrite"] = "subscribers.write";
30651
+ Scopes["TargetsRead"] = "targets.read";
30652
+ Scopes["TargetsWrite"] = "targets.write";
30653
+ Scopes["RulesRead"] = "rules.read";
30654
+ Scopes["RulesWrite"] = "rules.write";
30655
+ Scopes["MigrationsRead"] = "migrations.read";
30656
+ Scopes["MigrationsWrite"] = "migrations.write";
30657
+ Scopes["VcsRead"] = "vcs.read";
30658
+ Scopes["VcsWrite"] = "vcs.write";
30659
+ Scopes["AssistantRead"] = "assistant.read";
30660
+ Scopes["TokensRead"] = "tokens.read";
30661
+ Scopes["TokensWrite"] = "tokens.write";
30662
+ Scopes["PoliciesWrite"] = "policies.write";
30663
+ Scopes["PoliciesRead"] = "policies.read";
30664
+ Scopes["ArchivesRead"] = "archives.read";
30665
+ Scopes["ArchivesWrite"] = "archives.write";
30666
+ Scopes["RestorationsRead"] = "restorations.read";
30667
+ Scopes["RestorationsWrite"] = "restorations.write";
30668
+ Scopes["DomainsRead"] = "domains.read";
30669
+ Scopes["DomainsWrite"] = "domains.write";
30670
+ })(exports.Scopes || (exports.Scopes = {}));
30671
+
29257
30672
  exports.AuthenticatorType = void 0;
29258
30673
  (function (AuthenticatorType) {
29259
30674
  AuthenticatorType["Totp"] = "totp";
@@ -29979,6 +31394,30 @@
29979
31394
  Timezone["Utc"] = "utc";
29980
31395
  })(exports.Timezone || (exports.Timezone = {}));
29981
31396
 
31397
+ exports.BrowserPermission = void 0;
31398
+ (function (BrowserPermission) {
31399
+ BrowserPermission["Geolocation"] = "geolocation";
31400
+ BrowserPermission["Camera"] = "camera";
31401
+ BrowserPermission["Microphone"] = "microphone";
31402
+ BrowserPermission["Notifications"] = "notifications";
31403
+ BrowserPermission["Midi"] = "midi";
31404
+ BrowserPermission["Push"] = "push";
31405
+ BrowserPermission["Clipboardread"] = "clipboard-read";
31406
+ BrowserPermission["Clipboardwrite"] = "clipboard-write";
31407
+ BrowserPermission["Paymenthandler"] = "payment-handler";
31408
+ BrowserPermission["Usb"] = "usb";
31409
+ BrowserPermission["Bluetooth"] = "bluetooth";
31410
+ BrowserPermission["Accelerometer"] = "accelerometer";
31411
+ BrowserPermission["Gyroscope"] = "gyroscope";
31412
+ BrowserPermission["Magnetometer"] = "magnetometer";
31413
+ BrowserPermission["Ambientlightsensor"] = "ambient-light-sensor";
31414
+ BrowserPermission["Backgroundsync"] = "background-sync";
31415
+ BrowserPermission["Persistentstorage"] = "persistent-storage";
31416
+ BrowserPermission["Screenwakelock"] = "screen-wake-lock";
31417
+ BrowserPermission["Webshare"] = "web-share";
31418
+ BrowserPermission["Xrspatialtracking"] = "xr-spatial-tracking";
31419
+ })(exports.BrowserPermission || (exports.BrowserPermission = {}));
31420
+
29982
31421
  exports.ImageFormat = void 0;
29983
31422
  (function (ImageFormat) {
29984
31423
  ImageFormat["Jpg"] = "jpg";
@@ -29990,6 +31429,13 @@
29990
31429
  ImageFormat["Gif"] = "gif";
29991
31430
  })(exports.ImageFormat || (exports.ImageFormat = {}));
29992
31431
 
31432
+ exports.Services = void 0;
31433
+ (function (Services) {
31434
+ Services["Databases"] = "databases";
31435
+ Services["Functions"] = "functions";
31436
+ Services["Storage"] = "storage";
31437
+ })(exports.Services || (exports.Services = {}));
31438
+
29993
31439
  exports.Platform = void 0;
29994
31440
  (function (Platform) {
29995
31441
  Platform["Appwrite"] = "appwrite";
@@ -30031,6 +31477,12 @@
30031
31477
  IndexType["Spatial"] = "spatial";
30032
31478
  })(exports.IndexType || (exports.IndexType = {}));
30033
31479
 
31480
+ exports.OrderBy = void 0;
31481
+ (function (OrderBy) {
31482
+ OrderBy["Asc"] = "asc";
31483
+ OrderBy["Desc"] = "desc";
31484
+ })(exports.OrderBy || (exports.OrderBy = {}));
31485
+
30034
31486
  exports.FilterType = void 0;
30035
31487
  (function (FilterType) {
30036
31488
  FilterType["Premium"] = "premium";
@@ -30105,6 +31557,87 @@
30105
31557
  Runtime["Flutter335"] = "flutter-3.35";
30106
31558
  })(exports.Runtime || (exports.Runtime = {}));
30107
31559
 
31560
+ exports.Runtimes = void 0;
31561
+ (function (Runtimes) {
31562
+ Runtimes["Node145"] = "node-14.5";
31563
+ Runtimes["Node160"] = "node-16.0";
31564
+ Runtimes["Node180"] = "node-18.0";
31565
+ Runtimes["Node190"] = "node-19.0";
31566
+ Runtimes["Node200"] = "node-20.0";
31567
+ Runtimes["Node210"] = "node-21.0";
31568
+ Runtimes["Node22"] = "node-22";
31569
+ Runtimes["Php80"] = "php-8.0";
31570
+ Runtimes["Php81"] = "php-8.1";
31571
+ Runtimes["Php82"] = "php-8.2";
31572
+ Runtimes["Php83"] = "php-8.3";
31573
+ Runtimes["Ruby30"] = "ruby-3.0";
31574
+ Runtimes["Ruby31"] = "ruby-3.1";
31575
+ Runtimes["Ruby32"] = "ruby-3.2";
31576
+ Runtimes["Ruby33"] = "ruby-3.3";
31577
+ Runtimes["Python38"] = "python-3.8";
31578
+ Runtimes["Python39"] = "python-3.9";
31579
+ Runtimes["Python310"] = "python-3.10";
31580
+ Runtimes["Python311"] = "python-3.11";
31581
+ Runtimes["Python312"] = "python-3.12";
31582
+ Runtimes["Pythonml311"] = "python-ml-3.11";
31583
+ Runtimes["Pythonml312"] = "python-ml-3.12";
31584
+ Runtimes["Deno140"] = "deno-1.40";
31585
+ Runtimes["Deno146"] = "deno-1.46";
31586
+ Runtimes["Deno20"] = "deno-2.0";
31587
+ Runtimes["Dart215"] = "dart-2.15";
31588
+ Runtimes["Dart216"] = "dart-2.16";
31589
+ Runtimes["Dart217"] = "dart-2.17";
31590
+ Runtimes["Dart218"] = "dart-2.18";
31591
+ Runtimes["Dart219"] = "dart-2.19";
31592
+ Runtimes["Dart30"] = "dart-3.0";
31593
+ Runtimes["Dart31"] = "dart-3.1";
31594
+ Runtimes["Dart33"] = "dart-3.3";
31595
+ Runtimes["Dart35"] = "dart-3.5";
31596
+ Runtimes["Dart38"] = "dart-3.8";
31597
+ Runtimes["Dart39"] = "dart-3.9";
31598
+ Runtimes["Dotnet60"] = "dotnet-6.0";
31599
+ Runtimes["Dotnet70"] = "dotnet-7.0";
31600
+ Runtimes["Dotnet80"] = "dotnet-8.0";
31601
+ Runtimes["Java80"] = "java-8.0";
31602
+ Runtimes["Java110"] = "java-11.0";
31603
+ Runtimes["Java170"] = "java-17.0";
31604
+ Runtimes["Java180"] = "java-18.0";
31605
+ Runtimes["Java210"] = "java-21.0";
31606
+ Runtimes["Java22"] = "java-22";
31607
+ Runtimes["Swift55"] = "swift-5.5";
31608
+ Runtimes["Swift58"] = "swift-5.8";
31609
+ Runtimes["Swift59"] = "swift-5.9";
31610
+ Runtimes["Swift510"] = "swift-5.10";
31611
+ Runtimes["Kotlin16"] = "kotlin-1.6";
31612
+ Runtimes["Kotlin18"] = "kotlin-1.8";
31613
+ Runtimes["Kotlin19"] = "kotlin-1.9";
31614
+ Runtimes["Kotlin20"] = "kotlin-2.0";
31615
+ Runtimes["Cpp17"] = "cpp-17";
31616
+ Runtimes["Cpp20"] = "cpp-20";
31617
+ Runtimes["Bun10"] = "bun-1.0";
31618
+ Runtimes["Bun11"] = "bun-1.1";
31619
+ Runtimes["Go123"] = "go-1.23";
31620
+ Runtimes["Static1"] = "static-1";
31621
+ Runtimes["Flutter324"] = "flutter-3.24";
31622
+ Runtimes["Flutter327"] = "flutter-3.27";
31623
+ Runtimes["Flutter329"] = "flutter-3.29";
31624
+ Runtimes["Flutter332"] = "flutter-3.32";
31625
+ Runtimes["Flutter335"] = "flutter-3.35";
31626
+ })(exports.Runtimes || (exports.Runtimes = {}));
31627
+
31628
+ exports.UseCases = void 0;
31629
+ (function (UseCases) {
31630
+ UseCases["Portfolio"] = "portfolio";
31631
+ UseCases["Starter"] = "starter";
31632
+ UseCases["Events"] = "events";
31633
+ UseCases["Ecommerce"] = "ecommerce";
31634
+ UseCases["Documentation"] = "documentation";
31635
+ UseCases["Blog"] = "blog";
31636
+ UseCases["Ai"] = "ai";
31637
+ UseCases["Forms"] = "forms";
31638
+ UseCases["Dashboard"] = "dashboard";
31639
+ })(exports.UseCases || (exports.UseCases = {}));
31640
+
30108
31641
  exports.TemplateReferenceType = void 0;
30109
31642
  (function (TemplateReferenceType) {
30110
31643
  TemplateReferenceType["Branch"] = "branch";
@@ -30166,24 +31699,20 @@
30166
31699
  SmtpEncryption["Tls"] = "tls";
30167
31700
  })(exports.SmtpEncryption || (exports.SmtpEncryption = {}));
30168
31701
 
30169
- exports.BillingPlan = void 0;
30170
- (function (BillingPlan) {
30171
- BillingPlan["Tier0"] = "tier-0";
30172
- BillingPlan["Tier1"] = "tier-1";
30173
- BillingPlan["Tier2"] = "tier-2";
30174
- BillingPlan["Imaginetier0"] = "imagine-tier-0";
30175
- BillingPlan["Imaginetier1"] = "imagine-tier-1";
30176
- BillingPlan["Imaginetier150"] = "imagine-tier-1-50";
30177
- BillingPlan["Imaginetier1100"] = "imagine-tier-1-100";
30178
- BillingPlan["Imaginetier1200"] = "imagine-tier-1-200";
30179
- BillingPlan["Imaginetier1290"] = "imagine-tier-1-290";
30180
- BillingPlan["Imaginetier1480"] = "imagine-tier-1-480";
30181
- BillingPlan["Imaginetier1700"] = "imagine-tier-1-700";
30182
- BillingPlan["Imaginetier1900"] = "imagine-tier-1-900";
30183
- BillingPlan["Imaginetier11100"] = "imagine-tier-1-1100";
30184
- BillingPlan["Imaginetier11650"] = "imagine-tier-1-1650";
30185
- BillingPlan["Imaginetier12200"] = "imagine-tier-1-2200";
30186
- })(exports.BillingPlan || (exports.BillingPlan = {}));
31702
+ exports.Resources = void 0;
31703
+ (function (Resources) {
31704
+ Resources["User"] = "user";
31705
+ Resources["Database"] = "database";
31706
+ Resources["Table"] = "table";
31707
+ Resources["Column"] = "column";
31708
+ Resources["Index"] = "index";
31709
+ Resources["Row"] = "row";
31710
+ Resources["Document"] = "document";
31711
+ Resources["Attribute"] = "attribute";
31712
+ Resources["Collection"] = "collection";
31713
+ Resources["Bucket"] = "bucket";
31714
+ Resources["File"] = "file";
31715
+ })(exports.Resources || (exports.Resources = {}));
30187
31716
 
30188
31717
  exports.ProjectUsageRange = void 0;
30189
31718
  (function (ProjectUsageRange) {
@@ -30663,6 +32192,25 @@
30663
32192
  Adapter["Ssr"] = "ssr";
30664
32193
  })(exports.Adapter || (exports.Adapter = {}));
30665
32194
 
32195
+ exports.Frameworks = void 0;
32196
+ (function (Frameworks) {
32197
+ Frameworks["Analog"] = "analog";
32198
+ Frameworks["Angular"] = "angular";
32199
+ Frameworks["Nextjs"] = "nextjs";
32200
+ Frameworks["React"] = "react";
32201
+ Frameworks["Nuxt"] = "nuxt";
32202
+ Frameworks["Vue"] = "vue";
32203
+ Frameworks["Sveltekit"] = "sveltekit";
32204
+ Frameworks["Astro"] = "astro";
32205
+ Frameworks["Tanstackstart"] = "tanstack-start";
32206
+ Frameworks["Remix"] = "remix";
32207
+ Frameworks["Lynx"] = "lynx";
32208
+ Frameworks["Flutter"] = "flutter";
32209
+ Frameworks["Reactnative"] = "react-native";
32210
+ Frameworks["Vite"] = "vite";
32211
+ Frameworks["Other"] = "other";
32212
+ })(exports.Frameworks || (exports.Frameworks = {}));
32213
+
30666
32214
  exports.Compression = void 0;
30667
32215
  (function (Compression) {
30668
32216
  Compression["None"] = "none";
@@ -30683,6 +32231,15 @@
30683
32231
  ImageGravity["Bottomright"] = "bottom-right";
30684
32232
  })(exports.ImageGravity || (exports.ImageGravity = {}));
30685
32233
 
32234
+ exports.Roles = void 0;
32235
+ (function (Roles) {
32236
+ Roles["Developer"] = "developer";
32237
+ Roles["Editor"] = "editor";
32238
+ Roles["Analyst"] = "analyst";
32239
+ Roles["Billing"] = "billing";
32240
+ Roles["Owner"] = "owner";
32241
+ })(exports.Roles || (exports.Roles = {}));
32242
+
30686
32243
  exports.PasswordHash = void 0;
30687
32244
  (function (PasswordHash) {
30688
32245
  PasswordHash["Sha1"] = "sha1";
@@ -30750,6 +32307,7 @@
30750
32307
  DeploymentStatus["Processing"] = "processing";
30751
32308
  DeploymentStatus["Building"] = "building";
30752
32309
  DeploymentStatus["Ready"] = "ready";
32310
+ DeploymentStatus["Canceled"] = "canceled";
30753
32311
  DeploymentStatus["Failed"] = "failed";
30754
32312
  })(exports.DeploymentStatus || (exports.DeploymentStatus = {}));
30755
32313
 
@@ -30817,6 +32375,7 @@
30817
32375
  exports.Assistant = Assistant;
30818
32376
  exports.Avatars = Avatars;
30819
32377
  exports.Backups = Backups;
32378
+ exports.Channel = Channel;
30820
32379
  exports.Client = Client;
30821
32380
  exports.Console = Console;
30822
32381
  exports.Databases = Databases;