grm-shared-library 1.1.93 → 1.1.95
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/cjs/modules/common/dtos/map-location.dto.js +20 -0
- package/dist/cjs/modules/common/dtos/map-location.dto.js.map +1 -1
- package/dist/cjs/modules/incident/dtos/assignment/create-incident-assignment.dto.js +30 -0
- package/dist/cjs/modules/incident/dtos/assignment/create-incident-assignment.dto.js.map +1 -1
- package/dist/cjs/modules/incident/dtos/assignment/incident-assignment.dto.js +12 -0
- package/dist/cjs/modules/incident/dtos/assignment/incident-assignment.dto.js.map +1 -1
- package/dist/cjs/modules/incident/dtos/category/create-incident-category.dto.js +15 -0
- package/dist/cjs/modules/incident/dtos/category/create-incident-category.dto.js.map +1 -1
- package/dist/cjs/modules/incident/dtos/incident/create-incident.dto.js +91 -0
- package/dist/cjs/modules/incident/dtos/incident/create-incident.dto.js.map +1 -1
- package/dist/cjs/modules/incident/dtos/incident/incident-status-changed.dto.js +22 -0
- package/dist/cjs/modules/incident/dtos/incident/incident-status-changed.dto.js.map +1 -1
- package/dist/cjs/modules/incident/dtos/incident/incident.dto.js +33 -0
- package/dist/cjs/modules/incident/dtos/incident/incident.dto.js.map +1 -1
- package/dist/cjs/modules/incident/dtos/incident/update-incident.dto.js +4 -0
- package/dist/cjs/modules/incident/dtos/incident/update-incident.dto.js.map +1 -1
- package/dist/cjs/modules/incident/dtos/reporter/create-incident-reporter.dto.js +21 -0
- package/dist/cjs/modules/incident/dtos/reporter/create-incident-reporter.dto.js.map +1 -1
- package/dist/esm/modules/common/dtos/map-location.dto.js +20 -0
- package/dist/esm/modules/common/dtos/map-location.dto.js.map +1 -1
- package/dist/esm/modules/incident/dtos/assignment/create-incident-assignment.dto.js +30 -0
- package/dist/esm/modules/incident/dtos/assignment/create-incident-assignment.dto.js.map +1 -1
- package/dist/esm/modules/incident/dtos/assignment/incident-assignment.dto.js +12 -0
- package/dist/esm/modules/incident/dtos/assignment/incident-assignment.dto.js.map +1 -1
- package/dist/esm/modules/incident/dtos/category/create-incident-category.dto.js +15 -0
- package/dist/esm/modules/incident/dtos/category/create-incident-category.dto.js.map +1 -1
- package/dist/esm/modules/incident/dtos/incident/create-incident.dto.js +91 -0
- package/dist/esm/modules/incident/dtos/incident/create-incident.dto.js.map +1 -1
- package/dist/esm/modules/incident/dtos/incident/incident-status-changed.dto.js +22 -0
- package/dist/esm/modules/incident/dtos/incident/incident-status-changed.dto.js.map +1 -1
- package/dist/esm/modules/incident/dtos/incident/incident.dto.js +33 -0
- package/dist/esm/modules/incident/dtos/incident/incident.dto.js.map +1 -1
- package/dist/esm/modules/incident/dtos/incident/update-incident.dto.js +4 -0
- package/dist/esm/modules/incident/dtos/incident/update-incident.dto.js.map +1 -1
- package/dist/esm/modules/incident/dtos/reporter/create-incident-reporter.dto.js +21 -0
- package/dist/esm/modules/incident/dtos/reporter/create-incident-reporter.dto.js.map +1 -1
- package/dist/types/modules/incident/dtos/incident/update-incident.dto.d.ts +4 -0
- package/package.json +1 -1
|
@@ -11,30 +11,51 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.CreateIncidentReporterDto = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
15
|
class CreateIncidentReporterDto {
|
|
15
16
|
}
|
|
16
17
|
exports.CreateIncidentReporterDto = CreateIncidentReporterDto;
|
|
17
18
|
__decorate([
|
|
19
|
+
(0, swagger_1.ApiProperty)({
|
|
20
|
+
description: 'Full name of the person reporting the incident',
|
|
21
|
+
example: 'John Doe'
|
|
22
|
+
}),
|
|
18
23
|
(0, class_validator_1.IsString)(),
|
|
19
24
|
(0, class_validator_1.IsNotEmpty)(),
|
|
20
25
|
__metadata("design:type", String)
|
|
21
26
|
], CreateIncidentReporterDto.prototype, "name", void 0);
|
|
22
27
|
__decorate([
|
|
28
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
29
|
+
description: 'Phone number of the reporter',
|
|
30
|
+
example: '+1234567890'
|
|
31
|
+
}),
|
|
23
32
|
(0, class_validator_1.IsPhoneNumber)(),
|
|
24
33
|
(0, class_validator_1.IsOptional)(),
|
|
25
34
|
__metadata("design:type", String)
|
|
26
35
|
], CreateIncidentReporterDto.prototype, "phoneNumber", void 0);
|
|
27
36
|
__decorate([
|
|
37
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
38
|
+
description: 'Email address of the reporter',
|
|
39
|
+
example: 'john.doe@example.com'
|
|
40
|
+
}),
|
|
28
41
|
(0, class_validator_1.IsEmail)(),
|
|
29
42
|
(0, class_validator_1.IsOptional)(),
|
|
30
43
|
__metadata("design:type", String)
|
|
31
44
|
], CreateIncidentReporterDto.prototype, "email", void 0);
|
|
32
45
|
__decorate([
|
|
46
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
47
|
+
description: 'Date and time when the reporter was created',
|
|
48
|
+
example: '2024-01-15T10:30:00.000Z'
|
|
49
|
+
}),
|
|
33
50
|
(0, class_validator_1.IsDate)(),
|
|
34
51
|
(0, class_validator_1.IsOptional)(),
|
|
35
52
|
__metadata("design:type", Date)
|
|
36
53
|
], CreateIncidentReporterDto.prototype, "createdAt", void 0);
|
|
37
54
|
__decorate([
|
|
55
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
56
|
+
description: 'Date and time when the reporter was last updated',
|
|
57
|
+
example: '2024-01-15T10:30:00.000Z'
|
|
58
|
+
}),
|
|
38
59
|
(0, class_validator_1.IsDate)(),
|
|
39
60
|
(0, class_validator_1.IsOptional)(),
|
|
40
61
|
__metadata("design:type", Date)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-incident-reporter.dto.js","sourceRoot":"","sources":["../../../../../../src/modules/incident/dtos/reporter/create-incident-reporter.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAmG;
|
|
1
|
+
{"version":3,"file":"create-incident-reporter.dto.js","sourceRoot":"","sources":["../../../../../../src/modules/incident/dtos/reporter/create-incident-reporter.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAmG;AACnG,6CAAmE;AAEnE,MAAa,yBAAyB;CAwCrC;AAxCD,8DAwCC;AAjCG;IANC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,gDAAgD;QAC7D,OAAO,EAAE,UAAU;KACtB,CAAC;IACD,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;uDACC;AAQd;IANC,IAAA,6BAAmB,EAAC;QACjB,WAAW,EAAE,8BAA8B;QAC3C,OAAO,EAAE,aAAa;KACzB,CAAC;IACD,IAAA,+BAAa,GAAE;IACf,IAAA,4BAAU,GAAE;;8DACQ;AAQrB;IANC,IAAA,6BAAmB,EAAC;QACjB,WAAW,EAAE,+BAA+B;QAC5C,OAAO,EAAE,sBAAsB;KAClC,CAAC;IACD,IAAA,yBAAO,GAAE;IACT,IAAA,4BAAU,GAAE;;wDACE;AAQf;IANC,IAAA,6BAAmB,EAAC;QACjB,WAAW,EAAE,6CAA6C;QAC1D,OAAO,EAAE,0BAA0B;KACtC,CAAC;IACD,IAAA,wBAAM,GAAE;IACR,IAAA,4BAAU,GAAE;8BACD,IAAI;4DAAC;AAQjB;IANC,IAAA,6BAAmB,EAAC;QACjB,WAAW,EAAE,kDAAkD;QAC/D,OAAO,EAAE,0BAA0B;KACtC,CAAC;IACD,IAAA,wBAAM,GAAE;IACR,IAAA,4BAAU,GAAE;8BACD,IAAI;4DAAC"}
|
|
@@ -7,22 +7,42 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
|
+
import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
|
|
10
11
|
import { IsNumber, IsOptional, Max, Min } from "class-validator";
|
|
11
12
|
export class MapLocationDto {
|
|
12
13
|
}
|
|
13
14
|
__decorate([
|
|
15
|
+
ApiProperty({
|
|
16
|
+
description: 'Latitude coordinate of the location',
|
|
17
|
+
example: 40.7128,
|
|
18
|
+
minimum: -90,
|
|
19
|
+
maximum: 90,
|
|
20
|
+
type: 'number'
|
|
21
|
+
}),
|
|
14
22
|
IsNumber(),
|
|
15
23
|
Min(-90),
|
|
16
24
|
Max(90),
|
|
17
25
|
__metadata("design:type", Number)
|
|
18
26
|
], MapLocationDto.prototype, "lat", void 0);
|
|
19
27
|
__decorate([
|
|
28
|
+
ApiProperty({
|
|
29
|
+
description: 'Longitude coordinate of the location',
|
|
30
|
+
example: -74.0060,
|
|
31
|
+
minimum: -180,
|
|
32
|
+
maximum: 180,
|
|
33
|
+
type: 'number'
|
|
34
|
+
}),
|
|
20
35
|
IsNumber(),
|
|
21
36
|
Min(-180),
|
|
22
37
|
Max(180),
|
|
23
38
|
__metadata("design:type", Number)
|
|
24
39
|
], MapLocationDto.prototype, "lng", void 0);
|
|
25
40
|
__decorate([
|
|
41
|
+
ApiPropertyOptional({
|
|
42
|
+
description: 'Direction or heading in degrees (0-360)',
|
|
43
|
+
example: 45,
|
|
44
|
+
type: 'number'
|
|
45
|
+
}),
|
|
26
46
|
IsNumber(),
|
|
27
47
|
IsOptional(),
|
|
28
48
|
__metadata("design:type", Number)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"map-location.dto.js","sourceRoot":"","sources":["../../../../../src/modules/common/dtos/map-location.dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAEjE,MAAM,OAAO,cAAc;
|
|
1
|
+
{"version":3,"file":"map-location.dto.js","sourceRoot":"","sources":["../../../../../src/modules/common/dtos/map-location.dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAEjE,MAAM,OAAO,cAAc;CAiC1B;AAtBG;IAVC,WAAW,CAAC;QACT,WAAW,EAAE,qCAAqC;QAClD,OAAO,EAAE,OAAO;QAChB,OAAO,EAAE,CAAC,EAAE;QACZ,OAAO,EAAE,EAAE;QACX,IAAI,EAAE,QAAQ;KACjB,CAAC;IACD,QAAQ,EAAE;IACV,GAAG,CAAC,CAAC,EAAE,CAAC;IACR,GAAG,CAAC,EAAE,CAAC;;2CACK;AAYb;IAVC,WAAW,CAAC;QACT,WAAW,EAAE,sCAAsC;QACnD,OAAO,EAAE,CAAC,OAAO;QACjB,OAAO,EAAE,CAAC,GAAG;QACb,OAAO,EAAE,GAAG;QACZ,IAAI,EAAE,QAAQ;KACjB,CAAC;IACD,QAAQ,EAAE;IACV,GAAG,CAAC,CAAC,GAAG,CAAC;IACT,GAAG,CAAC,GAAG,CAAC;;2CACI;AASb;IAPC,mBAAmB,CAAC;QACjB,WAAW,EAAE,yCAAyC;QACtD,OAAO,EAAE,EAAE;QACX,IAAI,EAAE,QAAQ;KACjB,CAAC;IACD,QAAQ,EAAE;IACV,UAAU,EAAE;;8CACG"}
|
|
@@ -7,32 +7,62 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
|
+
import { ApiProperty } from "@nestjs/swagger";
|
|
10
11
|
import { IsArray, IsDateString, IsNotEmpty, IsNumber, IsOptional, IsString, MaxLength } from "class-validator";
|
|
11
12
|
export class CreateIncidentAssignmentDto {
|
|
12
13
|
}
|
|
13
14
|
__decorate([
|
|
15
|
+
ApiProperty({
|
|
16
|
+
description: 'ID of the incident to assign personnel to',
|
|
17
|
+
example: 1001,
|
|
18
|
+
type: 'number'
|
|
19
|
+
}),
|
|
14
20
|
IsNumber(),
|
|
15
21
|
IsNotEmpty(),
|
|
16
22
|
__metadata("design:type", Number)
|
|
17
23
|
], CreateIncidentAssignmentDto.prototype, "incidentId", void 0);
|
|
18
24
|
__decorate([
|
|
25
|
+
ApiProperty({
|
|
26
|
+
description: 'Optional comments or notes about the assignment',
|
|
27
|
+
example: 'Assigning senior responders due to high priority incident',
|
|
28
|
+
required: false,
|
|
29
|
+
maxLength: 2000,
|
|
30
|
+
type: 'string'
|
|
31
|
+
}),
|
|
19
32
|
IsString(),
|
|
20
33
|
IsOptional(),
|
|
21
34
|
MaxLength(2000),
|
|
22
35
|
__metadata("design:type", String)
|
|
23
36
|
], CreateIncidentAssignmentDto.prototype, "comments", void 0);
|
|
24
37
|
__decorate([
|
|
38
|
+
ApiProperty({
|
|
39
|
+
description: 'ID of the user making the assignment',
|
|
40
|
+
example: 42,
|
|
41
|
+
type: 'number'
|
|
42
|
+
}),
|
|
25
43
|
IsNumber(),
|
|
26
44
|
IsNotEmpty(),
|
|
27
45
|
__metadata("design:type", Number)
|
|
28
46
|
], CreateIncidentAssignmentDto.prototype, "assignerId", void 0);
|
|
29
47
|
__decorate([
|
|
48
|
+
ApiProperty({
|
|
49
|
+
description: 'Array of user IDs to assign to the incident',
|
|
50
|
+
example: [101, 102, 103],
|
|
51
|
+
type: 'array',
|
|
52
|
+
items: { type: 'number' }
|
|
53
|
+
}),
|
|
30
54
|
IsArray(),
|
|
31
55
|
IsNumber({}, { each: true }),
|
|
32
56
|
IsNotEmpty(),
|
|
33
57
|
__metadata("design:type", Array)
|
|
34
58
|
], CreateIncidentAssignmentDto.prototype, "assigneeIds", void 0);
|
|
35
59
|
__decorate([
|
|
60
|
+
ApiProperty({
|
|
61
|
+
description: 'ISO timestamp when the assignment was made',
|
|
62
|
+
example: '2024-01-15T14:30:00.000Z',
|
|
63
|
+
type: 'string',
|
|
64
|
+
format: 'date-time'
|
|
65
|
+
}),
|
|
36
66
|
IsDateString(),
|
|
37
67
|
IsNotEmpty(),
|
|
38
68
|
__metadata("design:type", String)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-incident-assignment.dto.js","sourceRoot":"","sources":["../../../../../../src/modules/incident/dtos/assignment/create-incident-assignment.dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE/G,MAAM,OAAO,2BAA2B;
|
|
1
|
+
{"version":3,"file":"create-incident-assignment.dto.js","sourceRoot":"","sources":["../../../../../../src/modules/incident/dtos/assignment/create-incident-assignment.dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE/G,MAAM,OAAO,2BAA2B;CAmDvC;AA3CG;IAPC,WAAW,CAAC;QACT,WAAW,EAAE,2CAA2C;QACxD,OAAO,EAAE,IAAI;QACb,IAAI,EAAE,QAAQ;KACjB,CAAC;IACD,QAAQ,EAAE;IACV,UAAU,EAAE;;+DACO;AAYpB;IAVC,WAAW,CAAC;QACT,WAAW,EAAE,iDAAiD;QAC9D,OAAO,EAAE,2DAA2D;QACpE,QAAQ,EAAE,KAAK;QACf,SAAS,EAAE,IAAI;QACf,IAAI,EAAE,QAAQ;KACjB,CAAC;IACD,QAAQ,EAAE;IACV,UAAU,EAAE;IACZ,SAAS,CAAC,IAAI,CAAC;;6DACE;AASlB;IAPC,WAAW,CAAC;QACT,WAAW,EAAE,sCAAsC;QACnD,OAAO,EAAE,EAAE;QACX,IAAI,EAAE,QAAQ;KACjB,CAAC;IACD,QAAQ,EAAE;IACV,UAAU,EAAE;;+DACO;AAWpB;IATC,WAAW,CAAC;QACT,WAAW,EAAE,6CAA6C;QAC1D,OAAO,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;QACxB,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;KAC5B,CAAC;IACD,OAAO,EAAE;IACT,QAAQ,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC5B,UAAU,EAAE;;gEACU;AAUvB;IARC,WAAW,CAAC;QACT,WAAW,EAAE,4CAA4C;QACzD,OAAO,EAAE,0BAA0B;QACnC,IAAI,EAAE,QAAQ;QACd,MAAM,EAAE,WAAW;KACtB,CAAC;IACD,YAAY,EAAE;IACd,UAAU,EAAE;;8DACM"}
|
|
@@ -7,17 +7,29 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
|
+
import { ApiProperty } from "@nestjs/swagger";
|
|
10
11
|
import { OmitType } from "@nestjs/mapped-types";
|
|
11
12
|
import { IsDateString, IsNotEmpty, IsNumber } from "class-validator";
|
|
12
13
|
import { CreateIncidentAssignmentDto } from "./create-incident-assignment.dto";
|
|
13
14
|
export class IncidentAssignmentDto extends OmitType(CreateIncidentAssignmentDto, ['timestamp']) {
|
|
14
15
|
}
|
|
15
16
|
__decorate([
|
|
17
|
+
ApiProperty({
|
|
18
|
+
description: 'Unique identifier for the incident assignment',
|
|
19
|
+
example: 5001,
|
|
20
|
+
type: 'number'
|
|
21
|
+
}),
|
|
16
22
|
IsNumber(),
|
|
17
23
|
IsNotEmpty(),
|
|
18
24
|
__metadata("design:type", Number)
|
|
19
25
|
], IncidentAssignmentDto.prototype, "id", void 0);
|
|
20
26
|
__decorate([
|
|
27
|
+
ApiProperty({
|
|
28
|
+
description: 'ISO timestamp when the assignment was created in the system',
|
|
29
|
+
example: '2024-01-15T14:30:00.000Z',
|
|
30
|
+
type: 'string',
|
|
31
|
+
format: 'date-time'
|
|
32
|
+
}),
|
|
21
33
|
IsDateString(),
|
|
22
34
|
IsNotEmpty(),
|
|
23
35
|
__metadata("design:type", String)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"incident-assignment.dto.js","sourceRoot":"","sources":["../../../../../../src/modules/incident/dtos/assignment/incident-assignment.dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACrE,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAE/E,MAAM,OAAO,qBAAsB,SAAQ,QAAQ,CAAC,2BAA2B,EAAE,CAAC,WAAW,CAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"incident-assignment.dto.js","sourceRoot":"","sources":["../../../../../../src/modules/incident/dtos/assignment/incident-assignment.dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACrE,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAE/E,MAAM,OAAO,qBAAsB,SAAQ,QAAQ,CAAC,2BAA2B,EAAE,CAAC,WAAW,CAAU,CAAC;CAmBvG;AAXG;IAPC,WAAW,CAAC;QACT,WAAW,EAAE,+CAA+C;QAC5D,OAAO,EAAE,IAAI;QACb,IAAI,EAAE,QAAQ;KACjB,CAAC;IACD,QAAQ,EAAE;IACV,UAAU,EAAE;;iDACD;AAUZ;IARC,WAAW,CAAC;QACT,WAAW,EAAE,6DAA6D;QAC1E,OAAO,EAAE,0BAA0B;QACnC,IAAI,EAAE,QAAQ;QACd,MAAM,EAAE,WAAW;KACtB,CAAC;IACD,YAAY,EAAE;IACd,UAAU,EAAE;;wDACM"}
|
|
@@ -8,21 +8,36 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
10
|
import { IsNotEmpty, IsNumber, IsOptional, IsString, MaxLength } from "class-validator";
|
|
11
|
+
import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
|
|
11
12
|
export class CreateIncidentCategoryDto {
|
|
12
13
|
}
|
|
13
14
|
__decorate([
|
|
15
|
+
ApiProperty({
|
|
16
|
+
description: 'Name of the incident category',
|
|
17
|
+
maxLength: 50,
|
|
18
|
+
example: 'Fire Emergency'
|
|
19
|
+
}),
|
|
14
20
|
IsString(),
|
|
15
21
|
IsNotEmpty(),
|
|
16
22
|
MaxLength(50),
|
|
17
23
|
__metadata("design:type", String)
|
|
18
24
|
], CreateIncidentCategoryDto.prototype, "name", void 0);
|
|
19
25
|
__decorate([
|
|
26
|
+
ApiPropertyOptional({
|
|
27
|
+
description: 'Detailed description of the incident category',
|
|
28
|
+
maxLength: 255,
|
|
29
|
+
example: 'Category for all fire-related emergency incidents'
|
|
30
|
+
}),
|
|
20
31
|
IsString(),
|
|
21
32
|
IsOptional(),
|
|
22
33
|
MaxLength(255),
|
|
23
34
|
__metadata("design:type", String)
|
|
24
35
|
], CreateIncidentCategoryDto.prototype, "description", void 0);
|
|
25
36
|
__decorate([
|
|
37
|
+
ApiProperty({
|
|
38
|
+
description: 'ID of the organization this category belongs to',
|
|
39
|
+
example: 1
|
|
40
|
+
}),
|
|
26
41
|
IsNumber(),
|
|
27
42
|
IsNotEmpty(),
|
|
28
43
|
__metadata("design:type", Number)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-incident-category.dto.js","sourceRoot":"","sources":["../../../../../../src/modules/incident/dtos/category/create-incident-category.dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"create-incident-category.dto.js","sourceRoot":"","sources":["../../../../../../src/modules/incident/dtos/category/create-incident-category.dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACxF,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEnE,MAAM,OAAO,yBAAyB;CA4BrC;AAnBG;IARC,WAAW,CAAC;QACT,WAAW,EAAE,+BAA+B;QAC5C,SAAS,EAAE,EAAE;QACb,OAAO,EAAE,gBAAgB;KAC5B,CAAC;IACD,QAAQ,EAAE;IACV,UAAU,EAAE;IACZ,SAAS,CAAC,EAAE,CAAC;;uDACA;AAUd;IARC,mBAAmB,CAAC;QACjB,WAAW,EAAE,+CAA+C;QAC5D,SAAS,EAAE,GAAG;QACd,OAAO,EAAE,mDAAmD;KAC/D,CAAC;IACD,QAAQ,EAAE;IACV,UAAU,EAAE;IACZ,SAAS,CAAC,GAAG,CAAC;;8DACM;AAQrB;IANC,WAAW,CAAC;QACT,WAAW,EAAE,iDAAiD;QAC9D,OAAO,EAAE,CAAC;KACb,CAAC;IACD,QAAQ,EAAE;IACV,UAAU,EAAE;;iEACW"}
|
|
@@ -8,6 +8,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
10
|
import { IsArray, IsBoolean, IsEnum, IsNotEmpty, IsNumber, IsOptional, IsString, ValidateNested } from "class-validator";
|
|
11
|
+
import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
|
|
11
12
|
import { IncidentAppId } from "../../enums/incident-app-id.enum";
|
|
12
13
|
import { IncidentClass } from "../../enums/incident-class.enum";
|
|
13
14
|
import { IncidentChannel } from "../../enums/incident-channel.enum";
|
|
@@ -22,52 +23,97 @@ import { IncidentEmergencyType } from "../../enums/incident-emergency-type.enum"
|
|
|
22
23
|
export class CreateIncidentDto {
|
|
23
24
|
}
|
|
24
25
|
__decorate([
|
|
26
|
+
ApiProperty({
|
|
27
|
+
description: 'Application ID where the incident was created',
|
|
28
|
+
enum: IncidentAppId,
|
|
29
|
+
example: IncidentAppId.PASHA
|
|
30
|
+
}),
|
|
25
31
|
IsEnum(IncidentAppId),
|
|
26
32
|
IsNotEmpty(),
|
|
27
33
|
__metadata("design:type", String)
|
|
28
34
|
], CreateIncidentDto.prototype, "appId", void 0);
|
|
29
35
|
__decorate([
|
|
36
|
+
ApiProperty({
|
|
37
|
+
description: 'Classification of the incident',
|
|
38
|
+
enum: IncidentClass,
|
|
39
|
+
example: IncidentClass.INCIDENT
|
|
40
|
+
}),
|
|
30
41
|
IsEnum(IncidentClass),
|
|
31
42
|
IsNotEmpty(),
|
|
32
43
|
__metadata("design:type", String)
|
|
33
44
|
], CreateIncidentDto.prototype, "class", void 0);
|
|
34
45
|
__decorate([
|
|
46
|
+
ApiProperty({
|
|
47
|
+
description: 'Type of emergency for the incident',
|
|
48
|
+
enum: IncidentEmergencyType,
|
|
49
|
+
example: IncidentEmergencyType.EMERGENCY
|
|
50
|
+
}),
|
|
35
51
|
IsEnum(IncidentEmergencyType),
|
|
36
52
|
IsNotEmpty(),
|
|
37
53
|
__metadata("design:type", String)
|
|
38
54
|
], CreateIncidentDto.prototype, "emergencyType", void 0);
|
|
39
55
|
__decorate([
|
|
56
|
+
ApiProperty({
|
|
57
|
+
description: 'Information about the person reporting the incident',
|
|
58
|
+
type: CreateIncidentReporterDto
|
|
59
|
+
}),
|
|
40
60
|
ValidateNested(),
|
|
41
61
|
Type(() => CreateIncidentReporterDto),
|
|
42
62
|
IsNotEmpty(),
|
|
43
63
|
__metadata("design:type", CreateIncidentReporterDto)
|
|
44
64
|
], CreateIncidentDto.prototype, "reporter", void 0);
|
|
45
65
|
__decorate([
|
|
66
|
+
ApiPropertyOptional({
|
|
67
|
+
description: 'Whether the incident report is anonymous',
|
|
68
|
+
example: false
|
|
69
|
+
}),
|
|
46
70
|
IsBoolean(),
|
|
47
71
|
IsOptional(),
|
|
48
72
|
__metadata("design:type", Boolean)
|
|
49
73
|
], CreateIncidentDto.prototype, "isAnonymous", void 0);
|
|
50
74
|
__decorate([
|
|
75
|
+
ApiProperty({
|
|
76
|
+
description: 'Channel through which the incident was reported',
|
|
77
|
+
enum: IncidentChannel,
|
|
78
|
+
example: IncidentChannel.APP
|
|
79
|
+
}),
|
|
51
80
|
IsEnum(IncidentChannel),
|
|
52
81
|
IsNotEmpty(),
|
|
53
82
|
__metadata("design:type", String)
|
|
54
83
|
], CreateIncidentDto.prototype, "channel", void 0);
|
|
55
84
|
__decorate([
|
|
85
|
+
ApiPropertyOptional({
|
|
86
|
+
description: 'ID of the incident category',
|
|
87
|
+
example: 1
|
|
88
|
+
}),
|
|
56
89
|
IsNumber(),
|
|
57
90
|
IsOptional(),
|
|
58
91
|
__metadata("design:type", Number)
|
|
59
92
|
], CreateIncidentDto.prototype, "categoryId", void 0);
|
|
60
93
|
__decorate([
|
|
94
|
+
ApiPropertyOptional({
|
|
95
|
+
description: 'ID of the incident type',
|
|
96
|
+
example: 1
|
|
97
|
+
}),
|
|
61
98
|
IsNumber(),
|
|
62
99
|
IsOptional(),
|
|
63
100
|
__metadata("design:type", Number)
|
|
64
101
|
], CreateIncidentDto.prototype, "typeId", void 0);
|
|
65
102
|
__decorate([
|
|
103
|
+
ApiPropertyOptional({
|
|
104
|
+
description: 'Detailed description of the incident',
|
|
105
|
+
example: 'There was a fire in the building on the 3rd floor'
|
|
106
|
+
}),
|
|
66
107
|
IsString(),
|
|
67
108
|
IsOptional(),
|
|
68
109
|
__metadata("design:type", String)
|
|
69
110
|
], CreateIncidentDto.prototype, "description", void 0);
|
|
70
111
|
__decorate([
|
|
112
|
+
ApiPropertyOptional({
|
|
113
|
+
description: 'Current status of the incident',
|
|
114
|
+
enum: IncidentStatus,
|
|
115
|
+
example: IncidentStatus.RECEIVED
|
|
116
|
+
}),
|
|
71
117
|
IsEnum(IncidentStatus),
|
|
72
118
|
IsOptional(),
|
|
73
119
|
__metadata("design:type", String)
|
|
@@ -78,55 +124,100 @@ __decorate([
|
|
|
78
124
|
__metadata("design:type", IncidentStatusDetailsDto)
|
|
79
125
|
], CreateIncidentDto.prototype, "statusDetails", void 0);
|
|
80
126
|
__decorate([
|
|
127
|
+
ApiPropertyOptional({
|
|
128
|
+
description: 'Priority level of the incident',
|
|
129
|
+
enum: IncidentPriority,
|
|
130
|
+
example: IncidentPriority.HIGH
|
|
131
|
+
}),
|
|
81
132
|
IsEnum(IncidentPriority),
|
|
82
133
|
IsOptional(),
|
|
83
134
|
__metadata("design:type", String)
|
|
84
135
|
], CreateIncidentDto.prototype, "priority", void 0);
|
|
85
136
|
__decorate([
|
|
137
|
+
ApiPropertyOptional({
|
|
138
|
+
description: 'Whether the incident contains sensitive information',
|
|
139
|
+
example: false
|
|
140
|
+
}),
|
|
86
141
|
IsBoolean(),
|
|
87
142
|
IsOptional(),
|
|
88
143
|
__metadata("design:type", Boolean)
|
|
89
144
|
], CreateIncidentDto.prototype, "isSensitive", void 0);
|
|
90
145
|
__decorate([
|
|
146
|
+
ApiPropertyOptional({
|
|
147
|
+
description: 'Geographic location where the incident occurred',
|
|
148
|
+
type: MapLocationDto
|
|
149
|
+
}),
|
|
91
150
|
ValidateNested(),
|
|
92
151
|
Type(() => MapLocationDto),
|
|
93
152
|
IsOptional(),
|
|
94
153
|
__metadata("design:type", MapLocationDto)
|
|
95
154
|
], CreateIncidentDto.prototype, "location", void 0);
|
|
96
155
|
__decorate([
|
|
156
|
+
ApiPropertyOptional({
|
|
157
|
+
description: 'ID of the user who created the incident',
|
|
158
|
+
example: 123
|
|
159
|
+
}),
|
|
97
160
|
IsNumber(),
|
|
98
161
|
IsOptional(),
|
|
99
162
|
__metadata("design:type", Number)
|
|
100
163
|
], CreateIncidentDto.prototype, "creatorId", void 0);
|
|
101
164
|
__decorate([
|
|
165
|
+
ApiPropertyOptional({
|
|
166
|
+
description: 'Array of user IDs to assign to this incident',
|
|
167
|
+
type: [Number],
|
|
168
|
+
example: [123, 456]
|
|
169
|
+
}),
|
|
102
170
|
IsArray(),
|
|
103
171
|
IsNumber({}, { each: true }),
|
|
104
172
|
IsOptional(),
|
|
105
173
|
__metadata("design:type", Array)
|
|
106
174
|
], CreateIncidentDto.prototype, "assigneeIds", void 0);
|
|
107
175
|
__decorate([
|
|
176
|
+
ApiPropertyOptional({
|
|
177
|
+
description: 'Array of response unit IDs to assign to this incident',
|
|
178
|
+
type: [Number],
|
|
179
|
+
example: [789, 101]
|
|
180
|
+
}),
|
|
108
181
|
IsArray(),
|
|
109
182
|
IsNumber({}, { each: true }),
|
|
110
183
|
IsOptional(),
|
|
111
184
|
__metadata("design:type", Array)
|
|
112
185
|
], CreateIncidentDto.prototype, "responseUnitIds", void 0);
|
|
113
186
|
__decorate([
|
|
187
|
+
ApiPropertyOptional({
|
|
188
|
+
description: 'Array of attachment IDs associated with this incident',
|
|
189
|
+
type: [Number],
|
|
190
|
+
example: [111, 222]
|
|
191
|
+
}),
|
|
114
192
|
IsArray(),
|
|
115
193
|
IsNumber({}, { each: true }),
|
|
116
194
|
IsOptional(),
|
|
117
195
|
__metadata("design:type", Array)
|
|
118
196
|
], CreateIncidentDto.prototype, "attachmentIds", void 0);
|
|
119
197
|
__decorate([
|
|
198
|
+
ApiProperty({
|
|
199
|
+
description: 'Workflow task queue name for processing the incident',
|
|
200
|
+
enum: IncidentWorkflowTaskQueueName,
|
|
201
|
+
example: IncidentWorkflowTaskQueueName.INCIDENT_QUEUE
|
|
202
|
+
}),
|
|
120
203
|
IsEnum(IncidentWorkflowTaskQueueName),
|
|
121
204
|
IsNotEmpty(),
|
|
122
205
|
__metadata("design:type", String)
|
|
123
206
|
], CreateIncidentDto.prototype, "workflowTaskQueueName", void 0);
|
|
124
207
|
__decorate([
|
|
208
|
+
ApiProperty({
|
|
209
|
+
description: 'ID of the control centre handling the incident',
|
|
210
|
+
example: 1
|
|
211
|
+
}),
|
|
125
212
|
IsNumber(),
|
|
126
213
|
IsNotEmpty(),
|
|
127
214
|
__metadata("design:type", Number)
|
|
128
215
|
], CreateIncidentDto.prototype, "controlCentreId", void 0);
|
|
129
216
|
__decorate([
|
|
217
|
+
ApiProperty({
|
|
218
|
+
description: 'ID of the organization the incident belongs to',
|
|
219
|
+
example: 1
|
|
220
|
+
}),
|
|
130
221
|
IsNumber(),
|
|
131
222
|
IsNotEmpty(),
|
|
132
223
|
__metadata("design:type", Number)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-incident.dto.js","sourceRoot":"","sources":["../../../../../../src/modules/incident/dtos/incident/create-incident.dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACzH,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,6BAA6B,EAAE,MAAM,+CAA+C,CAAC;AAC9F,OAAO,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AAEjF,MAAM,OAAO,iBAAiB;
|
|
1
|
+
{"version":3,"file":"create-incident.dto.js","sourceRoot":"","sources":["../../../../../../src/modules/incident/dtos/incident/create-incident.dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACzH,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,6BAA6B,EAAE,MAAM,+CAA+C,CAAC;AAC9F,OAAO,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AAEjF,MAAM,OAAO,iBAAiB;CAmL7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ACd,OAAO,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC;KACtB,CAAC;IACD,OAAO,EAAE;IACT,QAAQ,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC5B,UAAU,EAAE;;sDACU;AAUvB;IARC,mBAAmB,CAAC;QACjB,WAAW,EAAE,uDAAuD;QACpE,IAAI,EAAE,CAAC,MAAM,CAAC;QACd,OAAO,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC;KACtB,CAAC;IACD,OAAO,EAAE;IACT,QAAQ,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC5B,UAAU,EAAE;;0DACc;AAU3B;IARC,mBAAmB,CAAC;QACjB,WAAW,EAAE,uDAAuD;QACpE,IAAI,EAAE,CAAC,MAAM,CAAC;QACd,OAAO,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC;KACtB,CAAC;IACD,OAAO,EAAE;IACT,QAAQ,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC5B,UAAU,EAAE;;wDACY;AASzB;IAPC,WAAW,CAAC;QACT,WAAW,EAAE,sDAAsD;QACnE,IAAI,EAAE,6BAA6B;QACnC,OAAO,EAAE,6BAA6B,CAAC,cAAc;KACxD,CAAC;IACD,MAAM,CAAC,6BAA6B,CAAC;IACrC,UAAU,EAAE;;gEACyC;AAQtD;IANC,WAAW,CAAC;QACT,WAAW,EAAE,gDAAgD;QAC7D,OAAO,EAAE,CAAC;KACb,CAAC;IACD,QAAQ,EAAE;IACV,UAAU,EAAE;;0DACY;AAQzB;IANC,WAAW,CAAC;QACT,WAAW,EAAE,gDAAgD;QAC7D,OAAO,EAAE,CAAC;KACb,CAAC;IACD,QAAQ,EAAE;IACV,UAAU,EAAE;;yDACW"}
|
|
@@ -8,30 +8,52 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
10
|
import { IsEnum, IsNotEmpty, IsNumber, IsOptional } from "class-validator";
|
|
11
|
+
import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
|
|
11
12
|
import { IncidentStatus } from "../../enums/incident-status.enum";
|
|
12
13
|
export class IncidentStatusChangedDto {
|
|
13
14
|
}
|
|
14
15
|
__decorate([
|
|
16
|
+
ApiProperty({
|
|
17
|
+
description: 'ID of the incident whose status is being changed',
|
|
18
|
+
example: 123
|
|
19
|
+
}),
|
|
15
20
|
IsNumber(),
|
|
16
21
|
IsNotEmpty(),
|
|
17
22
|
__metadata("design:type", Number)
|
|
18
23
|
], IncidentStatusChangedDto.prototype, "incidentId", void 0);
|
|
19
24
|
__decorate([
|
|
25
|
+
ApiProperty({
|
|
26
|
+
description: 'New status for the incident',
|
|
27
|
+
enum: IncidentStatus,
|
|
28
|
+
example: IncidentStatus.RESOLVED
|
|
29
|
+
}),
|
|
20
30
|
IsEnum(IncidentStatus),
|
|
21
31
|
IsNotEmpty(),
|
|
22
32
|
__metadata("design:type", String)
|
|
23
33
|
], IncidentStatusChangedDto.prototype, "status", void 0);
|
|
24
34
|
__decorate([
|
|
35
|
+
ApiPropertyOptional({
|
|
36
|
+
description: 'Number of days to extend the incident timeline (for certain status changes)',
|
|
37
|
+
example: 7
|
|
38
|
+
}),
|
|
25
39
|
IsNumber(),
|
|
26
40
|
IsOptional(),
|
|
27
41
|
__metadata("design:type", Number)
|
|
28
42
|
], IncidentStatusChangedDto.prototype, "extensionDays", void 0);
|
|
29
43
|
__decorate([
|
|
44
|
+
ApiProperty({
|
|
45
|
+
description: 'ID of the user making the status change',
|
|
46
|
+
example: 456
|
|
47
|
+
}),
|
|
30
48
|
IsNumber(),
|
|
31
49
|
IsNotEmpty(),
|
|
32
50
|
__metadata("design:type", Number)
|
|
33
51
|
], IncidentStatusChangedDto.prototype, "userId", void 0);
|
|
34
52
|
__decorate([
|
|
53
|
+
ApiPropertyOptional({
|
|
54
|
+
description: 'Timestamp of the status change (Unix timestamp)',
|
|
55
|
+
example: 1642234567890
|
|
56
|
+
}),
|
|
35
57
|
IsNumber(),
|
|
36
58
|
IsOptional(),
|
|
37
59
|
__metadata("design:type", Number)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"incident-status-changed.dto.js","sourceRoot":"","sources":["../../../../../../src/modules/incident/dtos/incident/incident-status-changed.dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAElE,MAAM,OAAO,wBAAwB;
|
|
1
|
+
{"version":3,"file":"incident-status-changed.dto.js","sourceRoot":"","sources":["../../../../../../src/modules/incident/dtos/incident/incident-status-changed.dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAElE,MAAM,OAAO,wBAAwB;CAyCpC;AAlCG;IANC,WAAW,CAAC;QACT,WAAW,EAAE,kDAAkD;QAC/D,OAAO,EAAE,GAAG;KACf,CAAC;IACD,QAAQ,EAAE;IACV,UAAU,EAAE;;4DACO;AASpB;IAPC,WAAW,CAAC;QACT,WAAW,EAAE,6BAA6B;QAC1C,IAAI,EAAE,cAAc;QACpB,OAAO,EAAE,cAAc,CAAC,QAAQ;KACnC,CAAC;IACD,MAAM,CAAC,cAAc,CAAC;IACtB,UAAU,EAAE;;wDACW;AAQxB;IANC,mBAAmB,CAAC;QACjB,WAAW,EAAE,6EAA6E;QAC1F,OAAO,EAAE,CAAC;KACb,CAAC;IACD,QAAQ,EAAE;IACV,UAAU,EAAE;;+DACU;AAQvB;IANC,WAAW,CAAC;QACT,WAAW,EAAE,yCAAyC;QACtD,OAAO,EAAE,GAAG;KACf,CAAC;IACD,QAAQ,EAAE;IACV,UAAU,EAAE;;wDACG;AAQhB;IANC,mBAAmB,CAAC;QACjB,WAAW,EAAE,iDAAiD;QAC9D,OAAO,EAAE,aAAa;KACzB,CAAC;IACD,QAAQ,EAAE;IACV,UAAU,EAAE;;2DACM"}
|
|
@@ -8,6 +8,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
10
|
import { IsArray, IsDateString, IsNotEmpty, IsNumber, IsOptional, ValidateNested } from "class-validator";
|
|
11
|
+
import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
|
|
11
12
|
import { CreateIncidentDto } from "./create-incident.dto";
|
|
12
13
|
import { Type } from "class-transformer";
|
|
13
14
|
import { CreateIncidentCategoryDto } from "../category/create-incident-category.dto";
|
|
@@ -18,23 +19,39 @@ import { IncidentResponseUnitAssignmentDto } from "../response-unit-assignment/u
|
|
|
18
19
|
export class IncidentDto extends CreateIncidentDto {
|
|
19
20
|
}
|
|
20
21
|
__decorate([
|
|
22
|
+
ApiProperty({
|
|
23
|
+
description: 'Unique identifier of the incident',
|
|
24
|
+
example: 123
|
|
25
|
+
}),
|
|
21
26
|
IsNumber(),
|
|
22
27
|
IsNotEmpty(),
|
|
23
28
|
__metadata("design:type", Number)
|
|
24
29
|
], IncidentDto.prototype, "id", void 0);
|
|
25
30
|
__decorate([
|
|
31
|
+
ApiPropertyOptional({
|
|
32
|
+
description: 'Category information for the incident',
|
|
33
|
+
type: CreateIncidentCategoryDto
|
|
34
|
+
}),
|
|
26
35
|
ValidateNested(),
|
|
27
36
|
Type(() => CreateIncidentCategoryDto),
|
|
28
37
|
IsOptional(),
|
|
29
38
|
__metadata("design:type", CreateIncidentCategoryDto)
|
|
30
39
|
], IncidentDto.prototype, "category", void 0);
|
|
31
40
|
__decorate([
|
|
41
|
+
ApiPropertyOptional({
|
|
42
|
+
description: 'Type information for the incident',
|
|
43
|
+
type: CreateIncidentTypeDto
|
|
44
|
+
}),
|
|
32
45
|
ValidateNested(),
|
|
33
46
|
Type(() => CreateIncidentTypeDto),
|
|
34
47
|
IsOptional(),
|
|
35
48
|
__metadata("design:type", CreateIncidentTypeDto)
|
|
36
49
|
], IncidentDto.prototype, "type", void 0);
|
|
37
50
|
__decorate([
|
|
51
|
+
ApiPropertyOptional({
|
|
52
|
+
description: 'List of actions taken on the incident',
|
|
53
|
+
type: [IncidentActionDto]
|
|
54
|
+
}),
|
|
38
55
|
IsArray(),
|
|
39
56
|
IsOptional(),
|
|
40
57
|
ValidateNested({ each: true }),
|
|
@@ -42,6 +59,10 @@ __decorate([
|
|
|
42
59
|
__metadata("design:type", Array)
|
|
43
60
|
], IncidentDto.prototype, "actions", void 0);
|
|
44
61
|
__decorate([
|
|
62
|
+
ApiPropertyOptional({
|
|
63
|
+
description: 'List of user assignments for the incident',
|
|
64
|
+
type: [IncidentAssignmentDto]
|
|
65
|
+
}),
|
|
45
66
|
IsArray(),
|
|
46
67
|
IsOptional(),
|
|
47
68
|
ValidateNested({ each: true }),
|
|
@@ -49,6 +70,10 @@ __decorate([
|
|
|
49
70
|
__metadata("design:type", Array)
|
|
50
71
|
], IncidentDto.prototype, "assignments", void 0);
|
|
51
72
|
__decorate([
|
|
73
|
+
ApiPropertyOptional({
|
|
74
|
+
description: 'List of response unit assignments for the incident',
|
|
75
|
+
type: [IncidentResponseUnitAssignmentDto]
|
|
76
|
+
}),
|
|
52
77
|
IsArray(),
|
|
53
78
|
IsOptional(),
|
|
54
79
|
ValidateNested({ each: true }),
|
|
@@ -56,11 +81,19 @@ __decorate([
|
|
|
56
81
|
__metadata("design:type", Array)
|
|
57
82
|
], IncidentDto.prototype, "responseUnitAssignments", void 0);
|
|
58
83
|
__decorate([
|
|
84
|
+
ApiProperty({
|
|
85
|
+
description: 'Date and time when the incident was created',
|
|
86
|
+
example: '2024-01-15T10:30:00.000Z'
|
|
87
|
+
}),
|
|
59
88
|
IsDateString(),
|
|
60
89
|
IsNotEmpty(),
|
|
61
90
|
__metadata("design:type", String)
|
|
62
91
|
], IncidentDto.prototype, "createdAt", void 0);
|
|
63
92
|
__decorate([
|
|
93
|
+
ApiProperty({
|
|
94
|
+
description: 'Date and time when the incident was last updated',
|
|
95
|
+
example: '2024-01-15T11:45:00.000Z'
|
|
96
|
+
}),
|
|
64
97
|
IsDateString(),
|
|
65
98
|
IsNotEmpty(),
|
|
66
99
|
__metadata("design:type", String)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"incident.dto.js","sourceRoot":"","sources":["../../../../../../src/modules/incident/dtos/incident/incident.dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAC1G,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAC9E,OAAO,EAAE,iCAAiC,EAAE,MAAM,0EAA0E,CAAC;AAE7H,MAAM,OAAO,WAAY,SAAQ,iBAAiB;
|
|
1
|
+
{"version":3,"file":"incident.dto.js","sourceRoot":"","sources":["../../../../../../src/modules/incident/dtos/incident/incident.dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,OAAO,EAAE,YAAY,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