node-appwrite 20.1.0 → 20.3.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/enums/execution-status.d.mts +2 -1
- package/dist/enums/execution-status.d.ts +2 -1
- package/dist/enums/execution-status.js +1 -0
- package/dist/enums/execution-status.js.map +1 -1
- package/dist/enums/execution-status.mjs +1 -0
- package/dist/enums/execution-status.mjs.map +1 -1
- package/dist/enums/framework.d.mts +1 -0
- package/dist/enums/framework.d.ts +1 -0
- package/dist/enums/framework.js +1 -0
- package/dist/enums/framework.js.map +1 -1
- package/dist/enums/framework.mjs +1 -0
- package/dist/enums/framework.mjs.map +1 -1
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -0
- package/dist/index.mjs.map +1 -1
- package/dist/models.d.mts +43 -1
- package/dist/models.d.ts +43 -1
- package/dist/operator.d.mts +181 -0
- package/dist/operator.d.ts +181 -0
- package/dist/operator.js +268 -0
- package/dist/operator.js.map +1 -0
- package/dist/operator.mjs +266 -0
- package/dist/operator.mjs.map +1 -0
- package/dist/query.js +6 -6
- package/dist/query.js.map +1 -1
- package/dist/query.mjs +6 -6
- package/dist/query.mjs.map +1 -1
- package/dist/services/account.d.mts +8 -2
- package/dist/services/account.d.ts +8 -2
- package/dist/services/account.js +14 -4
- package/dist/services/account.js.map +1 -1
- package/dist/services/account.mjs +14 -4
- package/dist/services/account.mjs.map +1 -1
- package/dist/services/databases.d.mts +192 -18
- package/dist/services/databases.d.ts +192 -18
- package/dist/services/databases.js +268 -16
- package/dist/services/databases.js.map +1 -1
- package/dist/services/databases.mjs +268 -16
- package/dist/services/databases.mjs.map +1 -1
- package/dist/services/functions.d.mts +12 -3
- package/dist/services/functions.d.ts +12 -3
- package/dist/services/functions.js +18 -3
- package/dist/services/functions.js.map +1 -1
- package/dist/services/functions.mjs +18 -3
- package/dist/services/functions.mjs.map +1 -1
- package/dist/services/messaging.d.mts +116 -9
- package/dist/services/messaging.d.ts +116 -9
- package/dist/services/messaging.js +182 -9
- package/dist/services/messaging.js.map +1 -1
- package/dist/services/messaging.mjs +182 -9
- package/dist/services/messaging.mjs.map +1 -1
- package/dist/services/sites.d.mts +12 -3
- package/dist/services/sites.d.ts +12 -3
- package/dist/services/sites.js +18 -3
- package/dist/services/sites.js.map +1 -1
- package/dist/services/sites.mjs +18 -3
- package/dist/services/sites.mjs.map +1 -1
- package/dist/services/storage.d.mts +8 -2
- package/dist/services/storage.d.ts +8 -2
- package/dist/services/storage.js +12 -2
- package/dist/services/storage.js.map +1 -1
- package/dist/services/storage.mjs +12 -2
- package/dist/services/storage.mjs.map +1 -1
- package/dist/services/tables-db.d.mts +190 -16
- package/dist/services/tables-db.d.ts +190 -16
- package/dist/services/tables-db.js +268 -16
- package/dist/services/tables-db.js.map +1 -1
- package/dist/services/tables-db.mjs +268 -16
- package/dist/services/tables-db.mjs.map +1 -1
- package/dist/services/teams.d.mts +8 -2
- package/dist/services/teams.d.ts +8 -2
- package/dist/services/teams.js +12 -2
- package/dist/services/teams.js.map +1 -1
- package/dist/services/teams.mjs +12 -2
- package/dist/services/teams.mjs.map +1 -1
- package/dist/services/tokens.d.mts +4 -1
- package/dist/services/tokens.d.ts +4 -1
- package/dist/services/tokens.js +6 -1
- package/dist/services/tokens.js.map +1 -1
- package/dist/services/tokens.mjs +6 -1
- package/dist/services/tokens.mjs.map +1 -1
- package/dist/services/users.d.mts +24 -6
- package/dist/services/users.d.ts +24 -6
- package/dist/services/users.js +37 -7
- package/dist/services/users.js.map +1 -1
- package/dist/services/users.mjs +37 -7
- package/dist/services/users.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -12,11 +12,13 @@ var Messaging = class {
|
|
|
12
12
|
} else {
|
|
13
13
|
params = {
|
|
14
14
|
queries: paramsOrFirst,
|
|
15
|
-
search: rest[0]
|
|
15
|
+
search: rest[0],
|
|
16
|
+
total: rest[1]
|
|
16
17
|
};
|
|
17
18
|
}
|
|
18
19
|
const queries = params.queries;
|
|
19
20
|
const search = params.search;
|
|
21
|
+
const total = params.total;
|
|
20
22
|
const apiPath = "/messaging/messages";
|
|
21
23
|
const payload = {};
|
|
22
24
|
if (typeof queries !== "undefined") {
|
|
@@ -25,6 +27,9 @@ var Messaging = class {
|
|
|
25
27
|
if (typeof search !== "undefined") {
|
|
26
28
|
payload["search"] = search;
|
|
27
29
|
}
|
|
30
|
+
if (typeof total !== "undefined") {
|
|
31
|
+
payload["total"] = total;
|
|
32
|
+
}
|
|
28
33
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
29
34
|
const apiHeaders = {};
|
|
30
35
|
return this.client.call(
|
|
@@ -733,11 +738,13 @@ var Messaging = class {
|
|
|
733
738
|
} else {
|
|
734
739
|
params = {
|
|
735
740
|
messageId: paramsOrFirst,
|
|
736
|
-
queries: rest[0]
|
|
741
|
+
queries: rest[0],
|
|
742
|
+
total: rest[1]
|
|
737
743
|
};
|
|
738
744
|
}
|
|
739
745
|
const messageId = params.messageId;
|
|
740
746
|
const queries = params.queries;
|
|
747
|
+
const total = params.total;
|
|
741
748
|
if (typeof messageId === "undefined") {
|
|
742
749
|
throw new AppwriteException('Missing required parameter: "messageId"');
|
|
743
750
|
}
|
|
@@ -746,6 +753,9 @@ var Messaging = class {
|
|
|
746
753
|
if (typeof queries !== "undefined") {
|
|
747
754
|
payload["queries"] = queries;
|
|
748
755
|
}
|
|
756
|
+
if (typeof total !== "undefined") {
|
|
757
|
+
payload["total"] = total;
|
|
758
|
+
}
|
|
749
759
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
750
760
|
const apiHeaders = {};
|
|
751
761
|
return this.client.call(
|
|
@@ -762,11 +772,13 @@ var Messaging = class {
|
|
|
762
772
|
} else {
|
|
763
773
|
params = {
|
|
764
774
|
messageId: paramsOrFirst,
|
|
765
|
-
queries: rest[0]
|
|
775
|
+
queries: rest[0],
|
|
776
|
+
total: rest[1]
|
|
766
777
|
};
|
|
767
778
|
}
|
|
768
779
|
const messageId = params.messageId;
|
|
769
780
|
const queries = params.queries;
|
|
781
|
+
const total = params.total;
|
|
770
782
|
if (typeof messageId === "undefined") {
|
|
771
783
|
throw new AppwriteException('Missing required parameter: "messageId"');
|
|
772
784
|
}
|
|
@@ -775,6 +787,9 @@ var Messaging = class {
|
|
|
775
787
|
if (typeof queries !== "undefined") {
|
|
776
788
|
payload["queries"] = queries;
|
|
777
789
|
}
|
|
790
|
+
if (typeof total !== "undefined") {
|
|
791
|
+
payload["total"] = total;
|
|
792
|
+
}
|
|
778
793
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
779
794
|
const apiHeaders = {};
|
|
780
795
|
return this.client.call(
|
|
@@ -791,11 +806,13 @@ var Messaging = class {
|
|
|
791
806
|
} else {
|
|
792
807
|
params = {
|
|
793
808
|
queries: paramsOrFirst,
|
|
794
|
-
search: rest[0]
|
|
809
|
+
search: rest[0],
|
|
810
|
+
total: rest[1]
|
|
795
811
|
};
|
|
796
812
|
}
|
|
797
813
|
const queries = params.queries;
|
|
798
814
|
const search = params.search;
|
|
815
|
+
const total = params.total;
|
|
799
816
|
const apiPath = "/messaging/providers";
|
|
800
817
|
const payload = {};
|
|
801
818
|
if (typeof queries !== "undefined") {
|
|
@@ -804,6 +821,9 @@ var Messaging = class {
|
|
|
804
821
|
if (typeof search !== "undefined") {
|
|
805
822
|
payload["search"] = search;
|
|
806
823
|
}
|
|
824
|
+
if (typeof total !== "undefined") {
|
|
825
|
+
payload["total"] = total;
|
|
826
|
+
}
|
|
807
827
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
808
828
|
const apiHeaders = {};
|
|
809
829
|
return this.client.call(
|
|
@@ -1501,6 +1521,134 @@ var Messaging = class {
|
|
|
1501
1521
|
payload
|
|
1502
1522
|
);
|
|
1503
1523
|
}
|
|
1524
|
+
createResendProvider(paramsOrFirst, ...rest) {
|
|
1525
|
+
let params;
|
|
1526
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
1527
|
+
params = paramsOrFirst || {};
|
|
1528
|
+
} else {
|
|
1529
|
+
params = {
|
|
1530
|
+
providerId: paramsOrFirst,
|
|
1531
|
+
name: rest[0],
|
|
1532
|
+
apiKey: rest[1],
|
|
1533
|
+
fromName: rest[2],
|
|
1534
|
+
fromEmail: rest[3],
|
|
1535
|
+
replyToName: rest[4],
|
|
1536
|
+
replyToEmail: rest[5],
|
|
1537
|
+
enabled: rest[6]
|
|
1538
|
+
};
|
|
1539
|
+
}
|
|
1540
|
+
const providerId = params.providerId;
|
|
1541
|
+
const name = params.name;
|
|
1542
|
+
const apiKey = params.apiKey;
|
|
1543
|
+
const fromName = params.fromName;
|
|
1544
|
+
const fromEmail = params.fromEmail;
|
|
1545
|
+
const replyToName = params.replyToName;
|
|
1546
|
+
const replyToEmail = params.replyToEmail;
|
|
1547
|
+
const enabled = params.enabled;
|
|
1548
|
+
if (typeof providerId === "undefined") {
|
|
1549
|
+
throw new AppwriteException('Missing required parameter: "providerId"');
|
|
1550
|
+
}
|
|
1551
|
+
if (typeof name === "undefined") {
|
|
1552
|
+
throw new AppwriteException('Missing required parameter: "name"');
|
|
1553
|
+
}
|
|
1554
|
+
const apiPath = "/messaging/providers/resend";
|
|
1555
|
+
const payload = {};
|
|
1556
|
+
if (typeof providerId !== "undefined") {
|
|
1557
|
+
payload["providerId"] = providerId;
|
|
1558
|
+
}
|
|
1559
|
+
if (typeof name !== "undefined") {
|
|
1560
|
+
payload["name"] = name;
|
|
1561
|
+
}
|
|
1562
|
+
if (typeof apiKey !== "undefined") {
|
|
1563
|
+
payload["apiKey"] = apiKey;
|
|
1564
|
+
}
|
|
1565
|
+
if (typeof fromName !== "undefined") {
|
|
1566
|
+
payload["fromName"] = fromName;
|
|
1567
|
+
}
|
|
1568
|
+
if (typeof fromEmail !== "undefined") {
|
|
1569
|
+
payload["fromEmail"] = fromEmail;
|
|
1570
|
+
}
|
|
1571
|
+
if (typeof replyToName !== "undefined") {
|
|
1572
|
+
payload["replyToName"] = replyToName;
|
|
1573
|
+
}
|
|
1574
|
+
if (typeof replyToEmail !== "undefined") {
|
|
1575
|
+
payload["replyToEmail"] = replyToEmail;
|
|
1576
|
+
}
|
|
1577
|
+
if (typeof enabled !== "undefined") {
|
|
1578
|
+
payload["enabled"] = enabled;
|
|
1579
|
+
}
|
|
1580
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1581
|
+
const apiHeaders = {
|
|
1582
|
+
"content-type": "application/json"
|
|
1583
|
+
};
|
|
1584
|
+
return this.client.call(
|
|
1585
|
+
"post",
|
|
1586
|
+
uri,
|
|
1587
|
+
apiHeaders,
|
|
1588
|
+
payload
|
|
1589
|
+
);
|
|
1590
|
+
}
|
|
1591
|
+
updateResendProvider(paramsOrFirst, ...rest) {
|
|
1592
|
+
let params;
|
|
1593
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
1594
|
+
params = paramsOrFirst || {};
|
|
1595
|
+
} else {
|
|
1596
|
+
params = {
|
|
1597
|
+
providerId: paramsOrFirst,
|
|
1598
|
+
name: rest[0],
|
|
1599
|
+
enabled: rest[1],
|
|
1600
|
+
apiKey: rest[2],
|
|
1601
|
+
fromName: rest[3],
|
|
1602
|
+
fromEmail: rest[4],
|
|
1603
|
+
replyToName: rest[5],
|
|
1604
|
+
replyToEmail: rest[6]
|
|
1605
|
+
};
|
|
1606
|
+
}
|
|
1607
|
+
const providerId = params.providerId;
|
|
1608
|
+
const name = params.name;
|
|
1609
|
+
const enabled = params.enabled;
|
|
1610
|
+
const apiKey = params.apiKey;
|
|
1611
|
+
const fromName = params.fromName;
|
|
1612
|
+
const fromEmail = params.fromEmail;
|
|
1613
|
+
const replyToName = params.replyToName;
|
|
1614
|
+
const replyToEmail = params.replyToEmail;
|
|
1615
|
+
if (typeof providerId === "undefined") {
|
|
1616
|
+
throw new AppwriteException('Missing required parameter: "providerId"');
|
|
1617
|
+
}
|
|
1618
|
+
const apiPath = "/messaging/providers/resend/{providerId}".replace("{providerId}", providerId);
|
|
1619
|
+
const payload = {};
|
|
1620
|
+
if (typeof name !== "undefined") {
|
|
1621
|
+
payload["name"] = name;
|
|
1622
|
+
}
|
|
1623
|
+
if (typeof enabled !== "undefined") {
|
|
1624
|
+
payload["enabled"] = enabled;
|
|
1625
|
+
}
|
|
1626
|
+
if (typeof apiKey !== "undefined") {
|
|
1627
|
+
payload["apiKey"] = apiKey;
|
|
1628
|
+
}
|
|
1629
|
+
if (typeof fromName !== "undefined") {
|
|
1630
|
+
payload["fromName"] = fromName;
|
|
1631
|
+
}
|
|
1632
|
+
if (typeof fromEmail !== "undefined") {
|
|
1633
|
+
payload["fromEmail"] = fromEmail;
|
|
1634
|
+
}
|
|
1635
|
+
if (typeof replyToName !== "undefined") {
|
|
1636
|
+
payload["replyToName"] = replyToName;
|
|
1637
|
+
}
|
|
1638
|
+
if (typeof replyToEmail !== "undefined") {
|
|
1639
|
+
payload["replyToEmail"] = replyToEmail;
|
|
1640
|
+
}
|
|
1641
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1642
|
+
const apiHeaders = {
|
|
1643
|
+
"content-type": "application/json"
|
|
1644
|
+
};
|
|
1645
|
+
return this.client.call(
|
|
1646
|
+
"patch",
|
|
1647
|
+
uri,
|
|
1648
|
+
apiHeaders,
|
|
1649
|
+
payload
|
|
1650
|
+
);
|
|
1651
|
+
}
|
|
1504
1652
|
createSendgridProvider(paramsOrFirst, ...rest) {
|
|
1505
1653
|
let params;
|
|
1506
1654
|
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
@@ -2500,11 +2648,13 @@ var Messaging = class {
|
|
|
2500
2648
|
} else {
|
|
2501
2649
|
params = {
|
|
2502
2650
|
providerId: paramsOrFirst,
|
|
2503
|
-
queries: rest[0]
|
|
2651
|
+
queries: rest[0],
|
|
2652
|
+
total: rest[1]
|
|
2504
2653
|
};
|
|
2505
2654
|
}
|
|
2506
2655
|
const providerId = params.providerId;
|
|
2507
2656
|
const queries = params.queries;
|
|
2657
|
+
const total = params.total;
|
|
2508
2658
|
if (typeof providerId === "undefined") {
|
|
2509
2659
|
throw new AppwriteException('Missing required parameter: "providerId"');
|
|
2510
2660
|
}
|
|
@@ -2513,6 +2663,9 @@ var Messaging = class {
|
|
|
2513
2663
|
if (typeof queries !== "undefined") {
|
|
2514
2664
|
payload["queries"] = queries;
|
|
2515
2665
|
}
|
|
2666
|
+
if (typeof total !== "undefined") {
|
|
2667
|
+
payload["total"] = total;
|
|
2668
|
+
}
|
|
2516
2669
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2517
2670
|
const apiHeaders = {};
|
|
2518
2671
|
return this.client.call(
|
|
@@ -2529,11 +2682,13 @@ var Messaging = class {
|
|
|
2529
2682
|
} else {
|
|
2530
2683
|
params = {
|
|
2531
2684
|
subscriberId: paramsOrFirst,
|
|
2532
|
-
queries: rest[0]
|
|
2685
|
+
queries: rest[0],
|
|
2686
|
+
total: rest[1]
|
|
2533
2687
|
};
|
|
2534
2688
|
}
|
|
2535
2689
|
const subscriberId = params.subscriberId;
|
|
2536
2690
|
const queries = params.queries;
|
|
2691
|
+
const total = params.total;
|
|
2537
2692
|
if (typeof subscriberId === "undefined") {
|
|
2538
2693
|
throw new AppwriteException('Missing required parameter: "subscriberId"');
|
|
2539
2694
|
}
|
|
@@ -2542,6 +2697,9 @@ var Messaging = class {
|
|
|
2542
2697
|
if (typeof queries !== "undefined") {
|
|
2543
2698
|
payload["queries"] = queries;
|
|
2544
2699
|
}
|
|
2700
|
+
if (typeof total !== "undefined") {
|
|
2701
|
+
payload["total"] = total;
|
|
2702
|
+
}
|
|
2545
2703
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2546
2704
|
const apiHeaders = {};
|
|
2547
2705
|
return this.client.call(
|
|
@@ -2558,11 +2716,13 @@ var Messaging = class {
|
|
|
2558
2716
|
} else {
|
|
2559
2717
|
params = {
|
|
2560
2718
|
queries: paramsOrFirst,
|
|
2561
|
-
search: rest[0]
|
|
2719
|
+
search: rest[0],
|
|
2720
|
+
total: rest[1]
|
|
2562
2721
|
};
|
|
2563
2722
|
}
|
|
2564
2723
|
const queries = params.queries;
|
|
2565
2724
|
const search = params.search;
|
|
2725
|
+
const total = params.total;
|
|
2566
2726
|
const apiPath = "/messaging/topics";
|
|
2567
2727
|
const payload = {};
|
|
2568
2728
|
if (typeof queries !== "undefined") {
|
|
@@ -2571,6 +2731,9 @@ var Messaging = class {
|
|
|
2571
2731
|
if (typeof search !== "undefined") {
|
|
2572
2732
|
payload["search"] = search;
|
|
2573
2733
|
}
|
|
2734
|
+
if (typeof total !== "undefined") {
|
|
2735
|
+
payload["total"] = total;
|
|
2736
|
+
}
|
|
2574
2737
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2575
2738
|
const apiHeaders = {};
|
|
2576
2739
|
return this.client.call(
|
|
@@ -2715,11 +2878,13 @@ var Messaging = class {
|
|
|
2715
2878
|
} else {
|
|
2716
2879
|
params = {
|
|
2717
2880
|
topicId: paramsOrFirst,
|
|
2718
|
-
queries: rest[0]
|
|
2881
|
+
queries: rest[0],
|
|
2882
|
+
total: rest[1]
|
|
2719
2883
|
};
|
|
2720
2884
|
}
|
|
2721
2885
|
const topicId = params.topicId;
|
|
2722
2886
|
const queries = params.queries;
|
|
2887
|
+
const total = params.total;
|
|
2723
2888
|
if (typeof topicId === "undefined") {
|
|
2724
2889
|
throw new AppwriteException('Missing required parameter: "topicId"');
|
|
2725
2890
|
}
|
|
@@ -2728,6 +2893,9 @@ var Messaging = class {
|
|
|
2728
2893
|
if (typeof queries !== "undefined") {
|
|
2729
2894
|
payload["queries"] = queries;
|
|
2730
2895
|
}
|
|
2896
|
+
if (typeof total !== "undefined") {
|
|
2897
|
+
payload["total"] = total;
|
|
2898
|
+
}
|
|
2731
2899
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2732
2900
|
const apiHeaders = {};
|
|
2733
2901
|
return this.client.call(
|
|
@@ -2745,12 +2913,14 @@ var Messaging = class {
|
|
|
2745
2913
|
params = {
|
|
2746
2914
|
topicId: paramsOrFirst,
|
|
2747
2915
|
queries: rest[0],
|
|
2748
|
-
search: rest[1]
|
|
2916
|
+
search: rest[1],
|
|
2917
|
+
total: rest[2]
|
|
2749
2918
|
};
|
|
2750
2919
|
}
|
|
2751
2920
|
const topicId = params.topicId;
|
|
2752
2921
|
const queries = params.queries;
|
|
2753
2922
|
const search = params.search;
|
|
2923
|
+
const total = params.total;
|
|
2754
2924
|
if (typeof topicId === "undefined") {
|
|
2755
2925
|
throw new AppwriteException('Missing required parameter: "topicId"');
|
|
2756
2926
|
}
|
|
@@ -2762,6 +2932,9 @@ var Messaging = class {
|
|
|
2762
2932
|
if (typeof search !== "undefined") {
|
|
2763
2933
|
payload["search"] = search;
|
|
2764
2934
|
}
|
|
2935
|
+
if (typeof total !== "undefined") {
|
|
2936
|
+
payload["total"] = total;
|
|
2937
|
+
}
|
|
2765
2938
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2766
2939
|
const apiHeaders = {};
|
|
2767
2940
|
return this.client.call(
|