@escapenavigator/types 2.0.47 → 2.1.0
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 +7 -0
- package/dist/forms/widget/widget-players-form.dto.js +6 -0
- package/dist/holiday/holiday-kind.enum.d.ts +9 -0
- package/dist/holiday/holiday-kind.enum.js +13 -0
- package/dist/holiday/profile-holiday.ro.d.ts +12 -0
- package/dist/holiday/profile-holiday.ro.js +38 -0
- package/dist/holiday/update-holidays.dto.d.ts +14 -0
- package/dist/holiday/update-holidays.dto.js +58 -0
- package/dist/lead/query-leads.dto.d.ts +4 -2
- package/dist/lead/query-leads.dto.js +20 -1
- package/dist/openapi/orders/openapi-create-preorder.dto.d.ts +7 -0
- package/dist/openapi/orders/openapi-create-preorder.dto.js +6 -0
- package/dist/openapi/orders/openapi-order.ro.d.ts +17 -3
- package/dist/openapi/orders/openapi-order.ro.js +8 -0
- package/dist/openapi/orders/openapi-update-order-players.dto.d.ts +7 -0
- package/dist/openapi/orders/openapi-update-order-players.dto.js +6 -0
- package/dist/openapi/orders/openapi-update-order.dto.d.ts +7 -0
- package/dist/openapi/orders/openapi-update-order.dto.js +6 -0
- package/dist/openapi/slots/openapi-slot-variation.ro.d.ts +2 -0
- package/dist/openapi/slots/openapi-slot-variation.ro.js +21 -1
- package/dist/openapi/widget/openapi-widget-info.ro.d.ts +14 -0
- package/dist/openapi/widget/openapi-widget-info.ro.js +28 -0
- package/dist/order/create-order.dto.d.ts +7 -0
- package/dist/order/create-order.dto.js +6 -0
- package/dist/order/order.ro.d.ts +18 -1
- package/dist/order/order.ro.js +8 -0
- package/dist/order/update-order-slot.dto.d.ts +6 -0
- package/dist/order/update-order-slot.dto.js +6 -0
- package/dist/order/update-players.dto.d.ts +7 -0
- package/dist/order/update-players.dto.js +6 -0
- package/dist/slot/slot-autocomplite-form.dto.d.ts +5 -1
- package/dist/slot-template/slot-template.ro.d.ts +4 -0
- package/dist/slot-template/slot-template.ro.js +8 -0
- package/dist/slot-template/special-day.d.ts +10 -0
- package/dist/slot-template/special-day.js +13 -0
- package/dist/slot-template/update-slot-template.dto.d.ts +2 -0
- package/dist/slot-template/update-slot-template.dto.js +12 -0
- package/dist/tariff/create-tariff.dto.d.ts +10 -0
- package/dist/tariff/create-tariff.dto.js +9 -0
- package/dist/tariff/enum/tariff-category-mode.enum.d.ts +20 -0
- package/dist/tariff/enum/tariff-category-mode.enum.js +24 -0
- package/dist/tariff/tariff-category.d.ts +56 -0
- package/dist/tariff/tariff-category.dto.d.ts +19 -0
- package/dist/tariff/tariff-category.dto.js +62 -0
- package/dist/tariff/tariff-category.js +9 -0
- package/dist/tariff/tariff-light.ro.d.ts +7 -0
- package/dist/tariff/tariff-light.ro.js +4 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/widget/create-widget.dto.d.ts +10 -0
- package/dist/widget/create-widget.dto.js +35 -0
- package/dist/widget/widget.ro.d.ts +6 -0
- package/package.json +2 -2
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Languages } from '../../shared/enum/languages.enum';
|
|
2
|
+
import { OrderComposition } from '../../tariff/tariff-category';
|
|
2
3
|
export declare class WidgetPlayersFormDto {
|
|
3
4
|
upsellings: Array<{
|
|
4
5
|
id: number;
|
|
@@ -11,6 +12,12 @@ export declare class WidgetPlayersFormDto {
|
|
|
11
12
|
children: number;
|
|
12
13
|
/** Сколько мест гость выбрал по льготной ставке тарифа. */
|
|
13
14
|
reducedPlayers?: number;
|
|
15
|
+
/**
|
|
16
|
+
* Состав по категориям тарифа: `{ adult: 2, student: 1, kid: 2 }`. Ведущее
|
|
17
|
+
* поле формы — `players` / `children` / `reducedPlayers` считаются из него
|
|
18
|
+
* и уезжают на бэк ради не обновлённых клиентов.
|
|
19
|
+
*/
|
|
20
|
+
composition?: OrderComposition;
|
|
14
21
|
/**
|
|
15
22
|
* «Определимся на месте» (playersSelectMode=OPTIONAL/HIDDEN): состав не
|
|
16
23
|
* определён, `players` засеян минимумом квеста, дети скрыты/сброшены.
|
|
@@ -55,6 +55,12 @@ __decorate([
|
|
|
55
55
|
(0, class_transformer_1.Expose)(),
|
|
56
56
|
__metadata("design:type", Number)
|
|
57
57
|
], WidgetPlayersFormDto.prototype, "reducedPlayers", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, class_validator_1.IsOptional)(),
|
|
60
|
+
(0, class_validator_1.IsObject)(),
|
|
61
|
+
(0, class_transformer_1.Expose)(),
|
|
62
|
+
__metadata("design:type", Object)
|
|
63
|
+
], WidgetPlayersFormDto.prototype, "composition", void 0);
|
|
58
64
|
__decorate([
|
|
59
65
|
(0, class_validator_1.IsOptional)(),
|
|
60
66
|
(0, class_transformer_1.Expose)(),
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Значения совпадают с ключами псевдо-дней шаблона
|
|
3
|
+
* (`HOLIDAY_DAY_KEY` / `HOLIDAY_EVE_DAY_KEY`) — это позволяет использовать
|
|
4
|
+
* вид даты напрямую как ключ дня при раскатке расписания.
|
|
5
|
+
*/
|
|
6
|
+
export declare enum HolidayKindEnum {
|
|
7
|
+
HOLIDAY = "holiday",
|
|
8
|
+
EVE = "eve"
|
|
9
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HolidayKindEnum = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Значения совпадают с ключами псевдо-дней шаблона
|
|
6
|
+
* (`HOLIDAY_DAY_KEY` / `HOLIDAY_EVE_DAY_KEY`) — это позволяет использовать
|
|
7
|
+
* вид даты напрямую как ключ дня при раскатке расписания.
|
|
8
|
+
*/
|
|
9
|
+
var HolidayKindEnum;
|
|
10
|
+
(function (HolidayKindEnum) {
|
|
11
|
+
HolidayKindEnum["HOLIDAY"] = "holiday";
|
|
12
|
+
HolidayKindEnum["EVE"] = "eve";
|
|
13
|
+
})(HolidayKindEnum || (exports.HolidayKindEnum = HolidayKindEnum = {}));
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { RO } from '../shared/ro-class';
|
|
2
|
+
import { HolidayKindEnum } from './holiday-kind.enum';
|
|
3
|
+
export declare class ProfileHolidayRO extends RO {
|
|
4
|
+
/** Календарная дата в часовом поясе компании, `yyyy-MM-dd`. */
|
|
5
|
+
date: string;
|
|
6
|
+
name: string;
|
|
7
|
+
kind: HolidayKindEnum;
|
|
8
|
+
/** Снятый флаг означает «для нас это обычный день». */
|
|
9
|
+
enabled: boolean;
|
|
10
|
+
/** Добавлено или отредактировано вручную — пересид такие записи не трогает. */
|
|
11
|
+
manual: boolean;
|
|
12
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
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.ProfileHolidayRO = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const ro_class_1 = require("../shared/ro-class");
|
|
15
|
+
const holiday_kind_enum_1 = require("./holiday-kind.enum");
|
|
16
|
+
class ProfileHolidayRO extends ro_class_1.RO {
|
|
17
|
+
}
|
|
18
|
+
exports.ProfileHolidayRO = ProfileHolidayRO;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, class_transformer_1.Expose)(),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], ProfileHolidayRO.prototype, "date", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, class_transformer_1.Expose)(),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], ProfileHolidayRO.prototype, "name", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, class_transformer_1.Expose)(),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], ProfileHolidayRO.prototype, "kind", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_transformer_1.Expose)(),
|
|
33
|
+
__metadata("design:type", Boolean)
|
|
34
|
+
], ProfileHolidayRO.prototype, "enabled", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, class_transformer_1.Expose)(),
|
|
37
|
+
__metadata("design:type", Boolean)
|
|
38
|
+
], ProfileHolidayRO.prototype, "manual", void 0);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { HolidayKindEnum } from './holiday-kind.enum';
|
|
2
|
+
export declare class ProfileHolidayItemDto {
|
|
3
|
+
/** `yyyy-MM-dd`. */
|
|
4
|
+
date: string;
|
|
5
|
+
name?: string;
|
|
6
|
+
kind?: HolidayKindEnum;
|
|
7
|
+
enabled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare class UpdateProfileHolidaysDto {
|
|
10
|
+
/** Создание или изменение записей. Дата — естественный ключ. */
|
|
11
|
+
items?: ProfileHolidayItemDto[];
|
|
12
|
+
/** Полное удаление записей по датам. */
|
|
13
|
+
removeDates?: string[];
|
|
14
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
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.UpdateProfileHolidaysDto = exports.ProfileHolidayItemDto = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const is_not_blank_1 = require("../shared/is-not-blank");
|
|
16
|
+
const holiday_kind_enum_1 = require("./holiday-kind.enum");
|
|
17
|
+
class ProfileHolidayItemDto {
|
|
18
|
+
}
|
|
19
|
+
exports.ProfileHolidayItemDto = ProfileHolidayItemDto;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, is_not_blank_1.IsNotBlank)(),
|
|
22
|
+
(0, class_transformer_1.Expose)(),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], ProfileHolidayItemDto.prototype, "date", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_validator_1.IsOptional)(),
|
|
27
|
+
(0, class_transformer_1.Expose)(),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], ProfileHolidayItemDto.prototype, "name", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, class_validator_1.IsOptional)(),
|
|
32
|
+
(0, class_validator_1.IsEnum)(holiday_kind_enum_1.HolidayKindEnum),
|
|
33
|
+
(0, class_transformer_1.Expose)(),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], ProfileHolidayItemDto.prototype, "kind", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, class_validator_1.IsOptional)(),
|
|
38
|
+
(0, class_validator_1.IsBoolean)(),
|
|
39
|
+
(0, class_transformer_1.Expose)(),
|
|
40
|
+
__metadata("design:type", Boolean)
|
|
41
|
+
], ProfileHolidayItemDto.prototype, "enabled", void 0);
|
|
42
|
+
class UpdateProfileHolidaysDto {
|
|
43
|
+
}
|
|
44
|
+
exports.UpdateProfileHolidaysDto = UpdateProfileHolidaysDto;
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, class_validator_1.IsOptional)(),
|
|
47
|
+
(0, class_validator_1.IsArray)(),
|
|
48
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
49
|
+
(0, class_transformer_1.Type)(() => ProfileHolidayItemDto),
|
|
50
|
+
(0, class_transformer_1.Expose)(),
|
|
51
|
+
__metadata("design:type", Array)
|
|
52
|
+
], UpdateProfileHolidaysDto.prototype, "items", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, class_validator_1.IsOptional)(),
|
|
55
|
+
(0, class_validator_1.IsArray)(),
|
|
56
|
+
(0, class_transformer_1.Expose)(),
|
|
57
|
+
__metadata("design:type", Array)
|
|
58
|
+
], UpdateProfileHolidaysDto.prototype, "removeDates", void 0);
|
|
@@ -15,6 +15,8 @@ export declare class QueryLeadsDto {
|
|
|
15
15
|
dateFrom?: string;
|
|
16
16
|
dateTo?: string;
|
|
17
17
|
}
|
|
18
|
+
/** Axios шлёт `where` строкой; таблица и тесты — объектом. */
|
|
19
|
+
export declare const parseQueryWhere: (value: unknown) => Record<string, unknown> | undefined;
|
|
18
20
|
/** Постраничный список для табличного вида. */
|
|
19
21
|
export declare class QueryLeadsListDto extends QueryLeadsDto {
|
|
20
22
|
page: number;
|
|
@@ -22,8 +24,8 @@ export declare class QueryLeadsListDto extends QueryLeadsDto {
|
|
|
22
24
|
sort?: string;
|
|
23
25
|
order?: 'ASC' | 'DESC';
|
|
24
26
|
/**
|
|
25
|
-
* Таблица CRM
|
|
26
|
-
*
|
|
27
|
+
* Таблица CRM кладёт фильтры в `where`. Axios 0.21 сериализует вложенный
|
|
28
|
+
* объект как JSON-строку (`where=%7B%7D`), поэтому сначала парсим.
|
|
27
29
|
*/
|
|
28
30
|
where?: Record<string, unknown>;
|
|
29
31
|
}
|
|
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.QueryLeadsListDto = exports.QueryLeadsDto = void 0;
|
|
12
|
+
exports.QueryLeadsListDto = exports.parseQueryWhere = exports.QueryLeadsDto = void 0;
|
|
13
13
|
const class_transformer_1 = require("class-transformer");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
15
|
const normalize_search_text_1 = require("../shared/normalize-search-text");
|
|
@@ -80,6 +80,24 @@ __decorate([
|
|
|
80
80
|
(0, class_validator_1.IsString)(),
|
|
81
81
|
__metadata("design:type", String)
|
|
82
82
|
], QueryLeadsDto.prototype, "dateTo", void 0);
|
|
83
|
+
/** Axios шлёт `where` строкой; таблица и тесты — объектом. */
|
|
84
|
+
const parseQueryWhere = (value) => {
|
|
85
|
+
if (value == null || value === '')
|
|
86
|
+
return undefined;
|
|
87
|
+
if (typeof value === 'object' && !Array.isArray(value)) {
|
|
88
|
+
return value;
|
|
89
|
+
}
|
|
90
|
+
if (typeof value !== 'string')
|
|
91
|
+
return undefined;
|
|
92
|
+
try {
|
|
93
|
+
const parsed = JSON.parse(value);
|
|
94
|
+
return parsed && typeof parsed === 'object' && !Array.isArray(parsed) ? parsed : undefined;
|
|
95
|
+
}
|
|
96
|
+
catch (_a) {
|
|
97
|
+
return undefined;
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
exports.parseQueryWhere = parseQueryWhere;
|
|
83
101
|
/** Постраничный список для табличного вида. */
|
|
84
102
|
class QueryLeadsListDto extends QueryLeadsDto {
|
|
85
103
|
}
|
|
@@ -106,6 +124,7 @@ __decorate([
|
|
|
106
124
|
], QueryLeadsListDto.prototype, "order", void 0);
|
|
107
125
|
__decorate([
|
|
108
126
|
(0, class_validator_1.IsOptional)(),
|
|
127
|
+
(0, class_transformer_1.Transform)(({ value }) => (0, exports.parseQueryWhere)(value)),
|
|
109
128
|
(0, class_validator_1.IsObject)(),
|
|
110
129
|
__metadata("design:type", Object)
|
|
111
130
|
], QueryLeadsListDto.prototype, "where", void 0);
|
|
@@ -2,6 +2,7 @@ import { ClientFormDto } from '../../client/client-form.dto';
|
|
|
2
2
|
import { CustomFieldTypeEnum } from '../../custom-field/enum/custom-field-type.enum';
|
|
3
3
|
import { Utm } from '../../order/order.ro';
|
|
4
4
|
import { Languages } from '../../shared/enum/languages.enum';
|
|
5
|
+
import { OrderComposition } from '../../tariff/tariff-category';
|
|
5
6
|
export declare class CustomFiled {
|
|
6
7
|
id: number;
|
|
7
8
|
title: string;
|
|
@@ -29,6 +30,12 @@ export declare class OpenapiCreatePreorderDto extends ClientFormDto {
|
|
|
29
30
|
* Минимум игры режет сумму, а не это число.
|
|
30
31
|
*/
|
|
31
32
|
reducedPlayers?: number;
|
|
33
|
+
/**
|
|
34
|
+
* Состав по категориям тарифа: `{ adult: 2, student: 1, kid: 2 }`.
|
|
35
|
+
* Приоритетнее `players` / `children` / `reducedPlayers` — те оставлены
|
|
36
|
+
* для не обновлённых клиентов и пересчитываются из состава на бэке.
|
|
37
|
+
*/
|
|
38
|
+
composition?: OrderComposition;
|
|
32
39
|
/**
|
|
33
40
|
* Состав группы не определён: гость выбрал «Определимся на месте»
|
|
34
41
|
* (playersSelectMode=OPTIONAL) или квест вовсе не спрашивает количество
|
|
@@ -92,6 +92,12 @@ __decorate([
|
|
|
92
92
|
(0, class_transformer_1.Expose)(),
|
|
93
93
|
__metadata("design:type", Number)
|
|
94
94
|
], OpenapiCreatePreorderDto.prototype, "reducedPlayers", void 0);
|
|
95
|
+
__decorate([
|
|
96
|
+
(0, class_validator_1.IsOptional)(),
|
|
97
|
+
(0, class_validator_1.IsObject)(),
|
|
98
|
+
(0, class_transformer_1.Expose)(),
|
|
99
|
+
__metadata("design:type", Object)
|
|
100
|
+
], OpenapiCreatePreorderDto.prototype, "composition", void 0);
|
|
95
101
|
__decorate([
|
|
96
102
|
(0, class_validator_1.IsOptional)(),
|
|
97
103
|
(0, class_validator_1.IsBoolean)(),
|
|
@@ -3,6 +3,7 @@ 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
5
|
import { TariffReducedRateModeEnum } from '../../tariff/enum/tariff-reduced-rate-mode.enum';
|
|
6
|
+
import { OrderComposition, TariffCategory } from '../../tariff/tariff-category';
|
|
6
7
|
import { OpenapiClientRO } from '../shared/openapi-client.ro';
|
|
7
8
|
import { OpenapiOrderCertificateRO } from '../shared/openapi-order-certificate.ro';
|
|
8
9
|
import { OpenapiOrderTransactionRO } from '../shared/openapi-order-transaction.ro';
|
|
@@ -56,12 +57,25 @@ export declare class OpenapiOrderRO extends QuestroomRow {
|
|
|
56
57
|
canceledWithFine: boolean;
|
|
57
58
|
toPay: number;
|
|
58
59
|
total: number;
|
|
60
|
+
/**
|
|
61
|
+
* Состав брони по категориям тарифа: `{ adult: 2, student: 1, kid: 2 }`.
|
|
62
|
+
* Вместе со снимком `categories` — источник истины для цены.
|
|
63
|
+
*/
|
|
64
|
+
composition: OrderComposition;
|
|
65
|
+
/**
|
|
66
|
+
* Снимок категорий тарифа на момент брони. Пустой у броней, оформленных
|
|
67
|
+
* до перехода на категории: их цена считается из полей ниже.
|
|
68
|
+
* Динамический массив, поэтому без `@Type(() => …)`.
|
|
69
|
+
*/
|
|
70
|
+
categories: TariffCategory[];
|
|
71
|
+
/** Гостей, занимающих место в сетке цен. Денорм из `composition`. */
|
|
59
72
|
players: number;
|
|
73
|
+
/** Гостей, оплачиваемых надбавкой сверх групповой цены. Денорм из `composition`. */
|
|
60
74
|
children: number;
|
|
61
75
|
/**
|
|
62
|
-
* Сколько мест из `players` идёт по
|
|
63
|
-
*
|
|
64
|
-
*
|
|
76
|
+
* Сколько мест из `players` идёт не по базовой ставке (школьники,
|
|
77
|
+
* студенты, пенсионеры). Денорм из `composition`: при нескольких
|
|
78
|
+
* скидочных категориях это их сумма, и цену по нему не восстановить.
|
|
65
79
|
*/
|
|
66
80
|
reducedPlayers: number;
|
|
67
81
|
/** Название льготной категории на момент брони, например «Школьники». */
|
|
@@ -164,6 +164,14 @@ __decorate([
|
|
|
164
164
|
(0, class_transformer_1.Expose)(),
|
|
165
165
|
__metadata("design:type", Number)
|
|
166
166
|
], OpenapiOrderRO.prototype, "total", void 0);
|
|
167
|
+
__decorate([
|
|
168
|
+
(0, class_transformer_1.Expose)(),
|
|
169
|
+
__metadata("design:type", Object)
|
|
170
|
+
], OpenapiOrderRO.prototype, "composition", void 0);
|
|
171
|
+
__decorate([
|
|
172
|
+
(0, class_transformer_1.Expose)(),
|
|
173
|
+
__metadata("design:type", Array)
|
|
174
|
+
], OpenapiOrderRO.prototype, "categories", void 0);
|
|
167
175
|
__decorate([
|
|
168
176
|
(0, class_transformer_1.Expose)(),
|
|
169
177
|
__metadata("design:type", Number)
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { OrderComposition } from '../../tariff/tariff-category';
|
|
1
2
|
export declare class OpenapiUpdateOrderPLayersDto {
|
|
2
3
|
orderToken: string;
|
|
3
4
|
maxPlayers: number;
|
|
@@ -9,4 +10,10 @@ export declare class OpenapiUpdateOrderPLayersDto {
|
|
|
9
10
|
* Не больше состава; минимум игры режет сумму, а не это число.
|
|
10
11
|
*/
|
|
11
12
|
reducedPlayers?: number;
|
|
13
|
+
/**
|
|
14
|
+
* Состав по категориям тарифа: `{ adult: 2, student: 1, kid: 2 }`.
|
|
15
|
+
* Приоритетнее `players` / `children` / `reducedPlayers` — те оставлены
|
|
16
|
+
* для не обновлённых клиентов и пересчитываются из состава на бэке.
|
|
17
|
+
*/
|
|
18
|
+
composition?: OrderComposition;
|
|
12
19
|
}
|
|
@@ -49,3 +49,9 @@ __decorate([
|
|
|
49
49
|
(0, class_transformer_1.Expose)(),
|
|
50
50
|
__metadata("design:type", Number)
|
|
51
51
|
], OpenapiUpdateOrderPLayersDto.prototype, "reducedPlayers", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, class_validator_1.IsOptional)(),
|
|
54
|
+
(0, class_validator_1.IsObject)(),
|
|
55
|
+
(0, class_transformer_1.Expose)(),
|
|
56
|
+
__metadata("design:type", Object)
|
|
57
|
+
], OpenapiUpdateOrderPLayersDto.prototype, "composition", void 0);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ClientFormDto } from '../../client/client-form.dto';
|
|
2
2
|
import { Languages } from '../../shared/enum/languages.enum';
|
|
3
|
+
import { OrderComposition } from '../../tariff/tariff-category';
|
|
3
4
|
import { CustomFiled } from './openapi-create-preorder.dto';
|
|
4
5
|
export declare class OpenapiUpdateOrderDto extends ClientFormDto {
|
|
5
6
|
orderToken?: string;
|
|
@@ -10,6 +11,12 @@ export declare class OpenapiUpdateOrderDto extends ClientFormDto {
|
|
|
10
11
|
* лимит всё равно пересчитывается по новому составу.
|
|
11
12
|
*/
|
|
12
13
|
reducedPlayers?: number;
|
|
14
|
+
/**
|
|
15
|
+
* Состав по категориям тарифа: `{ adult: 2, student: 1, kid: 2 }`.
|
|
16
|
+
* Приоритетнее `players` / `children` / `reducedPlayers` — те оставлены
|
|
17
|
+
* для не обновлённых клиентов и пересчитываются из состава на бэке.
|
|
18
|
+
*/
|
|
19
|
+
composition?: OrderComposition;
|
|
13
20
|
/**
|
|
14
21
|
* Состав не определён («Определимся на месте»). Прокидывается при
|
|
15
22
|
* повторном сабмите шага «Контакт» (retry-путь виджета), чтобы флаг на
|
|
@@ -42,6 +42,12 @@ __decorate([
|
|
|
42
42
|
(0, class_transformer_1.Expose)(),
|
|
43
43
|
__metadata("design:type", Number)
|
|
44
44
|
], OpenapiUpdateOrderDto.prototype, "reducedPlayers", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, class_validator_1.IsOptional)(),
|
|
47
|
+
(0, class_validator_1.IsObject)(),
|
|
48
|
+
(0, class_transformer_1.Expose)(),
|
|
49
|
+
__metadata("design:type", Object)
|
|
50
|
+
], OpenapiUpdateOrderDto.prototype, "composition", void 0);
|
|
45
51
|
__decorate([
|
|
46
52
|
(0, class_validator_1.IsOptional)(),
|
|
47
53
|
(0, class_validator_1.IsBoolean)(),
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { TariffReducedRateModeEnum } from '../../tariff/enum/tariff-reduced-rate-mode.enum';
|
|
2
|
+
import { TariffCategory } from '../../tariff/tariff-category';
|
|
2
3
|
export declare class OpenapiSlotVariationRO {
|
|
3
4
|
id: string;
|
|
4
5
|
tariffId: number;
|
|
@@ -8,6 +9,7 @@ export declare class OpenapiSlotVariationRO {
|
|
|
8
9
|
isDefault: boolean;
|
|
9
10
|
isFree: boolean;
|
|
10
11
|
tariff: Record<string, number>;
|
|
12
|
+
categories: TariffCategory[];
|
|
11
13
|
childPriceDescription?: string | null;
|
|
12
14
|
minGameAmount: number;
|
|
13
15
|
reducedRateMode?: TariffReducedRateModeEnum | null;
|
|
@@ -87,8 +87,28 @@ __decorate([
|
|
|
87
87
|
], OpenapiSlotVariationRO.prototype, "tariff", void 0);
|
|
88
88
|
__decorate([
|
|
89
89
|
(0, swagger_1.ApiProperty)({
|
|
90
|
-
description: '
|
|
90
|
+
description: 'Participant categories of the variation: one stepper row each in the composition picker. ' +
|
|
91
|
+
'Exactly one category has `mode: "base"` and is priced as a full share of the group price ' +
|
|
92
|
+
'`tariff[N] / N`. The others are relative to that share: `delta` — cheaper by `value` minor ' +
|
|
93
|
+
'units, `percent` — cheaper by `value` basis points (1% = 100), `fixed` — costs exactly ' +
|
|
94
|
+
'`value` per guest. `countsInPrice: false` means the guest does not affect which `tariff[N]` ' +
|
|
95
|
+
'level is used and is charged on top of the group price. ' +
|
|
96
|
+
'Dynamic array, therefore NOT wrapped in @Type(() => …).',
|
|
97
|
+
example: [
|
|
98
|
+
{ key: 'adult', title: 'Adults', mode: 'base', value: 0, countsInPrice: true },
|
|
99
|
+
{ key: 'child', title: 'Under 7', mode: 'fixed', value: 0, countsInPrice: false },
|
|
100
|
+
],
|
|
101
|
+
isArray: true,
|
|
102
|
+
}),
|
|
103
|
+
(0, class_transformer_1.Expose)(),
|
|
104
|
+
__metadata("design:type", Array)
|
|
105
|
+
], OpenapiSlotVariationRO.prototype, "categories", void 0);
|
|
106
|
+
__decorate([
|
|
107
|
+
(0, swagger_1.ApiProperty)({
|
|
108
|
+
description: 'Optional note for child pricing (e.g. age rules), shown next to the children count picker. ' +
|
|
109
|
+
'Legacy: superseded by the `description` of the corresponding entry in `categories`.',
|
|
91
110
|
required: false,
|
|
111
|
+
deprecated: true,
|
|
92
112
|
}),
|
|
93
113
|
(0, class_transformer_1.Expose)(),
|
|
94
114
|
__metadata("design:type", String)
|
|
@@ -104,6 +104,20 @@ export declare class OpenapiWidgetInfoRO {
|
|
|
104
104
|
customization: Customization;
|
|
105
105
|
daysAhead?: number;
|
|
106
106
|
buttonTooltipText?: string;
|
|
107
|
+
buttonShowBooking?: boolean;
|
|
108
|
+
buttonShowChat?: boolean;
|
|
109
|
+
buttonShowCertificates?: boolean;
|
|
110
|
+
buttonShowPackages?: boolean;
|
|
111
|
+
buttonShowLead?: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Есть ли опубликованные пакеты, которые можно показать в кнопке.
|
|
114
|
+
* Считается только для `WIDGET_BUTTON`.
|
|
115
|
+
*/
|
|
116
|
+
hasPackages?: boolean;
|
|
117
|
+
/**
|
|
118
|
+
* Есть ли активная форма заявки. Считается только для `WIDGET_BUTTON`.
|
|
119
|
+
*/
|
|
120
|
+
hasLeadForm?: boolean;
|
|
107
121
|
showOtherQuests?: boolean;
|
|
108
122
|
/**
|
|
109
123
|
* Bearer-токен для protected widget endpoints. Эквивалентен значению
|
|
@@ -271,6 +271,34 @@ __decorate([
|
|
|
271
271
|
(0, class_transformer_1.Expose)(),
|
|
272
272
|
__metadata("design:type", String)
|
|
273
273
|
], OpenapiWidgetInfoRO.prototype, "buttonTooltipText", void 0);
|
|
274
|
+
__decorate([
|
|
275
|
+
(0, class_transformer_1.Expose)(),
|
|
276
|
+
__metadata("design:type", Boolean)
|
|
277
|
+
], OpenapiWidgetInfoRO.prototype, "buttonShowBooking", void 0);
|
|
278
|
+
__decorate([
|
|
279
|
+
(0, class_transformer_1.Expose)(),
|
|
280
|
+
__metadata("design:type", Boolean)
|
|
281
|
+
], OpenapiWidgetInfoRO.prototype, "buttonShowChat", void 0);
|
|
282
|
+
__decorate([
|
|
283
|
+
(0, class_transformer_1.Expose)(),
|
|
284
|
+
__metadata("design:type", Boolean)
|
|
285
|
+
], OpenapiWidgetInfoRO.prototype, "buttonShowCertificates", void 0);
|
|
286
|
+
__decorate([
|
|
287
|
+
(0, class_transformer_1.Expose)(),
|
|
288
|
+
__metadata("design:type", Boolean)
|
|
289
|
+
], OpenapiWidgetInfoRO.prototype, "buttonShowPackages", void 0);
|
|
290
|
+
__decorate([
|
|
291
|
+
(0, class_transformer_1.Expose)(),
|
|
292
|
+
__metadata("design:type", Boolean)
|
|
293
|
+
], OpenapiWidgetInfoRO.prototype, "buttonShowLead", void 0);
|
|
294
|
+
__decorate([
|
|
295
|
+
(0, class_transformer_1.Expose)(),
|
|
296
|
+
__metadata("design:type", Boolean)
|
|
297
|
+
], OpenapiWidgetInfoRO.prototype, "hasPackages", void 0);
|
|
298
|
+
__decorate([
|
|
299
|
+
(0, class_transformer_1.Expose)(),
|
|
300
|
+
__metadata("design:type", Boolean)
|
|
301
|
+
], OpenapiWidgetInfoRO.prototype, "hasLeadForm", void 0);
|
|
274
302
|
__decorate([
|
|
275
303
|
(0, class_transformer_1.Expose)(),
|
|
276
304
|
__metadata("design:type", Boolean)
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Languages } from '../shared/enum/languages.enum';
|
|
2
|
+
import { OrderComposition } from '../tariff/tariff-category';
|
|
2
3
|
export declare class CreateOrderDto {
|
|
3
4
|
slotId?: number;
|
|
4
5
|
questroomId: number;
|
|
@@ -13,6 +14,12 @@ export declare class CreateOrderDto {
|
|
|
13
14
|
* студенты). Не больше состава; ниже минимума игры цену не опустит бэк.
|
|
14
15
|
*/
|
|
15
16
|
reducedPlayers?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Состав по категориям тарифа: `{ adult: 2, student: 1, kid: 2 }`.
|
|
19
|
+
* Приоритетнее `players` / `children` / `reducedPlayers` — те оставлены
|
|
20
|
+
* для не обновлённых клиентов и пересчитываются из состава на бэке.
|
|
21
|
+
*/
|
|
22
|
+
composition?: OrderComposition;
|
|
16
23
|
mode: string;
|
|
17
24
|
promocodeId?: number;
|
|
18
25
|
certificateId?: number;
|
|
@@ -67,6 +67,12 @@ __decorate([
|
|
|
67
67
|
(0, class_transformer_1.Expose)(),
|
|
68
68
|
__metadata("design:type", Number)
|
|
69
69
|
], CreateOrderDto.prototype, "reducedPlayers", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, class_validator_1.IsOptional)(),
|
|
72
|
+
(0, class_validator_1.IsObject)(),
|
|
73
|
+
(0, class_transformer_1.Expose)(),
|
|
74
|
+
__metadata("design:type", Object)
|
|
75
|
+
], CreateOrderDto.prototype, "composition", void 0);
|
|
70
76
|
__decorate([
|
|
71
77
|
(0, class_validator_1.IsOptional)(),
|
|
72
78
|
(0, class_transformer_1.Expose)(),
|
package/dist/order/order.ro.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ import { Languages } from '../shared/enum/languages.enum';
|
|
|
9
9
|
import { RO } from '../shared/ro-class';
|
|
10
10
|
import { SourceEnum } from '../shared/source.enum';
|
|
11
11
|
import { TariffReducedRateModeEnum } from '../tariff/enum/tariff-reduced-rate-mode.enum';
|
|
12
|
+
import { OrderComposition, TariffCategory } from '../tariff/tariff-category';
|
|
12
13
|
import { TransactionSourceEnum } from '../transaction/enum/transaction-source.enum';
|
|
13
14
|
import { TransactionTypeEnum } from '../transaction/enum/transaction-type.enum';
|
|
14
15
|
import { UserMessageResponseObject } from '../user-message/user-message.ro';
|
|
@@ -244,9 +245,25 @@ export declare class OrderRO extends RO {
|
|
|
244
245
|
refundedAmount: number;
|
|
245
246
|
groupId?: number;
|
|
246
247
|
groupShare?: number;
|
|
248
|
+
/**
|
|
249
|
+
* Состав брони по категориям тарифа: `{ adult: 2, student: 1, kid: 2 }`.
|
|
250
|
+
* Вместе со снимком `categories` — источник истины для цены.
|
|
251
|
+
*/
|
|
252
|
+
composition: OrderComposition;
|
|
253
|
+
/**
|
|
254
|
+
* Снимок категорий тарифа на момент брони. Пустой у броней, оформленных
|
|
255
|
+
* до перехода на категории: их цена считается из полей ниже.
|
|
256
|
+
* Динамический массив, поэтому без `@Type(() => …)`.
|
|
257
|
+
*/
|
|
258
|
+
categories: TariffCategory[];
|
|
259
|
+
/** Гостей, занимающих место в сетке цен. Денорм из `composition`. */
|
|
247
260
|
players: number;
|
|
261
|
+
/** Гостей, оплачиваемых надбавкой сверх групповой цены. Денорм из `composition`. */
|
|
248
262
|
children: number;
|
|
249
|
-
/**
|
|
263
|
+
/**
|
|
264
|
+
* Сколько мест из `players` идёт не по базовой ставке (школьники и т.п.).
|
|
265
|
+
* Денорм из `composition`.
|
|
266
|
+
*/
|
|
250
267
|
reducedPlayers: number;
|
|
251
268
|
/**
|
|
252
269
|
* Снимок льготной ставки и минимальной стоимости игры с тарифа. Пикер
|
package/dist/order/order.ro.js
CHANGED
|
@@ -561,6 +561,14 @@ __decorate([
|
|
|
561
561
|
(0, class_transformer_1.Expose)(),
|
|
562
562
|
__metadata("design:type", Number)
|
|
563
563
|
], OrderRO.prototype, "groupShare", void 0);
|
|
564
|
+
__decorate([
|
|
565
|
+
(0, class_transformer_1.Expose)(),
|
|
566
|
+
__metadata("design:type", Object)
|
|
567
|
+
], OrderRO.prototype, "composition", void 0);
|
|
568
|
+
__decorate([
|
|
569
|
+
(0, class_transformer_1.Expose)(),
|
|
570
|
+
__metadata("design:type", Array)
|
|
571
|
+
], OrderRO.prototype, "categories", void 0);
|
|
564
572
|
__decorate([
|
|
565
573
|
(0, class_transformer_1.Expose)(),
|
|
566
574
|
__metadata("design:type", Number)
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { OrderComposition } from '../tariff/tariff-category';
|
|
1
2
|
export declare class UpdateOrderSlotDto {
|
|
2
3
|
slotId?: number;
|
|
3
4
|
questroomId: number;
|
|
@@ -21,6 +22,11 @@ export declare class UpdateOrderSlotDto {
|
|
|
21
22
|
* game price — a cheaper tariff may fit fewer reduced seats).
|
|
22
23
|
*/
|
|
23
24
|
reducedPlayers?: number;
|
|
25
|
+
/**
|
|
26
|
+
* Состав по категориям нового тарифа. Не передан — переносится состав
|
|
27
|
+
* брони: категории, которых в новом тарифе нет, схлопываются в базовую.
|
|
28
|
+
*/
|
|
29
|
+
composition?: OrderComposition;
|
|
24
30
|
/**
|
|
25
31
|
* Free-form text describing the resolved variation/duration (e.g. the
|
|
26
32
|
* variation title for fix slots or `${duration} мин` for flex slots).
|
|
@@ -66,6 +66,12 @@ __decorate([
|
|
|
66
66
|
(0, class_transformer_1.Expose)(),
|
|
67
67
|
__metadata("design:type", Number)
|
|
68
68
|
], UpdateOrderSlotDto.prototype, "reducedPlayers", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, class_validator_1.IsOptional)(),
|
|
71
|
+
(0, class_validator_1.IsObject)(),
|
|
72
|
+
(0, class_transformer_1.Expose)(),
|
|
73
|
+
__metadata("design:type", Object)
|
|
74
|
+
], UpdateOrderSlotDto.prototype, "composition", void 0);
|
|
69
75
|
__decorate([
|
|
70
76
|
(0, class_validator_1.IsOptional)(),
|
|
71
77
|
(0, class_validator_1.IsString)(),
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { OrderComposition } from '../tariff/tariff-category';
|
|
1
2
|
export declare class UpdatePlayersrDto {
|
|
2
3
|
players: number;
|
|
3
4
|
children: number;
|
|
@@ -6,4 +7,10 @@ export declare class UpdatePlayersrDto {
|
|
|
6
7
|
* Не больше состава; минимум игры режет сумму, а не это число.
|
|
7
8
|
*/
|
|
8
9
|
reducedPlayers?: number;
|
|
10
|
+
/**
|
|
11
|
+
* Состав по категориям тарифа: `{ adult: 2, student: 1, kid: 2 }`.
|
|
12
|
+
* Приоритетнее `players` / `children` / `reducedPlayers` — те оставлены
|
|
13
|
+
* для не обновлённых клиентов и пересчитываются из состава на бэке.
|
|
14
|
+
*/
|
|
15
|
+
composition?: OrderComposition;
|
|
9
16
|
}
|