@platform-modules/civil-aviation-authority 2.2.32 → 2.2.41

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 (30) hide show
  1. package/.env +4 -10
  2. package/dist/data-source.js +1 -11
  3. package/dist/index.d.ts +0 -5
  4. package/dist/index.js +0 -5
  5. package/package.json +1 -1
  6. package/src/data-source.ts +1 -11
  7. package/src/index.ts +0 -5
  8. package/dist/models/ITApprovalSettings.d.ts +0 -7
  9. package/dist/models/ITApprovalSettings.js +0 -40
  10. package/dist/models/ITServicesTypesMuscatModel.d.ts +0 -6
  11. package/dist/models/ITServicesTypesMuscatModel.js +0 -34
  12. package/dist/models/ITServicesTypesSalalahModel.d.ts +0 -6
  13. package/dist/models/ITServicesTypesSalalahModel.js +0 -34
  14. package/dist/models/SecurityThreatApprovalModel.d.ts +0 -24
  15. package/dist/models/SecurityThreatApprovalModel.js +0 -97
  16. package/dist/models/SecurityThreatAttachmentModel.d.ts +0 -12
  17. package/dist/models/SecurityThreatAttachmentModel.js +0 -64
  18. package/dist/models/SecurityThreatChatModel.d.ts +0 -17
  19. package/dist/models/SecurityThreatChatModel.js +0 -67
  20. package/dist/models/SecurityThreatRequestModel.d.ts +0 -29
  21. package/dist/models/SecurityThreatRequestModel.js +0 -104
  22. package/dist/models/SecurityThreatWorkflowModel.d.ts +0 -14
  23. package/dist/models/SecurityThreatWorkflowModel.js +0 -56
  24. package/dist/models/Workflows.d.ts +0 -0
  25. package/dist/models/Workflows.js +0 -31
  26. package/src/models/SecurityThreatApprovalModel.ts +0 -84
  27. package/src/models/SecurityThreatAttachmentModel.ts +0 -52
  28. package/src/models/SecurityThreatChatModel.ts +0 -55
  29. package/src/models/SecurityThreatRequestModel.ts +0 -91
  30. package/src/models/SecurityThreatWorkflowModel.ts +0 -43
package/.env CHANGED
@@ -1,11 +1,5 @@
1
- # DB_HOST=localhost
2
- # DB_PORT=5433
3
- # DB_USER=postgres
4
- # DB_PASS=123
5
- # DB_NAME=CAA
6
-
7
- DB_HOST=164.52.222.169
8
- DB_PORT=5432
9
- DB_USER=postgres_admin_user
10
- DB_PASS=pg_admin_user_pwd_caa_fa_$%^&OIukhjgcvbn
1
+ DB_HOST=localhost
2
+ DB_PORT=5433
3
+ DB_USER=postgres
4
+ DB_PASS=123
11
5
  DB_NAME=CAA
@@ -59,11 +59,6 @@ const HotelApprovalModel_1 = require("./models/HotelApprovalModel");
59
59
  const HotelWorkFlowModel_1 = require("./models/HotelWorkFlowModel");
60
60
  const HotelChatModel_1 = require("./models/HotelChatModel");
61
61
  const HotelAttachedModel_1 = require("./models/HotelAttachedModel");
