@oneuptime/common 7.0.3655 → 7.0.3669
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/Alert.ts +3 -3
- package/Models/DatabaseModels/Incident.ts +3 -3
- package/Models/DatabaseModels/ScheduledMaintenance.ts +3 -3
- package/Server/API/BaseAPI.ts +48 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1739374537088-MigrationName.ts +29 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +2 -0
- package/Server/Services/IncidentService.ts +101 -0
- package/Server/Services/MonitorService.ts +43 -0
- package/Server/Services/WorkspaceNotificationRuleService.ts +440 -14
- package/Server/Services/WorkspaceProjectAuthTokenService.ts +43 -15
- package/Server/Utils/Slack/Slack.ts +156 -23
- package/Types/Workspace/NotificationRules/BaseNotificationRule.ts +9 -0
- package/Types/Workspace/NotificationRules/NotificationRuleCondition.ts +23 -32
- package/Types/Workspace/NotificationRules/NotificationRuleTypes/AlertNotificationRule.ts +15 -0
- package/Types/Workspace/NotificationRules/NotificationRuleTypes/IncidentNotificationRule.ts +15 -0
- package/Types/Workspace/NotificationRules/NotificationRuleTypes/MonitorStatusNotificationRule.ts +7 -0
- package/Types/Workspace/NotificationRules/NotificationRuleTypes/ScheduledMaintenanceNotificationRule.ts +14 -0
- package/Types/Workspace/NotificationRules/NotificationRuleUtil.ts +261 -0
- package/Types/Workspace/WorkspaceChannelInvitationPayload.ts +4 -0
- package/Types/Workspace/WorkspaceMessagePayload.ts +30 -0
- package/build/dist/Models/DatabaseModels/Alert.js +4 -4
- package/build/dist/Models/DatabaseModels/Alert.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Incident.js +4 -4
- package/build/dist/Models/DatabaseModels/Incident.js.map +1 -1
- package/build/dist/Models/DatabaseModels/ScheduledMaintenance.js +4 -4
- package/build/dist/Models/DatabaseModels/ScheduledMaintenance.js.map +1 -1
- package/build/dist/Server/API/BaseAPI.js +34 -2
- package/build/dist/Server/API/BaseAPI.js.map +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1739374537088-MigrationName.js +16 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1739374537088-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +2 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Services/IncidentService.js +84 -0
- package/build/dist/Server/Services/IncidentService.js.map +1 -1
- package/build/dist/Server/Services/MonitorService.js +34 -0
- package/build/dist/Server/Services/MonitorService.js.map +1 -1
- package/build/dist/Server/Services/WorkspaceNotificationRuleService.js +314 -10
- package/build/dist/Server/Services/WorkspaceNotificationRuleService.js.map +1 -1
- package/build/dist/Server/Services/WorkspaceProjectAuthTokenService.js +29 -4
- package/build/dist/Server/Services/WorkspaceProjectAuthTokenService.js.map +1 -1
- package/build/dist/Server/Utils/Slack/Slack.js +99 -13
- package/build/dist/Server/Utils/Slack/Slack.js.map +1 -1
- package/build/dist/Types/Workspace/NotificationRules/NotificationRuleCondition.js +20 -21
- package/build/dist/Types/Workspace/NotificationRules/NotificationRuleCondition.js.map +1 -1
- package/build/dist/Types/Workspace/NotificationRules/NotificationRuleTypes/AlertNotificationRule.js +2 -0
- package/build/dist/Types/Workspace/NotificationRules/NotificationRuleTypes/AlertNotificationRule.js.map +1 -0
- package/build/dist/Types/Workspace/NotificationRules/NotificationRuleTypes/IncidentNotificationRule.js +2 -0
- package/build/dist/Types/Workspace/NotificationRules/NotificationRuleTypes/IncidentNotificationRule.js.map +1 -0
- package/build/dist/Types/Workspace/NotificationRules/NotificationRuleTypes/MonitorStatusNotificationRule.js +2 -0
- package/build/dist/Types/Workspace/NotificationRules/NotificationRuleTypes/MonitorStatusNotificationRule.js.map +1 -0
- package/build/dist/Types/Workspace/NotificationRules/NotificationRuleTypes/ScheduledMaintenanceNotificationRule.js +2 -0
- package/build/dist/Types/Workspace/NotificationRules/NotificationRuleTypes/ScheduledMaintenanceNotificationRule.js.map +1 -0
- package/build/dist/Types/Workspace/NotificationRules/NotificationRuleUtil.js +216 -0
- package/build/dist/Types/Workspace/NotificationRules/NotificationRuleUtil.js.map +1 -0
- package/build/dist/Types/Workspace/WorkspaceChannelInvitationPayload.js +2 -0
- package/build/dist/Types/Workspace/WorkspaceChannelInvitationPayload.js.map +1 -0
- package/build/dist/Types/Workspace/WorkspaceMessagePayload.js +2 -0
- package/build/dist/Types/Workspace/WorkspaceMessagePayload.js.map +1 -0
- package/package.json +2 -2
- package/Types/Workspace/NotificationRules/SlackNotificationRule.ts +0 -19
- package/Types/Workspace/WorkspaceNotificationPayload.ts +0 -29
- package/build/dist/Types/Workspace/NotificationRules/SlackNotificationRule.js +0 -2
- package/build/dist/Types/Workspace/NotificationRules/SlackNotificationRule.js.map +0 -1
- package/build/dist/Types/Workspace/WorkspaceNotificationPayload.js +0 -2
- package/build/dist/Types/Workspace/WorkspaceNotificationPayload.js.map +0 -1
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import FilterCondition from "../../Filter/FilterCondition";
|
|
2
|
-
import ObjectID from "../../ObjectID";
|
|
3
|
-
import BaseNotificationRule from "./BaseNotificationRule";
|
|
4
|
-
import NotificationRuleCondition from "./NotificationRuleCondition";
|
|
5
|
-
|
|
6
|
-
export default interface SlackNotificationRule extends BaseNotificationRule {
|
|
7
|
-
_type: "SlackNotificationRule";
|
|
8
|
-
filterCondition: FilterCondition; // and OR or. Default is AND
|
|
9
|
-
filters: Array<NotificationRuleCondition>; // if this array is empty then it will be considered as all filters are matched.
|
|
10
|
-
|
|
11
|
-
// if filters match then do:
|
|
12
|
-
shouldCreateSlackChannel: boolean;
|
|
13
|
-
inviteTeamsToNewSlackChannel: Array<ObjectID>;
|
|
14
|
-
inviteUsersToNewSlackChannel: Array<ObjectID>;
|
|
15
|
-
shouldAutomaticallyInviteOnCallUsersToNewSlackChannel: boolean;
|
|
16
|
-
|
|
17
|
-
shouldPostToExistingSlackChannel: boolean;
|
|
18
|
-
existingSlackChannelName: string; // seperate by comma
|
|
19
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export interface WorkspacePayloadBlocks {
|
|
2
|
-
_type: string;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
export interface WorkspaceNotificationPayloadButton {
|
|
6
|
-
title: string; // Button title.
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export interface WorkspacePayloadHeader extends WorkspacePayloadBlocks {
|
|
10
|
-
_type: "WorkspacePayloadHeader";
|
|
11
|
-
text: string;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export interface WorkspacePayloadMarkdown extends WorkspacePayloadBlocks {
|
|
15
|
-
_type: "WorkspacePayloadMarkdown";
|
|
16
|
-
text: string;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export interface WorkspacePayloadButtons extends WorkspacePayloadBlocks {
|
|
20
|
-
_type: "WorkspacePayloadButtons";
|
|
21
|
-
buttons: Array<WorkspaceNotificationPayloadButton>;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export default interface WorkspaceNotificationPayload {
|
|
25
|
-
_type: "WorkspaceNotificationPayload";
|
|
26
|
-
channelNames: Array<string>; // which channels to post to.
|
|
27
|
-
blocks: Array<WorkspacePayloadBlocks>; // Buttons to add to the message.
|
|
28
|
-
createChannelsIfItDoesNotExist: boolean; // Should we create the channels if they don't exist.
|
|
29
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SlackNotificationRule.js","sourceRoot":"","sources":["../../../../../Types/Workspace/NotificationRules/SlackNotificationRule.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WorkspaceNotificationPayload.js","sourceRoot":"","sources":["../../../../Types/Workspace/WorkspaceNotificationPayload.ts"],"names":[],"mappings":""}
|