@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
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { Column, Entity } from "typeorm";
|
|
2
2
|
import { BaseModel } from './BaseModel';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
|
|
5
|
+
export enum SecurityAwarenessApprovalStatus {
|
|
5
6
|
PENDING = "Pending",
|
|
6
7
|
IN_PROGRESS = "In Progress",
|
|
7
8
|
APPROVED = "Approved",
|
|
8
9
|
REJECTED = "Rejected"
|
|
9
10
|
}
|
|
10
11
|
|
|
11
|
-
@Entity({ name: '
|
|
12
|
-
export class
|
|
12
|
+
@Entity({ name: 'security_awareness_approvals' })
|
|
13
|
+
export class SecurityAwarenessApproval extends BaseModel {
|
|
13
14
|
@Column({ type: 'integer', nullable: false })
|
|
14
15
|
request_id: number;
|
|
15
16
|
|
|
@@ -22,7 +23,7 @@ export class AirportEntryPermitApproval extends BaseModel {
|
|
|
22
23
|
@Column({ type: 'integer', nullable: false })
|
|
23
24
|
level: number;
|
|
24
25
|
|
|
25
|
-
@Column({ type: 'integer', nullable:
|
|
26
|
+
@Column({ type: 'integer', nullable: true })
|
|
26
27
|
approver_role_id: number;
|
|
27
28
|
|
|
28
29
|
@Column({ type: 'integer', nullable: true })
|
|
@@ -43,14 +44,14 @@ export class AirportEntryPermitApproval extends BaseModel {
|
|
|
43
44
|
@Column({ type: 'varchar', length: 500, nullable: true, default: '' })
|
|
44
45
|
comment: string;
|
|
45
46
|
|
|
46
|
-
@Column({ type: 'enum', enum:
|
|
47
|
-
approval_status:
|
|
47
|
+
@Column({ type: 'enum', enum: SecurityAwarenessApprovalStatus, default: SecurityAwarenessApprovalStatus.PENDING, nullable: false })
|
|
48
|
+
approval_status: SecurityAwarenessApprovalStatus;
|
|
48
49
|
|
|
49
50
|
constructor(
|
|
50
|
-
request_id: number,
|
|
51
|
-
approver_role_id: number,
|
|
52
|
-
comment: string,
|
|
53
|
-
approval_status:
|
|
51
|
+
request_id: number,
|
|
52
|
+
approver_role_id: number,
|
|
53
|
+
comment: string,
|
|
54
|
+
approval_status: SecurityAwarenessApprovalStatus,
|
|
54
55
|
level: number,
|
|
55
56
|
department_id?: number | null,
|
|
56
57
|
section_id?: number | null,
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'security_awareness_attachments' })
|
|
5
|
+
export class SecurityAwarenessAttachment extends BaseModel {
|
|
6
|
+
|
|
7
|
+
@Column({ type: 'integer', nullable: false })
|
|
8
|
+
request_id: number;
|
|
9
|
+
|
|
10
|
+
@Column({ type: 'integer', nullable: true })
|
|
11
|
+
service_id: number | null;
|
|
12
|
+
|
|
13
|
+
@Column({ type: 'integer', nullable: true })
|
|
14
|
+
sub_service_id: number | null;
|
|
15
|
+
|
|
16
|
+
@Column({ type: 'varchar', length: 500, nullable: false })
|
|
17
|
+
file_url: string;
|
|
18
|
+
|
|
19
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
20
|
+
file_name: string;
|
|
21
|
+
|
|
22
|
+
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
23
|
+
file_type: string;
|
|
24
|
+
|
|
25
|
+
@Column({ type: 'bigint', nullable: true })
|
|
26
|
+
file_size: number | null;
|
|
27
|
+
|
|
28
|
+
@Column({ type: 'integer', nullable: true })
|
|
29
|
+
chat_id: number | null;
|
|
30
|
+
|
|
31
|
+
constructor(
|
|
32
|
+
request_id: number,
|
|
33
|
+
file_url: string,
|
|
34
|
+
file_name?: string,
|
|
35
|
+
file_type?: string,
|
|
36
|
+
file_size?: number,
|
|
37
|
+
service_id?: number,
|
|
38
|
+
sub_service_id?: number,
|
|
39
|
+
chat_id?: number
|
|
40
|
+
) {
|
|
41
|
+
super();
|
|
42
|
+
this.request_id = request_id;
|
|
43
|
+
this.service_id = service_id || null;
|
|
44
|
+
this.sub_service_id = sub_service_id || null;
|
|
45
|
+
this.file_url = file_url;
|
|
46
|
+
this.file_name = file_name || '';
|
|
47
|
+
this.file_type = file_type || '';
|
|
48
|
+
this.file_size = file_size || null;
|
|
49
|
+
this.chat_id = chat_id || null;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
import { SecurityAwarenessApprovalStatus } from './SecurityAwarenessApprovalModel';
|
|
4
|
+
|
|
5
|
+
export enum SecurityAwarenessMessageType {
|
|
6
|
+
TEXT = "text",
|
|
7
|
+
IMAGE = "image",
|
|
8
|
+
VIDEO = "video",
|
|
9
|
+
FILE = "file",
|
|
10
|
+
LINK = "link"
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@Entity({ name: 'security_awareness_chats' })
|
|
14
|
+
export class SecurityAwarenessChat extends BaseModel {
|
|
15
|
+
|
|
16
|
+
@Column({ type: 'integer', nullable: false })
|
|
17
|
+
request_id: number;
|
|
18
|
+
|
|
19
|
+
@Column({ type: 'integer', nullable: true })
|
|
20
|
+
service_id: number | null;
|
|
21
|
+
|
|
22
|
+
@Column({ type: 'integer', nullable: true })
|
|
23
|
+
sub_service_id: number | null;
|
|
24
|
+
|
|
25
|
+
@Column({ type: 'integer', nullable: false })
|
|
26
|
+
user_id: number;
|
|
27
|
+
|
|
28
|
+
@Column({ type: 'integer', nullable: true })
|
|
29
|
+
role_id: number;
|
|
30
|
+
|
|
31
|
+
@Column({ type: 'text', nullable: false })
|
|
32
|
+
message: string;
|
|
33
|
+
|
|
34
|
+
@Column({
|
|
35
|
+
type: 'enum',
|
|
36
|
+
enum: SecurityAwarenessMessageType,
|
|
37
|
+
default: SecurityAwarenessMessageType.TEXT,
|
|
38
|
+
nullable: false
|
|
39
|
+
})
|
|
40
|
+
messageType: SecurityAwarenessMessageType;
|
|
41
|
+
|
|
42
|
+
@Column({ type: 'enum', enum: SecurityAwarenessApprovalStatus, default: SecurityAwarenessApprovalStatus.PENDING, nullable: false })
|
|
43
|
+
status: SecurityAwarenessApprovalStatus;
|
|
44
|
+
|
|
45
|
+
constructor(
|
|
46
|
+
request_id: number,
|
|
47
|
+
user_id: number,
|
|
48
|
+
role_id: number,
|
|
49
|
+
message: string,
|
|
50
|
+
service_id?: number,
|
|
51
|
+
sub_service_id?: number,
|
|
52
|
+
messageType?: SecurityAwarenessMessageType,
|
|
53
|
+
status?: SecurityAwarenessApprovalStatus
|
|
54
|
+
) {
|
|
55
|
+
super();
|
|
56
|
+
this.request_id = request_id;
|
|
57
|
+
this.service_id = service_id || null;
|
|
58
|
+
this.sub_service_id = sub_service_id || null;
|
|
59
|
+
this.user_id = user_id;
|
|
60
|
+
this.role_id = role_id;
|
|
61
|
+
this.message = message;
|
|
62
|
+
this.messageType = messageType || SecurityAwarenessMessageType.TEXT;
|
|
63
|
+
this.status = status || SecurityAwarenessApprovalStatus.PENDING;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum SecurityAwarenessRequestStatus {
|
|
5
|
+
PENDING = "Pending",
|
|
6
|
+
ASSIGNED = "Assigned",
|
|
7
|
+
IN_PROGRESS = "In Progress",
|
|
8
|
+
APPROVED = "Approved",
|
|
9
|
+
REJECTED = "Rejected"
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export enum MediaCoverageRequired {
|
|
13
|
+
YES = "Yes",
|
|
14
|
+
NO = "No"
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@Entity({ name: 'security_awareness_requests' })
|
|
18
|
+
export class SecurityAwarenessRequest extends BaseModel {
|
|
19
|
+
|
|
20
|
+
@Column({ type: 'int', nullable: true })
|
|
21
|
+
req_user_department_id: number | null;
|
|
22
|
+
|
|
23
|
+
@Column({ type: 'int', nullable: true })
|
|
24
|
+
req_user_section_id: number | null;
|
|
25
|
+
|
|
26
|
+
@Column({ nullable: true })
|
|
27
|
+
service_id: number;
|
|
28
|
+
|
|
29
|
+
@Column({ nullable: true })
|
|
30
|
+
sub_service_id: number;
|
|
31
|
+
|
|
32
|
+
@Column({ nullable: false })
|
|
33
|
+
user_id: number;
|
|
34
|
+
|
|
35
|
+
@Column({ nullable: false })
|
|
36
|
+
title: string;
|
|
37
|
+
|
|
38
|
+
@Column({ type: "date", nullable: false })
|
|
39
|
+
date_of_submission: Date;
|
|
40
|
+
|
|
41
|
+
@Column({ type: "varchar", length: 20, nullable: false })
|
|
42
|
+
phone_number: string;
|
|
43
|
+
|
|
44
|
+
@Column({ type: "varchar", length: 255, nullable: true })
|
|
45
|
+
place: string | null;
|
|
46
|
+
|
|
47
|
+
@Column({ type: "text", nullable: true })
|
|
48
|
+
description: string | null;
|
|
49
|
+
|
|
50
|
+
@Column({ type: "timestamp", nullable: true })
|
|
51
|
+
event_date_time: Date | null;
|
|
52
|
+
|
|
53
|
+
@Column({
|
|
54
|
+
type: "enum",
|
|
55
|
+
enum: MediaCoverageRequired,
|
|
56
|
+
default: MediaCoverageRequired.NO,
|
|
57
|
+
nullable: false,
|
|
58
|
+
})
|
|
59
|
+
media_coverage_required: MediaCoverageRequired;
|
|
60
|
+
|
|
61
|
+
@Column({
|
|
62
|
+
type: "enum",
|
|
63
|
+
enum: SecurityAwarenessRequestStatus,
|
|
64
|
+
default: SecurityAwarenessRequestStatus.PENDING,
|
|
65
|
+
nullable: false,
|
|
66
|
+
})
|
|
67
|
+
status: SecurityAwarenessRequestStatus;
|
|
68
|
+
|
|
69
|
+
@Column({ type: "varchar", nullable: true })
|
|
70
|
+
workflow_execution_id: string | null;
|
|
71
|
+
|
|
72
|
+
constructor(
|
|
73
|
+
req_user_department_id: number | null,
|
|
74
|
+
req_user_section_id: number | null,
|
|
75
|
+
service_id: number,
|
|
76
|
+
sub_service_id: number,
|
|
77
|
+
user_id: number,
|
|
78
|
+
title: string,
|
|
79
|
+
date_of_submission: Date,
|
|
80
|
+
phone_number: string,
|
|
81
|
+
place: string | null,
|
|
82
|
+
description: string | null,
|
|
83
|
+
event_date_time: Date | null,
|
|
84
|
+
media_coverage_required: MediaCoverageRequired,
|
|
85
|
+
status: SecurityAwarenessRequestStatus,
|
|
86
|
+
workflow_execution_id?: string | null,
|
|
87
|
+
) {
|
|
88
|
+
super();
|
|
89
|
+
this.req_user_department_id = req_user_department_id ?? null;
|
|
90
|
+
this.req_user_section_id = req_user_section_id ?? null;
|
|
91
|
+
this.service_id = service_id;
|
|
92
|
+
this.sub_service_id = sub_service_id;
|
|
93
|
+
this.user_id = user_id;
|
|
94
|
+
this.title = title;
|
|
95
|
+
this.date_of_submission = date_of_submission;
|
|
96
|
+
this.phone_number = phone_number;
|
|
97
|
+
this.place = place ?? null;
|
|
98
|
+
this.description = description ?? null;
|
|
99
|
+
this.event_date_time = event_date_time ?? null;
|
|
100
|
+
this.media_coverage_required = media_coverage_required;
|
|
101
|
+
this.status = status;
|
|
102
|
+
this.workflow_execution_id = workflow_execution_id ?? null;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum SecurityAwarenessWorkFlowStatus {
|
|
5
|
+
COMPLETED = "Completed",
|
|
6
|
+
NOT_YET_STARTED = "Not Yet Started",
|
|
7
|
+
PENDING = "Pending"
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
//This model is used to store the security awareness workflow status and activity logs
|
|
11
|
+
@Entity({ name: 'security_awareness_workflows' })
|
|
12
|
+
export class SecurityAwarenessWorkFlow extends BaseModel {
|
|
13
|
+
@Column({ type: 'integer', nullable: false })
|
|
14
|
+
request_id: number;
|
|
15
|
+
|
|
16
|
+
@Column({ type: 'integer', nullable: true })
|
|
17
|
+
service_id: number | null;
|
|
18
|
+
|
|
19
|
+
@Column({ type: 'integer', nullable: true })
|
|
20
|
+
sub_service_id: number | null;
|
|
21
|
+
|
|
22
|
+
@Column({ type: 'varchar', length: 500, nullable: false })
|
|
23
|
+
content: string;
|
|
24
|
+
|
|
25
|
+
@Column({ type: 'enum', enum: SecurityAwarenessWorkFlowStatus, default: SecurityAwarenessWorkFlowStatus.NOT_YET_STARTED, nullable: false })
|
|
26
|
+
status: SecurityAwarenessWorkFlowStatus;
|
|
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
|
+
|
|
40
|
+
constructor(
|
|
41
|
+
request_id: number,
|
|
42
|
+
content: string,
|
|
43
|
+
status: SecurityAwarenessWorkFlowStatus,
|
|
44
|
+
service_id?: number,
|
|
45
|
+
sub_service_id?: number,
|
|
46
|
+
user_id?: number,
|
|
47
|
+
role_id?: number,
|
|
48
|
+
department_id?: number,
|
|
49
|
+
section_id?: number
|
|
50
|
+
) {
|
|
51
|
+
super();
|
|
52
|
+
this.request_id = request_id;
|
|
53
|
+
this.service_id = service_id || null;
|
|
54
|
+
this.sub_service_id = sub_service_id || null;
|
|
55
|
+
this.content = content;
|
|
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;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
@@ -23,7 +23,7 @@ export class SecurityThreatApproval extends BaseModel {
|
|
|
23
23
|
@Column({ type: 'integer', nullable: false })
|
|
24
24
|
level: number;
|
|
25
25
|
|
|
26
|
-
@Column({ type: 'integer', nullable:
|
|
26
|
+
@Column({ type: 'integer', nullable: true })
|
|
27
27
|
approver_role_id: number;
|
|
28
28
|
|
|
29
29
|
@Column({ type: 'integer', nullable: true })
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Column, Entity } from "typeorm";
|
|
2
2
|
import { BaseModel } from './BaseModel';
|
|
3
|
+
import { SecurityThreatApprovalStatus } from './SecurityThreatApprovalModel';
|
|
3
4
|
|
|
4
5
|
export enum SecurityThreatMessageType {
|
|
5
6
|
TEXT = "text",
|
|
@@ -24,6 +25,9 @@ export class SecurityThreatChat extends BaseModel {
|
|
|
24
25
|
@Column({ type: 'integer', nullable: false })
|
|
25
26
|
user_id: number;
|
|
26
27
|
|
|
28
|
+
@Column({ type: 'integer', nullable: true })
|
|
29
|
+
role_id: number;
|
|
30
|
+
|
|
27
31
|
@Column({ type: 'text', nullable: false })
|
|
28
32
|
message: string;
|
|
29
33
|
|
|
@@ -35,21 +39,28 @@ export class SecurityThreatChat extends BaseModel {
|
|
|
35
39
|
})
|
|
36
40
|
messageType: SecurityThreatMessageType;
|
|
37
41
|
|
|
42
|
+
@Column({ type: 'enum', enum: SecurityThreatApprovalStatus, default: SecurityThreatApprovalStatus.PENDING, nullable: false })
|
|
43
|
+
status: SecurityThreatApprovalStatus;
|
|
44
|
+
|
|
38
45
|
constructor(
|
|
39
46
|
request_id: number,
|
|
40
47
|
user_id: number,
|
|
48
|
+
role_id: number,
|
|
41
49
|
message: string,
|
|
42
50
|
service_id?: number,
|
|
43
51
|
sub_service_id?: number,
|
|
44
|
-
messageType?: SecurityThreatMessageType
|
|
52
|
+
messageType?: SecurityThreatMessageType,
|
|
53
|
+
status?: SecurityThreatApprovalStatus
|
|
45
54
|
) {
|
|
46
55
|
super();
|
|
47
56
|
this.request_id = request_id;
|
|
48
57
|
this.service_id = service_id || null;
|
|
49
58
|
this.sub_service_id = sub_service_id || null;
|
|
50
59
|
this.user_id = user_id;
|
|
60
|
+
this.role_id = role_id;
|
|
51
61
|
this.message = message;
|
|
52
62
|
this.messageType = messageType || SecurityThreatMessageType.TEXT;
|
|
63
|
+
this.status = status || SecurityThreatApprovalStatus.PENDING;
|
|
53
64
|
}
|
|
54
65
|
}
|
|
55
66
|
|
|
@@ -25,12 +25,28 @@ export class SecurityThreatWorkFlow extends BaseModel {
|
|
|
25
25
|
@Column({ type: 'enum', enum: SecurityThreatWorkFlowStatus, default: SecurityThreatWorkFlowStatus.NOT_YET_STARTED, nullable: false })
|
|
26
26
|
status: SecurityThreatWorkFlowStatus;
|
|
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: SecurityThreatWorkFlowStatus,
|
|
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,6 +54,10 @@ export class SecurityThreatWorkFlow 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
|
}
|
|
43
63
|
|
|
@@ -29,6 +29,9 @@ export class VpnRequestChat extends BaseModel {
|
|
|
29
29
|
@Column({ type: "text", nullable: false })
|
|
30
30
|
message: string;
|
|
31
31
|
|
|
32
|
+
@Column({ type: "integer", nullable: true })
|
|
33
|
+
approver_role_id: number | null;
|
|
34
|
+
|
|
32
35
|
@Column({
|
|
33
36
|
type: "enum",
|
|
34
37
|
enum: VpnMessageType,
|
|
@@ -54,7 +57,8 @@ export class VpnRequestChat extends BaseModel {
|
|
|
54
57
|
message: string,
|
|
55
58
|
messageType?: VpnMessageType,
|
|
56
59
|
is_internal?: boolean,
|
|
57
|
-
status?: VpnChatStatus
|
|
60
|
+
status?: VpnChatStatus,
|
|
61
|
+
approver_role_id?: number
|
|
58
62
|
) {
|
|
59
63
|
super();
|
|
60
64
|
this.request_id = request_id;
|
|
@@ -63,6 +67,7 @@ export class VpnRequestChat extends BaseModel {
|
|
|
63
67
|
this.messageType = messageType || VpnMessageType.TEXT;
|
|
64
68
|
this.is_internal = is_internal || false;
|
|
65
69
|
this.status = status || VpnChatStatus.PENDING;
|
|
70
|
+
this.approver_role_id = approver_role_id || null;
|
|
66
71
|
}
|
|
67
72
|
}
|
|
68
73
|
|
|
@@ -18,6 +18,15 @@ export class VpnWorkFlow extends BaseModel {
|
|
|
18
18
|
@Column({ type: "varchar", length: 255, nullable: false })
|
|
19
19
|
content: string;
|
|
20
20
|
|
|
21
|
+
@Column({ type: "integer", nullable: true })
|
|
22
|
+
approver_role_id: number | null;
|
|
23
|
+
|
|
24
|
+
@Column({ type: "integer", nullable: true })
|
|
25
|
+
approver_user_id: number | null;
|
|
26
|
+
|
|
27
|
+
@Column({ type: "integer", nullable: true })
|
|
28
|
+
approved_by: number | null;
|
|
29
|
+
|
|
21
30
|
@Column({
|
|
22
31
|
type: "enum",
|
|
23
32
|
enum: VpnWorkFlowStatus,
|
|
@@ -30,13 +39,19 @@ export class VpnWorkFlow extends BaseModel {
|
|
|
30
39
|
request_id: number,
|
|
31
40
|
content: string,
|
|
32
41
|
status: VpnWorkFlowStatus,
|
|
33
|
-
order?: number
|
|
42
|
+
order?: number,
|
|
43
|
+
approver_role_id?: number | null,
|
|
44
|
+
approver_user_id?: number | null,
|
|
45
|
+
approved_by?: number | null
|
|
34
46
|
) {
|
|
35
47
|
super();
|
|
36
48
|
this.request_id = request_id;
|
|
37
49
|
this.content = content;
|
|
38
50
|
this.status = status;
|
|
39
51
|
this.order = order || null;
|
|
52
|
+
this.approver_role_id = approver_role_id || null;
|
|
53
|
+
this.approver_user_id = approver_user_id || null;
|
|
54
|
+
this.approved_by = approved_by || null;
|
|
40
55
|
}
|
|
41
56
|
}
|
|
42
57
|
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { BaseModel } from './BaseModel';
|
|
2
|
-
export declare class AirportEntryPermitAttachment 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
|
-
uploaded_by: number;
|
|
12
|
-
description: string;
|
|
13
|
-
constructor(request_id: number, uploaded_by: number, file_url: string, file_name?: string, file_type?: string, file_size?: number, service_id?: number, sub_service_id?: number, chat_id?: number, description?: string);
|
|
14
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { BaseModel } from './BaseModel';
|
|
2
|
-
export declare enum AirportEntryPermitMessageTypes {
|
|
3
|
-
TEXT = "text",
|
|
4
|
-
IMAGE = "image",
|
|
5
|
-
VIDEO = "video",
|
|
6
|
-
FILE = "file",
|
|
7
|
-
LINK = "link"
|
|
8
|
-
}
|
|
9
|
-
export declare class AirportEntryPermitChat 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: AirportEntryPermitMessageTypes;
|
|
16
|
-
constructor(request_id: number, user_id: number, message: string, service_id?: number, sub_service_id?: number, messageType?: AirportEntryPermitMessageTypes);
|
|
17
|
-
}
|
|
@@ -1,67 +0,0 @@
|
|
|
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.AirportEntryPermitChat = exports.AirportEntryPermitMessageTypes = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const BaseModel_1 = require("./BaseModel");
|
|
15
|
-
var AirportEntryPermitMessageTypes;
|
|
16
|
-
(function (AirportEntryPermitMessageTypes) {
|
|
17
|
-
AirportEntryPermitMessageTypes["TEXT"] = "text";
|
|
18
|
-
AirportEntryPermitMessageTypes["IMAGE"] = "image";
|
|
19
|
-
AirportEntryPermitMessageTypes["VIDEO"] = "video";
|
|
20
|
-
AirportEntryPermitMessageTypes["FILE"] = "file";
|
|
21
|
-
AirportEntryPermitMessageTypes["LINK"] = "link";
|
|
22
|
-
})(AirportEntryPermitMessageTypes || (exports.AirportEntryPermitMessageTypes = AirportEntryPermitMessageTypes = {}));
|
|
23
|
-
let AirportEntryPermitChat = class AirportEntryPermitChat 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 || AirportEntryPermitMessageTypes.TEXT;
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
exports.AirportEntryPermitChat = AirportEntryPermitChat;
|
|
35
|
-
__decorate([
|
|
36
|
-
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
37
|
-
__metadata("design:type", Number)
|
|
38
|
-
], AirportEntryPermitChat.prototype, "request_id", void 0);
|
|
39
|
-
__decorate([
|
|
40
|
-
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
41
|
-
__metadata("design:type", Object)
|
|
42
|
-
], AirportEntryPermitChat.prototype, "service_id", void 0);
|
|
43
|
-
__decorate([
|
|
44
|
-
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
45
|
-
__metadata("design:type", Object)
|
|
46
|
-
], AirportEntryPermitChat.prototype, "sub_service_id", void 0);
|
|
47
|
-
__decorate([
|
|
48
|
-
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
49
|
-
__metadata("design:type", Number)
|
|
50
|
-
], AirportEntryPermitChat.prototype, "user_id", void 0);
|
|
51
|
-
__decorate([
|
|
52
|
-
(0, typeorm_1.Column)({ type: 'text', nullable: false }),
|
|
53
|
-
__metadata("design:type", String)
|
|
54
|
-
], AirportEntryPermitChat.prototype, "message", void 0);
|
|
55
|
-
__decorate([
|
|
56
|
-
(0, typeorm_1.Column)({
|
|
57
|
-
type: 'enum',
|
|
58
|
-
enum: AirportEntryPermitMessageTypes,
|
|
59
|
-
default: AirportEntryPermitMessageTypes.TEXT,
|
|
60
|
-
nullable: false
|
|
61
|
-
}),
|
|
62
|
-
__metadata("design:type", String)
|
|
63
|
-
], AirportEntryPermitChat.prototype, "messageType", void 0);
|
|
64
|
-
exports.AirportEntryPermitChat = AirportEntryPermitChat = __decorate([
|
|
65
|
-
(0, typeorm_1.Entity)({ name: 'airport_entry_permit_chat' }),
|
|
66
|
-
__metadata("design:paramtypes", [Number, Number, String, Number, Number, String])
|
|
67
|
-
], AirportEntryPermitChat);
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { BaseModel } from './BaseModel';
|
|
2
|
-
export declare enum AirportEntryPermitCategory {
|
|
3
|
-
ISSUING_NEW_PERMIT = "Issuing New Permit",
|
|
4
|
-
RENEWAL_OF_PERMIT = "Renewal of Permit",
|
|
5
|
-
AMENDING = "Amending",
|
|
6
|
-
REPLACING_LOST = "Replacing lost",
|
|
7
|
-
CANCELLING_AIRPORT_SECURITY_PERMITS = "Cancelling airport security permits"
|
|
8
|
-
}
|
|
9
|
-
export declare enum AirportEntryPermitType {
|
|
10
|
-
PERMANENT = "Permanent",
|
|
11
|
-
TEMPORARY = "Temporary"
|
|
12
|
-
}
|
|
13
|
-
export declare enum AirportEntryPermitLocation {
|
|
14
|
-
MUSCAT = "Muscat",
|
|
15
|
-
SALALAH = "Salalah",
|
|
16
|
-
MARMUL = "Marmul",
|
|
17
|
-
DURUM = "Durum",
|
|
18
|
-
SOHAR = "Sohar",
|
|
19
|
-
FUHUD = "Fuhud",
|
|
20
|
-
MUKHAZINA = "Mukhazina"
|
|
21
|
-
}
|
|
22
|
-
export declare enum AirportEntryPermitArea {
|
|
23
|
-
PURPLE = "VIP building",
|
|
24
|
-
HEAVENLY = "Cargo Building with import and export sections",
|
|
25
|
-
ORANGE = "[ Arrivals Hall] and Arrivals building",
|
|
26
|
-
GREEN = "[departures Hall ] and departures building",
|
|
27
|
-
YELLOW = "Information centre and control tower building",
|
|
28
|
-
BLUE = "Vehicle, Aircraft building, Aircraft parking area, fire station and fuel filling stations, repair shop",
|
|
29
|
-
PINK = "Baggage sorting area",
|
|
30
|
-
GRAY = "Supply building",
|
|
31
|
-
ALL_CIVIL_AIRPORTS = "All Civil Airports"
|
|
32
|
-
}
|
|
33
|
-
export declare enum AirportEntryPermitStatus {
|
|
34
|
-
PENDING = "Pending",
|
|
35
|
-
APPROVED = "Approved",
|
|
36
|
-
REJECTED = "Rejected",
|
|
37
|
-
IN_PROGRESS = "In Progress"
|
|
38
|
-
}
|
|
39
|
-
export declare class AirportEntryPermit extends BaseModel {
|
|
40
|
-
req_user_department_id: number | null;
|
|
41
|
-
req_user_section_id: number | null;
|
|
42
|
-
service_id: number | null;
|
|
43
|
-
sub_service_id: number | null;
|
|
44
|
-
service_type: string | null;
|
|
45
|
-
workflow_execution_id: string | null;
|
|
46
|
-
status: AirportEntryPermitStatus;
|
|
47
|
-
user_id: number;
|
|
48
|
-
request_id: string | null;
|
|
49
|
-
name_full_family_name: string;
|
|
50
|
-
nationality: string;
|
|
51
|
-
dob: Date;
|
|
52
|
-
place: string;
|
|
53
|
-
passport_id_card_no: string;
|
|
54
|
-
category_of_permit: AirportEntryPermitCategory;
|
|
55
|
-
date_of_submission: Date;
|
|
56
|
-
phone_number: string;
|
|
57
|
-
location: AirportEntryPermitLocation;
|
|
58
|
-
type_of_permit: AirportEntryPermitType;
|
|
59
|
-
temporary_start_time: string | null;
|
|
60
|
-
temporary_duration: string | null;
|
|
61
|
-
permission_to_required_areas: AirportEntryPermitArea[];
|
|
62
|
-
attachment_url: string | null;
|
|
63
|
-
details: string;
|
|
64
|
-
occupation_staff: string;
|
|
65
|
-
visitor_visa_type: string | null;
|
|
66
|
-
visitor_visa_no: string | null;
|
|
67
|
-
visitor_visa_expiry_date: Date | null;
|
|
68
|
-
acknowledge_security_policies: boolean;
|
|
69
|
-
acknowledge_disciplinary_action: boolean;
|
|
70
|
-
consent_approve_to_issue_permit: boolean;
|
|
71
|
-
consent_do_not_approve_to_issue_permit: boolean;
|
|
72
|
-
consent_justification: string | null;
|
|
73
|
-
requested_by: string;
|
|
74
|
-
constructor(name_full_family_name: string, nationality: string, dob: Date, place: string, passport_id_card_no: string, category_of_permit: AirportEntryPermitCategory, date_of_submission: Date, phone_number: string, location: AirportEntryPermitLocation, type_of_permit: AirportEntryPermitType, permission_to_required_areas: AirportEntryPermitArea[], details: string, occupation_staff: string, requested_by: string, user_id: number, status?: AirportEntryPermitStatus, service_id?: number | null, sub_service_id?: number | null, service_type?: string | null, workflow_execution_id?: string | null, req_user_department_id?: number | null, req_user_section_id?: number | null, attachment_url?: string | null, temporary_start_time?: string | null, temporary_duration?: string | null, visitor_visa_type?: string | null, visitor_visa_no?: string | null, visitor_visa_expiry_date?: Date | null, acknowledge_security_policies?: boolean, acknowledge_disciplinary_action?: boolean, consent_approve_to_issue_permit?: boolean, consent_do_not_approve_to_issue_permit?: boolean, consent_justification?: string | null, request_id?: string | null);
|
|
75
|
-
}
|