@escapenavigator/types 2.0.15 → 2.0.16

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 (37) hide show
  1. package/dist/certificate-v2/certificate-design.ro.d.ts +1 -0
  2. package/dist/certificate-v2/certificate-design.ro.js +4 -0
  3. package/dist/certificate-v2/create-certificate-design.dto.d.ts +1 -0
  4. package/dist/certificate-v2/create-certificate-design.dto.js +6 -0
  5. package/dist/city-person/city-person-attraction-link.dto.d.ts +1 -1
  6. package/dist/city-person/city-person-attraction-link.ro.d.ts +1 -1
  7. package/dist/city-person/city-person-locale.ro.d.ts +1 -1
  8. package/dist/city-person/upsert-city-person-locale.dto.d.ts +1 -1
  9. package/dist/openapi/certificates-v2/openapi-certificate-design.ro.d.ts +1 -0
  10. package/dist/openapi/certificates-v2/openapi-certificate-design.ro.js +4 -0
  11. package/dist/openapi/widget/openapi-resolve-promocode.ro.d.ts +2 -0
  12. package/dist/openapi/widget/openapi-resolve-promocode.ro.js +4 -0
  13. package/dist/openapi/widget/openapi-widget-info.ro.d.ts +6 -0
  14. package/dist/openapi/widget/openapi-widget-info.ro.js +4 -0
  15. package/dist/partners-portal/create-partner-attraction.dto.d.ts +1 -1
  16. package/dist/partners-portal/partner-city-quest.ro.d.ts +1 -1
  17. package/dist/profile/marketing-automation/marketing-automation-capabilities.js +2 -1
  18. package/dist/profile/marketing-automation/marketing-automation-config.dto.d.ts +2 -1
  19. package/dist/profile/notification-chanel/notification-chanel.ro.d.ts +3 -0
  20. package/dist/profile/notification-chanel/notification-chanel.ro.js +6 -0
  21. package/dist/profile/notification-chanel/test-notification-chanel.dto.d.ts +6 -0
  22. package/dist/profile/notification-chanel/test-notification-chanel.dto.js +29 -0
  23. package/dist/profile/notification-chanel/webhook-health.ro.d.ts +36 -0
  24. package/dist/profile/notification-chanel/webhook-health.ro.js +54 -0
  25. package/dist/profile/notification-chanel/webhook-test-result.ro.d.ts +11 -0
  26. package/dist/profile/notification-chanel/webhook-test-result.ro.js +42 -0
  27. package/dist/promocode/create-promocode.dto.d.ts +5 -0
  28. package/dist/promocode/create-promocode.dto.js +18 -3
  29. package/dist/promocode/emun/promocode-type.enum.d.ts +7 -1
  30. package/dist/promocode/emun/promocode-type.enum.js +6 -0
  31. package/dist/promocode/promocode.ro.d.ts +1 -0
  32. package/dist/promocode/promocode.ro.js +4 -0
  33. package/dist/tsconfig.build.tsbuildinfo +1 -1
  34. package/dist/widget/create-widget.dto.d.ts +1 -0
  35. package/dist/widget/create-widget.dto.js +7 -0
  36. package/dist/widget/widget.ro.d.ts +5 -0
  37. package/package.json +2 -2
