@platform-modules/civil-aviation-authority 2.3.96 → 2.3.99

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/.env +16 -10
  2. package/dist/data-source.js +2 -0
  3. package/dist/index.d.ts +11 -0
  4. package/dist/index.js +13 -0
  5. package/dist/models/AnnualIncrementRequestEmployeeModel.d.ts +16 -0
  6. package/dist/models/AnnualIncrementRequestEmployeeModel.js +80 -0
  7. package/dist/models/AnnualIncrementRequestModel.d.ts +5 -4
  8. package/dist/models/AnnualIncrementRequestModel.js +17 -12
  9. package/dist/models/CashAllowanceLeaveRequestModel.d.ts +1 -0
  10. package/dist/models/CashAllowanceLeaveRequestModel.js +5 -0
  11. package/dist/models/DocumentMetadataModel.d.ts +45 -0
  12. package/dist/models/DocumentMetadataModel.js +171 -0
  13. package/dist/models/DocumentationDepartmentsModel.d.ts +13 -0
  14. package/dist/models/DocumentationDepartmentsModel.js +53 -0
  15. package/dist/models/FolderModel.d.ts +16 -0
  16. package/dist/models/FolderModel.js +85 -0
  17. package/dist/models/HousingContractCancelApprovalModel.d.ts +23 -0
  18. package/dist/models/HousingContractCancelApprovalModel.js +88 -0
  19. package/dist/models/HousingContractCancelAttachmentModel.d.ts +12 -0
  20. package/dist/models/HousingContractCancelAttachmentModel.js +56 -0
  21. package/dist/models/HousingContractCancelChatModel.d.ts +18 -0
  22. package/dist/models/HousingContractCancelChatModel.js +60 -0
  23. package/dist/models/HousingContractCancelRequestModel.d.ts +31 -0
  24. package/dist/models/HousingContractCancelRequestModel.js +107 -0
  25. package/dist/models/HousingContractCancelWorkflowModel.d.ts +25 -0
  26. package/dist/models/HousingContractCancelWorkflowModel.js +88 -0
  27. package/dist/models/HousingContractRenewalApprovalModel.d.ts +23 -0
  28. package/dist/models/HousingContractRenewalApprovalModel.js +88 -0
  29. package/dist/models/HousingContractRenewalAttachmentModel.d.ts +12 -0
  30. package/dist/models/HousingContractRenewalAttachmentModel.js +56 -0
  31. package/dist/models/HousingContractRenewalChatModel.d.ts +18 -0
  32. package/dist/models/HousingContractRenewalChatModel.js +60 -0
  33. package/dist/models/HousingContractRenewalRequestModel.d.ts +32 -0
  34. package/dist/models/HousingContractRenewalRequestModel.js +107 -0
  35. package/dist/models/HousingContractRenewalWorkflowModel.d.ts +25 -0
  36. package/dist/models/HousingContractRenewalWorkflowModel.js +88 -0
  37. package/dist/models/PermissionModel.d.ts +18 -0
  38. package/dist/models/PermissionModel.js +68 -0
  39. package/dist/models/PromotionRequestModel.d.ts +1 -0
  40. package/dist/models/PromotionRequestModel.js +5 -0
  41. package/dist/models/ShiftAllowanceRequestModel.d.ts +1 -0
  42. package/dist/models/ShiftAllowanceRequestModel.js +6 -1
  43. package/dist/models/UUIDBaseModel.d.ts +14 -0
  44. package/dist/models/UUIDBaseModel.js +66 -0
  45. package/package.json +1 -1
  46. package/src/data-source.ts +2 -0
  47. package/src/index.ts +16 -1
  48. package/src/models/AnnualIncrementRequestEmployeeModel.ts +65 -0
  49. package/src/models/AnnualIncrementRequestModel.ts +16 -12
  50. package/src/models/CashAllowanceLeaveRequestModel.ts +4 -0
  51. package/src/models/DepartmentsModel.ts +25 -25
  52. package/src/models/HousingContractCancelApprovalModel.ts +61 -0
  53. package/src/models/HousingContractCancelAttachmentModel.ts +34 -0
  54. package/src/models/HousingContractCancelChatModel.ts +39 -0
  55. package/src/models/HousingContractCancelRequestModel.ts +76 -0
  56. package/src/models/HousingContractCancelWorkflowModel.ts +60 -0
  57. package/src/models/HousingContractRenewalApprovalModel.ts +61 -0
  58. package/src/models/HousingContractRenewalAttachmentModel.ts +34 -0
  59. package/src/models/HousingContractRenewalChatModel.ts +39 -0
  60. package/src/models/HousingContractRenewalRequestModel.ts +77 -0
  61. package/src/models/HousingContractRenewalWorkflowModel.ts +60 -0
  62. package/src/models/ITRequestChatModel.ts +62 -62
  63. package/src/models/ItApprovalsModel.ts +84 -84
  64. package/src/models/ItWorkflowModel.ts +55 -55
  65. package/src/models/MissionTravelPassportExpiryNotificationConfigModel.ts +36 -36
  66. package/src/models/PromotionRequestModel.ts +4 -0
  67. package/src/models/ServicesNotificationConfigModel.ts +55 -55
  68. package/src/models/ShiftAllowanceRequestModel.ts +5 -1
  69. package/src/models/TrainingRoomNotificationConfigModel.ts +30 -30
