@platform-modules/civil-aviation-authority 2.3.140 → 2.3.145

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.
@@ -155,6 +155,11 @@ const LegalConsultationWorkflowModel_1 = require("./models/LegalConsultationWork
155
155
  const LegalConsultationApprovalModel_1 = require("./models/LegalConsultationApprovalModel");
156
156
  const LegalConsultationChatModel_1 = require("./models/LegalConsultationChatModel");
157
157
  const LegalConsultationAttachmentModel_1 = require("./models/LegalConsultationAttachmentModel");
158
+ const LegalComplaintRequestModel_1 = require("./models/LegalComplaintRequestModel");
159
+ const LegalComplaintWorkflowModel_1 = require("./models/LegalComplaintWorkflowModel");
160
+ const LegalComplaintApprovalModel_1 = require("./models/LegalComplaintApprovalModel");
161
+ const LegalComplaintChatModel_1 = require("./models/LegalComplaintChatModel");
162
+ const LegalComplaintAttachmentModel_1 = require("./models/LegalComplaintAttachmentModel");
158
163
  exports.AppDataSource = new typeorm_1.DataSource({
159
164
  type: 'postgres',
160
165
  host: process.env.DB_HOST || 'localhost',
@@ -306,6 +311,11 @@ exports.AppDataSource = new typeorm_1.DataSource({
306
311
  LegalConsultationApprovalModel_1.LegalConsultationApproval,
307
312
  LegalConsultationChatModel_1.LegalConsultationChat,
308
313
  LegalConsultationAttachmentModel_1.LegalConsultationAttachment,
314
+ LegalComplaintRequestModel_1.LegalComplaintRequest,
315
+ LegalComplaintWorkflowModel_1.LegalComplaintWorkflow,
316
+ LegalComplaintApprovalModel_1.LegalComplaintApproval,
317
+ LegalComplaintChatModel_1.LegalComplaintChat,
318
+ LegalComplaintAttachmentModel_1.LegalComplaintAttachment,
309
319
  DocumentModel_1.Document,
310
320
  DocumentFolderModel_1.DocumentFolder,
311
321
  DocumentDriveModel_1.DocumentDrive,
package/dist/index.d.ts CHANGED
@@ -278,5 +278,10 @@ export * from './models/LegalConsultationWorkflowModel';
278
278
  export * from './models/LegalConsultationApprovalModel';
279
279
  export * from './models/LegalConsultationChatModel';
280
280
  export * from './models/LegalConsultationAttachmentModel';
281
+ export * from './models/LegalComplaintRequestModel';
282
+ export * from './models/LegalComplaintWorkflowModel';
283
+ export * from './models/LegalComplaintApprovalModel';
284
+ export * from './models/LegalComplaintChatModel';
285
+ export * from './models/LegalComplaintAttachmentModel';
281
286
  export * from './models/AssetApartmentTypeModel';
282
287
  export * from './models/AssetUnitLocationModel';
package/dist/index.js CHANGED
@@ -429,6 +429,12 @@ __exportStar(require("./models/LegalConsultationWorkflowModel"), exports);
429
429
  __exportStar(require("./models/LegalConsultationApprovalModel"), exports);
430
430
  __exportStar(require("./models/LegalConsultationChatModel"), exports);
431
431
  __exportStar(require("./models/LegalConsultationAttachmentModel"), exports);
432
+ // Raise a Legal Complaint
433
+ __exportStar(require("./models/LegalComplaintRequestModel"), exports);
434
+ __exportStar(require("./models/LegalComplaintWorkflowModel"), exports);
435
+ __exportStar(require("./models/LegalComplaintApprovalModel"), exports);
436
+ __exportStar(require("./models/LegalComplaintChatModel"), exports);
437
+ __exportStar(require("./models/LegalComplaintAttachmentModel"), exports);
432
438
  // Asset Affairs Admin Configuration
433
439
  __exportStar(require("./models/AssetApartmentTypeModel"), exports);
434
440
  __exportStar(require("./models/AssetUnitLocationModel"), exports);
@@ -0,0 +1,24 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare enum LegalComplaintApprovalStatus {
3
+ PENDING = "Pending",
4
+ IN_PROGRESS = "In Progress",
5
+ APPROVED = "Approved",
6
+ REJECTED = "Rejected",
7
+ REASSIGNED = "Reassigned"
8
+ }
9
+ export declare class LegalComplaintApproval extends BaseModel {
10
+ request_id: number;
11
+ service_id: number;
12
+ sub_service_id: number;
13
+ approver_role_id: number;
14
+ approver_user_id: number;
15
+ delegate_user_id: number;
16
+ approved_by: number;
17
+ department_id: number;
18
+ section_id: number;
19
+ level: number;
20
+ approval_status: LegalComplaintApprovalStatus;
21
+ comment: string;
22
+ created_by: number;
23
+ constructor();
24
+ }
@@ -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.LegalComplaintApproval = exports.LegalComplaintApprovalStatus = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ var LegalComplaintApprovalStatus;
16
+ (function (LegalComplaintApprovalStatus) {
17
+ LegalComplaintApprovalStatus["PENDING"] = "Pending";
18
+ LegalComplaintApprovalStatus["IN_PROGRESS"] = "In Progress";
19
+ LegalComplaintApprovalStatus["APPROVED"] = "Approved";
20
+ LegalComplaintApprovalStatus["REJECTED"] = "Rejected";
21
+ LegalComplaintApprovalStatus["REASSIGNED"] = "Reassigned";
22
+ })(LegalComplaintApprovalStatus || (exports.LegalComplaintApprovalStatus = LegalComplaintApprovalStatus = {}));
23
+ let LegalComplaintApproval = class LegalComplaintApproval extends BaseModel_1.BaseModel {
24
+ constructor() {
25
+ super();
26
+ }
27
+ };
28
+ exports.LegalComplaintApproval = LegalComplaintApproval;
29
+ __decorate([
30
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
31
+ __metadata("design:type", Number)
32
+ ], LegalComplaintApproval.prototype, "request_id", void 0);
33
+ __decorate([
34
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
35
+ __metadata("design:type", Number)
36
+ ], LegalComplaintApproval.prototype, "service_id", void 0);
37
+ __decorate([
38
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
39
+ __metadata("design:type", Number)
40
+ ], LegalComplaintApproval.prototype, "sub_service_id", void 0);
41
+ __decorate([
42
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
43
+ __metadata("design:type", Number)
44
+ ], LegalComplaintApproval.prototype, "approver_role_id", void 0);
45
+ __decorate([
46
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
47
+ __metadata("design:type", Number)
48
+ ], LegalComplaintApproval.prototype, "approver_user_id", void 0);
49
+ __decorate([
50
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
51
+ __metadata("design:type", Number)
52
+ ], LegalComplaintApproval.prototype, "delegate_user_id", void 0);
53
+ __decorate([
54
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
55
+ __metadata("design:type", Number)
56
+ ], LegalComplaintApproval.prototype, "approved_by", void 0);
57
+ __decorate([
58
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
59
+ __metadata("design:type", Number)
60
+ ], LegalComplaintApproval.prototype, "department_id", void 0);
61
+ __decorate([
62
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
63
+ __metadata("design:type", Number)
64
+ ], LegalComplaintApproval.prototype, "section_id", void 0);
65
+ __decorate([
66
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
67
+ __metadata("design:type", Number)
68
+ ], LegalComplaintApproval.prototype, "level", void 0);
69
+ __decorate([
70
+ (0, typeorm_1.Column)({
71
+ type: 'enum',
72
+ enum: LegalComplaintApprovalStatus,
73
+ default: LegalComplaintApprovalStatus.PENDING,
74
+ nullable: false,
75
+ }),
76
+ __metadata("design:type", String)
77
+ ], LegalComplaintApproval.prototype, "approval_status", void 0);
78
+ __decorate([
79
+ (0, typeorm_1.Column)({ type: 'text', nullable: true }),
80
+ __metadata("design:type", String)
81
+ ], LegalComplaintApproval.prototype, "comment", void 0);
82
+ __decorate([
83
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
84
+ __metadata("design:type", Number)
85
+ ], LegalComplaintApproval.prototype, "created_by", void 0);
86
+ exports.LegalComplaintApproval = LegalComplaintApproval = __decorate([
87
+ (0, typeorm_1.Entity)({ name: 'legal_complaint_approvals' }),
88
+ __metadata("design:paramtypes", [])
89
+ ], LegalComplaintApproval);
@@ -0,0 +1,15 @@
1
+ import { BaseModel } from './BaseModel';
2
+ /** primary = main upload; supporting = additional evidence */
3
+ export type LegalComplaintAttachmentKind = 'primary' | 'supporting';
4
+ export declare class LegalComplaintAttachment extends BaseModel {
5
+ request_id: number;
6
+ service_id: number;
7
+ sub_service_id: number;
8
+ attachment_kind: string;
9
+ file_name: string;
10
+ file_url: string;
11
+ file_type: string;
12
+ file_size: number;
13
+ created_by: number;
14
+ constructor();
15
+ }
@@ -0,0 +1,60 @@
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.LegalComplaintAttachment = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ let LegalComplaintAttachment = class LegalComplaintAttachment extends BaseModel_1.BaseModel {
16
+ constructor() {
17
+ super();
18
+ }
19
+ };
20
+ exports.LegalComplaintAttachment = LegalComplaintAttachment;
21
+ __decorate([
22
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
23
+ __metadata("design:type", Number)
24
+ ], LegalComplaintAttachment.prototype, "request_id", void 0);
25
+ __decorate([
26
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
27
+ __metadata("design:type", Number)
28
+ ], LegalComplaintAttachment.prototype, "service_id", void 0);
29
+ __decorate([
30
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
31
+ __metadata("design:type", Number)
32
+ ], LegalComplaintAttachment.prototype, "sub_service_id", void 0);
33
+ __decorate([
34
+ (0, typeorm_1.Column)({ type: 'varchar', length: 32, nullable: false, default: 'primary' }),
35
+ __metadata("design:type", String)
36
+ ], LegalComplaintAttachment.prototype, "attachment_kind", void 0);
37
+ __decorate([
38
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
39
+ __metadata("design:type", String)
40
+ ], LegalComplaintAttachment.prototype, "file_name", void 0);
41
+ __decorate([
42
+ (0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: false }),
43
+ __metadata("design:type", String)
44
+ ], LegalComplaintAttachment.prototype, "file_url", void 0);
45
+ __decorate([
46
+ (0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: false }),
47
+ __metadata("design:type", String)
48
+ ], LegalComplaintAttachment.prototype, "file_type", void 0);
49
+ __decorate([
50
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
51
+ __metadata("design:type", Number)
52
+ ], LegalComplaintAttachment.prototype, "file_size", void 0);
53
+ __decorate([
54
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
55
+ __metadata("design:type", Number)
56
+ ], LegalComplaintAttachment.prototype, "created_by", void 0);
57
+ exports.LegalComplaintAttachment = LegalComplaintAttachment = __decorate([
58
+ (0, typeorm_1.Entity)({ name: 'legal_complaint_attachments' }),
59
+ __metadata("design:paramtypes", [])
60
+ ], LegalComplaintAttachment);
@@ -0,0 +1,17 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare enum LegalComplaintMessageType {
3
+ text = "text"
4
+ }
5
+ export declare class LegalComplaintChat extends BaseModel {
6
+ request_id: number;
7
+ service_id: number;
8
+ sub_service_id: number;
9
+ user_id: number;
10
+ approver_role_id: number;
11
+ message: string;
12
+ message_type: string;
13
+ status: string;
14
+ is_internal: boolean;
15
+ created_by: number;
16
+ constructor();
17
+ }
@@ -0,0 +1,68 @@
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.LegalComplaintChat = exports.LegalComplaintMessageType = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ var LegalComplaintMessageType;
16
+ (function (LegalComplaintMessageType) {
17
+ LegalComplaintMessageType["text"] = "text";
18
+ })(LegalComplaintMessageType || (exports.LegalComplaintMessageType = LegalComplaintMessageType = {}));
19
+ let LegalComplaintChat = class LegalComplaintChat extends BaseModel_1.BaseModel {
20
+ constructor() {
21
+ super();
22
+ }
23
+ };
24
+ exports.LegalComplaintChat = LegalComplaintChat;
25
+ __decorate([
26
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
27
+ __metadata("design:type", Number)
28
+ ], LegalComplaintChat.prototype, "request_id", void 0);
29
+ __decorate([
30
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
31
+ __metadata("design:type", Number)
32
+ ], LegalComplaintChat.prototype, "service_id", void 0);
33
+ __decorate([
34
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
35
+ __metadata("design:type", Number)
36
+ ], LegalComplaintChat.prototype, "sub_service_id", void 0);
37
+ __decorate([
38
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
39
+ __metadata("design:type", Number)
40
+ ], LegalComplaintChat.prototype, "user_id", void 0);
41
+ __decorate([
42
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
43
+ __metadata("design:type", Number)
44
+ ], LegalComplaintChat.prototype, "approver_role_id", void 0);
45
+ __decorate([
46
+ (0, typeorm_1.Column)({ type: 'text', nullable: false }),
47
+ __metadata("design:type", String)
48
+ ], LegalComplaintChat.prototype, "message", void 0);
49
+ __decorate([
50
+ (0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: false, default: 'text' }),
51
+ __metadata("design:type", String)
52
+ ], LegalComplaintChat.prototype, "message_type", void 0);
53
+ __decorate([
54
+ (0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: true }),
55
+ __metadata("design:type", String)
56
+ ], LegalComplaintChat.prototype, "status", void 0);
57
+ __decorate([
58
+ (0, typeorm_1.Column)({ type: 'boolean', nullable: false, default: false }),
59
+ __metadata("design:type", Boolean)
60
+ ], LegalComplaintChat.prototype, "is_internal", void 0);
61
+ __decorate([
62
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
63
+ __metadata("design:type", Number)
64
+ ], LegalComplaintChat.prototype, "created_by", void 0);
65
+ exports.LegalComplaintChat = LegalComplaintChat = __decorate([
66
+ (0, typeorm_1.Entity)({ name: 'legal_complaint_chat' }),
67
+ __metadata("design:paramtypes", [])
68
+ ], LegalComplaintChat);
@@ -0,0 +1,30 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare enum LegalComplaintRequestStatus {
3
+ Pending = "Pending",
4
+ Approved = "Approved",
5
+ Rejected = "Rejected",
6
+ RFC = "RFC"
7
+ }
8
+ export declare class LegalComplaintRequest extends BaseModel {
9
+ complaint_date: Date;
10
+ title: string;
11
+ description: string;
12
+ /** Times, dates, locations, individuals, events, etc. */
13
+ complaint_details: string;
14
+ /** Name / Position / Employee ID / Directorate / Department / Section (structured text or JSON) */
15
+ complainant_details: string;
16
+ /** Subject of complaint: Name / Position / Salary Grade / Directorate / Department / Section */
17
+ complained_employee_details: string;
18
+ req_user_department_id: number | null;
19
+ req_user_section_id: number | null;
20
+ status: string;
21
+ user_id: number;
22
+ workflow_execution_id: string;
23
+ created_by: number;
24
+ approved_by: number;
25
+ approved_at: Date;
26
+ approver_comment: string;
27
+ service_id: number;
28
+ sub_service_id: number;
29
+ constructor();
30
+ }
@@ -0,0 +1,99 @@
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.LegalComplaintRequest = exports.LegalComplaintRequestStatus = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ var LegalComplaintRequestStatus;
16
+ (function (LegalComplaintRequestStatus) {
17
+ LegalComplaintRequestStatus["Pending"] = "Pending";
18
+ LegalComplaintRequestStatus["Approved"] = "Approved";
19
+ LegalComplaintRequestStatus["Rejected"] = "Rejected";
20
+ LegalComplaintRequestStatus["RFC"] = "RFC";
21
+ })(LegalComplaintRequestStatus || (exports.LegalComplaintRequestStatus = LegalComplaintRequestStatus = {}));
22
+ let LegalComplaintRequest = class LegalComplaintRequest extends BaseModel_1.BaseModel {
23
+ constructor() {
24
+ super();
25
+ }
26
+ };
27
+ exports.LegalComplaintRequest = LegalComplaintRequest;
28
+ __decorate([
29
+ (0, typeorm_1.Column)({ type: 'date', nullable: false }),
30
+ __metadata("design:type", Date)
31
+ ], LegalComplaintRequest.prototype, "complaint_date", void 0);
32
+ __decorate([
33
+ (0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: false }),
34
+ __metadata("design:type", String)
35
+ ], LegalComplaintRequest.prototype, "title", void 0);
36
+ __decorate([
37
+ (0, typeorm_1.Column)({ type: 'text', nullable: false }),
38
+ __metadata("design:type", String)
39
+ ], LegalComplaintRequest.prototype, "description", void 0);
40
+ __decorate([
41
+ (0, typeorm_1.Column)({ type: 'text', nullable: false }),
42
+ __metadata("design:type", String)
43
+ ], LegalComplaintRequest.prototype, "complaint_details", void 0);
44
+ __decorate([
45
+ (0, typeorm_1.Column)({ type: 'text', nullable: false }),
46
+ __metadata("design:type", String)
47
+ ], LegalComplaintRequest.prototype, "complainant_details", void 0);
48
+ __decorate([
49
+ (0, typeorm_1.Column)({ type: 'text', nullable: false }),
50
+ __metadata("design:type", String)
51
+ ], LegalComplaintRequest.prototype, "complained_employee_details", void 0);
52
+ __decorate([
53
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
54
+ __metadata("design:type", Object)
55
+ ], LegalComplaintRequest.prototype, "req_user_department_id", void 0);
56
+ __decorate([
57
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
58
+ __metadata("design:type", Object)
59
+ ], LegalComplaintRequest.prototype, "req_user_section_id", void 0);
60
+ __decorate([
61
+ (0, typeorm_1.Column)({ type: 'varchar', length: 20, nullable: false, default: 'Pending' }),
62
+ __metadata("design:type", String)
63
+ ], LegalComplaintRequest.prototype, "status", void 0);
64
+ __decorate([
65
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
66
+ __metadata("design:type", Number)
67
+ ], LegalComplaintRequest.prototype, "user_id", void 0);
68
+ __decorate([
69
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
70
+ __metadata("design:type", String)
71
+ ], LegalComplaintRequest.prototype, "workflow_execution_id", void 0);
72
+ __decorate([
73
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
74
+ __metadata("design:type", Number)
75
+ ], LegalComplaintRequest.prototype, "created_by", void 0);
76
+ __decorate([
77
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
78
+ __metadata("design:type", Number)
79
+ ], LegalComplaintRequest.prototype, "approved_by", void 0);
80
+ __decorate([
81
+ (0, typeorm_1.Column)({ type: 'date', nullable: true }),
82
+ __metadata("design:type", Date)
83
+ ], LegalComplaintRequest.prototype, "approved_at", void 0);
84
+ __decorate([
85
+ (0, typeorm_1.Column)({ type: 'text', nullable: true }),
86
+ __metadata("design:type", String)
87
+ ], LegalComplaintRequest.prototype, "approver_comment", void 0);
88
+ __decorate([
89
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
90
+ __metadata("design:type", Number)
91
+ ], LegalComplaintRequest.prototype, "service_id", void 0);
92
+ __decorate([
93
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
94
+ __metadata("design:type", Number)
95
+ ], LegalComplaintRequest.prototype, "sub_service_id", void 0);
96
+ exports.LegalComplaintRequest = LegalComplaintRequest = __decorate([
97
+ (0, typeorm_1.Entity)({ name: 'legal_complaint_requests' }),
98
+ __metadata("design:paramtypes", [])
99
+ ], LegalComplaintRequest);
@@ -0,0 +1,25 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare enum LegalComplaintWorkFlowStatus {
3
+ Pending = "Pending",
4
+ InProgress = "In Progress",
5
+ Approved = "Approved",
6
+ Rejected = "Rejected",
7
+ RFC = "RFC"
8
+ }
9
+ export declare class LegalComplaintWorkflow extends BaseModel {
10
+ request_id: number;
11
+ service_id: number;
12
+ sub_service_id: number;
13
+ workflow_definition_id: number;
14
+ current_level: number;
15
+ content: string;
16
+ status: string;
17
+ step_order: number;
18
+ user_id: number;
19
+ role_id: number;
20
+ department_id: number;
21
+ section_id: number;
22
+ workflow_data: string;
23
+ created_by: number;
24
+ constructor();
25
+ }
@@ -0,0 +1,88 @@
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.LegalComplaintWorkflow = exports.LegalComplaintWorkFlowStatus = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ var LegalComplaintWorkFlowStatus;
16
+ (function (LegalComplaintWorkFlowStatus) {
17
+ LegalComplaintWorkFlowStatus["Pending"] = "Pending";
18
+ LegalComplaintWorkFlowStatus["InProgress"] = "In Progress";
19
+ LegalComplaintWorkFlowStatus["Approved"] = "Approved";
20
+ LegalComplaintWorkFlowStatus["Rejected"] = "Rejected";
21
+ LegalComplaintWorkFlowStatus["RFC"] = "RFC";
22
+ })(LegalComplaintWorkFlowStatus || (exports.LegalComplaintWorkFlowStatus = LegalComplaintWorkFlowStatus = {}));
23
+ let LegalComplaintWorkflow = class LegalComplaintWorkflow extends BaseModel_1.BaseModel {
24
+ constructor() {
25
+ super();
26
+ }
27
+ };
28
+ exports.LegalComplaintWorkflow = LegalComplaintWorkflow;
29
+ __decorate([
30
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
31
+ __metadata("design:type", Number)
32
+ ], LegalComplaintWorkflow.prototype, "request_id", void 0);
33
+ __decorate([
34
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
35
+ __metadata("design:type", Number)
36
+ ], LegalComplaintWorkflow.prototype, "service_id", void 0);
37
+ __decorate([
38
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
39
+ __metadata("design:type", Number)
40
+ ], LegalComplaintWorkflow.prototype, "sub_service_id", void 0);
41
+ __decorate([
42
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
43
+ __metadata("design:type", Number)
44
+ ], LegalComplaintWorkflow.prototype, "workflow_definition_id", void 0);
45
+ __decorate([
46
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
47
+ __metadata("design:type", Number)
48
+ ], LegalComplaintWorkflow.prototype, "current_level", void 0);
49
+ __decorate([
50
+ (0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: true }),
51
+ __metadata("design:type", String)
52
+ ], LegalComplaintWorkflow.prototype, "content", void 0);
53
+ __decorate([
54
+ (0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: false }),
55
+ __metadata("design:type", String)
56
+ ], LegalComplaintWorkflow.prototype, "status", void 0);
57
+ __decorate([
58
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
59
+ __metadata("design:type", Number)
60
+ ], LegalComplaintWorkflow.prototype, "step_order", void 0);
61
+ __decorate([
62
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
63
+ __metadata("design:type", Number)
64
+ ], LegalComplaintWorkflow.prototype, "user_id", void 0);
65
+ __decorate([
66
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
67
+ __metadata("design:type", Number)
68
+ ], LegalComplaintWorkflow.prototype, "role_id", void 0);
69
+ __decorate([
70
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
71
+ __metadata("design:type", Number)
72
+ ], LegalComplaintWorkflow.prototype, "department_id", void 0);
73
+ __decorate([
74
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
75
+ __metadata("design:type", Number)
76
+ ], LegalComplaintWorkflow.prototype, "section_id", void 0);
77
+ __decorate([
78
+ (0, typeorm_1.Column)({ type: 'text', nullable: true }),
79
+ __metadata("design:type", String)
80
+ ], LegalComplaintWorkflow.prototype, "workflow_data", void 0);
81
+ __decorate([
82
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
83
+ __metadata("design:type", Number)
84
+ ], LegalComplaintWorkflow.prototype, "created_by", void 0);
85
+ exports.LegalComplaintWorkflow = LegalComplaintWorkflow = __decorate([
86
+ (0, typeorm_1.Entity)({ name: 'legal_complaint_workflow' }),
87
+ __metadata("design:paramtypes", [])
88
+ ], LegalComplaintWorkflow);
@@ -3,7 +3,9 @@ export declare enum LegalConsultationApprovalStatus {
3
3
  PENDING = "Pending",
4
4
  IN_PROGRESS = "In Progress",
5
5
  APPROVED = "Approved",
6
- REJECTED = "Rejected"
6
+ REJECTED = "Rejected",
7
+ /** Current step completed by assigning the next approver (user/dept/section/role). */
8
+ REASSIGNED = "Reassigned"
7
9
  }
