@escapenavigator/types 2.1.3 → 2.1.5

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 (36) hide show
  1. package/dist/emails/index.d.ts +7 -0
  2. package/dist/location/create-location.dto.d.ts +2 -0
  3. package/dist/location/create-location.dto.js +11 -0
  4. package/dist/location/location-light.ro.d.ts +3 -0
  5. package/dist/location/location-light.ro.js +6 -0
  6. package/dist/location/update-location-for-admin.dto.d.ts +2 -0
  7. package/dist/location/update-location-for-admin.dto.js +9 -0
  8. package/dist/mobile-app/enum/mobile-app-platform.enum.d.ts +4 -0
  9. package/dist/mobile-app/enum/mobile-app-platform.enum.js +8 -0
  10. package/dist/mobile-app/mobile-app-dashboard.ro.d.ts +20 -0
  11. package/dist/mobile-app/mobile-app-dashboard.ro.js +2 -0
  12. package/dist/mobile-app/mobile-app-settings.ro.d.ts +9 -0
  13. package/dist/mobile-app/mobile-app-settings.ro.js +2 -0
  14. package/dist/mobile-app/ping-mobile-app-install.dto.d.ts +7 -0
  15. package/dist/mobile-app/ping-mobile-app-install.dto.js +48 -0
  16. package/dist/mobile-app/update-mobile-app-settings.dto.d.ts +8 -0
  17. package/dist/mobile-app/update-mobile-app-settings.dto.js +72 -0
  18. package/dist/openapi/profiles/openapi-create-booking.dto.d.ts +1 -0
  19. package/dist/openapi/profiles/openapi-create-booking.dto.js +10 -0
  20. package/dist/openapi/profiles/openapi-profile-booking-list-item.ro.d.ts +1 -0
  21. package/dist/openapi/profiles/openapi-profile-booking-list-item.ro.js +9 -0
  22. package/dist/openapi/shared/openapi-get-payment-methods.ro.d.ts +3 -0
  23. package/dist/openapi/shared/openapi-get-payment-methods.ro.js +4 -0
  24. package/dist/profile/company-ai-context.d.ts +2 -0
  25. package/dist/profile/enum/on-site-payment-method.enum.d.ts +5 -0
  26. package/dist/profile/enum/on-site-payment-method.enum.js +9 -0
  27. package/dist/profile/on-site-payment.d.ts +13 -0
  28. package/dist/profile/on-site-payment.js +43 -0
  29. package/dist/tsconfig.build.tsbuildinfo +1 -1
  30. package/dist/user/crud/user.ro.d.ts +2 -0
  31. package/dist/user/crud/user.ro.js +6 -0
  32. package/dist/user/current/update-current-user-notifications.dto.d.ts +6 -0
  33. package/dist/user/current/update-current-user-notifications.dto.js +7 -0
  34. package/dist/user/enum/order-notify-horizon.enum.d.ts +12 -0
  35. package/dist/user/enum/order-notify-horizon.enum.js +16 -0
  36. package/package.json +2 -2
@@ -143,6 +143,12 @@ export type EmailDataV2 = EmailContentJsonV2 & {
143
143
  * still contain `{servicesList}` are silently dropped by the converter.
144
144
  */
145
145
  blockPayloads?: Record<string, string>;
146
+ /**
147
+ * All team-photo URLs from the booking. `variables.photos` stays the
148
+ * first URL (image-node `src`); the renderer clones that tile for
149
+ * the rest at send-time. Omitted / one URL — no expansion.
150
+ */
151
+ expandPhotos?: string[];
146
152
  };
