@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/cjs/sdk.js CHANGED
@@ -1,10 +1,12 @@
1
1
  'use strict';
2
2
 
3
3
  var JSONbigModule = require('json-bigint');
4
+ var BigNumber = require('bignumber.js');
4
5
 
5
6
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
6
7
 
7
8
  var JSONbigModule__default = /*#__PURE__*/_interopDefaultLegacy(JSONbigModule);
9
+ var BigNumber__default = /*#__PURE__*/_interopDefaultLegacy(BigNumber);
8
10
 
9
11
  /******************************************************************************
10
12
  Copyright (c) Microsoft Corporation.
@@ -90,6 +92,14 @@ Query.equal = (attribute, value) => new Query("equal", attribute, value).toStrin
90
92
  * @returns {string}
91
93
  */
92
94
  Query.notEqual = (attribute, value) => new Query("notEqual", attribute, value).toString();
95
+ /**
96
+ * Filter resources where attribute matches a regular expression pattern.
97
+ *
98
+ * @param {string} attribute The attribute to filter on.
99
+ * @param {string} pattern The regular expression pattern to match.
100
+ * @returns {string}
101
+ */
102
+ Query.regex = (attribute, pattern) => new Query("regex", attribute, pattern).toString();
93
103
  /**
94
104
  * Filter resources where attribute is less than value.
95
105
  *
@@ -136,6 +146,20 @@ Query.isNull = (attribute) => new Query("isNull", attribute).toString();
136
146
  * @returns {string}
137
147
  */
138
148
  Query.isNotNull = (attribute) => new Query("isNotNull", attribute).toString();
149
+ /**
150
+ * Filter resources where the specified attributes exist.
151
+ *
152
+ * @param {string[]} attributes The list of attributes that must exist.
153
+ * @returns {string}
154
+ */
155
+ Query.exists = (attributes) => new Query("exists", undefined, attributes).toString();
156
+ /**
157
+ * Filter resources where the specified attributes do not exist.
158
+ *
159
+ * @param {string[]} attributes The list of attributes that must not exist.
160
+ * @returns {string}
161
+ */
162
+ Query.notExists = (attributes) => new Query("notExists", undefined, attributes).toString();
139
163
  /**
140
164
  * Filter resources where attribute is between start and end (inclusive).
141
165
  *
@@ -333,6 +357,14 @@ Query.or = (queries) => new Query("or", undefined, queries.map((query) => JSONbi
333
357
  * @returns {string}
334
358
  */
335
359
  Query.and = (queries) => new Query("and", undefined, queries.map((query) => JSONbig$1.parse(query))).toString();
360
+ /**
361
+ * Filter array elements where at least one element matches all the specified queries.
362
+ *
363
+ * @param {string} attribute The attribute containing the array to filter on.
364
+ * @param {string[]} queries The list of query strings to match against array elements.
365
+ * @returns {string}
366
+ */
367
+ Query.elemMatch = (attribute, queries) => new Query("elemMatch", attribute, queries.map((query) => JSONbig$1.parse(query))).toString();
336
368
  /**
337
369
  * Filter resources where attribute is at a specific distance from the given coordinates.
338
370
  *
@@ -438,7 +470,28 @@ Query.touches = (attribute, values) => new Query("touches", attribute, [values])
438
470
  */
439
471
  Query.notTouches = (attribute, values) => new Query("notTouches", attribute, [values]).toString();
440
472
 
441
- const JSONbig = JSONbigModule__default["default"]({ useNativeBigInt: true });
473
+ const JSONbigParser = JSONbigModule__default["default"]({ storeAsString: false });
474
+ const JSONbigSerializer = JSONbigModule__default["default"]({ useNativeBigInt: true });
475
+ const MAX_SAFE = BigInt(Number.MAX_SAFE_INTEGER);
476
+ const MIN_SAFE = BigInt(Number.MIN_SAFE_INTEGER);
477
+ function reviver(_key, value) {
478
+ if (BigNumber__default["default"].isBigNumber(value)) {
479
+ if (value.isInteger()) {
480
+ const str = value.toFixed();
481
+ const bi = BigInt(str);
482
+ if (bi >= MIN_SAFE && bi <= MAX_SAFE) {
483
+ return Number(str);
484
+ }
485
+ return bi;
486
+ }
487
+ return value.toNumber();
488
+ }
489
+ return value;
490
+ }
491
+ const JSONbig = {
492
+ parse: (text) => JSONbigParser.parse(text, reviver),
493
+ stringify: JSONbigSerializer.stringify
494
+ };
442
495
  /**
443
496
  * Exception thrown by the package
444
497
  */
@@ -488,7 +541,7 @@ class Client {
488
541
  'x-sdk-name': 'Console',
489
542
  'x-sdk-platform': 'console',
490
543
  'x-sdk-language': 'web',
491
- 'x-sdk-version': '2.1.2',
544
+ 'x-sdk-version': '2.2.0',
492
545
  'X-Appwrite-Response-Format': '1.8.0',
493
546
  };
494
547
  this.realtime = {
@@ -790,8 +843,8 @@ class Client {
790
843
  * @deprecated Use the Realtime service instead.
791
844
  * @see Realtime
792
845
  *
793
- * @param {string|string[]} channels
794
- * Channel to subscribe - pass a single channel as a string or multiple with an array of strings.
846
+ * @param {string|string[]|Channel<any>|ActionableChannel|ResolvedChannel|(Channel<any>|ActionableChannel|ResolvedChannel)[]} channels
847
+ * Channel to subscribe - pass a single channel as a string or Channel builder instance, or multiple with an array.
795
848
  *
796
849
  * Possible channels are:
797
850
  * - account
@@ -809,21 +862,40 @@ class Client {
809
862
  * - teams.[ID]
810
863
  * - memberships
811
864
  * - memberships.[ID]
865
+ *
866
+ * You can also use Channel builders:
867
+ * - Channel.database('db').collection('col').document('doc').create()
868
+ * - Channel.bucket('bucket').file('file').update()
869
+ * - Channel.function('func').execution('exec').delete()
870
+ * - Channel.team('team').create()
871
+ * - Channel.membership('membership').update()
812
872
  * @param {(payload: RealtimeMessage) => void} callback Is called on every realtime update.
813
873
  * @returns {() => void} Unsubscribes from events.
814
874
  */
815
875
  subscribe(channels, callback) {
816
- let channelArray = typeof channels === 'string' ? [channels] : channels;
817
- channelArray.forEach(channel => this.realtime.channels.add(channel));
876
+ const channelArray = Array.isArray(channels) ? channels : [channels];
877
+ // Convert Channel instances to strings
878
+ const channelStrings = channelArray.map(ch => {
879
+ if (typeof ch === 'string') {
880
+ return ch;
881
+ }
882
+ // All Channel instances have toString() method
883
+ if (ch && typeof ch.toString === 'function') {
884
+ return ch.toString();
885
+ }
886
+ // Fallback to generic string conversion
887
+ return String(ch);
888
+ });
889
+ channelStrings.forEach(channel => this.realtime.channels.add(channel));
818
890
  const counter = this.realtime.subscriptionsCounter++;
819
891
  this.realtime.subscriptions.set(counter, {
820
- channels: channelArray,
892
+ channels: channelStrings,
821
893
  callback
822
894
  });
823
895
  this.realtime.connect();
824
896
  return () => {
825
897
  this.realtime.subscriptions.delete(counter);
826
- this.realtime.cleanUp(channelArray);
898
+ this.realtime.cleanUp(channelStrings);
827
899
  this.realtime.connect();
828
900
  };
829
901
  }
@@ -1400,6 +1472,149 @@ class Account {
1400
1472
  };
1401
1473
  return this.client.call('post', uri, apiHeaders, payload);
1402
1474
  }
1475
+ listKeys(paramsOrFirst) {
1476
+ let params;
1477
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1478
+ params = (paramsOrFirst || {});
1479
+ }
1480
+ else {
1481
+ params = {
1482
+ total: paramsOrFirst
1483
+ };
1484
+ }
1485
+ const total = params.total;
1486
+ const apiPath = '/account/keys';
1487
+ const payload = {};
1488
+ if (typeof total !== 'undefined') {
1489
+ payload['total'] = total;
1490
+ }
1491
+ const uri = new URL(this.client.config.endpoint + apiPath);
1492
+ const apiHeaders = {};
1493
+ return this.client.call('get', uri, apiHeaders, payload);
1494
+ }
1495
+ createKey(paramsOrFirst, ...rest) {
1496
+ let params;
1497
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1498
+ params = (paramsOrFirst || {});
1499
+ }
1500
+ else {
1501
+ params = {
1502
+ name: paramsOrFirst,
1503
+ scopes: rest[0],
1504
+ expire: rest[1]
1505
+ };
1506
+ }
1507
+ const name = params.name;
1508
+ const scopes = params.scopes;
1509
+ const expire = params.expire;
1510
+ if (typeof name === 'undefined') {
1511
+ throw new AppwriteException('Missing required parameter: "name"');
1512
+ }
1513
+ if (typeof scopes === 'undefined') {
1514
+ throw new AppwriteException('Missing required parameter: "scopes"');
1515
+ }
1516
+ const apiPath = '/account/keys';
1517
+ const payload = {};
1518
+ if (typeof name !== 'undefined') {
1519
+ payload['name'] = name;
1520
+ }
1521
+ if (typeof scopes !== 'undefined') {
1522
+ payload['scopes'] = scopes;
1523
+ }
1524
+ if (typeof expire !== 'undefined') {
1525
+ payload['expire'] = expire;
1526
+ }
1527
+ const uri = new URL(this.client.config.endpoint + apiPath);
1528
+ const apiHeaders = {
1529
+ 'content-type': 'application/json',
1530
+ };
1531
+ return this.client.call('post', uri, apiHeaders, payload);
1532
+ }
1533
+ getKey(paramsOrFirst) {
1534
+ let params;
1535
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1536
+ params = (paramsOrFirst || {});
1537
+ }
1538
+ else {
1539
+ params = {
1540
+ keyId: paramsOrFirst
1541
+ };
1542
+ }
1543
+ const keyId = params.keyId;
1544
+ if (typeof keyId === 'undefined') {
1545
+ throw new AppwriteException('Missing required parameter: "keyId"');
1546
+ }
1547
+ const apiPath = '/account/keys/{keyId}'.replace('{keyId}', keyId);
1548
+ const payload = {};
1549
+ const uri = new URL(this.client.config.endpoint + apiPath);
1550
+ const apiHeaders = {};
1551
+ return this.client.call('get', uri, apiHeaders, payload);
1552
+ }
1553
+ updateKey(paramsOrFirst, ...rest) {
1554
+ let params;
1555
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1556
+ params = (paramsOrFirst || {});
1557
+ }
1558
+ else {
1559
+ params = {
1560
+ keyId: paramsOrFirst,
1561
+ name: rest[0],
1562
+ scopes: rest[1],
1563
+ expire: rest[2]
1564
+ };
1565
+ }
1566
+ const keyId = params.keyId;
1567
+ const name = params.name;
1568
+ const scopes = params.scopes;
1569
+ const expire = params.expire;
1570
+ if (typeof keyId === 'undefined') {
1571
+ throw new AppwriteException('Missing required parameter: "keyId"');
1572
+ }
1573
+ if (typeof name === 'undefined') {
1574
+ throw new AppwriteException('Missing required parameter: "name"');
1575
+ }
1576
+ if (typeof scopes === 'undefined') {
1577
+ throw new AppwriteException('Missing required parameter: "scopes"');
1578
+ }
1579
+ const apiPath = '/account/keys/{keyId}'.replace('{keyId}', keyId);
1580
+ const payload = {};
1581
+ if (typeof name !== 'undefined') {
1582
+ payload['name'] = name;
1583
+ }
1584
+ if (typeof scopes !== 'undefined') {
1585
+ payload['scopes'] = scopes;
1586
+ }
1587
+ if (typeof expire !== 'undefined') {
1588
+ payload['expire'] = expire;
1589
+ }
1590
+ const uri = new URL(this.client.config.endpoint + apiPath);
1591
+ const apiHeaders = {
1592
+ 'content-type': 'application/json',
1593
+ };
1594
+ return this.client.call('put', uri, apiHeaders, payload);
1595
+ }
1596
+ deleteKey(paramsOrFirst) {
1597
+ let params;
1598
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1599
+ params = (paramsOrFirst || {});
1600
+ }
1601
+ else {
1602
+ params = {
1603
+ keyId: paramsOrFirst
1604
+ };
1605
+ }
1606
+ const keyId = params.keyId;
1607
+ if (typeof keyId === 'undefined') {
1608
+ throw new AppwriteException('Missing required parameter: "keyId"');
1609
+ }
1610
+ const apiPath = '/account/keys/{keyId}'.replace('{keyId}', keyId);
1611
+ const payload = {};
1612
+ const uri = new URL(this.client.config.endpoint + apiPath);
1613
+ const apiHeaders = {
1614
+ 'content-type': 'application/json',
1615
+ };
1616
+ return this.client.call('delete', uri, apiHeaders, payload);
1617
+ }
1403
1618
  listLogs(paramsOrFirst, ...rest) {
1404
1619
  let params;
1405
1620
  if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
@@ -3335,7 +3550,7 @@ class Backups {
3335
3550
  }
3336
3551
  createArchive(paramsOrFirst, ...rest) {
3337
3552
  let params;
3338
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
3553
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'services' in paramsOrFirst)) {
3339
3554
  params = (paramsOrFirst || {});
3340
3555
  }
3341
3556
  else {
@@ -3815,25 +4030,15 @@ class Console {
3815
4030
  };
3816
4031
  return this.client.call('post', uri, apiHeaders, payload);
3817
4032
  }
