@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.
Files changed (52) hide show
  1. package/dist/forms/widget/widget-players-form.dto.d.ts +2 -0
  2. package/dist/forms/widget/widget-players-form.dto.js +5 -0
  3. package/dist/lead/enums/lead-widget-placement.enum.d.ts +13 -0
  4. package/dist/lead/enums/lead-widget-placement.enum.js +17 -0
  5. package/dist/lead/lead-form-field.type.d.ts +4 -4
  6. package/dist/lead/lead-widget-display.ro.d.ts +5 -0
  7. package/dist/lead/lead-widget-display.ro.js +21 -0
  8. package/dist/lead/lead-widget-placement.type.d.ts +12 -0
  9. package/dist/lead/lead-widget-placement.type.js +2 -0
  10. package/dist/lead/update-lead-form.dto.js +1 -1
  11. package/dist/lead/update-lead-widget-display.dto.d.ts +16 -0
  12. package/dist/lead/update-lead-widget-display.dto.js +74 -0
  13. package/dist/openapi/orders/openapi-create-preorder.dto.d.ts +6 -0
  14. package/dist/openapi/orders/openapi-create-preorder.dto.js +7 -0
  15. package/dist/openapi/orders/openapi-order.ro.d.ts +17 -0
  16. package/dist/openapi/orders/openapi-order.ro.js +21 -0
  17. package/dist/openapi/orders/openapi-update-order-players.dto.d.ts +5 -0
  18. package/dist/openapi/orders/openapi-update-order-players.dto.js +7 -0
  19. package/dist/openapi/orders/openapi-update-order.dto.d.ts +5 -0
  20. package/dist/openapi/orders/openapi-update-order.dto.js +7 -0
  21. package/dist/openapi/slots/openapi-slot-tariff.ro.d.ts +1 -0
  22. package/dist/openapi/slots/openapi-slot-tariff.ro.js +9 -0
  23. package/dist/openapi/slots/openapi-slot-variation.ro.d.ts +6 -0
  24. package/dist/openapi/slots/openapi-slot-variation.ro.js +46 -0
  25. package/dist/openapi/slots/openapi-upcoming-schedule.dto.d.ts +5 -0
  26. package/dist/openapi/slots/openapi-upcoming-schedule.dto.js +53 -0
  27. package/dist/openapi/slots/openapi-upcoming-slots.ro.d.ts +4 -0
  28. package/dist/openapi/slots/openapi-upcoming-slots.ro.js +29 -0
  29. package/dist/openapi/widget/openapi-widget-info.ro.d.ts +7 -0
  30. package/dist/openapi/widget/openapi-widget-info.ro.js +8 -0
  31. package/dist/order/create-order.dto.d.ts +6 -0
  32. package/dist/order/create-order.dto.js +7 -0
  33. package/dist/order/order.ro.d.ts +12 -0
  34. package/dist/order/order.ro.js +21 -0
  35. package/dist/order/update-order-slot.dto.d.ts +6 -0
  36. package/dist/order/update-order-slot.dto.js +7 -0
  37. package/dist/order/update-players.dto.d.ts +6 -0
  38. package/dist/order/update-players.dto.js +7 -0
  39. package/dist/profile/widget-customization/update-widget-customization.dto.d.ts +1 -0
  40. package/dist/profile/widget-customization/update-widget-customization.dto.js +7 -0
  41. package/dist/profile/widget-customization/widget-customization.ro.d.ts +2 -0
  42. package/dist/profile/widget-customization/widget-customization.ro.js +4 -0
  43. package/dist/tariff/create-tariff.dto.d.ts +20 -0
  44. package/dist/tariff/create-tariff.dto.js +34 -0
  45. package/dist/tariff/enum/tariff-reduced-rate-mode.enum.d.ts +12 -0
  46. package/dist/tariff/enum/tariff-reduced-rate-mode.enum.js +16 -0
  47. package/dist/tariff/tariff-light.ro.d.ts +11 -4
  48. package/dist/tariff/tariff-light.ro.js +23 -4
  49. package/dist/tariff/tariff.ro.d.ts +1 -0
  50. package/dist/tariff/tariff.ro.js +4 -0
  51. package/dist/tsconfig.build.tsbuildinfo +1 -1
  52. package/package.json +2 -2