147
153
  /**
148
154
  * Payload письма, тело которого — готовый HTML из внешнего редактора
@@ -159,6 +165,7 @@ export type EmailDataRawHtml = EmailContentRawHtml & {
159
165
  preheader?: string | null;
160
166
  footer: EmailDataV2['footer'];
161
167
  utm?: EmailDataV2['utm'];
168
+ expandPhotos?: string[];
162
169
  };
163
170
  export type SendEmailData = EmailDataV1 | EmailDataV2 | EmailDataRawHtml;
164
171
  export type SendEmailRequestParams = {
@@ -1,3 +1,4 @@
1
+ import { OnSitePaymentMethodEnum } from '../profile/enum/on-site-payment-method.enum';
1
2
  import { AvailabilityEnum } from '../shared/enum/availability.enum';
2
3
  import { Languages } from '../shared/enum/languages.enum';
3
4
  declare class Locale {
@@ -19,6 +20,7 @@ export declare class CreateLocationDto {
19
20
  parking: boolean;
20
21
  waitingArea: boolean;
21
22
  lockersAvailable: boolean;
23
+ onSitePaymentMethods?: OnSitePaymentMethodEnum[];
22
24
  site: string;
23
25
  directionsVideo?: string;
24
26
  hideFromChat: boolean;
@@ -13,6 +13,8 @@ exports.CreateLocationDto = void 0;
13
13
  /* eslint-disable max-classes-per-file */
14
14
  const class_transformer_1 = require("class-transformer");
15
15
  const class_validator_1 = require("class-validator");
16
+ const on_site_payment_method_enum_1 = require("../profile/enum/on-site-payment-method.enum");
17
+ const on_site_payment_1 = require("../profile/on-site-payment");
16
18
  const availability_enum_1 = require("../shared/enum/availability.enum");
17
19
  const languages_enum_1 = require("../shared/enum/languages.enum");
18
20
  const is_not_blank_1 = require("../shared/is-not-blank");
@@ -114,6 +116,15 @@ __decorate([
114
116
  (0, class_transformer_1.Expose)(),
115
117
  __metadata("design:type", Boolean)
116
118
  ], CreateLocationDto.prototype, "lockersAvailable", void 0);
