grm-shared-library 1.0.229 → 1.0.231

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 (189) hide show
  1. package/dist/decorators/case-decorators.js +7 -12
  2. package/dist/exceptions/custom-exception/custom-rpc.exception.js +5 -9
  3. package/dist/exceptions/enums/error-codes.enum.js +1 -4
  4. package/dist/exceptions/error-logger/error-logger.js +2 -6
  5. package/dist/exceptions/filters/all-exceptions.filter.js +17 -20
  6. package/dist/exceptions/filters/http-exceptions.filter.js +10 -13
  7. package/dist/exceptions/index.js +7 -23
  8. package/dist/exceptions/interfaces/error-context.js +1 -2
  9. package/dist/exceptions/interfaces/error-response.js +1 -2
  10. package/dist/index.js +18 -34
  11. package/dist/interfaces/i-request-with-user.js +1 -2
  12. package/dist/interfaces/jwt-payload.js +1 -2
  13. package/dist/interfaces/server-message.js +1 -2
  14. package/dist/interfaces/validated-user.js +1 -2
  15. package/dist/kafka/dtos/otp/create-otp-payload.dto.js +25 -29
  16. package/dist/kafka/dtos/otp/otp-payload.dto.js +10 -14
  17. package/dist/kafka/dtos/password/password-reset-payload.dto.js +13 -17
  18. package/dist/kafka/dtos/user/create-user-created-payload.dto.js +27 -31
  19. package/dist/kafka/dtos/user/create-user-registered-payload.dto.js +14 -18
  20. package/dist/kafka/dtos/user/user-created-payload.dto.js +10 -14
  21. package/dist/kafka/dtos/user/user-registered-payload.dto.js +6 -10
  22. package/dist/kafka/index.js +8 -24
  23. package/dist/kafka/topics.js +1 -4
  24. package/dist/modules/auth/dtos/change-password.dto.js +17 -21
  25. package/dist/modules/auth/dtos/forgot-password.dto.js +4 -8
  26. package/dist/modules/auth/dtos/login.dto.js +9 -13
  27. package/dist/modules/auth/dtos/refresh-token.dto.js +4 -8
  28. package/dist/modules/auth/dtos/register.dto.js +43 -47
  29. package/dist/modules/auth/dtos/resend-otp.dto.js +7 -11
  30. package/dist/modules/auth/dtos/reset-password.dto.js +15 -19
  31. package/dist/modules/auth/dtos/verify-otp.dto.js +6 -10
  32. package/dist/modules/auth/enums/otp-action.js +2 -5
  33. package/dist/modules/auth/index.d.ts +1 -0
  34. package/dist/modules/auth/index.js +12 -26
  35. package/dist/modules/auth/interfaces/login-response.js +1 -2
  36. package/dist/modules/auth/interfaces/register-response.js +1 -2
  37. package/dist/modules/auth/validators/match.decorator.js +3 -6
  38. package/dist/modules/common/constants/password-regex.const.js +1 -5
  39. package/dist/modules/common/constants/service.const.js +1 -4
  40. package/dist/modules/common/dtos/contact-person.dto.js +12 -16
  41. package/dist/modules/common/dtos/map-address.dto.js +20 -24
  42. package/dist/modules/common/dtos/map-location.dto.js +10 -14
  43. package/dist/modules/common/index.js +7 -23
  44. package/dist/modules/common/interfaces/contact-person.js +1 -2
  45. package/dist/modules/common/interfaces/map-address.js +1 -2
  46. package/dist/modules/common/interfaces/map-location.js +1 -2
  47. package/dist/modules/control-centre/dtos/create-control-centre.dto.js +29 -33
  48. package/dist/modules/control-centre/dtos/update-control-centre.dto.js +3 -7
  49. package/dist/modules/control-centre/enums/control-centre.enum.js +2 -5
  50. package/dist/modules/control-centre/index.js +4 -20
  51. package/dist/modules/control-centre/interfaces/control-centre.js +1 -2
  52. package/dist/modules/email/index.js +1 -17
  53. package/dist/modules/email/interfaces/user-created.js +1 -2
  54. package/dist/modules/incident/dtos/action/create-incident-action.dto.js +13 -17
  55. package/dist/modules/incident/dtos/action/incident-action.dto.js +8 -12
  56. package/dist/modules/incident/dtos/action/update-inident-action.dto.js +3 -7
  57. package/dist/modules/incident/dtos/assignment/create-incident-assignment.dto.js +14 -18
  58. package/dist/modules/incident/dtos/assignment/incident-assignment.dto.js +8 -12
  59. package/dist/modules/incident/dtos/assignment/update-incident-assignment.dto.js +3 -7
  60. package/dist/modules/incident/dtos/attachment/create-incident-attachment.dto.js +12 -16
  61. package/dist/modules/incident/dtos/attachment/update-incident-attachment.dto.js +3 -7
  62. package/dist/modules/incident/dtos/category/create-incident-category.dto.js +10 -14
  63. package/dist/modules/incident/dtos/category/update-incident-category.dto.js +3 -7
  64. package/dist/modules/incident/dtos/incident/create-incident.dto.js +53 -57
  65. package/dist/modules/incident/dtos/incident/incident.dto.js +37 -41
  66. package/dist/modules/incident/dtos/incident/update-incident.dto.js +3 -7
  67. package/dist/modules/incident/dtos/reporter/create-incident-reporter.dto.js +12 -16
  68. package/dist/modules/incident/dtos/reporter/incident-reporter.dto.js +10 -14
  69. package/dist/modules/incident/dtos/reporter/update-incident-reporter.dto.js +3 -7
  70. package/dist/modules/incident/dtos/response-unit-assignment/create-incident-response-unit-assignment.dto.js +16 -20
  71. package/dist/modules/incident/dtos/response-unit-assignment/incident-response-unit-assignment.dto.js +3 -7
  72. package/dist/modules/incident/dtos/response-unit-assignment/update-incident-response-unit-assignment.dto.js +8 -12
  73. package/dist/modules/incident/dtos/type/create-incident-type.dto.js +12 -16
  74. package/dist/modules/incident/dtos/type/update-incident-type.dto.js +3 -7
  75. package/dist/modules/incident/enums/incident-actions.enum.js +2 -5
  76. package/dist/modules/incident/enums/incident-app-id.enum.js +2 -5
  77. package/dist/modules/incident/enums/incident-channel.enum.js +2 -5
  78. package/dist/modules/incident/enums/incident-class.enum.js +2 -5
  79. package/dist/modules/incident/enums/incident-priority.enum.js +2 -5
  80. package/dist/modules/incident/enums/incident-status.enum.js +2 -5
  81. package/dist/modules/incident/enums/incident-workflow-queue-name.enum.js +2 -5
  82. package/dist/modules/incident/index.js +37 -53
  83. package/dist/modules/incident/intefaces/incident-action.js +1 -2
  84. package/dist/modules/incident/intefaces/incident-assignment.js +1 -2
  85. package/dist/modules/incident/intefaces/incident-attachment.js +1 -2
  86. package/dist/modules/incident/intefaces/incident-category.js +1 -2
  87. package/dist/modules/incident/intefaces/incident-reporter.js +1 -2
  88. package/dist/modules/incident/intefaces/incident-response-unit-assignment.js +1 -2
  89. package/dist/modules/incident/intefaces/incident-type.js +1 -2
  90. package/dist/modules/incident/intefaces/incident.js +1 -2
  91. package/dist/modules/organization/dtos/create-organization.dto.js +41 -45
  92. package/dist/modules/organization/dtos/organization-sla.dto.js +12 -16
  93. package/dist/modules/organization/dtos/update-organization.dto.js +3 -7
  94. package/dist/modules/organization/enums/org-status.enum.js +2 -5
  95. package/dist/modules/organization/enums/org-type.enum.js +2 -5
  96. package/dist/modules/organization/index.d.ts +1 -0
  97. package/dist/modules/organization/index.js +10 -22
  98. package/dist/modules/organization/interfaces/organization-sla.js +1 -2
  99. package/dist/modules/organization/interfaces/organization.js +1 -2
  100. package/dist/modules/permission/data/permissions.data.js +28 -31
  101. package/dist/modules/permission/dtos/create-permission.dto.js +7 -11
  102. package/dist/modules/permission/dtos/update-permission.dto.js +3 -7
  103. package/dist/modules/permission/enums/permission-actions.enum.js +2 -5
  104. package/dist/modules/permission/enums/permissions-moudule.enum.js +2 -5
  105. package/dist/modules/permission/index.js +6 -22
  106. package/dist/modules/permission/interfaces/permission.js +1 -2
  107. package/dist/modules/response-unit/dtos/person-unit/base-person-unit.dto.js +15 -19
  108. package/dist/modules/response-unit/dtos/person-unit/create-person-unit.dto.js +3 -7
  109. package/dist/modules/response-unit/dtos/person-unit/person-unit.dto.js +2 -6
  110. package/dist/modules/response-unit/dtos/person-unit/update-person-unit.dto.js +3 -7
  111. package/dist/modules/response-unit/dtos/response-unit/base-response-unit.dto.js +25 -29
  112. package/dist/modules/response-unit/dtos/response-unit/create-response-unit.dto.js +3 -7
  113. package/dist/modules/response-unit/dtos/response-unit/response-unit.dto.js +2 -6
  114. package/dist/modules/response-unit/dtos/response-unit/station.dto.js +8 -12
  115. package/dist/modules/response-unit/dtos/response-unit/update-response-unit.dto.js +3 -7
  116. package/dist/modules/response-unit/dtos/team-unit/base-team-unit.dto.js +10 -14
  117. package/dist/modules/response-unit/dtos/team-unit/create-team-unit.dto.js +3 -7
  118. package/dist/modules/response-unit/dtos/team-unit/crew/create-team-unit-crew.dto.js +3 -7
  119. package/dist/modules/response-unit/dtos/team-unit/crew/team-unit-crew.dto.js +14 -18
  120. package/dist/modules/response-unit/dtos/team-unit/crew/update-team-unit-crew.dto.js +3 -7
  121. package/dist/modules/response-unit/dtos/team-unit/team-unit.dto.js +2 -6
  122. package/dist/modules/response-unit/dtos/team-unit/update-team-unit.dto.js +3 -7
  123. package/dist/modules/response-unit/dtos/vehicle-unit/base-vehicle-unit.dto.js +27 -31
  124. package/dist/modules/response-unit/dtos/vehicle-unit/create-vehicle-unit.dto.js +3 -7
  125. package/dist/modules/response-unit/dtos/vehicle-unit/crew/create-vehicle-unit-crew.dto.js +3 -7
  126. package/dist/modules/response-unit/dtos/vehicle-unit/crew/update-vehicle-unit-crew.dto.js +11 -15
  127. package/dist/modules/response-unit/dtos/vehicle-unit/crew/vehicle-unit-crew.dto.js +19 -23
  128. package/dist/modules/response-unit/dtos/vehicle-unit/device/create-vehicle-unit-device.dto.js +3 -7
  129. package/dist/modules/response-unit/dtos/vehicle-unit/device/update-vehicle-unit-device.dto.js +3 -7
  130. package/dist/modules/response-unit/dtos/vehicle-unit/device/vehicle-unit-device.dto.js +23 -27
  131. package/dist/modules/response-unit/dtos/vehicle-unit/update-vehicle-unit.dto.js +3 -7
  132. package/dist/modules/response-unit/dtos/vehicle-unit/vehicle-type/ambulance-vehicle/ambulance-vehicle.dto.js +2 -6
  133. package/dist/modules/response-unit/dtos/vehicle-unit/vehicle-type/ambulance-vehicle/base-ambulance-vehicle.dto.js +6 -10
  134. package/dist/modules/response-unit/dtos/vehicle-unit/vehicle-type/ambulance-vehicle/create-ambulance-vehicle.dto.js +3 -7
  135. package/dist/modules/response-unit/dtos/vehicle-unit/vehicle-type/ambulance-vehicle/update-ambulance-vehicle.dto.js +3 -7
  136. package/dist/modules/response-unit/dtos/vehicle-unit/vehicle-type/fire-vehicle/base-fire-vehicle.dto.js +6 -10
  137. package/dist/modules/response-unit/dtos/vehicle-unit/vehicle-type/fire-vehicle/create-fire-vehicle.dto.js +3 -7
  138. package/dist/modules/response-unit/dtos/vehicle-unit/vehicle-type/fire-vehicle/fire-vehicle.dto.js +2 -6
  139. package/dist/modules/response-unit/dtos/vehicle-unit/vehicle-type/fire-vehicle/update-fire-vehicle.dto.js +3 -7
  140. package/dist/modules/response-unit/dtos/vehicle-unit/vehicle-type/road-rescue-vehicle/base-road-rescue-vehicle.dto.js +5 -9
  141. package/dist/modules/response-unit/dtos/vehicle-unit/vehicle-type/road-rescue-vehicle/create-road-rescue-vehicle.dto.js +3 -7
  142. package/dist/modules/response-unit/dtos/vehicle-unit/vehicle-type/road-rescue-vehicle/road-rescue-vehicle.dto.js +2 -6
  143. package/dist/modules/response-unit/dtos/vehicle-unit/vehicle-type/road-rescue-vehicle/update-road-rescue-vehicle.dto.js +3 -7
  144. package/dist/modules/response-unit/dtos/vehicle-unit/vehicle-type/security-vehicle/base-security-vehicle.dto.js +5 -9
  145. package/dist/modules/response-unit/dtos/vehicle-unit/vehicle-type/security-vehicle/create-security-vehicle.dto.js +3 -7
  146. package/dist/modules/response-unit/dtos/vehicle-unit/vehicle-type/security-vehicle/security-vehicle.dto.js +2 -6
  147. package/dist/modules/response-unit/dtos/vehicle-unit/vehicle-type/security-vehicle/update-security-vehicle.dto.js +3 -7
  148. package/dist/modules/response-unit/dtos/vehicle-unit/vehicle-unit.dto.js +2 -6
  149. package/dist/modules/response-unit/enums/person-unit/person-unit-category.enum.js +2 -5
  150. package/dist/modules/response-unit/enums/person-unit/person-unit-status.enum.js +2 -5
  151. package/dist/modules/response-unit/enums/response-unit/response-unit-type.enum.js +2 -5
  152. package/dist/modules/response-unit/enums/vehicle-unit/vehicle-crew/ambulance-vehicle-role.enum.js +2 -5
  153. package/dist/modules/response-unit/enums/vehicle-unit/vehicle-crew/fire-vehicle-role.enum.js +2 -5
  154. package/dist/modules/response-unit/enums/vehicle-unit/vehicle-crew/road-rescue-vehicle-role.enum.js +2 -5
  155. package/dist/modules/response-unit/enums/vehicle-unit/vehicle-crew/security-vehicle-role.enum.js +2 -5
  156. package/dist/modules/response-unit/enums/vehicle-unit/vehicle-type/ambulance-vehicle-type.enum.js +2 -5
  157. package/dist/modules/response-unit/enums/vehicle-unit/vehicle-type/fire-vehicle-type.enum.js +2 -5
  158. package/dist/modules/response-unit/enums/vehicle-unit/vehicle-type/road-rescue-vehicle-type.enum.js +2 -5
  159. package/dist/modules/response-unit/enums/vehicle-unit/vehicle-type/security-vehicle-type.enum.js +2 -5
  160. package/dist/modules/response-unit/enums/vehicle-unit/vehicle-unit-ownership.enum.js +2 -5
  161. package/dist/modules/response-unit/enums/vehicle-unit/vehicle-unit-status.enum.js +2 -5
  162. package/dist/modules/response-unit/enums/vehicle-unit/vehicle-unit-type.enum.js +2 -5
  163. package/dist/modules/response-unit/index.js +67 -83
  164. package/dist/modules/response-unit/interfaces/person-unit/person-unit.js +1 -2
  165. package/dist/modules/response-unit/interfaces/response-unit/response-unit.js +1 -2
  166. package/dist/modules/response-unit/interfaces/team-unit/team-unit-crew.js +1 -2
  167. package/dist/modules/response-unit/interfaces/team-unit/team-unit.js +1 -2
  168. package/dist/modules/response-unit/interfaces/vehicle-unit/vehicle-type/ambulance-vehicle.js +1 -2
  169. package/dist/modules/response-unit/interfaces/vehicle-unit/vehicle-type/fire-vehicle.js +1 -2
  170. package/dist/modules/response-unit/interfaces/vehicle-unit/vehicle-type/road-rescue-vehicle.js +1 -2
  171. package/dist/modules/response-unit/interfaces/vehicle-unit/vehicle-type/security-vehicle.js +1 -2
  172. package/dist/modules/response-unit/interfaces/vehicle-unit/vehicle-unit-crew.js +1 -2
  173. package/dist/modules/response-unit/interfaces/vehicle-unit/vehicle-unit-device.js +1 -2
  174. package/dist/modules/response-unit/interfaces/vehicle-unit/vehicle-unit.js +1 -2
  175. package/dist/modules/response-unit/validators/valid-vehicle-role.decorator.js +16 -19
  176. package/dist/modules/role/data/roles.data.js +62 -65
  177. package/dist/modules/role/dtos/create-role.dto.js +10 -14
  178. package/dist/modules/role/dtos/update-tole.dto.js +3 -7
  179. package/dist/modules/role/enums/role.enum.js +2 -5
  180. package/dist/modules/role/index.js +5 -21
  181. package/dist/modules/role/interfaces/role.js +1 -2
  182. package/dist/modules/user/dtos/create-user.dto.js +41 -45
  183. package/dist/modules/user/dtos/update-user.dto.js +3 -7
  184. package/dist/modules/user/enums/user-status.enum.js +2 -5
  185. package/dist/modules/user/index.js +4 -20
  186. package/dist/modules/user/interfaces/user.js +1 -2
  187. package/dist/modules/workflow/index.js +1 -17
  188. package/dist/modules/workflow/interfaces/workflow-query-info.js +1 -2
  189. package/package.json +3 -1
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
2
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
3
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -8,48 +7,45 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
8
7
  var __metadata = (this && this.__metadata) || function (k, v) {
9
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
9
  };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.TeamUnitCrewDto = void 0;
