@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/esm/sdk.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import JSONbigModule from 'json-bigint';
2
+ import BigNumber from 'bignumber.js';
2
3
 
3
4
  /******************************************************************************
4
5
  Copyright (c) Microsoft Corporation.
@@ -84,6 +85,14 @@ Query.equal = (attribute, value) => new Query("equal", attribute, value).toStrin
84
85
  * @returns {string}
85
86
  */
86
87
  Query.notEqual = (attribute, value) => new Query("notEqual", attribute, value).toString();
88
+ /**
89
+ * Filter resources where attribute matches a regular expression pattern.
90
+ *
91
+ * @param {string} attribute The attribute to filter on.
92
+ * @param {string} pattern The regular expression pattern to match.
93
+ * @returns {string}
94
+ */
95
+ Query.regex = (attribute, pattern) => new Query("regex", attribute, pattern).toString();
87
96
  /**
88
97
  * Filter resources where attribute is less than value.
89
98
  *
@@ -130,6 +139,20 @@ Query.isNull = (attribute) => new Query("isNull", attribute).toString();
130
139
  * @returns {string}
131
140
  */
132
141
  Query.isNotNull = (attribute) => new Query("isNotNull", attribute).toString();
142
+ /**
143
+ * Filter resources where the specified attributes exist.
144
+ *
145
+ * @param {string[]} attributes The list of attributes that must exist.
146
+ * @returns {string}
147
+ */
148
+ Query.exists = (attributes) => new Query("exists", undefined, attributes).toString();
149
+ /**
150
+ * Filter resources where the specified attributes do not exist.
151
+ *
152
+ * @param {string[]} attributes The list of attributes that must not exist.
153
+ * @returns {string}
154
+ */
155
+ Query.notExists = (attributes) => new Query("notExists", undefined, attributes).toString();
133
156
  /**
134
157
  * Filter resources where attribute is between start and end (inclusive).
135
158
  *
@@ -327,6 +350,14 @@ Query.or = (queries) => new Query("or", undefined, queries.map((query) => JSONbi
327
350
  * @returns {string}
328
351
  */
329
352
  Query.and = (queries) => new Query("and", undefined, queries.map((query) => JSONbig$1.parse(query))).toString();
353
+ /**
354
+ * Filter array elements where at least one element matches all the specified queries.
355
+ *
356
+ * @param {string} attribute The attribute containing the array to filter on.
357
+ * @param {string[]} queries The list of query strings to match against array elements.
358
+ * @returns {string}
359
+ */
360
+ Query.elemMatch = (attribute, queries) => new Query("elemMatch", attribute, queries.map((query) => JSONbig$1.parse(query))).toString();
330
361
  /**
331
362
  * Filter resources where attribute is at a specific distance from the given coordinates.
332
363
  *
@@ -432,7 +463,28 @@ Query.touches = (attribute, values) => new Query("touches", attribute, [values])
432
463
  */
433
464
  Query.notTouches = (attribute, values) => new Query("notTouches", attribute, [values]).toString();
434
465
 
435
- const JSONbig = JSONbigModule({ useNativeBigInt: true });
466
+ const JSONbigParser = JSONbigModule({ storeAsString: false });
467
+ const JSONbigSerializer = JSONbigModule({ useNativeBigInt: true });
468
+ const MAX_SAFE = BigInt(Number.MAX_SAFE_INTEGER);
469
+ const MIN_SAFE = BigInt(Number.MIN_SAFE_INTEGER);
470
+ function reviver(_key, value) {
471
+ if (BigNumber.isBigNumber(value)) {
472
+ if (value.isInteger()) {
473
+ const str = value.toFixed();
474
+ const bi = BigInt(str);
475
+ if (bi >= MIN_SAFE && bi <= MAX_SAFE) {
476
+ return Number(str);
477
+ }
478
+ return bi;
479
+ }
480
+ return value.toNumber();
481
+ }
482
+ return value;
483
+ }
484
+ const JSONbig = {
485
+ parse: (text) => JSONbigParser.parse(text, reviver),
486
+ stringify: JSONbigSerializer.stringify
487
+ };
436
488
  /**
437
489
  * Exception thrown by the package
438
490
  */
@@ -482,7 +534,7 @@ class Client {
482
534
  'x-sdk-name': 'Console',
483
535
  'x-sdk-platform': 'console',
484
536
  'x-sdk-language': 'web',
485
- 'x-sdk-version': '2.1.2',
537
+ 'x-sdk-version': '2.2.0',
486
538
  'X-Appwrite-Response-Format': '1.8.0',
487
539
  };
488
540
  this.realtime = {
@@ -784,8 +836,8 @@ class Client {
784
836
  * @deprecated Use the Realtime service instead.
785
837
  * @see Realtime
786
838
  *
787
- * @param {string|string[]} channels
788
- * Channel to subscribe - pass a single channel as a string or multiple with an array of strings.
839
+ * @param {string|string[]|Channel<any>|ActionableChannel|ResolvedChannel|(Channel<any>|ActionableChannel|ResolvedChannel)[]} channels
840
+ * Channel to subscribe - pass a single channel as a string or Channel builder instance, or multiple with an array.
789
841
  *
790
842
  * Possible channels are:
791
843
  * - account
@@ -803,21 +855,40 @@ class Client {
803
855
  * - teams.[ID]
804
856
  * - memberships
805
857
  * - memberships.[ID]
858
+ *
859
+ * You can also use Channel builders:
860
+ * - Channel.database('db').collection('col').document('doc').create()
861
+ * - Channel.bucket('bucket').file('file').update()
862
+ * - Channel.function('func').execution('exec').delete()
863
+ * - Channel.team('team').create()
864
+ * - Channel.membership('membership').update()
806
865
  * @param {(payload: RealtimeMessage) => void} callback Is called on every realtime update.
807
866
  * @returns {() => void} Unsubscribes from events.
808
867
  */
809
868
  subscribe(channels, callback) {
810
- let channelArray = typeof channels === 'string' ? [channels] : channels;
811
- channelArray.forEach(channel => this.realtime.channels.add(channel));
869
+ const channelArray = Array.isArray(channels) ? channels : [channels];
870
+ // Convert Channel instances to strings
871
+ const channelStrings = channelArray.map(ch => {
872
+ if (typeof ch === 'string') {
873
+ return ch;
874
+ }
875
+ // All Channel instances have toString() method
876
+ if (ch && typeof ch.toString === 'function') {
877
+ return ch.toString();
878
+ }
879
+ // Fallback to generic string conversion
880
+ return String(ch);
881
+ });
882
+ channelStrings.forEach(channel => this.realtime.channels.add(channel));
812
883
  const counter = this.realtime.subscriptionsCounter++;
813
884
  this.realtime.subscriptions.set(counter, {
814
- channels: channelArray,
885
+ channels: channelStrings,
815
886
  callback
816
887
  });
817
888
  this.realtime.connect();
818
889
  return () => {
819
890
  this.realtime.subscriptions.delete(counter);
820
- this.realtime.cleanUp(channelArray);
891
+ this.realtime.cleanUp(channelStrings);
821
892
  this.realtime.connect();
822
893
  };
823
894
  }
@@ -1394,6 +1465,149 @@ class Account {
1394
1465
  };
1395
1466
  return this.client.call('post', uri, apiHeaders, payload);
1396
1467
  }
1468
+ listKeys(paramsOrFirst) {
1469
+ let params;
1470
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1471
+ params = (paramsOrFirst || {});
1472
+ }
1473
+ else {
1474
+ params = {
1475
+ total: paramsOrFirst
1476
+ };
1477
+ }
1478
+ const total = params.total;
1479
+ const apiPath = '/account/keys';
1480
+ const payload = {};
1481
+ if (typeof total !== 'undefined') {
1482
+ payload['total'] = total;
1483
+ }
1484
+ const uri = new URL(this.client.config.endpoint + apiPath);
1485
+ const apiHeaders = {};
1486
+ return this.client.call('get', uri, apiHeaders, payload);
1487
+ }
1488
+ createKey(paramsOrFirst, ...rest) {
1489
+ let params;
1490
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1491
+ params = (paramsOrFirst || {});
1492
+ }
1493
+ else {
1494
+ params = {
1495
+ name: paramsOrFirst,
1496
+ scopes: rest[0],
1497
+ expire: rest[1]
1498
+ };
1499
+ }
1500
+ const name = params.name;
1501
+ const scopes = params.scopes;
1502
+ const expire = params.expire;
1503
+ if (typeof name === 'undefined') {
1504
+ throw new AppwriteException('Missing required parameter: "name"');
1505
+ }
1506
+ if (typeof scopes === 'undefined') {
1507
+ throw new AppwriteException('Missing required parameter: "scopes"');
1508
+ }
1509
+ const apiPath = '/account/keys';
1510
+ const payload = {};
1511
+ if (typeof name !== 'undefined') {
1512
+ payload['name'] = name;
1513
+ }
1514
+ if (typeof scopes !== 'undefined') {
1515
+ payload['scopes'] = scopes;
1516
+ }
1517
+ if (typeof expire !== 'undefined') {
1518
+ payload['expire'] = expire;
1519
+ }
1520
+ const uri = new URL(this.client.config.endpoint + apiPath);
1521
+ const apiHeaders = {
1522
+ 'content-type': 'application/json',
1523
+ };
1524
+ return this.client.call('post', uri, apiHeaders, payload);
1525
+ }
1526
+ getKey(paramsOrFirst) {
1527
+ let params;
1528
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1529
+ params = (paramsOrFirst || {});
1530
+ }
1531
+ else {
1532
+ params = {
1533
+ keyId: paramsOrFirst
1534
+ };
1535
+ }
1536
+ const keyId = params.keyId;
1537
+ if (typeof keyId === 'undefined') {
1538
+ throw new AppwriteException('Missing required parameter: "keyId"');
1539
+ }
1540
+ const apiPath = '/account/keys/{keyId}'.replace('{keyId}', keyId);
1541
+ const payload = {};
1542
+ const uri = new URL(this.client.config.endpoint + apiPath);
1543
+ const apiHeaders = {};
1544
+ return this.client.call('get', uri, apiHeaders, payload);
1545
+ }
1546
+ updateKey(paramsOrFirst, ...rest) {
1547
+ let params;
1548
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1549
+ params = (paramsOrFirst || {});
1550
+ }
1551
+ else {
1552
+ params = {
1553
+ keyId: paramsOrFirst,
1554
+ name: rest[0],
1555
+ scopes: rest[1],
1556
+ expire: rest[2]
1557
+ };
1558
+ }
1559
+ const keyId = params.keyId;
1560
+ const name = params.name;
1561
+ const scopes = params.scopes;
1562
+ const expire = params.expire;
1563
+ if (typeof keyId === 'undefined') {
1564
+ throw new AppwriteException('Missing required parameter: "keyId"');
1565
+ }
1566
+ if (typeof name === 'undefined') {
1567
+ throw new AppwriteException('Missing required parameter: "name"');
1568
+ }
1569
+ if (typeof scopes === 'undefined') {
1570
+ throw new AppwriteException('Missing required parameter: "scopes"');
1571
+ }
1572
+ const apiPath = '/account/keys/{keyId}'.replace('{keyId}', keyId);
1573
+ const payload = {};
1574
+ if (typeof name !== 'undefined') {
1575
+ payload['name'] = name;
1576
+ }
1577
+ if (typeof scopes !== 'undefined') {
1578
+ payload['scopes'] = scopes;
1579
+ }
1580
+ if (typeof expire !== 'undefined') {
1581
+ payload['expire'] = expire;
1582
+ }
1583
+ const uri = new URL(this.client.config.endpoint + apiPath);
1584
+ const apiHeaders = {
1585
+ 'content-type': 'application/json',
1586
+ };
1587
+ return this.client.call('put', uri, apiHeaders, payload);
1588
+ }
1589
+ deleteKey(paramsOrFirst) {
1590
+ let params;
1591
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1592
+ params = (paramsOrFirst || {});
1593
+ }
1594
+ else {
1595
+ params = {
1596
+ keyId: paramsOrFirst
1597
+ };
1598
+ }
1599
+ const keyId = params.keyId;
1600
+ if (typeof keyId === 'undefined') {
1601
+ throw new AppwriteException('Missing required parameter: "keyId"');
1602
+ }
1603
+ const apiPath = '/account/keys/{keyId}'.replace('{keyId}', keyId);
1604
+ const payload = {};
1605
+ const uri = new URL(this.client.config.endpoint + apiPath);
1606
+ const apiHeaders = {
1607
+ 'content-type': 'application/json',
1608
+ };
1609
+ return this.client.call('delete', uri, apiHeaders, payload);
1610
+ }
1397
1611
  listLogs(paramsOrFirst, ...rest) {
1398
1612
  let params;
1399
1613
  if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
@@ -3329,7 +3543,7 @@ class Backups {
3329
3543
  }
3330
3544
  createArchive(paramsOrFirst, ...rest) {
3331
3545
  let params;
3332
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
3546
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'services' in paramsOrFirst)) {
3333
3547
  params = (paramsOrFirst || {});
3334
3548
  }
3335
3549
  else {
@@ -3809,25 +4023,15 @@ class Console {
3809
4023
  };
3810
4024
  return this.client.call('post', uri, apiHeaders, payload);
3811
4025
  }
