@oneuptime/common 7.0.4922 → 7.0.4976
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/CallLog.ts +578 -0
- package/Models/DatabaseModels/EmailLog.ts +579 -0
- package/Models/DatabaseModels/IncidentStateTimeline.ts +1 -1
- package/Models/DatabaseModels/Index.ts +4 -0
- package/Models/DatabaseModels/OnCallDutyPolicy.ts +1 -1
- package/Models/DatabaseModels/PushNotificationLog.ts +877 -0
- package/Models/DatabaseModels/SmsLog.ts +578 -0
- package/Models/DatabaseModels/WorkspaceNotificationLog.ts +931 -0
- package/Server/API/StatusPageAPI.ts +2 -0
- package/Server/API/UserPushAPI.ts +12 -1
- package/Server/Infrastructure/Postgres/SchemaMigrations/1754776130988-MigrationName.ts +259 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1754828812691-MigrationName.ts +105 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1754910440587-MigrationName.ts +105 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1755030730926-MigrationName.ts +101 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1755088852971-MigrationName.ts +371 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1755093133870-MigrationName.ts +29 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1755109893911-MigrationName.ts +23 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1755110936888-MigrationName.ts +41 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +16 -0
- package/Server/Services/CallService.ts +26 -1
- package/Server/Services/Index.ts +2 -0
- package/Server/Services/MailService.ts +60 -0
- package/Server/Services/OnCallDutyPolicyEscalationRuleUserService.ts +6 -0
- package/Server/Services/OnCallDutyPolicyScheduleService.ts +12 -0
- package/Server/Services/ProjectService.ts +3 -7
- package/Server/Services/PushNotificationLogService.ts +14 -0
- package/Server/Services/PushNotificationService.ts +129 -13
- package/Server/Services/ScheduledMaintenanceService.ts +4 -0
- package/Server/Services/SmsService.ts +25 -0
- package/Server/Services/StatusPagePrivateUserService.ts +1 -0
- package/Server/Services/StatusPageService.ts +1 -0
- package/Server/Services/StatusPageSubscriberService.ts +3 -0
- package/Server/Services/TeamMemberService.ts +1 -0
- package/Server/Services/UserCallService.ts +1 -0
- package/Server/Services/UserEmailService.ts +1 -0
- package/Server/Services/UserNotificationRuleService.ts +85 -6
- package/Server/Services/UserNotificationSettingService.ts +58 -0
- package/Server/Services/UserOnCallLogService.ts +1 -0
- package/Server/Services/UserSmsService.ts +1 -0
- package/Server/Services/WorkspaceNotificationLogService.ts +276 -0
- package/Server/Services/WorkspaceNotificationRuleService.ts +290 -33
- package/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.ts +21 -6
- package/Server/Utils/Workspace/Slack/Actions/Alert.ts +66 -0
- package/Server/Utils/Workspace/Slack/Actions/Incident.ts +66 -1
- package/Server/Utils/Workspace/Slack/Actions/ScheduledMaintenance.ts +65 -0
- package/Server/Utils/Workspace/Slack/Slack.ts +21 -6
- package/Types/Permission.ts +20 -0
- package/Types/PushNotification/PushNotificationRequest.ts +4 -1
- package/Types/PushNotification/PushStatus.ts +6 -0
- package/Types/Workspace/WorkspaceNotificationActionType.ts +8 -0
- package/Types/Workspace/WorkspaceNotificationStatus.ts +6 -0
- package/Typings/elkjs.d.ts +30 -0
- package/UI/Components/Detail/Detail.tsx +1 -1
- package/UI/Components/Graphs/ServiceDependencyGraph.tsx +281 -0
- package/UI/Components/Tabs/Tab.tsx +8 -9
- package/UI/Components/Tabs/Tabs.tsx +17 -16
- package/Utils/Uptime/UptimeUtil.ts +20 -1
- package/build/dist/Models/DatabaseModels/CallLog.js +580 -0
- package/build/dist/Models/DatabaseModels/CallLog.js.map +1 -1
- package/build/dist/Models/DatabaseModels/EmailLog.js +580 -0
- package/build/dist/Models/DatabaseModels/EmailLog.js.map +1 -1
- package/build/dist/Models/DatabaseModels/IncidentStateTimeline.js +1 -1
- package/build/dist/Models/DatabaseModels/IncidentStateTimeline.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Index.js +4 -0
- package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicy.js +1 -1
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicy.js.map +1 -1
- package/build/dist/Models/DatabaseModels/PushNotificationLog.js +904 -0
- package/build/dist/Models/DatabaseModels/PushNotificationLog.js.map +1 -0
- package/build/dist/Models/DatabaseModels/SmsLog.js +580 -0
- package/build/dist/Models/DatabaseModels/SmsLog.js.map +1 -1
- package/build/dist/Models/DatabaseModels/WorkspaceNotificationLog.js +961 -0
- package/build/dist/Models/DatabaseModels/WorkspaceNotificationLog.js.map +1 -0
- package/build/dist/Server/API/StatusPageAPI.js +2 -0
- package/build/dist/Server/API/StatusPageAPI.js.map +1 -1
- package/build/dist/Server/API/UserPushAPI.js +9 -1
- package/build/dist/Server/API/UserPushAPI.js.map +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1754776130988-MigrationName.js +104 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1754776130988-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1754828812691-MigrationName.js +42 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1754828812691-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1754910440587-MigrationName.js +42 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1754910440587-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1755030730926-MigrationName.js +44 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1755030730926-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1755088852971-MigrationName.js +134 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1755088852971-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1755093133870-MigrationName.js +16 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1755093133870-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1755109893911-MigrationName.js +14 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1755109893911-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1755110936888-MigrationName.js +20 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1755110936888-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +16 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Services/CallService.js +12 -1
- package/build/dist/Server/Services/CallService.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/MailService.js +37 -0
- package/build/dist/Server/Services/MailService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleUserService.js +4 -0
- package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleUserService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyScheduleService.js +9 -0
- package/build/dist/Server/Services/OnCallDutyPolicyScheduleService.js.map +1 -1
- package/build/dist/Server/Services/ProjectService.js +3 -5
- package/build/dist/Server/Services/ProjectService.js.map +1 -1
- package/build/dist/Server/Services/PushNotificationLogService.js +13 -0
- package/build/dist/Server/Services/PushNotificationLogService.js.map +1 -0
- package/build/dist/Server/Services/PushNotificationService.js +98 -13
- package/build/dist/Server/Services/PushNotificationService.js.map +1 -1
- package/build/dist/Server/Services/ScheduledMaintenanceService.js +4 -0
- package/build/dist/Server/Services/ScheduledMaintenanceService.js.map +1 -1
- package/build/dist/Server/Services/SmsService.js +12 -1
- package/build/dist/Server/Services/SmsService.js.map +1 -1
- package/build/dist/Server/Services/StatusPagePrivateUserService.js +1 -0
- package/build/dist/Server/Services/StatusPagePrivateUserService.js.map +1 -1
- package/build/dist/Server/Services/StatusPageService.js +1 -0
- package/build/dist/Server/Services/StatusPageService.js.map +1 -1
- package/build/dist/Server/Services/StatusPageSubscriberService.js +3 -0
- package/build/dist/Server/Services/StatusPageSubscriberService.js.map +1 -1
- package/build/dist/Server/Services/TeamMemberService.js +1 -0
- package/build/dist/Server/Services/TeamMemberService.js.map +1 -1
- package/build/dist/Server/Services/UserCallService.js +1 -0
- package/build/dist/Server/Services/UserCallService.js.map +1 -1
- package/build/dist/Server/Services/UserEmailService.js +1 -0
- package/build/dist/Server/Services/UserEmailService.js.map +1 -1
- package/build/dist/Server/Services/UserNotificationRuleService.js +70 -6
- package/build/dist/Server/Services/UserNotificationRuleService.js.map +1 -1
- package/build/dist/Server/Services/UserNotificationSettingService.js +43 -0
- package/build/dist/Server/Services/UserNotificationSettingService.js.map +1 -1
- package/build/dist/Server/Services/UserOnCallLogService.js +1 -0
- package/build/dist/Server/Services/UserOnCallLogService.js.map +1 -1
- package/build/dist/Server/Services/UserSmsService.js +1 -0
- package/build/dist/Server/Services/UserSmsService.js.map +1 -1
- package/build/dist/Server/Services/WorkspaceNotificationLogService.js +181 -0
- package/build/dist/Server/Services/WorkspaceNotificationLogService.js.map +1 -0
- package/build/dist/Server/Services/WorkspaceNotificationRuleService.js +193 -3
- package/build/dist/Server/Services/WorkspaceNotificationRuleService.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js +19 -6
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/Slack/Actions/Alert.js +48 -0
- package/build/dist/Server/Utils/Workspace/Slack/Actions/Alert.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/Slack/Actions/Incident.js +48 -1
- package/build/dist/Server/Utils/Workspace/Slack/Actions/Incident.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/Slack/Actions/ScheduledMaintenance.js +47 -0
- package/build/dist/Server/Utils/Workspace/Slack/Actions/ScheduledMaintenance.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/Slack/Slack.js +19 -6
- package/build/dist/Server/Utils/Workspace/Slack/Slack.js.map +1 -1
- package/build/dist/Types/Permission.js +16 -0
- package/build/dist/Types/Permission.js.map +1 -1
- package/build/dist/Types/PushNotification/PushStatus.js +7 -0
- package/build/dist/Types/PushNotification/PushStatus.js.map +1 -0
- package/build/dist/Types/Workspace/WorkspaceNotificationActionType.js +9 -0
- package/build/dist/Types/Workspace/WorkspaceNotificationActionType.js.map +1 -0
- package/build/dist/Types/Workspace/WorkspaceNotificationStatus.js +7 -0
- package/build/dist/Types/Workspace/WorkspaceNotificationStatus.js.map +1 -0
- package/build/dist/UI/Components/Detail/Detail.js +1 -1
- package/build/dist/UI/Components/Detail/Detail.js.map +1 -1
- package/build/dist/UI/Components/Graphs/ServiceDependencyGraph.js +206 -0
- package/build/dist/UI/Components/Graphs/ServiceDependencyGraph.js.map +1 -0
- package/build/dist/UI/Components/Tabs/Tab.js +6 -5
- package/build/dist/UI/Components/Tabs/Tab.js.map +1 -1
- package/build/dist/UI/Components/Tabs/Tabs.js +5 -6
- package/build/dist/UI/Components/Tabs/Tabs.js.map +1 -1
- package/build/dist/Utils/Uptime/UptimeUtil.js +10 -1
- package/build/dist/Utils/Uptime/UptimeUtil.js.map +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
2
|
+
|
|
3
|
+
export class MigrationName1755088852971 implements MigrationInterface {
|
|
4
|
+
public name = "MigrationName1755088852971";
|
|
5
|
+
|
|
6
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
7
|
+
await queryRunner.query(
|
|
8
|
+
`ALTER TABLE "CallLog" ADD "onCallDutyPolicyId" uuid`,
|
|
9
|
+
);
|
|
10
|
+
await queryRunner.query(
|
|
11
|
+
`ALTER TABLE "CallLog" ADD "onCallDutyPolicyEscalationRuleId" uuid`,
|
|
12
|
+
);
|
|
13
|
+
await queryRunner.query(
|
|
14
|
+
`ALTER TABLE "CallLog" ADD "onCallDutyPolicyScheduleId" uuid`,
|
|
15
|
+
);
|
|
16
|
+
await queryRunner.query(`ALTER TABLE "CallLog" ADD "teamId" uuid`);
|
|
17
|
+
await queryRunner.query(
|
|
18
|
+
`ALTER TABLE "EmailLog" ADD "onCallDutyPolicyId" uuid`,
|
|
19
|
+
);
|
|
20
|
+
await queryRunner.query(
|
|
21
|
+
`ALTER TABLE "EmailLog" ADD "onCallDutyPolicyEscalationRuleId" uuid`,
|
|
22
|
+
);
|
|
23
|
+
await queryRunner.query(
|
|
24
|
+
`ALTER TABLE "EmailLog" ADD "onCallDutyPolicyScheduleId" uuid`,
|
|
25
|
+
);
|
|
26
|
+
await queryRunner.query(`ALTER TABLE "EmailLog" ADD "teamId" uuid`);
|
|
27
|
+
await queryRunner.query(
|
|
28
|
+
`ALTER TABLE "SmsLog" ADD "onCallDutyPolicyId" uuid`,
|
|
29
|
+
);
|
|
30
|
+
await queryRunner.query(
|
|
31
|
+
`ALTER TABLE "SmsLog" ADD "onCallDutyPolicyEscalationRuleId" uuid`,
|
|
32
|
+
);
|
|
33
|
+
await queryRunner.query(
|
|
34
|
+
`ALTER TABLE "SmsLog" ADD "onCallDutyPolicyScheduleId" uuid`,
|
|
35
|
+
);
|
|
36
|
+
await queryRunner.query(`ALTER TABLE "SmsLog" ADD "teamId" uuid`);
|
|
37
|
+
await queryRunner.query(
|
|
38
|
+
`ALTER TABLE "PushNotificationLog" ADD "onCallDutyPolicyId" uuid`,
|
|
39
|
+
);
|
|
40
|
+
await queryRunner.query(
|
|
41
|
+
`ALTER TABLE "PushNotificationLog" ADD "onCallDutyPolicyEscalationRuleId" uuid`,
|
|
42
|
+
);
|
|
43
|
+
await queryRunner.query(
|
|
44
|
+
`ALTER TABLE "PushNotificationLog" ADD "onCallDutyPolicyScheduleId" uuid`,
|
|
45
|
+
);
|
|
46
|
+
await queryRunner.query(
|
|
47
|
+
`ALTER TABLE "PushNotificationLog" ADD "teamId" uuid`,
|
|
48
|
+
);
|
|
49
|
+
await queryRunner.query(
|
|
50
|
+
`ALTER TABLE "WorkspaceNotificationLog" ADD "onCallDutyPolicyId" uuid`,
|
|
51
|
+
);
|
|
52
|
+
await queryRunner.query(
|
|
53
|
+
`ALTER TABLE "WorkspaceNotificationLog" ADD "onCallDutyPolicyEscalationRuleId" uuid`,
|
|
54
|
+
);
|
|
55
|
+
await queryRunner.query(
|
|
56
|
+
`ALTER TABLE "WorkspaceNotificationLog" ADD "onCallDutyPolicyScheduleId" uuid`,
|
|
57
|
+
);
|
|
58
|
+
await queryRunner.query(
|
|
59
|
+
`ALTER TABLE "WorkspaceNotificationLog" ADD "teamId" uuid`,
|
|
60
|
+
);
|
|
61
|
+
await queryRunner.query(
|
|
62
|
+
`ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "rotation" SET DEFAULT '{"_type":"Recurring","value":{"intervalType":"Day","intervalCount":{"_type":"PositiveNumber","value":1}}}'`,
|
|
63
|
+
);
|
|
64
|
+
await queryRunner.query(
|
|
65
|
+
`ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "restrictionTimes" SET DEFAULT '{"_type":"RestrictionTimes","value":{"restictionType":"None","dayRestrictionTimes":null,"weeklyRestrictionTimes":[]}}'`,
|
|
66
|
+
);
|
|
67
|
+
await queryRunner.query(
|
|
68
|
+
`CREATE INDEX "IDX_6946bee33de8b45b86ebb0012e" ON "CallLog" ("onCallDutyPolicyId") `,
|
|
69
|
+
);
|
|
70
|
+
await queryRunner.query(
|
|
71
|
+
`CREATE INDEX "IDX_80d91b1551ba233574c0bcb622" ON "CallLog" ("onCallDutyPolicyEscalationRuleId") `,
|
|
72
|
+
);
|
|
73
|
+
await queryRunner.query(
|
|
74
|
+
`CREATE INDEX "IDX_cd59580cf3a63b448174a1137d" ON "CallLog" ("onCallDutyPolicyScheduleId") `,
|
|
75
|
+
);
|
|
76
|
+
await queryRunner.query(
|
|
77
|
+
`CREATE INDEX "IDX_05936c8c2d09e1d8b9e0ae4401" ON "CallLog" ("teamId") `,
|
|
78
|
+
);
|
|
79
|
+
await queryRunner.query(
|
|
80
|
+
`CREATE INDEX "IDX_556a159f8352d88297a8d3e951" ON "EmailLog" ("onCallDutyPolicyId") `,
|
|
81
|
+
);
|
|
82
|
+
await queryRunner.query(
|
|
83
|
+
`CREATE INDEX "IDX_b7304fe2449af401fb07cc8b1c" ON "EmailLog" ("onCallDutyPolicyEscalationRuleId") `,
|
|
84
|
+
);
|
|
85
|
+
await queryRunner.query(
|
|
86
|
+
`CREATE INDEX "IDX_e8c3faceca2821e87fcccd43d2" ON "EmailLog" ("onCallDutyPolicyScheduleId") `,
|
|
87
|
+
);
|
|
88
|
+
await queryRunner.query(
|
|
89
|
+
`CREATE INDEX "IDX_e394d08e87fb40b3a5d0b91250" ON "EmailLog" ("teamId") `,
|
|
90
|
+
);
|
|
91
|
+
await queryRunner.query(
|
|
92
|
+
`CREATE INDEX "IDX_e40b9d395423a1f4426cf43bd8" ON "SmsLog" ("onCallDutyPolicyId") `,
|
|
93
|
+
);
|
|
94
|
+
await queryRunner.query(
|
|
95
|
+
`CREATE INDEX "IDX_31ebe9573e70ab953299403142" ON "SmsLog" ("onCallDutyPolicyEscalationRuleId") `,
|
|
96
|
+
);
|
|
97
|
+
await queryRunner.query(
|
|
98
|
+
`CREATE INDEX "IDX_45577c7db6091e91e99d492854" ON "SmsLog" ("onCallDutyPolicyScheduleId") `,
|
|
99
|
+
);
|
|
100
|
+
await queryRunner.query(
|
|
101
|
+
`CREATE INDEX "IDX_ea4117e6437e6ea9a742dd978b" ON "SmsLog" ("teamId") `,
|
|
102
|
+
);
|
|
103
|
+
await queryRunner.query(
|
|
104
|
+
`CREATE INDEX "IDX_a2439761a3dbd16c5944743690" ON "PushNotificationLog" ("onCallDutyPolicyId") `,
|
|
105
|
+
);
|
|
106
|
+
await queryRunner.query(
|
|
107
|
+
`CREATE INDEX "IDX_a75ab085a0a948e113e120c468" ON "PushNotificationLog" ("onCallDutyPolicyEscalationRuleId") `,
|
|
108
|
+
);
|
|
109
|
+
await queryRunner.query(
|
|
110
|
+
`CREATE INDEX "IDX_b7709c3c7792047a57c4e3c090" ON "PushNotificationLog" ("onCallDutyPolicyScheduleId") `,
|
|
111
|
+
);
|
|
112
|
+
await queryRunner.query(
|
|
113
|
+
`CREATE INDEX "IDX_dba4c943614d8fa262ca2f39bf" ON "PushNotificationLog" ("teamId") `,
|
|
114
|
+
);
|
|
115
|
+
await queryRunner.query(
|
|
116
|
+
`CREATE INDEX "IDX_bfe40c4a4b25d4d68d53879f30" ON "WorkspaceNotificationLog" ("onCallDutyPolicyId") `,
|
|
117
|
+
);
|
|
118
|
+
await queryRunner.query(
|
|
119
|
+
`CREATE INDEX "IDX_8a1696a130d26efe72b215a1a7" ON "WorkspaceNotificationLog" ("onCallDutyPolicyEscalationRuleId") `,
|
|
120
|
+
);
|
|
121
|
+
await queryRunner.query(
|
|
122
|
+
`CREATE INDEX "IDX_b8212e8152d5b38c1d5d284fc9" ON "WorkspaceNotificationLog" ("onCallDutyPolicyScheduleId") `,
|
|
123
|
+
);
|
|
124
|
+
await queryRunner.query(
|
|
125
|
+
`CREATE INDEX "IDX_3881ce57f0bb88894ea33b77b1" ON "WorkspaceNotificationLog" ("teamId") `,
|
|
126
|
+
);
|
|
127
|
+
await queryRunner.query(
|
|
128
|
+
`ALTER TABLE "CallLog" ADD CONSTRAINT "FK_6946bee33de8b45b86ebb0012e8" FOREIGN KEY ("onCallDutyPolicyId") REFERENCES "OnCallDutyPolicy"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
|
129
|
+
);
|
|
130
|
+
await queryRunner.query(
|
|
131
|
+
`ALTER TABLE "CallLog" ADD CONSTRAINT "FK_80d91b1551ba233574c0bcb622a" FOREIGN KEY ("onCallDutyPolicyEscalationRuleId") REFERENCES "OnCallDutyPolicyEscalationRule"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
|
132
|
+
);
|
|
133
|
+
await queryRunner.query(
|
|
134
|
+
`ALTER TABLE "CallLog" ADD CONSTRAINT "FK_cd59580cf3a63b448174a1137d5" FOREIGN KEY ("onCallDutyPolicyScheduleId") REFERENCES "OnCallDutyPolicySchedule"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
|
135
|
+
);
|
|
136
|
+
await queryRunner.query(
|
|
137
|
+
`ALTER TABLE "CallLog" ADD CONSTRAINT "FK_05936c8c2d09e1d8b9e0ae4401d" FOREIGN KEY ("teamId") REFERENCES "Team"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
|
138
|
+
);
|
|
139
|
+
await queryRunner.query(
|
|
140
|
+
`ALTER TABLE "EmailLog" ADD CONSTRAINT "FK_556a159f8352d88297a8d3e951f" FOREIGN KEY ("onCallDutyPolicyId") REFERENCES "OnCallDutyPolicy"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
|
141
|
+
);
|
|
142
|
+
await queryRunner.query(
|
|
143
|
+
`ALTER TABLE "EmailLog" ADD CONSTRAINT "FK_b7304fe2449af401fb07cc8b1ce" FOREIGN KEY ("onCallDutyPolicyEscalationRuleId") REFERENCES "OnCallDutyPolicyEscalationRule"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
|
144
|
+
);
|
|
145
|
+
await queryRunner.query(
|
|
146
|
+
`ALTER TABLE "EmailLog" ADD CONSTRAINT "FK_e8c3faceca2821e87fcccd43d28" FOREIGN KEY ("onCallDutyPolicyScheduleId") REFERENCES "OnCallDutyPolicySchedule"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
|
147
|
+
);
|
|
148
|
+
await queryRunner.query(
|
|
149
|
+
`ALTER TABLE "EmailLog" ADD CONSTRAINT "FK_e394d08e87fb40b3a5d0b912505" FOREIGN KEY ("teamId") REFERENCES "Team"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
|
150
|
+
);
|
|
151
|
+
await queryRunner.query(
|
|
152
|
+
`ALTER TABLE "SmsLog" ADD CONSTRAINT "FK_e40b9d395423a1f4426cf43bd8a" FOREIGN KEY ("onCallDutyPolicyId") REFERENCES "OnCallDutyPolicy"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
|
153
|
+
);
|
|
154
|
+
await queryRunner.query(
|
|
155
|
+
`ALTER TABLE "SmsLog" ADD CONSTRAINT "FK_31ebe9573e70ab9532994031422" FOREIGN KEY ("onCallDutyPolicyEscalationRuleId") REFERENCES "OnCallDutyPolicyEscalationRule"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
|
156
|
+
);
|
|
157
|
+
await queryRunner.query(
|
|
158
|
+
`ALTER TABLE "SmsLog" ADD CONSTRAINT "FK_45577c7db6091e91e99d492854b" FOREIGN KEY ("onCallDutyPolicyScheduleId") REFERENCES "OnCallDutyPolicySchedule"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
|
159
|
+
);
|
|
160
|
+
await queryRunner.query(
|
|
161
|
+
`ALTER TABLE "SmsLog" ADD CONSTRAINT "FK_ea4117e6437e6ea9a742dd978b3" FOREIGN KEY ("teamId") REFERENCES "Team"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
|
162
|
+
);
|
|
163
|
+
await queryRunner.query(
|
|
164
|
+
`ALTER TABLE "PushNotificationLog" ADD CONSTRAINT "FK_a2439761a3dbd16c59447436905" FOREIGN KEY ("onCallDutyPolicyId") REFERENCES "OnCallDutyPolicy"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
|
165
|
+
);
|
|
166
|
+
await queryRunner.query(
|
|
167
|
+
`ALTER TABLE "PushNotificationLog" ADD CONSTRAINT "FK_a75ab085a0a948e113e120c468e" FOREIGN KEY ("onCallDutyPolicyEscalationRuleId") REFERENCES "OnCallDutyPolicyEscalationRule"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
|
168
|
+
);
|
|
169
|
+
await queryRunner.query(
|
|
170
|
+
`ALTER TABLE "PushNotificationLog" ADD CONSTRAINT "FK_b7709c3c7792047a57c4e3c0904" FOREIGN KEY ("onCallDutyPolicyScheduleId") REFERENCES "OnCallDutyPolicySchedule"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
|
171
|
+
);
|
|
172
|
+
await queryRunner.query(
|
|
173
|
+
`ALTER TABLE "PushNotificationLog" ADD CONSTRAINT "FK_dba4c943614d8fa262ca2f39bf2" FOREIGN KEY ("teamId") REFERENCES "Team"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
|
174
|
+
);
|
|
175
|
+
await queryRunner.query(
|
|
176
|
+
`ALTER TABLE "WorkspaceNotificationLog" ADD CONSTRAINT "FK_bfe40c4a4b25d4d68d53879f30d" FOREIGN KEY ("onCallDutyPolicyId") REFERENCES "OnCallDutyPolicy"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
|
177
|
+
);
|
|
178
|
+
await queryRunner.query(
|
|
179
|
+
`ALTER TABLE "WorkspaceNotificationLog" ADD CONSTRAINT "FK_8a1696a130d26efe72b215a1a78" FOREIGN KEY ("onCallDutyPolicyEscalationRuleId") REFERENCES "OnCallDutyPolicyEscalationRule"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
|
180
|
+
);
|
|
181
|
+
await queryRunner.query(
|
|
182
|
+
`ALTER TABLE "WorkspaceNotificationLog" ADD CONSTRAINT "FK_b8212e8152d5b38c1d5d284fc9e" FOREIGN KEY ("onCallDutyPolicyScheduleId") REFERENCES "OnCallDutyPolicySchedule"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
|
183
|
+
);
|
|
184
|
+
await queryRunner.query(
|
|
185
|
+
`ALTER TABLE "WorkspaceNotificationLog" ADD CONSTRAINT "FK_3881ce57f0bb88894ea33b77b17" FOREIGN KEY ("teamId") REFERENCES "Team"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
190
|
+
await queryRunner.query(
|
|
191
|
+
`ALTER TABLE "WorkspaceNotificationLog" DROP CONSTRAINT "FK_3881ce57f0bb88894ea33b77b17"`,
|
|
192
|
+
);
|
|
193
|
+
await queryRunner.query(
|
|
194
|
+
`ALTER TABLE "WorkspaceNotificationLog" DROP CONSTRAINT "FK_b8212e8152d5b38c1d5d284fc9e"`,
|
|
195
|
+
);
|
|
196
|
+
await queryRunner.query(
|
|
197
|
+
`ALTER TABLE "WorkspaceNotificationLog" DROP CONSTRAINT "FK_8a1696a130d26efe72b215a1a78"`,
|
|
198
|
+
);
|
|
199
|
+
await queryRunner.query(
|
|
200
|
+
`ALTER TABLE "WorkspaceNotificationLog" DROP CONSTRAINT "FK_bfe40c4a4b25d4d68d53879f30d"`,
|
|
201
|
+
);
|
|
202
|
+
await queryRunner.query(
|
|
203
|
+
`ALTER TABLE "PushNotificationLog" DROP CONSTRAINT "FK_dba4c943614d8fa262ca2f39bf2"`,
|
|
204
|
+
);
|
|
205
|
+
await queryRunner.query(
|
|
206
|
+
`ALTER TABLE "PushNotificationLog" DROP CONSTRAINT "FK_b7709c3c7792047a57c4e3c0904"`,
|
|
207
|
+
);
|
|
208
|
+
await queryRunner.query(
|
|
209
|
+
`ALTER TABLE "PushNotificationLog" DROP CONSTRAINT "FK_a75ab085a0a948e113e120c468e"`,
|
|
210
|
+
);
|
|
211
|
+
await queryRunner.query(
|
|
212
|
+
`ALTER TABLE "PushNotificationLog" DROP CONSTRAINT "FK_a2439761a3dbd16c59447436905"`,
|
|
213
|
+
);
|
|
214
|
+
await queryRunner.query(
|
|
215
|
+
`ALTER TABLE "SmsLog" DROP CONSTRAINT "FK_ea4117e6437e6ea9a742dd978b3"`,
|
|
216
|
+
);
|
|
217
|
+
await queryRunner.query(
|
|
218
|
+
`ALTER TABLE "SmsLog" DROP CONSTRAINT "FK_45577c7db6091e91e99d492854b"`,
|
|
219
|
+
);
|
|
220
|
+
await queryRunner.query(
|
|
221
|
+
`ALTER TABLE "SmsLog" DROP CONSTRAINT "FK_31ebe9573e70ab9532994031422"`,
|
|
222
|
+
);
|
|
223
|
+
await queryRunner.query(
|
|
224
|
+
`ALTER TABLE "SmsLog" DROP CONSTRAINT "FK_e40b9d395423a1f4426cf43bd8a"`,
|
|
225
|
+
);
|
|
226
|
+
await queryRunner.query(
|
|
227
|
+
`ALTER TABLE "EmailLog" DROP CONSTRAINT "FK_e394d08e87fb40b3a5d0b912505"`,
|
|
228
|
+
);
|
|
229
|
+
await queryRunner.query(
|
|
230
|
+
`ALTER TABLE "EmailLog" DROP CONSTRAINT "FK_e8c3faceca2821e87fcccd43d28"`,
|
|
231
|
+
);
|
|
232
|
+
await queryRunner.query(
|
|
233
|
+
`ALTER TABLE "EmailLog" DROP CONSTRAINT "FK_b7304fe2449af401fb07cc8b1ce"`,
|
|
234
|
+
);
|
|
235
|
+
await queryRunner.query(
|
|
236
|
+
`ALTER TABLE "EmailLog" DROP CONSTRAINT "FK_556a159f8352d88297a8d3e951f"`,
|
|
237
|
+
);
|
|
238
|
+
await queryRunner.query(
|
|
239
|
+
`ALTER TABLE "CallLog" DROP CONSTRAINT "FK_05936c8c2d09e1d8b9e0ae4401d"`,
|
|
240
|
+
);
|
|
241
|
+
await queryRunner.query(
|
|
242
|
+
`ALTER TABLE "CallLog" DROP CONSTRAINT "FK_cd59580cf3a63b448174a1137d5"`,
|
|
243
|
+
);
|
|
244
|
+
await queryRunner.query(
|
|
245
|
+
`ALTER TABLE "CallLog" DROP CONSTRAINT "FK_80d91b1551ba233574c0bcb622a"`,
|
|
246
|
+
);
|
|
247
|
+
await queryRunner.query(
|
|
248
|
+
`ALTER TABLE "CallLog" DROP CONSTRAINT "FK_6946bee33de8b45b86ebb0012e8"`,
|
|
249
|
+
);
|
|
250
|
+
await queryRunner.query(
|
|
251
|
+
`DROP INDEX "public"."IDX_3881ce57f0bb88894ea33b77b1"`,
|
|
252
|
+
);
|
|
253
|
+
await queryRunner.query(
|
|
254
|
+
`DROP INDEX "public"."IDX_b8212e8152d5b38c1d5d284fc9"`,
|
|
255
|
+
);
|
|
256
|
+
await queryRunner.query(
|
|
257
|
+
`DROP INDEX "public"."IDX_8a1696a130d26efe72b215a1a7"`,
|
|
258
|
+
);
|
|
259
|
+
await queryRunner.query(
|
|
260
|
+
`DROP INDEX "public"."IDX_bfe40c4a4b25d4d68d53879f30"`,
|
|
261
|
+
);
|
|
262
|
+
await queryRunner.query(
|
|
263
|
+
`DROP INDEX "public"."IDX_dba4c943614d8fa262ca2f39bf"`,
|
|
264
|
+
);
|
|
265
|
+
await queryRunner.query(
|
|
266
|
+
`DROP INDEX "public"."IDX_b7709c3c7792047a57c4e3c090"`,
|
|
267
|
+
);
|
|
268
|
+
await queryRunner.query(
|
|
269
|
+
`DROP INDEX "public"."IDX_a75ab085a0a948e113e120c468"`,
|
|
270
|
+
);
|
|
271
|
+
await queryRunner.query(
|
|
272
|
+
`DROP INDEX "public"."IDX_a2439761a3dbd16c5944743690"`,
|
|
273
|
+
);
|
|
274
|
+
await queryRunner.query(
|
|
275
|
+
`DROP INDEX "public"."IDX_ea4117e6437e6ea9a742dd978b"`,
|
|
276
|
+
);
|
|
277
|
+
await queryRunner.query(
|
|
278
|
+
`DROP INDEX "public"."IDX_45577c7db6091e91e99d492854"`,
|
|
279
|
+
);
|
|
280
|
+
await queryRunner.query(
|
|
281
|
+
`DROP INDEX "public"."IDX_31ebe9573e70ab953299403142"`,
|
|
282
|
+
);
|
|
283
|
+
await queryRunner.query(
|
|
284
|
+
`DROP INDEX "public"."IDX_e40b9d395423a1f4426cf43bd8"`,
|
|
285
|
+
);
|
|
286
|
+
await queryRunner.query(
|
|
287
|
+
`DROP INDEX "public"."IDX_e394d08e87fb40b3a5d0b91250"`,
|
|
288
|
+
);
|
|
289
|
+
await queryRunner.query(
|
|
290
|
+
`DROP INDEX "public"."IDX_e8c3faceca2821e87fcccd43d2"`,
|
|
291
|
+
);
|
|
292
|
+
await queryRunner.query(
|
|
293
|
+
`DROP INDEX "public"."IDX_b7304fe2449af401fb07cc8b1c"`,
|
|
294
|
+
);
|
|
295
|
+
await queryRunner.query(
|
|
296
|
+
`DROP INDEX "public"."IDX_556a159f8352d88297a8d3e951"`,
|
|
297
|
+
);
|
|
298
|
+
await queryRunner.query(
|
|
299
|
+
`DROP INDEX "public"."IDX_05936c8c2d09e1d8b9e0ae4401"`,
|
|
300
|
+
);
|
|
301
|
+
await queryRunner.query(
|
|
302
|
+
`DROP INDEX "public"."IDX_cd59580cf3a63b448174a1137d"`,
|
|
303
|
+
);
|
|
304
|
+
await queryRunner.query(
|
|
305
|
+
`DROP INDEX "public"."IDX_80d91b1551ba233574c0bcb622"`,
|
|
306
|
+
);
|
|
307
|
+
await queryRunner.query(
|
|
308
|
+
`DROP INDEX "public"."IDX_6946bee33de8b45b86ebb0012e"`,
|
|
309
|
+
);
|
|
310
|
+
await queryRunner.query(
|
|
311
|
+
`ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "restrictionTimes" SET DEFAULT '{"_type": "RestrictionTimes", "value": {"restictionType": "None", "dayRestrictionTimes": null, "weeklyRestrictionTimes": []}}'`,
|
|
312
|
+
);
|
|
313
|
+
await queryRunner.query(
|
|
314
|
+
`ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "rotation" SET DEFAULT '{"_type": "Recurring", "value": {"intervalType": "Day", "intervalCount": {"_type": "PositiveNumber", "value": 1}}}'`,
|
|
315
|
+
);
|
|
316
|
+
await queryRunner.query(
|
|
317
|
+
`ALTER TABLE "WorkspaceNotificationLog" DROP COLUMN "teamId"`,
|
|
318
|
+
);
|
|
319
|
+
await queryRunner.query(
|
|
320
|
+
`ALTER TABLE "WorkspaceNotificationLog" DROP COLUMN "onCallDutyPolicyScheduleId"`,
|
|
321
|
+
);
|
|
322
|
+
await queryRunner.query(
|
|
323
|
+
`ALTER TABLE "WorkspaceNotificationLog" DROP COLUMN "onCallDutyPolicyEscalationRuleId"`,
|
|
324
|
+
);
|
|
325
|
+
await queryRunner.query(
|
|
326
|
+
`ALTER TABLE "WorkspaceNotificationLog" DROP COLUMN "onCallDutyPolicyId"`,
|
|
327
|
+
);
|
|
328
|
+
await queryRunner.query(
|
|
329
|
+
`ALTER TABLE "PushNotificationLog" DROP COLUMN "teamId"`,
|
|
330
|
+
);
|
|
331
|
+
await queryRunner.query(
|
|
332
|
+
`ALTER TABLE "PushNotificationLog" DROP COLUMN "onCallDutyPolicyScheduleId"`,
|
|
333
|
+
);
|
|
334
|
+
await queryRunner.query(
|
|
335
|
+
`ALTER TABLE "PushNotificationLog" DROP COLUMN "onCallDutyPolicyEscalationRuleId"`,
|
|
336
|
+
);
|
|
337
|
+
await queryRunner.query(
|
|
338
|
+
`ALTER TABLE "PushNotificationLog" DROP COLUMN "onCallDutyPolicyId"`,
|
|
339
|
+
);
|
|
340
|
+
await queryRunner.query(`ALTER TABLE "SmsLog" DROP COLUMN "teamId"`);
|
|
341
|
+
await queryRunner.query(
|
|
342
|
+
`ALTER TABLE "SmsLog" DROP COLUMN "onCallDutyPolicyScheduleId"`,
|
|
343
|
+
);
|
|
344
|
+
await queryRunner.query(
|
|
345
|
+
`ALTER TABLE "SmsLog" DROP COLUMN "onCallDutyPolicyEscalationRuleId"`,
|
|
346
|
+
);
|
|
347
|
+
await queryRunner.query(
|
|
348
|
+
`ALTER TABLE "SmsLog" DROP COLUMN "onCallDutyPolicyId"`,
|
|
349
|
+
);
|
|
350
|
+
await queryRunner.query(`ALTER TABLE "EmailLog" DROP COLUMN "teamId"`);
|
|
351
|
+
await queryRunner.query(
|
|
352
|
+
`ALTER TABLE "EmailLog" DROP COLUMN "onCallDutyPolicyScheduleId"`,
|
|
353
|
+
);
|
|
354
|
+
await queryRunner.query(
|
|
355
|
+
`ALTER TABLE "EmailLog" DROP COLUMN "onCallDutyPolicyEscalationRuleId"`,
|
|
356
|
+
);
|
|
357
|
+
await queryRunner.query(
|
|
358
|
+
`ALTER TABLE "EmailLog" DROP COLUMN "onCallDutyPolicyId"`,
|
|
359
|
+
);
|
|
360
|
+
await queryRunner.query(`ALTER TABLE "CallLog" DROP COLUMN "teamId"`);
|
|
361
|
+
await queryRunner.query(
|
|
362
|
+
`ALTER TABLE "CallLog" DROP COLUMN "onCallDutyPolicyScheduleId"`,
|
|
363
|
+
);
|
|
364
|
+
await queryRunner.query(
|
|
365
|
+
`ALTER TABLE "CallLog" DROP COLUMN "onCallDutyPolicyEscalationRuleId"`,
|
|
366
|
+
);
|
|
367
|
+
await queryRunner.query(
|
|
368
|
+
`ALTER TABLE "CallLog" DROP COLUMN "onCallDutyPolicyId"`,
|
|
369
|
+
);
|
|
370
|
+
}
|
|
371
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
2
|
+
|
|
3
|
+
export class MigrationName1755093133870 implements MigrationInterface {
|
|
4
|
+
public name = "MigrationName1755093133870";
|
|
5
|
+
|
|
6
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
7
|
+
await queryRunner.query(
|
|
8
|
+
`ALTER TABLE "WorkspaceNotificationLog" ADD "actionType" character varying(100) NOT NULL DEFAULT 'SendMessage'`,
|
|
9
|
+
);
|
|
10
|
+
await queryRunner.query(
|
|
11
|
+
`ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "rotation" SET DEFAULT '{"_type":"Recurring","value":{"intervalType":"Day","intervalCount":{"_type":"PositiveNumber","value":1}}}'`,
|
|
12
|
+
);
|
|
13
|
+
await queryRunner.query(
|
|
14
|
+
`ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "restrictionTimes" SET DEFAULT '{"_type":"RestrictionTimes","value":{"restictionType":"None","dayRestrictionTimes":null,"weeklyRestrictionTimes":[]}}'`,
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
19
|
+
await queryRunner.query(
|
|
20
|
+
`ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "restrictionTimes" SET DEFAULT '{"_type": "RestrictionTimes", "value": {"restictionType": "None", "dayRestrictionTimes": null, "weeklyRestrictionTimes": []}}'`,
|
|
21
|
+
);
|
|
22
|
+
await queryRunner.query(
|
|
23
|
+
`ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "rotation" SET DEFAULT '{"_type": "Recurring", "value": {"intervalType": "Day", "intervalCount": {"_type": "PositiveNumber", "value": 1}}}'`,
|
|
24
|
+
);
|
|
25
|
+
await queryRunner.query(
|
|
26
|
+
`ALTER TABLE "WorkspaceNotificationLog" DROP COLUMN "actionType"`,
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
2
|
+
|
|
3
|
+
export class MigrationName1755109893911 implements MigrationInterface {
|
|
4
|
+
public name = "MigrationName1755109893911";
|
|
5
|
+
|
|
6
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
7
|
+
await queryRunner.query(
|
|
8
|
+
`ALTER TABLE "PushNotificationLog" ADD "deviceName" character varying(100)`,
|
|
9
|
+
);
|
|
10
|
+
await queryRunner.query(
|
|
11
|
+
`ALTER TABLE "WorkspaceNotificationLog" ALTER COLUMN "actionType" SET DEFAULT 'SendMessage'`,
|
|
12
|
+
);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
16
|
+
await queryRunner.query(
|
|
17
|
+
`ALTER TABLE "WorkspaceNotificationLog" ALTER COLUMN "actionType" SET DEFAULT 'MessageSent'`,
|
|
18
|
+
);
|
|
19
|
+
await queryRunner.query(
|
|
20
|
+
`ALTER TABLE "PushNotificationLog" DROP COLUMN "deviceName"`,
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
2
|
+
|
|
3
|
+
export class MigrationName1755110936888 implements MigrationInterface {
|
|
4
|
+
public name = "MigrationName1755110936888";
|
|
5
|
+
|
|
6
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
7
|
+
await queryRunner.query(
|
|
8
|
+
`ALTER TABLE "WorkspaceNotificationLog" RENAME COLUMN "messageSummary" TO "message"`,
|
|
9
|
+
);
|
|
10
|
+
await queryRunner.query(
|
|
11
|
+
`ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "rotation" SET DEFAULT '{"_type":"Recurring","value":{"intervalType":"Day","intervalCount":{"_type":"PositiveNumber","value":1}}}'`,
|
|
12
|
+
);
|
|
13
|
+
await queryRunner.query(
|
|
14
|
+
`ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "restrictionTimes" SET DEFAULT '{"_type":"RestrictionTimes","value":{"restictionType":"None","dayRestrictionTimes":null,"weeklyRestrictionTimes":[]}}'`,
|
|
15
|
+
);
|
|
16
|
+
await queryRunner.query(
|
|
17
|
+
`ALTER TABLE "WorkspaceNotificationLog" DROP COLUMN "message"`,
|
|
18
|
+
);
|
|
19
|
+
await queryRunner.query(
|
|
20
|
+
`ALTER TABLE "WorkspaceNotificationLog" ADD "message" text`,
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
25
|
+
await queryRunner.query(
|
|
26
|
+
`ALTER TABLE "WorkspaceNotificationLog" DROP COLUMN "message"`,
|
|
27
|
+
);
|
|
28
|
+
await queryRunner.query(
|
|
29
|
+
`ALTER TABLE "WorkspaceNotificationLog" ADD "message" character varying(500)`,
|
|
30
|
+
);
|
|
31
|
+
await queryRunner.query(
|
|
32
|
+
`ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "restrictionTimes" SET DEFAULT '{"_type": "RestrictionTimes", "value": {"restictionType": "None", "dayRestrictionTimes": null, "weeklyRestrictionTimes": []}}'`,
|
|
33
|
+
);
|
|
34
|
+
await queryRunner.query(
|
|
35
|
+
`ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "rotation" SET DEFAULT '{"_type": "Recurring", "value": {"intervalType": "Day", "intervalCount": {"_type": "PositiveNumber", "value": 1}}}'`,
|
|
36
|
+
);
|
|
37
|
+
await queryRunner.query(
|
|
38
|
+
`ALTER TABLE "WorkspaceNotificationLog" RENAME COLUMN "message" TO "messageSummary"`,
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -150,6 +150,14 @@ import { MigrationName1754304193228 } from "./1754304193228-MigrationName";
|
|
|
150
150
|
import { MigrationName1754315774827 } from "./1754315774827-MigrationName";
|
|
151
151
|
import { MigrationName1754384418632 } from "./1754384418632-MigrationName";
|
|
152
152
|
import { MigrationName1754671483948 } from "./1754671483948-MigrationName";
|
|
153
|
+
import { MigrationName1754776130988 } from "./1754776130988-MigrationName";
|
|
154
|
+
import { MigrationName1754828812691 } from "./1754828812691-MigrationName";
|
|
155
|
+
import { MigrationName1754910440587 } from "./1754910440587-MigrationName";
|
|
156
|
+
import { MigrationName1755030730926 } from "./1755030730926-MigrationName";
|
|
157
|
+
import { MigrationName1755088852971 } from "./1755088852971-MigrationName";
|
|
158
|
+
import { MigrationName1755093133870 } from "./1755093133870-MigrationName";
|
|
159
|
+
import { MigrationName1755109893911 } from "./1755109893911-MigrationName";
|
|
160
|
+
import { MigrationName1755110936888 } from "./1755110936888-MigrationName";
|
|
153
161
|
|
|
154
162
|
export default [
|
|
155
163
|
InitialMigration,
|
|
@@ -304,4 +312,12 @@ export default [
|
|
|
304
312
|
MigrationName1754315774827,
|
|
305
313
|
MigrationName1754384418632,
|
|
306
314
|
MigrationName1754671483948,
|
|
315
|
+
MigrationName1754776130988,
|
|
316
|
+
MigrationName1754828812691,
|
|
317
|
+
MigrationName1754910440587,
|
|
318
|
+
MigrationName1755030730926,
|
|
319
|
+
MigrationName1755088852971,
|
|
320
|
+
MigrationName1755093133870,
|
|
321
|
+
MigrationName1755109893911,
|
|
322
|
+
MigrationName1755110936888,
|
|
307
323
|
];
|
|
@@ -24,8 +24,20 @@ export class CallService extends BaseService {
|
|
|
24
24
|
options: {
|
|
25
25
|
projectId?: ObjectID | undefined; // project id for sms log
|
|
26
26
|
isSensitive?: boolean; // if true, message will not be logged
|
|
27
|
-
userOnCallLogTimelineId?: ObjectID;
|
|
27
|
+
userOnCallLogTimelineId?: ObjectID | undefined;
|
|
28
28
|
customTwilioConfig?: TwilioConfig | undefined;
|
|
29
|
+
incidentId?: ObjectID | undefined;
|
|
30
|
+
alertId?: ObjectID | undefined;
|
|
31
|
+
scheduledMaintenanceId?: ObjectID | undefined;
|
|
32
|
+
statusPageId?: ObjectID | undefined;
|
|
33
|
+
statusPageAnnouncementId?: ObjectID | undefined;
|
|
34
|
+
userId?: ObjectID | undefined;
|
|
35
|
+
// On-call policy related fields
|
|
36
|
+
onCallPolicyId?: ObjectID | undefined;
|
|
37
|
+
onCallPolicyEscalationRuleId?: ObjectID | undefined;
|
|
38
|
+
teamId?: ObjectID | undefined;
|
|
39
|
+
onCallDutyPolicyExecutionLogTimelineId?: ObjectID | undefined;
|
|
40
|
+
onCallScheduleId?: ObjectID | undefined;
|
|
29
41
|
},
|
|
30
42
|
): Promise<HTTPResponse<EmptyResponseData>> {
|
|
31
43
|
const body: JSONObject = {
|
|
@@ -43,6 +55,19 @@ export class CallService extends BaseService {
|
|
|
43
55
|
options.customTwilioConfig.secondaryPhoneNumbers?.toString(),
|
|
44
56
|
}
|
|
45
57
|
: undefined,
|
|
58
|
+
incidentId: options.incidentId?.toString(),
|
|
59
|
+
alertId: options.alertId?.toString(),
|
|
60
|
+
scheduledMaintenanceId: options.scheduledMaintenanceId?.toString(),
|
|
61
|
+
statusPageId: options.statusPageId?.toString(),
|
|
62
|
+
statusPageAnnouncementId: options.statusPageAnnouncementId?.toString(),
|
|
63
|
+
userId: options.userId?.toString(),
|
|
64
|
+
onCallPolicyId: options.onCallPolicyId?.toString(),
|
|
65
|
+
onCallPolicyEscalationRuleId:
|
|
66
|
+
options.onCallPolicyEscalationRuleId?.toString(),
|
|
67
|
+
teamId: options.teamId?.toString(),
|
|
68
|
+
onCallDutyPolicyExecutionLogTimelineId:
|
|
69
|
+
options.onCallDutyPolicyExecutionLogTimelineId?.toString(),
|
|
70
|
+
onCallScheduleId: options.onCallScheduleId?.toString(),
|
|
46
71
|
};
|
|
47
72
|
|
|
48
73
|
return await API.post<EmptyResponseData>(
|
package/Server/Services/Index.ts
CHANGED
|
@@ -159,6 +159,7 @@ import WorkspaceProjectAuthTokenService from "./WorkspaceProjectAuthTokenService
|
|
|
159
159
|
import WorkspaceUserAuthTokenService from "./WorkspaceUserAuthTokenService";
|
|
160
160
|
import WorkspaceSettingService from "./WorkspaceSettingService";
|
|
161
161
|
import WorkspaceNotificationRuleService from "./WorkspaceNotificationRuleService";
|
|
162
|
+
import WorkspaceNotificationLogService from "./WorkspaceNotificationLogService";
|
|
162
163
|
import OnCallDutyPolicyUserOverrideService from "./OnCallDutyPolicyUserOverrideService";
|
|
163
164
|
|
|
164
165
|
import MonitorLogService from "./MonitorLogService";
|
|
@@ -338,6 +339,7 @@ const services: Array<BaseService> = [
|
|
|
338
339
|
WorkspaceUserAuthTokenService,
|
|
339
340
|
WorkspaceSettingService,
|
|
340
341
|
WorkspaceNotificationRuleService,
|
|
342
|
+
WorkspaceNotificationLogService,
|
|
341
343
|
];
|
|
342
344
|
|
|
343
345
|
export const AnalyticsServices: Array<
|
|
@@ -21,6 +21,18 @@ export class MailService extends BaseService {
|
|
|
21
21
|
mailServer?: EmailServer | undefined;
|
|
22
22
|
userOnCallLogTimelineId?: ObjectID;
|
|
23
23
|
projectId?: ObjectID | undefined;
|
|
24
|
+
incidentId?: ObjectID | undefined;
|
|
25
|
+
alertId?: ObjectID | undefined;
|
|
26
|
+
scheduledMaintenanceId?: ObjectID | undefined;
|
|
27
|
+
statusPageId?: ObjectID | undefined;
|
|
28
|
+
statusPageAnnouncementId?: ObjectID | undefined;
|
|
29
|
+
userId?: ObjectID | undefined;
|
|
30
|
+
// On-call policy related fields
|
|
31
|
+
onCallPolicyId?: ObjectID | undefined;
|
|
32
|
+
onCallPolicyEscalationRuleId?: ObjectID | undefined;
|
|
33
|
+
onCallDutyPolicyExecutionLogTimelineId?: ObjectID | undefined;
|
|
34
|
+
onCallScheduleId?: ObjectID | undefined;
|
|
35
|
+
teamId?: ObjectID | undefined;
|
|
24
36
|
},
|
|
25
37
|
): Promise<HTTPResponse<EmptyResponseData>> {
|
|
26
38
|
const body: JSONObject = {
|
|
@@ -48,6 +60,54 @@ export class MailService extends BaseService {
|
|
|
48
60
|
body["projectId"] = options.projectId.toString();
|
|
49
61
|
}
|
|
50
62
|
|
|
63
|
+
if (options?.incidentId) {
|
|
64
|
+
body["incidentId"] = options.incidentId.toString();
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (options?.alertId) {
|
|
68
|
+
body["alertId"] = options.alertId.toString();
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if (options?.scheduledMaintenanceId) {
|
|
72
|
+
body["scheduledMaintenanceId"] =
|
|
73
|
+
options.scheduledMaintenanceId.toString();
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
if (options?.statusPageId) {
|
|
77
|
+
body["statusPageId"] = options.statusPageId.toString();
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if (options?.statusPageAnnouncementId) {
|
|
81
|
+
body["statusPageAnnouncementId"] =
|
|
82
|
+
options.statusPageAnnouncementId.toString();
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
if (options?.userId) {
|
|
86
|
+
body["userId"] = options.userId.toString();
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
if (options?.onCallPolicyId) {
|
|
90
|
+
body["onCallPolicyId"] = options.onCallPolicyId.toString();
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
if (options?.onCallPolicyEscalationRuleId) {
|
|
94
|
+
body["onCallPolicyEscalationRuleId"] =
|
|
95
|
+
options.onCallPolicyEscalationRuleId.toString();
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
if (options?.onCallDutyPolicyExecutionLogTimelineId) {
|
|
99
|
+
body["onCallDutyPolicyExecutionLogTimelineId"] =
|
|
100
|
+
options.onCallDutyPolicyExecutionLogTimelineId.toString();
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
if (options?.onCallScheduleId) {
|
|
104
|
+
body["onCallScheduleId"] = options.onCallScheduleId.toString();
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
if (options?.teamId) {
|
|
108
|
+
body["teamId"] = options.teamId.toString();
|
|
109
|
+
}
|
|
110
|
+
|
|
51
111
|
return await API.post<EmptyResponseData>(
|
|
52
112
|
new URL(
|
|
53
113
|
Protocol.HTTP,
|
|
@@ -126,6 +126,9 @@ export class Service extends DatabaseService<Model> {
|
|
|
126
126
|
pushNotificationMessage: pushMessage,
|
|
127
127
|
eventType:
|
|
128
128
|
NotificationSettingEventType.SEND_WHEN_USER_IS_ADDED_TO_ON_CALL_POLICY,
|
|
129
|
+
onCallPolicyId: createdModel.onCallDutyPolicy!.id!,
|
|
130
|
+
onCallPolicyEscalationRuleId:
|
|
131
|
+
createdModel.onCallDutyPolicyEscalationRule!.id!,
|
|
129
132
|
});
|
|
130
133
|
|
|
131
134
|
// add workspace message.
|
|
@@ -328,6 +331,9 @@ export class Service extends DatabaseService<Model> {
|
|
|
328
331
|
pushNotificationMessage: pushMessage,
|
|
329
332
|
eventType:
|
|
330
333
|
NotificationSettingEventType.SEND_WHEN_USER_IS_REMOVED_FROM_ON_CALL_POLICY,
|
|
334
|
+
onCallPolicyId: deletedItem.onCallDutyPolicy!.id!,
|
|
335
|
+
onCallPolicyEscalationRuleId:
|
|
336
|
+
deletedItem.onCallDutyPolicyEscalationRule!.id!,
|
|
331
337
|
});
|
|
332
338
|
}
|
|
333
339
|
|