@escapenavigator/types 1.10.128 → 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.
Files changed (76) hide show
  1. package/dist/agregator/agregator-city.ro.d.ts +25 -0
  2. package/dist/agregator/agregator-city.ro.js +8 -0
  3. package/dist/agregator/agregator-questroom-card.ro.d.ts +14 -1
  4. package/dist/agregator/agregator-questroom-card.ro.js +4 -2
  5. package/dist/city/city.ro.d.ts +3 -0
  6. package/dist/city/update-city.dto.d.ts +13 -0
  7. package/dist/city/update-city.dto.js +19 -0
  8. package/dist/email-builder/index.d.ts +18 -0
  9. package/dist/email-builder/index.js +48 -20
  10. package/dist/emails/index.d.ts +21 -0
  11. package/dist/openapi/morty/morty-attraction.ro.d.ts +26 -0
  12. package/dist/openapi/morty/morty-attraction.ro.js +91 -0
  13. package/dist/openapi/morty/morty-attractions-query.dto.d.ts +8 -0
  14. package/dist/openapi/morty/morty-attractions-query.dto.js +29 -0
  15. package/dist/openapi/morty/morty-booking.ro.d.ts +13 -0
  16. package/dist/openapi/morty/morty-booking.ro.js +45 -0
  17. package/dist/openapi/morty/morty-create-booking.dto.d.ts +42 -0
  18. package/dist/openapi/morty/morty-create-booking.dto.js +122 -0
  19. package/dist/openapi/morty/morty-timeslot.ro.d.ts +49 -0
  20. package/dist/openapi/morty/morty-timeslot.ro.js +129 -0
  21. package/dist/openapi/morty/morty-timeslots-query.dto.d.ts +21 -0
  22. package/dist/openapi/morty/morty-timeslots-query.dto.js +48 -0
  23. package/dist/openapi/shared/openapi-questroom.ro.d.ts +2 -0
  24. package/dist/openapi/shared/openapi-questroom.ro.js +4 -0
  25. package/dist/order/create-order.dto.d.ts +12 -0
  26. package/dist/order/create-order.dto.js +6 -0
  27. package/dist/profile/action/create-profile-action.dto.d.ts +4 -3
  28. package/dist/profile/action/create-profile-action.dto.js +16 -8
  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/create-profile.dto.d.ts +0 -9
  32. package/dist/profile/create-profile.dto.js +0 -63
  33. package/dist/profile/cross-sale/cross-sale.dto.d.ts +8 -0
  34. package/dist/profile/cross-sale/cross-sale.dto.js +6 -0
  35. package/dist/profile/cross-sale/cross-sale.ro.d.ts +2 -0
  36. package/dist/profile/cross-sale/cross-sale.ro.js +4 -0
  37. package/dist/profile/custom-client-booking-email/custom-client-booking-email.dto.d.ts +11 -0
  38. package/dist/profile/custom-client-booking-email/custom-client-booking-email.dto.js +6 -0
  39. package/dist/profile/custom-client-booking-email/custom-client-booking-email.ro.d.ts +9 -0
  40. package/dist/profile/custom-client-booking-email/custom-client-booking-email.ro.js +4 -0
  41. package/dist/profile/marketing-email/preview-campaign-v2.dto.d.ts +37 -0
  42. package/dist/profile/marketing-email/preview-campaign-v2.dto.js +43 -1
  43. package/dist/profile/profile-crm/create-profile-crm.dto.d.ts +3 -0
  44. package/dist/profile/profile-crm/create-profile-crm.dto.js +22 -0
  45. package/dist/profile/update-profile-commission.dto.d.ts +11 -0
  46. package/dist/profile/update-profile-commission.dto.js +71 -0
  47. package/dist/questroom/create-questroom-admin.dto.d.ts +1 -0
  48. package/dist/questroom/create-questroom-admin.dto.js +6 -0
  49. package/dist/questroom/create-questroom.dto.d.ts +1 -0
  50. package/dist/questroom/create-questroom.dto.js +9 -0
  51. package/dist/questroom/questroom-admin.ro.d.ts +17 -0
  52. package/dist/questroom/questroom-admin.ro.js +61 -0
  53. package/dist/questroom/questroom-light.ro.d.ts +1 -0
  54. package/dist/questroom/questroom-light.ro.js +4 -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/slot/slot.ro.d.ts +1 -0
  64. package/dist/slot-rule/create-rule.dto.d.ts +2 -0
  65. package/dist/slot-rule/create-rule.dto.js +30 -0
  66. package/dist/slot-rule/defailt-rule.d.ts +2 -0
  67. package/dist/slot-rule/defailt-rule.js +2 -0
  68. package/dist/slot-rule/rule.ro.d.ts +2 -0
  69. package/dist/slot-rule/rule.ro.js +8 -0
  70. package/dist/subway-station/subway-station.ro.d.ts +43 -0
  71. package/dist/subway-station/subway-station.ro.js +2 -0
  72. package/dist/tsconfig.build.tsbuildinfo +1 -1
  73. package/dist/user/task/user-task.dto.d.ts +2 -2
  74. package/dist/user/task/user-task.ro.d.ts +1 -0
  75. package/dist/user/task/user-task.ro.js +4 -0
  76. package/package.json +2 -2