3812
- getRegions(paramsOrFirst) {
3813
- let params;
3814
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
3815
- params = (paramsOrFirst || {});
3816
- }
3817
- else {
3818
- params = {
3819
- organizationId: paramsOrFirst
3820
- };
3821
- }
3822
- const organizationId = params.organizationId;
3823
- if (typeof organizationId === 'undefined') {
3824
- throw new AppwriteException('Missing required parameter: "organizationId"');
3825
- }
4026
+ /**
4027
+ * Get all available regions for the console.
4028
+ *
4029
+ * @throws {AppwriteException}
4030
+ * @returns {Promise<Models.ConsoleRegionList>}
4031
+ */
4032
+ listRegions() {
3826
4033
  const apiPath = '/console/regions';
3827
4034
  const payload = {};
3828
- if (typeof organizationId !== 'undefined') {
3829
- payload['organizationId'] = organizationId;
3830
- }
3831
4035
  const uri = new URL(this.client.config.endpoint + apiPath);
3832
4036
  const apiHeaders = {};
3833
4037
  return this.client.call('get', uri, apiHeaders, payload);
@@ -4280,9 +4484,6 @@ class Databases {
4280
4484
  if (typeof databaseId === 'undefined') {
4281
4485
  throw new AppwriteException('Missing required parameter: "databaseId"');
4282
4486
  }
4283
- if (typeof name === 'undefined') {
4284
- throw new AppwriteException('Missing required parameter: "name"');
4285
- }
4286
4487
  const apiPath = '/databases/{databaseId}'.replace('{databaseId}', databaseId);
4287
4488
  const payload = {};
4288
4489
  if (typeof name !== 'undefined') {
@@ -4469,9 +4670,6 @@ class Databases {
4469
4670
  if (typeof collectionId === 'undefined') {
4470
4671
  throw new AppwriteException('Missing required parameter: "collectionId"');
4471
4672
  }
4472
- if (typeof name === 'undefined') {
4473
- throw new AppwriteException('Missing required parameter: "name"');
4474
- }
4475
4673
  const apiPath = '/databases/{databaseId}/collections/{collectionId}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
4476
4674
  const payload = {};
4477
4675
  if (typeof name !== 'undefined') {
@@ -5450,7 +5648,7 @@ class Databases {
5450
5648
  };
5451
5649
  return this.client.call('patch', uri, apiHeaders, payload);
5452
5650
  }
5453
- createPointAttribute(paramsOrFirst, ...rest) {
5651
+ createLongtextAttribute(paramsOrFirst, ...rest) {
5454
5652
  let params;
5455
5653
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
5456
5654
  params = (paramsOrFirst || {});
@@ -5461,7 +5659,8 @@ class Databases {
5461
5659
  collectionId: rest[0],
5462
5660
  key: rest[1],
5463
5661
  required: rest[2],
5464
- xdefault: rest[3]
5662
+ xdefault: rest[3],
5663
+ array: rest[4]
5465
5664
  };
5466
5665
  }
5467
5666
  const databaseId = params.databaseId;
@@ -5469,6 +5668,7 @@ class Databases {
5469
5668
  const key = params.key;
5470
5669
  const required = params.required;
5471
5670
  const xdefault = params.xdefault;
5671
+ const array = params.array;
5472
5672
  if (typeof databaseId === 'undefined') {
5473
5673
  throw new AppwriteException('Missing required parameter: "databaseId"');
5474
5674
  }
@@ -5481,7 +5681,7 @@ class Databases {
5481
5681
  if (typeof required === 'undefined') {
5482
5682
  throw new AppwriteException('Missing required parameter: "required"');
5483
5683
  }
5484
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/point'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
5684
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/longtext'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
5485
5685
  const payload = {};
5486
5686
  if (typeof key !== 'undefined') {
5487
5687
  payload['key'] = key;
@@ -5492,13 +5692,16 @@ class Databases {
5492
5692
  if (typeof xdefault !== 'undefined') {
5493
5693
  payload['default'] = xdefault;
5494
5694
  }
5695
+ if (typeof array !== 'undefined') {
5696
+ payload['array'] = array;
5697
+ }
5495
5698
  const uri = new URL(this.client.config.endpoint + apiPath);
5496
5699
  const apiHeaders = {
5497
5700
  'content-type': 'application/json',
5498
5701
  };
5499
5702
  return this.client.call('post', uri, apiHeaders, payload);
5500
5703
  }
5501
- updatePointAttribute(paramsOrFirst, ...rest) {
5704
+ updateLongtextAttribute(paramsOrFirst, ...rest) {
5502
5705
  let params;
5503
5706
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
5504
5707
  params = (paramsOrFirst || {});
@@ -5531,7 +5734,10 @@ class Databases {
5531
5734
  if (typeof required === 'undefined') {
5532
5735
  throw new AppwriteException('Missing required parameter: "required"');
5533
5736
  }
5534
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/point/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
5737
+ if (typeof xdefault === 'undefined') {
5738
+ throw new AppwriteException('Missing required parameter: "xdefault"');
5739
+ }
5740
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/longtext/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
5535
5741
  const payload = {};
5536
5742
  if (typeof required !== 'undefined') {
5537
5743
  payload['required'] = required;
@@ -5548,7 +5754,7 @@ class Databases {
5548
5754
  };
5549
5755
  return this.client.call('patch', uri, apiHeaders, payload);
5550
5756
  }
5551
- createPolygonAttribute(paramsOrFirst, ...rest) {
5757
+ createMediumtextAttribute(paramsOrFirst, ...rest) {
5552
5758
  let params;
5553
5759
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
5554
5760
  params = (paramsOrFirst || {});
@@ -5559,7 +5765,8 @@ class Databases {
5559
5765
  collectionId: rest[0],
5560
5766
  key: rest[1],
5561
5767
  required: rest[2],
5562
- xdefault: rest[3]
5768
+ xdefault: rest[3],
5769
+ array: rest[4]
5563
5770
  };
5564
5771
  }
5565
5772
  const databaseId = params.databaseId;
@@ -5567,6 +5774,7 @@ class Databases {
5567
5774
  const key = params.key;
5568
5775
  const required = params.required;
5569
5776
  const xdefault = params.xdefault;
5777
+ const array = params.array;
5570
5778
  if (typeof databaseId === 'undefined') {
5571
5779
  throw new AppwriteException('Missing required parameter: "databaseId"');
5572
5780
  }
@@ -5579,7 +5787,7 @@ class Databases {
5579
5787
  if (typeof required === 'undefined') {
5580
5788
  throw new AppwriteException('Missing required parameter: "required"');
5581
5789
  }
5582
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/polygon'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
5790
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/mediumtext'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
5583
5791
  const payload = {};
5584
5792
  if (typeof key !== 'undefined') {
5585
5793
  payload['key'] = key;
@@ -5590,13 +5798,16 @@ class Databases {
5590
5798
  if (typeof xdefault !== 'undefined') {
5591
5799
  payload['default'] = xdefault;
5592
5800
  }
5801
+ if (typeof array !== 'undefined') {
5802
+ payload['array'] = array;
5803
+ }
5593
5804
  const uri = new URL(this.client.config.endpoint + apiPath);
5594
5805
  const apiHeaders = {
5595
5806
  'content-type': 'application/json',
5596
5807
  };
5597
5808
  return this.client.call('post', uri, apiHeaders, payload);
5598
5809
  }
5599
- updatePolygonAttribute(paramsOrFirst, ...rest) {
5810
+ updateMediumtextAttribute(paramsOrFirst, ...rest) {
5600
5811
  let params;
5601
5812
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
5602
5813
  params = (paramsOrFirst || {});
@@ -5629,7 +5840,10 @@ class Databases {
5629
5840
  if (typeof required === 'undefined') {
5630
5841
  throw new AppwriteException('Missing required parameter: "required"');
5631
5842
  }
5632
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/polygon/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
5843
+ if (typeof xdefault === 'undefined') {
5844
+ throw new AppwriteException('Missing required parameter: "xdefault"');
5845
+ }
5846
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/mediumtext/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
5633
5847
  const payload = {};
5634
5848
  if (typeof required !== 'undefined') {
5635
5849
  payload['required'] = required;
@@ -5646,7 +5860,7 @@ class Databases {
5646
5860
  };
5647
5861
  return this.client.call('patch', uri, apiHeaders, payload);
5648
5862
  }
5649
- createRelationshipAttribute(paramsOrFirst, ...rest) {
5863
+ createPointAttribute(paramsOrFirst, ...rest) {
5650
5864
  let params;
5651
5865
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
5652
5866
  params = (paramsOrFirst || {});
@@ -5655,53 +5869,38 @@ class Databases {
5655
5869
  params = {
5656
5870
  databaseId: paramsOrFirst,
5657
5871
  collectionId: rest[0],
5658
- relatedCollectionId: rest[1],
5659
- type: rest[2],
5660
- twoWay: rest[3],
5661
- key: rest[4],
5662
- twoWayKey: rest[5],
5663
- onDelete: rest[6]
5872
+ key: rest[1],
5873
+ required: rest[2],
5874
+ xdefault: rest[3]
5664
5875
  };
5665
5876
  }
5666
5877
  const databaseId = params.databaseId;
5667
5878
  const collectionId = params.collectionId;
5668
- const relatedCollectionId = params.relatedCollectionId;
5669
- const type = params.type;
5670
- const twoWay = params.twoWay;
5671
5879
  const key = params.key;
5672
- const twoWayKey = params.twoWayKey;
5673
- const onDelete = params.onDelete;
5880
+ const required = params.required;
5881
+ const xdefault = params.xdefault;
5674
5882
  if (typeof databaseId === 'undefined') {
5675
5883
  throw new AppwriteException('Missing required parameter: "databaseId"');
5676
5884
  }
5677
5885
  if (typeof collectionId === 'undefined') {
5678
5886
  throw new AppwriteException('Missing required parameter: "collectionId"');
5679
5887
  }
5680
- if (typeof relatedCollectionId === 'undefined') {
5681
- throw new AppwriteException('Missing required parameter: "relatedCollectionId"');
5888
+ if (typeof key === 'undefined') {
5889
+ throw new AppwriteException('Missing required parameter: "key"');
5682
5890
  }
5683
- if (typeof type === 'undefined') {
5684
- throw new AppwriteException('Missing required parameter: "type"');
5891
+ if (typeof required === 'undefined') {
5892
+ throw new AppwriteException('Missing required parameter: "required"');
5685
5893
  }
5686
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/relationship'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
5894
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/point'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
5687
5895
  const payload = {};
5688
- if (typeof relatedCollectionId !== 'undefined') {
5689
- payload['relatedCollectionId'] = relatedCollectionId;
5690
- }
5691
- if (typeof type !== 'undefined') {
5692
- payload['type'] = type;
5693
- }
5694
- if (typeof twoWay !== 'undefined') {
5695
- payload['twoWay'] = twoWay;
5696
- }
5697
5896
  if (typeof key !== 'undefined') {
5698
5897
  payload['key'] = key;
5699
5898
  }
5700
- if (typeof twoWayKey !== 'undefined') {
5701
- payload['twoWayKey'] = twoWayKey;
5899
+ if (typeof required !== 'undefined') {
5900
+ payload['required'] = required;
5702
5901
  }
5703
- if (typeof onDelete !== 'undefined') {
5704
- payload['onDelete'] = onDelete;
5902
+ if (typeof xdefault !== 'undefined') {
5903
+ payload['default'] = xdefault;
5705
5904
  }
5706
5905
  const uri = new URL(this.client.config.endpoint + apiPath);
5707
5906
  const apiHeaders = {
@@ -5709,7 +5908,7 @@ class Databases {
5709
5908
  };
5710
5909
  return this.client.call('post', uri, apiHeaders, payload);
5711
5910
  }
5712
- createStringAttribute(paramsOrFirst, ...rest) {
5911
+ updatePointAttribute(paramsOrFirst, ...rest) {
5713
5912
  let params;
5714
5913
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
5715
5914
  params = (paramsOrFirst || {});
@@ -5719,21 +5918,17 @@ class Databases {
5719
5918
  databaseId: paramsOrFirst,
5720
5919
  collectionId: rest[0],
5721
5920
  key: rest[1],
5722
- size: rest[2],
5723
- required: rest[3],
5724
- xdefault: rest[4],
5725
- array: rest[5],
5726
- encrypt: rest[6]
5921
+ required: rest[2],
5922
+ xdefault: rest[3],
5923
+ newKey: rest[4]
5727
5924
  };
5728
5925
  }
5729
5926
  const databaseId = params.databaseId;
5730
5927
  const collectionId = params.collectionId;
5731
5928
  const key = params.key;
5732
- const size = params.size;
5733
5929
  const required = params.required;
5734
5930
  const xdefault = params.xdefault;
5735
- const array = params.array;
5736
- const encrypt = params.encrypt;
5931
+ const newKey = params.newKey;
5737
5932
  if (typeof databaseId === 'undefined') {
5738
5933
  throw new AppwriteException('Missing required parameter: "databaseId"');
5739
5934
  }
@@ -5743,39 +5938,75 @@ class Databases {
5743
5938
  if (typeof key === 'undefined') {
5744
5939
  throw new AppwriteException('Missing required parameter: "key"');
5745
5940
  }
5746
- if (typeof size === 'undefined') {
5747
- throw new AppwriteException('Missing required parameter: "size"');
5941
+ if (typeof required === 'undefined') {
5942
+ throw new AppwriteException('Missing required parameter: "required"');
5943
+ }
5944
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/point/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
5945
+ const payload = {};
5946
+ if (typeof required !== 'undefined') {
5947
+ payload['required'] = required;
5948
+ }
5949
+ if (typeof xdefault !== 'undefined') {
5950
+ payload['default'] = xdefault;
5951
+ }
5952
+ if (typeof newKey !== 'undefined') {
5953
+ payload['newKey'] = newKey;
5954
+ }
5955
+ const uri = new URL(this.client.config.endpoint + apiPath);
5956
+ const apiHeaders = {
5957
+ 'content-type': 'application/json',
5958
+ };
5959
+ return this.client.call('patch', uri, apiHeaders, payload);
5960
+ }
5961
+ createPolygonAttribute(paramsOrFirst, ...rest) {
5962
+ let params;
5963
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
5964
+ params = (paramsOrFirst || {});
5965
+ }
5966
+ else {
5967
+ params = {
5968
+ databaseId: paramsOrFirst,
5969
+ collectionId: rest[0],
5970
+ key: rest[1],
5971
+ required: rest[2],
5972
+ xdefault: rest[3]
5973
+ };
5974
+ }
5975
+ const databaseId = params.databaseId;
5976
+ const collectionId = params.collectionId;
5977
+ const key = params.key;
5978
+ const required = params.required;
5979
+ const xdefault = params.xdefault;
5980
+ if (typeof databaseId === 'undefined') {
5981
+ throw new AppwriteException('Missing required parameter: "databaseId"');
5982
+ }
5983
+ if (typeof collectionId === 'undefined') {
5984
+ throw new AppwriteException('Missing required parameter: "collectionId"');
5985
+ }
5986
+ if (typeof key === 'undefined') {
5987
+ throw new AppwriteException('Missing required parameter: "key"');
5748
5988
  }
5749
5989
  if (typeof required === 'undefined') {
5750
5990
  throw new AppwriteException('Missing required parameter: "required"');
5751
5991
  }
5752
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/string'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
5992
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/polygon'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
5753
5993
  const payload = {};
5754
5994
  if (typeof key !== 'undefined') {
5755
5995
  payload['key'] = key;
5756
5996
  }
5757
- if (typeof size !== 'undefined') {
5758
- payload['size'] = size;
5759
- }
5760
5997
  if (typeof required !== 'undefined') {
5761
5998
  payload['required'] = required;
5762
5999
  }
5763
6000
  if (typeof xdefault !== 'undefined') {
5764
6001
  payload['default'] = xdefault;
5765
6002
  }
5766
- if (typeof array !== 'undefined') {
5767
- payload['array'] = array;
5768
- }
5769
- if (typeof encrypt !== 'undefined') {
5770
- payload['encrypt'] = encrypt;
5771
- }
5772
6003
  const uri = new URL(this.client.config.endpoint + apiPath);
5773
6004
  const apiHeaders = {
5774
6005
  'content-type': 'application/json',
5775
6006
  };
5776
6007
  return this.client.call('post', uri, apiHeaders, payload);
5777
6008
  }
5778
- updateStringAttribute(paramsOrFirst, ...rest) {
6009
+ updatePolygonAttribute(paramsOrFirst, ...rest) {
5779
6010
  let params;
5780
6011
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
5781
6012
  params = (paramsOrFirst || {});
@@ -5787,8 +6018,7 @@ class Databases {
5787
6018
  key: rest[1],
5788
6019
  required: rest[2],
5789
6020
  xdefault: rest[3],
5790
- size: rest[4],
5791
- newKey: rest[5]
6021
+ newKey: rest[4]
5792
6022
  };
5793
6023
  }
5794
6024
  const databaseId = params.databaseId;
@@ -5796,7 +6026,6 @@ class Databases {
5796
6026
  const key = params.key;
5797
6027
  const required = params.required;
5798
6028
  const xdefault = params.xdefault;
5799
- const size = params.size;
5800
6029
  const newKey = params.newKey;
5801
6030
  if (typeof databaseId === 'undefined') {
5802
6031
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -5810,10 +6039,7 @@ class Databases {
5810
6039
  if (typeof required === 'undefined') {
5811
6040
  throw new AppwriteException('Missing required parameter: "required"');
5812
6041
  }
5813
- if (typeof xdefault === 'undefined') {
5814
- throw new AppwriteException('Missing required parameter: "xdefault"');
5815
- }
5816
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/string/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
6042
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/polygon/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
5817
6043
  const payload = {};
5818
6044
  if (typeof required !== 'undefined') {
5819
6045
  payload['required'] = required;
@@ -5821,9 +6047,6 @@ class Databases {
5821
6047
  if (typeof xdefault !== 'undefined') {
5822
6048
  payload['default'] = xdefault;
5823
6049
  }
5824
- if (typeof size !== 'undefined') {
5825
- payload['size'] = size;
5826
- }
5827
6050
  if (typeof newKey !== 'undefined') {
5828
6051
  payload['newKey'] = newKey;
5829
6052
  }
@@ -5833,7 +6056,70 @@ class Databases {
5833
6056
  };
5834
6057
  return this.client.call('patch', uri, apiHeaders, payload);
5835
6058
  }
5836
- createUrlAttribute(paramsOrFirst, ...rest) {
6059
+ createRelationshipAttribute(paramsOrFirst, ...rest) {
6060
+ let params;
6061
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6062
+ params = (paramsOrFirst || {});
6063
+ }
6064
+ else {
6065
+ params = {
6066
+ databaseId: paramsOrFirst,
6067
+ collectionId: rest[0],
6068
+ relatedCollectionId: rest[1],
6069
+ type: rest[2],
6070
+ twoWay: rest[3],
6071
+ key: rest[4],
6072
+ twoWayKey: rest[5],
6073
+ onDelete: rest[6]
6074
+ };
6075
+ }
6076
+ const databaseId = params.databaseId;
6077
+ const collectionId = params.collectionId;
6078
+ const relatedCollectionId = params.relatedCollectionId;
6079
+ const type = params.type;
6080
+ const twoWay = params.twoWay;
6081
+ const key = params.key;
6082
+ const twoWayKey = params.twoWayKey;
6083
+ const onDelete = params.onDelete;
6084
+ if (typeof databaseId === 'undefined') {
6085
+ throw new AppwriteException('Missing required parameter: "databaseId"');
6086
+ }
6087
+ if (typeof collectionId === 'undefined') {
6088
+ throw new AppwriteException('Missing required parameter: "collectionId"');
6089
+ }
6090
+ if (typeof relatedCollectionId === 'undefined') {
6091
+ throw new AppwriteException('Missing required parameter: "relatedCollectionId"');
6092
+ }
6093
+ if (typeof type === 'undefined') {
6094
+ throw new AppwriteException('Missing required parameter: "type"');
6095
+ }
6096
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/relationship'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
6097
+ const payload = {};
6098
+ if (typeof relatedCollectionId !== 'undefined') {
6099
+ payload['relatedCollectionId'] = relatedCollectionId;
6100
+ }
6101
+ if (typeof type !== 'undefined') {
6102
+ payload['type'] = type;
6103
+ }
6104
+ if (typeof twoWay !== 'undefined') {
6105
+ payload['twoWay'] = twoWay;
6106
+ }
6107
+ if (typeof key !== 'undefined') {
6108
+ payload['key'] = key;
6109
+ }
6110
+ if (typeof twoWayKey !== 'undefined') {
6111
+ payload['twoWayKey'] = twoWayKey;
6112
+ }
6113
+ if (typeof onDelete !== 'undefined') {
6114
+ payload['onDelete'] = onDelete;
6115
+ }
6116
+ const uri = new URL(this.client.config.endpoint + apiPath);
6117
+ const apiHeaders = {
6118
+ 'content-type': 'application/json',
6119
+ };
6120
+ return this.client.call('post', uri, apiHeaders, payload);
6121
+ }
6122
+ createStringAttribute(paramsOrFirst, ...rest) {
5837
6123
  let params;
5838
6124
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
5839
6125
  params = (paramsOrFirst || {});
@@ -5843,17 +6129,21 @@ class Databases {
5843
6129
  databaseId: paramsOrFirst,
5844
6130
  collectionId: rest[0],
5845
6131
  key: rest[1],
5846
- required: rest[2],
5847
- xdefault: rest[3],
5848
- array: rest[4]
6132
+ size: rest[2],
6133
+ required: rest[3],
6134
+ xdefault: rest[4],
6135
+ array: rest[5],
6136
+ encrypt: rest[6]
5849
6137
  };
5850
6138
  }
5851
6139
  const databaseId = params.databaseId;
5852
6140
  const collectionId = params.collectionId;
5853
6141
  const key = params.key;
6142
+ const size = params.size;
5854
6143
  const required = params.required;
5855
6144
  const xdefault = params.xdefault;
5856
6145
  const array = params.array;
6146
+ const encrypt = params.encrypt;
5857
6147
  if (typeof databaseId === 'undefined') {
5858
6148
  throw new AppwriteException('Missing required parameter: "databaseId"');
5859
6149
  }
@@ -5863,14 +6153,20 @@ class Databases {
5863
6153
  if (typeof key === 'undefined') {
5864
6154
  throw new AppwriteException('Missing required parameter: "key"');
5865
6155
  }
6156
+ if (typeof size === 'undefined') {
6157
+ throw new AppwriteException('Missing required parameter: "size"');
6158
+ }
5866
6159
  if (typeof required === 'undefined') {
5867
6160
  throw new AppwriteException('Missing required parameter: "required"');
5868
6161
  }
5869
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/url'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
6162
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/string'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
5870
6163
  const payload = {};
5871
6164
  if (typeof key !== 'undefined') {
5872
6165
  payload['key'] = key;
5873
6166
  }
6167
+ if (typeof size !== 'undefined') {
6168
+ payload['size'] = size;
6169
+ }
5874
6170
  if (typeof required !== 'undefined') {
5875
6171
  payload['required'] = required;
5876
6172
  }
@@ -5880,13 +6176,16 @@ class Databases {
5880
6176
  if (typeof array !== 'undefined') {
5881
6177
  payload['array'] = array;
5882
6178
  }
6179
+ if (typeof encrypt !== 'undefined') {
6180
+ payload['encrypt'] = encrypt;
6181
+ }
5883
6182
  const uri = new URL(this.client.config.endpoint + apiPath);
5884
6183
  const apiHeaders = {
5885
6184
  'content-type': 'application/json',
5886
6185
  };
5887
6186
  return this.client.call('post', uri, apiHeaders, payload);
5888
6187
  }
5889
- updateUrlAttribute(paramsOrFirst, ...rest) {
6188
+ updateStringAttribute(paramsOrFirst, ...rest) {
5890
6189
  let params;
5891
6190
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
5892
6191
  params = (paramsOrFirst || {});
@@ -5898,7 +6197,8 @@ class Databases {
5898
6197
  key: rest[1],
5899
6198
  required: rest[2],
5900
6199
  xdefault: rest[3],
5901
- newKey: rest[4]
6200
+ size: rest[4],
6201
+ newKey: rest[5]
5902
6202
  };
5903
6203
  }
5904
6204
  const databaseId = params.databaseId;
@@ -5906,6 +6206,7 @@ class Databases {
5906
6206
  const key = params.key;
5907
6207
  const required = params.required;
5908
6208
  const xdefault = params.xdefault;
6209
+ const size = params.size;
5909
6210
  const newKey = params.newKey;
5910
6211
  if (typeof databaseId === 'undefined') {
5911
6212
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -5922,7 +6223,7 @@ class Databases {
5922
6223
  if (typeof xdefault === 'undefined') {
5923
6224
  throw new AppwriteException('Missing required parameter: "xdefault"');
5924
6225
  }
5925
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/url/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
6226
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/string/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
5926
6227
  const payload = {};
5927
6228
  if (typeof required !== 'undefined') {
5928
6229
  payload['required'] = required;
@@ -5930,6 +6231,9 @@ class Databases {
5930
6231
  if (typeof xdefault !== 'undefined') {
5931
6232
  payload['default'] = xdefault;
5932
6233
  }
6234
+ if (typeof size !== 'undefined') {
6235
+ payload['size'] = size;
6236
+ }
5933
6237
  if (typeof newKey !== 'undefined') {
5934
6238
  payload['newKey'] = newKey;
5935
6239
  }
@@ -5939,7 +6243,7 @@ class Databases {
5939
6243
  };
5940
6244
  return this.client.call('patch', uri, apiHeaders, payload);
5941
6245
  }
5942
- getAttribute(paramsOrFirst, ...rest) {
6246
+ createTextAttribute(paramsOrFirst, ...rest) {
5943
6247
  let params;
5944
6248
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
5945
6249
  params = (paramsOrFirst || {});
@@ -5948,12 +6252,18 @@ class Databases {
5948
6252
  params = {
5949
6253
  databaseId: paramsOrFirst,
5950
6254
  collectionId: rest[0],
5951
- key: rest[1]
6255
+ key: rest[1],
6256
+ required: rest[2],
6257
+ xdefault: rest[3],
6258
+ array: rest[4]
5952
6259
  };
5953
6260
  }
5954
6261
  const databaseId = params.databaseId;
5955
6262
  const collectionId = params.collectionId;
5956
6263
  const key = params.key;
6264
+ const required = params.required;
6265
+ const xdefault = params.xdefault;
6266
+ const array = params.array;
5957
6267
  if (typeof databaseId === 'undefined') {
5958
6268
  throw new AppwriteException('Missing required parameter: "databaseId"');
5959
6269
  }
@@ -5963,13 +6273,30 @@ class Databases {
5963
6273
  if (typeof key === 'undefined') {
5964
6274
  throw new AppwriteException('Missing required parameter: "key"');
5965
6275
  }
5966
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
6276
+ if (typeof required === 'undefined') {
6277
+ throw new AppwriteException('Missing required parameter: "required"');
6278
+ }
6279
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/text'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
5967
6280
  const payload = {};
6281
+ if (typeof key !== 'undefined') {
6282
+ payload['key'] = key;
6283
+ }
6284
+ if (typeof required !== 'undefined') {
6285
+ payload['required'] = required;
6286
+ }
6287
+ if (typeof xdefault !== 'undefined') {
6288
+ payload['default'] = xdefault;
6289
+ }
6290
+ if (typeof array !== 'undefined') {
6291
+ payload['array'] = array;
6292
+ }
5968
6293
  const uri = new URL(this.client.config.endpoint + apiPath);
5969
- const apiHeaders = {};
5970
- return this.client.call('get', uri, apiHeaders, payload);
6294
+ const apiHeaders = {
6295
+ 'content-type': 'application/json',
6296
+ };
6297
+ return this.client.call('post', uri, apiHeaders, payload);
5971
6298
  }
5972
- deleteAttribute(paramsOrFirst, ...rest) {
6299
+ updateTextAttribute(paramsOrFirst, ...rest) {
5973
6300
  let params;
5974
6301
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
5975
6302
  params = (paramsOrFirst || {});
@@ -5978,12 +6305,18 @@ class Databases {
5978
6305
  params = {
5979
6306
  databaseId: paramsOrFirst,
5980
6307
  collectionId: rest[0],
5981
- key: rest[1]
6308
+ key: rest[1],
6309
+ required: rest[2],
6310
+ xdefault: rest[3],
6311
+ newKey: rest[4]
5982
6312
  };
5983
6313
  }
5984
6314
  const databaseId = params.databaseId;
5985
6315
  const collectionId = params.collectionId;
5986
6316
  const key = params.key;
6317
+ const required = params.required;
6318
+ const xdefault = params.xdefault;
6319
+ const newKey = params.newKey;
5987
6320
  if (typeof databaseId === 'undefined') {
5988
6321
  throw new AppwriteException('Missing required parameter: "databaseId"');
5989
6322
  }
@@ -5993,15 +6326,30 @@ class Databases {
5993
6326
  if (typeof key === 'undefined') {
5994
6327
  throw new AppwriteException('Missing required parameter: "key"');
5995
6328
  }
5996
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
6329
+ if (typeof required === 'undefined') {
6330
+ throw new AppwriteException('Missing required parameter: "required"');
6331
+ }
6332
+ if (typeof xdefault === 'undefined') {
6333
+ throw new AppwriteException('Missing required parameter: "xdefault"');
6334
+ }
6335
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/text/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
5997
6336
  const payload = {};
6337
+ if (typeof required !== 'undefined') {
6338
+ payload['required'] = required;
6339
+ }
6340
+ if (typeof xdefault !== 'undefined') {
6341
+ payload['default'] = xdefault;
6342
+ }
6343
+ if (typeof newKey !== 'undefined') {
6344
+ payload['newKey'] = newKey;
6345
+ }
5998
6346
  const uri = new URL(this.client.config.endpoint + apiPath);
5999
6347
  const apiHeaders = {
6000
6348
  'content-type': 'application/json',
6001
6349
  };
6002
- return this.client.call('delete', uri, apiHeaders, payload);
6350
+ return this.client.call('patch', uri, apiHeaders, payload);
6003
6351
  }
6004
- updateRelationshipAttribute(paramsOrFirst, ...rest) {
6352
+ createUrlAttribute(paramsOrFirst, ...rest) {
6005
6353
  let params;
6006
6354
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6007
6355
  params = (paramsOrFirst || {});
@@ -6011,15 +6359,17 @@ class Databases {
6011
6359
  databaseId: paramsOrFirst,
6012
6360
  collectionId: rest[0],
6013
6361
  key: rest[1],
6014
- onDelete: rest[2],
6015
- newKey: rest[3]
6362
+ required: rest[2],
6363
+ xdefault: rest[3],
6364
+ array: rest[4]
6016
6365
  };
6017
6366
  }
6018
6367
  const databaseId = params.databaseId;
6019
6368
  const collectionId = params.collectionId;
6020
6369
  const key = params.key;
6021
- const onDelete = params.onDelete;
6022
- const newKey = params.newKey;
6370
+ const required = params.required;
6371
+ const xdefault = params.xdefault;
6372
+ const array = params.array;
6023
6373
  if (typeof databaseId === 'undefined') {
6024
6374
  throw new AppwriteException('Missing required parameter: "databaseId"');
6025
6375
  }
@@ -6029,21 +6379,30 @@ class Databases {
6029
6379
  if (typeof key === 'undefined') {
6030
6380
  throw new AppwriteException('Missing required parameter: "key"');
6031
6381
  }
6032
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}/relationship'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
6382
+ if (typeof required === 'undefined') {
6383
+ throw new AppwriteException('Missing required parameter: "required"');
6384
+ }
6385
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/url'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
6033
6386
  const payload = {};
6034
- if (typeof onDelete !== 'undefined') {
6035
- payload['onDelete'] = onDelete;
6387
+ if (typeof key !== 'undefined') {
6388
+ payload['key'] = key;
6036
6389
  }
6037
- if (typeof newKey !== 'undefined') {
6038
- payload['newKey'] = newKey;
6390
+ if (typeof required !== 'undefined') {
6391
+ payload['required'] = required;
6392
+ }
6393
+ if (typeof xdefault !== 'undefined') {
6394
+ payload['default'] = xdefault;
6395
+ }
6396
+ if (typeof array !== 'undefined') {
6397
+ payload['array'] = array;
6039
6398
  }
6040
6399
  const uri = new URL(this.client.config.endpoint + apiPath);
6041
6400
  const apiHeaders = {
6042
6401
  'content-type': 'application/json',
6043
6402
  };
6044
- return this.client.call('patch', uri, apiHeaders, payload);
6403
+ return this.client.call('post', uri, apiHeaders, payload);
6045
6404
  }
6046
- listDocuments(paramsOrFirst, ...rest) {
6405
+ updateUrlAttribute(paramsOrFirst, ...rest) {
6047
6406
  let params;
6048
6407
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6049
6408
  params = (paramsOrFirst || {});
@@ -6052,38 +6411,51 @@ class Databases {
6052
6411
  params = {
6053
6412
  databaseId: paramsOrFirst,
6054
6413
  collectionId: rest[0],
6055
- queries: rest[1],
6056
- transactionId: rest[2],
6057
- total: rest[3]
6414
+ key: rest[1],
6415
+ required: rest[2],
6416
+ xdefault: rest[3],
6417
+ newKey: rest[4]
6058
6418
  };
6059
6419
  }
6060
6420
  const databaseId = params.databaseId;
6061
6421
  const collectionId = params.collectionId;
6062
- const queries = params.queries;
6063
- const transactionId = params.transactionId;
6064
- const total = params.total;
6422
+ const key = params.key;
6423
+ const required = params.required;
6424
+ const xdefault = params.xdefault;
6425
+ const newKey = params.newKey;
6065
6426
  if (typeof databaseId === 'undefined') {
6066
6427
  throw new AppwriteException('Missing required parameter: "databaseId"');
6067
6428
  }
6068
6429
  if (typeof collectionId === 'undefined') {
6069
6430
  throw new AppwriteException('Missing required parameter: "collectionId"');
6070
6431
  }
6071
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
6432
+ if (typeof key === 'undefined') {
6433
+ throw new AppwriteException('Missing required parameter: "key"');
6434
+ }
6435
+ if (typeof required === 'undefined') {
6436
+ throw new AppwriteException('Missing required parameter: "required"');
6437
+ }
6438
+ if (typeof xdefault === 'undefined') {
6439
+ throw new AppwriteException('Missing required parameter: "xdefault"');
6440
+ }
6441
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/url/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
6072
6442
  const payload = {};
6073
- if (typeof queries !== 'undefined') {
6074
- payload['queries'] = queries;
6443
+ if (typeof required !== 'undefined') {
6444
+ payload['required'] = required;
6075
6445
  }
6076
- if (typeof transactionId !== 'undefined') {
6077
- payload['transactionId'] = transactionId;
6446
+ if (typeof xdefault !== 'undefined') {
6447
+ payload['default'] = xdefault;
6078
6448
  }
6079
- if (typeof total !== 'undefined') {
6080
- payload['total'] = total;
6449
+ if (typeof newKey !== 'undefined') {
6450
+ payload['newKey'] = newKey;
6081
6451
  }
6082
6452
  const uri = new URL(this.client.config.endpoint + apiPath);
6083
- const apiHeaders = {};
6084
- return this.client.call('get', uri, apiHeaders, payload);
6453
+ const apiHeaders = {
6454
+ 'content-type': 'application/json',
6455
+ };
6456
+ return this.client.call('patch', uri, apiHeaders, payload);
6085
6457
  }
6086
- createDocument(paramsOrFirst, ...rest) {
6458
+ createVarcharAttribute(paramsOrFirst, ...rest) {
6087
6459
  let params;
6088
6460
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6089
6461
  params = (paramsOrFirst || {});
@@ -6092,43 +6464,51 @@ class Databases {
6092
6464
  params = {
6093
6465
  databaseId: paramsOrFirst,
6094
6466
  collectionId: rest[0],
6095
- documentId: rest[1],
6096
- data: rest[2],
6097
- permissions: rest[3],
6098
- transactionId: rest[4]
6467
+ key: rest[1],
6468
+ size: rest[2],
6469
+ required: rest[3],
6470
+ xdefault: rest[4],
6471
+ array: rest[5]
6099
6472
  };
6100
6473
  }
6101
6474
  const databaseId = params.databaseId;
6102
6475
  const collectionId = params.collectionId;
6103
- const documentId = params.documentId;
6104
- const data = params.data;
6105
- const permissions = params.permissions;
6106
- const transactionId = params.transactionId;
6476
+ const key = params.key;
6477
+ const size = params.size;
6478
+ const required = params.required;
6479
+ const xdefault = params.xdefault;
6480
+ const array = params.array;
6107
6481
  if (typeof databaseId === 'undefined') {
6108
6482
  throw new AppwriteException('Missing required parameter: "databaseId"');
6109
6483
  }
6110
6484
  if (typeof collectionId === 'undefined') {
6111
6485
  throw new AppwriteException('Missing required parameter: "collectionId"');
6112
6486
  }
6113
- if (typeof documentId === 'undefined') {
6114
- throw new AppwriteException('Missing required parameter: "documentId"');
6487
+ if (typeof key === 'undefined') {
6488
+ throw new AppwriteException('Missing required parameter: "key"');
6115
6489
  }
6116
- if (typeof data === 'undefined') {
6117
- throw new AppwriteException('Missing required parameter: "data"');
6490
+ if (typeof size === 'undefined') {
6491
+ throw new AppwriteException('Missing required parameter: "size"');
6118
6492
  }
6119
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
6493
+ if (typeof required === 'undefined') {
6494
+ throw new AppwriteException('Missing required parameter: "required"');
6495
+ }
6496
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/varchar'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
6120
6497
  const payload = {};
6121
- if (typeof documentId !== 'undefined') {
6122
- payload['documentId'] = documentId;
6498
+ if (typeof key !== 'undefined') {
6499
+ payload['key'] = key;
6123
6500
  }
6124
- if (typeof data !== 'undefined') {
6125
- payload['data'] = data;
6501
+ if (typeof size !== 'undefined') {
6502
+ payload['size'] = size;
6126
6503
  }
6127
- if (typeof permissions !== 'undefined') {
6128
- payload['permissions'] = permissions;
6504
+ if (typeof required !== 'undefined') {
6505
+ payload['required'] = required;
6129
6506
  }
6130
- if (typeof transactionId !== 'undefined') {
6131
- payload['transactionId'] = transactionId;
6507
+ if (typeof xdefault !== 'undefined') {
6508
+ payload['default'] = xdefault;
6509
+ }
6510
+ if (typeof array !== 'undefined') {
6511
+ payload['array'] = array;
6132
6512
  }
6133
6513
  const uri = new URL(this.client.config.endpoint + apiPath);
6134
6514
  const apiHeaders = {
@@ -6136,7 +6516,7 @@ class Databases {
6136
6516
  };
6137
6517
  return this.client.call('post', uri, apiHeaders, payload);
6138
6518
  }
6139
- createDocuments(paramsOrFirst, ...rest) {
6519
+ updateVarcharAttribute(paramsOrFirst, ...rest) {
6140
6520
  let params;
6141
6521
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6142
6522
  params = (paramsOrFirst || {});
@@ -6145,38 +6525,56 @@ class Databases {
6145
6525
  params = {
6146
6526
  databaseId: paramsOrFirst,
6147
6527
  collectionId: rest[0],
6148
- documents: rest[1],
6149
- transactionId: rest[2]
6528
+ key: rest[1],
6529
+ required: rest[2],
6530
+ xdefault: rest[3],
6531
+ size: rest[4],
6532
+ newKey: rest[5]
6150
6533
  };
6151
6534
  }
6152
6535
  const databaseId = params.databaseId;
6153
6536
  const collectionId = params.collectionId;
6154
- const documents = params.documents;
6155
- const transactionId = params.transactionId;
6537
+ const key = params.key;
6538
+ const required = params.required;
6539
+ const xdefault = params.xdefault;
6540
+ const size = params.size;
6541
+ const newKey = params.newKey;
6156
6542
  if (typeof databaseId === 'undefined') {
6157
6543
  throw new AppwriteException('Missing required parameter: "databaseId"');
6158
6544
  }
6159
6545
  if (typeof collectionId === 'undefined') {
6160
6546
  throw new AppwriteException('Missing required parameter: "collectionId"');
6161
6547
  }
6162
- if (typeof documents === 'undefined') {
6163
- throw new AppwriteException('Missing required parameter: "documents"');
6548
+ if (typeof key === 'undefined') {
6549
+ throw new AppwriteException('Missing required parameter: "key"');
6164
6550
  }
6165
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
6551
+ if (typeof required === 'undefined') {
6552
+ throw new AppwriteException('Missing required parameter: "required"');
6553
+ }
6554
+ if (typeof xdefault === 'undefined') {
6555
+ throw new AppwriteException('Missing required parameter: "xdefault"');
6556
+ }
6557
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/varchar/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
6166
6558
  const payload = {};
6167
- if (typeof documents !== 'undefined') {
6168
- payload['documents'] = documents;
6559
+ if (typeof required !== 'undefined') {
6560
+ payload['required'] = required;
6169
6561
  }
6170
- if (typeof transactionId !== 'undefined') {
6171
- payload['transactionId'] = transactionId;
6562
+ if (typeof xdefault !== 'undefined') {
6563
+ payload['default'] = xdefault;
6564
+ }
6565
+ if (typeof size !== 'undefined') {
6566
+ payload['size'] = size;
6567
+ }
6568
+ if (typeof newKey !== 'undefined') {
6569
+ payload['newKey'] = newKey;
6172
6570
  }
6173
6571
  const uri = new URL(this.client.config.endpoint + apiPath);
6174
6572
  const apiHeaders = {
6175
6573
  'content-type': 'application/json',
6176
6574
  };
6177
- return this.client.call('post', uri, apiHeaders, payload);
6575
+ return this.client.call('patch', uri, apiHeaders, payload);
6178
6576
  }
6179
- upsertDocuments(paramsOrFirst, ...rest) {
6577
+ getAttribute(paramsOrFirst, ...rest) {
6180
6578
  let params;
6181
6579
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6182
6580
  params = (paramsOrFirst || {});
@@ -6185,38 +6583,28 @@ class Databases {
6185
6583
  params = {
6186
6584
  databaseId: paramsOrFirst,
6187
6585
  collectionId: rest[0],
6188
- documents: rest[1],
6189
- transactionId: rest[2]
6586
+ key: rest[1]
6190
6587
  };
6191
6588
  }
6192
6589
  const databaseId = params.databaseId;
6193
6590
  const collectionId = params.collectionId;
6194
- const documents = params.documents;
6195
- const transactionId = params.transactionId;
6591
+ const key = params.key;
6196
6592
  if (typeof databaseId === 'undefined') {
6197
6593
  throw new AppwriteException('Missing required parameter: "databaseId"');
6198
6594
  }
6199
6595
  if (typeof collectionId === 'undefined') {
6200
6596
  throw new AppwriteException('Missing required parameter: "collectionId"');
6201
6597
  }
6202
- if (typeof documents === 'undefined') {
6203
- throw new AppwriteException('Missing required parameter: "documents"');
6598
+ if (typeof key === 'undefined') {
6599
+ throw new AppwriteException('Missing required parameter: "key"');
6204
6600
  }
6205
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
6601
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
6206
6602
  const payload = {};
6207
- if (typeof documents !== 'undefined') {
6208
- payload['documents'] = documents;
6209
- }
6210
- if (typeof transactionId !== 'undefined') {
6211
- payload['transactionId'] = transactionId;
6212
- }
6213
6603
  const uri = new URL(this.client.config.endpoint + apiPath);
6214
- const apiHeaders = {
6215
- 'content-type': 'application/json',
6216
- };
6217
- return this.client.call('put', uri, apiHeaders, payload);
6604
+ const apiHeaders = {};
6605
+ return this.client.call('get', uri, apiHeaders, payload);
6218
6606
  }
6219
- updateDocuments(paramsOrFirst, ...rest) {
6607
+ deleteAttribute(paramsOrFirst, ...rest) {
6220
6608
  let params;
6221
6609
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6222
6610
  params = (paramsOrFirst || {});
@@ -6225,40 +6613,30 @@ class Databases {
6225
6613
  params = {
6226
6614
  databaseId: paramsOrFirst,
6227
6615
  collectionId: rest[0],
6228
- data: rest[1],
6229
- queries: rest[2],
6230
- transactionId: rest[3]
6616
+ key: rest[1]
6231
6617
  };
6232
6618
  }
6233
6619
  const databaseId = params.databaseId;
6234
6620
  const collectionId = params.collectionId;
6235
- const data = params.data;
6236
- const queries = params.queries;
6237
- const transactionId = params.transactionId;
6621
+ const key = params.key;
6238
6622
  if (typeof databaseId === 'undefined') {
6239
6623
  throw new AppwriteException('Missing required parameter: "databaseId"');
6240
6624
  }
6241
6625
  if (typeof collectionId === 'undefined') {
6242
6626
  throw new AppwriteException('Missing required parameter: "collectionId"');
6243
6627
  }
6244
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
6245
- const payload = {};
6246
- if (typeof data !== 'undefined') {
6247
- payload['data'] = data;
6248
- }
6249
- if (typeof queries !== 'undefined') {
6250
- payload['queries'] = queries;
6251
- }
6252
- if (typeof transactionId !== 'undefined') {
6253
- payload['transactionId'] = transactionId;
6628
+ if (typeof key === 'undefined') {
6629
+ throw new AppwriteException('Missing required parameter: "key"');
6254
6630
  }
6631
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
6632
+ const payload = {};
6255
6633
  const uri = new URL(this.client.config.endpoint + apiPath);
6256
6634
  const apiHeaders = {
6257
6635
  'content-type': 'application/json',
6258
6636
  };
6259
- return this.client.call('patch', uri, apiHeaders, payload);
6637
+ return this.client.call('delete', uri, apiHeaders, payload);
6260
6638
  }
6261
- deleteDocuments(paramsOrFirst, ...rest) {
6639
+ updateRelationshipAttribute(paramsOrFirst, ...rest) {
6262
6640
  let params;
6263
6641
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6264
6642
  params = (paramsOrFirst || {});
@@ -6267,35 +6645,40 @@ class Databases {
6267
6645
  params = {
6268
6646
  databaseId: paramsOrFirst,
6269
6647
  collectionId: rest[0],
6270
- queries: rest[1],
6271
- transactionId: rest[2]
6648
+ key: rest[1],
6649
+ onDelete: rest[2],
6650
+ newKey: rest[3]
6272
6651
  };
6273
6652
  }
6274
6653
  const databaseId = params.databaseId;
6275
6654
  const collectionId = params.collectionId;
6276
- const queries = params.queries;
6277
- const transactionId = params.transactionId;
6655
+ const key = params.key;
6656
+ const onDelete = params.onDelete;
6657
+ const newKey = params.newKey;
6278
6658
  if (typeof databaseId === 'undefined') {
6279
6659
  throw new AppwriteException('Missing required parameter: "databaseId"');
6280
6660
  }
6281
6661
  if (typeof collectionId === 'undefined') {
6282
6662
  throw new AppwriteException('Missing required parameter: "collectionId"');
6283
6663
  }
6284
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
6664
+ if (typeof key === 'undefined') {
6665
+ throw new AppwriteException('Missing required parameter: "key"');
6666
+ }
6667
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}/relationship'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
6285
6668
  const payload = {};
6286
- if (typeof queries !== 'undefined') {
6287
- payload['queries'] = queries;
6669
+ if (typeof onDelete !== 'undefined') {
6670
+ payload['onDelete'] = onDelete;
6288
6671
  }
6289
- if (typeof transactionId !== 'undefined') {
6290
- payload['transactionId'] = transactionId;
6672
+ if (typeof newKey !== 'undefined') {
6673
+ payload['newKey'] = newKey;
6291
6674
  }
6292
6675
  const uri = new URL(this.client.config.endpoint + apiPath);
6293
6676
  const apiHeaders = {
6294
6677
  'content-type': 'application/json',
6295
6678
  };
6296
- return this.client.call('delete', uri, apiHeaders, payload);
6679
+ return this.client.call('patch', uri, apiHeaders, payload);
6297
6680
  }
6298
- getDocument(paramsOrFirst, ...rest) {
6681
+ listDocuments(paramsOrFirst, ...rest) {
6299
6682
  let params;
6300
6683
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6301
6684
  params = (paramsOrFirst || {});
@@ -6304,26 +6687,23 @@ class Databases {
6304
6687
  params = {
6305
6688
  databaseId: paramsOrFirst,
6306
6689
  collectionId: rest[0],
6307
- documentId: rest[1],
6308
- queries: rest[2],
6309
- transactionId: rest[3]
6690
+ queries: rest[1],
6691
+ transactionId: rest[2],
6692
+ total: rest[3]
6310
6693
  };
6311
6694
  }
6312
6695
  const databaseId = params.databaseId;
6313
6696
  const collectionId = params.collectionId;
6314
- const documentId = params.documentId;
6315
6697
  const queries = params.queries;
6316
6698
  const transactionId = params.transactionId;
6699
+ const total = params.total;
6317
6700
  if (typeof databaseId === 'undefined') {
6318
6701
  throw new AppwriteException('Missing required parameter: "databaseId"');
6319
6702
  }
6320
6703
  if (typeof collectionId === 'undefined') {
6321
6704
  throw new AppwriteException('Missing required parameter: "collectionId"');
6322
6705
  }
6323
- if (typeof documentId === 'undefined') {
6324
- throw new AppwriteException('Missing required parameter: "documentId"');
6325
- }
6326
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{documentId}', documentId);
6706
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
6327
6707
  const payload = {};
6328
6708
  if (typeof queries !== 'undefined') {
6329
6709
  payload['queries'] = queries;
@@ -6331,11 +6711,266 @@ class Databases {
6331
6711
  if (typeof transactionId !== 'undefined') {
6332
6712
  payload['transactionId'] = transactionId;
6333
6713
  }
6714
+ if (typeof total !== 'undefined') {
6715
+ payload['total'] = total;
6716
+ }
6334
6717
  const uri = new URL(this.client.config.endpoint + apiPath);
6335
6718
  const apiHeaders = {};
6336
6719
  return this.client.call('get', uri, apiHeaders, payload);
6337
6720
  }
6338
- upsertDocument(paramsOrFirst, ...rest) {
6721
+ createDocument(paramsOrFirst, ...rest) {
6722
+ let params;
6723
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6724
+ params = (paramsOrFirst || {});
6725
+ }
6726
+ else {
6727
+ params = {
6728
+ databaseId: paramsOrFirst,
6729
+ collectionId: rest[0],
6730
+ documentId: rest[1],
6731
+ data: rest[2],
6732
+ permissions: rest[3],
6733
+ transactionId: rest[4]
6734
+ };
6735
+ }
6736
+ const databaseId = params.databaseId;
6737
+ const collectionId = params.collectionId;
6738
+ const documentId = params.documentId;
6739
+ const data = params.data;
6740
+ const permissions = params.permissions;
6741
+ const transactionId = params.transactionId;
6742
+ if (typeof databaseId === 'undefined') {
6743
+ throw new AppwriteException('Missing required parameter: "databaseId"');
6744
+ }
6745
+ if (typeof collectionId === 'undefined') {
6746
+ throw new AppwriteException('Missing required parameter: "collectionId"');
6747
+ }
6748
+ if (typeof documentId === 'undefined') {
6749
+ throw new AppwriteException('Missing required parameter: "documentId"');
6750
+ }
6751
+ if (typeof data === 'undefined') {
6752
+ throw new AppwriteException('Missing required parameter: "data"');
6753
+ }
6754
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
6755
+ const payload = {};
6756
+ if (typeof documentId !== 'undefined') {
6757
+ payload['documentId'] = documentId;
6758
+ }
6759
+ if (typeof data !== 'undefined') {
6760
+ payload['data'] = data;
6761
+ }
6762
+ if (typeof permissions !== 'undefined') {
6763
+ payload['permissions'] = permissions;
6764
+ }
6765
+ if (typeof transactionId !== 'undefined') {
6766
+ payload['transactionId'] = transactionId;
6767
+ }
6768
+ const uri = new URL(this.client.config.endpoint + apiPath);
6769
+ const apiHeaders = {
6770
+ 'content-type': 'application/json',
6771
+ };
6772
+ return this.client.call('post', uri, apiHeaders, payload);
6773
+ }
6774
+ createDocuments(paramsOrFirst, ...rest) {
6775
+ let params;
6776
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6777
+ params = (paramsOrFirst || {});
6778
+ }
6779
+ else {
6780
+ params = {
6781
+ databaseId: paramsOrFirst,
6782
+ collectionId: rest[0],
6783
+ documents: rest[1],
6784
+ transactionId: rest[2]
6785
+ };
6786
+ }
6787
+ const databaseId = params.databaseId;
6788
+ const collectionId = params.collectionId;
6789
+ const documents = params.documents;
6790
+ const transactionId = params.transactionId;
6791
+ if (typeof databaseId === 'undefined') {
6792
+ throw new AppwriteException('Missing required parameter: "databaseId"');
6793
+ }
6794
+ if (typeof collectionId === 'undefined') {
6795
+ throw new AppwriteException('Missing required parameter: "collectionId"');
6796
+ }
6797
+ if (typeof documents === 'undefined') {
6798
+ throw new AppwriteException('Missing required parameter: "documents"');
6799
+ }
6800
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
6801
+ const payload = {};
6802
+ if (typeof documents !== 'undefined') {
6803
+ payload['documents'] = documents;
6804
+ }
6805
+ if (typeof transactionId !== 'undefined') {
6806
+ payload['transactionId'] = transactionId;
6807
+ }
6808
+ const uri = new URL(this.client.config.endpoint + apiPath);
6809
+ const apiHeaders = {
6810
+ 'content-type': 'application/json',
6811
+ };
6812
+ return this.client.call('post', uri, apiHeaders, payload);
6813
+ }
6814
+ upsertDocuments(paramsOrFirst, ...rest) {
6815
+ let params;
6816
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6817
+ params = (paramsOrFirst || {});
6818
+ }
6819
+ else {
6820
+ params = {
6821
+ databaseId: paramsOrFirst,
6822
+ collectionId: rest[0],
6823
+ documents: rest[1],
6824
+ transactionId: rest[2]
6825
+ };
6826
+ }
6827
+ const databaseId = params.databaseId;
6828
+ const collectionId = params.collectionId;
6829
+ const documents = params.documents;
6830
+ const transactionId = params.transactionId;
6831
+ if (typeof databaseId === 'undefined') {
6832
+ throw new AppwriteException('Missing required parameter: "databaseId"');
6833
+ }
6834
+ if (typeof collectionId === 'undefined') {
6835
+ throw new AppwriteException('Missing required parameter: "collectionId"');
6836
+ }
6837
+ if (typeof documents === 'undefined') {
6838
+ throw new AppwriteException('Missing required parameter: "documents"');
6839
+ }
6840
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
6841
+ const payload = {};
6842
+ if (typeof documents !== 'undefined') {
6843
+ payload['documents'] = documents;
6844
+ }
6845
+ if (typeof transactionId !== 'undefined') {
6846
+ payload['transactionId'] = transactionId;
6847
+ }
6848
+ const uri = new URL(this.client.config.endpoint + apiPath);
6849
+ const apiHeaders = {
6850
+ 'content-type': 'application/json',
6851
+ };
6852
+ return this.client.call('put', uri, apiHeaders, payload);
6853
+ }
6854
+ updateDocuments(paramsOrFirst, ...rest) {
6855
+ let params;
6856
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6857
+ params = (paramsOrFirst || {});
6858
+ }
6859
+ else {
6860
+ params = {
6861
+ databaseId: paramsOrFirst,
6862
+ collectionId: rest[0],
6863
+ data: rest[1],
6864
+ queries: rest[2],
6865
+ transactionId: rest[3]
6866
+ };
6867
+ }
6868
+ const databaseId = params.databaseId;
6869
+ const collectionId = params.collectionId;
6870
+ const data = params.data;
6871
+ const queries = params.queries;
6872
+ const transactionId = params.transactionId;
6873
+ if (typeof databaseId === 'undefined') {
6874
+ throw new AppwriteException('Missing required parameter: "databaseId"');
6875
+ }
6876
+ if (typeof collectionId === 'undefined') {
6877
+ throw new AppwriteException('Missing required parameter: "collectionId"');
6878
+ }
6879
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
6880
+ const payload = {};
6881
+ if (typeof data !== 'undefined') {
6882
+ payload['data'] = data;
6883
+ }
6884
+ if (typeof queries !== 'undefined') {
6885
+ payload['queries'] = queries;
6886
+ }
6887
+ if (typeof transactionId !== 'undefined') {
6888
+ payload['transactionId'] = transactionId;
6889
+ }
6890
+ const uri = new URL(this.client.config.endpoint + apiPath);
6891
+ const apiHeaders = {
6892
+ 'content-type': 'application/json',
6893
+ };
6894
+ return this.client.call('patch', uri, apiHeaders, payload);
6895
+ }
6896
+ deleteDocuments(paramsOrFirst, ...rest) {
6897
+ let params;
6898
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6899
+ params = (paramsOrFirst || {});
6900
+ }
6901
+ else {
6902
+ params = {
6903
+ databaseId: paramsOrFirst,
6904
+ collectionId: rest[0],
6905
+ queries: rest[1],
6906
+ transactionId: rest[2]
6907
+ };
6908
+ }
6909
+ const databaseId = params.databaseId;
6910
+ const collectionId = params.collectionId;
6911
+ const queries = params.queries;
6912
+ const transactionId = params.transactionId;
6913
+ if (typeof databaseId === 'undefined') {
6914
+ throw new AppwriteException('Missing required parameter: "databaseId"');
6915
+ }
6916
+ if (typeof collectionId === 'undefined') {
6917
+ throw new AppwriteException('Missing required parameter: "collectionId"');
6918
+ }
6919
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
6920
+ const payload = {};
6921
+ if (typeof queries !== 'undefined') {
6922
+ payload['queries'] = queries;
6923
+ }
6924
+ if (typeof transactionId !== 'undefined') {
6925
+ payload['transactionId'] = transactionId;
6926
+ }
6927
+ const uri = new URL(this.client.config.endpoint + apiPath);
6928
+ const apiHeaders = {
6929
+ 'content-type': 'application/json',
6930
+ };
6931
+ return this.client.call('delete', uri, apiHeaders, payload);
6932
+ }
6933
+ getDocument(paramsOrFirst, ...rest) {
6934
+ let params;
6935
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6936
+ params = (paramsOrFirst || {});
6937
+ }
6938
+ else {
6939
+ params = {
6940
+ databaseId: paramsOrFirst,
6941
+ collectionId: rest[0],
6942
+ documentId: rest[1],
6943
+ queries: rest[2],
6944
+ transactionId: rest[3]
6945
+ };
6946
+ }
6947
+ const databaseId = params.databaseId;
6948
+ const collectionId = params.collectionId;
6949
+ const documentId = params.documentId;
6950
+ const queries = params.queries;
6951
+ const transactionId = params.transactionId;
6952
+ if (typeof databaseId === 'undefined') {
6953
+ throw new AppwriteException('Missing required parameter: "databaseId"');
6954
+ }
6955
+ if (typeof collectionId === 'undefined') {
6956
+ throw new AppwriteException('Missing required parameter: "collectionId"');
6957
+ }
6958
+ if (typeof documentId === 'undefined') {
6959
+ throw new AppwriteException('Missing required parameter: "documentId"');
6960
+ }
6961
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{documentId}', documentId);
6962
+ const payload = {};
6963
+ if (typeof queries !== 'undefined') {
6964
+ payload['queries'] = queries;
6965
+ }
6966
+ if (typeof transactionId !== 'undefined') {
6967
+ payload['transactionId'] = transactionId;
6968
+ }
6969
+ const uri = new URL(this.client.config.endpoint + apiPath);
6970
+ const apiHeaders = {};
6971
+ return this.client.call('get', uri, apiHeaders, payload);
6972
+ }
6973
+ upsertDocument(paramsOrFirst, ...rest) {
6339
6974
  let params;
6340
6975
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6341
6976
  params = (paramsOrFirst || {});
@@ -8769,7 +9404,7 @@ class Functions {
8769
9404
  }
8770
9405
  listTemplates(paramsOrFirst, ...rest) {
8771
9406
  let params;
8772
- if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
9407
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'runtimes' in paramsOrFirst)) {
8773
9408
  params = (paramsOrFirst || {});
8774
9409
  }
8775
9410
  else {
@@ -13242,7 +13877,7 @@ class Migrations {
13242
13877
  }
13243
13878
  createAppwriteMigration(paramsOrFirst, ...rest) {
13244
13879
  let params;
13245
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
13880
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'resources' in paramsOrFirst)) {
13246
13881
  params = (paramsOrFirst || {});
13247
13882
  }
13248
13883
  else {
@@ -13291,7 +13926,7 @@ class Migrations {
13291
13926
  }
13292
13927
  getAppwriteReport(paramsOrFirst, ...rest) {
13293
13928
  let params;
13294
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
13929
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'resources' in paramsOrFirst)) {
13295
13930
  params = (paramsOrFirst || {});
13296
13931
  }
13297
13932
  else {
@@ -13452,7 +14087,7 @@ class Migrations {
13452
14087
  }
13453
14088
  createFirebaseMigration(paramsOrFirst, ...rest) {
13454
14089
  let params;
13455
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
14090
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'resources' in paramsOrFirst)) {
13456
14091
  params = (paramsOrFirst || {});
13457
14092
  }
13458
14093
  else {
@@ -13485,7 +14120,7 @@ class Migrations {
13485
14120
  }
13486
14121
  getFirebaseReport(paramsOrFirst, ...rest) {
13487
14122
  let params;
13488
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
14123
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'resources' in paramsOrFirst)) {
13489
14124
  params = (paramsOrFirst || {});
13490
14125
  }
13491
14126
  else {
@@ -13516,7 +14151,7 @@ class Migrations {
13516
14151
  }
13517
14152
  createNHostMigration(paramsOrFirst, ...rest) {
13518
14153
  let params;
13519
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
14154
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'resources' in paramsOrFirst)) {
13520
14155
  params = (paramsOrFirst || {});
13521
14156
  }
13522
14157
  else {
@@ -13594,7 +14229,7 @@ class Migrations {
13594
14229
  }
13595
14230
  getNHostReport(paramsOrFirst, ...rest) {
13596
14231
  let params;
13597
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
14232
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'resources' in paramsOrFirst)) {
13598
14233
  params = (paramsOrFirst || {});
13599
14234
  }
13600
14235
  else {
@@ -13670,7 +14305,7 @@ class Migrations {
13670
14305
  }
13671
14306
  createSupabaseMigration(paramsOrFirst, ...rest) {
13672
14307
  let params;
13673
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
14308
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'resources' in paramsOrFirst)) {
13674
14309
  params = (paramsOrFirst || {});
13675
14310
  }
13676
14311
  else {
@@ -13740,7 +14375,7 @@ class Migrations {
13740
14375
  }
13741
14376
  getSupabaseReport(paramsOrFirst, ...rest) {
13742
14377
  let params;
13743
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
14378
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'resources' in paramsOrFirst)) {
13744
14379
  params = (paramsOrFirst || {});
13745
14380
  }
13746
14381
  else {
@@ -13979,7 +14614,7 @@ class Organizations {
13979
14614
  }
13980
14615
  estimationCreateOrganization(paramsOrFirst, ...rest) {
13981
14616
  let params;
13982
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'billingPlan' in paramsOrFirst)) {
14617
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
13983
14618
  params = (paramsOrFirst || {});
13984
14619
  }
13985
14620
  else {
@@ -14624,6 +15259,174 @@ class Organizations {
14624
15259
  const apiHeaders = {};
14625
15260
  return this.client.call('get', uri, apiHeaders, payload);
14626
15261
  }
15262
+ listKeys(paramsOrFirst, ...rest) {
15263
+ let params;
15264
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
15265
+ params = (paramsOrFirst || {});
15266
+ }
15267
+ else {
15268
+ params = {
15269
+ organizationId: paramsOrFirst,
15270
+ total: rest[0]
15271
+ };
15272
+ }
15273
+ const organizationId = params.organizationId;
15274
+ const total = params.total;
15275
+ if (typeof organizationId === 'undefined') {
15276
+ throw new AppwriteException('Missing required parameter: "organizationId"');
15277
+ }
15278
+ const apiPath = '/organizations/{organizationId}/keys'.replace('{organizationId}', organizationId);
15279
+ const payload = {};
15280
+ if (typeof total !== 'undefined') {
15281
+ payload['total'] = total;
15282
+ }
15283
+ const uri = new URL(this.client.config.endpoint + apiPath);
15284
+ const apiHeaders = {};
15285
+ return this.client.call('get', uri, apiHeaders, payload);
15286
+ }
15287
+ createKey(paramsOrFirst, ...rest) {
15288
+ let params;
15289
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
15290
+ params = (paramsOrFirst || {});
15291
+ }
15292
+ else {
15293
+ params = {
15294
+ organizationId: paramsOrFirst,
15295
+ name: rest[0],
15296
+ scopes: rest[1],
15297
+ expire: rest[2]
15298
+ };
15299
+ }
15300
+ const organizationId = params.organizationId;
15301
+ const name = params.name;
15302
+ const scopes = params.scopes;
15303
+ const expire = params.expire;
15304
+ if (typeof organizationId === 'undefined') {
15305
+ throw new AppwriteException('Missing required parameter: "organizationId"');
15306
+ }
15307
+ if (typeof name === 'undefined') {
15308
+ throw new AppwriteException('Missing required parameter: "name"');
15309
+ }
15310
+ if (typeof scopes === 'undefined') {
15311
+ throw new AppwriteException('Missing required parameter: "scopes"');
15312
+ }
15313
+ const apiPath = '/organizations/{organizationId}/keys'.replace('{organizationId}', organizationId);
15314
+ const payload = {};
15315
+ if (typeof name !== 'undefined') {
15316
+ payload['name'] = name;
15317
+ }
15318
+ if (typeof scopes !== 'undefined') {
15319
+ payload['scopes'] = scopes;
15320
+ }
15321
+ if (typeof expire !== 'undefined') {
15322
+ payload['expire'] = expire;
15323
+ }
15324
+ const uri = new URL(this.client.config.endpoint + apiPath);
15325
+ const apiHeaders = {
15326
+ 'content-type': 'application/json',
15327
+ };
15328
+ return this.client.call('post', uri, apiHeaders, payload);
15329
+ }
15330
+ getKey(paramsOrFirst, ...rest) {
15331
+ let params;
15332
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
15333
+ params = (paramsOrFirst || {});
15334
+ }
15335
+ else {
15336
+ params = {
15337
+ organizationId: paramsOrFirst,
15338
+ keyId: rest[0]
15339
+ };
15340
+ }
15341
+ const organizationId = params.organizationId;
15342
+ const keyId = params.keyId;
15343
+ if (typeof organizationId === 'undefined') {
15344
+ throw new AppwriteException('Missing required parameter: "organizationId"');
15345
+ }
15346
+ if (typeof keyId === 'undefined') {
15347
+ throw new AppwriteException('Missing required parameter: "keyId"');
15348
+ }
15349
+ const apiPath = '/organizations/{organizationId}/keys/{keyId}'.replace('{organizationId}', organizationId).replace('{keyId}', keyId);
15350
+ const payload = {};
15351
+ const uri = new URL(this.client.config.endpoint + apiPath);
15352
+ const apiHeaders = {};
15353
+ return this.client.call('get', uri, apiHeaders, payload);
15354
+ }
15355
+ updateKey(paramsOrFirst, ...rest) {
15356
+ let params;
15357
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
15358
+ params = (paramsOrFirst || {});
15359
+ }
15360
+ else {
15361
+ params = {
15362
+ organizationId: paramsOrFirst,
15363
+ keyId: rest[0],
15364
+ name: rest[1],
15365
+ scopes: rest[2],
15366
+ expire: rest[3]
15367
+ };
15368
+ }
15369
+ const organizationId = params.organizationId;
15370
+ const keyId = params.keyId;
15371
+ const name = params.name;
15372
+ const scopes = params.scopes;
15373
+ const expire = params.expire;
15374
+ if (typeof organizationId === 'undefined') {
15375
+ throw new AppwriteException('Missing required parameter: "organizationId"');
15376
+ }
15377
+ if (typeof keyId === 'undefined') {
15378
+ throw new AppwriteException('Missing required parameter: "keyId"');
15379
+ }
15380
+ if (typeof name === 'undefined') {
15381
+ throw new AppwriteException('Missing required parameter: "name"');
15382
+ }
15383
+ if (typeof scopes === 'undefined') {
15384
+ throw new AppwriteException('Missing required parameter: "scopes"');
15385
+ }
15386
+ const apiPath = '/organizations/{organizationId}/keys/{keyId}'.replace('{organizationId}', organizationId).replace('{keyId}', keyId);
15387
+ const payload = {};
15388
+ if (typeof name !== 'undefined') {
15389
+ payload['name'] = name;
15390
+ }
15391
+ if (typeof scopes !== 'undefined') {
15392
+ payload['scopes'] = scopes;
15393
+ }
15394
+ if (typeof expire !== 'undefined') {
15395
+ payload['expire'] = expire;
15396
+ }
15397
+ const uri = new URL(this.client.config.endpoint + apiPath);
15398
+ const apiHeaders = {
15399
+ 'content-type': 'application/json',
15400
+ };
15401
+ return this.client.call('put', uri, apiHeaders, payload);
15402
+ }
15403
+ deleteKey(paramsOrFirst, ...rest) {
15404
+ let params;
15405
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
15406
+ params = (paramsOrFirst || {});
15407
+ }
15408
+ else {
15409
+ params = {
15410
+ organizationId: paramsOrFirst,
15411
+ keyId: rest[0]
15412
+ };
15413
+ }
15414
+ const organizationId = params.organizationId;
15415
+ const keyId = params.keyId;
15416
+ if (typeof organizationId === 'undefined') {
15417
+ throw new AppwriteException('Missing required parameter: "organizationId"');
15418
+ }
15419
+ if (typeof keyId === 'undefined') {
15420
+ throw new AppwriteException('Missing required parameter: "keyId"');
15421
+ }
15422
+ const apiPath = '/organizations/{organizationId}/keys/{keyId}'.replace('{organizationId}', organizationId).replace('{keyId}', keyId);
15423
+ const payload = {};
15424
+ const uri = new URL(this.client.config.endpoint + apiPath);
15425
+ const apiHeaders = {
15426
+ 'content-type': 'application/json',
15427
+ };
15428
+ return this.client.call('delete', uri, apiHeaders, payload);
15429
+ }
14627
15430
  setDefaultPaymentMethod(paramsOrFirst, ...rest) {
14628
15431
  let params;
14629
15432
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
@@ -14882,6 +15685,26 @@ class Organizations {
14882
15685
  };
14883
15686
  return this.client.call('patch', uri, apiHeaders, payload);
14884
15687
  }
15688
+ listRegions(paramsOrFirst) {
15689
+ let params;
15690
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
15691
+ params = (paramsOrFirst || {});
15692
+ }
15693
+ else {
15694
+ params = {
15695
+ organizationId: paramsOrFirst
15696
+ };
15697
+ }
15698
+ const organizationId = params.organizationId;
15699
+ if (typeof organizationId === 'undefined') {
15700
+ throw new AppwriteException('Missing required parameter: "organizationId"');
15701
+ }
15702
+ const apiPath = '/organizations/{organizationId}/regions'.replace('{organizationId}', organizationId);
15703
+ const payload = {};
15704
+ const uri = new URL(this.client.config.endpoint + apiPath);
15705
+ const apiHeaders = {};
15706
+ return this.client.call('get', uri, apiHeaders, payload);
15707
+ }
14885
15708
  getScopes(paramsOrFirst) {
14886
15709
  let params;
14887
15710
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
@@ -17954,7 +18777,7 @@ class Sites {
17954
18777
  }
17955
18778
  listTemplates(paramsOrFirst, ...rest) {
17956
18779
  let params;
17957
- if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
18780
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'frameworks' in paramsOrFirst)) {
17958
18781
  params = (paramsOrFirst || {});
17959
18782
  }
17960
18783
  else {
@@ -19697,9 +20520,6 @@ class TablesDB {
19697
20520
  if (typeof databaseId === 'undefined') {
19698
20521
  throw new AppwriteException('Missing required parameter: "databaseId"');
19699
20522
  }
19700
- if (typeof name === 'undefined') {
19701
- throw new AppwriteException('Missing required parameter: "name"');
19702
- }
19703
20523
  const apiPath = '/tablesdb/{databaseId}'.replace('{databaseId}', databaseId);
19704
20524
  const payload = {};
19705
20525
  if (typeof name !== 'undefined') {
@@ -19886,9 +20706,6 @@ class TablesDB {
19886
20706
  if (typeof tableId === 'undefined') {
19887
20707
  throw new AppwriteException('Missing required parameter: "tableId"');
19888
20708
  }
19889
- if (typeof name === 'undefined') {
19890
- throw new AppwriteException('Missing required parameter: "name"');
19891
- }
19892
20709
  const apiPath = '/tablesdb/{databaseId}/tables/{tableId}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
19893
20710
  const payload = {};
19894
20711
  if (typeof name !== 'undefined') {
@@ -19971,7 +20788,447 @@ class TablesDB {
19971
20788
  const apiHeaders = {};
19972
20789
  return this.client.call('get', uri, apiHeaders, payload);
19973
20790
  }
19974
- createBooleanColumn(paramsOrFirst, ...rest) {
20791
+ createBooleanColumn(paramsOrFirst, ...rest) {
20792
+ let params;
20793
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20794
+ params = (paramsOrFirst || {});
20795
+ }
20796
+ else {
20797
+ params = {
20798
+ databaseId: paramsOrFirst,
20799
+ tableId: rest[0],
20800
+ key: rest[1],
20801
+ required: rest[2],
20802
+ xdefault: rest[3],
20803
+ array: rest[4]
20804
+ };
20805
+ }
20806
+ const databaseId = params.databaseId;
20807
+ const tableId = params.tableId;
20808
+ const key = params.key;
20809
+ const required = params.required;
20810
+ const xdefault = params.xdefault;
20811
+ const array = params.array;
20812
+ if (typeof databaseId === 'undefined') {
20813
+ throw new AppwriteException('Missing required parameter: "databaseId"');
20814
+ }
20815
+ if (typeof tableId === 'undefined') {
20816
+ throw new AppwriteException('Missing required parameter: "tableId"');
20817
+ }
20818
+ if (typeof key === 'undefined') {
20819
+ throw new AppwriteException('Missing required parameter: "key"');
20820
+ }
20821
+ if (typeof required === 'undefined') {
20822
+ throw new AppwriteException('Missing required parameter: "required"');
20823
+ }
20824
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/boolean'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
20825
+ const payload = {};
20826
+ if (typeof key !== 'undefined') {
20827
+ payload['key'] = key;
20828
+ }
20829
+ if (typeof required !== 'undefined') {
20830
+ payload['required'] = required;
20831
+ }
20832
+ if (typeof xdefault !== 'undefined') {
20833
+ payload['default'] = xdefault;
20834
+ }
20835
+ if (typeof array !== 'undefined') {
20836
+ payload['array'] = array;
20837
+ }
20838
+ const uri = new URL(this.client.config.endpoint + apiPath);
20839
+ const apiHeaders = {
20840
+ 'content-type': 'application/json',
20841
+ };
20842
+ return this.client.call('post', uri, apiHeaders, payload);
20843
+ }
20844
+ updateBooleanColumn(paramsOrFirst, ...rest) {
20845
+ let params;
20846
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20847
+ params = (paramsOrFirst || {});
20848
+ }
20849
+ else {
20850
+ params = {
20851
+ databaseId: paramsOrFirst,
20852
+ tableId: rest[0],
20853
+ key: rest[1],
20854
+ required: rest[2],
20855
+ xdefault: rest[3],
20856
+ newKey: rest[4]
20857
+ };
20858
+ }
20859
+ const databaseId = params.databaseId;
20860
+ const tableId = params.tableId;
20861
+ const key = params.key;
20862
+ const required = params.required;
20863
+ const xdefault = params.xdefault;
20864
+ const newKey = params.newKey;
20865
+ if (typeof databaseId === 'undefined') {
20866
+ throw new AppwriteException('Missing required parameter: "databaseId"');
20867
+ }
20868
+ if (typeof tableId === 'undefined') {
20869
+ throw new AppwriteException('Missing required parameter: "tableId"');
20870
+ }
20871
+ if (typeof key === 'undefined') {
20872
+ throw new AppwriteException('Missing required parameter: "key"');
20873
+ }
20874
+ if (typeof required === 'undefined') {
20875
+ throw new AppwriteException('Missing required parameter: "required"');
20876
+ }
20877
+ if (typeof xdefault === 'undefined') {
20878
+ throw new AppwriteException('Missing required parameter: "xdefault"');
20879
+ }
20880
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/boolean/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
20881
+ const payload = {};
20882
+ if (typeof required !== 'undefined') {
20883
+ payload['required'] = required;
20884
+ }
20885
+ if (typeof xdefault !== 'undefined') {
20886
+ payload['default'] = xdefault;
20887
+ }
20888
+ if (typeof newKey !== 'undefined') {
20889
+ payload['newKey'] = newKey;
20890
+ }
20891
+ const uri = new URL(this.client.config.endpoint + apiPath);
20892
+ const apiHeaders = {
20893
+ 'content-type': 'application/json',
20894
+ };
20895
+ return this.client.call('patch', uri, apiHeaders, payload);
20896
+ }
20897
+ createDatetimeColumn(paramsOrFirst, ...rest) {
20898
+ let params;
20899
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20900
+ params = (paramsOrFirst || {});
20901
+ }
20902
+ else {
20903
+ params = {
20904
+ databaseId: paramsOrFirst,
20905
+ tableId: rest[0],
20906
+ key: rest[1],
20907
+ required: rest[2],
20908
+ xdefault: rest[3],
20909
+ array: rest[4]
20910
+ };
20911
+ }
20912
+ const databaseId = params.databaseId;
20913
+ const tableId = params.tableId;
20914
+ const key = params.key;
20915
+ const required = params.required;
20916
+ const xdefault = params.xdefault;
20917
+ const array = params.array;
20918
+ if (typeof databaseId === 'undefined') {
20919
+ throw new AppwriteException('Missing required parameter: "databaseId"');
20920
+ }
20921
+ if (typeof tableId === 'undefined') {
20922
+ throw new AppwriteException('Missing required parameter: "tableId"');
20923
+ }
20924
+ if (typeof key === 'undefined') {
20925
+ throw new AppwriteException('Missing required parameter: "key"');
20926
+ }
20927
+ if (typeof required === 'undefined') {
20928
+ throw new AppwriteException('Missing required parameter: "required"');
20929
+ }
20930
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/datetime'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
20931
+ const payload = {};
20932
+ if (typeof key !== 'undefined') {
20933
+ payload['key'] = key;
20934
+ }
20935
+ if (typeof required !== 'undefined') {
20936
+ payload['required'] = required;
20937
+ }
20938
+ if (typeof xdefault !== 'undefined') {
20939
+ payload['default'] = xdefault;
20940
+ }
20941
+ if (typeof array !== 'undefined') {
20942
+ payload['array'] = array;
20943
+ }
20944
+ const uri = new URL(this.client.config.endpoint + apiPath);
20945
+ const apiHeaders = {
20946
+ 'content-type': 'application/json',
20947
+ };
20948
+ return this.client.call('post', uri, apiHeaders, payload);
20949
+ }
20950
+ updateDatetimeColumn(paramsOrFirst, ...rest) {
20951
+ let params;
20952
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20953
+ params = (paramsOrFirst || {});
20954
+ }
20955
+ else {
20956
+ params = {
20957
+ databaseId: paramsOrFirst,
20958
+ tableId: rest[0],
20959
+ key: rest[1],
20960
+ required: rest[2],
20961
+ xdefault: rest[3],
20962
+ newKey: rest[4]
20963
+ };
20964
+ }
20965
+ const databaseId = params.databaseId;
20966
+ const tableId = params.tableId;
20967
+ const key = params.key;
20968
+ const required = params.required;
20969
+ const xdefault = params.xdefault;
20970
+ const newKey = params.newKey;
20971
+ if (typeof databaseId === 'undefined') {
20972
+ throw new AppwriteException('Missing required parameter: "databaseId"');
20973
+ }
20974
+ if (typeof tableId === 'undefined') {
20975
+ throw new AppwriteException('Missing required parameter: "tableId"');
20976
+ }
20977
+ if (typeof key === 'undefined') {
20978
+ throw new AppwriteException('Missing required parameter: "key"');
20979
+ }
20980
+ if (typeof required === 'undefined') {
20981
+ throw new AppwriteException('Missing required parameter: "required"');
20982
+ }
20983
+ if (typeof xdefault === 'undefined') {
20984
+ throw new AppwriteException('Missing required parameter: "xdefault"');
20985
+ }
20986
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/datetime/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
20987
+ const payload = {};
20988
+ if (typeof required !== 'undefined') {
20989
+ payload['required'] = required;
20990
+ }
20991
+ if (typeof xdefault !== 'undefined') {
20992
+ payload['default'] = xdefault;
20993
+ }
20994
+ if (typeof newKey !== 'undefined') {
20995
+ payload['newKey'] = newKey;
20996
+ }
20997
+ const uri = new URL(this.client.config.endpoint + apiPath);
20998
+ const apiHeaders = {
20999
+ 'content-type': 'application/json',
21000
+ };
21001
+ return this.client.call('patch', uri, apiHeaders, payload);
21002
+ }
21003
+ createEmailColumn(paramsOrFirst, ...rest) {
21004
+ let params;
21005
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
21006
+ params = (paramsOrFirst || {});
21007
+ }
21008
+ else {
21009
+ params = {
21010
+ databaseId: paramsOrFirst,
21011
+ tableId: rest[0],
21012
+ key: rest[1],
21013
+ required: rest[2],
21014
+ xdefault: rest[3],
21015
+ array: rest[4]
21016
+ };
21017
+ }
21018
+ const databaseId = params.databaseId;
21019
+ const tableId = params.tableId;
21020
+ const key = params.key;
21021
+ const required = params.required;
21022
+ const xdefault = params.xdefault;
21023
+ const array = params.array;
21024
+ if (typeof databaseId === 'undefined') {
21025
+ throw new AppwriteException('Missing required parameter: "databaseId"');
21026
+ }
21027
+ if (typeof tableId === 'undefined') {
21028
+ throw new AppwriteException('Missing required parameter: "tableId"');
21029
+ }
21030
+ if (typeof key === 'undefined') {
21031
+ throw new AppwriteException('Missing required parameter: "key"');
21032
+ }
21033
+ if (typeof required === 'undefined') {
21034
+ throw new AppwriteException('Missing required parameter: "required"');
21035
+ }
21036
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/email'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
21037
+ const payload = {};
21038
+ if (typeof key !== 'undefined') {
21039
+ payload['key'] = key;
21040
+ }
21041
+ if (typeof required !== 'undefined') {
21042
+ payload['required'] = required;
21043
+ }
21044
+ if (typeof xdefault !== 'undefined') {
21045
+ payload['default'] = xdefault;
21046
+ }
21047
+ if (typeof array !== 'undefined') {
21048
+ payload['array'] = array;
21049
+ }
21050
+ const uri = new URL(this.client.config.endpoint + apiPath);
21051
+ const apiHeaders = {
21052
+ 'content-type': 'application/json',
21053
+ };
21054
+ return this.client.call('post', uri, apiHeaders, payload);
21055
+ }
21056
+ updateEmailColumn(paramsOrFirst, ...rest) {
21057
+ let params;
21058
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
21059
+ params = (paramsOrFirst || {});
21060
+ }
21061
+ else {
21062
+ params = {
21063
+ databaseId: paramsOrFirst,
21064
+ tableId: rest[0],
21065
+ key: rest[1],
21066
+ required: rest[2],
21067
+ xdefault: rest[3],
21068
+ newKey: rest[4]
21069
+ };
21070
+ }
21071
+ const databaseId = params.databaseId;
21072
+ const tableId = params.tableId;
21073
+ const key = params.key;
21074
+ const required = params.required;
21075
+ const xdefault = params.xdefault;
21076
+ const newKey = params.newKey;
21077
+ if (typeof databaseId === 'undefined') {
21078
+ throw new AppwriteException('Missing required parameter: "databaseId"');
21079
+ }
21080
+ if (typeof tableId === 'undefined') {
21081
+ throw new AppwriteException('Missing required parameter: "tableId"');
21082
+ }
21083
+ if (typeof key === 'undefined') {
21084
+ throw new AppwriteException('Missing required parameter: "key"');
21085
+ }
21086
+ if (typeof required === 'undefined') {
21087
+ throw new AppwriteException('Missing required parameter: "required"');
21088
+ }
21089
+ if (typeof xdefault === 'undefined') {
21090
+ throw new AppwriteException('Missing required parameter: "xdefault"');
21091
+ }
21092
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/email/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
21093
+ const payload = {};
21094
+ if (typeof required !== 'undefined') {
21095
+ payload['required'] = required;
21096
+ }
21097
+ if (typeof xdefault !== 'undefined') {
21098
+ payload['default'] = xdefault;
21099
+ }
21100
+ if (typeof newKey !== 'undefined') {
21101
+ payload['newKey'] = newKey;
21102
+ }
21103
+ const uri = new URL(this.client.config.endpoint + apiPath);
21104
+ const apiHeaders = {
21105
+ 'content-type': 'application/json',
21106
+ };
21107
+ return this.client.call('patch', uri, apiHeaders, payload);
21108
+ }
21109
+ createEnumColumn(paramsOrFirst, ...rest) {
21110
+ let params;
21111
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
21112
+ params = (paramsOrFirst || {});
21113
+ }
21114
+ else {
21115
+ params = {
21116
+ databaseId: paramsOrFirst,
21117
+ tableId: rest[0],
21118
+ key: rest[1],
21119
+ elements: rest[2],
21120
+ required: rest[3],
21121
+ xdefault: rest[4],
21122
+ array: rest[5]
21123
+ };
21124
+ }
21125
+ const databaseId = params.databaseId;
21126
+ const tableId = params.tableId;
21127
+ const key = params.key;
21128
+ const elements = params.elements;
21129
+ const required = params.required;
21130
+ const xdefault = params.xdefault;
21131
+ const array = params.array;
21132
+ if (typeof databaseId === 'undefined') {
21133
+ throw new AppwriteException('Missing required parameter: "databaseId"');
21134
+ }
21135
+ if (typeof tableId === 'undefined') {
21136
+ throw new AppwriteException('Missing required parameter: "tableId"');
21137
+ }
21138
+ if (typeof key === 'undefined') {
21139
+ throw new AppwriteException('Missing required parameter: "key"');
21140
+ }
21141
+ if (typeof elements === 'undefined') {
21142
+ throw new AppwriteException('Missing required parameter: "elements"');
21143
+ }
21144
+ if (typeof required === 'undefined') {
21145
+ throw new AppwriteException('Missing required parameter: "required"');
21146
+ }
21147
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/enum'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
21148
+ const payload = {};
21149
+ if (typeof key !== 'undefined') {
21150
+ payload['key'] = key;
21151
+ }
21152
+ if (typeof elements !== 'undefined') {
21153
+ payload['elements'] = elements;
21154
+ }
21155
+ if (typeof required !== 'undefined') {
21156
+ payload['required'] = required;
21157
+ }
21158
+ if (typeof xdefault !== 'undefined') {
21159
+ payload['default'] = xdefault;
21160
+ }
21161
+ if (typeof array !== 'undefined') {
21162
+ payload['array'] = array;
21163
+ }
21164
+ const uri = new URL(this.client.config.endpoint + apiPath);
21165
+ const apiHeaders = {
21166
+ 'content-type': 'application/json',
21167
+ };
21168
+ return this.client.call('post', uri, apiHeaders, payload);
21169
+ }
21170
+ updateEnumColumn(paramsOrFirst, ...rest) {
21171
+ let params;
21172
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
21173
+ params = (paramsOrFirst || {});
21174
+ }
21175
+ else {
21176
+ params = {
21177
+ databaseId: paramsOrFirst,
21178
+ tableId: rest[0],
21179
+ key: rest[1],
21180
+ elements: rest[2],
21181
+ required: rest[3],
21182
+ xdefault: rest[4],
21183
+ newKey: rest[5]
21184
+ };
21185
+ }
21186
+ const databaseId = params.databaseId;
21187
+ const tableId = params.tableId;
21188
+ const key = params.key;
21189
+ const elements = params.elements;
21190
+ const required = params.required;
21191
+ const xdefault = params.xdefault;
21192
+ const newKey = params.newKey;
21193
+ if (typeof databaseId === 'undefined') {
21194
+ throw new AppwriteException('Missing required parameter: "databaseId"');
21195
+ }
21196
+ if (typeof tableId === 'undefined') {
21197
+ throw new AppwriteException('Missing required parameter: "tableId"');
21198
+ }
21199
+ if (typeof key === 'undefined') {
21200
+ throw new AppwriteException('Missing required parameter: "key"');
21201
+ }
21202
+ if (typeof elements === 'undefined') {
21203
+ throw new AppwriteException('Missing required parameter: "elements"');
21204
+ }
21205
+ if (typeof required === 'undefined') {
21206
+ throw new AppwriteException('Missing required parameter: "required"');
21207
+ }
21208
+ if (typeof xdefault === 'undefined') {
21209
+ throw new AppwriteException('Missing required parameter: "xdefault"');
21210
+ }
21211
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/enum/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
21212
+ const payload = {};
21213
+ if (typeof elements !== 'undefined') {
21214
+ payload['elements'] = elements;
21215
+ }
21216
+ if (typeof required !== 'undefined') {
21217
+ payload['required'] = required;
21218
+ }
21219
+ if (typeof xdefault !== 'undefined') {
21220
+ payload['default'] = xdefault;
21221
+ }
21222
+ if (typeof newKey !== 'undefined') {
21223
+ payload['newKey'] = newKey;
21224
+ }
21225
+ const uri = new URL(this.client.config.endpoint + apiPath);
21226
+ const apiHeaders = {
21227
+ 'content-type': 'application/json',
21228
+ };
21229
+ return this.client.call('patch', uri, apiHeaders, payload);
21230
+ }
21231
+ createFloatColumn(paramsOrFirst, ...rest) {
19975
21232
  let params;
19976
21233
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
19977
21234
  params = (paramsOrFirst || {});
@@ -19982,14 +21239,18 @@ class TablesDB {
19982
21239
  tableId: rest[0],
19983
21240
  key: rest[1],
19984
21241
  required: rest[2],
19985
- xdefault: rest[3],
19986
- array: rest[4]
21242
+ min: rest[3],
21243
+ max: rest[4],
21244
+ xdefault: rest[5],
21245
+ array: rest[6]
19987
21246
  };
19988
21247
  }
19989
21248
  const databaseId = params.databaseId;
19990
21249
  const tableId = params.tableId;
19991
21250
  const key = params.key;
19992
21251
  const required = params.required;
21252
+ const min = params.min;
21253
+ const max = params.max;
19993
21254
  const xdefault = params.xdefault;
19994
21255
  const array = params.array;
19995
21256
  if (typeof databaseId === 'undefined') {
@@ -20004,7 +21265,7 @@ class TablesDB {
20004
21265
  if (typeof required === 'undefined') {
20005
21266
  throw new AppwriteException('Missing required parameter: "required"');
20006
21267
  }
20007
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/boolean'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
21268
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/float'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
20008
21269
  const payload = {};
20009
21270
  if (typeof key !== 'undefined') {
20010
21271
  payload['key'] = key;
@@ -20012,6 +21273,12 @@ class TablesDB {
20012
21273
  if (typeof required !== 'undefined') {
20013
21274
  payload['required'] = required;
20014
21275
  }
21276
+ if (typeof min !== 'undefined') {
21277
+ payload['min'] = min;
21278
+ }
21279
+ if (typeof max !== 'undefined') {
21280
+ payload['max'] = max;
21281
+ }
20015
21282
  if (typeof xdefault !== 'undefined') {
20016
21283
  payload['default'] = xdefault;
20017
21284
  }
@@ -20024,7 +21291,7 @@ class TablesDB {
20024
21291
  };
20025
21292
  return this.client.call('post', uri, apiHeaders, payload);
20026
21293
  }
20027
- updateBooleanColumn(paramsOrFirst, ...rest) {
21294
+ updateFloatColumn(paramsOrFirst, ...rest) {
20028
21295
  let params;
20029
21296
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20030
21297
  params = (paramsOrFirst || {});
@@ -20036,7 +21303,9 @@ class TablesDB {
20036
21303
  key: rest[1],
20037
21304
  required: rest[2],
20038
21305
  xdefault: rest[3],
20039
- newKey: rest[4]
21306
+ min: rest[4],
21307
+ max: rest[5],
21308
+ newKey: rest[6]
20040
21309
  };
20041
21310
  }
20042
21311
  const databaseId = params.databaseId;
@@ -20044,6 +21313,8 @@ class TablesDB {
20044
21313
  const key = params.key;
20045
21314
  const required = params.required;
20046
21315
  const xdefault = params.xdefault;
21316
+ const min = params.min;
21317
+ const max = params.max;
20047
21318
  const newKey = params.newKey;
20048
21319
  if (typeof databaseId === 'undefined') {
20049
21320
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -20060,11 +21331,17 @@ class TablesDB {
20060
21331
  if (typeof xdefault === 'undefined') {
20061
21332
  throw new AppwriteException('Missing required parameter: "xdefault"');
20062
21333
  }
20063
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/boolean/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
21334
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/float/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
20064
21335
  const payload = {};
20065
21336
  if (typeof required !== 'undefined') {
20066
21337
  payload['required'] = required;
20067
21338
  }
21339
+ if (typeof min !== 'undefined') {
21340
+ payload['min'] = min;
21341
+ }
21342
+ if (typeof max !== 'undefined') {
21343
+ payload['max'] = max;
21344
+ }
20068
21345
  if (typeof xdefault !== 'undefined') {
20069
21346
  payload['default'] = xdefault;
20070
21347
  }
@@ -20077,7 +21354,7 @@ class TablesDB {
20077
21354
  };
20078
21355
  return this.client.call('patch', uri, apiHeaders, payload);
20079
21356
  }
20080
- createDatetimeColumn(paramsOrFirst, ...rest) {
21357
+ createIntegerColumn(paramsOrFirst, ...rest) {
20081
21358
  let params;
20082
21359
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20083
21360
  params = (paramsOrFirst || {});
@@ -20088,14 +21365,18 @@ class TablesDB {
20088
21365
  tableId: rest[0],
20089
21366
  key: rest[1],
20090
21367
  required: rest[2],
20091
- xdefault: rest[3],
20092
- array: rest[4]
21368
+ min: rest[3],
21369
+ max: rest[4],
21370
+ xdefault: rest[5],
21371
+ array: rest[6]
20093
21372
  };
20094
21373
  }
20095
21374
  const databaseId = params.databaseId;
20096
21375
  const tableId = params.tableId;
20097
21376
  const key = params.key;
20098
21377
  const required = params.required;
21378
+ const min = params.min;
21379
+ const max = params.max;
20099
21380
  const xdefault = params.xdefault;
20100
21381
  const array = params.array;
20101
21382
  if (typeof databaseId === 'undefined') {
@@ -20110,7 +21391,7 @@ class TablesDB {
20110
21391
  if (typeof required === 'undefined') {
20111
21392
  throw new AppwriteException('Missing required parameter: "required"');
20112
21393
  }
20113
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/datetime'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
21394
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/integer'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
20114
21395
  const payload = {};
20115
21396
  if (typeof key !== 'undefined') {
20116
21397
  payload['key'] = key;
@@ -20118,6 +21399,12 @@ class TablesDB {
20118
21399
  if (typeof required !== 'undefined') {
20119
21400
  payload['required'] = required;
20120
21401
  }
21402
+ if (typeof min !== 'undefined') {
21403
+ payload['min'] = min;
21404
+ }
21405
+ if (typeof max !== 'undefined') {
21406
+ payload['max'] = max;
21407
+ }
20121
21408
  if (typeof xdefault !== 'undefined') {
20122
21409
  payload['default'] = xdefault;
20123
21410
  }
@@ -20130,7 +21417,7 @@ class TablesDB {
20130
21417
  };
20131
21418
  return this.client.call('post', uri, apiHeaders, payload);
20132
21419
  }
20133
- updateDatetimeColumn(paramsOrFirst, ...rest) {
21420
+ updateIntegerColumn(paramsOrFirst, ...rest) {
20134
21421
  let params;
20135
21422
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20136
21423
  params = (paramsOrFirst || {});
@@ -20142,7 +21429,9 @@ class TablesDB {
20142
21429
  key: rest[1],
20143
21430
  required: rest[2],
20144
21431
  xdefault: rest[3],
20145
- newKey: rest[4]
21432
+ min: rest[4],
21433
+ max: rest[5],
21434
+ newKey: rest[6]
20146
21435
  };
20147
21436
  }
20148
21437
  const databaseId = params.databaseId;
@@ -20150,6 +21439,8 @@ class TablesDB {
20150
21439
  const key = params.key;
20151
21440
  const required = params.required;
20152
21441
  const xdefault = params.xdefault;
21442
+ const min = params.min;
21443
+ const max = params.max;
20153
21444
  const newKey = params.newKey;
20154
21445
  if (typeof databaseId === 'undefined') {
20155
21446
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -20166,11 +21457,17 @@ class TablesDB {
20166
21457
  if (typeof xdefault === 'undefined') {
20167
21458
  throw new AppwriteException('Missing required parameter: "xdefault"');
20168
21459
  }
20169
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/datetime/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
21460
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/integer/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
20170
21461
  const payload = {};
20171
21462
  if (typeof required !== 'undefined') {
20172
21463
  payload['required'] = required;
20173
21464
  }
21465
+ if (typeof min !== 'undefined') {
21466
+ payload['min'] = min;
21467
+ }
21468
+ if (typeof max !== 'undefined') {
21469
+ payload['max'] = max;
21470
+ }
20174
21471
  if (typeof xdefault !== 'undefined') {
20175
21472
  payload['default'] = xdefault;
20176
21473
  }
@@ -20183,7 +21480,7 @@ class TablesDB {
20183
21480
  };
20184
21481
  return this.client.call('patch', uri, apiHeaders, payload);
20185
21482
  }
20186
- createEmailColumn(paramsOrFirst, ...rest) {
21483
+ createIpColumn(paramsOrFirst, ...rest) {
20187
21484
  let params;
20188
21485
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20189
21486
  params = (paramsOrFirst || {});
@@ -20216,7 +21513,7 @@ class TablesDB {
20216
21513
  if (typeof required === 'undefined') {
20217
21514
  throw new AppwriteException('Missing required parameter: "required"');
20218
21515
  }
20219
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/email'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
21516
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/ip'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
20220
21517
  const payload = {};
20221
21518
  if (typeof key !== 'undefined') {
20222
21519
  payload['key'] = key;
@@ -20236,7 +21533,7 @@ class TablesDB {
20236
21533
  };
20237
21534
  return this.client.call('post', uri, apiHeaders, payload);
20238
21535
  }
20239
- updateEmailColumn(paramsOrFirst, ...rest) {
21536
+ updateIpColumn(paramsOrFirst, ...rest) {
20240
21537
  let params;
20241
21538
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20242
21539
  params = (paramsOrFirst || {});
@@ -20272,7 +21569,7 @@ class TablesDB {
20272
21569
  if (typeof xdefault === 'undefined') {
20273
21570
  throw new AppwriteException('Missing required parameter: "xdefault"');
20274
21571
  }
20275
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/email/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
21572
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/ip/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
20276
21573
  const payload = {};
20277
21574
  if (typeof required !== 'undefined') {
20278
21575
  payload['required'] = required;
@@ -20289,7 +21586,7 @@ class TablesDB {
20289
21586
  };
20290
21587
  return this.client.call('patch', uri, apiHeaders, payload);
20291
21588
  }
20292
- createEnumColumn(paramsOrFirst, ...rest) {
21589
+ createLineColumn(paramsOrFirst, ...rest) {
20293
21590
  let params;
20294
21591
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20295
21592
  params = (paramsOrFirst || {});
@@ -20299,19 +21596,15 @@ class TablesDB {
20299
21596
  databaseId: paramsOrFirst,
20300
21597
  tableId: rest[0],
20301
21598
  key: rest[1],
20302
- elements: rest[2],
20303
- required: rest[3],
20304
- xdefault: rest[4],
20305
- array: rest[5]
21599
+ required: rest[2],
21600
+ xdefault: rest[3]
20306
21601
  };
20307
21602
  }
20308
21603
  const databaseId = params.databaseId;
20309
21604
  const tableId = params.tableId;
20310
21605
  const key = params.key;
20311
- const elements = params.elements;
20312
21606
  const required = params.required;
20313
21607
  const xdefault = params.xdefault;
20314
- const array = params.array;
20315
21608
  if (typeof databaseId === 'undefined') {
20316
21609
  throw new AppwriteException('Missing required parameter: "databaseId"');
20317
21610
  }
@@ -20321,36 +21614,27 @@ class TablesDB {
20321
21614
  if (typeof key === 'undefined') {
20322
21615
  throw new AppwriteException('Missing required parameter: "key"');
20323
21616
  }
20324
- if (typeof elements === 'undefined') {
20325
- throw new AppwriteException('Missing required parameter: "elements"');
20326
- }
20327
21617
  if (typeof required === 'undefined') {
20328
21618
  throw new AppwriteException('Missing required parameter: "required"');
20329
21619
  }
20330
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/enum'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
21620
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/line'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
20331
21621
  const payload = {};
20332
21622
  if (typeof key !== 'undefined') {
20333
21623
  payload['key'] = key;
20334
21624
  }
20335
- if (typeof elements !== 'undefined') {
20336
- payload['elements'] = elements;
20337
- }
20338
21625
  if (typeof required !== 'undefined') {
20339
21626
  payload['required'] = required;
20340
21627
  }
20341
21628
  if (typeof xdefault !== 'undefined') {
20342
21629
  payload['default'] = xdefault;
20343
21630
  }
20344
- if (typeof array !== 'undefined') {
20345
- payload['array'] = array;
20346
- }
20347
21631
  const uri = new URL(this.client.config.endpoint + apiPath);
20348
21632
  const apiHeaders = {
20349
21633
  'content-type': 'application/json',
20350
21634
  };
20351
21635
  return this.client.call('post', uri, apiHeaders, payload);
20352
21636
  }
20353
- updateEnumColumn(paramsOrFirst, ...rest) {
21637
+ updateLineColumn(paramsOrFirst, ...rest) {
20354
21638
  let params;
20355
21639
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20356
21640
  params = (paramsOrFirst || {});
@@ -20360,16 +21644,14 @@ class TablesDB {
20360
21644
  databaseId: paramsOrFirst,
20361
21645
  tableId: rest[0],
20362
21646
  key: rest[1],
20363
- elements: rest[2],
20364
- required: rest[3],
20365
- xdefault: rest[4],
20366
- newKey: rest[5]
21647
+ required: rest[2],
21648
+ xdefault: rest[3],
21649
+ newKey: rest[4]
20367
21650
  };
20368
21651
  }
20369
21652
  const databaseId = params.databaseId;
20370
21653
  const tableId = params.tableId;
20371
21654
  const key = params.key;
20372
- const elements = params.elements;
20373
21655
  const required = params.required;
20374
21656
  const xdefault = params.xdefault;
20375
21657
  const newKey = params.newKey;
@@ -20382,20 +21664,11 @@ class TablesDB {
20382
21664
  if (typeof key === 'undefined') {
20383
21665
  throw new AppwriteException('Missing required parameter: "key"');
20384
21666
  }
20385
- if (typeof elements === 'undefined') {
20386
- throw new AppwriteException('Missing required parameter: "elements"');
20387
- }
20388
21667
  if (typeof required === 'undefined') {
20389
21668
  throw new AppwriteException('Missing required parameter: "required"');
20390
21669
  }
20391
- if (typeof xdefault === 'undefined') {
20392
- throw new AppwriteException('Missing required parameter: "xdefault"');
20393
- }
20394
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/enum/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
21670
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/line/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
20395
21671
  const payload = {};
20396
- if (typeof elements !== 'undefined') {
20397
- payload['elements'] = elements;
20398
- }
20399
21672
  if (typeof required !== 'undefined') {
20400
21673
  payload['required'] = required;
20401
21674
  }
@@ -20411,7 +21684,7 @@ class TablesDB {
20411
21684
  };
20412
21685
  return this.client.call('patch', uri, apiHeaders, payload);
20413
21686
  }
20414
- createFloatColumn(paramsOrFirst, ...rest) {
21687
+ createLongtextColumn(paramsOrFirst, ...rest) {
20415
21688
  let params;
20416
21689
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20417
21690
  params = (paramsOrFirst || {});
@@ -20422,18 +21695,14 @@ class TablesDB {
20422
21695
  tableId: rest[0],
20423
21696
  key: rest[1],
20424
21697
  required: rest[2],
20425
- min: rest[3],
20426
- max: rest[4],
20427
- xdefault: rest[5],
20428
- array: rest[6]
21698
+ xdefault: rest[3],
21699
+ array: rest[4]
20429
21700
  };
20430
21701
  }
20431
21702
  const databaseId = params.databaseId;
20432
21703
  const tableId = params.tableId;
20433
21704
  const key = params.key;
20434
21705
  const required = params.required;
20435
- const min = params.min;
20436
- const max = params.max;
20437
21706
  const xdefault = params.xdefault;
20438
21707
  const array = params.array;
20439
21708
  if (typeof databaseId === 'undefined') {
@@ -20448,7 +21717,7 @@ class TablesDB {
20448
21717
  if (typeof required === 'undefined') {
20449
21718
  throw new AppwriteException('Missing required parameter: "required"');
20450
21719
  }
20451
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/float'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
21720
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/longtext'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
20452
21721
  const payload = {};
20453
21722
  if (typeof key !== 'undefined') {
20454
21723
  payload['key'] = key;
@@ -20456,12 +21725,6 @@ class TablesDB {
20456
21725
  if (typeof required !== 'undefined') {
20457
21726
  payload['required'] = required;
20458
21727
  }
20459
- if (typeof min !== 'undefined') {
20460
- payload['min'] = min;
20461
- }
20462
- if (typeof max !== 'undefined') {
20463
- payload['max'] = max;
20464
- }
20465
21728
  if (typeof xdefault !== 'undefined') {
20466
21729
  payload['default'] = xdefault;
20467
21730
  }
@@ -20474,7 +21737,7 @@ class TablesDB {
20474
21737
  };
20475
21738
  return this.client.call('post', uri, apiHeaders, payload);
20476
21739
  }
20477
- updateFloatColumn(paramsOrFirst, ...rest) {
21740
+ updateLongtextColumn(paramsOrFirst, ...rest) {
20478
21741
  let params;
20479
21742
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20480
21743
  params = (paramsOrFirst || {});
@@ -20486,9 +21749,7 @@ class TablesDB {
20486
21749
  key: rest[1],
20487
21750
  required: rest[2],
20488
21751
  xdefault: rest[3],
20489
- min: rest[4],
20490
- max: rest[5],
20491
- newKey: rest[6]
21752
+ newKey: rest[4]
20492
21753
  };
20493
21754
  }
20494
21755
  const databaseId = params.databaseId;
@@ -20496,8 +21757,6 @@ class TablesDB {
20496
21757
  const key = params.key;
20497
21758
  const required = params.required;
20498
21759
  const xdefault = params.xdefault;
20499
- const min = params.min;
20500
- const max = params.max;
20501
21760
  const newKey = params.newKey;
20502
21761
  if (typeof databaseId === 'undefined') {
20503
21762
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -20514,17 +21773,11 @@ class TablesDB {
20514
21773
  if (typeof xdefault === 'undefined') {
20515
21774
  throw new AppwriteException('Missing required parameter: "xdefault"');
20516
21775
  }
20517
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/float/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
21776
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/longtext/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
20518
21777
  const payload = {};
20519
21778
  if (typeof required !== 'undefined') {
20520
21779
  payload['required'] = required;
20521
21780
  }
20522
- if (typeof min !== 'undefined') {
20523
- payload['min'] = min;
20524
- }
20525
- if (typeof max !== 'undefined') {
20526
- payload['max'] = max;
20527
- }
20528
21781
  if (typeof xdefault !== 'undefined') {
20529
21782
  payload['default'] = xdefault;
20530
21783
  }
@@ -20537,7 +21790,7 @@ class TablesDB {
20537
21790
  };
20538
21791
  return this.client.call('patch', uri, apiHeaders, payload);
20539
21792
  }
20540
- createIntegerColumn(paramsOrFirst, ...rest) {
21793
+ createMediumtextColumn(paramsOrFirst, ...rest) {
20541
21794
  let params;
20542
21795
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20543
21796
  params = (paramsOrFirst || {});
@@ -20548,18 +21801,14 @@ class TablesDB {
20548
21801
  tableId: rest[0],
20549
21802
  key: rest[1],
20550
21803
  required: rest[2],
20551
- min: rest[3],
20552
- max: rest[4],
20553
- xdefault: rest[5],
20554
- array: rest[6]
21804
+ xdefault: rest[3],
21805
+ array: rest[4]
20555
21806
  };
20556
21807
  }
20557
21808
  const databaseId = params.databaseId;
20558
21809
  const tableId = params.tableId;
20559
21810
  const key = params.key;
20560
21811
  const required = params.required;
20561
- const min = params.min;
20562
- const max = params.max;
20563
21812
  const xdefault = params.xdefault;
20564
21813
  const array = params.array;
20565
21814
  if (typeof databaseId === 'undefined') {
@@ -20574,7 +21823,7 @@ class TablesDB {
20574
21823
  if (typeof required === 'undefined') {
20575
21824
  throw new AppwriteException('Missing required parameter: "required"');
20576
21825
  }
20577
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/integer'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
21826
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/mediumtext'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
20578
21827
  const payload = {};
20579
21828
  if (typeof key !== 'undefined') {
20580
21829
  payload['key'] = key;
@@ -20582,12 +21831,6 @@ class TablesDB {
20582
21831
  if (typeof required !== 'undefined') {
20583
21832
  payload['required'] = required;
20584
21833
  }
20585
- if (typeof min !== 'undefined') {
20586
- payload['min'] = min;
20587
- }
20588
- if (typeof max !== 'undefined') {
20589
- payload['max'] = max;
20590
- }
20591
21834
  if (typeof xdefault !== 'undefined') {
20592
21835
  payload['default'] = xdefault;
20593
21836
  }
@@ -20600,7 +21843,7 @@ class TablesDB {
20600
21843
  };
20601
21844
  return this.client.call('post', uri, apiHeaders, payload);
20602
21845
  }
20603
- updateIntegerColumn(paramsOrFirst, ...rest) {
21846
+ updateMediumtextColumn(paramsOrFirst, ...rest) {
20604
21847
  let params;
20605
21848
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20606
21849
  params = (paramsOrFirst || {});
@@ -20612,9 +21855,7 @@ class TablesDB {
20612
21855
  key: rest[1],
20613
21856
  required: rest[2],
20614
21857
  xdefault: rest[3],
20615
- min: rest[4],
20616
- max: rest[5],
20617
- newKey: rest[6]
21858
+ newKey: rest[4]
20618
21859
  };
20619
21860
  }
20620
21861
  const databaseId = params.databaseId;
@@ -20622,8 +21863,6 @@ class TablesDB {
20622
21863
  const key = params.key;
20623
21864
  const required = params.required;
20624
21865
  const xdefault = params.xdefault;
20625
- const min = params.min;
20626
- const max = params.max;
20627
21866
  const newKey = params.newKey;
20628
21867
  if (typeof databaseId === 'undefined') {
20629
21868
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -20640,17 +21879,11 @@ class TablesDB {
20640
21879
  if (typeof xdefault === 'undefined') {
20641
21880
  throw new AppwriteException('Missing required parameter: "xdefault"');
20642
21881
  }
20643
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/integer/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
21882
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/mediumtext/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
20644
21883
  const payload = {};
20645
21884
  if (typeof required !== 'undefined') {
20646
21885
  payload['required'] = required;
20647
21886
  }
20648
- if (typeof min !== 'undefined') {
20649
- payload['min'] = min;
20650
- }
20651
- if (typeof max !== 'undefined') {
20652
- payload['max'] = max;
20653
- }
20654
21887
  if (typeof xdefault !== 'undefined') {
20655
21888
  payload['default'] = xdefault;
20656
21889
  }
@@ -20663,7 +21896,7 @@ class TablesDB {
20663
21896
  };
20664
21897
  return this.client.call('patch', uri, apiHeaders, payload);
20665
21898
  }
20666
- createIpColumn(paramsOrFirst, ...rest) {
21899
+ createPointColumn(paramsOrFirst, ...rest) {
20667
21900
  let params;
20668
21901
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20669
21902
  params = (paramsOrFirst || {});
@@ -20674,8 +21907,7 @@ class TablesDB {
20674
21907
  tableId: rest[0],
20675
21908
  key: rest[1],
20676
21909
  required: rest[2],
20677
- xdefault: rest[3],
20678
- array: rest[4]
21910
+ xdefault: rest[3]
20679
21911
  };
20680
21912
  }
20681
21913
  const databaseId = params.databaseId;
@@ -20683,7 +21915,6 @@ class TablesDB {
20683
21915
  const key = params.key;
20684
21916
  const required = params.required;
20685
21917
  const xdefault = params.xdefault;
20686
- const array = params.array;
20687
21918
  if (typeof databaseId === 'undefined') {
20688
21919
  throw new AppwriteException('Missing required parameter: "databaseId"');
20689
21920
  }
@@ -20696,7 +21927,7 @@ class TablesDB {
20696
21927
  if (typeof required === 'undefined') {
20697
21928
  throw new AppwriteException('Missing required parameter: "required"');
20698
21929
  }
20699
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/ip'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
21930
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/point'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
20700
21931
  const payload = {};
20701
21932
  if (typeof key !== 'undefined') {
20702
21933
  payload['key'] = key;
@@ -20707,16 +21938,13 @@ class TablesDB {
20707
21938
  if (typeof xdefault !== 'undefined') {
20708
21939
  payload['default'] = xdefault;
20709
21940
  }
20710
- if (typeof array !== 'undefined') {
20711
- payload['array'] = array;
20712
- }
20713
21941
  const uri = new URL(this.client.config.endpoint + apiPath);
20714
21942
  const apiHeaders = {
20715
21943
  'content-type': 'application/json',
20716
21944
  };
20717
21945
  return this.client.call('post', uri, apiHeaders, payload);
20718
21946
  }
20719
- updateIpColumn(paramsOrFirst, ...rest) {
21947
+ updatePointColumn(paramsOrFirst, ...rest) {
20720
21948
  let params;
20721
21949
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20722
21950
  params = (paramsOrFirst || {});
@@ -20749,10 +21977,7 @@ class TablesDB {
20749
21977
  if (typeof required === 'undefined') {
20750
21978
  throw new AppwriteException('Missing required parameter: "required"');
20751
21979
  }
20752
- if (typeof xdefault === 'undefined') {
20753
- throw new AppwriteException('Missing required parameter: "xdefault"');
20754
- }
20755
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/ip/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
21980
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/point/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
20756
21981
  const payload = {};
20757
21982
  if (typeof required !== 'undefined') {
20758
21983
  payload['required'] = required;
@@ -20769,7 +21994,7 @@ class TablesDB {
20769
21994
  };
20770
21995
  return this.client.call('patch', uri, apiHeaders, payload);
20771
21996
  }
20772
- createLineColumn(paramsOrFirst, ...rest) {
21997
+ createPolygonColumn(paramsOrFirst, ...rest) {
20773
21998
  let params;
20774
21999
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20775
22000
  params = (paramsOrFirst || {});
@@ -20800,7 +22025,7 @@ class TablesDB {
20800
22025
  if (typeof required === 'undefined') {
20801
22026
  throw new AppwriteException('Missing required parameter: "required"');
20802
22027
  }
20803
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/line'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
22028
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/polygon'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
20804
22029
  const payload = {};
20805
22030
  if (typeof key !== 'undefined') {
20806
22031
  payload['key'] = key;
@@ -20817,7 +22042,7 @@ class TablesDB {
20817
22042
  };
20818
22043
  return this.client.call('post', uri, apiHeaders, payload);
20819
22044
  }
20820
- updateLineColumn(paramsOrFirst, ...rest) {
22045
+ updatePolygonColumn(paramsOrFirst, ...rest) {
20821
22046
  let params;
20822
22047
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20823
22048
  params = (paramsOrFirst || {});
@@ -20844,30 +22069,93 @@ class TablesDB {
20844
22069
  if (typeof tableId === 'undefined') {
20845
22070
  throw new AppwriteException('Missing required parameter: "tableId"');
20846
22071
  }
20847
- if (typeof key === 'undefined') {
20848
- throw new AppwriteException('Missing required parameter: "key"');
22072
+ if (typeof key === 'undefined') {
22073
+ throw new AppwriteException('Missing required parameter: "key"');
22074
+ }
22075
+ if (typeof required === 'undefined') {
22076
+ throw new AppwriteException('Missing required parameter: "required"');
22077
+ }
22078
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/polygon/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
22079
+ const payload = {};
22080
+ if (typeof required !== 'undefined') {
22081
+ payload['required'] = required;
22082
+ }
22083
+ if (typeof xdefault !== 'undefined') {
22084
+ payload['default'] = xdefault;
22085
+ }
22086
+ if (typeof newKey !== 'undefined') {
22087
+ payload['newKey'] = newKey;
22088
+ }
22089
+ const uri = new URL(this.client.config.endpoint + apiPath);
22090
+ const apiHeaders = {
22091
+ 'content-type': 'application/json',
22092
+ };
22093
+ return this.client.call('patch', uri, apiHeaders, payload);
22094
+ }
22095
+ createRelationshipColumn(paramsOrFirst, ...rest) {
22096
+ let params;
22097
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
22098
+ params = (paramsOrFirst || {});
22099
+ }
22100
+ else {
22101
+ params = {
22102
+ databaseId: paramsOrFirst,
22103
+ tableId: rest[0],
22104
+ relatedTableId: rest[1],
22105
+ type: rest[2],
22106
+ twoWay: rest[3],
22107
+ key: rest[4],
22108
+ twoWayKey: rest[5],
22109
+ onDelete: rest[6]
22110
+ };
22111
+ }
22112
+ const databaseId = params.databaseId;
22113
+ const tableId = params.tableId;
22114
+ const relatedTableId = params.relatedTableId;
22115
+ const type = params.type;
22116
+ const twoWay = params.twoWay;
22117
+ const key = params.key;
22118
+ const twoWayKey = params.twoWayKey;
22119
+ const onDelete = params.onDelete;
22120
+ if (typeof databaseId === 'undefined') {
22121
+ throw new AppwriteException('Missing required parameter: "databaseId"');
22122
+ }
22123
+ if (typeof tableId === 'undefined') {
22124
+ throw new AppwriteException('Missing required parameter: "tableId"');
22125
+ }
22126
+ if (typeof relatedTableId === 'undefined') {
22127
+ throw new AppwriteException('Missing required parameter: "relatedTableId"');
20849
22128
  }
20850
- if (typeof required === 'undefined') {
20851
- throw new AppwriteException('Missing required parameter: "required"');
22129
+ if (typeof type === 'undefined') {
22130
+ throw new AppwriteException('Missing required parameter: "type"');
20852
22131
  }
20853
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/line/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
22132
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/relationship'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
20854
22133
  const payload = {};
20855
- if (typeof required !== 'undefined') {
20856
- payload['required'] = required;
22134
+ if (typeof relatedTableId !== 'undefined') {
22135
+ payload['relatedTableId'] = relatedTableId;
20857
22136
  }
20858
- if (typeof xdefault !== 'undefined') {
20859
- payload['default'] = xdefault;
22137
+ if (typeof type !== 'undefined') {
22138
+ payload['type'] = type;
20860
22139
  }
20861
- if (typeof newKey !== 'undefined') {
20862
- payload['newKey'] = newKey;
22140
+ if (typeof twoWay !== 'undefined') {
22141
+ payload['twoWay'] = twoWay;
22142
+ }
22143
+ if (typeof key !== 'undefined') {
22144
+ payload['key'] = key;
22145
+ }
22146
+ if (typeof twoWayKey !== 'undefined') {
22147
+ payload['twoWayKey'] = twoWayKey;
22148
+ }
22149
+ if (typeof onDelete !== 'undefined') {
22150
+ payload['onDelete'] = onDelete;
20863
22151
  }
20864
22152
  const uri = new URL(this.client.config.endpoint + apiPath);
20865
22153
  const apiHeaders = {
20866
22154
  'content-type': 'application/json',
20867
22155
  };
20868
- return this.client.call('patch', uri, apiHeaders, payload);
22156
+ return this.client.call('post', uri, apiHeaders, payload);
20869
22157
  }
20870
- createPointColumn(paramsOrFirst, ...rest) {
22158
+ createStringColumn(paramsOrFirst, ...rest) {
20871
22159
  let params;
20872
22160
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20873
22161
  params = (paramsOrFirst || {});
@@ -20877,15 +22165,21 @@ class TablesDB {
20877
22165
  databaseId: paramsOrFirst,
20878
22166
  tableId: rest[0],
20879
22167
  key: rest[1],
20880
- required: rest[2],
20881
- xdefault: rest[3]
22168
+ size: rest[2],
22169
+ required: rest[3],
22170
+ xdefault: rest[4],
22171
+ array: rest[5],
22172
+ encrypt: rest[6]
20882
22173
  };
20883
22174
  }
20884
22175
  const databaseId = params.databaseId;
20885
22176
  const tableId = params.tableId;
20886
22177
  const key = params.key;
22178
+ const size = params.size;
20887
22179
  const required = params.required;
20888
22180
  const xdefault = params.xdefault;
22181
+ const array = params.array;
22182
+ const encrypt = params.encrypt;
20889
22183
  if (typeof databaseId === 'undefined') {
20890
22184
  throw new AppwriteException('Missing required parameter: "databaseId"');
20891
22185
  }
@@ -20895,27 +22189,39 @@ class TablesDB {
20895
22189
  if (typeof key === 'undefined') {
20896
22190
  throw new AppwriteException('Missing required parameter: "key"');
20897
22191
  }
22192
+ if (typeof size === 'undefined') {
22193
+ throw new AppwriteException('Missing required parameter: "size"');
22194
+ }
20898
22195
  if (typeof required === 'undefined') {
20899
22196
  throw new AppwriteException('Missing required parameter: "required"');
20900
22197
  }
20901
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/point'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
22198
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/string'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
20902
22199
  const payload = {};
20903
22200
  if (typeof key !== 'undefined') {
20904
22201
  payload['key'] = key;
20905
22202
  }
22203
+ if (typeof size !== 'undefined') {
22204
+ payload['size'] = size;
22205
+ }
20906
22206
  if (typeof required !== 'undefined') {
20907
22207
  payload['required'] = required;
20908
22208
  }
20909
22209
  if (typeof xdefault !== 'undefined') {
20910
22210
  payload['default'] = xdefault;
20911
22211
  }
22212
+ if (typeof array !== 'undefined') {
22213
+ payload['array'] = array;
22214
+ }
22215
+ if (typeof encrypt !== 'undefined') {
22216
+ payload['encrypt'] = encrypt;
22217
+ }
20912
22218
  const uri = new URL(this.client.config.endpoint + apiPath);
20913
22219
  const apiHeaders = {
20914
22220
  'content-type': 'application/json',
20915
22221
  };
20916
22222
  return this.client.call('post', uri, apiHeaders, payload);
20917
22223
  }
20918
- updatePointColumn(paramsOrFirst, ...rest) {
22224
+ updateStringColumn(paramsOrFirst, ...rest) {
20919
22225
  let params;
20920
22226
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20921
22227
  params = (paramsOrFirst || {});
@@ -20927,7 +22233,8 @@ class TablesDB {
20927
22233
  key: rest[1],
20928
22234
  required: rest[2],
20929
22235
  xdefault: rest[3],
20930
- newKey: rest[4]
22236
+ size: rest[4],
22237
+ newKey: rest[5]
20931
22238
  };
20932
22239
  }
20933
22240
  const databaseId = params.databaseId;
@@ -20935,6 +22242,7 @@ class TablesDB {
20935
22242
  const key = params.key;
20936
22243
  const required = params.required;
20937
22244
  const xdefault = params.xdefault;
22245
+ const size = params.size;
20938
22246
  const newKey = params.newKey;
20939
22247
  if (typeof databaseId === 'undefined') {
20940
22248
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -20948,7 +22256,10 @@ class TablesDB {
20948
22256
  if (typeof required === 'undefined') {
20949
22257
  throw new AppwriteException('Missing required parameter: "required"');
20950
22258
  }
20951
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/point/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
22259
+ if (typeof xdefault === 'undefined') {
22260
+ throw new AppwriteException('Missing required parameter: "xdefault"');
22261
+ }
22262
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/string/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
20952
22263
  const payload = {};
20953
22264
  if (typeof required !== 'undefined') {
20954
22265
  payload['required'] = required;
@@ -20956,6 +22267,9 @@ class TablesDB {
20956
22267
  if (typeof xdefault !== 'undefined') {
20957
22268
  payload['default'] = xdefault;
20958
22269
  }
22270
+ if (typeof size !== 'undefined') {
22271
+ payload['size'] = size;
22272
+ }
20959
22273
  if (typeof newKey !== 'undefined') {
20960
22274
  payload['newKey'] = newKey;
20961
22275
  }
@@ -20965,7 +22279,7 @@ class TablesDB {
20965
22279
  };
20966
22280
  return this.client.call('patch', uri, apiHeaders, payload);
20967
22281
  }
20968
- createPolygonColumn(paramsOrFirst, ...rest) {
22282
+ createTextColumn(paramsOrFirst, ...rest) {
20969
22283
  let params;
20970
22284
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20971
22285
  params = (paramsOrFirst || {});
@@ -20976,7 +22290,8 @@ class TablesDB {
20976
22290
  tableId: rest[0],
20977
22291
  key: rest[1],
20978
22292
  required: rest[2],
20979
- xdefault: rest[3]
22293
+ xdefault: rest[3],
22294
+ array: rest[4]
20980
22295
  };
20981
22296
  }
20982
22297
  const databaseId = params.databaseId;
@@ -20984,6 +22299,7 @@ class TablesDB {
20984
22299
  const key = params.key;
20985
22300
  const required = params.required;
20986
22301
  const xdefault = params.xdefault;
22302
+ const array = params.array;
20987
22303
  if (typeof databaseId === 'undefined') {
20988
22304
  throw new AppwriteException('Missing required parameter: "databaseId"');
20989
22305
  }
@@ -20996,7 +22312,7 @@ class TablesDB {
20996
22312
  if (typeof required === 'undefined') {
20997
22313
  throw new AppwriteException('Missing required parameter: "required"');
20998
22314
  }
20999
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/polygon'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
22315
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/text'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
21000
22316
  const payload = {};
21001
22317
  if (typeof key !== 'undefined') {
21002
22318
  payload['key'] = key;
@@ -21007,13 +22323,16 @@ class TablesDB {
21007
22323
  if (typeof xdefault !== 'undefined') {
21008
22324
  payload['default'] = xdefault;
21009
22325
  }
22326
+ if (typeof array !== 'undefined') {
22327
+ payload['array'] = array;
22328
+ }
21010
22329
  const uri = new URL(this.client.config.endpoint + apiPath);
21011
22330
  const apiHeaders = {
21012
22331
  'content-type': 'application/json',
21013
22332
  };
21014
22333
  return this.client.call('post', uri, apiHeaders, payload);
21015
22334
  }
21016
- updatePolygonColumn(paramsOrFirst, ...rest) {
22335
+ updateTextColumn(paramsOrFirst, ...rest) {
21017
22336
  let params;
21018
22337
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
21019
22338
  params = (paramsOrFirst || {});
@@ -21046,7 +22365,10 @@ class TablesDB {
21046
22365
  if (typeof required === 'undefined') {
21047
22366
  throw new AppwriteException('Missing required parameter: "required"');
21048
22367
  }
21049
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/polygon/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
22368
+ if (typeof xdefault === 'undefined') {
22369
+ throw new AppwriteException('Missing required parameter: "xdefault"');
22370
+ }
22371
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/text/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
21050
22372
  const payload = {};
21051
22373
  if (typeof required !== 'undefined') {
21052
22374
  payload['required'] = required;
@@ -21063,70 +22385,7 @@ class TablesDB {
21063
22385
  };
21064
22386
  return this.client.call('patch', uri, apiHeaders, payload);
21065
22387
  }
21066
- createRelationshipColumn(paramsOrFirst, ...rest) {
21067
- let params;
21068
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
21069
- params = (paramsOrFirst || {});
21070
- }
21071
- else {
21072
- params = {
21073
- databaseId: paramsOrFirst,
21074
- tableId: rest[0],
21075
- relatedTableId: rest[1],
21076
- type: rest[2],
21077
- twoWay: rest[3],
21078
- key: rest[4],
21079
- twoWayKey: rest[5],
21080
- onDelete: rest[6]
21081
- };
21082
- }
21083
- const databaseId = params.databaseId;
21084
- const tableId = params.tableId;
21085
- const relatedTableId = params.relatedTableId;
21086
- const type = params.type;
21087
- const twoWay = params.twoWay;
21088
- const key = params.key;
21089
- const twoWayKey = params.twoWayKey;
21090
- const onDelete = params.onDelete;
21091
- if (typeof databaseId === 'undefined') {
21092
- throw new AppwriteException('Missing required parameter: "databaseId"');
21093
- }
21094
- if (typeof tableId === 'undefined') {
21095
- throw new AppwriteException('Missing required parameter: "tableId"');
21096
- }
21097
- if (typeof relatedTableId === 'undefined') {
21098
- throw new AppwriteException('Missing required parameter: "relatedTableId"');
21099
- }
21100
- if (typeof type === 'undefined') {
21101
- throw new AppwriteException('Missing required parameter: "type"');
21102
- }
21103
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/relationship'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
21104
- const payload = {};
21105
- if (typeof relatedTableId !== 'undefined') {
21106
- payload['relatedTableId'] = relatedTableId;
21107
- }
21108
- if (typeof type !== 'undefined') {
21109
- payload['type'] = type;
21110
- }
21111
- if (typeof twoWay !== 'undefined') {
21112
- payload['twoWay'] = twoWay;
21113
- }
21114
- if (typeof key !== 'undefined') {
21115
- payload['key'] = key;
21116
- }
21117
- if (typeof twoWayKey !== 'undefined') {
21118
- payload['twoWayKey'] = twoWayKey;
21119
- }
21120
- if (typeof onDelete !== 'undefined') {
21121
- payload['onDelete'] = onDelete;
21122
- }
21123
- const uri = new URL(this.client.config.endpoint + apiPath);
21124
- const apiHeaders = {
21125
- 'content-type': 'application/json',
21126
- };
21127
- return this.client.call('post', uri, apiHeaders, payload);
21128
- }
21129
- createStringColumn(paramsOrFirst, ...rest) {
22388
+ createUrlColumn(paramsOrFirst, ...rest) {
21130
22389
  let params;
21131
22390
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
21132
22391
  params = (paramsOrFirst || {});
@@ -21136,21 +22395,17 @@ class TablesDB {
21136
22395
  databaseId: paramsOrFirst,
21137
22396
  tableId: rest[0],
21138
22397
  key: rest[1],
21139
- size: rest[2],
21140
- required: rest[3],
21141
- xdefault: rest[4],
21142
- array: rest[5],
21143
- encrypt: rest[6]
22398
+ required: rest[2],
22399
+ xdefault: rest[3],
22400
+ array: rest[4]
21144
22401
  };
21145
22402
  }
21146
22403
  const databaseId = params.databaseId;
21147
22404
  const tableId = params.tableId;
21148
22405
  const key = params.key;
21149
- const size = params.size;
21150
22406
  const required = params.required;
21151
22407
  const xdefault = params.xdefault;
21152
22408
  const array = params.array;
21153
- const encrypt = params.encrypt;
21154
22409
  if (typeof databaseId === 'undefined') {
21155
22410
  throw new AppwriteException('Missing required parameter: "databaseId"');
21156
22411
  }
@@ -21160,20 +22415,14 @@ class TablesDB {
21160
22415
  if (typeof key === 'undefined') {
21161
22416
  throw new AppwriteException('Missing required parameter: "key"');
21162
22417
  }
21163
- if (typeof size === 'undefined') {
21164
- throw new AppwriteException('Missing required parameter: "size"');
21165
- }
21166
22418
  if (typeof required === 'undefined') {
21167
22419
  throw new AppwriteException('Missing required parameter: "required"');
21168
22420
  }
21169
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/string'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
22421
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/url'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
21170
22422
  const payload = {};
21171
22423
  if (typeof key !== 'undefined') {
21172
22424
  payload['key'] = key;
21173
22425
  }
21174
- if (typeof size !== 'undefined') {
21175
- payload['size'] = size;
21176
- }
21177
22426
  if (typeof required !== 'undefined') {
21178
22427
  payload['required'] = required;
21179
22428
  }
@@ -21183,16 +22432,13 @@ class TablesDB {
21183
22432
  if (typeof array !== 'undefined') {
21184
22433
  payload['array'] = array;
21185
22434
  }
21186
- if (typeof encrypt !== 'undefined') {
21187
- payload['encrypt'] = encrypt;
21188
- }
21189
22435
  const uri = new URL(this.client.config.endpoint + apiPath);
21190
22436
  const apiHeaders = {
21191
22437
  'content-type': 'application/json',
21192
22438
  };
21193
22439
  return this.client.call('post', uri, apiHeaders, payload);
21194
22440
  }
21195
- updateStringColumn(paramsOrFirst, ...rest) {
22441
+ updateUrlColumn(paramsOrFirst, ...rest) {
21196
22442
  let params;
21197
22443
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
21198
22444
  params = (paramsOrFirst || {});
@@ -21204,8 +22450,7 @@ class TablesDB {
21204
22450
  key: rest[1],
21205
22451
  required: rest[2],
21206
22452
  xdefault: rest[3],
21207
- size: rest[4],
21208
- newKey: rest[5]
22453
+ newKey: rest[4]
21209
22454
  };
21210
22455
  }
21211
22456
  const databaseId = params.databaseId;
@@ -21213,7 +22458,6 @@ class TablesDB {
21213
22458
  const key = params.key;
21214
22459
  const required = params.required;
21215
22460
  const xdefault = params.xdefault;
21216
- const size = params.size;
21217
22461
  const newKey = params.newKey;
21218
22462
  if (typeof databaseId === 'undefined') {
21219
22463
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -21230,7 +22474,7 @@ class TablesDB {
21230
22474
  if (typeof xdefault === 'undefined') {
21231
22475
  throw new AppwriteException('Missing required parameter: "xdefault"');
21232
22476
  }
21233
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/string/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
22477
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/url/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
21234
22478
  const payload = {};
21235
22479
  if (typeof required !== 'undefined') {
21236
22480
  payload['required'] = required;
@@ -21238,9 +22482,6 @@ class TablesDB {
21238
22482
  if (typeof xdefault !== 'undefined') {
21239
22483
  payload['default'] = xdefault;
21240
22484
  }
21241
- if (typeof size !== 'undefined') {
21242
- payload['size'] = size;
21243
- }
21244
22485
  if (typeof newKey !== 'undefined') {
21245
22486
  payload['newKey'] = newKey;
21246
22487
  }
@@ -21250,7 +22491,7 @@ class TablesDB {
21250
22491
  };
21251
22492
  return this.client.call('patch', uri, apiHeaders, payload);
21252
22493
  }
21253
- createUrlColumn(paramsOrFirst, ...rest) {
22494
+ createVarcharColumn(paramsOrFirst, ...rest) {
21254
22495
  let params;
21255
22496
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
21256
22497
  params = (paramsOrFirst || {});
@@ -21260,14 +22501,16 @@ class TablesDB {
21260
22501
  databaseId: paramsOrFirst,
21261
22502
  tableId: rest[0],
21262
22503
  key: rest[1],
21263
- required: rest[2],
21264
- xdefault: rest[3],
21265
- array: rest[4]
22504
+ size: rest[2],
22505
+ required: rest[3],
22506
+ xdefault: rest[4],
22507
+ array: rest[5]
21266
22508
  };
21267
22509
  }
21268
22510
  const databaseId = params.databaseId;
21269
22511
  const tableId = params.tableId;
21270
22512
  const key = params.key;
22513
+ const size = params.size;
21271
22514
  const required = params.required;
21272
22515
  const xdefault = params.xdefault;
21273
22516
  const array = params.array;
@@ -21280,14 +22523,20 @@ class TablesDB {
21280
22523
  if (typeof key === 'undefined') {
21281
22524
  throw new AppwriteException('Missing required parameter: "key"');
21282
22525
  }
22526
+ if (typeof size === 'undefined') {
22527
+ throw new AppwriteException('Missing required parameter: "size"');
22528
+ }
21283
22529
  if (typeof required === 'undefined') {
21284
22530
  throw new AppwriteException('Missing required parameter: "required"');
21285
22531
  }
21286
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/url'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
22532
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/varchar'.replace('{databaseId}', databaseId).replace('{tableId}', tableId);
21287
22533
  const payload = {};
21288
22534
  if (typeof key !== 'undefined') {
21289
22535
  payload['key'] = key;
21290
22536
  }
22537
+ if (typeof size !== 'undefined') {
22538
+ payload['size'] = size;
22539
+ }
21291
22540
  if (typeof required !== 'undefined') {
21292
22541
  payload['required'] = required;
21293
22542
  }
@@ -21303,7 +22552,7 @@ class TablesDB {
21303
22552
  };
21304
22553
  return this.client.call('post', uri, apiHeaders, payload);
21305
22554
  }
21306
- updateUrlColumn(paramsOrFirst, ...rest) {
22555
+ updateVarcharColumn(paramsOrFirst, ...rest) {
21307
22556
  let params;
21308
22557
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
21309
22558
  params = (paramsOrFirst || {});
@@ -21315,7 +22564,8 @@ class TablesDB {
21315
22564
  key: rest[1],
21316
22565
  required: rest[2],
21317
22566
  xdefault: rest[3],
21318
- newKey: rest[4]
22567
+ size: rest[4],
22568
+ newKey: rest[5]
21319
22569
  };
21320
22570
  }
21321
22571
  const databaseId = params.databaseId;
@@ -21323,6 +22573,7 @@ class TablesDB {
21323
22573
  const key = params.key;
21324
22574
  const required = params.required;
21325
22575
  const xdefault = params.xdefault;
22576
+ const size = params.size;
21326
22577
  const newKey = params.newKey;
21327
22578
  if (typeof databaseId === 'undefined') {
21328
22579
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -21339,7 +22590,7 @@ class TablesDB {
21339
22590
  if (typeof xdefault === 'undefined') {
21340
22591
  throw new AppwriteException('Missing required parameter: "xdefault"');
21341
22592
  }
21342
- const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/url/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
22593
+ const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/varchar/{key}'.replace('{databaseId}', databaseId).replace('{tableId}', tableId).replace('{key}', key);
21343
22594
  const payload = {};
21344
22595
  if (typeof required !== 'undefined') {
21345
22596
  payload['required'] = required;
@@ -21347,6 +22598,9 @@ class TablesDB {
21347
22598
  if (typeof xdefault !== 'undefined') {
21348
22599
  payload['default'] = xdefault;
21349
22600
  }
22601
+ if (typeof size !== 'undefined') {
22602
+ payload['size'] = size;
22603
+ }
21350
22604
  if (typeof newKey !== 'undefined') {
21351
22605
  payload['newKey'] = newKey;
21352
22606
  }
@@ -24917,11 +26171,31 @@ class Realtime {
24917
26171
  sleep(ms) {
24918
26172
  return new Promise(resolve => setTimeout(resolve, ms));
24919
26173
  }
26174
+ /**
26175
+ * Convert a channel value to a string
26176
+ *
26177
+ * @private
26178
+ * @param {string | Channel<any> | ActionableChannel | ResolvedChannel} channel - Channel value (string or Channel builder instance)
26179
+ * @returns {string} Channel string representation
26180
+ */
26181
+ channelToString(channel) {
26182
+ if (typeof channel === 'string') {
26183
+ return channel;
26184
+ }
26185
+ // All Channel instances have toString() method
26186
+ if (channel && typeof channel.toString === 'function') {
26187
+ return channel.toString();
26188
+ }
26189
+ return String(channel);
26190
+ }
24920
26191
  subscribe(channelsOrChannel, callback) {
24921
26192
  return __awaiter(this, void 0, void 0, function* () {
24922
- const channels = Array.isArray(channelsOrChannel)
24923
- ? new Set(channelsOrChannel)
24924
- : new Set([channelsOrChannel]);
26193
+ const channelArray = Array.isArray(channelsOrChannel)
26194
+ ? channelsOrChannel
26195
+ : [channelsOrChannel];
26196
+ // Convert all channels to strings
26197
+ const channelStrings = channelArray.map(ch => this.channelToString(ch));
26198
+ const channels = new Set(channelStrings);
24925
26199
  this.subscriptionsCounter++;
24926
26200
  const count = this.subscriptionsCounter;
24927
26201
  for (const channel of channels) {
@@ -25225,6 +26499,99 @@ _a = ID, _ID_hexTimestamp = function _ID_hexTimestamp() {
25225
26499
  return hexTimestamp;
25226
26500
  };
25227
26501
 
26502
+ function normalize(id) {
26503
+ const trimmed = id.trim();
26504
+ return trimmed === "" ? "*" : trimmed;
26505
+ }
26506
+ class Channel {
26507
+ constructor(segments) {
26508
+ this.segments = segments;
26509
+ }
26510
+ next(segment, id = "*") {
26511
+ return new Channel([...this.segments, segment, normalize(id)]);
26512
+ }
26513
+ resolve(action) {
26514
+ return new Channel([...this.segments, action]);
26515
+ }
26516
+ toString() {
26517
+ return this.segments.join(".");
26518
+ }
26519
+ // --- DATABASE ROUTE ---
26520
+ // Only available on Channel<Database>
26521
+ collection(id = "*") {
26522
+ return this.next("collections", id);
26523
+ }
26524
+ // Only available on Channel<Collection>
26525
+ document(id = "*") {
26526
+ return this.next("documents", id);
26527
+ }
26528
+ // --- TABLESDB ROUTE ---
26529
+ table(id = "*") {
26530
+ return this.next("tables", id);
26531
+ }
26532
+ row(id = "*") {
26533
+ return this.next("rows", id);
26534
+ }
26535
+ // --- BUCKET ROUTE ---
26536
+ file(id = "*") {
26537
+ return this.next("files", id);
26538
+ }
26539
+ // --- FUNCTION ROUTE ---
26540
+ execution(id = "*") {
26541
+ return this.next("executions", id);
26542
+ }
26543
+ // --- TERMINAL ACTIONS ---
26544
+ // Restricted to the Actionable union
26545
+ create() {
26546
+ return this.resolve("create");
26547
+ }
26548
+ update() {
26549
+ return this.resolve("update");
26550
+ }
26551
+ delete() {
26552
+ return this.resolve("delete");
26553
+ }
26554
+ // --- ROOT FACTORIES ---
26555
+ static database(id = "*") {
26556
+ return new Channel(["databases", normalize(id)]);
26557
+ }
26558
+ static tablesdb(id = "*") {
26559
+ return new Channel(["tablesdb", normalize(id)]);
26560
+ }
26561
+ static bucket(id = "*") {
26562
+ return new Channel(["buckets", normalize(id)]);
26563
+ }
26564
+ static function(id = "*") {
26565
+ return new Channel(["functions", normalize(id)]);
26566
+ }
26567
+ static team(id = "*") {
26568
+ return new Channel(["teams", normalize(id)]);
26569
+ }
26570
+ static membership(id = "*") {
26571
+ return new Channel(["memberships", normalize(id)]);
26572
+ }
26573
+ static account(userId = "") {
26574
+ const id = normalize(userId);
26575
+ return id === "*" ? "account" : `account.${id}`;
26576
+ }
26577
+ // Global events
26578
+ static documents() {
26579
+ return "documents";
26580
+ }
26581
+ static rows() {
26582
+ return "rows";
26583
+ }
26584
+ static files() {
26585
+ return "files";
26586
+ }
26587
+ static executions() {
26588
+ return "executions";
26589
+ }
26590
+ static teams() {
26591
+ return "teams";
26592
+ }
26593
+ }
26594
+
25228
26595
  var Condition;
25229
26596
  (function (Condition) {
25230
26597
  Condition["Equal"] = "equal";
@@ -25490,6 +26857,73 @@ Operator.dateSubDays = (days) => new Operator("dateSubDays", [days]).toString();
25490
26857
  */
25491
26858
  Operator.dateSetNow = () => new Operator("dateSetNow", []).toString();
25492
26859
 
26860
+ var Scopes;
26861
+ (function (Scopes) {
26862
+ Scopes["SessionsWrite"] = "sessions.write";
26863
+ Scopes["UsersRead"] = "users.read";
26864
+ Scopes["UsersWrite"] = "users.write";
26865
+ Scopes["TeamsRead"] = "teams.read";
26866
+ Scopes["TeamsWrite"] = "teams.write";
26867
+ Scopes["DatabasesRead"] = "databases.read";
26868
+ Scopes["DatabasesWrite"] = "databases.write";
26869
+ Scopes["CollectionsRead"] = "collections.read";
26870
+ Scopes["CollectionsWrite"] = "collections.write";
26871
+ Scopes["TablesRead"] = "tables.read";
26872
+ Scopes["TablesWrite"] = "tables.write";
26873
+ Scopes["AttributesRead"] = "attributes.read";
26874
+ Scopes["AttributesWrite"] = "attributes.write";
26875
+ Scopes["ColumnsRead"] = "columns.read";
26876
+ Scopes["ColumnsWrite"] = "columns.write";
26877
+ Scopes["IndexesRead"] = "indexes.read";
26878
+ Scopes["IndexesWrite"] = "indexes.write";
26879
+ Scopes["DocumentsRead"] = "documents.read";
26880
+ Scopes["DocumentsWrite"] = "documents.write";
26881
+ Scopes["RowsRead"] = "rows.read";
26882
+ Scopes["RowsWrite"] = "rows.write";
26883
+ Scopes["FilesRead"] = "files.read";
26884
+ Scopes["FilesWrite"] = "files.write";
26885
+ Scopes["BucketsRead"] = "buckets.read";
26886
+ Scopes["BucketsWrite"] = "buckets.write";
26887
+ Scopes["FunctionsRead"] = "functions.read";
26888
+ Scopes["FunctionsWrite"] = "functions.write";
26889
+ Scopes["SitesRead"] = "sites.read";
26890
+ Scopes["SitesWrite"] = "sites.write";
26891
+ Scopes["LogRead"] = "log.read";
26892
+ Scopes["LogWrite"] = "log.write";
26893
+ Scopes["ExecutionRead"] = "execution.read";
26894
+ Scopes["ExecutionWrite"] = "execution.write";
26895
+ Scopes["LocaleRead"] = "locale.read";
26896
+ Scopes["AvatarsRead"] = "avatars.read";
26897
+ Scopes["HealthRead"] = "health.read";
26898
+ Scopes["ProvidersRead"] = "providers.read";
26899
+ Scopes["ProvidersWrite"] = "providers.write";
26900
+ Scopes["MessagesRead"] = "messages.read";
26901
+ Scopes["MessagesWrite"] = "messages.write";
26902
+ Scopes["TopicsRead"] = "topics.read";
26903
+ Scopes["TopicsWrite"] = "topics.write";
26904
+ Scopes["SubscribersRead"] = "subscribers.read";
26905
+ Scopes["SubscribersWrite"] = "subscribers.write";
26906
+ Scopes["TargetsRead"] = "targets.read";
26907
+ Scopes["TargetsWrite"] = "targets.write";
26908
+ Scopes["RulesRead"] = "rules.read";
26909
+ Scopes["RulesWrite"] = "rules.write";
26910
+ Scopes["MigrationsRead"] = "migrations.read";
26911
+ Scopes["MigrationsWrite"] = "migrations.write";
26912
+ Scopes["VcsRead"] = "vcs.read";
26913
+ Scopes["VcsWrite"] = "vcs.write";
26914
+ Scopes["AssistantRead"] = "assistant.read";
26915
+ Scopes["TokensRead"] = "tokens.read";
26916
+ Scopes["TokensWrite"] = "tokens.write";
26917
+ Scopes["PoliciesWrite"] = "policies.write";
26918
+ Scopes["PoliciesRead"] = "policies.read";
26919
+ Scopes["ArchivesRead"] = "archives.read";
26920
+ Scopes["ArchivesWrite"] = "archives.write";
26921
+ Scopes["RestorationsRead"] = "restorations.read";
26922
+ Scopes["RestorationsWrite"] = "restorations.write";
26923
+ Scopes["DomainsRead"] = "domains.read";
26924
+ Scopes["DomainsWrite"] = "domains.write";
26925
+ })(Scopes || (Scopes = {}));
26926
+
25493
26927
  var AuthenticatorType;
25494
26928
  (function (AuthenticatorType) {
25495
26929
  AuthenticatorType["Totp"] = "totp";
@@ -26215,6 +27649,30 @@ var Timezone;
26215
27649
  Timezone["Utc"] = "utc";
26216
27650
  })(Timezone || (Timezone = {}));
26217
27651
 
27652
+ var BrowserPermission;
27653
+ (function (BrowserPermission) {
27654
+ BrowserPermission["Geolocation"] = "geolocation";
27655
+ BrowserPermission["Camera"] = "camera";
27656
+ BrowserPermission["Microphone"] = "microphone";
27657
+ BrowserPermission["Notifications"] = "notifications";
27658
+ BrowserPermission["Midi"] = "midi";
27659
+ BrowserPermission["Push"] = "push";
27660
+ BrowserPermission["Clipboardread"] = "clipboard-read";
27661
+ BrowserPermission["Clipboardwrite"] = "clipboard-write";
27662
+ BrowserPermission["Paymenthandler"] = "payment-handler";
27663
+ BrowserPermission["Usb"] = "usb";
27664
+ BrowserPermission["Bluetooth"] = "bluetooth";
27665
+ BrowserPermission["Accelerometer"] = "accelerometer";
27666
+ BrowserPermission["Gyroscope"] = "gyroscope";
27667
+ BrowserPermission["Magnetometer"] = "magnetometer";
27668
+ BrowserPermission["Ambientlightsensor"] = "ambient-light-sensor";
27669
+ BrowserPermission["Backgroundsync"] = "background-sync";
27670
+ BrowserPermission["Persistentstorage"] = "persistent-storage";
27671
+ BrowserPermission["Screenwakelock"] = "screen-wake-lock";
27672
+ BrowserPermission["Webshare"] = "web-share";
27673
+ BrowserPermission["Xrspatialtracking"] = "xr-spatial-tracking";
27674
+ })(BrowserPermission || (BrowserPermission = {}));
27675
+
26218
27676
  var ImageFormat;
26219
27677
  (function (ImageFormat) {
26220
27678
  ImageFormat["Jpg"] = "jpg";
@@ -26226,6 +27684,13 @@ var ImageFormat;
26226
27684
  ImageFormat["Gif"] = "gif";
26227
27685
  })(ImageFormat || (ImageFormat = {}));
26228
27686
 
27687
+ var Services;
27688
+ (function (Services) {
27689
+ Services["Databases"] = "databases";
27690
+ Services["Functions"] = "functions";
27691
+ Services["Storage"] = "storage";
27692
+ })(Services || (Services = {}));
27693
+
26229
27694
  var Platform;
26230
27695
  (function (Platform) {
26231
27696
  Platform["Appwrite"] = "appwrite";
@@ -26267,6 +27732,12 @@ var IndexType;
26267
27732
  IndexType["Spatial"] = "spatial";
26268
27733
  })(IndexType || (IndexType = {}));
26269
27734
 
27735
+ var OrderBy;
27736
+ (function (OrderBy) {
27737
+ OrderBy["Asc"] = "asc";
27738
+ OrderBy["Desc"] = "desc";
27739
+ })(OrderBy || (OrderBy = {}));
27740
+
26270
27741
  var FilterType;
26271
27742
  (function (FilterType) {
26272
27743
  FilterType["Premium"] = "premium";
@@ -26341,6 +27812,87 @@ var Runtime;
26341
27812
  Runtime["Flutter335"] = "flutter-3.35";
26342
27813
  })(Runtime || (Runtime = {}));
26343
27814
 
27815
+ var Runtimes;
27816
+ (function (Runtimes) {
27817
+ Runtimes["Node145"] = "node-14.5";
27818
+ Runtimes["Node160"] = "node-16.0";
27819
+ Runtimes["Node180"] = "node-18.0";
27820
+ Runtimes["Node190"] = "node-19.0";
27821
+ Runtimes["Node200"] = "node-20.0";
27822
+ Runtimes["Node210"] = "node-21.0";
27823
+ Runtimes["Node22"] = "node-22";
27824
+ Runtimes["Php80"] = "php-8.0";
27825
+ Runtimes["Php81"] = "php-8.1";
27826
+ Runtimes["Php82"] = "php-8.2";
27827
+ Runtimes["Php83"] = "php-8.3";
27828
+ Runtimes["Ruby30"] = "ruby-3.0";
27829
+ Runtimes["Ruby31"] = "ruby-3.1";
27830
+ Runtimes["Ruby32"] = "ruby-3.2";
27831
+ Runtimes["Ruby33"] = "ruby-3.3";
27832
+ Runtimes["Python38"] = "python-3.8";
27833
+ Runtimes["Python39"] = "python-3.9";
27834
+ Runtimes["Python310"] = "python-3.10";
27835
+ Runtimes["Python311"] = "python-3.11";
27836
+ Runtimes["Python312"] = "python-3.12";
27837
+ Runtimes["Pythonml311"] = "python-ml-3.11";
27838
+ Runtimes["Pythonml312"] = "python-ml-3.12";
27839
+ Runtimes["Deno140"] = "deno-1.40";
27840
+ Runtimes["Deno146"] = "deno-1.46";
27841
+ Runtimes["Deno20"] = "deno-2.0";
27842
+ Runtimes["Dart215"] = "dart-2.15";
27843
+ Runtimes["Dart216"] = "dart-2.16";
27844
+ Runtimes["Dart217"] = "dart-2.17";
27845
+ Runtimes["Dart218"] = "dart-2.18";
27846
+ Runtimes["Dart219"] = "dart-2.19";
27847
+ Runtimes["Dart30"] = "dart-3.0";
27848
+ Runtimes["Dart31"] = "dart-3.1";
27849
+ Runtimes["Dart33"] = "dart-3.3";
27850
+ Runtimes["Dart35"] = "dart-3.5";
27851
+ Runtimes["Dart38"] = "dart-3.8";
27852
+ Runtimes["Dart39"] = "dart-3.9";
27853
+ Runtimes["Dotnet60"] = "dotnet-6.0";
27854
+ Runtimes["Dotnet70"] = "dotnet-7.0";
27855
+ Runtimes["Dotnet80"] = "dotnet-8.0";
27856
+ Runtimes["Java80"] = "java-8.0";
27857
+ Runtimes["Java110"] = "java-11.0";
27858
+ Runtimes["Java170"] = "java-17.0";
27859
+ Runtimes["Java180"] = "java-18.0";
27860
+ Runtimes["Java210"] = "java-21.0";
27861
+ Runtimes["Java22"] = "java-22";
27862
+ Runtimes["Swift55"] = "swift-5.5";
27863
+ Runtimes["Swift58"] = "swift-5.8";
27864
+ Runtimes["Swift59"] = "swift-5.9";
27865
+ Runtimes["Swift510"] = "swift-5.10";
27866
+ Runtimes["Kotlin16"] = "kotlin-1.6";
27867
+ Runtimes["Kotlin18"] = "kotlin-1.8";
27868
+ Runtimes["Kotlin19"] = "kotlin-1.9";
27869
+ Runtimes["Kotlin20"] = "kotlin-2.0";
27870
+ Runtimes["Cpp17"] = "cpp-17";
27871
+ Runtimes["Cpp20"] = "cpp-20";
27872
+ Runtimes["Bun10"] = "bun-1.0";
27873
+ Runtimes["Bun11"] = "bun-1.1";
27874
+ Runtimes["Go123"] = "go-1.23";
27875
+ Runtimes["Static1"] = "static-1";
27876
+ Runtimes["Flutter324"] = "flutter-3.24";
27877
+ Runtimes["Flutter327"] = "flutter-3.27";
27878
+ Runtimes["Flutter329"] = "flutter-3.29";
27879
+ Runtimes["Flutter332"] = "flutter-3.32";
27880
+ Runtimes["Flutter335"] = "flutter-3.35";
27881
+ })(Runtimes || (Runtimes = {}));
27882
+
27883
+ var UseCases;
27884
+ (function (UseCases) {
27885
+ UseCases["Portfolio"] = "portfolio";
27886
+ UseCases["Starter"] = "starter";
27887
+ UseCases["Events"] = "events";
27888
+ UseCases["Ecommerce"] = "ecommerce";
27889
+ UseCases["Documentation"] = "documentation";
27890
+ UseCases["Blog"] = "blog";
27891
+ UseCases["Ai"] = "ai";
27892
+ UseCases["Forms"] = "forms";
27893
+ UseCases["Dashboard"] = "dashboard";
27894
+ })(UseCases || (UseCases = {}));
27895
+
26344
27896
  var TemplateReferenceType;
26345
27897
  (function (TemplateReferenceType) {
26346
27898
  TemplateReferenceType["Branch"] = "branch";
@@ -26402,24 +27954,20 @@ var SmtpEncryption;
26402
27954
  SmtpEncryption["Tls"] = "tls";
26403
27955
  })(SmtpEncryption || (SmtpEncryption = {}));
26404
27956
 
26405
- var BillingPlan;
26406
- (function (BillingPlan) {
26407
- BillingPlan["Tier0"] = "tier-0";
26408
- BillingPlan["Tier1"] = "tier-1";
26409
- BillingPlan["Tier2"] = "tier-2";
26410
- BillingPlan["Imaginetier0"] = "imagine-tier-0";
26411
- BillingPlan["Imaginetier1"] = "imagine-tier-1";
26412
- BillingPlan["Imaginetier150"] = "imagine-tier-1-50";
26413
- BillingPlan["Imaginetier1100"] = "imagine-tier-1-100";
26414
- BillingPlan["Imaginetier1200"] = "imagine-tier-1-200";
26415
- BillingPlan["Imaginetier1290"] = "imagine-tier-1-290";
26416
- BillingPlan["Imaginetier1480"] = "imagine-tier-1-480";
26417
- BillingPlan["Imaginetier1700"] = "imagine-tier-1-700";
26418
- BillingPlan["Imaginetier1900"] = "imagine-tier-1-900";
26419
- BillingPlan["Imaginetier11100"] = "imagine-tier-1-1100";
26420
- BillingPlan["Imaginetier11650"] = "imagine-tier-1-1650";
26421
- BillingPlan["Imaginetier12200"] = "imagine-tier-1-2200";
26422
- })(BillingPlan || (BillingPlan = {}));
27957
+ var Resources;
27958
+ (function (Resources) {
27959
+ Resources["User"] = "user";
27960
+ Resources["Database"] = "database";
27961
+ Resources["Table"] = "table";
27962
+ Resources["Column"] = "column";
27963
+ Resources["Index"] = "index";
27964
+ Resources["Row"] = "row";
27965
+ Resources["Document"] = "document";
27966
+ Resources["Attribute"] = "attribute";
27967
+ Resources["Collection"] = "collection";
27968
+ Resources["Bucket"] = "bucket";
27969
+ Resources["File"] = "file";
27970
+ })(Resources || (Resources = {}));
26423
27971
 
26424
27972
  var ProjectUsageRange;
26425
27973
  (function (ProjectUsageRange) {
@@ -26899,6 +28447,25 @@ var Adapter;
26899
28447
  Adapter["Ssr"] = "ssr";
26900
28448
  })(Adapter || (Adapter = {}));
26901
28449
 
28450
+ var Frameworks;
28451
+ (function (Frameworks) {
28452
+ Frameworks["Analog"] = "analog";
28453
+ Frameworks["Angular"] = "angular";
28454
+ Frameworks["Nextjs"] = "nextjs";
28455
+ Frameworks["React"] = "react";
28456
+ Frameworks["Nuxt"] = "nuxt";
28457
+ Frameworks["Vue"] = "vue";
28458
+ Frameworks["Sveltekit"] = "sveltekit";
28459
+ Frameworks["Astro"] = "astro";
28460
+ Frameworks["Tanstackstart"] = "tanstack-start";
28461
+ Frameworks["Remix"] = "remix";
28462
+ Frameworks["Lynx"] = "lynx";
28463
+ Frameworks["Flutter"] = "flutter";
28464
+ Frameworks["Reactnative"] = "react-native";
28465
+ Frameworks["Vite"] = "vite";
28466
+ Frameworks["Other"] = "other";
28467
+ })(Frameworks || (Frameworks = {}));
28468
+
26902
28469
  var Compression;
26903
28470
  (function (Compression) {
26904
28471
  Compression["None"] = "none";
@@ -26919,6 +28486,15 @@ var ImageGravity;
26919
28486
  ImageGravity["Bottomright"] = "bottom-right";
26920
28487
  })(ImageGravity || (ImageGravity = {}));
26921
28488
 
28489
+ var Roles;
28490
+ (function (Roles) {
28491
+ Roles["Developer"] = "developer";
28492
+ Roles["Editor"] = "editor";
28493
+ Roles["Analyst"] = "analyst";
28494
+ Roles["Billing"] = "billing";
28495
+ Roles["Owner"] = "owner";
28496
+ })(Roles || (Roles = {}));
28497
+
26922
28498
  var PasswordHash;
26923
28499
  (function (PasswordHash) {
26924
28500
  PasswordHash["Sha1"] = "sha1";
@@ -26986,6 +28562,7 @@ var DeploymentStatus;
26986
28562
  DeploymentStatus["Processing"] = "processing";
26987
28563
  DeploymentStatus["Building"] = "building";
26988
28564
  DeploymentStatus["Ready"] = "ready";
28565
+ DeploymentStatus["Canceled"] = "canceled";
26989
28566
  DeploymentStatus["Failed"] = "failed";
26990
28567
  })(DeploymentStatus || (DeploymentStatus = {}));
26991
28568
 
@@ -27048,5 +28625,5 @@ var BillingPlanGroup;
27048
28625
  BillingPlanGroup["Scale"] = "scale";
27049
28626
  })(BillingPlanGroup || (BillingPlanGroup = {}));
27050
28627
 
27051
- export { Account, Adapter, Api, ApiService, AppwriteException, Assistant, AttributeStatus, AuthMethod, AuthenticationFactor, AuthenticatorType, Avatars, Backups, BillingPlan, BillingPlanGroup, Browser, BuildRuntime, Client, ColumnStatus, Compression, Condition, Console, ConsoleResourceType, CreditCard, DatabaseType, Databases, DeploymentDownloadType, DeploymentStatus, Domains, EmailTemplateLocale, EmailTemplateType, ExecutionMethod, ExecutionStatus, ExecutionTrigger, FilterType, Flag, Framework, Functions, Graphql, Health, HealthAntivirusStatus, HealthCheckStatus, ID, ImageFormat, ImageGravity, IndexStatus, IndexType, Locale, MessagePriority, MessageStatus, Messaging, MessagingProviderType, Migrations, Name, OAuthProvider, Operator, Organizations, PasswordHash, Permission, Platform, PlatformType, Project, ProjectUsageRange, Projects, Proxy, ProxyResourceType, ProxyRuleDeploymentResourceType, ProxyRuleStatus, Query, Realtime, Region, RelationMutate, RelationshipType, Role, Runtime, SMTPSecure, Sites, SmsTemplateLocale, SmsTemplateType, SmtpEncryption, Status, StatusCode, Storage, TablesDB, Teams, TemplateReferenceType, Theme, Timezone, Tokens, UsageRange, Users, VCSDetectionType, VCSReferenceType, Vcs };
28628
+ export { Account, Adapter, Api, ApiService, AppwriteException, Assistant, AttributeStatus, AuthMethod, AuthenticationFactor, AuthenticatorType, Avatars, Backups, BillingPlanGroup, Browser, BrowserPermission, BuildRuntime, Channel, Client, ColumnStatus, Compression, Condition, Console, ConsoleResourceType, CreditCard, DatabaseType, Databases, DeploymentDownloadType, DeploymentStatus, Domains, EmailTemplateLocale, EmailTemplateType, ExecutionMethod, ExecutionStatus, ExecutionTrigger, FilterType, Flag, Framework, Frameworks, Functions, Graphql, Health, HealthAntivirusStatus, HealthCheckStatus, ID, ImageFormat, ImageGravity, IndexStatus, IndexType, Locale, MessagePriority, MessageStatus, Messaging, MessagingProviderType, Migrations, Name, OAuthProvider, Operator, OrderBy, Organizations, PasswordHash, Permission, Platform, PlatformType, Project, ProjectUsageRange, Projects, Proxy, ProxyResourceType, ProxyRuleDeploymentResourceType, ProxyRuleStatus, Query, Realtime, Region, RelationMutate, RelationshipType, Resources, Role, Roles, Runtime, Runtimes, SMTPSecure, Scopes, Services, Sites, SmsTemplateLocale, SmsTemplateType, SmtpEncryption, Status, StatusCode, Storage, TablesDB, Teams, TemplateReferenceType, Theme, Timezone, Tokens, UsageRange, UseCases, Users, VCSDetectionType, VCSReferenceType, Vcs };
27052
28629
  //# sourceMappingURL=sdk.js.map