@platform-modules/civil-aviation-authority 2.1.40 → 2.2.21

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 (119) hide show
  1. package/dist/data-source.d.ts +4 -0
  2. package/dist/data-source.js +116 -0
  3. package/dist/helpers/utils/enum.d.ts +75 -0
  4. package/dist/helpers/utils/enum.js +53 -0
  5. package/dist/index.d.ts +45 -0
  6. package/dist/index.js +65 -0
  7. package/dist/models/BaseModel.d.ts +14 -0
  8. package/dist/models/BaseModel.js +66 -0
  9. package/dist/models/CAAServices.d.ts +8 -0
  10. package/dist/models/CAAServices.js +44 -0
  11. package/dist/models/CAASubServices.d.ts +11 -0
  12. package/dist/models/CAASubServices.js +55 -0
  13. package/dist/models/DelegateSettingsModel.d.ts +9 -0
  14. package/dist/models/DelegateSettingsModel.js +50 -0
  15. package/dist/models/DepartmentsModel.d.ts +7 -0
  16. package/dist/models/DepartmentsModel.js +39 -0
  17. package/dist/models/DirectorateModel.d.ts +7 -0
  18. package/dist/models/DirectorateModel.js +39 -0
  19. package/dist/models/HotelApprovalModel.d.ts +22 -0
  20. package/dist/models/HotelApprovalModel.js +91 -0
  21. package/dist/models/HotelAttachedModel.d.ts +14 -0
  22. package/dist/models/HotelAttachedModel.js +74 -0
  23. package/dist/models/HotelChatModel.d.ts +17 -0
  24. package/dist/models/HotelChatModel.js +67 -0
  25. package/dist/models/HotelWorkFlowModel.d.ts +14 -0
  26. package/dist/models/HotelWorkFlowModel.js +56 -0
  27. package/dist/models/HotelreservationModal.d.ts +30 -0
  28. package/dist/models/HotelreservationModal.js +119 -0
  29. package/dist/models/HotelreservationModel.d.ts +45 -0
  30. package/dist/models/HotelreservationModel.js +177 -0
  31. package/dist/models/ITApprovalSettings.d.ts +7 -0
  32. package/dist/models/ITApprovalSettings.js +40 -0
  33. package/dist/models/ITHelpDeskModel.d.ts +33 -0
  34. package/dist/models/ITHelpDeskModel.js +136 -0
  35. package/dist/models/ITRequestAttachmentModel.d.ts +17 -0
  36. package/dist/models/ITRequestAttachmentModel.js +81 -0
  37. package/dist/models/ITRequestChatModel.d.ts +12 -0
  38. package/dist/models/ITRequestChatModel.js +56 -0
  39. package/dist/models/ITServicesTypesMuscatModel.d.ts +6 -0
  40. package/dist/models/ITServicesTypesMuscatModel.js +34 -0
  41. package/dist/models/ITServicesTypesSalalahModel.d.ts +6 -0
  42. package/dist/models/ITServicesTypesSalalahModel.js +34 -0
  43. package/dist/models/ItApprovalsModel.d.ts +21 -0
  44. package/dist/models/ItApprovalsModel.js +90 -0
  45. package/dist/models/ItWorkflowModel.d.ts +15 -0
  46. package/dist/models/ItWorkflowModel.js +61 -0
  47. package/dist/models/LogisticsApprovalModel.d.ts +22 -0
  48. package/dist/models/LogisticsApprovalModel.js +91 -0
  49. package/dist/models/LogisticsAttachmentModel.d.ts +12 -0
  50. package/dist/models/LogisticsAttachmentModel.js +64 -0
  51. package/dist/models/LogisticsChatModel.d.ts +17 -0
  52. package/dist/models/LogisticsChatModel.js +67 -0
  53. package/dist/models/LogisticsForeignVehicleModel.d.ts +42 -0
  54. package/dist/models/LogisticsForeignVehicleModel.js +153 -0
  55. package/dist/models/LogisticsForeignVehiclePassengerModel.d.ts +6 -0
  56. package/dist/models/LogisticsForeignVehiclePassengerModel.js +34 -0
  57. package/dist/models/LogisticsModel.d.ts +57 -0
  58. package/dist/models/LogisticsModel.js +195 -0
  59. package/dist/models/LogisticsWorkflowModel.d.ts +14 -0
  60. package/dist/models/LogisticsWorkflowModel.js +56 -0
  61. package/dist/models/NotificationModel.d.ts +23 -0
  62. package/dist/models/NotificationModel.js +92 -0
  63. package/dist/models/PortalFeedbackModel.d.ts +8 -0
  64. package/dist/models/PortalFeedbackModel.js +44 -0
  65. package/dist/models/PositionModel.d.ts +6 -0
  66. package/dist/models/PositionModel.js +34 -0
  67. package/dist/models/SectionModel.d.ts +8 -0
  68. package/dist/models/SectionModel.js +44 -0
  69. package/dist/models/ServiceTypeModel.d.ts +14 -0
  70. package/dist/models/ServiceTypeModel.js +66 -0
  71. package/dist/models/VpnApprovalModel.d.ts +21 -0
  72. package/dist/models/VpnApprovalModel.js +87 -0
  73. package/dist/models/VpnRequestAttachmentModel.d.ts +11 -0
  74. package/dist/models/VpnRequestAttachmentModel.js +59 -0
  75. package/dist/models/VpnRequestChatModel.d.ts +16 -0
  76. package/dist/models/VpnRequestChatModel.js +62 -0
  77. package/dist/models/VpnRequestModel.d.ts +70 -0
  78. package/dist/models/VpnRequestModel.js +175 -0
  79. package/dist/models/VpnWorkflowModel.d.ts +13 -0
  80. package/dist/models/VpnWorkflowModel.js +55 -0
  81. package/dist/models/WorkflowDefinitions.d.ts +16 -0
  82. package/dist/models/WorkflowDefinitions.js +86 -0
  83. package/dist/models/WorkflowHierarchy.d.ts +17 -0
  84. package/dist/models/WorkflowHierarchy.js +86 -0
  85. package/dist/models/WorkflowTask.d.ts +13 -0
  86. package/dist/models/WorkflowTask.js +78 -0
  87. package/dist/models/WorkflowTaskNames.d.ts +17 -0
  88. package/dist/models/WorkflowTaskNames.js +63 -0
  89. package/dist/models/Workflows.d.ts +0 -0
  90. package/dist/models/Workflows.js +31 -0
  91. package/dist/models/contactInfoModel.d.ts +18 -0
  92. package/dist/models/contactInfoModel.js +80 -0
  93. package/dist/models/feedbackModel.d.ts +16 -0
  94. package/dist/models/feedbackModel.js +61 -0
  95. package/dist/models/importantLinksModel.d.ts +6 -0
  96. package/dist/models/importantLinksModel.js +34 -0
  97. package/dist/models/role.d.ts +16 -0
  98. package/dist/models/role.js +44 -0
  99. package/dist/models/roleRightsModel.d.ts +16 -0
  100. package/dist/models/roleRightsModel.js +44 -0
  101. package/dist/models/serviceBookmarksModel.d.ts +6 -0
  102. package/dist/models/serviceBookmarksModel.js +34 -0
  103. package/dist/models/user-sessions.d.ts +18 -0
  104. package/dist/models/user-sessions.js +54 -0
  105. package/dist/models/user.d.ts +47 -0
  106. package/dist/models/user.js +238 -0
  107. package/dist/models/userRolesModel.d.ts +19 -0
  108. package/dist/models/userRolesModel.js +59 -0
  109. package/dist/scripts.d.ts +1 -0
  110. package/dist/scripts.js +11 -0
  111. package/package.json +1 -1
  112. package/src/data-source.ts +11 -1
  113. package/src/index.ts +5 -0
  114. package/src/models/HotelApprovalModel.ts +79 -0
  115. package/src/models/HotelAttachedModel.ts +64 -0
  116. package/src/models/HotelChatModel.ts +55 -0
  117. package/src/models/HotelWorkFlowModel.ts +42 -0
  118. package/src/models/HotelreservationModel.ts +166 -0
  119. package/src/models/ServiceTypeModel.ts +1 -21
