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