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
@@ -166,10 +166,11 @@ declare class Databases {
166
166
  * @param {string} key
167
167
  * @param {boolean} required
168
168
  * @param {boolean} xdefault
169
+ * @param {string} newKey
169
170
  * @throws {AppwriteException}
170
171
  * @returns {Promise<Models.AttributeBoolean>}
171
172
  */
172
- updateBooleanAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: boolean): Promise<Models.AttributeBoolean>;
173
+ updateBooleanAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: boolean, newKey?: string): Promise<Models.AttributeBoolean>;
173
174
  /**
174
175
  * Create datetime attribute
175
176
  *
@@ -195,10 +196,11 @@ declare class Databases {
195
196
  * @param {string} key
196
197
  * @param {boolean} required
197
198
  * @param {string} xdefault
199
+ * @param {string} newKey
198
200
  * @throws {AppwriteException}
199
201
  * @returns {Promise<Models.AttributeDatetime>}
200
202
  */
201
- updateDatetimeAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string): Promise<Models.AttributeDatetime>;
203
+ updateDatetimeAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, newKey?: string): Promise<Models.AttributeDatetime>;
202
204
  /**
203
205
  * Create email attribute
204
206
  *
@@ -226,10 +228,11 @@ declare class Databases {
226
228
  * @param {string} key
227
229
  * @param {boolean} required
228
230
  * @param {string} xdefault
231
+ * @param {string} newKey
229
232
  * @throws {AppwriteException}
230
233
  * @returns {Promise<Models.AttributeEmail>}
231
234
  */
232
- updateEmailAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string): Promise<Models.AttributeEmail>;
235
+ updateEmailAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, newKey?: string): Promise<Models.AttributeEmail>;
233
236
  /**
234
237
  * Create enum attribute
235
238
  *
@@ -259,10 +262,11 @@ declare class Databases {
259
262
  * @param {string[]} elements
260
263
  * @param {boolean} required
261
264
  * @param {string} xdefault
265
+ * @param {string} newKey
262
266
  * @throws {AppwriteException}
263
267
  * @returns {Promise<Models.AttributeEnum>}
264
268
  */
265
- updateEnumAttribute(databaseId: string, collectionId: string, key: string, elements: string[], required: boolean, xdefault?: string): Promise<Models.AttributeEnum>;
269
+ updateEnumAttribute(databaseId: string, collectionId: string, key: string, elements: string[], required: boolean, xdefault?: string, newKey?: string): Promise<Models.AttributeEnum>;
266
270
  /**
267
271
  * Create float attribute
268
272
  *
@@ -294,10 +298,11 @@ declare class Databases {
294
298
  * @param {number} min
295
299
  * @param {number} max
296
300
  * @param {number} xdefault
301
+ * @param {string} newKey
297
302
  * @throws {AppwriteException}
298
303
  * @returns {Promise<Models.AttributeFloat>}
299
304
  */
300
- updateFloatAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min: number, max: number, xdefault?: number): Promise<Models.AttributeFloat>;
305
+ updateFloatAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min: number, max: number, xdefault?: number, newKey?: string): Promise<Models.AttributeFloat>;
301
306
  /**
302
307
  * Create integer attribute
303
308
  *
@@ -329,10 +334,11 @@ declare class Databases {
329
334
  * @param {number} min
330
335
  * @param {number} max
331
336
  * @param {number} xdefault
337
+ * @param {string} newKey
332
338
  * @throws {AppwriteException}
333
339
  * @returns {Promise<Models.AttributeInteger>}
334
340
  */
335
- updateIntegerAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min: number, max: number, xdefault?: number): Promise<Models.AttributeInteger>;
341
+ updateIntegerAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min: number, max: number, xdefault?: number, newKey?: string): Promise<Models.AttributeInteger>;
336
342
  /**
337
343
  * Create IP address attribute
338
344
  *
@@ -360,10 +366,11 @@ declare class Databases {
360
366
  * @param {string} key
361
367
  * @param {boolean} required
362
368
  * @param {string} xdefault
369
+ * @param {string} newKey
363
370
  * @throws {AppwriteException}
364
371
  * @returns {Promise<Models.AttributeIp>}
365
372
  */
366
- updateIpAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string): Promise<Models.AttributeIp>;
373
+ updateIpAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, newKey?: string): Promise<Models.AttributeIp>;
367
374
  /**
368
375
  * Create relationship attribute
369
376
  *
@@ -411,10 +418,12 @@ declare class Databases {
411
418
  * @param {string} key
412
419
  * @param {boolean} required
413
420
  * @param {string} xdefault
421
+ * @param {number} size
422
+ * @param {string} newKey
414
423
  * @throws {AppwriteException}
415
424
  * @returns {Promise<Models.AttributeString>}
416
425
  */
