@escapenavigator/types 2.2.9 → 2.3.0

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 (135) hide show
  1. package/dist/admin/aggregator-order/aggregator-order.ro.d.ts +2 -0
  2. package/dist/admin/aggregator-order/aggregator-order.ro.js +8 -0
  3. package/dist/admin/aggregator-order/create-aggregator-order.dto.d.ts +4 -0
  4. package/dist/admin/aggregator-order/create-aggregator-order.dto.js +25 -0
  5. package/dist/certificate-sale/certificate-sale.ro.d.ts +2 -0
  6. package/dist/certificate-sale/certificate-sale.ro.js +5 -0
  7. package/dist/certificate-uploaded/certificate-uploaded.ro.d.ts +2 -0
  8. package/dist/certificate-v2/certificate-settings.ro.d.ts +2 -0
  9. package/dist/certificate-v2/certificate-settings.ro.js +5 -0
  10. package/dist/certificate-v2/enum/certificate-tax-mode.enum.d.ts +4 -0
  11. package/dist/certificate-v2/enum/certificate-tax-mode.enum.js +8 -0
  12. package/dist/certificate-v2/update-certificate-settings.dto.d.ts +2 -0
  13. package/dist/certificate-v2/update-certificate-settings.dto.js +7 -0
  14. package/dist/fortune-wheel/fortune-wheel.d.ts +39 -0
  15. package/dist/fortune-wheel/fortune-wheel.js +24 -0
  16. package/dist/integrations/admin-integration.ro.d.ts +62 -3
  17. package/dist/kids-party-request/create-helper-request.dto.d.ts +26 -0
  18. package/dist/kids-party-request/create-helper-request.dto.js +138 -0
  19. package/dist/kids-party-request/kids-party-request.enums.d.ts +7 -1
  20. package/dist/kids-party-request/kids-party-request.enums.js +8 -1
  21. package/dist/kids-party-request/kids-party-request.ro.d.ts +9 -4
  22. package/dist/kids-party-request/query-kids-party-requests.dto.d.ts +2 -1
  23. package/dist/kids-party-request/query-kids-party-requests.dto.js +5 -0
  24. package/dist/lead/create-lead.dto.d.ts +1 -0
  25. package/dist/lead/create-lead.dto.js +7 -0
  26. package/dist/loyalty/client-loyalty-card.ro.d.ts +29 -0
  27. package/dist/loyalty/client-loyalty-card.ro.js +2 -0
  28. package/dist/openapi/orders/booking-calendar.d.ts +19 -0
  29. package/dist/openapi/orders/booking-calendar.js +29 -0
  30. package/dist/openapi/orders/openapi-create-preorder.dto.d.ts +2 -0
  31. package/dist/openapi/orders/openapi-create-preorder.dto.js +11 -0
  32. package/dist/openapi/orders/openapi-navigator-bonus.dto.d.ts +6 -0
  33. package/dist/openapi/orders/openapi-navigator-bonus.dto.js +40 -0
  34. package/dist/openapi/orders/openapi-order.ro.d.ts +5 -0
  35. package/dist/openapi/orders/openapi-order.ro.js +20 -0
  36. package/dist/openapi/orders/openapi-update-order-players.dto.d.ts +2 -0
  37. package/dist/openapi/orders/openapi-update-order-players.dto.js +11 -0
  38. package/dist/openapi/orders/openapi-update-order.dto.d.ts +2 -0
  39. package/dist/openapi/orders/openapi-update-order.dto.js +11 -0
  40. package/dist/openapi/profiles/openapi-create-certificate.dto.d.ts +2 -0
  41. package/dist/openapi/profiles/openapi-create-certificate.dto.js +7 -0
  42. package/dist/openapi/profiles/openapi-profile-booking-details.ro.d.ts +28 -0
  43. package/dist/openapi/profiles/openapi-profile-booking-details.ro.js +160 -1
  44. package/dist/openapi/shared/openapi-questroom.ro.d.ts +3 -0
  45. package/dist/openapi/shared/openapi-questroom.ro.js +8 -0
  46. package/dist/openapi/slots/openapi-slot-variation.ro.d.ts +2 -0
  47. package/dist/openapi/slots/openapi-slot-variation.ro.js +10 -0
  48. package/dist/order/create-order.dto.d.ts +4 -0
  49. package/dist/order/create-order.dto.js +18 -0
  50. package/dist/order/dashboard/dashboard-order-base.ro.d.ts +2 -0
  51. package/dist/order/dashboard/dashboard-order-base.ro.js +4 -0
  52. package/dist/order/order-light.ro.d.ts +2 -0
  53. package/dist/order/order-light.ro.js +4 -0
  54. package/dist/order/order-team.dto.d.ts +8 -0
  55. package/dist/order/order-team.dto.js +44 -0
  56. package/dist/order/order.ro.d.ts +7 -1
  57. package/dist/order/order.ro.js +20 -1
  58. package/dist/order/update-order-slot.dto.d.ts +2 -0
  59. package/dist/order/update-order-slot.dto.js +11 -0
  60. package/dist/order/update-players.dto.d.ts +2 -0
  61. package/dist/order/update-players.dto.js +11 -0
  62. package/dist/order-discount/enum/order-discount-source.enum.d.ts +1 -0
  63. package/dist/order-discount/enum/order-discount-source.enum.js +1 -0
  64. package/dist/order-group/order-group.ro.d.ts +4 -1
  65. package/dist/order-group/order-group.ro.js +9 -0
  66. package/dist/order-group/order-offer-copy.d.ts +77 -0
  67. package/dist/order-group/order-offer-copy.js +79 -0
  68. package/dist/order-group/order-offer.d.ts +95 -0
  69. package/dist/order-group/order-offer.js +188 -0
  70. package/dist/order-product/order-product.ro.d.ts +5 -0
  71. package/dist/order-product/order-product.ro.js +20 -0
  72. package/dist/packages/package-position-kind.enum.d.ts +2 -1
  73. package/dist/packages/package-position-kind.enum.js +1 -0
  74. package/dist/packages/package-position.dto.d.ts +1 -0
  75. package/dist/packages/package-position.dto.js +7 -0
  76. package/dist/packages/package.ro.d.ts +2 -0
  77. package/dist/packages/package.ro.js +8 -0
  78. package/dist/player/player.ro.d.ts +1 -0
  79. package/dist/player/player.ro.js +4 -0
  80. package/dist/player/recommender/recommender.dto.d.ts +20 -0
  81. package/dist/player/recommender/recommender.dto.js +100 -0
  82. package/dist/player/recommender/recommender.ro.d.ts +56 -0
  83. package/dist/player/recommender/recommender.ro.js +2 -0
  84. package/dist/product/create-product.dto.d.ts +1 -0
  85. package/dist/product/create-product.dto.js +8 -0
  86. package/dist/product/product.ro.d.ts +1 -0
  87. package/dist/product/product.ro.js +4 -0
  88. package/dist/product/update-product.dto.d.ts +1 -0
  89. package/dist/product/update-product.dto.js +8 -0
  90. package/dist/profile/admin-partner-filters.d.ts +31 -0
  91. package/dist/profile/admin-partner-filters.js +12 -0
  92. package/dist/profile/notification-chanel/notification-chanel-type.enum.d.ts +2 -0
  93. package/dist/profile/notification-chanel/notification-chanel-type.enum.js +2 -0
  94. package/dist/profile/notification-chanel/staff-messenger.dto.d.ts +37 -0
  95. package/dist/profile/notification-chanel/staff-messenger.dto.js +44 -0
  96. package/dist/profile/query-admin-profile.dto.d.ts +5 -0
  97. package/dist/profile/query-admin-profile.dto.js +17 -0
  98. package/dist/profile/telephony/call-journal.d.ts +67 -0
  99. package/dist/profile/telephony/call-journal.js +126 -0
  100. package/dist/profile/telephony/novofon.d.ts +10 -0
  101. package/dist/profile/telephony/novofon.js +29 -1
  102. package/dist/promocode/emun/promocode-kind.enum.d.ts +1 -0
  103. package/dist/promocode/emun/promocode-kind.enum.js +1 -0
  104. package/dist/salary/create-salary-scheme.dto.d.ts +2 -0
  105. package/dist/salary/create-salary-scheme.dto.js +8 -0
  106. package/dist/salary/index.d.ts +1 -0
  107. package/dist/salary/index.js +1 -0
  108. package/dist/salary/moderation-pay.dto.d.ts +35 -0
  109. package/dist/salary/moderation-pay.dto.js +117 -0
  110. package/dist/salary/query-salary-period.dto.d.ts +1 -0
  111. package/dist/salary/query-salary-period.dto.js +7 -0
  112. package/dist/salary/salary-accrual.ro.d.ts +2 -0
  113. package/dist/salary/salary-preview.ro.d.ts +2 -0
  114. package/dist/salary/salary-scheme.ro.d.ts +2 -0
  115. package/dist/slot/slot.ro.d.ts +3 -0
  116. package/dist/slot/update-slot-conditions.dto.d.ts +27 -0
  117. package/dist/slot/update-slot-conditions.dto.js +124 -0
  118. package/dist/tariff/create-tariff.dto.d.ts +2 -0
  119. package/dist/tariff/create-tariff.dto.js +7 -0
  120. package/dist/tariff/enum/tariff-selection-mode.enum.d.ts +4 -0
  121. package/dist/tariff/enum/tariff-selection-mode.enum.js +8 -0
  122. package/dist/tariff/tariff-light.ro.d.ts +2 -0
  123. package/dist/tariff/tariff-light.ro.js +5 -0
  124. package/dist/tsconfig.build.tsbuildinfo +1 -1
  125. package/dist/user/task/user-task.ro.d.ts +2 -0
  126. package/dist/user/task/user-task.ro.js +8 -0
  127. package/dist/widget-chat/chat-channel.dto.d.ts +51 -0
  128. package/dist/widget-chat/chat-channel.dto.js +151 -0
  129. package/dist/widget-chat/widget-chat-conversation.ro.d.ts +5 -0
  130. package/dist/widget-chat/widget-chat-conversations-query.dto.d.ts +11 -0
  131. package/dist/widget-chat/widget-chat-conversations-query.dto.js +64 -0
  132. package/dist/widget-chat/widget-chat-message.ro.d.ts +5 -0
  133. package/dist/widget-chat/widget-chat-messages-query.dto.d.ts +3 -0
  134. package/dist/widget-chat/widget-chat-messages-query.dto.js +25 -0
  135. package/package.json +2 -2