@@ -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);
@@ -0,0 +1,3 @@
1
+ export declare class CreateProfileCrmDto {
2
+ title: string;
3
+ }
@@ -0,0 +1,22 @@
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.CreateProfileCrmDto = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const is_not_blank_1 = require("../../shared/is-not-blank");
15
+ class CreateProfileCrmDto {
16
+ }
17
+ exports.CreateProfileCrmDto = CreateProfileCrmDto;
18
+ __decorate([
19
+ (0, is_not_blank_1.IsNotBlank)(),
20
+ (0, class_transformer_1.Expose)(),
21
+ __metadata("design:type", String)
22
+ ], CreateProfileCrmDto.prototype, "title", void 0);
@@ -0,0 +1,11 @@
1
+ export declare class UpdateProfileCommissionDto {
2
+ bookingCommissionExternal: number;
3
+ bookingCommission: number;
4
+ bookingCommissionFreePlan: number;
5
+ upsalesCommission: number;
6
+ crmCommissionFree: number;
7
+ crmCommissionPro: number;
8
+ crmCommissionGrowth: number;
9
+ stripeWidgetApplicationFeePercent: number;
10
+ stripeCertificateServiceApplicationFeeFixed: number;
11
+ }
@@ -0,0 +1,71 @@
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.UpdateProfileCommissionDto = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const class_validator_1 = require("class-validator");
15
+ class UpdateProfileCommissionDto {
16
+ }
17
+ exports.UpdateProfileCommissionDto = UpdateProfileCommissionDto;
18
+ __decorate([
19
+ (0, class_validator_1.IsNumber)(),
20
+ (0, class_validator_1.Min)(0),
21
+ (0, class_transformer_1.Expose)(),
22
+ __metadata("design:type", Number)
23
+ ], UpdateProfileCommissionDto.prototype, "bookingCommissionExternal", void 0);
24
+ __decorate([
25
+ (0, class_validator_1.IsNumber)(),
26
+ (0, class_validator_1.Min)(0),
27
+ (0, class_transformer_1.Expose)(),
28
+ __metadata("design:type", Number)
29
+ ], UpdateProfileCommissionDto.prototype, "bookingCommission", void 0);
30
+ __decorate([
31
+ (0, class_validator_1.IsNumber)(),
32
+ (0, class_validator_1.Min)(0),
33
+ (0, class_transformer_1.Expose)(),
34
+ __metadata("design:type", Number)
35
+ ], UpdateProfileCommissionDto.prototype, "bookingCommissionFreePlan", void 0);
36
+ __decorate([
37
+ (0, class_validator_1.IsNumber)(),
38
+ (0, class_validator_1.Min)(0),
39
+ (0, class_transformer_1.Expose)(),
40
+ __metadata("design:type", Number)
41
+ ], UpdateProfileCommissionDto.prototype, "upsalesCommission", void 0);
42
+ __decorate([
43
+ (0, class_validator_1.IsNumber)(),
44
+ (0, class_validator_1.Min)(0),
45
+ (0, class_transformer_1.Expose)(),
46
+ __metadata("design:type", Number)
47
+ ], UpdateProfileCommissionDto.prototype, "crmCommissionFree", void 0);
48
+ __decorate([
49
+ (0, class_validator_1.IsNumber)(),
50
+ (0, class_validator_1.Min)(0),
51
+ (0, class_transformer_1.Expose)(),
52
+ __metadata("design:type", Number)
53
+ ], UpdateProfileCommissionDto.prototype, "crmCommissionPro", void 0);
54
+ __decorate([
55
+ (0, class_validator_1.IsNumber)(),
56
+ (0, class_validator_1.Min)(0),
57
+ (0, class_transformer_1.Expose)(),
58
+ __metadata("design:type", Number)
59
+ ], UpdateProfileCommissionDto.prototype, "crmCommissionGrowth", void 0);
60
+ __decorate([
61
+ (0, class_validator_1.IsNumber)(),
62
+ (0, class_validator_1.Min)(0),
63
+ (0, class_transformer_1.Expose)(),
64
+ __metadata("design:type", Number)
65
+ ], UpdateProfileCommissionDto.prototype, "stripeWidgetApplicationFeePercent", void 0);
66
+ __decorate([
67
+ (0, class_validator_1.IsNumber)(),
68
+ (0, class_validator_1.Min)(0),
69
+ (0, class_transformer_1.Expose)(),
70
+ __metadata("design:type", Number)
71
+ ], UpdateProfileCommissionDto.prototype, "stripeCertificateServiceApplicationFeeFixed", void 0);
@@ -7,6 +7,7 @@ export declare class CreateQuestroomAdminDto {
7
7
  photos: string[];
8
8
  teaser: string;
9
9
  legend?: string;
10
+ importantInfo?: string;
10
11
  questroomTags: TagsEnum[];
11
12
  locationId: number;
12
13
  type: QuestroomTypeEnum;
@@ -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)(),
@@ -53,5 +53,6 @@ export declare class CreateQuestroomDto {
53
53
  alternativeScenarioIds: number[];
54
54
  flexPlayersSelect?: boolean;
55
55
  slotStepMinutes?: number;
56
+ questOpeningDate?: string;
56
57
  }