62
- const SecurityThreatRequestModel_1 = require("./models/SecurityThreatRequestModel");
63
- const SecurityThreatApprovalModel_1 = require("./models/SecurityThreatApprovalModel");
64
- const SecurityThreatAttachmentModel_1 = require("./models/SecurityThreatAttachmentModel");
65
- const SecurityThreatChatModel_1 = require("./models/SecurityThreatChatModel");
66
- const SecurityThreatWorkflowModel_1 = require("./models/SecurityThreatWorkflowModel");
67
62
  exports.AppDataSource = new typeorm_1.DataSource({
68
63
  type: 'postgres',
69
64
  host: process.env.DB_HOST || 'localhost',
@@ -126,11 +121,6 @@ exports.AppDataSource = new typeorm_1.DataSource({
126
121
  HotelApprovalModel_1.HotelApprovalDetails,
127
122
  HotelWorkFlowModel_1.HotelWorkFlow,
128
123
  HotelChatModel_1.HotelRequestChat,
129
- HotelAttachedModel_1.HotelRequestAttachment,
130
- SecurityThreatRequestModel_1.SecurityThreatRequest,
131
- SecurityThreatApprovalModel_1.SecurityThreatApproval,
132
- SecurityThreatAttachmentModel_1.SecurityThreatAttachment,
133
- SecurityThreatChatModel_1.SecurityThreatChat,
134
- SecurityThreatWorkflowModel_1.SecurityThreatWorkFlow
124
+ HotelAttachedModel_1.HotelRequestAttachment
135
125
  ],
136
126
  });
package/dist/index.d.ts CHANGED
@@ -48,8 +48,3 @@ export * from './models/HotelApprovalModel';
48
48
  export * from './models/HotelWorkFlowModel';
49
49
  export * from './models/HotelChatModel';
50
50
  export * from './models/HotelAttachedModel';
51
- export * from './models/SecurityThreatRequestModel';
52
- export * from './models/SecurityThreatApprovalModel';
53
- export * from './models/SecurityThreatAttachmentModel';
54
- export * from './models/SecurityThreatChatModel';
55
- export * from './models/SecurityThreatWorkflowModel';
package/dist/index.js CHANGED
@@ -68,8 +68,3 @@ __exportStar(require("./models/HotelApprovalModel"), exports);
68
68
  __exportStar(require("./models/HotelWorkFlowModel"), exports);
69
69
  __exportStar(require("./models/HotelChatModel"), exports);
70
70
  __exportStar(require("./models/HotelAttachedModel"), exports);
71
- __exportStar(require("./models/SecurityThreatRequestModel"), exports);
72
- __exportStar(require("./models/SecurityThreatApprovalModel"), exports);
73
- __exportStar(require("./models/SecurityThreatAttachmentModel"), exports);
74
- __exportStar(require("./models/SecurityThreatChatModel"), exports);
75
- __exportStar(require("./models/SecurityThreatWorkflowModel"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platform-modules/civil-aviation-authority",
3
- "version": "2.2.32",
3
+ "version": "2.2.41",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -57,11 +57,6 @@ import { HotelApprovalDetails } from './models/HotelApprovalModel';
57
57
  import { HotelWorkFlow } from './models/HotelWorkFlowModel';
58
58
  import { HotelRequestChat } from './models/HotelChatModel';
59
59
  import { HotelRequestAttachment } from './models/HotelAttachedModel';
60
- import { SecurityThreatRequest } from './models/SecurityThreatRequestModel';
61
- import { SecurityThreatApproval } from './models/SecurityThreatApprovalModel';
62
- import { SecurityThreatAttachment } from './models/SecurityThreatAttachmentModel';
63
- import { SecurityThreatChat } from './models/SecurityThreatChatModel';
64
- import { SecurityThreatWorkFlow } from './models/SecurityThreatWorkflowModel';
65
60
 
66
61
  export const AppDataSource = new DataSource({
67
62
  type: 'postgres',
@@ -125,11 +120,6 @@ export const AppDataSource = new DataSource({
125
120
  HotelApprovalDetails,
126
121
  HotelWorkFlow,
127
122
  HotelRequestChat,
128
- HotelRequestAttachment,
129
- SecurityThreatRequest,
130
- SecurityThreatApproval,
131
- SecurityThreatAttachment,
132
- SecurityThreatChat,
133
- SecurityThreatWorkFlow
123
+ HotelRequestAttachment
134
124
  ],
135
125
  });
package/src/index.ts CHANGED
@@ -52,8 +52,3 @@ export * from './models/HotelApprovalModel';
52
52
  export * from './models/HotelWorkFlowModel';
53
53
  export * from './models/HotelChatModel';
54
54
  export * from './models/HotelAttachedModel';
55
- export * from './models/SecurityThreatRequestModel';
56
- export * from './models/SecurityThreatApprovalModel';
57
- export * from './models/SecurityThreatAttachmentModel';
58
- export * from './models/SecurityThreatChatModel';
59
- export * from './models/SecurityThreatWorkflowModel';
@@ -1,7 +0,0 @@
1
- import { BaseModel } from './BaseModel';
2
- export declare class ITApprovalSettings extends BaseModel {
3
- level: number;
4
- approval_role_id: number;
5
- workflow_id: number;
6
- constructor(level: number, approval_role_id: number, workflow_id: number);
7
- }
@@ -1,40 +0,0 @@
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.ITApprovalSettings = void 0;
13
- const typeorm_1 = require("typeorm");
14
- const BaseModel_1 = require("./BaseModel");
15
- let ITApprovalSettings = class ITApprovalSettings extends BaseModel_1.BaseModel {
16
- constructor(level, approval_role_id, workflow_id) {
17
- super();
18
- this.level = level;
19
- this.approval_role_id = approval_role_id;
20
- this.workflow_id = workflow_id;
21
- }
22
- };
23
- exports.ITApprovalSettings = ITApprovalSettings;
24
- __decorate([
25
- (0, typeorm_1.Column)({ type: 'int', nullable: false }),
26
- __metadata("design:type", Number)
27
- ], ITApprovalSettings.prototype, "level", void 0);
28
- __decorate([
29
- (0, typeorm_1.Column)({ type: 'int', nullable: false }),
30
- __metadata("design:type", Number)
31
- ], ITApprovalSettings.prototype, "approval_role_id", void 0);
32
- __decorate([
33
- (0, typeorm_1.Column)({ type: 'int', nullable: false }),
34
- __metadata("design:type", Number)
35
- ], ITApprovalSettings.prototype, "workflow_id", void 0);
36
- exports.ITApprovalSettings = ITApprovalSettings = __decorate([
37
- (0, typeorm_1.Entity)({ name: 'it_approval_settings' }),
38
- (0, typeorm_1.Unique)(['workflow_id', 'level']),
39
- __metadata("design:paramtypes", [Number, Number, Number])
40
- ], ITApprovalSettings);
@@ -1,6 +0,0 @@
1
- import { BaseModel } from './BaseModel';
2
- export declare class ITServicesTypesMuscat extends BaseModel {
3
- name: string;
4
- name_in_arabic: string;
5
- constructor(name: string, name_in_arabic: string);
6
- }
@@ -1,34 +0,0 @@
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.ITServicesTypesMuscat = void 0;
13
- const typeorm_1 = require("typeorm");
14
- const BaseModel_1 = require("./BaseModel");
15
- let ITServicesTypesMuscat = class ITServicesTypesMuscat extends BaseModel_1.BaseModel {
16
- constructor(name, name_in_arabic) {
17
- super();
18
- this.name = name;
19
- this.name_in_arabic = name_in_arabic;
20
- }
21
- };
22
- exports.ITServicesTypesMuscat = ITServicesTypesMuscat;
23
- __decorate([
24
- (0, typeorm_1.Column)({ nullable: false }),
25
- __metadata("design:type", String)
26
- ], ITServicesTypesMuscat.prototype, "name", void 0);
27
- __decorate([
28
- (0, typeorm_1.Column)({ nullable: false }),
29
- __metadata("design:type", String)
30
- ], ITServicesTypesMuscat.prototype, "name_in_arabic", void 0);
31
- exports.ITServicesTypesMuscat = ITServicesTypesMuscat = __decorate([
32
- (0, typeorm_1.Entity)({ name: 'it_services_types_muscat' }),
33
- __metadata("design:paramtypes", [String, String])
34
- ], ITServicesTypesMuscat);
@@ -1,6 +0,0 @@
1
- import { BaseModel } from './BaseModel';
2
- export declare class ITServicesTypesSalalah extends BaseModel {
3
- name: string;
4
- name_in_arabic: string;
5
- constructor(name: string, name_in_arabic: string);
6
- }
@@ -1,34 +0,0 @@
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.ITServicesTypesSalalah = void 0;
13
- const typeorm_1 = require("typeorm");
14
- const BaseModel_1 = require("./BaseModel");
15
- let ITServicesTypesSalalah = class ITServicesTypesSalalah extends BaseModel_1.BaseModel {
16
- constructor(name, name_in_arabic) {
17
- super();
18
- this.name = name;
19
- this.name_in_arabic = name_in_arabic;
20
- }
21
- };
22
- exports.ITServicesTypesSalalah = ITServicesTypesSalalah;
23
- __decorate([
24
- (0, typeorm_1.Column)({ nullable: false }),
25
- __metadata("design:type", String)
26
- ], ITServicesTypesSalalah.prototype, "name", void 0);
27
- __decorate([
28
- (0, typeorm_1.Column)({ nullable: false }),
29
- __metadata("design:type", String)
30
- ], ITServicesTypesSalalah.prototype, "name_in_arabic", void 0);
31
- exports.ITServicesTypesSalalah = ITServicesTypesSalalah = __decorate([
32
- (0, typeorm_1.Entity)({ name: 'it_services_types_salalah' }),
33
- __metadata("design:paramtypes", [String, String])
34
- ], ITServicesTypesSalalah);
@@ -1,24 +0,0 @@
1
- import { BaseModel } from './BaseModel';
2
- export declare enum SecurityThreatApprovalStatus {
3
- PENDING = "Pending",
4
- IN_PROGRESS = "In Progress",
5
- APPROVED = "Approved",
6
- REJECTED = "Rejected",
7
- CLOSED = "Closed"
8
- }
9
- export declare class SecurityThreatApproval extends BaseModel {
10
- request_id: number;
11
- service_id: number | null;
12
- sub_service_id: number | null;
13
- level: number;
14
- approver_role_id: number;
15
- department_id: number | null;
16
- section_id: number | null;
17
- approver_user_id: number | null;
18
- delegate_user_id: number | null;
19
- approved_by: number | null;
20
- comment: string;
21
- approval_status: SecurityThreatApprovalStatus;
22
- is_manager: boolean;
23
- constructor(request_id: number, approver_role_id: number, comment: string, approval_status: SecurityThreatApprovalStatus, level: number, is_manager?: boolean, department_id?: number | null, section_id?: number | null, approver_user_id?: number | null, delegate_user_id?: number | null, approved_by?: number | null, service_id?: number, sub_service_id?: number);
24
- }
@@ -1,97 +0,0 @@
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.SecurityThreatApproval = exports.SecurityThreatApprovalStatus = void 0;
13
- const typeorm_1 = require("typeorm");
14
- const BaseModel_1 = require("./BaseModel");
15
- var SecurityThreatApprovalStatus;
16
- (function (SecurityThreatApprovalStatus) {
17
- SecurityThreatApprovalStatus["PENDING"] = "Pending";
18
- SecurityThreatApprovalStatus["IN_PROGRESS"] = "In Progress";
19
- SecurityThreatApprovalStatus["APPROVED"] = "Approved";
20
- SecurityThreatApprovalStatus["REJECTED"] = "Rejected";
21
- SecurityThreatApprovalStatus["CLOSED"] = "Closed";
22
- })(SecurityThreatApprovalStatus || (exports.SecurityThreatApprovalStatus = SecurityThreatApprovalStatus = {}));
23
- let SecurityThreatApproval = class SecurityThreatApproval extends BaseModel_1.BaseModel {
24
- constructor(request_id, approver_role_id, comment, approval_status, level, is_manager = false, department_id, section_id, approver_user_id, delegate_user_id, approved_by, service_id, sub_service_id) {
25
- super();
26
- this.request_id = request_id;
27
- this.service_id = service_id || null;
28
- this.sub_service_id = sub_service_id || null;
29
- this.approver_role_id = approver_role_id;
30
- this.comment = comment;
31
- this.approval_status = approval_status;
32
- this.level = level;
33
- this.is_manager = is_manager;
34
- this.department_id = department_id || null;
35
- this.section_id = section_id || null;
36
- this.approver_user_id = approver_user_id || null;
37
- this.delegate_user_id = delegate_user_id || null;
38
- this.approved_by = approved_by || null;
39
- }
40
- };
41
- exports.SecurityThreatApproval = SecurityThreatApproval;
42
- __decorate([
43
- (0, typeorm_1.Column)({ type: 'integer', nullable: false }),
44
- __metadata("design:type", Number)
45
- ], SecurityThreatApproval.prototype, "request_id", void 0);
46
- __decorate([
47
- (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
48
- __metadata("design:type", Object)
49
- ], SecurityThreatApproval.prototype, "service_id", void 0);
50
- __decorate([
51
- (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
52
- __metadata("design:type", Object)
53
- ], SecurityThreatApproval.prototype, "sub_service_id", void 0);
54
- __decorate([
55
- (0, typeorm_1.Column)({ type: 'integer', nullable: false }),
56
- __metadata("design:type", Number)
57
- ], SecurityThreatApproval.prototype, "level", void 0);
58
- __decorate([
59
- (0, typeorm_1.Column)({ type: 'integer', nullable: false }),
60
- __metadata("design:type", Number)
61
- ], SecurityThreatApproval.prototype, "approver_role_id", void 0);
62
- __decorate([
63
- (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
64
- __metadata("design:type", Object)
65
- ], SecurityThreatApproval.prototype, "department_id", void 0);
66
- __decorate([
67
- (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
68
- __metadata("design:type", Object)
69
- ], SecurityThreatApproval.prototype, "section_id", void 0);
70
- __decorate([
71
- (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
72
- __metadata("design:type", Object)
73
- ], SecurityThreatApproval.prototype, "approver_user_id", void 0);
74
- __decorate([
75
- (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
76
- __metadata("design:type", Object)
77
- ], SecurityThreatApproval.prototype, "delegate_user_id", void 0);
78
- __decorate([
79
- (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
80
- __metadata("design:type", Object)
81
- ], SecurityThreatApproval.prototype, "approved_by", void 0);
82
- __decorate([
83
- (0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: true, default: '' }),
84
- __metadata("design:type", String)
85
- ], SecurityThreatApproval.prototype, "comment", void 0);
86
- __decorate([
87
- (0, typeorm_1.Column)({ type: 'enum', enum: SecurityThreatApprovalStatus, default: SecurityThreatApprovalStatus.PENDING, nullable: false }),
88
- __metadata("design:type", String)
89
- ], SecurityThreatApproval.prototype, "approval_status", void 0);
90
- __decorate([
91
- (0, typeorm_1.Column)({ type: 'boolean', default: false, nullable: false }),
92
- __metadata("design:type", Boolean)
93
- ], SecurityThreatApproval.prototype, "is_manager", void 0);
94
- exports.SecurityThreatApproval = SecurityThreatApproval = __decorate([
95
- (0, typeorm_1.Entity)({ name: 'security_threat_approvals' }),
96
- __metadata("design:paramtypes", [Number, Number, String, String, Number, Boolean, Object, Object, Object, Object, Object, Number, Number])
97
- ], SecurityThreatApproval);
@@ -1,12 +0,0 @@
1
- import { BaseModel } from './BaseModel';
2
- export declare class SecurityThreatAttachment extends BaseModel {
3
- request_id: number;
4
- service_id: number | null;
5
- sub_service_id: number | null;
6
- file_url: string;
7
- file_name: string;
8
- file_type: string;
9
- file_size: number | null;
10
- chat_id: number | null;
11
- constructor(request_id: number, file_url: string, file_name?: string, file_type?: string, file_size?: number, service_id?: number, sub_service_id?: number, chat_id?: number);
12
- }
@@ -1,64 +0,0 @@
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.SecurityThreatAttachment = void 0;
13
- const typeorm_1 = require("typeorm");
14
- const BaseModel_1 = require("./BaseModel");
15
- let SecurityThreatAttachment = class SecurityThreatAttachment extends BaseModel_1.BaseModel {
16
- constructor(request_id, file_url, file_name, file_type, file_size, service_id, sub_service_id, chat_id) {
17
- super();
18
- this.request_id = request_id;
19
- this.service_id = service_id || null;
20
- this.sub_service_id = sub_service_id || null;
21
- this.file_url = file_url;
22
- this.file_name = file_name || '';
23
- this.file_type = file_type || '';
24
- this.file_size = file_size || null;
25
- this.chat_id = chat_id || null;
26
- }
27
- };
28
- exports.SecurityThreatAttachment = SecurityThreatAttachment;
29
- __decorate([
30
- (0, typeorm_1.Column)({ type: 'integer', nullable: false }),
31
- __metadata("design:type", Number)
32
- ], SecurityThreatAttachment.prototype, "request_id", void 0);
33
- __decorate([
34
- (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
35
- __metadata("design:type", Object)
36
- ], SecurityThreatAttachment.prototype, "service_id", void 0);
37
- __decorate([
38
- (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
39
- __metadata("design:type", Object)
40
- ], SecurityThreatAttachment.prototype, "sub_service_id", void 0);
41
- __decorate([
42
- (0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: false }),
43
- __metadata("design:type", String)
44
- ], SecurityThreatAttachment.prototype, "file_url", void 0);
45
- __decorate([
46
- (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
47
- __metadata("design:type", String)
48
- ], SecurityThreatAttachment.prototype, "file_name", void 0);
49
- __decorate([
50
- (0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
51
- __metadata("design:type", String)
52
- ], SecurityThreatAttachment.prototype, "file_type", void 0);
53
- __decorate([
54
- (0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
55
- __metadata("design:type", Object)
56
- ], SecurityThreatAttachment.prototype, "file_size", void 0);
57
- __decorate([
58
- (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
59
- __metadata("design:type", Object)
60
- ], SecurityThreatAttachment.prototype, "chat_id", void 0);
61
- exports.SecurityThreatAttachment = SecurityThreatAttachment = __decorate([
62
- (0, typeorm_1.Entity)({ name: 'security_threat_attachments' }),
63
- __metadata("design:paramtypes", [Number, String, String, String, Number, Number, Number, Number])
64
- ], SecurityThreatAttachment);
@@ -1,17 +0,0 @@
1
- import { BaseModel } from './BaseModel';
2
- export declare enum SecurityThreatMessageType {
3
- TEXT = "text",
4
- IMAGE = "image",
5
- VIDEO = "video",
6
- FILE = "file",
7
- LINK = "link"
8
- }
9
- export declare class SecurityThreatChat extends BaseModel {
10
- request_id: number;
11
- service_id: number | null;
12
- sub_service_id: number | null;
13
- user_id: number;
14
- message: string;
15
- messageType: SecurityThreatMessageType;
16
- constructor(request_id: number, user_id: number, message: string, service_id?: number, sub_service_id?: number, messageType?: SecurityThreatMessageType);
17
- }
@@ -1,67 +0,0 @@
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.SecurityThreatChat = exports.SecurityThreatMessageType = void 0;
13
- const typeorm_1 = require("typeorm");
14
- const BaseModel_1 = require("./BaseModel");
15
- var SecurityThreatMessageType;
16
- (function (SecurityThreatMessageType) {
17
- SecurityThreatMessageType["TEXT"] = "text";
18
- SecurityThreatMessageType["IMAGE"] = "image";
19
- SecurityThreatMessageType["VIDEO"] = "video";
20
- SecurityThreatMessageType["FILE"] = "file";
21
- SecurityThreatMessageType["LINK"] = "link";
22
- })(SecurityThreatMessageType || (exports.SecurityThreatMessageType = SecurityThreatMessageType = {}));
23
- let SecurityThreatChat = class SecurityThreatChat extends BaseModel_1.BaseModel {
24
- constructor(request_id, user_id, message, service_id, sub_service_id, messageType) {
25
- super();
26
- this.request_id = request_id;
27
- this.service_id = service_id || null;
28
- this.sub_service_id = sub_service_id || null;
29
- this.user_id = user_id;
30
- this.message = message;
31
- this.messageType = messageType || SecurityThreatMessageType.TEXT;
32
- }
33
- };
34
- exports.SecurityThreatChat = SecurityThreatChat;
35
- __decorate([
36
- (0, typeorm_1.Column)({ type: 'integer', nullable: false }),
37
- __metadata("design:type", Number)
38
- ], SecurityThreatChat.prototype, "request_id", void 0);
39
- __decorate([
40
- (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
41
- __metadata("design:type", Object)
42
- ], SecurityThreatChat.prototype, "service_id", void 0);
43
- __decorate([
44
- (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
45
- __metadata("design:type", Object)
46
- ], SecurityThreatChat.prototype, "sub_service_id", void 0);
47
- __decorate([
48
- (0, typeorm_1.Column)({ type: 'integer', nullable: false }),
49
- __metadata("design:type", Number)
50
- ], SecurityThreatChat.prototype, "user_id", void 0);
51
- __decorate([
52
- (0, typeorm_1.Column)({ type: 'text', nullable: false }),
53
- __metadata("design:type", String)
54
- ], SecurityThreatChat.prototype, "message", void 0);
55
- __decorate([
56
- (0, typeorm_1.Column)({
57
- type: 'enum',
58
- enum: SecurityThreatMessageType,
59
- default: SecurityThreatMessageType.TEXT,
60
- nullable: false
61
- }),
62
- __metadata("design:type", String)
63
- ], SecurityThreatChat.prototype, "messageType", void 0);
64
- exports.SecurityThreatChat = SecurityThreatChat = __decorate([
65
- (0, typeorm_1.Entity)({ name: 'security_threat_chats' }),
66
- __metadata("design:paramtypes", [Number, Number, String, Number, Number, String])
67
- ], SecurityThreatChat);
@@ -1,29 +0,0 @@
1
- import { BaseModel } from './BaseModel';
2
- export declare enum SecurityThreatRequestStatus {
3
- PENDING = "Pending",
4
- IN_PROGRESS = "In Progress",
5
- APPROVED = "Approved",
6
- REJECTED = "Rejected",
7
- CLOSED = "Closed"
8
- }
9
- export declare enum SecurityThreatPriority {
10
- P1_VERY_LOW = "P1-Very Low",
11
- P2_LOW = "P2\u2013Low",// Note: Using en dash (–) as specified
12
- P3_MODERATE = "P3-Moderate",
13
- P4_HIGH = "P4-High",
14
- P5_VERY_HIGH = "P5-Very High"
15
- }
16
- export declare class SecurityThreatRequest extends BaseModel {
17
- req_user_department_id: number | null;
18
- req_user_section_id: number | null;
19
- service_id: number;
20
- sub_service_id: number;
21
- user_id: number;
22
- type_of_threat: number;
23
- description: string;
24
- contact_number: string;
25
- priority: SecurityThreatPriority;
26
- status: SecurityThreatRequestStatus;
27
- workflow_execution_id: string | null;
28
- constructor(req_user_department_id: number | null, req_user_section_id: number | null, service_id: number, sub_service_id: number, user_id: number, type_of_threat: number, description: string, contact_number: string, priority: SecurityThreatPriority, status: SecurityThreatRequestStatus, workflow_execution_id?: string | null);
29
- }
@@ -1,104 +0,0 @@
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.SecurityThreatRequest = exports.SecurityThreatPriority = exports.SecurityThreatRequestStatus = void 0;
13
- const typeorm_1 = require("typeorm");
14
- const BaseModel_1 = require("./BaseModel");
15
- var SecurityThreatRequestStatus;
16
- (function (SecurityThreatRequestStatus) {
17
- SecurityThreatRequestStatus["PENDING"] = "Pending";
18
- SecurityThreatRequestStatus["IN_PROGRESS"] = "In Progress";
19
- SecurityThreatRequestStatus["APPROVED"] = "Approved";
20
- SecurityThreatRequestStatus["REJECTED"] = "Rejected";
21
- SecurityThreatRequestStatus["CLOSED"] = "Closed";
22
- })(SecurityThreatRequestStatus || (exports.SecurityThreatRequestStatus = SecurityThreatRequestStatus = {}));
23
- var SecurityThreatPriority;
24
- (function (SecurityThreatPriority) {
25
- SecurityThreatPriority["P1_VERY_LOW"] = "P1-Very Low";
26
- SecurityThreatPriority["P2_LOW"] = "P2\u2013Low";
27
- SecurityThreatPriority["P3_MODERATE"] = "P3-Moderate";
28
- SecurityThreatPriority["P4_HIGH"] = "P4-High";
29
- SecurityThreatPriority["P5_VERY_HIGH"] = "P5-Very High";
30
- })(SecurityThreatPriority || (exports.SecurityThreatPriority = SecurityThreatPriority = {}));
31
- let SecurityThreatRequest = class SecurityThreatRequest extends BaseModel_1.BaseModel {
32
- constructor(req_user_department_id, req_user_section_id, service_id, sub_service_id, user_id, type_of_threat, description, contact_number, priority, status, workflow_execution_id) {
33
- super();
34
- this.req_user_department_id = req_user_department_id ?? null;
35
- this.req_user_section_id = req_user_section_id ?? null;
36
- this.service_id = service_id;
37
- this.sub_service_id = sub_service_id;
38
- this.user_id = user_id;
39
- this.type_of_threat = type_of_threat;
40
- this.description = description;
41
- this.contact_number = contact_number;
42
- this.priority = priority;
43
- this.status = status;
44
- this.workflow_execution_id = workflow_execution_id ?? null;
45
- }
46
- };
47
- exports.SecurityThreatRequest = SecurityThreatRequest;
48
- __decorate([
49
- (0, typeorm_1.Column)({ type: 'int', nullable: true }),
50
- __metadata("design:type", Object)
51
- ], SecurityThreatRequest.prototype, "req_user_department_id", void 0);
52
- __decorate([
53
- (0, typeorm_1.Column)({ type: 'int', nullable: true }),
54
- __metadata("design:type", Object)
55
- ], SecurityThreatRequest.prototype, "req_user_section_id", void 0);
56
- __decorate([
57
- (0, typeorm_1.Column)({ nullable: true }),
58
- __metadata("design:type", Number)
59
- ], SecurityThreatRequest.prototype, "service_id", void 0);
60
- __decorate([
61
- (0, typeorm_1.Column)({ nullable: true }),
62
- __metadata("design:type", Number)
63
- ], SecurityThreatRequest.prototype, "sub_service_id", void 0);
64
- __decorate([
65
- (0, typeorm_1.Column)({ nullable: false }),
66
- __metadata("design:type", Number)
67
- ], SecurityThreatRequest.prototype, "user_id", void 0);
68
- __decorate([
69
- (0, typeorm_1.Column)({ type: 'int', nullable: false }),
70
- __metadata("design:type", Number)
71
- ], SecurityThreatRequest.prototype, "type_of_threat", void 0);
72
- __decorate([
73
- (0, typeorm_1.Column)({ type: 'text', nullable: false }),
74
- __metadata("design:type", String)
75
- ], SecurityThreatRequest.prototype, "description", void 0);
76
- __decorate([
77
- (0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: false }),
78
- __metadata("design:type", String)
79
- ], SecurityThreatRequest.prototype, "contact_number", void 0);
80
- __decorate([
81
- (0, typeorm_1.Column)({
82
- type: "enum",
83
- enum: SecurityThreatPriority,
84
- nullable: false,
85
- }),
86
- __metadata("design:type", String)
87
- ], SecurityThreatRequest.prototype, "priority", void 0);
88
- __decorate([
89
- (0, typeorm_1.Column)({
90
- type: "enum",
91
- enum: SecurityThreatRequestStatus,
92
- default: SecurityThreatRequestStatus.PENDING,
93
- nullable: false,
94
- }),
95
- __metadata("design:type", String)
96
- ], SecurityThreatRequest.prototype, "status", void 0);
97
- __decorate([
98
- (0, typeorm_1.Column)({ type: "varchar", nullable: true }),
99
- __metadata("design:type", Object)
100
- ], SecurityThreatRequest.prototype, "workflow_execution_id", void 0);
101
- exports.SecurityThreatRequest = SecurityThreatRequest = __decorate([
102
- (0, typeorm_1.Entity)({ name: 'security_threat_requests' }),
103
- __metadata("design:paramtypes", [Object, Object, Number, Number, Number, Number, String, String, String, String, Object])
104
- ], SecurityThreatRequest);
@@ -1,14 +0,0 @@
1
- import { BaseModel } from './BaseModel';
2
- export declare enum SecurityThreatWorkFlowStatus {
3
- COMPLETED = "Completed",
4
- NOT_YET_STARTED = "Not Yet Started",
5
- PENDING = "Pending"
6
- }
7
- export declare class SecurityThreatWorkFlow extends BaseModel {
8
- request_id: number;
9
- service_id: number | null;
10
- sub_service_id: number | null;
11
- content: string;
12
- status: SecurityThreatWorkFlowStatus;
13
- constructor(request_id: number, content: string, status: SecurityThreatWorkFlowStatus, service_id?: number, sub_service_id?: number);
14
- }
@@ -1,56 +0,0 @@
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.SecurityThreatWorkFlow = exports.SecurityThreatWorkFlowStatus = void 0;
13
- const typeorm_1 = require("typeorm");
14
- const BaseModel_1 = require("./BaseModel");
15
- var SecurityThreatWorkFlowStatus;
16
- (function (SecurityThreatWorkFlowStatus) {
17
- SecurityThreatWorkFlowStatus["COMPLETED"] = "Completed";
18
- SecurityThreatWorkFlowStatus["NOT_YET_STARTED"] = "Not Yet Started";
19
- SecurityThreatWorkFlowStatus["PENDING"] = "Pending";
20
- })(SecurityThreatWorkFlowStatus || (exports.SecurityThreatWorkFlowStatus = SecurityThreatWorkFlowStatus = {}));
21
- //This model is used to store the security threat workflow status and activity logs
22
- let SecurityThreatWorkFlow = class SecurityThreatWorkFlow extends BaseModel_1.BaseModel {
23
- constructor(request_id, content, status, service_id, sub_service_id) {
24
- super();
25
- this.request_id = request_id;
26
- this.service_id = service_id || null;
27
- this.sub_service_id = sub_service_id || null;
28
- this.content = content;
29
- this.status = status;
30
- }
31
- };
32
- exports.SecurityThreatWorkFlow = SecurityThreatWorkFlow;
33
- __decorate([
34
- (0, typeorm_1.Column)({ type: 'integer', nullable: false }),
35
- __metadata("design:type", Number)
36
- ], SecurityThreatWorkFlow.prototype, "request_id", void 0);
37
- __decorate([
38
- (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
39
- __metadata("design:type", Object)
40
- ], SecurityThreatWorkFlow.prototype, "service_id", void 0);
41
- __decorate([
42
- (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
43
- __metadata("design:type", Object)
44
- ], SecurityThreatWorkFlow.prototype, "sub_service_id", void 0);
45
- __decorate([
46
- (0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: false }),
47
- __metadata("design:type", String)
48
- ], SecurityThreatWorkFlow.prototype, "content", void 0);
49
- __decorate([
50
- (0, typeorm_1.Column)({ type: 'enum', enum: SecurityThreatWorkFlowStatus, default: SecurityThreatWorkFlowStatus.NOT_YET_STARTED, nullable: false }),
51
- __metadata("design:type", String)
52
- ], SecurityThreatWorkFlow.prototype, "status", void 0);
53
- exports.SecurityThreatWorkFlow = SecurityThreatWorkFlow = __decorate([
54
- (0, typeorm_1.Entity)({ name: 'security_threat_workflows' }),
55
- __metadata("design:paramtypes", [Number, String, String, Number, Number])
56
- ], SecurityThreatWorkFlow);
File without changes
@@ -1,31 +0,0 @@
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
- // }
@@ -1,84 +0,0 @@
1
- import { Column, Entity } from "typeorm";
2
- import { BaseModel } from './BaseModel';
3
-
4
- export enum SecurityThreatApprovalStatus {
5
- PENDING = "Pending",
6
- IN_PROGRESS = "In Progress",
7
- APPROVED = "Approved",
8
- REJECTED = "Rejected",
9
- CLOSED = "Closed"
10
- }
11
-
12
- @Entity({ name: 'security_threat_approvals' })
13
- export class SecurityThreatApproval extends BaseModel {
14
- @Column({ type: 'integer', nullable: false })
15
- request_id: number;
16
-
17
- @Column({ type: 'integer', nullable: true })
18
- service_id: number | null;
19
-
20
- @Column({ type: 'integer', nullable: true })
21
- sub_service_id: number | null;
22
-
23
- @Column({ type: 'integer', nullable: false })
24
- level: number;
25
-
26
- @Column({ type: 'integer', nullable: false })
27
- approver_role_id: number;
28
-
29
- @Column({ type: 'integer', nullable: true })
30
- department_id: number | null;
31
-
32
- @Column({ type: 'integer', nullable: true })
33
- section_id: number | null;
34
-
35
- @Column({ type: 'integer', nullable: true })
36
- approver_user_id: number | null;
37
-
38
- @Column({ type: 'integer', nullable: true })
39
- delegate_user_id: number | null;
40
-
41
- @Column({ type: 'integer', nullable: true })
42
- approved_by: number | null;
43
-
44
- @Column({ type: 'varchar', length: 500, nullable: true, default: '' })
45
- comment: string;
46
-
47
- @Column({ type: 'enum', enum: SecurityThreatApprovalStatus, default: SecurityThreatApprovalStatus.PENDING, nullable: false })
48
- approval_status: SecurityThreatApprovalStatus;
49
-
50
- @Column({ type: 'boolean', default: false, nullable: false })
51
- is_manager: boolean;
52
-
53
- constructor(
54
- request_id: number,
55
- approver_role_id: number,
56
- comment: string,
57
- approval_status: SecurityThreatApprovalStatus,
58
- level: number,
59
- is_manager: boolean = false,
60
- department_id?: number | null,
61
- section_id?: number | null,
62
- approver_user_id?: number | null,
63
- delegate_user_id?: number | null,
64
- approved_by?: number | null,
65
- service_id?: number,
66
- sub_service_id?: number
67
- ) {
68
- super();
69
- this.request_id = request_id;
70
- this.service_id = service_id || null;
71
- this.sub_service_id = sub_service_id || null;
72
- this.approver_role_id = approver_role_id;
73
- this.comment = comment;
74
- this.approval_status = approval_status;
75
- this.level = level;
76
- this.is_manager = is_manager;
77
- this.department_id = department_id || null;
78
- this.section_id = section_id || null;
79
- this.approver_user_id = approver_user_id || null;
80
- this.delegate_user_id = delegate_user_id || null;
81
- this.approved_by = approved_by || null;
82
- }
83
- }
84
-
@@ -1,52 +0,0 @@
1
- import { Column, Entity } from "typeorm";
2
- import { BaseModel } from './BaseModel';
3
-
4
- @Entity({ name: 'security_threat_attachments' })
5
- export class SecurityThreatAttachment extends BaseModel {
6
-
7
- @Column({ type: 'integer', nullable: false })
8
- request_id: number;
9
-
10
- @Column({ type: 'integer', nullable: true })
11
- service_id: number | null;
12
-
13
- @Column({ type: 'integer', nullable: true })
14
- sub_service_id: number | null;
15
-
16
- @Column({ type: 'varchar', length: 500, nullable: false })
17
- file_url: string;
18
-
19
- @Column({ type: 'varchar', length: 255, nullable: true })
20
- file_name: string;
21
-
22
- @Column({ type: 'varchar', length: 100, nullable: true })
23
- file_type: string;
24
-
25
- @Column({ type: 'bigint', nullable: true })
26
- file_size: number | null;
27
-
28
- @Column({ type: 'integer', nullable: true })
29
- chat_id: number | null;
30
-
31
- constructor(
32
- request_id: number,
33
- file_url: string,
34
- file_name?: string,
35
- file_type?: string,
36
- file_size?: number,
37
- service_id?: number,
38
- sub_service_id?: number,
39
- chat_id?: number
40
- ) {
41
- super();
42
- this.request_id = request_id;
43
- this.service_id = service_id || null;
44
- this.sub_service_id = sub_service_id || null;
45
- this.file_url = file_url;
46
- this.file_name = file_name || '';
47
- this.file_type = file_type || '';
48
- this.file_size = file_size || null;
49
- this.chat_id = chat_id || null;
50
- }
51
- }
52
-
@@ -1,55 +0,0 @@
1
- import { Column, Entity } from "typeorm";
2
- import { BaseModel } from './BaseModel';
3
-
4
- export enum SecurityThreatMessageType {
5
- TEXT = "text",
6
- IMAGE = "image",
7
- VIDEO = "video",
8
- FILE = "file",
9
- LINK = "link"
10
- }
11
-
12
- @Entity({ name: 'security_threat_chats' })
13
- export class SecurityThreatChat extends BaseModel {
14
-
15
- @Column({ type: 'integer', nullable: false })
16
- request_id: number;
17
-
18
- @Column({ type: 'integer', nullable: true })
19
- service_id: number | null;
20
-
21
- @Column({ type: 'integer', nullable: true })
22
- sub_service_id: number | null;
23
-
24
- @Column({ type: 'integer', nullable: false })
25
- user_id: number;
26
-
27
- @Column({ type: 'text', nullable: false })
28
- message: string;
29
-
30
- @Column({
31
- type: 'enum',
32
- enum: SecurityThreatMessageType,
33
- default: SecurityThreatMessageType.TEXT,
34
- nullable: false
35
- })
36
- messageType: SecurityThreatMessageType;
37
-
38
- constructor(
39
- request_id: number,
40
- user_id: number,
41
- message: string,
42
- service_id?: number,
43
- sub_service_id?: number,
44
- messageType?: SecurityThreatMessageType
45
- ) {
46
- super();
47
- this.request_id = request_id;
48
- this.service_id = service_id || null;
49
- this.sub_service_id = sub_service_id || null;
50
- this.user_id = user_id;
51
- this.message = message;
52
- this.messageType = messageType || SecurityThreatMessageType.TEXT;
53
- }
54
- }
55
-
@@ -1,91 +0,0 @@
1
- import { Column, Entity } from "typeorm";
2
- import { BaseModel } from './BaseModel';
3
-
4
- export enum SecurityThreatRequestStatus {
5
- PENDING = "Pending",
6
- IN_PROGRESS = "In Progress",
7
- APPROVED = "Approved",
8
- REJECTED = "Rejected",
9
- CLOSED = "Closed"
10
- }
11
-
12
- export enum SecurityThreatPriority {
13
- P1_VERY_LOW = "P1-Very Low",
14
- P2_LOW = "P2–Low", // Note: Using en dash (–) as specified
15
- P3_MODERATE = "P3-Moderate",
16
- P4_HIGH = "P4-High",
17
- P5_VERY_HIGH = "P5-Very High"
18
- }
19
-
20
- @Entity({ name: 'security_threat_requests' })
21
- export class SecurityThreatRequest extends BaseModel {
22
- @Column({ type: 'int', nullable: true })
23
- req_user_department_id: number | null;
24
-
25
- @Column({ type: 'int', nullable: true })
26
- req_user_section_id: number | null;
27
-
28
- @Column({ nullable: true })
29
- service_id: number;
30
-
31
- @Column({ nullable: true })
32
- sub_service_id: number;
33
-
34
- @Column({ nullable: false })
35
- user_id: number;
36
-
37
- @Column({ type: 'int', nullable: false })
38
- type_of_threat: number;
39
-
40
- @Column({ type: 'text', nullable: false })
41
- description: string;
42
-
43
- @Column({ type: 'varchar', length: 50, nullable: false })
44
- contact_number: string;
45
-
46
- @Column({
47
- type: "enum",
48
- enum: SecurityThreatPriority,
49
- nullable: false,
50
- })
51
- priority: SecurityThreatPriority;
52
-
53
- @Column({
54
- type: "enum",
55
- enum: SecurityThreatRequestStatus,
56
- default: SecurityThreatRequestStatus.PENDING,
57
- nullable: false,
58
- })
59
- status: SecurityThreatRequestStatus;
60
-
61
- @Column({ type: "varchar", nullable: true })
62
- workflow_execution_id: string | null;
63
-
64
- constructor(
65
- req_user_department_id: number | null,
66
- req_user_section_id: number | null,
67
- service_id: number,
68
- sub_service_id: number,
69
- user_id: number,
70
- type_of_threat: number,
71
- description: string,
72
- contact_number: string,
73
- priority: SecurityThreatPriority,
74
- status: SecurityThreatRequestStatus,
75
- workflow_execution_id?: string | null,
76
- ) {
77
- super();
78
- this.req_user_department_id = req_user_department_id ?? null;
79
- this.req_user_section_id = req_user_section_id ?? null;
80
- this.service_id = service_id;
81
- this.sub_service_id = sub_service_id;
82
- this.user_id = user_id;
83
- this.type_of_threat = type_of_threat;
84
- this.description = description;
85
- this.contact_number = contact_number;
86
- this.priority = priority;
87
- this.status = status;
88
- this.workflow_execution_id = workflow_execution_id ?? null;
89
- }
90
- }
91
-
@@ -1,43 +0,0 @@
1
- import { Column, Entity } from "typeorm";
2
- import { BaseModel } from './BaseModel';
3
-
4
- export enum SecurityThreatWorkFlowStatus {
5
- COMPLETED = "Completed",
6
- NOT_YET_STARTED = "Not Yet Started",
7
- PENDING = "Pending"
8
- }
9
-
10
- //This model is used to store the security threat workflow status and activity logs
11
- @Entity({ name: 'security_threat_workflows' })
12
- export class SecurityThreatWorkFlow extends BaseModel {
13
- @Column({ type: 'integer', nullable: false })
14
- request_id: number;
15
-
16
- @Column({ type: 'integer', nullable: true })
17
- service_id: number | null;
18
-
19
- @Column({ type: 'integer', nullable: true })
20
- sub_service_id: number | null;
21
-
22
- @Column({ type: 'varchar', length: 500, nullable: false })
23
- content: string;
24
-
25
- @Column({ type: 'enum', enum: SecurityThreatWorkFlowStatus, default: SecurityThreatWorkFlowStatus.NOT_YET_STARTED, nullable: false })
26
- status: SecurityThreatWorkFlowStatus;
27
-
28
- constructor(
29
- request_id: number,
30
- content: string,
31
- status: SecurityThreatWorkFlowStatus,
32
- service_id?: number,
33
- sub_service_id?: number
34
- ) {
35
- super();
36
- this.request_id = request_id;
37
- this.service_id = service_id || null;
38
- this.sub_service_id = sub_service_id || null;
39
- this.content = content;
40
- this.status = status;
41
- }
42
- }
43
-