13
- const class_validator_1 = require("class-validator");
14
- const person_unit_status_enum_1 = require("../../../enums/person-unit/person-unit-status.enum");
15
- class TeamUnitCrewDto {
10
+ import { IsDate, IsEnum, IsNumber, IsOptional, IsPhoneNumber, IsString } from "class-validator";
11
+ import { PersonUnitStatus } from "../../../enums/person-unit/person-unit-status.enum";
12
+ export class TeamUnitCrewDto {
16
13
  }
17
- exports.TeamUnitCrewDto = TeamUnitCrewDto;
18
14
  __decorate([
19
- (0, class_validator_1.IsNumber)(),
15
+ IsNumber(),
20
16
  __metadata("design:type", Number)
21
17
  ], TeamUnitCrewDto.prototype, "id", void 0);
22
18
  __decorate([
23
- (0, class_validator_1.IsString)(),
19
+ IsString(),
24
20
  __metadata("design:type", String)
25
21
  ], TeamUnitCrewDto.prototype, "name", void 0);
26
22
  __decorate([
27
- (0, class_validator_1.IsPhoneNumber)(),
23
+ IsPhoneNumber(),
28
24
  __metadata("design:type", String)
29
25
  ], TeamUnitCrewDto.prototype, "phoneNumber", void 0);
30
26
  __decorate([
31
- (0, class_validator_1.IsString)(),
27
+ IsString(),
32
28
  __metadata("design:type", String)
33
29
  ], TeamUnitCrewDto.prototype, "role", void 0);
34
30
  __decorate([
35
- (0, class_validator_1.IsEnum)(person_unit_status_enum_1.PersonUnitStatus),
31
+ IsEnum(PersonUnitStatus),
36
32
  __metadata("design:type", String)
37
33
  ], TeamUnitCrewDto.prototype, "status", void 0);
38
34
  __decorate([
39
- (0, class_validator_1.IsNumber)(),
35
+ IsNumber(),
40
36
  __metadata("design:type", Number)
41
37
  ], TeamUnitCrewDto.prototype, "teamUnitId", void 0);
42
38
  __decorate([
43
- (0, class_validator_1.IsOptional)(),
39
+ IsOptional(),
44
40
  __metadata("design:type", Object)
45
41
  ], TeamUnitCrewDto.prototype, "attributes", void 0);
46
42
  __decorate([
47
- (0, class_validator_1.IsDate)(),
48
- (0, class_validator_1.IsOptional)(),
43
+ IsDate(),
44
+ IsOptional(),
49
45
  __metadata("design:type", String)
50
46
  ], TeamUnitCrewDto.prototype, "createdAt", void 0);
51
47
  __decorate([
52
- (0, class_validator_1.IsDate)(),
53
- (0, class_validator_1.IsOptional)(),
48
+ IsDate(),
49
+ IsOptional(),
54
50
  __metadata("design:type", String)
55
51
  ], TeamUnitCrewDto.prototype, "updatedAt", void 0);
@@ -1,8 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UpdateTeamUnitCrewDto = void 0;
4
- const mapped_types_1 = require("@nestjs/mapped-types");
5
- const create_team_unit_crew_dto_1 = require("./create-team-unit-crew.dto");
6
- class UpdateTeamUnitCrewDto extends (0, mapped_types_1.PartialType)(create_team_unit_crew_dto_1.CreateTeamUnitCrewDto) {
1
+ import { PartialType } from "@nestjs/mapped-types";
2
+ import { CreateTeamUnitCrewDto } from "./create-team-unit-crew.dto";
3
+ export class UpdateTeamUnitCrewDto extends PartialType(CreateTeamUnitCrewDto) {
7
4
  }
8
- exports.UpdateTeamUnitCrewDto = UpdateTeamUnitCrewDto;
@@ -1,7 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TeamUnitDto = void 0;
4
- const base_team_unit_dto_1 = require("./base-team-unit.dto");
5
- class TeamUnitDto extends base_team_unit_dto_1.BaseTeamUnitDto {
1
+ import { BaseTeamUnitDto } from './base-team-unit.dto';
2
+ export class TeamUnitDto extends BaseTeamUnitDto {
6
3
  }
7
- exports.TeamUnitDto = TeamUnitDto;
@@ -1,8 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UpdateTeamUnitDto = void 0;
4
- const mapped_types_1 = require("@nestjs/mapped-types");
5
- const create_team_unit_dto_1 = require("./create-team-unit.dto");
6
- class UpdateTeamUnitDto extends (0, mapped_types_1.PartialType)(create_team_unit_dto_1.CreateTeamUnitDto) {
1
+ import { PartialType } from '@nestjs/mapped-types';
2
+ import { CreateTeamUnitDto } from './create-team-unit.dto';
3
+ export class UpdateTeamUnitDto extends PartialType(CreateTeamUnitDto) {
7
4
  }
8
- exports.UpdateTeamUnitDto = UpdateTeamUnitDto;
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
2
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
3
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -8,73 +7,70 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
8
7
  var __metadata = (this && this.__metadata) || function (k, v) {
9
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
9
  };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.BaseVehicleUnitDto = void 0;
13
- const class_validator_1 = require("class-validator");
14
- const vehicle_unit_status_enum_1 = require("../../enums/vehicle-unit/vehicle-unit-status.enum");
15
- const vehicle_unit_ownership_enum_1 = require("../../enums/vehicle-unit/vehicle-unit-ownership.enum");
16
- const base_response_unit_dto_1 = require("../response-unit/base-response-unit.dto");
17
- const response_unit_type_enum_1 = require("../../enums/response-unit/response-unit-type.enum");
18
- const vehicle_unit_type_enum_1 = require("../../enums/vehicle-unit/vehicle-unit-type.enum");
19
- class BaseVehicleUnitDto extends base_response_unit_dto_1.BaseResponseUnitDto {
10
+ import { IsArray, IsEnum, IsNumber, IsOptional, IsString } from "class-validator";
11
+ import { VehicleUnitStatus } from "../../enums/vehicle-unit/vehicle-unit-status.enum";
12
+ import { VehicleUnitOwnership } from "../../enums/vehicle-unit/vehicle-unit-ownership.enum";
13
+ import { BaseResponseUnitDto } from "../response-unit/base-response-unit.dto";
14
+ import { ResponseUnitType } from "../../enums/response-unit/response-unit-type.enum";
15
+ import { VehicleUnitType } from "../../enums/vehicle-unit/vehicle-unit-type.enum";
16
+ export class BaseVehicleUnitDto extends BaseResponseUnitDto {
20
17
  constructor() {
21
18
  super();
22
- this.type = response_unit_type_enum_1.ResponseUnitType.VEHICLE_UNIT;
19
+ this.type = ResponseUnitType.VEHICLE_UNIT;
23
20
  }
24
21
  }
25
- exports.BaseVehicleUnitDto = BaseVehicleUnitDto;
26
22
  __decorate([
27
- (0, class_validator_1.IsString)(),
23
+ IsString(),
28
24
  __metadata("design:type", String)
29
25
  ], BaseVehicleUnitDto.prototype, "registrationNumber", void 0);
30
26
  __decorate([
31
- (0, class_validator_1.IsEnum)(vehicle_unit_type_enum_1.VehicleUnitType),
27
+ IsEnum(VehicleUnitType),
32
28
  __metadata("design:type", String)
33
29
  ], BaseVehicleUnitDto.prototype, "vehicleType", void 0);
34
30
  __decorate([
35
- (0, class_validator_1.IsString)(),
31
+ IsString(),
36
32
  __metadata("design:type", String)
37
33
  ], BaseVehicleUnitDto.prototype, "phoneNumber", void 0);
38
34
  __decorate([
39
- (0, class_validator_1.IsArray)(),
40
- (0, class_validator_1.IsNumber)({}, { each: true }),
35
+ IsArray(),
36
+ IsNumber({}, { each: true }),
41
37
  __metadata("design:type", Array)
42
38
  ], BaseVehicleUnitDto.prototype, "crewIds", void 0);
43
39
  __decorate([
44
- (0, class_validator_1.IsEnum)(vehicle_unit_status_enum_1.VehicleUnitStatus),
40
+ IsEnum(VehicleUnitStatus),
45
41
  __metadata("design:type", String)
46
42
  ], BaseVehicleUnitDto.prototype, "vehicleStatus", void 0);
47
43
  __decorate([
48
- (0, class_validator_1.IsEnum)(vehicle_unit_ownership_enum_1.VehicleUnitOwnership),
49
- (0, class_validator_1.IsOptional)(),
44
+ IsEnum(VehicleUnitOwnership),
45
+ IsOptional(),
50
46
  __metadata("design:type", String)
51
47
  ], BaseVehicleUnitDto.prototype, "ownership", void 0);
52
48
  __decorate([
53
- (0, class_validator_1.IsString)(),
54
- (0, class_validator_1.IsOptional)(),
49
+ IsString(),
50
+ IsOptional(),
55
51
  __metadata("design:type", String)
56
52
  ], BaseVehicleUnitDto.prototype, "ownerName", void 0);
57
53
  __decorate([
58
- (0, class_validator_1.IsNumber)(),
59
- (0, class_validator_1.IsOptional)(),
54
+ IsNumber(),
55
+ IsOptional(),
60
56
  __metadata("design:type", Number)
61
57
  ], BaseVehicleUnitDto.prototype, "deviceId", void 0);
62
58
  __decorate([
63
- (0, class_validator_1.IsString)(),
64
- (0, class_validator_1.IsOptional)(),
59
+ IsString(),
60
+ IsOptional(),
65
61
  __metadata("design:type", String)
66
62
  ], BaseVehicleUnitDto.prototype, "model", void 0);
67
63
  __decorate([
68
- (0, class_validator_1.IsNumber)(),
69
- (0, class_validator_1.IsOptional)(),
64
+ IsNumber(),
65
+ IsOptional(),
70
66
  __metadata("design:type", Number)
71
67
  ], BaseVehicleUnitDto.prototype, "mileage", void 0);
72
68
  __decorate([
73
- (0, class_validator_1.IsNumber)(),
74
- (0, class_validator_1.IsOptional)(),
69
+ IsNumber(),
70
+ IsOptional(),
75
71
  __metadata("design:type", Number)
76
72
  ], BaseVehicleUnitDto.prototype, "year", void 0);
77
73
  __decorate([
78
- (0, class_validator_1.IsOptional)(),
74
+ IsOptional(),
79
75
  __metadata("design:type", Object)
80
76
  ], BaseVehicleUnitDto.prototype, "attributes", void 0);
@@ -1,8 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CreateVehicleUnitDto = void 0;
4
- const mapped_types_1 = require("@nestjs/mapped-types");
5
- const base_vehicle_unit_dto_1 = require("./base-vehicle-unit.dto");
6
- class CreateVehicleUnitDto extends (0, mapped_types_1.OmitType)(base_vehicle_unit_dto_1.BaseVehicleUnitDto, ['id', 'createdAt', 'updatedAt']) {
1
+ import { OmitType } from '@nestjs/mapped-types';
2
+ import { BaseVehicleUnitDto } from './base-vehicle-unit.dto';
3
+ export class CreateVehicleUnitDto extends OmitType(BaseVehicleUnitDto, ['id', 'createdAt', 'updatedAt']) {
7
4
  }
8
- exports.CreateVehicleUnitDto = CreateVehicleUnitDto;
@@ -1,8 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CreateVehicleUnitCrewDto = void 0;
4
- const mapped_types_1 = require("@nestjs/mapped-types");
5
- const vehicle_unit_crew_dto_1 = require("./vehicle-unit-crew.dto");
6
- class CreateVehicleUnitCrewDto extends (0, mapped_types_1.OmitType)(vehicle_unit_crew_dto_1.VehicleUnitCrewDto, ['id', 'createdAt', 'updatedAt']) {
1
+ import { OmitType } from '@nestjs/mapped-types';
2
+ import { VehicleUnitCrewDto } from './vehicle-unit-crew.dto';
3
+ export class CreateVehicleUnitCrewDto extends OmitType(VehicleUnitCrewDto, ['id', 'createdAt', 'updatedAt']) {
7
4
  }
8
- exports.CreateVehicleUnitCrewDto = CreateVehicleUnitCrewDto;
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
2
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
3
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -8,24 +7,21 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
8
7
  var __metadata = (this && this.__metadata) || function (k, v) {
9
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
9
  };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.UpdateVehicleUnitCrewDto = void 0;
13
- const mapped_types_1 = require("@nestjs/mapped-types");
14
- const create_vehicle_unit_crew_dto_1 = require("./create-vehicle-unit-crew.dto");
15
- const class_validator_1 = require("class-validator");
16
- const valid_vehicle_role_decorator_1 = require("../../../validators/valid-vehicle-role.decorator");
17
- const vehicle_unit_type_enum_1 = require("../../../enums/vehicle-unit/vehicle-unit-type.enum");
18
- class UpdateVehicleUnitCrewDto extends (0, mapped_types_1.PartialType)(create_vehicle_unit_crew_dto_1.CreateVehicleUnitCrewDto) {
10
+ import { PartialType } from '@nestjs/mapped-types';
11
+ import { CreateVehicleUnitCrewDto } from './create-vehicle-unit-crew.dto';
12
+ import { IsEnum, IsOptional, IsString } from 'class-validator';
13
+ import { IsValidVehicleRole } from '../../../validators/valid-vehicle-role.decorator';
14
+ import { VehicleUnitType } from '../../../enums/vehicle-unit/vehicle-unit-type.enum';
15
+ export class UpdateVehicleUnitCrewDto extends PartialType(CreateVehicleUnitCrewDto) {
19
16
  }
20
- exports.UpdateVehicleUnitCrewDto = UpdateVehicleUnitCrewDto;
21
17
  __decorate([
22
- (0, class_validator_1.IsString)(),
23
- (0, class_validator_1.IsOptional)(),
24
- (0, valid_vehicle_role_decorator_1.IsValidVehicleRole)({ message: 'Invalid role for the specified vehicle type' }),
18
+ IsString(),
19
+ IsOptional(),
20
+ IsValidVehicleRole({ message: 'Invalid role for the specified vehicle type' }),
25
21
  __metadata("design:type", String)
26
22
  ], UpdateVehicleUnitCrewDto.prototype, "role", void 0);
27
23
  __decorate([
28
- (0, class_validator_1.IsEnum)(vehicle_unit_type_enum_1.VehicleUnitType),
29
- (0, class_validator_1.IsOptional)(),
24
+ IsEnum(VehicleUnitType),
25
+ IsOptional(),
30
26
  __metadata("design:type", String)
31
27
  ], UpdateVehicleUnitCrewDto.prototype, "vehicleType", void 0);
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
2
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
3
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -8,56 +7,53 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
8
7
  var __metadata = (this && this.__metadata) || function (k, v) {
9
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
9
  };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.VehicleUnitCrewDto = void 0;
13
- const class_validator_1 = require("class-validator");
14
- const person_unit_status_enum_1 = require("../../../enums/person-unit/person-unit-status.enum");
15
- const vehicle_unit_type_enum_1 = require("../../../enums/vehicle-unit/vehicle-unit-type.enum");
16
- const valid_vehicle_role_decorator_1 = require("../../../validators/valid-vehicle-role.decorator");
17
- class VehicleUnitCrewDto {
10
+ import { IsDate, IsEnum, IsNumber, IsOptional, IsPhoneNumber, IsString } from "class-validator";
11
+ import { PersonUnitStatus } from "../../../enums/person-unit/person-unit-status.enum";
12
+ import { VehicleUnitType } from "../../../enums/vehicle-unit/vehicle-unit-type.enum";
13
+ import { IsValidVehicleRole } from "../../../validators/valid-vehicle-role.decorator";
14
+ export class VehicleUnitCrewDto {
18
15
  }
19
- exports.VehicleUnitCrewDto = VehicleUnitCrewDto;
20
16
  __decorate([
21
- (0, class_validator_1.IsNumber)(),
17
+ IsNumber(),
22
18
  __metadata("design:type", Number)
23
19
  ], VehicleUnitCrewDto.prototype, "id", void 0);
24
20
  __decorate([
25
- (0, class_validator_1.IsString)(),
21
+ IsString(),
26
22
  __metadata("design:type", String)
27
23
  ], VehicleUnitCrewDto.prototype, "name", void 0);
28
24
  __decorate([
29
- (0, class_validator_1.IsPhoneNumber)(),
25
+ IsPhoneNumber(),
30
26
  __metadata("design:type", String)
31
27
  ], VehicleUnitCrewDto.prototype, "phoneNumber", void 0);
32
28
  __decorate([
33
- (0, class_validator_1.IsString)(),
34
- (0, valid_vehicle_role_decorator_1.IsValidVehicleRole)({ message: 'Invalid role for the specified vehicle type' }),
29
+ IsString(),
30
+ IsValidVehicleRole({ message: 'Invalid role for the specified vehicle type' }),
35
31
  __metadata("design:type", String)
36
32
  ], VehicleUnitCrewDto.prototype, "role", void 0);
37
33
  __decorate([
38
- (0, class_validator_1.IsEnum)(person_unit_status_enum_1.PersonUnitStatus),
34
+ IsEnum(PersonUnitStatus),
39
35
  __metadata("design:type", String)
40
36
  ], VehicleUnitCrewDto.prototype, "status", void 0);
41
37
  __decorate([
42
- (0, class_validator_1.IsNumber)(),
38
+ IsNumber(),
43
39
  __metadata("design:type", Number)
44
40
  ], VehicleUnitCrewDto.prototype, "vehicleUnitId", void 0);
45
41
  __decorate([
46
- (0, class_validator_1.IsEnum)(vehicle_unit_type_enum_1.VehicleUnitType),
47
- (0, class_validator_1.IsOptional)(),
42
+ IsEnum(VehicleUnitType),
43
+ IsOptional(),
48
44
  __metadata("design:type", String)
49
45
  ], VehicleUnitCrewDto.prototype, "vehicleType", void 0);
50
46
  __decorate([
51
- (0, class_validator_1.IsOptional)(),
47
+ IsOptional(),
52
48
  __metadata("design:type", Object)
53
49
  ], VehicleUnitCrewDto.prototype, "attributes", void 0);
54
50
  __decorate([
55
- (0, class_validator_1.IsDate)(),
56
- (0, class_validator_1.IsOptional)(),
51
+ IsDate(),
52
+ IsOptional(),
57
53
  __metadata("design:type", Date)
58
54
  ], VehicleUnitCrewDto.prototype, "createdAt", void 0);
59
55
  __decorate([
60
- (0, class_validator_1.IsDate)(),
61
- (0, class_validator_1.IsOptional)(),
56
+ IsDate(),
57
+ IsOptional(),
62
58
  __metadata("design:type", Date)
63
59
  ], VehicleUnitCrewDto.prototype, "updatedAt", void 0);
@@ -1,8 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CreateVehicleUnitDeviceDto = void 0;
4
- const mapped_types_1 = require("@nestjs/mapped-types");
5
- const vehicle_unit_device_dto_1 = require("./vehicle-unit-device.dto");
6
- class CreateVehicleUnitDeviceDto extends (0, mapped_types_1.OmitType)(vehicle_unit_device_dto_1.VehicleUnitDeviceDto, ['id', 'createdAt', 'updatedAt']) {
1
+ import { OmitType } from '@nestjs/mapped-types';
2
+ import { VehicleUnitDeviceDto } from './vehicle-unit-device.dto';
3
+ export class CreateVehicleUnitDeviceDto extends OmitType(VehicleUnitDeviceDto, ['id', 'createdAt', 'updatedAt']) {
7
4
  }
8
- exports.CreateVehicleUnitDeviceDto = CreateVehicleUnitDeviceDto;
@@ -1,8 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UpdateVehicleUnitDeviceDto = void 0;
4
- const mapped_types_1 = require("@nestjs/mapped-types");
5
- const create_vehicle_unit_device_dto_1 = require("./create-vehicle-unit-device.dto");
6
- class UpdateVehicleUnitDeviceDto extends (0, mapped_types_1.PartialType)(create_vehicle_unit_device_dto_1.CreateVehicleUnitDeviceDto) {
1
+ import { PartialType } from '@nestjs/mapped-types';
2
+ import { CreateVehicleUnitDeviceDto } from './create-vehicle-unit-device.dto';
3
+ export class UpdateVehicleUnitDeviceDto extends PartialType(CreateVehicleUnitDeviceDto) {
7
4
  }
8
- exports.UpdateVehicleUnitDeviceDto = UpdateVehicleUnitDeviceDto;
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
2
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
3
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -8,75 +7,72 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
8
7
  var __metadata = (this && this.__metadata) || function (k, v) {
9
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
9
  };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.VehicleUnitDeviceDto = void 0;
13
- const class_validator_1 = require("class-validator");
14
- class VehicleUnitDeviceDto {
10
+ import { IsString, IsNumber, IsBoolean, IsDate, IsOptional } from 'class-validator';
11
+ export class VehicleUnitDeviceDto {
15
12
  }
16
- exports.VehicleUnitDeviceDto = VehicleUnitDeviceDto;
17
13
  __decorate([
18
- (0, class_validator_1.IsNumber)(),
14
+ IsNumber(),
19
15
  __metadata("design:type", Number)
20
16
  ], VehicleUnitDeviceDto.prototype, "id", void 0);
21
17
  __decorate([
22
- (0, class_validator_1.IsString)(),
18
+ IsString(),
23
19
  __metadata("design:type", String)
24
20
  ], VehicleUnitDeviceDto.prototype, "name", void 0);
25
21
  __decorate([
26
- (0, class_validator_1.IsString)(),
22
+ IsString(),
27
23
  __metadata("design:type", String)
28
24
  ], VehicleUnitDeviceDto.prototype, "uniqueId", void 0);
29
25
  __decorate([
30
- (0, class_validator_1.IsString)(),
26
+ IsString(),
31
27
  __metadata("design:type", String)
32
28
  ], VehicleUnitDeviceDto.prototype, "status", void 0);
33
29
  __decorate([
34
- (0, class_validator_1.IsBoolean)(),
30
+ IsBoolean(),
35
31
  __metadata("design:type", Boolean)
36
32
  ], VehicleUnitDeviceDto.prototype, "disabled", void 0);
37
33
  __decorate([
38
- (0, class_validator_1.IsDate)(),
34
+ IsDate(),
39
35
  __metadata("design:type", Date)
40
36
  ], VehicleUnitDeviceDto.prototype, "lastUpdate", void 0);
41
37
  __decorate([
42
- (0, class_validator_1.IsNumber)(),
38
+ IsNumber(),
43
39
  __metadata("design:type", Number)
44
40
  ], VehicleUnitDeviceDto.prototype, "positionId", void 0);
45
41
  __decorate([
46
- (0, class_validator_1.IsNumber)(),
42
+ IsNumber(),
47
43
  __metadata("design:type", Number)
48
44
  ], VehicleUnitDeviceDto.prototype, "groupId", void 0);
49
45
  __decorate([
50
- (0, class_validator_1.IsString)(),
51
- (0, class_validator_1.IsOptional)(),
46
+ IsString(),
47
+ IsOptional(),
52
48
  __metadata("design:type", String)
53
49
  ], VehicleUnitDeviceDto.prototype, "phone", void 0);
54
50
  __decorate([
55
- (0, class_validator_1.IsString)(),
56
- (0, class_validator_1.IsOptional)(),
51
+ IsString(),
52
+ IsOptional(),
57
53
  __metadata("design:type", String)
58
54
  ], VehicleUnitDeviceDto.prototype, "model", void 0);
59
55
  __decorate([
60
- (0, class_validator_1.IsString)(),
61
- (0, class_validator_1.IsOptional)(),
56
+ IsString(),
57
+ IsOptional(),
62
58
  __metadata("design:type", String)
63
59
  ], VehicleUnitDeviceDto.prototype, "contact", void 0);
64
60
  __decorate([
65
- (0, class_validator_1.IsString)(),
66
- (0, class_validator_1.IsOptional)(),
61
+ IsString(),
62
+ IsOptional(),
67
63
  __metadata("design:type", String)
68
64
  ], VehicleUnitDeviceDto.prototype, "category", void 0);
69
65
  __decorate([
70
- (0, class_validator_1.IsOptional)(),
66
+ IsOptional(),
71
67
  __metadata("design:type", Object)
72
68
  ], VehicleUnitDeviceDto.prototype, "attributes", void 0);
73
69
  __decorate([
74
- (0, class_validator_1.IsDate)(),
75
- (0, class_validator_1.IsOptional)(),
70
+ IsDate(),
71
+ IsOptional(),
76
72
  __metadata("design:type", Date)
77
73
  ], VehicleUnitDeviceDto.prototype, "createdAt", void 0);
78
74
  __decorate([
79
- (0, class_validator_1.IsDate)(),
80
- (0, class_validator_1.IsOptional)(),
75
+ IsDate(),
76
+ IsOptional(),
81
77
  __metadata("design:type", Date)
82
78
  ], VehicleUnitDeviceDto.prototype, "updatedAt", void 0);
@@ -1,8 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UpdateVehicleUnitDto = void 0;
4
- const mapped_types_1 = require("@nestjs/mapped-types");
5
- const create_vehicle_unit_dto_1 = require("./create-vehicle-unit.dto");
6
- class UpdateVehicleUnitDto extends (0, mapped_types_1.PartialType)(create_vehicle_unit_dto_1.CreateVehicleUnitDto) {
1
+ import { PartialType } from '@nestjs/mapped-types';
2
+ import { CreateVehicleUnitDto } from './create-vehicle-unit.dto';
3
+ export class UpdateVehicleUnitDto extends PartialType(CreateVehicleUnitDto) {
7
4
  }
8
- exports.UpdateVehicleUnitDto = UpdateVehicleUnitDto;
@@ -1,7 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AmbulanceVehicleDto = void 0;
4
- const base_ambulance_vehicle_dto_1 = require("./base-ambulance-vehicle.dto");
5
- class AmbulanceVehicleDto extends base_ambulance_vehicle_dto_1.BaseAmbulanceVehicleDto {
1
+ import { BaseAmbulanceVehicleDto } from './base-ambulance-vehicle.dto';
2
+ export class AmbulanceVehicleDto extends BaseAmbulanceVehicleDto {
6
3
  }
7
- exports.AmbulanceVehicleDto = AmbulanceVehicleDto;
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
2
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
3
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -8,19 +7,16 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
8
7
  var __metadata = (this && this.__metadata) || function (k, v) {
9
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
9
  };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.BaseAmbulanceVehicleDto = void 0;
13
- const class_validator_1 = require("class-validator");
14
- const ambulance_vehicle_type_enum_1 = require("../../../../enums/vehicle-unit/vehicle-type/ambulance-vehicle-type.enum");
15
- const base_vehicle_unit_dto_1 = require("../../base-vehicle-unit.dto");
16
- class BaseAmbulanceVehicleDto extends base_vehicle_unit_dto_1.BaseVehicleUnitDto {
10
+ import { IsEnum, IsOptional } from 'class-validator';
11
+ import { AmbulanceVehicleType } from '../../../../enums/vehicle-unit/vehicle-type/ambulance-vehicle-type.enum';
12
+ import { BaseVehicleUnitDto } from '../../base-vehicle-unit.dto';
13
+ export class BaseAmbulanceVehicleDto extends BaseVehicleUnitDto {
17
14
  }
18
- exports.BaseAmbulanceVehicleDto = BaseAmbulanceVehicleDto;
19
15
  __decorate([
20
- (0, class_validator_1.IsEnum)(ambulance_vehicle_type_enum_1.AmbulanceVehicleType),
16
+ IsEnum(AmbulanceVehicleType),
21
17
  __metadata("design:type", String)
22
18
  ], BaseAmbulanceVehicleDto.prototype, "ambulanceType", void 0);
23
19
  __decorate([
24
- (0, class_validator_1.IsOptional)(),
20
+ IsOptional(),
25
21
  __metadata("design:type", Object)
26
22
  ], BaseAmbulanceVehicleDto.prototype, "equipment", void 0);
@@ -1,8 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CreateAmbulanceVehicleDto = void 0;
4
- const mapped_types_1 = require("@nestjs/mapped-types");
5
- const base_ambulance_vehicle_dto_1 = require("./base-ambulance-vehicle.dto");
6
- class CreateAmbulanceVehicleDto extends (0, mapped_types_1.OmitType)(base_ambulance_vehicle_dto_1.BaseAmbulanceVehicleDto, ['id', 'createdAt', 'updatedAt']) {
1
+ import { OmitType } from '@nestjs/mapped-types';
2
+ import { BaseAmbulanceVehicleDto } from './base-ambulance-vehicle.dto';
3
+ export class CreateAmbulanceVehicleDto extends OmitType(BaseAmbulanceVehicleDto, ['id', 'createdAt', 'updatedAt']) {
7
4
  }
8
- exports.CreateAmbulanceVehicleDto = CreateAmbulanceVehicleDto;
@@ -1,8 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UpdateAmbulanceVehicleDto = void 0;
4
- const mapped_types_1 = require("@nestjs/mapped-types");
5
- const create_ambulance_vehicle_dto_1 = require("./create-ambulance-vehicle.dto");
6
- class UpdateAmbulanceVehicleDto extends (0, mapped_types_1.PartialType)(create_ambulance_vehicle_dto_1.CreateAmbulanceVehicleDto) {
1
+ import { PartialType } from '@nestjs/mapped-types';
2
+ import { CreateAmbulanceVehicleDto } from './create-ambulance-vehicle.dto';
3
+ export class UpdateAmbulanceVehicleDto extends PartialType(CreateAmbulanceVehicleDto) {
7
4
  }
8
- exports.UpdateAmbulanceVehicleDto = UpdateAmbulanceVehicleDto;
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
2
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
3
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -8,19 +7,16 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
8
7
  var __metadata = (this && this.__metadata) || function (k, v) {
9
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
9
  };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.BaseFireVehicleDto = void 0;
13
- const class_validator_1 = require("class-validator");
14
- const fire_vehicle_type_enum_1 = require("../../../../enums/vehicle-unit/vehicle-type/fire-vehicle-type.enum");
15
- const base_vehicle_unit_dto_1 = require("../../base-vehicle-unit.dto");
16
- class BaseFireVehicleDto extends base_vehicle_unit_dto_1.BaseVehicleUnitDto {
10
+ import { IsEnum, IsOptional } from 'class-validator';
11
+ import { FireVehicleType } from '../../../../enums/vehicle-unit/vehicle-type/fire-vehicle-type.enum';
12
+ import { BaseVehicleUnitDto } from '../../base-vehicle-unit.dto';
13
+ export class BaseFireVehicleDto extends BaseVehicleUnitDto {
17
14
  }
18
- exports.BaseFireVehicleDto = BaseFireVehicleDto;
19
15
  __decorate([
20
- (0, class_validator_1.IsEnum)(fire_vehicle_type_enum_1.FireVehicleType),
16
+ IsEnum(FireVehicleType),
21
17
  __metadata("design:type", String)
22
18
  ], BaseFireVehicleDto.prototype, "fireType", void 0);
23
19
  __decorate([
24
- (0, class_validator_1.IsOptional)(),
20
+ IsOptional(),
25
21
  __metadata("design:type", Object)
26
22
  ], BaseFireVehicleDto.prototype, "equipment", void 0);
@@ -1,8 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CreateFireVehicleDto = void 0;
4
- const mapped_types_1 = require("@nestjs/mapped-types");
5
- const base_fire_vehicle_dto_1 = require("./base-fire-vehicle.dto");
6
- class CreateFireVehicleDto extends (0, mapped_types_1.OmitType)(base_fire_vehicle_dto_1.BaseFireVehicleDto, ['id', 'createdAt', 'updatedAt']) {
1
+ import { OmitType } from '@nestjs/mapped-types';
2
+ import { BaseFireVehicleDto } from './base-fire-vehicle.dto';
3
+ export class CreateFireVehicleDto extends OmitType(BaseFireVehicleDto, ['id', 'createdAt', 'updatedAt']) {
7
4
  }
8
- exports.CreateFireVehicleDto = CreateFireVehicleDto;