@oneuptime/common 9.3.22 → 9.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Models/DatabaseModels/IncomingCallLog.ts +521 -0
- package/Models/DatabaseModels/IncomingCallLogItem.ts +463 -0
- package/Models/DatabaseModels/IncomingCallPolicy.ts +811 -0
- package/Models/DatabaseModels/IncomingCallPolicyEscalationRule.ts +597 -0
- package/Models/DatabaseModels/Index.ts +18 -0
- package/Models/DatabaseModels/ProjectSCIMLog.ts +422 -0
- package/Models/DatabaseModels/StatusPageSCIMLog.ts +455 -0
- package/Models/DatabaseModels/User.ts +0 -15
- package/Models/DatabaseModels/UserIncomingCallNumber.ts +296 -0
- package/Server/API/UserIncomingCallNumberAPI.ts +128 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1768583966447-MigrationName.ts +121 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1768647802022-RemoveAlertPhoneNumberFromUser.ts +22 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1768649699509-MigrationName.ts +787 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1768682071562-MigrationName.ts +29 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +8 -0
- package/Server/Services/IncomingCallLogItemService.ts +10 -0
- package/Server/Services/IncomingCallLogService.ts +10 -0
- package/Server/Services/IncomingCallPolicyEscalationRuleService.ts +267 -0
- package/Server/Services/IncomingCallPolicyService.ts +10 -0
- package/Server/Services/Index.ts +7 -0
- package/Server/Services/ProjectSCIMLogService.ts +11 -0
- package/Server/Services/StatusPageSCIMLogService.ts +11 -0
- package/Server/Services/UserCallService.ts +31 -0
- package/Server/Services/UserIncomingCallNumberService.ts +258 -0
- package/Server/Services/UserSmsService.ts +31 -0
- package/Server/Utils/StartServer.ts +5 -0
- package/Types/Call/CallProvider.ts +99 -0
- package/Types/Call/CallProviderType.ts +6 -0
- package/Types/Icon/IconProp.ts +1 -0
- package/Types/IncomingCall/IncomingCallStatus.ts +13 -0
- package/Types/Permission.ts +126 -0
- package/Types/Phone.ts +53 -4
- package/Types/SCIM/SCIMLogStatus.ts +7 -0
- package/UI/Components/Diagram/ConceptCards.tsx +74 -0
- package/UI/Components/Diagram/HorizontalStepChain.tsx +92 -0
- package/UI/Components/Diagram/Index.ts +11 -0
- package/UI/Components/Diagram/NumberedSteps.tsx +77 -0
- package/UI/Components/Diagram/VerticalFlowSteps.tsx +59 -0
- package/UI/Components/Icon/Icon.tsx +10 -0
- package/UI/Components/SimpleLogViewer/SimpleLogViewer.tsx +86 -2
- package/build/dist/Models/DatabaseModels/IncomingCallLog.js +565 -0
- package/build/dist/Models/DatabaseModels/IncomingCallLog.js.map +1 -0
- package/build/dist/Models/DatabaseModels/IncomingCallLogItem.js +497 -0
- package/build/dist/Models/DatabaseModels/IncomingCallLogItem.js.map +1 -0
- package/build/dist/Models/DatabaseModels/IncomingCallPolicy.js +840 -0
- package/build/dist/Models/DatabaseModels/IncomingCallPolicy.js.map +1 -0
- package/build/dist/Models/DatabaseModels/IncomingCallPolicyEscalationRule.js +619 -0
- package/build/dist/Models/DatabaseModels/IncomingCallPolicyEscalationRule.js.map +1 -0
- package/build/dist/Models/DatabaseModels/Index.js +16 -0
- package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
- package/build/dist/Models/DatabaseModels/ProjectSCIMLog.js +455 -0
- package/build/dist/Models/DatabaseModels/ProjectSCIMLog.js.map +1 -0
- package/build/dist/Models/DatabaseModels/StatusPageSCIMLog.js +486 -0
- package/build/dist/Models/DatabaseModels/StatusPageSCIMLog.js.map +1 -0
- package/build/dist/Models/DatabaseModels/User.js +0 -16
- package/build/dist/Models/DatabaseModels/User.js.map +1 -1
- package/build/dist/Models/DatabaseModels/UserIncomingCallNumber.js +315 -0
- package/build/dist/Models/DatabaseModels/UserIncomingCallNumber.js.map +1 -0
- package/build/dist/Server/API/UserIncomingCallNumberAPI.js +72 -0
- package/build/dist/Server/API/UserIncomingCallNumberAPI.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1768583966447-MigrationName.js +48 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1768583966447-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1768647802022-RemoveAlertPhoneNumberFromUser.js +34 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1768647802022-RemoveAlertPhoneNumberFromUser.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1768649699509-MigrationName.js +270 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1768649699509-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1768682071562-MigrationName.js +16 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1768682071562-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +8 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Services/IncomingCallLogItemService.js +9 -0
- package/build/dist/Server/Services/IncomingCallLogItemService.js.map +1 -0
- package/build/dist/Server/Services/IncomingCallLogService.js +9 -0
- package/build/dist/Server/Services/IncomingCallLogService.js.map +1 -0
- package/build/dist/Server/Services/IncomingCallPolicyEscalationRuleService.js +197 -0
- package/build/dist/Server/Services/IncomingCallPolicyEscalationRuleService.js.map +1 -0
- package/build/dist/Server/Services/IncomingCallPolicyService.js +9 -0
- package/build/dist/Server/Services/IncomingCallPolicyService.js.map +1 -0
- package/build/dist/Server/Services/Index.js +6 -0
- package/build/dist/Server/Services/Index.js.map +1 -1
- package/build/dist/Server/Services/ProjectSCIMLogService.js +10 -0
- package/build/dist/Server/Services/ProjectSCIMLogService.js.map +1 -0
- package/build/dist/Server/Services/StatusPageSCIMLogService.js +10 -0
- package/build/dist/Server/Services/StatusPageSCIMLogService.js.map +1 -0
- package/build/dist/Server/Services/UserCallService.js +21 -0
- package/build/dist/Server/Services/UserCallService.js.map +1 -1
- package/build/dist/Server/Services/UserIncomingCallNumberService.js +225 -0
- package/build/dist/Server/Services/UserIncomingCallNumberService.js.map +1 -0
- package/build/dist/Server/Services/UserSmsService.js +21 -0
- package/build/dist/Server/Services/UserSmsService.js.map +1 -1
- package/build/dist/Server/Utils/StartServer.js +5 -0
- package/build/dist/Server/Utils/StartServer.js.map +1 -1
- package/build/dist/Types/Call/CallProvider.js +2 -0
- package/build/dist/Types/Call/CallProvider.js.map +1 -0
- package/build/dist/Types/Call/CallProviderType.js +7 -0
- package/build/dist/Types/Call/CallProviderType.js.map +1 -0
- package/build/dist/Types/Icon/IconProp.js +1 -0
- package/build/dist/Types/Icon/IconProp.js.map +1 -1
- package/build/dist/Types/IncomingCall/IncomingCallStatus.js +14 -0
- package/build/dist/Types/IncomingCall/IncomingCallStatus.js.map +1 -0
- package/build/dist/Types/Permission.js +104 -0
- package/build/dist/Types/Permission.js.map +1 -1
- package/build/dist/Types/Phone.js +47 -3
- package/build/dist/Types/Phone.js.map +1 -1
- package/build/dist/Types/SCIM/SCIMLogStatus.js +8 -0
- package/build/dist/Types/SCIM/SCIMLogStatus.js.map +1 -0
- package/build/dist/UI/Components/Diagram/ConceptCards.js +30 -0
- package/build/dist/UI/Components/Diagram/ConceptCards.js.map +1 -0
- package/build/dist/UI/Components/Diagram/HorizontalStepChain.js +30 -0
- package/build/dist/UI/Components/Diagram/HorizontalStepChain.js.map +1 -0
- package/build/dist/UI/Components/Diagram/Index.js +5 -0
- package/build/dist/UI/Components/Diagram/Index.js.map +1 -0
- package/build/dist/UI/Components/Diagram/NumberedSteps.js +18 -0
- package/build/dist/UI/Components/Diagram/NumberedSteps.js.map +1 -0
- package/build/dist/UI/Components/Diagram/VerticalFlowSteps.js +16 -0
- package/build/dist/UI/Components/Diagram/VerticalFlowSteps.js.map +1 -0
- package/build/dist/UI/Components/Icon/Icon.js +4 -0
- package/build/dist/UI/Components/Icon/Icon.js.map +1 -1
- package/build/dist/UI/Components/SimpleLogViewer/SimpleLogViewer.js +30 -1
- package/build/dist/UI/Components/SimpleLogViewer/SimpleLogViewer.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,840 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import Label from "./Label";
|
|
11
|
+
import Project from "./Project";
|
|
12
|
+
import ProjectCallSMSConfig from "./ProjectCallSMSConfig";
|
|
13
|
+
import User from "./User";
|
|
14
|
+
import BaseModel from "./DatabaseBaseModel/DatabaseBaseModel";
|
|
15
|
+
import Route from "../../Types/API/Route";
|
|
16
|
+
import ColumnAccessControl from "../../Types/Database/AccessControl/ColumnAccessControl";
|
|
17
|
+
import TableAccessControl from "../../Types/Database/AccessControl/TableAccessControl";
|
|
18
|
+
import AccessControlColumn from "../../Types/Database/AccessControlColumn";
|
|
19
|
+
import ColumnLength from "../../Types/Database/ColumnLength";
|
|
20
|
+
import ColumnType from "../../Types/Database/ColumnType";
|
|
21
|
+
import CrudApiEndpoint from "../../Types/Database/CrudApiEndpoint";
|
|
22
|
+
import EnableDocumentation from "../../Types/Database/EnableDocumentation";
|
|
23
|
+
import SlugifyColumn from "../../Types/Database/SlugifyColumn";
|
|
24
|
+
import TableColumn from "../../Types/Database/TableColumn";
|
|
25
|
+
import TableColumnType from "../../Types/Database/TableColumnType";
|
|
26
|
+
import TableMetadata from "../../Types/Database/TableMetadata";
|
|
27
|
+
import TenantColumn from "../../Types/Database/TenantColumn";
|
|
28
|
+
import IconProp from "../../Types/Icon/IconProp";
|
|
29
|
+
import ObjectID from "../../Types/ObjectID";
|
|
30
|
+
import Permission from "../../Types/Permission";
|
|
31
|
+
import Phone from "../../Types/Phone";
|
|
32
|
+
import { Column, Entity, Index, JoinColumn, JoinTable, ManyToMany, ManyToOne, } from "typeorm";
|
|
33
|
+
import EnableWorkflow from "../../Types/Database/EnableWorkflow";
|
|
34
|
+
let IncomingCallPolicy = class IncomingCallPolicy extends BaseModel {
|
|
35
|
+
constructor() {
|
|
36
|
+
super(...arguments);
|
|
37
|
+
this.project = undefined;
|
|
38
|
+
this.projectId = undefined;
|
|
39
|
+
this.name = undefined;
|
|
40
|
+
this.description = undefined;
|
|
41
|
+
this.slug = undefined;
|
|
42
|
+
this.routingPhoneNumber = undefined;
|
|
43
|
+
this.callProviderPhoneNumberId = undefined;
|
|
44
|
+
this.phoneNumberCountryCode = undefined;
|
|
45
|
+
this.phoneNumberAreaCode = undefined;
|
|
46
|
+
this.phoneNumberPurchasedAt = undefined;
|
|
47
|
+
this.greetingMessage = undefined;
|
|
48
|
+
this.noAnswerMessage = undefined;
|
|
49
|
+
this.noOneAvailableMessage = undefined;
|
|
50
|
+
this.isEnabled = undefined;
|
|
51
|
+
this.repeatPolicyIfNoOneAnswers = undefined;
|
|
52
|
+
this.repeatPolicyIfNoOneAnswersTimes = undefined;
|
|
53
|
+
this.labels = undefined;
|
|
54
|
+
/*
|
|
55
|
+
* Project-level Twilio configuration (optional)
|
|
56
|
+
* If set, uses the project's own Twilio config instead of the global config
|
|
57
|
+
* When using project config, billing does not apply
|
|
58
|
+
*/
|
|
59
|
+
this.projectCallSMSConfig = undefined;
|
|
60
|
+
this.projectCallSMSConfigId = undefined;
|
|
61
|
+
this.createdByUser = undefined;
|
|
62
|
+
this.createdByUserId = undefined;
|
|
63
|
+
this.deletedByUser = undefined;
|
|
64
|
+
this.deletedByUserId = undefined;
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
__decorate([
|
|
68
|
+
ColumnAccessControl({
|
|
69
|
+
create: [
|
|
70
|
+
Permission.ProjectOwner,
|
|
71
|
+
Permission.ProjectAdmin,
|
|
72
|
+
Permission.ProjectMember,
|
|
73
|
+
Permission.CreateProjectIncomingCallPolicy,
|
|
74
|
+
],
|
|
75
|
+
read: [
|
|
76
|
+
Permission.ProjectOwner,
|
|
77
|
+
Permission.ProjectAdmin,
|
|
78
|
+
Permission.ProjectMember,
|
|
79
|
+
Permission.ReadProjectIncomingCallPolicy,
|
|
80
|
+
],
|
|
81
|
+
update: [],
|
|
82
|
+
}),
|
|
83
|
+
TableColumn({
|
|
84
|
+
manyToOneRelationColumn: "projectId",
|
|
85
|
+
type: TableColumnType.Entity,
|
|
86
|
+
modelType: Project,
|
|
87
|
+
title: "Project",
|
|
88
|
+
description: "Relation to Project Resource in which this object belongs",
|
|
89
|
+
}),
|
|
90
|
+
ManyToOne(() => {
|
|
91
|
+
return Project;
|
|
92
|
+
}, {
|
|
93
|
+
eager: false,
|
|
94
|
+
nullable: true,
|
|
95
|
+
onDelete: "CASCADE",
|
|
96
|
+
orphanedRowAction: "nullify",
|
|
97
|
+
}),
|
|
98
|
+
JoinColumn({ name: "projectId" }),
|
|
99
|
+
__metadata("design:type", Project)
|
|
100
|
+
], IncomingCallPolicy.prototype, "project", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
ColumnAccessControl({
|
|
103
|
+
create: [
|
|
104
|
+
Permission.ProjectOwner,
|
|
105
|
+
Permission.ProjectAdmin,
|
|
106
|
+
Permission.ProjectMember,
|
|
107
|
+
Permission.CreateProjectIncomingCallPolicy,
|
|
108
|
+
],
|
|
109
|
+
read: [
|
|
110
|
+
Permission.ProjectOwner,
|
|
111
|
+
Permission.ProjectAdmin,
|
|
112
|
+
Permission.ProjectMember,
|
|
113
|
+
Permission.ReadProjectIncomingCallPolicy,
|
|
114
|
+
],
|
|
115
|
+
update: [],
|
|
116
|
+
}),
|
|
117
|
+
Index(),
|
|
118
|
+
TableColumn({
|
|
119
|
+
type: TableColumnType.ObjectID,
|
|
120
|
+
required: true,
|
|
121
|
+
canReadOnRelationQuery: true,
|
|
122
|
+
title: "Project ID",
|
|
123
|
+
description: "ID of your OneUptime Project in which this object belongs",
|
|
124
|
+
}),
|
|
125
|
+
Column({
|
|
126
|
+
type: ColumnType.ObjectID,
|
|
127
|
+
nullable: false,
|
|
128
|
+
transformer: ObjectID.getDatabaseTransformer(),
|
|
129
|
+
}),
|
|
130
|
+
__metadata("design:type", ObjectID)
|
|
131
|
+
], IncomingCallPolicy.prototype, "projectId", void 0);
|
|
132
|
+
__decorate([
|
|
133
|
+
ColumnAccessControl({
|
|
134
|
+
create: [
|
|
135
|
+
Permission.ProjectOwner,
|
|
136
|
+
Permission.ProjectAdmin,
|
|
137
|
+
Permission.ProjectMember,
|
|
138
|
+
Permission.CreateProjectIncomingCallPolicy,
|
|
139
|
+
],
|
|
140
|
+
read: [
|
|
141
|
+
Permission.ProjectOwner,
|
|
142
|
+
Permission.ProjectAdmin,
|
|
143
|
+
Permission.ProjectMember,
|
|
144
|
+
Permission.ReadProjectIncomingCallPolicy,
|
|
145
|
+
],
|
|
146
|
+
update: [
|
|
147
|
+
Permission.ProjectOwner,
|
|
148
|
+
Permission.ProjectAdmin,
|
|
149
|
+
Permission.ProjectMember,
|
|
150
|
+
Permission.EditProjectIncomingCallPolicy,
|
|
151
|
+
],
|
|
152
|
+
}),
|
|
153
|
+
Index(),
|
|
154
|
+
TableColumn({
|
|
155
|
+
required: true,
|
|
156
|
+
type: TableColumnType.ShortText,
|
|
157
|
+
title: "Name",
|
|
158
|
+
description: "Any friendly name of this policy",
|
|
159
|
+
canReadOnRelationQuery: true,
|
|
160
|
+
}),
|
|
161
|
+
Column({
|
|
162
|
+
nullable: false,
|
|
163
|
+
type: ColumnType.ShortText,
|
|
164
|
+
length: ColumnLength.ShortText,
|
|
165
|
+
}),
|
|
166
|
+
__metadata("design:type", String)
|
|
167
|
+
], IncomingCallPolicy.prototype, "name", void 0);
|
|
168
|
+
__decorate([
|
|
169
|
+
ColumnAccessControl({
|
|
170
|
+
create: [
|
|
171
|
+
Permission.ProjectOwner,
|
|
172
|
+
Permission.ProjectAdmin,
|
|
173
|
+
Permission.ProjectMember,
|
|
174
|
+
Permission.CreateProjectIncomingCallPolicy,
|
|
175
|
+
],
|
|
176
|
+
read: [
|
|
177
|
+
Permission.ProjectOwner,
|
|
178
|
+
Permission.ProjectAdmin,
|
|
179
|
+
Permission.ProjectMember,
|
|
180
|
+
Permission.ReadProjectIncomingCallPolicy,
|
|
181
|
+
],
|
|
182
|
+
update: [
|
|
183
|
+
Permission.ProjectOwner,
|
|
184
|
+
Permission.ProjectAdmin,
|
|
185
|
+
Permission.ProjectMember,
|
|
186
|
+
Permission.EditProjectIncomingCallPolicy,
|
|
187
|
+
],
|
|
188
|
+
}),
|
|
189
|
+
TableColumn({
|
|
190
|
+
required: false,
|
|
191
|
+
type: TableColumnType.LongText,
|
|
192
|
+
title: "Description",
|
|
193
|
+
description: "Friendly description that will help you remember",
|
|
194
|
+
}),
|
|
195
|
+
Column({
|
|
196
|
+
nullable: true,
|
|
197
|
+
type: ColumnType.LongText,
|
|
198
|
+
length: ColumnLength.LongText,
|
|
199
|
+
}),
|
|
200
|
+
__metadata("design:type", String)
|
|
201
|
+
], IncomingCallPolicy.prototype, "description", void 0);
|
|
202
|
+
__decorate([
|
|
203
|
+
Index(),
|
|
204
|
+
ColumnAccessControl({
|
|
205
|
+
create: [
|
|
206
|
+
Permission.ProjectOwner,
|
|
207
|
+
Permission.ProjectAdmin,
|
|
208
|
+
Permission.ProjectMember,
|
|
209
|
+
Permission.CreateProjectIncomingCallPolicy,
|
|
210
|
+
],
|
|
211
|
+
read: [
|
|
212
|
+
Permission.ProjectOwner,
|
|
213
|
+
Permission.ProjectAdmin,
|
|
214
|
+
Permission.ProjectMember,
|
|
215
|
+
Permission.ReadProjectIncomingCallPolicy,
|
|
216
|
+
],
|
|
217
|
+
update: [],
|
|
218
|
+
}),
|
|
219
|
+
TableColumn({
|
|
220
|
+
required: true,
|
|
221
|
+
unique: true,
|
|
222
|
+
type: TableColumnType.Slug,
|
|
223
|
+
title: "Slug",
|
|
224
|
+
description: "Friendly globally unique name for your object",
|
|
225
|
+
computed: true,
|
|
226
|
+
}),
|
|
227
|
+
Column({
|
|
228
|
+
nullable: false,
|
|
229
|
+
type: ColumnType.Slug,
|
|
230
|
+
length: ColumnLength.Slug,
|
|
231
|
+
unique: true,
|
|
232
|
+
}),
|
|
233
|
+
__metadata("design:type", String)
|
|
234
|
+
], IncomingCallPolicy.prototype, "slug", void 0);
|
|
235
|
+
__decorate([
|
|
236
|
+
ColumnAccessControl({
|
|
237
|
+
create: [],
|
|
238
|
+
read: [
|
|
239
|
+
Permission.ProjectOwner,
|
|
240
|
+
Permission.ProjectAdmin,
|
|
241
|
+
Permission.ProjectMember,
|
|
242
|
+
Permission.ReadProjectIncomingCallPolicy,
|
|
243
|
+
],
|
|
244
|
+
update: [],
|
|
245
|
+
}),
|
|
246
|
+
Index(),
|
|
247
|
+
TableColumn({
|
|
248
|
+
required: false,
|
|
249
|
+
type: TableColumnType.Phone,
|
|
250
|
+
title: "Routing Phone Number",
|
|
251
|
+
description: "The phone number for incoming calls to this policy",
|
|
252
|
+
}),
|
|
253
|
+
Column({
|
|
254
|
+
nullable: true,
|
|
255
|
+
type: ColumnType.Phone,
|
|
256
|
+
length: ColumnLength.Phone,
|
|
257
|
+
transformer: Phone.getDatabaseTransformer(),
|
|
258
|
+
}),
|
|
259
|
+
__metadata("design:type", Phone)
|
|
260
|
+
], IncomingCallPolicy.prototype, "routingPhoneNumber", void 0);
|
|
261
|
+
__decorate([
|
|
262
|
+
ColumnAccessControl({
|
|
263
|
+
create: [],
|
|
264
|
+
read: [
|
|
265
|
+
Permission.ProjectOwner,
|
|
266
|
+
Permission.ProjectAdmin,
|
|
267
|
+
Permission.ProjectMember,
|
|
268
|
+
Permission.ReadProjectIncomingCallPolicy,
|
|
269
|
+
],
|
|
270
|
+
update: [],
|
|
271
|
+
}),
|
|
272
|
+
TableColumn({
|
|
273
|
+
required: false,
|
|
274
|
+
type: TableColumnType.ShortText,
|
|
275
|
+
title: "Call Provider Phone Number ID",
|
|
276
|
+
description: "The call provider's ID for the phone number (e.g., Twilio SID)",
|
|
277
|
+
}),
|
|
278
|
+
Column({
|
|
279
|
+
nullable: true,
|
|
280
|
+
type: ColumnType.ShortText,
|
|
281
|
+
length: ColumnLength.ShortText,
|
|
282
|
+
}),
|
|
283
|
+
__metadata("design:type", String)
|
|
284
|
+
], IncomingCallPolicy.prototype, "callProviderPhoneNumberId", void 0);
|
|
285
|
+
__decorate([
|
|
286
|
+
ColumnAccessControl({
|
|
287
|
+
create: [],
|
|
288
|
+
read: [
|
|
289
|
+
Permission.ProjectOwner,
|
|
290
|
+
Permission.ProjectAdmin,
|
|
291
|
+
Permission.ProjectMember,
|
|
292
|
+
Permission.ReadProjectIncomingCallPolicy,
|
|
293
|
+
],
|
|
294
|
+
update: [],
|
|
295
|
+
}),
|
|
296
|
+
TableColumn({
|
|
297
|
+
required: false,
|
|
298
|
+
type: TableColumnType.ShortText,
|
|
299
|
+
title: "Phone Number Country Code",
|
|
300
|
+
description: "Country code of the phone number (US, GB, etc.)",
|
|
301
|
+
}),
|
|
302
|
+
Column({
|
|
303
|
+
nullable: true,
|
|
304
|
+
type: ColumnType.ShortText,
|
|
305
|
+
length: ColumnLength.ShortText,
|
|
306
|
+
}),
|
|
307
|
+
__metadata("design:type", String)
|
|
308
|
+
], IncomingCallPolicy.prototype, "phoneNumberCountryCode", void 0);
|
|
309
|
+
__decorate([
|
|
310
|
+
ColumnAccessControl({
|
|
311
|
+
create: [],
|
|
312
|
+
read: [
|
|
313
|
+
Permission.ProjectOwner,
|
|
314
|
+
Permission.ProjectAdmin,
|
|
315
|
+
Permission.ProjectMember,
|
|
316
|
+
Permission.ReadProjectIncomingCallPolicy,
|
|
317
|
+
],
|
|
318
|
+
update: [],
|
|
319
|
+
}),
|
|
320
|
+
TableColumn({
|
|
321
|
+
required: false,
|
|
322
|
+
type: TableColumnType.ShortText,
|
|
323
|
+
title: "Phone Number Area Code",
|
|
324
|
+
description: "Area code of the phone number",
|
|
325
|
+
}),
|
|
326
|
+
Column({
|
|
327
|
+
nullable: true,
|
|
328
|
+
type: ColumnType.ShortText,
|
|
329
|
+
length: ColumnLength.ShortText,
|
|
330
|
+
}),
|
|
331
|
+
__metadata("design:type", String)
|
|
332
|
+
], IncomingCallPolicy.prototype, "phoneNumberAreaCode", void 0);
|
|
333
|
+
__decorate([
|
|
334
|
+
ColumnAccessControl({
|
|
335
|
+
create: [],
|
|
336
|
+
read: [
|
|
337
|
+
Permission.ProjectOwner,
|
|
338
|
+
Permission.ProjectAdmin,
|
|
339
|
+
Permission.ProjectMember,
|
|
340
|
+
Permission.ReadProjectIncomingCallPolicy,
|
|
341
|
+
],
|
|
342
|
+
update: [],
|
|
343
|
+
}),
|
|
344
|
+
TableColumn({
|
|
345
|
+
required: false,
|
|
346
|
+
type: TableColumnType.Date,
|
|
347
|
+
title: "Phone Number Purchased At",
|
|
348
|
+
description: "When the phone number was purchased",
|
|
349
|
+
}),
|
|
350
|
+
Column({
|
|
351
|
+
nullable: true,
|
|
352
|
+
type: ColumnType.Date,
|
|
353
|
+
}),
|
|
354
|
+
__metadata("design:type", Date)
|
|
355
|
+
], IncomingCallPolicy.prototype, "phoneNumberPurchasedAt", void 0);
|
|
356
|
+
__decorate([
|
|
357
|
+
ColumnAccessControl({
|
|
358
|
+
create: [
|
|
359
|
+
Permission.ProjectOwner,
|
|
360
|
+
Permission.ProjectAdmin,
|
|
361
|
+
Permission.ProjectMember,
|
|
362
|
+
Permission.CreateProjectIncomingCallPolicy,
|
|
363
|
+
],
|
|
364
|
+
read: [
|
|
365
|
+
Permission.ProjectOwner,
|
|
366
|
+
Permission.ProjectAdmin,
|
|
367
|
+
Permission.ProjectMember,
|
|
368
|
+
Permission.ReadProjectIncomingCallPolicy,
|
|
369
|
+
],
|
|
370
|
+
update: [
|
|
371
|
+
Permission.ProjectOwner,
|
|
372
|
+
Permission.ProjectAdmin,
|
|
373
|
+
Permission.ProjectMember,
|
|
374
|
+
Permission.EditProjectIncomingCallPolicy,
|
|
375
|
+
],
|
|
376
|
+
}),
|
|
377
|
+
TableColumn({
|
|
378
|
+
required: false,
|
|
379
|
+
type: TableColumnType.LongText,
|
|
380
|
+
title: "Greeting Message",
|
|
381
|
+
description: "Custom TTS greeting message for incoming calls",
|
|
382
|
+
}),
|
|
383
|
+
Column({
|
|
384
|
+
nullable: true,
|
|
385
|
+
type: ColumnType.LongText,
|
|
386
|
+
length: ColumnLength.LongText,
|
|
387
|
+
default: "Please wait while we connect you to the on-call engineer.",
|
|
388
|
+
}),
|
|
389
|
+
__metadata("design:type", String)
|
|
390
|
+
], IncomingCallPolicy.prototype, "greetingMessage", void 0);
|
|
391
|
+
__decorate([
|
|
392
|
+
ColumnAccessControl({
|
|
393
|
+
create: [
|
|
394
|
+
Permission.ProjectOwner,
|
|
395
|
+
Permission.ProjectAdmin,
|
|
396
|
+
Permission.ProjectMember,
|
|
397
|
+
Permission.CreateProjectIncomingCallPolicy,
|
|
398
|
+
],
|
|
399
|
+
read: [
|
|
400
|
+
Permission.ProjectOwner,
|
|
401
|
+
Permission.ProjectAdmin,
|
|
402
|
+
Permission.ProjectMember,
|
|
403
|
+
Permission.ReadProjectIncomingCallPolicy,
|
|
404
|
+
],
|
|
405
|
+
update: [
|
|
406
|
+
Permission.ProjectOwner,
|
|
407
|
+
Permission.ProjectAdmin,
|
|
408
|
+
Permission.ProjectMember,
|
|
409
|
+
Permission.EditProjectIncomingCallPolicy,
|
|
410
|
+
],
|
|
411
|
+
}),
|
|
412
|
+
TableColumn({
|
|
413
|
+
required: false,
|
|
414
|
+
type: TableColumnType.LongText,
|
|
415
|
+
title: "No Answer Message",
|
|
416
|
+
description: "Message when escalation is exhausted and no one answers",
|
|
417
|
+
}),
|
|
418
|
+
Column({
|
|
419
|
+
nullable: true,
|
|
420
|
+
type: ColumnType.LongText,
|
|
421
|
+
length: ColumnLength.LongText,
|
|
422
|
+
default: "No one is available. Please try again later.",
|
|
423
|
+
}),
|
|
424
|
+
__metadata("design:type", String)
|
|
425
|
+
], IncomingCallPolicy.prototype, "noAnswerMessage", void 0);
|
|
426
|
+
__decorate([
|
|
427
|
+
ColumnAccessControl({
|
|
428
|
+
create: [
|
|
429
|
+
Permission.ProjectOwner,
|
|
430
|
+
Permission.ProjectAdmin,
|
|
431
|
+
Permission.ProjectMember,
|
|
432
|
+
Permission.CreateProjectIncomingCallPolicy,
|
|
433
|
+
],
|
|
434
|
+
read: [
|
|
435
|
+
Permission.ProjectOwner,
|
|
436
|
+
Permission.ProjectAdmin,
|
|
437
|
+
Permission.ProjectMember,
|
|
438
|
+
Permission.ReadProjectIncomingCallPolicy,
|
|
439
|
+
],
|
|
440
|
+
update: [
|
|
441
|
+
Permission.ProjectOwner,
|
|
442
|
+
Permission.ProjectAdmin,
|
|
443
|
+
Permission.ProjectMember,
|
|
444
|
+
Permission.EditProjectIncomingCallPolicy,
|
|
445
|
+
],
|
|
446
|
+
}),
|
|
447
|
+
TableColumn({
|
|
448
|
+
required: false,
|
|
449
|
+
type: TableColumnType.LongText,
|
|
450
|
+
title: "No One Available Message",
|
|
451
|
+
description: "Message when no one is on-call or reachable",
|
|
452
|
+
}),
|
|
453
|
+
Column({
|
|
454
|
+
nullable: true,
|
|
455
|
+
type: ColumnType.LongText,
|
|
456
|
+
length: ColumnLength.LongText,
|
|
457
|
+
default: "We are sorry, but no on-call engineer is currently available. Please try again later or contact support.",
|
|
458
|
+
}),
|
|
459
|
+
__metadata("design:type", String)
|
|
460
|
+
], IncomingCallPolicy.prototype, "noOneAvailableMessage", void 0);
|
|
461
|
+
__decorate([
|
|
462
|
+
ColumnAccessControl({
|
|
463
|
+
create: [
|
|
464
|
+
Permission.ProjectOwner,
|
|
465
|
+
Permission.ProjectAdmin,
|
|
466
|
+
Permission.ProjectMember,
|
|
467
|
+
Permission.CreateProjectIncomingCallPolicy,
|
|
468
|
+
],
|
|
469
|
+
read: [
|
|
470
|
+
Permission.ProjectOwner,
|
|
471
|
+
Permission.ProjectAdmin,
|
|
472
|
+
Permission.ProjectMember,
|
|
473
|
+
Permission.ReadProjectIncomingCallPolicy,
|
|
474
|
+
],
|
|
475
|
+
update: [
|
|
476
|
+
Permission.ProjectOwner,
|
|
477
|
+
Permission.ProjectAdmin,
|
|
478
|
+
Permission.ProjectMember,
|
|
479
|
+
Permission.EditProjectIncomingCallPolicy,
|
|
480
|
+
],
|
|
481
|
+
}),
|
|
482
|
+
TableColumn({
|
|
483
|
+
required: true,
|
|
484
|
+
isDefaultValueColumn: true,
|
|
485
|
+
type: TableColumnType.Boolean,
|
|
486
|
+
title: "Is Enabled",
|
|
487
|
+
description: "Enable or disable this incoming call policy",
|
|
488
|
+
defaultValue: true,
|
|
489
|
+
}),
|
|
490
|
+
Column({
|
|
491
|
+
nullable: false,
|
|
492
|
+
default: true,
|
|
493
|
+
type: ColumnType.Boolean,
|
|
494
|
+
}),
|
|
495
|
+
__metadata("design:type", Boolean)
|
|
496
|
+
], IncomingCallPolicy.prototype, "isEnabled", void 0);
|
|
497
|
+
__decorate([
|
|
498
|
+
ColumnAccessControl({
|
|
499
|
+
create: [
|
|
500
|
+
Permission.ProjectOwner,
|
|
501
|
+
Permission.ProjectAdmin,
|
|
502
|
+
Permission.ProjectMember,
|
|
503
|
+
Permission.CreateProjectIncomingCallPolicy,
|
|
504
|
+
],
|
|
505
|
+
read: [
|
|
506
|
+
Permission.ProjectOwner,
|
|
507
|
+
Permission.ProjectAdmin,
|
|
508
|
+
Permission.ProjectMember,
|
|
509
|
+
Permission.ReadProjectIncomingCallPolicy,
|
|
510
|
+
],
|
|
511
|
+
update: [
|
|
512
|
+
Permission.ProjectOwner,
|
|
513
|
+
Permission.ProjectAdmin,
|
|
514
|
+
Permission.ProjectMember,
|
|
515
|
+
Permission.EditProjectIncomingCallPolicy,
|
|
516
|
+
],
|
|
517
|
+
}),
|
|
518
|
+
TableColumn({
|
|
519
|
+
required: true,
|
|
520
|
+
isDefaultValueColumn: true,
|
|
521
|
+
type: TableColumnType.Boolean,
|
|
522
|
+
title: "Repeat Policy If No One Answers",
|
|
523
|
+
description: "Restart from first rule if all fail",
|
|
524
|
+
defaultValue: false,
|
|
525
|
+
}),
|
|
526
|
+
Column({
|
|
527
|
+
nullable: false,
|
|
528
|
+
default: false,
|
|
529
|
+
type: ColumnType.Boolean,
|
|
530
|
+
}),
|
|
531
|
+
__metadata("design:type", Boolean)
|
|
532
|
+
], IncomingCallPolicy.prototype, "repeatPolicyIfNoOneAnswers", void 0);
|
|
533
|
+
__decorate([
|
|
534
|
+
ColumnAccessControl({
|
|
535
|
+
create: [
|
|
536
|
+
Permission.ProjectOwner,
|
|
537
|
+
Permission.ProjectAdmin,
|
|
538
|
+
Permission.ProjectMember,
|
|
539
|
+
Permission.CreateProjectIncomingCallPolicy,
|
|
540
|
+
],
|
|
541
|
+
read: [
|
|
542
|
+
Permission.ProjectOwner,
|
|
543
|
+
Permission.ProjectAdmin,
|
|
544
|
+
Permission.ProjectMember,
|
|
545
|
+
Permission.ReadProjectIncomingCallPolicy,
|
|
546
|
+
],
|
|
547
|
+
update: [
|
|
548
|
+
Permission.ProjectOwner,
|
|
549
|
+
Permission.ProjectAdmin,
|
|
550
|
+
Permission.ProjectMember,
|
|
551
|
+
Permission.EditProjectIncomingCallPolicy,
|
|
552
|
+
],
|
|
553
|
+
}),
|
|
554
|
+
TableColumn({
|
|
555
|
+
required: true,
|
|
556
|
+
isDefaultValueColumn: true,
|
|
557
|
+
type: TableColumnType.Number,
|
|
558
|
+
title: "Repeat Policy Times",
|
|
559
|
+
description: "Maximum repeat attempts if no one answers",
|
|
560
|
+
defaultValue: 1,
|
|
561
|
+
}),
|
|
562
|
+
Column({
|
|
563
|
+
nullable: false,
|
|
564
|
+
default: 1,
|
|
565
|
+
type: ColumnType.Number,
|
|
566
|
+
}),
|
|
567
|
+
__metadata("design:type", Number)
|
|
568
|
+
], IncomingCallPolicy.prototype, "repeatPolicyIfNoOneAnswersTimes", void 0);
|
|
569
|
+
__decorate([
|
|
570
|
+
ColumnAccessControl({
|
|
571
|
+
create: [
|
|
572
|
+
Permission.ProjectOwner,
|
|
573
|
+
Permission.ProjectAdmin,
|
|
574
|
+
Permission.ProjectMember,
|
|
575
|
+
Permission.CreateProjectIncomingCallPolicy,
|
|
576
|
+
],
|
|
577
|
+
read: [
|
|
578
|
+
Permission.ProjectOwner,
|
|
579
|
+
Permission.ProjectAdmin,
|
|
580
|
+
Permission.ProjectMember,
|
|
581
|
+
Permission.ReadProjectIncomingCallPolicy,
|
|
582
|
+
],
|
|
583
|
+
update: [
|
|
584
|
+
Permission.ProjectOwner,
|
|
585
|
+
Permission.ProjectAdmin,
|
|
586
|
+
Permission.ProjectMember,
|
|
587
|
+
Permission.EditProjectIncomingCallPolicy,
|
|
588
|
+
],
|
|
589
|
+
}),
|
|
590
|
+
TableColumn({
|
|
591
|
+
required: false,
|
|
592
|
+
type: TableColumnType.EntityArray,
|
|
593
|
+
modelType: Label,
|
|
594
|
+
title: "Labels",
|
|
595
|
+
description: "Relation to Labels Array where this object is categorized in.",
|
|
596
|
+
}),
|
|
597
|
+
ManyToMany(() => {
|
|
598
|
+
return Label;
|
|
599
|
+
}, { eager: false }),
|
|
600
|
+
JoinTable({
|
|
601
|
+
name: "IncomingCallPolicyLabel",
|
|
602
|
+
inverseJoinColumn: {
|
|
603
|
+
name: "labelId",
|
|
604
|
+
referencedColumnName: "_id",
|
|
605
|
+
},
|
|
606
|
+
joinColumn: {
|
|
607
|
+
name: "incomingCallPolicyId",
|
|
608
|
+
referencedColumnName: "_id",
|
|
609
|
+
},
|
|
610
|
+
}),
|
|
611
|
+
__metadata("design:type", Array)
|
|
612
|
+
], IncomingCallPolicy.prototype, "labels", void 0);
|
|
613
|
+
__decorate([
|
|
614
|
+
ColumnAccessControl({
|
|
615
|
+
create: [
|
|
616
|
+
Permission.ProjectOwner,
|
|
617
|
+
Permission.ProjectAdmin,
|
|
618
|
+
Permission.ProjectMember,
|
|
619
|
+
Permission.CreateProjectIncomingCallPolicy,
|
|
620
|
+
],
|
|
621
|
+
read: [
|
|
622
|
+
Permission.ProjectOwner,
|
|
623
|
+
Permission.ProjectAdmin,
|
|
624
|
+
Permission.ProjectMember,
|
|
625
|
+
Permission.ReadProjectIncomingCallPolicy,
|
|
626
|
+
],
|
|
627
|
+
update: [
|
|
628
|
+
Permission.ProjectOwner,
|
|
629
|
+
Permission.ProjectAdmin,
|
|
630
|
+
Permission.ProjectMember,
|
|
631
|
+
Permission.EditProjectIncomingCallPolicy,
|
|
632
|
+
],
|
|
633
|
+
}),
|
|
634
|
+
TableColumn({
|
|
635
|
+
manyToOneRelationColumn: "projectCallSMSConfigId",
|
|
636
|
+
type: TableColumnType.Entity,
|
|
637
|
+
modelType: ProjectCallSMSConfig,
|
|
638
|
+
title: "Project Call/SMS Config",
|
|
639
|
+
description: "Optional project-level Twilio configuration. If set, uses this config instead of global config and billing does not apply.",
|
|
640
|
+
}),
|
|
641
|
+
ManyToOne(() => {
|
|
642
|
+
return ProjectCallSMSConfig;
|
|
643
|
+
}, {
|
|
644
|
+
eager: false,
|
|
645
|
+
nullable: true,
|
|
646
|
+
onDelete: "SET NULL",
|
|
647
|
+
orphanedRowAction: "nullify",
|
|
648
|
+
}),
|
|
649
|
+
JoinColumn({ name: "projectCallSMSConfigId" }),
|
|
650
|
+
__metadata("design:type", ProjectCallSMSConfig)
|
|
651
|
+
], IncomingCallPolicy.prototype, "projectCallSMSConfig", void 0);
|
|
652
|
+
__decorate([
|
|
653
|
+
ColumnAccessControl({
|
|
654
|
+
create: [
|
|
655
|
+
Permission.ProjectOwner,
|
|
656
|
+
Permission.ProjectAdmin,
|
|
657
|
+
Permission.ProjectMember,
|
|
658
|
+
Permission.CreateProjectIncomingCallPolicy,
|
|
659
|
+
],
|
|
660
|
+
read: [
|
|
661
|
+
Permission.ProjectOwner,
|
|
662
|
+
Permission.ProjectAdmin,
|
|
663
|
+
Permission.ProjectMember,
|
|
664
|
+
Permission.ReadProjectIncomingCallPolicy,
|
|
665
|
+
],
|
|
666
|
+
update: [
|
|
667
|
+
Permission.ProjectOwner,
|
|
668
|
+
Permission.ProjectAdmin,
|
|
669
|
+
Permission.ProjectMember,
|
|
670
|
+
Permission.EditProjectIncomingCallPolicy,
|
|
671
|
+
],
|
|
672
|
+
}),
|
|
673
|
+
TableColumn({
|
|
674
|
+
type: TableColumnType.ObjectID,
|
|
675
|
+
title: "Project Call/SMS Config ID",
|
|
676
|
+
description: "ID of the project-level Twilio configuration. If set, uses this config instead of global config and billing does not apply.",
|
|
677
|
+
}),
|
|
678
|
+
Column({
|
|
679
|
+
type: ColumnType.ObjectID,
|
|
680
|
+
nullable: true,
|
|
681
|
+
transformer: ObjectID.getDatabaseTransformer(),
|
|
682
|
+
}),
|
|
683
|
+
__metadata("design:type", ObjectID)
|
|
684
|
+
], IncomingCallPolicy.prototype, "projectCallSMSConfigId", void 0);
|
|
685
|
+
__decorate([
|
|
686
|
+
ColumnAccessControl({
|
|
687
|
+
create: [
|
|
688
|
+
Permission.ProjectOwner,
|
|
689
|
+
Permission.ProjectAdmin,
|
|
690
|
+
Permission.ProjectMember,
|
|
691
|
+
Permission.CreateProjectIncomingCallPolicy,
|
|
692
|
+
],
|
|
693
|
+
read: [
|
|
694
|
+
Permission.ProjectOwner,
|
|
695
|
+
Permission.ProjectAdmin,
|
|
696
|
+
Permission.ProjectMember,
|
|
697
|
+
Permission.ReadProjectIncomingCallPolicy,
|
|
698
|
+
],
|
|
699
|
+
update: [],
|
|
700
|
+
}),
|
|
701
|
+
TableColumn({
|
|
702
|
+
manyToOneRelationColumn: "createdByUserId",
|
|
703
|
+
type: TableColumnType.Entity,
|
|
704
|
+
modelType: User,
|
|
705
|
+
title: "Created by User",
|
|
706
|
+
description: "Relation to User who created this object (if this object was created by a User)",
|
|
707
|
+
}),
|
|
708
|
+
ManyToOne(() => {
|
|
709
|
+
return User;
|
|
710
|
+
}, {
|
|
711
|
+
eager: false,
|
|
712
|
+
nullable: true,
|
|
713
|
+
onDelete: "SET NULL",
|
|
714
|
+
orphanedRowAction: "nullify",
|
|
715
|
+
}),
|
|
716
|
+
JoinColumn({ name: "createdByUserId" }),
|
|
717
|
+
__metadata("design:type", User)
|
|
718
|
+
], IncomingCallPolicy.prototype, "createdByUser", void 0);
|
|
719
|
+
__decorate([
|
|
720
|
+
ColumnAccessControl({
|
|
721
|
+
create: [
|
|
722
|
+
Permission.ProjectOwner,
|
|
723
|
+
Permission.ProjectAdmin,
|
|
724
|
+
Permission.ProjectMember,
|
|
725
|
+
Permission.CreateProjectIncomingCallPolicy,
|
|
726
|
+
],
|
|
727
|
+
read: [
|
|
728
|
+
Permission.ProjectOwner,
|
|
729
|
+
Permission.ProjectAdmin,
|
|
730
|
+
Permission.ProjectMember,
|
|
731
|
+
Permission.ReadProjectIncomingCallPolicy,
|
|
732
|
+
],
|
|
733
|
+
update: [],
|
|
734
|
+
}),
|
|
735
|
+
TableColumn({
|
|
736
|
+
type: TableColumnType.ObjectID,
|
|
737
|
+
title: "Created by User ID",
|
|
738
|
+
description: "User ID who created this object (if this object was created by a User)",
|
|
739
|
+
}),
|
|
740
|
+
Column({
|
|
741
|
+
type: ColumnType.ObjectID,
|
|
742
|
+
nullable: true,
|
|
743
|
+
transformer: ObjectID.getDatabaseTransformer(),
|
|
744
|
+
}),
|
|
745
|
+
__metadata("design:type", ObjectID)
|
|
746
|
+
], IncomingCallPolicy.prototype, "createdByUserId", void 0);
|
|
747
|
+
__decorate([
|
|
748
|
+
ColumnAccessControl({
|
|
749
|
+
create: [],
|
|
750
|
+
read: [],
|
|
751
|
+
update: [],
|
|
752
|
+
}),
|
|
753
|
+
TableColumn({
|
|
754
|
+
manyToOneRelationColumn: "deletedByUserId",
|
|
755
|
+
type: TableColumnType.Entity,
|
|
756
|
+
title: "Deleted by User",
|
|
757
|
+
modelType: User,
|
|
758
|
+
description: "Relation to User who deleted this object (if this object was deleted by a User)",
|
|
759
|
+
}),
|
|
760
|
+
ManyToOne(() => {
|
|
761
|
+
return User;
|
|
762
|
+
}, {
|
|
763
|
+
cascade: false,
|
|
764
|
+
eager: false,
|
|
765
|
+
nullable: true,
|
|
766
|
+
onDelete: "SET NULL",
|
|
767
|
+
orphanedRowAction: "nullify",
|
|
768
|
+
}),
|
|
769
|
+
JoinColumn({ name: "deletedByUserId" }),
|
|
770
|
+
__metadata("design:type", User)
|
|
771
|
+
], IncomingCallPolicy.prototype, "deletedByUser", void 0);
|
|
772
|
+
__decorate([
|
|
773
|
+
ColumnAccessControl({
|
|
774
|
+
create: [],
|
|
775
|
+
read: [],
|
|
776
|
+
update: [],
|
|
777
|
+
}),
|
|
778
|
+
TableColumn({
|
|
779
|
+
type: TableColumnType.ObjectID,
|
|
780
|
+
title: "Deleted by User ID",
|
|
781
|
+
description: "User ID who deleted this object (if this object was deleted by a User)",
|
|
782
|
+
}),
|
|
783
|
+
Column({
|
|
784
|
+
type: ColumnType.ObjectID,
|
|
785
|
+
nullable: true,
|
|
786
|
+
transformer: ObjectID.getDatabaseTransformer(),
|
|
787
|
+
}),
|
|
788
|
+
__metadata("design:type", ObjectID)
|
|
789
|
+
], IncomingCallPolicy.prototype, "deletedByUserId", void 0);
|
|
790
|
+
IncomingCallPolicy = __decorate([
|
|
791
|
+
EnableDocumentation(),
|
|
792
|
+
AccessControlColumn("labels"),
|
|
793
|
+
TenantColumn("projectId"),
|
|
794
|
+
EnableWorkflow({
|
|
795
|
+
create: true,
|
|
796
|
+
delete: true,
|
|
797
|
+
update: true,
|
|
798
|
+
read: true,
|
|
799
|
+
}),
|
|
800
|
+
TableAccessControl({
|
|
801
|
+
create: [
|
|
802
|
+
Permission.ProjectOwner,
|
|
803
|
+
Permission.ProjectAdmin,
|
|
804
|
+
Permission.ProjectMember,
|
|
805
|
+
Permission.CreateProjectIncomingCallPolicy,
|
|
806
|
+
],
|
|
807
|
+
read: [
|
|
808
|
+
Permission.ProjectOwner,
|
|
809
|
+
Permission.ProjectAdmin,
|
|
810
|
+
Permission.ProjectMember,
|
|
811
|
+
Permission.ReadProjectIncomingCallPolicy,
|
|
812
|
+
],
|
|
813
|
+
delete: [
|
|
814
|
+
Permission.ProjectOwner,
|
|
815
|
+
Permission.ProjectAdmin,
|
|
816
|
+
Permission.ProjectMember,
|
|
817
|
+
Permission.DeleteProjectIncomingCallPolicy,
|
|
818
|
+
],
|
|
819
|
+
update: [
|
|
820
|
+
Permission.ProjectOwner,
|
|
821
|
+
Permission.ProjectAdmin,
|
|
822
|
+
Permission.ProjectMember,
|
|
823
|
+
Permission.EditProjectIncomingCallPolicy,
|
|
824
|
+
],
|
|
825
|
+
}),
|
|
826
|
+
CrudApiEndpoint(new Route("/incoming-call-policy")),
|
|
827
|
+
SlugifyColumn("name", "slug"),
|
|
828
|
+
Entity({
|
|
829
|
+
name: "IncomingCallPolicy",
|
|
830
|
+
}),
|
|
831
|
+
TableMetadata({
|
|
832
|
+
tableName: "IncomingCallPolicy",
|
|
833
|
+
singularName: "Incoming Call Policy",
|
|
834
|
+
pluralName: "Incoming Call Policies",
|
|
835
|
+
icon: IconProp.Call,
|
|
836
|
+
tableDescription: "Manage incoming call routing policies with escalation rules for on-call teams",
|
|
837
|
+
})
|
|
838
|
+
], IncomingCallPolicy);
|
|
839
|
+
export default IncomingCallPolicy;
|
|
840
|
+
//# sourceMappingURL=IncomingCallPolicy.js.map
|