@escapenavigator/types 2.0.16 → 2.0.17

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.
@@ -19,5 +19,7 @@ export type CityRO = {
19
19
  locales?: CityLocaleRO[];
20
20
  isAgglomeration: boolean;
21
21
  hasSubway: boolean;
22
+ /** Город доступен в Routale Player. */
23
+ readyForRoutell: boolean;
22
24
  parentCityId: number | null;
23
25
  };
@@ -13,6 +13,8 @@ export declare class UpdateCityDto {
13
13
  isAgglomeration?: boolean;
14
14
  /** В городе есть метро. Управляет fetch-ом Places API для локаций. */
15
15
  hasSubway?: boolean;
16
+ /** Город доступен в Routale Player (стартовый каталог и поиск). */
17
+ readyForRoutell?: boolean;
16
18
  /**
17
19
  * Город-родитель в агломерации. `null` снимает привязку.
18
20
  * Положительное число — id центра в той же стране (валидируется на бэке).
@@ -53,6 +53,12 @@ __decorate([
53
53
  (0, class_transformer_1.Expose)(),
54
54
  __metadata("design:type", Boolean)
55
55
  ], UpdateCityDto.prototype, "hasSubway", void 0);
56
+ __decorate([
57
+ (0, class_validator_1.IsOptional)(),
58
+ (0, class_validator_1.IsBoolean)(),
59
+ (0, class_transformer_1.Expose)(),
60
+ __metadata("design:type", Boolean)
61
+ ], UpdateCityDto.prototype, "readyForRoutell", void 0);
56
62
  __decorate([
57
63
  (0, class_validator_1.IsOptional)(),
58
64
  (0, class_validator_1.IsInt)(),
@@ -9,6 +9,9 @@ export type CityAttractionLocaleRO = ResponseObject & {
9
9
  description: string | null;
10
10
  knownFor: string | null;
11
11
  content: AttractionContent | null;
12
+ /** Озвучка guideTalk для языка локали. */
13
+ guideAudioUrl: string | null;
14
+ guideAudioDurationSec: number | null;
12
15
  status: AttractionLocaleStatusEnum;
13
16
  contentGeneratedAt: Date | null;
14
17
  contentPromptVersion: string | null;
@@ -0,0 +1,10 @@
1
+ import { RiddleTtsMoodEnum } from '../questroom-riddle/enum/riddle-tts-mood.enum';
2
+ import { RiddleTtsVoiceEnum } from '../questroom-riddle/enum/riddle-tts-voice.enum';
3
+ import { Languages } from '../shared/enum/languages.enum';
4
+ export declare class GenerateAttractionAudioDto {
5
+ language: Languages;
6
+ /** Текст для озвучки. Если не передан — берётся locale.content.guideTalk. */
7
+ text?: string;
8
+ voice?: RiddleTtsVoiceEnum;
9
+ mood?: RiddleTtsMoodEnum;
10
+ }
@@ -0,0 +1,45 @@
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.GenerateAttractionAudioDto = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const class_validator_1 = require("class-validator");
15
+ const riddle_tts_mood_enum_1 = require("../questroom-riddle/enum/riddle-tts-mood.enum");
16
+ const riddle_tts_voice_enum_1 = require("../questroom-riddle/enum/riddle-tts-voice.enum");
17
+ const languages_enum_1 = require("../shared/enum/languages.enum");
18
+ class GenerateAttractionAudioDto {
19
+ }
20
+ exports.GenerateAttractionAudioDto = GenerateAttractionAudioDto;
21
+ __decorate([
22
+ (0, class_validator_1.IsEnum)(languages_enum_1.Languages),
23
+ (0, class_transformer_1.Expose)(),
24
+ __metadata("design:type", String)
25
+ ], GenerateAttractionAudioDto.prototype, "language", void 0);
26
+ __decorate([
27
+ (0, class_validator_1.IsOptional)(),
28
+ (0, class_validator_1.IsString)(),
29
+ (0, class_validator_1.MinLength)(1),
30
+ (0, class_validator_1.MaxLength)(12000),
31
+ (0, class_transformer_1.Expose)(),
32
+ __metadata("design:type", String)
33
+ ], GenerateAttractionAudioDto.prototype, "text", void 0);
34
+ __decorate([
35
+ (0, class_validator_1.IsOptional)(),
36
+ (0, class_validator_1.IsEnum)(riddle_tts_voice_enum_1.RiddleTtsVoiceEnum),
37
+ (0, class_transformer_1.Expose)(),
38
+ __metadata("design:type", String)
39
+ ], GenerateAttractionAudioDto.prototype, "voice", void 0);
40
+ __decorate([
41
+ (0, class_validator_1.IsOptional)(),
42
+ (0, class_validator_1.IsEnum)(riddle_tts_mood_enum_1.RiddleTtsMoodEnum),
43
+ (0, class_transformer_1.Expose)(),
44
+ __metadata("design:type", String)
45
+ ], GenerateAttractionAudioDto.prototype, "mood", void 0);
@@ -0,0 +1,3 @@
1
+ export type GenerateAttractionAudioRO = {
2
+ url: string;
3
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -7,6 +7,8 @@ export declare class UpsertCityAttractionLocaleDto {
7
7
  description?: string | null;
8
8
  knownFor?: string | null;
9
9
  content?: AttractionContent | null;
10
+ guideAudioUrl?: string | null;
11
+ guideAudioDurationSec?: number | null;
10
12
  status?: AttractionLocaleStatusEnum;
11
13
  }
12
14
  export declare class GenerateAttractionContentDto {
@@ -46,6 +46,19 @@ __decorate([
46
46
  (0, class_transformer_1.Expose)(),
47
47
  __metadata("design:type", Object)
48
48
  ], UpsertCityAttractionLocaleDto.prototype, "content", void 0);
49
+ __decorate([
50
+ (0, class_validator_1.IsOptional)(),
51
+ (0, class_validator_1.IsString)(),
52
+ (0, class_transformer_1.Expose)(),
53
+ __metadata("design:type", String)
54
+ ], UpsertCityAttractionLocaleDto.prototype, "guideAudioUrl", void 0);
55
+ __decorate([
56
+ (0, class_validator_1.IsOptional)(),
57
+ (0, class_validator_1.IsInt)(),
58
+ (0, class_validator_1.Min)(0),
59
+ (0, class_transformer_1.Expose)(),
60
+ __metadata("design:type", Number)
61
+ ], UpsertCityAttractionLocaleDto.prototype, "guideAudioDurationSec", void 0);
49
62
  __decorate([
50
63
  (0, class_validator_1.IsOptional)(),
51
64
  (0, class_validator_1.IsEnum)(attraction_locale_status_enum_1.AttractionLocaleStatusEnum),
@@ -0,0 +1,98 @@
1
+ import { AttractionCategoryEnum } from '../../city-attraction/enum/attraction-category.enum';
2
+ import { PersonLocaleFact } from '../../city-person/person-locale-fact';
3
+ import { PersonAttractionRoleEnum } from '../../city-person/enum/person-attraction-role.enum';
4
+ import { PersonDomainEnum } from '../../city-person/enum/person-domain.enum';
5
+ import { PersonOccupationEnum } from '../../city-person/enum/person-occupation.enum';
6
+ /** Карточка личности в списке города. */
7
+ export type CityPlayerPersonListItemRO = {
8
+ personId: number;
9
+ name: string;
10
+ knownFor: string | null;
11
+ photoUrl: string | null;
12
+ domains: PersonDomainEnum[];
13
+ occupations: PersonOccupationEnum[];
14
+ birthYear: number | null;
15
+ deathYear: number | null;
16
+ };
17
+ export type CityPlayerPeopleRO = {
18
+ cityId: number;
19
+ city: string;
20
+ people: CityPlayerPersonListItemRO[];
21
+ };
22
+ /** Место, связанное с личностью. */
23
+ export type CityPlayerPersonPlaceRO = {
24
+ attractionId: number;
25
+ title: string;
26
+ knownFor: string | null;
27
+ photoUrl: string | null;
28
+ cityId: number;
29
+ cityTitle: string | null;
30
+ /** true — место в городе, с которого открыли личность. */
31
+ isCurrentCity: boolean;
32
+ role: PersonAttractionRoleEnum;
33
+ yearFrom: number | null;
34
+ yearTo: number | null;
35
+ note: string | null;
36
+ lat: number | null;
37
+ lng: number | null;
38
+ };
39
+ /** Детальная страница личности. */
40
+ export type CityPlayerPersonDetailRO = {
41
+ personId: number;
42
+ name: string;
43
+ knownFor: string | null;
44
+ description: string | null;
45
+ photoUrl: string | null;
46
+ photos: string[];
47
+ domains: PersonDomainEnum[];
48
+ occupations: PersonOccupationEnum[];
49
+ birthYear: number | null;
50
+ deathYear: number | null;
51
+ facts: PersonLocaleFact[];
52
+ places: CityPlayerPersonPlaceRO[];
53
+ };
54
+ /** Точка на карте свободного маршрута / шторка. */
55
+ export type CityPlayerAttractionCardRO = {
56
+ emoji: string;
57
+ title: string;
58
+ body: string;
59
+ };
60
+ export type CityPlayerAttractionFunFactRO = {
61
+ emoji?: string;
62
+ title?: string;
63
+ body: string;
64
+ };
65
+ /** Личность, связанная с точкой на карте. */
66
+ export type CityPlayerAttractionPersonRO = {
67
+ personId: number;
68
+ name: string;
69
+ photoUrl: string | null;
70
+ };
71
+ export type CityPlayerAttractionMapItemRO = {
72
+ attractionId: number;
73
+ title: string;
74
+ knownFor: string | null;
75
+ description: string | null;
76
+ category: AttractionCategoryEnum;
77
+ address: string | null;
78
+ photoUrl: string | null;
79
+ photos: string[];
80
+ lat: number;
81
+ lng: number;
82
+ hook: string | null;
83
+ guideTalk: string | null;
84
+ guideAudioUrl: string | null;
85
+ guideAudioDurationSec: number | null;
86
+ cards: CityPlayerAttractionCardRO[];
87
+ funFact: CityPlayerAttractionFunFactRO | null;
88
+ lookFor: string[];
89
+ /** Люди, связанные с этим местом (для маркеров рядом с точкой). */
90
+ people: CityPlayerAttractionPersonRO[];
91
+ };
92
+ export type CityPlayerAttractionsMapRO = {
93
+ cityId: number;
94
+ city: string;
95
+ lat: number | null;
96
+ lng: number | null;
97
+ attractions: CityPlayerAttractionMapItemRO[];
98
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -65,6 +65,17 @@ export type CityPlayerCatalogCityRO = {
65
65
  country?: CountriesEnum | null;
66
66
  /** Фото города из `CityEntity.photo`. */
67
67
  photoUrl?: string | null;
68
+ /** Широта центра города (GeoJSON Point → lat). */
69
+ lat?: number | null;
70
+ /** Долгота центра города (GeoJSON Point → lng). */
71
+ lng?: number | null;
72
+ /**
73
+ * Расстояние до пользователя в км (если в catalog переданы lat/lng).
74
+ * null — геолокация недоступна или у города нет координат.
75
+ */
76
+ distanceKm?: number | null;
77
+ /** Город в радиусе 50 км от пользователя. */
78
+ isNearby?: boolean;
68
79
  games: CityPlayerCatalogGameRO[];
69
80
  };
70
81
  /** @deprecated Группировка по странам больше не используется в player catalog. */
@@ -23,14 +23,6 @@ declare class Customization {
23
23
  widgetFontFamily?: string;
24
24
  bgColor?: string;
25
25
  }
26
- declare class MailchimpLocale {
27
- text: string;
28
- language: Languages;
29
- }
30
- declare class Mailchimp {
31
- locales: MailchimpLocale[];
32
- token: string;
33
- }
34
26
  declare class CustomFiled {
35
27
  id: number;
36
28
  title: string;
@@ -89,7 +81,6 @@ export declare class OpenapiWidgetInfoRO {
89
81
  snapPixelEnabled?: boolean;
90
82
  snapPixelId?: string;
91
83
  customization: Customization;
92
- mailchimp?: string | Mailchimp;
93
84
  daysAhead?: number;
94
85
  buttonTooltipText?: string;
95
86
  showOtherQuests?: boolean;
@@ -67,27 +67,6 @@ __decorate([
67
67
  (0, class_transformer_1.Expose)(),
68
68
  __metadata("design:type", String)
69
69
  ], Customization.prototype, "bgColor", void 0);
70
- class MailchimpLocale {
71
- }
72
- __decorate([
73
- (0, class_transformer_1.Expose)(),
74
- __metadata("design:type", String)
75
- ], MailchimpLocale.prototype, "text", void 0);
76
- __decorate([
77
- (0, class_transformer_1.Expose)(),
78
- __metadata("design:type", String)
79
- ], MailchimpLocale.prototype, "language", void 0);
80
- class Mailchimp {
81
- }
82
- __decorate([
83
- (0, class_transformer_1.Expose)(),
84
- (0, class_transformer_1.Type)(() => MailchimpLocale),
85
- __metadata("design:type", Array)
86
- ], Mailchimp.prototype, "locales", void 0);
87
- __decorate([
88
- (0, class_transformer_1.Expose)(),
89
- __metadata("design:type", String)
90
- ], Mailchimp.prototype, "token", void 0);
91
70
  class CustomFiled {
92
71
  }
93
72
  __decorate([
@@ -263,17 +242,6 @@ __decorate([
263
242
  (0, class_transformer_1.Type)(() => Customization),
264
243
  __metadata("design:type", Customization)
265
244
  ], OpenapiWidgetInfoRO.prototype, "customization", void 0);
266
- __decorate([
267
- (0, class_transformer_1.Expose)(),
268
- (0, class_transformer_1.Type)(() => Mailchimp),
269
- (0, class_transformer_1.Transform)(({ value, obj }) => {
270
- var _a, _b;
271
- if (!(value === null || value === void 0 ? void 0 : value.token))
272
- return null;
273
- return ((_b = (_a = value === null || value === void 0 ? void 0 : value.locales) === null || _a === void 0 ? void 0 : _a.find((l) => l.language === obj.language)) === null || _b === void 0 ? void 0 : _b.text) || 'default';
274
- }),
275
- __metadata("design:type", Object)
276
- ], OpenapiWidgetInfoRO.prototype, "mailchimp", void 0);
277
245
  __decorate([
278
246
  (0, class_transformer_1.Expose)(),
279
247
  __metadata("design:type", Number)
@@ -56,7 +56,7 @@ __decorate([
56
56
  (0, class_transformer_1.Transform)(({ obj, value }) =>
57
57
  // Флеш-цена фиксирует итог за игроков — комбинирование с другими
58
58
  // промокодами сломало бы «фиксированность». Форсим false.
59
- obj.type === promocode_type_enum_1.PromocodeTypeEnum.FLASH_PRICE ? false : value !== null && value !== void 0 ? value : false),
59
+ obj.type === promocode_type_enum_1.PromocodeTypeEnum.FLASH_PRICE ? false : (value !== null && value !== void 0 ? value : false)),
60
60
  __metadata("design:type", Boolean)
61
61
  ], CreatePromocodeDto.prototype, "canUseWithOtherPromocodes", void 0);
62
62
  __decorate([
@@ -64,7 +64,7 @@ __decorate([
64
64
  (0, class_transformer_1.Expose)(),
65
65
  (0, class_transformer_1.Transform)(({ obj, value }) =>
66
66
  // Флеш-цена применима только к играм (цена за кол-во игроков).
67
- obj.type === promocode_type_enum_1.PromocodeTypeEnum.FLASH_PRICE ? false : value !== null && value !== void 0 ? value : false),
67
+ obj.type === promocode_type_enum_1.PromocodeTypeEnum.FLASH_PRICE ? false : (value !== null && value !== void 0 ? value : false)),
68
68
  __metadata("design:type", Boolean)
69
69
  ], CreatePromocodeDto.prototype, "availableForCertificates", void 0);
70
70
  __decorate([