grm-shared-library 1.0.122 → 1.0.124

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.
@@ -6,6 +6,7 @@ export declare class TeamUnitCrewDto {
6
6
  role: string;
7
7
  status: PersonUnitStatus;
8
8
  teamUnitId: number;
9
+ attributes?: Record<string, any>;
9
10
  createdAt?: string;
10
11
  updatedAt?: string;
11
12
  }
@@ -39,6 +39,10 @@ __decorate([
39
39
  (0, class_validator_1.IsNumber)(),
40
40
  __metadata("design:type", Number)
41
41
  ], TeamUnitCrewDto.prototype, "teamUnitId", void 0);
42
+ __decorate([
43
+ (0, class_validator_1.IsOptional)(),
44
+ __metadata("design:type", Object)
45
+ ], TeamUnitCrewDto.prototype, "attributes", void 0);
42
46
  __decorate([
43
47
  (0, class_validator_1.IsDate)(),
44
48
  (0, class_validator_1.IsOptional)(),
@@ -1,5 +1,8 @@
1
1
  import { CreateVehicleUnitCrewDto } from './create-vehicle-unit-crew.dto';
2
+ import { VehicleUnitType } from '../../../enums/vehicle-unit/vehicle-unit-type.enum';
2
3
  declare const UpdateVehicleUnitCrewDto_base: import("@nestjs/mapped-types").MappedType<Partial<CreateVehicleUnitCrewDto>>;
3
4
  export declare class UpdateVehicleUnitCrewDto extends UpdateVehicleUnitCrewDto_base {
5
+ role?: string;
6
+ vehicleType?: VehicleUnitType;
4
7
  }
5
8
  export {};
@@ -1,8 +1,31 @@
1
1
  "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
2
11
  Object.defineProperty(exports, "__esModule", { value: true });
3
12
  exports.UpdateVehicleUnitCrewDto = void 0;
4
13
  const mapped_types_1 = require("@nestjs/mapped-types");
5
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");
6
18
  class UpdateVehicleUnitCrewDto extends (0, mapped_types_1.PartialType)(create_vehicle_unit_crew_dto_1.CreateVehicleUnitCrewDto) {
7
19
  }
8
20
  exports.UpdateVehicleUnitCrewDto = UpdateVehicleUnitCrewDto;
21
+ __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' }),
25
+ __metadata("design:type", String)
26
+ ], UpdateVehicleUnitCrewDto.prototype, "role", void 0);
27
+ __decorate([
28
+ (0, class_validator_1.IsEnum)(vehicle_unit_type_enum_1.VehicleUnitType),
29
+ (0, class_validator_1.IsOptional)(),
30
+ __metadata("design:type", String)
31
+ ], UpdateVehicleUnitCrewDto.prototype, "vehicleType", void 0);
@@ -8,6 +8,7 @@ export declare class VehicleUnitCrewDto {
8
8
  status: PersonUnitStatus;
9
9
  vehicleUnitId: number;
10
10
  vehicleType?: VehicleUnitType;
11
+ attributes?: Record<string, any>;
11
12
  createdAt?: Date;
12
13
  updatedAt?: Date;
13
14
  }
@@ -47,6 +47,10 @@ __decorate([
47
47
  (0, class_validator_1.IsOptional)(),
48
48
  __metadata("design:type", String)
49
49
  ], VehicleUnitCrewDto.prototype, "vehicleType", void 0);
50
+ __decorate([
51
+ (0, class_validator_1.IsOptional)(),
52
+ __metadata("design:type", Object)
53
+ ], VehicleUnitCrewDto.prototype, "attributes", void 0);
50
54
  __decorate([
51
55
  (0, class_validator_1.IsDate)(),
52
56
  (0, class_validator_1.IsOptional)(),
@@ -11,7 +11,7 @@ export declare class VehicleUnitDeviceDto {
11
11
  model?: string;
12
12
  contact?: string;
13
13
  category?: string;
14
- attributes?: Record<string, string>;
14
+ attributes?: Record<string, any>;
15
15
  createdAt?: Date;
16
16
  updatedAt?: Date;
17
17
  }
@@ -9,5 +9,6 @@ export interface TeamUnitCrew {
9
9
  teamUnitId: number;
10
10
  createdAt: string;
11
11
  updatedAt: string;
12
+ attributes?: Record<string, any>;
12
13
  teamUnit?: TeamUnit;
13
14
  }
@@ -9,6 +9,7 @@ export interface VehicleUnitCrew {
9
9
  status: PersonUnitStatus;
10
10
  vehicleUnitId: number;
11
11
  vehicleType?: VehicleUnitType;
12
+ attributes?: Record<string, any>;
12
13
  createdAt: Date;
13
14
  updatedAt: Date;
14
15
  vehicleUnit?: VehicleUnit;
@@ -11,7 +11,7 @@ export interface VehicleUnitDevice {
11
11
  model?: string;
12
12
  contact?: string;
13
13
  category?: string;
14
- attributes?: Record<string, string>;
14
+ attributes?: Record<string, any>;
15
15
  createdAt?: Date;
16
16
  updatedAt?: Date;
17
17
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "grm-shared-library",
3
- "version": "1.0.122",
3
+ "version": "1.0.124",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [