@platform-modules/civil-aviation-authority 2.2.30 → 2.2.32
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/.env +10 -4
- package/dist/data-source.js +21 -1
- package/dist/index.d.ts +10 -0
- package/dist/index.js +10 -0
- package/dist/models/AccessCardApprovalModel.d.ts +22 -0
- package/dist/models/AccessCardApprovalModel.js +96 -0
- package/dist/models/AccessCardAttachmentModel.d.ts +12 -0
- package/dist/models/AccessCardAttachmentModel.js +64 -0
- package/dist/models/AccessCardChatModel.d.ts +17 -0
- package/dist/models/AccessCardChatModel.js +67 -0
- package/dist/models/AccessCardRequestModel.d.ts +43 -0
- package/dist/models/AccessCardRequestModel.js +148 -0
- package/dist/models/AccessCardWorkflowModel.d.ts +14 -0
- package/dist/models/AccessCardWorkflowModel.js +60 -0
- package/dist/models/ITApprovalSettings.d.ts +7 -0
- package/dist/models/ITApprovalSettings.js +40 -0
- package/dist/models/ITServicesTypesMuscatModel.d.ts +6 -0
- package/dist/models/ITServicesTypesMuscatModel.js +34 -0
- package/dist/models/ITServicesTypesSalalahModel.d.ts +6 -0
- package/dist/models/ITServicesTypesSalalahModel.js +34 -0
- package/dist/models/ItApprovalsModel.d.ts +3 -1
- package/dist/models/ItApprovalsModel.js +2 -0
- package/dist/models/SecurityThreatApprovalModel.d.ts +24 -0
- package/dist/models/SecurityThreatApprovalModel.js +97 -0
- package/dist/models/SecurityThreatAttachmentModel.d.ts +12 -0
- package/dist/models/SecurityThreatAttachmentModel.js +64 -0
- package/dist/models/SecurityThreatChatModel.d.ts +17 -0
- package/dist/models/SecurityThreatChatModel.js +67 -0
- package/dist/models/SecurityThreatRequestModel.d.ts +29 -0
- package/dist/models/SecurityThreatRequestModel.js +104 -0
- package/dist/models/SecurityThreatWorkflowModel.d.ts +14 -0
- package/dist/models/SecurityThreatWorkflowModel.js +56 -0
- package/dist/models/Workflows.d.ts +0 -0
- package/dist/models/Workflows.js +31 -0
- package/package.json +1 -1
- package/src/data-source.ts +11 -1
- package/src/index.ts +5 -0
- package/src/models/SecurityThreatApprovalModel.ts +84 -0
- package/src/models/SecurityThreatAttachmentModel.ts +52 -0
- package/src/models/SecurityThreatChatModel.ts +55 -0
- package/src/models/SecurityThreatRequestModel.ts +91 -0
- package/src/models/SecurityThreatWorkflowModel.ts +43 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
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;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ITApprovalSettings = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let ITApprovalSettings = class ITApprovalSettings extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(level, approval_role_id, workflow_id) {
|
|
17
|
+
super();
|
|
18
|
+
this.level = level;
|
|
19
|
+
this.approval_role_id = approval_role_id;
|
|
20
|
+
this.workflow_id = workflow_id;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
exports.ITApprovalSettings = ITApprovalSettings;
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
26
|
+
__metadata("design:type", Number)
|
|
27
|
+
], ITApprovalSettings.prototype, "level", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
30
|
+
__metadata("design:type", Number)
|
|
31
|
+
], ITApprovalSettings.prototype, "approval_role_id", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
34
|
+
__metadata("design:type", Number)
|
|
35
|
+
], ITApprovalSettings.prototype, "workflow_id", void 0);
|
|
36
|
+
exports.ITApprovalSettings = ITApprovalSettings = __decorate([
|
|
37
|
+
(0, typeorm_1.Entity)({ name: 'it_approval_settings' }),
|
|
38
|
+
(0, typeorm_1.Unique)(['workflow_id', 'level']),
|
|
39
|
+
__metadata("design:paramtypes", [Number, Number, Number])
|
|
40
|
+
], ITApprovalSettings);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
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;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ITServicesTypesMuscat = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let ITServicesTypesMuscat = class ITServicesTypesMuscat extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(name, name_in_arabic) {
|
|
17
|
+
super();
|
|
18
|
+
this.name = name;
|
|
19
|
+
this.name_in_arabic = name_in_arabic;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
exports.ITServicesTypesMuscat = ITServicesTypesMuscat;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.Column)({ nullable: false }),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], ITServicesTypesMuscat.prototype, "name", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({ nullable: false }),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], ITServicesTypesMuscat.prototype, "name_in_arabic", void 0);
|
|
31
|
+
exports.ITServicesTypesMuscat = ITServicesTypesMuscat = __decorate([
|
|
32
|
+
(0, typeorm_1.Entity)({ name: 'it_services_types_muscat' }),
|
|
33
|
+
__metadata("design:paramtypes", [String, String])
|
|
34
|
+
], ITServicesTypesMuscat);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
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;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ITServicesTypesSalalah = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let ITServicesTypesSalalah = class ITServicesTypesSalalah extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(name, name_in_arabic) {
|
|
17
|
+
super();
|
|
18
|
+
this.name = name;
|
|
19
|
+
this.name_in_arabic = name_in_arabic;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
exports.ITServicesTypesSalalah = ITServicesTypesSalalah;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.Column)({ nullable: false }),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], ITServicesTypesSalalah.prototype, "name", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({ nullable: false }),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], ITServicesTypesSalalah.prototype, "name_in_arabic", void 0);
|
|
31
|
+
exports.ITServicesTypesSalalah = ITServicesTypesSalalah = __decorate([
|
|
32
|
+
(0, typeorm_1.Entity)({ name: 'it_services_types_salalah' }),
|
|
33
|
+
__metadata("design:paramtypes", [String, String])
|
|
34
|
+
], ITServicesTypesSalalah);
|
|
@@ -2,7 +2,9 @@ import { BaseModel } from './BaseModel';
|
|
|
2
2
|
export declare enum ApprovalStatus {
|
|
3
3
|
PENDING = "Pending",
|
|
4
4
|
APPROVED = "Approved",
|
|
5
|
-
REJECTED = "Rejected"
|
|
5
|
+
REJECTED = "Rejected",
|
|
6
|
+
ASSIGNED = "Assigned",
|
|
7
|
+
REASSIGNED = "Reassigned"
|
|
6
8
|
}
|
|
7
9
|
export declare class ItApprovalDetails extends BaseModel {
|
|
8
10
|
request_id: number;
|
|
@@ -17,6 +17,8 @@ var ApprovalStatus;
|
|
|
17
17
|
ApprovalStatus["PENDING"] = "Pending";
|
|
18
18
|
ApprovalStatus["APPROVED"] = "Approved";
|
|
19
19
|
ApprovalStatus["REJECTED"] = "Rejected";
|
|
20
|
+
ApprovalStatus["ASSIGNED"] = "Assigned";
|
|
21
|
+
ApprovalStatus["REASSIGNED"] = "Reassigned";
|
|
20
22
|
})(ApprovalStatus || (exports.ApprovalStatus = ApprovalStatus = {}));
|
|
21
23
|
let ItApprovalDetails = class ItApprovalDetails extends BaseModel_1.BaseModel {
|
|
22
24
|
constructor(request_id, approver_user_id, approver_role_id, comment, approval_status, level, department_id, section_id, approved_by, service_id, sub_service_id, delegation_user_id) {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare enum SecurityThreatApprovalStatus {
|
|
3
|
+
PENDING = "Pending",
|
|
4
|
+
IN_PROGRESS = "In Progress",
|
|
5
|
+
APPROVED = "Approved",
|
|
6
|
+
REJECTED = "Rejected",
|
|
7
|
+
CLOSED = "Closed"
|
|
8
|
+
}
|
|
9
|
+
export declare class SecurityThreatApproval extends BaseModel {
|
|
10
|
+
request_id: number;
|
|
11
|
+
service_id: number | null;
|
|
12
|
+
sub_service_id: number | null;
|
|
13
|
+
level: number;
|
|
14
|
+
approver_role_id: number;
|
|
15
|
+
department_id: number | null;
|
|
16
|
+
section_id: number | null;
|
|
17
|
+
approver_user_id: number | null;
|
|
18
|
+
delegate_user_id: number | null;
|
|
19
|
+
approved_by: number | null;
|
|
20
|
+
comment: string;
|
|
21
|
+
approval_status: SecurityThreatApprovalStatus;
|
|
22
|
+
is_manager: boolean;
|
|
23
|
+
constructor(request_id: number, approver_role_id: number, comment: string, approval_status: SecurityThreatApprovalStatus, level: number, is_manager?: boolean, department_id?: number | null, section_id?: number | null, approver_user_id?: number | null, delegate_user_id?: number | null, approved_by?: number | null, service_id?: number, sub_service_id?: number);
|
|
24
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
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;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.SecurityThreatApproval = exports.SecurityThreatApprovalStatus = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
var SecurityThreatApprovalStatus;
|
|
16
|
+
(function (SecurityThreatApprovalStatus) {
|
|
17
|
+
SecurityThreatApprovalStatus["PENDING"] = "Pending";
|
|
18
|
+
SecurityThreatApprovalStatus["IN_PROGRESS"] = "In Progress";
|
|
19
|
+
SecurityThreatApprovalStatus["APPROVED"] = "Approved";
|
|
20
|
+
SecurityThreatApprovalStatus["REJECTED"] = "Rejected";
|
|
21
|
+
SecurityThreatApprovalStatus["CLOSED"] = "Closed";
|
|
22
|
+
})(SecurityThreatApprovalStatus || (exports.SecurityThreatApprovalStatus = SecurityThreatApprovalStatus = {}));
|
|
23
|
+
let SecurityThreatApproval = class SecurityThreatApproval extends BaseModel_1.BaseModel {
|
|
24
|
+
constructor(request_id, approver_role_id, comment, approval_status, level, is_manager = false, department_id, section_id, approver_user_id, delegate_user_id, approved_by, service_id, sub_service_id) {
|
|
25
|
+
super();
|
|
26
|
+
this.request_id = request_id;
|
|
27
|
+
this.service_id = service_id || null;
|
|
28
|
+
this.sub_service_id = sub_service_id || null;
|
|
29
|
+
this.approver_role_id = approver_role_id;
|
|
30
|
+
this.comment = comment;
|
|
31
|
+
this.approval_status = approval_status;
|
|
32
|
+
this.level = level;
|
|
33
|
+
this.is_manager = is_manager;
|
|
34
|
+
this.department_id = department_id || null;
|
|
35
|
+
this.section_id = section_id || null;
|
|
36
|
+
this.approver_user_id = approver_user_id || null;
|
|
37
|
+
this.delegate_user_id = delegate_user_id || null;
|
|
38
|
+
this.approved_by = approved_by || null;
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
exports.SecurityThreatApproval = SecurityThreatApproval;
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
44
|
+
__metadata("design:type", Number)
|
|
45
|
+
], SecurityThreatApproval.prototype, "request_id", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
48
|
+
__metadata("design:type", Object)
|
|
49
|
+
], SecurityThreatApproval.prototype, "service_id", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
52
|
+
__metadata("design:type", Object)
|
|
53
|
+
], SecurityThreatApproval.prototype, "sub_service_id", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
56
|
+
__metadata("design:type", Number)
|
|
57
|
+
], SecurityThreatApproval.prototype, "level", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
60
|
+
__metadata("design:type", Number)
|
|
61
|
+
], SecurityThreatApproval.prototype, "approver_role_id", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
64
|
+
__metadata("design:type", Object)
|
|
65
|
+
], SecurityThreatApproval.prototype, "department_id", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
68
|
+
__metadata("design:type", Object)
|
|
69
|
+
], SecurityThreatApproval.prototype, "section_id", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
72
|
+
__metadata("design:type", Object)
|
|
73
|
+
], SecurityThreatApproval.prototype, "approver_user_id", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
76
|
+
__metadata("design:type", Object)
|
|
77
|
+
], SecurityThreatApproval.prototype, "delegate_user_id", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
80
|
+
__metadata("design:type", Object)
|
|
81
|
+
], SecurityThreatApproval.prototype, "approved_by", void 0);
|
|
82
|
+
__decorate([
|
|
83
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: true, default: '' }),
|
|
84
|
+
__metadata("design:type", String)
|
|
85
|
+
], SecurityThreatApproval.prototype, "comment", void 0);
|
|
86
|
+
__decorate([
|
|
87
|
+
(0, typeorm_1.Column)({ type: 'enum', enum: SecurityThreatApprovalStatus, default: SecurityThreatApprovalStatus.PENDING, nullable: false }),
|
|
88
|
+
__metadata("design:type", String)
|
|
89
|
+
], SecurityThreatApproval.prototype, "approval_status", void 0);
|
|
90
|
+
__decorate([
|
|
91
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: false, nullable: false }),
|
|
92
|
+
__metadata("design:type", Boolean)
|
|
93
|
+
], SecurityThreatApproval.prototype, "is_manager", void 0);
|
|
94
|
+
exports.SecurityThreatApproval = SecurityThreatApproval = __decorate([
|
|
95
|
+
(0, typeorm_1.Entity)({ name: 'security_threat_approvals' }),
|
|
96
|
+
__metadata("design:paramtypes", [Number, Number, String, String, Number, Boolean, Object, Object, Object, Object, Object, Number, Number])
|
|
97
|
+
], SecurityThreatApproval);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare class SecurityThreatAttachment extends BaseModel {
|
|
3
|
+
request_id: number;
|
|
4
|
+
service_id: number | null;
|
|
5
|
+
sub_service_id: number | null;
|
|
6
|
+
file_url: string;
|
|
7
|
+
file_name: string;
|
|
8
|
+
file_type: string;
|
|
9
|
+
file_size: number | null;
|
|
10
|
+
chat_id: number | null;
|
|
11
|
+
constructor(request_id: number, file_url: string, file_name?: string, file_type?: string, file_size?: number, service_id?: number, sub_service_id?: number, chat_id?: number);
|
|
12
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
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;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.SecurityThreatAttachment = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let SecurityThreatAttachment = class SecurityThreatAttachment extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(request_id, file_url, file_name, file_type, file_size, service_id, sub_service_id, chat_id) {
|
|
17
|
+
super();
|
|
18
|
+
this.request_id = request_id;
|
|
19
|
+
this.service_id = service_id || null;
|
|
20
|
+
this.sub_service_id = sub_service_id || null;
|
|
21
|
+
this.file_url = file_url;
|
|
22
|
+
this.file_name = file_name || '';
|
|
23
|
+
this.file_type = file_type || '';
|
|
24
|
+
this.file_size = file_size || null;
|
|
25
|
+
this.chat_id = chat_id || null;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
exports.SecurityThreatAttachment = SecurityThreatAttachment;
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
31
|
+
__metadata("design:type", Number)
|
|
32
|
+
], SecurityThreatAttachment.prototype, "request_id", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
35
|
+
__metadata("design:type", Object)
|
|
36
|
+
], SecurityThreatAttachment.prototype, "service_id", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
39
|
+
__metadata("design:type", Object)
|
|
40
|
+
], SecurityThreatAttachment.prototype, "sub_service_id", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: false }),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], SecurityThreatAttachment.prototype, "file_url", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], SecurityThreatAttachment.prototype, "file_name", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], SecurityThreatAttachment.prototype, "file_type", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
|
|
55
|
+
__metadata("design:type", Object)
|
|
56
|
+
], SecurityThreatAttachment.prototype, "file_size", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
59
|
+
__metadata("design:type", Object)
|
|
60
|
+
], SecurityThreatAttachment.prototype, "chat_id", void 0);
|
|
61
|
+
exports.SecurityThreatAttachment = SecurityThreatAttachment = __decorate([
|
|
62
|
+
(0, typeorm_1.Entity)({ name: 'security_threat_attachments' }),
|
|
63
|
+
__metadata("design:paramtypes", [Number, String, String, String, Number, Number, Number, Number])
|
|
64
|
+
], SecurityThreatAttachment);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare enum SecurityThreatMessageType {
|
|
3
|
+
TEXT = "text",
|
|
4
|
+
IMAGE = "image",
|
|
5
|
+
VIDEO = "video",
|
|
6
|
+
FILE = "file",
|
|
7
|
+
LINK = "link"
|
|
8
|
+
}
|
|
9
|
+
export declare class SecurityThreatChat extends BaseModel {
|
|
10
|
+
request_id: number;
|
|
11
|
+
service_id: number | null;
|
|
12
|
+
sub_service_id: number | null;
|
|
13
|
+
user_id: number;
|
|
14
|
+
message: string;
|
|
15
|
+
messageType: SecurityThreatMessageType;
|
|
16
|
+
constructor(request_id: number, user_id: number, message: string, service_id?: number, sub_service_id?: number, messageType?: SecurityThreatMessageType);
|
|
17
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
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;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.SecurityThreatChat = exports.SecurityThreatMessageType = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
var SecurityThreatMessageType;
|
|
16
|
+
(function (SecurityThreatMessageType) {
|
|
17
|
+
SecurityThreatMessageType["TEXT"] = "text";
|
|
18
|
+
SecurityThreatMessageType["IMAGE"] = "image";
|
|
19
|
+
SecurityThreatMessageType["VIDEO"] = "video";
|
|
20
|
+
SecurityThreatMessageType["FILE"] = "file";
|
|
21
|
+
SecurityThreatMessageType["LINK"] = "link";
|
|
22
|
+
})(SecurityThreatMessageType || (exports.SecurityThreatMessageType = SecurityThreatMessageType = {}));
|
|
23
|
+
let SecurityThreatChat = class SecurityThreatChat extends BaseModel_1.BaseModel {
|
|
24
|
+
constructor(request_id, user_id, message, service_id, sub_service_id, messageType) {
|
|
25
|
+
super();
|
|
26
|
+
this.request_id = request_id;
|
|
27
|
+
this.service_id = service_id || null;
|
|
28
|
+
this.sub_service_id = sub_service_id || null;
|
|
29
|
+
this.user_id = user_id;
|
|
30
|
+
this.message = message;
|
|
31
|
+
this.messageType = messageType || SecurityThreatMessageType.TEXT;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
exports.SecurityThreatChat = SecurityThreatChat;
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
37
|
+
__metadata("design:type", Number)
|
|
38
|
+
], SecurityThreatChat.prototype, "request_id", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
41
|
+
__metadata("design:type", Object)
|
|
42
|
+
], SecurityThreatChat.prototype, "service_id", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
45
|
+
__metadata("design:type", Object)
|
|
46
|
+
], SecurityThreatChat.prototype, "sub_service_id", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
49
|
+
__metadata("design:type", Number)
|
|
50
|
+
], SecurityThreatChat.prototype, "user_id", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: false }),
|
|
53
|
+
__metadata("design:type", String)
|
|
54
|
+
], SecurityThreatChat.prototype, "message", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, typeorm_1.Column)({
|
|
57
|
+
type: 'enum',
|
|
58
|
+
enum: SecurityThreatMessageType,
|
|
59
|
+
default: SecurityThreatMessageType.TEXT,
|
|
60
|
+
nullable: false
|
|
61
|
+
}),
|
|
62
|
+
__metadata("design:type", String)
|
|
63
|
+
], SecurityThreatChat.prototype, "messageType", void 0);
|
|
64
|
+
exports.SecurityThreatChat = SecurityThreatChat = __decorate([
|
|
65
|
+
(0, typeorm_1.Entity)({ name: 'security_threat_chats' }),
|
|
66
|
+
__metadata("design:paramtypes", [Number, Number, String, Number, Number, String])
|
|
67
|
+
], SecurityThreatChat);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare enum SecurityThreatRequestStatus {
|
|
3
|
+
PENDING = "Pending",
|
|
4
|
+
IN_PROGRESS = "In Progress",
|
|
5
|
+
APPROVED = "Approved",
|
|
6
|
+
REJECTED = "Rejected",
|
|
7
|
+
CLOSED = "Closed"
|
|
8
|
+
}
|
|
9
|
+
export declare enum SecurityThreatPriority {
|
|
10
|
+
P1_VERY_LOW = "P1-Very Low",
|
|
11
|
+
P2_LOW = "P2\u2013Low",// Note: Using en dash (–) as specified
|
|
12
|
+
P3_MODERATE = "P3-Moderate",
|
|
13
|
+
P4_HIGH = "P4-High",
|
|
14
|
+
P5_VERY_HIGH = "P5-Very High"
|
|
15
|
+
}
|
|
16
|
+
export declare class SecurityThreatRequest extends BaseModel {
|
|
17
|
+
req_user_department_id: number | null;
|
|
18
|
+
req_user_section_id: number | null;
|
|
19
|
+
service_id: number;
|
|
20
|
+
sub_service_id: number;
|
|
21
|
+
user_id: number;
|
|
22
|
+
type_of_threat: number;
|
|
23
|
+
description: string;
|
|
24
|
+
contact_number: string;
|
|
25
|
+
priority: SecurityThreatPriority;
|
|
26
|
+
status: SecurityThreatRequestStatus;
|
|
27
|
+
workflow_execution_id: string | null;
|
|
28
|
+
constructor(req_user_department_id: number | null, req_user_section_id: number | null, service_id: number, sub_service_id: number, user_id: number, type_of_threat: number, description: string, contact_number: string, priority: SecurityThreatPriority, status: SecurityThreatRequestStatus, workflow_execution_id?: string | null);
|
|
29
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
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;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.SecurityThreatRequest = exports.SecurityThreatPriority = exports.SecurityThreatRequestStatus = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
var SecurityThreatRequestStatus;
|
|
16
|
+
(function (SecurityThreatRequestStatus) {
|
|
17
|
+
SecurityThreatRequestStatus["PENDING"] = "Pending";
|
|
18
|
+
SecurityThreatRequestStatus["IN_PROGRESS"] = "In Progress";
|
|
19
|
+
SecurityThreatRequestStatus["APPROVED"] = "Approved";
|
|
20
|
+
SecurityThreatRequestStatus["REJECTED"] = "Rejected";
|
|
21
|
+
SecurityThreatRequestStatus["CLOSED"] = "Closed";
|
|
22
|
+
})(SecurityThreatRequestStatus || (exports.SecurityThreatRequestStatus = SecurityThreatRequestStatus = {}));
|
|
23
|
+
var SecurityThreatPriority;
|
|
24
|
+
(function (SecurityThreatPriority) {
|
|
25
|
+
SecurityThreatPriority["P1_VERY_LOW"] = "P1-Very Low";
|
|
26
|
+
SecurityThreatPriority["P2_LOW"] = "P2\u2013Low";
|
|
27
|
+
SecurityThreatPriority["P3_MODERATE"] = "P3-Moderate";
|
|
28
|
+
SecurityThreatPriority["P4_HIGH"] = "P4-High";
|
|
29
|
+
SecurityThreatPriority["P5_VERY_HIGH"] = "P5-Very High";
|
|
30
|
+
})(SecurityThreatPriority || (exports.SecurityThreatPriority = SecurityThreatPriority = {}));
|
|
31
|
+
let SecurityThreatRequest = class SecurityThreatRequest extends BaseModel_1.BaseModel {
|
|
32
|
+
constructor(req_user_department_id, req_user_section_id, service_id, sub_service_id, user_id, type_of_threat, description, contact_number, priority, status, workflow_execution_id) {
|
|
33
|
+
super();
|
|
34
|
+
this.req_user_department_id = req_user_department_id ?? null;
|
|
35
|
+
this.req_user_section_id = req_user_section_id ?? null;
|
|
36
|
+
this.service_id = service_id;
|
|
37
|
+
this.sub_service_id = sub_service_id;
|
|
38
|
+
this.user_id = user_id;
|
|
39
|
+
this.type_of_threat = type_of_threat;
|
|
40
|
+
this.description = description;
|
|
41
|
+
this.contact_number = contact_number;
|
|
42
|
+
this.priority = priority;
|
|
43
|
+
this.status = status;
|
|
44
|
+
this.workflow_execution_id = workflow_execution_id ?? null;
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
exports.SecurityThreatRequest = SecurityThreatRequest;
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
50
|
+
__metadata("design:type", Object)
|
|
51
|
+
], SecurityThreatRequest.prototype, "req_user_department_id", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
54
|
+
__metadata("design:type", Object)
|
|
55
|
+
], SecurityThreatRequest.prototype, "req_user_section_id", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
58
|
+
__metadata("design:type", Number)
|
|
59
|
+
], SecurityThreatRequest.prototype, "service_id", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
62
|
+
__metadata("design:type", Number)
|
|
63
|
+
], SecurityThreatRequest.prototype, "sub_service_id", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, typeorm_1.Column)({ nullable: false }),
|
|
66
|
+
__metadata("design:type", Number)
|
|
67
|
+
], SecurityThreatRequest.prototype, "user_id", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
70
|
+
__metadata("design:type", Number)
|
|
71
|
+
], SecurityThreatRequest.prototype, "type_of_threat", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: false }),
|
|
74
|
+
__metadata("design:type", String)
|
|
75
|
+
], SecurityThreatRequest.prototype, "description", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: false }),
|
|
78
|
+
__metadata("design:type", String)
|
|
79
|
+
], SecurityThreatRequest.prototype, "contact_number", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, typeorm_1.Column)({
|
|
82
|
+
type: "enum",
|
|
83
|
+
enum: SecurityThreatPriority,
|
|
84
|
+
nullable: false,
|
|
85
|
+
}),
|
|
86
|
+
__metadata("design:type", String)
|
|
87
|
+
], SecurityThreatRequest.prototype, "priority", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, typeorm_1.Column)({
|
|
90
|
+
type: "enum",
|
|
91
|
+
enum: SecurityThreatRequestStatus,
|
|
92
|
+
default: SecurityThreatRequestStatus.PENDING,
|
|
93
|
+
nullable: false,
|
|
94
|
+
}),
|
|
95
|
+
__metadata("design:type", String)
|
|
96
|
+
], SecurityThreatRequest.prototype, "status", void 0);
|
|
97
|
+
__decorate([
|
|
98
|
+
(0, typeorm_1.Column)({ type: "varchar", nullable: true }),
|
|
99
|
+
__metadata("design:type", Object)
|
|
100
|
+
], SecurityThreatRequest.prototype, "workflow_execution_id", void 0);
|
|
101
|
+
exports.SecurityThreatRequest = SecurityThreatRequest = __decorate([
|
|
102
|
+
(0, typeorm_1.Entity)({ name: 'security_threat_requests' }),
|
|
103
|
+
__metadata("design:paramtypes", [Object, Object, Number, Number, Number, Number, String, String, String, String, Object])
|
|
104
|
+
], SecurityThreatRequest);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare enum SecurityThreatWorkFlowStatus {
|
|
3
|
+
COMPLETED = "Completed",
|
|
4
|
+
NOT_YET_STARTED = "Not Yet Started",
|
|
5
|
+
PENDING = "Pending"
|
|
6
|
+
}
|
|
7
|
+
export declare class SecurityThreatWorkFlow extends BaseModel {
|
|
8
|
+
request_id: number;
|
|
9
|
+
service_id: number | null;
|
|
10
|
+
sub_service_id: number | null;
|
|
11
|
+
content: string;
|
|
12
|
+
status: SecurityThreatWorkFlowStatus;
|
|
13
|
+
constructor(request_id: number, content: string, status: SecurityThreatWorkFlowStatus, service_id?: number, sub_service_id?: number);
|
|
14
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
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;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.SecurityThreatWorkFlow = exports.SecurityThreatWorkFlowStatus = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
var SecurityThreatWorkFlowStatus;
|
|
16
|
+
(function (SecurityThreatWorkFlowStatus) {
|
|
17
|
+
SecurityThreatWorkFlowStatus["COMPLETED"] = "Completed";
|
|
18
|
+
SecurityThreatWorkFlowStatus["NOT_YET_STARTED"] = "Not Yet Started";
|
|
19
|
+
SecurityThreatWorkFlowStatus["PENDING"] = "Pending";
|
|
20
|
+
})(SecurityThreatWorkFlowStatus || (exports.SecurityThreatWorkFlowStatus = SecurityThreatWorkFlowStatus = {}));
|
|
21
|
+
//This model is used to store the security threat workflow status and activity logs
|
|
22
|
+
let SecurityThreatWorkFlow = class SecurityThreatWorkFlow extends BaseModel_1.BaseModel {
|
|
23
|
+
constructor(request_id, content, status, service_id, sub_service_id) {
|
|
24
|
+
super();
|
|
25
|
+
this.request_id = request_id;
|
|
26
|
+
this.service_id = service_id || null;
|
|
27
|
+
this.sub_service_id = sub_service_id || null;
|
|
28
|
+
this.content = content;
|
|
29
|
+
this.status = status;
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
exports.SecurityThreatWorkFlow = SecurityThreatWorkFlow;
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
35
|
+
__metadata("design:type", Number)
|
|
36
|
+
], SecurityThreatWorkFlow.prototype, "request_id", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
39
|
+
__metadata("design:type", Object)
|
|
40
|
+
], SecurityThreatWorkFlow.prototype, "service_id", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
43
|
+
__metadata("design:type", Object)
|
|
44
|
+
], SecurityThreatWorkFlow.prototype, "sub_service_id", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: false }),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], SecurityThreatWorkFlow.prototype, "content", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typeorm_1.Column)({ type: 'enum', enum: SecurityThreatWorkFlowStatus, default: SecurityThreatWorkFlowStatus.NOT_YET_STARTED, nullable: false }),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], SecurityThreatWorkFlow.prototype, "status", void 0);
|
|
53
|
+
exports.SecurityThreatWorkFlow = SecurityThreatWorkFlow = __decorate([
|
|
54
|
+
(0, typeorm_1.Entity)({ name: 'security_threat_workflows' }),
|
|
55
|
+
__metadata("design:paramtypes", [Number, String, String, Number, Number])
|
|
56
|
+
], SecurityThreatWorkFlow);
|