@platform-modules/civil-aviation-authority 2.3.150 → 2.3.155
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 +8 -0
- package/dist/data-source.js +10 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +20 -3
- 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/EventSupportApprovalModel.d.ts +23 -0
- package/dist/models/EventSupportApprovalModel.js +88 -0
- package/dist/models/EventSupportAttachmentModel.d.ts +12 -0
- package/dist/models/EventSupportAttachmentModel.js +56 -0
- package/dist/models/EventSupportChatModel.d.ts +18 -0
- package/dist/models/EventSupportChatModel.js +65 -0
- package/dist/models/EventSupportRequestModel.d.ts +27 -0
- package/dist/models/EventSupportRequestModel.js +89 -0
- package/dist/models/EventSupportWorkflowModel.d.ts +18 -0
- package/dist/models/EventSupportWorkflowModel.js +66 -0
- package/dist/models/FolderModel.d.ts +16 -0
- package/dist/models/FolderModel.js +85 -0
- package/dist/models/LegalComplaintRequestModel.d.ts +101 -6
- package/dist/models/LegalComplaintRequestModel.js +257 -5
- package/dist/models/PermissionModel.d.ts +18 -0
- package/dist/models/PermissionModel.js +68 -0
- package/dist/models/UUIDBaseModel.d.ts +14 -0
- package/dist/models/UUIDBaseModel.js +66 -0
- package/package.json +1 -1
- package/src/data-source.ts +10 -0
- package/src/index.ts +11 -0
- package/src/models/AnnualTrainingPlanRequestModel.ts +153 -153
- package/src/models/DepartmentsModel.ts +25 -25
- package/src/models/DocumentDriveModel.ts +28 -28
- package/src/models/DocumentFolderModel.ts +45 -45
- package/src/models/EventSupportApprovalModel.ts +59 -0
- package/src/models/EventSupportAttachmentModel.ts +32 -0
- package/src/models/EventSupportChatModel.ts +42 -0
- package/src/models/EventSupportRequestModel.ts +60 -0
- package/src/models/EventSupportWorkflowModel.ts +41 -0
- package/src/models/HousingContractCancelChatModel.ts +56 -56
- package/src/models/HousingContractRenewalChatModel.ts +59 -59
- package/src/models/ITRequestChatModel.ts +62 -62
- package/src/models/ItApprovalsModel.ts +84 -84
- package/src/models/ItWorkflowModel.ts +55 -55
- package/src/models/LegalComplaintRequestModel.ts +322 -8
- package/src/models/MissionTravelPassportExpiryNotificationConfigModel.ts +36 -36
- package/src/models/ResidentialUnitRentalChatModel.ts +56 -56
- package/src/models/ResidentialUnitRentalRequestModel.ts +218 -218
- package/src/models/ServicesNotificationConfigModel.ts +55 -55
- package/src/models/StudyLeaveRequestModel.ts +144 -144
- package/src/models/TrainingRoomBookingRequestModel.ts +142 -142
- package/src/models/TrainingRoomNotificationConfigModel.ts +30 -30
|
@@ -0,0 +1,65 @@
|
|
|
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.EventSupportRequestChat = exports.EventSupportMessageType = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
var EventSupportMessageType;
|
|
16
|
+
(function (EventSupportMessageType) {
|
|
17
|
+
EventSupportMessageType["TEXT"] = "text";
|
|
18
|
+
EventSupportMessageType["IMAGE"] = "image";
|
|
19
|
+
EventSupportMessageType["VIDEO"] = "video";
|
|
20
|
+
EventSupportMessageType["FILE"] = "file";
|
|
21
|
+
EventSupportMessageType["LINK"] = "link";
|
|
22
|
+
})(EventSupportMessageType || (exports.EventSupportMessageType = EventSupportMessageType = {}));
|
|
23
|
+
let EventSupportRequestChat = class EventSupportRequestChat extends BaseModel_1.BaseModel {
|
|
24
|
+
};
|
|
25
|
+
exports.EventSupportRequestChat = EventSupportRequestChat;
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: false }),
|
|
28
|
+
__metadata("design:type", Number)
|
|
29
|
+
], EventSupportRequestChat.prototype, "request_id", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
32
|
+
__metadata("design:type", Object)
|
|
33
|
+
], EventSupportRequestChat.prototype, "service_id", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
36
|
+
__metadata("design:type", Object)
|
|
37
|
+
], EventSupportRequestChat.prototype, "sub_service_id", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: false }),
|
|
40
|
+
__metadata("design:type", Number)
|
|
41
|
+
], EventSupportRequestChat.prototype, "user_id", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
44
|
+
__metadata("design:type", Object)
|
|
45
|
+
], EventSupportRequestChat.prototype, "role_id", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.Column)({ type: "text", nullable: false }),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], EventSupportRequestChat.prototype, "message", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.Column)({
|
|
52
|
+
type: "enum",
|
|
53
|
+
enum: EventSupportMessageType,
|
|
54
|
+
default: EventSupportMessageType.TEXT,
|
|
55
|
+
nullable: false,
|
|
56
|
+
}),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], EventSupportRequestChat.prototype, "messageType", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, typeorm_1.Column)({ type: "text", nullable: true }),
|
|
61
|
+
__metadata("design:type", Object)
|
|
62
|
+
], EventSupportRequestChat.prototype, "status", void 0);
|
|
63
|
+
exports.EventSupportRequestChat = EventSupportRequestChat = __decorate([
|
|
64
|
+
(0, typeorm_1.Entity)({ name: "event_support_chats" })
|
|
65
|
+
], EventSupportRequestChat);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { BaseModel } from "./BaseModel";
|
|
2
|
+
export declare enum EventSupportRequestStatus {
|
|
3
|
+
PENDING = "Pending",
|
|
4
|
+
ASSIGNED = "Assigned",
|
|
5
|
+
IN_PROGRESS = "In Progress",
|
|
6
|
+
APPROVED = "Approved",
|
|
7
|
+
REJECTED = "Rejected",
|
|
8
|
+
CANCELLED = "Cancelled"
|
|
9
|
+
}
|
|
10
|
+
export declare class EventSupportRequests extends BaseModel {
|
|
11
|
+
req_user_department_id: number | null;
|
|
12
|
+
req_user_section_id: number | null;
|
|
13
|
+
service_id: number | null;
|
|
14
|
+
sub_service_id: number | null;
|
|
15
|
+
user_id: number;
|
|
16
|
+
status: EventSupportRequestStatus;
|
|
17
|
+
workflow_execution_id: string | null;
|
|
18
|
+
event_title: string;
|
|
19
|
+
/** Department associated with the event / support request (distinct from requester dept) */
|
|
20
|
+
event_department_id: number | null;
|
|
21
|
+
request_for: string | null;
|
|
22
|
+
date_of_event: string;
|
|
23
|
+
location_of_event: string | null;
|
|
24
|
+
type_of_event: string | null;
|
|
25
|
+
phone_number: string | null;
|
|
26
|
+
reason_for_request: string;
|
|
27
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
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.EventSupportRequests = exports.EventSupportRequestStatus = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
var EventSupportRequestStatus;
|
|
16
|
+
(function (EventSupportRequestStatus) {
|
|
17
|
+
EventSupportRequestStatus["PENDING"] = "Pending";
|
|
18
|
+
EventSupportRequestStatus["ASSIGNED"] = "Assigned";
|
|
19
|
+
EventSupportRequestStatus["IN_PROGRESS"] = "In Progress";
|
|
20
|
+
EventSupportRequestStatus["APPROVED"] = "Approved";
|
|
21
|
+
EventSupportRequestStatus["REJECTED"] = "Rejected";
|
|
22
|
+
EventSupportRequestStatus["CANCELLED"] = "Cancelled";
|
|
23
|
+
})(EventSupportRequestStatus || (exports.EventSupportRequestStatus = EventSupportRequestStatus = {}));
|
|
24
|
+
let EventSupportRequests = class EventSupportRequests extends BaseModel_1.BaseModel {
|
|
25
|
+
};
|
|
26
|
+
exports.EventSupportRequests = EventSupportRequests;
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
29
|
+
__metadata("design:type", Object)
|
|
30
|
+
], EventSupportRequests.prototype, "req_user_department_id", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
33
|
+
__metadata("design:type", Object)
|
|
34
|
+
], EventSupportRequests.prototype, "req_user_section_id", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
37
|
+
__metadata("design:type", Object)
|
|
38
|
+
], EventSupportRequests.prototype, "service_id", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
41
|
+
__metadata("design:type", Object)
|
|
42
|
+
], EventSupportRequests.prototype, "sub_service_id", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: false }),
|
|
45
|
+
__metadata("design:type", Number)
|
|
46
|
+
], EventSupportRequests.prototype, "user_id", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, typeorm_1.Column)({ type: "enum", enum: EventSupportRequestStatus, default: EventSupportRequestStatus.PENDING, nullable: false }),
|
|
49
|
+
__metadata("design:type", String)
|
|
50
|
+
], EventSupportRequests.prototype, "status", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, typeorm_1.Column)({ type: "varchar", nullable: true }),
|
|
53
|
+
__metadata("design:type", Object)
|
|
54
|
+
], EventSupportRequests.prototype, "workflow_execution_id", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 500, nullable: false }),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], EventSupportRequests.prototype, "event_title", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
61
|
+
__metadata("design:type", Object)
|
|
62
|
+
], EventSupportRequests.prototype, "event_department_id", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 500, nullable: true }),
|
|
65
|
+
__metadata("design:type", Object)
|
|
66
|
+
], EventSupportRequests.prototype, "request_for", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, typeorm_1.Column)({ type: "date", nullable: false }),
|
|
69
|
+
__metadata("design:type", String)
|
|
70
|
+
], EventSupportRequests.prototype, "date_of_event", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 500, nullable: true }),
|
|
73
|
+
__metadata("design:type", Object)
|
|
74
|
+
], EventSupportRequests.prototype, "location_of_event", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
|
|
77
|
+
__metadata("design:type", Object)
|
|
78
|
+
], EventSupportRequests.prototype, "type_of_event", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 64, nullable: true }),
|
|
81
|
+
__metadata("design:type", Object)
|
|
82
|
+
], EventSupportRequests.prototype, "phone_number", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, typeorm_1.Column)({ type: "text", nullable: false }),
|
|
85
|
+
__metadata("design:type", String)
|
|
86
|
+
], EventSupportRequests.prototype, "reason_for_request", void 0);
|
|
87
|
+
exports.EventSupportRequests = EventSupportRequests = __decorate([
|
|
88
|
+
(0, typeorm_1.Entity)({ name: "event_support_requests" })
|
|
89
|
+
], EventSupportRequests);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BaseModel } from "./BaseModel";
|
|
2
|
+
export declare enum EventSupportWorkFlowStatus {
|
|
3
|
+
COMPLETED = "Completed",
|
|
4
|
+
NOT_YET_STARTED = "Not Yet Started",
|
|
5
|
+
PENDING = "Pending"
|
|
6
|
+
}
|
|
7
|
+
export declare class EventSupportWorkFlow extends BaseModel {
|
|
8
|
+
request_id: number;
|
|
9
|
+
service_id: number | null;
|
|
10
|
+
sub_service_id: number | null;
|
|
11
|
+
content: string;
|
|
12
|
+
status: EventSupportWorkFlowStatus;
|
|
13
|
+
user_id: number | null;
|
|
14
|
+
role_id: number | null;
|
|
15
|
+
department_id: number | null;
|
|
16
|
+
section_id: number | null;
|
|
17
|
+
step_order: number | null;
|
|
18
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
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.EventSupportWorkFlow = exports.EventSupportWorkFlowStatus = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
var EventSupportWorkFlowStatus;
|
|
16
|
+
(function (EventSupportWorkFlowStatus) {
|
|
17
|
+
EventSupportWorkFlowStatus["COMPLETED"] = "Completed";
|
|
18
|
+
EventSupportWorkFlowStatus["NOT_YET_STARTED"] = "Not Yet Started";
|
|
19
|
+
EventSupportWorkFlowStatus["PENDING"] = "Pending";
|
|
20
|
+
})(EventSupportWorkFlowStatus || (exports.EventSupportWorkFlowStatus = EventSupportWorkFlowStatus = {}));
|
|
21
|
+
let EventSupportWorkFlow = class EventSupportWorkFlow extends BaseModel_1.BaseModel {
|
|
22
|
+
};
|
|
23
|
+
exports.EventSupportWorkFlow = EventSupportWorkFlow;
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: false }),
|
|
26
|
+
__metadata("design:type", Number)
|
|
27
|
+
], EventSupportWorkFlow.prototype, "request_id", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
30
|
+
__metadata("design:type", Object)
|
|
31
|
+
], EventSupportWorkFlow.prototype, "service_id", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
34
|
+
__metadata("design:type", Object)
|
|
35
|
+
], EventSupportWorkFlow.prototype, "sub_service_id", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 500, nullable: false }),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], EventSupportWorkFlow.prototype, "content", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_1.Column)({ type: "enum", enum: EventSupportWorkFlowStatus, default: EventSupportWorkFlowStatus.NOT_YET_STARTED, nullable: false }),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], EventSupportWorkFlow.prototype, "status", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
46
|
+
__metadata("design:type", Object)
|
|
47
|
+
], EventSupportWorkFlow.prototype, "user_id", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
50
|
+
__metadata("design:type", Object)
|
|
51
|
+
], EventSupportWorkFlow.prototype, "role_id", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
54
|
+
__metadata("design:type", Object)
|
|
55
|
+
], EventSupportWorkFlow.prototype, "department_id", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
58
|
+
__metadata("design:type", Object)
|
|
59
|
+
], EventSupportWorkFlow.prototype, "section_id", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
62
|
+
__metadata("design:type", Object)
|
|
63
|
+
], EventSupportWorkFlow.prototype, "step_order", void 0);
|
|
64
|
+
exports.EventSupportWorkFlow = EventSupportWorkFlow = __decorate([
|
|
65
|
+
(0, typeorm_1.Entity)({ name: "event_support_workflows" })
|
|
66
|
+
], EventSupportWorkFlow);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Departments } from './DepartmentsModel';
|
|
2
|
+
import { UUIDBaseModel } from './UUIDBaseModel';
|
|
3
|
+
export declare class Folder extends UUIDBaseModel {
|
|
4
|
+
name: string;
|
|
5
|
+
path: string;
|
|
6
|
+
parent_path?: string;
|
|
7
|
+
department: Departments;
|
|
8
|
+
department_id: number;
|
|
9
|
+
description?: string;
|
|
10
|
+
access_level: 'general' | 'restricted';
|
|
11
|
+
allowed_roles: string[];
|
|
12
|
+
allowed_users: string[];
|
|
13
|
+
created_by_name?: string;
|
|
14
|
+
is_active: boolean;
|
|
15
|
+
constructor(name: string, path: string, department_id: number, created_by: string, access_level?: 'general' | 'restricted', parent_path?: string, description?: string, created_by_name?: string, allowed_roles?: string[], allowed_users?: string[], is_active?: boolean);
|
|
16
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
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.Folder = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const DepartmentsModel_1 = require("./DepartmentsModel");
|
|
15
|
+
const UUIDBaseModel_1 = require("./UUIDBaseModel");
|
|
16
|
+
// Note: DocumentMetadata import removed to avoid circular dependency
|
|
17
|
+
// Use lazy loading or query builder when needed
|
|
18
|
+
let Folder = class Folder extends UUIDBaseModel_1.UUIDBaseModel {
|
|
19
|
+
constructor(name, path, department_id, created_by, access_level = 'general', parent_path, description, created_by_name, allowed_roles, allowed_users, is_active = true) {
|
|
20
|
+
super();
|
|
21
|
+
this.name = name;
|
|
22
|
+
this.path = path;
|
|
23
|
+
this.department_id = department_id;
|
|
24
|
+
this.created_by = created_by;
|
|
25
|
+
this.access_level = access_level;
|
|
26
|
+
this.parent_path = parent_path;
|
|
27
|
+
this.description = description;
|
|
28
|
+
this.created_by_name = created_by_name;
|
|
29
|
+
this.allowed_roles = allowed_roles || [];
|
|
30
|
+
this.allowed_users = allowed_users || [];
|
|
31
|
+
this.is_active = is_active;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
exports.Folder = Folder;
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255 }),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], Folder.prototype, "name", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 1000 }),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], Folder.prototype, "path", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 1000, nullable: true }),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], Folder.prototype, "parent_path", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, typeorm_1.ManyToOne)('Departments', { eager: true }),
|
|
49
|
+
(0, typeorm_1.JoinColumn)({ name: 'department_id' }),
|
|
50
|
+
__metadata("design:type", DepartmentsModel_1.Departments)
|
|
51
|
+
], Folder.prototype, "department", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({ type: 'integer' }),
|
|
54
|
+
__metadata("design:type", Number)
|
|
55
|
+
], Folder.prototype, "department_id", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
58
|
+
__metadata("design:type", String)
|
|
59
|
+
], Folder.prototype, "description", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, typeorm_1.Column)({ type: 'enum', enum: ['general', 'restricted'], default: 'general' }),
|
|
62
|
+
(0, typeorm_1.Index)(),
|
|
63
|
+
__metadata("design:type", String)
|
|
64
|
+
], Folder.prototype, "access_level", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, typeorm_1.Column)({ type: 'text', array: true, default: [] }),
|
|
67
|
+
__metadata("design:type", Array)
|
|
68
|
+
], Folder.prototype, "allowed_roles", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, typeorm_1.Column)({ type: 'text', array: true, default: [] }),
|
|
71
|
+
__metadata("design:type", Array)
|
|
72
|
+
], Folder.prototype, "allowed_users", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
75
|
+
__metadata("design:type", String)
|
|
76
|
+
], Folder.prototype, "created_by_name", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: true }),
|
|
79
|
+
(0, typeorm_1.Index)(),
|
|
80
|
+
__metadata("design:type", Boolean)
|
|
81
|
+
], Folder.prototype, "is_active", void 0);
|
|
82
|
+
exports.Folder = Folder = __decorate([
|
|
83
|
+
(0, typeorm_1.Entity)({ name: 'folders' }),
|
|
84
|
+
__metadata("design:paramtypes", [String, String, Number, String, String, String, String, String, Array, Array, Boolean])
|
|
85
|
+
], Folder);
|
|
@@ -5,16 +5,111 @@ export declare enum LegalComplaintRequestStatus {
|
|
|
5
5
|
Rejected = "Rejected",
|
|
6
6
|
RFC = "RFC"
|
|
7
7
|
}
|
|
8
|
+
/** Step 2 — Complaint details (individuals, time, incident date, location, events, other details). */
|
|
9
|
+
export interface LegalComplaintIncidentInput {
|
|
10
|
+
incident_time?: string | null;
|
|
11
|
+
/** Date of the incident (step 2); distinct from request `complaint_date` / `date` on the body. */
|
|
12
|
+
incident_date?: string | null;
|
|
13
|
+
incident_location?: string | null;
|
|
14
|
+
individuals_involved?: string | null;
|
|
15
|
+
/** Events / narrative (UI “Events”). */
|
|
16
|
+
incident_events?: string | null;
|
|
17
|
+
/** “Any other details related to complaint”. */
|
|
18
|
+
incident_other_details?: string | null;
|
|
19
|
+
/** Optional combined narrative; if omitted, parser may derive from events + other_details. */
|
|
20
|
+
incident_description?: string;
|
|
21
|
+
}
|
|
22
|
+
/** Step 3 — Complainant: Name / Position / Employee ID / Directorate / Department / Section. */
|
|
23
|
+
export interface LegalComplaintComplainantInput {
|
|
24
|
+
name: string;
|
|
25
|
+
position?: string | null;
|
|
26
|
+
employee_id?: string | null;
|
|
27
|
+
directorate?: string | null;
|
|
28
|
+
department_id?: number | null;
|
|
29
|
+
section_id?: number | null;
|
|
30
|
+
/** When UI sends department as text instead of id. */
|
|
31
|
+
department_name?: string | null;
|
|
32
|
+
section_name?: string | null;
|
|
33
|
+
}
|
|
34
|
+
/** Step 4 — Subject of complaint: Name / Position / Salary grade / Directorate / Department / Section. */
|
|
35
|
+
export interface LegalComplaintSubjectEmployeeInput {
|
|
36
|
+
name: string;
|
|
37
|
+
position?: string | null;
|
|
38
|
+
salary_grade?: string | null;
|
|
39
|
+
directorate?: string | null;
|
|
40
|
+
department_id?: number | null;
|
|
41
|
+
section_id?: number | null;
|
|
42
|
+
department_name?: string | null;
|
|
43
|
+
section_name?: string | null;
|
|
44
|
+
}
|
|
45
|
+
export interface LegalComplaintStructuredCreateFields {
|
|
46
|
+
incident_time: string | null;
|
|
47
|
+
incident_date: string | null;
|
|
48
|
+
incident_location: string | null;
|
|
49
|
+
individuals_involved: string | null;
|
|
50
|
+
incident_events: string | null;
|
|
51
|
+
incident_other_details: string | null;
|
|
52
|
+
incident_description: string;
|
|
53
|
+
complainant_name: string;
|
|
54
|
+
complainant_position: string | null;
|
|
55
|
+
complainant_employee_id: string | null;
|
|
56
|
+
complainant_directorate: string | null;
|
|
57
|
+
complainant_department_id: number | null;
|
|
58
|
+
complainant_department_name: string | null;
|
|
59
|
+
complainant_section_id: number | null;
|
|
60
|
+
complainant_section_name: string | null;
|
|
61
|
+
complained_employee_name: string;
|
|
62
|
+
complained_employee_position: string | null;
|
|
63
|
+
complained_employee_salary_grade: string | null;
|
|
64
|
+
complained_employee_directorate: string | null;
|
|
65
|
+
complained_employee_department_id: number | null;
|
|
66
|
+
complained_employee_department_name: string | null;
|
|
67
|
+
complained_employee_section_id: number | null;
|
|
68
|
+
complained_employee_section_name: string | null;
|
|
69
|
+
}
|
|
70
|
+
export type LegalComplaintCreateFieldParseResult = {
|
|
71
|
+
ok: true;
|
|
72
|
+
fields: LegalComplaintStructuredCreateFields;
|
|
73
|
+
} | {
|
|
74
|
+
ok: false;
|
|
75
|
+
message: string;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Maps API / Conductor `requestData` to DB columns.
|
|
79
|
+
* Preferred: `complaint_incident`, `complainant`, `complained_employee` objects.
|
|
80
|
+
* Legacy: `complaint_details`, `complainant_details`, `complained_employee_details` non-empty strings.
|
|
81
|
+
*/
|
|
82
|
+
export declare function parseLegalComplaintCreateFields(body: Record<string, any>): LegalComplaintCreateFieldParseResult;
|
|
8
83
|
export declare class LegalComplaintRequest extends BaseModel {
|
|
9
84
|
complaint_date: Date;
|
|
10
85
|
title: string;
|
|
11
86
|
description: string;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
87
|
+
incident_time: string | null;
|
|
88
|
+
incident_location: string | null;
|
|
89
|
+
individuals_involved: string | null;
|
|
90
|
+
/** Date of the incident (wizard step 2); request submission date remains `complaint_date`. */
|
|
91
|
+
incident_date: Date | null;
|
|
92
|
+
/** UI “Events”. */
|
|
93
|
+
incident_events: string | null;
|
|
94
|
+
/** “Any other details related to complaint”. */
|
|
95
|
+
incident_other_details: string | null;
|
|
96
|
+
incident_description: string;
|
|
97
|
+
complainant_name: string;
|
|
98
|
+
complainant_position: string | null;
|
|
99
|
+
complainant_employee_id: string | null;
|
|
100
|
+
complainant_directorate: string | null;
|
|
101
|
+
complainant_department_id: number | null;
|
|
102
|
+
complainant_department_name: string | null;
|
|
103
|
+
complainant_section_id: number | null;
|
|
104
|
+
complainant_section_name: string | null;
|
|
105
|
+
complained_employee_name: string;
|
|
106
|
+
complained_employee_position: string | null;
|
|
107
|
+
complained_employee_salary_grade: string | null;
|
|
108
|
+
complained_employee_directorate: string | null;
|
|
109
|
+
complained_employee_department_id: number | null;
|
|
110
|
+
complained_employee_department_name: string | null;
|
|
111
|
+
complained_employee_section_id: number | null;
|
|
112
|
+
complained_employee_section_name: string | null;
|
|
18
113
|
req_user_department_id: number | null;
|
|
19
114
|
req_user_section_id: number | null;
|
|
20
115
|
status: string;
|