@oneuptime/common 7.0.4039 → 7.0.4064
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 +9 -1
- package/Models/DatabaseModels/OnCallDutyPolicy.ts +20 -0
- package/Models/DatabaseModels/OnCallDutyPolicyFeed.ts +527 -0
- package/Models/DatabaseModels/OnCallDutyPolicyOwnerTeam.ts +426 -0
- package/Models/DatabaseModels/OnCallDutyPolicyOwnerUser.ts +425 -0
- package/Server/API/SlackAPI.ts +14 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1744804990712-MigrationName.ts +17 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1744809770336-MigrationName.ts +173 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +4 -0
- package/Server/Services/OnCallDutyPolicyEscalationRuleScheduleService.ts +71 -2
- package/Server/Services/OnCallDutyPolicyEscalationRuleService.ts +14 -0
- package/Server/Services/OnCallDutyPolicyEscalationRuleTeamService.ts +69 -2
- package/Server/Services/OnCallDutyPolicyEscalationRuleUserService.ts +77 -2
- package/Server/Services/OnCallDutyPolicyExecutionLogService.ts +1 -1
- package/Server/Services/OnCallDutyPolicyExecutionLogTimelineService.ts +1 -1
- package/Server/Services/OnCallDutyPolicyFeedService.ts +156 -0
- package/Server/Services/OnCallDutyPolicyOwnerTeamService.ts +181 -0
- package/Server/Services/OnCallDutyPolicyOwnerUserService.ts +174 -0
- package/Server/Services/OnCallDutyPolicyScheduleService.ts +101 -9
- package/Server/Services/OnCallDutyPolicyService.ts +219 -1
- package/Server/Services/OnCallDutyPolicyUserOverrideService.ts +184 -1
- package/Server/Services/WorkspaceNotificationRuleService.ts +93 -0
- package/Server/Utils/StartServer.ts +5 -2
- package/Server/Utils/Workspace/Slack/Actions/ActionTypes.ts +3 -0
- package/Server/Utils/Workspace/Slack/Actions/OnCallDutyPolicy.ts +48 -0
- package/Server/Utils/Workspace/Slack/Messages/OnCallDutyPolicy.ts +62 -0
- package/Server/Utils/Workspace/WorkspaceMessages/OnCallDutyPolicy.ts +75 -0
- package/Types/Permission.ts +112 -7
- package/Types/Workspace/NotificationRules/EventType.ts +1 -0
- package/Types/Workspace/NotificationRules/NotificationRuleCondition.ts +5 -0
- package/UI/webpack-middleware.js +65 -0
- package/build/dist/Models/DatabaseModels/Index.js +8 -0
- package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicy.js +20 -0
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicy.js.map +1 -1
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyFeed.js +549 -0
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyOwnerTeam.js +442 -0
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyOwnerTeam.js.map +1 -0
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyOwnerUser.js +441 -0
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyOwnerUser.js.map +1 -0
- package/build/dist/Server/API/SlackAPI.js +11 -0
- package/build/dist/Server/API/SlackAPI.js.map +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1744804990712-MigrationName.js +12 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1744804990712-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1744809770336-MigrationName.js +66 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1744809770336-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +4 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleScheduleService.js +52 -3
- package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleScheduleService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleService.js +12 -0
- package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleTeamService.js +52 -3
- package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleTeamService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleUserService.js +63 -3
- package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleUserService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyExecutionLogService.js +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyExecutionLogService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyExecutionLogTimelineService.js +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyExecutionLogTimelineService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyFeedService.js +119 -0
- package/build/dist/Server/Services/OnCallDutyPolicyFeedService.js.map +1 -0
- package/build/dist/Server/Services/OnCallDutyPolicyOwnerTeamService.js +161 -0
- package/build/dist/Server/Services/OnCallDutyPolicyOwnerTeamService.js.map +1 -0
- package/build/dist/Server/Services/OnCallDutyPolicyOwnerUserService.js +154 -0
- package/build/dist/Server/Services/OnCallDutyPolicyOwnerUserService.js.map +1 -0
- package/build/dist/Server/Services/OnCallDutyPolicyScheduleService.js +87 -20
- package/build/dist/Server/Services/OnCallDutyPolicyScheduleService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyService.js +174 -2
- package/build/dist/Server/Services/OnCallDutyPolicyService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyUserOverrideService.js +122 -0
- package/build/dist/Server/Services/OnCallDutyPolicyUserOverrideService.js.map +1 -1
- package/build/dist/Server/Services/WorkspaceNotificationRuleService.js +71 -0
- package/build/dist/Server/Services/WorkspaceNotificationRuleService.js.map +1 -1
- package/build/dist/Server/Utils/StartServer.js +5 -2
- package/build/dist/Server/Utils/StartServer.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/Slack/Actions/ActionTypes.js +2 -0
- package/build/dist/Server/Utils/Workspace/Slack/Actions/ActionTypes.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/Slack/Actions/OnCallDutyPolicy.js +50 -0
- package/build/dist/Server/Utils/Workspace/Slack/Actions/OnCallDutyPolicy.js.map +1 -0
- package/build/dist/Server/Utils/Workspace/Slack/Messages/OnCallDutyPolicy.js +52 -0
- package/build/dist/Server/Utils/Workspace/Slack/Messages/OnCallDutyPolicy.js.map +1 -0
- package/build/dist/Server/Utils/Workspace/WorkspaceMessages/OnCallDutyPolicy.js +69 -0
- package/build/dist/Server/Utils/Workspace/WorkspaceMessages/OnCallDutyPolicy.js.map +1 -0
- package/build/dist/Types/Permission.js +95 -7
- package/build/dist/Types/Permission.js.map +1 -1
- package/build/dist/Types/Workspace/NotificationRules/EventType.js +1 -0
- package/build/dist/Types/Workspace/NotificationRules/EventType.js.map +1 -1
- package/build/dist/Types/Workspace/NotificationRules/NotificationRuleCondition.js +4 -0
- package/build/dist/Types/Workspace/NotificationRules/NotificationRuleCondition.js.map +1 -1
- package/package.json +2 -2
|
@@ -58,6 +58,12 @@ import OnCallDutyPolicyEscalationRuleTeam from "./OnCallDutyPolicyEscalationRule
|
|
|
58
58
|
import OnCallDutyPolicyEscalationRuleUser from "./OnCallDutyPolicyEscalationRuleUser";
|
|
59
59
|
import OnCallDutyPolicyExecutionLog from "./OnCallDutyPolicyExecutionLog";
|
|
60
60
|
import OnCallDutyPolicyExecutionLogTimeline from "./OnCallDutyPolicyExecutionLogTimeline";
|
|
61
|
+
// owner team
|
|
62
|
+
import OnCallDutyPolicyOwnerTeam from "./OnCallDutyPolicyOwnerTeam";
|
|
63
|
+
import OnCallDutyPolicyOwnerUser from "./OnCallDutyPolicyOwnerUser";
|
|
64
|
+
|
|
65
|
+
// OnCall Duty Policy Feed
|
|
66
|
+
import OnCallDutyPolicyFeed from "./OnCallDutyPolicyFeed";
|
|
61
67
|
// On call duty policy schedule
|
|
62
68
|
import OnCallDutyPolicySchedule from "./OnCallDutyPolicySchedule";
|
|
63
69
|
import OnCallDutyPolicyScheduleLayer from "./OnCallDutyPolicyScheduleLayer";
|
|
@@ -316,7 +322,9 @@ const AllModelTypes: Array<{
|
|
|
316
322
|
OnCallDutyPolicySchedule,
|
|
317
323
|
OnCallDutyPolicyScheduleLayer,
|
|
318
324
|
OnCallDutyPolicyScheduleLayerUser,
|
|
319
|
-
|
|
325
|
+
OnCallDutyPolicyFeed,
|
|
326
|
+
OnCallDutyPolicyOwnerTeam,
|
|
327
|
+
OnCallDutyPolicyOwnerUser,
|
|
320
328
|
OnCallDutyPolicyEscalationRuleSchedule,
|
|
321
329
|
|
|
322
330
|
UsageBilling,
|
|
@@ -28,6 +28,7 @@ import {
|
|
|
28
28
|
ManyToMany,
|
|
29
29
|
ManyToOne,
|
|
30
30
|
} from "typeorm";
|
|
31
|
+
import NotificationRuleWorkspaceChannel from "../../Types/Workspace/NotificationRules/NotificationRuleWorkspaceChannel";
|
|
31
32
|
|
|
32
33
|
@EnableDocumentation()
|
|
33
34
|
@AccessControlColumn("labels")
|
|
@@ -496,4 +497,23 @@ export default class OnCallDutyPolicy extends BaseModel {
|
|
|
496
497
|
nullable: true,
|
|
497
498
|
})
|
|
498
499
|
public customFields?: JSONObject = undefined;
|
|
500
|
+
|
|
501
|
+
@ColumnAccessControl({
|
|
502
|
+
create: [],
|
|
503
|
+
read: [],
|
|
504
|
+
update: [],
|
|
505
|
+
})
|
|
506
|
+
@TableColumn({
|
|
507
|
+
isDefaultValueColumn: false,
|
|
508
|
+
required: false,
|
|
509
|
+
type: TableColumnType.JSON,
|
|
510
|
+
title: "Post Updates To Workspace Channel Name",
|
|
511
|
+
description: "Post Updates To Workspace Channel Name",
|
|
512
|
+
})
|
|
513
|
+
@Column({
|
|
514
|
+
type: ColumnType.JSON,
|
|
515
|
+
nullable: true,
|
|
516
|
+
})
|
|
517
|
+
public postUpdatesToWorkspaceChannels?: Array<NotificationRuleWorkspaceChannel> =
|
|
518
|
+
undefined;
|
|
499
519
|
}
|
|
@@ -0,0 +1,527 @@
|
|
|
1
|
+
import OnCallDutyPolicy from "./OnCallDutyPolicy";
|
|
2
|
+
import Project from "./Project";
|
|
3
|
+
import User from "./User";
|
|
4
|
+
import BaseModel from "./DatabaseBaseModel/DatabaseBaseModel";
|
|
5
|
+
import Route from "../../Types/API/Route";
|
|
6
|
+
import ColumnAccessControl from "../../Types/Database/AccessControl/ColumnAccessControl";
|
|
7
|
+
import TableAccessControl from "../../Types/Database/AccessControl/TableAccessControl";
|
|
8
|
+
import CanAccessIfCanReadOn from "../../Types/Database/CanAccessIfCanReadOn";
|
|
9
|
+
import ColumnType from "../../Types/Database/ColumnType";
|
|
10
|
+
import CrudApiEndpoint from "../../Types/Database/CrudApiEndpoint";
|
|
11
|
+
import EnableDocumentation from "../../Types/Database/EnableDocumentation";
|
|
12
|
+
import EnableWorkflow from "../../Types/Database/EnableWorkflow";
|
|
13
|
+
import TableColumn from "../../Types/Database/TableColumn";
|
|
14
|
+
import TableColumnType from "../../Types/Database/TableColumnType";
|
|
15
|
+
import TableMetadata from "../../Types/Database/TableMetadata";
|
|
16
|
+
import TenantColumn from "../../Types/Database/TenantColumn";
|
|
17
|
+
import IconProp from "../../Types/Icon/IconProp";
|
|
18
|
+
import ObjectID from "../../Types/ObjectID";
|
|
19
|
+
import Permission from "../../Types/Permission";
|
|
20
|
+
import { Column, Entity, Index, JoinColumn, ManyToOne } from "typeorm";
|
|
21
|
+
import Color from "../../Types/Color";
|
|
22
|
+
import ColumnLength from "../../Types/Database/ColumnLength";
|
|
23
|
+
|
|
24
|
+
export enum OnCallDutyPolicyFeedEventType {
|
|
25
|
+
UserAdded = "UserAdded",
|
|
26
|
+
UserRemoved = "UserRemoved",
|
|
27
|
+
TeamAdded = "TeamAdded",
|
|
28
|
+
TeamRemoved = "TeamRemoved",
|
|
29
|
+
OnCallDutyScheduleAdded = "OnCallDutyScheduleAdded",
|
|
30
|
+
OnCallDutyScheduleRemoved = "OnCallDutyScheduleRemoved",
|
|
31
|
+
OnCallDutyPolicyCreated = "OnCallDutyPolicyCreated",
|
|
32
|
+
RosterHandoff = "RosterHandoff",
|
|
33
|
+
OwnerUserAdded = "OwnerUserAdded",
|
|
34
|
+
OwnerUserRemoved = "OwnerUserRemoved",
|
|
35
|
+
OwnerTeamAdded = "OwnerTeamAdded",
|
|
36
|
+
OwnerTeamRemoved = "OwnerTeamRemoved",
|
|
37
|
+
UserOverrideAdded = "UserOverrideAdded",
|
|
38
|
+
UserOverrideRemoved = "UserOverrideRemoved",
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@EnableDocumentation()
|
|
42
|
+
@CanAccessIfCanReadOn("onCallDutyPolicy")
|
|
43
|
+
@TenantColumn("projectId")
|
|
44
|
+
@TableAccessControl({
|
|
45
|
+
create: [
|
|
46
|
+
Permission.ProjectOwner,
|
|
47
|
+
Permission.ProjectAdmin,
|
|
48
|
+
Permission.ProjectMember,
|
|
49
|
+
Permission.CreateOnCallDutyPolicyFeed,
|
|
50
|
+
],
|
|
51
|
+
read: [
|
|
52
|
+
Permission.ProjectOwner,
|
|
53
|
+
Permission.ProjectAdmin,
|
|
54
|
+
Permission.ProjectMember,
|
|
55
|
+
Permission.ReadOnCallDutyPolicyFeed,
|
|
56
|
+
],
|
|
57
|
+
delete: [],
|
|
58
|
+
update: [],
|
|
59
|
+
})
|
|
60
|
+
@EnableWorkflow({
|
|
61
|
+
create: true,
|
|
62
|
+
delete: true,
|
|
63
|
+
update: true,
|
|
64
|
+
read: true,
|
|
65
|
+
})
|
|
66
|
+
@CrudApiEndpoint(new Route("/on-call-duty-policy-feed"))
|
|
67
|
+
@Entity({
|
|
68
|
+
name: "OnCallDutyPolicyFeed",
|
|
69
|
+
})
|
|
70
|
+
@TableMetadata({
|
|
71
|
+
tableName: "OnCallDutyPolicyFeed",
|
|
72
|
+
singularName: "On Call Duty Policy Feed",
|
|
73
|
+
pluralName: "On Call Duty Policy Feeds",
|
|
74
|
+
icon: IconProp.List,
|
|
75
|
+
tableDescription:
|
|
76
|
+
"Log of the entire onCallDutyPolicy state change. This is a log of all the on call duty policy changes.",
|
|
77
|
+
})
|
|
78
|
+
export default class OnCallDutyPolicyFeed extends BaseModel {
|
|
79
|
+
@ColumnAccessControl({
|
|
80
|
+
create: [
|
|
81
|
+
Permission.ProjectOwner,
|
|
82
|
+
Permission.ProjectAdmin,
|
|
83
|
+
Permission.ProjectMember,
|
|
84
|
+
Permission.CreateOnCallDutyPolicyFeed,
|
|
85
|
+
],
|
|
86
|
+
read: [
|
|
87
|
+
Permission.ProjectOwner,
|
|
88
|
+
Permission.ProjectAdmin,
|
|
89
|
+
Permission.ProjectMember,
|
|
90
|
+
Permission.ReadOnCallDutyPolicyFeed,
|
|
91
|
+
],
|
|
92
|
+
update: [],
|
|
93
|
+
})
|
|
94
|
+
@TableColumn({
|
|
95
|
+
manyToOneRelationColumn: "projectId",
|
|
96
|
+
type: TableColumnType.Entity,
|
|
97
|
+
modelType: Project,
|
|
98
|
+
title: "Project",
|
|
99
|
+
description: "Relation to Project Resource in which this object belongs",
|
|
100
|
+
})
|
|
101
|
+
@ManyToOne(
|
|
102
|
+
() => {
|
|
103
|
+
return Project;
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
eager: false,
|
|
107
|
+
nullable: true,
|
|
108
|
+
onDelete: "CASCADE",
|
|
109
|
+
orphanedRowAction: "nullify",
|
|
110
|
+
},
|
|
111
|
+
)
|
|
112
|
+
@JoinColumn({ name: "projectId" })
|
|
113
|
+
public project?: Project = undefined;
|
|
114
|
+
|
|
115
|
+
@ColumnAccessControl({
|
|
116
|
+
create: [
|
|
117
|
+
Permission.ProjectOwner,
|
|
118
|
+
Permission.ProjectAdmin,
|
|
119
|
+
Permission.ProjectMember,
|
|
120
|
+
Permission.CreateOnCallDutyPolicyFeed,
|
|
121
|
+
],
|
|
122
|
+
read: [
|
|
123
|
+
Permission.ProjectOwner,
|
|
124
|
+
Permission.ProjectAdmin,
|
|
125
|
+
Permission.ProjectMember,
|
|
126
|
+
Permission.ReadOnCallDutyPolicyFeed,
|
|
127
|
+
],
|
|
128
|
+
update: [],
|
|
129
|
+
})
|
|
130
|
+
@Index()
|
|
131
|
+
@TableColumn({
|
|
132
|
+
type: TableColumnType.ObjectID,
|
|
133
|
+
required: true,
|
|
134
|
+
canReadOnRelationQuery: true,
|
|
135
|
+
title: "Project ID",
|
|
136
|
+
description: "ID of your OneUptime Project in which this object belongs",
|
|
137
|
+
})
|
|
138
|
+
@Column({
|
|
139
|
+
type: ColumnType.ObjectID,
|
|
140
|
+
nullable: false,
|
|
141
|
+
transformer: ObjectID.getDatabaseTransformer(),
|
|
142
|
+
})
|
|
143
|
+
public projectId?: ObjectID = undefined;
|
|
144
|
+
|
|
145
|
+
@ColumnAccessControl({
|
|
146
|
+
create: [
|
|
147
|
+
Permission.ProjectOwner,
|
|
148
|
+
Permission.ProjectAdmin,
|
|
149
|
+
Permission.ProjectMember,
|
|
150
|
+
Permission.CreateOnCallDutyPolicyFeed,
|
|
151
|
+
],
|
|
152
|
+
read: [
|
|
153
|
+
Permission.ProjectOwner,
|
|
154
|
+
Permission.ProjectAdmin,
|
|
155
|
+
Permission.ProjectMember,
|
|
156
|
+
Permission.ReadOnCallDutyPolicyFeed,
|
|
157
|
+
],
|
|
158
|
+
update: [],
|
|
159
|
+
})
|
|
160
|
+
@TableColumn({
|
|
161
|
+
manyToOneRelationColumn: "onCallDutyPolicyId",
|
|
162
|
+
type: TableColumnType.Entity,
|
|
163
|
+
modelType: OnCallDutyPolicy,
|
|
164
|
+
title: "OnCallDutyPolicy",
|
|
165
|
+
description: "Relation to OnCallDutyPolicy in which this resource belongs",
|
|
166
|
+
})
|
|
167
|
+
@ManyToOne(
|
|
168
|
+
() => {
|
|
169
|
+
return OnCallDutyPolicy;
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
eager: false,
|
|
173
|
+
nullable: true,
|
|
174
|
+
onDelete: "CASCADE",
|
|
175
|
+
orphanedRowAction: "nullify",
|
|
176
|
+
},
|
|
177
|
+
)
|
|
178
|
+
@JoinColumn({ name: "onCallDutyPolicyId" })
|
|
179
|
+
public onCallDutyPolicy?: OnCallDutyPolicy = undefined;
|
|
180
|
+
|
|
181
|
+
@ColumnAccessControl({
|
|
182
|
+
create: [
|
|
183
|
+
Permission.ProjectOwner,
|
|
184
|
+
Permission.ProjectAdmin,
|
|
185
|
+
Permission.ProjectMember,
|
|
186
|
+
Permission.CreateOnCallDutyPolicyFeed,
|
|
187
|
+
],
|
|
188
|
+
read: [
|
|
189
|
+
Permission.ProjectOwner,
|
|
190
|
+
Permission.ProjectAdmin,
|
|
191
|
+
Permission.ProjectMember,
|
|
192
|
+
Permission.ReadOnCallDutyPolicyFeed,
|
|
193
|
+
],
|
|
194
|
+
update: [],
|
|
195
|
+
})
|
|
196
|
+
@Index()
|
|
197
|
+
@TableColumn({
|
|
198
|
+
type: TableColumnType.ObjectID,
|
|
199
|
+
required: true,
|
|
200
|
+
title: "OnCallDutyPolicy ID",
|
|
201
|
+
description:
|
|
202
|
+
"Relation to OnCallDutyPolicy ID in which this resource belongs",
|
|
203
|
+
})
|
|
204
|
+
@Column({
|
|
205
|
+
type: ColumnType.ObjectID,
|
|
206
|
+
nullable: false,
|
|
207
|
+
transformer: ObjectID.getDatabaseTransformer(),
|
|
208
|
+
})
|
|
209
|
+
public onCallDutyPolicyId?: ObjectID = undefined;
|
|
210
|
+
|
|
211
|
+
@ColumnAccessControl({
|
|
212
|
+
create: [
|
|
213
|
+
Permission.ProjectOwner,
|
|
214
|
+
Permission.ProjectAdmin,
|
|
215
|
+
Permission.ProjectMember,
|
|
216
|
+
Permission.CreateOnCallDutyPolicyFeed,
|
|
217
|
+
],
|
|
218
|
+
read: [
|
|
219
|
+
Permission.ProjectOwner,
|
|
220
|
+
Permission.ProjectAdmin,
|
|
221
|
+
Permission.ProjectMember,
|
|
222
|
+
Permission.ReadOnCallDutyPolicyFeed,
|
|
223
|
+
],
|
|
224
|
+
update: [],
|
|
225
|
+
})
|
|
226
|
+
@TableColumn({
|
|
227
|
+
manyToOneRelationColumn: "createdByUserId",
|
|
228
|
+
type: TableColumnType.Entity,
|
|
229
|
+
modelType: User,
|
|
230
|
+
title: "Created by User",
|
|
231
|
+
description:
|
|
232
|
+
"Relation to User who created this object (if this object was created by a User)",
|
|
233
|
+
})
|
|
234
|
+
@ManyToOne(
|
|
235
|
+
() => {
|
|
236
|
+
return User;
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
eager: false,
|
|
240
|
+
nullable: true,
|
|
241
|
+
onDelete: "SET NULL",
|
|
242
|
+
orphanedRowAction: "nullify",
|
|
243
|
+
},
|
|
244
|
+
)
|
|
245
|
+
@JoinColumn({ name: "createdByUserId" })
|
|
246
|
+
public createdByUser?: User = undefined;
|
|
247
|
+
|
|
248
|
+
@ColumnAccessControl({
|
|
249
|
+
create: [
|
|
250
|
+
Permission.ProjectOwner,
|
|
251
|
+
Permission.ProjectAdmin,
|
|
252
|
+
Permission.ProjectMember,
|
|
253
|
+
Permission.CreateOnCallDutyPolicyFeed,
|
|
254
|
+
],
|
|
255
|
+
read: [
|
|
256
|
+
Permission.ProjectOwner,
|
|
257
|
+
Permission.ProjectAdmin,
|
|
258
|
+
Permission.ProjectMember,
|
|
259
|
+
Permission.ReadOnCallDutyPolicyFeed,
|
|
260
|
+
],
|
|
261
|
+
update: [],
|
|
262
|
+
})
|
|
263
|
+
@TableColumn({
|
|
264
|
+
type: TableColumnType.ObjectID,
|
|
265
|
+
title: "Created by User ID",
|
|
266
|
+
description:
|
|
267
|
+
"User ID who created this object (if this object was created by a User)",
|
|
268
|
+
})
|
|
269
|
+
@Column({
|
|
270
|
+
type: ColumnType.ObjectID,
|
|
271
|
+
nullable: true,
|
|
272
|
+
transformer: ObjectID.getDatabaseTransformer(),
|
|
273
|
+
})
|
|
274
|
+
public createdByUserId?: ObjectID = undefined;
|
|
275
|
+
|
|
276
|
+
@ColumnAccessControl({
|
|
277
|
+
create: [],
|
|
278
|
+
read: [],
|
|
279
|
+
update: [],
|
|
280
|
+
})
|
|
281
|
+
@TableColumn({
|
|
282
|
+
manyToOneRelationColumn: "deletedByUserId",
|
|
283
|
+
type: TableColumnType.Entity,
|
|
284
|
+
title: "Deleted by User",
|
|
285
|
+
description:
|
|
286
|
+
"Relation to User who deleted this object (if this object was deleted by a User)",
|
|
287
|
+
})
|
|
288
|
+
@ManyToOne(
|
|
289
|
+
() => {
|
|
290
|
+
return User;
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
cascade: false,
|
|
294
|
+
eager: false,
|
|
295
|
+
nullable: true,
|
|
296
|
+
onDelete: "SET NULL",
|
|
297
|
+
orphanedRowAction: "nullify",
|
|
298
|
+
},
|
|
299
|
+
)
|
|
300
|
+
@JoinColumn({ name: "deletedByUserId" })
|
|
301
|
+
public deletedByUser?: User = undefined;
|
|
302
|
+
|
|
303
|
+
@ColumnAccessControl({
|
|
304
|
+
create: [],
|
|
305
|
+
read: [],
|
|
306
|
+
update: [],
|
|
307
|
+
})
|
|
308
|
+
@TableColumn({
|
|
309
|
+
type: TableColumnType.ObjectID,
|
|
310
|
+
title: "Deleted by User ID",
|
|
311
|
+
description:
|
|
312
|
+
"User ID who deleted this object (if this object was deleted by a User)",
|
|
313
|
+
})
|
|
314
|
+
@Column({
|
|
315
|
+
type: ColumnType.ObjectID,
|
|
316
|
+
nullable: true,
|
|
317
|
+
transformer: ObjectID.getDatabaseTransformer(),
|
|
318
|
+
})
|
|
319
|
+
public deletedByUserId?: ObjectID = undefined;
|
|
320
|
+
|
|
321
|
+
@ColumnAccessControl({
|
|
322
|
+
create: [
|
|
323
|
+
Permission.ProjectOwner,
|
|
324
|
+
Permission.ProjectAdmin,
|
|
325
|
+
Permission.ProjectMember,
|
|
326
|
+
Permission.CreateOnCallDutyPolicyFeed,
|
|
327
|
+
],
|
|
328
|
+
read: [
|
|
329
|
+
Permission.ProjectOwner,
|
|
330
|
+
Permission.ProjectAdmin,
|
|
331
|
+
Permission.ProjectMember,
|
|
332
|
+
Permission.ReadOnCallDutyPolicyFeed,
|
|
333
|
+
],
|
|
334
|
+
update: [],
|
|
335
|
+
})
|
|
336
|
+
@TableColumn({
|
|
337
|
+
type: TableColumnType.Markdown,
|
|
338
|
+
required: true,
|
|
339
|
+
title: "Log (in Markdown)",
|
|
340
|
+
description: "Log of the entire onCallDutyPolicy state change in Markdown",
|
|
341
|
+
})
|
|
342
|
+
@Column({
|
|
343
|
+
type: ColumnType.Markdown,
|
|
344
|
+
nullable: false,
|
|
345
|
+
unique: false,
|
|
346
|
+
})
|
|
347
|
+
public feedInfoInMarkdown?: string = undefined;
|
|
348
|
+
|
|
349
|
+
@ColumnAccessControl({
|
|
350
|
+
create: [
|
|
351
|
+
Permission.ProjectOwner,
|
|
352
|
+
Permission.ProjectAdmin,
|
|
353
|
+
Permission.ProjectMember,
|
|
354
|
+
Permission.CreateOnCallDutyPolicyFeed,
|
|
355
|
+
],
|
|
356
|
+
read: [
|
|
357
|
+
Permission.ProjectOwner,
|
|
358
|
+
Permission.ProjectAdmin,
|
|
359
|
+
Permission.ProjectMember,
|
|
360
|
+
Permission.ReadOnCallDutyPolicyFeed,
|
|
361
|
+
],
|
|
362
|
+
update: [],
|
|
363
|
+
})
|
|
364
|
+
@TableColumn({
|
|
365
|
+
type: TableColumnType.Markdown,
|
|
366
|
+
required: false,
|
|
367
|
+
title: "More Information (in Markdown)",
|
|
368
|
+
description: "More information in Markdown",
|
|
369
|
+
})
|
|
370
|
+
@Column({
|
|
371
|
+
type: ColumnType.Markdown,
|
|
372
|
+
nullable: true,
|
|
373
|
+
unique: false,
|
|
374
|
+
})
|
|
375
|
+
public moreInformationInMarkdown?: string = undefined;
|
|
376
|
+
|
|
377
|
+
@ColumnAccessControl({
|
|
378
|
+
create: [
|
|
379
|
+
Permission.ProjectOwner,
|
|
380
|
+
Permission.ProjectAdmin,
|
|
381
|
+
Permission.ProjectMember,
|
|
382
|
+
Permission.CreateOnCallDutyPolicyFeed,
|
|
383
|
+
],
|
|
384
|
+
read: [
|
|
385
|
+
Permission.ProjectOwner,
|
|
386
|
+
Permission.ProjectAdmin,
|
|
387
|
+
Permission.ProjectMember,
|
|
388
|
+
Permission.ReadOnCallDutyPolicyFeed,
|
|
389
|
+
],
|
|
390
|
+
update: [],
|
|
391
|
+
})
|
|
392
|
+
@TableColumn({
|
|
393
|
+
type: TableColumnType.ShortText,
|
|
394
|
+
required: true,
|
|
395
|
+
title: "On Call Duty Policy Feed Event",
|
|
396
|
+
description: "On Call Duty Policy Feed Event",
|
|
397
|
+
})
|
|
398
|
+
@Column({
|
|
399
|
+
type: ColumnType.ShortText,
|
|
400
|
+
nullable: false,
|
|
401
|
+
unique: false,
|
|
402
|
+
})
|
|
403
|
+
public onCallDutyPolicyFeedEventType?: OnCallDutyPolicyFeedEventType =
|
|
404
|
+
undefined;
|
|
405
|
+
|
|
406
|
+
@ColumnAccessControl({
|
|
407
|
+
create: [
|
|
408
|
+
Permission.ProjectOwner,
|
|
409
|
+
Permission.ProjectAdmin,
|
|
410
|
+
Permission.ProjectMember,
|
|
411
|
+
Permission.CreateOnCallDutyPolicyFeed,
|
|
412
|
+
],
|
|
413
|
+
read: [
|
|
414
|
+
Permission.ProjectOwner,
|
|
415
|
+
Permission.ProjectAdmin,
|
|
416
|
+
Permission.ProjectMember,
|
|
417
|
+
Permission.ReadOnCallDutyPolicyFeed,
|
|
418
|
+
],
|
|
419
|
+
update: [],
|
|
420
|
+
})
|
|
421
|
+
@TableColumn({
|
|
422
|
+
type: TableColumnType.Color,
|
|
423
|
+
required: true,
|
|
424
|
+
title: "Color",
|
|
425
|
+
description: "Display color for the onCallDutyPolicy log",
|
|
426
|
+
})
|
|
427
|
+
@Column({
|
|
428
|
+
type: ColumnType.Color,
|
|
429
|
+
length: ColumnLength.Color,
|
|
430
|
+
nullable: false,
|
|
431
|
+
unique: false,
|
|
432
|
+
transformer: Color.getDatabaseTransformer(),
|
|
433
|
+
})
|
|
434
|
+
public displayColor?: Color = undefined;
|
|
435
|
+
|
|
436
|
+
@ColumnAccessControl({
|
|
437
|
+
create: [
|
|
438
|
+
Permission.ProjectOwner,
|
|
439
|
+
Permission.ProjectAdmin,
|
|
440
|
+
Permission.ProjectMember,
|
|
441
|
+
Permission.CreateScheduledMaintenanceFeed,
|
|
442
|
+
],
|
|
443
|
+
read: [
|
|
444
|
+
Permission.ProjectOwner,
|
|
445
|
+
Permission.ProjectAdmin,
|
|
446
|
+
Permission.ProjectMember,
|
|
447
|
+
Permission.ReadScheduledMaintenanceFeed,
|
|
448
|
+
],
|
|
449
|
+
update: [],
|
|
450
|
+
})
|
|
451
|
+
@TableColumn({
|
|
452
|
+
manyToOneRelationColumn: "userId",
|
|
453
|
+
type: TableColumnType.Entity,
|
|
454
|
+
modelType: User,
|
|
455
|
+
title: "User",
|
|
456
|
+
description:
|
|
457
|
+
"Relation to User who this feed belongs to (if this feed belongs to a User)",
|
|
458
|
+
})
|
|
459
|
+
@ManyToOne(
|
|
460
|
+
() => {
|
|
461
|
+
return User;
|
|
462
|
+
},
|
|
463
|
+
{
|
|
464
|
+
eager: false,
|
|
465
|
+
nullable: true,
|
|
466
|
+
onDelete: "SET NULL",
|
|
467
|
+
orphanedRowAction: "nullify",
|
|
468
|
+
},
|
|
469
|
+
)
|
|
470
|
+
@JoinColumn({ name: "userId" })
|
|
471
|
+
public user?: User = undefined;
|
|
472
|
+
|
|
473
|
+
@ColumnAccessControl({
|
|
474
|
+
create: [
|
|
475
|
+
Permission.ProjectOwner,
|
|
476
|
+
Permission.ProjectAdmin,
|
|
477
|
+
Permission.ProjectMember,
|
|
478
|
+
Permission.CreateScheduledMaintenanceFeed,
|
|
479
|
+
],
|
|
480
|
+
read: [
|
|
481
|
+
Permission.ProjectOwner,
|
|
482
|
+
Permission.ProjectAdmin,
|
|
483
|
+
Permission.ProjectMember,
|
|
484
|
+
Permission.ReadScheduledMaintenanceFeed,
|
|
485
|
+
],
|
|
486
|
+
update: [],
|
|
487
|
+
})
|
|
488
|
+
@TableColumn({
|
|
489
|
+
type: TableColumnType.ObjectID,
|
|
490
|
+
title: "User ID",
|
|
491
|
+
description:
|
|
492
|
+
"User who this feed belongs to (if this feed belongs to a User)",
|
|
493
|
+
})
|
|
494
|
+
@Column({
|
|
495
|
+
type: ColumnType.ObjectID,
|
|
496
|
+
nullable: true,
|
|
497
|
+
transformer: ObjectID.getDatabaseTransformer(),
|
|
498
|
+
})
|
|
499
|
+
public userId?: ObjectID = undefined;
|
|
500
|
+
|
|
501
|
+
@ColumnAccessControl({
|
|
502
|
+
create: [
|
|
503
|
+
Permission.ProjectOwner,
|
|
504
|
+
Permission.ProjectAdmin,
|
|
505
|
+
Permission.ProjectMember,
|
|
506
|
+
Permission.CreateScheduledMaintenanceFeed,
|
|
507
|
+
],
|
|
508
|
+
read: [
|
|
509
|
+
Permission.ProjectOwner,
|
|
510
|
+
Permission.ProjectAdmin,
|
|
511
|
+
Permission.ProjectMember,
|
|
512
|
+
Permission.ReadScheduledMaintenanceFeed,
|
|
513
|
+
],
|
|
514
|
+
update: [],
|
|
515
|
+
})
|
|
516
|
+
@TableColumn({
|
|
517
|
+
title: "Feed Posted At",
|
|
518
|
+
description: "Date and time when the feed was posted",
|
|
519
|
+
type: TableColumnType.Date,
|
|
520
|
+
})
|
|
521
|
+
@Column({
|
|
522
|
+
type: ColumnType.Date,
|
|
523
|
+
nullable: true,
|
|
524
|
+
unique: false,
|
|
525
|
+
})
|
|
526
|
+
public postedAt?: Date = undefined;
|
|
527
|
+
}
|