@escapenavigator/types 1.10.161 → 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.
Files changed (70) hide show
  1. package/dist/client/client.ro.d.ts +6 -0
  2. package/dist/client/client.ro.js +18 -0
  3. package/dist/client/query-client.dto.d.ts +1 -1
  4. package/dist/emails/index.d.ts +2 -0
  5. package/dist/openapi/widget/openapi-widget-info.ro.d.ts +2 -0
  6. package/dist/openapi/widget/openapi-widget-info.ro.js +5 -0
  7. package/dist/profile/marketing-automation/marketing-automation-config.dto.d.ts +7 -0
  8. package/dist/profile/marketing-automation/marketing-automation-config.dto.js +6 -0
  9. package/dist/questroom/create-questroom.dto.d.ts +1 -0
  10. package/dist/questroom/create-questroom.dto.js +8 -0
  11. package/dist/questroom/questroom.ro.d.ts +1 -0
  12. package/dist/questroom/questroom.ro.js +4 -0
  13. package/dist/statistics/pnl.d.ts +13 -0
  14. package/dist/statistics/pnl.js +5 -0
  15. package/dist/statistics/surveys.d.ts +148 -0
  16. package/dist/statistics/surveys.js +60 -0
  17. package/dist/survey/enums/marketing-audience-status.enum.d.ts +8 -0
  18. package/dist/survey/enums/marketing-audience-status.enum.js +13 -0
  19. package/dist/survey/enums/nps-status.enum.d.ts +12 -0
  20. package/dist/survey/enums/nps-status.enum.js +23 -0
  21. package/dist/survey/enums/survey-channel.enum.d.ts +5 -0
  22. package/dist/survey/enums/survey-channel.enum.js +9 -0
  23. package/dist/survey/enums/survey-completed-by.enum.d.ts +4 -0
  24. package/dist/survey/enums/survey-completed-by.enum.js +8 -0
  25. package/dist/survey/enums/survey-final-scenario.enum.d.ts +5 -0
  26. package/dist/survey/enums/survey-final-scenario.enum.js +9 -0
  27. package/dist/survey/enums/survey-question-type.enum.d.ts +9 -0
  28. package/dist/survey/enums/survey-question-type.enum.js +13 -0
  29. package/dist/survey/enums/survey-score-role.enum.d.ts +11 -0
  30. package/dist/survey/enums/survey-score-role.enum.js +15 -0
  31. package/dist/survey/enums/survey-status.enum.d.ts +5 -0
  32. package/dist/survey/enums/survey-status.enum.js +9 -0
  33. package/dist/survey/enums/survey-type.enum.d.ts +4 -0
  34. package/dist/survey/enums/survey-type.enum.js +8 -0
  35. package/dist/survey/mint-survey-link.dto.d.ts +6 -0
  36. package/dist/survey/mint-survey-link.dto.js +29 -0
  37. package/dist/survey/operator-submit-survey.dto.d.ts +11 -0
  38. package/dist/survey/operator-submit-survey.dto.js +40 -0
  39. package/dist/survey/order-survey-to-fill.ro.d.ts +65 -0
  40. package/dist/survey/order-survey-to-fill.ro.js +173 -0
  41. package/dist/survey/submit-survey.dto.d.ts +15 -0
  42. package/dist/survey/submit-survey.dto.js +40 -0
  43. package/dist/survey/survey-answer.type.d.ts +33 -0
  44. package/dist/survey/survey-answer.type.js +2 -0
  45. package/dist/survey/survey-final-screen.type.d.ts +45 -0
  46. package/dist/survey/survey-final-screen.type.js +2 -0
  47. package/dist/survey/survey-link.ro.d.ts +4 -0
  48. package/dist/survey/survey-link.ro.js +24 -0
  49. package/dist/survey/survey-order-summary.ro.d.ts +20 -0
  50. package/dist/survey/survey-order-summary.ro.js +50 -0
  51. package/dist/survey/survey-question.type.d.ts +91 -0
  52. package/dist/survey/survey-question.type.js +2 -0
  53. package/dist/survey/survey-response.ro.d.ts +32 -0
  54. package/dist/survey/survey-response.ro.js +110 -0
  55. package/dist/survey/survey-template-defaults.ro.d.ts +17 -0
  56. package/dist/survey/survey-template-defaults.ro.js +46 -0
  57. package/dist/survey/survey-template.ro.d.ts +17 -0
  58. package/dist/survey/survey-template.ro.js +57 -0
  59. package/dist/survey/update-survey-template.dto.d.ts +26 -0
  60. package/dist/survey/update-survey-template.dto.js +64 -0
  61. package/dist/translation/delete-orphaned-translations.dto.d.ts +4 -0
  62. package/dist/translation/delete-orphaned-translations.dto.js +23 -0
  63. package/dist/tsconfig.build.tsbuildinfo +1 -1
  64. package/dist/widget/create-widget.dto.d.ts +2 -0
  65. package/dist/widget/create-widget.dto.js +8 -0
  66. package/dist/widget/enum/widget-consent-mode.enum.d.ts +15 -0
  67. package/dist/widget/enum/widget-consent-mode.enum.js +19 -0
  68. package/dist/widget/widget.ro.d.ts +2 -0
  69. package/dist/widget-chat/widget-chat-init.ro.d.ts +1 -1
  70. package/package.json +2 -2
