@escapenavigator/types 1.10.129 → 1.10.131

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 (74) hide show
  1. package/dist/certificate-v2/certificate-settings.ro.d.ts +2 -0
  2. package/dist/certificate-v2/certificate-settings.ro.js +8 -0
  3. package/dist/certificate-v2/update-certificate-settings.dto.d.ts +2 -0
  4. package/dist/certificate-v2/update-certificate-settings.dto.js +12 -0
  5. package/dist/email-builder/index.d.ts +18 -0
  6. package/dist/email-builder/index.js +48 -20
  7. package/dist/emails/index.d.ts +21 -0
  8. package/dist/openapi/certificates-v2/openapi-certificates-shop.ro.d.ts +2 -0
  9. package/dist/openapi/certificates-v2/openapi-certificates-shop.ro.js +8 -0
  10. package/dist/openapi/morty/morty-attraction.ro.d.ts +26 -0
  11. package/dist/openapi/morty/morty-attraction.ro.js +91 -0
  12. package/dist/openapi/morty/morty-attractions-query.dto.d.ts +8 -0
  13. package/dist/openapi/morty/morty-attractions-query.dto.js +29 -0
  14. package/dist/openapi/morty/morty-booking.ro.d.ts +13 -0
  15. package/dist/openapi/morty/morty-booking.ro.js +45 -0
  16. package/dist/openapi/morty/morty-create-booking.dto.d.ts +42 -0
  17. package/dist/openapi/morty/morty-create-booking.dto.js +122 -0
  18. package/dist/openapi/morty/morty-timeslot.ro.d.ts +49 -0
  19. package/dist/openapi/morty/morty-timeslot.ro.js +129 -0
  20. package/dist/openapi/morty/morty-timeslots-query.dto.d.ts +21 -0
  21. package/dist/openapi/morty/morty-timeslots-query.dto.js +48 -0
  22. package/dist/openapi/shared/openapi-questroom.ro.d.ts +2 -41
  23. package/dist/openapi/shared/openapi-questroom.ro.js +8 -4
  24. package/dist/openapi/widget/openapi-resolve-promocode.ro.d.ts +7 -0
  25. package/dist/openapi/widget/openapi-resolve-promocode.ro.js +5 -0
  26. package/dist/openapi/widget/openapi-widget-info.ro.js +5 -1
  27. package/dist/order/create-order.dto.d.ts +12 -0
  28. package/dist/order/create-order.dto.js +6 -0
  29. package/dist/profile/birthday-marketing/birthday-marketing.dto.d.ts +6 -0
  30. package/dist/profile/birthday-marketing/birthday-marketing.dto.js +6 -0
  31. package/dist/profile/cross-sale/cross-sale.dto.d.ts +8 -0
  32. package/dist/profile/cross-sale/cross-sale.dto.js +6 -0
  33. package/dist/profile/cross-sale/cross-sale.ro.d.ts +2 -0
  34. package/dist/profile/cross-sale/cross-sale.ro.js +4 -0
  35. package/dist/profile/custom-client-booking-email/custom-client-booking-email.dto.d.ts +11 -0
  36. package/dist/profile/custom-client-booking-email/custom-client-booking-email.dto.js +6 -0
  37. package/dist/profile/custom-client-booking-email/custom-client-booking-email.ro.d.ts +9 -0
  38. package/dist/profile/custom-client-booking-email/custom-client-booking-email.ro.js +4 -0
  39. package/dist/profile/marketing-email/preview-campaign-v2.dto.d.ts +37 -0
  40. package/dist/profile/marketing-email/preview-campaign-v2.dto.js +43 -1
  41. package/dist/promocode/create-promocode.dto.d.ts +7 -0
  42. package/dist/promocode/create-promocode.dto.js +8 -0
  43. package/dist/promocode/emun/promocode-certificate-mode.enum.d.ts +18 -0
  44. package/dist/promocode/emun/promocode-certificate-mode.enum.js +22 -0
  45. package/dist/promocode/promocode-nominal-rule.d.ts +14 -5
  46. package/dist/promocode/promocode.ro.d.ts +2 -0
  47. package/dist/promocode/promocode.ro.js +5 -0
  48. package/dist/questroom/create-questroom-admin.dto.d.ts +1 -0
  49. package/dist/questroom/create-questroom-admin.dto.js +12 -5
  50. package/dist/questroom/create-questroom.dto.js +10 -6
  51. package/dist/questroom/enum/questroom-type.enum.d.ts +2 -1
  52. package/dist/questroom/enum/questroom-type.enum.js +1 -0
  53. package/dist/questroom/lounge-questroom.d.ts +11 -0
  54. package/dist/questroom/lounge-questroom.js +36 -0
  55. package/dist/questroom/questrooms-list-admin.ro.d.ts +2 -0
  56. package/dist/questroom/questrooms-list-admin.ro.js +8 -0
  57. package/dist/questroom-scenario-email/create-questroom-scenario-email.dto.d.ts +13 -0
  58. package/dist/questroom-scenario-email/create-questroom-scenario-email.dto.js +6 -0
  59. package/dist/questroom-scenario-email/questroom-scenario-email.ro.d.ts +2 -0
  60. package/dist/questroom-scenario-email/questroom-scenario-email.ro.js +4 -0
  61. package/dist/shared/source.enum.d.ts +1 -0
  62. package/dist/shared/source.enum.js +1 -0
  63. package/dist/tsconfig.build.tsbuildinfo +1 -1
  64. package/dist/widget-sessions/widget-session-attach-order.dto.d.ts +11 -0
  65. package/dist/widget-sessions/widget-session-attach-order.dto.js +42 -0
  66. package/dist/widget-sessions/widget-session-events.ro.d.ts +8 -0
  67. package/dist/widget-sessions/widget-session-events.ro.js +2 -0
  68. package/dist/widget-sessions/widget-session-query.dto.d.ts +15 -0
  69. package/dist/widget-sessions/widget-session-query.dto.js +63 -0
  70. package/dist/widget-sessions/widget-session-update.dto.d.ts +6 -0
  71. package/dist/widget-sessions/widget-session-update.dto.js +27 -0
  72. package/dist/widget-sessions/widget-session.ro.d.ts +50 -0
  73. package/dist/widget-sessions/widget-session.ro.js +2 -0
  74. package/package.json +2 -2
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Прайсинг по количеству игроков. Ключ — количество игроков, значение —
3
+ * цена за всю группу указанного размера в основной валюте профиля
4
+ * (например USD/EUR/RUB), не в minor units.
5
+ *
6
+ * Пример: { "2": 60, "3": 75, "4": 90 } — значит группа из 2 человек
7
+ * стоит 60$, из 3 — 75$ и т.д.
8
+ */
9
+ export declare class MortyTimeslotPriceRO {
10
+ players: number;
11
+ price: number;
12
+ }
13
+ /**
14
+ * Слот в формате Morty.
15
+ *
16
+ * Поле `id` — глобально-уникальный идентификатор слота, чтобы у двух
17
+ * разных квестов никогда не совпадал id одного и того же
18
+ * времени/даты. Используется наш внутренний `slot.id`.
19
+ *
20
+ * Статус слота:
21
+ * - `is_free=true` — слот свободен и доступен для бронирования
22
+ * - `is_call_to_book=true` — нужно звонить (по нашему статусу `call`)
23
+ * - `is_blocked=true` — слот заблокирован (busy/no-resources/done)
24
+ *
25
+ * `deadline` — UTC ISO timestamp, до которого ещё можно бронировать
26
+ * этот слот (с учётом правил `minMinutesForBooking`/блокировки), —
27
+ * Morty использует это поле для отсечки last-minute бронирований.
28
+ */
29
+ export declare class MortyTimeslotRO {
30
+ id: string;
31
+ product_id: number;
32
+ date: string;
33
+ start_time: string;
34
+ end_time: string;
35
+ start_at: string;
36
+ timezone: string;
37
+ duration_minutes: number;
38
+ is_free: boolean;
39
+ is_call_to_book: boolean;
40
+ is_blocked: boolean;
41
+ is_private: boolean;
42
+ seats_available: number;
43
+ players_min: number;
44
+ players_max: number;
45
+ currency: string;
46
+ price_from: number;
47
+ prices: MortyTimeslotPriceRO[];
48
+ deadline: string | null;
49
+ }
@@ -0,0 +1,129 @@
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.MortyTimeslotRO = exports.MortyTimeslotPriceRO = void 0;
13
+ /* eslint-disable max-classes-per-file */
14
+ const class_transformer_1 = require("class-transformer");
15
+ /**
16
+ * Прайсинг по количеству игроков. Ключ — количество игроков, значение —
17
+ * цена за всю группу указанного размера в основной валюте профиля
18
+ * (например USD/EUR/RUB), не в minor units.
19
+ *
20
+ * Пример: { "2": 60, "3": 75, "4": 90 } — значит группа из 2 человек
21
+ * стоит 60$, из 3 — 75$ и т.д.
22
+ */
23
+ class MortyTimeslotPriceRO {
24
+ }
25
+ exports.MortyTimeslotPriceRO = MortyTimeslotPriceRO;
26
+ __decorate([
27
+ (0, class_transformer_1.Expose)(),
28
+ __metadata("design:type", Number)
29
+ ], MortyTimeslotPriceRO.prototype, "players", void 0);
30
+ __decorate([
31
+ (0, class_transformer_1.Expose)(),
32
+ __metadata("design:type", Number)
33
+ ], MortyTimeslotPriceRO.prototype, "price", void 0);
34
+ /**
35
+ * Слот в формате Morty.
36
+ *
37
+ * Поле `id` — глобально-уникальный идентификатор слота, чтобы у двух
38
+ * разных квестов никогда не совпадал id одного и того же
39
+ * времени/даты. Используется наш внутренний `slot.id`.
40
+ *
41
+ * Статус слота:
42
+ * - `is_free=true` — слот свободен и доступен для бронирования
43
+ * - `is_call_to_book=true` — нужно звонить (по нашему статусу `call`)
44
+ * - `is_blocked=true` — слот заблокирован (busy/no-resources/done)
45
+ *
46
+ * `deadline` — UTC ISO timestamp, до которого ещё можно бронировать
47
+ * этот слот (с учётом правил `minMinutesForBooking`/блокировки), —
48
+ * Morty использует это поле для отсечки last-minute бронирований.
49
+ */
50
+ class MortyTimeslotRO {
51
+ }
52
+ exports.MortyTimeslotRO = MortyTimeslotRO;
53
+ __decorate([
54
+ (0, class_transformer_1.Expose)(),
55
+ __metadata("design:type", String)
56
+ ], MortyTimeslotRO.prototype, "id", void 0);
57
+ __decorate([
58
+ (0, class_transformer_1.Expose)(),
59
+ __metadata("design:type", Number)
60
+ ], MortyTimeslotRO.prototype, "product_id", void 0);
61
+ __decorate([
62
+ (0, class_transformer_1.Expose)(),
63
+ __metadata("design:type", String)
64
+ ], MortyTimeslotRO.prototype, "date", void 0);
65
+ __decorate([
66
+ (0, class_transformer_1.Expose)(),
67
+ __metadata("design:type", String)
68
+ ], MortyTimeslotRO.prototype, "start_time", void 0);
69
+ __decorate([
70
+ (0, class_transformer_1.Expose)(),
71
+ __metadata("design:type", String)
72
+ ], MortyTimeslotRO.prototype, "end_time", void 0);
73
+ __decorate([
74
+ (0, class_transformer_1.Expose)(),
75
+ __metadata("design:type", String)
76
+ ], MortyTimeslotRO.prototype, "start_at", void 0);
77
+ __decorate([
78
+ (0, class_transformer_1.Expose)(),
79
+ __metadata("design:type", String)
80
+ ], MortyTimeslotRO.prototype, "timezone", void 0);
81
+ __decorate([
82
+ (0, class_transformer_1.Expose)(),
83
+ __metadata("design:type", Number)
84
+ ], MortyTimeslotRO.prototype, "duration_minutes", void 0);
85
+ __decorate([
86
+ (0, class_transformer_1.Expose)(),
87
+ __metadata("design:type", Boolean)
88
+ ], MortyTimeslotRO.prototype, "is_free", void 0);
89
+ __decorate([
90
+ (0, class_transformer_1.Expose)(),
91
+ __metadata("design:type", Boolean)
92
+ ], MortyTimeslotRO.prototype, "is_call_to_book", void 0);
93
+ __decorate([
94
+ (0, class_transformer_1.Expose)(),
95
+ __metadata("design:type", Boolean)
96
+ ], MortyTimeslotRO.prototype, "is_blocked", void 0);
97
+ __decorate([
98
+ (0, class_transformer_1.Expose)(),
99
+ __metadata("design:type", Boolean)
100
+ ], MortyTimeslotRO.prototype, "is_private", void 0);
101
+ __decorate([
102
+ (0, class_transformer_1.Expose)(),
103
+ __metadata("design:type", Number)
104
+ ], MortyTimeslotRO.prototype, "seats_available", void 0);
105
+ __decorate([
106
+ (0, class_transformer_1.Expose)(),
107
+ __metadata("design:type", Number)
108
+ ], MortyTimeslotRO.prototype, "players_min", void 0);
109
+ __decorate([
110
+ (0, class_transformer_1.Expose)(),
111
+ __metadata("design:type", Number)
112
+ ], MortyTimeslotRO.prototype, "players_max", void 0);
113
+ __decorate([
114
+ (0, class_transformer_1.Expose)(),
115
+ __metadata("design:type", String)
116
+ ], MortyTimeslotRO.prototype, "currency", void 0);
117
+ __decorate([
118
+ (0, class_transformer_1.Expose)(),
119
+ __metadata("design:type", Number)
120
+ ], MortyTimeslotRO.prototype, "price_from", void 0);
121
+ __decorate([
122
+ (0, class_transformer_1.Expose)(),
123
+ (0, class_transformer_1.Type)(() => MortyTimeslotPriceRO),
124
+ __metadata("design:type", Array)
125
+ ], MortyTimeslotRO.prototype, "prices", void 0);
126
+ __decorate([
127
+ (0, class_transformer_1.Expose)(),
128
+ __metadata("design:type", String)
129
+ ], MortyTimeslotRO.prototype, "deadline", void 0);
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Query для `GET /morty/attractions/:profileId/timeslots`.
3
+ *
4
+ * Все поля опциональные: если ничего не передано, отдадим слоты на
5
+ * 14 дней вперёд по всем активным аттракционам профиля.
6
+ */
7
+ export declare class MortyTimeslotsQueryDto {
8
+ from?: string;
9
+ to?: string;
10
+ /**
11
+ * Внутренний `questroom.id`. Опциональный — без него вернутся слоты
12
+ * по всем квестам профиля.
13
+ */
14
+ product_id?: number;
15
+ /**
16
+ * `true` — выкинуть из выдачи `is_blocked=true` слоты. По умолчанию
17
+ * Morty просит отдавать всё, чтобы видеть «закрытые» / «call only»
18
+ * времена.
19
+ */
20
+ only_available?: boolean;
21
+ }
@@ -0,0 +1,48 @@
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.MortyTimeslotsQueryDto = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const class_validator_1 = require("class-validator");
15
+ /**
16
+ * Query для `GET /morty/attractions/:profileId/timeslots`.
17
+ *
18
+ * Все поля опциональные: если ничего не передано, отдадим слоты на
19
+ * 14 дней вперёд по всем активным аттракционам профиля.
20
+ */
21
+ class MortyTimeslotsQueryDto {
22
+ }
23
+ exports.MortyTimeslotsQueryDto = MortyTimeslotsQueryDto;
24
+ __decorate([
25
+ (0, class_transformer_1.Expose)(),
26
+ (0, class_validator_1.IsOptional)(),
27
+ (0, class_validator_1.Matches)(/^\d{4}-\d{2}-\d{2}$/),
28
+ __metadata("design:type", String)
29
+ ], MortyTimeslotsQueryDto.prototype, "from", void 0);
30
+ __decorate([
31
+ (0, class_transformer_1.Expose)(),
32
+ (0, class_validator_1.IsOptional)(),
33
+ (0, class_validator_1.Matches)(/^\d{4}-\d{2}-\d{2}$/),
34
+ __metadata("design:type", String)
35
+ ], MortyTimeslotsQueryDto.prototype, "to", void 0);
36
+ __decorate([
37
+ (0, class_transformer_1.Expose)(),
38
+ (0, class_validator_1.IsOptional)(),
39
+ (0, class_transformer_1.Transform)(({ value }) => (value === undefined || value === null ? value : Number(value))),
40
+ (0, class_validator_1.IsPositive)(),
41
+ __metadata("design:type", Number)
42
+ ], MortyTimeslotsQueryDto.prototype, "product_id", void 0);
43
+ __decorate([
44
+ (0, class_transformer_1.Expose)(),
45
+ (0, class_validator_1.IsOptional)(),
46
+ (0, class_transformer_1.Transform)(({ value }) => value === 'true' || value === true),
47
+ __metadata("design:type", Boolean)
48
+ ], MortyTimeslotsQueryDto.prototype, "only_available", void 0);
@@ -3,48 +3,9 @@ import { QuestroomTypeEnum } from '../../questroom/enum/questroom-type.enum';
3
3
  import { Languages } from '../../shared/enum/languages.enum';
