@escapenavigator/types 1.10.160 → 1.10.162
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/certificate-v2/certificate-settings.ro.d.ts +1 -0
- package/dist/certificate-v2/certificate-settings.ro.js +4 -0
- package/dist/certificate-v2/update-certificate-settings.dto.d.ts +1 -0
- package/dist/certificate-v2/update-certificate-settings.dto.js +8 -0
- package/dist/client/client.ro.d.ts +6 -0
- package/dist/client/client.ro.js +18 -0
- package/dist/client/query-client.dto.d.ts +1 -1
- package/dist/emails/index.d.ts +2 -0
- package/dist/log/log-title.enum.d.ts +1 -0
- package/dist/log/log-title.enum.js +1 -0
- package/dist/openapi/certificates/openapi-cancel-certificate.dto.d.ts +8 -0
- package/dist/openapi/certificates/openapi-cancel-certificate.dto.js +27 -0
- package/dist/openapi/certificates/openapi-certificate-sale.ro.d.ts +13 -0
- package/dist/openapi/certificates/openapi-certificate-sale.ro.js +8 -0
- package/dist/openapi/ru-aggregators/mk-order-dto.d.ts +6 -3
- package/dist/openapi/ru-aggregators/mk-order-dto.js +2 -0
- package/dist/openapi/widget/openapi-widget-info.ro.d.ts +2 -0
- package/dist/openapi/widget/openapi-widget-info.ro.js +5 -0
- package/dist/profile/marketing-automation/marketing-automation-config.dto.d.ts +7 -0
- package/dist/profile/marketing-automation/marketing-automation-config.dto.js +6 -0
- package/dist/questroom/create-questroom.dto.d.ts +1 -0
- package/dist/questroom/create-questroom.dto.js +8 -0
- package/dist/questroom/questroom.ro.d.ts +1 -0
- package/dist/questroom/questroom.ro.js +4 -0
- package/dist/slot/slot.ro.d.ts +2 -0
- package/dist/statistics/pnl.d.ts +13 -0
- package/dist/statistics/pnl.js +5 -0
- package/dist/statistics/surveys.d.ts +148 -0
- package/dist/statistics/surveys.js +60 -0
- package/dist/survey/enums/marketing-audience-status.enum.d.ts +8 -0
- package/dist/survey/enums/marketing-audience-status.enum.js +13 -0
- package/dist/survey/enums/nps-status.enum.d.ts +12 -0
- package/dist/survey/enums/nps-status.enum.js +23 -0
- package/dist/survey/enums/survey-channel.enum.d.ts +5 -0
- package/dist/survey/enums/survey-channel.enum.js +9 -0
- package/dist/survey/enums/survey-completed-by.enum.d.ts +4 -0
- package/dist/survey/enums/survey-completed-by.enum.js +8 -0
- package/dist/survey/enums/survey-final-scenario.enum.d.ts +5 -0
- package/dist/survey/enums/survey-final-scenario.enum.js +9 -0
- package/dist/survey/enums/survey-question-type.enum.d.ts +9 -0
- package/dist/survey/enums/survey-question-type.enum.js +13 -0
- package/dist/survey/enums/survey-score-role.enum.d.ts +11 -0
- package/dist/survey/enums/survey-score-role.enum.js +15 -0
- package/dist/survey/enums/survey-status.enum.d.ts +5 -0
- package/dist/survey/enums/survey-status.enum.js +9 -0
- package/dist/survey/enums/survey-type.enum.d.ts +4 -0
- package/dist/survey/enums/survey-type.enum.js +8 -0
- package/dist/survey/mint-survey-link.dto.d.ts +6 -0
- package/dist/survey/mint-survey-link.dto.js +29 -0
- package/dist/survey/operator-submit-survey.dto.d.ts +11 -0
- package/dist/survey/operator-submit-survey.dto.js +40 -0
- package/dist/survey/order-survey-to-fill.ro.d.ts +65 -0
- package/dist/survey/order-survey-to-fill.ro.js +173 -0
- package/dist/survey/submit-survey.dto.d.ts +15 -0
- package/dist/survey/submit-survey.dto.js +40 -0
- package/dist/survey/survey-answer.type.d.ts +33 -0
- package/dist/survey/survey-answer.type.js +2 -0
- package/dist/survey/survey-final-screen.type.d.ts +45 -0
- package/dist/survey/survey-final-screen.type.js +2 -0
- package/dist/survey/survey-link.ro.d.ts +4 -0
- package/dist/survey/survey-link.ro.js +24 -0
- package/dist/survey/survey-order-summary.ro.d.ts +20 -0
- package/dist/survey/survey-order-summary.ro.js +50 -0
- package/dist/survey/survey-question.type.d.ts +91 -0
- package/dist/survey/survey-question.type.js +2 -0
- package/dist/survey/survey-response.ro.d.ts +32 -0
- package/dist/survey/survey-response.ro.js +110 -0
- package/dist/survey/survey-template-defaults.ro.d.ts +17 -0
- package/dist/survey/survey-template-defaults.ro.js +46 -0
- package/dist/survey/survey-template.ro.d.ts +17 -0
- package/dist/survey/survey-template.ro.js +57 -0
- package/dist/survey/update-survey-template.dto.d.ts +26 -0
- package/dist/survey/update-survey-template.dto.js +64 -0
- package/dist/translation/delete-orphaned-translations.dto.d.ts +4 -0
- package/dist/translation/delete-orphaned-translations.dto.js +23 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/widget/create-widget.dto.d.ts +2 -0
- package/dist/widget/create-widget.dto.js +8 -0
- package/dist/widget/enum/widget-consent-mode.enum.d.ts +15 -0
- package/dist/widget/enum/widget-consent-mode.enum.js +19 -0
- package/dist/widget/widget.ro.d.ts +2 -0
- package/dist/widget-chat/widget-chat-init.ro.d.ts +1 -1
- package/package.json +2 -2
|
@@ -23,6 +23,10 @@ __decorate([
|
|
|
23
23
|
(0, class_transformer_1.Expose)(),
|
|
24
24
|
__metadata("design:type", Number)
|
|
25
25
|
], CertificateSettingsRO.prototype, "validity", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, class_transformer_1.Expose)(),
|
|
28
|
+
__metadata("design:type", Number)
|
|
29
|
+
], CertificateSettingsRO.prototype, "clientCancellationDays", void 0);
|
|
26
30
|
__decorate([
|
|
27
31
|
(0, class_transformer_1.Expose)(),
|
|
28
32
|
__metadata("design:type", Boolean)
|
|
@@ -24,6 +24,14 @@ __decorate([
|
|
|
24
24
|
(0, class_transformer_1.Expose)(),
|
|
25
25
|
__metadata("design:type", Number)
|
|
26
26
|
], UpdateCertificateSettingsDto.prototype, "validity", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, class_validator_1.IsOptional)(),
|
|
29
|
+
(0, class_transformer_1.Transform)(({ value }) => (+value ? +value : 0)),
|
|
30
|
+
(0, class_validator_1.Min)(0),
|
|
31
|
+
(0, class_validator_1.IsInt)(),
|
|
32
|
+
(0, class_transformer_1.Expose)(),
|
|
33
|
+
__metadata("design:type", Number)
|
|
34
|
+
], UpdateCertificateSettingsDto.prototype, "clientCancellationDays", void 0);
|
|
27
35
|
__decorate([
|
|
28
36
|
(0, class_validator_1.IsOptional)(),
|
|
29
37
|
(0, class_validator_1.IsBoolean)(),
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { RO } from '../shared/ro-class';
|
|
2
|
+
import { MarketingAudienceExclusionReasonEnum, MarketingAudienceStatusEnum } from '../survey/enums/marketing-audience-status.enum';
|
|
3
|
+
import { NpsStatusEnum } from '../survey/enums/nps-status.enum';
|
|
2
4
|
import { ClientTypeEnum } from './emun/client-type.enum';
|
|
3
5
|
export declare class PrevData {
|
|
4
6
|
}
|
|
@@ -30,6 +32,10 @@ export declare class ClientRO extends RO {
|
|
|
30
32
|
blockedDate?: string;
|
|
31
33
|
blockedReason?: string;
|
|
32
34
|
hasComplaint?: boolean;
|
|
35
|
+
npsStatus?: NpsStatusEnum | null;
|
|
36
|
+
lastNpsScore?: number | null;
|
|
37
|
+
marketingAudienceStatus?: MarketingAudienceStatusEnum;
|
|
38
|
+
marketingAudienceExclusionReason?: MarketingAudienceExclusionReasonEnum | null;
|
|
33
39
|
previousData: PrevData[];
|
|
34
40
|
parent: ParentRO;
|
|
35
41
|
prevOrders?: any;
|
package/dist/client/client.ro.js
CHANGED
|
@@ -13,6 +13,8 @@ exports.ClientRO = exports.PrevData = void 0;
|
|
|
13
13
|
/* eslint-disable max-classes-per-file */
|
|
14
14
|
const class_transformer_1 = require("class-transformer");
|
|
15
15
|
const ro_class_1 = require("../shared/ro-class");
|
|
16
|
+
const marketing_audience_status_enum_1 = require("../survey/enums/marketing-audience-status.enum");
|
|
17
|
+
const nps_status_enum_1 = require("../survey/enums/nps-status.enum");
|
|
16
18
|
const client_type_enum_1 = require("./emun/client-type.enum");
|
|
17
19
|
let PrevData = class PrevData {
|
|
18
20
|
};
|
|
@@ -125,6 +127,22 @@ __decorate([
|
|
|
125
127
|
(0, class_transformer_1.Expose)(),
|
|
126
128
|
__metadata("design:type", Boolean)
|
|
127
129
|
], ClientRO.prototype, "hasComplaint", void 0);
|
|
130
|
+
__decorate([
|
|
131
|
+
(0, class_transformer_1.Expose)(),
|
|
132
|
+
__metadata("design:type", String)
|
|
133
|
+
], ClientRO.prototype, "npsStatus", void 0);
|
|
134
|
+
__decorate([
|
|
135
|
+
(0, class_transformer_1.Expose)(),
|
|
136
|
+
__metadata("design:type", Number)
|
|
137
|
+
], ClientRO.prototype, "lastNpsScore", void 0);
|
|
138
|
+
__decorate([
|
|
139
|
+
(0, class_transformer_1.Expose)(),
|
|
140
|
+
__metadata("design:type", String)
|
|
141
|
+
], ClientRO.prototype, "marketingAudienceStatus", void 0);
|
|
142
|
+
__decorate([
|
|
143
|
+
(0, class_transformer_1.Expose)(),
|
|
144
|
+
__metadata("design:type", String)
|
|
145
|
+
], ClientRO.prototype, "marketingAudienceExclusionReason", void 0);
|
|
128
146
|
__decorate([
|
|
129
147
|
(0, class_transformer_1.Expose)(),
|
|
130
148
|
(0, class_transformer_1.Type)(() => PrevData),
|
|
@@ -3,7 +3,7 @@ export declare class QueryClientDto {
|
|
|
3
3
|
lastGame?: [string, string];
|
|
4
4
|
birthday?: [string, string];
|
|
5
5
|
gamesCount?: string[];
|
|
6
|
-
visitsCount?: 'exactly_1' | 'exactly_2' | 'more_2' | 'more_3' | 'more_4';
|
|
6
|
+
visitsCount?: 'exactly_1' | 'exactly_2' | 'more_2' | 'more_3' | 'more_4' | 'not_visited';
|
|
7
7
|
selectedMonth?: string | number;
|
|
8
8
|
blockedClient?: 'blocked' | 'not_blocked';
|
|
9
9
|
alowedToAds?: 'allowed' | 'not_allowed';
|
package/dist/emails/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export declare enum LogTitleEnum {
|
|
|
7
7
|
changeOrderDate = "changeOrderDate",
|
|
8
8
|
cancelOrder = "cancelOrder",
|
|
9
9
|
changePlayers = "changePlayers",
|
|
10
|
+
changeVariation = "changeVariation",
|
|
10
11
|
changeLanguage = "changeLanguage",
|
|
11
12
|
changeMode = "changeMode",
|
|
12
13
|
lockOrder = "lockOrder",
|
|
@@ -11,6 +11,7 @@ var LogTitleEnum;
|
|
|
11
11
|
LogTitleEnum["changeOrderDate"] = "changeOrderDate";
|
|
12
12
|
LogTitleEnum["cancelOrder"] = "cancelOrder";
|
|
13
13
|
LogTitleEnum["changePlayers"] = "changePlayers";
|
|
14
|
+
LogTitleEnum["changeVariation"] = "changeVariation";
|
|
14
15
|
LogTitleEnum["changeLanguage"] = "changeLanguage";
|
|
15
16
|
LogTitleEnum["changeMode"] = "changeMode";
|
|
16
17
|
LogTitleEnum["lockOrder"] = "lockOrder";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Отмена покупки сертификата самим клиентом (cooling-off).
|
|
3
|
+
* Токен идентифицирует конкретную продажу; все проверки прав на отмену
|
|
4
|
+
* (окно по дням, не использован, не отправлен, оплачен) делаются на сервере.
|
|
5
|
+
*/
|
|
6
|
+
export declare class OpenapiCancelCertificateDto {
|
|
7
|
+
certificateToken: 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.OpenapiCancelCertificateDto = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const is_not_blank_1 = require("../../shared/is-not-blank");
|
|
15
|
+
/**
|
|
16
|
+
* Отмена покупки сертификата самим клиентом (cooling-off).
|
|
17
|
+
* Токен идентифицирует конкретную продажу; все проверки прав на отмену
|
|
18
|
+
* (окно по дням, не использован, не отправлен, оплачен) делаются на сервере.
|
|
19
|
+
*/
|
|
20
|
+
class OpenapiCancelCertificateDto {
|
|
21
|
+
}
|
|
22
|
+
exports.OpenapiCancelCertificateDto = OpenapiCancelCertificateDto;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, is_not_blank_1.IsNotBlank)(),
|
|
25
|
+
(0, class_transformer_1.Expose)(),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], OpenapiCancelCertificateDto.prototype, "certificateToken", void 0);
|
|
@@ -56,6 +56,19 @@ export declare class OpenapiCertificateSaleRO {
|
|
|
56
56
|
currency: ProfileCurrencyEnum;
|
|
57
57
|
utm?: Utm;
|
|
58
58
|
token: string;
|
|
59
|
+
/**
|
|
60
|
+
* Может ли клиент сам отменить покупку сертификата прямо сейчас
|
|
61
|
+
* (включена настройка cooling-off, оплачено, не использовано,
|
|
62
|
+
* не отправлено/не аннулировано и окно ещё не истекло).
|
|
63
|
+
* Считается на сервере, фронт только показывает кнопку.
|
|
64
|
+
*/
|
|
65
|
+
canClientCancel?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Будет ли возврат денег произведён автоматически (оплата была
|
|
68
|
+
* реально получена через Stripe). Если false — сертификат
|
|
69
|
+
* аннулируется, но деньги клиент решает с площадкой отдельно.
|
|
70
|
+
*/
|
|
71
|
+
clientCancellationRefundAuto?: boolean;
|
|
59
72
|
/**
|
|
60
73
|
* Bearer-токен для protected widget endpoints для последующих
|
|
61
74
|
* запросов виджета по этому certificate-sale. Cookie `widget-token`
|
|
@@ -190,6 +190,14 @@ __decorate([
|
|
|
190
190
|
(0, class_transformer_1.Expose)(),
|
|
191
191
|
__metadata("design:type", String)
|
|
192
192
|
], OpenapiCertificateSaleRO.prototype, "token", void 0);
|
|
193
|
+
__decorate([
|
|
194
|
+
(0, class_transformer_1.Expose)(),
|
|
195
|
+
__metadata("design:type", Boolean)
|
|
196
|
+
], OpenapiCertificateSaleRO.prototype, "canClientCancel", void 0);
|
|
197
|
+
__decorate([
|
|
198
|
+
(0, class_transformer_1.Expose)(),
|
|
199
|
+
__metadata("design:type", Boolean)
|
|
200
|
+
], OpenapiCertificateSaleRO.prototype, "clientCancellationRefundAuto", void 0);
|
|
193
201
|
__decorate([
|
|
194
202
|
(0, class_transformer_1.Expose)(),
|
|
195
203
|
__metadata("design:type", String)
|
|
@@ -2,15 +2,18 @@ export declare class MKOrderDto {
|
|
|
2
2
|
first_name: string;
|
|
3
3
|
family_name: string;
|
|
4
4
|
phone: string;
|
|
5
|
-
|
|
5
|
+
/** Кол-во игроков. Если не передано — минимум по тарифу слота. */
|
|
6
|
+
players?: number;
|
|
6
7
|
email: string;
|
|
7
8
|
comment: string;
|
|
8
9
|
source: string;
|
|
9
10
|
md5: string;
|
|
10
11
|
date: string;
|
|
11
12
|
time: string;
|
|
12
|
-
|
|
13
|
+
/** Стоимость от агрегатора — игнорируется, цена берётся из тарифа слота. */
|
|
14
|
+
price?: number;
|
|
13
15
|
unique_id: string;
|
|
14
|
-
|
|
16
|
+
/** Строка тарифа из `GET /aggregators/price` (например «2 чел: 1500 руб.»). Опционально. */
|
|
17
|
+
tariff?: string;
|
|
15
18
|
slot_id: number;
|
|
16
19
|
}
|
|
@@ -34,6 +34,7 @@ __decorate([
|
|
|
34
34
|
__decorate([
|
|
35
35
|
(0, class_transformer_1.Expose)(),
|
|
36
36
|
(0, class_validator_1.IsOptional)(),
|
|
37
|
+
(0, class_validator_1.IsNumber)(),
|
|
37
38
|
__metadata("design:type", Number)
|
|
38
39
|
], MKOrderDto.prototype, "players", void 0);
|
|
39
40
|
__decorate([
|
|
@@ -69,6 +70,7 @@ __decorate([
|
|
|
69
70
|
__decorate([
|
|
70
71
|
(0, class_transformer_1.Expose)(),
|
|
71
72
|
(0, class_validator_1.IsOptional)(),
|
|
73
|
+
(0, class_validator_1.IsNumber)(),
|
|
72
74
|
__metadata("design:type", Number)
|
|
73
75
|
], MKOrderDto.prototype, "price", void 0);
|
|
74
76
|
__decorate([
|
|
@@ -5,6 +5,7 @@ import { WidgetStyleEnum } from '../../profile/widget-customization/enum/widget-
|
|
|
5
5
|
import { WidgetViewEnum } from '../../profile/widget-customization/enum/widget-view.enum';
|
|
6
6
|
import { CountriesEnum } from '../../shared/enum/countries.enum';
|
|
7
7
|
import { Languages } from '../../shared/enum/languages.enum';
|
|
8
|
+
import { WidgetConsentModeEnum } from '../../widget/enum/widget-consent-mode.enum';
|
|
8
9
|
import { WidgetBookingFiledEnum } from '../../widget/enum/widget-booking-filed.enum';
|
|
9
10
|
import { WidgetTypeEnum } from '../../widget/enum/widget-type.enum';
|
|
10
11
|
import { OpenapiCertificatesShopRO } from '../certificates-v2/openapi-certificates-shop.ro';
|
|
@@ -73,6 +74,7 @@ export declare class OpenapiWidgetInfoRO {
|
|
|
73
74
|
gaCoversationLabel?: string;
|
|
74
75
|
gaEnabled?: boolean;
|
|
75
76
|
fbPixelEnabled?: boolean;
|
|
77
|
+
consentMode?: WidgetConsentModeEnum;
|
|
76
78
|
fbPixelId?: string;
|
|
77
79
|
customization: Customization;
|
|
78
80
|
mailchimp?: string | Mailchimp;
|
|
@@ -20,6 +20,7 @@ const widget_style_enum_1 = require("../../profile/widget-customization/enum/wid
|
|
|
20
20
|
const widget_view_enum_1 = require("../../profile/widget-customization/enum/widget-view.enum");
|
|
21
21
|
const countries_enum_1 = require("../../shared/enum/countries.enum");
|
|
22
22
|
const languages_enum_1 = require("../../shared/enum/languages.enum");
|
|
23
|
+
const widget_consent_mode_enum_1 = require("../../widget/enum/widget-consent-mode.enum");
|
|
23
24
|
const widget_type_enum_1 = require("../../widget/enum/widget-type.enum");
|
|
24
25
|
const openapi_certificates_shop_ro_1 = require("../certificates-v2/openapi-certificates-shop.ro");
|
|
25
26
|
const openapi_questroom_ro_1 = require("../shared/openapi-questroom.ro");
|
|
@@ -221,6 +222,10 @@ __decorate([
|
|
|
221
222
|
(0, class_transformer_1.Expose)(),
|
|
222
223
|
__metadata("design:type", Boolean)
|
|
223
224
|
], OpenapiWidgetInfoRO.prototype, "fbPixelEnabled", void 0);
|
|
225
|
+
__decorate([
|
|
226
|
+
(0, class_transformer_1.Expose)(),
|
|
227
|
+
__metadata("design:type", String)
|
|
228
|
+
], OpenapiWidgetInfoRO.prototype, "consentMode", void 0);
|
|
224
229
|
__decorate([
|
|
225
230
|
(0, class_transformer_1.Expose)(),
|
|
226
231
|
__metadata("design:type", String)
|
|
@@ -23,4 +23,11 @@ export declare class MarketingAutomationConfigDto {
|
|
|
23
23
|
* только для типов с `supportsSendImmediately` (сейчас `up_sale`).
|
|
24
24
|
*/
|
|
25
25
|
sendImmediately?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Выдавать промокод только за пройденный post-game опрос: если включено,
|
|
28
|
+
* cross-sale письмо НЕ содержит промокод, пока клиент не завершил
|
|
29
|
+
* post-game опрос по этому бронированию. Осмысленно для типов с
|
|
30
|
+
* `hasPromocode` (cross_sale).
|
|
31
|
+
*/
|
|
32
|
+
promocodeOnlyAfterSurvey?: boolean;
|
|
26
33
|
}
|
|
@@ -39,3 +39,9 @@ __decorate([
|
|
|
39
39
|
(0, class_transformer_1.Expose)(),
|
|
40
40
|
__metadata("design:type", Boolean)
|
|
41
41
|
], MarketingAutomationConfigDto.prototype, "sendImmediately", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, class_validator_1.IsOptional)(),
|
|
44
|
+
(0, class_validator_1.IsBoolean)(),
|
|
45
|
+
(0, class_transformer_1.Expose)(),
|
|
46
|
+
__metadata("design:type", Boolean)
|
|
47
|
+
], MarketingAutomationConfigDto.prototype, "promocodeOnlyAfterSurvey", void 0);
|
|
@@ -321,3 +321,11 @@ __decorate([
|
|
|
321
321
|
(0, class_validator_1.MaxLength)(2000),
|
|
322
322
|
__metadata("design:type", String)
|
|
323
323
|
], CreateQuestroomDto.prototype, "aiNote", void 0);
|
|
324
|
+
__decorate([
|
|
325
|
+
(0, class_validator_1.IsOptional)(),
|
|
326
|
+
(0, class_validator_1.IsString)(),
|
|
327
|
+
(0, class_transformer_1.Transform)(({ value }) => value || null),
|
|
328
|
+
(0, class_transformer_1.Expose)(),
|
|
329
|
+
(0, class_validator_1.MaxLength)(2000),
|
|
330
|
+
__metadata("design:type", String)
|
|
331
|
+
], CreateQuestroomDto.prototype, "reviewLink", void 0);
|
|
@@ -98,3 +98,7 @@ __decorate([
|
|
|
98
98
|
(0, class_transformer_1.Expose)(),
|
|
99
99
|
__metadata("design:type", Boolean)
|
|
100
100
|
], QuestroomRO.prototype, "hideFromChat", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
(0, class_transformer_1.Expose)(),
|
|
103
|
+
__metadata("design:type", String)
|
|
104
|
+
], QuestroomRO.prototype, "reviewLink", void 0);
|
package/dist/slot/slot.ro.d.ts
CHANGED
|
@@ -56,6 +56,8 @@ export type SlotRO = {
|
|
|
56
56
|
upsellingsTotal?: number;
|
|
57
57
|
/** Проблема доставки письма клиенту (красный имейл-бейдж). */
|
|
58
58
|
emailTrouble?: boolean;
|
|
59
|
+
/** No-show: слот сохранён, игра не состоялась. */
|
|
60
|
+
noShow?: boolean;
|
|
59
61
|
/**
|
|
60
62
|
* Есть комментарии по заказу для иконки на слоте: заметка сотрудника
|
|
61
63
|
* (денорм `orders.hasStaffComments`) ИЛИ комментарий игрока
|
package/dist/statistics/pnl.d.ts
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { FinanceitemTypeEnum } from '../financeitem/enum/financeitem-type.enum';
|
|
2
2
|
export type RevenueType = 'pnl' | 'cash';
|
|
3
|
+
/**
|
|
4
|
+
* База даты, по которой строится отчёт «Резервирования»:
|
|
5
|
+
* - `game` — по дате игры (`utcDate`), поведение по умолчанию;
|
|
6
|
+
* - `created` — по дате создания брони (`createdAt`).
|
|
7
|
+
* Отмены при любом значении считаются по дате самой отмены (`canceledAt`),
|
|
8
|
+
* а «состоялось/запланировано» — по дате игры (см. orders-report.service).
|
|
9
|
+
*/
|
|
10
|
+
export type DateBasis = 'game' | 'created';
|
|
3
11
|
export declare enum PeriodType {
|
|
4
12
|
MONTH = "month",
|
|
5
13
|
QUARTER = "quarter",
|
|
@@ -27,6 +35,11 @@ export declare class DashboardQueryDto {
|
|
|
27
35
|
utmCampaign?: string;
|
|
28
36
|
utmContent?: string;
|
|
29
37
|
utmTerm?: string;
|
|
38
|
+
/**
|
|
39
|
+
* База даты для отчёта «Резервирования» (`game` по умолчанию). Не влияет
|
|
40
|
+
* на P&L/Cash flow/Occupancy — там игнорируется.
|
|
41
|
+
*/
|
|
42
|
+
dateBasis?: DateBasis;
|
|
30
43
|
}
|
|
31
44
|
export type PnlRO = {
|
|
32
45
|
totals: {
|
package/dist/statistics/pnl.js
CHANGED
|
@@ -82,3 +82,8 @@ __decorate([
|
|
|
82
82
|
(0, class_validator_1.MaxLength)(256),
|
|
83
83
|
__metadata("design:type", String)
|
|
84
84
|
], DashboardQueryDto.prototype, "utmTerm", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, class_validator_1.IsOptional)(),
|
|
87
|
+
(0, class_validator_1.IsIn)(['game', 'created']),
|
|
88
|
+
__metadata("design:type", String)
|
|
89
|
+
], DashboardQueryDto.prototype, "dateBasis", void 0);
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { DashboardQueryDto } from '../statistics/pnl';
|
|
2
|
+
import { NpsStatusEnum } from '../survey/enums/nps-status.enum';
|
|
3
|
+
import { SurveyQuestionTypeEnum } from '../survey/enums/survey-question-type.enum';
|
|
4
|
+
import { SurveyTypeEnum } from '../survey/enums/survey-type.enum';
|
|
5
|
+
/**
|
|
6
|
+
* Аналитика клиентских опросов. Разбита на три раздела (вкладки): до игры,
|
|
7
|
+
* после игры и оценка персонала (host-rating). Каждый раздел запрашивается
|
|
8
|
+
* отдельно (lazy) через единую ручку с параметром `section`, чтобы не
|
|
9
|
+
* считать лишнее. ROs — plain TS-типы (как остальные отчёты в `statistics/*`).
|
|
10
|
+
*/
|
|
11
|
+
export declare enum SurveysReportSection {
|
|
12
|
+
PRE = "pre",
|
|
13
|
+
POST = "post",
|
|
14
|
+
STAFF = "staff"
|
|
15
|
+
}
|
|
16
|
+
/** Запрос отчёта по опросам: период/скоуп + раздел + (для staff) модератор. */
|
|
17
|
+
export declare class SurveysQueryDto extends DashboardQueryDto {
|
|
18
|
+
section: SurveysReportSection;
|
|
19
|
+
moderatorId?: number;
|
|
20
|
+
}
|
|
21
|
+
/** Дриллдаун по одному вопросу: список свободных ответов «Другое»/текст. */
|
|
22
|
+
export declare class SurveysAnswersQueryDto extends DashboardQueryDto {
|
|
23
|
+
type: SurveyTypeEnum;
|
|
24
|
+
questionId: string;
|
|
25
|
+
/** `other` — сгруппированные тексты варианта «Другое»; `text` — ответы текстового вопроса. */
|
|
26
|
+
mode: 'other' | 'text';
|
|
27
|
+
moderatorId?: number;
|
|
28
|
+
}
|
|
29
|
+
export type SurveysOverview = {
|
|
30
|
+
/** Всего post-game опросов (любого статуса) в периоде. */
|
|
31
|
+
total: number;
|
|
32
|
+
completed: number;
|
|
33
|
+
interrupted: number;
|
|
34
|
+
/** completed / total, 0..1. */
|
|
35
|
+
completionRate: number;
|
|
36
|
+
/** Средняя оценка игры (основной rating-вопрос), null если нет данных. */
|
|
37
|
+
avgRating: number | null;
|
|
38
|
+
/** NPS = %промоутеров − %критиков, −100..100, null если нет NPS-ответов. */
|
|
39
|
+
nps: number | null;
|
|
40
|
+
promoters: number;
|
|
41
|
+
passives: number;
|
|
42
|
+
detractors: number;
|
|
43
|
+
};
|
|
44
|
+
export type SurveysNpsBucket = {
|
|
45
|
+
status: NpsStatusEnum;
|
|
46
|
+
count: number;
|
|
47
|
+
};
|
|
48
|
+
/** Одна строка распределения (вариант ответа → количество). */
|
|
49
|
+
export type SurveysSourceRow = {
|
|
50
|
+
/** Стабильный ключ (optionId / 'yes' / 'no' / '1'..'5'). */
|
|
51
|
+
key: string;
|
|
52
|
+
/** Готовая подпись (резолвится из шаблона; для yes-no/rating — ключ). */
|
|
53
|
+
name: string;
|
|
54
|
+
value: number;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Распределение ответов по одному вопросу. Универсально для системных и
|
|
58
|
+
* кастомных вопросов: chips → по вариантам, yes/no → да/нет, rating → среднее
|
|
59
|
+
* + распределение по баллам. Текстовые вопросы (input/textarea) в отчёт не входят.
|
|
60
|
+
*/
|
|
61
|
+
export type SurveysQuestionBreakdown = {
|
|
62
|
+
questionId: string;
|
|
63
|
+
title: string;
|
|
64
|
+
type: SurveyQuestionTypeEnum;
|
|
65
|
+
/**
|
|
66
|
+
* Id зависимого текстового вопроса для варианта «Другое» (если есть).
|
|
67
|
+
* По клику на «Другое» фронт открывает дриллдаун по этому вопросу. null —
|
|
68
|
+
* у вопроса нет свободного «Другое».
|
|
69
|
+
*/
|
|
70
|
+
otherQuestionId: string | null;
|
|
71
|
+
/** Сколько ответов дано на вопрос (знаменатель для процентов). */
|
|
72
|
+
answered: number;
|
|
73
|
+
/** Среднее (только для rating), иначе null. */
|
|
74
|
+
avg: number | null;
|
|
75
|
+
rows: SurveysSourceRow[];
|
|
76
|
+
};
|
|
77
|
+
export type SurveysNegativeRow = {
|
|
78
|
+
id: number;
|
|
79
|
+
orderId: number;
|
|
80
|
+
clientId: number | null;
|
|
81
|
+
npsScore: number | null;
|
|
82
|
+
ratingScore: number | null;
|
|
83
|
+
completedAt: string | null;
|
|
84
|
+
comment: string | null;
|
|
85
|
+
};
|
|
86
|
+
/** Агрегат host-rating по одному модератору (ведущему игры). */
|
|
87
|
+
export type SurveysModeratorRow = {
|
|
88
|
+
moderatorId: number | null;
|
|
89
|
+
name: string;
|
|
90
|
+
/** Кол-во оценённых им игр (post-game с host-rating) в периоде. */
|
|
91
|
+
rated: number;
|
|
92
|
+
avgHostRating: number | null;
|
|
93
|
+
};
|
|
94
|
+
/** Бронирование с низкой оценкой ведущего (для дриллдауна по персоналу). */
|
|
95
|
+
export type SurveysStaffLowRow = {
|
|
96
|
+
id: number;
|
|
97
|
+
orderId: number;
|
|
98
|
+
moderatorName: string | null;
|
|
99
|
+
hostRatingScore: number | null;
|
|
100
|
+
completedAt: string | null;
|
|
101
|
+
comment: string | null;
|
|
102
|
+
};
|
|
103
|
+
/** Раздел «До игры». */
|
|
104
|
+
export type SurveysPreReport = {
|
|
105
|
+
section: SurveysReportSection.PRE;
|
|
106
|
+
total: number;
|
|
107
|
+
completed: number;
|
|
108
|
+
completionRate: number;
|
|
109
|
+
breakdowns: SurveysQuestionBreakdown[];
|
|
110
|
+
};
|
|
111
|
+
/** Раздел «После игры» (без host-rating — он в разделе персонала). */
|
|
112
|
+
export type SurveysPostReport = {
|
|
113
|
+
section: SurveysReportSection.POST;
|
|
114
|
+
overview: SurveysOverview;
|
|
115
|
+
npsBreakdown: SurveysNpsBucket[];
|
|
116
|
+
breakdowns: SurveysQuestionBreakdown[];
|
|
117
|
+
negativeFeedback: SurveysNegativeRow[];
|
|
118
|
+
};
|
|
119
|
+
/** Раздел «Оценка персонала» (host-rating + разрез по модераторам). */
|
|
120
|
+
export type SurveysStaffReport = {
|
|
121
|
+
section: SurveysReportSection.STAFF;
|
|
122
|
+
avgHostRating: number | null;
|
|
123
|
+
rated: number;
|
|
124
|
+
/** Распределение host-rating по баллам 1..5. */
|
|
125
|
+
ratingDistribution: SurveysSourceRow[];
|
|
126
|
+
/** Разрез по модераторам (он же источник опций фильтра). */
|
|
127
|
+
byModerator: SurveysModeratorRow[];
|
|
128
|
+
/** Распределения по host-вопросам (что не так с ведущим и т.п.). */
|
|
129
|
+
breakdowns: SurveysQuestionBreakdown[];
|
|
130
|
+
/** Бронирования с низкой оценкой ведущего (1..3). */
|
|
131
|
+
lowRated: SurveysStaffLowRow[];
|
|
132
|
+
};
|
|
133
|
+
export type SurveysReportRO = SurveysPreReport | SurveysPostReport | SurveysStaffReport;
|
|
134
|
+
/** Один свободный текстовый ответ (для дриллдауна «кто что ответил»). */
|
|
135
|
+
export type SurveysAnswerRow = {
|
|
136
|
+
id: number;
|
|
137
|
+
orderId: number;
|
|
138
|
+
clientId: number | null;
|
|
139
|
+
clientName: string | null;
|
|
140
|
+
completedAt: string | null;
|
|
141
|
+
text: string;
|
|
142
|
+
};
|
|
143
|
+
export type SurveysAnswersRO = {
|
|
144
|
+
/** mode='other': сгруппированные (lowercase) свободные тексты. */
|
|
145
|
+
grouped: SurveysSourceRow[];
|
|
146
|
+
/** mode='text': индивидуальные ответы (ограничено лимитом). */
|
|
147
|
+
answers: SurveysAnswerRow[];
|
|
148
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
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.SurveysAnswersQueryDto = exports.SurveysQueryDto = exports.SurveysReportSection = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const pnl_1 = require("../statistics/pnl");
|
|
15
|
+
const survey_type_enum_1 = require("../survey/enums/survey-type.enum");
|
|
16
|
+
/**
|
|
17
|
+
* Аналитика клиентских опросов. Разбита на три раздела (вкладки): до игры,
|
|
18
|
+
* после игры и оценка персонала (host-rating). Каждый раздел запрашивается
|
|
19
|
+
* отдельно (lazy) через единую ручку с параметром `section`, чтобы не
|
|
20
|
+
* считать лишнее. ROs — plain TS-типы (как остальные отчёты в `statistics/*`).
|
|
21
|
+
*/
|
|
22
|
+
var SurveysReportSection;
|
|
23
|
+
(function (SurveysReportSection) {
|
|
24
|
+
SurveysReportSection["PRE"] = "pre";
|
|
25
|
+
SurveysReportSection["POST"] = "post";
|
|
26
|
+
SurveysReportSection["STAFF"] = "staff";
|
|
27
|
+
})(SurveysReportSection || (exports.SurveysReportSection = SurveysReportSection = {}));
|
|
28
|
+
/** Запрос отчёта по опросам: период/скоуп + раздел + (для staff) модератор. */
|
|
29
|
+
class SurveysQueryDto extends pnl_1.DashboardQueryDto {
|
|
30
|
+
}
|
|
31
|
+
exports.SurveysQueryDto = SurveysQueryDto;
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, class_validator_1.IsEnum)(SurveysReportSection),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], SurveysQueryDto.prototype, "section", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, class_validator_1.IsOptional)(),
|
|
38
|
+
__metadata("design:type", Number)
|
|
39
|
+
], SurveysQueryDto.prototype, "moderatorId", void 0);
|
|
40
|
+
/** Дриллдаун по одному вопросу: список свободных ответов «Другое»/текст. */
|
|
41
|
+
class SurveysAnswersQueryDto extends pnl_1.DashboardQueryDto {
|
|
42
|
+
}
|
|
43
|
+
exports.SurveysAnswersQueryDto = SurveysAnswersQueryDto;
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, class_validator_1.IsEnum)(survey_type_enum_1.SurveyTypeEnum),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], SurveysAnswersQueryDto.prototype, "type", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, class_validator_1.IsString)(),
|
|
50
|
+
(0, class_validator_1.MaxLength)(128),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], SurveysAnswersQueryDto.prototype, "questionId", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, class_validator_1.IsIn)(['other', 'text']),
|
|
55
|
+
__metadata("design:type", String)
|
|
56
|
+
], SurveysAnswersQueryDto.prototype, "mode", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, class_validator_1.IsOptional)(),
|
|
59
|
+
__metadata("design:type", Number)
|
|
60
|
+
], SurveysAnswersQueryDto.prototype, "moderatorId", void 0);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MarketingAudienceExclusionReasonEnum = exports.MarketingAudienceStatusEnum = void 0;
|
|
4
|
+
var MarketingAudienceStatusEnum;
|
|
5
|
+
(function (MarketingAudienceStatusEnum) {
|
|
6
|
+
MarketingAudienceStatusEnum["ALLOWED"] = "allowed";
|
|
7
|
+
MarketingAudienceStatusEnum["EXCLUDED"] = "excluded";
|
|
8
|
+
})(MarketingAudienceStatusEnum || (exports.MarketingAudienceStatusEnum = MarketingAudienceStatusEnum = {}));
|
|
9
|
+
var MarketingAudienceExclusionReasonEnum;
|
|
10
|
+
(function (MarketingAudienceExclusionReasonEnum) {
|
|
11
|
+
MarketingAudienceExclusionReasonEnum["NEGATIVE_NPS"] = "negative_nps";
|
|
12
|
+
MarketingAudienceExclusionReasonEnum["MANUAL"] = "manual";
|
|
13
|
+
})(MarketingAudienceExclusionReasonEnum || (exports.MarketingAudienceExclusionReasonEnum = MarketingAudienceExclusionReasonEnum = {}));
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare enum NpsStatusEnum {
|
|
2
|
+
PROMOTER = "promoter",
|
|
3
|
+
PASSIVE = "passive",
|
|
4
|
+
DETRACTOR = "detractor"
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* NPS-классификация по 0–10 шкале:
|
|
8
|
+
* - 9–10 → промоутер;
|
|
9
|
+
* - 7–8 → нейтральный;
|
|
10
|
+
* - 0–6 → критик.
|
|
11
|
+
*/
|
|
12
|
+
export declare const npsStatusFromScore: (score: number) => NpsStatusEnum;
|