3818
- getRegions(paramsOrFirst) {
3819
- let params;
3820
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
3821
- params = (paramsOrFirst || {});
3822
- }
3823
- else {
3824
- params = {
3825
- organizationId: paramsOrFirst
3826
- };
3827
- }
3828
- const organizationId = params.organizationId;
3829
- if (typeof organizationId === 'undefined') {
3830
- throw new AppwriteException('Missing required parameter: "organizationId"');
3831
- }
4033
+ /**
4034
+ * Get all available regions for the console.
4035
+ *
4036
+ * @throws {AppwriteException}
4037
+ * @returns {Promise<Models.ConsoleRegionList>}
4038
+ */
4039
+ listRegions() {
3832
4040
  const apiPath = '/console/regions';
3833
4041
  const payload = {};
3834
- if (typeof organizationId !== 'undefined') {
3835
- payload['organizationId'] = organizationId;
3836
- }
3837
4042
  const uri = new URL(this.client.config.endpoint + apiPath);
3838
4043
  const apiHeaders = {};
3839
4044
  return this.client.call('get', uri, apiHeaders, payload);
@@ -4286,9 +4491,6 @@ class Databases {
4286
4491
  if (typeof databaseId === 'undefined') {
4287
4492
  throw new AppwriteException('Missing required parameter: "databaseId"');
4288
4493
  }
4289
- if (typeof name === 'undefined') {
4290
- throw new AppwriteException('Missing required parameter: "name"');
4291
- }
4292
4494
  const apiPath = '/databases/{databaseId}'.replace('{databaseId}', databaseId);
4293
4495
  const payload = {};
4294
4496
  if (typeof name !== 'undefined') {
@@ -4475,9 +4677,6 @@ class Databases {
4475
4677
  if (typeof collectionId === 'undefined') {
4476
4678
  throw new AppwriteException('Missing required parameter: "collectionId"');
4477
4679
  }
4478
- if (typeof name === 'undefined') {
4479
- throw new AppwriteException('Missing required parameter: "name"');
4480
- }
4481
4680
  const apiPath = '/databases/{databaseId}/collections/{collectionId}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
4482
4681
  const payload = {};
4483
4682
  if (typeof name !== 'undefined') {
@@ -5456,7 +5655,7 @@ class Databases {
5456
5655
  };
5457
5656
  return this.client.call('patch', uri, apiHeaders, payload);
5458
5657
  }
5459
- createPointAttribute(paramsOrFirst, ...rest) {
5658
+ createLongtextAttribute(paramsOrFirst, ...rest) {
5460
5659
  let params;
5461
5660
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
5462
5661
  params = (paramsOrFirst || {});
@@ -5467,7 +5666,8 @@ class Databases {
5467
5666
  collectionId: rest[0],
5468
5667
  key: rest[1],
5469
5668
  required: rest[2],
5470
- xdefault: rest[3]
5669
+ xdefault: rest[3],
5670
+ array: rest[4]
5471
5671
  };
5472
5672
  }
5473
5673
  const databaseId = params.databaseId;
@@ -5475,6 +5675,7 @@ class Databases {
5475
5675
  const key = params.key;
5476
5676
  const required = params.required;
5477
5677
  const xdefault = params.xdefault;
5678
+ const array = params.array;
5478
5679
  if (typeof databaseId === 'undefined') {
5479
5680
  throw new AppwriteException('Missing required parameter: "databaseId"');
5480
5681
  }
@@ -5487,7 +5688,7 @@ class Databases {
5487
5688
  if (typeof required === 'undefined') {
5488
5689
  throw new AppwriteException('Missing required parameter: "required"');
5489
5690
  }
5490
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/point'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
5691
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/longtext'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
5491
5692
  const payload = {};
5492
5693
  if (typeof key !== 'undefined') {
5493
5694
  payload['key'] = key;
@@ -5498,13 +5699,16 @@ class Databases {
5498
5699
  if (typeof xdefault !== 'undefined') {
5499
5700
  payload['default'] = xdefault;
5500
5701
  }
5702
+ if (typeof array !== 'undefined') {
5703
+ payload['array'] = array;
5704
+ }
5501
5705
  const uri = new URL(this.client.config.endpoint + apiPath);
5502
5706
  const apiHeaders = {
5503
5707
  'content-type': 'application/json',
5504
5708
  };
5505
5709
  return this.client.call('post', uri, apiHeaders, payload);
5506
5710
  }
5507
- updatePointAttribute(paramsOrFirst, ...rest) {
5711
+ updateLongtextAttribute(paramsOrFirst, ...rest) {
5508
5712
  let params;
5509
5713
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
5510
5714
  params = (paramsOrFirst || {});
@@ -5537,7 +5741,10 @@ class Databases {
5537
5741
  if (typeof required === 'undefined') {
5538
5742
  throw new AppwriteException('Missing required parameter: "required"');
5539
5743
  }
5540
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/point/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
5744
+ if (typeof xdefault === 'undefined') {
5745
+ throw new AppwriteException('Missing required parameter: "xdefault"');
5746
+ }
5747
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/longtext/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
5541
5748
  const payload = {};
5542
5749
  if (typeof required !== 'undefined') {
5543
5750
  payload['required'] = required;
@@ -5554,7 +5761,7 @@ class Databases {
5554
5761
  };
5555
5762
  return this.client.call('patch', uri, apiHeaders, payload);
5556
5763
  }
5557
- createPolygonAttribute(paramsOrFirst, ...rest) {
5764
+ createMediumtextAttribute(paramsOrFirst, ...rest) {
5558
5765
  let params;
5559
5766
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
5560
5767
  params = (paramsOrFirst || {});
@@ -5565,7 +5772,8 @@ class Databases {
5565
5772
  collectionId: rest[0],
5566
5773
  key: rest[1],
5567
5774
  required: rest[2],
5568
- xdefault: rest[3]
5775
+ xdefault: rest[3],
5776
+ array: rest[4]
5569
5777
  };
5570
5778
  }
5571
5779
  const databaseId = params.databaseId;
@@ -5573,6 +5781,7 @@ class Databases {
5573
5781
  const key = params.key;
5574
5782
  const required = params.required;
5575
5783
  const xdefault = params.xdefault;
5784
+ const array = params.array;
5576
5785
  if (typeof databaseId === 'undefined') {
5577
5786
  throw new AppwriteException('Missing required parameter: "databaseId"');
5578
5787
  }
@@ -5585,7 +5794,7 @@ class Databases {
5585
5794
  if (typeof required === 'undefined') {
5586
5795
  throw new AppwriteException('Missing required parameter: "required"');
5587
5796
  }
5588
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/polygon'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
5797
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/mediumtext'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
5589
5798
  const payload = {};
5590
5799
  if (typeof key !== 'undefined') {
5591
5800
  payload['key'] = key;
@@ -5596,13 +5805,16 @@ class Databases {
5596
5805
  if (typeof xdefault !== 'undefined') {
5597
5806
  payload['default'] = xdefault;
5598
5807
  }
5808
+ if (typeof array !== 'undefined') {
5809
+ payload['array'] = array;
5810
+ }
5599
5811
  const uri = new URL(this.client.config.endpoint + apiPath);
5600
5812
  const apiHeaders = {
5601
5813
  'content-type': 'application/json',
5602
5814
  };
5603
5815
  return this.client.call('post', uri, apiHeaders, payload);
5604
5816
  }
5605
- updatePolygonAttribute(paramsOrFirst, ...rest) {
5817
+ updateMediumtextAttribute(paramsOrFirst, ...rest) {
5606
5818
  let params;
5607
5819
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
5608
5820
  params = (paramsOrFirst || {});
@@ -5635,7 +5847,10 @@ class Databases {
5635
5847
  if (typeof required === 'undefined') {
5636
5848
  throw new AppwriteException('Missing required parameter: "required"');
5637
5849
  }
5638
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/polygon/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
5850
+ if (typeof xdefault === 'undefined') {
5851
+ throw new AppwriteException('Missing required parameter: "xdefault"');
5852
+ }
5853
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/mediumtext/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
5639
5854
  const payload = {};
5640
5855
  if (typeof required !== 'undefined') {
5641
5856
  payload['required'] = required;
@@ -5652,7 +5867,7 @@ class Databases {
5652
5867
  };
5653
5868
  return this.client.call('patch', uri, apiHeaders, payload);
5654
5869
  }
5655
- createRelationshipAttribute(paramsOrFirst, ...rest) {
5870
+ createPointAttribute(paramsOrFirst, ...rest) {
5656
5871
  let params;
5657
5872
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
5658
5873
  params = (paramsOrFirst || {});
@@ -5661,53 +5876,38 @@ class Databases {
5661
5876
  params = {
5662
5877
  databaseId: paramsOrFirst,
5663
5878
  collectionId: rest[0],
5664
- relatedCollectionId: rest[1],
5665
- type: rest[2],
5666
- twoWay: rest[3],
5667
- key: rest[4],
5668
- twoWayKey: rest[5],
5669
- onDelete: rest[6]
5879
+ key: rest[1],
5880
+ required: rest[2],
5881
+ xdefault: rest[3]
5670
5882
  };
5671
5883
  }
5672
5884
  const databaseId = params.databaseId;
5673
5885
  const collectionId = params.collectionId;
5674
- const relatedCollectionId = params.relatedCollectionId;
5675
- const type = params.type;
5676
- const twoWay = params.twoWay;
5677
5886
  const key = params.key;
5678
- const twoWayKey = params.twoWayKey;
5679
- const onDelete = params.onDelete;
5887
+ const required = params.required;
5888
+ const xdefault = params.xdefault;
5680
5889
  if (typeof databaseId === 'undefined') {
5681
5890
  throw new AppwriteException('Missing required parameter: "databaseId"');
5682
5891
  }
5683
5892
  if (typeof collectionId === 'undefined') {
5684
5893
  throw new AppwriteException('Missing required parameter: "collectionId"');
5685
5894
  }
5686
- if (typeof relatedCollectionId === 'undefined') {
5687
- throw new AppwriteException('Missing required parameter: "relatedCollectionId"');
5895
+ if (typeof key === 'undefined') {
5896
+ throw new AppwriteException('Missing required parameter: "key"');
5688
5897
  }
5689
- if (typeof type === 'undefined') {
5690
- throw new AppwriteException('Missing required parameter: "type"');
5898
+ if (typeof required === 'undefined') {
5899
+ throw new AppwriteException('Missing required parameter: "required"');
5691
5900
  }
5692
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/relationship'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
5901
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/point'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
5693
5902
  const payload = {};
5694
- if (typeof relatedCollectionId !== 'undefined') {
5695
- payload['relatedCollectionId'] = relatedCollectionId;
5696
- }
5697
- if (typeof type !== 'undefined') {
5698
- payload['type'] = type;
5699
- }
5700
- if (typeof twoWay !== 'undefined') {
5701
- payload['twoWay'] = twoWay;
5702
- }
5703
5903
  if (typeof key !== 'undefined') {
5704
5904
  payload['key'] = key;
5705
5905
  }
5706
- if (typeof twoWayKey !== 'undefined') {
5707
- payload['twoWayKey'] = twoWayKey;
5906
+ if (typeof required !== 'undefined') {
5907
+ payload['required'] = required;
5708
5908
  }
5709
- if (typeof onDelete !== 'undefined') {
5710
- payload['onDelete'] = onDelete;
5909
+ if (typeof xdefault !== 'undefined') {
5910
+ payload['default'] = xdefault;
5711
5911
  }
5712
5912
  const uri = new URL(this.client.config.endpoint + apiPath);
5713
5913
  const apiHeaders = {
@@ -5715,7 +5915,7 @@ class Databases {
5715
5915
  };
5716
5916
  return this.client.call('post', uri, apiHeaders, payload);
5717
5917
  }
5718
- createStringAttribute(paramsOrFirst, ...rest) {
5918
+ updatePointAttribute(paramsOrFirst, ...rest) {
5719
5919
  let params;
5720
5920
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
5721
5921
  params = (paramsOrFirst || {});
@@ -5725,21 +5925,17 @@ class Databases {
5725
5925
  databaseId: paramsOrFirst,
5726
5926
  collectionId: rest[0],
5727
5927
  key: rest[1],
5728
- size: rest[2],
5729
- required: rest[3],
5730
- xdefault: rest[4],
5731
- array: rest[5],
5732
- encrypt: rest[6]
5928
+ required: rest[2],
5929
+ xdefault: rest[3],
5930
+ newKey: rest[4]
5733
5931
  };
5734
5932
  }
5735
5933
  const databaseId = params.databaseId;
5736
5934
  const collectionId = params.collectionId;
5737
5935
  const key = params.key;
5738
- const size = params.size;
5739
5936
  const required = params.required;
5740
5937
  const xdefault = params.xdefault;
5741
- const array = params.array;
5742
- const encrypt = params.encrypt;
5938
+ const newKey = params.newKey;
5743
5939
  if (typeof databaseId === 'undefined') {
5744
5940
  throw new AppwriteException('Missing required parameter: "databaseId"');
5745
5941
  }
@@ -5749,39 +5945,75 @@ class Databases {
5749
5945
  if (typeof key === 'undefined') {
5750
5946
  throw new AppwriteException('Missing required parameter: "key"');
5751
5947
  }
5752
- if (typeof size === 'undefined') {
5753
- throw new AppwriteException('Missing required parameter: "size"');
5948
+ if (typeof required === 'undefined') {
5949
+ throw new AppwriteException('Missing required parameter: "required"');
5950
+ }
5951
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/point/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
5952
+ const payload = {};
5953
+ if (typeof required !== 'undefined') {
5954
+ payload['required'] = required;
5955
+ }
5956
+ if (typeof xdefault !== 'undefined') {
5957
+ payload['default'] = xdefault;
5958
+ }
5959
+ if (typeof newKey !== 'undefined') {
5960
+ payload['newKey'] = newKey;
5961
+ }
5962
+ const uri = new URL(this.client.config.endpoint + apiPath);
5963
+ const apiHeaders = {
5964
+ 'content-type': 'application/json',
5965
+ };
5966
+ return this.client.call('patch', uri, apiHeaders, payload);
5967
+ }
5968
+ createPolygonAttribute(paramsOrFirst, ...rest) {
5969
+ let params;
5970
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
5971
+ params = (paramsOrFirst || {});
5972
+ }
5973
+ else {
5974
+ params = {
5975
+ databaseId: paramsOrFirst,
5976
+ collectionId: rest[0],
5977
+ key: rest[1],
5978
+ required: rest[2],
5979
+ xdefault: rest[3]
5980
+ };
5981
+ }
5982
+ const databaseId = params.databaseId;
5983
+ const collectionId = params.collectionId;
5984
+ const key = params.key;
5985
+ const required = params.required;
5986
+ const xdefault = params.xdefault;
5987
+ if (typeof databaseId === 'undefined') {
5988
+ throw new AppwriteException('Missing required parameter: "databaseId"');
5989
+ }
5990
+ if (typeof collectionId === 'undefined') {
5991
+ throw new AppwriteException('Missing required parameter: "collectionId"');
5992
+ }
5993
+ if (typeof key === 'undefined') {
5994
+ throw new AppwriteException('Missing required parameter: "key"');
5754
5995
  }
5755
5996
  if (typeof required === 'undefined') {
5756
5997
  throw new AppwriteException('Missing required parameter: "required"');
5757
5998
  }
5758
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/string'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
5999
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/polygon'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
5759
6000
  const payload = {};
5760
6001
  if (typeof key !== 'undefined') {
5761
6002
  payload['key'] = key;
5762
6003
  }
5763
- if (typeof size !== 'undefined') {
5764
- payload['size'] = size;
5765
- }
5766
6004
  if (typeof required !== 'undefined') {
5767
6005
  payload['required'] = required;
5768
6006
  }
5769
6007
  if (typeof xdefault !== 'undefined') {
5770
6008
  payload['default'] = xdefault;
5771
6009
  }
5772
- if (typeof array !== 'undefined') {
5773
- payload['array'] = array;
5774
- }
5775
- if (typeof encrypt !== 'undefined') {
5776
- payload['encrypt'] = encrypt;
5777
- }
5778
6010
  const uri = new URL(this.client.config.endpoint + apiPath);
5779
6011
  const apiHeaders = {
5780
6012
  'content-type': 'application/json',
5781
6013
  };
5782
6014
  return this.client.call('post', uri, apiHeaders, payload);
5783
6015
  }
5784
- updateStringAttribute(paramsOrFirst, ...rest) {
6016
+ updatePolygonAttribute(paramsOrFirst, ...rest) {
5785
6017
  let params;
5786
6018
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
5787
6019
  params = (paramsOrFirst || {});
@@ -5793,8 +6025,7 @@ class Databases {
5793
6025
  key: rest[1],
5794
6026
  required: rest[2],
5795
6027
  xdefault: rest[3],
5796
- size: rest[4],
5797
- newKey: rest[5]
6028
+ newKey: rest[4]
5798
6029
  };
5799
6030
  }
5800
6031
  const databaseId = params.databaseId;
@@ -5802,7 +6033,6 @@ class Databases {
5802
6033
  const key = params.key;
5803
6034
  const required = params.required;
5804
6035
  const xdefault = params.xdefault;
5805
- const size = params.size;
5806
6036
  const newKey = params.newKey;
5807
6037
  if (typeof databaseId === 'undefined') {
5808
6038
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -5816,10 +6046,7 @@ class Databases {
5816
6046
  if (typeof required === 'undefined') {
5817
6047
  throw new AppwriteException('Missing required parameter: "required"');
5818
6048
  }
5819
- if (typeof xdefault === 'undefined') {
5820
- throw new AppwriteException('Missing required parameter: "xdefault"');
5821
- }
5822
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/string/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
6049
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/polygon/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
5823
6050
  const payload = {};
5824
6051
  if (typeof required !== 'undefined') {
5825
6052
  payload['required'] = required;
@@ -5827,9 +6054,6 @@ class Databases {
5827
6054
  if (typeof xdefault !== 'undefined') {
5828
6055
  payload['default'] = xdefault;
5829
6056
  }
5830
- if (typeof size !== 'undefined') {
5831
- payload['size'] = size;
5832
- }
5833
6057
  if (typeof newKey !== 'undefined') {
5834
6058
  payload['newKey'] = newKey;
5835
6059
  }
@@ -5839,7 +6063,70 @@ class Databases {
5839
6063
  };
5840
6064
  return this.client.call('patch', uri, apiHeaders, payload);
5841
6065
  }
5842
- createUrlAttribute(paramsOrFirst, ...rest) {
6066
+ createRelationshipAttribute(paramsOrFirst, ...rest) {
6067
+ let params;
6068
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6069
+ params = (paramsOrFirst || {});
6070
+ }
6071
+ else {
6072
+ params = {
6073
+ databaseId: paramsOrFirst,
6074
+ collectionId: rest[0],
6075
+ relatedCollectionId: rest[1],
6076
+ type: rest[2],
6077
+ twoWay: rest[3],
6078
+ key: rest[4],
6079
+ twoWayKey: rest[5],
6080
+ onDelete: rest[6]
6081
+ };
6082
+ }
6083
+ const databaseId = params.databaseId;
6084
+ const collectionId = params.collectionId;
6085
+ const relatedCollectionId = params.relatedCollectionId;
6086
+ const type = params.type;
6087
+ const twoWay = params.twoWay;
6088
+ const key = params.key;
6089
+ const twoWayKey = params.twoWayKey;
6090
+ const onDelete = params.onDelete;
6091
+ if (typeof databaseId === 'undefined') {
6092
+ throw new AppwriteException('Missing required parameter: "databaseId"');
6093
+ }
6094
+ if (typeof collectionId === 'undefined') {
6095
+ throw new AppwriteException('Missing required parameter: "collectionId"');
6096
+ }
6097
+ if (typeof relatedCollectionId === 'undefined') {
6098
+ throw new AppwriteException('Missing required parameter: "relatedCollectionId"');
6099
+ }
6100
+ if (typeof type === 'undefined') {
6101
+ throw new AppwriteException('Missing required parameter: "type"');
6102
+ }
6103
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/relationship'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
6104
+ const payload = {};
6105
+ if (typeof relatedCollectionId !== 'undefined') {
6106
+ payload['relatedCollectionId'] = relatedCollectionId;
6107
+ }
6108
+ if (typeof type !== 'undefined') {
6109
+ payload['type'] = type;
6110
+ }
6111
+ if (typeof twoWay !== 'undefined') {
6112
+ payload['twoWay'] = twoWay;
6113
+ }
6114
+ if (typeof key !== 'undefined') {
6115
+ payload['key'] = key;
6116
+ }
6117
+ if (typeof twoWayKey !== 'undefined') {
6118
+ payload['twoWayKey'] = twoWayKey;
6119
+ }
6120
+ if (typeof onDelete !== 'undefined') {
6121
+ payload['onDelete'] = onDelete;
6122
+ }
6123
+ const uri = new URL(this.client.config.endpoint + apiPath);
6124
+ const apiHeaders = {
6125
+ 'content-type': 'application/json',
6126
+ };
6127
+ return this.client.call('post', uri, apiHeaders, payload);
6128
+ }
6129
+ createStringAttribute(paramsOrFirst, ...rest) {
5843
6130
  let params;
5844
6131
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
5845
6132
  params = (paramsOrFirst || {});
@@ -5849,17 +6136,21 @@ class Databases {
5849
6136
  databaseId: paramsOrFirst,
5850
6137
  collectionId: rest[0],
5851
6138
  key: rest[1],
5852
- required: rest[2],
5853
- xdefault: rest[3],
5854
- array: rest[4]
6139
+ size: rest[2],
6140
+ required: rest[3],
6141
+ xdefault: rest[4],
6142
+ array: rest[5],
6143
+ encrypt: rest[6]
5855
6144
  };
5856
6145
  }
5857
6146
  const databaseId = params.databaseId;
5858
6147
  const collectionId = params.collectionId;
5859
6148
  const key = params.key;
6149
+ const size = params.size;
5860
6150
  const required = params.required;
5861
6151
  const xdefault = params.xdefault;
5862
6152
  const array = params.array;
6153
+ const encrypt = params.encrypt;
5863
6154
  if (typeof databaseId === 'undefined') {
5864
6155
  throw new AppwriteException('Missing required parameter: "databaseId"');
5865
6156
  }
@@ -5869,14 +6160,20 @@ class Databases {
5869
6160
  if (typeof key === 'undefined') {
5870
6161
  throw new AppwriteException('Missing required parameter: "key"');
5871
6162
  }
6163
+ if (typeof size === 'undefined') {
6164
+ throw new AppwriteException('Missing required parameter: "size"');
6165
+ }
5872
6166
  if (typeof required === 'undefined') {
5873
6167
  throw new AppwriteException('Missing required parameter: "required"');
5874
6168
  }
5875
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/url'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
6169
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/string'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
5876
6170
  const payload = {};
5877
6171
  if (typeof key !== 'undefined') {
5878
6172
  payload['key'] = key;
5879
6173
  }
6174
+ if (typeof size !== 'undefined') {
6175
+ payload['size'] = size;
6176
+ }
5880
6177
  if (typeof required !== 'undefined') {
5881
6178
  payload['required'] = required;
5882
6179
  }
@@ -5886,13 +6183,16 @@ class Databases {
5886
6183
  if (typeof array !== 'undefined') {
5887
6184
  payload['array'] = array;
5888
6185
  }
6186
+ if (typeof encrypt !== 'undefined') {
6187
+ payload['encrypt'] = encrypt;
6188
+ }
5889
6189
  const uri = new URL(this.client.config.endpoint + apiPath);
5890
6190
  const apiHeaders = {
5891
6191
  'content-type': 'application/json',
5892
6192
  };
5893
6193
  return this.client.call('post', uri, apiHeaders, payload);
5894
6194
  }
5895
- updateUrlAttribute(paramsOrFirst, ...rest) {
6195
+ updateStringAttribute(paramsOrFirst, ...rest) {
5896
6196
  let params;
5897
6197
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
5898
6198
  params = (paramsOrFirst || {});
@@ -5904,7 +6204,8 @@ class Databases {
5904
6204
  key: rest[1],
5905
6205
  required: rest[2],
5906
6206
  xdefault: rest[3],
5907
- newKey: rest[4]
6207
+ size: rest[4],
6208
+ newKey: rest[5]
5908
6209
  };
5909
6210
  }
5910
6211
  const databaseId = params.databaseId;
@@ -5912,6 +6213,7 @@ class Databases {
5912
6213
  const key = params.key;
5913
6214
  const required = params.required;
5914
6215
  const xdefault = params.xdefault;
6216
+ const size = params.size;
5915
6217
  const newKey = params.newKey;
5916
6218
  if (typeof databaseId === 'undefined') {
5917
6219
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -5928,7 +6230,7 @@ class Databases {
5928
6230
  if (typeof xdefault === 'undefined') {
5929
6231
  throw new AppwriteException('Missing required parameter: "xdefault"');
5930
6232
  }
5931
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/url/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
6233
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/string/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
5932
6234
  const payload = {};
5933
6235
  if (typeof required !== 'undefined') {
5934
6236
  payload['required'] = required;
@@ -5936,6 +6238,9 @@ class Databases {
5936
6238
  if (typeof xdefault !== 'undefined') {
5937
6239
  payload['default'] = xdefault;
5938
6240
  }
6241
+ if (typeof size !== 'undefined') {
6242
+ payload['size'] = size;
6243
+ }
5939
6244
  if (typeof newKey !== 'undefined') {
5940
6245
  payload['newKey'] = newKey;
5941
6246
  }
@@ -5945,7 +6250,7 @@ class Databases {
5945
6250
  };
5946
6251
  return this.client.call('patch', uri, apiHeaders, payload);
5947
6252
  }
5948
- getAttribute(paramsOrFirst, ...rest) {
6253
+ createTextAttribute(paramsOrFirst, ...rest) {
5949
6254
  let params;
5950
6255
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
5951
6256
  params = (paramsOrFirst || {});
@@ -5954,12 +6259,18 @@ class Databases {
5954
6259
  params = {
5955
6260
  databaseId: paramsOrFirst,
5956
6261
  collectionId: rest[0],
5957
- key: rest[1]
6262
+ key: rest[1],
6263
+ required: rest[2],
6264
+ xdefault: rest[3],
6265
+ array: rest[4]
5958
6266
  };
5959
6267
  }
5960
6268
  const databaseId = params.databaseId;
5961
6269
  const collectionId = params.collectionId;
5962
6270
  const key = params.key;
6271
+ const required = params.required;
6272
+ const xdefault = params.xdefault;
6273
+ const array = params.array;
5963
6274
  if (typeof databaseId === 'undefined') {
5964
6275
  throw new AppwriteException('Missing required parameter: "databaseId"');
5965
6276
  }
@@ -5969,13 +6280,30 @@ class Databases {
5969
6280
  if (typeof key === 'undefined') {
5970
6281
  throw new AppwriteException('Missing required parameter: "key"');
5971
6282
  }
5972
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
6283
+ if (typeof required === 'undefined') {
6284
+ throw new AppwriteException('Missing required parameter: "required"');
6285
+ }
6286
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/text'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
5973
6287
  const payload = {};
6288
+ if (typeof key !== 'undefined') {
6289
+ payload['key'] = key;
6290
+ }
6291
+ if (typeof required !== 'undefined') {
6292
+ payload['required'] = required;
6293
+ }
6294
+ if (typeof xdefault !== 'undefined') {
6295
+ payload['default'] = xdefault;
6296
+ }
6297
+ if (typeof array !== 'undefined') {
6298
+ payload['array'] = array;
6299
+ }
5974
6300
  const uri = new URL(this.client.config.endpoint + apiPath);
5975
- const apiHeaders = {};
5976
- return this.client.call('get', uri, apiHeaders, payload);
6301
+ const apiHeaders = {
6302
+ 'content-type': 'application/json',
6303
+ };
6304
+ return this.client.call('post', uri, apiHeaders, payload);
5977
6305
  }
5978
- deleteAttribute(paramsOrFirst, ...rest) {
6306
+ updateTextAttribute(paramsOrFirst, ...rest) {
5979
6307
  let params;
5980
6308
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
5981
6309
  params = (paramsOrFirst || {});
@@ -5984,12 +6312,18 @@ class Databases {
5984
6312
  params = {
5985
6313
  databaseId: paramsOrFirst,
5986
6314
  collectionId: rest[0],
5987
- key: rest[1]
6315
+ key: rest[1],
6316
+ required: rest[2],
6317
+ xdefault: rest[3],
6318
+ newKey: rest[4]
5988
6319
  };
5989
6320
  }
5990
6321
  const databaseId = params.databaseId;
5991
6322
  const collectionId = params.collectionId;
5992
6323
  const key = params.key;
6324
+ const required = params.required;
6325
+ const xdefault = params.xdefault;
6326
+ const newKey = params.newKey;
5993
6327
  if (typeof databaseId === 'undefined') {
5994
6328
  throw new AppwriteException('Missing required parameter: "databaseId"');
5995
6329
  }
@@ -5999,15 +6333,30 @@ class Databases {
5999
6333
  if (typeof key === 'undefined') {
6000
6334
  throw new AppwriteException('Missing required parameter: "key"');
6001
6335
  }
6002
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
6336
+ if (typeof required === 'undefined') {
6337
+ throw new AppwriteException('Missing required parameter: "required"');
6338
+ }
6339
+ if (typeof xdefault === 'undefined') {
6340
+ throw new AppwriteException('Missing required parameter: "xdefault"');
6341
+ }
6342
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/text/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
6003
6343
  const payload = {};
6344
+ if (typeof required !== 'undefined') {
6345
+ payload['required'] = required;
6346
+ }
6347
+ if (typeof xdefault !== 'undefined') {
6348
+ payload['default'] = xdefault;
6349
+ }
6350
+ if (typeof newKey !== 'undefined') {
6351
+ payload['newKey'] = newKey;
6352
+ }
6004
6353
  const uri = new URL(this.client.config.endpoint + apiPath);
6005
6354
  const apiHeaders = {
6006
6355
  'content-type': 'application/json',
6007
6356
  };
6008
- return this.client.call('delete', uri, apiHeaders, payload);
6357
+ return this.client.call('patch', uri, apiHeaders, payload);
6009
6358
  }
6010
- updateRelationshipAttribute(paramsOrFirst, ...rest) {
6359
+ createUrlAttribute(paramsOrFirst, ...rest) {
6011
6360
  let params;
6012
6361
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6013
6362
  params = (paramsOrFirst || {});
@@ -6017,15 +6366,17 @@ class Databases {
6017
6366
  databaseId: paramsOrFirst,
6018
6367
  collectionId: rest[0],
6019
6368
  key: rest[1],
6020
- onDelete: rest[2],
6021
- newKey: rest[3]
6369
+ required: rest[2],
6370
+ xdefault: rest[3],
6371
+ array: rest[4]
6022
6372
  };
6023
6373
  }
6024
6374
  const databaseId = params.databaseId;
6025
6375
  const collectionId = params.collectionId;
6026
6376
  const key = params.key;
6027
- const onDelete = params.onDelete;
6028
- const newKey = params.newKey;
6377
+ const required = params.required;
6378
+ const xdefault = params.xdefault;
6379
+ const array = params.array;
6029
6380
  if (typeof databaseId === 'undefined') {
6030
6381
  throw new AppwriteException('Missing required parameter: "databaseId"');
6031
6382
  }
@@ -6035,21 +6386,30 @@ class Databases {
6035
6386
  if (typeof key === 'undefined') {
6036
6387
  throw new AppwriteException('Missing required parameter: "key"');
6037
6388
  }
6038
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}/relationship'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
6389
+ if (typeof required === 'undefined') {
6390
+ throw new AppwriteException('Missing required parameter: "required"');
6391
+ }
6392
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/url'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
6039
6393
  const payload = {};
6040
- if (typeof onDelete !== 'undefined') {
6041
- payload['onDelete'] = onDelete;
6394
+ if (typeof key !== 'undefined') {
6395
+ payload['key'] = key;
6042
6396
  }
6043
- if (typeof newKey !== 'undefined') {
6044
- payload['newKey'] = newKey;
6397
+ if (typeof required !== 'undefined') {
6398
+ payload['required'] = required;
6399
+ }
6400
+ if (typeof xdefault !== 'undefined') {
6401
+ payload['default'] = xdefault;
6402
+ }
6403
+ if (typeof array !== 'undefined') {
6404
+ payload['array'] = array;
6045
6405
  }
6046
6406
  const uri = new URL(this.client.config.endpoint + apiPath);
6047
6407
  const apiHeaders = {
6048
6408
  'content-type': 'application/json',
6049
6409
  };
6050
- return this.client.call('patch', uri, apiHeaders, payload);
6410
+ return this.client.call('post', uri, apiHeaders, payload);
6051
6411
  }
6052
- listDocuments(paramsOrFirst, ...rest) {
6412
+ updateUrlAttribute(paramsOrFirst, ...rest) {
6053
6413
  let params;
6054
6414
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6055
6415
  params = (paramsOrFirst || {});
@@ -6058,38 +6418,51 @@ class Databases {
6058
6418
  params = {
6059
6419
  databaseId: paramsOrFirst,
6060
6420
  collectionId: rest[0],
6061
- queries: rest[1],
6062
- transactionId: rest[2],
6063
- total: rest[3]
6421
+ key: rest[1],
6422
+ required: rest[2],
6423
+ xdefault: rest[3],
6424
+ newKey: rest[4]
6064
6425
  };
6065
6426
  }
6066
6427
  const databaseId = params.databaseId;
6067
6428
  const collectionId = params.collectionId;
6068
- const queries = params.queries;
6069
- const transactionId = params.transactionId;
6070
- const total = params.total;
6429
+ const key = params.key;
6430
+ const required = params.required;
6431
+ const xdefault = params.xdefault;
6432
+ const newKey = params.newKey;
6071
6433
  if (typeof databaseId === 'undefined') {
6072
6434
  throw new AppwriteException('Missing required parameter: "databaseId"');
6073
6435
  }
6074
6436
  if (typeof collectionId === 'undefined') {
6075
6437
  throw new AppwriteException('Missing required parameter: "collectionId"');
6076
6438
  }
6077
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
6439
+ if (typeof key === 'undefined') {
6440
+ throw new AppwriteException('Missing required parameter: "key"');
6441
+ }
6442
+ if (typeof required === 'undefined') {
6443
+ throw new AppwriteException('Missing required parameter: "required"');
6444
+ }
6445
+ if (typeof xdefault === 'undefined') {
6446
+ throw new AppwriteException('Missing required parameter: "xdefault"');
6447
+ }
6448
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/url/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
6078
6449
  const payload = {};
6079
- if (typeof queries !== 'undefined') {
6080
- payload['queries'] = queries;
6450
+ if (typeof required !== 'undefined') {
6451
+ payload['required'] = required;
6081
6452
  }
6082
- if (typeof transactionId !== 'undefined') {
6083
- payload['transactionId'] = transactionId;
6453
+ if (typeof xdefault !== 'undefined') {
6454
+ payload['default'] = xdefault;
6084
6455
  }
6085
- if (typeof total !== 'undefined') {
6086
- payload['total'] = total;
6456
+ if (typeof newKey !== 'undefined') {
6457
+ payload['newKey'] = newKey;
6087
6458
  }
6088
6459
  const uri = new URL(this.client.config.endpoint + apiPath);
6089
- const apiHeaders = {};
6090
- return this.client.call('get', uri, apiHeaders, payload);
6460
+ const apiHeaders = {
6461
+ 'content-type': 'application/json',
6462
+ };
6463
+ return this.client.call('patch', uri, apiHeaders, payload);
6091
6464
  }
6092
- createDocument(paramsOrFirst, ...rest) {
6465
+ createVarcharAttribute(paramsOrFirst, ...rest) {
6093
6466
  let params;
6094
6467
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6095
6468
  params = (paramsOrFirst || {});
@@ -6098,43 +6471,51 @@ class Databases {
6098
6471
  params = {
6099
6472
  databaseId: paramsOrFirst,
6100
6473
  collectionId: rest[0],
6101
- documentId: rest[1],
6102
- data: rest[2],
6103
- permissions: rest[3],
6104
- transactionId: rest[4]
6474
+ key: rest[1],
6475
+ size: rest[2],
6476
+ required: rest[3],
6477
+ xdefault: rest[4],
6478
+ array: rest[5]
6105
6479
  };
6106
6480
  }
6107
6481
  const databaseId = params.databaseId;
6108
6482
  const collectionId = params.collectionId;
6109
- const documentId = params.documentId;
6110
- const data = params.data;
6111
- const permissions = params.permissions;
6112
- const transactionId = params.transactionId;
6483
+ const key = params.key;
6484
+ const size = params.size;
6485
+ const required = params.required;
6486
+ const xdefault = params.xdefault;
6487
+ const array = params.array;
6113
6488
  if (typeof databaseId === 'undefined') {
6114
6489
  throw new AppwriteException('Missing required parameter: "databaseId"');
6115
6490
  }
6116
6491
  if (typeof collectionId === 'undefined') {
6117
6492
  throw new AppwriteException('Missing required parameter: "collectionId"');
6118
6493
  }
6119
- if (typeof documentId === 'undefined') {
6120
- throw new AppwriteException('Missing required parameter: "documentId"');
6494
+ if (typeof key === 'undefined') {
6495
+ throw new AppwriteException('Missing required parameter: "key"');
6121
6496
  }
6122
- if (typeof data === 'undefined') {
6123
- throw new AppwriteException('Missing required parameter: "data"');
6497
+ if (typeof size === 'undefined') {
6498
+ throw new AppwriteException('Missing required parameter: "size"');
6124
6499
  }
6125
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
6500
+ if (typeof required === 'undefined') {
6501
+ throw new AppwriteException('Missing required parameter: "required"');
6502
+ }
6503
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/varchar'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
6126
6504
  const payload = {};
6127
- if (typeof documentId !== 'undefined') {
6128
- payload['documentId'] = documentId;
6505
+ if (typeof key !== 'undefined') {
6506
+ payload['key'] = key;
6129
6507
  }
6130
- if (typeof data !== 'undefined') {
6131
- payload['data'] = data;
6508
+ if (typeof size !== 'undefined') {
6509
+ payload['size'] = size;
6132
6510
  }
6133
- if (typeof permissions !== 'undefined') {
6134
- payload['permissions'] = permissions;
6511
+ if (typeof required !== 'undefined') {
6512
+ payload['required'] = required;
6135
6513
  }
6136
- if (typeof transactionId !== 'undefined') {
6137
- payload['transactionId'] = transactionId;
6514
+ if (typeof xdefault !== 'undefined') {
6515
+ payload['default'] = xdefault;
6516
+ }
6517
+ if (typeof array !== 'undefined') {
6518
+ payload['array'] = array;
6138
6519
  }
6139
6520
  const uri = new URL(this.client.config.endpoint + apiPath);
6140
6521
  const apiHeaders = {
@@ -6142,7 +6523,7 @@ class Databases {
6142
6523
  };
6143
6524
  return this.client.call('post', uri, apiHeaders, payload);
6144
6525
  }
6145
- createDocuments(paramsOrFirst, ...rest) {
6526
+ updateVarcharAttribute(paramsOrFirst, ...rest) {
6146
6527
  let params;
6147
6528
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6148
6529
  params = (paramsOrFirst || {});
@@ -6151,38 +6532,56 @@ class Databases {
6151
6532
  params = {
6152
6533
  databaseId: paramsOrFirst,
6153
6534
  collectionId: rest[0],
6154
- documents: rest[1],
6155
- transactionId: rest[2]
6535
+ key: rest[1],
6536
+ required: rest[2],
6537
+ xdefault: rest[3],
6538
+ size: rest[4],
6539
+ newKey: rest[5]
6156
6540
  };
6157
6541
  }
6158
6542
  const databaseId = params.databaseId;
6159
6543
  const collectionId = params.collectionId;
6160
- const documents = params.documents;
6161
- const transactionId = params.transactionId;
6544
+ const key = params.key;
6545
+ const required = params.required;
6546
+ const xdefault = params.xdefault;
6547
+ const size = params.size;
6548
+ const newKey = params.newKey;
6162
6549
  if (typeof databaseId === 'undefined') {
6163
6550
  throw new AppwriteException('Missing required parameter: "databaseId"');
6164
6551
  }
6165
6552
  if (typeof collectionId === 'undefined') {
6166
6553
  throw new AppwriteException('Missing required parameter: "collectionId"');
6167
6554
  }
6168
- if (typeof documents === 'undefined') {
6169
- throw new AppwriteException('Missing required parameter: "documents"');
6555
+ if (typeof key === 'undefined') {
6556
+ throw new AppwriteException('Missing required parameter: "key"');
6170
6557
  }
6171
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
6558
+ if (typeof required === 'undefined') {
6559
+ throw new AppwriteException('Missing required parameter: "required"');
6560
+ }
6561
+ if (typeof xdefault === 'undefined') {
6562
+ throw new AppwriteException('Missing required parameter: "xdefault"');
6563
+ }
6564
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/varchar/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
6172
6565
  const payload = {};
6173
- if (typeof documents !== 'undefined') {
6174
- payload['documents'] = documents;
6566
+ if (typeof required !== 'undefined') {
6567
+ payload['required'] = required;
6175
6568
  }
6176
- if (typeof transactionId !== 'undefined') {
6177
- payload['transactionId'] = transactionId;
6569
+ if (typeof xdefault !== 'undefined') {
6570
+ payload['default'] = xdefault;
6571
+ }
6572
+ if (typeof size !== 'undefined') {
6573
+ payload['size'] = size;
6574
+ }
6575
+ if (typeof newKey !== 'undefined') {
6576
+ payload['newKey'] = newKey;
6178
6577
  }
6179
6578
  const uri = new URL(this.client.config.endpoint + apiPath);
6180
6579
  const apiHeaders = {
6181
6580
  'content-type': 'application/json',
6182
6581
  };
6183
- return this.client.call('post', uri, apiHeaders, payload);
6582
+ return this.client.call('patch', uri, apiHeaders, payload);
6184
6583
  }
6185
- upsertDocuments(paramsOrFirst, ...rest) {
6584
+ getAttribute(paramsOrFirst, ...rest) {
6186
6585
  let params;
6187
6586
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6188
6587
  params = (paramsOrFirst || {});
@@ -6191,38 +6590,28 @@ class Databases {
6191
6590
  params = {
6192
6591
  databaseId: paramsOrFirst,
6193
6592
  collectionId: rest[0],
6194
- documents: rest[1],
6195
- transactionId: rest[2]
6593
+ key: rest[1]
6196
6594
  };
6197
6595
  }
6198
6596
  const databaseId = params.databaseId;
6199
6597
  const collectionId = params.collectionId;
6200
- const documents = params.documents;
6201
- const transactionId = params.transactionId;
6598
+ const key = params.key;
6202
6599
  if (typeof databaseId === 'undefined') {
6203
6600
  throw new AppwriteException('Missing required parameter: "databaseId"');
6204
6601
  }
6205
6602
  if (typeof collectionId === 'undefined') {
6206
6603
  throw new AppwriteException('Missing required parameter: "collectionId"');
6207
6604
  }
6208
- if (typeof documents === 'undefined') {
6209
- throw new AppwriteException('Missing required parameter: "documents"');
6605
+ if (typeof key === 'undefined') {
6606
+ throw new AppwriteException('Missing required parameter: "key"');
6210
6607
  }
6211
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
6608
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
6212
6609
  const payload = {};
6213
- if (typeof documents !== 'undefined') {
6214
- payload['documents'] = documents;
6215
- }
6216
- if (typeof transactionId !== 'undefined') {
6217
- payload['transactionId'] = transactionId;
6218
- }
6219
6610
  const uri = new URL(this.client.config.endpoint + apiPath);
6220
- const apiHeaders = {
6221
- 'content-type': 'application/json',
6222
- };
6223
- return this.client.call('put', uri, apiHeaders, payload);
6611
+ const apiHeaders = {};
6612
+ return this.client.call('get', uri, apiHeaders, payload);
6224
6613
  }
6225
- updateDocuments(paramsOrFirst, ...rest) {
6614
+ deleteAttribute(paramsOrFirst, ...rest) {
6226
6615
  let params;
6227
6616
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6228
6617
  params = (paramsOrFirst || {});
@@ -6231,40 +6620,30 @@ class Databases {
6231
6620
  params = {
6232
6621
  databaseId: paramsOrFirst,
6233
6622
  collectionId: rest[0],
6234
- data: rest[1],
6235
- queries: rest[2],
6236
- transactionId: rest[3]
6623
+ key: rest[1]
6237
6624
  };
6238
6625
  }
6239
6626
  const databaseId = params.databaseId;
6240
6627
  const collectionId = params.collectionId;
6241
- const data = params.data;
6242
- const queries = params.queries;
6243
- const transactionId = params.transactionId;
6628
+ const key = params.key;
6244
6629
  if (typeof databaseId === 'undefined') {
6245
6630
  throw new AppwriteException('Missing required parameter: "databaseId"');
6246
6631
  }
6247
6632
  if (typeof collectionId === 'undefined') {
6248
6633
  throw new AppwriteException('Missing required parameter: "collectionId"');
6249
6634
  }
6250
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
6251
- const payload = {};
6252
- if (typeof data !== 'undefined') {
6253
- payload['data'] = data;
6254
- }
6255
- if (typeof queries !== 'undefined') {
6256
- payload['queries'] = queries;
6257
- }
6258
- if (typeof transactionId !== 'undefined') {
6259
- payload['transactionId'] = transactionId;
6635
+ if (typeof key === 'undefined') {
6636
+ throw new AppwriteException('Missing required parameter: "key"');
6260
6637
  }
6638
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
6639
+ const payload = {};
6261
6640
  const uri = new URL(this.client.config.endpoint + apiPath);
6262
6641
  const apiHeaders = {
6263
6642
  'content-type': 'application/json',
6264
6643
  };
6265
- return this.client.call('patch', uri, apiHeaders, payload);
6644
+ return this.client.call('delete', uri, apiHeaders, payload);
6266
6645
  }
6267
- deleteDocuments(paramsOrFirst, ...rest) {
6646
+ updateRelationshipAttribute(paramsOrFirst, ...rest) {
6268
6647
  let params;
6269
6648
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6270
6649
  params = (paramsOrFirst || {});
@@ -6273,35 +6652,40 @@ class Databases {
6273
6652
  params = {
6274
6653
  databaseId: paramsOrFirst,
6275
6654
  collectionId: rest[0],
6276
- queries: rest[1],
6277
- transactionId: rest[2]
6655
+ key: rest[1],
6656
+ onDelete: rest[2],
6657
+ newKey: rest[3]
6278
6658
  };
6279
6659
  }
6280
6660
  const databaseId = params.databaseId;
6281
6661
  const collectionId = params.collectionId;
6282
- const queries = params.queries;
6283
- const transactionId = params.transactionId;
6662
+ const key = params.key;
6663
+ const onDelete = params.onDelete;
6664
+ const newKey = params.newKey;
6284
6665
  if (typeof databaseId === 'undefined') {
6285
6666
  throw new AppwriteException('Missing required parameter: "databaseId"');
6286
6667
  }
6287
6668
  if (typeof collectionId === 'undefined') {
6288
6669
  throw new AppwriteException('Missing required parameter: "collectionId"');
6289
6670
  }
6290
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
6671
+ if (typeof key === 'undefined') {
6672
+ throw new AppwriteException('Missing required parameter: "key"');
6673
+ }
6674
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}/relationship'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
6291
6675
  const payload = {};
6292
- if (typeof queries !== 'undefined') {
6293
- payload['queries'] = queries;
6676
+ if (typeof onDelete !== 'undefined') {
6677
+ payload['onDelete'] = onDelete;
6294
6678
  }
6295
- if (typeof transactionId !== 'undefined') {
6296
- payload['transactionId'] = transactionId;
6679
+ if (typeof newKey !== 'undefined') {
6680
+ payload['newKey'] = newKey;
6297
6681
  }
6298
6682
  const uri = new URL(this.client.config.endpoint + apiPath);
6299
6683
  const apiHeaders = {
6300
6684
  'content-type': 'application/json',
6301
6685
  };
6302
- return this.client.call('delete', uri, apiHeaders, payload);
6686
+ return this.client.call('patch', uri, apiHeaders, payload);
6303
6687
  }
6304
- getDocument(paramsOrFirst, ...rest) {
6688
+ listDocuments(paramsOrFirst, ...rest) {
6305
6689
  let params;
6306
6690
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6307
6691
  params = (paramsOrFirst || {});
@@ -6310,26 +6694,23 @@ class Databases {
6310
6694
  params = {
6311
6695
  databaseId: paramsOrFirst,
6312
6696
  collectionId: rest[0],
6313
- documentId: rest[1],
6314
- queries: rest[2],
6315
- transactionId: rest[3]
6697
+ queries: rest[1],
6698
+ transactionId: rest[2],
6699
+ total: rest[3]
6316
6700
  };
6317
6701
  }
6318
6702
  const databaseId = params.databaseId;
6319
6703
  const collectionId = params.collectionId;
6320
- const documentId = params.documentId;
6321
6704
  const queries = params.queries;
6322
6705
  const transactionId = params.transactionId;
6706
+ const total = params.total;
6323
6707
  if (typeof databaseId === 'undefined') {
6324
6708
  throw new AppwriteException('Missing required parameter: "databaseId"');
6325
6709
  }
6326
6710
  if (typeof collectionId === 'undefined') {
6327
6711
  throw new AppwriteException('Missing required parameter: "collectionId"');
6328
6712
  }
6329
- if (typeof documentId === 'undefined') {
6330
- throw new AppwriteException('Missing required parameter: "documentId"');
6331
- }
6332
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{documentId}', documentId);
6713
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
6333
6714
  const payload = {};
6334
6715
  if (typeof queries !== 'undefined') {
6335
6716
  payload['queries'] = queries;
@@ -6337,11 +6718,266 @@ class Databases {
6337
6718
  if (typeof transactionId !== 'undefined') {
6338
6719
  payload['transactionId'] = transactionId;
6339
6720
  }
6721
+ if (typeof total !== 'undefined') {
6722
+ payload['total'] = total;
6723
+ }
6340
6724
  const uri = new URL(this.client.config.endpoint + apiPath);
6341
6725
  const apiHeaders = {};
6342
6726
  return this.client.call('get', uri, apiHeaders, payload);
6343
6727
  }
6344
- upsertDocument(paramsOrFirst, ...rest) {
6728
+ createDocument(paramsOrFirst, ...rest) {
6729
+ let params;
6730
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6731
+ params = (paramsOrFirst || {});
6732
+ }
6733
+ else {
6734
+ params = {
6735
+ databaseId: paramsOrFirst,
6736
+ collectionId: rest[0],
6737
+ documentId: rest[1],
6738
+ data: rest[2],
6739
+ permissions: rest[3],
6740
+ transactionId: rest[4]
6741
+ };
6742
+ }
6743
+ const databaseId = params.databaseId;
6744
+ const collectionId = params.collectionId;
6745
+ const documentId = params.documentId;
6746
+ const data = params.data;
6747
+ const permissions = params.permissions;
6748
+ const transactionId = params.transactionId;
6749
+ if (typeof databaseId === 'undefined') {
6750
+ throw new AppwriteException('Missing required parameter: "databaseId"');
6751
+ }
6752
+ if (typeof collectionId === 'undefined') {
6753
+ throw new AppwriteException('Missing required parameter: "collectionId"');
6754
+ }
6755
+ if (typeof documentId === 'undefined') {
6756
+ throw new AppwriteException('Missing required parameter: "documentId"');
6757
+ }
6758
+ if (typeof data === 'undefined') {
6759
+ throw new AppwriteException('Missing required parameter: "data"');
6760
+ }
6761
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
6762
+ const payload = {};
6763
+ if (typeof documentId !== 'undefined') {
6764
+ payload['documentId'] = documentId;
6765
+ }
6766
+ if (typeof data !== 'undefined') {
6767
+ payload['data'] = data;
6768
+ }
6769
+ if (typeof permissions !== 'undefined') {
6770
+ payload['permissions'] = permissions;
6771
+ }
6772
+ if (typeof transactionId !== 'undefined') {
6773
+ payload['transactionId'] = transactionId;
6774
+ }
6775
+ const uri = new URL(this.client.config.endpoint + apiPath);
6776
+ const apiHeaders = {
6777
+ 'content-type': 'application/json',
6778
+ };
6779
+ return this.client.call('post', uri, apiHeaders, payload);
6780
+ }
6781
+ createDocuments(paramsOrFirst, ...rest) {
6782
+ let params;
6783
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6784
+ params = (paramsOrFirst || {});
6785
+ }
6786
+ else {
6787
+ params = {
6788
+ databaseId: paramsOrFirst,
6789
+ collectionId: rest[0],
6790
+ documents: rest[1],
6791
+ transactionId: rest[2]
6792
+ };
6793
+ }
6794
+ const databaseId = params.databaseId;
6795
+ const collectionId = params.collectionId;
6796
+ const documents = params.documents;
6797
+ const transactionId = params.transactionId;
6798
+ if (typeof databaseId === 'undefined') {
6799
+ throw new AppwriteException('Missing required parameter: "databaseId"');
6800
+ }
6801
+ if (typeof collectionId === 'undefined') {
6802
+ throw new AppwriteException('Missing required parameter: "collectionId"');
6803
+ }
6804
+ if (typeof documents === 'undefined') {
6805
+ throw new AppwriteException('Missing required parameter: "documents"');
6806
+ }
6807
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
6808
+ const payload = {};
6809
+ if (typeof documents !== 'undefined') {
6810
+ payload['documents'] = documents;
6811
+ }
6812
+ if (typeof transactionId !== 'undefined') {
6813
+ payload['transactionId'] = transactionId;
6814
+ }
6815
+ const uri = new URL(this.client.config.endpoint + apiPath);
6816
+ const apiHeaders = {
6817
+ 'content-type': 'application/json',
6818
+ };
6819
+ return this.client.call('post', uri, apiHeaders, payload);
6820
+ }
6821
+ upsertDocuments(paramsOrFirst, ...rest) {
6822
+ let params;
6823
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6824
+ params = (paramsOrFirst || {});
6825
+ }
6826
+ else {
6827
+ params = {
6828
+ databaseId: paramsOrFirst,
6829
+ collectionId: rest[0],
6830
+ documents: rest[1],
6831
+ transactionId: rest[2]
6832
+ };
6833
+ }
6834
+ const databaseId = params.databaseId;
6835
+ const collectionId = params.collectionId;
6836
+ const documents = params.documents;
6837
+ const transactionId = params.transactionId;
6838
+ if (typeof databaseId === 'undefined') {
6839
+ throw new AppwriteException('Missing required parameter: "databaseId"');
6840
+ }
6841
+ if (typeof collectionId === 'undefined') {
6842
+ throw new AppwriteException('Missing required parameter: "collectionId"');
6843
+ }
6844
+ if (typeof documents === 'undefined') {
6845
+ throw new AppwriteException('Missing required parameter: "documents"');
6846
+ }
6847
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
6848
+ const payload = {};
6849
+ if (typeof documents !== 'undefined') {
6850
+ payload['documents'] = documents;
6851
+ }
6852
+ if (typeof transactionId !== 'undefined') {
6853
+ payload['transactionId'] = transactionId;
6854
+ }
6855
+ const uri = new URL(this.client.config.endpoint + apiPath);
6856
+ const apiHeaders = {
6857
+ 'content-type': 'application/json',
6858
+ };
6859
+ return this.client.call('put', uri, apiHeaders, payload);
6860
+ }
6861
+ updateDocuments(paramsOrFirst, ...rest) {
6862
+ let params;
6863
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6864
+ params = (paramsOrFirst || {});
6865
+ }
6866
+ else {
6867
+ params = {
6868
+ databaseId: paramsOrFirst,
6869
+ collectionId: rest[0],
6870
+ data: rest[1],
6871
+ queries: rest[2],
6872
+ transactionId: rest[3]
6873
+ };
6874
+ }
6875
+ const databaseId = params.databaseId;
6876
+ const collectionId = params.collectionId;
6877
+ const data = params.data;
6878
+ const queries = params.queries;
6879
+ const transactionId = params.transactionId;
6880
+ if (typeof databaseId === 'undefined') {
6881
+ throw new AppwriteException('Missing required parameter: "databaseId"');
6882
+ }
6883
+ if (typeof collectionId === 'undefined') {
6884
+ throw new AppwriteException('Missing required parameter: "collectionId"');
6885
+ }
6886
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
6887
+ const payload = {};
6888
+ if (typeof data !== 'undefined') {
6889
+ payload['data'] = data;
6890
+ }
6891
+ if (typeof queries !== 'undefined') {
6892
+ payload['queries'] = queries;
6893
+ }
6894
+ if (typeof transactionId !== 'undefined') {
6895
+ payload['transactionId'] = transactionId;
6896
+ }
6897
+ const uri = new URL(this.client.config.endpoint + apiPath);
6898
+ const apiHeaders = {
6899
+ 'content-type': 'application/json',
6900
+ };
6901
+ return this.client.call('patch', uri, apiHeaders, payload);
6902
+ }
6903
+ deleteDocuments(paramsOrFirst, ...rest) {
6904
+ let params;
6905
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6906
+ params = (paramsOrFirst || {});
6907
+ }
6908
+ else {
6909
+ params = {
6910
+ databaseId: paramsOrFirst,
6911
+ collectionId: rest[0],
6912
+ queries: rest[1],
6913
+ transactionId: rest[2]
6914
+ };
6915
+ }
6916
+ const databaseId = params.databaseId;
6917
+ const collectionId = params.collectionId;
6918
+ const queries = params.queries;
6919
+ const transactionId = params.transactionId;
6920
+ if (typeof databaseId === 'undefined') {
6921
+ throw new AppwriteException('Missing required parameter: "databaseId"');
6922
+ }
6923
+ if (typeof collectionId === 'undefined') {
6924
+ throw new AppwriteException('Missing required parameter: "collectionId"');
6925
+ }
6926
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
6927
+ const payload = {};
6928
+ if (typeof queries !== 'undefined') {
6929
+ payload['queries'] = queries;
6930
+ }
6931
+ if (typeof transactionId !== 'undefined') {
6932
+ payload['transactionId'] = transactionId;
6933
+ }
6934
+ const uri = new URL(this.client.config.endpoint + apiPath);
6935
+ const apiHeaders = {
6936
+ 'content-type': 'application/json',
6937
+ };
6938
+ return this.client.call('delete', uri, apiHeaders, payload);
6939
+ }
6940
+ getDocument(paramsOrFirst, ...rest) {
6941
+ let params;
6942
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6943
+ params = (paramsOrFirst || {});
6944
+ }
6945
+ else {
6946
+ params = {
6947
+ databaseId: paramsOrFirst,
6948
+ collectionId: rest[0],
6949
+ documentId: rest[1],
6950
+ queries: rest[2],
6951
+ transactionId: rest[3]
6952
+ };
6953
+ }
6954
+ const databaseId = params.databaseId;
6955
+ const collectionId = params.collectionId;
6956
+ const documentId = params.documentId;
6957
+ const queries = params.queries;
6958
+ const transactionId = params.transactionId;
6959
+ if (typeof databaseId === 'undefined') {
6960
+ throw new AppwriteException('Missing required parameter: "databaseId"');
6961
+ }
6962
+ if (typeof collectionId === 'undefined') {
6963
+ throw new AppwriteException('Missing required parameter: "collectionId"');
6964
+ }
6965
+ if (typeof documentId === 'undefined') {
6966
+ throw new AppwriteException('Missing required parameter: "documentId"');
6967
+ }
6968
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{documentId}', documentId);
6969
+ const payload = {};
6970
+ if (typeof queries !== 'undefined') {
6971
+ payload['queries'] = queries;
6972
+ }
6973
+ if (typeof transactionId !== 'undefined') {
6974
+ payload['transactionId'] = transactionId;
6975
+ }
6976
+ const uri = new URL(this.client.config.endpoint + apiPath);
6977
+ const apiHeaders = {};
6978
+ return this.client.call('get', uri, apiHeaders, payload);
6979
+ }
6980
+ upsertDocument(paramsOrFirst, ...rest) {
6345
6981
  let params;
6346
6982
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6347
6983
  params = (paramsOrFirst || {});
@@ -8775,7 +9411,7 @@ class Functions {
8775
9411
  }
8776
9412
  listTemplates(paramsOrFirst, ...rest) {
8777
9413
  let params;
8778
- if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
9414
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'runtimes' in paramsOrFirst)) {
8779
9415
  params = (paramsOrFirst || {});
8780
9416
  }
8781
9417
  else {
@@ -13248,7 +13884,7 @@ class Migrations {
13248
13884
  }
13249
13885
  createAppwriteMigration(paramsOrFirst, ...rest) {
13250
13886
  let params;
13251
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
13887
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'resources' in paramsOrFirst)) {
13252
13888
  params = (paramsOrFirst || {});
13253
13889
  }
13254
13890
  else {
@@ -13297,7 +13933,7 @@ class Migrations {
13297
13933
  }
13298
13934
  getAppwriteReport(paramsOrFirst, ...rest) {
13299
13935
  let params;
13300
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
13936
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'resources' in paramsOrFirst)) {
13301
13937
  params = (paramsOrFirst || {});
13302
13938
  }
13303
13939
  else {
@@ -13458,7 +14094,7 @@ class Migrations {
13458
14094
  }
13459
14095
  createFirebaseMigration(paramsOrFirst, ...rest) {
13460
14096
  let params;
13461
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
14097
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'resources' in paramsOrFirst)) {
13462
14098
  params = (paramsOrFirst || {});
13463
14099
  }
13464
14100
  else {
@@ -13491,7 +14127,7 @@ class Migrations {
13491
14127
  }
13492
14128
  getFirebaseReport(paramsOrFirst, ...rest) {
13493
14129
  let params;
13494
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
14130
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'resources' in paramsOrFirst)) {
13495
14131
  params = (paramsOrFirst || {});
13496
14132
  }
13497
14133
  else {
@@ -13522,7 +14158,7 @@ class Migrations {
13522
14158
  }
13523
14159
  createNHostMigration(paramsOrFirst, ...rest) {
13524
14160
  let params;
13525
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
14161
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'resources' in paramsOrFirst)) {
13526
14162
  params = (paramsOrFirst || {});
13527
14163
  }
13528
14164
  else {
@@ -13600,7 +14236,7 @@ class Migrations {
13600
14236
  }
13601
14237
  getNHostReport(paramsOrFirst, ...rest) {
13602
14238
  let params;
13603
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
14239
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'resources' in paramsOrFirst)) {
13604
14240
  params = (paramsOrFirst || {});
13605
14241
  }
13606
14242
  else {
@@ -13676,7 +14312,7 @@ class Migrations {
13676
14312
  }
13677
14313
  createSupabaseMigration(paramsOrFirst, ...rest) {
13678
14314
  let params;
13679
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
14315
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'resources' in paramsOrFirst)) {
13680
14316
  params = (paramsOrFirst || {});
13681
14317
  }
13682
14318
  else {
@@ -13746,7 +14382,7 @@ class Migrations {
13746
14382
  }
13747
14383
  getSupabaseReport(paramsOrFirst, ...rest) {
13748
14384
  let params;
13749
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
14385
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'resources' in paramsOrFirst)) {
13750
14386
  params = (paramsOrFirst || {});
13751
14387
  }
13752
14388
  else {
@@ -13985,7 +14621,7 @@ class Organizations {
13985
14621
  }
13986
14622
  estimationCreateOrganization(paramsOrFirst, ...rest) {
13987
14623
  let params;
13988
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'billingPlan' in paramsOrFirst)) {
14624
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
13989
14625
  params = (paramsOrFirst || {});
13990
14626
  }
13991
14627
  else {
@@ -14630,6 +15266,174 @@ class Organizations {
14630
15266
  const apiHeaders = {};
14631
15267
  return this.client.call('get', uri, apiHeaders, payload);
14632
15268
  }
15269
+ listKeys(paramsOrFirst, ...rest) {
15270
+ let params;
15271
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
15272
+ params = (paramsOrFirst || {});
15273
+ }
15274
+ else {
15275
+ params = {
15276
+ organizationId: paramsOrFirst,
15277
+ total: rest[0]
15278
+ };
15279
+ }
15280
+ const organizationId = params.organizationId;
15281
+ const total = params.total;
15282
+ if (typeof organizationId === 'undefined') {
15283
+ throw new AppwriteException('Missing required parameter: "organizationId"');
15284
+ }
15285
+ const apiPath = '/organizations/{organizationId}/keys'.replace('{organizationId}', organizationId);
15286
+ const payload = {};
15287
+ if (typeof total !== 'undefined') {
15288
+ payload['total'] = total;
15289
+ }
15290
+ const uri = new URL(this.client.config.endpoint + apiPath);
15291
+ const apiHeaders = {};
15292
+ return this.client.call('get', uri, apiHeaders, payload);
15293
+ }
15294
+ createKey(paramsOrFirst, ...rest) {
15295
+ let params;
15296
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
15297
+ params = (paramsOrFirst || {});
15298
+ }
15299
+ else {
15300
+ params = {
15301
+ organizationId: paramsOrFirst,
15302
+ name: rest[0],
15303
+ scopes: rest[1],
15304
+ expire: rest[2]
15305
+ };
15306
+ }
15307
+ const organizationId = params.organizationId;
15308
+ const name = params.name;
15309
+ const scopes = params.scopes;
15310
+ const expire = params.expire;
15311
+ if (typeof organizationId === 'undefined') {
15312
+ throw new AppwriteException('Missing required parameter: "organizationId"');
15313
+ }
15314
+ if (typeof name === 'undefined') {
15315
+ throw new AppwriteException('Missing required parameter: "name"');
15316
+ }
15317
+ if (typeof scopes === 'undefined') {
15318
+ throw new AppwriteException('Missing required parameter: "scopes"');
15319
+ }
15320
+ const apiPath = '/organizations/{organizationId}/keys'.replace('{organizationId}', organizationId);
15321
+ const payload = {};
15322
+ if (typeof name !== 'undefined') {
15323
+ payload['name'] = name;
15324
+ }
15325
+ if (typeof scopes !== 'undefined') {
15326
+ payload['scopes'] = scopes;
15327
+ }
15328
+ if (typeof expire !== 'undefined') {
15329
+ payload['expire'] = expire;
15330
+ }
15331
+ const uri = new URL(this.client.config.endpoint + apiPath);
15332
+ const apiHeaders = {
15333
+ 'content-type': 'application/json',
15334
+ };
15335
+ return this.client.call('post', uri, apiHeaders, payload);
15336
+ }
15337
+ getKey(paramsOrFirst, ...rest) {
15338
+ let params;
15339
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
15340
+ params = (paramsOrFirst || {});
15341
+ }
15342
+ else {
15343
+ params = {
15344
+ organizationId: paramsOrFirst,
15345
+ keyId: rest[0]
15346
+ };
15347
+ }
15348
+ const organizationId = params.organizationId;
15349
+ const keyId = params.keyId;
15350
+ if (typeof organizationId === 'undefined') {
15351
+ throw new AppwriteException('Missing required parameter: "organizationId"');
15352
+ }
15353
+ if (typeof keyId === 'undefined') {
15354
+ throw new AppwriteException('Missing required parameter: "keyId"');
15355
+ }
15356
+ const apiPath = '/organizations/{organizationId}/keys/{keyId}'.replace('{organizationId}', organizationId).replace('{keyId}', keyId);
15357
+ const payload = {};
15358
+ const uri = new URL(this.client.config.endpoint + apiPath);
15359
+ const apiHeaders = {};
15360
+ return this.client.call('get', uri, apiHeaders, payload);
15361
+ }
15362
+ updateKey(paramsOrFirst, ...rest) {
15363
+ let params;
15364
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
15365
+ params = (paramsOrFirst || {});
15366
+ }
15367
+ else {
15368
+ params = {
15369
+ organizationId: paramsOrFirst,
15370
+ keyId: rest[0],
15371
+ name: rest[1],
15372
+ scopes: rest[2],
15373
+ expire: rest[3]
15374
+ };
15375
+ }
15376
+ const organizationId = params.organizationId;
15377
+ const keyId = params.keyId;
15378
+ const name = params.name;
15379
+ const scopes = params.scopes;
15380
+ const expire = params.expire;
15381
+ if (typeof organizationId === 'undefined') {
15382
+ throw new AppwriteException('Missing required parameter: "organizationId"');
15383
+ }
15384
+ if (typeof keyId === 'undefined') {
15385
+ throw new AppwriteException('Missing required parameter: "keyId"');
15386
+ }
15387
+ if (typeof name === 'undefined') {
15388
+ throw new AppwriteException('Missing required parameter: "name"');
15389
+ }
15390
+ if (typeof scopes === 'undefined') {
15391
+ throw new AppwriteException('Missing required parameter: "scopes"');
15392
+ }
15393
+ const apiPath = '/organizations/{organizationId}/keys/{keyId}'.replace('{organizationId}', organizationId).replace('{keyId}', keyId);
15394
+ const payload = {};
15395
+ if (typeof name !== 'undefined') {
15396
+ payload['name'] = name;
15397
+ }
15398
+ if (typeof scopes !== 'undefined') {
15399
+ payload['scopes'] = scopes;
15400
+ }
15401
+ if (typeof expire !== 'undefined') {
15402
+ payload['expire'] = expire;
15403
+ }
15404
+ const uri = new URL(this.client.config.endpoint + apiPath);
15405
+ const apiHeaders = {
15406
+ 'content-type': 'application/json',
15407
+ };
15408
+ return this.client.call('put', uri, apiHeaders, payload);
15409
+ }
15410
+ deleteKey(paramsOrFirst, ...rest) {
15411
+ let params;
15412
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
15413
+ params = (paramsOrFirst || {});
15414
+ }
15415
+ else {
15416
+ params = {
15417
+ organizationId: paramsOrFirst,
15418
+ keyId: rest[0]
15419
+ };
15420
+ }
15421
+ const organizationId = params.organizationId;
15422
+ const keyId = params.keyId;
15423
+ if (typeof organizationId === 'undefined') {
15424
+ throw new AppwriteException('Missing required parameter: "organizationId"');
15425
+ }
15426
+ if (typeof keyId === 'undefined') {
15427
+ throw new AppwriteException('Missing required parameter: "keyId"');
15428
+ }
15429
+ const apiPath = '/organizations/{organizationId}/keys/{keyId}'.replace('{organizationId}', organizationId).replace('{keyId}', keyId);
15430
+ const payload = {};
15431
+ const uri = new URL(this.client.config.endpoint + apiPath);
15432
+ const apiHeaders = {
15433
+ 'content-type': 'application/json',
15434
+ };
15435
+ return this.client.call('delete', uri, apiHeaders, payload);
15436
+ }
14633
15437
  setDefaultPaymentMethod(paramsOrFirst, ...rest) {
14634
15438
  let params;
14635
15439
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
@@ -14888,6 +15692,26 @@ class Organizations {
14888
15692
  };
14889
15693
  return this.client.call('patch', uri, apiHeaders, payload);
14890
15694
  }
15695
+ listRegions(paramsOrFirst) {
15696
+ let params;
15697
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
15698
+ params = (paramsOrFirst || {});
15699
+ }
15700
+ else {
15701
+ params = {
15702
+ organizationId: paramsOrFirst
15703
+ };
15704
+ }
15705
+ const organizationId = params.organizationId;
15706
+ if (typeof organizationId === 'undefined') {
15707
+ throw new AppwriteException('Missing required parameter: "organizationId"');
15708
+ }
15709
+ const apiPath = '/organizations/{organizationId}/regions'.replace('{organizationId}', organizationId);
15710
+ const payload = {};
15711
+ const uri = new URL(this.client.config.endpoint + apiPath);
15712
+ const apiHeaders = {};
15713
+ return this.client.call('get', uri, apiHeaders, payload);
15714
+ }
14891
15715
  getScopes(paramsOrFirst) {
14892
15716
  let params;
14893
15717
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
@@ -17960,7 +18784,7 @@ class Sites {
17960
18784
  }
17961
18785
  listTemplates(paramsOrFirst, ...rest) {
17962
18786
  let params;
17963
- if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
18787
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'frameworks' in paramsOrFirst)) {
17964
18788
  params = (paramsOrFirst || {});
17965
18789
  }
17966
18790
  else {
@@ -19703,9 +20527,6 @@ class TablesDB {
19703
20527
  if (typeof databaseId === 'undefined') {
19704
20528
  throw new AppwriteException('Missing required parameter: "databaseId"');
19705
20529
  }
19706
- if (typeof name === 'undefined') {
19707
- throw new AppwriteException('Missing required parameter: "name"');
19708
- }
19709
20530
  const apiPath = '/tablesdb/{databaseId}'.replace('{databaseId}', databaseId);
19710
20531
  const payload = {};
19711
20532
  if (typeof name !== 'undefined') {
@@ -19892,9 +20713,6 @@ class TablesDB {
19892
20713
  if (typeof tableId === 'undefined') {
19893
20714
  throw new AppwriteException('Missing required parameter: "tableId"');
19894
20715
  }
19895
- if (typeof name === 'undefined') {
19896
- throw new AppwriteException('Missing required parameter: "name"');
19897
- }
19898
20716
  const apiPath = '/tablesdb/{databaseId}/tables/{tableId}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
19899
20717
  const payload = {};
19900
20718
  if (typeof name !== 'undefined') {
@@ -19977,7 +20795,447 @@ class TablesDB {
19977
20795
  const apiHeaders = {};
19978
20796
  return this.client.call('get', uri, apiHeaders, payload);
19979
20797
  }
19980
- createBooleanColumn(paramsOrFirst, ...rest) {
20798
+ createBooleanColumn(paramsOrFirst, ...rest) {
20799
+ let params;
20800
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20801
+ params = (paramsOrFirst || {});
20802
+ }
20803
+ else {
20804
+ params = {
20805
+ databaseId: paramsOrFirst,
20806
+ tableId: rest[0],
20807
+ key: rest[1],
20808
+ required: rest[2],
20809
+ xdefault: rest[3],
20810
+ array: rest[4]
20811
+ };
20812
+ }
20813
+ const databaseId = params.databaseId;
20814
+ const tableId = params.tableId;
20815
+ const key = params.key;
20816
+ const required = params.required;
20817
+ const xdefault = params.xdefault;
20818
+ const array = params.array;
20819
+ if (typeof databaseId === 'undefined') {
20820
+ throw new AppwriteException('Missing required parameter: "databaseId"');
20821
+ }
20822
+ if (typeof tableId === 'undefined') {
20823
+ throw new AppwriteException('Missing required parameter: "tableId"');
20824
+ }
20825
+ if (typeof key === 'undefined') {
20826
+ throw new AppwriteException('Missing required parameter: "key"');
20827
+ }
20828
+ if (typeof required === 'undefined') {
20829
+ throw new AppwriteException('Missing required parameter: "required"');
20830
+ }
20831
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/boolean'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
20832
+ const payload = {};
20833
+ if (typeof key !== 'undefined') {
20834
+ payload['key'] = key;
20835
+ }
20836
+ if (typeof required !== 'undefined') {
20837
+ payload['required'] = required;
20838
+ }
20839
+ if (typeof xdefault !== 'undefined') {
20840
+ payload['default'] = xdefault;
20841
+ }
20842
+ if (typeof array !== 'undefined') {
20843
+ payload['array'] = array;
20844
+ }
20845
+ const uri = new URL(this.client.config.endpoint + apiPath);
20846
+ const apiHeaders = {
20847
+ 'content-type': 'application/json',
20848
+ };
20849
+ return this.client.call('post', uri, apiHeaders, payload);
20850
+ }
20851
+ updateBooleanColumn(paramsOrFirst, ...rest) {
20852
+ let params;
20853
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20854
+ params = (paramsOrFirst || {});
20855
+ }
20856
+ else {
20857
+ params = {
20858
+ databaseId: paramsOrFirst,
20859
+ tableId: rest[0],
20860
+ key: rest[1],
20861
+ required: rest[2],
20862
+ xdefault: rest[3],
20863
+ newKey: rest[4]
20864
+ };
20865
+ }
20866
+ const databaseId = params.databaseId;
20867
+ const tableId = params.tableId;
20868
+ const key = params.key;
20869
+ const required = params.required;
20870
+ const xdefault = params.xdefault;
20871
+ const newKey = params.newKey;
20872
+ if (typeof databaseId === 'undefined') {
20873
+ throw new AppwriteException('Missing required parameter: "databaseId"');
20874
+ }
20875
+ if (typeof tableId === 'undefined') {
20876
+ throw new AppwriteException('Missing required parameter: "tableId"');
20877
+ }
20878
+ if (typeof key === 'undefined') {
20879
+ throw new AppwriteException('Missing required parameter: "key"');
20880
+ }
20881
+ if (typeof required === 'undefined') {
20882
+ throw new AppwriteException('Missing required parameter: "required"');
20883
+ }
20884
+ if (typeof xdefault === 'undefined') {
20885
+ throw new AppwriteException('Missing required parameter: "xdefault"');
20886
+ }
20887
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/boolean/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
20888
+ const payload = {};
20889
+ if (typeof required !== 'undefined') {
20890
+ payload['required'] = required;
20891
+ }
20892
+ if (typeof xdefault !== 'undefined') {
20893
+ payload['default'] = xdefault;
20894
+ }
20895
+ if (typeof newKey !== 'undefined') {
20896
+ payload['newKey'] = newKey;
20897
+ }
20898
+ const uri = new URL(this.client.config.endpoint + apiPath);
20899
+ const apiHeaders = {
20900
+ 'content-type': 'application/json',
20901
+ };
20902
+ return this.client.call('patch', uri, apiHeaders, payload);
20903
+ }
20904
+ createDatetimeColumn(paramsOrFirst, ...rest) {
20905
+ let params;
20906
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20907
+ params = (paramsOrFirst || {});
20908
+ }
20909
+ else {
20910
+ params = {
20911
+ databaseId: paramsOrFirst,
20912
+ tableId: rest[0],
20913
+ key: rest[1],
20914
+ required: rest[2],
20915
+ xdefault: rest[3],
20916
+ array: rest[4]
20917
+ };
20918
+ }
20919
+ const databaseId = params.databaseId;
20920
+ const tableId = params.tableId;
20921
+ const key = params.key;
20922
+ const required = params.required;
20923
+ const xdefault = params.xdefault;
20924
+ const array = params.array;
20925
+ if (typeof databaseId === 'undefined') {
20926
+ throw new AppwriteException('Missing required parameter: "databaseId"');
20927
+ }
20928
+ if (typeof tableId === 'undefined') {
20929
+ throw new AppwriteException('Missing required parameter: "tableId"');
20930
+ }
20931
+ if (typeof key === 'undefined') {
20932
+ throw new AppwriteException('Missing required parameter: "key"');
20933
+ }
20934
+ if (typeof required === 'undefined') {
20935
+ throw new AppwriteException('Missing required parameter: "required"');
20936
+ }
20937
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/datetime'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
20938
+ const payload = {};
20939
+ if (typeof key !== 'undefined') {
20940
+ payload['key'] = key;
20941
+ }
20942
+ if (typeof required !== 'undefined') {
20943
+ payload['required'] = required;
20944
+ }
20945
+ if (typeof xdefault !== 'undefined') {
20946
+ payload['default'] = xdefault;
20947
+ }
20948
+ if (typeof array !== 'undefined') {
20949
+ payload['array'] = array;
20950
+ }
20951
+ const uri = new URL(this.client.config.endpoint + apiPath);
20952
+ const apiHeaders = {
20953
+ 'content-type': 'application/json',
20954
+ };
20955
+ return this.client.call('post', uri, apiHeaders, payload);
20956
+ }
20957
+ updateDatetimeColumn(paramsOrFirst, ...rest) {
20958
+ let params;
20959
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20960
+ params = (paramsOrFirst || {});
20961
+ }
20962
+ else {
20963
+ params = {
20964
+ databaseId: paramsOrFirst,
20965
+ tableId: rest[0],
20966
+ key: rest[1],
20967
+ required: rest[2],
20968
+ xdefault: rest[3],
20969
+ newKey: rest[4]
20970
+ };
20971
+ }
20972
+ const databaseId = params.databaseId;
20973
+ const tableId = params.tableId;
20974
+ const key = params.key;
20975
+ const required = params.required;
20976
+ const xdefault = params.xdefault;
20977
+ const newKey = params.newKey;
20978
+ if (typeof databaseId === 'undefined') {
20979
+ throw new AppwriteException('Missing required parameter: "databaseId"');
20980
+ }
20981
+ if (typeof tableId === 'undefined') {
20982
+ throw new AppwriteException('Missing required parameter: "tableId"');
20983
+ }
20984
+ if (typeof key === 'undefined') {
20985
+ throw new AppwriteException('Missing required parameter: "key"');
20986
+ }
20987
+ if (typeof required === 'undefined') {
20988
+ throw new AppwriteException('Missing required parameter: "required"');
20989
+ }
20990
+ if (typeof xdefault === 'undefined') {
20991
+ throw new AppwriteException('Missing required parameter: "xdefault"');
20992
+ }
20993
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/datetime/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
20994
+ const payload = {};
20995
+ if (typeof required !== 'undefined') {
20996
+ payload['required'] = required;
20997
+ }
20998
+ if (typeof xdefault !== 'undefined') {
20999
+ payload['default'] = xdefault;
21000
+ }
21001
+ if (typeof newKey !== 'undefined') {
21002
+ payload['newKey'] = newKey;
21003
+ }
21004
+ const uri = new URL(this.client.config.endpoint + apiPath);
21005
+ const apiHeaders = {
21006
+ 'content-type': 'application/json',
21007
+ };
21008
+ return this.client.call('patch', uri, apiHeaders, payload);
21009
+ }
21010
+ createEmailColumn(paramsOrFirst, ...rest) {
21011
+ let params;
21012
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
21013
+ params = (paramsOrFirst || {});
21014
+ }
21015
+ else {
21016
+ params = {
21017
+ databaseId: paramsOrFirst,
21018
+ tableId: rest[0],
21019
+ key: rest[1],
21020
+ required: rest[2],
21021
+ xdefault: rest[3],
21022
+ array: rest[4]
21023
+ };
21024
+ }
21025
+ const databaseId = params.databaseId;
21026
+ const tableId = params.tableId;
21027
+ const key = params.key;
21028
+ const required = params.required;
21029
+ const xdefault = params.xdefault;
21030
+ const array = params.array;
21031
+ if (typeof databaseId === 'undefined') {
21032
+ throw new AppwriteException('Missing required parameter: "databaseId"');
21033
+ }
21034
+ if (typeof tableId === 'undefined') {
21035
+ throw new AppwriteException('Missing required parameter: "tableId"');
21036
+ }
21037
+ if (typeof key === 'undefined') {
21038
+ throw new AppwriteException('Missing required parameter: "key"');
21039
+ }
21040
+ if (typeof required === 'undefined') {
21041
+ throw new AppwriteException('Missing required parameter: "required"');
21042
+ }
21043
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/email'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
21044
+ const payload = {};
21045
+ if (typeof key !== 'undefined') {
21046
+ payload['key'] = key;
21047
+ }
21048
+ if (typeof required !== 'undefined') {
21049
+ payload['required'] = required;
21050
+ }
21051
+ if (typeof xdefault !== 'undefined') {
21052
+ payload['default'] = xdefault;
21053
+ }
21054
+ if (typeof array !== 'undefined') {
21055
+ payload['array'] = array;
21056
+ }
21057
+ const uri = new URL(this.client.config.endpoint + apiPath);
21058
+ const apiHeaders = {
21059
+ 'content-type': 'application/json',
21060
+ };
21061
+ return this.client.call('post', uri, apiHeaders, payload);
21062
+ }
21063
+ updateEmailColumn(paramsOrFirst, ...rest) {
21064
+ let params;
21065
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
21066
+ params = (paramsOrFirst || {});
21067
+ }
21068
+ else {
21069
+ params = {
21070
+ databaseId: paramsOrFirst,
21071
+ tableId: rest[0],
21072
+ key: rest[1],
21073
+ required: rest[2],
21074
+ xdefault: rest[3],
21075
+ newKey: rest[4]
21076
+ };
21077
+ }
21078
+ const databaseId = params.databaseId;
21079
+ const tableId = params.tableId;
21080
+ const key = params.key;
21081
+ const required = params.required;
21082
+ const xdefault = params.xdefault;
21083
+ const newKey = params.newKey;
21084
+ if (typeof databaseId === 'undefined') {
21085
+ throw new AppwriteException('Missing required parameter: "databaseId"');
21086
+ }
21087
+ if (typeof tableId === 'undefined') {
21088
+ throw new AppwriteException('Missing required parameter: "tableId"');
21089
+ }
21090
+ if (typeof key === 'undefined') {
21091
+ throw new AppwriteException('Missing required parameter: "key"');
21092
+ }
21093
+ if (typeof required === 'undefined') {
21094
+ throw new AppwriteException('Missing required parameter: "required"');
21095
+ }
21096
+ if (typeof xdefault === 'undefined') {
21097
+ throw new AppwriteException('Missing required parameter: "xdefault"');
21098
+ }
21099
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/email/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
21100
+ const payload = {};
21101
+ if (typeof required !== 'undefined') {
21102
+ payload['required'] = required;
21103
+ }
21104
+ if (typeof xdefault !== 'undefined') {
21105
+ payload['default'] = xdefault;
21106
+ }
21107
+ if (typeof newKey !== 'undefined') {
21108
+ payload['newKey'] = newKey;
21109
+ }
21110
+ const uri = new URL(this.client.config.endpoint + apiPath);
21111
+ const apiHeaders = {
21112
+ 'content-type': 'application/json',
21113
+ };
21114
+ return this.client.call('patch', uri, apiHeaders, payload);
21115
+ }
21116
+ createEnumColumn(paramsOrFirst, ...rest) {
21117
+ let params;
21118
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
21119
+ params = (paramsOrFirst || {});
21120
+ }
21121
+ else {
21122
+ params = {
21123
+ databaseId: paramsOrFirst,
21124
+ tableId: rest[0],
21125
+ key: rest[1],
21126
+ elements: rest[2],
21127
+ required: rest[3],
21128
+ xdefault: rest[4],
21129
+ array: rest[5]
21130
+ };
21131
+ }
21132
+ const databaseId = params.databaseId;
21133
+ const tableId = params.tableId;
21134
+ const key = params.key;
21135
+ const elements = params.elements;
21136
+ const required = params.required;
21137
+ const xdefault = params.xdefault;
21138
+ const array = params.array;
21139
+ if (typeof databaseId === 'undefined') {
21140
+ throw new AppwriteException('Missing required parameter: "databaseId"');
21141
+ }
21142
+ if (typeof tableId === 'undefined') {
21143
+ throw new AppwriteException('Missing required parameter: "tableId"');
21144
+ }
21145
+ if (typeof key === 'undefined') {
21146
+ throw new AppwriteException('Missing required parameter: "key"');
21147
+ }
21148
+ if (typeof elements === 'undefined') {
21149
+ throw new AppwriteException('Missing required parameter: "elements"');
21150
+ }
21151
+ if (typeof required === 'undefined') {
21152
+ throw new AppwriteException('Missing required parameter: "required"');
21153
+ }
21154
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/enum'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
21155
+ const payload = {};
21156
+ if (typeof key !== 'undefined') {
21157
+ payload['key'] = key;
21158
+ }
21159
+ if (typeof elements !== 'undefined') {
21160
+ payload['elements'] = elements;
21161
+ }
21162
+ if (typeof required !== 'undefined') {
21163
+ payload['required'] = required;
21164
+ }
21165
+ if (typeof xdefault !== 'undefined') {
21166
+ payload['default'] = xdefault;
21167
+ }
21168
+ if (typeof array !== 'undefined') {
21169
+ payload['array'] = array;
21170
+ }
21171
+ const uri = new URL(this.client.config.endpoint + apiPath);
21172
+ const apiHeaders = {
21173
+ 'content-type': 'application/json',
21174
+ };
21175
+ return this.client.call('post', uri, apiHeaders, payload);
21176
+ }
21177
+ updateEnumColumn(paramsOrFirst, ...rest) {
21178
+ let params;
21179
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
21180
+ params = (paramsOrFirst || {});
21181
+ }
21182
+ else {
21183
+ params = {
21184
+ databaseId: paramsOrFirst,
21185
+ tableId: rest[0],
21186
+ key: rest[1],
21187
+ elements: rest[2],
21188
+ required: rest[3],
21189
+ xdefault: rest[4],
21190
+ newKey: rest[5]
21191
+ };
21192
+ }
21193
+ const databaseId = params.databaseId;
21194
+ const tableId = params.tableId;
21195
+ const key = params.key;
21196
+ const elements = params.elements;
21197
+ const required = params.required;
21198
+ const xdefault = params.xdefault;
21199
+ const newKey = params.newKey;
21200
+ if (typeof databaseId === 'undefined') {
21201
+ throw new AppwriteException('Missing required parameter: "databaseId"');
21202
+ }
21203
+ if (typeof tableId === 'undefined') {
21204
+ throw new AppwriteException('Missing required parameter: "tableId"');
21205
+ }
21206
+ if (typeof key === 'undefined') {
21207
+ throw new AppwriteException('Missing required parameter: "key"');
21208
+ }
21209
+ if (typeof elements === 'undefined') {
21210
+ throw new AppwriteException('Missing required parameter: "elements"');
21211
+ }
21212
+ if (typeof required === 'undefined') {
21213
+ throw new AppwriteException('Missing required parameter: "required"');
21214
+ }
21215
+ if (typeof xdefault === 'undefined') {
21216
+ throw new AppwriteException('Missing required parameter: "xdefault"');
21217
+ }
21218
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/enum/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
21219
+ const payload = {};
21220
+ if (typeof elements !== 'undefined') {
21221
+ payload['elements'] = elements;
21222
+ }
21223
+ if (typeof required !== 'undefined') {
21224
+ payload['required'] = required;
21225
+ }
21226
+ if (typeof xdefault !== 'undefined') {
21227
+ payload['default'] = xdefault;
21228
+ }
21229
+ if (typeof newKey !== 'undefined') {
21230
+ payload['newKey'] = newKey;
21231
+ }
21232
+ const uri = new URL(this.client.config.endpoint + apiPath);
21233
+ const apiHeaders = {
21234
+ 'content-type': 'application/json',
21235
+ };
21236
+ return this.client.call('patch', uri, apiHeaders, payload);
21237
+ }
21238
+ createFloatColumn(paramsOrFirst, ...rest) {
19981
21239
  let params;
19982
21240
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
19983
21241
  params = (paramsOrFirst || {});
@@ -19988,14 +21246,18 @@ class TablesDB {
19988
21246
  tableId: rest[0],
19989
21247
  key: rest[1],
19990
21248
  required: rest[2],
19991
- xdefault: rest[3],
19992
- array: rest[4]
21249
+ min: rest[3],
21250
+ max: rest[4],
21251
+ xdefault: rest[5],
21252
+ array: rest[6]
19993
21253
  };
19994
21254
  }
19995
21255
  const databaseId = params.databaseId;
19996
21256
  const tableId = params.tableId;
19997
21257
  const key = params.key;
19998
21258
  const required = params.required;
21259
+ const min = params.min;
21260
+ const max = params.max;
19999
21261
  const xdefault = params.xdefault;
20000
21262
  const array = params.array;
20001
21263
  if (typeof databaseId === 'undefined') {
@@ -20010,7 +21272,7 @@ class TablesDB {
20010
21272
  if (typeof required === 'undefined') {
20011
21273
  throw new AppwriteException('Missing required parameter: "required"');
20012
21274
  }
20013
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/boolean'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
21275
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/float'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
20014
21276
  const payload = {};
20015
21277
  if (typeof key !== 'undefined') {
20016
21278
  payload['key'] = key;
@@ -20018,6 +21280,12 @@ class TablesDB {
20018
21280
  if (typeof required !== 'undefined') {
20019
21281
  payload['required'] = required;
20020
21282
  }
21283
+ if (typeof min !== 'undefined') {
21284
+ payload['min'] = min;
21285
+ }
21286
+ if (typeof max !== 'undefined') {
21287
+ payload['max'] = max;
21288
+ }
20021
21289
  if (typeof xdefault !== 'undefined') {
20022
21290
  payload['default'] = xdefault;
20023
21291
  }
@@ -20030,7 +21298,7 @@ class TablesDB {
20030
21298
  };
20031
21299
  return this.client.call('post', uri, apiHeaders, payload);
20032
21300
  }
20033
- updateBooleanColumn(paramsOrFirst, ...rest) {
21301
+ updateFloatColumn(paramsOrFirst, ...rest) {
20034
21302
  let params;
20035
21303
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20036
21304
  params = (paramsOrFirst || {});
@@ -20042,7 +21310,9 @@ class TablesDB {
20042
21310
  key: rest[1],
20043
21311
  required: rest[2],
20044
21312
  xdefault: rest[3],
20045
- newKey: rest[4]
21313
+ min: rest[4],
21314
+ max: rest[5],
21315
+ newKey: rest[6]
20046
21316
  };
20047
21317
  }
20048
21318
  const databaseId = params.databaseId;
@@ -20050,6 +21320,8 @@ class TablesDB {
20050
21320
  const key = params.key;
20051
21321
  const required = params.required;
20052
21322
  const xdefault = params.xdefault;
21323
+ const min = params.min;
21324
+ const max = params.max;
20053
21325
  const newKey = params.newKey;
20054
21326
  if (typeof databaseId === 'undefined') {
20055
21327
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -20066,11 +21338,17 @@ class TablesDB {
20066
21338
  if (typeof xdefault === 'undefined') {
20067
21339
  throw new AppwriteException('Missing required parameter: "xdefault"');
20068
21340
  }
20069
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/boolean/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
21341
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/float/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
20070
21342
  const payload = {};
20071
21343
  if (typeof required !== 'undefined') {
20072
21344
  payload['required'] = required;
20073
21345
  }
21346
+ if (typeof min !== 'undefined') {
21347
+ payload['min'] = min;
21348
+ }
21349
+ if (typeof max !== 'undefined') {
21350
+ payload['max'] = max;
21351
+ }
20074
21352
  if (typeof xdefault !== 'undefined') {
20075
21353
  payload['default'] = xdefault;
20076
21354
  }
@@ -20083,7 +21361,7 @@ class TablesDB {
20083
21361
  };
20084
21362
  return this.client.call('patch', uri, apiHeaders, payload);
20085
21363
  }
20086
- createDatetimeColumn(paramsOrFirst, ...rest) {
21364
+ createIntegerColumn(paramsOrFirst, ...rest) {
20087
21365
  let params;
20088
21366
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20089
21367
  params = (paramsOrFirst || {});
@@ -20094,14 +21372,18 @@ class TablesDB {
20094
21372
  tableId: rest[0],
20095
21373
  key: rest[1],
20096
21374
  required: rest[2],
20097
- xdefault: rest[3],
20098
- array: rest[4]
21375
+ min: rest[3],
21376
+ max: rest[4],
21377
+ xdefault: rest[5],
21378
+ array: rest[6]
20099
21379
  };
20100
21380
  }
20101
21381
  const databaseId = params.databaseId;
20102
21382
  const tableId = params.tableId;
20103
21383
  const key = params.key;
20104
21384
  const required = params.required;
21385
+ const min = params.min;
21386
+ const max = params.max;
20105
21387
  const xdefault = params.xdefault;
20106
21388
  const array = params.array;
20107
21389
  if (typeof databaseId === 'undefined') {
@@ -20116,7 +21398,7 @@ class TablesDB {
20116
21398
  if (typeof required === 'undefined') {
20117
21399
  throw new AppwriteException('Missing required parameter: "required"');
20118
21400
  }
20119
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/datetime'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
21401
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/integer'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
20120
21402
  const payload = {};
20121
21403
  if (typeof key !== 'undefined') {
20122
21404
  payload['key'] = key;
@@ -20124,6 +21406,12 @@ class TablesDB {
20124
21406
  if (typeof required !== 'undefined') {
20125
21407
  payload['required'] = required;
20126
21408
  }
21409
+ if (typeof min !== 'undefined') {
21410
+ payload['min'] = min;
21411
+ }
21412
+ if (typeof max !== 'undefined') {
21413
+ payload['max'] = max;
21414
+ }
20127
21415
  if (typeof xdefault !== 'undefined') {
20128
21416
  payload['default'] = xdefault;
20129
21417
  }
@@ -20136,7 +21424,7 @@ class TablesDB {
20136
21424
  };
20137
21425
  return this.client.call('post', uri, apiHeaders, payload);
20138
21426
  }
20139
- updateDatetimeColumn(paramsOrFirst, ...rest) {
21427
+ updateIntegerColumn(paramsOrFirst, ...rest) {
20140
21428
  let params;
20141
21429
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20142
21430
  params = (paramsOrFirst || {});
@@ -20148,7 +21436,9 @@ class TablesDB {
20148
21436
  key: rest[1],
20149
21437
  required: rest[2],
20150
21438
  xdefault: rest[3],
20151
- newKey: rest[4]
21439
+ min: rest[4],
21440
+ max: rest[5],
21441
+ newKey: rest[6]
20152
21442
  };
20153
21443
  }
20154
21444
  const databaseId = params.databaseId;
@@ -20156,6 +21446,8 @@ class TablesDB {
20156
21446
  const key = params.key;
20157
21447
  const required = params.required;
20158
21448
  const xdefault = params.xdefault;
21449
+ const min = params.min;
21450
+ const max = params.max;
20159
21451
  const newKey = params.newKey;
20160
21452
  if (typeof databaseId === 'undefined') {
20161
21453
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -20172,11 +21464,17 @@ class TablesDB {
20172
21464
  if (typeof xdefault === 'undefined') {
20173
21465
  throw new AppwriteException('Missing required parameter: "xdefault"');
20174
21466
  }
20175
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/datetime/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
21467
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/integer/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
20176
21468
  const payload = {};
20177
21469
  if (typeof required !== 'undefined') {
20178
21470
  payload['required'] = required;
20179
21471
  }
21472
+ if (typeof min !== 'undefined') {
21473
+ payload['min'] = min;
21474
+ }
21475
+ if (typeof max !== 'undefined') {
21476
+ payload['max'] = max;
21477
+ }
20180
21478
  if (typeof xdefault !== 'undefined') {
20181
21479
  payload['default'] = xdefault;
20182
21480
  }
@@ -20189,7 +21487,7 @@ class TablesDB {
20189
21487
  };
20190
21488
  return this.client.call('patch', uri, apiHeaders, payload);
20191
21489
  }
20192
- createEmailColumn(paramsOrFirst, ...rest) {
21490
+ createIpColumn(paramsOrFirst, ...rest) {
20193
21491
  let params;
20194
21492
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20195
21493
  params = (paramsOrFirst || {});
@@ -20222,7 +21520,7 @@ class TablesDB {
20222
21520
  if (typeof required === 'undefined') {
20223
21521
  throw new AppwriteException('Missing required parameter: "required"');
20224
21522
  }
20225
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/email'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
21523
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/ip'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
20226
21524
  const payload = {};
20227
21525
  if (typeof key !== 'undefined') {
20228
21526
  payload['key'] = key;
@@ -20242,7 +21540,7 @@ class TablesDB {
20242
21540
  };
20243
21541
  return this.client.call('post', uri, apiHeaders, payload);
20244
21542
  }
20245
- updateEmailColumn(paramsOrFirst, ...rest) {
21543
+ updateIpColumn(paramsOrFirst, ...rest) {
20246
21544
  let params;
20247
21545
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20248
21546
  params = (paramsOrFirst || {});
@@ -20278,7 +21576,7 @@ class TablesDB {
20278
21576
  if (typeof xdefault === 'undefined') {
20279
21577
  throw new AppwriteException('Missing required parameter: "xdefault"');
20280
21578
  }
20281
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/email/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
21579
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/ip/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
20282
21580
  const payload = {};
20283
21581
  if (typeof required !== 'undefined') {
20284
21582
  payload['required'] = required;
@@ -20295,7 +21593,7 @@ class TablesDB {
20295
21593
  };
20296
21594
  return this.client.call('patch', uri, apiHeaders, payload);
20297
21595
  }
20298
- createEnumColumn(paramsOrFirst, ...rest) {
21596
+ createLineColumn(paramsOrFirst, ...rest) {
20299
21597
  let params;
20300
21598
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20301
21599
  params = (paramsOrFirst || {});
@@ -20305,19 +21603,15 @@ class TablesDB {
20305
21603
  databaseId: paramsOrFirst,
20306
21604
  tableId: rest[0],
20307
21605
  key: rest[1],
20308
- elements: rest[2],
20309
- required: rest[3],
20310
- xdefault: rest[4],
20311
- array: rest[5]
21606
+ required: rest[2],
21607
+ xdefault: rest[3]
20312
21608
  };
20313
21609
  }
20314
21610
  const databaseId = params.databaseId;
20315
21611
  const tableId = params.tableId;
20316
21612
  const key = params.key;
20317
- const elements = params.elements;
20318
21613
  const required = params.required;
20319
21614
  const xdefault = params.xdefault;
20320
- const array = params.array;
20321
21615
  if (typeof databaseId === 'undefined') {
20322
21616
  throw new AppwriteException('Missing required parameter: "databaseId"');
20323
21617
  }
@@ -20327,36 +21621,27 @@ class TablesDB {
20327
21621
  if (typeof key === 'undefined') {
20328
21622
  throw new AppwriteException('Missing required parameter: "key"');
20329
21623
  }
20330
- if (typeof elements === 'undefined') {
20331
- throw new AppwriteException('Missing required parameter: "elements"');
20332
- }
20333
21624
  if (typeof required === 'undefined') {
20334
21625
  throw new AppwriteException('Missing required parameter: "required"');
20335
21626
  }
20336
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/enum'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
21627
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/line'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
20337
21628
  const payload = {};
20338
21629
  if (typeof key !== 'undefined') {
20339
21630
  payload['key'] = key;
20340
21631
  }
20341
- if (typeof elements !== 'undefined') {
20342
- payload['elements'] = elements;
20343
- }
20344
21632
  if (typeof required !== 'undefined') {
20345
21633
  payload['required'] = required;
20346
21634
  }
20347
21635
  if (typeof xdefault !== 'undefined') {
20348
21636
  payload['default'] = xdefault;
20349
21637
  }
20350
- if (typeof array !== 'undefined') {
20351
- payload['array'] = array;
20352
- }
20353
21638
  const uri = new URL(this.client.config.endpoint + apiPath);
20354
21639
  const apiHeaders = {
20355
21640
  'content-type': 'application/json',
20356
21641
  };
20357
21642
  return this.client.call('post', uri, apiHeaders, payload);
20358
21643
  }
20359
- updateEnumColumn(paramsOrFirst, ...rest) {
21644
+ updateLineColumn(paramsOrFirst, ...rest) {
20360
21645
  let params;
20361
21646
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20362
21647
  params = (paramsOrFirst || {});
@@ -20366,16 +21651,14 @@ class TablesDB {
20366
21651
  databaseId: paramsOrFirst,
20367
21652
  tableId: rest[0],
20368
21653
  key: rest[1],
20369
- elements: rest[2],
20370
- required: rest[3],
20371
- xdefault: rest[4],
20372
- newKey: rest[5]
21654
+ required: rest[2],
21655
+ xdefault: rest[3],
21656
+ newKey: rest[4]
20373
21657
  };
20374
21658
  }
20375
21659
  const databaseId = params.databaseId;
20376
21660
  const tableId = params.tableId;
20377
21661
  const key = params.key;
20378
- const elements = params.elements;
20379
21662
  const required = params.required;
20380
21663
  const xdefault = params.xdefault;
20381
21664
  const newKey = params.newKey;
@@ -20388,20 +21671,11 @@ class TablesDB {
20388
21671
  if (typeof key === 'undefined') {
20389
21672
  throw new AppwriteException('Missing required parameter: "key"');
20390
21673
  }
20391
- if (typeof elements === 'undefined') {
20392
- throw new AppwriteException('Missing required parameter: "elements"');
20393
- }
20394
21674
  if (typeof required === 'undefined') {
20395
21675
  throw new AppwriteException('Missing required parameter: "required"');
20396
21676
  }
20397
- if (typeof xdefault === 'undefined') {
20398
- throw new AppwriteException('Missing required parameter: "xdefault"');
20399
- }
20400
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/enum/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
21677
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/line/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
20401
21678
  const payload = {};
20402
- if (typeof elements !== 'undefined') {
20403
- payload['elements'] = elements;
20404
- }
20405
21679
  if (typeof required !== 'undefined') {
20406
21680
  payload['required'] = required;
20407
21681
  }
@@ -20417,7 +21691,7 @@ class TablesDB {
20417
21691
  };
20418
21692
  return this.client.call('patch', uri, apiHeaders, payload);
20419
21693
  }
20420
- createFloatColumn(paramsOrFirst, ...rest) {
21694
+ createLongtextColumn(paramsOrFirst, ...rest) {
20421
21695
  let params;
20422
21696
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20423
21697
  params = (paramsOrFirst || {});
@@ -20428,18 +21702,14 @@ class TablesDB {
20428
21702
  tableId: rest[0],
20429
21703
  key: rest[1],
20430
21704
  required: rest[2],
20431
- min: rest[3],
20432
- max: rest[4],
20433
- xdefault: rest[5],
20434
- array: rest[6]
21705
+ xdefault: rest[3],
21706
+ array: rest[4]
20435
21707
  };
20436
21708
  }
20437
21709
  const databaseId = params.databaseId;
20438
21710
  const tableId = params.tableId;
20439
21711
  const key = params.key;
20440
21712
  const required = params.required;
20441
- const min = params.min;
20442
- const max = params.max;
20443
21713
  const xdefault = params.xdefault;
20444
21714
  const array = params.array;
20445
21715
  if (typeof databaseId === 'undefined') {
@@ -20454,7 +21724,7 @@ class TablesDB {
20454
21724
  if (typeof required === 'undefined') {
20455
21725
  throw new AppwriteException('Missing required parameter: "required"');
20456
21726
  }
20457
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/float'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
21727
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/longtext'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
20458
21728
  const payload = {};
20459
21729
  if (typeof key !== 'undefined') {
20460
21730
  payload['key'] = key;
@@ -20462,12 +21732,6 @@ class TablesDB {
20462
21732
  if (typeof required !== 'undefined') {
20463
21733
  payload['required'] = required;
20464
21734
  }
20465
- if (typeof min !== 'undefined') {
20466
- payload['min'] = min;
20467
- }
20468
- if (typeof max !== 'undefined') {
20469
- payload['max'] = max;
20470
- }
20471
21735
  if (typeof xdefault !== 'undefined') {
20472
21736
  payload['default'] = xdefault;
20473
21737
  }
@@ -20480,7 +21744,7 @@ class TablesDB {
20480
21744
  };
20481
21745
  return this.client.call('post', uri, apiHeaders, payload);
20482
21746
  }
20483
- updateFloatColumn(paramsOrFirst, ...rest) {
21747
+ updateLongtextColumn(paramsOrFirst, ...rest) {
20484
21748
  let params;
20485
21749
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20486
21750
  params = (paramsOrFirst || {});
@@ -20492,9 +21756,7 @@ class TablesDB {
20492
21756
  key: rest[1],
20493
21757
  required: rest[2],
20494
21758
  xdefault: rest[3],
20495
- min: rest[4],
20496
- max: rest[5],
20497
- newKey: rest[6]
21759
+ newKey: rest[4]
20498
21760
  };
20499
21761
  }
20500
21762
  const databaseId = params.databaseId;
@@ -20502,8 +21764,6 @@ class TablesDB {
20502
21764
  const key = params.key;
20503
21765
  const required = params.required;
20504
21766
  const xdefault = params.xdefault;
20505
- const min = params.min;
20506
- const max = params.max;
20507
21767
  const newKey = params.newKey;
20508
21768
  if (typeof databaseId === 'undefined') {
20509
21769
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -20520,17 +21780,11 @@ class TablesDB {
20520
21780
  if (typeof xdefault === 'undefined') {
20521
21781
  throw new AppwriteException('Missing required parameter: "xdefault"');
20522
21782
  }
20523
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/float/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
21783
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/longtext/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
20524
21784
  const payload = {};
20525
21785
  if (typeof required !== 'undefined') {
20526
21786
  payload['required'] = required;
20527
21787
  }
20528
- if (typeof min !== 'undefined') {
20529
- payload['min'] = min;
20530
- }
20531
- if (typeof max !== 'undefined') {
20532
- payload['max'] = max;
20533
- }
20534
21788
  if (typeof xdefault !== 'undefined') {
20535
21789
  payload['default'] = xdefault;
20536
21790
  }
@@ -20543,7 +21797,7 @@ class TablesDB {
20543
21797
  };
20544
21798
  return this.client.call('patch', uri, apiHeaders, payload);
20545
21799
  }
20546
- createIntegerColumn(paramsOrFirst, ...rest) {
21800
+ createMediumtextColumn(paramsOrFirst, ...rest) {
20547
21801
  let params;
20548
21802
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20549
21803
  params = (paramsOrFirst || {});
@@ -20554,18 +21808,14 @@ class TablesDB {
20554
21808
  tableId: rest[0],
20555
21809
  key: rest[1],
20556
21810
  required: rest[2],
20557
- min: rest[3],
20558
- max: rest[4],
20559
- xdefault: rest[5],
20560
- array: rest[6]
21811
+ xdefault: rest[3],
21812
+ array: rest[4]
20561
21813
  };
20562
21814
  }
20563
21815
  const databaseId = params.databaseId;
20564
21816
  const tableId = params.tableId;
20565
21817
  const key = params.key;
20566
21818
  const required = params.required;
20567
- const min = params.min;
20568
- const max = params.max;
20569
21819
  const xdefault = params.xdefault;
20570
21820
  const array = params.array;
20571
21821
  if (typeof databaseId === 'undefined') {
@@ -20580,7 +21830,7 @@ class TablesDB {
20580
21830
  if (typeof required === 'undefined') {
20581
21831
  throw new AppwriteException('Missing required parameter: "required"');
20582
21832
  }
20583
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/integer'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
21833
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/mediumtext'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
20584
21834
  const payload = {};
20585
21835
  if (typeof key !== 'undefined') {
20586
21836
  payload['key'] = key;
@@ -20588,12 +21838,6 @@ class TablesDB {
20588
21838
  if (typeof required !== 'undefined') {
20589
21839
  payload['required'] = required;
20590
21840
  }
20591
- if (typeof min !== 'undefined') {
20592
- payload['min'] = min;
20593
- }
20594
- if (typeof max !== 'undefined') {
20595
- payload['max'] = max;
20596
- }
20597
21841
  if (typeof xdefault !== 'undefined') {
20598
21842
  payload['default'] = xdefault;
20599
21843
  }
@@ -20606,7 +21850,7 @@ class TablesDB {
20606
21850
  };
20607
21851
  return this.client.call('post', uri, apiHeaders, payload);
20608
21852
  }
20609
- updateIntegerColumn(paramsOrFirst, ...rest) {
21853
+ updateMediumtextColumn(paramsOrFirst, ...rest) {
20610
21854
  let params;
20611
21855
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20612
21856
  params = (paramsOrFirst || {});
@@ -20618,9 +21862,7 @@ class TablesDB {
20618
21862
  key: rest[1],
20619
21863
  required: rest[2],
20620
21864
  xdefault: rest[3],
20621
- min: rest[4],
20622
- max: rest[5],
20623
- newKey: rest[6]
21865
+ newKey: rest[4]
20624
21866
  };
20625
21867
  }
20626
21868
  const databaseId = params.databaseId;
@@ -20628,8 +21870,6 @@ class TablesDB {
20628
21870
  const key = params.key;
20629
21871
  const required = params.required;
20630
21872
  const xdefault = params.xdefault;
20631
- const min = params.min;
20632
- const max = params.max;
20633
21873
  const newKey = params.newKey;
20634
21874
  if (typeof databaseId === 'undefined') {
20635
21875
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -20646,17 +21886,11 @@ class TablesDB {
20646
21886
  if (typeof xdefault === 'undefined') {
20647
21887
  throw new AppwriteException('Missing required parameter: "xdefault"');
20648
21888
  }
20649
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/integer/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
21889
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/mediumtext/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
20650
21890
  const payload = {};
20651
21891
  if (typeof required !== 'undefined') {
20652
21892
  payload['required'] = required;
20653
21893
  }
20654
- if (typeof min !== 'undefined') {
20655
- payload['min'] = min;
20656
- }
20657
- if (typeof max !== 'undefined') {
20658
- payload['max'] = max;
20659
- }
20660
21894
  if (typeof xdefault !== 'undefined') {
20661
21895
  payload['default'] = xdefault;
20662
21896
  }
@@ -20669,7 +21903,7 @@ class TablesDB {
20669
21903
  };
20670
21904
  return this.client.call('patch', uri, apiHeaders, payload);
20671
21905
  }
20672
- createIpColumn(paramsOrFirst, ...rest) {
21906
+ createPointColumn(paramsOrFirst, ...rest) {
20673
21907
  let params;
20674
21908
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20675
21909
  params = (paramsOrFirst || {});
@@ -20680,8 +21914,7 @@ class TablesDB {
20680
21914
  tableId: rest[0],
20681
21915
  key: rest[1],
20682
21916
  required: rest[2],
20683
- xdefault: rest[3],
20684
- array: rest[4]
21917
+ xdefault: rest[3]
20685
21918
  };
20686
21919
  }
20687
21920
  const databaseId = params.databaseId;
@@ -20689,7 +21922,6 @@ class TablesDB {
20689
21922
  const key = params.key;
20690
21923
  const required = params.required;
20691
21924
  const xdefault = params.xdefault;
20692
- const array = params.array;
20693
21925
  if (typeof databaseId === 'undefined') {
20694
21926
  throw new AppwriteException('Missing required parameter: "databaseId"');
20695
21927
  }
@@ -20702,7 +21934,7 @@ class TablesDB {
20702
21934
  if (typeof required === 'undefined') {
20703
21935
  throw new AppwriteException('Missing required parameter: "required"');
20704
21936
  }
20705
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/ip'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
21937
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/point'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
20706
21938
  const payload = {};
20707
21939
  if (typeof key !== 'undefined') {
20708
21940
  payload['key'] = key;
@@ -20713,16 +21945,13 @@ class TablesDB {
20713
21945
  if (typeof xdefault !== 'undefined') {
20714
21946
  payload['default'] = xdefault;
20715
21947
  }
20716
- if (typeof array !== 'undefined') {
20717
- payload['array'] = array;
20718
- }
20719
21948
  const uri = new URL(this.client.config.endpoint + apiPath);
20720
21949
  const apiHeaders = {
20721
21950
  'content-type': 'application/json',
20722
21951
  };
20723
21952
  return this.client.call('post', uri, apiHeaders, payload);
20724
21953
  }
20725
- updateIpColumn(paramsOrFirst, ...rest) {
21954
+ updatePointColumn(paramsOrFirst, ...rest) {
20726
21955
  let params;
20727
21956
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20728
21957
  params = (paramsOrFirst || {});
@@ -20755,10 +21984,7 @@ class TablesDB {
20755
21984
  if (typeof required === 'undefined') {
20756
21985
  throw new AppwriteException('Missing required parameter: "required"');
20757
21986
  }
20758
- if (typeof xdefault === 'undefined') {
20759
- throw new AppwriteException('Missing required parameter: "xdefault"');
20760
- }
20761
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/ip/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
21987
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/point/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
20762
21988
  const payload = {};
20763
21989
  if (typeof required !== 'undefined') {
20764
21990
  payload['required'] = required;
@@ -20775,7 +22001,7 @@ class TablesDB {
20775
22001
  };
20776
22002
  return this.client.call('patch', uri, apiHeaders, payload);
20777
22003
  }
20778
- createLineColumn(paramsOrFirst, ...rest) {
22004
+ createPolygonColumn(paramsOrFirst, ...rest) {
20779
22005
  let params;
20780
22006
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20781
22007
  params = (paramsOrFirst || {});
@@ -20806,7 +22032,7 @@ class TablesDB {
20806
22032
  if (typeof required === 'undefined') {
20807
22033
  throw new AppwriteException('Missing required parameter: "required"');
20808
22034
  }
20809
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/line'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
22035
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/polygon'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
20810
22036
  const payload = {};
20811
22037
  if (typeof key !== 'undefined') {
20812
22038
  payload['key'] = key;
@@ -20823,7 +22049,7 @@ class TablesDB {
20823
22049
  };
20824
22050
  return this.client.call('post', uri, apiHeaders, payload);
20825
22051
  }
20826
- updateLineColumn(paramsOrFirst, ...rest) {
22052
+ updatePolygonColumn(paramsOrFirst, ...rest) {
20827
22053
  let params;
20828
22054
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20829
22055
  params = (paramsOrFirst || {});
@@ -20850,30 +22076,93 @@ class TablesDB {
20850
22076
  if (typeof tableId === 'undefined') {
20851
22077
  throw new AppwriteException('Missing required parameter: "tableId"');
20852
22078
  }
20853
- if (typeof key === 'undefined') {
20854
- throw new AppwriteException('Missing required parameter: "key"');
22079
+ if (typeof key === 'undefined') {
22080
+ throw new AppwriteException('Missing required parameter: "key"');
22081
+ }
22082
+ if (typeof required === 'undefined') {
22083
+ throw new AppwriteException('Missing required parameter: "required"');
22084
+ }
22085
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/polygon/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
22086
+ const payload = {};
22087
+ if (typeof required !== 'undefined') {
22088
+ payload['required'] = required;
22089
+ }
22090
+ if (typeof xdefault !== 'undefined') {
22091
+ payload['default'] = xdefault;
22092
+ }
22093
+ if (typeof newKey !== 'undefined') {
22094
+ payload['newKey'] = newKey;
22095
+ }
22096
+ const uri = new URL(this.client.config.endpoint + apiPath);
22097
+ const apiHeaders = {
22098
+ 'content-type': 'application/json',
22099
+ };
22100
+ return this.client.call('patch', uri, apiHeaders, payload);
22101
+ }
22102
+ createRelationshipColumn(paramsOrFirst, ...rest) {
22103
+ let params;
22104
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
22105
+ params = (paramsOrFirst || {});
22106
+ }
22107
+ else {
22108
+ params = {
22109
+ databaseId: paramsOrFirst,
22110
+ tableId: rest[0],
22111
+ relatedTableId: rest[1],
22112
+ type: rest[2],
22113
+ twoWay: rest[3],
22114
+ key: rest[4],
22115
+ twoWayKey: rest[5],
22116
+ onDelete: rest[6]
22117
+ };
22118
+ }
22119
+ const databaseId = params.databaseId;
22120
+ const tableId = params.tableId;
22121
+ const relatedTableId = params.relatedTableId;
22122
+ const type = params.type;
22123
+ const twoWay = params.twoWay;
22124
+ const key = params.key;
22125
+ const twoWayKey = params.twoWayKey;
22126
+ const onDelete = params.onDelete;
22127
+ if (typeof databaseId === 'undefined') {
22128
+ throw new AppwriteException('Missing required parameter: "databaseId"');
22129
+ }
22130
+ if (typeof tableId === 'undefined') {
22131
+ throw new AppwriteException('Missing required parameter: "tableId"');
22132
+ }
22133
+ if (typeof relatedTableId === 'undefined') {
22134
+ throw new AppwriteException('Missing required parameter: "relatedTableId"');
20855
22135
  }
20856
- if (typeof required === 'undefined') {
20857
- throw new AppwriteException('Missing required parameter: "required"');
22136
+ if (typeof type === 'undefined') {
22137
+ throw new AppwriteException('Missing required parameter: "type"');
20858
22138
  }
20859
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/line/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
22139
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/relationship'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
20860
22140
  const payload = {};
20861
- if (typeof required !== 'undefined') {
20862
- payload['required'] = required;
22141
+ if (typeof relatedTableId !== 'undefined') {
22142
+ payload['relatedTableId'] = relatedTableId;
20863
22143
  }
20864
- if (typeof xdefault !== 'undefined') {
20865
- payload['default'] = xdefault;
22144
+ if (typeof type !== 'undefined') {
22145
+ payload['type'] = type;
20866
22146
  }
20867
- if (typeof newKey !== 'undefined') {
20868
- payload['newKey'] = newKey;
22147
+ if (typeof twoWay !== 'undefined') {
22148
+ payload['twoWay'] = twoWay;
22149
+ }
22150
+ if (typeof key !== 'undefined') {
22151
+ payload['key'] = key;
22152
+ }
22153
+ if (typeof twoWayKey !== 'undefined') {
22154
+ payload['twoWayKey'] = twoWayKey;
22155
+ }
22156
+ if (typeof onDelete !== 'undefined') {
22157
+ payload['onDelete'] = onDelete;
20869
22158
  }
20870
22159
  const uri = new URL(this.client.config.endpoint + apiPath);
20871
22160
  const apiHeaders = {
20872
22161
  'content-type': 'application/json',
20873
22162
  };
20874
- return this.client.call('patch', uri, apiHeaders, payload);
22163
+ return this.client.call('post', uri, apiHeaders, payload);
20875
22164
  }
20876
- createPointColumn(paramsOrFirst, ...rest) {
22165
+ createStringColumn(paramsOrFirst, ...rest) {
20877
22166
  let params;
20878
22167
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20879
22168
  params = (paramsOrFirst || {});
@@ -20883,15 +22172,21 @@ class TablesDB {
20883
22172
  databaseId: paramsOrFirst,
20884
22173
  tableId: rest[0],
20885
22174
  key: rest[1],
20886
- required: rest[2],
20887
- xdefault: rest[3]
22175
+ size: rest[2],
22176
+ required: rest[3],
22177
+ xdefault: rest[4],
22178
+ array: rest[5],
22179
+ encrypt: rest[6]
20888
22180
  };
20889
22181
  }
20890
22182
  const databaseId = params.databaseId;
20891
22183
  const tableId = params.tableId;
20892
22184
  const key = params.key;
22185
+ const size = params.size;
20893
22186
  const required = params.required;
20894
22187
  const xdefault = params.xdefault;
22188
+ const array = params.array;
22189
+ const encrypt = params.encrypt;
20895
22190
  if (typeof databaseId === 'undefined') {
20896
22191
  throw new AppwriteException('Missing required parameter: "databaseId"');
20897
22192
  }
@@ -20901,27 +22196,39 @@ class TablesDB {
20901
22196
  if (typeof key === 'undefined') {
20902
22197
  throw new AppwriteException('Missing required parameter: "key"');
20903
22198
  }
22199
+ if (typeof size === 'undefined') {
22200
+ throw new AppwriteException('Missing required parameter: "size"');
22201
+ }
20904
22202
  if (typeof required === 'undefined') {
20905
22203
  throw new AppwriteException('Missing required parameter: "required"');
20906
22204
  }
20907
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/point'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
22205
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/string'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
20908
22206
  const payload = {};
20909
22207
  if (typeof key !== 'undefined') {
20910
22208
  payload['key'] = key;
20911
22209
  }
22210
+ if (typeof size !== 'undefined') {
22211
+ payload['size'] = size;
22212
+ }
20912
22213
  if (typeof required !== 'undefined') {
20913
22214
  payload['required'] = required;
20914
22215
  }
20915
22216
  if (typeof xdefault !== 'undefined') {
20916
22217
  payload['default'] = xdefault;
20917
22218
  }
22219
+ if (typeof array !== 'undefined') {
22220
+ payload['array'] = array;
22221
+ }
22222
+ if (typeof encrypt !== 'undefined') {
22223
+ payload['encrypt'] = encrypt;
22224
+ }
20918
22225
  const uri = new URL(this.client.config.endpoint + apiPath);
20919
22226
  const apiHeaders = {
20920
22227
  'content-type': 'application/json',
20921
22228
  };
20922
22229
  return this.client.call('post', uri, apiHeaders, payload);
20923
22230
  }
20924
- updatePointColumn(paramsOrFirst, ...rest) {
22231
+ updateStringColumn(paramsOrFirst, ...rest) {
20925
22232
  let params;
20926
22233
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20927
22234
  params = (paramsOrFirst || {});
@@ -20933,7 +22240,8 @@ class TablesDB {
20933
22240
  key: rest[1],
20934
22241
  required: rest[2],
20935
22242
  xdefault: rest[3],
20936
- newKey: rest[4]
22243
+ size: rest[4],
22244
+ newKey: rest[5]
20937
22245
  };
20938
22246
  }
20939
22247
  const databaseId = params.databaseId;
@@ -20941,6 +22249,7 @@ class TablesDB {
20941
22249
  const key = params.key;
20942
22250
  const required = params.required;
20943
22251
  const xdefault = params.xdefault;
22252
+ const size = params.size;
20944
22253
  const newKey = params.newKey;
20945
22254
  if (typeof databaseId === 'undefined') {
20946
22255
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -20954,7 +22263,10 @@ class TablesDB {
20954
22263
  if (typeof required === 'undefined') {
20955
22264
  throw new AppwriteException('Missing required parameter: "required"');
20956
22265
  }
20957
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/point/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
22266
+ if (typeof xdefault === 'undefined') {
22267
+ throw new AppwriteException('Missing required parameter: "xdefault"');
22268
+ }
22269
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/string/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
20958
22270
  const payload = {};
20959
22271
  if (typeof required !== 'undefined') {
20960
22272
  payload['required'] = required;
@@ -20962,6 +22274,9 @@ class TablesDB {
20962
22274
  if (typeof xdefault !== 'undefined') {
20963
22275
  payload['default'] = xdefault;
20964
22276
  }
22277
+ if (typeof size !== 'undefined') {
22278
+ payload['size'] = size;
22279
+ }
20965
22280
  if (typeof newKey !== 'undefined') {
20966
22281
  payload['newKey'] = newKey;
20967
22282
  }
@@ -20971,7 +22286,7 @@ class TablesDB {
20971
22286
  };
20972
22287
  return this.client.call('patch', uri, apiHeaders, payload);
20973
22288
  }
20974
- createPolygonColumn(paramsOrFirst, ...rest) {
22289
+ createTextColumn(paramsOrFirst, ...rest) {
20975
22290
  let params;
20976
22291
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20977
22292
  params = (paramsOrFirst || {});
@@ -20982,7 +22297,8 @@ class TablesDB {
20982
22297
  tableId: rest[0],
20983
22298
  key: rest[1],
20984
22299
  required: rest[2],
20985
- xdefault: rest[3]
22300
+ xdefault: rest[3],
22301
+ array: rest[4]
20986
22302
  };
20987
22303
  }
20988
22304
  const databaseId = params.databaseId;
@@ -20990,6 +22306,7 @@ class TablesDB {
20990
22306
  const key = params.key;
20991
22307
  const required = params.required;
20992
22308
  const xdefault = params.xdefault;
22309
+ const array = params.array;
20993
22310
  if (typeof databaseId === 'undefined') {
20994
22311
  throw new AppwriteException('Missing required parameter: "databaseId"');
20995
22312
  }
@@ -21002,7 +22319,7 @@ class TablesDB {
21002
22319
  if (typeof required === 'undefined') {
21003
22320
  throw new AppwriteException('Missing required parameter: "required"');
21004
22321
  }
21005
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/polygon'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
22322
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/text'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
21006
22323
  const payload = {};
21007
22324
  if (typeof key !== 'undefined') {
21008
22325
  payload['key'] = key;
@@ -21013,13 +22330,16 @@ class TablesDB {
21013
22330
  if (typeof xdefault !== 'undefined') {
21014
22331
  payload['default'] = xdefault;
21015
22332
  }
22333
+ if (typeof array !== 'undefined') {
22334
+ payload['array'] = array;
22335
+ }
21016
22336
  const uri = new URL(this.client.config.endpoint + apiPath);
21017
22337
  const apiHeaders = {
21018
22338
  'content-type': 'application/json',
21019
22339
  };
21020
22340
  return this.client.call('post', uri, apiHeaders, payload);
21021
22341
  }
21022
- updatePolygonColumn(paramsOrFirst, ...rest) {
22342
+ updateTextColumn(paramsOrFirst, ...rest) {
21023
22343
  let params;
21024
22344
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
21025
22345
  params = (paramsOrFirst || {});
@@ -21052,7 +22372,10 @@ class TablesDB {
21052
22372
  if (typeof required === 'undefined') {
21053
22373
  throw new AppwriteException('Missing required parameter: "required"');
21054
22374
  }
21055
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/polygon/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
22375
+ if (typeof xdefault === 'undefined') {
22376
+ throw new AppwriteException('Missing required parameter: "xdefault"');
22377
+ }
22378
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/text/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
21056
22379
  const payload = {};
21057
22380
  if (typeof required !== 'undefined') {
21058
22381
  payload['required'] = required;
@@ -21069,70 +22392,7 @@ class TablesDB {
21069
22392
  };
21070
22393
  return this.client.call('patch', uri, apiHeaders, payload);
21071
22394
  }
21072
- createRelationshipColumn(paramsOrFirst, ...rest) {
21073
- let params;
21074
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
21075
- params = (paramsOrFirst || {});
21076
- }
21077
- else {
21078
- params = {
21079
- databaseId: paramsOrFirst,
21080
- tableId: rest[0],
21081
- relatedTableId: rest[1],
21082
- type: rest[2],
21083
- twoWay: rest[3],
21084
- key: rest[4],
21085
- twoWayKey: rest[5],
21086
- onDelete: rest[6]
21087
- };
21088
- }
21089
- const databaseId = params.databaseId;
21090
- const tableId = params.tableId;
21091
- const relatedTableId = params.relatedTableId;
21092
- const type = params.type;
21093
- const twoWay = params.twoWay;
21094
- const key = params.key;
21095
- const twoWayKey = params.twoWayKey;
21096
- const onDelete = params.onDelete;
21097
- if (typeof databaseId === 'undefined') {
21098
- throw new AppwriteException('Missing required parameter: "databaseId"');
21099
- }
21100
- if (typeof tableId === 'undefined') {
21101
- throw new AppwriteException('Missing required parameter: "tableId"');
21102
- }
21103
- if (typeof relatedTableId === 'undefined') {
21104
- throw new AppwriteException('Missing required parameter: "relatedTableId"');
21105
- }
21106
- if (typeof type === 'undefined') {
21107
- throw new AppwriteException('Missing required parameter: "type"');
21108
- }
21109
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/relationship'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
21110
- const payload = {};
21111
- if (typeof relatedTableId !== 'undefined') {
21112
- payload['relatedTableId'] = relatedTableId;
21113
- }
21114
- if (typeof type !== 'undefined') {
21115
- payload['type'] = type;
21116
- }
21117
- if (typeof twoWay !== 'undefined') {
21118
- payload['twoWay'] = twoWay;
21119
- }
21120
- if (typeof key !== 'undefined') {
21121
- payload['key'] = key;
21122
- }
21123
- if (typeof twoWayKey !== 'undefined') {
21124
- payload['twoWayKey'] = twoWayKey;
21125
- }
21126
- if (typeof onDelete !== 'undefined') {
21127
- payload['onDelete'] = onDelete;
21128
- }
21129
- const uri = new URL(this.client.config.endpoint + apiPath);
21130
- const apiHeaders = {
21131
- 'content-type': 'application/json',
21132
- };
21133
- return this.client.call('post', uri, apiHeaders, payload);
21134
- }
21135
- createStringColumn(paramsOrFirst, ...rest) {
22395
+ createUrlColumn(paramsOrFirst, ...rest) {
21136
22396
  let params;
21137
22397
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
21138
22398
  params = (paramsOrFirst || {});
@@ -21142,21 +22402,17 @@ class TablesDB {
21142
22402
  databaseId: paramsOrFirst,
21143
22403
  tableId: rest[0],
21144
22404
  key: rest[1],
21145
- size: rest[2],
21146
- required: rest[3],
21147
- xdefault: rest[4],
21148
- array: rest[5],
21149
- encrypt: rest[6]
22405
+ required: rest[2],
22406
+ xdefault: rest[3],
22407
+ array: rest[4]
21150
22408
  };
21151
22409
  }
21152
22410
  const databaseId = params.databaseId;
21153
22411
  const tableId = params.tableId;
21154
22412
  const key = params.key;
21155
- const size = params.size;
21156
22413
  const required = params.required;
21157
22414
  const xdefault = params.xdefault;
21158
22415
  const array = params.array;
21159
- const encrypt = params.encrypt;
21160
22416
  if (typeof databaseId === 'undefined') {
21161
22417
  throw new AppwriteException('Missing required parameter: "databaseId"');
21162
22418
  }
@@ -21166,20 +22422,14 @@ class TablesDB {
21166
22422
  if (typeof key === 'undefined') {
21167
22423
  throw new AppwriteException('Missing required parameter: "key"');
21168
22424
  }
21169
- if (typeof size === 'undefined') {
21170
- throw new AppwriteException('Missing required parameter: "size"');
21171
- }
21172
22425
  if (typeof required === 'undefined') {
21173
22426
  throw new AppwriteException('Missing required parameter: "required"');
21174
22427
  }
21175
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/string'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
22428
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/url'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
21176
22429
  const payload = {};
21177
22430
  if (typeof key !== 'undefined') {
21178
22431
  payload['key'] = key;
21179
22432
  }
21180
- if (typeof size !== 'undefined') {
21181
- payload['size'] = size;
21182
- }
21183
22433
  if (typeof required !== 'undefined') {
21184
22434
  payload['required'] = required;
21185
22435
  }
@@ -21189,16 +22439,13 @@ class TablesDB {
21189
22439
  if (typeof array !== 'undefined') {
21190
22440
  payload['array'] = array;
21191
22441
  }
21192
- if (typeof encrypt !== 'undefined') {
21193
- payload['encrypt'] = encrypt;
21194
- }
21195
22442
  const uri = new URL(this.client.config.endpoint + apiPath);
21196
22443
  const apiHeaders = {
21197
22444
  'content-type': 'application/json',
21198
22445
  };
21199
22446
  return this.client.call('post', uri, apiHeaders, payload);
21200
22447
  }
21201
- updateStringColumn(paramsOrFirst, ...rest) {
22448
+ updateUrlColumn(paramsOrFirst, ...rest) {
21202
22449
  let params;
21203
22450
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
21204
22451
  params = (paramsOrFirst || {});
@@ -21210,8 +22457,7 @@ class TablesDB {
21210
22457
  key: rest[1],
21211
22458
  required: rest[2],
21212
22459
  xdefault: rest[3],
21213
- size: rest[4],
21214
- newKey: rest[5]
22460
+ newKey: rest[4]
21215
22461
  };
21216
22462
  }
21217
22463
  const databaseId = params.databaseId;
@@ -21219,7 +22465,6 @@ class TablesDB {
21219
22465
  const key = params.key;
21220
22466
  const required = params.required;
21221
22467
  const xdefault = params.xdefault;
21222
- const size = params.size;
21223
22468
  const newKey = params.newKey;
21224
22469
  if (typeof databaseId === 'undefined') {
21225
22470
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -21236,7 +22481,7 @@ class TablesDB {
21236
22481
  if (typeof xdefault === 'undefined') {
21237
22482
  throw new AppwriteException('Missing required parameter: "xdefault"');
21238
22483
  }
21239
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/string/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
22484
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/url/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
21240
22485
  const payload = {};
21241
22486
  if (typeof required !== 'undefined') {
21242
22487
  payload['required'] = required;
@@ -21244,9 +22489,6 @@ class TablesDB {
21244
22489
  if (typeof xdefault !== 'undefined') {
21245
22490
  payload['default'] = xdefault;
21246
22491
  }
21247
- if (typeof size !== 'undefined') {
21248
- payload['size'] = size;
21249
- }
21250
22492
  if (typeof newKey !== 'undefined') {
21251
22493
  payload['newKey'] = newKey;
21252
22494
  }
@@ -21256,7 +22498,7 @@ class TablesDB {
21256
22498
  };
21257
22499
  return this.client.call('patch', uri, apiHeaders, payload);
21258
22500
  }
21259
- createUrlColumn(paramsOrFirst, ...rest) {
22501
+ createVarcharColumn(paramsOrFirst, ...rest) {
21260
22502
  let params;
21261
22503
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
21262
22504
  params = (paramsOrFirst || {});
@@ -21266,14 +22508,16 @@ class TablesDB {
21266
22508
  databaseId: paramsOrFirst,
21267
22509
  tableId: rest[0],
21268
22510
  key: rest[1],
21269
- required: rest[2],
21270
- xdefault: rest[3],
21271
- array: rest[4]
22511
+ size: rest[2],
22512
+ required: rest[3],
22513
+ xdefault: rest[4],
22514
+ array: rest[5]
21272
22515
  };
21273
22516
  }
21274
22517
  const databaseId = params.databaseId;
21275
22518
  const tableId = params.tableId;
21276
22519
  const key = params.key;
22520
+ const size = params.size;
21277
22521
  const required = params.required;
21278
22522
  const xdefault = params.xdefault;
21279
22523
  const array = params.array;
@@ -21286,14 +22530,20 @@ class TablesDB {
21286
22530
  if (typeof key === 'undefined') {
21287
22531
  throw new AppwriteException('Missing required parameter: "key"');
21288
22532
  }
22533
+ if (typeof size === 'undefined') {
22534
+ throw new AppwriteException('Missing required parameter: "size"');
22535
+ }
21289
22536
  if (typeof required === 'undefined') {
21290
22537
  throw new AppwriteException('Missing required parameter: "required"');
21291
22538
  }
21292
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/url'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
22539
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/varchar'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
21293
22540
  const payload = {};
21294
22541
  if (typeof key !== 'undefined') {
21295
22542
  payload['key'] = key;
21296
22543
  }
22544
+ if (typeof size !== 'undefined') {
22545
+ payload['size'] = size;
22546
+ }
21297
22547
  if (typeof required !== 'undefined') {
21298
22548
  payload['required'] = required;
21299
22549
  }
@@ -21309,7 +22559,7 @@ class TablesDB {
21309
22559
  };
21310
22560
  return this.client.call('post', uri, apiHeaders, payload);
21311
22561
  }
21312
- updateUrlColumn(paramsOrFirst, ...rest) {
22562
+ updateVarcharColumn(paramsOrFirst, ...rest) {
21313
22563
  let params;
21314
22564
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
21315
22565
  params = (paramsOrFirst || {});
@@ -21321,7 +22571,8 @@ class TablesDB {
21321
22571
  key: rest[1],
21322
22572
  required: rest[2],
21323
22573
  xdefault: rest[3],
21324
- newKey: rest[4]
22574
+ size: rest[4],
22575
+ newKey: rest[5]
21325
22576
  };
21326
22577
  }
21327
22578
  const databaseId = params.databaseId;
@@ -21329,6 +22580,7 @@ class TablesDB {
21329
22580
  const key = params.key;
21330
22581
  const required = params.required;
21331
22582
  const xdefault = params.xdefault;
22583
+ const size = params.size;
21332
22584
  const newKey = params.newKey;
21333
22585
  if (typeof databaseId === 'undefined') {
21334
22586
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -21345,7 +22597,7 @@ class TablesDB {
21345
22597
  if (typeof xdefault === 'undefined') {
21346
22598
  throw new AppwriteException('Missing required parameter: "xdefault"');
21347
22599
  }
21348
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/url/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
22600
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/varchar/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
21349
22601
  const payload = {};
21350
22602
  if (typeof required !== 'undefined') {
21351
22603
  payload['required'] = required;
@@ -21353,6 +22605,9 @@ class TablesDB {
21353
22605
  if (typeof xdefault !== 'undefined') {
21354
22606
  payload['default'] = xdefault;
21355
22607
  }
22608
+ if (typeof size !== 'undefined') {
22609
+ payload['size'] = size;
22610
+ }
21356
22611
  if (typeof newKey !== 'undefined') {
21357
22612
  payload['newKey'] = newKey;
21358
22613
  }
@@ -24923,11 +26178,31 @@ class Realtime {
24923
26178
  sleep(ms) {
24924
26179
  return new Promise(resolve => setTimeout(resolve, ms));
24925
26180
  }
26181
+ /**
26182
+ * Convert a channel value to a string
26183
+ *
26184
+ * @private
26185
+ * @param {string | Channel<any> | ActionableChannel | ResolvedChannel} channel - Channel value (string or Channel builder instance)
26186
+ * @returns {string} Channel string representation
26187
+ */
26188
+ channelToString(channel) {
26189
+ if (typeof channel === 'string') {
26190
+ return channel;
26191
+ }
26192
+ // All Channel instances have toString() method
26193
+ if (channel && typeof channel.toString === 'function') {
26194
+ return channel.toString();
26195
+ }
26196
+ return String(channel);
26197
+ }
24926
26198
  subscribe(channelsOrChannel, callback) {
24927
26199
  return __awaiter(this, void 0, void 0, function* () {
24928
- const channels = Array.isArray(channelsOrChannel)
24929
- ? new Set(channelsOrChannel)
24930
- : new Set([channelsOrChannel]);
26200
+ const channelArray = Array.isArray(channelsOrChannel)
26201
+ ? channelsOrChannel
26202
+ : [channelsOrChannel];
26203
+ // Convert all channels to strings
26204
+ const channelStrings = channelArray.map(ch => this.channelToString(ch));
26205
+ const channels = new Set(channelStrings);
24931
26206
  this.subscriptionsCounter++;
24932
26207
  const count = this.subscriptionsCounter;
24933
26208
  for (const channel of channels) {
@@ -25231,6 +26506,99 @@ _a = ID, _ID_hexTimestamp = function _ID_hexTimestamp() {
25231
26506
  return hexTimestamp;
25232
26507
  };
25233
26508
 
26509
+ function normalize(id) {
26510
+ const trimmed = id.trim();
26511
+ return trimmed === "" ? "*" : trimmed;
26512
+ }
26513
+ class Channel {
26514
+ constructor(segments) {
26515
+ this.segments = segments;
26516
+ }
26517
+ next(segment, id = "*") {
26518
+ return new Channel([...this.segments, segment, normalize(id)]);
26519
+ }
26520
+ resolve(action) {
26521
+ return new Channel([...this.segments, action]);
26522
+ }
26523
+ toString() {
26524
+ return this.segments.join(".");
26525
+ }
26526
+ // --- DATABASE ROUTE ---
26527
+ // Only available on Channel<Database>
26528
+ collection(id = "*") {
26529
+ return this.next("collections", id);
26530
+ }
26531
+ // Only available on Channel<Collection>
26532
+ document(id = "*") {
26533
+ return this.next("documents", id);
26534
+ }
26535
+ // --- TABLESDB ROUTE ---
26536
+ table(id = "*") {
26537
+ return this.next("tables", id);
26538
+ }
26539
+ row(id = "*") {
26540
+ return this.next("rows", id);
26541
+ }
26542
+ // --- BUCKET ROUTE ---
26543
+ file(id = "*") {
26544
+ return this.next("files", id);
26545
+ }
26546
+ // --- FUNCTION ROUTE ---
26547
+ execution(id = "*") {
26548
+ return this.next("executions", id);
26549
+ }
26550
+ // --- TERMINAL ACTIONS ---
26551
+ // Restricted to the Actionable union
26552
+ create() {
26553
+ return this.resolve("create");
26554
+ }
26555
+ update() {
26556
+ return this.resolve("update");
26557
+ }
26558
+ delete() {
26559
+ return this.resolve("delete");
26560
+ }
26561
+ // --- ROOT FACTORIES ---
26562
+ static database(id = "*") {
26563
+ return new Channel(["databases", normalize(id)]);
26564
+ }
26565
+ static tablesdb(id = "*") {
26566
+ return new Channel(["tablesdb", normalize(id)]);
26567
+ }
26568
+ static bucket(id = "*") {
26569
+ return new Channel(["buckets", normalize(id)]);
26570
+ }
26571
+ static function(id = "*") {
26572
+ return new Channel(["functions", normalize(id)]);
26573
+ }
26574
+ static team(id = "*") {
26575
+ return new Channel(["teams", normalize(id)]);
26576
+ }
26577
+ static membership(id = "*") {
26578
+ return new Channel(["memberships", normalize(id)]);
26579
+ }
26580
+ static account(userId = "") {
26581
+ const id = normalize(userId);
26582
+ return id === "*" ? "account" : `account.${id}`;
26583
+ }
26584
+ // Global events
26585
+ static documents() {
26586
+ return "documents";
26587
+ }
26588
+ static rows() {
26589
+ return "rows";
26590
+ }
26591
+ static files() {
26592
+ return "files";
26593
+ }
26594
+ static executions() {
26595
+ return "executions";
26596
+ }
26597
+ static teams() {
26598
+ return "teams";
26599
+ }
26600
+ }
26601
+
25234
26602
  exports.Condition = void 0;
25235
26603
  (function (Condition) {
25236
26604
  Condition["Equal"] = "equal";
@@ -25496,6 +26864,73 @@ Operator.dateSubDays = (days) => new Operator("dateSubDays", [days]).toString();
25496
26864
  */
25497
26865
  Operator.dateSetNow = () => new Operator("dateSetNow", []).toString();
25498
26866
 
26867
+ exports.Scopes = void 0;
26868
+ (function (Scopes) {
26869
+ Scopes["SessionsWrite"] = "sessions.write";
26870
+ Scopes["UsersRead"] = "users.read";
26871
+ Scopes["UsersWrite"] = "users.write";
26872
+ Scopes["TeamsRead"] = "teams.read";
26873
+ Scopes["TeamsWrite"] = "teams.write";
26874
+ Scopes["DatabasesRead"] = "databases.read";
26875
+ Scopes["DatabasesWrite"] = "databases.write";
26876
+ Scopes["CollectionsRead"] = "collections.read";
26877
+ Scopes["CollectionsWrite"] = "collections.write";
26878
+ Scopes["TablesRead"] = "tables.read";
26879
+ Scopes["TablesWrite"] = "tables.write";
26880
+ Scopes["AttributesRead"] = "attributes.read";
26881
+ Scopes["AttributesWrite"] = "attributes.write";
26882
+ Scopes["ColumnsRead"] = "columns.read";
26883
+ Scopes["ColumnsWrite"] = "columns.write";
26884
+ Scopes["IndexesRead"] = "indexes.read";
26885
+ Scopes["IndexesWrite"] = "indexes.write";
26886
+ Scopes["DocumentsRead"] = "documents.read";
26887
+ Scopes["DocumentsWrite"] = "documents.write";
26888
+ Scopes["RowsRead"] = "rows.read";
26889
+ Scopes["RowsWrite"] = "rows.write";
26890
+ Scopes["FilesRead"] = "files.read";
26891
+ Scopes["FilesWrite"] = "files.write";
26892
+ Scopes["BucketsRead"] = "buckets.read";
26893
+ Scopes["BucketsWrite"] = "buckets.write";
26894
+ Scopes["FunctionsRead"] = "functions.read";
26895
+ Scopes["FunctionsWrite"] = "functions.write";
26896
+ Scopes["SitesRead"] = "sites.read";
26897
+ Scopes["SitesWrite"] = "sites.write";
26898
+ Scopes["LogRead"] = "log.read";
26899
+ Scopes["LogWrite"] = "log.write";
26900
+ Scopes["ExecutionRead"] = "execution.read";
26901
+ Scopes["ExecutionWrite"] = "execution.write";
26902
+ Scopes["LocaleRead"] = "locale.read";
26903
+ Scopes["AvatarsRead"] = "avatars.read";
26904
+ Scopes["HealthRead"] = "health.read";
26905
+ Scopes["ProvidersRead"] = "providers.read";
26906
+ Scopes["ProvidersWrite"] = "providers.write";
26907
+ Scopes["MessagesRead"] = "messages.read";
26908
+ Scopes["MessagesWrite"] = "messages.write";
26909
+ Scopes["TopicsRead"] = "topics.read";
26910
+ Scopes["TopicsWrite"] = "topics.write";
26911
+ Scopes["SubscribersRead"] = "subscribers.read";
26912
+ Scopes["SubscribersWrite"] = "subscribers.write";
26913
+ Scopes["TargetsRead"] = "targets.read";
26914
+ Scopes["TargetsWrite"] = "targets.write";
26915
+ Scopes["RulesRead"] = "rules.read";
26916
+ Scopes["RulesWrite"] = "rules.write";
26917
+ Scopes["MigrationsRead"] = "migrations.read";
26918
+ Scopes["MigrationsWrite"] = "migrations.write";
26919
+ Scopes["VcsRead"] = "vcs.read";
26920
+ Scopes["VcsWrite"] = "vcs.write";
26921
+ Scopes["AssistantRead"] = "assistant.read";
26922
+ Scopes["TokensRead"] = "tokens.read";
26923
+ Scopes["TokensWrite"] = "tokens.write";
26924
+ Scopes["PoliciesWrite"] = "policies.write";
26925
+ Scopes["PoliciesRead"] = "policies.read";
26926
+ Scopes["ArchivesRead"] = "archives.read";
26927
+ Scopes["ArchivesWrite"] = "archives.write";
26928
+ Scopes["RestorationsRead"] = "restorations.read";
26929
+ Scopes["RestorationsWrite"] = "restorations.write";
26930
+ Scopes["DomainsRead"] = "domains.read";
26931
+ Scopes["DomainsWrite"] = "domains.write";
26932
+ })(exports.Scopes || (exports.Scopes = {}));
26933
+
25499
26934
  exports.AuthenticatorType = void 0;
25500
26935
  (function (AuthenticatorType) {
25501
26936
  AuthenticatorType["Totp"] = "totp";
@@ -26221,6 +27656,30 @@ exports.Timezone = void 0;
26221
27656
  Timezone["Utc"] = "utc";
26222
27657
  })(exports.Timezone || (exports.Timezone = {}));
26223
27658
 
27659
+ exports.BrowserPermission = void 0;
27660
+ (function (BrowserPermission) {
27661
+ BrowserPermission["Geolocation"] = "geolocation";
27662
+ BrowserPermission["Camera"] = "camera";
27663
+ BrowserPermission["Microphone"] = "microphone";
27664
+ BrowserPermission["Notifications"] = "notifications";
27665
+ BrowserPermission["Midi"] = "midi";
27666
+ BrowserPermission["Push"] = "push";
27667
+ BrowserPermission["Clipboardread"] = "clipboard-read";
27668
+ BrowserPermission["Clipboardwrite"] = "clipboard-write";
27669
+ BrowserPermission["Paymenthandler"] = "payment-handler";
27670
+ BrowserPermission["Usb"] = "usb";
27671
+ BrowserPermission["Bluetooth"] = "bluetooth";
27672
+ BrowserPermission["Accelerometer"] = "accelerometer";
27673
+ BrowserPermission["Gyroscope"] = "gyroscope";
27674
+ BrowserPermission["Magnetometer"] = "magnetometer";
27675
+ BrowserPermission["Ambientlightsensor"] = "ambient-light-sensor";
27676
+ BrowserPermission["Backgroundsync"] = "background-sync";
27677
+ BrowserPermission["Persistentstorage"] = "persistent-storage";
27678
+ BrowserPermission["Screenwakelock"] = "screen-wake-lock";
27679
+ BrowserPermission["Webshare"] = "web-share";
27680
+ BrowserPermission["Xrspatialtracking"] = "xr-spatial-tracking";
27681
+ })(exports.BrowserPermission || (exports.BrowserPermission = {}));
27682
+
26224
27683
  exports.ImageFormat = void 0;
26225
27684
  (function (ImageFormat) {
26226
27685
  ImageFormat["Jpg"] = "jpg";
@@ -26232,6 +27691,13 @@ exports.ImageFormat = void 0;
26232
27691
  ImageFormat["Gif"] = "gif";
26233
27692
  })(exports.ImageFormat || (exports.ImageFormat = {}));
26234
27693
 
27694
+ exports.Services = void 0;
27695
+ (function (Services) {
27696
+ Services["Databases"] = "databases";
27697
+ Services["Functions"] = "functions";
27698
+ Services["Storage"] = "storage";
27699
+ })(exports.Services || (exports.Services = {}));
27700
+
26235
27701
  exports.Platform = void 0;
26236
27702
  (function (Platform) {
26237
27703
  Platform["Appwrite"] = "appwrite";
@@ -26273,6 +27739,12 @@ exports.IndexType = void 0;
26273
27739
  IndexType["Spatial"] = "spatial";
26274
27740
  })(exports.IndexType || (exports.IndexType = {}));
26275
27741
 
27742
+ exports.OrderBy = void 0;
27743
+ (function (OrderBy) {
27744
+ OrderBy["Asc"] = "asc";
27745
+ OrderBy["Desc"] = "desc";
27746
+ })(exports.OrderBy || (exports.OrderBy = {}));
27747
+
26276
27748
  exports.FilterType = void 0;
26277
27749
  (function (FilterType) {
26278
27750
  FilterType["Premium"] = "premium";
@@ -26347,6 +27819,87 @@ exports.Runtime = void 0;
26347
27819
  Runtime["Flutter335"] = "flutter-3.35";
26348
27820
  })(exports.Runtime || (exports.Runtime = {}));
26349
27821
 
27822
+ exports.Runtimes = void 0;
27823
+ (function (Runtimes) {
27824
+ Runtimes["Node145"] = "node-14.5";
27825
+ Runtimes["Node160"] = "node-16.0";
27826
+ Runtimes["Node180"] = "node-18.0";
27827
+ Runtimes["Node190"] = "node-19.0";
27828
+ Runtimes["Node200"] = "node-20.0";
27829
+ Runtimes["Node210"] = "node-21.0";
27830
+ Runtimes["Node22"] = "node-22";
27831
+ Runtimes["Php80"] = "php-8.0";
27832
+ Runtimes["Php81"] = "php-8.1";
27833
+ Runtimes["Php82"] = "php-8.2";
27834
+ Runtimes["Php83"] = "php-8.3";
27835
+ Runtimes["Ruby30"] = "ruby-3.0";
27836
+ Runtimes["Ruby31"] = "ruby-3.1";
27837
+ Runtimes["Ruby32"] = "ruby-3.2";
27838
+ Runtimes["Ruby33"] = "ruby-3.3";
27839
+ Runtimes["Python38"] = "python-3.8";
27840
+ Runtimes["Python39"] = "python-3.9";
27841
+ Runtimes["Python310"] = "python-3.10";
27842
+ Runtimes["Python311"] = "python-3.11";
27843
+ Runtimes["Python312"] = "python-3.12";
27844
+ Runtimes["Pythonml311"] = "python-ml-3.11";
27845
+ Runtimes["Pythonml312"] = "python-ml-3.12";
27846
+ Runtimes["Deno140"] = "deno-1.40";
27847
+ Runtimes["Deno146"] = "deno-1.46";
27848
+ Runtimes["Deno20"] = "deno-2.0";
27849
+ Runtimes["Dart215"] = "dart-2.15";
27850
+ Runtimes["Dart216"] = "dart-2.16";
27851
+ Runtimes["Dart217"] = "dart-2.17";
27852
+ Runtimes["Dart218"] = "dart-2.18";
27853
+ Runtimes["Dart219"] = "dart-2.19";
27854
+ Runtimes["Dart30"] = "dart-3.0";
27855
+ Runtimes["Dart31"] = "dart-3.1";
27856
+ Runtimes["Dart33"] = "dart-3.3";
27857
+ Runtimes["Dart35"] = "dart-3.5";
27858
+ Runtimes["Dart38"] = "dart-3.8";
27859
+ Runtimes["Dart39"] = "dart-3.9";
27860
+ Runtimes["Dotnet60"] = "dotnet-6.0";
27861
+ Runtimes["Dotnet70"] = "dotnet-7.0";
27862
+ Runtimes["Dotnet80"] = "dotnet-8.0";
27863
+ Runtimes["Java80"] = "java-8.0";
27864
+ Runtimes["Java110"] = "java-11.0";
27865
+ Runtimes["Java170"] = "java-17.0";
27866
+ Runtimes["Java180"] = "java-18.0";
27867
+ Runtimes["Java210"] = "java-21.0";
27868
+ Runtimes["Java22"] = "java-22";
27869
+ Runtimes["Swift55"] = "swift-5.5";
27870
+ Runtimes["Swift58"] = "swift-5.8";
27871
+ Runtimes["Swift59"] = "swift-5.9";
27872
+ Runtimes["Swift510"] = "swift-5.10";
27873
+ Runtimes["Kotlin16"] = "kotlin-1.6";
27874
+ Runtimes["Kotlin18"] = "kotlin-1.8";
27875
+ Runtimes["Kotlin19"] = "kotlin-1.9";
27876
+ Runtimes["Kotlin20"] = "kotlin-2.0";
27877
+ Runtimes["Cpp17"] = "cpp-17";
27878
+ Runtimes["Cpp20"] = "cpp-20";
27879
+ Runtimes["Bun10"] = "bun-1.0";
27880
+ Runtimes["Bun11"] = "bun-1.1";
27881
+ Runtimes["Go123"] = "go-1.23";
27882
+ Runtimes["Static1"] = "static-1";
27883
+ Runtimes["Flutter324"] = "flutter-3.24";
27884
+ Runtimes["Flutter327"] = "flutter-3.27";
27885
+ Runtimes["Flutter329"] = "flutter-3.29";
27886
+ Runtimes["Flutter332"] = "flutter-3.32";
27887
+ Runtimes["Flutter335"] = "flutter-3.35";
27888
+ })(exports.Runtimes || (exports.Runtimes = {}));
27889
+
27890
+ exports.UseCases = void 0;
27891
+ (function (UseCases) {
27892
+ UseCases["Portfolio"] = "portfolio";
27893
+ UseCases["Starter"] = "starter";
27894
+ UseCases["Events"] = "events";
27895
+ UseCases["Ecommerce"] = "ecommerce";
27896
+ UseCases["Documentation"] = "documentation";
27897
+ UseCases["Blog"] = "blog";
27898
+ UseCases["Ai"] = "ai";
27899
+ UseCases["Forms"] = "forms";
27900
+ UseCases["Dashboard"] = "dashboard";
27901
+ })(exports.UseCases || (exports.UseCases = {}));
27902
+
26350
27903
  exports.TemplateReferenceType = void 0;
26351
27904
  (function (TemplateReferenceType) {
26352
27905
  TemplateReferenceType["Branch"] = "branch";
@@ -26408,24 +27961,20 @@ exports.SmtpEncryption = void 0;
26408
27961
  SmtpEncryption["Tls"] = "tls";
26409
27962
  })(exports.SmtpEncryption || (exports.SmtpEncryption = {}));
26410
27963
 
26411
- exports.BillingPlan = void 0;
26412
- (function (BillingPlan) {
26413
- BillingPlan["Tier0"] = "tier-0";
26414
- BillingPlan["Tier1"] = "tier-1";
26415
- BillingPlan["Tier2"] = "tier-2";
26416
- BillingPlan["Imaginetier0"] = "imagine-tier-0";
26417
- BillingPlan["Imaginetier1"] = "imagine-tier-1";
26418
- BillingPlan["Imaginetier150"] = "imagine-tier-1-50";
26419
- BillingPlan["Imaginetier1100"] = "imagine-tier-1-100";
26420
- BillingPlan["Imaginetier1200"] = "imagine-tier-1-200";
26421
- BillingPlan["Imaginetier1290"] = "imagine-tier-1-290";
26422
- BillingPlan["Imaginetier1480"] = "imagine-tier-1-480";
26423
- BillingPlan["Imaginetier1700"] = "imagine-tier-1-700";
26424
- BillingPlan["Imaginetier1900"] = "imagine-tier-1-900";
26425
- BillingPlan["Imaginetier11100"] = "imagine-tier-1-1100";
26426
- BillingPlan["Imaginetier11650"] = "imagine-tier-1-1650";
26427
- BillingPlan["Imaginetier12200"] = "imagine-tier-1-2200";
26428
- })(exports.BillingPlan || (exports.BillingPlan = {}));
27964
+ exports.Resources = void 0;
27965
+ (function (Resources) {
27966
+ Resources["User"] = "user";
27967
+ Resources["Database"] = "database";
27968
+ Resources["Table"] = "table";
27969
+ Resources["Column"] = "column";
27970
+ Resources["Index"] = "index";
27971
+ Resources["Row"] = "row";
27972
+ Resources["Document"] = "document";
27973
+ Resources["Attribute"] = "attribute";
27974
+ Resources["Collection"] = "collection";
27975
+ Resources["Bucket"] = "bucket";
27976
+ Resources["File"] = "file";
27977
+ })(exports.Resources || (exports.Resources = {}));
26429
27978
 
26430
27979
  exports.ProjectUsageRange = void 0;
26431
27980
  (function (ProjectUsageRange) {
@@ -26905,6 +28454,25 @@ exports.Adapter = void 0;
26905
28454
  Adapter["Ssr"] = "ssr";
26906
28455
  })(exports.Adapter || (exports.Adapter = {}));
26907
28456
 
28457
+ exports.Frameworks = void 0;
28458
+ (function (Frameworks) {
28459
+ Frameworks["Analog"] = "analog";
28460
+ Frameworks["Angular"] = "angular";
28461
+ Frameworks["Nextjs"] = "nextjs";
28462
+ Frameworks["React"] = "react";
28463
+ Frameworks["Nuxt"] = "nuxt";
28464
+ Frameworks["Vue"] = "vue";
28465
+ Frameworks["Sveltekit"] = "sveltekit";
28466
+ Frameworks["Astro"] = "astro";
28467
+ Frameworks["Tanstackstart"] = "tanstack-start";
28468
+ Frameworks["Remix"] = "remix";
28469
+ Frameworks["Lynx"] = "lynx";
28470
+ Frameworks["Flutter"] = "flutter";
28471
+ Frameworks["Reactnative"] = "react-native";
28472
+ Frameworks["Vite"] = "vite";
28473
+ Frameworks["Other"] = "other";
28474
+ })(exports.Frameworks || (exports.Frameworks = {}));
28475
+
26908
28476
  exports.Compression = void 0;
26909
28477
  (function (Compression) {
26910
28478
  Compression["None"] = "none";
@@ -26925,6 +28493,15 @@ exports.ImageGravity = void 0;
26925
28493
  ImageGravity["Bottomright"] = "bottom-right";
26926
28494
  })(exports.ImageGravity || (exports.ImageGravity = {}));
26927
28495
 
28496
+ exports.Roles = void 0;
28497
+ (function (Roles) {
28498
+ Roles["Developer"] = "developer";
28499
+ Roles["Editor"] = "editor";
28500
+ Roles["Analyst"] = "analyst";
28501
+ Roles["Billing"] = "billing";
28502
+ Roles["Owner"] = "owner";
28503
+ })(exports.Roles || (exports.Roles = {}));
28504
+
26928
28505
  exports.PasswordHash = void 0;
26929
28506
  (function (PasswordHash) {
26930
28507
  PasswordHash["Sha1"] = "sha1";
@@ -26992,6 +28569,7 @@ exports.DeploymentStatus = void 0;
26992
28569
  DeploymentStatus["Processing"] = "processing";
26993
28570
  DeploymentStatus["Building"] = "building";
26994
28571
  DeploymentStatus["Ready"] = "ready";
28572
+ DeploymentStatus["Canceled"] = "canceled";
26995
28573
  DeploymentStatus["Failed"] = "failed";
26996
28574
  })(exports.DeploymentStatus || (exports.DeploymentStatus = {}));
26997
28575
 
@@ -27059,6 +28637,7 @@ exports.AppwriteException = AppwriteException;
27059
28637
  exports.Assistant = Assistant;
27060
28638
  exports.Avatars = Avatars;
27061
28639
  exports.Backups = Backups;
28640
+ exports.Channel = Channel;
27062
28641
  exports.Client = Client;
27063
28642
  exports.Console = Console;
27064
28643
  exports.Databases = Databases;