57
58
  export {};
@@ -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);
@@ -295,3 +298,9 @@ __decorate([
295
298
  (0, class_transformer_1.Expose)(),
296
299
  __metadata("design:type", Number)
297
300
  ], CreateQuestroomDto.prototype, "slotStepMinutes", void 0);
301
+ __decorate([
302
+ (0, class_validator_1.IsOptional)(),
303
+ (0, class_validator_1.IsString)(),
304
+ (0, class_transformer_1.Expose)(),
305
+ __metadata("design:type", String)
306
+ ], CreateQuestroomDto.prototype, "questOpeningDate", void 0);
@@ -1,13 +1,30 @@
1
1
  import { LocationRO } from '../location/location.ro';
2
2
  import { ProfileRO } from '../profile/profile.ro';
3
+ import { CountriesEnum } from '../shared/enum/countries.enum';
3
4
  import { QuestroomRO } from './questroom.ro';
4
5
  import { QuestroomLightLocale as QuestroomLocale } from './questroom-light.ro';
5
6
  declare class City {
6
7
  title: string;
7
8
  }
9
+ declare class SubwayLineAdmin {
10
+ color: string | null;
11
+ ref: string | null;
12
+ }
13
+ declare class SubwayStationAdmin {
14
+ id: number;
15
+ title: string;
16
+ lines: SubwayLineAdmin[];
17
+ coordinates: [number, number];
18
+ cityId: number;
19
+ cityTitle: string;
20
+ country: CountriesEnum;
21
+ externalId: string | null;
22
+ }
8
23
  export declare class LocationAdminRO extends LocationRO {
9
24
  cityId: number;
10
25
  city: City;
26
+ subwayStationId: number | null;
27
+ subwayStation: SubwayStationAdmin | null;
11
28
  }
