@escapenavigator/types 2.0.37 → 2.0.38

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 (44) hide show
  1. package/dist/email-builder/email-content.dto.d.ts +26 -0
  2. package/dist/email-builder/email-content.dto.js +62 -0
  3. package/dist/email-builder/index.d.ts +81 -0
  4. package/dist/email-builder/index.js +89 -1
  5. package/dist/emails/index.d.ts +25 -2
  6. package/dist/openapi/upsellings/openapi-upselling.ro.d.ts +1 -0
  7. package/dist/openapi/upsellings/openapi-upselling.ro.js +4 -0
  8. package/dist/profile/birthday-marketing/birthday-marketing.dto.d.ts +2 -2
  9. package/dist/profile/birthday-marketing/birthday-marketing.dto.js +3 -1
  10. package/dist/profile/cross-sale/cross-sale.dto.d.ts +2 -2
  11. package/dist/profile/cross-sale/cross-sale.dto.js +3 -1
  12. package/dist/profile/cross-sale/cross-sale.ro.d.ts +2 -2
  13. package/dist/profile/custom-client-booking-email/custom-client-booking-email.dto.d.ts +2 -2
  14. package/dist/profile/custom-client-booking-email/custom-client-booking-email.dto.js +3 -1
  15. package/dist/profile/custom-client-booking-email/custom-client-booking-email.ro.d.ts +2 -2
  16. package/dist/profile/marketing-automation/marketing-automation.dto.d.ts +2 -2
  17. package/dist/profile/marketing-automation/marketing-automation.dto.js +3 -1
  18. package/dist/profile/marketing-automation/marketing-automation.ro.d.ts +2 -2
  19. package/dist/profile/marketing-email/create-profile-marketing-email-campaign.dto.d.ts +14 -13
  20. package/dist/profile/marketing-email/create-profile-marketing-email-campaign.dto.js +19 -28
  21. package/dist/profile/marketing-email/preflight-issue.ro.d.ts +31 -1
  22. package/dist/profile/marketing-email/preflight-issue.ro.js +30 -0
  23. package/dist/profile/marketing-email/preview-campaign-v2.dto.d.ts +2 -2
  24. package/dist/profile/marketing-email/preview-campaign-v2.dto.js +2 -2
  25. package/dist/profile/marketing-email/preview-profile-marketing-segment.dto.d.ts +6 -0
  26. package/dist/profile/marketing-email/preview-profile-marketing-segment.dto.js +8 -0
  27. package/dist/profile/marketing-email/preview-profile-marketing-segment.ro.d.ts +6 -1
  28. package/dist/profile/marketing-email/preview-profile-marketing-segment.ro.js +9 -1
  29. package/dist/profile/marketing-email/profile-marketing-email-campaign.ro.d.ts +11 -2
  30. package/dist/profile/marketing-email/profile-marketing-email-campaign.ro.js +12 -0
  31. package/dist/profile/marketing-email/profile-marketing-email-recipient-status.enum.d.ts +6 -0
  32. package/dist/profile/marketing-email/profile-marketing-email-recipient-status.enum.js +6 -0
  33. package/dist/profile/marketing-email/test-send-email-v2.dto.d.ts +2 -2
  34. package/dist/profile/marketing-email/test-send-email-v2.dto.js +2 -2
  35. package/dist/questroom-scenario-email/create-questroom-scenario-email.dto.d.ts +2 -2
  36. package/dist/questroom-scenario-email/create-questroom-scenario-email.dto.js +3 -1
  37. package/dist/questroom-scenario-email/questroom-scenario-email.ro.d.ts +2 -2
  38. package/dist/slot/slot-discount-range.validator.js +1 -1
  39. package/dist/tsconfig.build.tsbuildinfo +1 -1
  40. package/dist/upselling/create-upselling.dto.d.ts +5 -0
  41. package/dist/upselling/create-upselling.dto.js +8 -0
  42. package/dist/upselling/upselling.ro.d.ts +1 -0
  43. package/dist/upselling/upselling.ro.js +4 -0
  44. package/package.json +2 -2
