@escapenavigator/types 1.6.93 → 1.6.95
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/client/client-form.dto.d.ts +4 -1
- package/dist/client/client-form.dto.js +22 -9
- package/dist/client/client.ro.d.ts +3 -0
- package/dist/client/client.ro.js +9 -0
- package/dist/client/create-client-from-widget.dto.d.ts +1 -0
- package/dist/client/create-client-from-widget.dto.js +5 -0
- package/dist/client/emun/client-type.enum.d.ts +4 -0
- package/dist/client/emun/client-type.enum.js +8 -0
- package/dist/openapi/orders/openapi-order-for-order-service.ro.d.ts +15 -2
- package/dist/openapi/orders/openapi-order-for-order-service.ro.js +40 -2
- package/dist/order/order.ro.d.ts +11 -8
- package/dist/order/order.ro.js +35 -29
- package/dist/order/waivers/order-participants.ro.d.ts +21 -0
- package/dist/order/waivers/order-participants.ro.js +74 -0
- package/dist/order/waivers/order-to-sign.ro.d.ts +10 -2
- package/dist/order/waivers/order-to-sign.ro.js +26 -3
- package/dist/order/waivers/sign-order.dto.d.ts +5 -2
- package/dist/order/waivers/sign-order.dto.js +26 -6
- package/dist/shared/ins-minor.js +2 -3
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/widget/enum/widget-booking-filed.enum.d.ts +2 -0
- package/dist/widget/enum/widget-booking-filed.enum.js +2 -0
- package/package.json +3 -3
- package/dist/order/update-participants.dto.d.ts +0 -10
- package/dist/order/update-participants.dto.js +0 -50
|
@@ -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([
|
|
@@ -69,31 +69,51 @@ __decorate([
|
|
|
69
69
|
__metadata("design:type", Boolean)
|
|
70
70
|
], SignOrderDTO.prototype, "isParticipant", void 0);
|
|
71
71
|
__decorate([
|
|
72
|
+
(0, class_validator_1.IsOptional)(),
|
|
73
|
+
(0, class_transformer_1.Expose)(),
|
|
74
|
+
__metadata("design:type", Number)
|
|
75
|
+
], SignOrderDTO.prototype, "existingParticipantId", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, class_validator_1.ValidateIf)(({ existingParticipantId }) => !existingParticipantId),
|
|
72
78
|
(0, is_not_blank_1.IsNotBlank)(),
|
|
73
79
|
(0, class_transformer_1.Expose)(),
|
|
74
80
|
__metadata("design:type", String)
|
|
75
81
|
], SignOrderDTO.prototype, "name", void 0);
|
|
76
82
|
__decorate([
|
|
83
|
+
(0, class_validator_1.ValidateIf)(({ existingParticipantId }) => !existingParticipantId),
|
|
77
84
|
(0, is_not_blank_1.IsNotBlank)(),
|
|
78
85
|
(0, class_transformer_1.Expose)(),
|
|
79
86
|
__metadata("design:type", String)
|
|
80
87
|
], SignOrderDTO.prototype, "surname", void 0);
|
|
81
88
|
__decorate([
|
|
89
|
+
(0, class_validator_1.IsBoolean)(),
|
|
90
|
+
(0, class_transformer_1.Transform)(({ value }) => value !== null && value !== void 0 ? value : false),
|
|
91
|
+
(0, class_transformer_1.Expose)(),
|
|
92
|
+
__metadata("design:type", Boolean)
|
|
93
|
+
], SignOrderDTO.prototype, "sendAds", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
(0, class_validator_1.ValidateIf)(({ existingParticipantId }) => !existingParticipantId),
|
|
82
96
|
(0, class_validator_1.IsEmail)(),
|
|
83
97
|
(0, is_uniq_email_1.IsEmailUnique)(),
|
|
84
98
|
(0, class_transformer_1.Expose)(),
|
|
85
99
|
__metadata("design:type", String)
|
|
86
100
|
], SignOrderDTO.prototype, "email", void 0);
|
|
87
101
|
__decorate([
|
|
102
|
+
(0, class_validator_1.ValidateIf)(({ existingParticipantId }) => !existingParticipantId),
|
|
88
103
|
(0, is_not_blank_1.IsNotBlank)(),
|
|
89
104
|
(0, class_transformer_1.Expose)(),
|
|
90
105
|
__metadata("design:type", String)
|
|
91
106
|
], SignOrderDTO.prototype, "phone", void 0);
|
|
107
|
+
__decorate([
|
|
108
|
+
(0, class_validator_1.IsArray)(),
|
|
109
|
+
(0, class_transformer_1.Expose)(),
|
|
110
|
+
__metadata("design:type", Array)
|
|
111
|
+
], SignOrderDTO.prototype, "existingChilds", void 0);
|
|
92
112
|
__decorate([
|
|
93
113
|
(0, class_validator_1.IsArray)(),
|
|
94
114
|
(0, class_transformer_1.Expose)(),
|
|
95
115
|
(0, class_validator_1.ValidateNested)(),
|
|
96
|
-
(0, class_transformer_1.Type)(() =>
|
|
116
|
+
(0, class_transformer_1.Type)(() => Minor),
|
|
97
117
|
__metadata("design:type", Array)
|
|
98
|
-
], SignOrderDTO.prototype, "
|
|
118
|
+
], SignOrderDTO.prototype, "childs", void 0);
|
|
99
119
|
exports.SignOrderDTO = SignOrderDTO;
|
package/dist/shared/ins-minor.js
CHANGED
|
@@ -22,9 +22,8 @@ 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
|
-
|
|
27
|
-
return age - 1 >= 18;
|
|
25
|
+
if (monthDifference < 0 || (monthDifference === 0 && dayDifference < 0)) {
|
|
26
|
+
return age - 1 < 18;
|
|
28
27
|
}
|
|
29
28
|
return age < 18;
|
|
30
29
|
},
|