grm-shared-library 1.0.140 → 1.0.142
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/dist/modules/incident/dtos/action/incident-action.dto.d.ts +3 -2
- package/dist/modules/incident/dtos/action/incident-action.dto.js +11 -6
- package/dist/modules/incident/dtos/incident/create-incident.dto.d.ts +0 -2
- package/dist/modules/incident/dtos/incident/create-incident.dto.js +2 -8
- package/dist/modules/incident/dtos/incident/incident.dto.d.ts +2 -0
- package/dist/modules/incident/dtos/incident/incident.dto.js +8 -0
- package/dist/modules/incident/enums/incident-status.enum.d.ts +16 -0
- package/dist/modules/incident/enums/incident-status.enum.js +20 -0
- package/dist/modules/incident/index.d.ts +1 -0
- package/dist/modules/incident/index.js +1 -0
- package/dist/modules/incident/intefaces/incident-action.d.ts +4 -2
- package/dist/modules/incident/intefaces/incident.d.ts +3 -2
- package/dist/modules/organization/dtos/create-organization.dto.d.ts +2 -0
- package/dist/modules/organization/dtos/create-organization.dto.js +6 -0
- package/dist/modules/organization/interfaces/organization.d.ts +2 -0
- package/package.json +1 -1
|
@@ -14,6 +14,16 @@ const class_validator_1 = require("class-validator");
|
|
|
14
14
|
class IncidentActionDto {
|
|
15
15
|
}
|
|
16
16
|
exports.IncidentActionDto = IncidentActionDto;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, class_validator_1.IsNumber)(),
|
|
19
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
20
|
+
__metadata("design:type", Number)
|
|
21
|
+
], IncidentActionDto.prototype, "incidentId", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_validator_1.IsNumber)(),
|
|
24
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
25
|
+
__metadata("design:type", Number)
|
|
26
|
+
], IncidentActionDto.prototype, "userId", void 0);
|
|
17
27
|
__decorate([
|
|
18
28
|
(0, class_validator_1.IsString)(),
|
|
19
29
|
(0, class_validator_1.IsNotEmpty)(),
|
|
@@ -22,10 +32,5 @@ __decorate([
|
|
|
22
32
|
__decorate([
|
|
23
33
|
(0, class_validator_1.IsDateString)(),
|
|
24
34
|
(0, class_validator_1.IsNotEmpty)(),
|
|
25
|
-
__metadata("design:type",
|
|
35
|
+
__metadata("design:type", String)
|
|
26
36
|
], IncidentActionDto.prototype, "timestamp", void 0);
|
|
27
|
-
__decorate([
|
|
28
|
-
(0, class_validator_1.IsNumber)(),
|
|
29
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
30
|
-
__metadata("design:type", Number)
|
|
31
|
-
], IncidentActionDto.prototype, "userId", void 0);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { IncidentAppId } from "../../enums/incident-app-id.enum";
|
|
2
2
|
import { IncidentClass } from "../../enums/incident-class.enum";
|
|
3
3
|
import { IncidentChannel } from "../../enums/incident-channel.enum";
|
|
4
|
-
import { IncidentActionDto } from "../action/incident-action.dto";
|
|
5
4
|
import { IncidentPriority } from "../../enums/incident-priority.enum";
|
|
6
5
|
import { MapLocationDto } from "../../../common";
|
|
7
6
|
import { IncidentReporterDto } from "../reporter/incident-reporter.dto";
|
|
@@ -15,7 +14,6 @@ export declare class CreateIncidentDto {
|
|
|
15
14
|
typeId?: number;
|
|
16
15
|
description?: string;
|
|
17
16
|
status: string;
|
|
18
|
-
action: IncidentActionDto;
|
|
19
17
|
priority?: IncidentPriority;
|
|
20
18
|
location?: MapLocationDto;
|
|
21
19
|
controlCentreId: number;
|
|
@@ -15,10 +15,10 @@ const incident_app_id_enum_1 = require("../../enums/incident-app-id.enum");
|
|
|
15
15
|
const incident_class_enum_1 = require("../../enums/incident-class.enum");
|
|
16
16
|
const incident_channel_enum_1 = require("../../enums/incident-channel.enum");
|
|
17
17
|
const class_transformer_1 = require("class-transformer");
|
|
18
|
-
const incident_action_dto_1 = require("../action/incident-action.dto");
|
|
19
18
|
const incident_priority_enum_1 = require("../../enums/incident-priority.enum");
|
|
20
19
|
const common_1 = require("../../../common");
|
|
21
20
|
const incident_reporter_dto_1 = require("../reporter/incident-reporter.dto");
|
|
21
|
+
const incident_status_enum_1 = require("../../enums/incident-status.enum");
|
|
22
22
|
class CreateIncidentDto {
|
|
23
23
|
}
|
|
24
24
|
exports.CreateIncidentDto = CreateIncidentDto;
|
|
@@ -64,16 +64,10 @@ __decorate([
|
|
|
64
64
|
__metadata("design:type", String)
|
|
65
65
|
], CreateIncidentDto.prototype, "description", void 0);
|
|
66
66
|
__decorate([
|
|
67
|
-
(0, class_validator_1.
|
|
67
|
+
(0, class_validator_1.IsEnum)(incident_status_enum_1.IncidentStatus),
|
|
68
68
|
(0, class_validator_1.IsNotEmpty)(),
|
|
69
69
|
__metadata("design:type", String)
|
|
70
70
|
], CreateIncidentDto.prototype, "status", void 0);
|
|
71
|
-
__decorate([
|
|
72
|
-
(0, class_validator_1.ValidateNested)(),
|
|
73
|
-
(0, class_transformer_1.Type)(() => incident_action_dto_1.IncidentActionDto),
|
|
74
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
75
|
-
__metadata("design:type", incident_action_dto_1.IncidentActionDto)
|
|
76
|
-
], CreateIncidentDto.prototype, "action", void 0);
|
|
77
71
|
__decorate([
|
|
78
72
|
(0, class_validator_1.IsEnum)(incident_priority_enum_1.IncidentPriority),
|
|
79
73
|
(0, class_validator_1.IsOptional)(),
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { CreateIncidentDto } from "./create-incident.dto";
|
|
2
2
|
import { CreateIncidentCategoryDto } from "../category/create-incident-category.dto";
|
|
3
3
|
import { CreateIncidentTypeDto } from "../type/create-incident-type.dto";
|
|
4
|
+
import { IncidentActionDto } from "../action/incident-action.dto";
|
|
4
5
|
export declare class IncidentDto extends CreateIncidentDto {
|
|
5
6
|
id: number;
|
|
6
7
|
createdAt: string;
|
|
7
8
|
updatedAt: string;
|
|
8
9
|
category?: CreateIncidentCategoryDto;
|
|
9
10
|
type?: CreateIncidentTypeDto;
|
|
11
|
+
actions?: IncidentActionDto[];
|
|
10
12
|
}
|
|
@@ -15,6 +15,7 @@ const create_incident_dto_1 = require("./create-incident.dto");
|
|
|
15
15
|
const class_transformer_1 = require("class-transformer");
|
|
16
16
|
const create_incident_category_dto_1 = require("../category/create-incident-category.dto");
|
|
17
17
|
const create_incident_type_dto_1 = require("../type/create-incident-type.dto");
|
|
18
|
+
const incident_action_dto_1 = require("../action/incident-action.dto");
|
|
18
19
|
class IncidentDto extends create_incident_dto_1.CreateIncidentDto {
|
|
19
20
|
}
|
|
20
21
|
exports.IncidentDto = IncidentDto;
|
|
@@ -45,3 +46,10 @@ __decorate([
|
|
|
45
46
|
(0, class_validator_1.IsOptional)(),
|
|
46
47
|
__metadata("design:type", create_incident_type_dto_1.CreateIncidentTypeDto)
|
|
47
48
|
], IncidentDto.prototype, "type", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, class_validator_1.IsArray)(),
|
|
51
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
52
|
+
(0, class_transformer_1.Type)(() => incident_action_dto_1.IncidentActionDto),
|
|
53
|
+
(0, class_validator_1.IsOptional)(),
|
|
54
|
+
__metadata("design:type", Array)
|
|
55
|
+
], IncidentDto.prototype, "actions", void 0);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare enum IncidentStatus {
|
|
2
|
+
RECEIVED = "Received",
|
|
3
|
+
PENDING = "Pending",
|
|
4
|
+
IN_PROGRESS = "In-Progress",
|
|
5
|
+
ON_HOLD = "On-Hold",
|
|
6
|
+
CANCELLED = "Cancelled",
|
|
7
|
+
ESCALATED = "Escalated",
|
|
8
|
+
ASSIGNED = "Assigned",
|
|
9
|
+
RE_ASSIGNED = "Re-assigned",
|
|
10
|
+
IN_REVIEW = "In-Review",
|
|
11
|
+
RESOLVED = "Resolved",
|
|
12
|
+
CLOSED = "Closed",
|
|
13
|
+
REOPENED = "Reopened",
|
|
14
|
+
OVERDUE = "Overdue",
|
|
15
|
+
ARCHIVED = "Archived"
|
|
16
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IncidentStatus = void 0;
|
|
4
|
+
var IncidentStatus;
|
|
5
|
+
(function (IncidentStatus) {
|
|
6
|
+
IncidentStatus["RECEIVED"] = "Received";
|
|
7
|
+
IncidentStatus["PENDING"] = "Pending";
|
|
8
|
+
IncidentStatus["IN_PROGRESS"] = "In-Progress";
|
|
9
|
+
IncidentStatus["ON_HOLD"] = "On-Hold";
|
|
10
|
+
IncidentStatus["CANCELLED"] = "Cancelled";
|
|
11
|
+
IncidentStatus["ESCALATED"] = "Escalated";
|
|
12
|
+
IncidentStatus["ASSIGNED"] = "Assigned";
|
|
13
|
+
IncidentStatus["RE_ASSIGNED"] = "Re-assigned";
|
|
14
|
+
IncidentStatus["IN_REVIEW"] = "In-Review";
|
|
15
|
+
IncidentStatus["RESOLVED"] = "Resolved";
|
|
16
|
+
IncidentStatus["CLOSED"] = "Closed";
|
|
17
|
+
IncidentStatus["REOPENED"] = "Reopened";
|
|
18
|
+
IncidentStatus["OVERDUE"] = "Overdue";
|
|
19
|
+
IncidentStatus["ARCHIVED"] = "Archived";
|
|
20
|
+
})(IncidentStatus || (exports.IncidentStatus = IncidentStatus = {}));
|
|
@@ -13,6 +13,7 @@ export * from './enums/incident-app-id.enum';
|
|
|
13
13
|
export * from './enums/incident-channel.enum';
|
|
14
14
|
export * from './enums/incident-class.enum';
|
|
15
15
|
export * from './enums/incident-priority.enum';
|
|
16
|
+
export * from './enums/incident-status.enum';
|
|
16
17
|
export * from './intefaces/incident';
|
|
17
18
|
export * from './intefaces/incident-action';
|
|
18
19
|
export * from './intefaces/incident-attachment';
|
|
@@ -31,6 +31,7 @@ __exportStar(require("./enums/incident-app-id.enum"), exports);
|
|
|
31
31
|
__exportStar(require("./enums/incident-channel.enum"), exports);
|
|
32
32
|
__exportStar(require("./enums/incident-class.enum"), exports);
|
|
33
33
|
__exportStar(require("./enums/incident-priority.enum"), exports);
|
|
34
|
+
__exportStar(require("./enums/incident-status.enum"), exports);
|
|
34
35
|
//Interfaces
|
|
35
36
|
__exportStar(require("./intefaces/incident"), exports);
|
|
36
37
|
__exportStar(require("./intefaces/incident-action"), exports);
|
|
@@ -3,6 +3,7 @@ import { IncidentAppId } from "../enums/incident-app-id.enum";
|
|
|
3
3
|
import { IncidentChannel } from "../enums/incident-channel.enum";
|
|
4
4
|
import { IncidentClass } from "../enums/incident-class.enum";
|
|
5
5
|
import { IncidentPriority } from "../enums/incident-priority.enum";
|
|
6
|
+
import { IncidentStatus } from "../enums/incident-status.enum";
|
|
6
7
|
import { IncidentAction } from "./incident-action";
|
|
7
8
|
import { IncidentCategory } from "./incident-category";
|
|
8
9
|
import { IncidentReporter } from "./incident-reporter";
|
|
@@ -17,8 +18,7 @@ export interface Incident {
|
|
|
17
18
|
categoryId: number;
|
|
18
19
|
typeId: number;
|
|
19
20
|
description?: string;
|
|
20
|
-
status:
|
|
21
|
-
action: IncidentAction;
|
|
21
|
+
status: IncidentStatus;
|
|
22
22
|
priority?: IncidentPriority;
|
|
23
23
|
location?: MapLocation;
|
|
24
24
|
controlCentreId: number;
|
|
@@ -27,4 +27,5 @@ export interface Incident {
|
|
|
27
27
|
updatedAt?: Date;
|
|
28
28
|
category?: IncidentCategory;
|
|
29
29
|
type?: IncidentType;
|
|
30
|
+
actions?: IncidentAction[];
|
|
30
31
|
}
|
|
@@ -2,7 +2,9 @@ import { MapAddressDto } from "../../common/dtos/map-address.dto";
|
|
|
2
2
|
import { OrganizationStatus } from "../enums/org-status.enum";
|
|
3
3
|
import { ContactPersonDto } from "../../common/dtos/contact-person.dto";
|
|
4
4
|
import { OrganizationType } from "../enums/org-type.enum";
|
|
5
|
+
import { IncidentClass } from "../../incident";
|
|
5
6
|
export declare class CreateOrganizationDto {
|
|
7
|
+
incidentClass: IncidentClass;
|
|
6
8
|
name: string;
|
|
7
9
|
phoneNumber?: string;
|
|
8
10
|
email?: string;
|
|
@@ -16,9 +16,15 @@ const map_address_dto_1 = require("../../common/dtos/map-address.dto");
|
|
|
16
16
|
const org_status_enum_1 = require("../enums/org-status.enum");
|
|
17
17
|
const contact_person_dto_1 = require("../../common/dtos/contact-person.dto");
|
|
18
18
|
const org_type_enum_1 = require("../enums/org-type.enum");
|
|
19
|
+
const incident_1 = require("../../incident");
|
|
19
20
|
class CreateOrganizationDto {
|
|
20
21
|
}
|
|
21
22
|
exports.CreateOrganizationDto = CreateOrganizationDto;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, class_validator_1.IsEnum)(incident_1.IncidentClass),
|
|
25
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], CreateOrganizationDto.prototype, "incidentClass", void 0);
|
|
22
28
|
__decorate([
|
|
23
29
|
(0, class_validator_1.IsString)(),
|
|
24
30
|
(0, class_validator_1.IsNotEmpty)(),
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { ContactPerson, MapAddress } from "../../common";
|
|
2
|
+
import { IncidentClass } from "../../incident";
|
|
2
3
|
import { OrganizationType } from "../enums/org-type.enum";
|
|
3
4
|
export interface Organization {
|
|
4
5
|
id?: number;
|
|
6
|
+
incidentClass: IncidentClass;
|
|
5
7
|
name: string;
|
|
6
8
|
phoneNumber?: string;
|
|
7
9
|
email?: string;
|