package/.env CHANGED
@@ -1,14 +1,20 @@
1
- # DB_HOST=164.52.222.169
1
+ DB_HOST=164.52.222.169
2
+ DB_PORT=5432
3
+ DB_USER=postgres_admin_user
4
+ DB_PASS=pg_admin_user_pwd_caa_fa_$%^&OIukhjgcvbn
5
+ DB_NAME=CAA
6
+
7
+ # DB_HOST=216.48.187.46
2
8
  # DB_PORT=5432
3
- # DB_USER=postgres_admin_user
4
- # DB_PASS=pg_admin_user_pwd_caa_fa_$%^&OIukhjgcvbn
5
- # DB_NAME=CAA
9
+ # DB_USER=adminuser
10
+ # DB_PASS=postgres_caa_fm_qa_34567
11
+ # DB_NAME=CAA_QA
12
+
6
13
 
7
14
 
8
- DB_HOST=localhost
9
- DB_PORT=5432
10
- DB_USER=postgres
11
- DB_PASS=admin123
12
- DB_NAME=CAA
13
15
 
14
- TYPEORM_DATABASE_SYNC=true
16
+ # DB_HOST=localhost
17
+ # DB_PORT=5432
18
+ # DB_USER=postgres
19
+ # DB_PASS=stevejobs
20
+ # DB_NAME=CAA
@@ -133,6 +133,7 @@ const RequestForCoverageAttachmentModel_1 = require("./models/RequestForCoverage
133
133
  const CashAllowanceLeaveRequestModel_1 = require("./models/CashAllowanceLeaveRequestModel");
134
134
  const PromotionRequestModel_1 = require("./models/PromotionRequestModel");
135
135
  const AnnualIncrementRequestModel_1 = require("./models/AnnualIncrementRequestModel");
136
+ const AnnualIncrementRequestEmployeeModel_1 = require("./models/AnnualIncrementRequestEmployeeModel");
136
137
  const SkillsEnhancementRequestModel_1 = require("./models/SkillsEnhancementRequestModel");
137
138
  const CityMasterModel_1 = require("./models/CityMasterModel");
138
139
  const ResidentialUnitRentalRequestModel_1 = require("./models/ResidentialUnitRentalRequestModel");
@@ -271,6 +272,7 @@ exports.AppDataSource = new typeorm_1.DataSource({
271
272
  CashAllowanceLeaveRequestModel_1.CashAllowanceLeaveRequest,
272
273
  PromotionRequestModel_1.PromotionRequest,
273
274
  AnnualIncrementRequestModel_1.AnnualIncrementRequest,
275
+ AnnualIncrementRequestEmployeeModel_1.AnnualIncrementRequestEmployee,
274
276
  SkillsEnhancementRequestModel_1.SkillsEnhancementRequest,
275
277
  CityMasterModel_1.CityMaster,
276
278
  ResidentialUnitRentalRequestModel_1.ResidentialUnitRentalRequest,
package/dist/index.d.ts CHANGED
@@ -203,6 +203,7 @@ export * from './models/PromotionRequestModel';
203
203
  export { PromotionRequestStatus } from './models/PromotionRequestModel';
204
204
  export * from './models/AnnualIncrementRequestModel';
205
205
  export { AnnualIncrementRequestStatus } from './models/AnnualIncrementRequestModel';
206
+ export * from './models/AnnualIncrementRequestEmployeeModel';
206
207
  export * from './models/SkillsEnhancementRequestModel';
207
208
  export { SkillsEnhancementRequestStatus } from './models/SkillsEnhancementRequestModel';
208
209
  export * from './models/PerformanceManagementRequestModel';
@@ -224,3 +225,13 @@ export * from './models/ResidentialUnitRentalWorkflowModel';
224
225
  export * from './models/ResidentialUnitRentalApprovalModel';
225
226
  export * from './models/ResidentialUnitRentalChatModel';
226
227
  export * from './models/ResidentialUnitRentalAttachmentModel';
228
+ export * from './models/HousingContractRenewalRequestModel';
229
+ export * from './models/HousingContractRenewalWorkflowModel';
230
+ export * from './models/HousingContractRenewalApprovalModel';
231
+ export * from './models/HousingContractRenewalChatModel';
232
+ export * from './models/HousingContractRenewalAttachmentModel';
233
+ export * from './models/HousingContractCancelRequestModel';
234
+ export * from './models/HousingContractCancelWorkflowModel';
235
+ export * from './models/HousingContractCancelApprovalModel';
236
+ export * from './models/HousingContractCancelChatModel';
237
+ export * from './models/HousingContractCancelAttachmentModel';
package/dist/index.js CHANGED
@@ -308,6 +308,7 @@ Object.defineProperty(exports, "PromotionRequestStatus", { enumerable: true, get
308
308
  __exportStar(require("./models/AnnualIncrementRequestModel"), exports);
309
309
  var AnnualIncrementRequestModel_1 = require("./models/AnnualIncrementRequestModel");
310
310
  Object.defineProperty(exports, "AnnualIncrementRequestStatus", { enumerable: true, get: function () { return AnnualIncrementRequestModel_1.AnnualIncrementRequestStatus; } });
311
+ __exportStar(require("./models/AnnualIncrementRequestEmployeeModel"), exports);
311
312
  __exportStar(require("./models/SkillsEnhancementRequestModel"), exports);
312
313
  var SkillsEnhancementRequestModel_1 = require("./models/SkillsEnhancementRequestModel");
313
314
  Object.defineProperty(exports, "SkillsEnhancementRequestStatus", { enumerable: true, get: function () { return SkillsEnhancementRequestModel_1.SkillsEnhancementRequestStatus; } });
@@ -340,3 +341,15 @@ __exportStar(require("./models/ResidentialUnitRentalWorkflowModel"), exports);
340
341
  __exportStar(require("./models/ResidentialUnitRentalApprovalModel"), exports);
341
342
  __exportStar(require("./models/ResidentialUnitRentalChatModel"), exports);
342
343
  __exportStar(require("./models/ResidentialUnitRentalAttachmentModel"), exports);
344
+ // Housing Contract Renewal (CAA042)
345
+ __exportStar(require("./models/HousingContractRenewalRequestModel"), exports);
346
+ __exportStar(require("./models/HousingContractRenewalWorkflowModel"), exports);
347
+ __exportStar(require("./models/HousingContractRenewalApprovalModel"), exports);
348
+ __exportStar(require("./models/HousingContractRenewalChatModel"), exports);
349
+ __exportStar(require("./models/HousingContractRenewalAttachmentModel"), exports);
350
+ // Housing Contract Cancel
351
+ __exportStar(require("./models/HousingContractCancelRequestModel"), exports);
352
+ __exportStar(require("./models/HousingContractCancelWorkflowModel"), exports);
353
+ __exportStar(require("./models/HousingContractCancelApprovalModel"), exports);
354
+ __exportStar(require("./models/HousingContractCancelChatModel"), exports);
355
+ __exportStar(require("./models/HousingContractCancelAttachmentModel"), exports);
@@ -0,0 +1,16 @@
1
+ import { BaseModel } from "./BaseModel";
2
+ import { AnnualIncrementRequest } from "./AnnualIncrementRequestModel";
3
+ export declare class AnnualIncrementRequestEmployee extends BaseModel {
4
+ request_id: number;
5
+ service_id: number | null;
6
+ sub_service_id: number | null;
7
+ employee_name: string;
8
+ employee_id: string;
9
+ allowance_year: number;
10
+ effective_date: Date;
11
+ current_basic_salary: number | null;
12
+ increment_percentage: number | null;
13
+ new_basic_salary: number | null;
14
+ request: AnnualIncrementRequest;
15
+ constructor(request_id: number, employee_name: string, employee_id: string, allowance_year: number, effective_date: Date, service_id?: number | null, sub_service_id?: number | null, current_basic_salary?: number | null, increment_percentage?: number | null, new_basic_salary?: number | null);
16
+ }
@@ -0,0 +1,80 @@
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.AnnualIncrementRequestEmployee = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ const AnnualIncrementRequestModel_1 = require("./AnnualIncrementRequestModel");
16
+ let AnnualIncrementRequestEmployee = class AnnualIncrementRequestEmployee extends BaseModel_1.BaseModel {
17
+ constructor(request_id, employee_name, employee_id, allowance_year, effective_date, service_id, sub_service_id, current_basic_salary, increment_percentage, new_basic_salary) {
18
+ super();
19
+ this.request_id = request_id;
20
+ this.service_id = service_id ?? null;
21
+ this.sub_service_id = sub_service_id ?? null;
22
+ this.employee_name = employee_name;
23
+ this.employee_id = employee_id;
24
+ this.allowance_year = allowance_year;
25
+ this.effective_date = effective_date;
26
+ this.current_basic_salary = current_basic_salary ?? null;
27
+ this.increment_percentage = increment_percentage ?? null;
28
+ this.new_basic_salary = new_basic_salary ?? null;
29
+ }
30
+ };
31
+ exports.AnnualIncrementRequestEmployee = AnnualIncrementRequestEmployee;
32
+ __decorate([
33
+ (0, typeorm_1.Column)({ type: "integer", nullable: false }),
34
+ __metadata("design:type", Number)
35
+ ], AnnualIncrementRequestEmployee.prototype, "request_id", void 0);
36
+ __decorate([
37
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
38
+ __metadata("design:type", Object)
39
+ ], AnnualIncrementRequestEmployee.prototype, "service_id", void 0);
40
+ __decorate([
41
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
42
+ __metadata("design:type", Object)
43
+ ], AnnualIncrementRequestEmployee.prototype, "sub_service_id", void 0);
44
+ __decorate([
45
+ (0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: false }),
46
+ __metadata("design:type", String)
47
+ ], AnnualIncrementRequestEmployee.prototype, "employee_name", void 0);
48
+ __decorate([
49
+ (0, typeorm_1.Column)({ type: "varchar", length: 100, nullable: false }),
50
+ __metadata("design:type", String)
51
+ ], AnnualIncrementRequestEmployee.prototype, "employee_id", void 0);
52
+ __decorate([
53
+ (0, typeorm_1.Column)({ type: "integer", nullable: false }),
54
+ __metadata("design:type", Number)
55
+ ], AnnualIncrementRequestEmployee.prototype, "allowance_year", void 0);
56
+ __decorate([
57
+ (0, typeorm_1.Column)({ type: "date", nullable: false }),
58
+ __metadata("design:type", Date)
59
+ ], AnnualIncrementRequestEmployee.prototype, "effective_date", void 0);
60
+ __decorate([
61
+ (0, typeorm_1.Column)({ type: "decimal", precision: 10, scale: 3, nullable: true }),
62
+ __metadata("design:type", Object)
63
+ ], AnnualIncrementRequestEmployee.prototype, "current_basic_salary", void 0);
64
+ __decorate([
65
+ (0, typeorm_1.Column)({ type: "decimal", precision: 5, scale: 2, nullable: true }),
66
+ __metadata("design:type", Object)
67
+ ], AnnualIncrementRequestEmployee.prototype, "increment_percentage", void 0);
68
+ __decorate([
69
+ (0, typeorm_1.Column)({ type: "decimal", precision: 10, scale: 3, nullable: true }),
70
+ __metadata("design:type", Object)
71
+ ], AnnualIncrementRequestEmployee.prototype, "new_basic_salary", void 0);
72
+ __decorate([
73
+ (0, typeorm_1.ManyToOne)(() => AnnualIncrementRequestModel_1.AnnualIncrementRequest, { onDelete: "CASCADE" }),
74
+ (0, typeorm_1.JoinColumn)({ name: "request_id", referencedColumnName: "id" }),
75
+ __metadata("design:type", AnnualIncrementRequestModel_1.AnnualIncrementRequest)
76
+ ], AnnualIncrementRequestEmployee.prototype, "request", void 0);
77
+ exports.AnnualIncrementRequestEmployee = AnnualIncrementRequestEmployee = __decorate([
78
+ (0, typeorm_1.Entity)({ name: "annual_increment_request_employees" }),
79
+ __metadata("design:paramtypes", [Number, String, String, Number, Date, Object, Object, Object, Object, Object])
80
+ ], AnnualIncrementRequestEmployee);
@@ -20,10 +20,11 @@ export declare class AnnualIncrementRequest extends BaseModel {
20
20
  assigned_to_user_id: number | null;
21
21
  assigned_at: Date | null;
22
22
  workflow_execution_id: string | null;
23
- employee_name: string;
24
- employee_id: string;
25
- allowance_year: number;
26
- effective_date: Date;
23
+ reference_number: string | null;
24
+ employee_name: string | null;
25
+ employee_id: string | null;
26
+ allowance_year: number | null;
27
+ effective_date: Date | null;
27
28
  current_basic_salary: number | null;
28
29
  increment_percentage: number | null;
29
30
  new_basic_salary: number | null;
@@ -36,10 +36,11 @@ let AnnualIncrementRequest = class AnnualIncrementRequest extends BaseModel_1.Ba
36
36
  this.assigned_to_user_id = assigned_to_user_id || null;
37
37
  this.assigned_at = assigned_at || null;
38
38
  this.workflow_execution_id = workflow_execution_id || null;
39
- this.employee_name = employee_name || "";
40
- this.employee_id = employee_id || "";
41
- this.allowance_year = allowance_year || new Date().getFullYear();
42
- this.effective_date = effective_date || new Date();
39
+ this.reference_number = null;
40
+ this.employee_name = employee_name || null;
41
+ this.employee_id = employee_id || null;
42
+ this.allowance_year = allowance_year || null;
43
+ this.effective_date = effective_date || null;
43
44
  this.current_basic_salary = current_basic_salary || null;
44
45
  this.increment_percentage = increment_percentage || null;
45
46
  this.new_basic_salary = new_basic_salary || null;
@@ -95,20 +96,24 @@ __decorate([
95
96
  __metadata("design:type", Object)
96
97
  ], AnnualIncrementRequest.prototype, "workflow_execution_id", void 0);
97
98
  __decorate([
98
- (0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: false }),
99
- __metadata("design:type", String)
99
+ (0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
100
+ __metadata("design:type", Object)
101
+ ], AnnualIncrementRequest.prototype, "reference_number", void 0);
102
+ __decorate([
103
+ (0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
104
+ __metadata("design:type", Object)
100
105
  ], AnnualIncrementRequest.prototype, "employee_name", void 0);
101
106
  __decorate([
102
- (0, typeorm_1.Column)({ type: "varchar", length: 100, nullable: false }),
103
- __metadata("design:type", String)
107
+ (0, typeorm_1.Column)({ type: "varchar", length: 100, nullable: true }),
108
+ __metadata("design:type", Object)
104
109
  ], AnnualIncrementRequest.prototype, "employee_id", void 0);
105
110
  __decorate([
106
- (0, typeorm_1.Column)({ type: "integer", nullable: false }),
107
- __metadata("design:type", Number)
111
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
112
+ __metadata("design:type", Object)
108
113
  ], AnnualIncrementRequest.prototype, "allowance_year", void 0);
109
114
  __decorate([
110
- (0, typeorm_1.Column)({ type: "date", nullable: false }),
111
- __metadata("design:type", Date)
115
+ (0, typeorm_1.Column)({ type: "date", nullable: true }),
116
+ __metadata("design:type", Object)
112
117
  ], AnnualIncrementRequest.prototype, "effective_date", void 0);
113
118
  __decorate([
114
119
  (0, typeorm_1.Column)({ type: "decimal", precision: 10, scale: 3, nullable: true }),
@@ -20,6 +20,7 @@ export declare class CashAllowanceLeaveRequest extends BaseModel {
20
20
  assigned_to_user_id: number | null;
21
21
  assigned_at: Date | null;
22
22
  workflow_execution_id: string | null;
23
+ reference_number: string | null;
23
24
  employee_name: string;
24
25
  employee_id: string;
25
26
  job_title: string;
@@ -36,6 +36,7 @@ let CashAllowanceLeaveRequest = class CashAllowanceLeaveRequest extends BaseMode
36
36
  this.assigned_to_user_id = assigned_to_user_id || null;
37
37
  this.assigned_at = assigned_at || null;
38
38
  this.workflow_execution_id = workflow_execution_id || null;
39
+ this.reference_number = null;
39
40
  this.employee_name = employee_name || "";
40
41
  this.employee_id = employee_id || "";
41
42
  this.job_title = job_title || "";
@@ -96,6 +97,10 @@ __decorate([
96
97
  (0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
97
98
  __metadata("design:type", Object)
98
99
  ], CashAllowanceLeaveRequest.prototype, "workflow_execution_id", void 0);
100
+ __decorate([
101
+ (0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
102
+ __metadata("design:type", Object)
103
+ ], CashAllowanceLeaveRequest.prototype, "reference_number", void 0);
99
104
  __decorate([
100
105
  (0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: false }),
101
106
  __metadata("design:type", String)
@@ -0,0 +1,45 @@
1
+ import { Departments } from './DepartmentsModel';
2
+ import { UUIDBaseModel } from './UUIDBaseModel';
3
+ export declare enum DocumentType {
4
+ POLICY = "policy",
5
+ PROCEDURE = "procedure",
6
+ MANUAL = "manual",
7
+ TEMPLATE = "template",
8
+ REPORT = "report"
9
+ }
10
+ export declare enum DocumentStatus {
11
+ ACTIVE = "active",
12
+ ARCHIVED = "archived",
13
+ DRAFT = "draft"
14
+ }
15
+ export declare enum AccessLevel {
16
+ GENERAL = "general",
17
+ RESTRICTED = "restricted"
18
+ }
19
+ export declare class DocumentMetadata extends UUIDBaseModel {
20
+ title: string;
21
+ description?: string;
22
+ original_name: string;
23
+ mime_type: string;
24
+ size: number;
25
+ mongodb_file_id: string;
26
+ document_type: DocumentType;
27
+ access_level: AccessLevel;
28
+ status: DocumentStatus;
29
+ version: string;
30
+ tags: string[];
31
+ is_sensitive: boolean;
32
+ department: Departments;
33
+ department_id: number;
34
+ folder_id?: string | null;
35
+ folder_path: string;
36
+ uploaded_by: string;
37
+ uploaded_by_name?: string;
38
+ authorized_person?: string;
39
+ allowed_roles: string[];
40
+ allowed_users: string[];
41
+ download_count: number;
42
+ last_accessed_at?: Date;
43
+ metadata?: Record<string, any>;
44
+ constructor(title: string, original_name: string, mime_type: string, size: number, mongodb_file_id: string, document_type: DocumentType, department_id: number, uploaded_by: string, access_level?: AccessLevel, status?: DocumentStatus, version?: string, folder_path?: string, created_by?: string, description?: string, folder_id?: string | null, uploaded_by_name?: string, authorized_person?: string, tags?: string[], allowed_roles?: string[], allowed_users?: string[], is_sensitive?: boolean, download_count?: number, last_accessed_at?: Date, metadata?: Record<string, any>);
45
+ }
@@ -0,0 +1,171 @@
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.DocumentMetadata = exports.AccessLevel = exports.DocumentStatus = exports.DocumentType = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const DepartmentsModel_1 = require("./DepartmentsModel");
15
+ const UUIDBaseModel_1 = require("./UUIDBaseModel");
16
+ var DocumentType;
17
+ (function (DocumentType) {
18
+ DocumentType["POLICY"] = "policy";
19
+ DocumentType["PROCEDURE"] = "procedure";
20
+ DocumentType["MANUAL"] = "manual";
21
+ DocumentType["TEMPLATE"] = "template";
22
+ DocumentType["REPORT"] = "report";
23
+ })(DocumentType || (exports.DocumentType = DocumentType = {}));
24
+ var DocumentStatus;
25
+ (function (DocumentStatus) {
26
+ DocumentStatus["ACTIVE"] = "active";
27
+ DocumentStatus["ARCHIVED"] = "archived";
28
+ DocumentStatus["DRAFT"] = "draft";
29
+ })(DocumentStatus || (exports.DocumentStatus = DocumentStatus = {}));
30
+ var AccessLevel;
31
+ (function (AccessLevel) {
32
+ AccessLevel["GENERAL"] = "general";
33
+ AccessLevel["RESTRICTED"] = "restricted";
34
+ })(AccessLevel || (exports.AccessLevel = AccessLevel = {}));
35
+ let DocumentMetadata = class DocumentMetadata extends UUIDBaseModel_1.UUIDBaseModel {
36
+ constructor(title, original_name, mime_type, size, mongodb_file_id, document_type, department_id, uploaded_by, access_level = AccessLevel.GENERAL, status = DocumentStatus.ACTIVE, version = '1.0.0', folder_path = '/', created_by, description, folder_id, uploaded_by_name, authorized_person, tags, allowed_roles, allowed_users, is_sensitive = false, download_count = 0, last_accessed_at, metadata) {
37
+ super();
38
+ this.title = title;
39
+ this.original_name = original_name;
40
+ this.mime_type = mime_type;
41
+ this.size = size;
42
+ this.mongodb_file_id = mongodb_file_id;
43
+ this.document_type = document_type;
44
+ this.department_id = department_id;
45
+ this.uploaded_by = uploaded_by;
46
+ this.access_level = access_level;
47
+ this.status = status;
48
+ this.version = version;
49
+ this.folder_path = folder_path;
50
+ this.description = description;
51
+ this.folder_id = folder_id;
52
+ this.uploaded_by_name = uploaded_by_name;
53
+ this.authorized_person = authorized_person;
54
+ this.tags = tags || [];
55
+ this.allowed_roles = allowed_roles || [];
56
+ this.allowed_users = allowed_users || [];
57
+ this.is_sensitive = is_sensitive;
58
+ this.download_count = download_count;
59
+ this.last_accessed_at = last_accessed_at;
60
+ this.metadata = metadata;
61
+ if (created_by) {
62
+ this.created_by = created_by;
63
+ }
64
+ }
65
+ };
66
+ exports.DocumentMetadata = DocumentMetadata;
67
+ __decorate([
68
+ (0, typeorm_1.Column)({ type: 'varchar', length: 500 }),
69
+ (0, typeorm_1.Index)(),
70
+ __metadata("design:type", String)
71
+ ], DocumentMetadata.prototype, "title", void 0);
72
+ __decorate([
73
+ (0, typeorm_1.Column)({ type: 'text', nullable: true }),
74
+ __metadata("design:type", String)
75
+ ], DocumentMetadata.prototype, "description", void 0);
76
+ __decorate([
77
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255 }),
78
+ __metadata("design:type", String)
79
+ ], DocumentMetadata.prototype, "original_name", void 0);
80
+ __decorate([
81
+ (0, typeorm_1.Column)({ type: 'varchar', length: 100 }),
82
+ __metadata("design:type", String)
83
+ ], DocumentMetadata.prototype, "mime_type", void 0);
84
+ __decorate([
85
+ (0, typeorm_1.Column)({ type: 'bigint' }),
86
+ __metadata("design:type", Number)
87
+ ], DocumentMetadata.prototype, "size", void 0);
88
+ __decorate([
89
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, unique: true }),
90
+ __metadata("design:type", String)
91
+ ], DocumentMetadata.prototype, "mongodb_file_id", void 0);
92
+ __decorate([
93
+ (0, typeorm_1.Column)({ type: 'enum', enum: DocumentType }),
94
+ (0, typeorm_1.Index)(),
95
+ __metadata("design:type", String)
96
+ ], DocumentMetadata.prototype, "document_type", void 0);
97
+ __decorate([
98
+ (0, typeorm_1.Column)({ type: 'enum', enum: AccessLevel, default: AccessLevel.GENERAL }),
99
+ (0, typeorm_1.Index)(),
100
+ __metadata("design:type", String)
101
+ ], DocumentMetadata.prototype, "access_level", void 0);
102
+ __decorate([
103
+ (0, typeorm_1.Column)({ type: 'enum', enum: DocumentStatus, default: DocumentStatus.ACTIVE }),
104
+ (0, typeorm_1.Index)(),
105
+ __metadata("design:type", String)
106
+ ], DocumentMetadata.prototype, "status", void 0);
107
+ __decorate([
108
+ (0, typeorm_1.Column)({ type: 'varchar', length: 50, default: '1.0.0' }),
109
+ __metadata("design:type", String)
110
+ ], DocumentMetadata.prototype, "version", void 0);
111
+ __decorate([
112
+ (0, typeorm_1.Column)({ type: 'text', array: true, default: [] }),
113
+ __metadata("design:type", Array)
114
+ ], DocumentMetadata.prototype, "tags", void 0);
115
+ __decorate([
116
+ (0, typeorm_1.Column)({ type: 'boolean', default: false }),
117
+ __metadata("design:type", Boolean)
118
+ ], DocumentMetadata.prototype, "is_sensitive", void 0);
119
+ __decorate([
120
+ (0, typeorm_1.ManyToOne)('Departments', { eager: true }),
121
+ (0, typeorm_1.JoinColumn)({ name: 'department_id' }),
122
+ __metadata("design:type", DepartmentsModel_1.Departments)
123
+ ], DocumentMetadata.prototype, "department", void 0);
124
+ __decorate([
125
+ (0, typeorm_1.Column)({ type: 'integer' }),
126
+ __metadata("design:type", Number)
127
+ ], DocumentMetadata.prototype, "department_id", void 0);
128
+ __decorate([
129
+ (0, typeorm_1.Column)({ type: 'uuid', nullable: true }),
130
+ __metadata("design:type", Object)
131
+ ], DocumentMetadata.prototype, "folder_id", void 0);
132
+ __decorate([
133
+ (0, typeorm_1.Column)({ type: 'varchar', length: 500, default: '/' }),
134
+ __metadata("design:type", String)
135
+ ], DocumentMetadata.prototype, "folder_path", void 0);
136
+ __decorate([
137
+ (0, typeorm_1.Column)({ type: 'uuid' }),
138
+ __metadata("design:type", String)
139
+ ], DocumentMetadata.prototype, "uploaded_by", void 0);
140
+ __decorate([
141
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
142
+ __metadata("design:type", String)
143
+ ], DocumentMetadata.prototype, "uploaded_by_name", void 0);
144
+ __decorate([
145
+ (0, typeorm_1.Column)({ type: 'uuid', nullable: true }),
146
+ __metadata("design:type", String)
147
+ ], DocumentMetadata.prototype, "authorized_person", void 0);
148
+ __decorate([
149
+ (0, typeorm_1.Column)({ type: 'text', array: true, default: [] }),
150
+ __metadata("design:type", Array)
151
+ ], DocumentMetadata.prototype, "allowed_roles", void 0);
152
+ __decorate([
153
+ (0, typeorm_1.Column)({ type: 'text', array: true, default: [] }),
154
+ __metadata("design:type", Array)
155
+ ], DocumentMetadata.prototype, "allowed_users", void 0);
156
+ __decorate([
157
+ (0, typeorm_1.Column)({ type: 'int', default: 0 }),
158
+ __metadata("design:type", Number)
159
+ ], DocumentMetadata.prototype, "download_count", void 0);
160
+ __decorate([
161
+ (0, typeorm_1.Column)({ type: 'timestamp', nullable: true }),
162
+ __metadata("design:type", Date)
163
+ ], DocumentMetadata.prototype, "last_accessed_at", void 0);
164
+ __decorate([
165
+ (0, typeorm_1.Column)({ type: 'jsonb', nullable: true }),
166
+ __metadata("design:type", Object)
167
+ ], DocumentMetadata.prototype, "metadata", void 0);
168
+ exports.DocumentMetadata = DocumentMetadata = __decorate([
169
+ (0, typeorm_1.Entity)({ name: 'document_metadata' }),
170
+ __metadata("design:paramtypes", [String, String, String, Number, String, String, Number, String, String, String, String, String, String, String, Object, String, String, Array, Array, Array, Boolean, Number, Date, Object])
171
+ ], DocumentMetadata);
@@ -0,0 +1,13 @@
1
+ import { BaseModel } from './BaseModel';
2
+ /**
3
+ * Documentation Service specific department configuration
4
+ * Links departments with authorized persons for document management
5
+ */
6
+ export declare class DocumentationDepartments extends BaseModel {
7
+ department_id: number;
8
+ authorized_person_id: string;
9
+ authorized_person_name?: string;
10
+ authorized_person_email?: string;
11
+ is_active: boolean;
12
+ constructor(department_id: number, authorized_person_id: string, authorized_person_name: string, authorized_person_email: string, is_active?: boolean);
13
+ }
@@ -0,0 +1,53 @@
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.DocumentationDepartments = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ /**
16
+ * Documentation Service specific department configuration
17
+ * Links departments with authorized persons for document management
18
+ */
19
+ let DocumentationDepartments = class DocumentationDepartments extends BaseModel_1.BaseModel {
20
+ constructor(department_id, authorized_person_id, authorized_person_name, authorized_person_email, is_active = true) {
21
+ super();
22
+ this.department_id = department_id;
23
+ this.authorized_person_id = authorized_person_id;
24
+ this.authorized_person_name = authorized_person_name;
25
+ this.authorized_person_email = authorized_person_email;
26
+ this.is_active = is_active;
27
+ }
28
+ };
29
+ exports.DocumentationDepartments = DocumentationDepartments;
30
+ __decorate([
31
+ (0, typeorm_1.Column)({ type: 'integer' }),
32
+ __metadata("design:type", Number)
33
+ ], DocumentationDepartments.prototype, "department_id", void 0);
34
+ __decorate([
35
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255 }),
36
+ __metadata("design:type", String)
37
+ ], DocumentationDepartments.prototype, "authorized_person_id", void 0);
38
+ __decorate([
39
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
40
+ __metadata("design:type", String)
41
+ ], DocumentationDepartments.prototype, "authorized_person_name", void 0);
42
+ __decorate([
43
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
44
+ __metadata("design:type", String)
45
+ ], DocumentationDepartments.prototype, "authorized_person_email", void 0);
46
+ __decorate([
47
+ (0, typeorm_1.Column)({ type: 'boolean', default: true }),
48
+ __metadata("design:type", Boolean)
49
+ ], DocumentationDepartments.prototype, "is_active", void 0);
50
+ exports.DocumentationDepartments = DocumentationDepartments = __decorate([
51
+ (0, typeorm_1.Entity)({ name: 'documentation_departments' }),
52
+ __metadata("design:paramtypes", [Number, String, String, String, Boolean])
53
+ ], DocumentationDepartments);
@@ -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
+ }