119
+ __decorate([
120
+ (0, class_validator_1.IsOptional)(),
121
+ (0, class_validator_1.IsArray)(),
122
+ (0, class_validator_1.ArrayMinSize)(1),
123
+ (0, class_validator_1.IsEnum)(on_site_payment_method_enum_1.OnSitePaymentMethodEnum, { each: true }),
124
+ (0, class_transformer_1.Transform)(({ value }) => (0, on_site_payment_1.normalizeOnSitePaymentMethods)(value)),
125
+ (0, class_transformer_1.Expose)(),
126
+ __metadata("design:type", Array)
127
+ ], CreateLocationDto.prototype, "onSitePaymentMethods", void 0);
117
128
  __decorate([
118
129
  (0, class_validator_1.IsOptional)(),
119
130
  (0, class_validator_1.IsUrl)(),
@@ -1,3 +1,4 @@
1
+ import { OnSitePaymentMethodEnum } from '../profile/enum/on-site-payment-method.enum';
1
2
  import { AvailabilityEnum } from '../shared/enum/availability.enum';
2
3
  import { Languages } from '../shared/enum/languages.enum';
3
4
  import { RO } from '../shared/ro-class';
@@ -32,6 +33,8 @@ export declare class LocationLightRO extends RO {
32
33
  parking: boolean;
33
34
  waitingArea: boolean;
34
35
  lockersAvailable: boolean;
36
+ /** Чем принимают на площадке. Пусто / null = наличные + карта. */
37
+ onSitePaymentMethods: OnSitePaymentMethodEnum[];
35
38
  waitingAreaSize: number;
36
39
  site: string;
37
40
  directionsVideo?: string;
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.LocationLightRO = void 0;
13
13
  /* eslint-disable max-classes-per-file */
14
14
  const class_transformer_1 = require("class-transformer");
15
+ const on_site_payment_1 = require("../profile/on-site-payment");
15
16
  const availability_enum_1 = require("../shared/enum/availability.enum");
16
17
  const languages_enum_1 = require("../shared/enum/languages.enum");
17
18
  const ro_class_1 = require("../shared/ro-class");
@@ -99,6 +100,11 @@ __decorate([
99
100
  (0, class_transformer_1.Expose)(),
100
101
  __metadata("design:type", Boolean)
101
102
  ], LocationLightRO.prototype, "lockersAvailable", void 0);
103
+ __decorate([
104
+ (0, class_transformer_1.Expose)(),
105
+ (0, class_transformer_1.Transform)(({ value }) => Array.isArray(value) && value.length ? value : on_site_payment_1.DEFAULT_ON_SITE_PAYMENT_METHODS),
106
+ __metadata("design:type", Array)
107
+ ], LocationLightRO.prototype, "onSitePaymentMethods", void 0);
102
108
  __decorate([
103
109
  (0, class_transformer_1.Expose)(),
104
110
  __metadata("design:type", Number)
@@ -1,3 +1,4 @@
1
+ import { OnSitePaymentMethodEnum } from '../profile/enum/on-site-payment-method.enum';
1
2
  import { AvailabilityEnum } from '../shared/enum/availability.enum';
2
3
  export declare class UpdateLocationForAdminDto {
3
4
  address?: string;
@@ -10,5 +11,6 @@ export declare class UpdateLocationForAdminDto {
10
11
  parking?: boolean;
11
12
  waitingArea?: boolean;
12
13
  lockersAvailable?: boolean;
14
+ onSitePaymentMethods?: OnSitePaymentMethodEnum[];
13
15
  waitingAreaSize?: number;
14
16
  }
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.UpdateLocationForAdminDto = void 0;
13
13
  const class_transformer_1 = require("class-transformer");
14
14
  const class_validator_1 = require("class-validator");
15
+ const on_site_payment_method_enum_1 = require("../profile/enum/on-site-payment-method.enum");
15
16
  const availability_enum_1 = require("../shared/enum/availability.enum");
16
17
  const is_not_blank_1 = require("../shared/is-not-blank");
17
18
  class UpdateLocationForAdminDto {
@@ -84,6 +85,14 @@ __decorate([
84
85
  (0, class_transformer_1.Expose)(),
85
86
  __metadata("design:type", Boolean)
86
87
  ], UpdateLocationForAdminDto.prototype, "lockersAvailable", void 0);
88
+ __decorate([
89
+ (0, class_validator_1.IsOptional)(),
90
+ (0, class_validator_1.IsArray)(),
91
+ (0, class_validator_1.ArrayMinSize)(1),
92
+ (0, class_validator_1.IsEnum)(on_site_payment_method_enum_1.OnSitePaymentMethodEnum, { each: true }),
93
+ (0, class_transformer_1.Expose)(),
94
+ __metadata("design:type", Array)
95
+ ], UpdateLocationForAdminDto.prototype, "onSitePaymentMethods", void 0);
87
96
  __decorate([
88
97
  (0, class_validator_1.ValidateIf)((o) => o.waitingArea),
89
98
  (0, class_validator_1.IsOptional)(),
@@ -0,0 +1,4 @@
1
+ export declare enum MobileAppPlatformEnum {
2
+ IOS = "ios",
3
+ ANDROID = "android"
4
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MobileAppPlatformEnum = void 0;
4
+ var MobileAppPlatformEnum;
5
+ (function (MobileAppPlatformEnum) {
6
+ MobileAppPlatformEnum["IOS"] = "ios";
7
+ MobileAppPlatformEnum["ANDROID"] = "android";
8
+ })(MobileAppPlatformEnum || (exports.MobileAppPlatformEnum = MobileAppPlatformEnum = {}));
@@ -0,0 +1,20 @@
1
+ import { MobileAppPlatformEnum } from './enum/mobile-app-platform.enum';
2
+ import { MobileAppSettingsRO } from './mobile-app-settings.ro';
3
+ export type MobileAppBuildStatRO = {
4
+ platform: MobileAppPlatformEnum;
5
+ build: number;
6
+ version: string;
7
+ count: number;
8
+ };
9
+ export type MobileAppStatsRO = {
10
+ total: number;
11
+ ios: number;
12
+ android: number;
13
+ active7d: number;
14
+ active30d: number;
15
+ byBuild: MobileAppBuildStatRO[];
16
+ };
17
+ export type MobileAppDashboardRO = {
18
+ settings: MobileAppSettingsRO;
19
+ stats: MobileAppStatsRO;
20
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ export type MobileAppPlatformPolicyRO = {
2
+ minBuild: number;
3
+ latestBuild: number;
4
+ storeUrl: string;
5
+ };
6
+ export type MobileAppSettingsRO = {
7
+ ios: MobileAppPlatformPolicyRO;
8
+ android: MobileAppPlatformPolicyRO;
9
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ import { MobileAppPlatformEnum } from './enum/mobile-app-platform.enum';
2
+ export declare class PingMobileAppInstallDto {
3
+ installationId: string;
4
+ platform: MobileAppPlatformEnum;
5
+ version?: string;
6
+ build: number;
7
+ }
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.PingMobileAppInstallDto = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const class_validator_1 = require("class-validator");
15
+ const is_not_blank_1 = require("../shared/is-not-blank");
16
+ const mobile_app_platform_enum_1 = require("./enum/mobile-app-platform.enum");
17
+ class PingMobileAppInstallDto {
18
+ }
19
+ exports.PingMobileAppInstallDto = PingMobileAppInstallDto;
20
+ __decorate([
21
+ (0, is_not_blank_1.IsNotBlank)(),
22
+ (0, class_validator_1.MaxLength)(64),
23
+ (0, class_validator_1.Matches)(/^[A-Za-z0-9-]+$/),
24
+ (0, class_transformer_1.Expose)(),
25
+ __metadata("design:type", String)
26
+ ], PingMobileAppInstallDto.prototype, "installationId", void 0);
27
+ __decorate([
28
+ (0, class_validator_1.IsEnum)(mobile_app_platform_enum_1.MobileAppPlatformEnum),
29
+ (0, class_transformer_1.Expose)(),
30
+ __metadata("design:type", String)
31
+ ], PingMobileAppInstallDto.prototype, "platform", void 0);
32
+ __decorate([
33
+ (0, class_validator_1.IsOptional)(),
34
+ (0, class_validator_1.IsString)(),
35
+ (0, class_validator_1.MaxLength)(32),
36
+ (0, class_transformer_1.Expose)(),
37
+ __metadata("design:type", String)
38
+ ], PingMobileAppInstallDto.prototype, "version", void 0);
39
+ __decorate([
40
+ (0, class_transformer_1.Transform)(({ value }) => {
41
+ const parsed = Number(value);
42
+ return Number.isFinite(parsed) && parsed > 0 ? Math.round(parsed) : 0;
43
+ }),
44
+ (0, class_validator_1.IsInt)(),
45
+ (0, class_validator_1.Min)(0),
46
+ (0, class_transformer_1.Expose)(),
47
+ __metadata("design:type", Number)
48
+ ], PingMobileAppInstallDto.prototype, "build", void 0);
@@ -0,0 +1,8 @@
1
+ export declare class UpdateMobileAppSettingsDto {
2
+ iosMinBuild?: number;
3
+ iosLatestBuild?: number;
4
+ iosStoreUrl?: string;
5
+ androidMinBuild?: number;
6
+ androidLatestBuild?: number;
7
+ androidStoreUrl?: string;
8
+ }
@@ -0,0 +1,72 @@
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.UpdateMobileAppSettingsDto = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const class_validator_1 = require("class-validator");
15
+ const toBuild = ({ value }) => {
16
+ if (value === '' || value == null)
17
+ return 0;
18
+ const parsed = Number(value);
19
+ return Number.isFinite(parsed) && parsed > 0 ? Math.round(parsed) : 0;
20
+ };
21
+ const toUrl = ({ value }) => typeof value === 'string' ? value.trim() : '';
22
+ class UpdateMobileAppSettingsDto {
23
+ }
24
+ exports.UpdateMobileAppSettingsDto = UpdateMobileAppSettingsDto;
25
+ __decorate([
26
+ (0, class_validator_1.IsOptional)(),
27
+ (0, class_transformer_1.Transform)(toBuild),
28
+ (0, class_validator_1.IsInt)(),
29
+ (0, class_validator_1.Min)(0),
30
+ (0, class_transformer_1.Expose)(),
31
+ __metadata("design:type", Number)
32
+ ], UpdateMobileAppSettingsDto.prototype, "iosMinBuild", void 0);
33
+ __decorate([
34
+ (0, class_validator_1.IsOptional)(),
35
+ (0, class_transformer_1.Transform)(toBuild),
36
+ (0, class_validator_1.IsInt)(),
37
+ (0, class_validator_1.Min)(0),
38
+ (0, class_transformer_1.Expose)(),
39
+ __metadata("design:type", Number)
40
+ ], UpdateMobileAppSettingsDto.prototype, "iosLatestBuild", void 0);
41
+ __decorate([
42
+ (0, class_validator_1.IsOptional)(),
43
+ (0, class_transformer_1.Transform)(toUrl),
44
+ (0, class_validator_1.IsString)(),
45
+ (0, class_validator_1.MaxLength)(500),
46
+ (0, class_transformer_1.Expose)(),
47
+ __metadata("design:type", String)
48
+ ], UpdateMobileAppSettingsDto.prototype, "iosStoreUrl", void 0);
49
+ __decorate([
50
+ (0, class_validator_1.IsOptional)(),
51
+ (0, class_transformer_1.Transform)(toBuild),
52
+ (0, class_validator_1.IsInt)(),
53
+ (0, class_validator_1.Min)(0),
54
+ (0, class_transformer_1.Expose)(),
55
+ __metadata("design:type", Number)
56
+ ], UpdateMobileAppSettingsDto.prototype, "androidMinBuild", void 0);
57
+ __decorate([
58
+ (0, class_validator_1.IsOptional)(),
59
+ (0, class_transformer_1.Transform)(toBuild),
60
+ (0, class_validator_1.IsInt)(),
61
+ (0, class_validator_1.Min)(0),
62
+ (0, class_transformer_1.Expose)(),
63
+ __metadata("design:type", Number)
64
+ ], UpdateMobileAppSettingsDto.prototype, "androidLatestBuild", void 0);
65
+ __decorate([
66
+ (0, class_validator_1.IsOptional)(),
67
+ (0, class_transformer_1.Transform)(toUrl),
68
+ (0, class_validator_1.IsString)(),
69
+ (0, class_validator_1.MaxLength)(500),
70
+ (0, class_transformer_1.Expose)(),
71
+ __metadata("design:type", String)
72
+ ], UpdateMobileAppSettingsDto.prototype, "androidStoreUrl", void 0);
@@ -12,5 +12,6 @@ export declare class OpenapiCreateBookingDto {
12
12
  children?: number;
13
13
  comment?: string;
14
14
  language?: Languages;
15
+ mode?: string;
15
16
  client: OpenapiBookingClientDto;
16
17
  }
@@ -117,6 +117,16 @@ __decorate([
117
117
  (0, class_validator_1.IsString)(),
118
118
  __metadata("design:type", String)
119
119
  ], OpenapiCreateBookingDto.prototype, "language", void 0);
120
+ __decorate([
121
+ (0, swagger_1.ApiProperty)({
122
+ required: false,
123
+ example: 'Hardcore',
124
+ description: 'Game mode / difficulty title for the booking. Omit when the quest room has no modes or none should be set.',
125
+ }),
126
+ (0, class_validator_1.IsOptional)(),
127
+ (0, class_validator_1.IsString)(),
128
+ __metadata("design:type", String)
129
+ ], OpenapiCreateBookingDto.prototype, "mode", void 0);
120
130
  __decorate([
121
131
  (0, swagger_1.ApiProperty)({
122
132
  type: OpenapiBookingClientDto,
@@ -19,6 +19,7 @@ export declare class OpenapiProfileBookingListItemRO {
19
19
  canceled: boolean;
20
20
  players: number;
21
21
  children: number;
22
+ mode: string | null;
22
23
  payed: number;
23
24
  total: number;
24
25
  toPay: number;
@@ -103,6 +103,15 @@ __decorate([
103
103
  (0, swagger_1.ApiProperty)({ example: 1, description: 'Number of children' }),
104
104
  __metadata("design:type", Number)
105
105
  ], OpenapiProfileBookingListItemRO.prototype, "children", void 0);
106
+ __decorate([
107
+ (0, class_transformer_1.Expose)(),
108
+ (0, swagger_1.ApiProperty)({
109
+ example: 'Hardcore',
110
+ nullable: true,
111
+ description: 'Selected game mode / difficulty for the booking. Null when the quest room has no modes or none was chosen.',
112
+ }),
113
+ __metadata("design:type", String)
114
+ ], OpenapiProfileBookingListItemRO.prototype, "mode", void 0);
106
115
  __decorate([
107
116
  (0, class_transformer_1.Expose)(),
108
117
  (0, swagger_1.ApiProperty)({
@@ -1,3 +1,4 @@
1
+ import { OnSitePaymentMethodEnum } from '../../profile/enum/on-site-payment-method.enum';
1
2
  import { PaymentMethodEnum } from '../orders/enum/payment-type.enum';
2
3
  declare class Format {
3
4
  increase: number;
@@ -5,6 +6,8 @@ declare class Format {
5
6
  }
6
7
  export declare class OpenapiGetPaymentMethodsRO {
7
8
  method: PaymentMethodEnum;
9
+ /** Чем принимают на площадке. Только у `cash`. */
10
+ onSitePaymentMethods?: OnSitePaymentMethodEnum[];
8
11
  squareAppId?: string;
9
12
  squareLocationId?: string;
10
13
  full: Format;
@@ -30,6 +30,10 @@ __decorate([
30
30
  (0, class_transformer_1.Expose)(),
31
31
  __metadata("design:type", String)
32
32
  ], OpenapiGetPaymentMethodsRO.prototype, "method", void 0);
33
+ __decorate([
34
+ (0, class_transformer_1.Expose)(),
35
+ __metadata("design:type", Array)
36
+ ], OpenapiGetPaymentMethodsRO.prototype, "onSitePaymentMethods", void 0);
33
37
  __decorate([
34
38
  (0, class_transformer_1.Expose)(),
35
39
  __metadata("design:type", String)
@@ -2,6 +2,7 @@ import { QuestroomCancelationTypeEnum } from '../questroom/enum/questroom-cancel
2
2
  import { AvailabilityEnum } from '../shared/enum/availability.enum';
3
3
  import { Languages } from '../shared/enum/languages.enum';
4
4
  import { PrepaymentTypeEnum } from '../slot/enum/prepayment-type.enum';
5
+ import { OnSitePaymentMethodEnum } from './enum/on-site-payment-method.enum';
5
6
  /**
6
7
  * Живой контекст КОМПАНИИ для ИИ-ассистента чата (всё, что не про конкретный
7
8
  * квест): контакты, языки, локации, правила бронирования и часы работы.
@@ -48,6 +49,7 @@ export type CompanyAiContext = {
48
49
  waitingAreaSize?: number;
49
50
  lockersAvailable: boolean;
50
51
  };
52
+ onSitePaymentMethods: OnSitePaymentMethodEnum[];
51
53
  }>;
52
54
  booking?: {
53
55
  prepaymentType: PrepaymentTypeEnum;
@@ -0,0 +1,5 @@
1
+ export declare enum OnSitePaymentMethodEnum {
2
+ CASH = "cash",
3
+ CARD = "card",
4
+ TRANSFER = "transfer"
5
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OnSitePaymentMethodEnum = void 0;
4
+ var OnSitePaymentMethodEnum;
5
+ (function (OnSitePaymentMethodEnum) {
6
+ OnSitePaymentMethodEnum["CASH"] = "cash";
7
+ OnSitePaymentMethodEnum["CARD"] = "card";
8
+ OnSitePaymentMethodEnum["TRANSFER"] = "transfer";
9
+ })(OnSitePaymentMethodEnum || (exports.OnSitePaymentMethodEnum = OnSitePaymentMethodEnum = {}));
@@ -0,0 +1,13 @@
1
+ import { OnSitePaymentMethodEnum } from './enum/on-site-payment-method.enum';
2
+ /** Дефолт: наличные + карта — как прежняя подпись «На месте». */
3
+ export declare const DEFAULT_ON_SITE_PAYMENT_METHODS: OnSitePaymentMethodEnum[];
4
+ export declare const ON_SITE_PAYMENT_TITLE_KEYS: {
5
+ readonly cash: "paymentMethods.cash";
6
+ readonly cashOnly: "paymentMethods.cashOnly";
7
+ readonly cardOnly: "paymentMethods.cardOnly";
8
+ readonly transferOnly: "paymentMethods.transferOnly";
9
+ readonly cashAndTransfer: "paymentMethods.cashAndTransfer";
10
+ readonly cardAndTransfer: "paymentMethods.cardAndTransfer";
11
+ };
12
+ export declare const normalizeOnSitePaymentMethods: (methods?: OnSitePaymentMethodEnum[] | string[] | null) => OnSitePaymentMethodEnum[];
13
+ export declare const getOnSitePaymentTitleKey: (methods?: OnSitePaymentMethodEnum[] | string[] | null) => string;
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getOnSitePaymentTitleKey = exports.normalizeOnSitePaymentMethods = exports.ON_SITE_PAYMENT_TITLE_KEYS = exports.DEFAULT_ON_SITE_PAYMENT_METHODS = void 0;
4
+ const on_site_payment_method_enum_1 = require("./enum/on-site-payment-method.enum");
5
+ /** Дефолт: наличные + карта — как прежняя подпись «На месте». */
6
+ exports.DEFAULT_ON_SITE_PAYMENT_METHODS = [
7
+ on_site_payment_method_enum_1.OnSitePaymentMethodEnum.CASH,
8
+ on_site_payment_method_enum_1.OnSitePaymentMethodEnum.CARD,
9
+ ];
10
+ exports.ON_SITE_PAYMENT_TITLE_KEYS = {
11
+ cash: 'paymentMethods.cash',
12
+ cashOnly: 'paymentMethods.cashOnly',
13
+ cardOnly: 'paymentMethods.cardOnly',
14
+ transferOnly: 'paymentMethods.transferOnly',
15
+ cashAndTransfer: 'paymentMethods.cashAndTransfer',
16
+ cardAndTransfer: 'paymentMethods.cardAndTransfer',
17
+ };
18
+ const ALLOWED = new Set(Object.values(on_site_payment_method_enum_1.OnSitePaymentMethodEnum));
19
+ const normalizeOnSitePaymentMethods = (methods) => {
20
+ const unique = [
21
+ ...new Set((methods || []).filter((method) => ALLOWED.has(method))),
22
+ ];
23
+ return unique.length ? unique : exports.DEFAULT_ON_SITE_PAYMENT_METHODS;
24
+ };
25
+ exports.normalizeOnSitePaymentMethods = normalizeOnSitePaymentMethods;
26
+ const getOnSitePaymentTitleKey = (methods) => {
27
+ const set = new Set((0, exports.normalizeOnSitePaymentMethods)(methods));
28
+ const cash = set.has(on_site_payment_method_enum_1.OnSitePaymentMethodEnum.CASH);
29
+ const card = set.has(on_site_payment_method_enum_1.OnSitePaymentMethodEnum.CARD);
30
+ const transfer = set.has(on_site_payment_method_enum_1.OnSitePaymentMethodEnum.TRANSFER);
31
+ if (cash && !card && !transfer)
32
+ return exports.ON_SITE_PAYMENT_TITLE_KEYS.cashOnly;
33
+ if (!cash && card && !transfer)
34
+ return exports.ON_SITE_PAYMENT_TITLE_KEYS.cardOnly;
35
+ if (!cash && !card && transfer)
36
+ return exports.ON_SITE_PAYMENT_TITLE_KEYS.transferOnly;
37
+ if (cash && !card && transfer)
38
+ return exports.ON_SITE_PAYMENT_TITLE_KEYS.cashAndTransfer;
39
+ if (!cash && card && transfer)
40
+ return exports.ON_SITE_PAYMENT_TITLE_KEYS.cardAndTransfer;
41
+ return exports.ON_SITE_PAYMENT_TITLE_KEYS.cash;
42
+ };
43
+ exports.getOnSitePaymentTitleKey = getOnSitePaymentTitleKey;