node-appwrite 14.0.0 → 14.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 (76) hide show
  1. package/README.md +1 -1
  2. package/dist/client.d.mts +1 -0
  3. package/dist/client.d.ts +1 -0
  4. package/dist/client.js +5 -2
  5. package/dist/client.js.map +1 -1
  6. package/dist/client.mjs +5 -2
  7. package/dist/client.mjs.map +1 -1
  8. package/dist/enums/image-format.d.mts +2 -1
  9. package/dist/enums/image-format.d.ts +2 -1
  10. package/dist/enums/image-format.js +1 -0
  11. package/dist/enums/image-format.js.map +1 -1
  12. package/dist/enums/image-format.mjs +1 -0
  13. package/dist/enums/image-format.mjs.map +1 -1
  14. package/dist/enums/message-priority.d.mts +6 -0
  15. package/dist/enums/message-priority.d.ts +6 -0
  16. package/dist/enums/message-priority.js +11 -0
  17. package/dist/enums/message-priority.js.map +1 -0
  18. package/dist/enums/message-priority.mjs +10 -0
  19. package/dist/enums/message-priority.mjs.map +1 -0
  20. package/dist/enums/runtime.d.mts +15 -2
  21. package/dist/enums/runtime.d.ts +15 -2
  22. package/dist/enums/runtime.js +14 -1
  23. package/dist/enums/runtime.js.map +1 -1
  24. package/dist/enums/runtime.mjs +14 -1
  25. package/dist/enums/runtime.mjs.map +1 -1
  26. package/dist/index.d.mts +1 -0
  27. package/dist/index.d.ts +1 -0
  28. package/dist/index.js +5 -0
  29. package/dist/index.js.map +1 -1
  30. package/dist/index.mjs +1 -0
  31. package/dist/index.mjs.map +1 -1
  32. package/dist/models.d.mts +96 -4
  33. package/dist/models.d.ts +96 -4
  34. package/dist/services/account.d.mts +11 -11
  35. package/dist/services/account.d.ts +11 -11
  36. package/dist/services/account.js +11 -11
  37. package/dist/services/account.js.map +1 -1
  38. package/dist/services/account.mjs +11 -11
  39. package/dist/services/account.mjs.map +1 -1
  40. package/dist/services/databases.d.mts +21 -10
  41. package/dist/services/databases.d.ts +21 -10
  42. package/dist/services/databases.js +54 -10
  43. package/dist/services/databases.js.map +1 -1
  44. package/dist/services/databases.mjs +54 -10
  45. package/dist/services/databases.mjs.map +1 -1
  46. package/dist/services/locale.d.mts +1 -1
  47. package/dist/services/locale.d.ts +1 -1
  48. package/dist/services/locale.js +1 -1
  49. package/dist/services/locale.js.map +1 -1
  50. package/dist/services/locale.mjs +1 -1
  51. package/dist/services/locale.mjs.map +1 -1
  52. package/dist/services/messaging.d.mts +10 -3
  53. package/dist/services/messaging.d.ts +10 -3
  54. package/dist/services/messaging.js +27 -9
  55. package/dist/services/messaging.js.map +1 -1
  56. package/dist/services/messaging.mjs +27 -9
  57. package/dist/services/messaging.mjs.map +1 -1
  58. package/dist/services/storage.d.mts +1 -1
  59. package/dist/services/storage.d.ts +1 -1
  60. package/dist/services/storage.js +1 -1
  61. package/dist/services/storage.js.map +1 -1
  62. package/dist/services/storage.mjs +1 -1
  63. package/dist/services/storage.mjs.map +1 -1
  64. package/dist/services/teams.d.mts +2 -2
  65. package/dist/services/teams.d.ts +2 -2
  66. package/dist/services/teams.js +2 -2
  67. package/dist/services/teams.js.map +1 -1
  68. package/dist/services/teams.mjs +2 -2
  69. package/dist/services/teams.mjs.map +1 -1
  70. package/dist/services/users.d.mts +10 -10
  71. package/dist/services/users.d.ts +10 -10
  72. package/dist/services/users.js +10 -10
  73. package/dist/services/users.js.map +1 -1
  74. package/dist/services/users.mjs +10 -10
  75. package/dist/services/users.mjs.map +1 -1
  76. package/package.json +1 -1
