@escapenavigator/types 1.6.93 → 1.6.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.
- package/dist/openapi/orders/openapi-order-for-order-service.ro.d.ts +2 -1
- package/dist/openapi/orders/openapi-order-for-order-service.ro.js +6 -2
- package/dist/order/waivers/order-to-sign.ro.d.ts +2 -0
- package/dist/order/waivers/order-to-sign.ro.js +8 -0
- package/dist/order/waivers/sign-order.dto.d.ts +2 -2
- package/dist/order/waivers/sign-order.dto.js +6 -6
- package/dist/shared/ins-minor.js +1 -2
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Participant } from '../../order/order.ro';
|
|
1
|
+
import { Participant } from '../../order/waivers/order-to-sign.ro';
|
|
2
2
|
import { OpenapiOrderRO } from './openapi-order.ro';
|
|
3
3
|
export declare class OpenapiOrderForOrderServiceRO extends OpenapiOrderRO {
|
|
4
4
|
participants: Participant[];
|
|
5
|
+
needWaiver: boolean;
|
|
5
6
|
}
|
|
@@ -12,13 +12,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.OpenapiOrderForOrderServiceRO = void 0;
|
|
13
13
|
/* eslint-disable max-classes-per-file */
|
|
14
14
|
const class_transformer_1 = require("class-transformer");
|
|
15
|
-
const
|
|
15
|
+
const order_to_sign_ro_1 = require("../../order/waivers/order-to-sign.ro");
|
|
16
16
|
const openapi_order_ro_1 = require("./openapi-order.ro");
|
|
17
17
|
class OpenapiOrderForOrderServiceRO extends openapi_order_ro_1.OpenapiOrderRO {
|
|
18
18
|
}
|
|
19
19
|
__decorate([
|
|
20
20
|
(0, class_transformer_1.Expose)(),
|
|
21
|
-
(0, class_transformer_1.Type)(() =>
|
|
21
|
+
(0, class_transformer_1.Type)(() => order_to_sign_ro_1.Participant),
|
|
22
22
|
__metadata("design:type", Array)
|
|
23
23
|
], OpenapiOrderForOrderServiceRO.prototype, "participants", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, class_transformer_1.Expose)(),
|
|
26
|
+
__metadata("design:type", Boolean)
|
|
27
|
+
], OpenapiOrderForOrderServiceRO.prototype, "needWaiver", void 0);
|
|
24
28
|
exports.OpenapiOrderForOrderServiceRO = OpenapiOrderForOrderServiceRO;
|
|
@@ -7,6 +7,7 @@ declare class Client {
|
|
|
7
7
|
phone: string;
|
|
8
8
|
}
|
|
9
9
|
export declare class Participant {
|
|
10
|
+
id: number;
|
|
10
11
|
name: string;
|
|
11
12
|
surname: string;
|
|
12
13
|
email: string;
|
|
@@ -16,6 +17,7 @@ export declare class OrderForSignRO extends QuestroomRow {
|
|
|
16
17
|
profileId: number;
|
|
17
18
|
language?: Languages;
|
|
18
19
|
canceledWithFine: boolean;
|
|
20
|
+
needWaiver: boolean;
|
|
19
21
|
players: number;
|
|
20
22
|
utcDate: string;
|
|
21
23
|
participants: Participant[];
|
|
@@ -34,6 +34,10 @@ __decorate([
|
|
|
34
34
|
], Client.prototype, "phone", void 0);
|
|
35
35
|
class Participant {
|
|
36
36
|
}
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, class_transformer_1.Expose)(),
|
|
39
|
+
__metadata("design:type", Number)
|
|
40
|
+
], Participant.prototype, "id", void 0);
|
|
37
41
|
__decorate([
|
|
38
42
|
(0, class_transformer_1.Expose)(),
|
|
39
43
|
__metadata("design:type", String)
|
|
@@ -66,6 +70,10 @@ __decorate([
|
|
|
66
70
|
(0, class_transformer_1.Expose)(),
|
|
67
71
|
__metadata("design:type", Boolean)
|
|
68
72
|
], OrderForSignRO.prototype, "canceledWithFine", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, class_transformer_1.Expose)(),
|
|
75
|
+
__metadata("design:type", Boolean)
|
|
76
|
+
], OrderForSignRO.prototype, "needWaiver", void 0);
|
|
69
77
|
__decorate([
|
|
70
78
|
(0, class_transformer_1.Expose)(),
|
|
71
79
|
__metadata("design:type", Number)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare class
|
|
1
|
+
declare class Minor {
|
|
2
2
|
name: string;
|
|
3
3
|
surname: string;
|
|
4
4
|
birthday: string;
|
|
@@ -14,6 +14,6 @@ export declare class SignOrderDTO {
|
|
|
14
14
|
surname: string;
|
|
15
15
|
email: string;
|
|
16
16
|
phone: string;
|
|
17
|
-
|
|
17
|
+
childs: Minor[];
|
|
18
18
|
}
|
|
19
19
|
export {};
|
|
@@ -16,24 +16,24 @@ const class_validator_1 = require("class-validator");
|
|
|
16
16
|
const ins_minor_1 = require("../../shared/ins-minor");
|
|
17
17
|
const is_not_blank_1 = require("../../shared/is-not-blank");
|
|
18
18
|
const is_uniq_email_1 = require("../../shared/is-uniq-email");
|
|
19
|
-
class
|
|
19
|
+
class Minor {
|
|
20
20
|
}
|
|
21
21
|
__decorate([
|
|
22
22
|
(0, is_not_blank_1.IsNotBlank)(),
|
|
23
23
|
(0, class_transformer_1.Expose)(),
|
|
24
24
|
__metadata("design:type", String)
|
|
25
|
-
],
|
|
25
|
+
], Minor.prototype, "name", void 0);
|
|
26
26
|
__decorate([
|
|
27
27
|
(0, is_not_blank_1.IsNotBlank)(),
|
|
28
28
|
(0, class_transformer_1.Expose)(),
|
|
29
29
|
__metadata("design:type", String)
|
|
30
|
-
],
|
|
30
|
+
], Minor.prototype, "surname", void 0);
|
|
31
31
|
__decorate([
|
|
32
32
|
(0, is_not_blank_1.IsNotBlank)(),
|
|
33
33
|
(0, ins_minor_1.IsMinor)(),
|
|
34
34
|
(0, class_transformer_1.Expose)(),
|
|
35
35
|
__metadata("design:type", String)
|
|
36
|
-
],
|
|
36
|
+
], Minor.prototype, "birthday", void 0);
|
|
37
37
|
class SignOrderDTO {
|
|
38
38
|
}
|
|
39
39
|
__decorate([
|
|
@@ -93,7 +93,7 @@ __decorate([
|
|
|
93
93
|
(0, class_validator_1.IsArray)(),
|
|
94
94
|
(0, class_transformer_1.Expose)(),
|
|
95
95
|
(0, class_validator_1.ValidateNested)(),
|
|
96
|
-
(0, class_transformer_1.Type)(() =>
|
|
96
|
+
(0, class_transformer_1.Type)(() => Minor),
|
|
97
97
|
__metadata("design:type", Array)
|
|
98
|
-
], SignOrderDTO.prototype, "
|
|
98
|
+
], SignOrderDTO.prototype, "childs", void 0);
|
|
99
99
|
exports.SignOrderDTO = SignOrderDTO;
|
package/dist/shared/ins-minor.js
CHANGED
|
@@ -22,8 +22,7 @@ function IsMinor(validationOptions) {
|
|
|
22
22
|
const age = today.getFullYear() - birthday.getFullYear();
|
|
23
23
|
const monthDifference = today.getMonth() - birthday.getMonth();
|
|
24
24
|
const dayDifference = today.getDate() - birthday.getDate();
|
|
25
|
-
if (monthDifference < 0 ||
|
|
26
|
-
(monthDifference === 0 && dayDifference < 0)) {
|
|
25
|
+
if (monthDifference < 0 || (monthDifference === 0 && dayDifference < 0)) {
|
|
27
26
|
return age - 1 >= 18;
|
|
28
27
|
}
|
|
29
28
|
return age < 18;
|