12
29
  declare class AwardRO {
13
30
  id: number;
@@ -14,6 +14,7 @@ exports.QuestroomAdminRO = exports.LocationAdminRO = void 0;
14
14
  const class_transformer_1 = require("class-transformer");
15
15
  const location_ro_1 = require("../location/location.ro");
16
16
  const profile_ro_1 = require("../profile/profile.ro");
17
+ const countries_enum_1 = require("../shared/enum/countries.enum");
17
18
  const questroom_ro_1 = require("./questroom.ro");
18
19
  const questroom_light_ro_1 = require("./questroom-light.ro");
19
20
  class City {
@@ -22,6 +23,57 @@ __decorate([
22
23
  (0, class_transformer_1.Expose)(),
23
24
  __metadata("design:type", String)
24
25
  ], City.prototype, "title", void 0);
26
+ class SubwayLineAdmin {
27
+ }
28
+ __decorate([
29
+ (0, class_transformer_1.Expose)(),
30
+ __metadata("design:type", String)
31
+ ], SubwayLineAdmin.prototype, "color", void 0);
32
+ __decorate([
33
+ (0, class_transformer_1.Expose)(),
34
+ __metadata("design:type", String)
35
+ ], SubwayLineAdmin.prototype, "ref", void 0);
36
+ class SubwayStationAdmin {
37
+ }
38
+ __decorate([
39
+ (0, class_transformer_1.Expose)(),
40
+ __metadata("design:type", Number)
41
+ ], SubwayStationAdmin.prototype, "id", void 0);
42
+ __decorate([
43
+ (0, class_transformer_1.Expose)(),
44
+ __metadata("design:type", String)
45
+ ], SubwayStationAdmin.prototype, "title", void 0);
46
+ __decorate([
47
+ (0, class_transformer_1.Expose)(),
48
+ (0, class_transformer_1.Type)(() => SubwayLineAdmin),
49
+ __metadata("design:type", Array)
50
+ ], SubwayStationAdmin.prototype, "lines", void 0);
51
+ __decorate([
52
+ (0, class_transformer_1.Expose)(),
53
+ (0, class_transformer_1.Transform)(({ value }) => {
54
+ var _a, _b;
55
+ if (typeof value === 'object')
56
+ return value === null || value === void 0 ? void 0 : value.coordinates;
57
+ return (_b = (_a = value === null || value === void 0 ? void 0 : value.slice) === null || _a === void 0 ? void 0 : _a.call(value, 1, -1)) === null || _b === void 0 ? void 0 : _b.split(',');
58
+ }),
59
+ __metadata("design:type", Array)
60
+ ], SubwayStationAdmin.prototype, "coordinates", void 0);
61
+ __decorate([
62
+ (0, class_transformer_1.Expose)(),
63
+ __metadata("design:type", Number)
64
+ ], SubwayStationAdmin.prototype, "cityId", void 0);
65
+ __decorate([
66
+ (0, class_transformer_1.Expose)(),
67
+ __metadata("design:type", String)
68
+ ], SubwayStationAdmin.prototype, "cityTitle", void 0);
69
+ __decorate([
70
+ (0, class_transformer_1.Expose)(),
71
+ __metadata("design:type", String)
72
+ ], SubwayStationAdmin.prototype, "country", void 0);
73
+ __decorate([
74
+ (0, class_transformer_1.Expose)(),
75
+ __metadata("design:type", String)
76
+ ], SubwayStationAdmin.prototype, "externalId", void 0);
25
77
  class LocationAdminRO extends location_ro_1.LocationRO {
26
78
  }
27
79
  exports.LocationAdminRO = LocationAdminRO;
@@ -34,6 +86,15 @@ __decorate([
34
86
  (0, class_transformer_1.Type)(() => City),
35
87
  __metadata("design:type", City)
36
88
  ], LocationAdminRO.prototype, "city", void 0);
89
+ __decorate([
90
+ (0, class_transformer_1.Expose)(),
91
+ __metadata("design:type", Number)
92
+ ], LocationAdminRO.prototype, "subwayStationId", void 0);
93
+ __decorate([
94
+ (0, class_transformer_1.Expose)(),
95
+ (0, class_transformer_1.Type)(() => SubwayStationAdmin),
96
+ __metadata("design:type", SubwayStationAdmin)
97
+ ], LocationAdminRO.prototype, "subwayStation", void 0);
37
98
  class AwardRO {
38
99
  }
39
100
  __decorate([
@@ -75,4 +75,5 @@ export declare class QuestroomLightRO extends RO {
75
75
  onlinePaymentsAvailable: boolean;
76
76
  awailableForWidgets: boolean;
77
77
  slotStepMinutes: number;
78
+ questOpeningDate?: string;
78
79
  }
@@ -214,3 +214,7 @@ __decorate([
214
214
  (0, class_transformer_1.Expose)(),
215
215
  __metadata("design:type", Number)
216
216
  ], QuestroomLightRO.prototype, "slotStepMinutes", void 0);
217
+ __decorate([
218
+ (0, class_transformer_1.Expose)(),
219
+ __metadata("design:type", String)
220
+ ], QuestroomLightRO.prototype, "questOpeningDate", void 0);
@@ -47,6 +47,8 @@ export declare class AdminQuestroomsListRO {
47
47
  photo: string;
48
48
  photos: string[];
49
49
  legend: string;
50
+ importantInfo: string;
51
+ teaser: string;
50
52
  navigatorReviewId: number;
51
53
  questroomTags: TagsEnum[];
52
54
  type: QuestroomTypeEnum;
@@ -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)
@@ -4,6 +4,7 @@ export declare enum SourceEnum {
4
4
  SUPPORT = "support",
5
5
  AGREGATOR = "agregator",
6
6
  nowEscape = "nowEscape",
7
+ morty = "morty",
7
8
  exportded = "exported",
8
9
  GILDIA_KVESTOV = "gildia-kvestov",
9
10
  QUEST_INFO = "quest-info",
@@ -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";
@@ -3,6 +3,7 @@ import { PrepaymentTypeEnum } from './enum/prepayment-type.enum';
3
3
  export type SlotRuleSummaryRO = {
4
4
  title: string;
5
5
  minHoursForBooking: number;
6
+ minMinutesForBooking: number;
6
7
  prepayment: number;
7
8
  prepaymentType: PrepaymentTypeEnum;
8
9
  cancelationRule: QuestroomCancelationTypeEnum;
@@ -10,7 +10,9 @@ export declare class CreateRuleDto {
10
10
  cancelationAmount: number;
11
11
  minHoursForFreeCanceling: number;
12
12
  minHoursForBooking: number;
13
+ minMinutesForBooking: number;
13
14
  blockingHours: number;
15
+ blockingMinutes: number;
14
16
  openSlotWhenUserInCalendar: boolean;
15
17
  clientCanCancel: boolean;
16
18
  prepayForTourists: boolean;
@@ -78,6 +78,21 @@ __decorate([
78
78
  (0, class_transformer_1.Expose)(),
79
79
  __metadata("design:type", Number)
80
80
  ], CreateRuleDto.prototype, "minHoursForBooking", void 0);
81
+ __decorate([
82
+ (0, class_validator_1.ValidateIf)((o) => !o.ruleId),
83
+ (0, class_transformer_1.Transform)(({ value, obj }) => {
84
+ if (value !== undefined && value !== null)
85
+ return value;
86
+ if (obj.minHoursForBooking != null)
87
+ return obj.minHoursForBooking * 60;
88
+ return 48 * 60;
89
+ }),
90
+ (0, class_validator_1.IsInt)(),
91
+ (0, class_validator_1.Min)(0),
92
+ (0, class_validator_1.Max)(10080),
93
+ (0, class_transformer_1.Expose)(),
94
+ __metadata("design:type", Number)
95
+ ], CreateRuleDto.prototype, "minMinutesForBooking", void 0);
81
96
  __decorate([
82
97
  (0, class_validator_1.ValidateIf)((o) => !o.ruleId),
83
98
  (0, class_transformer_1.Transform)(({ value }) => (value === undefined ? 2 : value)),
@@ -85,6 +100,21 @@ __decorate([
85
100
  (0, class_transformer_1.Expose)(),
86
101
  __metadata("design:type", Number)
87
102
  ], CreateRuleDto.prototype, "blockingHours", void 0);
103
+ __decorate([
104
+ (0, class_validator_1.ValidateIf)((o) => !o.ruleId),
105
+ (0, class_transformer_1.Transform)(({ value, obj }) => {
106
+ if (value !== undefined && value !== null)
107
+ return value;
108
+ if (obj.blockingHours != null)
109
+ return obj.blockingHours * 60;
110
+ return 2 * 60;
111
+ }),
112
+ (0, class_validator_1.IsInt)(),
113
+ (0, class_validator_1.Min)(0),
114
+ (0, class_validator_1.Max)(10080),
115
+ (0, class_transformer_1.Expose)(),
116
+ __metadata("design:type", Number)
117
+ ], CreateRuleDto.prototype, "blockingMinutes", void 0);
88
118
  __decorate([
89
119
  (0, class_validator_1.ValidateIf)((o) => !o.ruleId),
90
120
  (0, class_transformer_1.Transform)(({ value }) => value !== null && value !== void 0 ? value : true),