417
- updateStringAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string): Promise<Models.AttributeString>;
426
+ updateStringAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, size?: number, newKey?: string): Promise<Models.AttributeString>;
418
427
  /**
419
428
  * Create URL attribute
420
429
  *
@@ -442,10 +451,11 @@ declare class Databases {
442
451
  * @param {string} key
443
452
  * @param {boolean} required
444
453
  * @param {string} xdefault
454
+ * @param {string} newKey
445
455
  * @throws {AppwriteException}
446
456
  * @returns {Promise<Models.AttributeUrl>}
447
457
  */
448
- updateUrlAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string): Promise<Models.AttributeUrl>;
458
+ updateUrlAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, newKey?: string): Promise<Models.AttributeUrl>;
449
459
  /**
450
460
  * Get attribute
451
461
  *
@@ -480,10 +490,11 @@ declare class Databases {
480
490
  * @param {string} collectionId
481
491
  * @param {string} key
482
492
  * @param {RelationMutate} onDelete
493
+ * @param {string} newKey
483
494
  * @throws {AppwriteException}
484
495
  * @returns {Promise<Models.AttributeRelationship>}
485
496
  */
486
- updateRelationshipAttribute(databaseId: string, collectionId: string, key: string, onDelete?: RelationMutate): Promise<Models.AttributeRelationship>;
497
+ updateRelationshipAttribute(databaseId: string, collectionId: string, key: string, onDelete?: RelationMutate, newKey?: string): Promise<Models.AttributeRelationship>;
487
498
  /**
488
499
  * List documents
489
500
  *
@@ -458,10 +458,11 @@ class Databases {
458
458
  * @param {string} key
459
459
  * @param {boolean} required
460
460
  * @param {boolean} xdefault
461
+ * @param {string} newKey
461
462
  * @throws {AppwriteException}
462
463
  * @returns {Promise<Models.AttributeBoolean>}
463
464
  */
