@platform-modules/civil-aviation-authority 2.2.101 → 2.2.200

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.
Files changed (47) hide show
  1. package/.env +4 -4
  2. package/dist/data-source.js +4 -10
  3. package/dist/index.d.ts +2 -5
  4. package/dist/index.js +2 -5
  5. package/dist/models/AccessCardApprovalModel.js +1 -1
  6. package/dist/models/GroupModel.d.ts +16 -0
  7. package/dist/models/{ITServicesTypesSalalahModel.js → GroupModel.js} +26 -16
  8. package/dist/models/GroupNamesModel.d.ts +6 -0
  9. package/dist/models/{ITServicesTypesMuscatModel.js → GroupNamesModel.js} +10 -10
  10. package/dist/models/ITRequestChatModel.d.ts +5 -1
  11. package/dist/models/ITRequestChatModel.js +22 -2
  12. package/dist/models/ItWorkflowModel.d.ts +5 -1
  13. package/dist/models/ItWorkflowModel.js +22 -2
  14. package/dist/models/SecurityAwarenessRequestModel.d.ts +3 -2
  15. package/dist/models/SecurityAwarenessRequestModel.js +10 -5
  16. package/package.json +1 -1
  17. package/src/data-source.ts +4 -10
  18. package/src/index.ts +2 -5
  19. package/src/models/AccessCardApprovalModel.ts +1 -1
  20. package/src/models/GroupModel.ts +31 -0
  21. package/src/models/GroupNamesModel.ts +22 -0
  22. package/src/models/ITRequestChatModel.ts +62 -42
  23. package/src/models/ItWorkflowModel.ts +55 -39
  24. package/src/models/SecurityAwarenessRequestModel.ts +9 -4
  25. package/dist/models/AirportEntryPermitApprovalModel.d.ts +0 -23
  26. package/dist/models/AirportEntryPermitApprovalModel.js +0 -92
  27. package/dist/models/AirportEntryPermitAttachmentModel.d.ts +0 -14
  28. package/dist/models/AirportEntryPermitAttachmentModel.js +0 -74
  29. package/dist/models/AirportEntryPermitChatModel.d.ts +0 -17
  30. package/dist/models/AirportEntryPermitChatModel.js +0 -67
  31. package/dist/models/AirportEntryPermitModel.d.ts +0 -78
  32. package/dist/models/AirportEntryPermitModel.js +0 -249
  33. package/dist/models/AirportEntryPermitWorkflowModel.d.ts +0 -14
  34. package/dist/models/AirportEntryPermitWorkflowModel.js +0 -55
  35. package/dist/models/HotelreservationModal.d.ts +0 -30
  36. package/dist/models/HotelreservationModal.js +0 -119
  37. package/dist/models/ITApprovalSettings.d.ts +0 -7
  38. package/dist/models/ITApprovalSettings.js +0 -40
  39. package/dist/models/ITServicesTypesMuscatModel.d.ts +0 -6
  40. package/dist/models/ITServicesTypesSalalahModel.d.ts +0 -6
  41. package/dist/models/Workflows.d.ts +0 -0
  42. package/dist/models/Workflows.js +0 -31
  43. package/src/models/AirportEntryPermitApprovalModel.ts +0 -79
  44. package/src/models/AirportEntryPermitAttachmentModel.ts +0 -62
  45. package/src/models/AirportEntryPermitChatModel.ts +0 -55
  46. package/src/models/AirportEntryPermitModel.ts +0 -242
  47. package/src/models/AirportEntryPermitWorkflowModel.ts +0 -42
@@ -1,62 +0,0 @@
1
- import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
2
- import { BaseModel } from './BaseModel';
3
-
4
- @Entity({ name: 'airport_entry_permit_attachments' })
5
- export class AirportEntryPermitAttachment 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
- @Column({ type: "integer", nullable: false })
32
- uploaded_by: number;
33
-
34
- @Column({ type: "text", nullable: true })
35
- description: string;
36
-
37
- constructor(
38
- request_id: number,
39
- uploaded_by: number,
40
- file_url: string,
41
- file_name?: string,
42
- file_type?: string,
43
- file_size?: number,
44
- service_id?: number,
45
- sub_service_id?: number,
46
- chat_id?: number,
47
- description?: string
48
- ) {
49
- super();
50
- this.request_id = request_id;
51
- this.service_id = service_id || null;
52
- this.sub_service_id = sub_service_id || null;
53
- this.file_url = file_url;
54
- this.file_name = file_name || '';
55
- this.file_type = file_type || '';
56
- this.file_size = file_size || null;
57
- this.chat_id = chat_id || null;
58
- this.uploaded_by = uploaded_by;
59
- this.description = description || '';
60
- }
61
- }
62
-
@@ -1,55 +0,0 @@
1
- import { Column, Entity } from "typeorm";
2
- import { BaseModel } from './BaseModel';
3
-
4
- export enum AirportEntryPermitMessageTypes {
5
- TEXT = "text",
6
- IMAGE = "image",
7
- VIDEO = "video",
8
- FILE = "file",
9
- LINK = "link"
10
- }
11
-
12
- @Entity({ name: 'airport_entry_permit_chat' })
13
- export class AirportEntryPermitChat extends BaseModel {
14
-
15
- @Column({ type: 'integer', nullable: false })
16
- request_id: number;
17
-
18
- @Column({ type: 'integer', nullable: true })
19
- service_id: number | null;
20
-
21
- @Column({ type: 'integer', nullable: true })
22
- sub_service_id: number | null;
23
-
24
- @Column({ type: 'integer', nullable: false })
25
- user_id: number;
26
-
27
- @Column({ type: 'text', nullable: false })
28
- message: string;
29
-
30
- @Column({
31
- type: 'enum',
32
- enum: AirportEntryPermitMessageTypes,
33
- default: AirportEntryPermitMessageTypes.TEXT,
34
- nullable: false
35
- })
36
- messageType: AirportEntryPermitMessageTypes;
37
-
38
- constructor(
39
- request_id: number,
40
- user_id: number,
41
- message: string,
42
- service_id?: number,
43
- sub_service_id?: number,
44
- messageType?: AirportEntryPermitMessageTypes
45
- ) {
46
- super();
47
- this.request_id = request_id;
48
- this.service_id = service_id || null;
49
- this.sub_service_id = sub_service_id || null;
50
- this.user_id = user_id;
51
- this.message = message;
52
- this.messageType = messageType || AirportEntryPermitMessageTypes.TEXT;
53
- }
54
- }
55
-
@@ -1,242 +0,0 @@
1
- import { Entity, Column } from 'typeorm';
2
- import { BaseModel } from './BaseModel';
3
-
4
- export enum AirportEntryPermitCategory {
5
- ISSUING_NEW_PERMIT = "Issuing New Permit",
6
- RENEWAL_OF_PERMIT = "Renewal of Permit",
7
- AMENDING = "Amending",
8
- REPLACING_LOST = "Replacing lost",
9
- CANCELLING_AIRPORT_SECURITY_PERMITS = "Cancelling airport security permits"
10
- }
11
-
12
- export enum AirportEntryPermitType {
13
- PERMANENT = "Permanent",
14
- TEMPORARY = "Temporary"
15
- }
16
-
17
- export enum AirportEntryPermitLocation {
18
- MUSCAT = "Muscat",
19
- SALALAH = "Salalah",
20
- MARMUL = "Marmul",
21
- DURUM = "Durum",
22
- SOHAR = "Sohar",
23
- FUHUD = "Fuhud",
24
- MUKHAZINA = "Mukhazina"
25
- }
26
-
27
- export enum AirportEntryPermitArea {
28
- PURPLE = "VIP building",
29
- HEAVENLY = "Cargo Building with import and export sections",
30
- ORANGE = "[ Arrivals Hall] and Arrivals building",
31
- GREEN = "[departures Hall ] and departures building",
32
- YELLOW = "Information centre and control tower building",
33
- BLUE = "Vehicle, Aircraft building, Aircraft parking area, fire station and fuel filling stations, repair shop",
34
- PINK = "Baggage sorting area",
35
- GRAY = "Supply building",
36
- ALL_CIVIL_AIRPORTS = "All Civil Airports"
37
- }
38
-
39
- export enum AirportEntryPermitStatus {
40
- PENDING = "Pending",
41
- APPROVED = "Approved",
42
- REJECTED = "Rejected",
43
- IN_PROGRESS = "In Progress"
44
- }
45
-
46
- export enum VisitorOption {
47
- VISA_TYPE = "Visa Type",
48
- VISA_NO = "Visa No",
49
- DATE_EXPIRY_VISA = "Date Expiry Visa"
50
- }
51
-
52
- @Entity({ name: 'airport_entry_permits' })
53
- export class AirportEntryPermit extends BaseModel {
54
- // Workflow fields
55
- @Column({ type: 'int', nullable: true })
56
- req_user_department_id: number | null;
57
-
58
- @Column({ type: 'int', nullable: true })
59
- req_user_section_id: number | null;
60
-
61
- @Column({ type: 'int', nullable: true })
62
- service_id: number | null;
63
-
64
- @Column({ type: 'int', nullable: true })
65
- sub_service_id: number | null;
66
-
67
- @Column({ type: 'varchar', length: 20, nullable: true })
68
- service_type: string | null;
69
-
70
- @Column({ type: 'varchar', nullable: true })
71
- workflow_execution_id: string | null;
72
-
73
- @Column({
74
- type: "enum",
75
- enum: AirportEntryPermitStatus,
76
- default: AirportEntryPermitStatus.PENDING,
77
- nullable: false,
78
- })
79
- status: AirportEntryPermitStatus;
80
-
81
- @Column({ nullable: false })
82
- user_id: number;
83
-
84
- // Request ID - Auto generated
85
- @Column({ type: 'varchar', length: 50, nullable: true, unique: true })
86
- request_id: string | null;
87
-
88
- // User fields from requirements
89
- @Column({ type: 'varchar', length: 255, nullable: false })
90
- name_full_family_name: string;
91
-
92
- @Column({ type: 'varchar', length: 100, nullable: false })
93
- nationality: string;
94
-
95
- @Column({ type: 'date', nullable: false })
96
- dob: Date;
97
-
98
- @Column({ type: 'varchar', length: 255, nullable: false })
99
- place: string;
100
-
101
- @Column({ type: 'varchar', length: 50, nullable: false })
102
- passport_id_card_no: string;
103
-
104
- @Column({
105
- type: "enum",
106
- enum: AirportEntryPermitCategory,
107
- nullable: false,
108
- })
109
- category_of_permit: AirportEntryPermitCategory;
110
-
111
- @Column({ type: 'date', nullable: false })
112
- date_of_submission: Date;
113
-
114
- @Column({ type: 'varchar', length: 20, nullable: false })
115
- phone_number: string;
116
-
117
- @Column({
118
- type: "enum",
119
- enum: AirportEntryPermitLocation,
120
- nullable: false,
121
- })
122
- location: AirportEntryPermitLocation;
123
-
124
- @Column({
125
- type: "enum",
126
- enum: AirportEntryPermitType,
127
- nullable: false,
128
- })
129
- type_of_permit: AirportEntryPermitType;
130
-
131
- @Column({ type: 'time', nullable: true })
132
- temporary_start_time: string | null;
133
-
134
- @Column({ type: 'varchar', length: 100, nullable: true })
135
- temporary_duration: string | null;
136
-
137
- @Column({ type: 'text', array: true, nullable: false })
138
- permission_to_required_areas: AirportEntryPermitArea[];
139
-
140
- @Column({ type: 'text', nullable: true })
141
- attachment_url: string | null;
142
-
143
- @Column({ type: 'text', nullable: false })
144
- details: string;
145
-
146
- @Column({ type: 'varchar', length: 255, nullable: false })
147
- occupation_staff: string;
148
-
149
- // Visitor fields (optional)
150
- @Column({ type: 'text', array: true, nullable: true })
151
- for_visitor: VisitorOption[] | null;
152
-
153
- // Acknowledgement fields (from form checkboxes)
154
- @Column({ type: 'boolean', default: false })
155
- acknowledge_security_policies: boolean;
156
-
157
- @Column({ type: 'boolean', default: false })
158
- acknowledge_disciplinary_action: boolean;
159
-
160
- // Consent fields (for approvers - not in create form)
161
- @Column({ type: 'boolean', default: false })
162
- consent_approve_to_issue_permit: boolean;
163
-
164
- @Column({ type: 'boolean', default: false })
165
- consent_do_not_approve_to_issue_permit: boolean;
166
-
167
- @Column({ type: 'text', nullable: true })
168
- consent_justification: string | null;
169
-
170
- @Column({ type: 'varchar', length: 100, nullable: false })
171
- requested_by: string;
172
-
173
- constructor(
174
- name_full_family_name: string,
175
- nationality: string,
176
- dob: Date,
177
- place: string,
178
- passport_id_card_no: string,
179
- category_of_permit: AirportEntryPermitCategory,
180
- date_of_submission: Date,
181
- phone_number: string,
182
- location: AirportEntryPermitLocation,
183
- type_of_permit: AirportEntryPermitType,
184
- permission_to_required_areas: AirportEntryPermitArea[],
185
- details: string,
186
- occupation_staff: string,
187
- requested_by: string,
188
- user_id: number,
189
- status: AirportEntryPermitStatus = AirportEntryPermitStatus.PENDING,
190
- service_id?: number | null,
191
- sub_service_id?: number | null,
192
- service_type?: string | null,
193
- workflow_execution_id?: string | null,
194
- req_user_department_id?: number | null,
195
- req_user_section_id?: number | null,
196
- attachment_url?: string | null,
197
- temporary_start_time?: string | null,
198
- temporary_duration?: string | null,
199
- for_visitor?: VisitorOption[] | null,
200
- acknowledge_security_policies: boolean = false,
201
- acknowledge_disciplinary_action: boolean = false,
202
- consent_approve_to_issue_permit: boolean = false,
203
- consent_do_not_approve_to_issue_permit: boolean = false,
204
- consent_justification?: string | null,
205
- request_id?: string | null
206
- ) {
207
- super();
208
- this.name_full_family_name = name_full_family_name;
209
- this.nationality = nationality;
210
- this.dob = dob;
211
- this.place = place;
212
- this.passport_id_card_no = passport_id_card_no;
213
- this.category_of_permit = category_of_permit;
214
- this.date_of_submission = date_of_submission;
215
- this.phone_number = phone_number;
216
- this.location = location;
217
- this.type_of_permit = type_of_permit;
218
- this.permission_to_required_areas = permission_to_required_areas;
219
- this.details = details;
220
- this.occupation_staff = occupation_staff;
221
- this.requested_by = requested_by;
222
- this.user_id = user_id;
223
- this.status = status;
224
- this.service_id = service_id ?? null;
225
- this.sub_service_id = sub_service_id ?? null;
226
- this.service_type = service_type ?? null;
227
- this.workflow_execution_id = workflow_execution_id ?? null;
228
- this.req_user_department_id = req_user_department_id ?? null;
229
- this.req_user_section_id = req_user_section_id ?? null;
230
- this.attachment_url = attachment_url ?? null;
231
- this.temporary_start_time = temporary_start_time ?? null;
232
- this.temporary_duration = temporary_duration ?? null;
233
- this.for_visitor = for_visitor ?? null;
234
- this.acknowledge_security_policies = acknowledge_security_policies;
235
- this.acknowledge_disciplinary_action = acknowledge_disciplinary_action;
236
- this.consent_approve_to_issue_permit = consent_approve_to_issue_permit;
237
- this.consent_do_not_approve_to_issue_permit = consent_do_not_approve_to_issue_permit;
238
- this.consent_justification = consent_justification ?? null;
239
- this.request_id = request_id ?? null;
240
- }
241
- }
242
-
@@ -1,42 +0,0 @@
1
- import { Column, Entity } from "typeorm";
2
- import { BaseModel } from './BaseModel';
3
-
4
- export enum AirportEntryPermitWorkFlowStatus {
5
- COMPLETED = "Completed",
6
- NOT_YET_STARTED = "Not Yet Started",
7
- PENDING = "Pending"
8
- }
9
-
10
- @Entity({ name: 'airport_entry_permit_workflows' })
11
- export class AirportEntryPermitWorkFlow extends BaseModel {
12
- @Column({ type: 'integer', nullable: false })
13
- request_id: number;
14
-
15
- @Column({ type: 'integer', nullable: true })
16
- service_id: number | null;
17
-
18
- @Column({ type: 'integer', nullable: true })
19
- sub_service_id: number | null;
20
-
21
- @Column({ type: 'varchar', length: 500, nullable: false })
22
- content: string;
23
-
24
- @Column({ type: 'enum', enum: AirportEntryPermitWorkFlowStatus, default: AirportEntryPermitWorkFlowStatus.NOT_YET_STARTED, nullable: false })
25
- status: AirportEntryPermitWorkFlowStatus;
26
-
27
- constructor(
28
- request_id: number,
29
- content: string,
30
- status: AirportEntryPermitWorkFlowStatus,
31
- service_id?: number,
32
- sub_service_id?: number
33
- ) {
34
- super();
35
- this.request_id = request_id;
36
- this.service_id = service_id || null;
37
- this.sub_service_id = sub_service_id || null;
38
- this.content = content;
39
- this.status = status;
40
- }
41
- }
42
-