4
4
  import { SlotTemplateType } from '../../slot-template/slot-template-type';
5
5
  export declare const transformQuestroom: ({ value, language, }: {
6
- value: OpenapiQuestroomRO;
6
+ value: OpenapiQuestroomRO | undefined | null;
7
7
  language: any;
8
- }) => {
9
- title: string;
10
- importantInfo: string;
11
- location: {
12
- howToFind: string;
13
- prepareText: string;
14
- address: string;
15
- phone: string;
16
- sortPosition: number;
17
- timeZone: string;
18
- };
19
- id: number;
20
- fear: number;
21
- difficult: number;
22
- photo: string;
23
- time: number;
24
- ticketSystem: boolean;
25
- /**
26
- * Type of the linked SlotTemplate (`fixed` or `flex`). Denormalized from
27
- * `SlotTemplate.type` so widgets can branch on the schedule kind without
28
- * an extra fetch.
29
- */
30
- templateType?: SlotTemplateType;
31
- type: QuestroomTypeEnum;
32
- confirmType: QuestroomConfirmTypeEnum;
33
- playersMax: number;
34
- disabledLanguages: Languages[];
35
- playersMin: number;
36
- sortPosition: number;
37
- onlinePaymentsCashbox: number;
38
- squareCashbox: number;
39
- daysForBooking: number;
40
- bsCashbox: number;
41
- paypalCashbox: number;
42
- modes: Mode[];
43
- minAge: number;
44
- flexPlayersSelect: boolean;
45
- slotStepMinutes: number;
46
- questOpeningDate?: string;
47
- };
8
+ }) => any;
48
9
  declare class QuestroomLocale {
49
10
  title: string;
50
11
  legend: string;
@@ -28,10 +28,14 @@ const questroom_type_enum_1 = require("../../questroom/enum/questroom-type.enum"
28
28
  const languages_enum_1 = require("../../shared/enum/languages.enum");
29
29
  const transformQuestroom = ({ value, language, }) => {
30
30
  var _a, _b, _c, _d;
31
- const { locales } = value, _e = value.location, { locales: locationLocales } = _e, location = __rest(_e, ["locales"]), questroom = __rest(value, ["locales", "location"]);
32
- return Object.assign(Object.assign({}, questroom), { title: ((_a = locales === null || locales === void 0 ? void 0 : locales.find((l) => l.language === language)) === null || _a === void 0 ? void 0 : _a.title) || questroom.title, importantInfo: ((_b = locales === null || locales === void 0 ? void 0 : locales.find((l) => l.language === language)) === null || _b === void 0 ? void 0 : _b.importantInfo) || questroom.importantInfo, location: Object.assign(Object.assign({}, location), { howToFind: ((_c = locationLocales === null || locationLocales === void 0 ? void 0 : locationLocales.find((l) => l.language === language)) === null || _c === void 0 ? void 0 : _c.howToFind) ||
33
- location.howToFind, prepareText: ((_d = locationLocales === null || locationLocales === void 0 ? void 0 : locationLocales.find((l) => l.language === language)) === null || _d === void 0 ? void 0 : _d.prepareText) ||
34
- location.prepareText }) });
31
+ if (!value)
32
+ return value;
33
+ const { locales, location } = value, questroom = __rest(value, ["locales", "location"]);
34
+ const _e = location || {}, { locales: locationLocales } = _e, locationRest = __rest(_e, ["locales"]);
35
+ return Object.assign(Object.assign({}, questroom), { title: ((_a = locales === null || locales === void 0 ? void 0 : locales.find((l) => l.language === language)) === null || _a === void 0 ? void 0 : _a.title) || questroom.title, importantInfo: ((_b = locales === null || locales === void 0 ? void 0 : locales.find((l) => l.language === language)) === null || _b === void 0 ? void 0 : _b.importantInfo) || questroom.importantInfo, location: location
36
+ ? Object.assign(Object.assign({}, locationRest), { howToFind: ((_c = locationLocales === null || locationLocales === void 0 ? void 0 : locationLocales.find((l) => l.language === language)) === null || _c === void 0 ? void 0 : _c.howToFind) ||
37
+ locationRest.howToFind, prepareText: ((_d = locationLocales === null || locationLocales === void 0 ? void 0 : locationLocales.find((l) => l.language === language)) === null || _d === void 0 ? void 0 : _d.prepareText) ||
38
+ locationRest.prepareText }) : location });
35
39
  };
36
40
  exports.transformQuestroom = transformQuestroom;
37
41
  class QuestroomLocale {
@@ -1,3 +1,4 @@
1
+ import { PromocodeCertificateModeEnum } from '../../promocode/emun/promocode-certificate-mode.enum';
1
2
  import { PromocodeTypeEnum } from '../../promocode/emun/promocode-type.enum';
2
3
  import { PromocodeNominalRule } from '../../promocode/promocode-nominal-rule';
3
4
  /**
@@ -28,6 +29,12 @@ export declare class OpenapiPromocodeWidgetRO {
28
29
  minPlayers?: number;
29
30
  maxPlayers?: number;
30
31
  certificateNominalRules: PromocodeNominalRule[];
32
+ /**
33
+ * Режим действия для сертификатов: 'discount' (скидка на цену) или
34
+ * 'bonus' (бонус к номиналу). Для промокодов «на игры» приходит
35
+ * `null` — поле игнорируется виджетом.
36
+ */
37
+ certificateMode: PromocodeCertificateModeEnum | null;
31
38
  }
32
39
  export declare class OpenapiResolvePromocodeRO {
33
40
  valid: boolean;
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.OpenapiResolvePromocodeRO = exports.OpenapiPromocodeWidgetRO = void 0;
13
13
  /* eslint-disable max-classes-per-file */
14
14
  const class_transformer_1 = require("class-transformer");
15
+ const promocode_certificate_mode_enum_1 = require("../../promocode/emun/promocode-certificate-mode.enum");
15
16
  const promocode_type_enum_1 = require("../../promocode/emun/promocode-type.enum");
16
17
  /**
17
18
  * Slim-DTO промокода для виджета. Содержит только поля, нужные для фронтового
@@ -106,6 +107,10 @@ __decorate([
106
107
  (0, class_transformer_1.Expose)(),
107
108
  __metadata("design:type", Array)
108
109
  ], OpenapiPromocodeWidgetRO.prototype, "certificateNominalRules", void 0);
110
+ __decorate([
111
+ (0, class_transformer_1.Expose)(),
112
+ __metadata("design:type", String)
113
+ ], OpenapiPromocodeWidgetRO.prototype, "certificateMode", void 0);
109
114
  class OpenapiResolvePromocodeRO {
110
115
  }
111
116
  exports.OpenapiResolvePromocodeRO = OpenapiResolvePromocodeRO;
@@ -184,7 +184,11 @@ __decorate([
184
184
  __decorate([
185
185
  (0, class_transformer_1.Expose)(),
186
186
  (0, class_transformer_1.Type)(() => openapi_questroom_ro_1.OpenapiQuestroomRO),
187
- (0, class_transformer_1.Transform)(({ value, obj }) => value.map((questroom) => (0, openapi_questroom_ro_1.transformQuestroom)({ value: questroom, language: obj.language }))),
187
+ (0, class_transformer_1.Transform)(({ value, obj }) => Array.isArray(value)
188
+ ? value
189
+ .filter(Boolean)
190
+ .map((questroom) => (0, openapi_questroom_ro_1.transformQuestroom)({ value: questroom, language: obj === null || obj === void 0 ? void 0 : obj.language }))
191
+ : []),
188
192
  __metadata("design:type", Array)
189
193
  ], OpenapiWidgetInfoRO.prototype, "questrooms", void 0);
190
194
  __decorate([
@@ -25,4 +25,16 @@ export declare class CreateOrderDto {
25
25
  language?: Languages;
26
26
  comment?: string;
27
27
  variationHint?: string;
28
+ /**
29
+ * dealAddMode: id «якорного» ордера, к группе которого нужно
30
+ * атомарно прикрепить только что созданный ордер. Если у якоря
31
+ * уже есть `groupId` — новый ордер добавится к этой группе;
32
+ * иначе будет создана новая группа из [якорь, новый ордер].
33
+ *
34
+ * Передаётся фронтом из `dealAddMode.currentOrderId`. Делаем
35
+ * это в одном запросе с созданием ордера, чтобы операция была
36
+ * атомарной (одна транзакция) — иначе оператор мог успеть выйти
37
+ * из режима, поменять дату или клиента, пока шёл второй запрос.
38
+ */
39
+ attachToOrderId?: number;
28
40
  }
@@ -106,3 +106,9 @@ __decorate([
106
106
  (0, class_transformer_1.Expose)(),
107
107
  __metadata("design:type", String)
108
108
  ], CreateOrderDto.prototype, "variationHint", void 0);
109
+ __decorate([
110
+ (0, class_validator_1.IsOptional)(),
111
+ (0, class_validator_1.IsNumber)(),
112
+ (0, class_transformer_1.Expose)(),
113
+ __metadata("design:type", Number)
114
+ ], CreateOrderDto.prototype, "attachToOrderId", void 0);
@@ -1,3 +1,4 @@
1
+ import { EmailContentJsonV2 } from '../../email-builder';
1
2
  import { Languages } from '../../shared/enum/languages.enum';
2
3
  import { CrossSaleStatusEnum } from '../cross-sale/cross-sale-status.enum';
3
4
  import { CrossSaleDiscountTypeEnum } from '../cross-sale/crossale-discount-type.enum';
@@ -6,6 +7,11 @@ export declare class BirthdayMarketingLocaleDto {
6
7
  language: Languages;
7
8
  feedbackText: string;
8
9
  title: string;
10
+ /**
11
+ * Maily/TipTap v2-документ. Опционально — старый Quill-редактор
12
+ * присылает только `feedbackText`. См. `CustomClientBookingEmailLocaleDto.contentJson`.
13
+ */
14
+ contentJson?: EmailContentJsonV2 | null;
9
15
  }
10
16
  export declare class BirthdayMarketingDto {
11
17
  /**
@@ -42,6 +42,12 @@ __decorate([
42
42
  (0, class_transformer_1.Expose)(),
43
43
  __metadata("design:type", String)
44
44
  ], BirthdayMarketingLocaleDto.prototype, "title", 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
+ ], BirthdayMarketingLocaleDto.prototype, "contentJson", void 0);
45
51
  class BirthdayMarketingDto {
46
52
  }
47
53
  exports.BirthdayMarketingDto = BirthdayMarketingDto;
@@ -1,3 +1,4 @@
1
+ import { EmailContentJsonV2 } from '../../email-builder';
1
2
  import { Languages } from '../../shared/enum/languages.enum';
2
3
  import { CrossSaleStatusEnum } from './cross-sale-status.enum';
3
4
  import { CrossSaleDiscountTypeEnum } from './crossale-discount-type.enum';
@@ -5,6 +6,13 @@ export declare class CrossSaleLocaleDto {
5
6
  language: Languages;
6
7
  feedbackText: string;
7
8
  title: string;
9
+ /**
10
+ * Maily/TipTap v2-документ. Опционально — старый Quill-редактор
11
+ * присылает только `feedbackText`, новый EmailBuilder будет
12
+ * присылать `contentJson` параллельно. См. подробности в
13
+ * `CustomClientBookingEmailLocaleDto.contentJson`.
14
+ */
15
+ contentJson?: EmailContentJsonV2 | null;
8
16
  }
9
17
  export declare class CrossSaleDto {
10
18
  status: CrossSaleStatusEnum;
@@ -41,6 +41,12 @@ __decorate([
41
41
  (0, class_transformer_1.Expose)(),
42
42
  __metadata("design:type", String)
43
43
  ], CrossSaleLocaleDto.prototype, "title", void 0);
44
+ __decorate([
45
+ (0, class_validator_1.IsOptional)(),
46
+ (0, class_validator_1.IsObject)(),
47
+ (0, class_transformer_1.Expose)(),
48
+ __metadata("design:type", Object)
49
+ ], CrossSaleLocaleDto.prototype, "contentJson", void 0);
44
50
  class CrossSaleDto {
45
51
  }
46
52
  exports.CrossSaleDto = CrossSaleDto;
@@ -1,3 +1,4 @@
1
+ import { EmailContentJsonV2 } from '../../email-builder';
1
2
  import { Languages } from '../../shared/enum/languages.enum';
2
3
  import { RO } from '../../shared/ro-class';
3
4
  import { CrossSaleStatusEnum } from './cross-sale-status.enum';
@@ -6,6 +7,7 @@ export declare class CrossSaleLocaleRO {
6
7
  language: Languages;
7
8
  feedbackText: string;
8
9
  title: string;
10
+ contentJson?: EmailContentJsonV2 | null;
9
11
  }
10
12
  export declare class CrossSaleRO extends RO {
11
13
  sendAfter: number;
@@ -31,6 +31,10 @@ __decorate([
31
31
  (0, class_transformer_1.Expose)(),
32
32
  __metadata("design:type", String)
33
33
  ], CrossSaleLocaleRO.prototype, "title", void 0);
34
+ __decorate([
35
+ (0, class_transformer_1.Expose)(),
36
+ __metadata("design:type", Object)
37
+ ], CrossSaleLocaleRO.prototype, "contentJson", void 0);
34
38
  class CrossSaleRO extends ro_class_1.RO {
35
39
  }
36
40
  exports.CrossSaleRO = CrossSaleRO;
@@ -1,9 +1,20 @@
1
+ import { EmailContentJsonV2 } from '../../email-builder';
1
2
  import { Languages } from '../../shared/enum/languages.enum';
2
3
  import { CrossSaleStatusEnum } from '../cross-sale/cross-sale-status.enum';
3
4
  export declare class CustomClientBookingEmailLocaleDto {
4
5
  language: Languages;
5
6
  feedbackText: string;
6
7
  title: string;
8
+ /**
9
+ * Maily/TipTap v2-документ. Опционально: текущий Quill-редактор
10
+ * присылает только `feedbackText`, EmailBuilder начнёт присылать и
11
+ * `contentJson` поверх. Глубокую валидацию структуры TipTap не
12
+ * делаем — это упёрлось бы в дублирование схемы Maily здесь;
13
+ * если поле окажется битым, v2-renderer на бэке безопасно
14
+ * откатится на legacy-рендер `feedbackText` (см. договорённость
15
+ * по soft-fallback'у).
16
+ */
17
+ contentJson?: EmailContentJsonV2 | null;
7
18
  }
8
19
  export declare class CustomClientBookingEmailDto {
9
20
  status: CrossSaleStatusEnum;
@@ -40,6 +40,12 @@ __decorate([
40
40
  (0, class_transformer_1.Expose)(),
41
41
  __metadata("design:type", String)
42
42
  ], CustomClientBookingEmailLocaleDto.prototype, "title", void 0);
43
+ __decorate([
44
+ (0, class_validator_1.IsOptional)(),
45
+ (0, class_validator_1.IsObject)(),
46
+ (0, class_transformer_1.Expose)(),
47
+ __metadata("design:type", Object)
48
+ ], CustomClientBookingEmailLocaleDto.prototype, "contentJson", void 0);
43
49
  class CustomClientBookingEmailDto {
44
50
  }
45
51
  exports.CustomClientBookingEmailDto = CustomClientBookingEmailDto;
@@ -1,10 +1,19 @@
1
+ import { EmailContentJsonV2 } from '../../email-builder';
1
2
  import { Languages } from '../../shared/enum/languages.enum';
2
3
  import { RO } from '../../shared/ro-class';
3
4
  import { CrossSaleStatusEnum } from '../cross-sale/cross-sale-status.enum';
4
5
  export declare class CustomClientBookingEmailLocaleRO {
5
6
  language: Languages;
7
+ /**
8
+ * Legacy HTML-черновик (`feedbackText`) и новый v2-doc (`contentJson`)
9
+ * возвращаются параллельно: `contentJson` — основной источник для
10
+ * EmailBuilder, `feedbackText` — frozen snapshot, который супер-админ
11
+ * может открыть для сравнения. После того, как UI полностью
12
+ * переведён на v2 и backfill стабилен, RO можно сужать.
13
+ */
6
14
  feedbackText: string;
7
15
  title: string;
16
+ contentJson?: EmailContentJsonV2 | null;
8
17
  }
9
18
  export declare class CustomClientBookingEmailRO extends RO {
10
19
  status: CrossSaleStatusEnum;
@@ -30,6 +30,10 @@ __decorate([
30
30
  (0, class_transformer_1.Expose)(),
31
31
  __metadata("design:type", String)
32
32
  ], CustomClientBookingEmailLocaleRO.prototype, "title", void 0);
33
+ __decorate([
34
+ (0, class_transformer_1.Expose)(),
35
+ __metadata("design:type", Object)
36
+ ], CustomClientBookingEmailLocaleRO.prototype, "contentJson", void 0);
33
37
  class CustomClientBookingEmailRO extends ro_class_1.RO {
34
38
  }
35
39
  exports.CustomClientBookingEmailRO = CustomClientBookingEmailRO;
@@ -1,5 +1,24 @@
1
1
  import { EmailScope } from '../../email-builder';
2
2
  import { EmailContentJsonV2Dto } from './create-profile-marketing-email-campaign.dto';
3
+ /**
4
+ * Promocode-payload для preview. Фронт собирает поля из реальных
5
+ * настроек письма (cross-sale/retargeting/birthday-discount form
6
+ * values) и шлёт сюда — бэк просто прокидывает в `EmailScopeContext`,
7
+ * чтобы юзер видел в превью свои настоящие промокоды, а не общий
8
+ * mock «SUMMER10/10%». Все поля опциональны: если фронт что-то не
9
+ * заполнил, резолвер откатится на `exampleValue`.
10
+ */
11
+ export declare class PreviewPromocodeDto {
12
+ code?: string;
13
+ /**
14
+ * Сюда фронт кладёт уже-отформатированную строку (например `10%`
15
+ * или `500 RUB`). Бэк ничего не доформатирует — мы не знаем, в
16
+ * каких единицах юзер настроил скидку.
17
+ */
18
+ discount?: string;
19
+ /** ISO yyyy-mm-dd или произвольный человекочитаемый формат. */
20
+ expireDate?: string;
21
+ }
3
22
  /**
4
23
  * Request body for `POST /profile-marketing-email-campaigns/preview-v2`.
5
24
  *
@@ -12,6 +31,24 @@ export declare class PreviewMarketingEmailCampaignV2Dto {
12
31
  scope: EmailScope;
13
32
  /** Optional: render with a specific client's data for end-to-end QA. */
14
33
  previewClientId?: number;
34
+ /**
35
+ * Optional: рендерить с реальным questroom (+ его location) в
36
+ * контексте. Фронт берёт значение из Redux/локального state —
37
+ * там всегда есть выбранный questroom для рассылок, привязанных
38
+ * к конкретному квесту. Бэк подгружает entity и закладывает в
39
+ * `EmailScopeContext.order.questroom`, чтобы резолверы
40
+ * `questroom.*` / `location.*` подставляли реальные значения
41
+ * вместо `exampleValue` из declare().
42
+ */
43
+ previewQuestroomId?: number;
44
+ /**
45
+ * Optional: реальный промокод для превью. Фронт собирает поля
46
+ * из form values того типа письма, который сейчас редактируется
47
+ * (cross-sale / retargeting / birthday discount), и шлёт сюда.
48
+ * Если не передан — резолвер `promocode.*` использует
49
+ * `exampleValue` (`SUMMER10`/`10%`/`31.12.2026`).
50
+ */
51
+ previewPromocode?: PreviewPromocodeDto;
15
52
  }
16
53
  export type PreviewMarketingEmailCampaignV2RO = {
17
54
  /** Final HTML as it would be delivered (including footer and UTM). */