@escapenavigator/types 1.9.4 → 1.9.6

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.
@@ -64,7 +64,7 @@ __decorate([
64
64
  var _a;
65
65
  if (typeof value === 'object')
66
66
  return value.coordinates;
67
- return ((_a = value === null || value === void 0 ? void 0 : value.slice(1, -1)) === null || _a === void 0 ? void 0 : _a.split(',')) || [];
67
+ return (_a = (value ? `${value}` : '').slice(1, -1)) === null || _a === void 0 ? void 0 : _a.split(',');
68
68
  }),
69
69
  __metadata("design:type", Array)
70
70
  ], AgregatorCityRO.prototype, "coordinates", void 0);
@@ -78,6 +78,7 @@ __decorate([
78
78
  ], AgregatorCityRO.prototype, "reviewsCount", void 0);
79
79
  __decorate([
80
80
  (0, class_transformer_1.Expose)(),
81
+ (0, class_transformer_1.Transform)(({ value }) => (value ? +(value / 100).toFixed(2) : 0)),
81
82
  __metadata("design:type", Number)
82
83
  ], AgregatorCityRO.prototype, "rate", void 0);
83
84
  __decorate([
@@ -43,6 +43,7 @@ __decorate([
43
43
  ], AgregatorProfile.prototype, "logo", void 0);
44
44
  __decorate([
45
45
  (0, class_transformer_1.Expose)(),
46
+ (0, class_transformer_1.Transform)(({ value }) => (value ? +(value / 100).toFixed(2) : 0)),
46
47
  __metadata("design:type", Number)
47
48
  ], AgregatorProfile.prototype, "rate", void 0);
48
49
  __decorate([
@@ -1,4 +1,8 @@
1
1
  import { EmotionRO } from '../review/emotions/emotion.ro';
2
+ declare class Review {
3
+ rating: number;
4
+ questroomId: number;
5
+ }
2
6
  export declare class PlayerRO {
3
7
  id: number;
4
8
  fullName: string;
@@ -7,6 +11,8 @@ export declare class PlayerRO {
7
11
  email: string;
8
12
  favorites: number[];
9
13
  emotions: EmotionRO[];
14
+ reviews?: Review[];
10
15
  reviewsCount?: number;
11
16
  ordersCount?: number;
12
17
  }
18
+ export {};
@@ -10,8 +10,19 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.PlayerRO = void 0;
13
+ /* eslint-disable max-classes-per-file */
13
14
  const class_transformer_1 = require("class-transformer");
14
15
  const emotion_ro_1 = require("../review/emotions/emotion.ro");
16
+ class Review {
17
+ }
18
+ __decorate([
19
+ (0, class_transformer_1.Expose)(),
20
+ __metadata("design:type", Number)
21
+ ], Review.prototype, "rating", void 0);
22
+ __decorate([
23
+ (0, class_transformer_1.Expose)(),
24
+ __metadata("design:type", Number)
25
+ ], Review.prototype, "questroomId", void 0);
15
26
  class PlayerRO {
16
27
  }
17
28
  __decorate([
@@ -43,6 +54,11 @@ __decorate([
43
54
  (0, class_transformer_1.Type)(() => emotion_ro_1.EmotionRO),
44
55
  __metadata("design:type", Array)
45
56
  ], PlayerRO.prototype, "emotions", void 0);
57
+ __decorate([
58
+ (0, class_transformer_1.Expose)(),
59
+ (0, class_transformer_1.Type)(() => Review),
60
+ __metadata("design:type", Array)
61
+ ], PlayerRO.prototype, "reviews", void 0);
46
62
  __decorate([
47
63
  (0, class_transformer_1.Expose)(),
48
64
  __metadata("design:type", Number)