@platform-modules/civil-aviation-authority 2.3.248 → 2.3.250

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 (65) hide show
  1. package/.env +10 -10
  2. package/dist/index.d.ts +9 -0
  3. package/dist/index.js +10 -0
  4. package/dist/models/EmployeeSecurityDriveMasterModel.d.ts +13 -0
  5. package/dist/models/EmployeeSecurityDriveMasterModel.js +52 -0
  6. package/dist/models/EmployeeSecurityDriveModel.d.ts +8 -0
  7. package/dist/models/EmployeeSecurityDriveModel.js +37 -0
  8. package/dist/models/EmployeeSecurityFileAccessModel.d.ts +18 -0
  9. package/dist/models/EmployeeSecurityFileAccessModel.js +68 -0
  10. package/dist/models/EmployeeSecurityFileAuditLogModel.d.ts +9 -0
  11. package/dist/models/EmployeeSecurityFileAuditLogModel.js +44 -0
  12. package/dist/models/EmployeeSecurityFileModel.d.ts +18 -0
  13. package/dist/models/EmployeeSecurityFileModel.js +80 -0
  14. package/dist/models/EmployeeSecurityFileTypeModel.d.ts +6 -0
  15. package/dist/models/EmployeeSecurityFileTypeModel.js +32 -0
  16. package/dist/models/EmployeeSecurityFileVersionModel.d.ts +10 -0
  17. package/dist/models/EmployeeSecurityFileVersionModel.js +48 -0
  18. package/dist/models/EmployeeSecurityFolderModel.d.ts +11 -0
  19. package/dist/models/EmployeeSecurityFolderModel.js +52 -0
  20. package/dist/models/ITApprovalSettings.d.ts +7 -0
  21. package/dist/models/ITApprovalSettings.js +40 -0
  22. package/dist/models/ITServicesTypesMuscatModel.d.ts +6 -0
  23. package/dist/models/ITServicesTypesMuscatModel.js +34 -0
  24. package/dist/models/ITServicesTypesSalalahModel.d.ts +6 -0
  25. package/dist/models/ITServicesTypesSalalahModel.js +34 -0
  26. package/dist/models/ServiceSlaApprovalModel.d.ts +6 -0
  27. package/dist/models/ServiceSlaApprovalModel.js +12 -0
  28. package/dist/models/Workflows.d.ts +9 -0
  29. package/dist/models/Workflows.js +31 -0
  30. package/dist/sla/sla-approval-mirror.d.ts +11 -0
  31. package/dist/sla/sla-approval-mirror.js +42 -0
  32. package/dist/sla/sla-table-sync.service.d.ts +3 -0
  33. package/package.json +2 -2
  34. package/src/index.ts +11 -0
  35. package/src/models/AccommodationApprovalModel.ts +8 -8
  36. package/src/models/AccommodationRequestModel.ts +8 -8
  37. package/src/models/AnnualIncrementRequestEmployeeModel.ts +65 -65
  38. package/src/models/AnnualIncrementRequestModel.ts +25 -25
  39. package/src/models/AppealAgainstAdministrativeDecisionRequestModel.ts +23 -23
  40. package/src/models/CAAServices.ts +33 -33
  41. package/src/models/CAASubServices.ts +33 -33
  42. package/src/models/CAIRatingMasterModel.ts +39 -39
  43. package/src/models/CSRMBusinessImpactRatingMasterModel.ts +25 -25
  44. package/src/models/CSRMLikelihoodMasterModel.ts +25 -25
  45. package/src/models/CashAllowanceLeaveRequestModel.ts +11 -11
  46. package/src/models/EmployeeSecurityDriveMasterModel.ts +31 -0
  47. package/src/models/EmployeeSecurityDriveModel.ts +18 -0
  48. package/src/models/EmployeeSecurityFileAccessModel.ts +42 -0
  49. package/src/models/EmployeeSecurityFileAuditLogModel.ts +23 -0
  50. package/src/models/EmployeeSecurityFileModel.ts +50 -0
  51. package/src/models/EmployeeSecurityFileTypeModel.ts +14 -0
  52. package/src/models/EmployeeSecurityFileVersionModel.ts +26 -0
  53. package/src/models/EmployeeSecurityFolderModel.ts +29 -0
  54. package/src/models/HrServiceRequestModel.ts +193 -193
  55. package/src/models/PerformanceCyclePeriodModel.ts +26 -26
  56. package/src/models/PerformanceGoalMasterModel.ts +27 -27
  57. package/src/models/PerformanceManagementRequestGoalModel.ts +46 -46
  58. package/src/models/PerformanceManagementRequestModel.ts +14 -14
  59. package/src/models/PromotionRequestModel.ts +11 -11
  60. package/src/models/RespondToEnquiriesRequestModel.ts +31 -31
  61. package/src/models/ServiceSlaApprovalModel.ts +12 -0
  62. package/src/models/SkillsEnhancementRequestModel.ts +17 -17
  63. package/src/models/UserSkillModel.ts +56 -56
  64. package/src/sla/sla-approval-mirror.ts +56 -0
  65. package/src/sla/sla-table-sync.service.ts +3 -0