@@ -60,6 +60,13 @@ __decorate([
60
60
  (0, class_transformer_1.Expose)(),
61
61
  __metadata("design:type", Number)
62
62
  ], CreateOrderDto.prototype, "children", void 0);
63
+ __decorate([
64
+ (0, class_validator_1.IsOptional)(),
65
+ (0, class_validator_1.IsInt)(),
66
+ (0, class_validator_1.Min)(0),
67
+ (0, class_transformer_1.Expose)(),
68
+ __metadata("design:type", Number)
69
+ ], CreateOrderDto.prototype, "reducedPlayers", void 0);
63
70
  __decorate([
64
71
  (0, class_validator_1.IsOptional)(),
65
72
  (0, class_transformer_1.Expose)(),
@@ -8,6 +8,7 @@ import { QuestroomCancelationTypeEnum } from '../questroom/enum/questroom-cancel
8
8
  import { Languages } from '../shared/enum/languages.enum';
9
9
  import { RO } from '../shared/ro-class';
10
10
  import { SourceEnum } from '../shared/source.enum';
11
+ import { TariffReducedRateModeEnum } from '../tariff/enum/tariff-reduced-rate-mode.enum';
11
12
  import { TransactionSourceEnum } from '../transaction/enum/transaction-source.enum';
12
13
  import { TransactionTypeEnum } from '../transaction/enum/transaction-type.enum';
13
14
  import { UserMessageResponseObject } from '../user-message/user-message.ro';
@@ -245,6 +246,17 @@ export declare class OrderRO extends RO {
245
246
  groupShare?: number;
246
247
  players: number;
247
248
  children: number;
249
+ /** Сколько мест из `players` идёт по льготной ставке (школьники и т.п.). */
250
+ reducedPlayers: number;
251
+ /**
252
+ * Снимок льготной ставки и минимальной стоимости игры с тарифа. Пикер в
253
+ * карточке брони считает по ним лимит льготных мест, поэтому смотрит на
254
+ * условия, действовавшие при бронировании, а не на текущий тариф.
255
+ */
256
+ minGameAmount: number;
257
+ reducedRateMode?: TariffReducedRateModeEnum | null;
258
+ reducedRate: number;
259
+ reducedTitle?: string | null;
248
260
  /**
249
261
  * Состав группы не определён — гость записался «Определимся на месте».
250
262
  * `players` = минимальный состав, `total` — базовая стоимость «от».
@@ -23,6 +23,7 @@ const questroom_cancelation_type_enum_1 = require("../questroom/enum/questroom-c
23
23
  const languages_enum_1 = require("../shared/enum/languages.enum");
24
24
  const ro_class_1 = require("../shared/ro-class");
25
25
  const source_enum_1 = require("../shared/source.enum");
26
+ const tariff_reduced_rate_mode_enum_1 = require("../tariff/enum/tariff-reduced-rate-mode.enum");
26
27
  const transaction_source_enum_1 = require("../transaction/enum/transaction-source.enum");
27
28
  const transaction_type_enum_1 = require("../transaction/enum/transaction-type.enum");
28
29
  const client_cancel_reason_enum_1 = require("./enum/client-cancel-reason.enum");
@@ -568,6 +569,26 @@ __decorate([
568
569
  (0, class_transformer_1.Expose)(),
569
570
  __metadata("design:type", Number)
570
571
  ], OrderRO.prototype, "children", void 0);
572
+ __decorate([
573
+ (0, class_transformer_1.Expose)(),
574
+ __metadata("design:type", Number)
575
+ ], OrderRO.prototype, "reducedPlayers", void 0);
576
+ __decorate([
577
+ (0, class_transformer_1.Expose)(),
578
+ __metadata("design:type", Number)
579
+ ], OrderRO.prototype, "minGameAmount", void 0);
580
+ __decorate([
581
+ (0, class_transformer_1.Expose)(),
582
+ __metadata("design:type", String)
583
+ ], OrderRO.prototype, "reducedRateMode", void 0);
584
+ __decorate([
585
+ (0, class_transformer_1.Expose)(),
586
+ __metadata("design:type", Number)
587
+ ], OrderRO.prototype, "reducedRate", void 0);
588
+ __decorate([
589
+ (0, class_transformer_1.Expose)(),
590
+ __metadata("design:type", String)
591
+ ], OrderRO.prototype, "reducedTitle", void 0);
571
592
  __decorate([
572
593
  (0, class_transformer_1.Expose)(),
573
594
  __metadata("design:type", Boolean)
@@ -15,6 +15,12 @@ export declare class UpdateOrderSlotDto {
15
15
  * When omitted, the existing order children value is preserved.
16
16
  */
17
17
  children?: number;
18
+ /**
19
+ * Optional new reduced-rate seats count. When omitted, the existing order
20
+ * value is preserved (and re-validated against the new tariff's minimum
21
+ * game price — a cheaper tariff may fit fewer reduced seats).
22
+ */
23
+ reducedPlayers?: number;
18
24
  /**
19
25
  * Free-form text describing the resolved variation/duration (e.g. the
20
26
  * variation title for fix slots or `${duration} мин` for flex slots).
@@ -59,6 +59,13 @@ __decorate([
59
59
  (0, class_transformer_1.Expose)(),
60
60
  __metadata("design:type", Number)
61
61
  ], UpdateOrderSlotDto.prototype, "children", void 0);
62
+ __decorate([
63
+ (0, class_validator_1.IsOptional)(),
64
+ (0, class_validator_1.IsInt)(),
65
+ (0, class_validator_1.Min)(0),
66
+ (0, class_transformer_1.Expose)(),
67
+ __metadata("design:type", Number)
68
+ ], UpdateOrderSlotDto.prototype, "reducedPlayers", void 0);
62
69
  __decorate([
63
70
  (0, class_validator_1.IsOptional)(),
64
71
  (0, class_validator_1.IsString)(),
@@ -1,4 +1,10 @@
1
1
  export declare class UpdatePlayersrDto {
2
2
  players: number;
3
3
  children: number;
4
+ /**
5
+ * Сколько мест идёт по льготной ставке. Не передан — оставляем как было
6
+ * (эндпоинт правит только состав). Верхнюю границу считает бэк из
7
+ * минимальной стоимости игры, а не доверяет клиенту.
8
+ */
9
+ reducedPlayers?: number;
4
10
  }
@@ -25,3 +25,10 @@ __decorate([
25
25
  (0, class_transformer_1.Expose)(),
26
26
  __metadata("design:type", Number)
27
27
  ], UpdatePlayersrDto.prototype, "children", void 0);
28
+ __decorate([
29
+ (0, class_validator_1.IsOptional)(),
30
+ (0, class_validator_1.IsInt)(),
31
+ (0, class_validator_1.Min)(0),
32
+ (0, class_transformer_1.Expose)(),
33
+ __metadata("design:type", Number)
34
+ ], UpdatePlayersrDto.prototype, "reducedPlayers", void 0);
@@ -11,6 +11,7 @@ export declare class UpdateWidgetCustomizationDto {
11
11
  view: WidgetViewEnum;
12
12
  showPricesInSchedule: boolean;
13
13
  showCertificatesButton: boolean;
14
+ filledSlots: boolean;
14
15
  mainColor: string;
15
16
  roundness: WidgetRoundnessEnum;
16
17
  maxWidth: number;
@@ -20,6 +20,7 @@ exports.WIDGET_MIN_MAX_WIDTH = 480;
20
20
  exports.WIDGET_MAX_MAX_WIDTH = 1600;
21
21
  class UpdateWidgetCustomizationDto {
22
22
  constructor() {
23
+ this.filledSlots = true;
23
24
  this.maxWidth = exports.WIDGET_DEFAULT_MAX_WIDTH;
24
25
  }
25
26
  }
@@ -54,6 +55,12 @@ __decorate([
54
55
  (0, class_transformer_1.Expose)(),
55
56
  __metadata("design:type", Boolean)
56
57
  ], UpdateWidgetCustomizationDto.prototype, "showCertificatesButton", void 0);
58
+ __decorate([
59
+ (0, class_transformer_1.Transform)(({ value }) => (value === '' || value === null || value === undefined ? true : value)),
60
+ (0, class_validator_1.IsBoolean)(),
61
+ (0, class_transformer_1.Expose)(),
62
+ __metadata("design:type", Boolean)
63
+ ], UpdateWidgetCustomizationDto.prototype, "filledSlots", void 0);
57
64
  __decorate([
58
65
  (0, class_validator_1.IsHexColor)(),
59
66
  (0, class_transformer_1.Expose)(),
@@ -6,6 +6,8 @@ export declare class WidgetCustomizationRO {
6
6
  showWrapper: boolean;
7
7
  showPricesInSchedule: boolean;
8
8
  showCertificatesButton: boolean;
9
+ /** Залитые слоты (фон) или только обводка. Старые записи без поля — залитые. */
10
+ filledSlots?: boolean;
9
11
  mainColor: string;
10
12
  style: WidgetStyleEnum;
11
13
  view: WidgetViewEnum;
@@ -33,6 +33,10 @@ __decorate([
33
33
  (0, class_transformer_1.Expose)(),
34
34
  __metadata("design:type", Boolean)
35
35
  ], WidgetCustomizationRO.prototype, "showCertificatesButton", void 0);
36
+ __decorate([
37
+ (0, class_transformer_1.Expose)(),
38
+ __metadata("design:type", Boolean)
39
+ ], WidgetCustomizationRO.prototype, "filledSlots", void 0);
36
40
  __decorate([
37
41
  (0, class_transformer_1.Expose)(),
38
42
  __metadata("design:type", String)
@@ -1,3 +1,4 @@
1
+ import { TariffReducedRateModeEnum } from './enum/tariff-reduced-rate-mode.enum';
1
2
  export declare class CreateTariffDto {
2
3
  title: string;
3
4
  price: {
@@ -13,4 +14,23 @@ export declare class CreateTariffDto {
13
14
  clientTitle?: string;
14
15
  clientDescription?: string;
15
16
  childPriceDescription?: string | null;
17
+ /**
18
+ * Минимальная стоимость игры в минорных единицах: ниже этой суммы бронь
19
+ * не опускается ни за счёт льготных мест, ни за счёт детской цены, ни
20
+ * скидками. 0 — минимума нет (прежнее поведение).
21
+ */
22
+ minGameAmount?: number;
23
+ /**
24
+ * Включает льготные места внутри одной брони. `null` — тариф без льготной
25
+ * ставки, состав считается как раньше.
26
+ */
27
+ reducedRateMode?: TariffReducedRateModeEnum | null;
28
+ /**
29
+ * При `DELTA` — насколько льготный гость дешевле обычного, при `FIXED` —
30
+ * цена льготного гостя. Минорные единицы.
31
+ */
32
+ reducedRate?: number;
33
+ /** Название льготной категории для гостя: «Школьники», «Studenten». */
34
+ reducedTitle?: string | null;
35
+ reducedPriceDescription?: string | null;
16
36
  }
@@ -14,6 +14,7 @@ exports.CreateTariffDto = void 0;
14
14
  const class_transformer_1 = require("class-transformer");
15
15
  const class_validator_1 = require("class-validator");
16
16
  const is_not_blank_1 = require("../shared/is-not-blank");
17
+ const tariff_reduced_rate_mode_enum_1 = require("./enum/tariff-reduced-rate-mode.enum");
17
18
  class CreateTariffDto {
18
19
  }
19
20
  exports.CreateTariffDto = CreateTariffDto;
@@ -58,3 +59,36 @@ __decorate([
58
59
  (0, class_transformer_1.Expose)(),
59
60
  __metadata("design:type", String)
60
61
  ], CreateTariffDto.prototype, "childPriceDescription", void 0);
62
+ __decorate([
63
+ (0, class_validator_1.IsOptional)(),
64
+ (0, class_validator_1.IsInt)(),
65
+ (0, class_validator_1.Min)(0),
66
+ (0, class_transformer_1.Expose)(),
67
+ __metadata("design:type", Number)
68
+ ], CreateTariffDto.prototype, "minGameAmount", void 0);
69
+ __decorate([
70
+ (0, class_validator_1.IsOptional)(),
71
+ (0, class_validator_1.IsEnum)(tariff_reduced_rate_mode_enum_1.TariffReducedRateModeEnum),
72
+ (0, class_transformer_1.Expose)(),
73
+ __metadata("design:type", String)
74
+ ], CreateTariffDto.prototype, "reducedRateMode", void 0);
75
+ __decorate([
76
+ (0, class_validator_1.ValidateIf)(({ reducedRateMode }) => !!reducedRateMode),
77
+ (0, class_validator_1.IsInt)(),
78
+ (0, class_validator_1.Min)(1),
79
+ (0, class_transformer_1.Expose)(),
80
+ __metadata("design:type", Number)
81
+ ], CreateTariffDto.prototype, "reducedRate", void 0);
82
+ __decorate([
83
+ (0, class_validator_1.ValidateIf)(({ reducedRateMode }) => !!reducedRateMode),
84
+ (0, is_not_blank_1.IsNotBlank)(),
85
+ (0, class_transformer_1.Expose)(),
86
+ __metadata("design:type", String)
87
+ ], CreateTariffDto.prototype, "reducedTitle", void 0);
88
+ __decorate([
89
+ (0, class_validator_1.IsOptional)(),
90
+ (0, class_validator_1.IsString)(),
91
+ (0, class_validator_1.MaxLength)(500),
92
+ (0, class_transformer_1.Expose)(),
93
+ __metadata("design:type", String)
94
+ ], CreateTariffDto.prototype, "reducedPriceDescription", void 0);
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Как задана льготная ставка (школьники, студенты, пенсионеры) в тарифе.
3
+ *
4
+ * `DELTA` описывает шкалу, которая едет вместе с прайсом: льготный гость
5
+ * всегда дешевле обычного на фиксированную сумму, поэтому при повышении цен
6
+ * льготную колонку не надо переписывать. `FIXED` — абсолютная ставка за
7
+ * льготного гостя независимо от состава.
8
+ */
9
+ export declare enum TariffReducedRateModeEnum {
10
+ DELTA = "delta",
11
+ FIXED = "fixed"
12
+ }
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TariffReducedRateModeEnum = void 0;
4
+ /**
5
+ * Как задана льготная ставка (школьники, студенты, пенсионеры) в тарифе.
6
+ *
7
+ * `DELTA` описывает шкалу, которая едет вместе с прайсом: льготный гость
8
+ * всегда дешевле обычного на фиксированную сумму, поэтому при повышении цен
9
+ * льготную колонку не надо переписывать. `FIXED` — абсолютная ставка за
10
+ * льготного гостя независимо от состава.
11
+ */
12
+ var TariffReducedRateModeEnum;
13
+ (function (TariffReducedRateModeEnum) {
14
+ TariffReducedRateModeEnum["DELTA"] = "delta";
15
+ TariffReducedRateModeEnum["FIXED"] = "fixed";
16
+ })(TariffReducedRateModeEnum || (exports.TariffReducedRateModeEnum = TariffReducedRateModeEnum = {}));
@@ -1,14 +1,17 @@
1
1
  import { OpenapiTariffRO } from '../openapi/shared/openapi-tariff.ro';
2
+ import { TariffReducedRateModeEnum } from './enum/tariff-reduced-rate-mode.enum';
2
3
  /**
3
4
  * Лёгкий RO тарифа для bootstrap'а. В сторе нужны:
4
5
  * - `title` / `clientTitle` (отображение в Select'ах и `slots/*` модалках),
5
6
  * - `price` (jsonb `{playersN: priceInMinor}` — `TariffColumns`,
6
7
  * `getPricesPlayersArray`, `<PriceRange />` на settings-странице),
7
8
  * - `isVariationEligible` (slot template/autocomplete),
8
- * - `saved` (settings-страница skрывает удалённые тарифы).
9
- * Поля `profileId`, `clientDescription`, `childPriceDescription`
10
- * нужны только в `TariffModal` (full RO через `useGetOne`) или
11
- * вообще только в widget'е.
9
+ * - `saved` (settings-страница skрывает удалённые тарифы),
10
+ * - `minGameAmount` / `reduced*` (пикеры считают лимит льготных мест из
11
+ * минимума, а не из отдельной настройки см. `reduced-price`).
12
+ * Поля `profileId`, `clientDescription`, `childPriceDescription`,
13
+ * `reducedPriceDescription` нужны только в `TariffModal` (full RO через
14
+ * `useGetOne`) или вообще только в widget'е.
12
15
  */
13
16
  export declare class TariffLightRO {
14
17
  id: number;
@@ -18,4 +21,8 @@ export declare class TariffLightRO {
18
21
  isVariationEligible: boolean;
19
22
  availableInWidget: boolean;
20
23
  clientTitle?: string;
24
+ minGameAmount: number;
25
+ reducedRateMode?: TariffReducedRateModeEnum | null;
26
+ reducedRate: number;
27
+ reducedTitle?: string | null;
21
28
  }
@@ -12,16 +12,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.TariffLightRO = void 0;
13
13
  const class_transformer_1 = require("class-transformer");
14
14
  const openapi_tariff_ro_1 = require("../openapi/shared/openapi-tariff.ro");
15
+ const tariff_reduced_rate_mode_enum_1 = require("./enum/tariff-reduced-rate-mode.enum");
15
16
  /**
16
17
  * Лёгкий RO тарифа для bootstrap'а. В сторе нужны:
17
18
  * - `title` / `clientTitle` (отображение в Select'ах и `slots/*` модалках),
18
19
  * - `price` (jsonb `{playersN: priceInMinor}` — `TariffColumns`,
19
20
  * `getPricesPlayersArray`, `<PriceRange />` на settings-странице),
20
21
  * - `isVariationEligible` (slot template/autocomplete),
21
- * - `saved` (settings-страница skрывает удалённые тарифы).
22
- * Поля `profileId`, `clientDescription`, `childPriceDescription`
23
- * нужны только в `TariffModal` (full RO через `useGetOne`) или
24
- * вообще только в widget'е.
22
+ * - `saved` (settings-страница skрывает удалённые тарифы),
23
+ * - `minGameAmount` / `reduced*` (пикеры считают лимит льготных мест из
24
+ * минимума, а не из отдельной настройки см. `reduced-price`).
25
+ * Поля `profileId`, `clientDescription`, `childPriceDescription`,
26
+ * `reducedPriceDescription` нужны только в `TariffModal` (full RO через
27
+ * `useGetOne`) или вообще только в widget'е.
25
28
  */
26
29
  class TariffLightRO {
27
30
  }
@@ -54,3 +57,19 @@ __decorate([
54
57
  (0, class_transformer_1.Expose)(),
55
58
  __metadata("design:type", String)
56
59
  ], TariffLightRO.prototype, "clientTitle", void 0);
60
+ __decorate([
61
+ (0, class_transformer_1.Expose)(),
62
+ __metadata("design:type", Number)
63
+ ], TariffLightRO.prototype, "minGameAmount", void 0);
64
+ __decorate([
65
+ (0, class_transformer_1.Expose)(),
66
+ __metadata("design:type", String)
67
+ ], TariffLightRO.prototype, "reducedRateMode", void 0);
68
+ __decorate([
69
+ (0, class_transformer_1.Expose)(),
70
+ __metadata("design:type", Number)
71
+ ], TariffLightRO.prototype, "reducedRate", void 0);
72
+ __decorate([
73
+ (0, class_transformer_1.Expose)(),
74
+ __metadata("design:type", String)
75
+ ], TariffLightRO.prototype, "reducedTitle", void 0);
@@ -3,4 +3,5 @@ export declare class TariffRO extends TariffLightRO {
3
3
  profileId: number;
4
4
  clientDescription?: string;
5
5
  childPriceDescription?: string | null;
6
+ reducedPriceDescription?: string | null;
6
7
  }
@@ -27,3 +27,7 @@ __decorate([
27
27
  (0, class_transformer_1.Expose)(),
28
28
  __metadata("design:type", String)
29
29
  ], TariffRO.prototype, "childPriceDescription", void 0);
30
+ __decorate([
31
+ (0, class_transformer_1.Expose)(),
32
+ __metadata("design:type", String)
33
+ ], TariffRO.prototype, "reducedPriceDescription", void 0);