grm-shared-library 1.1.93 → 1.1.94

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 (34) hide show
  1. package/dist/cjs/modules/incident/dtos/assignment/create-incident-assignment.dto.js +30 -0
  2. package/dist/cjs/modules/incident/dtos/assignment/create-incident-assignment.dto.js.map +1 -1
  3. package/dist/cjs/modules/incident/dtos/assignment/incident-assignment.dto.js +12 -0
  4. package/dist/cjs/modules/incident/dtos/assignment/incident-assignment.dto.js.map +1 -1
  5. package/dist/cjs/modules/incident/dtos/category/create-incident-category.dto.js +15 -0
  6. package/dist/cjs/modules/incident/dtos/category/create-incident-category.dto.js.map +1 -1
  7. package/dist/cjs/modules/incident/dtos/incident/create-incident.dto.js +91 -0
  8. package/dist/cjs/modules/incident/dtos/incident/create-incident.dto.js.map +1 -1
  9. package/dist/cjs/modules/incident/dtos/incident/incident-status-changed.dto.js +22 -0
  10. package/dist/cjs/modules/incident/dtos/incident/incident-status-changed.dto.js.map +1 -1
  11. package/dist/cjs/modules/incident/dtos/incident/incident.dto.js +33 -0
  12. package/dist/cjs/modules/incident/dtos/incident/incident.dto.js.map +1 -1
  13. package/dist/cjs/modules/incident/dtos/incident/update-incident.dto.js +4 -0
  14. package/dist/cjs/modules/incident/dtos/incident/update-incident.dto.js.map +1 -1
  15. package/dist/cjs/modules/incident/dtos/reporter/create-incident-reporter.dto.js +21 -0
  16. package/dist/cjs/modules/incident/dtos/reporter/create-incident-reporter.dto.js.map +1 -1
  17. package/dist/esm/modules/incident/dtos/assignment/create-incident-assignment.dto.js +30 -0
  18. package/dist/esm/modules/incident/dtos/assignment/create-incident-assignment.dto.js.map +1 -1
  19. package/dist/esm/modules/incident/dtos/assignment/incident-assignment.dto.js +12 -0
  20. package/dist/esm/modules/incident/dtos/assignment/incident-assignment.dto.js.map +1 -1
  21. package/dist/esm/modules/incident/dtos/category/create-incident-category.dto.js +15 -0
  22. package/dist/esm/modules/incident/dtos/category/create-incident-category.dto.js.map +1 -1
  23. package/dist/esm/modules/incident/dtos/incident/create-incident.dto.js +91 -0
  24. package/dist/esm/modules/incident/dtos/incident/create-incident.dto.js.map +1 -1
  25. package/dist/esm/modules/incident/dtos/incident/incident-status-changed.dto.js +22 -0
  26. package/dist/esm/modules/incident/dtos/incident/incident-status-changed.dto.js.map +1 -1
  27. package/dist/esm/modules/incident/dtos/incident/incident.dto.js +33 -0
  28. package/dist/esm/modules/incident/dtos/incident/incident.dto.js.map +1 -1
  29. package/dist/esm/modules/incident/dtos/incident/update-incident.dto.js +4 -0
  30. package/dist/esm/modules/incident/dtos/incident/update-incident.dto.js.map +1 -1
  31. package/dist/esm/modules/incident/dtos/reporter/create-incident-reporter.dto.js +21 -0
  32. package/dist/esm/modules/incident/dtos/reporter/create-incident-reporter.dto.js.map +1 -1
  33. package/dist/types/modules/incident/dtos/incident/update-incident.dto.d.ts +4 -0
  34. package/package.json +1 -1
@@ -10,33 +10,63 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.CreateIncidentAssignmentDto = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
13
14
  const class_validator_1 = require("class-validator");
14
15
  class CreateIncidentAssignmentDto {
15
16
  }
16
17
  exports.CreateIncidentAssignmentDto = CreateIncidentAssignmentDto;
17
18
  __decorate([
19
+ (0, swagger_1.ApiProperty)({
20
+ description: 'ID of the incident to assign personnel to',
21
+ example: 1001,
22
+ type: 'number'
23
+ }),
18
24
  (0, class_validator_1.IsNumber)(),
19
25
  (0, class_validator_1.IsNotEmpty)(),
20
26
  __metadata("design:type", Number)
21
27
  ], CreateIncidentAssignmentDto.prototype, "incidentId", void 0);
22
28
  __decorate([
29
+ (0, swagger_1.ApiProperty)({
30
+ description: 'Optional comments or notes about the assignment',
31
+ example: 'Assigning senior responders due to high priority incident',
32
+ required: false,
33
+ maxLength: 2000,
34
+ type: 'string'
35
+ }),
23
36
  (0, class_validator_1.IsString)(),
24
37
  (0, class_validator_1.IsOptional)(),
25
38
  (0, class_validator_1.MaxLength)(2000),
26
39
  __metadata("design:type", String)
27
40
  ], CreateIncidentAssignmentDto.prototype, "comments", void 0);
28
41
  __decorate([
42
+ (0, swagger_1.ApiProperty)({
43
+ description: 'ID of the user making the assignment',
44
+ example: 42,
45
+ type: 'number'
46
+ }),
29
47
  (0, class_validator_1.IsNumber)(),
30
48
  (0, class_validator_1.IsNotEmpty)(),
31
49
  __metadata("design:type", Number)
32
50
  ], CreateIncidentAssignmentDto.prototype, "assignerId", void 0);
