@escapenavigator/types 1.10.153 → 1.10.155
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/city-faq.ro.d.ts +4 -0
- package/dist/city/city-faq.ro.js +9 -5
- package/dist/order/enum/order-cancel-reson.enum.d.ts +9 -1
- package/dist/order/enum/order-cancel-reson.enum.js +8 -0
- package/dist/order/enum/order-status.enum.d.ts +3 -1
- package/dist/order/enum/order-status.enum.js +2 -0
- package/dist/order/order-light.ro.d.ts +2 -0
- package/dist/order/order-light.ro.js +4 -0
- package/dist/order/order.ro.d.ts +6 -0
- package/dist/order/order.ro.js +4 -0
- package/dist/profile/email/profile-email-preview.ro.d.ts +10 -0
- package/dist/profile/email/profile-email-preview.ro.js +2 -0
- package/dist/promocode/promocode.ro.d.ts +1 -0
- package/dist/promocode/promocode.ro.js +4 -0
- package/dist/statistics/bookings.d.ts +9 -2
- package/dist/statistics/occupancy.d.ts +69 -0
- package/dist/statistics/occupancy.js +2 -0
- package/dist/transaction/transaction.ro.d.ts +2 -0
- package/dist/transaction/transaction.ro.js +4 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
package/dist/city/city-faq.ro.js
CHANGED
|
@@ -13,17 +13,18 @@ exports.CityFaqRO = exports.CityFaq = exports.CitySeo = 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 is_not_blank_1 = require("../shared/is-not-blank");
|
|
17
16
|
class CitySeo {
|
|
18
17
|
}
|
|
19
18
|
exports.CitySeo = CitySeo;
|
|
20
19
|
__decorate([
|
|
21
|
-
(0,
|
|
20
|
+
(0, class_validator_1.IsOptional)(),
|
|
21
|
+
(0, class_validator_1.IsString)(),
|
|
22
22
|
(0, class_transformer_1.Expose)(),
|
|
23
23
|
__metadata("design:type", String)
|
|
24
24
|
], CitySeo.prototype, "text", void 0);
|
|
25
25
|
__decorate([
|
|
26
|
-
(0,
|
|
26
|
+
(0, class_validator_1.IsOptional)(),
|
|
27
|
+
(0, class_validator_1.IsString)(),
|
|
27
28
|
(0, class_transformer_1.Expose)(),
|
|
28
29
|
__metadata("design:type", String)
|
|
29
30
|
], CitySeo.prototype, "language", void 0);
|
|
@@ -31,7 +32,8 @@ class CityFaq extends CitySeo {
|
|
|
31
32
|
}
|
|
32
33
|
exports.CityFaq = CityFaq;
|
|
33
34
|
__decorate([
|
|
34
|
-
(0,
|
|
35
|
+
(0, class_validator_1.IsOptional)(),
|
|
36
|
+
(0, class_validator_1.IsString)(),
|
|
35
37
|
(0, class_transformer_1.Expose)(),
|
|
36
38
|
__metadata("design:type", String)
|
|
37
39
|
], CityFaq.prototype, "title", void 0);
|
|
@@ -40,13 +42,15 @@ class CityFaqRO {
|
|
|
40
42
|
exports.CityFaqRO = CityFaqRO;
|
|
41
43
|
__decorate([
|
|
42
44
|
(0, class_transformer_1.Expose)(),
|
|
45
|
+
(0, class_validator_1.IsOptional)(),
|
|
43
46
|
(0, class_validator_1.IsArray)(),
|
|
44
47
|
(0, class_transformer_1.Type)(() => CityFaq),
|
|
45
48
|
__metadata("design:type", Array)
|
|
46
49
|
], CityFaqRO.prototype, "faq", void 0);
|
|
47
50
|
__decorate([
|
|
48
51
|
(0, class_transformer_1.Expose)(),
|
|
49
|
-
(0,
|
|
52
|
+
(0, class_validator_1.IsOptional)(),
|
|
53
|
+
(0, class_validator_1.IsArray)(),
|
|
50
54
|
(0, class_transformer_1.Type)(() => CitySeo),
|
|
51
55
|
__metadata("design:type", Array)
|
|
52
56
|
], CityFaqRO.prototype, "seo", void 0);
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
export declare enum OrderCancelReasonEnum {
|
|
2
2
|
QUESTROOM = "questroom",
|
|
3
3
|
CLIENT = "client",
|
|
4
|
-
CLIENT_SELF = "client_self"
|
|
4
|
+
CLIENT_SELF = "client_self",
|
|
5
|
+
/**
|
|
6
|
+
* «Клиент не пришёл» (no-show). Отличается от обычной отмены тем, что
|
|
7
|
+
* слот НЕ освобождается (см. `OrderEntity.noShow`): игра остаётся видна
|
|
8
|
+
* в расписании и засчитывается модератору в отчёте по сотрудникам, но
|
|
9
|
+
* финансово/в маркетинге ведёт себя как отменённая. Штраф считается по
|
|
10
|
+
* правилу квеста, как для обычной поздней отмены.
|
|
11
|
+
*/
|
|
12
|
+
CLIENT_NO_SHOW = "client_no_show"
|
|
5
13
|
}
|
|
@@ -6,4 +6,12 @@ var OrderCancelReasonEnum;
|
|
|
6
6
|
OrderCancelReasonEnum["QUESTROOM"] = "questroom";
|
|
7
7
|
OrderCancelReasonEnum["CLIENT"] = "client";
|
|
8
8
|
OrderCancelReasonEnum["CLIENT_SELF"] = "client_self";
|
|
9
|
+
/**
|
|
10
|
+
* «Клиент не пришёл» (no-show). Отличается от обычной отмены тем, что
|
|
11
|
+
* слот НЕ освобождается (см. `OrderEntity.noShow`): игра остаётся видна
|
|
12
|
+
* в расписании и засчитывается модератору в отчёте по сотрудникам, но
|
|
13
|
+
* финансово/в маркетинге ведёт себя как отменённая. Штраф считается по
|
|
14
|
+
* правилу квеста, как для обычной поздней отмены.
|
|
15
|
+
*/
|
|
16
|
+
OrderCancelReasonEnum["CLIENT_NO_SHOW"] = "client_no_show";
|
|
9
17
|
})(OrderCancelReasonEnum || (exports.OrderCancelReasonEnum = OrderCancelReasonEnum = {}));
|
|
@@ -9,5 +9,7 @@ export declare enum OrderStatusEnum {
|
|
|
9
9
|
CANCELED_WITH_FINE = "canceled_with_fine",
|
|
10
10
|
BOOKING_IN_PROCESS = "booking_in_process",
|
|
11
11
|
FAILED_BOOKING = "failed_booking",
|
|
12
|
-
OVERPAYED = "overpayed"
|
|
12
|
+
OVERPAYED = "overpayed",
|
|
13
|
+
/** Клиент не пришёл (no-show): слот сохранён, но игра отменена. */
|
|
14
|
+
NO_SHOW = "no_show"
|
|
13
15
|
}
|
|
@@ -14,4 +14,6 @@ var OrderStatusEnum;
|
|
|
14
14
|
OrderStatusEnum["BOOKING_IN_PROCESS"] = "booking_in_process";
|
|
15
15
|
OrderStatusEnum["FAILED_BOOKING"] = "failed_booking";
|
|
16
16
|
OrderStatusEnum["OVERPAYED"] = "overpayed";
|
|
17
|
+
/** Клиент не пришёл (no-show): слот сохранён, но игра отменена. */
|
|
18
|
+
OrderStatusEnum["NO_SHOW"] = "no_show";
|
|
17
19
|
})(OrderStatusEnum || (exports.OrderStatusEnum = OrderStatusEnum = {}));
|
|
@@ -49,6 +49,8 @@ export declare class OrderLightRO extends RO {
|
|
|
49
49
|
groupId?: number;
|
|
50
50
|
confirmed?: boolean;
|
|
51
51
|
canceledWithFine: boolean;
|
|
52
|
+
/** «Клиент не пришёл» (no-show): слот сохранён, игра отменена. */
|
|
53
|
+
noShow: boolean;
|
|
52
54
|
locked: boolean;
|
|
53
55
|
client: ClientLightRO;
|
|
54
56
|
}
|
|
@@ -117,6 +117,10 @@ __decorate([
|
|
|
117
117
|
(0, class_transformer_1.Expose)(),
|
|
118
118
|
__metadata("design:type", Boolean)
|
|
119
119
|
], OrderLightRO.prototype, "canceledWithFine", void 0);
|
|
120
|
+
__decorate([
|
|
121
|
+
(0, class_transformer_1.Expose)(),
|
|
122
|
+
__metadata("design:type", Boolean)
|
|
123
|
+
], OrderLightRO.prototype, "noShow", void 0);
|
|
120
124
|
__decorate([
|
|
121
125
|
(0, class_transformer_1.Expose)(),
|
|
122
126
|
__metadata("design:type", Boolean)
|
package/dist/order/order.ro.d.ts
CHANGED
|
@@ -182,6 +182,12 @@ export declare class OrderRO extends RO {
|
|
|
182
182
|
children: number;
|
|
183
183
|
participants: OrderParticipant[];
|
|
184
184
|
canceledWithFine: boolean;
|
|
185
|
+
/**
|
|
186
|
+
* «Клиент не пришёл» (no-show). Заказ отменён, но слот сохранён
|
|
187
|
+
* (`slotId` остаётся), чтобы игра была видна в расписании и засчитана
|
|
188
|
+
* модератору. Финансово/в маркетинге ведёт себя как отменённая.
|
|
189
|
+
*/
|
|
190
|
+
noShow: boolean;
|
|
185
191
|
cancelationType: OrderCancelReasonEnum;
|
|
186
192
|
utcDate: string;
|
|
187
193
|
result: number;
|
package/dist/order/order.ro.js
CHANGED
|
@@ -477,6 +477,10 @@ __decorate([
|
|
|
477
477
|
(0, class_transformer_1.Expose)(),
|
|
478
478
|
__metadata("design:type", Boolean)
|
|
479
479
|
], OrderRO.prototype, "canceledWithFine", void 0);
|
|
480
|
+
__decorate([
|
|
481
|
+
(0, class_transformer_1.Expose)(),
|
|
482
|
+
__metadata("design:type", Boolean)
|
|
483
|
+
], OrderRO.prototype, "noShow", void 0);
|
|
480
484
|
__decorate([
|
|
481
485
|
(0, class_transformer_1.Expose)(),
|
|
482
486
|
__metadata("design:type", String)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ответ `GET /profile-emails/:id/preview`. Бэк рендерит сохранённое
|
|
3
|
+
* письмо в готовый HTML — и legacy v1 (через alfa-mailer `/render`),
|
|
4
|
+
* и v2 (через тот же `renderEmailV2Local`, что и реальная отправка),
|
|
5
|
+
* чтобы модалка просмотра отправленных писем показывала полное тело,
|
|
6
|
+
* а не только заголовок.
|
|
7
|
+
*/
|
|
8
|
+
export type ProfileEmailPreviewRO = {
|
|
9
|
+
html: string;
|
|
10
|
+
};
|
|
@@ -29,6 +29,7 @@ export declare class PromocodeRO extends RO {
|
|
|
29
29
|
minPlayers: number;
|
|
30
30
|
maxPlayers: number;
|
|
31
31
|
orderId: number;
|
|
32
|
+
clientId?: number;
|
|
32
33
|
certificateNominalRules: PromocodeNominalRule[];
|
|
33
34
|
certificateMode: PromocodeCertificateModeEnum | null;
|
|
34
35
|
kind: PromocodeKindEnum;
|
|
@@ -118,6 +118,10 @@ __decorate([
|
|
|
118
118
|
(0, class_transformer_1.Expose)(),
|
|
119
119
|
__metadata("design:type", Number)
|
|
120
120
|
], PromocodeRO.prototype, "orderId", void 0);
|
|
121
|
+
__decorate([
|
|
122
|
+
(0, class_transformer_1.Expose)(),
|
|
123
|
+
__metadata("design:type", Number)
|
|
124
|
+
], PromocodeRO.prototype, "clientId", void 0);
|
|
121
125
|
__decorate([
|
|
122
126
|
(0, class_transformer_1.Expose)(),
|
|
123
127
|
__metadata("design:type", Array)
|
|
@@ -4,9 +4,16 @@ export type OrdersOverview = {
|
|
|
4
4
|
ordersTotal: number;
|
|
5
5
|
/** Есть slotId (состоялось или запланировано) */
|
|
6
6
|
withSlotTotal: number;
|
|
7
|
-
/** Нет slotId (отменено) */
|
|
7
|
+
/** Нет slotId (отменено). No-show сюда НЕ входит — он считается отдельно. */
|
|
8
8
|
cancelledTotal: number;
|
|
9
|
-
/**
|
|
9
|
+
/** Подмножество `cancelledTotal`: отменено со штрафом (canceledWithFine). */
|
|
10
|
+
cancelledWithFineTotal: number;
|
|
11
|
+
/**
|
|
12
|
+
* «Клиент не пришёл» (no-show): слот сохранён, но игра отменена.
|
|
13
|
+
* В выручку/occurred/withSlot не входит — отдельный счётчик.
|
|
14
|
+
*/
|
|
15
|
+
noShowTotal: number;
|
|
16
|
+
/** Состоялось: slotId есть, не no-show и utcDate < NOW() */
|
|
10
17
|
occurredTotal: number;
|
|
11
18
|
/** Планируется: slotId есть и utcDate >= NOW() */
|
|
12
19
|
plannedTotal: number;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { Bucket } from './bookings';
|
|
2
|
+
/**
|
|
3
|
+
* Заполняемость (occupancy) — насколько плотно проданы доступные слоты.
|
|
4
|
+
*
|
|
5
|
+
* Источник правды — ночной rollup `occupancy_cache` (grain:
|
|
6
|
+
* profileId × questroomId × day × hour), который снапшотит расписание ДО
|
|
7
|
+
* того, как крон удалит пустые слоты старше ~2 месяцев. Поэтому исторические
|
|
8
|
+
* периоды считаются честно: знаменатель (открытые слоты) сохранён.
|
|
9
|
+
*
|
|
10
|
+
* Две метрики:
|
|
11
|
+
* - по слотам: bookedSlots / openSlots — доля проданных тайм-слотов;
|
|
12
|
+
* - по местам: seatsBooked / seatsCapacity — насколько полно набираются
|
|
13
|
+
* группы (имеет смысл прежде всего для тикетных квестов).
|
|
14
|
+
*/
|
|
15
|
+
/** Доли всегда в диапазоне 0..1. */
|
|
16
|
+
export type OccupancyOverview = {
|
|
17
|
+
/** Открытые слоты (без перерывов и устаревших) за период. */
|
|
18
|
+
openSlots: number;
|
|
19
|
+
/** Слоты с хотя бы одной активной бронью. */
|
|
20
|
+
bookedSlots: number;
|
|
21
|
+
/** Заполняемость по слотам = bookedSlots / openSlots (0..1). */
|
|
22
|
+
occupancy: number;
|
|
23
|
+
/** Заполняемость только по будням (Пн–Пт). */
|
|
24
|
+
weekdayOccupancy: number;
|
|
25
|
+
/** Заполняемость только по выходным (Сб–Вс). */
|
|
26
|
+
weekendOccupancy: number;
|
|
27
|
+
/** Суммарная вместимость по местам открытых слотов. */
|
|
28
|
+
seatsCapacity: number;
|
|
29
|
+
/** Забронированные места. */
|
|
30
|
+
seatsBooked: number;
|
|
31
|
+
/** Заполняемость по местам = seatsBooked / seatsCapacity (0..1). */
|
|
32
|
+
seatOccupancy: number;
|
|
33
|
+
};
|
|
34
|
+
/** Ячейка тепловой карты: день недели (0=Вс..6=Сб) × час (0..23). */
|
|
35
|
+
export type OccupancyHeatCell = {
|
|
36
|
+
dow: number;
|
|
37
|
+
hour: number;
|
|
38
|
+
openSlots: number;
|
|
39
|
+
bookedSlots: number;
|
|
40
|
+
occupancy: number;
|
|
41
|
+
};
|
|
42
|
+
/** Точка тренда: bucket day/week/month (как в orders-report). */
|
|
43
|
+
export type OccupancyTrendPoint = {
|
|
44
|
+
period: string;
|
|
45
|
+
openSlots: number;
|
|
46
|
+
bookedSlots: number;
|
|
47
|
+
occupancy: number;
|
|
48
|
+
};
|
|
49
|
+
/** Строка таблицы по квестам. `name` = questroomId (резолвится на фронте). */
|
|
50
|
+
export type OccupancyQuestRow = {
|
|
51
|
+
name: string;
|
|
52
|
+
openSlots: number;
|
|
53
|
+
bookedSlots: number;
|
|
54
|
+
occupancy: number;
|
|
55
|
+
weekdayOccupancy: number;
|
|
56
|
+
weekendOccupancy: number;
|
|
57
|
+
seatsCapacity: number;
|
|
58
|
+
seatsBooked: number;
|
|
59
|
+
seatOccupancy: number;
|
|
60
|
+
ticketSystem: boolean;
|
|
61
|
+
};
|
|
62
|
+
export type OccupancyReportRO = {
|
|
63
|
+
overview: OccupancyOverview;
|
|
64
|
+
heatmap: OccupancyHeatCell[];
|
|
65
|
+
trend: OccupancyTrendPoint[];
|
|
66
|
+
quests: OccupancyQuestRow[];
|
|
67
|
+
/** Гранулярность тренда — чтобы фронт корректно форматировал ось X. */
|
|
68
|
+
bucket: Bucket;
|
|
69
|
+
};
|
|
@@ -42,6 +42,8 @@ export declare class TransactionRO extends RO {
|
|
|
42
42
|
employee: User;
|
|
43
43
|
partner: Partner;
|
|
44
44
|
order: Order;
|
|
45
|
+
/** Групповая транзакция (XOR с orderId): оплата за OrderGroupEntity. */
|
|
46
|
+
orderGroupId?: number;
|
|
45
47
|
certificatesale: Certificate;
|
|
46
48
|
paymentId: string;
|
|
47
49
|
amount: number;
|
|
@@ -139,6 +139,10 @@ __decorate([
|
|
|
139
139
|
(0, class_transformer_1.Type)(() => Order),
|
|
140
140
|
__metadata("design:type", Order)
|
|
141
141
|
], TransactionRO.prototype, "order", void 0);
|
|
142
|
+
__decorate([
|
|
143
|
+
(0, class_transformer_1.Expose)(),
|
|
144
|
+
__metadata("design:type", Number)
|
|
145
|
+
], TransactionRO.prototype, "orderGroupId", void 0);
|
|
142
146
|
__decorate([
|
|
143
147
|
(0, class_transformer_1.Expose)(),
|
|
144
148
|
(0, class_transformer_1.Type)(() => Certificate),
|