@@ -457,10 +457,11 @@ var Databases = class {
457
457
  * @param {string} key
458
458
  * @param {boolean} required
459
459
  * @param {boolean} xdefault
460
+ * @param {string} newKey
460
461
  * @throws {AppwriteException}
461
462
  * @returns {Promise<Models.AttributeBoolean>}
462
463
  */
463
- async updateBooleanAttribute(databaseId, collectionId, key, required, xdefault) {
464
+ async updateBooleanAttribute(databaseId, collectionId, key, required, xdefault, newKey) {
464
465
  if (typeof databaseId === "undefined") {
465
466
  throw new AppwriteException('Missing required parameter: "databaseId"');
466
467
  }
@@ -484,6 +485,9 @@ var Databases = class {
484
485
  if (typeof xdefault !== "undefined") {
485
486
  payload["default"] = xdefault;
486
487
  }
488
+ if (typeof newKey !== "undefined") {
489
+ payload["newKey"] = newKey;
490
+ }
487
491
  const uri = new URL(this.client.config.endpoint + apiPath);
488
492
  const apiHeaders = {
489
493
  "content-type": "application/json"
@@ -557,10 +561,11 @@ var Databases = class {
557
561
  * @param {string} key
558
562
  * @param {boolean} required
559
563
  * @param {string} xdefault
564
+ * @param {string} newKey
560
565
  * @throws {AppwriteException}
561
566
  * @returns {Promise<Models.AttributeDatetime>}
562
567
  */
563
- async updateDatetimeAttribute(databaseId, collectionId, key, required, xdefault) {
568
+ async updateDatetimeAttribute(databaseId, collectionId, key, required, xdefault, newKey) {
564
569
  if (typeof databaseId === "undefined") {
565
570
  throw new AppwriteException('Missing required parameter: "databaseId"');
566
571
  }
@@ -584,6 +589,9 @@ var Databases = class {
584
589
  if (typeof xdefault !== "undefined") {
585
590
  payload["default"] = xdefault;
586
591
  }
592
+ if (typeof newKey !== "undefined") {
593
+ payload["newKey"] = newKey;
594
+ }
587
595
  const uri = new URL(this.client.config.endpoint + apiPath);
588
596
  const apiHeaders = {
589
597
  "content-type": "application/json"
@@ -659,10 +667,11 @@ var Databases = class {
659
667
  * @param {string} key
660
668
  * @param {boolean} required
661
669
  * @param {string} xdefault
670
+ * @param {string} newKey
662
671
  * @throws {AppwriteException}
663
672
  * @returns {Promise<Models.AttributeEmail>}
664
673
  */
665
- async updateEmailAttribute(databaseId, collectionId, key, required, xdefault) {
674
+ async updateEmailAttribute(databaseId, collectionId, key, required, xdefault, newKey) {
666
675
  if (typeof databaseId === "undefined") {
667
676
  throw new AppwriteException('Missing required parameter: "databaseId"');
668
677
  }
@@ -686,6 +695,9 @@ var Databases = class {
686
695
  if (typeof xdefault !== "undefined") {
687
696
  payload["default"] = xdefault;
688
697
  }
698
+ if (typeof newKey !== "undefined") {
699
+ payload["newKey"] = newKey;
700
+ }
689
701
  const uri = new URL(this.client.config.endpoint + apiPath);
690
702
  const apiHeaders = {
691
703
  "content-type": "application/json"
@@ -769,10 +781,11 @@ var Databases = class {
769
781
  * @param {string[]} elements
770
782
  * @param {boolean} required
771
783
  * @param {string} xdefault
784
+ * @param {string} newKey
772
785
  * @throws {AppwriteException}
773
786
  * @returns {Promise<Models.AttributeEnum>}
774
787
  */
775
- async updateEnumAttribute(databaseId, collectionId, key, elements, required, xdefault) {
788
+ async updateEnumAttribute(databaseId, collectionId, key, elements, required, xdefault, newKey) {
776
789
  if (typeof databaseId === "undefined") {
777
790
  throw new AppwriteException('Missing required parameter: "databaseId"');
778
791
  }
@@ -802,6 +815,9 @@ var Databases = class {
802
815
  if (typeof xdefault !== "undefined") {
803
816
  payload["default"] = xdefault;
804
817
  }
818
+ if (typeof newKey !== "undefined") {
819
+ payload["newKey"] = newKey;
820
+ }
805
821
  const uri = new URL(this.client.config.endpoint + apiPath);
806
822
  const apiHeaders = {
807
823
  "content-type": "application/json"
@@ -887,10 +903,11 @@ var Databases = class {
887
903
  * @param {number} min
888
904
  * @param {number} max
889
905
  * @param {number} xdefault
906
+ * @param {string} newKey
890
907
  * @throws {AppwriteException}
891
908
  * @returns {Promise<Models.AttributeFloat>}
892
909
  */
893
- async updateFloatAttribute(databaseId, collectionId, key, required, min, max, xdefault) {
910
+ async updateFloatAttribute(databaseId, collectionId, key, required, min, max, xdefault, newKey) {
894
911
  if (typeof databaseId === "undefined") {
895
912
  throw new AppwriteException('Missing required parameter: "databaseId"');
896
913
  }
@@ -926,6 +943,9 @@ var Databases = class {
926
943
  if (typeof xdefault !== "undefined") {
927
944
  payload["default"] = xdefault;
928
945
  }
946
+ if (typeof newKey !== "undefined") {
947
+ payload["newKey"] = newKey;
948
+ }
929
949
  const uri = new URL(this.client.config.endpoint + apiPath);
930
950
  const apiHeaders = {
931
951
  "content-type": "application/json"
@@ -1011,10 +1031,11 @@ var Databases = class {
1011
1031
  * @param {number} min
1012
1032
  * @param {number} max
1013
1033
  * @param {number} xdefault
1034
+ * @param {string} newKey
1014
1035
  * @throws {AppwriteException}
1015
1036
  * @returns {Promise<Models.AttributeInteger>}
1016
1037
  */
1017
- async updateIntegerAttribute(databaseId, collectionId, key, required, min, max, xdefault) {
1038
+ async updateIntegerAttribute(databaseId, collectionId, key, required, min, max, xdefault, newKey) {
1018
1039
  if (typeof databaseId === "undefined") {
1019
1040
  throw new AppwriteException('Missing required parameter: "databaseId"');
1020
1041
  }
@@ -1050,6 +1071,9 @@ var Databases = class {
1050
1071
  if (typeof xdefault !== "undefined") {
1051
1072
  payload["default"] = xdefault;
1052
1073
  }
1074
+ if (typeof newKey !== "undefined") {
1075
+ payload["newKey"] = newKey;
1076
+ }
1053
1077
  const uri = new URL(this.client.config.endpoint + apiPath);
1054
1078
  const apiHeaders = {
1055
1079
  "content-type": "application/json"
@@ -1125,10 +1149,11 @@ var Databases = class {
1125
1149
  * @param {string} key
1126
1150
  * @param {boolean} required
1127
1151
  * @param {string} xdefault
1152
+ * @param {string} newKey
1128
1153
  * @throws {AppwriteException}
1129
1154
  * @returns {Promise<Models.AttributeIp>}
1130
1155
  */
1131
- async updateIpAttribute(databaseId, collectionId, key, required, xdefault) {
1156
+ async updateIpAttribute(databaseId, collectionId, key, required, xdefault, newKey) {
1132
1157
  if (typeof databaseId === "undefined") {
1133
1158
  throw new AppwriteException('Missing required parameter: "databaseId"');
1134
1159
  }
@@ -1152,6 +1177,9 @@ var Databases = class {
1152
1177
  if (typeof xdefault !== "undefined") {
1153
1178
  payload["default"] = xdefault;
1154
1179
  }
1180
+ if (typeof newKey !== "undefined") {
1181
+ payload["newKey"] = newKey;
1182
+ }
1155
1183
  const uri = new URL(this.client.config.endpoint + apiPath);
1156
1184
  const apiHeaders = {
1157
1185
  "content-type": "application/json"
@@ -1299,10 +1327,12 @@ var Databases = class {
1299
1327
  * @param {string} key
1300
1328
  * @param {boolean} required
1301
1329
  * @param {string} xdefault
1330
+ * @param {number} size
1331
+ * @param {string} newKey
1302
1332
  * @throws {AppwriteException}
1303
1333
  * @returns {Promise<Models.AttributeString>}
1304
1334
  */
1305
- async updateStringAttribute(databaseId, collectionId, key, required, xdefault) {
1335
+ async updateStringAttribute(databaseId, collectionId, key, required, xdefault, size, newKey) {
1306
1336
  if (typeof databaseId === "undefined") {
1307
1337
  throw new AppwriteException('Missing required parameter: "databaseId"');
1308
1338
  }
@@ -1326,6 +1356,12 @@ var Databases = class {
1326
1356
  if (typeof xdefault !== "undefined") {
1327
1357
  payload["default"] = xdefault;
1328
1358
  }
1359
+ if (typeof size !== "undefined") {
1360
+ payload["size"] = size;
1361
+ }
1362
+ if (typeof newKey !== "undefined") {
1363
+ payload["newKey"] = newKey;
1364
+ }
1329
1365
  const uri = new URL(this.client.config.endpoint + apiPath);
1330
1366
  const apiHeaders = {
1331
1367
  "content-type": "application/json"
@@ -1401,10 +1437,11 @@ var Databases = class {
1401
1437
  * @param {string} key
1402
1438
  * @param {boolean} required
1403
1439
  * @param {string} xdefault
1440
+ * @param {string} newKey
1404
1441
  * @throws {AppwriteException}
1405
1442
  * @returns {Promise<Models.AttributeUrl>}
1406
1443
  */
1407
- async updateUrlAttribute(databaseId, collectionId, key, required, xdefault) {
1444
+ async updateUrlAttribute(databaseId, collectionId, key, required, xdefault, newKey) {
1408
1445
  if (typeof databaseId === "undefined") {
1409
1446
  throw new AppwriteException('Missing required parameter: "databaseId"');
1410
1447
  }
@@ -1428,6 +1465,9 @@ var Databases = class {
1428
1465
  if (typeof xdefault !== "undefined") {
1429
1466
  payload["default"] = xdefault;
1430
1467
  }
1468
+ if (typeof newKey !== "undefined") {
1469
+ payload["newKey"] = newKey;
1470
+ }
1431
1471
  const uri = new URL(this.client.config.endpoint + apiPath);
1432
1472
  const apiHeaders = {
1433
1473
  "content-type": "application/json"
@@ -1517,10 +1557,11 @@ var Databases = class {
1517
1557
  * @param {string} collectionId
1518
1558
  * @param {string} key
1519
1559
  * @param {RelationMutate} onDelete
1560
+ * @param {string} newKey
1520
1561
  * @throws {AppwriteException}
1521
1562
  * @returns {Promise<Models.AttributeRelationship>}
1522
1563
  */
1523
- async updateRelationshipAttribute(databaseId, collectionId, key, onDelete) {
1564
+ async updateRelationshipAttribute(databaseId, collectionId, key, onDelete, newKey) {
1524
1565
  if (typeof databaseId === "undefined") {
1525
1566
  throw new AppwriteException('Missing required parameter: "databaseId"');
1526
1567
  }
@@ -1535,6 +1576,9 @@ var Databases = class {
1535
1576
  if (typeof onDelete !== "undefined") {
1536
1577
  payload["onDelete"] = onDelete;
1537
1578
  }
1579
+ if (typeof newKey !== "undefined") {
1580
+ payload["newKey"] = newKey;
1581
+ }
1538
1582
  const uri = new URL(this.client.config.endpoint + apiPath);
1539
1583
  const apiHeaders = {
1540
1584
  "content-type": "application/json"