@escapenavigator/types 2.0.44 → 2.0.46
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/forms/widget/widget-players-form.dto.d.ts +2 -0
- package/dist/forms/widget/widget-players-form.dto.js +5 -0
- package/dist/lead/enums/lead-widget-placement.enum.d.ts +13 -0
- package/dist/lead/enums/lead-widget-placement.enum.js +17 -0
- package/dist/lead/lead-form-field.type.d.ts +4 -4
- package/dist/lead/lead-widget-display.ro.d.ts +5 -0
- package/dist/lead/lead-widget-display.ro.js +21 -0
- package/dist/lead/lead-widget-placement.type.d.ts +12 -0
- package/dist/lead/lead-widget-placement.type.js +2 -0
- package/dist/lead/update-lead-form.dto.js +1 -1
- package/dist/lead/update-lead-widget-display.dto.d.ts +16 -0
- package/dist/lead/update-lead-widget-display.dto.js +74 -0
- package/dist/openapi/orders/openapi-create-preorder.dto.d.ts +6 -0
- package/dist/openapi/orders/openapi-create-preorder.dto.js +7 -0
- package/dist/openapi/orders/openapi-order.ro.d.ts +17 -0
- package/dist/openapi/orders/openapi-order.ro.js +21 -0
- package/dist/openapi/orders/openapi-update-order-players.dto.d.ts +5 -0
- package/dist/openapi/orders/openapi-update-order-players.dto.js +7 -0
- package/dist/openapi/orders/openapi-update-order.dto.d.ts +5 -0
- package/dist/openapi/orders/openapi-update-order.dto.js +7 -0
- package/dist/openapi/slots/openapi-slot-tariff.ro.d.ts +1 -0
- package/dist/openapi/slots/openapi-slot-tariff.ro.js +9 -0
- package/dist/openapi/slots/openapi-slot-variation.ro.d.ts +6 -0
- package/dist/openapi/slots/openapi-slot-variation.ro.js +46 -0
- package/dist/openapi/slots/openapi-upcoming-schedule.dto.d.ts +5 -0
- package/dist/openapi/slots/openapi-upcoming-schedule.dto.js +53 -0
- package/dist/openapi/slots/openapi-upcoming-slots.ro.d.ts +4 -0
- package/dist/openapi/slots/openapi-upcoming-slots.ro.js +29 -0
- package/dist/openapi/widget/openapi-widget-info.ro.d.ts +7 -0
- package/dist/openapi/widget/openapi-widget-info.ro.js +8 -0
- package/dist/order/create-order.dto.d.ts +6 -0
- package/dist/order/create-order.dto.js +7 -0
- package/dist/order/order.ro.d.ts +12 -0
- package/dist/order/order.ro.js +21 -0
- package/dist/order/update-order-slot.dto.d.ts +6 -0
- package/dist/order/update-order-slot.dto.js +7 -0
- package/dist/order/update-players.dto.d.ts +6 -0
- package/dist/order/update-players.dto.js +7 -0
- package/dist/profile/widget-customization/update-widget-customization.dto.d.ts +1 -0
- package/dist/profile/widget-customization/update-widget-customization.dto.js +7 -0
- package/dist/profile/widget-customization/widget-customization.ro.d.ts +2 -0
- package/dist/profile/widget-customization/widget-customization.ro.js +4 -0
- package/dist/tariff/create-tariff.dto.d.ts +20 -0
- package/dist/tariff/create-tariff.dto.js +34 -0
- package/dist/tariff/enum/tariff-reduced-rate-mode.enum.d.ts +12 -0
- package/dist/tariff/enum/tariff-reduced-rate-mode.enum.js +16 -0
- package/dist/tariff/tariff-light.ro.d.ts +11 -4
- package/dist/tariff/tariff-light.ro.js +23 -4
- package/dist/tariff/tariff.ro.d.ts +1 -0
- package/dist/tariff/tariff.ro.js +4 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -9,6 +9,8 @@ export declare class WidgetPlayersFormDto {
|
|
|
9
9
|
language: Languages;
|
|
10
10
|
players: number;
|
|
11
11
|
children: number;
|
|
12
|
+
/** Сколько мест гость выбрал по льготной ставке тарифа. */
|
|
13
|
+
reducedPlayers?: number;
|
|
12
14
|
/**
|
|
13
15
|
* «Определимся на месте» (playersSelectMode=OPTIONAL/HIDDEN): состав не
|
|
14
16
|
* определён, `players` засеян минимумом квеста, дети скрыты/сброшены.
|
|
@@ -50,6 +50,11 @@ __decorate([
|
|
|
50
50
|
(0, class_transformer_1.Expose)(),
|
|
51
51
|
__metadata("design:type", Number)
|
|
52
52
|
], WidgetPlayersFormDto.prototype, "children", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, class_validator_1.IsOptional)(),
|
|
55
|
+
(0, class_transformer_1.Expose)(),
|
|
56
|
+
__metadata("design:type", Number)
|
|
57
|
+
], WidgetPlayersFormDto.prototype, "reducedPlayers", void 0);
|
|
53
58
|
__decorate([
|
|
54
59
|
(0, class_validator_1.IsOptional)(),
|
|
55
60
|
(0, class_transformer_1.Expose)(),
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Где в виджете бронирования показывается заявка. Настройка одна на все
|
|
3
|
+
* виджеты расписания профиля: иначе при десяти эмбедах пришлось бы
|
|
4
|
+
* повторять одно и то же.
|
|
5
|
+
*/
|
|
6
|
+
export declare enum LeadWidgetPlacementEnum {
|
|
7
|
+
/** Блок под слотами: «Не нашли подходящее время?». */
|
|
8
|
+
BELOW_SCHEDULE = "below-schedule",
|
|
9
|
+
/** Клик по занятому слоту. */
|
|
10
|
+
BUSY_SLOT = "busy-slot",
|
|
11
|
+
/** День без свободных слотов. */
|
|
12
|
+
EMPTY_DAY = "empty-day"
|
|
13
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LeadWidgetPlacementEnum = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Где в виджете бронирования показывается заявка. Настройка одна на все
|
|
6
|
+
* виджеты расписания профиля: иначе при десяти эмбедах пришлось бы
|
|
7
|
+
* повторять одно и то же.
|
|
8
|
+
*/
|
|
9
|
+
var LeadWidgetPlacementEnum;
|
|
10
|
+
(function (LeadWidgetPlacementEnum) {
|
|
11
|
+
/** Блок под слотами: «Не нашли подходящее время?». */
|
|
12
|
+
LeadWidgetPlacementEnum["BELOW_SCHEDULE"] = "below-schedule";
|
|
13
|
+
/** Клик по занятому слоту. */
|
|
14
|
+
LeadWidgetPlacementEnum["BUSY_SLOT"] = "busy-slot";
|
|
15
|
+
/** День без свободных слотов. */
|
|
16
|
+
LeadWidgetPlacementEnum["EMPTY_DAY"] = "empty-day";
|
|
17
|
+
})(LeadWidgetPlacementEnum || (exports.LeadWidgetPlacementEnum = LeadWidgetPlacementEnum = {}));
|
|
@@ -33,7 +33,7 @@ export interface LeadFormField {
|
|
|
33
33
|
id: string;
|
|
34
34
|
type: LeadFieldTypeEnum;
|
|
35
35
|
required: boolean;
|
|
36
|
-
/**
|
|
36
|
+
/** Оставшееся поле всегда в форме. Скрыть нельзя — только удалить. */
|
|
37
37
|
enabled: boolean;
|
|
38
38
|
order: number;
|
|
39
39
|
/** Для select / radio / checkbox. */
|
|
@@ -45,9 +45,9 @@ export interface LeadFormField {
|
|
|
45
45
|
*/
|
|
46
46
|
mapsTo?: LeadFieldMappingEnum;
|
|
47
47
|
/**
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
48
|
+
* Поле из рекомендуемого шаблона. На редактирование не влияет: удалять
|
|
49
|
+
* и сортировать можно любое. Флаг нужен только кнопке «Рекомендуемые
|
|
50
|
+
* значения» — эти поля она заменяет шаблоном, кастомные оставляет.
|
|
51
51
|
*/
|
|
52
52
|
system?: boolean;
|
|
53
53
|
/** Границы для GUESTS / NUMBER. */
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.LeadWidgetDisplayRO = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
/** Глобальные точки входа заявок во всех виджетах бронирования профиля. */
|
|
15
|
+
class LeadWidgetDisplayRO {
|
|
16
|
+
}
|
|
17
|
+
exports.LeadWidgetDisplayRO = LeadWidgetDisplayRO;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, class_transformer_1.Expose)(),
|
|
20
|
+
__metadata("design:type", Object)
|
|
21
|
+
], LeadWidgetDisplayRO.prototype, "placements", void 0);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { LocalizedString } from '../shared/localized-string.type';
|
|
2
|
+
import { LeadWidgetPlacementEnum } from './enums/lead-widget-placement.enum';
|
|
3
|
+
/** Одна точка входа в расписании: форма и тексты обёртки, не поля формы. */
|
|
4
|
+
export interface LeadWidgetPlacement {
|
|
5
|
+
enabled: boolean;
|
|
6
|
+
/** Какую форму открывать. null — место не из чего показать. */
|
|
7
|
+
formId: number | null;
|
|
8
|
+
title: LocalizedString;
|
|
9
|
+
hint: LocalizedString;
|
|
10
|
+
button: LocalizedString;
|
|
11
|
+
}
|
|
12
|
+
export type LeadWidgetPlacements = Record<LeadWidgetPlacementEnum, LeadWidgetPlacement>;
|
|
@@ -30,7 +30,7 @@ __decorate([
|
|
|
30
30
|
__decorate([
|
|
31
31
|
(0, class_validator_1.IsOptional)(),
|
|
32
32
|
(0, class_validator_1.IsBoolean)(),
|
|
33
|
-
(0, class_transformer_1.Transform)(({ value }) => value !== null && value !== void 0 ? value :
|
|
33
|
+
(0, class_transformer_1.Transform)(({ value }) => value !== null && value !== void 0 ? value : false),
|
|
34
34
|
(0, class_transformer_1.Expose)(),
|
|
35
35
|
__metadata("design:type", Boolean)
|
|
36
36
|
], UpdateLeadFormDto.prototype, "active", void 0);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { LocalizedString } from '../shared/localized-string.type';
|
|
2
|
+
export declare class LeadWidgetPlacementDto {
|
|
3
|
+
enabled: boolean;
|
|
4
|
+
formId?: number | null;
|
|
5
|
+
title: LocalizedString;
|
|
6
|
+
hint: LocalizedString;
|
|
7
|
+
button: LocalizedString;
|
|
8
|
+
}
|
|
9
|
+
export declare class LeadWidgetPlacementsDto {
|
|
10
|
+
'below-schedule': LeadWidgetPlacementDto;
|
|
11
|
+
'busy-slot': LeadWidgetPlacementDto;
|
|
12
|
+
'empty-day': LeadWidgetPlacementDto;
|
|
13
|
+
}
|
|
14
|
+
export declare class UpdateLeadWidgetDisplayDto {
|
|
15
|
+
placements: LeadWidgetPlacementsDto;
|
|
16
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
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
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.UpdateLeadWidgetDisplayDto = exports.LeadWidgetPlacementsDto = exports.LeadWidgetPlacementDto = void 0;
|
|
13
|
+
/* eslint-disable max-classes-per-file */
|
|
14
|
+
const class_transformer_1 = require("class-transformer");
|
|
15
|
+
const class_validator_1 = require("class-validator");
|
|
16
|
+
class LeadWidgetPlacementDto {
|
|
17
|
+
}
|
|
18
|
+
exports.LeadWidgetPlacementDto = LeadWidgetPlacementDto;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, class_validator_1.IsBoolean)(),
|
|
21
|
+
(0, class_transformer_1.Expose)(),
|
|
22
|
+
__metadata("design:type", Boolean)
|
|
23
|
+
], LeadWidgetPlacementDto.prototype, "enabled", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, class_validator_1.IsOptional)(),
|
|
26
|
+
(0, class_validator_1.IsInt)(),
|
|
27
|
+
(0, class_transformer_1.Expose)(),
|
|
28
|
+
__metadata("design:type", Number)
|
|
29
|
+
], LeadWidgetPlacementDto.prototype, "formId", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, class_validator_1.IsObject)(),
|
|
32
|
+
(0, class_transformer_1.Expose)(),
|
|
33
|
+
__metadata("design:type", Object)
|
|
34
|
+
], LeadWidgetPlacementDto.prototype, "title", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, class_validator_1.IsObject)(),
|
|
37
|
+
(0, class_transformer_1.Expose)(),
|
|
38
|
+
__metadata("design:type", Object)
|
|
39
|
+
], LeadWidgetPlacementDto.prototype, "hint", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, class_validator_1.IsObject)(),
|
|
42
|
+
(0, class_transformer_1.Expose)(),
|
|
43
|
+
__metadata("design:type", Object)
|
|
44
|
+
], LeadWidgetPlacementDto.prototype, "button", void 0);
|
|
45
|
+
class LeadWidgetPlacementsDto {
|
|
46
|
+
}
|
|
47
|
+
exports.LeadWidgetPlacementsDto = LeadWidgetPlacementsDto;
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, class_validator_1.ValidateNested)(),
|
|
50
|
+
(0, class_transformer_1.Type)(() => LeadWidgetPlacementDto),
|
|
51
|
+
(0, class_transformer_1.Expose)(),
|
|
52
|
+
__metadata("design:type", LeadWidgetPlacementDto)
|
|
53
|
+
], LeadWidgetPlacementsDto.prototype, "below-schedule", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, class_validator_1.ValidateNested)(),
|
|
56
|
+
(0, class_transformer_1.Type)(() => LeadWidgetPlacementDto),
|
|
57
|
+
(0, class_transformer_1.Expose)(),
|
|
58
|
+
__metadata("design:type", LeadWidgetPlacementDto)
|
|
59
|
+
], LeadWidgetPlacementsDto.prototype, "busy-slot", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, class_validator_1.ValidateNested)(),
|
|
62
|
+
(0, class_transformer_1.Type)(() => LeadWidgetPlacementDto),
|
|
63
|
+
(0, class_transformer_1.Expose)(),
|
|
64
|
+
__metadata("design:type", LeadWidgetPlacementDto)
|
|
65
|
+
], LeadWidgetPlacementsDto.prototype, "empty-day", void 0);
|
|
66
|
+
class UpdateLeadWidgetDisplayDto {
|
|
67
|
+
}
|
|
68
|
+
exports.UpdateLeadWidgetDisplayDto = UpdateLeadWidgetDisplayDto;
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, class_validator_1.ValidateNested)(),
|
|
71
|
+
(0, class_transformer_1.Type)(() => LeadWidgetPlacementsDto),
|
|
72
|
+
(0, class_transformer_1.Expose)(),
|
|
73
|
+
__metadata("design:type", LeadWidgetPlacementsDto)
|
|
74
|
+
], UpdateLeadWidgetDisplayDto.prototype, "placements", void 0);
|
|
@@ -23,6 +23,12 @@ export declare class OpenapiCreatePreorderDto extends ClientFormDto {
|
|
|
23
23
|
attachToOrderTokens?: string[];
|
|
24
24
|
players: number;
|
|
25
25
|
children: number;
|
|
26
|
+
/**
|
|
27
|
+
* Сколько мест из `players` идёт по льготной ставке тарифа (школьники,
|
|
28
|
+
* студенты). Верхнюю границу считает бэкенд из минимальной стоимости игры
|
|
29
|
+
* — превышение отклоняется как `reducedPlayersLimitExceeded`.
|
|
30
|
+
*/
|
|
31
|
+
reducedPlayers?: number;
|
|
26
32
|
/**
|
|
27
33
|
* Состав группы не определён: гость выбрал «Определимся на месте»
|
|
28
34
|
* (playersSelectMode=OPTIONAL) или квест вовсе не спрашивает количество
|
|
@@ -85,6 +85,13 @@ __decorate([
|
|
|
85
85
|
(0, class_transformer_1.Expose)(),
|
|
86
86
|
__metadata("design:type", Number)
|
|
87
87
|
], OpenapiCreatePreorderDto.prototype, "children", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, class_validator_1.IsOptional)(),
|
|
90
|
+
(0, class_validator_1.IsInt)(),
|
|
91
|
+
(0, class_validator_1.Min)(0),
|
|
92
|
+
(0, class_transformer_1.Expose)(),
|
|
93
|
+
__metadata("design:type", Number)
|
|
94
|
+
], OpenapiCreatePreorderDto.prototype, "reducedPlayers", void 0);
|
|
88
95
|
__decorate([
|
|
89
96
|
(0, class_validator_1.IsOptional)(),
|
|
90
97
|
(0, class_validator_1.IsBoolean)(),
|
|
@@ -2,6 +2,7 @@ import { OrderPenaltyTypeEnum } from '../../order-penalty/enum/order-penalty-typ
|
|
|
2
2
|
import { ProfileCurrencyEnum } from '../../profile/enum/profile-currency';
|
|
3
3
|
import { QuestroomCancelationTypeEnum } from '../../questroom/enum/questroom-cancelation-type.enum';
|
|
4
4
|
import { Languages } from '../../shared/enum/languages.enum';
|
|
5
|
+
import { TariffReducedRateModeEnum } from '../../tariff/enum/tariff-reduced-rate-mode.enum';
|
|
5
6
|
import { OpenapiClientRO } from '../shared/openapi-client.ro';
|
|
6
7
|
import { OpenapiOrderCertificateRO } from '../shared/openapi-order-certificate.ro';
|
|
7
8
|
import { OpenapiOrderTransactionRO } from '../shared/openapi-order-transaction.ro';
|
|
@@ -57,6 +58,22 @@ export declare class OpenapiOrderRO extends QuestroomRow {
|
|
|
57
58
|
total: number;
|
|
58
59
|
players: number;
|
|
59
60
|
children: number;
|
|
61
|
+
/**
|
|
62
|
+
* Сколько мест из `players` идёт по льготной ставке тарифа (школьники,
|
|
63
|
+
* студенты). Каждое такое место уменьшает цену уровня, но не добавляет
|
|
64
|
+
* участника — цена по-прежнему ищется по `players`.
|
|
65
|
+
*/
|
|
66
|
+
reducedPlayers: number;
|
|
67
|
+
/** Название льготной категории на момент брони, например «Школьники». */
|
|
68
|
+
reducedTitle?: string | null;
|
|
69
|
+
/**
|
|
70
|
+
* Снимок льготной ставки и минимальной стоимости игры с тарифа. Виджет
|
|
71
|
+
* считает по ним цену и лимит льготных мест той же формулой, что бэкенд,
|
|
72
|
+
* поэтому показанная сумма совпадает с той, по которой оформится бронь.
|
|
73
|
+
*/
|
|
74
|
+
reducedRateMode?: TariffReducedRateModeEnum | null;
|
|
75
|
+
reducedRate: number;
|
|
76
|
+
minGameAmount: number;
|
|
60
77
|
/**
|
|
61
78
|
* Состав группы не определён («Определимся на месте»). `players` при
|
|
62
79
|
* этом = минимальный состав, а `total` — базовая стоимость «от».
|
|
@@ -16,6 +16,7 @@ const order_penalty_type_enum_1 = require("../../order-penalty/enum/order-penalt
|
|
|
16
16
|
const profile_currency_1 = require("../../profile/enum/profile-currency");
|
|
17
17
|
const questroom_cancelation_type_enum_1 = require("../../questroom/enum/questroom-cancelation-type.enum");
|
|
18
18
|
const languages_enum_1 = require("../../shared/enum/languages.enum");
|
|
19
|
+
const tariff_reduced_rate_mode_enum_1 = require("../../tariff/enum/tariff-reduced-rate-mode.enum");
|
|
19
20
|
const transaction_type_enum_1 = require("../../transaction/enum/transaction-type.enum");
|
|
20
21
|
const openapi_client_ro_1 = require("../shared/openapi-client.ro");
|
|
21
22
|
const openapi_order_certificate_ro_1 = require("../shared/openapi-order-certificate.ro");
|
|
@@ -171,6 +172,26 @@ __decorate([
|
|
|
171
172
|
(0, class_transformer_1.Expose)(),
|
|
172
173
|
__metadata("design:type", Number)
|
|
173
174
|
], OpenapiOrderRO.prototype, "children", void 0);
|
|
175
|
+
__decorate([
|
|
176
|
+
(0, class_transformer_1.Expose)(),
|
|
177
|
+
__metadata("design:type", Number)
|
|
178
|
+
], OpenapiOrderRO.prototype, "reducedPlayers", void 0);
|
|
179
|
+
__decorate([
|
|
180
|
+
(0, class_transformer_1.Expose)(),
|
|
181
|
+
__metadata("design:type", String)
|
|
182
|
+
], OpenapiOrderRO.prototype, "reducedTitle", void 0);
|
|
183
|
+
__decorate([
|
|
184
|
+
(0, class_transformer_1.Expose)(),
|
|
185
|
+
__metadata("design:type", String)
|
|
186
|
+
], OpenapiOrderRO.prototype, "reducedRateMode", void 0);
|
|
187
|
+
__decorate([
|
|
188
|
+
(0, class_transformer_1.Expose)(),
|
|
189
|
+
__metadata("design:type", Number)
|
|
190
|
+
], OpenapiOrderRO.prototype, "reducedRate", void 0);
|
|
191
|
+
__decorate([
|
|
192
|
+
(0, class_transformer_1.Expose)(),
|
|
193
|
+
__metadata("design:type", Number)
|
|
194
|
+
], OpenapiOrderRO.prototype, "minGameAmount", void 0);
|
|
174
195
|
__decorate([
|
|
175
196
|
(0, class_transformer_1.Expose)(),
|
|
176
197
|
__metadata("design:type", Boolean)
|
|
@@ -4,4 +4,9 @@ export declare class OpenapiUpdateOrderPLayersDto {
|
|
|
4
4
|
minPlayers: number;
|
|
5
5
|
players: number;
|
|
6
6
|
children: number;
|
|
7
|
+
/**
|
|
8
|
+
* Льготные места. Не передано — остаётся прежнее значение брони. Лимит
|
|
9
|
+
* пересчитывает бэкенд из минимальной стоимости игры.
|
|
10
|
+
*/
|
|
11
|
+
reducedPlayers?: number;
|
|
7
12
|
}
|
|
@@ -42,3 +42,10 @@ __decorate([
|
|
|
42
42
|
(0, class_transformer_1.Expose)(),
|
|
43
43
|
__metadata("design:type", Number)
|
|
44
44
|
], OpenapiUpdateOrderPLayersDto.prototype, "children", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, class_validator_1.IsOptional)(),
|
|
47
|
+
(0, class_validator_1.IsInt)(),
|
|
48
|
+
(0, class_validator_1.Min)(0),
|
|
49
|
+
(0, class_transformer_1.Expose)(),
|
|
50
|
+
__metadata("design:type", Number)
|
|
51
|
+
], OpenapiUpdateOrderPLayersDto.prototype, "reducedPlayers", void 0);
|
|
@@ -5,6 +5,11 @@ export declare class OpenapiUpdateOrderDto extends ClientFormDto {
|
|
|
5
5
|
orderToken?: string;
|
|
6
6
|
players?: number;
|
|
7
7
|
children?: number;
|
|
8
|
+
/**
|
|
9
|
+
* Льготные места. Не передано — берётся значение, уже сохранённое на брони;
|
|
10
|
+
* лимит всё равно пересчитывается по новому составу.
|
|
11
|
+
*/
|
|
12
|
+
reducedPlayers?: number;
|
|
8
13
|
/**
|
|
9
14
|
* Состав не определён («Определимся на месте»). Прокидывается при
|
|
10
15
|
* повторном сабмите шага «Контакт» (retry-путь виджета), чтобы флаг на
|
|
@@ -35,6 +35,13 @@ __decorate([
|
|
|
35
35
|
(0, class_transformer_1.Expose)(),
|
|
36
36
|
__metadata("design:type", Number)
|
|
37
37
|
], OpenapiUpdateOrderDto.prototype, "children", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, class_validator_1.IsOptional)(),
|
|
40
|
+
(0, class_validator_1.IsInt)(),
|
|
41
|
+
(0, class_validator_1.Min)(0),
|
|
42
|
+
(0, class_transformer_1.Expose)(),
|
|
43
|
+
__metadata("design:type", Number)
|
|
44
|
+
], OpenapiUpdateOrderDto.prototype, "reducedPlayers", void 0);
|
|
38
45
|
__decorate([
|
|
39
46
|
(0, class_validator_1.IsOptional)(),
|
|
40
47
|
(0, class_validator_1.IsBoolean)(),
|
|
@@ -32,3 +32,12 @@ __decorate([
|
|
|
32
32
|
(0, class_transformer_1.Expose)(),
|
|
33
33
|
__metadata("design:type", Object)
|
|
34
34
|
], OpenapiSlotTariffRO.prototype, "price", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, swagger_1.ApiProperty)({
|
|
37
|
+
description: 'Minimum game price in minor currency units: the booking never costs less, no matter which discounts apply. `0` means the tariff has no minimum. Needed so the schedule does not advertise a discounted "from" price that the booking flow will refuse.',
|
|
38
|
+
required: false,
|
|
39
|
+
example: 8800,
|
|
40
|
+
}),
|
|
41
|
+
(0, class_transformer_1.Expose)(),
|
|
42
|
+
__metadata("design:type", Number)
|
|
43
|
+
], OpenapiSlotTariffRO.prototype, "minGameAmount", void 0);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TariffReducedRateModeEnum } from '../../tariff/enum/tariff-reduced-rate-mode.enum';
|
|
1
2
|
export declare class OpenapiSlotVariationRO {
|
|
2
3
|
id: string;
|
|
3
4
|
tariffId: number;
|
|
@@ -8,6 +9,11 @@ export declare class OpenapiSlotVariationRO {
|
|
|
8
9
|
isFree: boolean;
|
|
9
10
|
tariff: Record<string, number>;
|
|
10
11
|
childPriceDescription?: string | null;
|
|
12
|
+
minGameAmount: number;
|
|
13
|
+
reducedRateMode?: TariffReducedRateModeEnum | null;
|
|
14
|
+
reducedRate: number;
|
|
15
|
+
reducedTitle?: string | null;
|
|
16
|
+
reducedPriceDescription?: string | null;
|
|
11
17
|
minPlayers: number;
|
|
12
18
|
maxPlayers: number;
|
|
13
19
|
numSeatsAvailable: number;
|
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.OpenapiSlotVariationRO = void 0;
|
|
13
13
|
const swagger_1 = require("@nestjs/swagger");
|
|
14
14
|
const class_transformer_1 = require("class-transformer");
|
|
15
|
+
const tariff_reduced_rate_mode_enum_1 = require("../../tariff/enum/tariff-reduced-rate-mode.enum");
|
|
15
16
|
class OpenapiSlotVariationRO {
|
|
16
17
|
}
|
|
17
18
|
exports.OpenapiSlotVariationRO = OpenapiSlotVariationRO;
|
|
@@ -92,6 +93,51 @@ __decorate([
|
|
|
92
93
|
(0, class_transformer_1.Expose)(),
|
|
93
94
|
__metadata("design:type", String)
|
|
94
95
|
], OpenapiSlotVariationRO.prototype, "childPriceDescription", void 0);
|
|
96
|
+
__decorate([
|
|
97
|
+
(0, swagger_1.ApiProperty)({
|
|
98
|
+
description: 'Minimum game price in minor units: the booking never costs less than this, ' +
|
|
99
|
+
'whatever the team composition or the discounts applied. `0` — no minimum. ' +
|
|
100
|
+
'It is also what limits how many reduced-rate seats fit into a team.',
|
|
101
|
+
example: 9800,
|
|
102
|
+
}),
|
|
103
|
+
(0, class_transformer_1.Expose)(),
|
|
104
|
+
__metadata("design:type", Number)
|
|
105
|
+
], OpenapiSlotVariationRO.prototype, "minGameAmount", void 0);
|
|
106
|
+
__decorate([
|
|
107
|
+
(0, swagger_1.ApiProperty)({
|
|
108
|
+
description: 'How the reduced rate is defined: `delta` — a reduced guest pays `reducedRate` ' +
|
|
109
|
+
'less than a regular one, `fixed` — a reduced guest pays `reducedRate`. ' +
|
|
110
|
+
'`null` — the variation has no reduced seats.',
|
|
111
|
+
required: false,
|
|
112
|
+
enum: tariff_reduced_rate_mode_enum_1.TariffReducedRateModeEnum,
|
|
113
|
+
}),
|
|
114
|
+
(0, class_transformer_1.Expose)(),
|
|
115
|
+
__metadata("design:type", String)
|
|
116
|
+
], OpenapiSlotVariationRO.prototype, "reducedRateMode", void 0);
|
|
117
|
+
__decorate([
|
|
118
|
+
(0, swagger_1.ApiProperty)({
|
|
119
|
+
description: 'Reduced rate in minor units, see `reducedRateMode`.',
|
|
120
|
+
example: 500,
|
|
121
|
+
}),
|
|
122
|
+
(0, class_transformer_1.Expose)(),
|
|
123
|
+
__metadata("design:type", Number)
|
|
124
|
+
], OpenapiSlotVariationRO.prototype, "reducedRate", void 0);
|
|
125
|
+
__decorate([
|
|
126
|
+
(0, swagger_1.ApiProperty)({
|
|
127
|
+
description: 'Name of the reduced category shown to guests, e.g. "Students"',
|
|
128
|
+
required: false,
|
|
129
|
+
}),
|
|
130
|
+
(0, class_transformer_1.Expose)(),
|
|
131
|
+
__metadata("design:type", String)
|
|
132
|
+
], OpenapiSlotVariationRO.prototype, "reducedTitle", void 0);
|
|
133
|
+
__decorate([
|
|
134
|
+
(0, swagger_1.ApiProperty)({
|
|
135
|
+
description: 'Optional note for the reduced rate (e.g. "bring a student ID"), shown next to the reduced seats picker',
|
|
136
|
+
required: false,
|
|
137
|
+
}),
|
|
138
|
+
(0, class_transformer_1.Expose)(),
|
|
139
|
+
__metadata("design:type", String)
|
|
140
|
+
], OpenapiSlotVariationRO.prototype, "reducedPriceDescription", void 0);
|
|
95
141
|
__decorate([
|
|
96
142
|
(0, swagger_1.ApiProperty)({
|
|
97
143
|
description: 'Minimum number of players that can book this variation',
|
|
@@ -0,0 +1,53 @@
|
|
|
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
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.OpenapiUpcomingScheduleDto = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const class_transformer_1 = require("class-transformer");
|
|
15
|
+
const class_validator_1 = require("class-validator");
|
|
16
|
+
const is_not_blank_1 = require("../../shared/is-not-blank");
|
|
17
|
+
const UPCOMING_LIMIT_CAP = 12;
|
|
18
|
+
class OpenapiUpcomingScheduleDto {
|
|
19
|
+
}
|
|
20
|
+
exports.OpenapiUpcomingScheduleDto = OpenapiUpcomingScheduleDto;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, swagger_1.ApiProperty)({
|
|
23
|
+
description: 'Quest room identifier to fetch upcoming sessions for.',
|
|
24
|
+
format: 'int32',
|
|
25
|
+
example: 123,
|
|
26
|
+
}),
|
|
27
|
+
(0, is_not_blank_1.IsNotBlank)(),
|
|
28
|
+
__metadata("design:type", Number)
|
|
29
|
+
], OpenapiUpcomingScheduleDto.prototype, "questroomId", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, swagger_1.ApiProperty)({
|
|
32
|
+
description: 'Start date (inclusive) in yyyy-MM-dd. Returns the next sessions after this day.',
|
|
33
|
+
example: '2026-03-30',
|
|
34
|
+
}),
|
|
35
|
+
(0, is_not_blank_1.IsNotBlank)(),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], OpenapiUpcomingScheduleDto.prototype, "date", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, swagger_1.ApiProperty)({
|
|
40
|
+
description: `Max number of sessions to return. Capped at ${UPCOMING_LIMIT_CAP}.`,
|
|
41
|
+
required: false,
|
|
42
|
+
default: UPCOMING_LIMIT_CAP,
|
|
43
|
+
example: 12,
|
|
44
|
+
}),
|
|
45
|
+
(0, class_validator_1.IsOptional)(),
|
|
46
|
+
(0, class_transformer_1.Transform)(({ value }) => {
|
|
47
|
+
const n = Number(value);
|
|
48
|
+
if (!Number.isInteger(n) || n < 1)
|
|
49
|
+
return UPCOMING_LIMIT_CAP;
|
|
50
|
+
return Math.min(n, UPCOMING_LIMIT_CAP);
|
|
51
|
+
}),
|
|
52
|
+
__metadata("design:type", Number)
|
|
53
|
+
], OpenapiUpcomingScheduleDto.prototype, "limit", void 0);
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.OpenapiUpcomingSlotsRO = void 0;
|
|
13
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
14
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
15
|
+
const class_transformer_1 = require("class-transformer");
|
|
16
|
+
const openapi_widget_slot_ro_1 = require("./openapi-widget-slot.ro");
|
|
17
|
+
class OpenapiUpcomingSlotsRO {
|
|
18
|
+
}
|
|
19
|
+
exports.OpenapiUpcomingSlotsRO = OpenapiUpcomingSlotsRO;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, swagger_1.ApiProperty)({
|
|
22
|
+
description: 'Next bookable sessions for the questroom, chronological, max 12.',
|
|
23
|
+
type: openapi_widget_slot_ro_1.OpenapiSlotRO,
|
|
24
|
+
isArray: true,
|
|
25
|
+
}),
|
|
26
|
+
(0, class_transformer_1.Expose)(),
|
|
27
|
+
(0, class_transformer_1.Type)(() => openapi_widget_slot_ro_1.OpenapiSlotRO),
|
|
28
|
+
__metadata("design:type", Array)
|
|
29
|
+
], OpenapiUpcomingSlotsRO.prototype, "slots", void 0);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CustomFieldTypeEnum } from '../../custom-field/enum/custom-field-type.enum';
|
|
2
|
+
import { LeadWidgetPlacements } from '../../lead/lead-widget-placement.type';
|
|
2
3
|
import { ProfileCurrencyEnum } from '../../profile/enum/profile-currency';
|
|
3
4
|
import { WidgetRoundnessEnum } from '../../profile/widget-customization/enum/widget-roundness.enum';
|
|
4
5
|
import { WidgetStyleEnum } from '../../profile/widget-customization/enum/widget-style.enum';
|
|
@@ -17,6 +18,7 @@ declare class Customization {
|
|
|
17
18
|
showWrapper: boolean;
|
|
18
19
|
showPricesInSchedule: boolean;
|
|
19
20
|
showCertificatesButton: boolean;
|
|
21
|
+
filledSlots?: boolean;
|
|
20
22
|
mainColor: string;
|
|
21
23
|
style: WidgetStyleEnum;
|
|
22
24
|
view: WidgetViewEnum;
|
|
@@ -82,6 +84,11 @@ export declare class OpenapiWidgetInfoRO {
|
|
|
82
84
|
* null — первая активная форма профиля.
|
|
83
85
|
*/
|
|
84
86
|
leadFormId?: number | null;
|
|
87
|
+
/**
|
|
88
|
+
* Где в расписании показывать заявку — одно на все виджеты бронирования.
|
|
89
|
+
* Выключенное место виджет не рисует.
|
|
90
|
+
*/
|
|
91
|
+
leadPlacements?: LeadWidgetPlacements;
|
|
85
92
|
profile: Profile;
|
|
86
93
|
ga4Id?: string;
|
|
87
94
|
gaCoversationId?: string;
|
|
@@ -44,6 +44,10 @@ __decorate([
|
|
|
44
44
|
(0, class_transformer_1.Expose)(),
|
|
45
45
|
__metadata("design:type", Boolean)
|
|
46
46
|
], Customization.prototype, "showCertificatesButton", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, class_transformer_1.Expose)(),
|
|
49
|
+
__metadata("design:type", Boolean)
|
|
50
|
+
], Customization.prototype, "filledSlots", void 0);
|
|
47
51
|
__decorate([
|
|
48
52
|
(0, class_transformer_1.Expose)(),
|
|
49
53
|
__metadata("design:type", String)
|
|
@@ -201,6 +205,10 @@ __decorate([
|
|
|
201
205
|
(0, class_transformer_1.Expose)(),
|
|
202
206
|
__metadata("design:type", Number)
|
|
203
207
|
], OpenapiWidgetInfoRO.prototype, "leadFormId", void 0);
|
|
208
|
+
__decorate([
|
|
209
|
+
(0, class_transformer_1.Expose)(),
|
|
210
|
+
__metadata("design:type", Object)
|
|
211
|
+
], OpenapiWidgetInfoRO.prototype, "leadPlacements", void 0);
|
|
204
212
|
__decorate([
|
|
205
213
|
(0, class_transformer_1.Expose)(),
|
|
206
214
|
(0, class_transformer_1.Type)(() => Profile),
|
|
@@ -8,6 +8,12 @@ export declare class CreateOrderDto {
|
|
|
8
8
|
duration?: number;
|
|
9
9
|
players: number;
|
|
10
10
|
children: number;
|
|
11
|
+
/**
|
|
12
|
+
* Сколько мест из `players` идёт по льготной ставке тарифа (школьники,
|
|
13
|
+
* студенты). Лимит считает бэк из минимальной стоимости игры — клиенту
|
|
14
|
+
* здесь не верим.
|
|
15
|
+
*/
|
|
16
|
+
reducedPlayers?: number;
|
|
11
17
|
mode: string;
|
|
12
18
|
promocodeId?: number;
|
|
13
19
|
certificateId?: number;
|