@platform-modules/civil-aviation-authority 2.2.86 → 2.2.88
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 +10 -10
- package/dist/index.d.ts +5 -5
- package/dist/index.js +5 -5
- package/dist/models/AccessCardChatModel.d.ts +4 -1
- package/dist/models/AccessCardChatModel.js +16 -5
- package/dist/models/AccessCardWorkflowModel.d.ts +5 -1
- package/dist/models/AccessCardWorkflowModel.js +22 -2
- package/dist/models/LogisticsChatModel.d.ts +1 -1
- package/dist/models/LogisticsChatModel.js +1 -1
- package/dist/models/LogisticsWorkflowModel.d.ts +5 -1
- package/dist/models/LogisticsWorkflowModel.js +22 -2
- package/dist/models/{AirportEntryPermitApprovalModel.d.ts → SecurityAwarenessApprovalModel.d.ts} +4 -4
- package/dist/models/{AirportEntryPermitApprovalModel.js → SecurityAwarenessApprovalModel.js} +27 -27
- package/dist/models/SecurityAwarenessAttachmentModel.d.ts +12 -0
- package/dist/models/{AirportEntryPermitAttachmentModel.js → SecurityAwarenessAttachmentModel.js} +16 -26
- package/dist/models/SecurityAwarenessChatModel.d.ts +20 -0
- package/dist/models/SecurityAwarenessChatModel.js +78 -0
- package/dist/models/SecurityAwarenessRequestModel.d.ts +29 -0
- package/dist/models/SecurityAwarenessRequestModel.js +117 -0
- package/dist/models/SecurityAwarenessWorkflowModel.d.ts +18 -0
- package/dist/models/SecurityAwarenessWorkflowModel.js +76 -0
- package/dist/models/SecurityThreatApprovalModel.js +1 -1
- package/dist/models/SecurityThreatChatModel.d.ts +4 -1
- package/dist/models/SecurityThreatChatModel.js +13 -2
- package/dist/models/SecurityThreatWorkflowModel.d.ts +5 -1
- package/dist/models/SecurityThreatWorkflowModel.js +22 -2
- package/dist/models/VpnRequestChatModel.d.ts +2 -1
- package/dist/models/VpnRequestChatModel.js +7 -2
- package/dist/models/VpnWorkflowModel.d.ts +4 -1
- package/dist/models/VpnWorkflowModel.js +17 -2
- package/package.json +1 -1
- package/src/data-source.ts +10 -10
- package/src/index.ts +5 -5
- package/src/models/AccessCardChatModel.ts +15 -4
- package/src/models/AccessCardWorkflowModel.ts +21 -1
- package/src/models/LogisticsChatModel.ts +2 -2
- package/src/models/LogisticsWorkflowModel.ts +21 -1
- package/src/models/{AirportEntryPermitApprovalModel.ts → SecurityAwarenessApprovalModel.ts} +11 -10
- package/src/models/SecurityAwarenessAttachmentModel.ts +52 -0
- package/src/models/SecurityAwarenessChatModel.ts +66 -0
- package/src/models/SecurityAwarenessRequestModel.ts +105 -0
- package/src/models/SecurityAwarenessWorkflowModel.ts +63 -0
- package/src/models/SecurityThreatApprovalModel.ts +1 -1
- package/src/models/SecurityThreatChatModel.ts +12 -1
- package/src/models/SecurityThreatWorkflowModel.ts +21 -1
- package/src/models/VpnRequestChatModel.ts +6 -1
- package/src/models/VpnWorkflowModel.ts +16 -1
- package/dist/models/AirportEntryPermitAttachmentModel.d.ts +0 -14
- package/dist/models/AirportEntryPermitChatModel.d.ts +0 -17
- package/dist/models/AirportEntryPermitChatModel.js +0 -67
- package/dist/models/AirportEntryPermitModel.d.ts +0 -75
- package/dist/models/AirportEntryPermitModel.js +0 -253
- package/dist/models/AirportEntryPermitWorkflowModel.d.ts +0 -14
- package/dist/models/AirportEntryPermitWorkflowModel.js +0 -55
- package/dist/models/HotelreservationModal.d.ts +0 -30
- package/dist/models/HotelreservationModal.js +0 -119
- package/src/models/AirportEntryPermitAttachmentModel.ts +0 -62
- package/src/models/AirportEntryPermitChatModel.ts +0 -55
- package/src/models/AirportEntryPermitModel.ts +0 -246
- package/src/models/AirportEntryPermitWorkflowModel.ts +0 -42
|
@@ -0,0 +1,117 @@
|
|
|
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.SecurityAwarenessRequest = exports.MediaCoverageRequired = exports.SecurityAwarenessRequestStatus = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
var SecurityAwarenessRequestStatus;
|
|
16
|
+
(function (SecurityAwarenessRequestStatus) {
|
|
17
|
+
SecurityAwarenessRequestStatus["PENDING"] = "Pending";
|
|
18
|
+
SecurityAwarenessRequestStatus["ASSIGNED"] = "Assigned";
|
|
19
|
+
SecurityAwarenessRequestStatus["IN_PROGRESS"] = "In Progress";
|
|
20
|
+
SecurityAwarenessRequestStatus["APPROVED"] = "Approved";
|
|
21
|
+
SecurityAwarenessRequestStatus["REJECTED"] = "Rejected";
|
|
22
|
+
})(SecurityAwarenessRequestStatus || (exports.SecurityAwarenessRequestStatus = SecurityAwarenessRequestStatus = {}));
|
|
23
|
+
var MediaCoverageRequired;
|
|
24
|
+
(function (MediaCoverageRequired) {
|
|
25
|
+
MediaCoverageRequired["YES"] = "Yes";
|
|
26
|
+
MediaCoverageRequired["NO"] = "No";
|
|
27
|
+
})(MediaCoverageRequired || (exports.MediaCoverageRequired = MediaCoverageRequired = {}));
|
|
28
|
+
let SecurityAwarenessRequest = class SecurityAwarenessRequest extends BaseModel_1.BaseModel {
|
|
29
|
+
constructor(req_user_department_id, req_user_section_id, service_id, sub_service_id, user_id, title, date_of_submission, phone_number, place, description, event_date_time, media_coverage_required, status, workflow_execution_id) {
|
|
30
|
+
super();
|
|
31
|
+
this.req_user_department_id = req_user_department_id ?? null;
|
|
32
|
+
this.req_user_section_id = req_user_section_id ?? null;
|
|
33
|
+
this.service_id = service_id;
|
|
34
|
+
this.sub_service_id = sub_service_id;
|
|
35
|
+
this.user_id = user_id;
|
|
36
|
+
this.title = title;
|
|
37
|
+
this.date_of_submission = date_of_submission;
|
|
38
|
+
this.phone_number = phone_number;
|
|
39
|
+
this.place = place ?? null;
|
|
40
|
+
this.description = description ?? null;
|
|
41
|
+
this.event_date_time = event_date_time ?? null;
|
|
42
|
+
this.media_coverage_required = media_coverage_required;
|
|
43
|
+
this.status = status;
|
|
44
|
+
this.workflow_execution_id = workflow_execution_id ?? null;
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
exports.SecurityAwarenessRequest = SecurityAwarenessRequest;
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
50
|
+
__metadata("design:type", Object)
|
|
51
|
+
], SecurityAwarenessRequest.prototype, "req_user_department_id", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
54
|
+
__metadata("design:type", Object)
|
|
55
|
+
], SecurityAwarenessRequest.prototype, "req_user_section_id", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
58
|
+
__metadata("design:type", Number)
|
|
59
|
+
], SecurityAwarenessRequest.prototype, "service_id", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
62
|
+
__metadata("design:type", Number)
|
|
63
|
+
], SecurityAwarenessRequest.prototype, "sub_service_id", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, typeorm_1.Column)({ nullable: false }),
|
|
66
|
+
__metadata("design:type", Number)
|
|
67
|
+
], SecurityAwarenessRequest.prototype, "user_id", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, typeorm_1.Column)({ nullable: false }),
|
|
70
|
+
__metadata("design:type", String)
|
|
71
|
+
], SecurityAwarenessRequest.prototype, "title", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, typeorm_1.Column)({ type: "date", nullable: false }),
|
|
74
|
+
__metadata("design:type", Date)
|
|
75
|
+
], SecurityAwarenessRequest.prototype, "date_of_submission", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 20, nullable: false }),
|
|
78
|
+
__metadata("design:type", String)
|
|
79
|
+
], SecurityAwarenessRequest.prototype, "phone_number", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
|
|
82
|
+
__metadata("design:type", Object)
|
|
83
|
+
], SecurityAwarenessRequest.prototype, "place", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, typeorm_1.Column)({ type: "text", nullable: true }),
|
|
86
|
+
__metadata("design:type", Object)
|
|
87
|
+
], SecurityAwarenessRequest.prototype, "description", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, typeorm_1.Column)({ type: "timestamp", nullable: true }),
|
|
90
|
+
__metadata("design:type", Object)
|
|
91
|
+
], SecurityAwarenessRequest.prototype, "event_date_time", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
(0, typeorm_1.Column)({
|
|
94
|
+
type: "enum",
|
|
95
|
+
enum: MediaCoverageRequired,
|
|
96
|
+
default: MediaCoverageRequired.NO,
|
|
97
|
+
nullable: false,
|
|
98
|
+
}),
|
|
99
|
+
__metadata("design:type", String)
|
|
100
|
+
], SecurityAwarenessRequest.prototype, "media_coverage_required", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
(0, typeorm_1.Column)({
|
|
103
|
+
type: "enum",
|
|
104
|
+
enum: SecurityAwarenessRequestStatus,
|
|
105
|
+
default: SecurityAwarenessRequestStatus.PENDING,
|
|
106
|
+
nullable: false,
|
|
107
|
+
}),
|
|
108
|
+
__metadata("design:type", String)
|
|
109
|
+
], SecurityAwarenessRequest.prototype, "status", void 0);
|
|
110
|
+
__decorate([
|
|
111
|
+
(0, typeorm_1.Column)({ type: "varchar", nullable: true }),
|
|
112
|
+
__metadata("design:type", Object)
|
|
113
|
+
], SecurityAwarenessRequest.prototype, "workflow_execution_id", void 0);
|
|
114
|
+
exports.SecurityAwarenessRequest = SecurityAwarenessRequest = __decorate([
|
|
115
|
+
(0, typeorm_1.Entity)({ name: 'security_awareness_requests' }),
|
|
116
|
+
__metadata("design:paramtypes", [Object, Object, Number, Number, Number, String, Date, String, Object, Object, Object, String, String, Object])
|
|
117
|
+
], SecurityAwarenessRequest);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare enum SecurityAwarenessWorkFlowStatus {
|
|
3
|
+
COMPLETED = "Completed",
|
|
4
|
+
NOT_YET_STARTED = "Not Yet Started",
|
|
5
|
+
PENDING = "Pending"
|
|
6
|
+
}
|
|
7
|
+
export declare class SecurityAwarenessWorkFlow extends BaseModel {
|
|
8
|
+
request_id: number;
|
|
9
|
+
service_id: number | null;
|
|
10
|
+
sub_service_id: number | null;
|
|
11
|
+
content: string;
|
|
12
|
+
status: SecurityAwarenessWorkFlowStatus;
|
|
13
|
+
user_id: number | null;
|
|
14
|
+
role_id: number | null;
|
|
15
|
+
department_id: number | null;
|
|
16
|
+
section_id: number | null;
|
|
17
|
+
constructor(request_id: number, content: string, status: SecurityAwarenessWorkFlowStatus, service_id?: number, sub_service_id?: number, user_id?: number, role_id?: number, department_id?: number, section_id?: number);
|
|
18
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
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.SecurityAwarenessWorkFlow = exports.SecurityAwarenessWorkFlowStatus = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
var SecurityAwarenessWorkFlowStatus;
|
|
16
|
+
(function (SecurityAwarenessWorkFlowStatus) {
|
|
17
|
+
SecurityAwarenessWorkFlowStatus["COMPLETED"] = "Completed";
|
|
18
|
+
SecurityAwarenessWorkFlowStatus["NOT_YET_STARTED"] = "Not Yet Started";
|
|
19
|
+
SecurityAwarenessWorkFlowStatus["PENDING"] = "Pending";
|
|
20
|
+
})(SecurityAwarenessWorkFlowStatus || (exports.SecurityAwarenessWorkFlowStatus = SecurityAwarenessWorkFlowStatus = {}));
|
|
21
|
+
//This model is used to store the security awareness workflow status and activity logs
|
|
22
|
+
let SecurityAwarenessWorkFlow = class SecurityAwarenessWorkFlow extends BaseModel_1.BaseModel {
|
|
23
|
+
constructor(request_id, content, status, service_id, sub_service_id, user_id, role_id, department_id, section_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
|
+
this.user_id = user_id || null;
|
|
31
|
+
this.role_id = role_id || null;
|
|
32
|
+
this.department_id = department_id || null;
|
|
33
|
+
this.section_id = section_id || null;
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
exports.SecurityAwarenessWorkFlow = SecurityAwarenessWorkFlow;
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
39
|
+
__metadata("design:type", Number)
|
|
40
|
+
], SecurityAwarenessWorkFlow.prototype, "request_id", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
43
|
+
__metadata("design:type", Object)
|
|
44
|
+
], SecurityAwarenessWorkFlow.prototype, "service_id", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
47
|
+
__metadata("design:type", Object)
|
|
48
|
+
], SecurityAwarenessWorkFlow.prototype, "sub_service_id", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: false }),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], SecurityAwarenessWorkFlow.prototype, "content", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, typeorm_1.Column)({ type: 'enum', enum: SecurityAwarenessWorkFlowStatus, default: SecurityAwarenessWorkFlowStatus.NOT_YET_STARTED, nullable: false }),
|
|
55
|
+
__metadata("design:type", String)
|
|
56
|
+
], SecurityAwarenessWorkFlow.prototype, "status", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
59
|
+
__metadata("design:type", Object)
|
|
60
|
+
], SecurityAwarenessWorkFlow.prototype, "user_id", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
63
|
+
__metadata("design:type", Object)
|
|
64
|
+
], SecurityAwarenessWorkFlow.prototype, "role_id", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
67
|
+
__metadata("design:type", Object)
|
|
68
|
+
], SecurityAwarenessWorkFlow.prototype, "department_id", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
71
|
+
__metadata("design:type", Object)
|
|
72
|
+
], SecurityAwarenessWorkFlow.prototype, "section_id", void 0);
|
|
73
|
+
exports.SecurityAwarenessWorkFlow = SecurityAwarenessWorkFlow = __decorate([
|
|
74
|
+
(0, typeorm_1.Entity)({ name: 'security_awareness_workflows' }),
|
|
75
|
+
__metadata("design:paramtypes", [Number, String, String, Number, Number, Number, Number, Number, Number])
|
|
76
|
+
], SecurityAwarenessWorkFlow);
|
|
@@ -56,7 +56,7 @@ __decorate([
|
|
|
56
56
|
__metadata("design:type", Number)
|
|
57
57
|
], SecurityThreatApproval.prototype, "level", void 0);
|
|
58
58
|
__decorate([
|
|
59
|
-
(0, typeorm_1.Column)({ type: 'integer', nullable:
|
|
59
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
60
60
|
__metadata("design:type", Number)
|
|
61
61
|
], SecurityThreatApproval.prototype, "approver_role_id", void 0);
|
|
62
62
|
__decorate([
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BaseModel } from './BaseModel';
|
|
2
|
+
import { SecurityThreatApprovalStatus } from './SecurityThreatApprovalModel';
|
|
2
3
|
export declare enum SecurityThreatMessageType {
|
|
3
4
|
TEXT = "text",
|
|
4
5
|
IMAGE = "image",
|
|
@@ -11,7 +12,9 @@ export declare class SecurityThreatChat extends BaseModel {
|
|
|
11
12
|
service_id: number | null;
|
|
12
13
|
sub_service_id: number | null;
|
|
13
14
|
user_id: number;
|
|
15
|
+
role_id: number;
|
|
14
16
|
message: string;
|
|
15
17
|
messageType: SecurityThreatMessageType;
|
|
16
|
-
|
|
18
|
+
status: SecurityThreatApprovalStatus;
|
|
19
|
+
constructor(request_id: number, user_id: number, role_id: number, message: string, service_id?: number, sub_service_id?: number, messageType?: SecurityThreatMessageType, status?: SecurityThreatApprovalStatus);
|
|
17
20
|
}
|
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.SecurityThreatChat = exports.SecurityThreatMessageType = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
const SecurityThreatApprovalModel_1 = require("./SecurityThreatApprovalModel");
|
|
15
16
|
var SecurityThreatMessageType;
|
|
16
17
|
(function (SecurityThreatMessageType) {
|
|
17
18
|
SecurityThreatMessageType["TEXT"] = "text";
|
|
@@ -21,14 +22,16 @@ var SecurityThreatMessageType;
|
|
|
21
22
|
SecurityThreatMessageType["LINK"] = "link";
|
|
22
23
|
})(SecurityThreatMessageType || (exports.SecurityThreatMessageType = SecurityThreatMessageType = {}));
|
|
23
24
|
let SecurityThreatChat = class SecurityThreatChat extends BaseModel_1.BaseModel {
|
|
24
|
-
constructor(request_id, user_id, message, service_id, sub_service_id, messageType) {
|
|
25
|
+
constructor(request_id, user_id, role_id, message, service_id, sub_service_id, messageType, status) {
|
|
25
26
|
super();
|
|
26
27
|
this.request_id = request_id;
|
|
27
28
|
this.service_id = service_id || null;
|
|
28
29
|
this.sub_service_id = sub_service_id || null;
|
|
29
30
|
this.user_id = user_id;
|
|
31
|
+
this.role_id = role_id;
|
|
30
32
|
this.message = message;
|
|
31
33
|
this.messageType = messageType || SecurityThreatMessageType.TEXT;
|
|
34
|
+
this.status = status || SecurityThreatApprovalModel_1.SecurityThreatApprovalStatus.PENDING;
|
|
32
35
|
}
|
|
33
36
|
};
|
|
34
37
|
exports.SecurityThreatChat = SecurityThreatChat;
|
|
@@ -48,6 +51,10 @@ __decorate([
|
|
|
48
51
|
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
49
52
|
__metadata("design:type", Number)
|
|
50
53
|
], SecurityThreatChat.prototype, "user_id", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
56
|
+
__metadata("design:type", Number)
|
|
57
|
+
], SecurityThreatChat.prototype, "role_id", void 0);
|
|
51
58
|
__decorate([
|
|
52
59
|
(0, typeorm_1.Column)({ type: 'text', nullable: false }),
|
|
53
60
|
__metadata("design:type", String)
|
|
@@ -61,7 +68,11 @@ __decorate([
|
|
|
61
68
|
}),
|
|
62
69
|
__metadata("design:type", String)
|
|
63
70
|
], SecurityThreatChat.prototype, "messageType", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, typeorm_1.Column)({ type: 'enum', enum: SecurityThreatApprovalModel_1.SecurityThreatApprovalStatus, default: SecurityThreatApprovalModel_1.SecurityThreatApprovalStatus.PENDING, nullable: false }),
|
|
73
|
+
__metadata("design:type", String)
|
|
74
|
+
], SecurityThreatChat.prototype, "status", void 0);
|
|
64
75
|
exports.SecurityThreatChat = SecurityThreatChat = __decorate([
|
|
65
76
|
(0, typeorm_1.Entity)({ name: 'security_threat_chats' }),
|
|
66
|
-
__metadata("design:paramtypes", [Number, Number, String, Number, Number, String])
|
|
77
|
+
__metadata("design:paramtypes", [Number, Number, Number, String, Number, Number, String, String])
|
|
67
78
|
], SecurityThreatChat);
|
|
@@ -10,5 +10,9 @@ export declare class SecurityThreatWorkFlow extends BaseModel {
|
|
|
10
10
|
sub_service_id: number | null;
|
|
11
11
|
content: string;
|
|
12
12
|
status: SecurityThreatWorkFlowStatus;
|
|
13
|
-
|
|
13
|
+
user_id: number | null;
|
|
14
|
+
role_id: number | null;
|
|
15
|
+
department_id: number | null;
|
|
16
|
+
section_id: number | null;
|
|
17
|
+
constructor(request_id: number, content: string, status: SecurityThreatWorkFlowStatus, service_id?: number, sub_service_id?: number, user_id?: number, role_id?: number, department_id?: number, section_id?: number);
|
|
14
18
|
}
|
|
@@ -20,13 +20,17 @@ var SecurityThreatWorkFlowStatus;
|
|
|
20
20
|
})(SecurityThreatWorkFlowStatus || (exports.SecurityThreatWorkFlowStatus = SecurityThreatWorkFlowStatus = {}));
|
|
21
21
|
//This model is used to store the security threat workflow status and activity logs
|
|
22
22
|
let SecurityThreatWorkFlow = class SecurityThreatWorkFlow extends BaseModel_1.BaseModel {
|
|
23
|
-
constructor(request_id, content, status, service_id, sub_service_id) {
|
|
23
|
+
constructor(request_id, content, status, service_id, sub_service_id, user_id, role_id, department_id, section_id) {
|
|
24
24
|
super();
|
|
25
25
|
this.request_id = request_id;
|
|
26
26
|
this.service_id = service_id || null;
|
|
27
27
|
this.sub_service_id = sub_service_id || null;
|
|
28
28
|
this.content = content;
|
|
29
29
|
this.status = status;
|
|
30
|
+
this.user_id = user_id || null;
|
|
31
|
+
this.role_id = role_id || null;
|
|
32
|
+
this.department_id = department_id || null;
|
|
33
|
+
this.section_id = section_id || null;
|
|
30
34
|
}
|
|
31
35
|
};
|
|
32
36
|
exports.SecurityThreatWorkFlow = SecurityThreatWorkFlow;
|
|
@@ -50,7 +54,23 @@ __decorate([
|
|
|
50
54
|
(0, typeorm_1.Column)({ type: 'enum', enum: SecurityThreatWorkFlowStatus, default: SecurityThreatWorkFlowStatus.NOT_YET_STARTED, nullable: false }),
|
|
51
55
|
__metadata("design:type", String)
|
|
52
56
|
], SecurityThreatWorkFlow.prototype, "status", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
59
|
+
__metadata("design:type", Object)
|
|
60
|
+
], SecurityThreatWorkFlow.prototype, "user_id", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
63
|
+
__metadata("design:type", Object)
|
|
64
|
+
], SecurityThreatWorkFlow.prototype, "role_id", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
67
|
+
__metadata("design:type", Object)
|
|
68
|
+
], SecurityThreatWorkFlow.prototype, "department_id", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
71
|
+
__metadata("design:type", Object)
|
|
72
|
+
], SecurityThreatWorkFlow.prototype, "section_id", void 0);
|
|
53
73
|
exports.SecurityThreatWorkFlow = SecurityThreatWorkFlow = __decorate([
|
|
54
74
|
(0, typeorm_1.Entity)({ name: 'security_threat_workflows' }),
|
|
55
|
-
__metadata("design:paramtypes", [Number, String, String, Number, Number])
|
|
75
|
+
__metadata("design:paramtypes", [Number, String, String, Number, Number, Number, Number, Number, Number])
|
|
56
76
|
], SecurityThreatWorkFlow);
|
|
@@ -18,8 +18,9 @@ export declare class VpnRequestChat extends BaseModel {
|
|
|
18
18
|
request_id: number;
|
|
19
19
|
user_id: number;
|
|
20
20
|
message: string;
|
|
21
|
+
approver_role_id: number | null;
|
|
21
22
|
messageType: VpnMessageType;
|
|
22
23
|
is_internal: boolean;
|
|
23
24
|
status: VpnChatStatus;
|
|
24
|
-
constructor(request_id: number, user_id: number, message: string, messageType?: VpnMessageType, is_internal?: boolean, status?: VpnChatStatus);
|
|
25
|
+
constructor(request_id: number, user_id: number, message: string, messageType?: VpnMessageType, is_internal?: boolean, status?: VpnChatStatus, approver_role_id?: number);
|
|
25
26
|
}
|
|
@@ -30,7 +30,7 @@ var VpnChatStatus;
|
|
|
30
30
|
VpnChatStatus["APPROVED"] = "Approved";
|
|
31
31
|
})(VpnChatStatus || (exports.VpnChatStatus = VpnChatStatus = {}));
|
|
32
32
|
let VpnRequestChat = class VpnRequestChat extends BaseModel_1.BaseModel {
|
|
33
|
-
constructor(request_id, user_id, message, messageType, is_internal, status) {
|
|
33
|
+
constructor(request_id, user_id, message, messageType, is_internal, status, approver_role_id) {
|
|
34
34
|
super();
|
|
35
35
|
this.request_id = request_id;
|
|
36
36
|
this.user_id = user_id;
|
|
@@ -38,6 +38,7 @@ let VpnRequestChat = class VpnRequestChat extends BaseModel_1.BaseModel {
|
|
|
38
38
|
this.messageType = messageType || VpnMessageType.TEXT;
|
|
39
39
|
this.is_internal = is_internal || false;
|
|
40
40
|
this.status = status || VpnChatStatus.PENDING;
|
|
41
|
+
this.approver_role_id = approver_role_id || null;
|
|
41
42
|
}
|
|
42
43
|
};
|
|
43
44
|
exports.VpnRequestChat = VpnRequestChat;
|
|
@@ -53,6 +54,10 @@ __decorate([
|
|
|
53
54
|
(0, typeorm_1.Column)({ type: "text", nullable: false }),
|
|
54
55
|
__metadata("design:type", String)
|
|
55
56
|
], VpnRequestChat.prototype, "message", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
59
|
+
__metadata("design:type", Object)
|
|
60
|
+
], VpnRequestChat.prototype, "approver_role_id", void 0);
|
|
56
61
|
__decorate([
|
|
57
62
|
(0, typeorm_1.Column)({
|
|
58
63
|
type: "enum",
|
|
@@ -77,5 +82,5 @@ __decorate([
|
|
|
77
82
|
], VpnRequestChat.prototype, "status", void 0);
|
|
78
83
|
exports.VpnRequestChat = VpnRequestChat = __decorate([
|
|
79
84
|
(0, typeorm_1.Entity)({ name: "vpn_request_chat" }),
|
|
80
|
-
__metadata("design:paramtypes", [Number, Number, String, String, Boolean, String])
|
|
85
|
+
__metadata("design:paramtypes", [Number, Number, String, String, Boolean, String, Number])
|
|
81
86
|
], VpnRequestChat);
|
|
@@ -8,6 +8,9 @@ export declare class VpnWorkFlow extends BaseModel {
|
|
|
8
8
|
request_id: number;
|
|
9
9
|
order: number | null;
|
|
10
10
|
content: string;
|
|
11
|
+
approver_role_id: number | null;
|
|
12
|
+
approver_user_id: number | null;
|
|
13
|
+
approved_by: number | null;
|
|
11
14
|
status: VpnWorkFlowStatus;
|
|
12
|
-
constructor(request_id: number, content: string, status: VpnWorkFlowStatus, order?: number);
|
|
15
|
+
constructor(request_id: number, content: string, status: VpnWorkFlowStatus, order?: number, approver_role_id?: number | null, approver_user_id?: number | null, approved_by?: number | null);
|
|
13
16
|
}
|
|
@@ -19,12 +19,15 @@ var VpnWorkFlowStatus;
|
|
|
19
19
|
VpnWorkFlowStatus["PENDING"] = "Pending";
|
|
20
20
|
})(VpnWorkFlowStatus || (exports.VpnWorkFlowStatus = VpnWorkFlowStatus = {}));
|
|
21
21
|
let VpnWorkFlow = class VpnWorkFlow extends BaseModel_1.BaseModel {
|
|
22
|
-
constructor(request_id, content, status, order) {
|
|
22
|
+
constructor(request_id, content, status, order, approver_role_id, approver_user_id, approved_by) {
|
|
23
23
|
super();
|
|
24
24
|
this.request_id = request_id;
|
|
25
25
|
this.content = content;
|
|
26
26
|
this.status = status;
|
|
27
27
|
this.order = order || null;
|
|
28
|
+
this.approver_role_id = approver_role_id || null;
|
|
29
|
+
this.approver_user_id = approver_user_id || null;
|
|
30
|
+
this.approved_by = approved_by || null;
|
|
28
31
|
}
|
|
29
32
|
};
|
|
30
33
|
exports.VpnWorkFlow = VpnWorkFlow;
|
|
@@ -40,6 +43,18 @@ __decorate([
|
|
|
40
43
|
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: false }),
|
|
41
44
|
__metadata("design:type", String)
|
|
42
45
|
], VpnWorkFlow.prototype, "content", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
48
|
+
__metadata("design:type", Object)
|
|
49
|
+
], VpnWorkFlow.prototype, "approver_role_id", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
52
|
+
__metadata("design:type", Object)
|
|
53
|
+
], VpnWorkFlow.prototype, "approver_user_id", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
56
|
+
__metadata("design:type", Object)
|
|
57
|
+
], VpnWorkFlow.prototype, "approved_by", void 0);
|
|
43
58
|
__decorate([
|
|
44
59
|
(0, typeorm_1.Column)({
|
|
45
60
|
type: "enum",
|
|
@@ -51,5 +66,5 @@ __decorate([
|
|
|
51
66
|
], VpnWorkFlow.prototype, "status", void 0);
|
|
52
67
|
exports.VpnWorkFlow = VpnWorkFlow = __decorate([
|
|
53
68
|
(0, typeorm_1.Entity)({ name: "vpn_work_flows" }),
|
|
54
|
-
__metadata("design:paramtypes", [Number, String, String, Number])
|
|
69
|
+
__metadata("design:paramtypes", [Number, String, String, Number, Object, Object, Object])
|
|
55
70
|
], VpnWorkFlow);
|
package/package.json
CHANGED
package/src/data-source.ts
CHANGED
|
@@ -62,11 +62,11 @@ import { SecurityThreatApproval } from './models/SecurityThreatApprovalModel';
|
|
|
62
62
|
import { SecurityThreatAttachment } from './models/SecurityThreatAttachmentModel';
|
|
63
63
|
import { SecurityThreatChat } from './models/SecurityThreatChatModel';
|
|
64
64
|
import { SecurityThreatWorkFlow } from './models/SecurityThreatWorkflowModel';
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
65
|
+
import { SecurityAwarenessRequest } from './models/SecurityAwarenessRequestModel';
|
|
66
|
+
import { SecurityAwarenessApproval } from './models/SecurityAwarenessApprovalModel';
|
|
67
|
+
import { SecurityAwarenessAttachment } from './models/SecurityAwarenessAttachmentModel';
|
|
68
|
+
import { SecurityAwarenessChat } from './models/SecurityAwarenessChatModel';
|
|
69
|
+
import { SecurityAwarenessWorkFlow } from './models/SecurityAwarenessWorkflowModel';
|
|
70
70
|
|
|
71
71
|
export const AppDataSource = new DataSource({
|
|
72
72
|
type: 'postgres',
|
|
@@ -136,10 +136,10 @@ export const AppDataSource = new DataSource({
|
|
|
136
136
|
SecurityThreatAttachment,
|
|
137
137
|
SecurityThreatChat,
|
|
138
138
|
SecurityThreatWorkFlow,
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
139
|
+
SecurityAwarenessRequest,
|
|
140
|
+
SecurityAwarenessApproval,
|
|
141
|
+
SecurityAwarenessAttachment,
|
|
142
|
+
SecurityAwarenessChat,
|
|
143
|
+
SecurityAwarenessWorkFlow
|
|
144
144
|
],
|
|
145
145
|
});
|
package/src/index.ts
CHANGED
|
@@ -57,8 +57,8 @@ export * from './models/SecurityThreatApprovalModel';
|
|
|
57
57
|
export * from './models/SecurityThreatAttachmentModel';
|
|
58
58
|
export * from './models/SecurityThreatChatModel';
|
|
59
59
|
export * from './models/SecurityThreatWorkflowModel';
|
|
60
|
-
export * from './models/
|
|
61
|
-
export * from './models/
|
|
62
|
-
export * from './models/
|
|
63
|
-
export * from './models/
|
|
64
|
-
export * from './models/
|
|
60
|
+
export * from './models/SecurityAwarenessRequestModel';
|
|
61
|
+
export * from './models/SecurityAwarenessApprovalModel';
|
|
62
|
+
export * from './models/SecurityAwarenessAttachmentModel';
|
|
63
|
+
export * from './models/SecurityAwarenessChatModel';
|
|
64
|
+
export * from './models/SecurityAwarenessWorkflowModel';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Column, Entity } from "typeorm";
|
|
2
2
|
import { BaseModel } from "./BaseModel";
|
|
3
|
+
import { AccessCardApprovalStatus } from "./AccessCardApprovalModel";
|
|
3
4
|
|
|
4
5
|
export enum AccessCardMessageType {
|
|
5
6
|
TEXT = "text",
|
|
@@ -23,6 +24,9 @@ export class AccessCardRequestChat extends BaseModel {
|
|
|
23
24
|
@Column({ type: "integer", nullable: false })
|
|
24
25
|
user_id: number;
|
|
25
26
|
|
|
27
|
+
@Column({ type: "integer", nullable: true })
|
|
28
|
+
role_id: number;
|
|
29
|
+
|
|
26
30
|
@Column({ type: "text", nullable: false })
|
|
27
31
|
message: string;
|
|
28
32
|
|
|
@@ -34,21 +38,28 @@ export class AccessCardRequestChat extends BaseModel {
|
|
|
34
38
|
})
|
|
35
39
|
messageType: AccessCardMessageType;
|
|
36
40
|
|
|
41
|
+
@Column({ type: 'enum', enum: AccessCardApprovalStatus, default: AccessCardApprovalStatus.PENDING, nullable: false })
|
|
42
|
+
status: AccessCardApprovalStatus;
|
|
43
|
+
|
|
37
44
|
constructor(
|
|
38
45
|
request_id: number,
|
|
39
46
|
user_id: number,
|
|
47
|
+
role_id: number,
|
|
40
48
|
message: string,
|
|
41
49
|
service_id?: number,
|
|
42
50
|
sub_service_id?: number,
|
|
43
|
-
messageType?: AccessCardMessageType
|
|
51
|
+
messageType?: AccessCardMessageType,
|
|
52
|
+
status?: AccessCardApprovalStatus
|
|
44
53
|
) {
|
|
45
54
|
super();
|
|
46
55
|
this.request_id = request_id;
|
|
47
|
-
this.service_id = service_id
|
|
48
|
-
this.sub_service_id = sub_service_id
|
|
56
|
+
this.service_id = service_id || null;
|
|
57
|
+
this.sub_service_id = sub_service_id || null;
|
|
49
58
|
this.user_id = user_id;
|
|
59
|
+
this.role_id = role_id;
|
|
50
60
|
this.message = message;
|
|
51
|
-
this.messageType = messageType
|
|
61
|
+
this.messageType = messageType || AccessCardMessageType.TEXT;
|
|
62
|
+
this.status = status || AccessCardApprovalStatus.PENDING;
|
|
52
63
|
}
|
|
53
64
|
}
|
|
54
65
|
|
|
@@ -29,12 +29,28 @@ export class AccessCardWorkflow extends BaseModel {
|
|
|
29
29
|
})
|
|
30
30
|
status: AccessCardWorkflowStatus;
|
|
31
31
|
|
|
32
|
+
@Column({ type: "integer", nullable: true })
|
|
33
|
+
user_id: number | null;
|
|
34
|
+
|
|
35
|
+
@Column({ type: "integer", nullable: true })
|
|
36
|
+
role_id: number | null;
|
|
37
|
+
|
|
38
|
+
@Column({ type: "integer", nullable: true })
|
|
39
|
+
department_id: number | null;
|
|
40
|
+
|
|
41
|
+
@Column({ type: "integer", nullable: true })
|
|
42
|
+
section_id: number | null;
|
|
43
|
+
|
|
32
44
|
constructor(
|
|
33
45
|
request_id: number,
|
|
34
46
|
content: string,
|
|
35
47
|
status: AccessCardWorkflowStatus,
|
|
36
48
|
service_id?: number,
|
|
37
|
-
sub_service_id?: number
|
|
49
|
+
sub_service_id?: number,
|
|
50
|
+
user_id?: number,
|
|
51
|
+
role_id?: number,
|
|
52
|
+
department_id?: number,
|
|
53
|
+
section_id?: number
|
|
38
54
|
) {
|
|
39
55
|
super();
|
|
40
56
|
this.request_id = request_id;
|
|
@@ -42,6 +58,10 @@ export class AccessCardWorkflow extends BaseModel {
|
|
|
42
58
|
this.sub_service_id = sub_service_id ?? null;
|
|
43
59
|
this.content = content;
|
|
44
60
|
this.status = status;
|
|
61
|
+
this.user_id = user_id ?? null;
|
|
62
|
+
this.role_id = role_id ?? null;
|
|
63
|
+
this.department_id = department_id ?? null;
|
|
64
|
+
this.section_id = section_id ?? null;
|
|
45
65
|
}
|
|
46
66
|
}
|
|
47
67
|
|
|
@@ -39,8 +39,8 @@ export class LogisticsRequestChat extends BaseModel {
|
|
|
39
39
|
})
|
|
40
40
|
messageType: MessageType;
|
|
41
41
|
|
|
42
|
-
@Column({ type: '
|
|
43
|
-
status:
|
|
42
|
+
@Column({ type: 'text', nullable: true })
|
|
43
|
+
status: string;
|
|
44
44
|
|
|
45
45
|
constructor(
|
|
46
46
|
request_id: number,
|
|
@@ -25,12 +25,28 @@ export class LogisticsWorkFlow extends BaseModel {
|
|
|
25
25
|
@Column({ type: 'enum', enum: LogisticsWorkFlowStatus, default: LogisticsWorkFlowStatus.NOT_YET_STARTED, nullable: false })
|
|
26
26
|
status: LogisticsWorkFlowStatus;
|
|
27
27
|
|
|
28
|
+
@Column({ type: 'integer', nullable: true })
|
|
29
|
+
user_id: number | null;
|
|
30
|
+
|
|
31
|
+
@Column({ type: 'integer', nullable: true })
|
|
32
|
+
role_id: number | null;
|
|
33
|
+
|
|
34
|
+
@Column({ type: 'integer', nullable: true })
|
|
35
|
+
department_id: number | null;
|
|
36
|
+
|
|
37
|
+
@Column({ type: 'integer', nullable: true })
|
|
38
|
+
section_id: number | null;
|
|
39
|
+
|
|
28
40
|
constructor(
|
|
29
41
|
request_id: number,
|
|
30
42
|
content: string,
|
|
31
43
|
status: LogisticsWorkFlowStatus,
|
|
32
44
|
service_id?: number,
|
|
33
|
-
sub_service_id?: number
|
|
45
|
+
sub_service_id?: number,
|
|
46
|
+
user_id?: number,
|
|
47
|
+
role_id?: number,
|
|
48
|
+
department_id?: number,
|
|
49
|
+
section_id?: number
|
|
34
50
|
) {
|
|
35
51
|
super();
|
|
36
52
|
this.request_id = request_id;
|
|
@@ -38,5 +54,9 @@ export class LogisticsWorkFlow extends BaseModel {
|
|
|
38
54
|
this.sub_service_id = sub_service_id || null;
|
|
39
55
|
this.content = content;
|
|
40
56
|
this.status = status;
|
|
57
|
+
this.user_id = user_id || null;
|
|
58
|
+
this.role_id = role_id || null;
|
|
59
|
+
this.department_id = department_id || null;
|
|
60
|
+
this.section_id = section_id || null;
|
|
41
61
|
}
|
|
42
62
|
}
|