@@ -9,35 +9,12 @@ 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.CreateProfileMarketingEmailCampaignDto = exports.EmailContentJsonV2Dto = void 0;
12
+ exports.CreateProfileMarketingEmailCampaignDto = exports.EmailContentDto = void 0;
13
13
  const class_transformer_1 = require("class-transformer");
14
14
  const class_validator_1 = require("class-validator");
15
- const email_builder_1 = require("../../email-builder");
15
+ const email_content_dto_1 = require("../../email-builder/email-content.dto");
16
+ Object.defineProperty(exports, "EmailContentDto", { enumerable: true, get: function () { return email_content_dto_1.EmailContentDto; } });
16
17
  const profile_marketing_email_goal_enum_1 = require("./profile-marketing-email-goal.enum");
17
- /**
18
- * Body of the campaign content payload — strict v2 schema produced by
19
- * the maily.to-based editor. Variable substitution / UTM injection /
20
- * footer are applied at send time on alfa-mailer.
21
- */
22
- class EmailContentJsonV2Dto {
23
- }
24
- exports.EmailContentJsonV2Dto = EmailContentJsonV2Dto;
25
- __decorate([
26
- (0, class_validator_1.Equals)(email_builder_1.EMAIL_CONTENT_VERSION_V2),
27
- (0, class_transformer_1.Expose)(),
28
- __metadata("design:type", Object)
29
- ], EmailContentJsonV2Dto.prototype, "version", void 0);
30
- __decorate([
31
- (0, class_validator_1.IsObject)(),
32
- (0, class_transformer_1.Expose)(),
33
- __metadata("design:type", Object)
34
- ], EmailContentJsonV2Dto.prototype, "doc", void 0);
35
- __decorate([
36
- (0, class_validator_1.IsOptional)(),
37
- (0, class_validator_1.IsObject)(),
38
- (0, class_transformer_1.Expose)(),
39
- __metadata("design:type", Object)
40
- ], EmailContentJsonV2Dto.prototype, "theme", void 0);
41
18
  class CreateProfileMarketingEmailCampaignDto {
42
19
  }
43
20
  exports.CreateProfileMarketingEmailCampaignDto = CreateProfileMarketingEmailCampaignDto;