@@ -7,6 +7,7 @@ export declare class CertificateDesignRO extends RO {
7
7
  availableEmail: boolean;
8
8
  availablePhysical: boolean;
9
9
  availablePickup: boolean;
10
+ allowCustomNominal: boolean;
10
11
  pdfLink: string | null;
11
12
  packagePrice: number;
12
13
  deliveryPrice: number;
@@ -43,6 +43,10 @@ __decorate([
43
43
  (0, class_transformer_1.Expose)(),
44
44
  __metadata("design:type", Boolean)
45
45
  ], CertificateDesignRO.prototype, "availablePickup", void 0);
46
+ __decorate([
47
+ (0, class_transformer_1.Expose)(),
48
+ __metadata("design:type", Boolean)
49
+ ], CertificateDesignRO.prototype, "allowCustomNominal", void 0);
46
50
  __decorate([
47
51
  (0, class_transformer_1.Expose)(),
48
52
  __metadata("design:type", String)
@@ -5,6 +5,7 @@ export declare class CreateCertificateDesignDto {
5
5
  availableEmail: boolean;
6
6
  availablePhysical: boolean;
7
7
  availablePickup: boolean;
8
+ allowCustomNominal: boolean;
8
9
  pdfLink?: string | null;
9
10
  packagePrice?: number;
10
11
  deliveryPrice?: number;
@@ -56,6 +56,12 @@ __decorate([
56
56
  (0, class_transformer_1.Expose)(),
57
57
  __metadata("design:type", Boolean)
58
58
  ], CreateCertificateDesignDto.prototype, "availablePickup", void 0);
59
+ __decorate([
60
+ (0, class_validator_1.IsBoolean)(),
61
+ (0, class_transformer_1.Transform)(({ value }) => checkBoolean({ value }, true)),
62
+ (0, class_transformer_1.Expose)(),
63
+ __metadata("design:type", Boolean)
64
+ ], CreateCertificateDesignDto.prototype, "allowCustomNominal", void 0);
59
65
  __decorate([
60
66
  (0, class_validator_1.ValidateIf)((o) => !!o.pdfLink),
61
67
  (0, class_validator_1.IsUrl)(),
@@ -1,5 +1,5 @@
1
- import { PersonAttractionFactsByLang } from './person-attraction-facts';
2
1
  import { PersonAttractionRoleEnum } from './enum/person-attraction-role.enum';
2
+ import { PersonAttractionFactsByLang } from './person-attraction-facts';
3
3
  export declare class CityPersonAttractionLinkDto {
4
4
  attractionId: number;
5
5
  role: PersonAttractionRoleEnum;
@@ -1,6 +1,6 @@
1
1
  import { ResponseObject } from '../shared/ro';
2
- import { PersonAttractionFactsByLang } from './person-attraction-facts';
3
2
  import { PersonAttractionRoleEnum } from './enum/person-attraction-role.enum';
3
+ import { PersonAttractionFactsByLang } from './person-attraction-facts';
4
4
  export type CityPersonAttractionLinkRO = ResponseObject & {
5
5
  personId: number;
6
6
  attractionId: number;
@@ -1,7 +1,7 @@
1
1
  import { Languages } from '../shared/enum/languages.enum';
2
2
  import { ResponseObject } from '../shared/ro';
3
- import { PersonLocaleFact } from './person-locale-fact';
4
3
  import { PersonLocaleStatusEnum } from './enum/person-locale-status.enum';
4
+ import { PersonLocaleFact } from './person-locale-fact';
5
5
  export type CityPersonLocaleRO = ResponseObject & {
6
6
  personId: number;
7
7
  language: Languages;
@@ -1,7 +1,7 @@
1
1
  import { Languages } from '../shared/enum/languages.enum';
2
- import { PersonLocaleFact } from './person-locale-fact';
3
2
  import { PersonFactKindEnum } from './enum/person-fact-kind.enum';
4
3
  import { PersonLocaleStatusEnum } from './enum/person-locale-status.enum';
4
+ import { PersonLocaleFact } from './person-locale-fact';
5
5
  export declare class PersonLocaleFactDto {
6
6
  id: string;
7
7
  kind: PersonFactKindEnum;
@@ -6,6 +6,7 @@ export declare class OpenapiCertificateDesignRO {
6
6
  availableEmail: boolean;
7
7
  availablePhysical: boolean;
8
8
  availablePickup: boolean;
9
+ allowCustomNominal: boolean;
9
10
  pdfLink: string | null;
10
11
  packagePrice: number;
11
12
  deliveryPrice: number;
@@ -42,6 +42,10 @@ __decorate([
42
42
  (0, class_transformer_1.Expose)(),
43
43
  __metadata("design:type", Boolean)
44
44
  ], OpenapiCertificateDesignRO.prototype, "availablePickup", void 0);
45
+ __decorate([
46
+ (0, class_transformer_1.Expose)(),
47
+ __metadata("design:type", Boolean)
48
+ ], OpenapiCertificateDesignRO.prototype, "allowCustomNominal", void 0);
45
49
  __decorate([
46
50
  (0, class_transformer_1.Expose)(),
47
51
  __metadata("design:type", String)
@@ -17,6 +17,8 @@ export declare class OpenapiPromocodeWidgetRO {
17
17
  availableForCertificates: boolean;
18
18
  canUseWithOtherPromocodes: boolean;
19
19
  canUseWithOtherCertificates: boolean;
20
+ /** Промокод требует онлайн-оплаты заказа (оплата на месте недоступна). */
21
+ onlinePaymentOnly: boolean;
20
22
  allQuestrooms: boolean;
21
23
  questroomsIds: number[];
22
24
  validFrom?: string;
@@ -59,6 +59,10 @@ __decorate([
59
59
  (0, class_transformer_1.Expose)(),
60
60
  __metadata("design:type", Boolean)
61
61
  ], OpenapiPromocodeWidgetRO.prototype, "canUseWithOtherCertificates", void 0);
62
+ __decorate([
63
+ (0, class_transformer_1.Expose)(),
64
+ __metadata("design:type", Boolean)
65
+ ], OpenapiPromocodeWidgetRO.prototype, "onlinePaymentOnly", void 0);
62
66
  __decorate([
63
67
  (0, class_transformer_1.Expose)(),
64
68
  __metadata("design:type", Boolean)
@@ -70,6 +70,12 @@ export declare class OpenapiWidgetInfoRO {
70
70
  * Единственный источник данных для подарочных сертификатов в виджете.
71
71
  */
72
72
  certificatesShop?: OpenapiCertificatesShopRO;
73
+ /**
74
+ * Виджет продаёт один конкретный дизайн сертификата. В этом режиме
75
+ * `certificatesShop.designs` уже отфильтрован до одного элемента, а виджет
76
+ * скрывает шаг выбора дизайна (остаются номиналы и способы доставки).
77
+ */
78
+ certificateDesignId?: number | null;
73
79
  profile: Profile;
74
80
  ga4Id?: string;
75
81
  gaCoversationId?: string;
@@ -205,6 +205,10 @@ __decorate([
205
205
  (0, class_transformer_1.Type)(() => openapi_certificates_shop_ro_1.OpenapiCertificatesShopRO),
206
206
  __metadata("design:type", openapi_certificates_shop_ro_1.OpenapiCertificatesShopRO)
207
207
  ], OpenapiWidgetInfoRO.prototype, "certificatesShop", void 0);
208
+ __decorate([
209
+ (0, class_transformer_1.Expose)(),
210
+ __metadata("design:type", Number)
211
+ ], OpenapiWidgetInfoRO.prototype, "certificateDesignId", void 0);
208
212
  __decorate([
209
213
  (0, class_transformer_1.Expose)(),
210
214
  (0, class_transformer_1.Type)(() => Profile),
@@ -1,7 +1,7 @@
1
+ import { AttractionRouteMeta } from '../city-attraction/attraction-route-meta';
1
2
  import { AttractionCategoryEnum } from '../city-attraction/enum/attraction-category.enum';
2
3
  import { AttractionFameEnum } from '../city-attraction/enum/attraction-fame.enum';
3
4
  import { AttractionIndoorOutdoorEnum } from '../city-attraction/enum/attraction-indoor-outdoor.enum';
4
- import { AttractionRouteMeta } from '../city-attraction/attraction-route-meta';
5
5
  import { AttractionRouteRoleEnum } from '../city-attraction/enum/attraction-route-role.enum';
6
6
  /**
7
7
  * Partner-facing create payload. cityId/country come from the story;
@@ -1,5 +1,5 @@
1
- import { CityQuestContent } from '../city-quest/city-quest-content';
2
1
  import { CityQuestRO } from '../city-quest/city-quest.ro';
2
+ import { CityQuestContent } from '../city-quest/city-quest-content';
3
3
  import { Languages } from '../shared/enum/languages.enum';
4
4
  import { PartnerCityQuestStopDto } from './partner-city-quest.dto';
5
5
  /** Partner editor view: quest meta + friendly stops (+ raw content for advanced). */
@@ -19,7 +19,8 @@ exports.MARKETING_AUTOMATION_CAPABILITIES = {
19
19
  supportsDiscount: false,
20
20
  },
21
21
  [marketing_automation_type_enum_1.MarketingAutomationTypeEnum.RETARGETING]: {
22
- timing: null,
22
+ // Точка отсчёта — момент покидания бронирования (не дата игры).
23
+ timing: { direction: 'after', unit: 'hours', min: 1, max: 72, default: 24 },
23
24
  supportsSendImmediately: false,
24
25
  supportsDiscount: true,
25
26
  },
@@ -14,8 +14,9 @@ export declare class MarketingAutomationConfigDto {
14
14
  * Единое поле тайминга: заменяет `sendAfter` / `sendBefore` /
15
15
  * `sendBeforeDays`. Величина в натуральной единице типа (capabilities
16
16
  * определяет, часы это или дни и в какую сторону от события).
17
+ * Для `retargeting` — часы после покидания бронирования (дефолт 24).
17
18
  * `undefined` — у типов без настраиваемого тайминга
18
- * (`retargeting` — фикс +1 день, `custom_booking` — транзакционно).
19
+ * (`custom_booking` — транзакционно).
19
20
  */
20
21
  sendOffset?: number;
21
22
  /**
@@ -1,6 +1,7 @@
1
1
  import { RO } from '../../shared/ro-class';
2
2
  import { NotificationTriggerEnum } from './notification-chanel-action.enum';
3
3
  import { NotificationChanelTypeEnum } from './notification-chanel-type.enum';
4
+ import { WebhookHealthRO } from './webhook-health.ro';
4
5
  export declare class NotificationChanelRO extends RO {
5
6
  url: string;
6
7
  userId: number;
@@ -10,4 +11,6 @@ export declare class NotificationChanelRO extends RO {
10
11
  allLocations: boolean;
11
12
  locationIds: number[];
12
13
  profileId: number;
14
+ /** Здоровье доставки — только для каналов типа WEBHOOK. */
15
+ health?: WebhookHealthRO;
13
16
  }
@@ -13,6 +13,7 @@ exports.NotificationChanelRO = void 0;
13
13
  const class_transformer_1 = require("class-transformer");
14
14
  const ro_class_1 = require("../../shared/ro-class");
15
15
  const notification_chanel_type_enum_1 = require("./notification-chanel-type.enum");
16
+ const webhook_health_ro_1 = require("./webhook-health.ro");
16
17
  class NotificationChanelRO extends ro_class_1.RO {
17
18
  }
18
19
  exports.NotificationChanelRO = NotificationChanelRO;
@@ -48,3 +49,8 @@ __decorate([
48
49
  (0, class_transformer_1.Expose)(),
49
50
  __metadata("design:type", Number)
50
51
  ], NotificationChanelRO.prototype, "profileId", void 0);
52
+ __decorate([
53
+ (0, class_transformer_1.Expose)(),
54
+ (0, class_transformer_1.Type)(() => webhook_health_ro_1.WebhookHealthRO),
55
+ __metadata("design:type", webhook_health_ro_1.WebhookHealthRO)
56
+ ], NotificationChanelRO.prototype, "health", void 0);
@@ -0,0 +1,6 @@
1
+ import { NotificationTriggerEnum } from './notification-chanel-action.enum';
2
+ export declare class TestNotificationChanelDto {
3
+ /** ID заказа, на котором прогоняется тестовое событие. */
4
+ orderId: number;
5
+ trigger?: NotificationTriggerEnum;
6
+ }
@@ -0,0 +1,29 @@
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.TestNotificationChanelDto = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const class_validator_1 = require("class-validator");
15
+ const notification_chanel_action_enum_1 = require("./notification-chanel-action.enum");
16
+ class TestNotificationChanelDto {
17
+ }
18
+ exports.TestNotificationChanelDto = TestNotificationChanelDto;
19
+ __decorate([
20
+ (0, class_validator_1.IsInt)(),
21
+ (0, class_transformer_1.Expose)(),
22
+ __metadata("design:type", Number)
23
+ ], TestNotificationChanelDto.prototype, "orderId", void 0);
24
+ __decorate([
25
+ (0, class_validator_1.IsOptional)(),
26
+ (0, class_validator_1.IsEnum)(notification_chanel_action_enum_1.NotificationTriggerEnum),
27
+ (0, class_transformer_1.Expose)(),
28
+ __metadata("design:type", String)
29
+ ], TestNotificationChanelDto.prototype, "trigger", void 0);
@@ -0,0 +1,36 @@
1
+ import { NotificationTriggerEnum } from './notification-chanel-action.enum';
2
+ /** Классифицированный тип ошибки доставки вебхука (вместо сырых стектрейсов). */
3
+ export declare enum WebhookErrorKindEnum {
4
+ DNS = "dns",
5
+ REFUSED = "refused",
6
+ TIMEOUT = "timeout",
7
+ TLS = "tls",
8
+ HTTP_4XX = "http-4xx",
9
+ HTTP_5XX = "http-5xx",
10
+ INVALID_URL = "invalid-url",
11
+ OTHER = "other"
12
+ }
13
+ export declare enum WebhookHealthStatusEnum {
14
+ HEALTHY = "healthy",
15
+ DEGRADED = "degraded",
16
+ FAILING = "failing"
17
+ }
18
+ /** Одна запись в капнутом списке последних ошибок канала. */
19
+ export type WebhookRecentError = {
20
+ /** ISO-дата ошибки. */
21
+ at: string;
22
+ trigger: NotificationTriggerEnum | string;
23
+ kind: WebhookErrorKindEnum;
24
+ httpStatus?: number;
25
+ /** Обрезанное сообщение ошибки (для деталей, не для парсинга). */
26
+ message?: string;
27
+ orderId?: number;
28
+ certificateId?: number;
29
+ };
30
+ export declare class WebhookHealthRO {
31
+ status: WebhookHealthStatusEnum;
32
+ lastSuccessAt: string | null;
33
+ lastFailureAt: string | null;
34
+ consecutiveFailures: number;
35
+ recentErrors: WebhookRecentError[];
36
+ }
@@ -0,0 +1,54 @@
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.WebhookHealthRO = exports.WebhookHealthStatusEnum = exports.WebhookErrorKindEnum = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ /** Классифицированный тип ошибки доставки вебхука (вместо сырых стектрейсов). */
15
+ var WebhookErrorKindEnum;
16
+ (function (WebhookErrorKindEnum) {
17
+ WebhookErrorKindEnum["DNS"] = "dns";
18
+ WebhookErrorKindEnum["REFUSED"] = "refused";
19
+ WebhookErrorKindEnum["TIMEOUT"] = "timeout";
20
+ WebhookErrorKindEnum["TLS"] = "tls";
21
+ WebhookErrorKindEnum["HTTP_4XX"] = "http-4xx";
22
+ WebhookErrorKindEnum["HTTP_5XX"] = "http-5xx";
23
+ WebhookErrorKindEnum["INVALID_URL"] = "invalid-url";
24
+ WebhookErrorKindEnum["OTHER"] = "other";
25
+ })(WebhookErrorKindEnum || (exports.WebhookErrorKindEnum = WebhookErrorKindEnum = {}));
26
+ var WebhookHealthStatusEnum;
27
+ (function (WebhookHealthStatusEnum) {
28
+ WebhookHealthStatusEnum["HEALTHY"] = "healthy";
29
+ WebhookHealthStatusEnum["DEGRADED"] = "degraded";
30
+ WebhookHealthStatusEnum["FAILING"] = "failing";
31
+ })(WebhookHealthStatusEnum || (exports.WebhookHealthStatusEnum = WebhookHealthStatusEnum = {}));
32
+ class WebhookHealthRO {
33
+ }
34
+ exports.WebhookHealthRO = WebhookHealthRO;
35
+ __decorate([
36
+ (0, class_transformer_1.Expose)(),
37
+ __metadata("design:type", String)
38
+ ], WebhookHealthRO.prototype, "status", void 0);
39
+ __decorate([
40
+ (0, class_transformer_1.Expose)(),
41
+ __metadata("design:type", String)
42
+ ], WebhookHealthRO.prototype, "lastSuccessAt", void 0);
43
+ __decorate([
44
+ (0, class_transformer_1.Expose)(),
45
+ __metadata("design:type", String)
46
+ ], WebhookHealthRO.prototype, "lastFailureAt", void 0);
47
+ __decorate([
48
+ (0, class_transformer_1.Expose)(),
49
+ __metadata("design:type", Number)
50
+ ], WebhookHealthRO.prototype, "consecutiveFailures", void 0);
51
+ __decorate([
52
+ (0, class_transformer_1.Expose)(),
53
+ __metadata("design:type", Array)
54
+ ], WebhookHealthRO.prototype, "recentErrors", void 0);
@@ -0,0 +1,11 @@
1
+ import { WebhookErrorKindEnum } from './webhook-health.ro';
2
+ /** Результат ручного теста вебхука («ввести ID игры и прогнать событие»). */
3
+ export declare class WebhookTestResultRO {
4
+ ok: boolean;
5
+ httpStatus?: number;
6
+ durationMs: number;
7
+ /** Первые ~500 символов тела ответа приёмника. */
8
+ responseSnippet?: string;
9
+ errorKind?: WebhookErrorKindEnum;
10
+ errorMessage?: string;
11
+ }
@@ -0,0 +1,42 @@
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.WebhookTestResultRO = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const webhook_health_ro_1 = require("./webhook-health.ro");
15
+ /** Результат ручного теста вебхука («ввести ID игры и прогнать событие»). */
16
+ class WebhookTestResultRO {
17
+ }
18
+ exports.WebhookTestResultRO = WebhookTestResultRO;
19
+ __decorate([
20
+ (0, class_transformer_1.Expose)(),
21
+ __metadata("design:type", Boolean)
22
+ ], WebhookTestResultRO.prototype, "ok", void 0);
23
+ __decorate([
24
+ (0, class_transformer_1.Expose)(),
25
+ __metadata("design:type", Number)
26
+ ], WebhookTestResultRO.prototype, "httpStatus", void 0);
27
+ __decorate([
28
+ (0, class_transformer_1.Expose)(),
29
+ __metadata("design:type", Number)
30
+ ], WebhookTestResultRO.prototype, "durationMs", void 0);
31
+ __decorate([
32
+ (0, class_transformer_1.Expose)(),
33
+ __metadata("design:type", String)
34
+ ], WebhookTestResultRO.prototype, "responseSnippet", void 0);
35
+ __decorate([
36
+ (0, class_transformer_1.Expose)(),
37
+ __metadata("design:type", String)
38
+ ], WebhookTestResultRO.prototype, "errorKind", void 0);
39
+ __decorate([
40
+ (0, class_transformer_1.Expose)(),
41
+ __metadata("design:type", String)
42
+ ], WebhookTestResultRO.prototype, "errorMessage", void 0);
@@ -12,6 +12,11 @@ export declare class CreatePromocodeDto {
12
12
  canUseWithOtherPromocodes: boolean;
13
13
  availableForCertificates: boolean;
14
14
  availableForBookings: boolean;
15
+ /**
16
+ * Требовать онлайн-оплату заказа, к которому применён промокод:
17
+ * в виджете скрывается оплата на месте. Доступно для всех типов.
18
+ */
19
+ onlinePaymentOnly: boolean;
15
20
  inside: boolean;
16
21
  canUseWithOtherCertificates: boolean;
17
22
  availableApplyings: number;
@@ -53,21 +53,36 @@ __decorate([
53
53
  __decorate([
54
54
  (0, class_validator_1.IsBoolean)(),
55
55
  (0, class_transformer_1.Expose)(),
56
- (0, class_transformer_1.Transform)(({ value }) => value !== null && value !== void 0 ? value : false),
56
+ (0, class_transformer_1.Transform)(({ obj, value }) =>
57
+ // Флеш-цена фиксирует итог за игроков — комбинирование с другими
58
+ // промокодами сломало бы «фиксированность». Форсим false.
59
+ obj.type === promocode_type_enum_1.PromocodeTypeEnum.FLASH_PRICE ? false : value !== null && value !== void 0 ? value : false),
57
60
  __metadata("design:type", Boolean)
58
61
  ], CreatePromocodeDto.prototype, "canUseWithOtherPromocodes", void 0);
59
62
  __decorate([
60
63
  (0, class_validator_1.IsBoolean)(),
61
64
  (0, class_transformer_1.Expose)(),
62
- (0, class_transformer_1.Transform)(({ value }) => value !== null && value !== void 0 ? value : false),
65
+ (0, class_transformer_1.Transform)(({ obj, value }) =>
66
+ // Флеш-цена применима только к играм (цена за кол-во игроков).
67
+ obj.type === promocode_type_enum_1.PromocodeTypeEnum.FLASH_PRICE ? false : value !== null && value !== void 0 ? value : false),
63
68
  __metadata("design:type", Boolean)
64
69
  ], CreatePromocodeDto.prototype, "availableForCertificates", void 0);
65
70
  __decorate([
66
71
  (0, class_validator_1.IsBoolean)(),
67
72
  (0, class_transformer_1.Expose)(),
68
- (0, class_transformer_1.Transform)(({ value }) => (value === undefined ? true : value)),
73
+ (0, class_transformer_1.Transform)(({ obj, value }) => {
74
+ if (obj.type === promocode_type_enum_1.PromocodeTypeEnum.FLASH_PRICE)
75
+ return true;
76
+ return value === undefined ? true : value;
77
+ }),
69
78
  __metadata("design:type", Boolean)
70
79
  ], CreatePromocodeDto.prototype, "availableForBookings", void 0);
80
+ __decorate([
81
+ (0, class_validator_1.IsBoolean)(),
82
+ (0, class_transformer_1.Expose)(),
83
+ (0, class_transformer_1.Transform)(({ value }) => value !== null && value !== void 0 ? value : false),
84
+ __metadata("design:type", Boolean)
85
+ ], CreatePromocodeDto.prototype, "onlinePaymentOnly", void 0);
71
86
  __decorate([
72
87
  (0, class_validator_1.IsBoolean)(),
73
88
  (0, class_transformer_1.Expose)(),
@@ -2,5 +2,11 @@ export declare enum PromocodeTypeEnum {
2
2
  FIXED = "fixed",
3
3
  PERCENT_ALL_SUM = "percent_all_sum",
4
4
  PERCENT_BASE_SUM = "percent_base_sum",
5
- PROMOTIONAL = "promotional"
5
+ PROMOTIONAL = "promotional",
6
+ /**
7
+ * «Флеш цена»: `discount` хранит итоговую цену за игроков (в минорных
8
+ * единицах). Скидка динамическая: playersPrice − slotDiscount − flashPrice
9
+ * (не ниже 0). Доп. услуги и наценка на онлайн-оплату идут сверху.
10
+ */
11
+ FLASH_PRICE = "flash_price"
6
12
  }
@@ -7,4 +7,10 @@ var PromocodeTypeEnum;
7
7
  PromocodeTypeEnum["PERCENT_ALL_SUM"] = "percent_all_sum";
8
8
  PromocodeTypeEnum["PERCENT_BASE_SUM"] = "percent_base_sum";
9
9
  PromocodeTypeEnum["PROMOTIONAL"] = "promotional";
10
+ /**
11
+ * «Флеш цена»: `discount` хранит итоговую цену за игроков (в минорных
12
+ * единицах). Скидка динамическая: playersPrice − slotDiscount − flashPrice
13
+ * (не ниже 0). Доп. услуги и наценка на онлайн-оплату идут сверху.
14
+ */
15
+ PromocodeTypeEnum["FLASH_PRICE"] = "flash_price";
10
16
  })(PromocodeTypeEnum || (exports.PromocodeTypeEnum = PromocodeTypeEnum = {}));
@@ -12,6 +12,7 @@ export declare class PromocodeRO extends RO {
12
12
  availableForCertificates: boolean;
13
13
  availableForBookings: boolean;
14
14
  canUseWithOtherCertificates: boolean;
15
+ onlinePaymentOnly: boolean;
15
16
  availableApplyings: number;
16
17
  inside: boolean;
17
18
  validFrom: string;
@@ -50,6 +50,10 @@ __decorate([
50
50
  (0, class_transformer_1.Expose)(),
51
51
  __metadata("design:type", Boolean)
52
52
  ], PromocodeRO.prototype, "canUseWithOtherCertificates", void 0);
53
+ __decorate([
54
+ (0, class_transformer_1.Expose)(),
55
+ __metadata("design:type", Boolean)
56
+ ], PromocodeRO.prototype, "onlinePaymentOnly", void 0);
53
57
  __decorate([
54
58
  (0, class_transformer_1.Expose)(),
55
59
  __metadata("design:type", Number)