@escapenavigator/types 1.10.131 → 1.10.133
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/certificate-sale/certificate-sale.ro.d.ts +8 -0
- package/dist/certificate-sale/certificate-sale.ro.js +4 -0
- package/dist/promocode/create-promocode.dto.js +10 -2
- package/dist/questroom/lounge-questroom.d.ts +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/user/task/user-task-dashboard-counters.ro.d.ts +26 -0
- package/dist/user/task/user-task-dashboard-counters.ro.js +22 -0
- package/package.json +2 -2
|
@@ -9,6 +9,14 @@ declare class Order extends RO {
|
|
|
9
9
|
}
|
|
10
10
|
declare class Promocodes extends RO {
|
|
11
11
|
amount: number;
|
|
12
|
+
/**
|
|
13
|
+
* Бонус к балансу сертификата от промокода в режиме
|
|
14
|
+
* `certificateMode === 'bonus'` (в минимальных единицах валюты).
|
|
15
|
+
* Не уменьшает цену покупки, а расширяет расходуемый баланс:
|
|
16
|
+
* `balance = nominal + sum(bonus) - usedAmount`.
|
|
17
|
+
* Для DISCOUNT-режима и легаси-записей = 0.
|
|
18
|
+
*/
|
|
19
|
+
bonus: number;
|
|
12
20
|
code: string;
|
|
13
21
|
userId: number;
|
|
14
22
|
canUseWithOtherPromocodes: boolean;
|
|
@@ -33,6 +33,10 @@ __decorate([
|
|
|
33
33
|
(0, class_transformer_1.Expose)(),
|
|
34
34
|
__metadata("design:type", Number)
|
|
35
35
|
], Promocodes.prototype, "amount", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, class_transformer_1.Expose)(),
|
|
38
|
+
__metadata("design:type", Number)
|
|
39
|
+
], Promocodes.prototype, "bonus", void 0);
|
|
36
40
|
__decorate([
|
|
37
41
|
(0, class_transformer_1.Expose)(),
|
|
38
42
|
__metadata("design:type", String)
|
|
@@ -111,8 +111,16 @@ __decorate([
|
|
|
111
111
|
__metadata("design:type", String)
|
|
112
112
|
], CreatePromocodeDto.prototype, "type", void 0);
|
|
113
113
|
__decorate([
|
|
114
|
-
(0, class_transformer_1.Transform)(({ obj, value }) =>
|
|
115
|
-
|
|
114
|
+
(0, class_transformer_1.Transform)(({ obj, value }) => {
|
|
115
|
+
if (obj.type === promocode_type_enum_1.PromocodeTypeEnum.PROMOTIONAL)
|
|
116
|
+
return 0;
|
|
117
|
+
if (obj.availableForCertificates && !obj.availableForBookings)
|
|
118
|
+
return 0;
|
|
119
|
+
return value;
|
|
120
|
+
}),
|
|
121
|
+
(0, class_validator_1.ValidateIf)((o) => o.type !== promocode_type_enum_1.PromocodeTypeEnum.PROMOTIONAL &&
|
|
122
|
+
o.kind !== promocode_kind_enum_1.PromocodeKindEnum.CROSS_SALE &&
|
|
123
|
+
!(o.availableForCertificates && !o.availableForBookings)),
|
|
116
124
|
(0, class_validator_1.IsPositive)(),
|
|
117
125
|
(0, class_transformer_1.Expose)(),
|
|
118
126
|
__metadata("design:type", Number)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { QuestroomTypeEnum } from './enum/questroom-type.enum';
|
|
2
1
|
import { CreateQuestroomDto } from './create-questroom.dto';
|
|
2
|
+
import { QuestroomTypeEnum } from './enum/questroom-type.enum';
|
|
3
3
|
export declare const isLoungeQuestroomType: (type?: QuestroomTypeEnum | string | null) => boolean;
|
|
4
4
|
/** Поля escape-квеста обязательны только для обычных комнат (не лаунж, не closed). */
|
|
5
5
|
export declare const isClassicQuestroomFieldsRequired: (o: {
|