@platform-modules/civil-aviation-authority 2.3.291 → 2.3.293

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.
@@ -236,6 +236,7 @@ const MaintenanceExternalStationsAttachmentModel_1 = require("./models/Maintenan
236
236
  const MaintenanceExternalStationsChatModel_1 = require("./models/MaintenanceExternalStationsChatModel");
237
237
  const MaintenanceExternalStationsWorkflowModel_1 = require("./models/MaintenanceExternalStationsWorkflowModel");
238
238
  const FollowUpReportRequestModel_1 = require("./models/FollowUpReportRequestModel");
239
+ const FollowUpReportItemModel_1 = require("./models/FollowUpReportItemModel");
239
240
  const FollowUpReportApprovalModel_1 = require("./models/FollowUpReportApprovalModel");
240
241
  const FollowUpReportAttachmentModel_1 = require("./models/FollowUpReportAttachmentModel");
241
242
  const FollowUpReportChatModel_1 = require("./models/FollowUpReportChatModel");
@@ -270,6 +271,7 @@ const ComplaintLostPropertyReportChatModel_1 = require("./models/ComplaintLostPr
270
271
  const ComplaintLostPropertyReportRequestModel_1 = require("./models/ComplaintLostPropertyReportRequestModel");
271
272
  const ComplaintLostPropertyReportWorkflowModel_1 = require("./models/ComplaintLostPropertyReportWorkflowModel");
272
273
  const ContractServiceRequestModel_1 = require("./models/ContractServiceRequestModel");
274
+ const ContractServiceRequestDocumentModel_1 = require("./models/ContractServiceRequestDocumentModel");
273
275
  const CountryMasterModel_1 = require("./models/CountryMasterModel");
274
276
  const CyberSecurityAuditRequestModel_1 = require("./models/CyberSecurityAuditRequestModel");
275
277
  const CyberSecurityRiskManagementRequestModel_1 = require("./models/CyberSecurityRiskManagementRequestModel");
@@ -557,6 +559,7 @@ exports.AppDataSource = new typeorm_1.DataSource({
557
559
  MaintenanceExternalStationsChatModel_1.MaintenanceExternalStationsChat,
558
560
  MaintenanceExternalStationsWorkflowModel_1.MaintenanceExternalStationsWorkFlow,
559
561
  FollowUpReportRequestModel_1.FollowUpReportRequests,
562
+ FollowUpReportItemModel_1.FollowUpReportItem,
560
563
  FollowUpReportApprovalModel_1.FollowUpReportApprovalDetails,
561
564
  FollowUpReportAttachmentModel_1.FollowUpReportAttachment,
562
565
  FollowUpReportChatModel_1.FollowUpReportChat,
@@ -591,6 +594,7 @@ exports.AppDataSource = new typeorm_1.DataSource({
591
594
  ComplaintLostPropertyReportRequestModel_1.ComplaintLostPropertyReportRequest,
592
595
  ComplaintLostPropertyReportWorkflowModel_1.ComplaintLostPropertyReportWorkflow,
593
596
  ContractServiceRequestModel_1.ContractServiceRequest,
597
+ ContractServiceRequestDocumentModel_1.ContractServiceRequestDocument,
594
598
  CountryMasterModel_1.CountryMaster,
595
599
  CyberSecurityAuditRequestModel_1.CyberSecurityAuditRequest,
596
600
  CyberSecurityRiskManagementRequestModel_1.CyberSecurityRiskManagementRequest,
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "request_approval_pending": {
20
20
  "en": "Request Approval Pending",
21
- "ar": "في انتظار الموافقة على الطلب"
21
+ "ar": "الموافقة على الطلب قيد الانتظار"
22
22
  },
23
23
  "request_approval_in_progress_from": {
24
24
  "en": "Request Approval In Progress from {{name}}",
@@ -26,7 +26,7 @@
26
26
  },
27
27
  "request_approval_pending_from": {
28
28
  "en": "Request Approval Pending from {{name}}",
29
- "ar": "في انتظار موافقة {{name}}"
29
+ "ar": "الموافقة على الطلب قيد الانتظار من {{name}}"
30
30
  },
31
31
  "request_approved_by": {
32
32
  "en": "Request Approved by {{name}}{{comment}}",
@@ -40,17 +40,25 @@
40
40
  "en": "Request Approved{{comment}}",
41
41
  "ar": "تمت الموافقة على الطلب{{comment}}"
42
42
  },
43
+ "request_approved_assigned_to_user": {
44
+ "en": "Request Approved: Request assigned to {{assignedUserName}} by {{roleName}} ({{actorUserName}} - {{employeeId}})",
45
+ "ar": "تمت الموافقة على الطلب: تم تعيين الطلب إلى {{assignedUserName}} من قبل {{roleName}} ({{actorUserName}} - {{employeeId}})"
46
+ },
47
+ "request_approved_assigned_to_technician": {
48
+ "en": "Request Approved: Request assigned to technician {{assignedUserName}} by {{roleName}} ({{actorUserName}} - {{employeeId}})",
49
+ "ar": "تمت الموافقة على الطلب: تم تعيين الطلب إلى الفني {{assignedUserName}} من قبل {{roleName}} ({{actorUserName}} - {{employeeId}})"
50
+ },
43
51
  "request_rejected": {
44
52
  "en": "Request Rejected{{comment}}",
45
53
  "ar": "تم رفض الطلب{{comment}}"
46
54
  },
47
55
  "request_returned_for_modification_by": {
48
56
  "en": "Request Returned for Modification by {{name}}{{comment}}",
49
- "ar": "تم إرجاع الطلب للتعديل من قبل {{name}}{{comment}}"
57
+ "ar": "تمت إعادة الطلب للتعديل من قبل {{name}}{{comment}}"
50
58
  },
51
59
  "request_returned_for_modification": {
52
60
  "en": "Request Returned for Modification{{comment}}",
53
- "ar": "تم إرجاع الطلب للتعديل{{comment}}"
61
+ "ar": "تمت إعادة الطلب للتعديل{{comment}}"
54
62
  },
55
63
  "request_closed_by": {
56
64
  "en": "Request Closed by: {{name}}{{comment}}",
@@ -62,77 +70,77 @@
62
70
  },
63
71
  "it_helpdesk_wf_hos_assigned": {
64
72
  "en": "{{approverRoleName}} assigned the request to {{assignedRoleName}}{{comment}}",
65
- "ar": "قام {{approverRoleName}} بتعيين الطلب إلى {{assignedRoleName}}{{comment}}"
73
+ "ar": "تم تعيين الطلب إلى {{assignedRoleName}} من قبل {{approverRoleName}}{{comment}}"
66
74
  },
67
75
  "it_helpdesk_wf_technician_assigned": {
68
76
  "en": "IT technician {{level}} assigned by {{approverRoleName}}{{comment}}",
69
- "ar": "تم تعيين فني IT {{level}} بواسطة {{approverRoleName}}{{comment}}"
77
+ "ar": "تم تعيين فني تقنية المعلومات {{level}} من قبل {{approverRoleName}}{{comment}}"
70
78
  },
71
79
  "it_helpdesk_wf_reassigned_technician": {
72
80
  "en": "{{approverRoleName}} reassigned request to Technician{{comment}}{{modifiers}}",
73
- "ar": "أعاد {{approverRoleName}} تعيين الطلب إلى الفني{{comment}}{{modifiers}}"
81
+ "ar": "{{approverRoleName}} تمت إعادة تعيين الطلب إلى الفني{{comment}}{{modifiers}}"
74
82
  },
75
83
  "it_helpdesk_wf_reassigned_l3": {
76
84
  "en": "{{approverRoleName}} reassigned request to L3{{comment}}{{modifiers}}",
77
- "ar": "أعاد {{approverRoleName}} تعيين الطلب إلى L3{{comment}}{{modifiers}}"
85
+ "ar": "{{approverRoleName}} تمت إعادة تعيين الطلب إلى المستوى الثالث (L3){{comment}}{{modifiers}}"
78
86
  },
79
87
  "it_helpdesk_wf_reassigned_generic": {
80
88
  "en": "{{approverRoleName}} {{level}} reassigned{{comment}}{{modifiers}}",
81
- "ar": "أعاد {{approverRoleName}} {{level}} التعيين{{comment}}{{modifiers}}"
89
+ "ar": "{{approverRoleName}} {{level}} إعادة التعيين{{comment}}{{modifiers}}"
82
90
  },
83
91
  "it_helpdesk_wf_closed_request": {
84
92
  "en": "{{approverRoleName}} closed request{{comment}}",
85
- "ar": "أغلق {{approverRoleName}} الطلب{{comment}}"
93
+ "ar": "تم إغلاق الطلب من قبل {{approverRoleName}}{{comment}}"
86
94
  },
87
95
  "it_helpdesk_wf_closed_request_cap": {
88
96
  "en": "{{approverRoleName}} Closed request{{comment}}",
89
- "ar": "أغلق {{approverRoleName}} الطلب{{comment}}"
97
+ "ar": "تم إغلاق الطلب من قبل {{approverRoleName}}{{comment}}"
90
98
  },
91
99
  "it_helpdesk_wf_l3_approved_by": {
92
100
  "en": "{{roleName}} approved the request by {{userName}}{{comment}}",
93
- "ar": "وافق {{roleName}} على الطلب من قبل {{userName}}{{comment}}"
101
+ "ar": "{{roleName}} تمت الموافقة على الطلب من قبل {{userName}}{{comment}}"
94
102
  },
95
103
  "it_helpdesk_wf_l3_rejected_by": {
96
104
  "en": "{{roleName}} rejected the request by {{userName}}{{comment}}",
97
- "ar": "رفض {{roleName}} على الطلب من قبل {{userName}}{{comment}}"
105
+ "ar": "{{roleName}} تم رفض الطلب من قبل {{userName}}{{comment}}"
98
106
  },
99
107
  "it_helpdesk_wf_level_approved": {
100
108
  "en": "Level {{level}} approved by {{approverRoleName}}{{comment}}",
101
- "ar": "تمت الموافقة على المستوى {{level}} من قبل {{approverRoleName}}{{comment}}"
109
+ "ar": "تمت الموافقة من قبل {{approverRoleName}} للمستوى {{level}}{{comment}}"
102
110
  },
103
111
  "it_helpdesk_wf_rejected": {
104
112
  "en": "{{approverRoleName}} rejected the request{{comment}}",
105
- "ar": "رفض {{approverRoleName}} الطلب{{comment}}"
113
+ "ar": "{{approverRoleName}} تم رفض الطلب{{comment}}"
106
114
  },
107
115
  "it_helpdesk_wf_status_by_role": {
108
116
  "en": "Request {{status}} by {{approverRoleName}}{{comment}}",
109
- "ar": "تم {{statusAr}} الطلب من قبل {{approverRoleName}}{{comment}}"
117
+ "ar": "{{statusAr}} الطلب من قبل {{approverRoleName}}{{comment}}"
110
118
  },
111
119
  "it_helpdesk_wf_l3_step_rejected": {
112
120
  "en": "{{roleName}} rejected the request{{comment}}",
113
- "ar": "رفض {{roleName}} الطلب{{comment}}"
121
+ "ar": "{{roleName}} تم رفض الطلب{{comment}}"
114
122
  },
115
123
  "it_helpdesk_wf_technician_completed": {
116
124
  "en": "Technician action completed - request closed by {{roleName}}{{comment}}",
117
- "ar": "اكتمل إجراء الفني - تم إغلاق الطلب بواسطة {{roleName}}{{comment}}"
125
+ "ar": "تم استكمال إجراء الفني - تم إغلاق الطلب من قبل {{roleName}}{{comment}}"
118
126
  },
119
127
  "it_helpdesk_wf_routing_rejected": {
120
128
  "en": "Workflow routing completed - request rejected at L3{{comment}}",
121
- "ar": "اكتمل توجيه سير العمل - تم رفض الطلب في L3{{comment}}"
129
+ "ar": "تم استكمال مسار سير العمل - تم رفض الطلب في المستوى الثالث (L3){{comment}}"
122
130
  },
123
131
  "it_helpdesk_wf_routing_resolved": {
124
132
  "en": "Workflow routing completed - request resolved at L3",
125
- "ar": "اكتمل توجيه سير العمل - تم حل الطلب في L3"
133
+ "ar": "تم استكمال مسار سير العمل - تم حل الطلب في المستوى الثالث (L3)"
126
134
  }
127
135
  },
128
136
  "chatTemplates": {
129
137
  "request_submitted_by": {
130
138
  "en": "Request Submitted by {{userName}} ({{employeeId}})",
131
- "ar": "تم تقديم الطلب بواسطة {{userName}} ({{employeeId}})"
139
+ "ar": "تم تقديم الطلب من قبل {{userName}} ({{employeeId}})"
132
140
  },
133
141
  "cancellation_submitted_by": {
134
142
  "en": "Cancellation request submitted by {{userName}} ({{employeeId}})",
135
- "ar": "تم تقديم طلب الإلغاء بواسطة {{userName}} ({{employeeId}})"
143
+ "ar": "تم تقديم طلب الإلغاء من قبل {{userName}} ({{employeeId}})"
136
144
  },
137
145
  "cancellation_submitted": {
138
146
  "en": "Cancellation request submitted",
@@ -142,6 +150,10 @@
142
150
  "en": "Request Received",
143
151
  "ar": "تم استلام الطلب"
144
152
  },
153
+ "request_assigned_by_role": {
154
+ "en": "Request assigned by {{roleName}}{{comment}}",
155
+ "ar": "تم تعيين الطلب من قبل {{roleName}}{{comment}}"
156
+ },
145
157
  "request_approved_by_role": {
146
158
  "en": "Request Approved by: {{roleName}}{{comment}}",
147
159
  "ar": "تمت الموافقة على الطلب من قبل: {{roleName}}{{comment}}"
@@ -152,7 +164,7 @@
152
164
  },
153
165
  "request_returned_for_modification_by_role": {
154
166
  "en": "Request Returned for Modification by: {{roleName}}{{comment}}",
155
- "ar": "تم إرجاع الطلب للتعديل من قبل: {{roleName}}{{comment}}"
167
+ "ar": "تمت إعادة الطلب للتعديل من قبل: {{roleName}}{{comment}}"
156
168
  },
157
169
  "request_approved": {
158
170
  "en": "Request Approved{{comment}}",
@@ -164,7 +176,7 @@
164
176
  },
165
177
  "request_returned_for_modification": {
166
178
  "en": "Request Returned for Modification{{comment}}",
167
- "ar": "تم إرجاع الطلب للتعديل{{comment}}"
179
+ "ar": "تمت إعادة الطلب للتعديل{{comment}}"
168
180
  },
169
181
  "request_closed_by_role": {
170
182
  "en": "Request Closed by: {{roleName}}{{comment}}",
@@ -172,11 +184,11 @@
172
184
  },
173
185
  "request_for_change_by_role": {
174
186
  "en": "Request For Change by: {{roleName}}{{comment}}",
175
- "ar": "طلب تعديل من قبل: {{roleName}}{{comment}}"
187
+ "ar": "طلب تغيير من قبل: {{roleName}}{{comment}}"
176
188
  },
177
189
  "request_for_change_requested_by_role": {
178
190
  "en": "Request For Change requested by: {{roleName}}{{comment}}",
179
- "ar": "تم طلب التعديل من قبل: {{roleName}}{{comment}}"
191
+ "ar": "تم طلب التغيير من قبل: {{roleName}}{{comment}}"
180
192
  },
181
193
  "attachment_uploaded": {
182
194
  "en": "Attachment uploaded: {{fileName}}",
@@ -188,11 +200,11 @@
188
200
  },
189
201
  "task_status_in_progress_by_role": {
190
202
  "en": "Task status updated to \"In Progress\" by: {{roleName}}",
191
- "ar": "تم تحديث حالة المهمة إلى \"قيد التنفيذ\" بواسطة: {{roleName}}"
203
+ "ar": "تم تحديث حالة المهمة إلى \"قيد التنفيذ\" من قبل: {{roleName}}"
192
204
  },
193
205
  "task_completed_by_role": {
194
206
  "en": "Task Completed by: {{roleName}}{{comment}}",
195
- "ar": "تم إكمال المهمة بواسطة: {{roleName}}{{comment}}"
207
+ "ar": "اكتملت المهمة من قبل: {{roleName}}{{comment}}"
196
208
  },
197
209
  "task_status_updated": {
198
210
  "en": "Task status updated to {{status}}",
@@ -204,23 +216,23 @@
204
216
  },
205
217
  "it_helpdesk_technician_assigned": {
206
218
  "en": "IT technician {{level}} assigned to {{assignedRoleName}}: {{assignedUserName}}{{comment}}",
207
- "ar": "تم تعيين فني IT {{level}} إلى {{assignedRoleName}}: {{assignedUserName}}{{comment}}"
219
+ "ar": "تم تعيين فني تقنية المعلومات {{level}} إلى {{assignedRoleName}}: {{assignedUserName}}{{comment}}"
208
220
  },
209
221
  "it_helpdesk_reassigned_to_role": {
210
222
  "en": "{{approverRoleName}} reassigned request to {{reassignedRoleName}}{{comment}}",
211
- "ar": "أعاد {{approverRoleName}} تعيين الطلب إلى {{reassignedRoleName}}{{comment}}"
223
+ "ar": "{{approverRoleName}} تمت إعادة تعيين الطلب إلى {{reassignedRoleName}}{{comment}}"
212
224
  },
213
225
  "it_helpdesk_reassigned_to_l3": {
214
226
  "en": "{{approverRoleName}} reassigned request to L3{{comment}}",
215
- "ar": "أعاد {{approverRoleName}} تعيين الطلب إلى L3{{comment}}"
227
+ "ar": "{{approverRoleName}} تمت إعادة تعيين الطلب إلى المستوى الثالث (L3){{comment}}"
216
228
  },
217
229
  "it_helpdesk_reassigned_generic": {
218
230
  "en": "{{approverRoleName}} {{level}} reassigned the request{{comment}}",
219
- "ar": "أعاد {{approverRoleName}} {{level}} تعيين الطلب{{comment}}"
231
+ "ar": "{{approverRoleName}} {{level}} تمت إعادة تعيين الطلب{{comment}}"
220
232
  },
221
233
  "request_submitted_with_ref": {
222
234
  "en": "{{requestLabel}} #{{requestId}} has been submitted by {{userName}} ({{employeeId}})",
223
- "ar": "تم تقديم {{requestLabel}} رقم {{requestId}} بواسطة {{userName}} ({{employeeId}})"
235
+ "ar": "تم تقديم {{requestLabel}} رقم {{requestId}} من قبل {{userName}} ({{employeeId}})"
224
236
  },
225
237
  "security_access_approval_step": {
226
238
  "en": "{{productLabel}} request #{{requestId}} was {{statusWord}} (approval step {{approvalLevel}}).{{comment}}",
@@ -228,7 +240,7 @@
228
240
  },
229
241
  "logistics_actual_return_updated": {
230
242
  "en": "{{roleName}} updated the Vehicle Actual Return Date, Time, and Reason. Actual Return Date: {{date}}, Actual Return Time: {{time}}, Reason: {{reason}}",
231
- "ar": "قام {{roleName}} بتحديث تاريخ ووقت وسبب الإرجاع الفعلي للمركبة. تاريخ الإرجاع الفعلي: {{date}}، وقت الإرجاع الفعلي: {{time}}، السبب: {{reason}}"
243
+ "ar": "قام {{roleName}} بتحديث تاريخ الإرجاع الفعلي للمركبة والوقت والسبب. تاريخ الإرجاع الفعلي: {{date}}، وقت الإرجاع الفعلي: {{time}}، السبب: {{reason}}"
232
244
  }
233
245
  },
234
246
  "notificationTemplates": {
@@ -238,11 +250,11 @@
238
250
  },
239
251
  "it_helpdesk_notif_request_closed": {
240
252
  "en": "IT request #{{requestId}} has been closed",
241
- "ar": "تم إغلاق طلب IT رقم {{requestId}}"
253
+ "ar": "تم إغلاق طلب تقنية المعلومات رقم {{requestId}}"
242
254
  },
243
255
  "it_helpdesk_notif_request_rejected": {
244
256
  "en": "IT request #{{requestId}} has been rejected",
245
- "ar": "تم رفض طلب IT رقم {{requestId}}"
257
+ "ar": "تم رفض طلب تقنية المعلومات رقم {{requestId}}"
246
258
  }
247
259
  },
248
260
  "workflowStatusLabels": {
@@ -253,15 +265,15 @@
253
265
  "chatStatusLabels": {
254
266
  "Submitted": "تم التقديم",
255
267
  "Received": "تم الاستلام",
256
- "Approved": "موافق عليه",
257
- "Rejected": "مرفوض",
268
+ "Approved": "تم الموافقة",
269
+ "Rejected": "تم الرفض",
258
270
  "Pending": "قيد الانتظار",
259
- "Returned for Modification": "أُعيد للتعديل",
260
- "Request For Change": "طلب تعديل",
271
+ "Returned for Modification": "تمت إعادته للتعديل",
272
+ "Request For Change": "طلب تغيير",
261
273
  "Closed": "مغلق",
262
274
  "Completed": "مكتمل",
263
- "Assigned": "معيّن",
264
- "Reassigned": "أعيد التعيين",
275
+ "Assigned": "تم التعيين",
276
+ "Reassigned": "تمت إعادة التعيين",
265
277
  "In Progress": "قيد التنفيذ",
266
278
  "Attachment uploaded": "تم رفع المرفق"
267
279
  }
@@ -69,6 +69,18 @@ export declare function buildSynchronizedWorkflowMessage(ctx: WorkflowMessageCon
69
69
  * Use for every chat insert/update across all CAA modules.
70
70
  */
71
71
  export declare function buildSynchronizedChatMessage(ctx: ChatMessageContext): BilingualText;
72
+ export type RequestApprovedAssignedWorkflowParams = {
73
+ assignedUserName: string;
74
+ roleName: string;
75
+ roleArabicName?: string | null;
76
+ actorUserName: string;
77
+ employeeId: string | number;
78
+ assigneeLabel?: 'user' | 'technician';
79
+ };
80
+ /** Parse legacy English-only assignment comments used as workflow log suffixes. */
81
+ export declare function tryParseRequestAssignedComment(comment?: string | null): Omit<RequestApprovedAssignedWorkflowParams, 'roleArabicName'> | null;
82
+ /** Bilingual workflow content for approved assignment steps (HR, IT, Tender, etc.). */
83
+ export declare function buildRequestApprovedAssignedWorkflowFields(params: RequestApprovedAssignedWorkflowParams): BilingualText;
72
84
  /** Standard workflow log UPDATE fields for all CAA module repositories. */
73
85
  export declare function buildWorkflowLogUpdateFields(params: {
74
86
  approvalStatus: string;
@@ -96,6 +108,13 @@ export declare function toChatPersistFields(bilingual: BilingualText, status: st
96
108
  status: string;
97
109
  status_ar: string | null;
98
110
  };
111
+ /** User-typed chat — never auto-translate; message_ar stays null. */
112
+ export declare function buildUserEnteredChatPersistFields(message: string, status: string): {
113
+ message: string;
114
+ message_ar: null;
115
+ status: string;
116
+ status_ar: string | null;
117
+ };
99
118
  export declare function buildApprovalWorkflowContent(params: {
100
119
  status: 'Approved' | 'Rejected' | 'Returned for Modification' | 'Pending' | string;
101
120
  roleName?: string | null;
@@ -272,6 +291,8 @@ export declare function resolveChatStatusAr(status: string | null | undefined):
272
291
  export declare function extractBilingualActorsFromRecord(record: Record<string, unknown>): BilingualActorNames;
273
292
  export declare function resolveWorkflowContentAr(content: string | null | undefined, actors?: BilingualActorNames): string | null;
274
293
  export declare function resolveChatMessageAr(message: string | null | undefined, actors?: BilingualActorNames): string | null;
294
+ /** True when message matches a known system chat template (safe to resolve message_ar). */
295
+ export declare function isSystemGeneratedChatMessage(message: string | null | undefined, actors?: BilingualActorNames): boolean;
275
296
  /** Generic workflow log enricher — use in all module repositories. */
276
297
  export declare function enrichWorkflowLog(log: Record<string, unknown>): Record<string, unknown>;
277
298
  /** Generic chat enricher — use in all module repositories. */