@@ -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;
@@ -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';
@@ -28,6 +28,8 @@ type Reply = {
28
28
  type Image = {
29
29
  type: 'image';
30
30
  image: string;
31
+ /** Ограничение ширины превью в px (email-safe inline style). */
32
+ maxWidth?: number;
31
33
  };
32
34
  type List = {
33
35
  type: 'list';
@@ -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);
@@ -56,5 +56,6 @@ export declare class CreateQuestroomDto {
56
56
  slotStepMinutes?: number;
57
57
  questOpeningDate?: string;
58
58
  aiNote?: string;
59
+ reviewLink?: string;
59
60
  }
60
61
  export {};
@@ -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);
@@ -28,4 +28,5 @@ export declare class QuestroomRO extends QuestroomLightRO {
28
28
  photoFrame: string;
29
29
  aiNote?: string;
30
30
  hideFromChat?: boolean;
31
+ reviewLink?: string | null;
31
32
  }
@@ -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);
@@ -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: {
@@ -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,8 @@
1
+ export declare enum MarketingAudienceStatusEnum {
2
+ ALLOWED = "allowed",
3
+ EXCLUDED = "excluded"
4
+ }
5
+ export declare enum MarketingAudienceExclusionReasonEnum {
6
+ NEGATIVE_NPS = "negative_nps",
7
+ MANUAL = "manual"
8
+ }
@@ -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;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.npsStatusFromScore = exports.NpsStatusEnum = void 0;
4
+ var NpsStatusEnum;
5
+ (function (NpsStatusEnum) {
6
+ NpsStatusEnum["PROMOTER"] = "promoter";
7
+ NpsStatusEnum["PASSIVE"] = "passive";
8
+ NpsStatusEnum["DETRACTOR"] = "detractor";
9
+ })(NpsStatusEnum || (exports.NpsStatusEnum = NpsStatusEnum = {}));
10
+ /**
11
+ * NPS-классификация по 0–10 шкале:
12
+ * - 9–10 → промоутер;
13
+ * - 7–8 → нейтральный;
14
+ * - 0–6 → критик.
15
+ */
16
+ const npsStatusFromScore = (score) => {
17
+ if (score >= 9)
18
+ return NpsStatusEnum.PROMOTER;
19
+ if (score >= 7)
20
+ return NpsStatusEnum.PASSIVE;
21
+ return NpsStatusEnum.DETRACTOR;
22
+ };
23
+ exports.npsStatusFromScore = npsStatusFromScore;
@@ -0,0 +1,5 @@
1
+ export declare enum SurveyChannelEnum {
2
+ APP_MODAL = "app_modal",
3
+ QR = "qr",
4
+ PUBLIC_LINK = "public_link"
5
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SurveyChannelEnum = void 0;
4
+ var SurveyChannelEnum;
5
+ (function (SurveyChannelEnum) {
6
+ SurveyChannelEnum["APP_MODAL"] = "app_modal";
7
+ SurveyChannelEnum["QR"] = "qr";
8
+ SurveyChannelEnum["PUBLIC_LINK"] = "public_link";
9
+ })(SurveyChannelEnum || (exports.SurveyChannelEnum = SurveyChannelEnum = {}));
@@ -0,0 +1,4 @@
1
+ export declare enum SurveyCompletedByEnum {
2
+ OPERATOR = "operator",
3
+ CUSTOMER = "customer"
4
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SurveyCompletedByEnum = void 0;
4
+ var SurveyCompletedByEnum;
5
+ (function (SurveyCompletedByEnum) {
6
+ SurveyCompletedByEnum["OPERATOR"] = "operator";
7
+ SurveyCompletedByEnum["CUSTOMER"] = "customer";
8
+ })(SurveyCompletedByEnum || (exports.SurveyCompletedByEnum = SurveyCompletedByEnum = {}));
@@ -0,0 +1,5 @@
1
+ export declare enum SurveyFinalScenarioEnum {
2
+ POSITIVE = "positive",
3
+ NEUTRAL = "neutral",
4
+ NEGATIVE = "negative"
5
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SurveyFinalScenarioEnum = void 0;
4
+ var SurveyFinalScenarioEnum;
5
+ (function (SurveyFinalScenarioEnum) {
6
+ SurveyFinalScenarioEnum["POSITIVE"] = "positive";
7
+ SurveyFinalScenarioEnum["NEUTRAL"] = "neutral";
8
+ SurveyFinalScenarioEnum["NEGATIVE"] = "negative";
9
+ })(SurveyFinalScenarioEnum || (exports.SurveyFinalScenarioEnum = SurveyFinalScenarioEnum = {}));
@@ -0,0 +1,9 @@
1
+ export declare enum SurveyQuestionTypeEnum {
2
+ CHIPS_SINGLE = "chips_single",
3
+ CHIPS_MULTI = "chips_multi",
4
+ INPUT = "input",
5
+ TEXTAREA = "textarea",
6
+ RATING = "rating",
7
+ NPS = "nps",
8
+ YES_NO = "yes_no"
9
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SurveyQuestionTypeEnum = void 0;
4
+ var SurveyQuestionTypeEnum;
5
+ (function (SurveyQuestionTypeEnum) {
6
+ SurveyQuestionTypeEnum["CHIPS_SINGLE"] = "chips_single";
7
+ SurveyQuestionTypeEnum["CHIPS_MULTI"] = "chips_multi";
8
+ SurveyQuestionTypeEnum["INPUT"] = "input";
9
+ SurveyQuestionTypeEnum["TEXTAREA"] = "textarea";
10
+ SurveyQuestionTypeEnum["RATING"] = "rating";
11
+ SurveyQuestionTypeEnum["NPS"] = "nps";
12
+ SurveyQuestionTypeEnum["YES_NO"] = "yes_no";
13
+ })(SurveyQuestionTypeEnum || (exports.SurveyQuestionTypeEnum = SurveyQuestionTypeEnum = {}));
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Роль числового вопроса (RATING/NPS) для скоринга и аналитики. Позволяет
3
+ * отличить основную «оценку игры» от «оценки ведущего», когда в опросе
4
+ * несколько RATING-вопросов.
5
+ */
6
+ export declare enum SurveyScoreRoleEnum {
7
+ /** Основная оценка игры — идёт в avgRating и в выбор финального экрана. */
8
+ GAME = "game",
9
+ /** Оценка работы ведущего/оператора — отдельная метрика. */
10
+ HOST = "host"
11
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SurveyScoreRoleEnum = void 0;
4
+ /**
5
+ * Роль числового вопроса (RATING/NPS) для скоринга и аналитики. Позволяет
6
+ * отличить основную «оценку игры» от «оценки ведущего», когда в опросе
7
+ * несколько RATING-вопросов.
8
+ */
9
+ var SurveyScoreRoleEnum;
10
+ (function (SurveyScoreRoleEnum) {
11
+ /** Основная оценка игры — идёт в avgRating и в выбор финального экрана. */
12
+ SurveyScoreRoleEnum["GAME"] = "game";
13
+ /** Оценка работы ведущего/оператора — отдельная метрика. */
14
+ SurveyScoreRoleEnum["HOST"] = "host";
15
+ })(SurveyScoreRoleEnum || (exports.SurveyScoreRoleEnum = SurveyScoreRoleEnum = {}));
@@ -0,0 +1,5 @@
1
+ export declare enum SurveyStatusEnum {
2
+ NOT_COMPLETED = "not_completed",
3
+ COMPLETED = "completed",
4
+ INTERRUPTED = "interrupted"
5
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SurveyStatusEnum = void 0;
4
+ var SurveyStatusEnum;
5
+ (function (SurveyStatusEnum) {
6
+ SurveyStatusEnum["NOT_COMPLETED"] = "not_completed";
7
+ SurveyStatusEnum["COMPLETED"] = "completed";
8
+ SurveyStatusEnum["INTERRUPTED"] = "interrupted";
9
+ })(SurveyStatusEnum || (exports.SurveyStatusEnum = SurveyStatusEnum = {}));
@@ -0,0 +1,4 @@
1
+ export declare enum SurveyTypeEnum {
2
+ PRE_GAME = "pre_game",
3
+ POST_GAME = "post_game"
4
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SurveyTypeEnum = void 0;
4
+ var SurveyTypeEnum;
5
+ (function (SurveyTypeEnum) {
6
+ SurveyTypeEnum["PRE_GAME"] = "pre_game";
7
+ SurveyTypeEnum["POST_GAME"] = "post_game";
8
+ })(SurveyTypeEnum || (exports.SurveyTypeEnum = SurveyTypeEnum = {}));
@@ -0,0 +1,6 @@
1
+ import { SurveyChannelEnum } from './enums/survey-channel.enum';
2
+ import { SurveyTypeEnum } from './enums/survey-type.enum';
3
+ export declare class MintSurveyLinkDTO {
4
+ type: SurveyTypeEnum;
5
+ channel: SurveyChannelEnum;
6
+ }