@@ -45,12 +45,12 @@ export class PromotionRequest extends BaseModel {
45
45
  @Column({ type: "timestamp", nullable: true })
46
46
  assigned_at: Date | null;
47
47
 
48
- @Column({ type: "varchar", length: 255, nullable: true })
49
- workflow_execution_id: string | null;
50
-
51
- @Column({ type: "varchar", length: 255, nullable: true })
52
- reference_number: string | null;
53
-
48
+ @Column({ type: "varchar", length: 255, nullable: true })
49
+ workflow_execution_id: string | null;
50
+
51
+ @Column({ type: "varchar", length: 255, nullable: true })
52
+ reference_number: string | null;
53
+
54
54
  // Promotion Decision specific fields
55
55
  @Column({ type: "varchar", length: 255, nullable: false })
56
56
  employee_name: string;
@@ -108,11 +108,11 @@ export class PromotionRequest extends BaseModel {
108
108
  this.req_user_position_id = req_user_position_id || null;
109
109
  this.description = description || null;
110
110
  this.reviewer_user_id = reviewer_user_id || null;
111
- this.assigned_to_user_id = assigned_to_user_id || null;
112
- this.assigned_at = assigned_at || null;
113
- this.workflow_execution_id = workflow_execution_id || null;
114
- this.reference_number = null;
115
- this.employee_name = employee_name || "";
111
+ this.assigned_to_user_id = assigned_to_user_id || null;
112
+ this.assigned_at = assigned_at || null;
113
+ this.workflow_execution_id = workflow_execution_id || null;
114
+ this.reference_number = null;
115
+ this.employee_name = employee_name || "";
116
116
  this.employee_id = employee_id || "";
117
117
  this.current_job_title = current_job_title || "";
118
118
  this.proposed_job_title = proposed_job_title || "";
@@ -1,17 +1,17 @@
1
1
  import { Column, Entity } from "typeorm";
2
2
  import { BaseModel } from "./BaseModel";
3
3
 
4
- export enum RespondToEnquiriesRequestStatus {
5
- PENDING = "Pending",
6
- ASSIGNED = "Assigned",
7
- IN_PROGRESS = "In Progress",
8
- COMPLETED = "Completed",
9
- APPROVED = "Approved",
10
- REJECTED = "Rejected"
11
- }
12
-
13
- @Entity({ name: "respond_to_enquiries_requests" })
14
- export class RespondToEnquiriesRequest extends BaseModel {
4
+ export enum RespondToEnquiriesRequestStatus {
5
+ PENDING = "Pending",
6
+ ASSIGNED = "Assigned",
7
+ IN_PROGRESS = "In Progress",
8
+ COMPLETED = "Completed",
9
+ APPROVED = "Approved",
10
+ REJECTED = "Rejected"
11
+ }
12
+
13
+ @Entity({ name: "respond_to_enquiries_requests" })
14
+ export class RespondToEnquiriesRequest extends BaseModel {
15
15
  @Column({ type: "integer", nullable: true })
16
16
  req_user_department_id: number | null;
17
17
 
@@ -65,11 +65,11 @@ export class RespondToEnquiriesRequest extends BaseModel {
65
65
  @Column({ type: "date", nullable: false })
66
66
  date_of_submission: Date;
67
67
 
68
- @Column({ type: "varchar", length: 30, nullable: false })
69
- phone: string;
70
-
71
- @Column({ type: "date", nullable: true })
72
- tender_date_of_submission: Date | null;
68
+ @Column({ type: "varchar", length: 30, nullable: false })
69
+ phone: string;
70
+
71
+ @Column({ type: "date", nullable: true })
72
+ tender_date_of_submission: Date | null;
73
73
 
74
74
  @Column({ type: "varchar", length: 30, nullable: true })
75
75
  tender_phone: string | null;
@@ -101,14 +101,14 @@ export class RespondToEnquiriesRequest extends BaseModel {
101
101
  req_user_department_id?: number | null,
102
102
  req_user_section_id?: number | null,
103
103
  req_user_position_id?: number | null,
104
- reviewer_user_id?: number | null,
105
- assigned_to_user_id?: number | null,
106
- assigned_at?: Date | null,
107
- workflow_execution_id?: string | null,
108
- request_id?: string | null,
109
- tender_date_of_submission?: Date | null,
110
- tender_phone?: string | null,
111
- budget_code?: string | null,
104
+ reviewer_user_id?: number | null,
105
+ assigned_to_user_id?: number | null,
106
+ assigned_at?: Date | null,
107
+ workflow_execution_id?: string | null,
108
+ request_id?: string | null,
109
+ tender_date_of_submission?: Date | null,
110
+ tender_phone?: string | null,
111
+ budget_code?: string | null,
112
112
  estimated_cost?: string | null,
113
113
  implementation_period?: string | null,
114
114
  requesting_entity?: string | null,
@@ -128,13 +128,13 @@ export class RespondToEnquiriesRequest extends BaseModel {
128
128
  this.req_user_position_id = req_user_position_id || null;
129
129
  this.reviewer_user_id = reviewer_user_id || null;
130
130
  this.assigned_to_user_id = assigned_to_user_id || null;
131
- this.assigned_at = assigned_at || null;
132
- this.workflow_execution_id = workflow_execution_id || null;
133
- this.reference_number = null;
134
- this.request_id = request_id || null;
135
- this.tender_date_of_submission = tender_date_of_submission ?? null;
136
- this.tender_phone = tender_phone ?? null;
137
- this.budget_code = budget_code ?? null;
131
+ this.assigned_at = assigned_at || null;
132
+ this.workflow_execution_id = workflow_execution_id || null;
133
+ this.reference_number = null;
134
+ this.request_id = request_id || null;
135
+ this.tender_date_of_submission = tender_date_of_submission ?? null;
136
+ this.tender_phone = tender_phone ?? null;
137
+ this.budget_code = budget_code ?? null;
138
138
  this.estimated_cost = estimated_cost ?? null;
139
139
  this.implementation_period = implementation_period ?? null;
140
140
  this.requesting_entity = requesting_entity ?? null;
@@ -46,6 +46,18 @@ export class ServiceSlaApproval extends BaseModel {
46
46
  @Column({ type: "int", nullable: true })
47
47
  section_id: number | null;
48
48
 
49
+ /** Mirrors native approval `delegate_user_id` (IT master tables may use `delegation_user_id`). */
50
+ @Column({ type: "int", nullable: true })
51
+ delegate_user_id: number | null;
52
+
53
+ /** Mirrors native approval `approved_by` (acting user when status was last resolved). */
54
+ @Column({ type: "int", nullable: true })
55
+ approved_by: number | null;
56
+
57
+ /** Mirrors native approval comment / rejection reason. */
58
+ @Column({ type: "varchar", length: 255, nullable: true })
59
+ comment: string | null;
60
+
49
61
  constructor() {
50
62
  super();
51
63
  }
@@ -68,8 +68,8 @@ export class SkillsEnhancementRequest extends BaseModel {
68
68
  @Column({ type: "varchar", length: 255, nullable: false })
69
69
  issuing_authority: string;
70
70
 
71
- @Column({ type: "text", nullable: true })
72
- skill_summary: string | null;
71
+ @Column({ type: "text", nullable: true })
72
+ skill_summary: string | null;
73
73
 
74
74
  @Column({ type: "text", nullable: true })
75
75
  additional_info_requested: string | null;
@@ -86,13 +86,13 @@ export class SkillsEnhancementRequest extends BaseModel {
86
86
  reviewer_user_id?: number | null,
87
87
  assigned_to_user_id?: number | null,
88
88
  assigned_at?: Date | null,
89
- workflow_execution_id?: string | null,
90
- certification_title?: string,
91
- skill_category?: SkillCategory,
92
- issuing_authority?: string,
93
- skill_summary?: string | null,
94
- additional_info_requested?: string | null
95
- ) {
89
+ workflow_execution_id?: string | null,
90
+ certification_title?: string,
91
+ skill_category?: SkillCategory,
92
+ issuing_authority?: string,
93
+ skill_summary?: string | null,
94
+ additional_info_requested?: string | null
95
+ ) {
96
96
  super();
97
97
  this.user_id = user_id;
98
98
  this.status = status;
@@ -105,11 +105,11 @@ export class SkillsEnhancementRequest extends BaseModel {
105
105
  this.reviewer_user_id = reviewer_user_id || null;
106
106
  this.assigned_to_user_id = assigned_to_user_id || null;
107
107
  this.assigned_at = assigned_at || null;
108
- this.workflow_execution_id = workflow_execution_id || null;
109
- this.certification_title = certification_title || "";
110
- this.skill_category = skill_category || SkillCategory.TECHNICAL;
111
- this.issuing_authority = issuing_authority || "";
112
- this.skill_summary = skill_summary || null;
113
- this.additional_info_requested = additional_info_requested || null;
114
- }
115
- }
108
+ this.workflow_execution_id = workflow_execution_id || null;
109
+ this.certification_title = certification_title || "";
110
+ this.skill_category = skill_category || SkillCategory.TECHNICAL;
111
+ this.issuing_authority = issuing_authority || "";
112
+ this.skill_summary = skill_summary || null;
113
+ this.additional_info_requested = additional_info_requested || null;
114
+ }
115
+ }
@@ -1,56 +1,56 @@
1
- import { Column, Entity } from "typeorm";
2
- import { BaseModel } from "./BaseModel";
3
- import { SkillCategory } from "./SkillsEnhancementRequestModel";
4
-
5
- @Entity({ name: "user_skills" })
6
- export class UserSkill extends BaseModel {
7
- @Column({ type: "integer", nullable: false })
8
- user_id: number;
9
-
10
- @Column({ type: "varchar", length: 255, nullable: false })
11
- skill_name: string;
12
-
13
- @Column({ type: "enum", enum: SkillCategory, nullable: true })
14
- skill_category: SkillCategory | null;
15
-
16
- @Column({ type: "varchar", length: 255, nullable: true })
17
- issuing_authority: string | null;
18
-
19
- @Column({ type: "date", nullable: true })
20
- completion_date: Date | null;
21
-
22
- @Column({ type: "text", nullable: true })
23
- skill_summary: string | null;
24
-
25
- @Column({ type: "integer", nullable: true })
26
- source_request_id: number | null;
27
-
28
- @Column({ type: "varchar", length: 50, nullable: true })
29
- source_request_type: string | null;
30
-
31
- @Column({ type: "boolean", nullable: false, default: true })
32
- is_active: boolean;
33
-
34
- constructor(
35
- user_id: number,
36
- skill_name: string,
37
- skill_category?: SkillCategory | null,
38
- issuing_authority?: string | null,
39
- completion_date?: Date | null,
40
- skill_summary?: string | null,
41
- source_request_id?: number | null,
42
- source_request_type?: string | null,
43
- is_active?: boolean
44
- ) {
45
- super();
46
- this.user_id = user_id;
47
- this.skill_name = skill_name;
48
- this.skill_category = skill_category || null;
49
- this.issuing_authority = issuing_authority || null;
50
- this.completion_date = completion_date || null;
51
- this.skill_summary = skill_summary || null;
52
- this.source_request_id = source_request_id || null;
53
- this.source_request_type = source_request_type || null;
54
- this.is_active = is_active !== undefined ? is_active : true;
55
- }
56
- }
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from "./BaseModel";
3
+ import { SkillCategory } from "./SkillsEnhancementRequestModel";
4
+
5
+ @Entity({ name: "user_skills" })
6
+ export class UserSkill extends BaseModel {
7
+ @Column({ type: "integer", nullable: false })
8
+ user_id: number;
9
+
10
+ @Column({ type: "varchar", length: 255, nullable: false })
11
+ skill_name: string;
12
+
13
+ @Column({ type: "enum", enum: SkillCategory, nullable: true })
14
+ skill_category: SkillCategory | null;
15
+
16
+ @Column({ type: "varchar", length: 255, nullable: true })
17
+ issuing_authority: string | null;
18
+
19
+ @Column({ type: "date", nullable: true })
20
+ completion_date: Date | null;
21
+
22
+ @Column({ type: "text", nullable: true })
23
+ skill_summary: string | null;
24
+
25
+ @Column({ type: "integer", nullable: true })
26
+ source_request_id: number | null;
27
+
28
+ @Column({ type: "varchar", length: 50, nullable: true })
29
+ source_request_type: string | null;
30
+
31
+ @Column({ type: "boolean", nullable: false, default: true })
32
+ is_active: boolean;
33
+
34
+ constructor(
35
+ user_id: number,
36
+ skill_name: string,
37
+ skill_category?: SkillCategory | null,
38
+ issuing_authority?: string | null,
39
+ completion_date?: Date | null,
40
+ skill_summary?: string | null,
41
+ source_request_id?: number | null,
42
+ source_request_type?: string | null,
43
+ is_active?: boolean
44
+ ) {
45
+ super();
46
+ this.user_id = user_id;
47
+ this.skill_name = skill_name;
48
+ this.skill_category = skill_category || null;
49
+ this.issuing_authority = issuing_authority || null;
50
+ this.completion_date = completion_date || null;
51
+ this.skill_summary = skill_summary || null;
52
+ this.source_request_id = source_request_id || null;
53
+ this.source_request_type = source_request_type || null;
54
+ this.is_active = is_active !== undefined ? is_active : true;
55
+ }
56
+ }
@@ -0,0 +1,56 @@
1
+ /** Fields on `sla_approval` mirrored from native service approval tables. */
2
+ export type SlaApprovalMirrorPatch = Partial<{
3
+ delegate_user_id: number | null;
4
+ approved_by: number | null;
5
+ comment: string | null;
6
+ }>;
7
+
8
+ function toIntOrNull(v: unknown): number | null {
9
+ if (v === undefined || v === null || v === "") {
10
+ return null;
11
+ }
12
+ const n = Number(v);
13
+ return Number.isFinite(n) ? n : null;
14
+ }
15
+
16
+ /**
17
+ * Builds mirror patch for `sla_approval` from a native approval row
18
+ * (`delegate_user_id` or IT `delegation_user_id`, `approved_by`, `comment`).
19
+ */
20
+ export function buildSlaApprovalMirror(
21
+ fromNativeRow?: Record<string, unknown> | null,
22
+ overrides?: SlaApprovalMirrorPatch
23
+ ): SlaApprovalMirrorPatch {
24
+ const row = fromNativeRow ?? {};
25
+ const delegate =
26
+ row.delegate_user_id !== undefined
27
+ ? toIntOrNull(row.delegate_user_id)
28
+ : toIntOrNull(row.delegation_user_id);
29
+
30
+ const approvedBy = toIntOrNull(row.approved_by);
31
+ const comment =
32
+ row.comment !== undefined && row.comment !== null
33
+ ? String(row.comment).slice(0, 255)
34
+ : null;
35
+
36
+ const out: SlaApprovalMirrorPatch = {
37
+ delegate_user_id: delegate,
38
+ approved_by: approvedBy,
39
+ comment
40
+ };
41
+
42
+ if (overrides) {
43
+ if (overrides.delegate_user_id !== undefined) {
44
+ out.delegate_user_id = overrides.delegate_user_id;
45
+ }
46
+ if (overrides.approved_by !== undefined) {
47
+ out.approved_by = overrides.approved_by;
48
+ }
49
+ if (overrides.comment !== undefined) {
50
+ out.comment =
51
+ overrides.comment != null ? String(overrides.comment).slice(0, 255) : null;
52
+ }
53
+ }
54
+
55
+ return out;
56
+ }
@@ -9,6 +9,9 @@ export type PatchSlaApprovalTableInput = Partial<{
9
9
  department_id: number | null;
10
10
  section_id: number | null;
11
11
  level: number;
12
+ delegate_user_id: number | null;
13
+ approved_by: number | null;
14
+ comment: string | null;
12
15
  }>;
13
16
 
14
17
  export type PatchSlaRequestTableInput = Partial<{