@escapenavigator/types 1.10.129 → 1.10.130
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/email-builder/index.d.ts +18 -0
- package/dist/email-builder/index.js +48 -20
- package/dist/emails/index.d.ts +21 -0
- package/dist/openapi/morty/morty-attraction.ro.d.ts +26 -0
- package/dist/openapi/morty/morty-attraction.ro.js +91 -0
- package/dist/openapi/morty/morty-attractions-query.dto.d.ts +8 -0
- package/dist/openapi/morty/morty-attractions-query.dto.js +29 -0
- package/dist/openapi/morty/morty-booking.ro.d.ts +13 -0
- package/dist/openapi/morty/morty-booking.ro.js +45 -0
- package/dist/openapi/morty/morty-create-booking.dto.d.ts +42 -0
- package/dist/openapi/morty/morty-create-booking.dto.js +122 -0
- package/dist/openapi/morty/morty-timeslot.ro.d.ts +49 -0
- package/dist/openapi/morty/morty-timeslot.ro.js +129 -0
- package/dist/openapi/morty/morty-timeslots-query.dto.d.ts +21 -0
- package/dist/openapi/morty/morty-timeslots-query.dto.js +48 -0
- package/dist/order/create-order.dto.d.ts +12 -0
- package/dist/order/create-order.dto.js +6 -0
- package/dist/profile/birthday-marketing/birthday-marketing.dto.d.ts +6 -0
- package/dist/profile/birthday-marketing/birthday-marketing.dto.js +6 -0
- package/dist/profile/cross-sale/cross-sale.dto.d.ts +8 -0
- package/dist/profile/cross-sale/cross-sale.dto.js +6 -0
- package/dist/profile/cross-sale/cross-sale.ro.d.ts +2 -0
- package/dist/profile/cross-sale/cross-sale.ro.js +4 -0
- package/dist/profile/custom-client-booking-email/custom-client-booking-email.dto.d.ts +11 -0
- package/dist/profile/custom-client-booking-email/custom-client-booking-email.dto.js +6 -0
- package/dist/profile/custom-client-booking-email/custom-client-booking-email.ro.d.ts +9 -0
- package/dist/profile/custom-client-booking-email/custom-client-booking-email.ro.js +4 -0
- package/dist/profile/marketing-email/preview-campaign-v2.dto.d.ts +37 -0
- package/dist/profile/marketing-email/preview-campaign-v2.dto.js +43 -1
- package/dist/questroom/create-questroom-admin.dto.d.ts +1 -0
- package/dist/questroom/create-questroom-admin.dto.js +6 -0
- package/dist/questroom/create-questroom.dto.js +3 -0
- package/dist/questroom/questrooms-list-admin.ro.d.ts +2 -0
- package/dist/questroom/questrooms-list-admin.ro.js +8 -0
- package/dist/questroom-scenario-email/create-questroom-scenario-email.dto.d.ts +13 -0
- package/dist/questroom-scenario-email/create-questroom-scenario-email.dto.js +6 -0
- package/dist/questroom-scenario-email/questroom-scenario-email.ro.d.ts +2 -0
- package/dist/questroom-scenario-email/questroom-scenario-email.ro.js +4 -0
- package/dist/shared/source.enum.d.ts +1 -0
- package/dist/shared/source.enum.js +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -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);
|
|
@@ -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). */
|
|
@@ -9,11 +9,40 @@ 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.PreviewMarketingEmailCampaignV2Dto = void 0;
|
|
12
|
+
exports.PreviewMarketingEmailCampaignV2Dto = exports.PreviewPromocodeDto = void 0;
|
|
13
13
|
const class_transformer_1 = require("class-transformer");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
15
|
const email_builder_1 = require("../../email-builder");
|
|
16
16
|
const create_profile_marketing_email_campaign_dto_1 = require("./create-profile-marketing-email-campaign.dto");
|
|
17
|
+
/**
|
|
18
|
+
* Promocode-payload для preview. Фронт собирает поля из реальных
|
|
19
|
+
* настроек письма (cross-sale/retargeting/birthday-discount form
|
|
20
|
+
* values) и шлёт сюда — бэк просто прокидывает в `EmailScopeContext`,
|
|
21
|
+
* чтобы юзер видел в превью свои настоящие промокоды, а не общий
|
|
22
|
+
* mock «SUMMER10/10%». Все поля опциональны: если фронт что-то не
|
|
23
|
+
* заполнил, резолвер откатится на `exampleValue`.
|
|
24
|
+
*/
|
|
25
|
+
class PreviewPromocodeDto {
|
|
26
|
+
}
|
|
27
|
+
exports.PreviewPromocodeDto = PreviewPromocodeDto;
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, class_validator_1.IsOptional)(),
|
|
30
|
+
(0, class_validator_1.IsString)(),
|
|
31
|
+
(0, class_transformer_1.Expose)(),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], PreviewPromocodeDto.prototype, "code", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, class_validator_1.IsOptional)(),
|
|
36
|
+
(0, class_validator_1.IsString)(),
|
|
37
|
+
(0, class_transformer_1.Expose)(),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], PreviewPromocodeDto.prototype, "discount", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, class_validator_1.IsOptional)(),
|
|
42
|
+
(0, class_validator_1.IsString)(),
|
|
43
|
+
(0, class_transformer_1.Expose)(),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], PreviewPromocodeDto.prototype, "expireDate", void 0);
|
|
17
46
|
/**
|
|
18
47
|
* Request body for `POST /profile-marketing-email-campaigns/preview-v2`.
|
|
19
48
|
*
|
|
@@ -42,3 +71,16 @@ __decorate([
|
|
|
42
71
|
(0, class_transformer_1.Expose)(),
|
|
43
72
|
__metadata("design:type", Number)
|
|
44
73
|
], PreviewMarketingEmailCampaignV2Dto.prototype, "previewClientId", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, class_validator_1.IsOptional)(),
|
|
76
|
+
(0, class_validator_1.IsInt)(),
|
|
77
|
+
(0, class_transformer_1.Expose)(),
|
|
78
|
+
__metadata("design:type", Number)
|
|
79
|
+
], PreviewMarketingEmailCampaignV2Dto.prototype, "previewQuestroomId", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, class_validator_1.IsOptional)(),
|
|
82
|
+
(0, class_validator_1.ValidateNested)(),
|
|
83
|
+
(0, class_transformer_1.Type)(() => PreviewPromocodeDto),
|
|
84
|
+
(0, class_transformer_1.Expose)(),
|
|
85
|
+
__metadata("design:type", PreviewPromocodeDto)
|
|
86
|
+
], PreviewMarketingEmailCampaignV2Dto.prototype, "previewPromocode", void 0);
|
|
@@ -55,6 +55,12 @@ __decorate([
|
|
|
55
55
|
(0, class_transformer_1.Expose)(),
|
|
56
56
|
__metadata("design:type", String)
|
|
57
57
|
], CreateQuestroomAdminDto.prototype, "legend", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, class_validator_1.IsOptional)(),
|
|
60
|
+
(0, class_validator_1.IsString)(),
|
|
61
|
+
(0, class_transformer_1.Expose)(),
|
|
62
|
+
__metadata("design:type", String)
|
|
63
|
+
], CreateQuestroomAdminDto.prototype, "importantInfo", void 0);
|
|
58
64
|
__decorate([
|
|
59
65
|
(0, class_validator_1.ValidateIf)((o) => !o.closed),
|
|
60
66
|
(0, class_validator_1.IsArray)(),
|
|
@@ -191,12 +191,14 @@ __decorate([
|
|
|
191
191
|
__decorate([
|
|
192
192
|
(0, class_validator_1.IsOptional)(),
|
|
193
193
|
(0, class_validator_1.IsPositive)(),
|
|
194
|
+
(0, class_transformer_1.Transform)(({ value }) => (value === 0 ? null : value)),
|
|
194
195
|
(0, class_transformer_1.Expose)(),
|
|
195
196
|
__metadata("design:type", Number)
|
|
196
197
|
], CreateQuestroomDto.prototype, "resourceUnitsTotal", void 0);
|
|
197
198
|
__decorate([
|
|
198
199
|
(0, class_validator_1.IsOptional)(),
|
|
199
200
|
(0, class_validator_1.IsPositive)(),
|
|
201
|
+
(0, class_transformer_1.Transform)(({ value }) => (value === 0 ? null : value)),
|
|
200
202
|
(0, class_transformer_1.Expose)(),
|
|
201
203
|
__metadata("design:type", Number)
|
|
202
204
|
], CreateQuestroomDto.prototype, "resourceUnitSize", void 0);
|
|
@@ -227,6 +229,7 @@ __decorate([
|
|
|
227
229
|
__decorate([
|
|
228
230
|
(0, class_validator_1.IsOptional)(),
|
|
229
231
|
(0, class_validator_1.IsArray)(),
|
|
232
|
+
(0, class_transformer_1.Transform)(({ value }) => ((value === null || value === void 0 ? void 0 : value.length) ? value : [])),
|
|
230
233
|
(0, class_transformer_1.Expose)(),
|
|
231
234
|
__metadata("design:type", Array)
|
|
232
235
|
], CreateQuestroomDto.prototype, "disabledLanguages", void 0);
|
|
@@ -148,6 +148,14 @@ __decorate([
|
|
|
148
148
|
(0, class_transformer_1.Expose)(),
|
|
149
149
|
__metadata("design:type", String)
|
|
150
150
|
], AdminQuestroomsListRO.prototype, "legend", void 0);
|
|
151
|
+
__decorate([
|
|
152
|
+
(0, class_transformer_1.Expose)(),
|
|
153
|
+
__metadata("design:type", String)
|
|
154
|
+
], AdminQuestroomsListRO.prototype, "importantInfo", void 0);
|
|
155
|
+
__decorate([
|
|
156
|
+
(0, class_transformer_1.Expose)(),
|
|
157
|
+
__metadata("design:type", String)
|
|
158
|
+
], AdminQuestroomsListRO.prototype, "teaser", void 0);
|
|
151
159
|
__decorate([
|
|
152
160
|
(0, class_transformer_1.Expose)(),
|
|
153
161
|
__metadata("design:type", Number)
|
|
@@ -1,6 +1,19 @@
|
|
|
1
|
+
import { EmailContentJsonV2 } from '../email-builder';
|
|
1
2
|
export declare class CreateQuestroomScenarioEmailDto {
|
|
2
3
|
title: string;
|
|
3
4
|
text: string;
|
|
5
|
+
/**
|
|
6
|
+
* Maily/TipTap v2-документ. Опционально — старый редактор присылает
|
|
7
|
+
* только `text`. См. подробности в
|
|
8
|
+
* `CustomClientBookingEmailLocaleDto.contentJson`. На send-time
|
|
9
|
+
* scenario-emails резолвят переменные через `EmailScope.OrderPostGame`
|
|
10
|
+
* (тот же набор, что cross-sale/up-sale): client + profile + order +
|
|
11
|
+
* questroom + location + booking-link. См.
|
|
12
|
+
* `SendCrossSaleService.scenarioEmail` для текущего поведения soft-
|
|
13
|
+
* fallback'а — v1 `transformText` всё ещё доступен через
|
|
14
|
+
* `feedbackText`/`text` для пользователей, не прошедших backfill.
|
|
15
|
+
*/
|
|
16
|
+
contentJson?: EmailContentJsonV2 | null;
|
|
4
17
|
sendImmediately: boolean;
|
|
5
18
|
sendBefore: number;
|
|
6
19
|
questroomId: number;
|
|
@@ -26,6 +26,12 @@ __decorate([
|
|
|
26
26
|
(0, class_transformer_1.Expose)(),
|
|
27
27
|
__metadata("design:type", String)
|
|
28
28
|
], CreateQuestroomScenarioEmailDto.prototype, "text", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, class_validator_1.IsOptional)(),
|
|
31
|
+
(0, class_validator_1.IsObject)(),
|
|
32
|
+
(0, class_transformer_1.Expose)(),
|
|
33
|
+
__metadata("design:type", Object)
|
|
34
|
+
], CreateQuestroomScenarioEmailDto.prototype, "contentJson", void 0);
|
|
29
35
|
__decorate([
|
|
30
36
|
(0, class_validator_1.IsBoolean)(),
|
|
31
37
|
(0, class_transformer_1.Transform)(({ value }) => value !== null && value !== void 0 ? value : false),
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { EmailContentJsonV2 } from '../email-builder';
|
|
1
2
|
import { RO } from '../shared/ro-class';
|
|
2
3
|
export declare class QuestroomScenarioEmailRO extends RO {
|
|
3
4
|
title: string;
|
|
4
5
|
text: string;
|
|
6
|
+
contentJson?: EmailContentJsonV2 | null;
|
|
5
7
|
sendBefore: number;
|
|
6
8
|
sendImmediately: boolean;
|
|
7
9
|
questroomId: number;
|
|
@@ -23,6 +23,10 @@ __decorate([
|
|
|
23
23
|
(0, class_transformer_1.Expose)(),
|
|
24
24
|
__metadata("design:type", String)
|
|
25
25
|
], QuestroomScenarioEmailRO.prototype, "text", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, class_transformer_1.Expose)(),
|
|
28
|
+
__metadata("design:type", Object)
|
|
29
|
+
], QuestroomScenarioEmailRO.prototype, "contentJson", void 0);
|
|
26
30
|
__decorate([
|
|
27
31
|
(0, class_transformer_1.Expose)(),
|
|
28
32
|
__metadata("design:type", Number)
|
|
@@ -8,6 +8,7 @@ var SourceEnum;
|
|
|
8
8
|
SourceEnum["SUPPORT"] = "support";
|
|
9
9
|
SourceEnum["AGREGATOR"] = "agregator";
|
|
10
10
|
SourceEnum["nowEscape"] = "nowEscape";
|
|
11
|
+
SourceEnum["morty"] = "morty";
|
|
11
12
|
SourceEnum["exportded"] = "exported";
|
|
12
13
|
// ru
|
|
13
14
|
SourceEnum["GILDIA_KVESTOV"] = "gildia-kvestov";
|