@@ -91,9 +68,9 @@ __decorate([
91
68
  __decorate([
92
69
  (0, class_validator_1.IsDefined)(),
93
70
  (0, class_validator_1.ValidateNested)(),
94
- (0, class_transformer_1.Type)(() => EmailContentJsonV2Dto),
71
+ (0, class_transformer_1.Type)(() => email_content_dto_1.EmailContentDto),
95
72
  (0, class_transformer_1.Expose)(),
96
- __metadata("design:type", EmailContentJsonV2Dto)
73
+ __metadata("design:type", email_content_dto_1.EmailContentDto)
97
74
  ], CreateProfileMarketingEmailCampaignDto.prototype, "contentJson", void 0);
98
75
  __decorate([
99
76
  (0, class_validator_1.IsOptional)(),
@@ -146,6 +123,20 @@ __decorate([
146
123
  (0, class_transformer_1.Expose)(),
147
124
  __metadata("design:type", Number)
148
125
  ], CreateProfileMarketingEmailCampaignDto.prototype, "attributionWindowDays", void 0);
126
+ __decorate([
127
+ (0, class_validator_1.IsOptional)(),
128
+ (0, class_validator_1.IsInt)(),
129
+ (0, class_validator_1.Min)(0),
130
+ (0, class_validator_1.Max)(365),
131
+ (0, class_transformer_1.Expose)(),
132
+ __metadata("design:type", Number)
133
+ ], CreateProfileMarketingEmailCampaignDto.prototype, "frequencyCapDays", void 0);
134
+ __decorate([
135
+ (0, class_validator_1.IsOptional)(),
136
+ (0, class_validator_1.IsBoolean)(),
137
+ (0, class_transformer_1.Expose)(),
138
+ __metadata("design:type", Boolean)
139
+ ], CreateProfileMarketingEmailCampaignDto.prototype, "respectQuietHours", void 0);
149
140
  __decorate([
150
141
  (0, class_validator_1.IsOptional)(),
151
142
  (0, class_validator_1.IsInt)(),
@@ -16,7 +16,37 @@ export declare enum PreflightIssueCodeEnum {
16
16
  NonUniqueUtmCampaign = "non_unique_utm_campaign",
17
17
  NoUnsubscribe = "no_unsubscribe",
18
18
  NoGoals = "no_goals",
19
- NoConsentFilter = "no_consent_filter"
19
+ NoConsentFilter = "no_consent_filter",
20
+ /**
21
+ * Письмо тяжелее ~102 КБ: Gmail покажет «просмотреть всё сообщение»,
22
+ * и в обрезанный хвост уедет футер с отпиской. Предупреждение, не
23
+ * блокер — тяжёлые письма законны, просто хуже работают.
24
+ */
25
+ ContentTooLarge = "content_too_large",
26
+ /**
27
+ * В теле нет ни одной ссылки. Для рекламного письма это почти всегда
28
+ * ошибка вёрстки (потерянная CTA), а не осознанный выбор.
29
+ */
30
+ NoLinks = "no_links",
31
+ /** Картинки без `alt`: часть клиентов блокирует изображения по умолчанию. */
32
+ ImagesWithoutAlt = "images_without_alt",
33
+ /**
34
+ * В теле остались `{{переменные}}`, которых нет в scope письма —
35
+ * получатель увидит их буквально.
36
+ */
37
+ UnresolvedVariables = "unresolved_variables",
38
+ /**
39
+ * Запуск попал в тихие часы и будет сдвинут на утро. Предупреждение,
40
+ * а не блокер: отправка состоится, просто позже — и пользователь
41
+ * должен узнать об этом до нажатия «Отправить», а не из отчёта.
42
+ */
43
+ QuietHours = "quiet_hours",
44
+ /**
45
+ * Аудитория больше суточного лимита прогрева домена — отправка
46
+ * растянется на несколько дней. Предупреждение: письма не теряются,
47
+ * но пользователь должен понимать, почему «отправлено» растёт медленно.
48
+ */
49
+ DomainWarmup = "domain_warmup"
20
50
  }
21
51
  export declare class PreflightIssueRO {
22
52
  severity: PreflightIssueSeverityEnum;
@@ -32,6 +32,36 @@ var PreflightIssueCodeEnum;
32
32
  PreflightIssueCodeEnum["NoUnsubscribe"] = "no_unsubscribe";
33
33
  PreflightIssueCodeEnum["NoGoals"] = "no_goals";
34
34
  PreflightIssueCodeEnum["NoConsentFilter"] = "no_consent_filter";
35
+ /**
36
+ * Письмо тяжелее ~102 КБ: Gmail покажет «просмотреть всё сообщение»,
37
+ * и в обрезанный хвост уедет футер с отпиской. Предупреждение, не
38
+ * блокер — тяжёлые письма законны, просто хуже работают.
39
+ */
40
+ PreflightIssueCodeEnum["ContentTooLarge"] = "content_too_large";
41
+ /**
42
+ * В теле нет ни одной ссылки. Для рекламного письма это почти всегда
43
+ * ошибка вёрстки (потерянная CTA), а не осознанный выбор.
44
+ */
45
+ PreflightIssueCodeEnum["NoLinks"] = "no_links";
46
+ /** Картинки без `alt`: часть клиентов блокирует изображения по умолчанию. */
47
+ PreflightIssueCodeEnum["ImagesWithoutAlt"] = "images_without_alt";
48
+ /**
49
+ * В теле остались `{{переменные}}`, которых нет в scope письма —
50
+ * получатель увидит их буквально.
51
+ */
52
+ PreflightIssueCodeEnum["UnresolvedVariables"] = "unresolved_variables";
53
+ /**
54
+ * Запуск попал в тихие часы и будет сдвинут на утро. Предупреждение,
55
+ * а не блокер: отправка состоится, просто позже — и пользователь
56
+ * должен узнать об этом до нажатия «Отправить», а не из отчёта.
57
+ */
58
+ PreflightIssueCodeEnum["QuietHours"] = "quiet_hours";
59
+ /**
60
+ * Аудитория больше суточного лимита прогрева домена — отправка
61
+ * растянется на несколько дней. Предупреждение: письма не теряются,
62
+ * но пользователь должен понимать, почему «отправлено» растёт медленно.
63
+ */
64
+ PreflightIssueCodeEnum["DomainWarmup"] = "domain_warmup";
35
65
  })(PreflightIssueCodeEnum || (exports.PreflightIssueCodeEnum = PreflightIssueCodeEnum = {}));
36
66
  class PreflightIssueRO {
37
67
  }
@@ -1,5 +1,5 @@
1
1
  import { EmailScope } from '../../email-builder';
2
- import { EmailContentJsonV2Dto } from './create-profile-marketing-email-campaign.dto';
2
+ import { EmailContentDto } from './create-profile-marketing-email-campaign.dto';
3
3
  /**
4
4
  * Promocode-payload для preview. Фронт собирает поля из реальных
5
5
  * настроек письма (cross-sale/retargeting/birthday-discount form
@@ -27,7 +27,7 @@ export declare class PreviewPromocodeDto {
27
27
  * for the current profile) or from the scope's `exampleValue`s.
28
28
  */
29
29
  export declare class PreviewMarketingEmailCampaignV2Dto {
30
- contentJson: EmailContentJsonV2Dto;
30
+ contentJson: EmailContentDto;
31
31
  scope: EmailScope;
32
32
  /** Optional: render with a specific client's data for end-to-end QA. */
33
33
  previewClientId?: number;
@@ -56,9 +56,9 @@ exports.PreviewMarketingEmailCampaignV2Dto = PreviewMarketingEmailCampaignV2Dto;
56
56
  __decorate([
57
57
  (0, class_validator_1.IsDefined)(),
58
58
  (0, class_validator_1.ValidateNested)(),
59
- (0, class_transformer_1.Type)(() => create_profile_marketing_email_campaign_dto_1.EmailContentJsonV2Dto),
59
+ (0, class_transformer_1.Type)(() => create_profile_marketing_email_campaign_dto_1.EmailContentDto),
60
60
  (0, class_transformer_1.Expose)(),
61
- __metadata("design:type", create_profile_marketing_email_campaign_dto_1.EmailContentJsonV2Dto)
61
+ __metadata("design:type", create_profile_marketing_email_campaign_dto_1.EmailContentDto)
62
62
  ], PreviewMarketingEmailCampaignV2Dto.prototype, "contentJson", void 0);
63
63
  __decorate([
64
64
  (0, class_validator_1.IsEnum)(email_builder_1.EmailScope),
@@ -4,4 +4,10 @@
4
4
  */
5
5
  export declare class PreviewProfileMarketingSegmentDto {
6
6
  clientFilters?: Record<string, unknown>;
7
+ /**
8
+ * Frequency cap черновика. Приходит из формы, а не из БД: билдер
9
+ * пересчитывает аудиторию по несохранённым настройкам, и панель должна
10
+ * реагировать на ползунок сразу.
11
+ */
12
+ frequencyCapDays?: number;
7
13
  }
@@ -25,3 +25,11 @@ __decorate([
25
25
  (0, class_transformer_1.Expose)(),
26
26
  __metadata("design:type", Object)
27
27
  ], PreviewProfileMarketingSegmentDto.prototype, "clientFilters", void 0);
28
+ __decorate([
29
+ (0, class_validator_1.IsOptional)(),
30
+ (0, class_validator_1.IsInt)(),
31
+ (0, class_validator_1.Min)(0),
32
+ (0, class_validator_1.Max)(365),
33
+ (0, class_transformer_1.Expose)(),
34
+ __metadata("design:type", Number)
35
+ ], PreviewProfileMarketingSegmentDto.prototype, "frequencyCapDays", void 0);
@@ -10,7 +10,11 @@
10
10
  * - `bounced` — клиенты с ранее отлетевшим email (`hasComplaint === true`).
11
11
  * - `suppressed` — пересечение `withConsent` с `profile-marketing-suppression`
12
12
  * (hard bounces, complaints, manual-list).
13
- * - `willBeSent` — итоговое число писем, которое уйдёт: `withConsent − suppressed`.
13
+ * - `frequencyCapped` — клиенты, которым письмо уже доставляли за
14
+ * последние `frequencyCapDays` дней (см. `frequency-cap.util`). `0`,
15
+ * если cap выключен.
16
+ * - `willBeSent` — итоговое число писем, которое уйдёт:
17
+ * `withConsent − suppressed − frequencyCapped`.
14
18
  *
15
19
  * `count` сохранён для обратной совместимости со старым UI до переключения.
16
20
  */
@@ -22,5 +26,6 @@ export declare class PreviewProfileMarketingSegmentRO {
22
26
  unsubscribed: number;
23
27
  bounced: number;
24
28
  suppressed: number;
29
+ frequencyCapped: number;
25
30
  willBeSent: number;
26
31
  }
@@ -23,7 +23,11 @@ const class_transformer_1 = require("class-transformer");
23
23
  * - `bounced` — клиенты с ранее отлетевшим email (`hasComplaint === true`).
24
24
  * - `suppressed` — пересечение `withConsent` с `profile-marketing-suppression`
25
25
  * (hard bounces, complaints, manual-list).
26
- * - `willBeSent` — итоговое число писем, которое уйдёт: `withConsent − suppressed`.
26
+ * - `frequencyCapped` — клиенты, которым письмо уже доставляли за
27
+ * последние `frequencyCapDays` дней (см. `frequency-cap.util`). `0`,
28
+ * если cap выключен.
29
+ * - `willBeSent` — итоговое число писем, которое уйдёт:
30
+ * `withConsent − suppressed − frequencyCapped`.
27
31
  *
28
32
  * `count` сохранён для обратной совместимости со старым UI до переключения.
29
33
  */
@@ -58,6 +62,10 @@ __decorate([
58
62
  (0, class_transformer_1.Expose)(),
59
63
  __metadata("design:type", Number)
60
64
  ], PreviewProfileMarketingSegmentRO.prototype, "suppressed", void 0);
65
+ __decorate([
66
+ (0, class_transformer_1.Expose)(),
67
+ __metadata("design:type", Number)
68
+ ], PreviewProfileMarketingSegmentRO.prototype, "frequencyCapped", void 0);
61
69
  __decorate([
62
70
  (0, class_transformer_1.Expose)(),
63
71
  __metadata("design:type", Number)
@@ -1,4 +1,4 @@
1
- import { EmailContentJsonV2 } from '../../email-builder';
1
+ import { EmailContent } from '../../email-builder';
2
2
  import { RO } from '../../shared/ro-class';
3
3
  import { ProfileMarketingEmailCampaignStatusEnum } from './profile-marketing-email-campaign-status.enum';
4
4
  import { ProfileMarketingEmailGoalEnum } from './profile-marketing-email-goal.enum';
@@ -12,7 +12,7 @@ export declare class ProfileMarketingEmailCampaignRO extends RO {
12
12
  fromName: string | null;
13
13
  replyTo: string | null;
14
14
  senderId: number | null;
15
- contentJson: EmailContentJsonV2;
15
+ contentJson: EmailContent;
16
16
  utmSource: string;
17
17
  utmMedium: string;
18
18
  utmCampaign: string;
@@ -20,6 +20,15 @@ export declare class ProfileMarketingEmailCampaignRO extends RO {
20
20
  utmTerm: string | null;
21
21
  goalTypes: ProfileMarketingEmailGoalEnum[];
22
22
  attributionWindowDays: number;
23
+ /** Frequency cap в днях; `0` — выключен. */
24
+ frequencyCapDays: number;
25
+ /** Сдвигать старт, если он попал в тихие часы. */
26
+ respectQuietHours: boolean;
27
+ /**
28
+ * Заполнено, когда доотправку сдерживает прогрев домена: кампания
29
+ * продолжится не раньше этого момента.
30
+ */
31
+ throttledUntil: Date | null;
23
32
  previewClientId: number | null;
24
33
  launchedAt: Date | null;
25
34
  scheduledAt: Date | null;
@@ -80,6 +80,18 @@ __decorate([
80
80
  (0, class_transformer_1.Expose)(),
81
81
  __metadata("design:type", Number)
82
82
  ], ProfileMarketingEmailCampaignRO.prototype, "attributionWindowDays", void 0);
83
+ __decorate([
84
+ (0, class_transformer_1.Expose)(),
85
+ __metadata("design:type", Number)
86
+ ], ProfileMarketingEmailCampaignRO.prototype, "frequencyCapDays", void 0);
87
+ __decorate([
88
+ (0, class_transformer_1.Expose)(),
89
+ __metadata("design:type", Boolean)
90
+ ], ProfileMarketingEmailCampaignRO.prototype, "respectQuietHours", void 0);
91
+ __decorate([
92
+ (0, class_transformer_1.Expose)(),
93
+ __metadata("design:type", Date)
94
+ ], ProfileMarketingEmailCampaignRO.prototype, "throttledUntil", void 0);
83
95
  __decorate([
84
96
  (0, class_transformer_1.Expose)(),
85
97
  __metadata("design:type", Number)
@@ -13,6 +13,12 @@ export declare enum ProfileMarketingEmailRecipientStatusEnum {
13
13
  SkippedInvalidEmail = "skipped_invalid_email",
14
14
  /** Дубль внутри той же кампании (одинаковый email у нескольких клиентов). */
15
15
  SkippedDuplicate = "skipped_duplicate",
16
+ /**
17
+ * Клиенту уже приходило маркетинговое письмо за последние
18
+ * `campaign.frequencyCapDays` дней. Не ошибка — сознательная защита
19
+ * списка от переписки, см. `ProfileMarketingEmailCampaignEntity`.
20
+ */
21
+ SkippedFrequencyCap = "skipped_frequency_cap",
16
22
  /** Кампания отменена до отправки этому получателю. */
17
23
  Cancelled = "cancelled"
18
24
  }
@@ -17,6 +17,12 @@ var ProfileMarketingEmailRecipientStatusEnum;
17
17
  ProfileMarketingEmailRecipientStatusEnum["SkippedInvalidEmail"] = "skipped_invalid_email";
18
18
  /** Дубль внутри той же кампании (одинаковый email у нескольких клиентов). */
19
19
  ProfileMarketingEmailRecipientStatusEnum["SkippedDuplicate"] = "skipped_duplicate";
20
+ /**
21
+ * Клиенту уже приходило маркетинговое письмо за последние
22
+ * `campaign.frequencyCapDays` дней. Не ошибка — сознательная защита
23
+ * списка от переписки, см. `ProfileMarketingEmailCampaignEntity`.
24
+ */
25
+ ProfileMarketingEmailRecipientStatusEnum["SkippedFrequencyCap"] = "skipped_frequency_cap";
20
26
  /** Кампания отменена до отправки этому получателю. */
21
27
  ProfileMarketingEmailRecipientStatusEnum["Cancelled"] = "cancelled";
22
28
  })(ProfileMarketingEmailRecipientStatusEnum || (exports.ProfileMarketingEmailRecipientStatusEnum = ProfileMarketingEmailRecipientStatusEnum = {}));
@@ -1,7 +1,7 @@
1
1
  import { EmailScope } from '../../email-builder';
2
2
  import { Languages } from '../../shared/enum/languages.enum';
3
3
  import { MarketingAutomationTypeEnum } from '../marketing-automation/marketing-automation-type.enum';
4
- import { EmailContentJsonV2Dto } from './create-profile-marketing-email-campaign.dto';
4
+ import { EmailContentDto } from './create-profile-marketing-email-campaign.dto';
5
5
  import { PreviewPromocodeDto } from './preview-campaign-v2.dto';
6
6
  /**
7
7
  * Request body for `POST /profile-marketing-email-campaigns/test-send-v2`.
@@ -20,7 +20,7 @@ import { PreviewPromocodeDto } from './preview-campaign-v2.dto';
20
20
  * `marketing-campaign`) → нужен `clientId` (номер клиента в профиле).
21
21
  */
22
22
  export declare class TestSendMarketingEmailV2Dto {
23
- contentJson: EmailContentJsonV2Dto;
23
+ contentJson: EmailContentDto;
24
24
  scope: EmailScope;
25
25
  /** Куда отправить тестовое письмо (inbox оператора). */
26
26
  email: string;
@@ -39,9 +39,9 @@ exports.TestSendMarketingEmailV2Dto = TestSendMarketingEmailV2Dto;
39
39
  __decorate([
40
40
  (0, class_validator_1.IsDefined)(),
41
41
  (0, class_validator_1.ValidateNested)(),
42
- (0, class_transformer_1.Type)(() => create_profile_marketing_email_campaign_dto_1.EmailContentJsonV2Dto),
42
+ (0, class_transformer_1.Type)(() => create_profile_marketing_email_campaign_dto_1.EmailContentDto),
43
43
  (0, class_transformer_1.Expose)(),
44
- __metadata("design:type", create_profile_marketing_email_campaign_dto_1.EmailContentJsonV2Dto)
44
+ __metadata("design:type", create_profile_marketing_email_campaign_dto_1.EmailContentDto)
45
45
  ], TestSendMarketingEmailV2Dto.prototype, "contentJson", void 0);
46
46
  __decorate([
47
47
  (0, class_validator_1.IsEnum)(email_builder_1.EmailScope),
@@ -1,4 +1,4 @@
1
- import { EmailContentJsonV2 } from '../email-builder';
1
+ import { EmailContent } from '../email-builder';
2
2
  export declare class CreateQuestroomScenarioEmailDto {
3
3
  title: string;
4
4
  text: string;
@@ -13,7 +13,7 @@ export declare class CreateQuestroomScenarioEmailDto {
13
13
  * fallback'а — v1 `transformText` всё ещё доступен через
14
14
  * `feedbackText`/`text` для пользователей, не прошедших backfill.
15
15
  */
16
- contentJson?: EmailContentJsonV2 | null;
16
+ contentJson?: EmailContent | null;
17
17
  sendImmediately: boolean;
18
18
  sendBefore: number;
19
19
  questroomId: number;
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.CreateQuestroomScenarioEmailDto = void 0;
13
13
  const class_transformer_1 = require("class-transformer");
14
14
  const class_validator_1 = require("class-validator");
15
+ const email_content_dto_1 = require("../email-builder/email-content.dto");
15
16
  const is_not_blank_1 = require("../shared/is-not-blank");
16
17
  class CreateQuestroomScenarioEmailDto {
17
18
  }
@@ -28,7 +29,8 @@ __decorate([
28
29
  ], CreateQuestroomScenarioEmailDto.prototype, "text", void 0);
29
30
  __decorate([
30
31
  (0, class_validator_1.IsOptional)(),
31
- (0, class_validator_1.IsObject)(),
32
+ (0, class_validator_1.ValidateNested)(),
33
+ (0, class_transformer_1.Type)(() => email_content_dto_1.EmailContentDto),
32
34
  (0, class_transformer_1.Expose)(),
33
35
  __metadata("design:type", Object)
34
36
  ], CreateQuestroomScenarioEmailDto.prototype, "contentJson", void 0);
@@ -1,9 +1,9 @@
1
- import { EmailContentJsonV2 } from '../email-builder';
1
+ import { EmailContent } from '../email-builder';
2
2
  import { RO } from '../shared/ro-class';
3
3
  export declare class QuestroomScenarioEmailRO extends RO {
4
4
  title: string;
5
5
  text: string;
6
- contentJson?: EmailContentJsonV2 | null;
6
+ contentJson?: EmailContent | null;
7
7
  sendBefore: number;
8
8
  sendImmediately: boolean;
9
9
  questroomId: number;
@@ -24,7 +24,7 @@ let SlotDiscountRangeConstraint = class SlotDiscountRangeConstraint {
24
24
  if (!Number.isFinite(discount) || discount < 0)
25
25
  return false;
26
26
  const { discountType } = args.object;
27
- return discount <= (discountType === slot_discount_type_enum_1.SlotDiscountTypeEnum.FIXED ? MAX_FIXED_DISCOUNT : 10000);
27
+ return (discount <= (discountType === slot_discount_type_enum_1.SlotDiscountTypeEnum.FIXED ? MAX_FIXED_DISCOUNT : 10000));
28
28
  }
29
29
  defaultMessage() {
30
30
  return 'slotDiscountOutOfRange';