33
51
  __decorate([
52
+ (0, swagger_1.ApiProperty)({
53
+ description: 'Array of user IDs to assign to the incident',
54
+ example: [101, 102, 103],
55
+ type: 'array',
56
+ items: { type: 'number' }
57
+ }),
34
58
  (0, class_validator_1.IsArray)(),
35
59
  (0, class_validator_1.IsNumber)({}, { each: true }),
36
60
  (0, class_validator_1.IsNotEmpty)(),
37
61
  __metadata("design:type", Array)
38
62
  ], CreateIncidentAssignmentDto.prototype, "assigneeIds", void 0);
39
63
  __decorate([
64
+ (0, swagger_1.ApiProperty)({
65
+ description: 'ISO timestamp when the assignment was made',
66
+ example: '2024-01-15T14:30:00.000Z',
67
+ type: 'string',
68
+ format: 'date-time'
69
+ }),
40
70
  (0, class_validator_1.IsDateString)(),
41
71
  (0, class_validator_1.IsNotEmpty)(),
42
72
  __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,qDAA+G;AAE/G,MAAa,2BAA2B;CAsBvC;AAtBD,kEAsBC;AAnBG;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;+DACO;AAKpB;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,EAAC,IAAI,CAAC;;6DACE;AAIlB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;+DACO;AAKpB;IAHC,IAAA,yBAAO,GAAE;IACT,IAAA,0BAAQ,EAAC,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC5B,IAAA,4BAAU,GAAE;;gEACU;AAIvB;IAFC,IAAA,8BAAY,GAAE;IACd,IAAA,4BAAU,GAAE;;8DACM"}
1
+ {"version":3,"file":"create-incident-assignment.dto.js","sourceRoot":"","sources":["../../../../../../src/modules/incident/dtos/assignment/create-incident-assignment.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAC9C,qDAA+G;AAE/G,MAAa,2BAA2B;CAmDvC;AAnDD,kEAmDC;AA3CG;IAPC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,2CAA2C;QACxD,OAAO,EAAE,IAAI;QACb,IAAI,EAAE,QAAQ;KACjB,CAAC;IACD,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;+DACO;AAYpB;IAVC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,iDAAiD;QAC9D,OAAO,EAAE,2DAA2D;QACpE,QAAQ,EAAE,KAAK;QACf,SAAS,EAAE,IAAI;QACf,IAAI,EAAE,QAAQ;KACjB,CAAC;IACD,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,EAAC,IAAI,CAAC;;6DACE;AASlB;IAPC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,sCAAsC;QACnD,OAAO,EAAE,EAAE;QACX,IAAI,EAAE,QAAQ;KACjB,CAAC;IACD,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;+DACO;AAWpB;IATC,IAAA,qBAAW,EAAC;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,IAAA,yBAAO,GAAE;IACT,IAAA,0BAAQ,EAAC,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC5B,IAAA,4BAAU,GAAE;;gEACU;AAUvB;IARC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,4CAA4C;QACzD,OAAO,EAAE,0BAA0B;QACnC,IAAI,EAAE,QAAQ;QACd,MAAM,EAAE,WAAW;KACtB,CAAC;IACD,IAAA,8BAAY,GAAE;IACd,IAAA,4BAAU,GAAE;;8DACM"}
@@ -10,6 +10,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.IncidentAssignmentDto = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
13
14
  const mapped_types_1 = require("@nestjs/mapped-types");
14
15
  const class_validator_1 = require("class-validator");
15
16
  const create_incident_assignment_dto_1 = require("./create-incident-assignment.dto");
@@ -17,11 +18,22 @@ class IncidentAssignmentDto extends (0, mapped_types_1.OmitType)(create_incident
17
18
  }
18
19
  exports.IncidentAssignmentDto = IncidentAssignmentDto;
19
20
  __decorate([
21
+ (0, swagger_1.ApiProperty)({
22
+ description: 'Unique identifier for the incident assignment',
23
+ example: 5001,
24
+ type: 'number'
25
+ }),
20
26
  (0, class_validator_1.IsNumber)(),
21
27
  (0, class_validator_1.IsNotEmpty)(),
22
28
  __metadata("design:type", Number)
23
29
  ], IncidentAssignmentDto.prototype, "id", void 0);
24
30
  __decorate([
31
+ (0, swagger_1.ApiProperty)({
32
+ description: 'ISO timestamp when the assignment was created in the system',
33
+ example: '2024-01-15T14:30:00.000Z',
34
+ type: 'string',
35
+ format: 'date-time'
36
+ }),
25
37
  (0, class_validator_1.IsDateString)(),
26
38
  (0, class_validator_1.IsNotEmpty)(),
27
39
  __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,uDAAgD;AAChD,qDAAqE;AACrE,qFAA+E;AAE/E,MAAa,qBAAsB,SAAQ,IAAA,uBAAQ,EAAC,4DAA2B,EAAE,CAAC,WAAW,CAAU,CAAC;CAQvG;AARD,sDAQC;AALG;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;iDACD;AAIZ;IAFC,IAAA,8BAAY,GAAE;IACd,IAAA,4BAAU,GAAE;;wDACM"}
1
+ {"version":3,"file":"incident-assignment.dto.js","sourceRoot":"","sources":["../../../../../../src/modules/incident/dtos/assignment/incident-assignment.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAC9C,uDAAgD;AAChD,qDAAqE;AACrE,qFAA+E;AAE/E,MAAa,qBAAsB,SAAQ,IAAA,uBAAQ,EAAC,4DAA2B,EAAE,CAAC,WAAW,CAAU,CAAC;CAmBvG;AAnBD,sDAmBC;AAXG;IAPC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,+CAA+C;QAC5D,OAAO,EAAE,IAAI;QACb,IAAI,EAAE,QAAQ;KACjB,CAAC;IACD,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;iDACD;AAUZ;IARC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,6DAA6D;QAC1E,OAAO,EAAE,0BAA0B;QACnC,IAAI,EAAE,QAAQ;QACd,MAAM,EAAE,WAAW;KACtB,CAAC;IACD,IAAA,8BAAY,GAAE;IACd,IAAA,4BAAU,GAAE;;wDACM"}
@@ -11,22 +11,37 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.CreateIncidentCategoryDto = void 0;
13
13
  const class_validator_1 = require("class-validator");
14
+ const swagger_1 = require("@nestjs/swagger");
14
15
  class CreateIncidentCategoryDto {
15
16
  }
16
17
  exports.CreateIncidentCategoryDto = CreateIncidentCategoryDto;
17
18
  __decorate([
19
+ (0, swagger_1.ApiProperty)({
20
+ description: 'Name of the incident category',
21
+ maxLength: 50,
22
+ example: 'Fire Emergency'
23
+ }),
18
24
  (0, class_validator_1.IsString)(),
19
25
  (0, class_validator_1.IsNotEmpty)(),
20
26
  (0, class_validator_1.MaxLength)(50),
21
27
  __metadata("design:type", String)
22
28
  ], CreateIncidentCategoryDto.prototype, "name", void 0);
23
29
  __decorate([
30
+ (0, swagger_1.ApiPropertyOptional)({
31
+ description: 'Detailed description of the incident category',
32
+ maxLength: 255,
33
+ example: 'Category for all fire-related emergency incidents'
34
+ }),
24
35
  (0, class_validator_1.IsString)(),
25
36
  (0, class_validator_1.IsOptional)(),
26
37
  (0, class_validator_1.MaxLength)(255),
27
38
  __metadata("design:type", String)
28
39
  ], CreateIncidentCategoryDto.prototype, "description", void 0);
29
40
  __decorate([
41
+ (0, swagger_1.ApiProperty)({
42
+ description: 'ID of the organization this category belongs to',
43
+ example: 1
44
+ }),
30
45
  (0, class_validator_1.IsNumber)(),
31
46
  (0, class_validator_1.IsNotEmpty)(),
32
47
  __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,qDAAwF;AAExF,MAAa,yBAAyB;CAcrC;AAdD,8DAcC;AAVG;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,EAAC,EAAE,CAAC;;uDACA;AAKd;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,EAAC,GAAG,CAAC;;8DACM;AAIrB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;iEACW"}
1
+ {"version":3,"file":"create-incident-category.dto.js","sourceRoot":"","sources":["../../../../../../src/modules/incident/dtos/category/create-incident-category.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAwF;AACxF,6CAAmE;AAEnE,MAAa,yBAAyB;CA4BrC;AA5BD,8DA4BC;AAnBG;IARC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,+BAA+B;QAC5C,SAAS,EAAE,EAAE;QACb,OAAO,EAAE,gBAAgB;KAC5B,CAAC;IACD,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,EAAC,EAAE,CAAC;;uDACA;AAUd;IARC,IAAA,6BAAmB,EAAC;QACjB,WAAW,EAAE,+CAA+C;QAC5D,SAAS,EAAE,GAAG;QACd,OAAO,EAAE,mDAAmD;KAC/D,CAAC;IACD,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,EAAC,GAAG,CAAC;;8DACM;AAQrB;IANC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,iDAAiD;QAC9D,OAAO,EAAE,CAAC;KACb,CAAC;IACD,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;iEACW"}
@@ -11,6 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.CreateIncidentDto = void 0;
13
13
  const class_validator_1 = require("class-validator");
14
+ const swagger_1 = require("@nestjs/swagger");
14
15
  const incident_app_id_enum_1 = require("../../enums/incident-app-id.enum");
15
16
  const incident_class_enum_1 = require("../../enums/incident-class.enum");
16
17
  const incident_channel_enum_1 = require("../../enums/incident-channel.enum");
@@ -26,52 +27,97 @@ class CreateIncidentDto {
26
27
  }
27
28
  exports.CreateIncidentDto = CreateIncidentDto;
28
29
  __decorate([
30
+ (0, swagger_1.ApiProperty)({
31
+ description: 'Application ID where the incident was created',
32
+ enum: incident_app_id_enum_1.IncidentAppId,
33
+ example: incident_app_id_enum_1.IncidentAppId.PASHA
34
+ }),
29
35
  (0, class_validator_1.IsEnum)(incident_app_id_enum_1.IncidentAppId),
30
36
  (0, class_validator_1.IsNotEmpty)(),
31
37
  __metadata("design:type", String)
32
38
  ], CreateIncidentDto.prototype, "appId", void 0);
33
39
  __decorate([
40
+ (0, swagger_1.ApiProperty)({
41
+ description: 'Classification of the incident',
42
+ enum: incident_class_enum_1.IncidentClass,
43
+ example: incident_class_enum_1.IncidentClass.INCIDENT
44
+ }),
34
45
  (0, class_validator_1.IsEnum)(incident_class_enum_1.IncidentClass),
35
46
  (0, class_validator_1.IsNotEmpty)(),
36
47
  __metadata("design:type", String)
37
48
  ], CreateIncidentDto.prototype, "class", void 0);
38
49
  __decorate([
50
+ (0, swagger_1.ApiProperty)({
51
+ description: 'Type of emergency for the incident',
52
+ enum: incident_emergency_type_enum_1.IncidentEmergencyType,
53
+ example: incident_emergency_type_enum_1.IncidentEmergencyType.EMERGENCY
54
+ }),
39
55
  (0, class_validator_1.IsEnum)(incident_emergency_type_enum_1.IncidentEmergencyType),
40
56
  (0, class_validator_1.IsNotEmpty)(),
41
57
  __metadata("design:type", String)
42
58
  ], CreateIncidentDto.prototype, "emergencyType", void 0);
43
59
  __decorate([
60
+ (0, swagger_1.ApiProperty)({
61
+ description: 'Information about the person reporting the incident',
62
+ type: create_incident_reporter_dto_1.CreateIncidentReporterDto
63
+ }),
44
64
  (0, class_validator_1.ValidateNested)(),
45
65
  (0, class_transformer_1.Type)(() => create_incident_reporter_dto_1.CreateIncidentReporterDto),
46
66
  (0, class_validator_1.IsNotEmpty)(),
47
67
  __metadata("design:type", create_incident_reporter_dto_1.CreateIncidentReporterDto)
48
68
  ], CreateIncidentDto.prototype, "reporter", void 0);
49
69
  __decorate([
70
+ (0, swagger_1.ApiPropertyOptional)({
71
+ description: 'Whether the incident report is anonymous',
72
+ example: false
73
+ }),
50
74
  (0, class_validator_1.IsBoolean)(),
51
75
  (0, class_validator_1.IsOptional)(),
52
76
  __metadata("design:type", Boolean)
53
77
  ], CreateIncidentDto.prototype, "isAnonymous", void 0);
54
78
  __decorate([
79
+ (0, swagger_1.ApiProperty)({
80
+ description: 'Channel through which the incident was reported',
81
+ enum: incident_channel_enum_1.IncidentChannel,
82
+ example: incident_channel_enum_1.IncidentChannel.APP
83
+ }),
55
84
  (0, class_validator_1.IsEnum)(incident_channel_enum_1.IncidentChannel),
56
85
  (0, class_validator_1.IsNotEmpty)(),
57
86
  __metadata("design:type", String)
58
87
  ], CreateIncidentDto.prototype, "channel", void 0);
59
88
  __decorate([
89
+ (0, swagger_1.ApiPropertyOptional)({
90
+ description: 'ID of the incident category',
91
+ example: 1
92
+ }),
60
93
  (0, class_validator_1.IsNumber)(),
61
94
  (0, class_validator_1.IsOptional)(),
62
95
  __metadata("design:type", Number)
63
96
  ], CreateIncidentDto.prototype, "categoryId", void 0);
64
97
  __decorate([
98
+ (0, swagger_1.ApiPropertyOptional)({
99
+ description: 'ID of the incident type',
100
+ example: 1
101
+ }),
65
102
  (0, class_validator_1.IsNumber)(),
66
103
  (0, class_validator_1.IsOptional)(),
67
104
  __metadata("design:type", Number)
68
105
  ], CreateIncidentDto.prototype, "typeId", void 0);
69
106
  __decorate([
107
+ (0, swagger_1.ApiPropertyOptional)({
108
+ description: 'Detailed description of the incident',
109
+ example: 'There was a fire in the building on the 3rd floor'
110
+ }),
70
111
  (0, class_validator_1.IsString)(),
71
112
  (0, class_validator_1.IsOptional)(),
72
113
  __metadata("design:type", String)
73
114
  ], CreateIncidentDto.prototype, "description", void 0);
74
115
  __decorate([
116
+ (0, swagger_1.ApiPropertyOptional)({
117
+ description: 'Current status of the incident',
118
+ enum: incident_status_enum_1.IncidentStatus,
119
+ example: incident_status_enum_1.IncidentStatus.RECEIVED
120
+ }),
75
121
  (0, class_validator_1.IsEnum)(incident_status_enum_1.IncidentStatus),
76
122
  (0, class_validator_1.IsOptional)(),
77
123
  __metadata("design:type", String)
@@ -82,55 +128,100 @@ __decorate([
82
128
  __metadata("design:type", incident_status_details_dto_1.IncidentStatusDetailsDto)
83
129
  ], CreateIncidentDto.prototype, "statusDetails", void 0);
84
130
  __decorate([
131
+ (0, swagger_1.ApiPropertyOptional)({
132
+ description: 'Priority level of the incident',
133
+ enum: incident_priority_enum_1.IncidentPriority,
134
+ example: incident_priority_enum_1.IncidentPriority.HIGH
135
+ }),
85
136
  (0, class_validator_1.IsEnum)(incident_priority_enum_1.IncidentPriority),
86
137
  (0, class_validator_1.IsOptional)(),
87
138
  __metadata("design:type", String)
88
139
  ], CreateIncidentDto.prototype, "priority", void 0);
89
140
  __decorate([
141
+ (0, swagger_1.ApiPropertyOptional)({
142
+ description: 'Whether the incident contains sensitive information',
143
+ example: false
144
+ }),
90
145
  (0, class_validator_1.IsBoolean)(),
91
146
  (0, class_validator_1.IsOptional)(),
92
147
  __metadata("design:type", Boolean)
93
148
  ], CreateIncidentDto.prototype, "isSensitive", void 0);
94
149
  __decorate([
150
+ (0, swagger_1.ApiPropertyOptional)({
151
+ description: 'Geographic location where the incident occurred',
152
+ type: common_1.MapLocationDto
153
+ }),
95
154
  (0, class_validator_1.ValidateNested)(),
96
155
  (0, class_transformer_1.Type)(() => common_1.MapLocationDto),
97
156
  (0, class_validator_1.IsOptional)(),
98
157
  __metadata("design:type", common_1.MapLocationDto)
99
158
  ], CreateIncidentDto.prototype, "location", void 0);
100
159
  __decorate([
160
+ (0, swagger_1.ApiPropertyOptional)({
161
+ description: 'ID of the user who created the incident',
162
+ example: 123
163
+ }),
101
164
  (0, class_validator_1.IsNumber)(),
102
165
  (0, class_validator_1.IsOptional)(),
103
166
  __metadata("design:type", Number)
104
167
  ], CreateIncidentDto.prototype, "creatorId", void 0);
105
168
  __decorate([
169
+ (0, swagger_1.ApiPropertyOptional)({
170
+ description: 'Array of user IDs to assign to this incident',
171
+ type: [Number],
172
+ example: [123, 456]
173
+ }),
106
174
  (0, class_validator_1.IsArray)(),
107
175
  (0, class_validator_1.IsNumber)({}, { each: true }),
108
176
  (0, class_validator_1.IsOptional)(),
109
177
  __metadata("design:type", Array)
110
178
  ], CreateIncidentDto.prototype, "assigneeIds", void 0);
111
179
  __decorate([
180
+ (0, swagger_1.ApiPropertyOptional)({
181
+ description: 'Array of response unit IDs to assign to this incident',
182
+ type: [Number],
183
+ example: [789, 101]
184
+ }),
112
185
  (0, class_validator_1.IsArray)(),
113
186
  (0, class_validator_1.IsNumber)({}, { each: true }),
114
187
  (0, class_validator_1.IsOptional)(),
115
188
  __metadata("design:type", Array)
116
189
  ], CreateIncidentDto.prototype, "responseUnitIds", void 0);
117
190
  __decorate([
191
+ (0, swagger_1.ApiPropertyOptional)({
192
+ description: 'Array of attachment IDs associated with this incident',
193
+ type: [Number],
194
+ example: [111, 222]
195
+ }),
118
196
  (0, class_validator_1.IsArray)(),
119
197
  (0, class_validator_1.IsNumber)({}, { each: true }),
120
198
  (0, class_validator_1.IsOptional)(),
121
199
  __metadata("design:type", Array)
122
200
  ], CreateIncidentDto.prototype, "attachmentIds", void 0);
123
201
  __decorate([
202
+ (0, swagger_1.ApiProperty)({
203
+ description: 'Workflow task queue name for processing the incident',
204
+ enum: incident_workflow_queue_name_enum_1.IncidentWorkflowTaskQueueName,
205
+ example: incident_workflow_queue_name_enum_1.IncidentWorkflowTaskQueueName.INCIDENT_QUEUE
206
+ }),
124
207
  (0, class_validator_1.IsEnum)(incident_workflow_queue_name_enum_1.IncidentWorkflowTaskQueueName),
125
208
  (0, class_validator_1.IsNotEmpty)(),
126
209
  __metadata("design:type", String)
127
210
  ], CreateIncidentDto.prototype, "workflowTaskQueueName", void 0);
128
211
  __decorate([
212
+ (0, swagger_1.ApiProperty)({
213
+ description: 'ID of the control centre handling the incident',
214
+ example: 1
215
+ }),
129
216
  (0, class_validator_1.IsNumber)(),
130
217
  (0, class_validator_1.IsNotEmpty)(),
131
218
  __metadata("design:type", Number)
132
219
  ], CreateIncidentDto.prototype, "controlCentreId", void 0);
133
220
  __decorate([
221
+ (0, swagger_1.ApiProperty)({
222
+ description: 'ID of the organization the incident belongs to',
223
+ example: 1
224
+ }),
134
225
  (0, class_validator_1.IsNumber)(),
135
226
  (0, class_validator_1.IsNotEmpty)(),
136
227
  __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,qDAAyH;AACzH,2EAAiE;AACjE,yEAAgE;AAChE,6EAAoE;AACpE,yDAAyC;AACzC,+EAAsE;AACtE,4CAAiD;AACjD,2EAAkE;AAClE,qGAA8F;AAC9F,2FAAqF;AACrF,+EAAyE;AACzE,2FAAiF;AAEjF,MAAa,iBAAiB;CAyF7B;AAzFD,8CAyFC;AAtFG;IAFC,IAAA,wBAAM,EAAC,oCAAa,CAAC;IACrB,IAAA,4BAAU,GAAE;;gDACS;AAItB;IAFC,IAAA,wBAAM,EAAC,mCAAa,CAAC;IACrB,IAAA,4BAAU,GAAE;;gDACS;AAItB;IAFC,IAAA,wBAAM,EAAC,oDAAqB,CAAC;IAC7B,IAAA,4BAAU,GAAE;;wDACyB;AAKtC;IAHC,IAAA,gCAAc,GAAE;IAChB,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,wDAAyB,CAAC;IACrC,IAAA,4BAAU,GAAE;8BACF,wDAAyB;mDAAC;AAIrC;IAFC,IAAA,2BAAS,GAAE;IACX,IAAA,4BAAU,GAAE;;sDACS;AAItB;IAFC,IAAA,wBAAM,EAAC,uCAAe,CAAC;IACvB,IAAA,4BAAU,GAAE;;kDACa;AAI1B;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;qDACO;AAIpB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;iDACG;AAIhB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;sDACQ;AAIrB;IAFC,IAAA,wBAAM,EAAC,qCAAc,CAAC;IACtB,IAAA,4BAAU,GAAE;;iDACW;AAIxB;IAFC,IAAA,gCAAc,GAAE;IAChB,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,sDAAwB,CAAC;8BACrB,sDAAwB;wDAAA;AAIxC;IAFC,IAAA,wBAAM,EAAC,yCAAgB,CAAC;IACxB,IAAA,4BAAU,GAAE;;mDACe;AAI5B;IAFC,IAAA,2BAAS,GAAE;IACX,IAAA,4BAAU,GAAE;;sDACS;AAKtB;IAHC,IAAA,gCAAc,GAAE;IAChB,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,uBAAc,CAAC;IAC1B,IAAA,4BAAU,GAAE;8BACF,uBAAc;mDAAC;AAI1B;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;oDACM;AAKnB;IAHC,IAAA,yBAAO,GAAE;IACT,IAAA,0BAAQ,EAAC,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC5B,IAAA,4BAAU,GAAE;;sDACU;AAKvB;IAHC,IAAA,yBAAO,GAAE;IACT,IAAA,0BAAQ,EAAC,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC5B,IAAA,4BAAU,GAAE;;0DACc;AAK3B;IAHC,IAAA,yBAAO,GAAE;IACT,IAAA,0BAAQ,EAAC,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC5B,IAAA,4BAAU,GAAE;;wDACY;AAIzB;IAFC,IAAA,wBAAM,EAAC,iEAA6B,CAAC;IACrC,IAAA,4BAAU,GAAE;;gEACyC;AAItD;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;0DACY;AAIzB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;yDACW"}
1
+ {"version":3,"file":"create-incident.dto.js","sourceRoot":"","sources":["../../../../../../src/modules/incident/dtos/incident/create-incident.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAA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AAA,0BAAQ,EAAC,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC5B,IAAA,4BAAU,GAAE;;wDACY;AASzB;IAPC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,sDAAsD;QACnE,IAAI,EAAE,iEAA6B;QACnC,OAAO,EAAE,iEAA6B,CAAC,cAAc;KACxD,CAAC;IACD,IAAA,wBAAM,EAAC,iEAA6B,CAAC;IACrC,IAAA,4BAAU,GAAE;;gEACyC;AAQtD;IANC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,gDAAgD;QAC7D,OAAO,EAAE,CAAC;KACb,CAAC;IACD,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;0DACY;AAQzB;IANC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,gDAAgD;QAC7D,OAAO,EAAE,CAAC;KACb,CAAC;IACD,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;yDACW"}
@@ -11,31 +11,53 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.IncidentStatusChangedDto = void 0;
13
13
  const class_validator_1 = require("class-validator");
14
+ const swagger_1 = require("@nestjs/swagger");
14
15
  const incident_status_enum_1 = require("../../enums/incident-status.enum");
15
16
  class IncidentStatusChangedDto {
16
17
  }
17
18
  exports.IncidentStatusChangedDto = IncidentStatusChangedDto;
18
19
  __decorate([
20
+ (0, swagger_1.ApiProperty)({
21
+ description: 'ID of the incident whose status is being changed',
22
+ example: 123
23
+ }),
19
24
  (0, class_validator_1.IsNumber)(),
20
25
  (0, class_validator_1.IsNotEmpty)(),
21
26
  __metadata("design:type", Number)
22
27
  ], IncidentStatusChangedDto.prototype, "incidentId", void 0);
23
28
  __decorate([
29
+ (0, swagger_1.ApiProperty)({
30
+ description: 'New status for the incident',
31
+ enum: incident_status_enum_1.IncidentStatus,
32
+ example: incident_status_enum_1.IncidentStatus.RESOLVED
33
+ }),
24
34
  (0, class_validator_1.IsEnum)(incident_status_enum_1.IncidentStatus),
25
35
  (0, class_validator_1.IsNotEmpty)(),
26
36
  __metadata("design:type", String)
27
37
  ], IncidentStatusChangedDto.prototype, "status", void 0);
28
38
  __decorate([
39
+ (0, swagger_1.ApiPropertyOptional)({
40
+ description: 'Number of days to extend the incident timeline (for certain status changes)',
41
+ example: 7
42
+ }),
29
43
  (0, class_validator_1.IsNumber)(),
30
44
  (0, class_validator_1.IsOptional)(),
31
45
  __metadata("design:type", Number)
32
46
  ], IncidentStatusChangedDto.prototype, "extensionDays", void 0);
33
47
  __decorate([
48
+ (0, swagger_1.ApiProperty)({
49
+ description: 'ID of the user making the status change',
50
+ example: 456
51
+ }),
34
52
  (0, class_validator_1.IsNumber)(),
35
53
  (0, class_validator_1.IsNotEmpty)(),
36
54
  __metadata("design:type", Number)
37
55
  ], IncidentStatusChangedDto.prototype, "userId", void 0);
38
56
  __decorate([
57
+ (0, swagger_1.ApiPropertyOptional)({
58
+ description: 'Timestamp of the status change (Unix timestamp)',
59
+ example: 1642234567890
60
+ }),
39
61
  (0, class_validator_1.IsNumber)(),
40
62
  (0, class_validator_1.IsOptional)(),
41
63
  __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,qDAA2E;AAC3E,2EAAkE;AAElE,MAAa,wBAAwB;CAoBpC;AApBD,4DAoBC;AAjBG;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;4DACO;AAIpB;IAFC,IAAA,wBAAM,EAAC,qCAAc,CAAC;IACtB,IAAA,4BAAU,GAAE;;wDACW;AAIxB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;+DACU;AAIvB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;wDACG;AAIhB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;2DACM"}
1
+ {"version":3,"file":"incident-status-changed.dto.js","sourceRoot":"","sources":["../../../../../../src/modules/incident/dtos/incident/incident-status-changed.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA2E;AAC3E,6CAAmE;AACnE,2EAAkE;AAElE,MAAa,wBAAwB;CAyCpC;AAzCD,4DAyCC;AAlCG;IANC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,kDAAkD;QAC/D,OAAO,EAAE,GAAG;KACf,CAAC;IACD,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;4DACO;AASpB;IAPC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,6BAA6B;QAC1C,IAAI,EAAE,qCAAc;QACpB,OAAO,EAAE,qCAAc,CAAC,QAAQ;KACnC,CAAC;IACD,IAAA,wBAAM,EAAC,qCAAc,CAAC;IACtB,IAAA,4BAAU,GAAE;;wDACW;AAQxB;IANC,IAAA,6BAAmB,EAAC;QACjB,WAAW,EAAE,6EAA6E;QAC1F,OAAO,EAAE,CAAC;KACb,CAAC;IACD,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;+DACU;AAQvB;IANC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,yCAAyC;QACtD,OAAO,EAAE,GAAG;KACf,CAAC;IACD,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;wDACG;AAQhB;IANC,IAAA,6BAAmB,EAAC;QACjB,WAAW,EAAE,iDAAiD;QAC9D,OAAO,EAAE,aAAa;KACzB,CAAC;IACD,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;2DACM"}
@@ -11,6 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.IncidentDto = void 0;
13
13
  const class_validator_1 = require("class-validator");
14
+ const swagger_1 = require("@nestjs/swagger");
14
15
  const create_incident_dto_1 = require("./create-incident.dto");
15
16
  const class_transformer_1 = require("class-transformer");
16
17
  const create_incident_category_dto_1 = require("../category/create-incident-category.dto");
@@ -22,23 +23,39 @@ class IncidentDto extends create_incident_dto_1.CreateIncidentDto {
22
23
  }
23
24
  exports.IncidentDto = IncidentDto;
24
25
  __decorate([
26
+ (0, swagger_1.ApiProperty)({
27
+ description: 'Unique identifier of the incident',
28
+ example: 123
29
+ }),
25
30
  (0, class_validator_1.IsNumber)(),
26
31
  (0, class_validator_1.IsNotEmpty)(),
27
32
  __metadata("design:type", Number)
28
33
  ], IncidentDto.prototype, "id", void 0);
29
34
  __decorate([
35
+ (0, swagger_1.ApiPropertyOptional)({
36
+ description: 'Category information for the incident',
37
+ type: create_incident_category_dto_1.CreateIncidentCategoryDto
38
+ }),
30
39
  (0, class_validator_1.ValidateNested)(),
31
40
  (0, class_transformer_1.Type)(() => create_incident_category_dto_1.CreateIncidentCategoryDto),
32
41
  (0, class_validator_1.IsOptional)(),
33
42
  __metadata("design:type", create_incident_category_dto_1.CreateIncidentCategoryDto)
34
43
  ], IncidentDto.prototype, "category", void 0);
35
44
  __decorate([
45
+ (0, swagger_1.ApiPropertyOptional)({
46
+ description: 'Type information for the incident',
47
+ type: create_incident_type_dto_1.CreateIncidentTypeDto
48
+ }),
36
49
  (0, class_validator_1.ValidateNested)(),
37
50
  (0, class_transformer_1.Type)(() => create_incident_type_dto_1.CreateIncidentTypeDto),
38
51
  (0, class_validator_1.IsOptional)(),
39
52
  __metadata("design:type", create_incident_type_dto_1.CreateIncidentTypeDto)
40
53
  ], IncidentDto.prototype, "type", void 0);
41
54
  __decorate([
55
+ (0, swagger_1.ApiPropertyOptional)({
56
+ description: 'List of actions taken on the incident',
57
+ type: [incident_action_dto_1.IncidentActionDto]
58
+ }),
42
59
  (0, class_validator_1.IsArray)(),
43
60
  (0, class_validator_1.IsOptional)(),
44
61
  (0, class_validator_1.ValidateNested)({ each: true }),
@@ -46,6 +63,10 @@ __decorate([
46
63
  __metadata("design:type", Array)
47
64
  ], IncidentDto.prototype, "actions", void 0);
48
65
  __decorate([
66
+ (0, swagger_1.ApiPropertyOptional)({
67
+ description: 'List of user assignments for the incident',
68
+ type: [incident_assignment_dto_1.IncidentAssignmentDto]
69
+ }),
49
70
  (0, class_validator_1.IsArray)(),
50
71
  (0, class_validator_1.IsOptional)(),
51
72
  (0, class_validator_1.ValidateNested)({ each: true }),
@@ -53,6 +74,10 @@ __decorate([
53
74
  __metadata("design:type", Array)
54
75
  ], IncidentDto.prototype, "assignments", void 0);
55
76
  __decorate([
77
+ (0, swagger_1.ApiPropertyOptional)({
78
+ description: 'List of response unit assignments for the incident',
79
+ type: [update_incident_response_unit_assignment_dto_1.IncidentResponseUnitAssignmentDto]
80
+ }),
56
81
  (0, class_validator_1.IsArray)(),
57
82
  (0, class_validator_1.IsOptional)(),
58
83
  (0, class_validator_1.ValidateNested)({ each: true }),
@@ -60,11 +85,19 @@ __decorate([
60
85
  __metadata("design:type", Array)
61
86
  ], IncidentDto.prototype, "responseUnitAssignments", void 0);
62
87
  __decorate([
88
+ (0, swagger_1.ApiProperty)({
89
+ description: 'Date and time when the incident was created',
90
+ example: '2024-01-15T10:30:00.000Z'
91
+ }),
63
92
  (0, class_validator_1.IsDateString)(),
64
93
  (0, class_validator_1.IsNotEmpty)(),
65
94
  __metadata("design:type", String)
66
95
  ], IncidentDto.prototype, "createdAt", void 0);
67
96
  __decorate([
97
+ (0, swagger_1.ApiProperty)({
98
+ description: 'Date and time when the incident was last updated',
99
+ example: '2024-01-15T11:45:00.000Z'
100
+ }),
68
101
  (0, class_validator_1.IsDateString)(),
69
102
  (0, class_validator_1.IsNotEmpty)(),
70
103
  __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,qDAA0G;AAC1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ChC,CAAC;IACD,IAAA,yBAAO,GAAE;IACT,IAAA,4BAAU,GAAE;IACZ,IAAA,gCAAc,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC9B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,+CAAqB,CAAC;;gDACI;AAUtC;IARC,IAAA,6BAAmB,EAAC;QACjB,WAAW,EAAE,oDAAoD;QACjE,IAAI,EAAE,CAAC,gFAAiC,CAAC;KAC5C,CAAC;IACD,IAAA,yBAAO,GAAE;IACT,IAAA,4BAAU,GAAE;IACZ,IAAA,gCAAc,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC9B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,gFAAiC,CAAC;;4DACgB;AAQ9D;IANC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,6CAA6C;QAC1D,OAAO,EAAE,0BAA0B;KACtC,CAAC;IACD,IAAA,8BAAY,GAAE;IACd,IAAA,4BAAU,GAAE;;8CACM;AAQnB;IANC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,kDAAkD;QAC/D,OAAO,EAAE,0BAA0B;KACtC,CAAC;IACD,IAAA,8BAAY,GAAE;IACd,IAAA,4BAAU,GAAE;;8CACM"}
@@ -3,6 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.UpdateIncidentDto = void 0;
4
4
  const mapped_types_1 = require("@nestjs/mapped-types");
5
5
  const create_incident_dto_1 = require("./create-incident.dto");
6
+ /**
7
+ * DTO for updating an existing incident
8
+ * All fields from CreateIncidentDto are optional for updates
9
+ */
6
10
  class UpdateIncidentDto extends (0, mapped_types_1.PartialType)(create_incident_dto_1.CreateIncidentDto) {
7
11
  }
8
12
  exports.UpdateIncidentDto = UpdateIncidentDto;
@@ -1 +1 @@
1
- {"version":3,"file":"update-incident.dto.js","sourceRoot":"","sources":["../../../../../../src/modules/incident/dtos/incident/update-incident.dto.ts"],"names":[],"mappings":";;;AAAA,uDAAmD;AACnD,+DAA0D;AAE1D,MAAa,iBAAkB,SAAQ,IAAA,0BAAW,EAAC,uCAAiB,CAAC;CAAI;AAAzE,8CAAyE"}
1
+ {"version":3,"file":"update-incident.dto.js","sourceRoot":"","sources":["../../../../../../src/modules/incident/dtos/incident/update-incident.dto.ts"],"names":[],"mappings":";;;AAAA,uDAAmD;AAEnD,+DAA0D;AAE1D;;;GAGG;AACH,MAAa,iBAAkB,SAAQ,IAAA,0BAAW,EAAC,uCAAiB,CAAC;CAAI;AAAzE,8CAAyE"}
@@ -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;AAEnG,MAAa,yBAAyB;CAoBrC;AApBD,8DAoBC;AAjBG;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;uDACC;AAId;IAFC,IAAA,+BAAa,GAAE;IACf,IAAA,4BAAU,GAAE;;8DACQ;AAIrB;IAFC,IAAA,yBAAO,GAAE;IACT,IAAA,4BAAU,GAAE;;wDACE;AAIf;IAFC,IAAA,wBAAM,GAAE;IACR,IAAA,4BAAU,GAAE;8BACD,IAAI;4DAAC;AAIjB;IAFC,IAAA,wBAAM,GAAE;IACR,IAAA,4BAAU,GAAE;8BACD,IAAI;4DAAC"}
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"}