node-appwrite 14.0.0 → 14.1.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.
- package/dist/client.js +2 -2
- package/dist/client.js.map +1 -1
- package/dist/client.mjs +2 -2
- package/dist/client.mjs.map +1 -1
- package/dist/services/databases.d.mts +21 -10
- package/dist/services/databases.d.ts +21 -10
- package/dist/services/databases.js +54 -10
- package/dist/services/databases.js.map +1 -1
- package/dist/services/databases.mjs +54 -10
- package/dist/services/databases.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -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"
|