@oneuptime/common 10.2.3 → 10.2.6
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/Models/DatabaseModels/Index.ts +2 -0
- package/Models/DatabaseModels/Service.ts +26 -0
- package/Models/DatabaseModels/StatusPage.ts +43 -0
- package/Models/DatabaseModels/StatusPageOidc.ts +689 -0
- package/Server/API/StatusPageAPI.ts +78 -3
- package/Server/Infrastructure/Postgres/SchemaMigrations/1778521361934-MigrationName.ts +17 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1778522070962-AddStatusPageOIDC.ts +63 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1778582583897-MigrationName.ts +15 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +6 -0
- package/Server/Services/Index.ts +2 -0
- package/Server/Services/OpenTelemetryIngestService.ts +15 -0
- package/Server/Services/ScheduledMaintenanceService.ts +34 -0
- package/Server/Services/ServiceService.ts +37 -0
- package/Server/Services/StatusPageOidcService.ts +10 -0
- package/Server/Services/StatusPageSubscriberService.ts +101 -0
- package/Server/Types/Database/QueryHelper.ts +38 -0
- package/Server/Types/Database/QueryUtil.ts +77 -0
- package/Server/Utils/AnalyticsDatabase/StatementGenerator.ts +52 -0
- package/Server/Utils/StatusPageSubscriberWebhook.ts +39 -0
- package/Types/BaseDatabase/MultiSearch.ts +53 -0
- package/Types/Dashboard/DashboardComponents/ComponentArgument.ts +1 -0
- package/Types/Dashboard/DashboardComponents/DashboardChartComponent.ts +2 -0
- package/Types/JSON.ts +3 -0
- package/Types/Permission.ts +46 -0
- package/Types/SerializableObjectDictionary.ts +2 -0
- package/UI/Components/ModelTable/BaseModelTable.tsx +988 -4
- package/Utils/Dashboard/Components/DashboardChartComponent.ts +11 -0
- package/build/dist/Models/DatabaseModels/Index.js +2 -0
- package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Service.js +28 -0
- package/build/dist/Models/DatabaseModels/Service.js.map +1 -1
- package/build/dist/Models/DatabaseModels/StatusPage.js +45 -0
- package/build/dist/Models/DatabaseModels/StatusPage.js.map +1 -1
- package/build/dist/Models/DatabaseModels/StatusPageOidc.js +718 -0
- package/build/dist/Models/DatabaseModels/StatusPageOidc.js.map +1 -0
- package/build/dist/Server/API/StatusPageAPI.js +80 -35
- package/build/dist/Server/API/StatusPageAPI.js.map +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1778521361934-MigrationName.js +12 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1778521361934-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1778522070962-AddStatusPageOIDC.js +28 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1778522070962-AddStatusPageOIDC.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1778582583897-MigrationName.js +12 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1778582583897-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +6 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Services/Index.js +2 -0
- package/build/dist/Server/Services/Index.js.map +1 -1
- package/build/dist/Server/Services/OpenTelemetryIngestService.js +11 -0
- package/build/dist/Server/Services/OpenTelemetryIngestService.js.map +1 -1
- package/build/dist/Server/Services/ScheduledMaintenanceService.js +31 -2
- package/build/dist/Server/Services/ScheduledMaintenanceService.js.map +1 -1
- package/build/dist/Server/Services/ServiceService.js +34 -0
- package/build/dist/Server/Services/ServiceService.js.map +1 -1
- package/build/dist/Server/Services/StatusPageOidcService.js +9 -0
- package/build/dist/Server/Services/StatusPageOidcService.js.map +1 -0
- package/build/dist/Server/Services/StatusPageSubscriberService.js +99 -4
- package/build/dist/Server/Services/StatusPageSubscriberService.js.map +1 -1
- package/build/dist/Server/Types/Database/QueryHelper.js +33 -0
- package/build/dist/Server/Types/Database/QueryHelper.js.map +1 -1
- package/build/dist/Server/Types/Database/QueryUtil.js +64 -0
- package/build/dist/Server/Types/Database/QueryUtil.js.map +1 -1
- package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js +44 -0
- package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js.map +1 -1
- package/build/dist/Server/Utils/StatusPageSubscriberWebhook.js +19 -0
- package/build/dist/Server/Utils/StatusPageSubscriberWebhook.js.map +1 -0
- package/build/dist/Types/BaseDatabase/MultiSearch.js +44 -0
- package/build/dist/Types/BaseDatabase/MultiSearch.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardComponents/ComponentArgument.js +1 -0
- package/build/dist/Types/Dashboard/DashboardComponents/ComponentArgument.js.map +1 -1
- package/build/dist/Types/JSON.js +1 -0
- package/build/dist/Types/JSON.js.map +1 -1
- package/build/dist/Types/Permission.js +40 -0
- package/build/dist/Types/Permission.js.map +1 -1
- package/build/dist/Types/SerializableObjectDictionary.js +2 -0
- package/build/dist/Types/SerializableObjectDictionary.js.map +1 -1
- package/build/dist/UI/Components/ModelTable/BaseModelTable.js +591 -7
- package/build/dist/UI/Components/ModelTable/BaseModelTable.js.map +1 -1
- package/build/dist/Utils/Dashboard/Components/DashboardChartComponent.js +9 -0
- package/build/dist/Utils/Dashboard/Components/DashboardChartComponent.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatusPageOidc.js","sourceRoot":"","sources":["../../../../Models/DatabaseModels/StatusPageOidc.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,SAAS,MAAM,uCAAuC,CAAC;AAC9D,OAAO,KAAK,MAAM,uBAAuB,CAAC;AAC1C,OAAO,GAAG,MAAM,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BAAoB;SAChC;QACD,MAAM,EAAE;YACN,UAAU,CAAC,YAAY;YACvB,UAAU,CAAC,YAAY;YACvB,UAAU,CAAC,kBAAkB;SAC9B;KACF,CAAC;IACD,eAAe,CAAC,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;IAC/C,aAAa,CAAC;QACb,SAAS,EAAE,gBAAgB;QAC3B,YAAY,EAAE,kBAAkB;QAChC,UAAU,EAAE,kBAAkB;QAC9B,IAAI,EAAE,QAAQ,CAAC,IAAI;QACnB,gBAAgB,EACd,kEAAkE;KACrE,CAAC;IACD,MAAM,CAAC;QACN,IAAI,EAAE,gBAAgB;KACvB,CAAC;GACmB,cAAc,CA6mBlC;eA7mBoB,cAAc"}
|
|
@@ -33,6 +33,7 @@ import StatusPageHistoryChartBarColorRuleService from "../Services/StatusPageHis
|
|
|
33
33
|
import StatusPageResourceService from "../Services/StatusPageResourceService";
|
|
34
34
|
import StatusPageService, { Service as StatusPageServiceType, } from "../Services/StatusPageService";
|
|
35
35
|
import StatusPageSsoService from "../Services/StatusPageSsoService";
|
|
36
|
+
import StatusPageOidcService from "../Services/StatusPageOidcService";
|
|
36
37
|
import StatusPageSubscriberService from "../Services/StatusPageSubscriberService";
|
|
37
38
|
import QueryHelper from "../Types/Database/QueryHelper";
|
|
38
39
|
import logger, { getLogAttributesFromRequest } from "../Utils/Logger";
|
|
@@ -73,6 +74,7 @@ import StatusPageHeaderLink from "../../Models/DatabaseModels/StatusPageHeaderLi
|
|
|
73
74
|
import StatusPageHistoryChartBarColorRule from "../../Models/DatabaseModels/StatusPageHistoryChartBarColorRule";
|
|
74
75
|
import StatusPageResource from "../../Models/DatabaseModels/StatusPageResource";
|
|
75
76
|
import StatusPageSSO from "../../Models/DatabaseModels/StatusPageSso";
|
|
77
|
+
import StatusPageOIDC from "../../Models/DatabaseModels/StatusPageOidc";
|
|
76
78
|
import StatusPageSubscriber from "../../Models/DatabaseModels/StatusPageSubscriber";
|
|
77
79
|
import StatusPageResourceUptimeUtil from "../../Utils/StatusPage/ResourceUptime";
|
|
78
80
|
import UptimePrecision from "../../Types/StatusPage/UptimePrecision";
|
|
@@ -130,7 +132,7 @@ const resolveStatusPageIdOrThrow = async (statusPageIdOrDomain) => {
|
|
|
130
132
|
};
|
|
131
133
|
export default class StatusPageAPI extends BaseAPI {
|
|
132
134
|
constructor() {
|
|
133
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8;
|
|
135
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9;
|
|
134
136
|
super(StatusPage, StatusPageService);
|
|
135
137
|
// get title, description of the page. This is used for SEO.
|
|
136
138
|
this.router.get(`${(_a = new this.entityType().getCrudApiPath()) === null || _a === void 0 ? void 0 : _a.toString()}/seo/:statusPageIdOrDomain`, UserMiddleware.getUserMiddleware, async (req, res) => {
|
|
@@ -602,6 +604,7 @@ export default class StatusPageAPI extends BaseAPI {
|
|
|
602
604
|
enableEmailSubscribers: true,
|
|
603
605
|
enableSlackSubscribers: true,
|
|
604
606
|
enableMicrosoftTeamsSubscribers: true,
|
|
607
|
+
enableWebhookSubscribers: true,
|
|
605
608
|
enableSmsSubscribers: true,
|
|
606
609
|
isPublicStatusPage: true,
|
|
607
610
|
enableMasterPassword: true,
|
|
@@ -775,9 +778,34 @@ export default class StatusPageAPI extends BaseAPI {
|
|
|
775
778
|
next(err);
|
|
776
779
|
}
|
|
777
780
|
});
|
|
781
|
+
this.router.post(`${(_u = new this.entityType().getCrudApiPath()) === null || _u === void 0 ? void 0 : _u.toString()}/oidc/:statusPageId`, UserMiddleware.getUserMiddleware, async (req, res, next) => {
|
|
782
|
+
try {
|
|
783
|
+
const objectId = new ObjectID(req.params["statusPageId"]);
|
|
784
|
+
const oidc = await StatusPageOidcService.findBy({
|
|
785
|
+
query: {
|
|
786
|
+
statusPageId: objectId,
|
|
787
|
+
isEnabled: true,
|
|
788
|
+
},
|
|
789
|
+
select: {
|
|
790
|
+
name: true,
|
|
791
|
+
description: true,
|
|
792
|
+
_id: true,
|
|
793
|
+
},
|
|
794
|
+
limit: LIMIT_PER_PROJECT,
|
|
795
|
+
skip: 0,
|
|
796
|
+
props: {
|
|
797
|
+
isRoot: true,
|
|
798
|
+
},
|
|
799
|
+
});
|
|
800
|
+
return Response.sendEntityArrayResponse(req, res, oidc, new PositiveNumber(oidc.length), StatusPageOIDC);
|
|
801
|
+
}
|
|
802
|
+
catch (err) {
|
|
803
|
+
next(err);
|
|
804
|
+
}
|
|
805
|
+
});
|
|
778
806
|
// Get all status page resources for subscriber to subscribe to.
|
|
779
|
-
this.router.post(`${(
|
|
780
|
-
.getCrudApiPath()) === null ||
|
|
807
|
+
this.router.post(`${(_v = new this.entityType()
|
|
808
|
+
.getCrudApiPath()) === null || _v === void 0 ? void 0 : _v.toString()}/resources/:statusPageId`, UserMiddleware.getUserMiddleware, async (req, res, next) => {
|
|
781
809
|
try {
|
|
782
810
|
const statusPageId = new ObjectID(req.params["statusPageId"]);
|
|
783
811
|
await this.checkHasReadAccess({
|
|
@@ -810,8 +838,8 @@ export default class StatusPageAPI extends BaseAPI {
|
|
|
810
838
|
next(err);
|
|
811
839
|
}
|
|
812
840
|
});
|
|
813
|
-
this.router.post(`${(
|
|
814
|
-
.getCrudApiPath()) === null ||
|
|
841
|
+
this.router.post(`${(_w = new this.entityType()
|
|
842
|
+
.getCrudApiPath()) === null || _w === void 0 ? void 0 : _w.toString()}/uptime/:statusPageId`, UserMiddleware.getUserMiddleware, async (req, res, next) => {
|
|
815
843
|
try {
|
|
816
844
|
// This reosurce ID can be of a status page resource OR a status page group.
|
|
817
845
|
const statusPageResourceId = new ObjectID(req.params["statusPageResourceId"]);
|
|
@@ -991,8 +1019,8 @@ export default class StatusPageAPI extends BaseAPI {
|
|
|
991
1019
|
next(err);
|
|
992
1020
|
}
|
|
993
1021
|
});
|
|
994
|
-
this.router.post(`${(
|
|
995
|
-
.getCrudApiPath()) === null ||
|
|
1022
|
+
this.router.post(`${(_x = new this.entityType()
|
|
1023
|
+
.getCrudApiPath()) === null || _x === void 0 ? void 0 : _x.toString()}/overview/:statusPageIdOrDomain`, UserMiddleware.getUserMiddleware, async (req, res, next) => {
|
|
996
1024
|
var _a;
|
|
997
1025
|
try {
|
|
998
1026
|
const statusPageId = await resolveStatusPageIdOrThrow(req.params["statusPageIdOrDomain"]);
|
|
@@ -1669,8 +1697,8 @@ export default class StatusPageAPI extends BaseAPI {
|
|
|
1669
1697
|
next(err);
|
|
1670
1698
|
}
|
|
1671
1699
|
});
|
|
1672
|
-
this.router.put(`${(
|
|
1673
|
-
.getCrudApiPath()) === null ||
|
|
1700
|
+
this.router.put(`${(_y = new this.entityType()
|
|
1701
|
+
.getCrudApiPath()) === null || _y === void 0 ? void 0 : _y.toString()}/update-subscription/:statusPageId/:subscriberId`, UserMiddleware.getUserMiddleware, async (req, res, next) => {
|
|
1674
1702
|
try {
|
|
1675
1703
|
await this.subscribeToStatusPage(req);
|
|
1676
1704
|
return Response.sendEmptySuccessResponse(req, res);
|
|
@@ -1679,8 +1707,8 @@ export default class StatusPageAPI extends BaseAPI {
|
|
|
1679
1707
|
next(err);
|
|
1680
1708
|
}
|
|
1681
1709
|
});
|
|
1682
|
-
this.router.post(`${(
|
|
1683
|
-
.getCrudApiPath()) === null ||
|
|
1710
|
+
this.router.post(`${(_z = new this.entityType()
|
|
1711
|
+
.getCrudApiPath()) === null || _z === void 0 ? void 0 : _z.toString()}/get-subscription/:statusPageId/:subscriberId`, UserMiddleware.getUserMiddleware, async (req, res, next) => {
|
|
1684
1712
|
try {
|
|
1685
1713
|
const subscriber = await this.getSubscriber(req);
|
|
1686
1714
|
return Response.sendEntityResponse(req, res, subscriber, StatusPageSubscriber);
|
|
@@ -1689,8 +1717,8 @@ export default class StatusPageAPI extends BaseAPI {
|
|
|
1689
1717
|
next(err);
|
|
1690
1718
|
}
|
|
1691
1719
|
});
|
|
1692
|
-
this.router.post(`${(
|
|
1693
|
-
.getCrudApiPath()) === null ||
|
|
1720
|
+
this.router.post(`${(_0 = new this.entityType()
|
|
1721
|
+
.getCrudApiPath()) === null || _0 === void 0 ? void 0 : _0.toString()}/subscribe/:statusPageId`, UserMiddleware.getUserMiddleware, async (req, res, next) => {
|
|
1694
1722
|
try {
|
|
1695
1723
|
await this.subscribeToStatusPage(req);
|
|
1696
1724
|
return Response.sendEmptySuccessResponse(req, res);
|
|
@@ -1699,8 +1727,8 @@ export default class StatusPageAPI extends BaseAPI {
|
|
|
1699
1727
|
next(err);
|
|
1700
1728
|
}
|
|
1701
1729
|
});
|
|
1702
|
-
this.router.post(`${(
|
|
1703
|
-
.getCrudApiPath()) === null ||
|
|
1730
|
+
this.router.post(`${(_1 = new this.entityType()
|
|
1731
|
+
.getCrudApiPath()) === null || _1 === void 0 ? void 0 : _1.toString()}/manage-subscription/:statusPageId`, UserMiddleware.getUserMiddleware, async (req, res, next) => {
|
|
1704
1732
|
try {
|
|
1705
1733
|
await this.manageExistingSubscription(req);
|
|
1706
1734
|
return Response.sendEmptySuccessResponse(req, res);
|
|
@@ -1709,8 +1737,8 @@ export default class StatusPageAPI extends BaseAPI {
|
|
|
1709
1737
|
next(err);
|
|
1710
1738
|
}
|
|
1711
1739
|
});
|
|
1712
|
-
this.router.post(`${(
|
|
1713
|
-
.getCrudApiPath()) === null ||
|
|
1740
|
+
this.router.post(`${(_2 = new this.entityType()
|
|
1741
|
+
.getCrudApiPath()) === null || _2 === void 0 ? void 0 : _2.toString()}/incidents/:statusPageIdOrDomain`, UserMiddleware.getUserMiddleware, async (req, res, next) => {
|
|
1714
1742
|
try {
|
|
1715
1743
|
const objectId = await resolveStatusPageIdOrThrow(req.params["statusPageIdOrDomain"]);
|
|
1716
1744
|
const response = await this.getIncidents(objectId, null, req);
|
|
@@ -1720,8 +1748,8 @@ export default class StatusPageAPI extends BaseAPI {
|
|
|
1720
1748
|
next(err);
|
|
1721
1749
|
}
|
|
1722
1750
|
});
|
|
1723
|
-
this.router.post(`${(
|
|
1724
|
-
.getCrudApiPath()) === null ||
|
|
1751
|
+
this.router.post(`${(_3 = new this.entityType()
|
|
1752
|
+
.getCrudApiPath()) === null || _3 === void 0 ? void 0 : _3.toString()}/scheduled-maintenance-events/:statusPageIdOrDomain`, UserMiddleware.getUserMiddleware, async (req, res, next) => {
|
|
1725
1753
|
try {
|
|
1726
1754
|
const objectId = await resolveStatusPageIdOrThrow(req.params["statusPageIdOrDomain"]);
|
|
1727
1755
|
const response = await this.getScheduledMaintenanceEvents(objectId, null, req);
|
|
@@ -1731,8 +1759,8 @@ export default class StatusPageAPI extends BaseAPI {
|
|
|
1731
1759
|
next(err);
|
|
1732
1760
|
}
|
|
1733
1761
|
});
|
|
1734
|
-
this.router.post(`${(
|
|
1735
|
-
.getCrudApiPath()) === null ||
|
|
1762
|
+
this.router.post(`${(_4 = new this.entityType()
|
|
1763
|
+
.getCrudApiPath()) === null || _4 === void 0 ? void 0 : _4.toString()}/announcements/:statusPageIdOrDomain`, UserMiddleware.getUserMiddleware, async (req, res, next) => {
|
|
1736
1764
|
try {
|
|
1737
1765
|
const objectId = await resolveStatusPageIdOrThrow(req.params["statusPageIdOrDomain"]);
|
|
1738
1766
|
const response = await this.getAnnouncements(objectId, null, req);
|
|
@@ -1742,8 +1770,8 @@ export default class StatusPageAPI extends BaseAPI {
|
|
|
1742
1770
|
next(err);
|
|
1743
1771
|
}
|
|
1744
1772
|
});
|
|
1745
|
-
this.router.post(`${(
|
|
1746
|
-
.getCrudApiPath()) === null ||
|
|
1773
|
+
this.router.post(`${(_5 = new this.entityType()
|
|
1774
|
+
.getCrudApiPath()) === null || _5 === void 0 ? void 0 : _5.toString()}/incidents/:statusPageIdOrDomain/:incidentId`, UserMiddleware.getUserMiddleware, async (req, res, next) => {
|
|
1747
1775
|
try {
|
|
1748
1776
|
const objectId = await resolveStatusPageIdOrThrow(req.params["statusPageIdOrDomain"]);
|
|
1749
1777
|
const incidentId = new ObjectID(req.params["incidentId"]);
|
|
@@ -1754,8 +1782,8 @@ export default class StatusPageAPI extends BaseAPI {
|
|
|
1754
1782
|
next(err);
|
|
1755
1783
|
}
|
|
1756
1784
|
});
|
|
1757
|
-
this.router.post(`${(
|
|
1758
|
-
.getCrudApiPath()) === null ||
|
|
1785
|
+
this.router.post(`${(_6 = new this.entityType()
|
|
1786
|
+
.getCrudApiPath()) === null || _6 === void 0 ? void 0 : _6.toString()}/scheduled-maintenance-events/:statusPageIdOrDomain/:scheduledMaintenanceId`, UserMiddleware.getUserMiddleware, async (req, res, next) => {
|
|
1759
1787
|
try {
|
|
1760
1788
|
const objectId = await resolveStatusPageIdOrThrow(req.params["statusPageIdOrDomain"]);
|
|
1761
1789
|
const scheduledMaintenanceId = new ObjectID(req.params["scheduledMaintenanceId"]);
|
|
@@ -1766,8 +1794,8 @@ export default class StatusPageAPI extends BaseAPI {
|
|
|
1766
1794
|
next(err);
|
|
1767
1795
|
}
|
|
1768
1796
|
});
|
|
1769
|
-
this.router.post(`${(
|
|
1770
|
-
.getCrudApiPath()) === null ||
|
|
1797
|
+
this.router.post(`${(_7 = new this.entityType()
|
|
1798
|
+
.getCrudApiPath()) === null || _7 === void 0 ? void 0 : _7.toString()}/announcements/:statusPageIdOrDomain/:announcementId`, UserMiddleware.getUserMiddleware, async (req, res, next) => {
|
|
1771
1799
|
try {
|
|
1772
1800
|
const objectId = await resolveStatusPageIdOrThrow(req.params["statusPageIdOrDomain"]);
|
|
1773
1801
|
const announcementId = new ObjectID(req.params["announcementId"]);
|
|
@@ -1779,8 +1807,8 @@ export default class StatusPageAPI extends BaseAPI {
|
|
|
1779
1807
|
}
|
|
1780
1808
|
});
|
|
1781
1809
|
// Episodes endpoints
|
|
1782
|
-
this.router.post(`${(
|
|
1783
|
-
.getCrudApiPath()) === null ||
|
|
1810
|
+
this.router.post(`${(_8 = new this.entityType()
|
|
1811
|
+
.getCrudApiPath()) === null || _8 === void 0 ? void 0 : _8.toString()}/episodes/:statusPageIdOrDomain`, UserMiddleware.getUserMiddleware, async (req, res, next) => {
|
|
1784
1812
|
try {
|
|
1785
1813
|
const objectId = await resolveStatusPageIdOrThrow(req.params["statusPageIdOrDomain"]);
|
|
1786
1814
|
const response = await this.getEpisodes(objectId, null, req);
|
|
@@ -1790,8 +1818,8 @@ export default class StatusPageAPI extends BaseAPI {
|
|
|
1790
1818
|
next(err);
|
|
1791
1819
|
}
|
|
1792
1820
|
});
|
|
1793
|
-
this.router.post(`${(
|
|
1794
|
-
.getCrudApiPath()) === null ||
|
|
1821
|
+
this.router.post(`${(_9 = new this.entityType()
|
|
1822
|
+
.getCrudApiPath()) === null || _9 === void 0 ? void 0 : _9.toString()}/episodes/:statusPageIdOrDomain/:episodeId`, UserMiddleware.getUserMiddleware, async (req, res, next) => {
|
|
1795
1823
|
try {
|
|
1796
1824
|
const objectId = await resolveStatusPageIdOrThrow(req.params["statusPageIdOrDomain"]);
|
|
1797
1825
|
const episodeId = new ObjectID(req.params["episodeId"]);
|
|
@@ -2213,6 +2241,7 @@ export default class StatusPageAPI extends BaseAPI {
|
|
|
2213
2241
|
enableEmailSubscribers: true,
|
|
2214
2242
|
enableSlackSubscribers: true,
|
|
2215
2243
|
enableMicrosoftTeamsSubscribers: true,
|
|
2244
|
+
enableWebhookSubscribers: true,
|
|
2216
2245
|
enableSmsSubscribers: true,
|
|
2217
2246
|
allowSubscribersToChooseResources: true,
|
|
2218
2247
|
allowSubscribersToChooseEventTypes: true,
|
|
@@ -2461,6 +2490,7 @@ export default class StatusPageAPI extends BaseAPI {
|
|
|
2461
2490
|
enableSmsSubscribers: true,
|
|
2462
2491
|
enableSlackSubscribers: true,
|
|
2463
2492
|
enableMicrosoftTeamsSubscribers: true,
|
|
2493
|
+
enableWebhookSubscribers: true,
|
|
2464
2494
|
allowSubscribersToChooseResources: true,
|
|
2465
2495
|
allowSubscribersToChooseEventTypes: true,
|
|
2466
2496
|
showSubscriberPageOnStatusPage: true,
|
|
@@ -2498,12 +2528,19 @@ export default class StatusPageAPI extends BaseAPI {
|
|
|
2498
2528
|
logger.debug(`Microsoft Teams subscribers not enabled for status page with ID: ${objectId}`, getLogAttributesFromRequest(req));
|
|
2499
2529
|
throw new BadDataException("Microsoft Teams subscribers not enabled for this status page.");
|
|
2500
2530
|
}
|
|
2501
|
-
if (
|
|
2531
|
+
if (req.body.data["subscriberWebhook"] &&
|
|
2532
|
+
!statusPage.enableWebhookSubscribers) {
|
|
2533
|
+
logger.debug(`Webhook subscribers not enabled for status page with ID: ${objectId}`, getLogAttributesFromRequest(req));
|
|
2534
|
+
throw new BadDataException("Webhook subscribers not enabled for this status page.");
|
|
2535
|
+
}
|
|
2536
|
+
if (!req.params["subscriberId"] &&
|
|
2537
|
+
!req.body.data["subscriberEmail"] &&
|
|
2502
2538
|
!req.body.data["subscriberPhone"] &&
|
|
2503
2539
|
!req.body.data["slackWorkspaceName"] &&
|
|
2504
|
-
!req.body.data["microsoftTeamsWorkspaceName"]
|
|
2505
|
-
|
|
2506
|
-
|
|
2540
|
+
!req.body.data["microsoftTeamsWorkspaceName"] &&
|
|
2541
|
+
!req.body.data["subscriberWebhook"]) {
|
|
2542
|
+
logger.debug(`No email, phone, slack workspace name, Microsoft Teams workspace name, or webhook URL provided for subscription to status page with ID: ${objectId}`, getLogAttributesFromRequest(req));
|
|
2543
|
+
throw new BadDataException("Email, phone, slack workspace name, Microsoft Teams workspace name, or webhook URL is required to subscribe to this status page.");
|
|
2507
2544
|
}
|
|
2508
2545
|
const email = req.body.data["subscriberEmail"]
|
|
2509
2546
|
? new Email(req.body.data["subscriberEmail"])
|
|
@@ -2523,6 +2560,9 @@ export default class StatusPageAPI extends BaseAPI {
|
|
|
2523
2560
|
const microsoftTeamsWorkspaceName = req.body.data["microsoftTeamsWorkspaceName"]
|
|
2524
2561
|
? req.body.data["microsoftTeamsWorkspaceName"]
|
|
2525
2562
|
: undefined;
|
|
2563
|
+
const subscriberWebhookUrl = req.body.data["subscriberWebhook"]
|
|
2564
|
+
? req.body.data["subscriberWebhook"]
|
|
2565
|
+
: undefined;
|
|
2526
2566
|
let statusPageSubscriber = null;
|
|
2527
2567
|
let isUpdate = false;
|
|
2528
2568
|
if (!req.params["subscriberId"]) {
|
|
@@ -2571,6 +2611,11 @@ export default class StatusPageAPI extends BaseAPI {
|
|
|
2571
2611
|
statusPageSubscriber.microsoftTeamsWorkspaceName =
|
|
2572
2612
|
microsoftTeamsWorkspaceName;
|
|
2573
2613
|
}
|
|
2614
|
+
if (subscriberWebhookUrl) {
|
|
2615
|
+
logger.debug(`Setting subscriber webhook URL: ${subscriberWebhookUrl}`, getLogAttributesFromRequest(req));
|
|
2616
|
+
statusPageSubscriber.subscriberWebhook =
|
|
2617
|
+
URL.fromString(subscriberWebhookUrl);
|
|
2618
|
+
}
|
|
2574
2619
|
if (!isUpdate &&
|
|
2575
2620
|
req.body.data["statusPageResources"] &&
|
|
2576
2621
|
!statusPage.allowSubscribersToChooseResources) {
|