464
- async updateBooleanAttribute(databaseId, collectionId, key, required, xdefault) {
465
+ async updateBooleanAttribute(databaseId, collectionId, key, required, xdefault, newKey) {
465
466
  if (typeof databaseId === "undefined") {
466
467
  throw new client.AppwriteException('Missing required parameter: "databaseId"');
467
468
  }
@@ -485,6 +486,9 @@ class Databases {
485
486
  if (typeof xdefault !== "undefined") {
486
487
  payload["default"] = xdefault;
487
488
  }
489
+ if (typeof newKey !== "undefined") {
490
+ payload["newKey"] = newKey;
491
+ }
488
492
  const uri = new URL(this.client.config.endpoint + apiPath);
489
493
  const apiHeaders = {
490
494
  "content-type": "application/json"
@@ -558,10 +562,11 @@ class Databases {
558
562
  * @param {string} key
559
563
  * @param {boolean} required
560
564
  * @param {string} xdefault
565
+ * @param {string} newKey
561
566
  * @throws {AppwriteException}
562
567
  * @returns {Promise<Models.AttributeDatetime>}
563
568
  */
564
- async updateDatetimeAttribute(databaseId, collectionId, key, required, xdefault) {
569
+ async updateDatetimeAttribute(databaseId, collectionId, key, required, xdefault, newKey) {
565
570
  if (typeof databaseId === "undefined") {
566
571
  throw new client.AppwriteException('Missing required parameter: "databaseId"');
567
572
  }
@@ -585,6 +590,9 @@ class Databases {
585
590
  if (typeof xdefault !== "undefined") {
586
591
  payload["default"] = xdefault;
587
592
  }
593
+ if (typeof newKey !== "undefined") {
594
+ payload["newKey"] = newKey;
595
+ }
588
596
  const uri = new URL(this.client.config.endpoint + apiPath);
589
597
  const apiHeaders = {
590
598
  "content-type": "application/json"
@@ -660,10 +668,11 @@ class Databases {
660
668
  * @param {string} key
661
669
  * @param {boolean} required
662
670
  * @param {string} xdefault
671
+ * @param {string} newKey
663
672
  * @throws {AppwriteException}
664
673
  * @returns {Promise<Models.AttributeEmail>}
665
674
  */
666
- async updateEmailAttribute(databaseId, collectionId, key, required, xdefault) {
675
+ async updateEmailAttribute(databaseId, collectionId, key, required, xdefault, newKey) {
667
676
  if (typeof databaseId === "undefined") {
668
677
  throw new client.AppwriteException('Missing required parameter: "databaseId"');
669
678
  }
@@ -687,6 +696,9 @@ class Databases {
687
696
  if (typeof xdefault !== "undefined") {
688
697
  payload["default"] = xdefault;
689
698
  }
699
+ if (typeof newKey !== "undefined") {
700
+ payload["newKey"] = newKey;
701
+ }
690
702
  const uri = new URL(this.client.config.endpoint + apiPath);
691
703
  const apiHeaders = {
692
704
  "content-type": "application/json"
@@ -770,10 +782,11 @@ class Databases {
770
782
  * @param {string[]} elements
771
783
  * @param {boolean} required
772
784
  * @param {string} xdefault
785
+ * @param {string} newKey
773
786
  * @throws {AppwriteException}
774
787
  * @returns {Promise<Models.AttributeEnum>}
775
788
  */
776
- async updateEnumAttribute(databaseId, collectionId, key, elements, required, xdefault) {
789
+ async updateEnumAttribute(databaseId, collectionId, key, elements, required, xdefault, newKey) {
777
790
  if (typeof databaseId === "undefined") {
778
791
  throw new client.AppwriteException('Missing required parameter: "databaseId"');
779
792
  }
@@ -803,6 +816,9 @@ class Databases {
803
816
  if (typeof xdefault !== "undefined") {
804
817
  payload["default"] = xdefault;
805
818
  }
819
+ if (typeof newKey !== "undefined") {
820
+ payload["newKey"] = newKey;
821
+ }
806
822
  const uri = new URL(this.client.config.endpoint + apiPath);
807
823
  const apiHeaders = {
808
824
  "content-type": "application/json"
@@ -888,10 +904,11 @@ class Databases {
888
904
  * @param {number} min
889
905
  * @param {number} max
890
906
  * @param {number} xdefault
907
+ * @param {string} newKey
891
908
  * @throws {AppwriteException}
892
909
  * @returns {Promise<Models.AttributeFloat>}
893
910
  */
894
- async updateFloatAttribute(databaseId, collectionId, key, required, min, max, xdefault) {
911
+ async updateFloatAttribute(databaseId, collectionId, key, required, min, max, xdefault, newKey) {
895
912
  if (typeof databaseId === "undefined") {
896
913
  throw new client.AppwriteException('Missing required parameter: "databaseId"');
897
914
  }
@@ -927,6 +944,9 @@ class Databases {
927
944
  if (typeof xdefault !== "undefined") {
928
945
  payload["default"] = xdefault;
929
946
  }
947
+ if (typeof newKey !== "undefined") {
948
+ payload["newKey"] = newKey;
949
+ }
930
950
  const uri = new URL(this.client.config.endpoint + apiPath);
931
951
  const apiHeaders = {
932
952
  "content-type": "application/json"
@@ -1012,10 +1032,11 @@ class Databases {
1012
1032
  * @param {number} min
1013
1033
  * @param {number} max
1014
1034
  * @param {number} xdefault
1035
+ * @param {string} newKey
1015
1036
  * @throws {AppwriteException}
1016
1037
  * @returns {Promise<Models.AttributeInteger>}
1017
1038
  */
1018
- async updateIntegerAttribute(databaseId, collectionId, key, required, min, max, xdefault) {
1039
+ async updateIntegerAttribute(databaseId, collectionId, key, required, min, max, xdefault, newKey) {
1019
1040
  if (typeof databaseId === "undefined") {
1020
1041
  throw new client.AppwriteException('Missing required parameter: "databaseId"');
1021
1042
  }
@@ -1051,6 +1072,9 @@ class Databases {
1051
1072
  if (typeof xdefault !== "undefined") {
1052
1073
  payload["default"] = xdefault;
1053
1074
  }
1075
+ if (typeof newKey !== "undefined") {
1076
+ payload["newKey"] = newKey;
1077
+ }
1054
1078
  const uri = new URL(this.client.config.endpoint + apiPath);
1055
1079
  const apiHeaders = {
1056
1080
  "content-type": "application/json"
@@ -1126,10 +1150,11 @@ class Databases {
1126
1150
  * @param {string} key
1127
1151
  * @param {boolean} required
1128
1152
  * @param {string} xdefault
1153
+ * @param {string} newKey
1129
1154
  * @throws {AppwriteException}
1130
1155
  * @returns {Promise<Models.AttributeIp>}
1131
1156
  */
1132
- async updateIpAttribute(databaseId, collectionId, key, required, xdefault) {
1157
+ async updateIpAttribute(databaseId, collectionId, key, required, xdefault, newKey) {
1133
1158
  if (typeof databaseId === "undefined") {
1134
1159
  throw new client.AppwriteException('Missing required parameter: "databaseId"');
1135
1160
  }
@@ -1153,6 +1178,9 @@ class Databases {
1153
1178
  if (typeof xdefault !== "undefined") {
1154
1179
  payload["default"] = xdefault;
1155
1180
  }
1181
+ if (typeof newKey !== "undefined") {
1182
+ payload["newKey"] = newKey;
1183
+ }
1156
1184
  const uri = new URL(this.client.config.endpoint + apiPath);
1157
1185
  const apiHeaders = {
1158
1186
  "content-type": "application/json"
@@ -1300,10 +1328,12 @@ class Databases {
1300
1328
  * @param {string} key
1301
1329
  * @param {boolean} required
1302
1330
  * @param {string} xdefault
1331
+ * @param {number} size
1332
+ * @param {string} newKey
1303
1333
  * @throws {AppwriteException}
1304
1334
  * @returns {Promise<Models.AttributeString>}
1305
1335
  */
1306
- async updateStringAttribute(databaseId, collectionId, key, required, xdefault) {
1336
+ async updateStringAttribute(databaseId, collectionId, key, required, xdefault, size, newKey) {
1307
1337
  if (typeof databaseId === "undefined") {
1308
1338
  throw new client.AppwriteException('Missing required parameter: "databaseId"');
1309
1339
  }
@@ -1327,6 +1357,12 @@ class Databases {
1327
1357
  if (typeof xdefault !== "undefined") {
1328
1358
  payload["default"] = xdefault;
1329
1359
  }
1360
+ if (typeof size !== "undefined") {
1361
+ payload["size"] = size;
1362
+ }
1363
+ if (typeof newKey !== "undefined") {
1364
+ payload["newKey"] = newKey;
1365
+ }
1330
1366
  const uri = new URL(this.client.config.endpoint + apiPath);
1331
1367
  const apiHeaders = {
1332
1368
  "content-type": "application/json"
@@ -1402,10 +1438,11 @@ class Databases {
1402
1438
  * @param {string} key
1403
1439
  * @param {boolean} required
1404
1440
  * @param {string} xdefault
1441
+ * @param {string} newKey
1405
1442
  * @throws {AppwriteException}
1406
1443
  * @returns {Promise<Models.AttributeUrl>}
1407
1444
  */
1408
- async updateUrlAttribute(databaseId, collectionId, key, required, xdefault) {
1445
+ async updateUrlAttribute(databaseId, collectionId, key, required, xdefault, newKey) {
1409
1446
  if (typeof databaseId === "undefined") {
1410
1447
  throw new client.AppwriteException('Missing required parameter: "databaseId"');
1411
1448
  }
@@ -1429,6 +1466,9 @@ class Databases {
1429
1466
  if (typeof xdefault !== "undefined") {
1430
1467
  payload["default"] = xdefault;
1431
1468
  }
1469
+ if (typeof newKey !== "undefined") {
1470
+ payload["newKey"] = newKey;
1471
+ }
1432
1472
  const uri = new URL(this.client.config.endpoint + apiPath);
1433
1473
  const apiHeaders = {
1434
1474
  "content-type": "application/json"
@@ -1518,10 +1558,11 @@ class Databases {
1518
1558
  * @param {string} collectionId
1519
1559
  * @param {string} key
1520
1560
  * @param {RelationMutate} onDelete
1561
+ * @param {string} newKey
1521
1562
  * @throws {AppwriteException}
1522
1563
  * @returns {Promise<Models.AttributeRelationship>}
1523
1564
  */
1524
- async updateRelationshipAttribute(databaseId, collectionId, key, onDelete) {
1565
+ async updateRelationshipAttribute(databaseId, collectionId, key, onDelete, newKey) {
1525
1566
  if (typeof databaseId === "undefined") {
1526
1567
  throw new client.AppwriteException('Missing required parameter: "databaseId"');
1527
1568
  }
@@ -1536,6 +1577,9 @@ class Databases {
1536
1577
  if (typeof onDelete !== "undefined") {
1537
1578
  payload["onDelete"] = onDelete;
1538
1579
  }
1580
+ if (typeof newKey !== "undefined") {
1581
+ payload["newKey"] = newKey;
1582
+ }
1539
1583
  const uri = new URL(this.client.config.endpoint + apiPath);
1540
1584
  const apiHeaders = {
1541
1585
  "content-type": "application/json"