@@ -12,6 +12,8 @@ declare class ProfileRO {
12
12
  title: string;
13
13
  }
14
14
  export declare class AggregatorOrderRO extends RO {
15
+ recommenderPlayerId?: number;
16
+ navigatorBonusAmount?: number;
15
17
  playerId?: number;
16
18
  player?: PlayerRO;
17
19
  email: string;
@@ -40,6 +40,14 @@ __decorate([
40
40
  class AggregatorOrderRO extends ro_class_1.RO {
41
41
  }
42
42
  exports.AggregatorOrderRO = AggregatorOrderRO;
43
+ __decorate([
44
+ (0, class_transformer_1.Expose)(),
45
+ __metadata("design:type", Number)
46
+ ], AggregatorOrderRO.prototype, "recommenderPlayerId", void 0);
47
+ __decorate([
48
+ (0, class_transformer_1.Expose)(),
49
+ __metadata("design:type", Number)
50
+ ], AggregatorOrderRO.prototype, "navigatorBonusAmount", void 0);
43
51
  __decorate([
44
52
  (0, class_transformer_1.Expose)(),
45
53
  __metadata("design:type", Number)
@@ -1,5 +1,9 @@
1
1
  import { Utm } from '../../order/order.ro';
2
2
  export declare class CreateAggregatorOrderDto {
3
+ asRecommender?: boolean;
4
+ navigatorBonusRequested?: number;
5
+ useNavigatorBonuses?: boolean;
6
+ navigatorBonusToken?: string;
3
7
  phone: string;
4
8
  /** Согласие на маркетинговую рассылку из блока согласий виджета. */
5
9
  sendAds?: boolean;
@@ -16,6 +16,31 @@ const order_ro_1 = require("../../order/order.ro");
16
16
  class CreateAggregatorOrderDto {
17
17
  }
18
18
  exports.CreateAggregatorOrderDto = CreateAggregatorOrderDto;
19
+ __decorate([
20
+ (0, class_transformer_1.Expose)(),
21
+ (0, class_validator_1.IsOptional)(),
22
+ (0, class_validator_1.IsBoolean)(),
23
+ __metadata("design:type", Boolean)
24
+ ], CreateAggregatorOrderDto.prototype, "asRecommender", void 0);
25
+ __decorate([
26
+ (0, class_validator_1.IsOptional)(),
27
+ (0, class_validator_1.IsInt)(),
28
+ (0, class_validator_1.Min)(0),
29
+ (0, class_transformer_1.Expose)(),
30
+ __metadata("design:type", Number)
31
+ ], CreateAggregatorOrderDto.prototype, "navigatorBonusRequested", void 0);
32
+ __decorate([
33
+ (0, class_validator_1.IsOptional)(),
34
+ (0, class_validator_1.IsBoolean)(),
35
+ (0, class_transformer_1.Expose)(),
36
+ __metadata("design:type", Boolean)
37
+ ], CreateAggregatorOrderDto.prototype, "useNavigatorBonuses", void 0);
38
+ __decorate([
39
+ (0, class_validator_1.IsOptional)(),
40
+ (0, class_validator_1.IsString)(),
41
+ (0, class_transformer_1.Expose)(),
42
+ __metadata("design:type", String)
43
+ ], CreateAggregatorOrderDto.prototype, "navigatorBonusToken", void 0);
19
44
  __decorate([
20
45
  (0, class_validator_1.IsNotEmpty)(),
21
46
  (0, class_transformer_1.Expose)(),
@@ -1,3 +1,4 @@
1
+ import { CertificateTaxModeEnum } from '../certificate-v2/enum/certificate-tax-mode.enum';
1
2
  import { ClientRO } from '../client/client.ro';
2
3
  import { Discounts, Transactions, Utm } from '../order/order.ro';
3
4
  import { RO } from '../shared/ro-class';
@@ -33,6 +34,7 @@ declare class Certificate {
33
34
  pdfLink: string;
34
35
  }
35
36
  export declare class CertificateSaleRO extends RO {
37
+ taxMode?: CertificateTaxModeEnum | null;
36
38
  profileId: number;
37
39
  updatedAt: Date;
38
40
  externalCode: string;
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.CertificateSaleRO = void 0;
13
13
  /* eslint-disable max-classes-per-file */
14
14
  const class_transformer_1 = require("class-transformer");
15
+ const certificate_tax_mode_enum_1 = require("../certificate-v2/enum/certificate-tax-mode.enum");
15
16
  const client_ro_1 = require("../client/client.ro");
16
17
  const order_ro_1 = require("../order/order.ro");
17
18
  const ro_class_1 = require("../shared/ro-class");
@@ -90,6 +91,10 @@ __decorate([
90
91
  class CertificateSaleRO extends ro_class_1.RO {
91
92
  }
92
93
  exports.CertificateSaleRO = CertificateSaleRO;
94
+ __decorate([
95
+ (0, class_transformer_1.Expose)(),
96
+ __metadata("design:type", String)
97
+ ], CertificateSaleRO.prototype, "taxMode", void 0);
93
98
  __decorate([
94
99
  (0, class_transformer_1.Expose)(),
95
100
  __metadata("design:type", Number)
@@ -1,5 +1,7 @@
1
+ import { CertificateTaxModeEnum } from '../certificate-v2/enum/certificate-tax-mode.enum';
1
2
  import { ResponseObject } from '../shared/ro';
2
3
  export type CertificateUploadedRO = ResponseObject & {
4
+ taxMode?: CertificateTaxModeEnum | null;
3
5
  source: string;
4
6
  code: string;
5
7
  client: string | null;
@@ -1,6 +1,8 @@
1
+ import { CertificateTaxModeEnum } from '../certificate-v2/enum/certificate-tax-mode.enum';
1
2
  import { RO } from '../shared/ro-class';
2
3
  import { CertificateShopFlowOrderEnum } from './enum/certificate-shop-flow-order.enum';
3
4
  export declare class CertificateSettingsRO extends RO {
5
+ taxMode?: CertificateTaxModeEnum | null;
4
6
  profileId: number;
5
7
  validity: number;
6
8
  clientCancellationDays: number;
@@ -11,11 +11,16 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.CertificateSettingsRO = void 0;
13
13
  const class_transformer_1 = require("class-transformer");
14
+ const certificate_tax_mode_enum_1 = require("../certificate-v2/enum/certificate-tax-mode.enum");
14
15
  const ro_class_1 = require("../shared/ro-class");
15
16
  const certificate_shop_flow_order_enum_1 = require("./enum/certificate-shop-flow-order.enum");
16
17
  class CertificateSettingsRO extends ro_class_1.RO {
17
18
  }
18
19
  exports.CertificateSettingsRO = CertificateSettingsRO;
20
+ __decorate([
21
+ (0, class_transformer_1.Expose)(),
22
+ __metadata("design:type", String)
23
+ ], CertificateSettingsRO.prototype, "taxMode", void 0);
19
24
  __decorate([
20
25
  (0, class_transformer_1.Expose)(),
21
26
  __metadata("design:type", Number)
@@ -0,0 +1,4 @@
1
+ export declare enum CertificateTaxModeEnum {
2
+ SALE = "sale",
3
+ REDEMPTION = "redemption"
4
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CertificateTaxModeEnum = void 0;
4
+ var CertificateTaxModeEnum;
5
+ (function (CertificateTaxModeEnum) {
6
+ CertificateTaxModeEnum["SALE"] = "sale";
7
+ CertificateTaxModeEnum["REDEMPTION"] = "redemption";
8
+ })(CertificateTaxModeEnum || (exports.CertificateTaxModeEnum = CertificateTaxModeEnum = {}));
@@ -1,5 +1,7 @@
1
1
  import { CertificateShopFlowOrderEnum } from './enum/certificate-shop-flow-order.enum';
2
+ import { CertificateTaxModeEnum } from './enum/certificate-tax-mode.enum';
2
3
  export declare class UpdateCertificateSettingsDto {
4
+ taxMode?: CertificateTaxModeEnum | null;
3
5
  validity?: number;
4
6
  clientCancellationDays?: number;
5
7
  allowFreeNominal?: boolean;
@@ -13,6 +13,7 @@ exports.UpdateCertificateSettingsDto = void 0;
13
13
  const class_transformer_1 = require("class-transformer");
14
14
  const class_validator_1 = require("class-validator");
15
15
  const certificate_shop_flow_order_enum_1 = require("./enum/certificate-shop-flow-order.enum");
16
+ const certificate_tax_mode_enum_1 = require("./enum/certificate-tax-mode.enum");
16
17
  /**
17
18
  * Нет ключа в патче — не подставляем дефолт. Иначе ValidationPipe
18
19
  * дописывает `false`/`true` на все `@Expose`-поля, и сохранение одной
@@ -32,6 +33,12 @@ function optionalNumber({ value }) {
32
33
  class UpdateCertificateSettingsDto {
33
34
  }
34
35
  exports.UpdateCertificateSettingsDto = UpdateCertificateSettingsDto;
36
+ __decorate([
37
+ (0, class_validator_1.IsOptional)(),
38
+ (0, class_validator_1.IsEnum)(certificate_tax_mode_enum_1.CertificateTaxModeEnum),
39
+ (0, class_transformer_1.Expose)(),
40
+ __metadata("design:type", String)
41
+ ], UpdateCertificateSettingsDto.prototype, "taxMode", void 0);
35
42
  __decorate([
36
43
  (0, class_validator_1.IsOptional)(),
37
44
  (0, class_validator_1.IsPositive)(),
@@ -0,0 +1,39 @@
1
+ export declare const FORTUNE_WHEEL_THEMES: readonly ["arcana", "vault", "slots", "orbit", "haunt", "monsters", "alchemy", "ocean", "cipher"];
2
+ export type FortuneWheelTheme = (typeof FORTUNE_WHEEL_THEMES)[number];
3
+ export type FortuneWheelPrize = {
4
+ id: string;
5
+ name: string;
6
+ description: string;
7
+ kind: 'percent' | 'fixed' | 'gift';
8
+ /** Fixed discounts are stored in minor currency units. */
9
+ value: number;
10
+ weight: number;
11
+ };
12
+ export type FortuneWheelSettings = {
13
+ enabled: boolean;
14
+ theme: FortuneWheelTheme;
15
+ brand: string;
16
+ accent: string;
17
+ background: 'dark' | 'graphite';
18
+ radius: number;
19
+ validityDays: number;
20
+ prizes: FortuneWheelPrize[];
21
+ };
22
+ export declare const defaultFortuneWheelSettings: FortuneWheelSettings;
23
+ export type FortuneWheelReward = {
24
+ prizeId: string;
25
+ name: string;
26
+ description: string;
27
+ code: string;
28
+ validTo: string;
29
+ };
30
+ export type FortuneWheelPage = {
31
+ settings: FortuneWheelSettings;
32
+ currency: string;
33
+ language: string;
34
+ reward: FortuneWheelReward | null;
35
+ };
36
+ /** Snapshot retained with the issued promocode; editing settings cannot rewrite a win. */
37
+ export type FortuneWheelSnapshot = FortuneWheelPage & {
38
+ reward: FortuneWheelReward;
39
+ };
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.defaultFortuneWheelSettings = exports.FORTUNE_WHEEL_THEMES = void 0;
4
+ exports.FORTUNE_WHEEL_THEMES = [
5
+ 'arcana',
6
+ 'vault',
7
+ 'slots',
8
+ 'orbit',
9
+ 'haunt',
10
+ 'monsters',
11
+ 'alchemy',
12
+ 'ocean',
13
+ 'cipher',
14
+ ];
15
+ exports.defaultFortuneWheelSettings = {
16
+ enabled: false,
17
+ theme: 'arcana',
18
+ brand: '',
19
+ accent: '#7659ee',
20
+ background: 'dark',
21
+ radius: 20,
22
+ validityDays: 30,
23
+ prizes: [],
24
+ };
@@ -1,6 +1,6 @@
1
1
  import { IntegrationBookingModeEnum } from './booking-mode.enum';
2
2
  import { IntegrationConnectionStatusEnum } from './connection-status.enum';
3
- import { IntegrationIncidentSeverityEnum } from './incident-status.enum';
3
+ import { IntegrationIncidentSeverityEnum, IntegrationIncidentStatusEnum } from './incident-status.enum';
4
4
  import { IntegrationIncidentTypeEnum } from './incident-type.enum';
5
5
  import { IntegrationRequestStatusEnum } from './integration-request-status.enum';
6
6
  import { IntegrationProviderCodeEnum } from './provider-code.enum';
@@ -34,10 +34,68 @@ export type AdminIntegrationConnectionRow = {
34
34
  lastSuccessHoursAgo: number | null;
35
35
  breakerOpen: boolean;
36
36
  };
37
+ /**
38
+ * Неисправленный квест на вкладке «Проблемы».
39
+ *
40
+ * Одна строка — один квест. Несколько записей (расписание не приходит, пустое
41
+ * расписание, бронь) схлопываются: `incidentIds` — все записи, смена статуса
42
+ * применяется к ним вместе. `resolved` и `ignored` в список не входят.
43
+ */
44
+ export type AdminIntegrationProblemRow = {
45
+ /** Меньший id среди записей квеста. Стабильный ключ строки. */
46
+ id: number;
47
+ /** Все неисправленные записи, из которых собрана строка. */
48
+ incidentIds: number[];
49
+ connectionId: number;
50
+ profileId: number;
51
+ profileTitle: string;
52
+ connectionTitle: string;
53
+ /** `null`, если подключение уже удалили, а инцидент ещё открыт. */
54
+ providerCode: IntegrationProviderCodeEnum | null;
55
+ connectionStatus: IntegrationConnectionStatusEnum;
56
+ breakerOpen: boolean;
57
+ /** Комната, по которой сгруппирована строка. `null` — отказ всего подключения. */
58
+ questroomId: number | null;
59
+ /** Квест, к которому относится инцидент. «—», если комнаты не сопоставлены. */
60
+ quest: string;
61
+ /** Тип самой тяжёлой записи. */
62
+ type: IntegrationIncidentTypeEnum;
63
+ /** Все типы, которые сейчас открыты у этого квеста. */
64
+ types: IntegrationIncidentTypeEnum[];
65
+ severity: IntegrationIncidentSeverityEnum;
66
+ /**
67
+ * `open`, если хотя бы одна запись ещё новая. Иначе все записи уже в работе.
68
+ */
69
+ status: IntegrationIncidentStatusEnum;
70
+ /** Человеческое описание: что сломалось. Несколько записей через « · ». */
71
+ summary: string;
72
+ occurrences: number;
73
+ firstSeenAt: string;
74
+ lastSeenAt: string;
75
+ /** Сколько часов инцидент уже открыт. Берётся самая старая запись квеста. */
76
+ hoursOpen: number;
77
+ /** Текст последней ошибки вызова, если он есть и не повтор summary. */
78
+ lastError: string | null;
79
+ /** Дата и время игры — только у инцидентов конкретной брони. */
80
+ gameDate: string | null;
81
+ gameTime: string | null;
82
+ orderId: number | null;
83
+ };
84
+ export type AdminIntegrationIncidentCounts = {
85
+ /** Квесты, которые ещё никто не взял. Совпадает со строками «Новый». */
86
+ open: number;
87
+ /** Квесты, которые уже в работе. */
88
+ acknowledged: number;
89
+ /** Записи, закрытые за последние сутки. */
90
+ resolved24h: number;
91
+ /** Записи, которые сейчас помечены как «не ошибка». */
92
+ ignored: number;
93
+ };
37
94
  export type AdminIntegrationDashboard = {
38
95
  byStatus: Record<IntegrationConnectionStatusEnum, number>;
39
- /** Подключения, требующие внимания: сначала аварии, потом деградации. */
40
- problems: AdminIntegrationConnectionRow[];
96
+ /** Неисправленные квесты. Сначала критические, потом самые долгие. */
97
+ problems: AdminIntegrationProblemRow[];
98
+ incidents: AdminIntegrationIncidentCounts;
41
99
  /** Броней, не доехавших за сутки. */
42
100
  failedBookings24h: number;
43
101
  /** Заявок на подключение, ждущих нашего ответа. */
@@ -66,6 +124,7 @@ export type AdminIntegrationIncidentRow = {
66
124
  id: number;
67
125
  type: IntegrationIncidentTypeEnum;
68
126
  severity: IntegrationIncidentSeverityEnum;
127
+ status: IntegrationIncidentStatusEnum;
69
128
  summary: string;
70
129
  firstSeenAt: string;
71
130
  lastSeenAt: string | null;
@@ -0,0 +1,26 @@
1
+ import { CountriesEnum } from '../shared/enum/countries.enum';
2
+ import { AggregatorRequestTypeEnum } from './kids-party-request.enums';
3
+ export declare class CreateHelperRequestDto {
4
+ type: AggregatorRequestTypeEnum;
5
+ citySlug: string;
6
+ country: CountriesEnum;
7
+ clientName: string;
8
+ clientPhone: string;
9
+ consent: boolean;
10
+ callbackTime: string;
11
+ occasion?: string;
12
+ audience?: string;
13
+ fear?: string;
14
+ minAge?: number;
15
+ playersCount?: number;
16
+ whenDate?: string;
17
+ gameTime?: string;
18
+ budgetMax?: number;
19
+ budgetCurrency?: string;
20
+ lounge?: boolean;
21
+ comment?: string;
22
+ locale?: string;
23
+ url?: string;
24
+ trap?: string;
25
+ }
26
+ export type HelperRequestAnswers = Pick<CreateHelperRequestDto, 'callbackTime' | 'occasion' | 'audience' | 'fear' | 'minAge' | 'playersCount' | 'gameTime' | 'budgetCurrency' | 'lounge'>;
@@ -0,0 +1,138 @@
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.CreateHelperRequestDto = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const class_validator_1 = require("class-validator");
15
+ const countries_enum_1 = require("../shared/enum/countries.enum");
16
+ const is_not_blank_1 = require("../shared/is-not-blank");
17
+ const kids_party_request_enums_1 = require("./kids-party-request.enums");
18
+ class CreateHelperRequestDto {
19
+ }
20
+ exports.CreateHelperRequestDto = CreateHelperRequestDto;
21
+ __decorate([
22
+ (0, class_validator_1.IsIn)([kids_party_request_enums_1.AggregatorRequestTypeEnum.CALLBACK, kids_party_request_enums_1.AggregatorRequestTypeEnum.QUEST_SELECTION]),
23
+ __metadata("design:type", String)
24
+ ], CreateHelperRequestDto.prototype, "type", void 0);
25
+ __decorate([
26
+ (0, class_validator_1.IsString)(),
27
+ (0, is_not_blank_1.IsNotBlank)(),
28
+ (0, class_validator_1.MaxLength)(200),
29
+ __metadata("design:type", String)
30
+ ], CreateHelperRequestDto.prototype, "citySlug", void 0);
31
+ __decorate([
32
+ (0, class_validator_1.IsEnum)(countries_enum_1.CountriesEnum),
33
+ __metadata("design:type", String)
34
+ ], CreateHelperRequestDto.prototype, "country", void 0);
35
+ __decorate([
36
+ (0, class_validator_1.IsString)(),
37
+ (0, is_not_blank_1.IsNotBlank)(),
38
+ (0, class_validator_1.MaxLength)(120),
39
+ __metadata("design:type", String)
40
+ ], CreateHelperRequestDto.prototype, "clientName", void 0);
41
+ __decorate([
42
+ (0, class_validator_1.IsString)(),
43
+ (0, class_validator_1.Matches)(/^\+?[\d\s()-]{8,32}$/),
44
+ (0, class_validator_1.MaxLength)(32),
45
+ __metadata("design:type", String)
46
+ ], CreateHelperRequestDto.prototype, "clientPhone", void 0);
47
+ __decorate([
48
+ (0, class_validator_1.Equals)(true),
49
+ __metadata("design:type", Boolean)
50
+ ], CreateHelperRequestDto.prototype, "consent", void 0);
51
+ __decorate([
52
+ (0, class_validator_1.IsIn)(['any', 'day', 'evening']),
53
+ __metadata("design:type", String)
54
+ ], CreateHelperRequestDto.prototype, "callbackTime", void 0);
55
+ __decorate([
56
+ (0, class_validator_1.ValidateIf)((o) => o.type === kids_party_request_enums_1.AggregatorRequestTypeEnum.QUEST_SELECTION),
57
+ (0, class_validator_1.IsIn)(['birthday', 'friends', 'kids_party', 'family', 'date', 'corporate', 'other']),
58
+ __metadata("design:type", String)
59
+ ], CreateHelperRequestDto.prototype, "occasion", void 0);
60
+ __decorate([
61
+ (0, class_validator_1.ValidateIf)((o) => o.type === kids_party_request_enums_1.AggregatorRequestTypeEnum.QUEST_SELECTION),
62
+ (0, class_validator_1.IsIn)(['adults', 'teens', 'children', 'mixed']),
63
+ __metadata("design:type", String)
64
+ ], CreateHelperRequestDto.prototype, "audience", void 0);
65
+ __decorate([
66
+ (0, class_validator_1.ValidateIf)((o) => o.type === kids_party_request_enums_1.AggregatorRequestTypeEnum.QUEST_SELECTION),
67
+ (0, class_validator_1.IsIn)(['none', 'mild', 'scary', 'unsure']),
68
+ __metadata("design:type", String)
69
+ ], CreateHelperRequestDto.prototype, "fear", void 0);
70
+ __decorate([
71
+ (0, class_validator_1.IsOptional)(),
72
+ (0, class_transformer_1.Type)(() => Number),
73
+ (0, class_validator_1.IsInt)(),
74
+ (0, class_validator_1.Min)(1),
75
+ (0, class_validator_1.Max)(120),
76
+ __metadata("design:type", Number)
77
+ ], CreateHelperRequestDto.prototype, "minAge", void 0);
78
+ __decorate([
79
+ (0, class_validator_1.IsOptional)(),
80
+ (0, class_transformer_1.Type)(() => Number),
81
+ (0, class_validator_1.IsInt)(),
82
+ (0, class_validator_1.Min)(1),
83
+ (0, class_validator_1.Max)(500),
84
+ __metadata("design:type", Number)
85
+ ], CreateHelperRequestDto.prototype, "playersCount", void 0);
86
+ __decorate([
87
+ (0, class_validator_1.IsOptional)(),
88
+ (0, class_validator_1.Matches)(/^\d{4}-\d{2}-\d{2}$/),
89
+ __metadata("design:type", String)
90
+ ], CreateHelperRequestDto.prototype, "whenDate", void 0);
91
+ __decorate([
92
+ (0, class_validator_1.IsOptional)(),
93
+ (0, class_validator_1.IsIn)(['any', 'day', 'evening']),
94
+ __metadata("design:type", String)
95
+ ], CreateHelperRequestDto.prototype, "gameTime", void 0);
96
+ __decorate([
97
+ (0, class_validator_1.IsOptional)(),
98
+ (0, class_transformer_1.Type)(() => Number),
99
+ (0, class_validator_1.IsInt)(),
100
+ (0, class_validator_1.Min)(1),
101
+ (0, class_validator_1.Max)(10000000),
102
+ __metadata("design:type", Number)
103
+ ], CreateHelperRequestDto.prototype, "budgetMax", void 0);
104
+ __decorate([
105
+ (0, class_validator_1.IsOptional)(),
106
+ (0, class_validator_1.IsString)(),
107
+ (0, class_validator_1.MaxLength)(12),
108
+ __metadata("design:type", String)
109
+ ], CreateHelperRequestDto.prototype, "budgetCurrency", void 0);
110
+ __decorate([
111
+ (0, class_validator_1.IsOptional)(),
112
+ (0, class_validator_1.IsBoolean)(),
113
+ __metadata("design:type", Boolean)
114
+ ], CreateHelperRequestDto.prototype, "lounge", void 0);
115
+ __decorate([
116
+ (0, class_validator_1.IsOptional)(),
117
+ (0, class_validator_1.IsString)(),
118
+ (0, class_validator_1.MaxLength)(2000),
119
+ __metadata("design:type", String)
120
+ ], CreateHelperRequestDto.prototype, "comment", void 0);
121
+ __decorate([
122
+ (0, class_validator_1.IsOptional)(),
123
+ (0, class_validator_1.IsString)(),
124
+ (0, class_validator_1.MaxLength)(12),
125
+ __metadata("design:type", String)
126
+ ], CreateHelperRequestDto.prototype, "locale", void 0);
127
+ __decorate([
128
+ (0, class_validator_1.IsOptional)(),
129
+ (0, class_validator_1.IsString)(),
130
+ (0, class_validator_1.MaxLength)(500),
131
+ __metadata("design:type", String)
132
+ ], CreateHelperRequestDto.prototype, "url", void 0);
133
+ __decorate([
134
+ (0, class_validator_1.IsOptional)(),
135
+ (0, class_validator_1.IsString)(),
136
+ (0, class_validator_1.MaxLength)(200),
137
+ __metadata("design:type", String)
138
+ ], CreateHelperRequestDto.prototype, "trap", void 0);
@@ -1,3 +1,8 @@
1
+ export declare enum AggregatorRequestTypeEnum {
2
+ KIDS_PARTY = "kids_party",
3
+ CALLBACK = "callback",
4
+ QUEST_SELECTION = "quest_selection"
5
+ }
1
6
  export declare enum KidsPartyFormatEnum {
2
7
  TURNKEY = "turnkey",
3
8
  QUEST_AND_ROOM = "quest_and_room",
@@ -22,7 +27,8 @@ export declare enum KidsPartyStatusEnum {
22
27
  IN_PROGRESS = "in_progress",
23
28
  HANDED_TO_QUEST = "handed_to_quest",
24
29
  CANCELLED_BY_QUEST = "cancelled_by_quest",
25
- COMPLETED = "completed"
30
+ COMPLETED = "completed",
31
+ CLOSED = "closed"
26
32
  }
27
33
  /** Согласование отмены. Пусто, пока квест не отменил заявку и после «Состоялась». */
28
34
  export declare enum KidsPartyCancellationAgreementEnum {
@@ -1,6 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.KidsPartyCancellationAgreementEnum = exports.KidsPartyStatusEnum = exports.KidsPartyBudgetEnum = exports.KidsPartyWhenEnum = exports.KidsPartyFormatEnum = void 0;
3
+ exports.KidsPartyCancellationAgreementEnum = exports.KidsPartyStatusEnum = exports.KidsPartyBudgetEnum = exports.KidsPartyWhenEnum = exports.KidsPartyFormatEnum = exports.AggregatorRequestTypeEnum = void 0;
4
+ var AggregatorRequestTypeEnum;
5
+ (function (AggregatorRequestTypeEnum) {
6
+ AggregatorRequestTypeEnum["KIDS_PARTY"] = "kids_party";
7
+ AggregatorRequestTypeEnum["CALLBACK"] = "callback";
8
+ AggregatorRequestTypeEnum["QUEST_SELECTION"] = "quest_selection";
9
+ })(AggregatorRequestTypeEnum || (exports.AggregatorRequestTypeEnum = AggregatorRequestTypeEnum = {}));
4
10
  var KidsPartyFormatEnum;
5
11
  (function (KidsPartyFormatEnum) {
6
12
  KidsPartyFormatEnum["TURNKEY"] = "turnkey";
@@ -30,6 +36,7 @@ var KidsPartyStatusEnum;
30
36
  KidsPartyStatusEnum["HANDED_TO_QUEST"] = "handed_to_quest";
31
37
  KidsPartyStatusEnum["CANCELLED_BY_QUEST"] = "cancelled_by_quest";
32
38
  KidsPartyStatusEnum["COMPLETED"] = "completed";
39
+ KidsPartyStatusEnum["CLOSED"] = "closed";
33
40
  })(KidsPartyStatusEnum || (exports.KidsPartyStatusEnum = KidsPartyStatusEnum = {}));
34
41
  /** Согласование отмены. Пусто, пока квест не отменил заявку и после «Состоялась». */
35
42
  var KidsPartyCancellationAgreementEnum;
@@ -1,7 +1,9 @@
1
- import { KidsPartyBudgetEnum, KidsPartyCancellationAgreementEnum, KidsPartyFormatEnum, KidsPartyStatusEnum, KidsPartyWhenEnum } from './kids-party-request.enums';
1
+ import { HelperRequestAnswers } from './create-helper-request.dto';
2
+ import { AggregatorRequestTypeEnum, KidsPartyBudgetEnum, KidsPartyCancellationAgreementEnum, KidsPartyFormatEnum, KidsPartyStatusEnum, KidsPartyWhenEnum } from './kids-party-request.enums';
2
3
  export type KidsPartyHistoryEntry = {
3
4
  at: string;
4
5
  actor: 'client' | 'admin' | 'quest';
6
+ consent?: boolean;
5
7
  action: string;
6
8
  detail: string | null;
7
9
  };
@@ -10,13 +12,15 @@ export type KidsPartyQuestroomOptionRO = {
10
12
  title: string;
11
13
  };
12
14
  export type KidsPartyRequestRO = {
15
+ type: AggregatorRequestTypeEnum;
16
+ answers: HelperRequestAnswers | null;
13
17
  id: number;
14
18
  createdAt: string;
15
19
  cityId: number;
16
20
  cityTitle: string;
17
- format: KidsPartyFormatEnum;
18
- birthdayAge: number;
19
- childrenCount: number;
21
+ format: KidsPartyFormatEnum | null;
22
+ birthdayAge: number | null;
23
+ childrenCount: number | null;
20
24
  whenPreset: KidsPartyWhenEnum;
21
25
  whenDate: string | null;
22
26
  budgetPreset: KidsPartyBudgetEnum;
@@ -45,6 +49,7 @@ export type KidsPartyRequestSummaryRO = {
45
49
  handed: number;
46
50
  cancellationPending: number;
47
51
  completed: number;
52
+ closed: number;
48
53
  };
49
54
  export type KidsPartyRequestListRO = {
50
55
  items: KidsPartyRequestRO[];
@@ -1,5 +1,6 @@
1
- import { KidsPartyStatusEnum } from './kids-party-request.enums';
1
+ import { AggregatorRequestTypeEnum, KidsPartyStatusEnum } from './kids-party-request.enums';
2
2
  export declare class QueryKidsPartyRequestsDto {
3
+ type?: AggregatorRequestTypeEnum;
3
4
  page?: number;
4
5
  limit?: number;
5
6
  status?: KidsPartyStatusEnum;
@@ -25,6 +25,11 @@ class QueryKidsPartyRequestsDto {
25
25
  }
26
26
  }
27
27
  exports.QueryKidsPartyRequestsDto = QueryKidsPartyRequestsDto;
28
+ __decorate([
29
+ (0, class_validator_1.IsOptional)(),
30
+ (0, class_validator_1.IsEnum)(kids_party_request_enums_1.AggregatorRequestTypeEnum),
31
+ __metadata("design:type", String)
32
+ ], QueryKidsPartyRequestsDto.prototype, "type", void 0);
28
33
  __decorate([
29
34
  (0, class_validator_1.IsOptional)(),
30
35
  (0, class_transformer_1.Type)(() => Number),
@@ -4,6 +4,7 @@
4
4
  * невозможно обработать, и она просто засоряет доску.
5
5
  */
6
6
  export declare class CreateLeadDto {
7
+ callbackTaskId?: number;
7
8
  name?: string;
8
9
  phone?: string;
9
10
  email?: string;
@@ -20,6 +20,13 @@ const class_validator_1 = require("class-validator");
20
20
  class CreateLeadDto {
21
21
  }
22
22
  exports.CreateLeadDto = CreateLeadDto;
23
+ __decorate([
24
+ (0, class_validator_1.IsOptional)(),
25
+ (0, class_validator_1.IsInt)(),
26
+ (0, class_validator_1.Min)(1),
27
+ (0, class_transformer_1.Expose)(),
28
+ __metadata("design:type", Number)
29
+ ], CreateLeadDto.prototype, "callbackTaskId", void 0);
23
30
  __decorate([
24
31
  (0, class_validator_1.IsOptional)(),
25
32
  (0, class_validator_1.IsString)(),