8
10
  export declare class LegalConsultationApproval extends BaseModel {
9
11
  request_id: number;
@@ -18,6 +18,8 @@ var LegalConsultationApprovalStatus;
18
18
  LegalConsultationApprovalStatus["IN_PROGRESS"] = "In Progress";
19
19
  LegalConsultationApprovalStatus["APPROVED"] = "Approved";
20
20
  LegalConsultationApprovalStatus["REJECTED"] = "Rejected";
21
+ /** Current step completed by assigning the next approver (user/dept/section/role). */
22
+ LegalConsultationApprovalStatus["REASSIGNED"] = "Reassigned";
21
23
  })(LegalConsultationApprovalStatus || (exports.LegalConsultationApprovalStatus = LegalConsultationApprovalStatus = {}));
22
24
  let LegalConsultationApproval = class LegalConsultationApproval extends BaseModel_1.BaseModel {
23
25
  constructor() {
@@ -6,8 +6,6 @@ export declare enum LegalConsultationRequestStatus {
6
6
  RFC = "RFC"
7
7
  }
8
8
  export declare class LegalConsultationRequest extends BaseModel {
9
- /** Business reference (populated by create worker / workflow) */
10
- request_id: string | null;
11
9
  request_date: Date;
12
10
  title: string;
13
11
  description: string;
@@ -25,10 +25,6 @@ let LegalConsultationRequest = class LegalConsultationRequest extends BaseModel_
25
25
  }
26
26
  };
27
27
  exports.LegalConsultationRequest = LegalConsultationRequest;
28
- __decorate([
29
- (0, typeorm_1.Column)({ type: 'varchar', length: 20, nullable: true }),
30
- __metadata("design:type", Object)
31
- ], LegalConsultationRequest.prototype, "request_id", void 0);
32
28
  __decorate([
33
29
  (0, typeorm_1.Column)({ type: 'date', nullable: false }),
34
30
  __metadata("design:type", Date)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platform-modules/civil-aviation-authority",
3
- "version": "2.3.140",
3
+ "version": "2.3.145",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -153,6 +153,11 @@ import { LegalConsultationWorkflow } from './models/LegalConsultationWorkflowMod
153
153
  import { LegalConsultationApproval } from './models/LegalConsultationApprovalModel';
154
154
  import { LegalConsultationChat } from './models/LegalConsultationChatModel';
155
155
  import { LegalConsultationAttachment } from './models/LegalConsultationAttachmentModel';
156
+ import { LegalComplaintRequest } from './models/LegalComplaintRequestModel';
157
+ import { LegalComplaintWorkflow } from './models/LegalComplaintWorkflowModel';
158
+ import { LegalComplaintApproval } from './models/LegalComplaintApprovalModel';
159
+ import { LegalComplaintChat } from './models/LegalComplaintChatModel';
160
+ import { LegalComplaintAttachment } from './models/LegalComplaintAttachmentModel';
156
161
 
157
162
  export const AppDataSource = new DataSource({
158
163
  type: 'postgres',
@@ -305,6 +310,11 @@ export const AppDataSource = new DataSource({
305
310
  LegalConsultationApproval,
306
311
  LegalConsultationChat,
307
312
  LegalConsultationAttachment,
313
+ LegalComplaintRequest,
314
+ LegalComplaintWorkflow,
315
+ LegalComplaintApproval,
316
+ LegalComplaintChat,
317
+ LegalComplaintAttachment,
308
318
  Document,
309
319
  DocumentFolder,
310
320
  DocumentDrive,