@escapenavigator/types 2.0.12 → 2.0.13
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.
- package/dist/city-quest/city-quest-content.d.ts +2 -0
- package/dist/city-quest/city-quest.ro.d.ts +4 -0
- package/dist/city-quest/city-quest.ro.js +9 -0
- package/dist/city-quest/update-city-quest.dto.d.ts +4 -0
- package/dist/city-quest/update-city-quest.dto.js +13 -0
- package/dist/openapi/city-player/city-player-apple-login.dto.d.ts +11 -0
- package/dist/openapi/city-player/city-player-apple-login.dto.js +35 -0
- package/dist/openapi/city-player/city-player-login.dto.d.ts +8 -0
- package/dist/openapi/city-player/city-player-login.dto.js +27 -0
- package/dist/openapi/city-player/city-player-request-code.dto.d.ts +12 -0
- package/dist/openapi/city-player/city-player-request-code.dto.js +35 -0
- package/dist/openapi/city-player/city-player-verify-code.dto.d.ts +9 -0
- package/dist/openapi/city-player/city-player-verify-code.dto.js +32 -0
- package/dist/openapi/city-player/city-player.ro.d.ts +71 -0
- package/dist/openapi/city-player/city-player.ro.js +2 -0
- package/dist/openapi/city-quest/play-state.ro.d.ts +30 -0
- package/dist/openapi/shared/openapi-questroom.ro.d.ts +17 -0
- package/dist/openapi/shared/openapi-questroom.ro.js +25 -1
- package/dist/slot-template/slot-template-type.d.ts +1 -1
- package/dist/slot-template/slot-template.ro.d.ts +5 -0
- package/dist/slot-template/slot-template.ro.js +4 -0
- package/dist/slot-template/update-slot-template.dto.d.ts +6 -0
- package/dist/slot-template/update-slot-template.dto.js +23 -2
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -127,6 +127,8 @@ export type CityQuestContent = {
|
|
|
127
127
|
status: string;
|
|
128
128
|
title: Partial<Record<Languages, string>>;
|
|
129
129
|
tagline?: Partial<Record<Languages, string>>;
|
|
130
|
+
/** Кто озвучил игру — показывается на стартовом экране плеера. */
|
|
131
|
+
voiced_by?: string;
|
|
130
132
|
locale_primary?: string;
|
|
131
133
|
supported_answer_languages?: string[];
|
|
132
134
|
/** IANA timezone города игры — нужен для time_dynamic задач. */
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CountriesEnum } from '../shared/enum/countries.enum';
|
|
1
2
|
import { Languages } from '../shared/enum/languages.enum';
|
|
2
3
|
import { RO } from '../shared/ro-class';
|
|
3
4
|
import { CityQuestStatusEnum } from './enum/city-quest-status.enum';
|
|
@@ -16,6 +17,9 @@ export declare class CityQuestRO extends RO {
|
|
|
16
17
|
/** game_id из контента (esc-muc-stolen-hour-v1). */
|
|
17
18
|
key: string;
|
|
18
19
|
city?: string;
|
|
20
|
+
country?: CountriesEnum | null;
|
|
21
|
+
/** Кто озвучил игру (draftContent.voiced_by) — для стартового экрана. */
|
|
22
|
+
voicedBy?: string;
|
|
19
23
|
title: Partial<Record<Languages, string>>;
|
|
20
24
|
status: CityQuestStatusEnum;
|
|
21
25
|
/** Номер последней опубликованной версии; null — ещё не публиковалась. */
|
|
@@ -11,6 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.CityQuestRO = exports.CityQuestAssetRO = exports.CityQuestBindingRO = void 0;
|
|
13
13
|
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const countries_enum_1 = require("../shared/enum/countries.enum");
|
|
14
15
|
const languages_enum_1 = require("../shared/enum/languages.enum");
|
|
15
16
|
const ro_class_1 = require("../shared/ro-class");
|
|
16
17
|
const city_quest_status_enum_1 = require("./enum/city-quest-status.enum");
|
|
@@ -59,6 +60,14 @@ __decorate([
|
|
|
59
60
|
(0, class_transformer_1.Expose)(),
|
|
60
61
|
__metadata("design:type", String)
|
|
61
62
|
], CityQuestRO.prototype, "city", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, class_transformer_1.Expose)(),
|
|
65
|
+
__metadata("design:type", String)
|
|
66
|
+
], CityQuestRO.prototype, "country", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, class_transformer_1.Expose)(),
|
|
69
|
+
__metadata("design:type", String)
|
|
70
|
+
], CityQuestRO.prototype, "voicedBy", void 0);
|
|
62
71
|
__decorate([
|
|
63
72
|
(0, class_transformer_1.Expose)(),
|
|
64
73
|
__metadata("design:type", Object)
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
import { CountriesEnum } from '../shared/enum/countries.enum';
|
|
1
2
|
import { CityQuestStatusEnum } from './enum/city-quest-status.enum';
|
|
2
3
|
export declare class UpdateCityQuestDto {
|
|
3
4
|
status?: CityQuestStatusEnum;
|
|
4
5
|
city?: string;
|
|
6
|
+
country?: CountriesEnum;
|
|
7
|
+
/** Кто озвучил игру — пишется в draftContent.voiced_by. */
|
|
8
|
+
voicedBy?: string;
|
|
5
9
|
}
|
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.UpdateCityQuestDto = void 0;
|
|
13
13
|
const class_transformer_1 = require("class-transformer");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
|
+
const countries_enum_1 = require("../shared/enum/countries.enum");
|
|
15
16
|
const city_quest_status_enum_1 = require("./enum/city-quest-status.enum");
|
|
16
17
|
class UpdateCityQuestDto {
|
|
17
18
|
}
|
|
@@ -28,3 +29,15 @@ __decorate([
|
|
|
28
29
|
(0, class_transformer_1.Expose)(),
|
|
29
30
|
__metadata("design:type", String)
|
|
30
31
|
], UpdateCityQuestDto.prototype, "city", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, class_validator_1.IsOptional)(),
|
|
34
|
+
(0, class_validator_1.IsEnum)(countries_enum_1.CountriesEnum),
|
|
35
|
+
(0, class_transformer_1.Expose)(),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], UpdateCityQuestDto.prototype, "country", 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
|
+
], UpdateCityQuestDto.prototype, "voicedBy", void 0);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Вход через Apple (Sign in with Apple). Клиент присылает `identityToken`
|
|
3
|
+
* (JWT от Apple), бэк проверяет подпись по JWKS Apple и достаёт email/sub.
|
|
4
|
+
* Верификация stateless — работает на любом из беков (в отличие от кода
|
|
5
|
+
* подтверждения, привязанного к региону). `fullName` Apple отдаёт только
|
|
6
|
+
* при первом входе.
|
|
7
|
+
*/
|
|
8
|
+
export declare class CityPlayerAppleLoginDto {
|
|
9
|
+
identityToken: string;
|
|
10
|
+
fullName?: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
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.CityPlayerAppleLoginDto = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
/**
|
|
16
|
+
* Вход через Apple (Sign in with Apple). Клиент присылает `identityToken`
|
|
17
|
+
* (JWT от Apple), бэк проверяет подпись по JWKS Apple и достаёт email/sub.
|
|
18
|
+
* Верификация stateless — работает на любом из беков (в отличие от кода
|
|
19
|
+
* подтверждения, привязанного к региону). `fullName` Apple отдаёт только
|
|
20
|
+
* при первом входе.
|
|
21
|
+
*/
|
|
22
|
+
class CityPlayerAppleLoginDto {
|
|
23
|
+
}
|
|
24
|
+
exports.CityPlayerAppleLoginDto = CityPlayerAppleLoginDto;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_validator_1.IsString)(),
|
|
27
|
+
(0, class_transformer_1.Expose)(),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], CityPlayerAppleLoginDto.prototype, "identityToken", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, class_validator_1.IsOptional)(),
|
|
32
|
+
(0, class_validator_1.IsString)(),
|
|
33
|
+
(0, class_transformer_1.Expose)(),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], CityPlayerAppleLoginDto.prototype, "fullName", void 0);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Обмен одноразового access-токена из письма (deep link `routale://.../g/:token`)
|
|
3
|
+
* на постоянный JWT игрока. Токен живёт ровно на одном из двух беков —
|
|
4
|
+
* приложение находит нужный failover'ом (см. player/api/failover-axios).
|
|
5
|
+
*/
|
|
6
|
+
export declare class CityPlayerLoginDto {
|
|
7
|
+
accessToken: string;
|
|
8
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
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.CityPlayerLoginDto = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
/**
|
|
16
|
+
* Обмен одноразового access-токена из письма (deep link `routale://.../g/:token`)
|
|
17
|
+
* на постоянный JWT игрока. Токен живёт ровно на одном из двух беков —
|
|
18
|
+
* приложение находит нужный failover'ом (см. player/api/failover-axios).
|
|
19
|
+
*/
|
|
20
|
+
class CityPlayerLoginDto {
|
|
21
|
+
}
|
|
22
|
+
exports.CityPlayerLoginDto = CityPlayerLoginDto;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, class_validator_1.IsString)(),
|
|
25
|
+
(0, class_transformer_1.Expose)(),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], CityPlayerLoginDto.prototype, "accessToken", void 0);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Запрос кода подтверждения для self-serve входа игрока по email.
|
|
3
|
+
* Бэк создаёт/находит игрока по email, генерирует 6-значный код и шлёт
|
|
4
|
+
* письмо. Ответ всегда 200 (анти-энумерация). Код живёт на том беке,
|
|
5
|
+
* куда ушёл запрос — verify обязан прийти на тот же регион (см.
|
|
6
|
+
* player/api/failover-axios: регион закрепляется между запросами).
|
|
7
|
+
*/
|
|
8
|
+
export declare class CityPlayerRequestCodeDto {
|
|
9
|
+
email: string;
|
|
10
|
+
/** Язык письма (ISO-2, напр. 'en' | 'ru'). По умолчанию EN. */
|
|
11
|
+
language?: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
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.CityPlayerRequestCodeDto = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
/**
|
|
16
|
+
* Запрос кода подтверждения для self-serve входа игрока по email.
|
|
17
|
+
* Бэк создаёт/находит игрока по email, генерирует 6-значный код и шлёт
|
|
18
|
+
* письмо. Ответ всегда 200 (анти-энумерация). Код живёт на том беке,
|
|
19
|
+
* куда ушёл запрос — verify обязан прийти на тот же регион (см.
|
|
20
|
+
* player/api/failover-axios: регион закрепляется между запросами).
|
|
21
|
+
*/
|
|
22
|
+
class CityPlayerRequestCodeDto {
|
|
23
|
+
}
|
|
24
|
+
exports.CityPlayerRequestCodeDto = CityPlayerRequestCodeDto;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_validator_1.IsEmail)(),
|
|
27
|
+
(0, class_transformer_1.Expose)(),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], CityPlayerRequestCodeDto.prototype, "email", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, class_validator_1.IsOptional)(),
|
|
32
|
+
(0, class_validator_1.IsString)(),
|
|
33
|
+
(0, class_transformer_1.Expose)(),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], CityPlayerRequestCodeDto.prototype, "language", void 0);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Проверка кода подтверждения и выдача постоянного JWT игрока. Неверный
|
|
3
|
+
* или просроченный код отдаётся как 400 (а НЕ 401/404) — иначе failover
|
|
4
|
+
* увёл бы verify на второй бек, где кода нет.
|
|
5
|
+
*/
|
|
6
|
+
export declare class CityPlayerVerifyCodeDto {
|
|
7
|
+
email: string;
|
|
8
|
+
code: string;
|
|
9
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
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.CityPlayerVerifyCodeDto = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
/**
|
|
16
|
+
* Проверка кода подтверждения и выдача постоянного JWT игрока. Неверный
|
|
17
|
+
* или просроченный код отдаётся как 400 (а НЕ 401/404) — иначе failover
|
|
18
|
+
* увёл бы verify на второй бек, где кода нет.
|
|
19
|
+
*/
|
|
20
|
+
class CityPlayerVerifyCodeDto {
|
|
21
|
+
}
|
|
22
|
+
exports.CityPlayerVerifyCodeDto = CityPlayerVerifyCodeDto;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, class_validator_1.IsEmail)(),
|
|
25
|
+
(0, class_transformer_1.Expose)(),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], CityPlayerVerifyCodeDto.prototype, "email", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, class_validator_1.IsString)(),
|
|
30
|
+
(0, class_transformer_1.Expose)(),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], CityPlayerVerifyCodeDto.prototype, "code", void 0);
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { CityQuestSessionStatusEnum } from '../../city-quest/enum/city-quest-session-status.enum';
|
|
2
|
+
import { CountriesEnum } from '../../shared/enum/countries.enum';
|
|
3
|
+
import { Languages } from '../../shared/enum/languages.enum';
|
|
4
|
+
export type CityPlayerRO = {
|
|
5
|
+
id: number;
|
|
6
|
+
email: string;
|
|
7
|
+
fullName?: string | null;
|
|
8
|
+
};
|
|
9
|
+
export type CityPlayerLoginRO = {
|
|
10
|
+
/** Постоянный JWT игрока (mode: 'city-player'). Хранится навсегда. */
|
|
11
|
+
token: string;
|
|
12
|
+
player: CityPlayerRO;
|
|
13
|
+
/** Access-токен, по которому вошли — чтобы сразу открыть игру. */
|
|
14
|
+
accessToken: string;
|
|
15
|
+
};
|
|
16
|
+
/** Ответ на запрос кода — всегда ok (анти-энумерация email). */
|
|
17
|
+
export type CityPlayerRequestCodeRO = {
|
|
18
|
+
ok: boolean;
|
|
19
|
+
};
|
|
20
|
+
/** Успешная проверка кода → постоянный JWT игрока. */
|
|
21
|
+
export type CityPlayerVerifyCodeRO = {
|
|
22
|
+
token: string;
|
|
23
|
+
player: CityPlayerRO;
|
|
24
|
+
};
|
|
25
|
+
/** Одна купленная игра в разделе «Мои игры». */
|
|
26
|
+
export type CityPlayerGameRO = {
|
|
27
|
+
accessToken: string;
|
|
28
|
+
cityQuestId: number;
|
|
29
|
+
title: string;
|
|
30
|
+
city?: string;
|
|
31
|
+
country?: CountriesEnum | null;
|
|
32
|
+
coverUrl?: string | null;
|
|
33
|
+
availableLanguages: Languages[];
|
|
34
|
+
/** Прогресс последней/активной сессии, если игра начата. */
|
|
35
|
+
lastSession?: {
|
|
36
|
+
sessionToken: string;
|
|
37
|
+
status: CityQuestSessionStatusEnum;
|
|
38
|
+
solvedStops: number;
|
|
39
|
+
totalStops: number;
|
|
40
|
+
} | null;
|
|
41
|
+
expiresAt?: string | null;
|
|
42
|
+
};
|
|
43
|
+
/** Карточка игры в общем каталоге (ещё не куплена). */
|
|
44
|
+
export type CityPlayerCatalogGameRO = {
|
|
45
|
+
cityQuestId: number;
|
|
46
|
+
key: string;
|
|
47
|
+
title: string;
|
|
48
|
+
coverUrl?: string | null;
|
|
49
|
+
availableLanguages: Languages[];
|
|
50
|
+
/**
|
|
51
|
+
* Ссылка на booking-страницу виджета привязанного questroom
|
|
52
|
+
* (`{ordersDomain}/booking/{widgetUuid}`). Плеер открывает её для
|
|
53
|
+
* покупки. null — если игра ещё не привязана к questroom/виджету.
|
|
54
|
+
*/
|
|
55
|
+
bookingUrl?: string | null;
|
|
56
|
+
};
|
|
57
|
+
export type CityPlayerCatalogCityRO = {
|
|
58
|
+
city: string;
|
|
59
|
+
country?: CountriesEnum | null;
|
|
60
|
+
/** Фото города из `CityEntity.photo`. */
|
|
61
|
+
photoUrl?: string | null;
|
|
62
|
+
games: CityPlayerCatalogGameRO[];
|
|
63
|
+
};
|
|
64
|
+
/** @deprecated Группировка по странам больше не используется в player catalog. */
|
|
65
|
+
export type CityPlayerCatalogCountryRO = {
|
|
66
|
+
country: CountriesEnum | null;
|
|
67
|
+
cities: CityPlayerCatalogCityRO[];
|
|
68
|
+
};
|
|
69
|
+
export type CityPlayerCatalogRO = {
|
|
70
|
+
cities: CityPlayerCatalogCityRO[];
|
|
71
|
+
};
|
|
@@ -66,6 +66,22 @@ export type PlayRouteEventRO = {
|
|
|
66
66
|
bonusPoints?: number;
|
|
67
67
|
softTimerSeconds?: number;
|
|
68
68
|
};
|
|
69
|
+
/**
|
|
70
|
+
* Точка полного маршрута для карты. Отдаётся вся трасса сразу, но
|
|
71
|
+
* координаты будущих точек показываем, а название/фото — только для
|
|
72
|
+
* пройденных и текущей (остальные «под замком», без спойлеров).
|
|
73
|
+
*/
|
|
74
|
+
export type PlayRoutePointRO = {
|
|
75
|
+
id: string;
|
|
76
|
+
order: number;
|
|
77
|
+
lat: number;
|
|
78
|
+
lng: number;
|
|
79
|
+
status: 'solved' | 'current' | 'locked';
|
|
80
|
+
/** Название точки — только для solved/current, иначе placeholder. */
|
|
81
|
+
title?: string;
|
|
82
|
+
/** Фото-маркер точки — только для solved/current. */
|
|
83
|
+
photoUrl?: string | null;
|
|
84
|
+
};
|
|
69
85
|
export type PlayFinaleRO = {
|
|
70
86
|
puzzle?: PlayChallengeRO;
|
|
71
87
|
choicePrompt?: string;
|
|
@@ -113,6 +129,12 @@ export type PlayStateRO = {
|
|
|
113
129
|
artifactState?: string | null;
|
|
114
130
|
artifactAsset?: PlayAssetRO | null;
|
|
115
131
|
currentStop?: PlayStopRO | null;
|
|
132
|
+
/**
|
|
133
|
+
* Полный маршрут для карты: все точки сразу, статус
|
|
134
|
+
* solved/current/locked. Клиент рисует линию и маркеры, будущие —
|
|
135
|
+
* «под замком».
|
|
136
|
+
*/
|
|
137
|
+
routeOverview?: PlayRoutePointRO[];
|
|
116
138
|
/**
|
|
117
139
|
* Вступление игры (что произошло, миссия команды). Клиент показывает
|
|
118
140
|
* его перед первой точкой; отдаём всегда — чтобы можно было
|
|
@@ -144,6 +166,14 @@ export type PlayAccessInfoRO = {
|
|
|
144
166
|
city?: string;
|
|
145
167
|
durationMinutes?: number;
|
|
146
168
|
distanceKm?: number;
|
|
169
|
+
/** Обложка стартового экрана. */
|
|
170
|
+
cover?: PlayAssetRO | null;
|
|
171
|
+
/** Тизер (видео/аудио) для стартового экрана. */
|
|
172
|
+
teaser?: PlayAssetRO | null;
|
|
173
|
+
/** Кто озвучил игру (для блока «что внутри»). */
|
|
174
|
+
voicedBy?: string;
|
|
175
|
+
/** Кол-во точек маршрута — для схемы маршрута на старте. */
|
|
176
|
+
pointsCount?: number;
|
|
147
177
|
availableLanguages?: Languages[];
|
|
148
178
|
/** Уже начатые командные сессии этого доступа. */
|
|
149
179
|
sessions?: Array<{
|
|
@@ -3,6 +3,7 @@ import { QuestroomConfirmTypeEnum } from '../../questroom/enum/questroom-confirm
|
|
|
3
3
|
import { QuestroomTypeEnum } from '../../questroom/enum/questroom-type.enum';
|
|
4
4
|
import { Languages } from '../../shared/enum/languages.enum';
|
|
5
5
|
import { SlotTemplateType } from '../../slot-template/slot-template-type';
|
|
6
|
+
import { OpenapiSlotTariffRO } from '../slots/openapi-slot-tariff.ro';
|
|
6
7
|
export declare const transformQuestroom: ({ value, language, }: {
|
|
7
8
|
value: OpenapiQuestroomRO | undefined | null;
|
|
8
9
|
language: any;
|
|
@@ -23,6 +24,16 @@ declare class Mode {
|
|
|
23
24
|
description: string;
|
|
24
25
|
popular: boolean;
|
|
25
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* Конфиг покупки `anytime`-квеста для виджета: продаётся без выбора
|
|
29
|
+
* времени, одной кнопкой. `ruleId` — правило брони, `tariff` — тариф с
|
|
30
|
+
* ценовой картой (`price[players]`), по которой считается стоимость.
|
|
31
|
+
* Заполняется только для questroom'ов с `templateType === 'anytime'`.
|
|
32
|
+
*/
|
|
33
|
+
export declare class OpenapiQuestroomAnytimeRO {
|
|
34
|
+
ruleId: number;
|
|
35
|
+
tariff: OpenapiSlotTariffRO;
|
|
36
|
+
}
|
|
26
37
|
declare class Location {
|
|
27
38
|
address: string;
|
|
28
39
|
prepareText: string;
|
|
@@ -46,6 +57,12 @@ export declare class OpenapiQuestroomRO {
|
|
|
46
57
|
* an extra fetch.
|
|
47
58
|
*/
|
|
48
59
|
templateType?: SlotTemplateType;
|
|
60
|
+
/**
|
|
61
|
+
* Конфиг покупки для `anytime`-расписания (тариф + правило). Присутствует
|
|
62
|
+
* только когда `templateType === 'anytime'`; виджет по нему рисует кнопку
|
|
63
|
+
* «Купить» вместо календаря и строит preorder без выбора слота.
|
|
64
|
+
*/
|
|
65
|
+
anytime?: OpenapiQuestroomAnytimeRO;
|
|
49
66
|
type: QuestroomTypeEnum;
|
|
50
67
|
confirmType: QuestroomConfirmTypeEnum;
|
|
51
68
|
playersMax: number;
|
|
@@ -20,13 +20,14 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
20
20
|
return t;
|
|
21
21
|
};
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
-
exports.QuestroomRow = exports.OpenapiQuestroomRO = exports.transformQuestroom = void 0;
|
|
23
|
+
exports.QuestroomRow = exports.OpenapiQuestroomRO = exports.OpenapiQuestroomAnytimeRO = exports.transformQuestroom = void 0;
|
|
24
24
|
/* eslint-disable max-classes-per-file */
|
|
25
25
|
const class_transformer_1 = require("class-transformer");
|
|
26
26
|
const players_select_mode_enum_1 = require("../../questroom/enum/players-select-mode.enum");
|
|
27
27
|
const questroom_confirm_type_enum_1 = require("../../questroom/enum/questroom-confirm-type.enum");
|
|
28
28
|
const questroom_type_enum_1 = require("../../questroom/enum/questroom-type.enum");
|
|
29
29
|
const languages_enum_1 = require("../../shared/enum/languages.enum");
|
|
30
|
+
const openapi_slot_tariff_ro_1 = require("../slots/openapi-slot-tariff.ro");
|
|
30
31
|
const transformQuestroom = ({ value, language, }) => {
|
|
31
32
|
var _a, _b, _c, _d;
|
|
32
33
|
if (!value)
|
|
@@ -85,6 +86,24 @@ __decorate([
|
|
|
85
86
|
(0, class_transformer_1.Expose)(),
|
|
86
87
|
__metadata("design:type", Boolean)
|
|
87
88
|
], Mode.prototype, "popular", void 0);
|
|
89
|
+
/**
|
|
90
|
+
* Конфиг покупки `anytime`-квеста для виджета: продаётся без выбора
|
|
91
|
+
* времени, одной кнопкой. `ruleId` — правило брони, `tariff` — тариф с
|
|
92
|
+
* ценовой картой (`price[players]`), по которой считается стоимость.
|
|
93
|
+
* Заполняется только для questroom'ов с `templateType === 'anytime'`.
|
|
94
|
+
*/
|
|
95
|
+
class OpenapiQuestroomAnytimeRO {
|
|
96
|
+
}
|
|
97
|
+
exports.OpenapiQuestroomAnytimeRO = OpenapiQuestroomAnytimeRO;
|
|
98
|
+
__decorate([
|
|
99
|
+
(0, class_transformer_1.Expose)(),
|
|
100
|
+
__metadata("design:type", Number)
|
|
101
|
+
], OpenapiQuestroomAnytimeRO.prototype, "ruleId", void 0);
|
|
102
|
+
__decorate([
|
|
103
|
+
(0, class_transformer_1.Expose)(),
|
|
104
|
+
(0, class_transformer_1.Type)(() => openapi_slot_tariff_ro_1.OpenapiSlotTariffRO),
|
|
105
|
+
__metadata("design:type", openapi_slot_tariff_ro_1.OpenapiSlotTariffRO)
|
|
106
|
+
], OpenapiQuestroomAnytimeRO.prototype, "tariff", void 0);
|
|
88
107
|
class Location {
|
|
89
108
|
}
|
|
90
109
|
__decorate([
|
|
@@ -152,6 +171,11 @@ __decorate([
|
|
|
152
171
|
(0, class_transformer_1.Expose)(),
|
|
153
172
|
__metadata("design:type", String)
|
|
154
173
|
], OpenapiQuestroomRO.prototype, "templateType", void 0);
|
|
174
|
+
__decorate([
|
|
175
|
+
(0, class_transformer_1.Expose)(),
|
|
176
|
+
(0, class_transformer_1.Type)(() => OpenapiQuestroomAnytimeRO),
|
|
177
|
+
__metadata("design:type", OpenapiQuestroomAnytimeRO)
|
|
178
|
+
], OpenapiQuestroomRO.prototype, "anytime", void 0);
|
|
155
179
|
__decorate([
|
|
156
180
|
(0, class_transformer_1.Expose)(),
|
|
157
181
|
__metadata("design:type", String)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type SlotTemplateType = 'fixed' | 'flex';
|
|
1
|
+
export type SlotTemplateType = 'fixed' | 'flex' | 'anytime';
|
|
@@ -8,4 +8,9 @@ export declare class SlotTemplateRO extends RO {
|
|
|
8
8
|
step: number;
|
|
9
9
|
breakMinutes: number;
|
|
10
10
|
flexRules?: SlotTemplateFlexRule[];
|
|
11
|
+
/** Конфиг `anytime`-расписания: правило брони и тариф покупки. */
|
|
12
|
+
anytime?: {
|
|
13
|
+
ruleId: number;
|
|
14
|
+
tariffId: number;
|
|
15
|
+
} | null;
|
|
11
16
|
}
|
|
@@ -40,3 +40,7 @@ __decorate([
|
|
|
40
40
|
(0, class_transformer_1.Type)(() => slot_template_flex_rule_1.SlotTemplateFlexRule),
|
|
41
41
|
__metadata("design:type", Array)
|
|
42
42
|
], SlotTemplateRO.prototype, "flexRules", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, class_transformer_1.Expose)(),
|
|
45
|
+
__metadata("design:type", Object)
|
|
46
|
+
], SlotTemplateRO.prototype, "anytime", void 0);
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import { SlotTemplateElement } from './slot-template-element';
|
|
2
2
|
import { SlotTemplateFlexRule } from './slot-template-flex-rule';
|
|
3
3
|
import { SlotTemplateType } from './slot-template-type';
|
|
4
|
+
export declare class AnytimeTemplateConfigDto {
|
|
5
|
+
ruleId: number;
|
|
6
|
+
tariffId: number;
|
|
7
|
+
}
|
|
4
8
|
export declare class UpdateSlotTemplateDto {
|
|
5
9
|
slots: SlotTemplateElement[];
|
|
6
10
|
flexRules?: SlotTemplateFlexRule[];
|
|
7
11
|
type?: SlotTemplateType;
|
|
12
|
+
/** Конфиг `anytime`-расписания (правило брони + тариф покупки). */
|
|
13
|
+
anytime?: AnytimeTemplateConfigDto;
|
|
8
14
|
step?: number;
|
|
9
15
|
breakMinutes?: number;
|
|
10
16
|
questroomsIds: number[];
|
|
@@ -9,11 +9,24 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.UpdateSlotTemplateDto = void 0;
|
|
12
|
+
exports.UpdateSlotTemplateDto = exports.AnytimeTemplateConfigDto = void 0;
|
|
13
13
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
14
14
|
const class_transformer_1 = require("class-transformer");
|
|
15
15
|
const class_validator_1 = require("class-validator");
|
|
16
16
|
const is_not_blank_1 = require("../shared/is-not-blank");
|
|
17
|
+
class AnytimeTemplateConfigDto {
|
|
18
|
+
}
|
|
19
|
+
exports.AnytimeTemplateConfigDto = AnytimeTemplateConfigDto;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, class_validator_1.IsInt)(),
|
|
22
|
+
(0, class_transformer_1.Expose)(),
|
|
23
|
+
__metadata("design:type", Number)
|
|
24
|
+
], AnytimeTemplateConfigDto.prototype, "ruleId", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_validator_1.IsInt)(),
|
|
27
|
+
(0, class_transformer_1.Expose)(),
|
|
28
|
+
__metadata("design:type", Number)
|
|
29
|
+
], AnytimeTemplateConfigDto.prototype, "tariffId", void 0);
|
|
17
30
|
class UpdateSlotTemplateDto {
|
|
18
31
|
}
|
|
19
32
|
exports.UpdateSlotTemplateDto = UpdateSlotTemplateDto;
|
|
@@ -31,10 +44,18 @@ __decorate([
|
|
|
31
44
|
], UpdateSlotTemplateDto.prototype, "flexRules", void 0);
|
|
32
45
|
__decorate([
|
|
33
46
|
(0, class_validator_1.IsOptional)(),
|
|
34
|
-
(0, class_validator_1.IsIn)(['fixed', 'flex']),
|
|
47
|
+
(0, class_validator_1.IsIn)(['fixed', 'flex', 'anytime']),
|
|
35
48
|
(0, class_transformer_1.Expose)(),
|
|
36
49
|
__metadata("design:type", String)
|
|
37
50
|
], UpdateSlotTemplateDto.prototype, "type", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, class_validator_1.IsOptional)(),
|
|
53
|
+
(0, class_validator_1.IsObject)(),
|
|
54
|
+
(0, class_validator_1.ValidateNested)(),
|
|
55
|
+
(0, class_transformer_1.Type)(() => AnytimeTemplateConfigDto),
|
|
56
|
+
(0, class_transformer_1.Expose)(),
|
|
57
|
+
__metadata("design:type", AnytimeTemplateConfigDto)
|
|
58
|
+
], UpdateSlotTemplateDto.prototype, "anytime", void 0);
|
|
38
59
|
__decorate([
|
|
39
60
|
(0, class_validator_1.IsOptional)(),
|
|
40
61
|
(0, class_validator_1.IsInt)(),
|