@escapenavigator/types 2.0.32 → 2.0.33
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/agregator/agregator-google-place.ro.d.ts +13 -0
- package/dist/agregator/agregator-google-place.ro.js +36 -0
- package/dist/agregator/agregator-questroom-card.ro.d.ts +6 -0
- package/dist/agregator/agregator-questroom-card.ro.js +6 -0
- package/dist/agregator/agregator-questroom.ro.d.ts +6 -0
- package/dist/agregator/agregator-questroom.ro.js +6 -0
- package/dist/parse-results/parse-result-payload.d.ts +25 -0
- package/dist/questroom/create-questroom-admin.dto.d.ts +7 -0
- package/dist/questroom/create-questroom-admin.dto.js +14 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Оценка площадки в Google для публичных страниц агрегатора.
|
|
3
|
+
*
|
|
4
|
+
* Рейтинг относится к локации целиком, а не к отдельной комнате, поэтому в UI
|
|
5
|
+
* его нужно подписывать как оценку площадки. В нашу разметку schema.org он не
|
|
6
|
+
* попадает: размечать чужие оценки как собственный `AggregateRating` запрещено
|
|
7
|
+
* правилами Google, показывать их пользователю с атрибуцией — можно.
|
|
8
|
+
*/
|
|
9
|
+
export declare class AgregatorGooglePlaceRO {
|
|
10
|
+
placeId: string;
|
|
11
|
+
rating: number;
|
|
12
|
+
reviewsCount: number;
|
|
13
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
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.AgregatorGooglePlaceRO = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
/**
|
|
15
|
+
* Оценка площадки в Google для публичных страниц агрегатора.
|
|
16
|
+
*
|
|
17
|
+
* Рейтинг относится к локации целиком, а не к отдельной комнате, поэтому в UI
|
|
18
|
+
* его нужно подписывать как оценку площадки. В нашу разметку schema.org он не
|
|
19
|
+
* попадает: размечать чужие оценки как собственный `AggregateRating` запрещено
|
|
20
|
+
* правилами Google, показывать их пользователю с атрибуцией — можно.
|
|
21
|
+
*/
|
|
22
|
+
class AgregatorGooglePlaceRO {
|
|
23
|
+
}
|
|
24
|
+
exports.AgregatorGooglePlaceRO = AgregatorGooglePlaceRO;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_transformer_1.Expose)(),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], AgregatorGooglePlaceRO.prototype, "placeId", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, class_transformer_1.Expose)(),
|
|
31
|
+
__metadata("design:type", Number)
|
|
32
|
+
], AgregatorGooglePlaceRO.prototype, "rating", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, class_transformer_1.Expose)(),
|
|
35
|
+
__metadata("design:type", Number)
|
|
36
|
+
], AgregatorGooglePlaceRO.prototype, "reviewsCount", void 0);
|
|
@@ -2,6 +2,7 @@ import { ProfileCurrencyEnum } from '../profile/enum/profile-currency';
|
|
|
2
2
|
import { QuestroomTypeEnum } from '../questroom/enum/questroom-type.enum';
|
|
3
3
|
import { Languages } from '../shared/enum/languages.enum';
|
|
4
4
|
import { SubwayLineRO } from '../subway-station/subway-station.ro';
|
|
5
|
+
import { AgregatorGooglePlaceRO } from './agregator-google-place.ro';
|
|
5
6
|
export declare class AgregatorQuestroomLocation {
|
|
6
7
|
id: number;
|
|
7
8
|
coordinates: [number, number];
|
|
@@ -19,6 +20,11 @@ export declare class AgregatorQuestroomLocation {
|
|
|
19
20
|
* `lines.map(l => <Circle color={l.color}/>)` + `l.ref`.
|
|
20
21
|
*/
|
|
21
22
|
subwayLines?: SubwayLineRO[];
|
|
23
|
+
/**
|
|
24
|
+
* Оценка площадки в Google. Приходит только с эндпоинтов, которые явно
|
|
25
|
+
* подмешивают её по `locationId`, иначе `undefined`.
|
|
26
|
+
*/
|
|
27
|
+
googlePlace?: AgregatorGooglePlaceRO;
|
|
22
28
|
}
|
|
23
29
|
export declare class AgregatorQuestroomCardRO {
|
|
24
30
|
id: number;
|
|
@@ -18,6 +18,7 @@ const profile_currency_1 = require("../profile/enum/profile-currency");
|
|
|
18
18
|
const profile_step_enum_1 = require("../profile/enum/profile-step.enum");
|
|
19
19
|
const questroom_type_enum_1 = require("../questroom/enum/questroom-type.enum");
|
|
20
20
|
const languages_enum_1 = require("../shared/enum/languages.enum");
|
|
21
|
+
const agregator_google_place_ro_1 = require("./agregator-google-place.ro");
|
|
21
22
|
const agregator_questroom_ro_1 = require("./agregator-questroom.ro");
|
|
22
23
|
class AgregatorQuestroomLocation {
|
|
23
24
|
}
|
|
@@ -45,6 +46,11 @@ __decorate([
|
|
|
45
46
|
(0, class_transformer_1.Transform)(({ obj }) => { var _a, _b; return (_b = (_a = obj === null || obj === void 0 ? void 0 : obj.subwayStation) === null || _a === void 0 ? void 0 : _a.lines) !== null && _b !== void 0 ? _b : undefined; }),
|
|
46
47
|
__metadata("design:type", Array)
|
|
47
48
|
], AgregatorQuestroomLocation.prototype, "subwayLines", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, class_transformer_1.Expose)(),
|
|
51
|
+
(0, class_transformer_1.Type)(() => agregator_google_place_ro_1.AgregatorGooglePlaceRO),
|
|
52
|
+
__metadata("design:type", agregator_google_place_ro_1.AgregatorGooglePlaceRO)
|
|
53
|
+
], AgregatorQuestroomLocation.prototype, "googlePlace", void 0);
|
|
48
54
|
class AgregatorQuestroomCardRO {
|
|
49
55
|
}
|
|
50
56
|
exports.AgregatorQuestroomCardRO = AgregatorQuestroomCardRO;
|
|
@@ -7,6 +7,7 @@ import { ExpertReviewRO } from '../review/expert-review.ro';
|
|
|
7
7
|
import { CountriesEnum } from '../shared/enum/countries.enum';
|
|
8
8
|
import { Languages } from '../shared/enum/languages.enum';
|
|
9
9
|
import { TagsEnum } from '../shared/enum/tags.enum';
|
|
10
|
+
import { AgregatorGooglePlaceRO } from './agregator-google-place.ro';
|
|
10
11
|
import { AgregatorQuestroomCardRO } from './agregator-questroom-card.ro';
|
|
11
12
|
export declare const getRightLocale: ({ value, key, techLocales, locales, language, }: {
|
|
12
13
|
value: string;
|
|
@@ -49,6 +50,11 @@ declare class Location {
|
|
|
49
50
|
parking: boolean;
|
|
50
51
|
waitingAreaSize: number;
|
|
51
52
|
city: City;
|
|
53
|
+
/**
|
|
54
|
+
* Оценка площадки в Google. Приходит только с эндпоинтов, которые явно
|
|
55
|
+
* подмешивают её по `locationId`, иначе `undefined`.
|
|
56
|
+
*/
|
|
57
|
+
googlePlace?: AgregatorGooglePlaceRO;
|
|
52
58
|
}
|
|
53
59
|
export declare class AgregatorQuestroomRO {
|
|
54
60
|
id: number;
|
|
@@ -23,6 +23,7 @@ const questroom_meta_ro_1 = require("../questroom/questroom-meta.ro");
|
|
|
23
23
|
const expert_review_ro_1 = require("../review/expert-review.ro");
|
|
24
24
|
const countries_enum_1 = require("../shared/enum/countries.enum");
|
|
25
25
|
const languages_enum_1 = require("../shared/enum/languages.enum");
|
|
26
|
+
const agregator_google_place_ro_1 = require("./agregator-google-place.ro");
|
|
26
27
|
const agregator_questroom_card_ro_1 = require("./agregator-questroom-card.ro");
|
|
27
28
|
const getRightLocale = ({ value, key, techLocales, locales, language, }) => {
|
|
28
29
|
const techLocale = techLocales === null || techLocales === void 0 ? void 0 : techLocales.find((l) => l.language === language);
|
|
@@ -156,6 +157,11 @@ __decorate([
|
|
|
156
157
|
(0, class_transformer_1.Type)(() => City),
|
|
157
158
|
__metadata("design:type", City)
|
|
158
159
|
], Location.prototype, "city", void 0);
|
|
160
|
+
__decorate([
|
|
161
|
+
(0, class_transformer_1.Expose)(),
|
|
162
|
+
(0, class_transformer_1.Type)(() => agregator_google_place_ro_1.AgregatorGooglePlaceRO),
|
|
163
|
+
__metadata("design:type", agregator_google_place_ro_1.AgregatorGooglePlaceRO)
|
|
164
|
+
], Location.prototype, "googlePlace", void 0);
|
|
159
165
|
class AgregatorQuestroomRO {
|
|
160
166
|
}
|
|
161
167
|
exports.AgregatorQuestroomRO = AgregatorQuestroomRO;
|
|
@@ -36,6 +36,31 @@ export type ParsedQuest = {
|
|
|
36
36
|
tags?: TagsEnum[];
|
|
37
37
|
/** Важная информация для посетителей (ограничения, что взять с собой). */
|
|
38
38
|
importantInfo?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Цена, как напечатана на сайте, в единицах валюты (не в центах): «ab 89 €»
|
|
41
|
+
* даёт priceFromRaw 89. Что именно покупается за эти деньги — в priceBasis.
|
|
42
|
+
*/
|
|
43
|
+
priceFromRaw?: number;
|
|
44
|
+
priceToRaw?: number;
|
|
45
|
+
/**
|
|
46
|
+
* За что заплачено: за игру целиком или за одного участника. Без этого
|
|
47
|
+
* цену принять нельзя — «25 €» за место и за комнату отличаются в разы.
|
|
48
|
+
*/
|
|
49
|
+
priceBasis?: 'per_group' | 'per_person';
|
|
50
|
+
/** Валюта с сайта (ISO 4217), как её распознал экстрактор. */
|
|
51
|
+
priceCurrencyRaw?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Цена за группу в минорных единицах после нормализации — ровно то, что
|
|
54
|
+
* уедет в `questrooms.minPrice`/`maxPrice`. Совпадает по смыслу с ценой из
|
|
55
|
+
* тарифа: сколько стоит игра целиком, а не место.
|
|
56
|
+
*/
|
|
57
|
+
minPrice?: number;
|
|
58
|
+
maxPrice?: number;
|
|
59
|
+
/**
|
|
60
|
+
* Почему цена с сайта не принята (чужая валюта, цена только за место без
|
|
61
|
+
* известного размера группы). Показывается модератору, в каталог не идёт.
|
|
62
|
+
*/
|
|
63
|
+
priceNote?: string;
|
|
39
64
|
/** URL фото с сайта-источника (в S3 загружаются при применении). */
|
|
40
65
|
photos?: string[];
|
|
41
66
|
/** URL страницы квеста. */
|
|
@@ -17,4 +17,11 @@ export declare class CreateQuestroomAdminDto {
|
|
|
17
17
|
time: number;
|
|
18
18
|
playersMin: number;
|
|
19
19
|
playersMax: number;
|
|
20
|
+
/**
|
|
21
|
+
* Цена за всю группу в минорных единицах. Заполняется парсингом сайта при
|
|
22
|
+
* апруве модератором — у квестов без расписания другого источника нет.
|
|
23
|
+
* Тариф, если он появится, перезапишет это значение.
|
|
24
|
+
*/
|
|
25
|
+
minPrice?: number;
|
|
26
|
+
maxPrice?: number;
|
|
20
27
|
}
|
|
@@ -125,3 +125,17 @@ __decorate([
|
|
|
125
125
|
(0, class_transformer_1.Expose)(),
|
|
126
126
|
__metadata("design:type", Number)
|
|
127
127
|
], CreateQuestroomAdminDto.prototype, "playersMax", void 0);
|
|
128
|
+
__decorate([
|
|
129
|
+
(0, class_validator_1.IsOptional)(),
|
|
130
|
+
(0, class_validator_1.IsInt)(),
|
|
131
|
+
(0, class_validator_1.Min)(0),
|
|
132
|
+
(0, class_transformer_1.Expose)(),
|
|
133
|
+
__metadata("design:type", Number)
|
|
134
|
+
], CreateQuestroomAdminDto.prototype, "minPrice", void 0);
|
|
135
|
+
__decorate([
|
|
136
|
+
(0, class_validator_1.IsOptional)(),
|
|
137
|
+
(0, class_validator_1.IsInt)(),
|
|
138
|
+
(0, class_validator_1.Min)(0),
|
|
139
|
+
(0, class_transformer_1.Expose)(),
|
|
140
|
+
__metadata("design:type", Number)
|
|
141
|
+
], CreateQuestroomAdminDto.prototype, "maxPrice", void 0);
|