@@ -0,0 +1,175 @@
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.VpnRequest = exports.VpnRequestStatus = exports.VpnDeviceType = exports.VpnAccessType = exports.VpnSourceIpType = exports.VpnSystemsAccess = exports.VpnReasonForRequest = exports.VpnRequestType = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ var VpnRequestType;
16
+ (function (VpnRequestType) {
17
+ VpnRequestType["CAA_STAFF"] = "CAA_STAFF";
18
+ VpnRequestType["CONTRACTOR"] = "CONTRACTOR";
19
+ })(VpnRequestType || (exports.VpnRequestType = VpnRequestType = {}));
20
+ var VpnReasonForRequest;
21
+ (function (VpnReasonForRequest) {
22
+ VpnReasonForRequest["REMOTE_WORK"] = "REMOTE_WORK";
23
+ VpnReasonForRequest["ACCESS_INTERNAL_SYSTEMS"] = "ACCESS_INTERNAL_SYSTEMS";
24
+ VpnReasonForRequest["THIRD_PARTY_VENDOR"] = "THIRD_PARTY_VENDOR";
25
+ VpnReasonForRequest["PROJECT_SPECIFIC"] = "PROJECT_SPECIFIC";
26
+ VpnReasonForRequest["RENEWAL"] = "RENEWAL";
27
+ })(VpnReasonForRequest || (exports.VpnReasonForRequest = VpnReasonForRequest = {}));
28
+ var VpnSystemsAccess;
29
+ (function (VpnSystemsAccess) {
30
+ VpnSystemsAccess["INTERNAL_DATABASES"] = "INTERNAL_DATABASES";
31
+ VpnSystemsAccess["FILE_SERVERS"] = "FILE_SERVERS";
32
+ VpnSystemsAccess["SHARED_SERVERS"] = "SHARED_SERVERS";
33
+ VpnSystemsAccess["UFUQ"] = "UFUQ";
34
+ VpnSystemsAccess["ERP"] = "ERP";
35
+ VpnSystemsAccess["OTHERS"] = "OTHERS";
36
+ })(VpnSystemsAccess || (exports.VpnSystemsAccess = VpnSystemsAccess = {}));
37
+ var VpnSourceIpType;
38
+ (function (VpnSourceIpType) {
39
+ VpnSourceIpType["PRIVATE"] = "PRIVATE";
40
+ VpnSourceIpType["PUBLIC"] = "PUBLIC";
41
+ })(VpnSourceIpType || (exports.VpnSourceIpType = VpnSourceIpType = {}));
42
+ var VpnAccessType;
43
+ (function (VpnAccessType) {
44
+ VpnAccessType["ONE_TIME"] = "ONE_TIME";
45
+ VpnAccessType["PERMANENT"] = "PERMANENT";
46
+ })(VpnAccessType || (exports.VpnAccessType = VpnAccessType = {}));
47
+ var VpnDeviceType;
48
+ (function (VpnDeviceType) {
49
+ VpnDeviceType["CAA_LAPTOP"] = "CAA_LAPTOP";
50
+ VpnDeviceType["PERSONAL_DEVICE"] = "PERSONAL_DEVICE";
51
+ VpnDeviceType["MOBILE_DEVICE"] = "MOBILE_DEVICE";
52
+ })(VpnDeviceType || (exports.VpnDeviceType = VpnDeviceType = {}));
53
+ var VpnRequestStatus;
54
+ (function (VpnRequestStatus) {
55
+ VpnRequestStatus["PENDING"] = "PENDING";
56
+ VpnRequestStatus["ASSIGNED"] = "ASSIGNED";
57
+ VpnRequestStatus["IN_PROGRESS"] = "IN_PROGRESS";
58
+ VpnRequestStatus["COMPLETED"] = "COMPLETED";
59
+ VpnRequestStatus["APPROVED"] = "APPROVED";
60
+ VpnRequestStatus["REJECTED"] = "REJECTED";
61
+ })(VpnRequestStatus || (exports.VpnRequestStatus = VpnRequestStatus = {}));
62
+ let VpnRequest = class VpnRequest extends BaseModel_1.BaseModel {
63
+ };
64
+ exports.VpnRequest = VpnRequest;
65
+ __decorate([
66
+ (0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: false }),
67
+ __metadata("design:type", String)
68
+ ], VpnRequest.prototype, "job_title", void 0);
69
+ __decorate([
70
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
71
+ __metadata("design:type", Object)
72
+ ], VpnRequest.prototype, "req_user_department_id", void 0);
73
+ __decorate([
74
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
75
+ __metadata("design:type", Object)
76
+ ], VpnRequest.prototype, "req_user_section_id", void 0);
77
+ __decorate([
78
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
79
+ __metadata("design:type", Object)
80
+ ], VpnRequest.prototype, "req_user_position_id", void 0);
81
+ __decorate([
82
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
83
+ __metadata("design:type", Object)
84
+ ], VpnRequest.prototype, "service_id", void 0);
85
+ __decorate([
86
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
87
+ __metadata("design:type", Object)
88
+ ], VpnRequest.prototype, "sub_service_id", void 0);
89
+ __decorate([
90
+ (0, typeorm_1.Column)({ type: "integer", nullable: false }),
91
+ __metadata("design:type", Number)
92
+ ], VpnRequest.prototype, "user_id", void 0);
93
+ __decorate([
94
+ (0, typeorm_1.Column)({ type: "enum", enum: VpnRequestType, nullable: false }),
95
+ __metadata("design:type", String)
96
+ ], VpnRequest.prototype, "request_for", void 0);
97
+ __decorate([
98
+ (0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: false }),
99
+ __metadata("design:type", String)
100
+ ], VpnRequest.prototype, "employee_identifier", void 0);
101
+ __decorate([
102
+ (0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: false }),
103
+ __metadata("design:type", String)
104
+ ], VpnRequest.prototype, "employee_email", void 0);
105
+ __decorate([
106
+ (0, typeorm_1.Column)({ type: "varchar", length: 50, nullable: false }),
107
+ __metadata("design:type", String)
108
+ ], VpnRequest.prototype, "phone_number", void 0);
109
+ __decorate([
110
+ (0, typeorm_1.Column)({ type: "text", array: true, nullable: false }),
111
+ __metadata("design:type", Array)
112
+ ], VpnRequest.prototype, "reason_for_request", void 0);
113
+ __decorate([
114
+ (0, typeorm_1.Column)({ type: "text", nullable: true }),
115
+ __metadata("design:type", Object)
116
+ ], VpnRequest.prototype, "description", void 0);
117
+ __decorate([
118
+ (0, typeorm_1.Column)({ type: "text", array: true, nullable: false }),
119
+ __metadata("design:type", Array)
120
+ ], VpnRequest.prototype, "systems_to_access", void 0);
121
+ __decorate([
122
+ (0, typeorm_1.Column)({ type: "enum", enum: VpnSourceIpType, nullable: true }),
123
+ __metadata("design:type", Object)
124
+ ], VpnRequest.prototype, "source_ip_type", void 0);
125
+ __decorate([
126
+ (0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
127
+ __metadata("design:type", Object)
128
+ ], VpnRequest.prototype, "source_ip_address", void 0);
129
+ __decorate([
130
+ (0, typeorm_1.Column)({ type: "varchar", length: 150, nullable: false }),
131
+ __metadata("design:type", String)
132
+ ], VpnRequest.prototype, "country", void 0);
133
+ __decorate([
134
+ (0, typeorm_1.Column)({ type: "date", nullable: false }),
135
+ __metadata("design:type", Date)
136
+ ], VpnRequest.prototype, "start_date", void 0);
137
+ __decorate([
138
+ (0, typeorm_1.Column)({ type: "date", nullable: true }),
139
+ __metadata("design:type", Object)
140
+ ], VpnRequest.prototype, "end_date", void 0);
141
+ __decorate([
142
+ (0, typeorm_1.Column)({ type: "enum", enum: VpnAccessType, nullable: false }),
143
+ __metadata("design:type", String)
144
+ ], VpnRequest.prototype, "access_type", void 0);
145
+ __decorate([
146
+ (0, typeorm_1.Column)({ type: "text", array: true, nullable: false }),
147
+ __metadata("design:type", Array)
148
+ ], VpnRequest.prototype, "device_type", void 0);
149
+ __decorate([
150
+ (0, typeorm_1.Column)({ type: "boolean", default: false, nullable: false }),
151
+ __metadata("design:type", Boolean)
152
+ ], VpnRequest.prototype, "acknowledgement", void 0);
153
+ __decorate([
154
+ (0, typeorm_1.Column)({ type: "enum", enum: VpnRequestStatus, default: VpnRequestStatus.PENDING, nullable: false }),
155
+ __metadata("design:type", String)
156
+ ], VpnRequest.prototype, "status", void 0);
157
+ __decorate([
158
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
159
+ __metadata("design:type", Object)
160
+ ], VpnRequest.prototype, "reviewer_user_id", void 0);
161
+ __decorate([
162
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
163
+ __metadata("design:type", Object)
164
+ ], VpnRequest.prototype, "assigned_to_user_id", void 0);
165
+ __decorate([
166
+ (0, typeorm_1.Column)({ type: "timestamp", nullable: true }),
167
+ __metadata("design:type", Object)
168
+ ], VpnRequest.prototype, "assigned_at", void 0);
169
+ __decorate([
170
+ (0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
171
+ __metadata("design:type", Object)
172
+ ], VpnRequest.prototype, "workflow_execution_id", void 0);
173
+ exports.VpnRequest = VpnRequest = __decorate([
174
+ (0, typeorm_1.Entity)({ name: "vpn_requests" })
175
+ ], VpnRequest);
@@ -0,0 +1,13 @@
1
+ import { BaseModel } from "./BaseModel";
2
+ export declare enum VpnWorkFlowStatus {
3
+ COMPLETED = "Completed",
4
+ NOT_YET_STARTED = "Not Yet Started",
5
+ PENDING = "Pending"
6
+ }
7
+ export declare class VpnWorkFlow extends BaseModel {
8
+ request_id: number;
9
+ order: number | null;
10
+ content: string;
11
+ status: VpnWorkFlowStatus;
12
+ constructor(request_id: number, content: string, status: VpnWorkFlowStatus, order?: number);
13
+ }
@@ -0,0 +1,55 @@
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.VpnWorkFlow = exports.VpnWorkFlowStatus = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ var VpnWorkFlowStatus;
16
+ (function (VpnWorkFlowStatus) {
17
+ VpnWorkFlowStatus["COMPLETED"] = "Completed";
18
+ VpnWorkFlowStatus["NOT_YET_STARTED"] = "Not Yet Started";
19
+ VpnWorkFlowStatus["PENDING"] = "Pending";
20
+ })(VpnWorkFlowStatus || (exports.VpnWorkFlowStatus = VpnWorkFlowStatus = {}));
21
+ let VpnWorkFlow = class VpnWorkFlow extends BaseModel_1.BaseModel {
22
+ constructor(request_id, content, status, order) {
23
+ super();
24
+ this.request_id = request_id;
25
+ this.content = content;
26
+ this.status = status;
27
+ this.order = order || null;
28
+ }
29
+ };
30
+ exports.VpnWorkFlow = VpnWorkFlow;
31
+ __decorate([
32
+ (0, typeorm_1.Column)({ type: "int", nullable: false }),
33
+ __metadata("design:type", Number)
34
+ ], VpnWorkFlow.prototype, "request_id", void 0);
35
+ __decorate([
36
+ (0, typeorm_1.Column)({ type: "int", nullable: true }),
37
+ __metadata("design:type", Object)
38
+ ], VpnWorkFlow.prototype, "order", void 0);
39
+ __decorate([
40
+ (0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: false }),
41
+ __metadata("design:type", String)
42
+ ], VpnWorkFlow.prototype, "content", void 0);
43
+ __decorate([
44
+ (0, typeorm_1.Column)({
45
+ type: "enum",
46
+ enum: VpnWorkFlowStatus,
47
+ default: VpnWorkFlowStatus.NOT_YET_STARTED,
48
+ nullable: false
49
+ }),
50
+ __metadata("design:type", String)
51
+ ], VpnWorkFlow.prototype, "status", void 0);
52
+ exports.VpnWorkFlow = VpnWorkFlow = __decorate([
53
+ (0, typeorm_1.Entity)({ name: "vpn_work_flows" }),
54
+ __metadata("design:paramtypes", [Number, String, String, Number])
55
+ ], VpnWorkFlow);
@@ -0,0 +1,16 @@
1
+ import { BaseModel } from './BaseModel';
2
+ import { CAAServices } from './CAAServices';
3
+ import { CAASubServices } from './CAASubServices';
4
+ export declare class WorkflowDefinitions extends BaseModel {
5
+ name: string;
6
+ description: string;
7
+ version: number;
8
+ is_active: boolean;
9
+ service_type: 'internal' | 'external' | 'none';
10
+ service_id: number | null;
11
+ service: CAAServices;
12
+ sub_service_id: number | null;
13
+ sub_service: CAASubServices;
14
+ status: 'draft' | 'published';
15
+ constructor(name: string, description?: string, version?: number, is_active?: boolean, service_id?: number | null, sub_service_id?: number | null, status?: 'draft' | 'published', service_type?: 'internal' | 'external' | 'none');
16
+ }
@@ -0,0 +1,86 @@
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.WorkflowDefinitions = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ const CAAServices_1 = require("./CAAServices");
16
+ const CAASubServices_1 = require("./CAASubServices");
17
+ let WorkflowDefinitions = class WorkflowDefinitions extends BaseModel_1.BaseModel {
18
+ constructor(name, description, version, is_active, service_id, sub_service_id, status, service_type) {
19
+ super();
20
+ this.name = name;
21
+ this.description = description || '';
22
+ this.version = version || 1;
23
+ this.is_active = is_active !== undefined ? is_active : true;
24
+ this.service_id = service_id || null;
25
+ this.sub_service_id = sub_service_id || null;
26
+ this.status = status || 'draft';
27
+ this.service_type = service_type || 'none';
28
+ }
29
+ };
30
+ exports.WorkflowDefinitions = WorkflowDefinitions;
31
+ __decorate([
32
+ (0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: false }),
33
+ __metadata("design:type", String)
34
+ ], WorkflowDefinitions.prototype, "name", void 0);
35
+ __decorate([
36
+ (0, typeorm_1.Column)({ type: 'text', nullable: true }),
37
+ __metadata("design:type", String)
38
+ ], WorkflowDefinitions.prototype, "description", void 0);
39
+ __decorate([
40
+ (0, typeorm_1.Column)({ type: 'integer', default: 1 }),
41
+ __metadata("design:type", Number)
42
+ ], WorkflowDefinitions.prototype, "version", void 0);
43
+ __decorate([
44
+ (0, typeorm_1.Column)({ type: 'boolean', default: true }),
45
+ __metadata("design:type", Boolean)
46
+ ], WorkflowDefinitions.prototype, "is_active", void 0);
47
+ __decorate([
48
+ (0, typeorm_1.Column)({
49
+ type: 'varchar',
50
+ length: 20,
51
+ nullable: true,
52
+ enum: ['internal', 'external', 'none']
53
+ }),
54
+ __metadata("design:type", String)
55
+ ], WorkflowDefinitions.prototype, "service_type", void 0);
56
+ __decorate([
57
+ (0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
58
+ __metadata("design:type", Object)
59
+ ], WorkflowDefinitions.prototype, "service_id", void 0);
60
+ __decorate([
61
+ (0, typeorm_1.ManyToOne)(() => CAAServices_1.CAAServices),
62
+ (0, typeorm_1.JoinColumn)({ name: 'service_id' }),
63
+ __metadata("design:type", CAAServices_1.CAAServices)
64
+ ], WorkflowDefinitions.prototype, "service", void 0);
65
+ __decorate([
66
+ (0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
67
+ __metadata("design:type", Object)
68
+ ], WorkflowDefinitions.prototype, "sub_service_id", void 0);
69
+ __decorate([
70
+ (0, typeorm_1.ManyToOne)(() => CAASubServices_1.CAASubServices),
71
+ (0, typeorm_1.JoinColumn)({ name: 'sub_service_id' }),
72
+ __metadata("design:type", CAASubServices_1.CAASubServices)
73
+ ], WorkflowDefinitions.prototype, "sub_service", void 0);
74
+ __decorate([
75
+ (0, typeorm_1.Column)({
76
+ type: 'varchar',
77
+ length: 20,
78
+ default: 'draft',
79
+ enum: ['draft', 'published']
80
+ }),
81
+ __metadata("design:type", String)
82
+ ], WorkflowDefinitions.prototype, "status", void 0);
83
+ exports.WorkflowDefinitions = WorkflowDefinitions = __decorate([
84
+ (0, typeorm_1.Entity)({ name: 'workflow_definitions' }),
85
+ __metadata("design:paramtypes", [String, String, Number, Boolean, Object, Object, String, String])
86
+ ], WorkflowDefinitions);
@@ -0,0 +1,17 @@
1
+ import { BaseModel } from './BaseModel';
2
+ import { WorkflowDefinitions } from './WorkflowDefinitions';
3
+ export declare class WorkflowHierarchy extends BaseModel {
4
+ workflow_definition_id: number;
5
+ department_id: number;
6
+ section_id: number;
7
+ approval_role_id: number;
8
+ approval_user_id: number;
9
+ taskname: string | null;
10
+ status: string | null;
11
+ task: any | null;
12
+ step_order: number;
13
+ is_required: boolean;
14
+ task_type: string | null;
15
+ workflow_definition: WorkflowDefinitions;
16
+ constructor(workflow_definition_id: number, department_id: number, section_id: number, approval_role_id: number, approval_user_id: number, step_order: number, is_required?: boolean, taskname?: string, status?: string, task?: any, task_type?: string);
17
+ }
@@ -0,0 +1,86 @@
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.WorkflowHierarchy = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ const WorkflowDefinitions_1 = require("./WorkflowDefinitions");
16
+ let WorkflowHierarchy = class WorkflowHierarchy extends BaseModel_1.BaseModel {
17
+ constructor(workflow_definition_id, department_id, section_id, approval_role_id, approval_user_id, step_order, is_required, taskname, status, task, task_type) {
18
+ super();
19
+ this.workflow_definition_id = workflow_definition_id;
20
+ this.department_id = department_id;
21
+ this.section_id = section_id;
22
+ this.approval_role_id = approval_role_id;
23
+ this.approval_user_id = approval_user_id;
24
+ this.step_order = step_order;
25
+ this.is_required = is_required !== undefined ? is_required : true;
26
+ this.taskname = taskname || null;
27
+ this.status = status || null;
28
+ this.task = task || null;
29
+ this.task_type = task_type || null;
30
+ }
31
+ };
32
+ exports.WorkflowHierarchy = WorkflowHierarchy;
33
+ __decorate([
34
+ (0, typeorm_1.Column)({ type: 'integer', nullable: false }),
35
+ __metadata("design:type", Number)
36
+ ], WorkflowHierarchy.prototype, "workflow_definition_id", void 0);
37
+ __decorate([
38
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
39
+ __metadata("design:type", Number)
40
+ ], WorkflowHierarchy.prototype, "department_id", void 0);
41
+ __decorate([
42
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
43
+ __metadata("design:type", Number)
44
+ ], WorkflowHierarchy.prototype, "section_id", void 0);
45
+ __decorate([
46
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
47
+ __metadata("design:type", Number)
48
+ ], WorkflowHierarchy.prototype, "approval_role_id", void 0);
49
+ __decorate([
50
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
51
+ __metadata("design:type", Number)
52
+ ], WorkflowHierarchy.prototype, "approval_user_id", void 0);
53
+ __decorate([
54
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
55
+ __metadata("design:type", Object)
56
+ ], WorkflowHierarchy.prototype, "taskname", void 0);
57
+ __decorate([
58
+ (0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: true }),
59
+ __metadata("design:type", Object)
60
+ ], WorkflowHierarchy.prototype, "status", void 0);
61
+ __decorate([
62
+ (0, typeorm_1.Column)({ type: 'jsonb', nullable: true }),
63
+ __metadata("design:type", Object)
64
+ ], WorkflowHierarchy.prototype, "task", void 0);
65
+ __decorate([
66
+ (0, typeorm_1.Column)({ type: 'integer', nullable: false }),
67
+ __metadata("design:type", Number)
68
+ ], WorkflowHierarchy.prototype, "step_order", void 0);
69
+ __decorate([
70
+ (0, typeorm_1.Column)({ type: 'boolean', default: true }),
71
+ __metadata("design:type", Boolean)
72
+ ], WorkflowHierarchy.prototype, "is_required", void 0);
73
+ __decorate([
74
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
75
+ __metadata("design:type", Object)
76
+ ], WorkflowHierarchy.prototype, "task_type", void 0);
77
+ __decorate([
78
+ (0, typeorm_1.ManyToOne)(() => WorkflowDefinitions_1.WorkflowDefinitions, { onDelete: 'CASCADE' }),
79
+ (0, typeorm_1.JoinColumn)({ name: 'workflow_definition_id' }),
80
+ __metadata("design:type", WorkflowDefinitions_1.WorkflowDefinitions)
81
+ ], WorkflowHierarchy.prototype, "workflow_definition", void 0);
82
+ exports.WorkflowHierarchy = WorkflowHierarchy = __decorate([
83
+ (0, typeorm_1.Entity)({ name: 'workflow_hierarchy' }),
84
+ (0, typeorm_1.Unique)(['workflow_definition_id', 'step_order']),
85
+ __metadata("design:paramtypes", [Number, Number, Number, Number, Number, Number, Boolean, String, String, Object, String])
86
+ ], WorkflowHierarchy);
@@ -0,0 +1,13 @@
1
+ import { BaseModel } from './BaseModel';
2
+ import { TaskType } from "./WorkflowTaskNames";
3
+ import { CategoryType } from "./WorkflowTaskNames";
4
+ export declare class WorkflowTask extends BaseModel {
5
+ task_id: number;
6
+ name: string;
7
+ service_id?: number | null;
8
+ sub_service_id?: number | null;
9
+ service_type?: string | null;
10
+ task_type: TaskType;
11
+ category: CategoryType;
12
+ constructor(name: string, task_id?: number, task_type?: TaskType, category?: CategoryType, service_id?: number | null, sub_service_id?: number | null, service_type?: string | null);
13
+ }
@@ -0,0 +1,78 @@
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.WorkflowTask = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ const WorkflowTaskNames_1 = require("./WorkflowTaskNames");
16
+ const WorkflowTaskNames_2 = require("./WorkflowTaskNames");
17
+ // export enum TaskNameType {
18
+ // SIMPLE = 'SIMPLE',
19
+ // HUMAN = 'HUMAN'
20
+ // }
21
+ // export enum CategoryNameType {
22
+ // CREATE = 'CREATE',
23
+ // APPROVAL = 'APPROVAL',
24
+ // NOTIFICATION = 'NOTIFICATION'
25
+ // }
26
+ let WorkflowTask = class WorkflowTask extends BaseModel_1.BaseModel {
27
+ constructor(name, task_id, task_type, category, service_id, sub_service_id, service_type) {
28
+ super();
29
+ this.name = name;
30
+ this.task_id = task_id || 0;
31
+ this.task_type = task_type || WorkflowTaskNames_1.TaskType.SIMPLE;
32
+ this.category = category || WorkflowTaskNames_2.CategoryType.CREATE;
33
+ this.service_id = service_id ?? null;
34
+ this.sub_service_id = sub_service_id ?? null;
35
+ this.service_type = service_type ?? null;
36
+ }
37
+ };
38
+ exports.WorkflowTask = WorkflowTask;
39
+ __decorate([
40
+ (0, typeorm_1.PrimaryGeneratedColumn)(),
41
+ __metadata("design:type", Number)
42
+ ], WorkflowTask.prototype, "task_id", void 0);
43
+ __decorate([
44
+ (0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: false }),
45
+ __metadata("design:type", String)
46
+ ], WorkflowTask.prototype, "name", void 0);
47
+ __decorate([
48
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
49
+ __metadata("design:type", Object)
50
+ ], WorkflowTask.prototype, "service_id", void 0);
51
+ __decorate([
52
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
53
+ __metadata("design:type", Object)
54
+ ], WorkflowTask.prototype, "sub_service_id", void 0);
55
+ __decorate([
56
+ (0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: true }),
57
+ __metadata("design:type", Object)
58
+ ], WorkflowTask.prototype, "service_type", void 0);
59
+ __decorate([
60
+ (0, typeorm_1.Column)({
61
+ type: 'enum',
62
+ enum: WorkflowTaskNames_1.TaskType,
63
+ nullable: true
64
+ }),
65
+ __metadata("design:type", String)
66
+ ], WorkflowTask.prototype, "task_type", void 0);
67
+ __decorate([
68
+ (0, typeorm_1.Column)({
69
+ type: 'enum',
70
+ enum: WorkflowTaskNames_2.CategoryType,
71
+ nullable: true
72
+ }),
73
+ __metadata("design:type", String)
74
+ ], WorkflowTask.prototype, "category", void 0);
75
+ exports.WorkflowTask = WorkflowTask = __decorate([
76
+ (0, typeorm_1.Entity)({ name: 'workflow_tasks' }),
77
+ __metadata("design:paramtypes", [String, Number, String, String, Object, Object, Object])
78
+ ], WorkflowTask);
@@ -0,0 +1,17 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare enum TaskType {
3
+ SIMPLE = "SIMPLE",
4
+ HUMAN = "HUMAN"
5
+ }
6
+ export declare enum CategoryType {
7
+ CREATE = "CREATE",
8
+ APPROVAL = "APPROVAL",
9
+ NOTIFICATION = "NOTIFICATION"
10
+ }
11
+ export declare class WorkflowTaskNames extends BaseModel {
12
+ name: string;
13
+ description: string;
14
+ task_type: TaskType;
15
+ category: CategoryType;
16
+ constructor(name: string, description: string, task_type: TaskType, category: CategoryType);
17
+ }
@@ -0,0 +1,63 @@
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.WorkflowTaskNames = exports.CategoryType = exports.TaskType = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ var TaskType;
16
+ (function (TaskType) {
17
+ TaskType["SIMPLE"] = "SIMPLE";
18
+ TaskType["HUMAN"] = "HUMAN";
19
+ })(TaskType || (exports.TaskType = TaskType = {}));
20
+ var CategoryType;
21
+ (function (CategoryType) {
22
+ CategoryType["CREATE"] = "CREATE";
23
+ CategoryType["APPROVAL"] = "APPROVAL";
24
+ CategoryType["NOTIFICATION"] = "NOTIFICATION";
25
+ })(CategoryType || (exports.CategoryType = CategoryType = {}));
26
+ let WorkflowTaskNames = class WorkflowTaskNames extends BaseModel_1.BaseModel {
27
+ constructor(name, description, task_type, category) {
28
+ super();
29
+ this.name = name;
30
+ this.description = description;
31
+ this.task_type = task_type;
32
+ this.category = category;
33
+ }
34
+ };
35
+ exports.WorkflowTaskNames = WorkflowTaskNames;
36
+ __decorate([
37
+ (0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: false }),
38
+ __metadata("design:type", String)
39
+ ], WorkflowTaskNames.prototype, "name", void 0);
40
+ __decorate([
41
+ (0, typeorm_1.Column)({ type: 'varchar', length: 200, nullable: true }),
42
+ __metadata("design:type", String)
43
+ ], WorkflowTaskNames.prototype, "description", void 0);
44
+ __decorate([
45
+ (0, typeorm_1.Column)({
46
+ type: 'enum',
47
+ enum: TaskType,
48
+ nullable: true
49
+ }),
50
+ __metadata("design:type", String)
51
+ ], WorkflowTaskNames.prototype, "task_type", void 0);
52
+ __decorate([
53
+ (0, typeorm_1.Column)({
54
+ type: 'enum',
55
+ enum: CategoryType,
56
+ nullable: true
57
+ }),
58
+ __metadata("design:type", String)
59
+ ], WorkflowTaskNames.prototype, "category", void 0);
60
+ exports.WorkflowTaskNames = WorkflowTaskNames = __decorate([
61
+ (0, typeorm_1.Entity)({ name: 'workflow_task_names' }),
62
+ __metadata("design:paramtypes", [String, String, String, String])
63
+ ], WorkflowTaskNames);
File without changes
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ // import { Column, Entity, Unique } from "typeorm";
3
+ // import { BaseModel } from './BaseModel';
4
+ // @Entity({ name: 'workflows' })
5
+ // @Unique(['service_id', 'sub_service_id', 'request_for'])
6
+ // export class Workflows extends BaseModel {
7
+ // @Column({ type: 'varchar', length: 100, nullable: false })
8
+ // name: string;
9
+ // @Column({ type: 'bigint', nullable: false })
10
+ // service_id: number;
11
+ // @Column({ type: 'bigint', nullable: false })
12
+ // sub_service_id: number;
13
+ // @Column({ type: 'varchar', length: 20, nullable: false })
14
+ // request_for: string; // 'Self' | 'Behalf of' | 'Internal'
15
+ // @Column({ type: 'int', nullable: false })
16
+ // levels: number;
17
+ // constructor(
18
+ // name: string,
19
+ // service_id: number,
20
+ // sub_service_id: number,
21
+ // request_for: string,
22
+ // levels: number,
23
+ // ) {
24
+ // super();
25
+ // this.name = name;
26
+ // this.service_id = service_id;
27
+ // this.sub_service_id = sub_service_id;
28
+ // this.request_for = request_for;
29
+ // this.levels = levels;
30
+ // }
31
+ // }