@platform-modules/civil-aviation-authority 2.3.88 → 2.3.90
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env +17 -9
- package/dist/data-source.js +13 -1
- package/dist/models/DepartmentDocumentOwnerModel.d.ts +10 -0
- package/dist/models/DepartmentDocumentOwnerModel.js +44 -0
- package/dist/models/DocumentAuditLogModel.d.ts +13 -0
- package/dist/models/DocumentAuditLogModel.js +60 -0
- package/dist/models/DocumentFolderModel.d.ts +14 -0
- package/dist/models/DocumentFolderModel.js +60 -0
- package/dist/models/DocumentMetadataModel.d.ts +45 -0
- package/dist/models/DocumentMetadataModel.js +171 -0
- package/dist/models/DocumentModel.d.ts +25 -0
- package/dist/models/DocumentModel.js +96 -0
- package/dist/models/DocumentPermissionModel.d.ts +11 -0
- package/dist/models/DocumentPermissionModel.js +52 -0
- package/dist/models/DocumentTypeModel.d.ts +8 -0
- package/dist/models/{ITServicesTypesSalalahModel.js → DocumentTypeModel.js} +19 -16
- package/dist/models/DocumentationDepartmentsModel.d.ts +13 -0
- package/dist/models/DocumentationDepartmentsModel.js +53 -0
- package/dist/models/FolderModel.d.ts +16 -0
- package/dist/models/FolderModel.js +85 -0
- package/dist/models/PermissionModel.d.ts +18 -0
- package/dist/models/PermissionModel.js +68 -0
- package/dist/models/UUIDBaseModel.d.ts +14 -0
- package/dist/models/UUIDBaseModel.js +66 -0
- package/package.json +1 -1
- package/src/data-source.ts +13 -1
- package/src/index.ts +6 -6
- package/src/models/DepartmentDocumentOwnerModel.ts +25 -0
- package/src/models/DepartmentsModel.ts +25 -25
- package/src/models/DocumentAuditLogModel.ts +38 -0
- package/src/models/DocumentFolderModel.ts +37 -0
- package/src/models/DocumentModel.ts +65 -0
- package/src/models/DocumentPermissionModel.ts +32 -0
- package/src/models/DocumentTypeModel.ts +19 -0
- package/src/models/HrServiceRequestModel.ts +193 -193
- package/src/models/ITRequestChatModel.ts +62 -62
- package/src/models/ItApprovalsModel.ts +84 -84
- package/src/models/ItWorkflowModel.ts +55 -55
- package/src/models/MissionTravelPassportExpiryNotificationConfigModel.ts +36 -36
- package/src/models/PerformanceCyclePeriodModel.ts +23 -23
- package/src/models/PerformanceGoalMasterModel.ts +27 -27
- package/src/models/ServicesNotificationConfigModel.ts +55 -55
- package/src/models/TrainingRoomNotificationConfigModel.ts +30 -30
- package/dist/models/ITApprovalSettings.d.ts +0 -7
- package/dist/models/ITApprovalSettings.js +0 -40
- package/dist/models/ITServicesTypesMuscatModel.d.ts +0 -6
- package/dist/models/ITServicesTypesMuscatModel.js +0 -34
- package/dist/models/ITServicesTypesSalalahModel.d.ts +0 -6
- package/dist/models/Workflows.d.ts +0 -9
- package/dist/models/Workflows.js +0 -31
|
@@ -0,0 +1,52 @@
|
|
|
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.DocumentPermission = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
const role_1 = require("./role");
|
|
16
|
+
const DocumentModel_1 = require("./DocumentModel");
|
|
17
|
+
let DocumentPermission = class DocumentPermission extends BaseModel_1.BaseModel {
|
|
18
|
+
};
|
|
19
|
+
exports.DocumentPermission = DocumentPermission;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
22
|
+
__metadata("design:type", Number)
|
|
23
|
+
], DocumentPermission.prototype, "document_id", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
26
|
+
__metadata("design:type", Number)
|
|
27
|
+
], DocumentPermission.prototype, "role_id", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.Column)({
|
|
30
|
+
type: 'varchar',
|
|
31
|
+
length: 50,
|
|
32
|
+
nullable: false
|
|
33
|
+
}),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], DocumentPermission.prototype, "permission_type", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.Column)({ type: 'boolean', nullable: false, default: true }),
|
|
38
|
+
__metadata("design:type", Boolean)
|
|
39
|
+
], DocumentPermission.prototype, "is_active", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_1.ManyToOne)(() => DocumentModel_1.Document),
|
|
42
|
+
(0, typeorm_1.JoinColumn)({ name: 'document_id' }),
|
|
43
|
+
__metadata("design:type", DocumentModel_1.Document)
|
|
44
|
+
], DocumentPermission.prototype, "document", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.ManyToOne)(() => role_1.Role),
|
|
47
|
+
(0, typeorm_1.JoinColumn)({ name: 'role_id' }),
|
|
48
|
+
__metadata("design:type", role_1.Role)
|
|
49
|
+
], DocumentPermission.prototype, "role", void 0);
|
|
50
|
+
exports.DocumentPermission = DocumentPermission = __decorate([
|
|
51
|
+
(0, typeorm_1.Entity)({ name: 'document_permissions' })
|
|
52
|
+
], DocumentPermission);
|
|
@@ -9,26 +9,29 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.DocumentType = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const BaseModel_1 = require("./BaseModel");
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
super();
|
|
18
|
-
this.name = name;
|
|
19
|
-
this.name_in_arabic = name_in_arabic;
|
|
20
|
-
}
|
|
15
|
+
const DocumentModel_1 = require("./DocumentModel");
|
|
16
|
+
let DocumentType = class DocumentType extends BaseModel_1.BaseModel {
|
|
21
17
|
};
|
|
22
|
-
exports.
|
|
18
|
+
exports.DocumentType = DocumentType;
|
|
23
19
|
__decorate([
|
|
24
|
-
(0, typeorm_1.Column)({ nullable: false }),
|
|
20
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: false, unique: true }),
|
|
25
21
|
__metadata("design:type", String)
|
|
26
|
-
],
|
|
22
|
+
], DocumentType.prototype, "name", void 0);
|
|
27
23
|
__decorate([
|
|
28
|
-
(0, typeorm_1.Column)({ nullable:
|
|
24
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
29
25
|
__metadata("design:type", String)
|
|
30
|
-
],
|
|
31
|
-
|
|
32
|
-
(0, typeorm_1.
|
|
33
|
-
__metadata("design:
|
|
34
|
-
],
|
|
26
|
+
], DocumentType.prototype, "description", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({ type: 'boolean', nullable: false, default: true }),
|
|
29
|
+
__metadata("design:type", Boolean)
|
|
30
|
+
], DocumentType.prototype, "is_active", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_1.OneToMany)(() => DocumentModel_1.Document, document => document.documentType),
|
|
33
|
+
__metadata("design:type", Array)
|
|
34
|
+
], DocumentType.prototype, "documents", void 0);
|
|
35
|
+
exports.DocumentType = DocumentType = __decorate([
|
|
36
|
+
(0, typeorm_1.Entity)({ name: 'document_types' })
|
|
37
|
+
], DocumentType);
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Folder = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const DepartmentsModel_1 = require("./DepartmentsModel");
|
|
15
|
+
const UUIDBaseModel_1 = require("./UUIDBaseModel");
|
|
16
|
+
// Note: DocumentMetadata import removed to avoid circular dependency
|
|
17
|
+
// Use lazy loading or query builder when needed
|
|
18
|
+
let Folder = class Folder extends UUIDBaseModel_1.UUIDBaseModel {
|
|
19
|
+
constructor(name, path, department_id, created_by, access_level = 'general', parent_path, description, created_by_name, allowed_roles, allowed_users, is_active = true) {
|
|
20
|
+
super();
|
|
21
|
+
this.name = name;
|
|
22
|
+
this.path = path;
|
|
23
|
+
this.department_id = department_id;
|
|
24
|
+
this.created_by = created_by;
|
|
25
|
+
this.access_level = access_level;
|
|
26
|
+
this.parent_path = parent_path;
|
|
27
|
+
this.description = description;
|
|
28
|
+
this.created_by_name = created_by_name;
|
|
29
|
+
this.allowed_roles = allowed_roles || [];
|
|
30
|
+
this.allowed_users = allowed_users || [];
|
|
31
|
+
this.is_active = is_active;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
exports.Folder = Folder;
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255 }),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], Folder.prototype, "name", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 1000 }),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], Folder.prototype, "path", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 1000, nullable: true }),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], Folder.prototype, "parent_path", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, typeorm_1.ManyToOne)('Departments', { eager: true }),
|
|
49
|
+
(0, typeorm_1.JoinColumn)({ name: 'department_id' }),
|
|
50
|
+
__metadata("design:type", DepartmentsModel_1.Departments)
|
|
51
|
+
], Folder.prototype, "department", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({ type: 'integer' }),
|
|
54
|
+
__metadata("design:type", Number)
|
|
55
|
+
], Folder.prototype, "department_id", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
58
|
+
__metadata("design:type", String)
|
|
59
|
+
], Folder.prototype, "description", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, typeorm_1.Column)({ type: 'enum', enum: ['general', 'restricted'], default: 'general' }),
|
|
62
|
+
(0, typeorm_1.Index)(),
|
|
63
|
+
__metadata("design:type", String)
|
|
64
|
+
], Folder.prototype, "access_level", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, typeorm_1.Column)({ type: 'text', array: true, default: [] }),
|
|
67
|
+
__metadata("design:type", Array)
|
|
68
|
+
], Folder.prototype, "allowed_roles", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, typeorm_1.Column)({ type: 'text', array: true, default: [] }),
|
|
71
|
+
__metadata("design:type", Array)
|
|
72
|
+
], Folder.prototype, "allowed_users", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
75
|
+
__metadata("design:type", String)
|
|
76
|
+
], Folder.prototype, "created_by_name", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: true }),
|
|
79
|
+
(0, typeorm_1.Index)(),
|
|
80
|
+
__metadata("design:type", Boolean)
|
|
81
|
+
], Folder.prototype, "is_active", void 0);
|
|
82
|
+
exports.Folder = Folder = __decorate([
|
|
83
|
+
(0, typeorm_1.Entity)({ name: 'folders' }),
|
|
84
|
+
__metadata("design:paramtypes", [String, String, Number, String, String, String, String, String, Array, Array, Boolean])
|
|
85
|
+
], Folder);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Role } from './role';
|
|
2
|
+
import { UUIDBaseModel } from './UUIDBaseModel';
|
|
3
|
+
export declare enum PermissionType {
|
|
4
|
+
VIEW = "view",
|
|
5
|
+
UPLOAD = "upload",
|
|
6
|
+
UPDATE = "update",
|
|
7
|
+
DELETE = "delete",
|
|
8
|
+
PUBLISH = "publish"
|
|
9
|
+
}
|
|
10
|
+
export declare class Permission extends UUIDBaseModel {
|
|
11
|
+
name: string;
|
|
12
|
+
code: string;
|
|
13
|
+
type: PermissionType;
|
|
14
|
+
description?: string;
|
|
15
|
+
is_active: boolean;
|
|
16
|
+
roles: Role[];
|
|
17
|
+
constructor(name: string, code: string, type: PermissionType, created_by: string, description?: string, is_active?: boolean);
|
|
18
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Permission = exports.PermissionType = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const role_1 = require("./role");
|
|
15
|
+
const UUIDBaseModel_1 = require("./UUIDBaseModel");
|
|
16
|
+
var PermissionType;
|
|
17
|
+
(function (PermissionType) {
|
|
18
|
+
PermissionType["VIEW"] = "view";
|
|
19
|
+
PermissionType["UPLOAD"] = "upload";
|
|
20
|
+
PermissionType["UPDATE"] = "update";
|
|
21
|
+
PermissionType["DELETE"] = "delete";
|
|
22
|
+
PermissionType["PUBLISH"] = "publish";
|
|
23
|
+
})(PermissionType || (exports.PermissionType = PermissionType = {}));
|
|
24
|
+
let Permission = class Permission extends UUIDBaseModel_1.UUIDBaseModel {
|
|
25
|
+
constructor(name, code, type, created_by, description, is_active = true) {
|
|
26
|
+
super();
|
|
27
|
+
this.name = name;
|
|
28
|
+
this.code = code;
|
|
29
|
+
this.type = type;
|
|
30
|
+
this.created_by = created_by;
|
|
31
|
+
this.description = description;
|
|
32
|
+
this.is_active = is_active;
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
exports.Permission = Permission;
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100, unique: true }),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], Permission.prototype, "name", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 50, unique: true }),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], Permission.prototype, "code", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.Column)({ type: 'enum', enum: PermissionType }),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], Permission.prototype, "type", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], Permission.prototype, "description", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: true }),
|
|
54
|
+
__metadata("design:type", Boolean)
|
|
55
|
+
], Permission.prototype, "is_active", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typeorm_1.ManyToMany)(() => role_1.Role),
|
|
58
|
+
(0, typeorm_1.JoinTable)({
|
|
59
|
+
name: 'role_permissions',
|
|
60
|
+
joinColumn: { name: 'permission_id', referencedColumnName: 'id' },
|
|
61
|
+
inverseJoinColumn: { name: 'role_id', referencedColumnName: 'id' },
|
|
62
|
+
}),
|
|
63
|
+
__metadata("design:type", Array)
|
|
64
|
+
], Permission.prototype, "roles", void 0);
|
|
65
|
+
exports.Permission = Permission = __decorate([
|
|
66
|
+
(0, typeorm_1.Entity)({ name: 'permissions' }),
|
|
67
|
+
__metadata("design:paramtypes", [String, String, String, String, String, Boolean])
|
|
68
|
+
], Permission);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare abstract class UUIDModel0 {
|
|
2
|
+
jsonIgnore: string[];
|
|
3
|
+
created_by?: string;
|
|
4
|
+
created_at?: Date;
|
|
5
|
+
updated_by?: string;
|
|
6
|
+
updated_at?: Date;
|
|
7
|
+
insertCreated(): void;
|
|
8
|
+
is_deleted?: boolean;
|
|
9
|
+
constructor();
|
|
10
|
+
}
|
|
11
|
+
export declare abstract class UUIDBaseModel extends UUIDModel0 {
|
|
12
|
+
id: string;
|
|
13
|
+
constructor();
|
|
14
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.UUIDBaseModel = exports.UUIDModel0 = void 0;
|
|
16
|
+
const moment_timezone_1 = __importDefault(require("moment-timezone"));
|
|
17
|
+
const typeorm_1 = require("typeorm");
|
|
18
|
+
class UUIDModel0 {
|
|
19
|
+
insertCreated() {
|
|
20
|
+
const currentTime = (0, moment_timezone_1.default)().utc().tz('Asia/Kolkata').toDate();
|
|
21
|
+
this.created_at = currentTime;
|
|
22
|
+
this.updated_at = currentTime;
|
|
23
|
+
}
|
|
24
|
+
constructor() {
|
|
25
|
+
this.jsonIgnore = ['logicalDelete', 'is_deleted', 'jsonIgnore'];
|
|
26
|
+
this.is_deleted = false;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.UUIDModel0 = UUIDModel0;
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.Column)({ type: 'uuid', nullable: true }),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], UUIDModel0.prototype, "created_by", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.CreateDateColumn)({ type: "timestamptz", default: () => "CURRENT_TIMESTAMP" }),
|
|
36
|
+
__metadata("design:type", Date)
|
|
37
|
+
], UUIDModel0.prototype, "created_at", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.Column)({ type: 'uuid', nullable: true }),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], UUIDModel0.prototype, "updated_by", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.UpdateDateColumn)({ type: "timestamptz", default: () => "CURRENT_TIMESTAMP" }),
|
|
44
|
+
__metadata("design:type", Date)
|
|
45
|
+
], UUIDModel0.prototype, "updated_at", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.BeforeInsert)(),
|
|
48
|
+
__metadata("design:type", Function),
|
|
49
|
+
__metadata("design:paramtypes", []),
|
|
50
|
+
__metadata("design:returntype", void 0)
|
|
51
|
+
], UUIDModel0.prototype, "insertCreated", null);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({ nullable: true, default: false }),
|
|
54
|
+
__metadata("design:type", Boolean)
|
|
55
|
+
], UUIDModel0.prototype, "is_deleted", void 0);
|
|
56
|
+
class UUIDBaseModel extends UUIDModel0 {
|
|
57
|
+
constructor() {
|
|
58
|
+
super();
|
|
59
|
+
this.id = ''; // This will be set by the database when the entity is saved
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
exports.UUIDBaseModel = UUIDBaseModel;
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
65
|
+
__metadata("design:type", String)
|
|
66
|
+
], UUIDBaseModel.prototype, "id", void 0);
|
package/package.json
CHANGED
package/src/data-source.ts
CHANGED
|
@@ -97,6 +97,12 @@ import { AssignTasksEmpApprovalDetails } from './models/AssignTasksEmpApprovalMo
|
|
|
97
97
|
import { AssignTasksEmpWorkFlow } from './models/AssignTasksEmpWorkflowModel';
|
|
98
98
|
import { AssignTasksEmpRequestAttachment } from './models/AssignTasksEmpAttachmentModel';
|
|
99
99
|
import { AssignTasksEmpRequestChat } from './models/AssignTasksEmpChatModel';
|
|
100
|
+
import { Document } from './models/DocumentModel';
|
|
101
|
+
import { DocumentFolder } from './models/DocumentFolderModel';
|
|
102
|
+
import { DocumentType } from './models/DocumentTypeModel';
|
|
103
|
+
import { DocumentPermission } from './models/DocumentPermissionModel';
|
|
104
|
+
import { DocumentAuditLog } from './models/DocumentAuditLogModel';
|
|
105
|
+
import { DepartmentDocumentOwner } from './models/DepartmentDocumentOwnerModel';
|
|
100
106
|
import { TrainingWorkFlow } from './models/TrainingWorkflowModel';
|
|
101
107
|
import { TrainingApprovalDetails } from './models/TrainingApprovalModel';
|
|
102
108
|
import { TrainingRequestChat } from './models/TrainingChatModel';
|
|
@@ -260,6 +266,12 @@ export const AppDataSource = new DataSource({
|
|
|
260
266
|
PromotionRequest,
|
|
261
267
|
AnnualIncrementRequest,
|
|
262
268
|
SkillsEnhancementRequest,
|
|
263
|
-
CityMaster
|
|
269
|
+
CityMaster,
|
|
270
|
+
Document,
|
|
271
|
+
DocumentFolder,
|
|
272
|
+
DocumentType,
|
|
273
|
+
DocumentPermission,
|
|
274
|
+
DocumentAuditLog,
|
|
275
|
+
DepartmentDocumentOwner
|
|
264
276
|
],
|
|
265
277
|
});
|
package/src/index.ts
CHANGED
|
@@ -239,14 +239,14 @@ export { AnnualIncrementRequestStatus } from './models/AnnualIncrementRequestMod
|
|
|
239
239
|
export * from './models/SkillsEnhancementRequestModel';
|
|
240
240
|
export { SkillsEnhancementRequestStatus } from './models/SkillsEnhancementRequestModel';
|
|
241
241
|
|
|
242
|
-
// Performance Management Service
|
|
243
|
-
export * from './models/PerformanceManagementRequestModel';
|
|
244
|
-
export { PerformanceManagementRequestStatus, PerformanceManagementCyclePeriod } from './models/PerformanceManagementRequestModel';
|
|
245
|
-
export * from './models/PerformanceCyclePeriodModel';
|
|
246
|
-
export * from './models/PerformanceGoalMasterModel';
|
|
242
|
+
// Performance Management Service
|
|
243
|
+
export * from './models/PerformanceManagementRequestModel';
|
|
244
|
+
export { PerformanceManagementRequestStatus, PerformanceManagementCyclePeriod } from './models/PerformanceManagementRequestModel';
|
|
245
|
+
export * from './models/PerformanceCyclePeriodModel';
|
|
246
|
+
export * from './models/PerformanceGoalMasterModel';
|
|
247
247
|
|
|
248
248
|
// Human Resource Annual Planning Service
|
|
249
249
|
export * from './models/HumanResourceAnnualPlanningRequestModel';
|
|
250
250
|
export { HumanResourceAnnualPlanningRequestStatus, Quarter } from './models/HumanResourceAnnualPlanningRequestModel';
|
|
251
251
|
export * from './models/HumanResourceAnnualPlanningTaskModel';
|
|
252
|
-
export { RepeatFrequency, DurationUnit } from './models/HumanResourceAnnualPlanningTaskModel';
|
|
252
|
+
export { RepeatFrequency, DurationUnit } from './models/HumanResourceAnnualPlanningTaskModel';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
import { Departments } from './DepartmentsModel';
|
|
4
|
+
import { User } from './user';
|
|
5
|
+
|
|
6
|
+
@Entity({ name: 'department_document_owners' })
|
|
7
|
+
export class DepartmentDocumentOwner extends BaseModel {
|
|
8
|
+
|
|
9
|
+
@Column({ type: 'integer', nullable: false, unique: true })
|
|
10
|
+
department_id: number;
|
|
11
|
+
|
|
12
|
+
@Column({ type: 'integer', nullable: false })
|
|
13
|
+
user_id: number;
|
|
14
|
+
|
|
15
|
+
@Column({ type: 'boolean', nullable: false, default: true })
|
|
16
|
+
is_active: boolean;
|
|
17
|
+
|
|
18
|
+
@ManyToOne(() => Departments)
|
|
19
|
+
@JoinColumn({ name: 'department_id' })
|
|
20
|
+
department?: Departments;
|
|
21
|
+
|
|
22
|
+
@ManyToOne(() => User)
|
|
23
|
+
@JoinColumn({ name: 'user_id' })
|
|
24
|
+
user?: User;
|
|
25
|
+
}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { Column, Entity } from "typeorm";
|
|
2
|
-
import { BaseModel } from './BaseModel';
|
|
3
|
-
|
|
4
|
-
@Entity({ name: 'departments' })
|
|
5
|
-
export class Departments extends BaseModel {
|
|
6
|
-
|
|
7
|
-
@Column({ type: 'varchar', length: 64, nullable: false})
|
|
8
|
-
department_name: string;
|
|
9
|
-
|
|
10
|
-
@Column({ type: 'varchar', length: 64, nullable: false})
|
|
11
|
-
department_code: string;
|
|
12
|
-
|
|
13
|
-
@Column({ nullable: false })
|
|
14
|
-
department_description: string;
|
|
15
|
-
|
|
16
|
-
constructor(
|
|
17
|
-
department_name: string,
|
|
18
|
-
department_code: string,
|
|
19
|
-
department_description: string,
|
|
20
|
-
) {
|
|
21
|
-
super();
|
|
22
|
-
this.department_name = department_name
|
|
23
|
-
this.department_code = department_code
|
|
24
|
-
this.department_description = department_description
|
|
25
|
-
}
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'departments' })
|
|
5
|
+
export class Departments extends BaseModel {
|
|
6
|
+
|
|
7
|
+
@Column({ type: 'varchar', length: 64, nullable: false})
|
|
8
|
+
department_name: string;
|
|
9
|
+
|
|
10
|
+
@Column({ type: 'varchar', length: 64, nullable: false})
|
|
11
|
+
department_code: string;
|
|
12
|
+
|
|
13
|
+
@Column({ nullable: false })
|
|
14
|
+
department_description: string;
|
|
15
|
+
|
|
16
|
+
constructor(
|
|
17
|
+
department_name: string,
|
|
18
|
+
department_code: string,
|
|
19
|
+
department_description: string,
|
|
20
|
+
) {
|
|
21
|
+
super();
|
|
22
|
+
this.department_name = department_name
|
|
23
|
+
this.department_code = department_code
|
|
24
|
+
this.department_description = department_description
|
|
25
|
+
}
|
|
26
26
|
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
import { User } from './user';
|
|
4
|
+
import { Document } from './DocumentModel';
|
|
5
|
+
|
|
6
|
+
@Entity({ name: 'document_audit_logs' })
|
|
7
|
+
export class DocumentAuditLog extends BaseModel {
|
|
8
|
+
|
|
9
|
+
@Column({ type: 'integer', nullable: false })
|
|
10
|
+
document_id: number;
|
|
11
|
+
|
|
12
|
+
@Column({ type: 'integer', nullable: false })
|
|
13
|
+
user_id: number;
|
|
14
|
+
|
|
15
|
+
@Column({
|
|
16
|
+
type: 'varchar',
|
|
17
|
+
length: 50,
|
|
18
|
+
nullable: false
|
|
19
|
+
})
|
|
20
|
+
action_type: string;
|
|
21
|
+
|
|
22
|
+
@Column({ type: 'jsonb', nullable: true })
|
|
23
|
+
action_details?: any;
|
|
24
|
+
|
|
25
|
+
@Column({ type: 'varchar', length: 45, nullable: true })
|
|
26
|
+
ip_address?: string;
|
|
27
|
+
|
|
28
|
+
@Column({ type: 'text', nullable: true })
|
|
29
|
+
user_agent?: string;
|
|
30
|
+
|
|
31
|
+
@ManyToOne(() => Document)
|
|
32
|
+
@JoinColumn({ name: 'document_id' })
|
|
33
|
+
document?: Document;
|
|
34
|
+
|
|
35
|
+
@ManyToOne(() => User)
|
|
36
|
+
@JoinColumn({ name: 'user_id' })
|
|
37
|
+
user?: User;
|
|
38
|
+
}
|