@platform-modules/civil-aviation-authority 2.3.310 → 2.3.312
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/dist/data-source.js +2 -0
- package/dist/i18n/workflow-chat-i18n.json +8 -0
- package/dist/i18n/workflow-chat-message.builder.d.ts +1 -1
- package/dist/i18n/workflow-chat-message.builder.js +21 -3
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/models/ChatbotQnsAnsMappingModel.d.ts +8 -0
- package/dist/models/ChatbotQnsAnsMappingModel.js +40 -0
- package/dist/models/DocumentMetadataModel.d.ts +45 -0
- package/dist/models/DocumentMetadataModel.js +171 -0
- package/dist/models/DocumentationDepartmentsModel.d.ts +13 -0
- package/dist/models/DocumentationDepartmentsModel.js +53 -0
- package/dist/models/FolderModel.d.ts +16 -0
- package/dist/models/FolderModel.js +85 -0
- package/dist/models/ImportExportMaterialModels.d.ts +92 -0
- package/dist/models/ImportExportMaterialModels.js +307 -0
- package/dist/models/PermissionModel.d.ts +18 -0
- package/dist/models/PermissionModel.js +68 -0
- package/dist/models/SecurityAccessApprovalModel.d.ts +23 -0
- package/dist/models/SecurityAccessApprovalModel.js +82 -0
- package/dist/models/SecurityAccessAttachmentModel.d.ts +12 -0
- package/dist/models/SecurityAccessAttachmentModel.js +56 -0
- package/dist/models/SecurityAccessChatModel.d.ts +12 -0
- package/dist/models/SecurityAccessChatModel.js +56 -0
- package/dist/models/SecurityAccessRequestModel.d.ts +25 -0
- package/dist/models/SecurityAccessRequestModel.js +80 -0
- package/dist/models/SecurityAccessWorkflowModel.d.ts +24 -0
- package/dist/models/SecurityAccessWorkflowModel.js +84 -0
- package/dist/models/ServiceExtensionAfterAge60Models.d.ts +93 -0
- package/dist/models/ServiceExtensionAfterAge60Models.js +312 -0
- package/dist/models/SlaApprovalsViewModel.js +54 -47
- package/dist/models/SlaMyRequestsViewModel.d.ts +3 -0
- package/dist/models/SlaMyRequestsViewModel.js +22 -2
- package/dist/models/UUIDBaseModel.d.ts +14 -0
- package/dist/models/UUIDBaseModel.js +66 -0
- package/dist/models/WorkingHoursExtensionModels.d.ts +88 -0
- package/dist/models/WorkingHoursExtensionModels.js +295 -0
- package/package.json +1 -1
- package/scripts/sync-sla-reports-sql.js +92 -92
- package/sql/README.md +21 -21
- package/sql/create_chatbot_qns_ans_mapping.sql +25 -0
- package/sql/sla_reports_admin_procedures.sql +323 -304
- package/sql/sla_reports_approvals_workbook.sql +430 -383
- package/sql/sla_reports_procedures.sql +886 -886
- package/sql/user_role_department_section_validation.sql +214 -0
- package/sql/vw_sla_approvals.sql +115 -108
- package/sql/vw_sla_my_requests.sql +58 -53
- package/src/data-source.ts +2 -0
- package/src/i18n/workflow-chat-i18n.json +8 -0
- package/src/i18n/workflow-chat-message.builder.ts +27 -3
- package/src/index.ts +1 -0
- package/src/models/AccessCardRequestModel.ts +135 -135
- package/src/models/AirportEntryPermitModel.ts +276 -276
- package/src/models/AnnualTrainingPlanRequestModel.ts +153 -153
- package/src/models/ChatbotQnsAnsMappingModel.ts +21 -0
- package/src/models/DocumentDriveModel.ts +28 -28
- package/src/models/DocumentFolderModel.ts +45 -45
- package/src/models/HotelApprovalModel.ts +83 -83
- package/src/models/HousingContractCancelApprovalModel.ts +64 -64
- package/src/models/HousingContractRenewalApprovalModel.ts +64 -64
- package/src/models/ITRequestAttachmentModel.ts +73 -73
- package/src/models/ItApprovalsModel.ts +84 -84
- package/src/models/LegalConsultationApprovalModel.ts +65 -65
- package/src/models/MissionTravelPassportExpiryNotificationConfigModel.ts +36 -36
- package/src/models/NotificationModel.ts +89 -89
- package/src/models/ResidentialUnitRentalApprovalModel.ts +143 -143
- package/src/models/ServiceExtensionAfter60ApprovalModel.ts +87 -87
- package/src/models/ServiceSlaApprovalModel.ts +64 -64
- package/src/models/ServicesNotificationConfigModel.ts +55 -55
- package/src/models/SlaApprovalsViewModel.ts +142 -135
- package/src/models/SlaMyRequestsViewModel.ts +21 -1
- package/src/models/StudyLeaveRequestModel.ts +144 -144
- package/src/models/TrainingRequestModel.ts +164 -164
- package/src/models/TrainingRoomBookingRequestModel.ts +142 -142
- package/src/models/TrainingRoomNotificationConfigModel.ts +30 -30
- package/src/models/role.ts +34 -34
- package/src/sla/sla-table-sync.service.ts +90 -90
- package/dist/helpers/cancellation-bilingual-persist.helper.d.ts +0 -37
- package/dist/helpers/cancellation-bilingual-persist.helper.js +0 -77
package/src/models/role.ts
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
/** *
|
|
2
|
-
@author
|
|
3
|
-
Amnet Digital
|
|
4
|
-
@date
|
|
5
|
-
2024-05-20
|
|
6
|
-
@Model
|
|
7
|
-
Role
|
|
8
|
-
@usage
|
|
9
|
-
Userrole Information will store
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
import { Column, Entity } from "typeorm";
|
|
13
|
-
import { BaseModel } from './BaseModel';
|
|
14
|
-
|
|
15
|
-
@Entity({ name: 'role' })
|
|
16
|
-
export class Role extends BaseModel {
|
|
17
|
-
|
|
18
|
-
@Column({ nullable: true })
|
|
19
|
-
name: string;
|
|
20
|
-
|
|
21
|
-
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
22
|
-
arabic_name: string | null;
|
|
23
|
-
|
|
24
|
-
@Column({ nullable: true })
|
|
25
|
-
is_deleted?: boolean;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
constructor(name: string, is_deleted: boolean, arabic_name: string | null = null) {
|
|
29
|
-
super();
|
|
30
|
-
this.name = name;
|
|
31
|
-
this.is_deleted = is_deleted;
|
|
32
|
-
this.arabic_name = arabic_name;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
1
|
+
/** *
|
|
2
|
+
@author
|
|
3
|
+
Amnet Digital
|
|
4
|
+
@date
|
|
5
|
+
2024-05-20
|
|
6
|
+
@Model
|
|
7
|
+
Role
|
|
8
|
+
@usage
|
|
9
|
+
Userrole Information will store
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import { Column, Entity } from "typeorm";
|
|
13
|
+
import { BaseModel } from './BaseModel';
|
|
14
|
+
|
|
15
|
+
@Entity({ name: 'role' })
|
|
16
|
+
export class Role extends BaseModel {
|
|
17
|
+
|
|
18
|
+
@Column({ nullable: true })
|
|
19
|
+
name: string;
|
|
20
|
+
|
|
21
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
22
|
+
arabic_name: string | null;
|
|
23
|
+
|
|
24
|
+
@Column({ nullable: true })
|
|
25
|
+
is_deleted?: boolean;
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
constructor(name: string, is_deleted: boolean, arabic_name: string | null = null) {
|
|
29
|
+
super();
|
|
30
|
+
this.name = name;
|
|
31
|
+
this.is_deleted = is_deleted;
|
|
32
|
+
this.arabic_name = arabic_name;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -1,90 +1,90 @@
|
|
|
1
|
-
import { EntityManager } from "typeorm";
|
|
2
|
-
import { ServiceSlaApproval } from "../models/ServiceSlaApprovalModel";
|
|
3
|
-
import { SlaRequest, SlaRequestStatus } from "../models/SlaRequestModel";
|
|
4
|
-
|
|
5
|
-
export type PatchSlaApprovalTableInput = Partial<{
|
|
6
|
-
approval_status: string;
|
|
7
|
-
approver_user_id: number | null;
|
|
8
|
-
approver_role_id: number | null;
|
|
9
|
-
department_id: number | null;
|
|
10
|
-
section_id: number | null;
|
|
11
|
-
level: number;
|
|
12
|
-
delegate_user_id: number | null;
|
|
13
|
-
approved_by: number | null;
|
|
14
|
-
comment: string | null;
|
|
15
|
-
}>;
|
|
16
|
-
|
|
17
|
-
export type PatchSlaRequestTableInput = Partial<{
|
|
18
|
-
status: SlaRequestStatus | string;
|
|
19
|
-
workflow_execution_id: string | null;
|
|
20
|
-
}>;
|
|
21
|
-
|
|
22
|
-
function stripUndefined<T extends Record<string, unknown>>(obj: T): Partial<T> {
|
|
23
|
-
const out: Partial<T> = {};
|
|
24
|
-
for (const key of Object.keys(obj)) {
|
|
25
|
-
const v = obj[key];
|
|
26
|
-
if (v !== undefined) {
|
|
27
|
-
(out as Record<string, unknown>)[key] = v;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
return out;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* TypeORM patches for `sla_approval` and `sla_requests` by the keys used at insert time
|
|
35
|
-
* (`source_approval_id` and native `request_id`). Safe to call from any service that shares the DB;
|
|
36
|
-
* failures are swallowed so missing SLA rows never block business transactions.
|
|
37
|
-
*/
|
|
38
|
-
export class SlaTableSyncService {
|
|
39
|
-
static async patchSlaApprovalBySourceApprovalId(
|
|
40
|
-
manager: EntityManager,
|
|
41
|
-
sourceApprovalId: number,
|
|
42
|
-
patch: PatchSlaApprovalTableInput,
|
|
43
|
-
updatedBy?: number | null
|
|
44
|
-
): Promise<void> {
|
|
45
|
-
if (!Number.isFinite(sourceApprovalId)) {
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
try {
|
|
49
|
-
const setPayload: Record<string, unknown> = {
|
|
50
|
-
...stripUndefined(patch as Record<string, unknown>),
|
|
51
|
-
updated_at: new Date()
|
|
52
|
-
};
|
|
53
|
-
if (updatedBy != null) {
|
|
54
|
-
setPayload.updated_by = updatedBy;
|
|
55
|
-
}
|
|
56
|
-
await manager.getRepository(ServiceSlaApproval).update(
|
|
57
|
-
{ source_approval_id: sourceApprovalId, is_deleted: false },
|
|
58
|
-
setPayload as any
|
|
59
|
-
);
|
|
60
|
-
} catch {
|
|
61
|
-
// non-fatal
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
static async patchSlaRequestByNativeRequestId(
|
|
66
|
-
manager: EntityManager,
|
|
67
|
-
nativeRequestId: number,
|
|
68
|
-
patch: PatchSlaRequestTableInput,
|
|
69
|
-
updatedBy?: number | null
|
|
70
|
-
): Promise<void> {
|
|
71
|
-
if (!Number.isFinite(nativeRequestId) || nativeRequestId < 1) {
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
try {
|
|
75
|
-
const setPayload: Record<string, unknown> = {
|
|
76
|
-
...stripUndefined(patch as Record<string, unknown>),
|
|
77
|
-
updated_at: new Date()
|
|
78
|
-
};
|
|
79
|
-
if (updatedBy != null) {
|
|
80
|
-
setPayload.updated_by = updatedBy;
|
|
81
|
-
}
|
|
82
|
-
await manager.getRepository(SlaRequest).update(
|
|
83
|
-
{ request_id: nativeRequestId, is_deleted: false },
|
|
84
|
-
setPayload as any
|
|
85
|
-
);
|
|
86
|
-
} catch {
|
|
87
|
-
// non-fatal
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
1
|
+
import { EntityManager } from "typeorm";
|
|
2
|
+
import { ServiceSlaApproval } from "../models/ServiceSlaApprovalModel";
|
|
3
|
+
import { SlaRequest, SlaRequestStatus } from "../models/SlaRequestModel";
|
|
4
|
+
|
|
5
|
+
export type PatchSlaApprovalTableInput = Partial<{
|
|
6
|
+
approval_status: string;
|
|
7
|
+
approver_user_id: number | null;
|
|
8
|
+
approver_role_id: number | null;
|
|
9
|
+
department_id: number | null;
|
|
10
|
+
section_id: number | null;
|
|
11
|
+
level: number;
|
|
12
|
+
delegate_user_id: number | null;
|
|
13
|
+
approved_by: number | null;
|
|
14
|
+
comment: string | null;
|
|
15
|
+
}>;
|
|
16
|
+
|
|
17
|
+
export type PatchSlaRequestTableInput = Partial<{
|
|
18
|
+
status: SlaRequestStatus | string;
|
|
19
|
+
workflow_execution_id: string | null;
|
|
20
|
+
}>;
|
|
21
|
+
|
|
22
|
+
function stripUndefined<T extends Record<string, unknown>>(obj: T): Partial<T> {
|
|
23
|
+
const out: Partial<T> = {};
|
|
24
|
+
for (const key of Object.keys(obj)) {
|
|
25
|
+
const v = obj[key];
|
|
26
|
+
if (v !== undefined) {
|
|
27
|
+
(out as Record<string, unknown>)[key] = v;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return out;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* TypeORM patches for `sla_approval` and `sla_requests` by the keys used at insert time
|
|
35
|
+
* (`source_approval_id` and native `request_id`). Safe to call from any service that shares the DB;
|
|
36
|
+
* failures are swallowed so missing SLA rows never block business transactions.
|
|
37
|
+
*/
|
|
38
|
+
export class SlaTableSyncService {
|
|
39
|
+
static async patchSlaApprovalBySourceApprovalId(
|
|
40
|
+
manager: EntityManager,
|
|
41
|
+
sourceApprovalId: number,
|
|
42
|
+
patch: PatchSlaApprovalTableInput,
|
|
43
|
+
updatedBy?: number | null
|
|
44
|
+
): Promise<void> {
|
|
45
|
+
if (!Number.isFinite(sourceApprovalId)) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
try {
|
|
49
|
+
const setPayload: Record<string, unknown> = {
|
|
50
|
+
...stripUndefined(patch as Record<string, unknown>),
|
|
51
|
+
updated_at: new Date()
|
|
52
|
+
};
|
|
53
|
+
if (updatedBy != null) {
|
|
54
|
+
setPayload.updated_by = updatedBy;
|
|
55
|
+
}
|
|
56
|
+
await manager.getRepository(ServiceSlaApproval).update(
|
|
57
|
+
{ source_approval_id: sourceApprovalId, is_deleted: false },
|
|
58
|
+
setPayload as any
|
|
59
|
+
);
|
|
60
|
+
} catch {
|
|
61
|
+
// non-fatal
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
static async patchSlaRequestByNativeRequestId(
|
|
66
|
+
manager: EntityManager,
|
|
67
|
+
nativeRequestId: number,
|
|
68
|
+
patch: PatchSlaRequestTableInput,
|
|
69
|
+
updatedBy?: number | null
|
|
70
|
+
): Promise<void> {
|
|
71
|
+
if (!Number.isFinite(nativeRequestId) || nativeRequestId < 1) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
try {
|
|
75
|
+
const setPayload: Record<string, unknown> = {
|
|
76
|
+
...stripUndefined(patch as Record<string, unknown>),
|
|
77
|
+
updated_at: new Date()
|
|
78
|
+
};
|
|
79
|
+
if (updatedBy != null) {
|
|
80
|
+
setPayload.updated_by = updatedBy;
|
|
81
|
+
}
|
|
82
|
+
await manager.getRepository(SlaRequest).update(
|
|
83
|
+
{ request_id: nativeRequestId, is_deleted: false },
|
|
84
|
+
setPayload as any
|
|
85
|
+
);
|
|
86
|
+
} catch {
|
|
87
|
+
// non-fatal
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import type { EntityManager } from 'typeorm';
|
|
2
|
-
import { CancellationMessageType } from '../models/CancellationChatModel';
|
|
3
|
-
import { CancellationWorkFlowStatus } from '../models/CancellationWorkflowModel';
|
|
4
|
-
export type CancellationWorkflowRowInput = {
|
|
5
|
-
request_id: number;
|
|
6
|
-
service_id?: number | null;
|
|
7
|
-
sub_service_id?: number | null;
|
|
8
|
-
content: string;
|
|
9
|
-
content_ar?: string | null;
|
|
10
|
-
status: CancellationWorkFlowStatus;
|
|
11
|
-
status_ar?: string | null;
|
|
12
|
-
user_id?: number | null;
|
|
13
|
-
role_id?: number | null;
|
|
14
|
-
department_id?: number | null;
|
|
15
|
-
section_id?: number | null;
|
|
16
|
-
step_order?: number | null;
|
|
17
|
-
created_by?: number | null;
|
|
18
|
-
};
|
|
19
|
-
export type CancellationChatRowInput = {
|
|
20
|
-
request_id: number;
|
|
21
|
-
service_id?: number | null;
|
|
22
|
-
sub_service_id?: number | null;
|
|
23
|
-
user_id: number;
|
|
24
|
-
role_id?: number | null;
|
|
25
|
-
message: string;
|
|
26
|
-
message_ar?: string | null;
|
|
27
|
-
messageType?: CancellationMessageType;
|
|
28
|
-
status?: string | null;
|
|
29
|
-
status_ar?: string | null;
|
|
30
|
-
created_by?: number | string | null;
|
|
31
|
-
};
|
|
32
|
-
/** Force-persist Arabic workflow columns (guards against stale TypeORM entity metadata). */
|
|
33
|
-
export declare function patchCancellationWorkflowArabic(manager: EntityManager, workflowId: number, contentAr: string | null, statusAr: string | null): Promise<void>;
|
|
34
|
-
/** Force-persist Arabic chat columns (guards against stale TypeORM entity metadata). */
|
|
35
|
-
export declare function patchCancellationChatArabic(manager: EntityManager, chatId: number, messageAr: string | null, statusAr: string | null): Promise<void>;
|
|
36
|
-
export declare function insertCancellationWorkflowRow(manager: EntityManager, input: CancellationWorkflowRowInput): Promise<number>;
|
|
37
|
-
export declare function insertCancellationChatRow(manager: EntityManager, input: CancellationChatRowInput): Promise<number>;
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.patchCancellationWorkflowArabic = patchCancellationWorkflowArabic;
|
|
4
|
-
exports.patchCancellationChatArabic = patchCancellationChatArabic;
|
|
5
|
-
exports.insertCancellationWorkflowRow = insertCancellationWorkflowRow;
|
|
6
|
-
exports.insertCancellationChatRow = insertCancellationChatRow;
|
|
7
|
-
const CancellationChatModel_1 = require("../models/CancellationChatModel");
|
|
8
|
-
const CancellationWorkflowModel_1 = require("../models/CancellationWorkflowModel");
|
|
9
|
-
const workflow_chat_i18n_1 = require("../i18n/workflow-chat-i18n");
|
|
10
|
-
function resolveWorkflowRowId(insertResult) {
|
|
11
|
-
const id = insertResult.raw?.[0]?.id ?? insertResult.identifiers?.[0]?.id;
|
|
12
|
-
if (!id) {
|
|
13
|
-
throw new Error('Failed to insert cancellation workflow row');
|
|
14
|
-
}
|
|
15
|
-
return id;
|
|
16
|
-
}
|
|
17
|
-
function resolveChatRowId(insertResult) {
|
|
18
|
-
const id = insertResult.raw?.[0]?.id ?? insertResult.identifiers?.[0]?.id;
|
|
19
|
-
if (!id) {
|
|
20
|
-
throw new Error('Failed to insert cancellation chat row');
|
|
21
|
-
}
|
|
22
|
-
return id;
|
|
23
|
-
}
|
|
24
|
-
/** Force-persist Arabic workflow columns (guards against stale TypeORM entity metadata). */
|
|
25
|
-
async function patchCancellationWorkflowArabic(manager, workflowId, contentAr, statusAr) {
|
|
26
|
-
await manager.query(`UPDATE cancellation_workflows
|
|
27
|
-
SET content_ar = $1,
|
|
28
|
-
status_ar = $2,
|
|
29
|
-
updated_at = CURRENT_TIMESTAMP
|
|
30
|
-
WHERE id = $3`, [contentAr, statusAr, workflowId]);
|
|
31
|
-
}
|
|
32
|
-
/** Force-persist Arabic chat columns (guards against stale TypeORM entity metadata). */
|
|
33
|
-
async function patchCancellationChatArabic(manager, chatId, messageAr, statusAr) {
|
|
34
|
-
await manager.query(`UPDATE cancellation_chats
|
|
35
|
-
SET message_ar = $1,
|
|
36
|
-
status_ar = $2,
|
|
37
|
-
updated_at = CURRENT_TIMESTAMP
|
|
38
|
-
WHERE id = $3`, [messageAr, statusAr, chatId]);
|
|
39
|
-
}
|
|
40
|
-
async function insertCancellationWorkflowRow(manager, input) {
|
|
41
|
-
const contentAr = input.content_ar ?? null;
|
|
42
|
-
const statusAr = input.status_ar ?? (0, workflow_chat_i18n_1.resolveWorkflowStatusAr)(input.status);
|
|
43
|
-
const insertResult = await manager
|
|
44
|
-
.createQueryBuilder()
|
|
45
|
-
.insert()
|
|
46
|
-
.into(CancellationWorkflowModel_1.CancellationWorkFlow)
|
|
47
|
-
.values({
|
|
48
|
-
...input,
|
|
49
|
-
content_ar: contentAr,
|
|
50
|
-
status_ar: statusAr,
|
|
51
|
-
})
|
|
52
|
-
.returning('id')
|
|
53
|
-
.execute();
|
|
54
|
-
const id = resolveWorkflowRowId(insertResult);
|
|
55
|
-
await patchCancellationWorkflowArabic(manager, id, contentAr, statusAr);
|
|
56
|
-
return id;
|
|
57
|
-
}
|
|
58
|
-
async function insertCancellationChatRow(manager, input) {
|
|
59
|
-
const messageAr = input.message_ar ?? null;
|
|
60
|
-
const statusAr = input.status_ar ?? (0, workflow_chat_i18n_1.resolveChatStatusAr)(input.status ?? null);
|
|
61
|
-
const messageType = input.messageType ?? CancellationChatModel_1.CancellationMessageType.TEXT;
|
|
62
|
-
const insertResult = await manager
|
|
63
|
-
.createQueryBuilder()
|
|
64
|
-
.insert()
|
|
65
|
-
.into(CancellationChatModel_1.CancellationRequestChat)
|
|
66
|
-
.values({
|
|
67
|
-
...input,
|
|
68
|
-
message_ar: messageAr,
|
|
69
|
-
status_ar: statusAr,
|
|
70
|
-
messageType,
|
|
71
|
-
})
|
|
72
|
-
.returning('id')
|
|
73
|
-
.execute();
|
|
74
|
-
const id = resolveChatRowId(insertResult);
|
|
75
|
-
await patchCancellationChatArabic(manager, id, messageAr, statusAr);
|
|
76
|
-
return id;
|
|
77
|
-
}
|