@escapenavigator/types 1.10.161 → 1.10.163

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 (99) 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/location/create-location.dto.d.ts +1 -0
  6. package/dist/location/create-location.dto.js +6 -0
  7. package/dist/location/location-light.ro.d.ts +1 -0
  8. package/dist/location/location-light.ro.js +4 -0
  9. package/dist/location/update-location-for-admin.dto.d.ts +1 -0
  10. package/dist/location/update-location-for-admin.dto.js +7 -0
  11. package/dist/openapi/widget/openapi-widget-info.ro.d.ts +4 -0
  12. package/dist/openapi/widget/openapi-widget-info.ro.js +13 -0
  13. package/dist/profile/company-ai-context.d.ts +2 -0
  14. package/dist/profile/marketing-automation/marketing-automation-config.dto.d.ts +7 -0
  15. package/dist/profile/marketing-automation/marketing-automation-config.dto.js +6 -0
  16. package/dist/profile/profile.ro.d.ts +2 -0
  17. package/dist/profile/profile.ro.js +4 -0
  18. package/dist/questroom/create-questroom.dto.d.ts +10 -0
  19. package/dist/questroom/create-questroom.dto.js +64 -0
  20. package/dist/questroom/questroom-ai-context.d.ts +16 -0
  21. package/dist/questroom/questroom-light.ro.d.ts +2 -0
  22. package/dist/questroom/questroom-light.ro.js +4 -0
  23. package/dist/questroom/questroom.ro.d.ts +8 -0
  24. package/dist/questroom/questroom.ro.js +32 -0
  25. package/dist/questroom/update-questroom-game-conduction.dto.d.ts +3 -0
  26. package/dist/questroom/update-questroom-game-conduction.dto.js +22 -0
  27. package/dist/statistics/pnl.d.ts +13 -0
  28. package/dist/statistics/pnl.js +5 -0
  29. package/dist/statistics/surveys.d.ts +148 -0
  30. package/dist/statistics/surveys.js +60 -0
  31. package/dist/survey/enums/marketing-audience-status.enum.d.ts +8 -0
  32. package/dist/survey/enums/marketing-audience-status.enum.js +13 -0
  33. package/dist/survey/enums/nps-status.enum.d.ts +12 -0
  34. package/dist/survey/enums/nps-status.enum.js +23 -0
  35. package/dist/survey/enums/survey-channel.enum.d.ts +5 -0
  36. package/dist/survey/enums/survey-channel.enum.js +9 -0
  37. package/dist/survey/enums/survey-completed-by.enum.d.ts +4 -0
  38. package/dist/survey/enums/survey-completed-by.enum.js +8 -0
  39. package/dist/survey/enums/survey-final-scenario.enum.d.ts +5 -0
  40. package/dist/survey/enums/survey-final-scenario.enum.js +9 -0
  41. package/dist/survey/enums/survey-question-type.enum.d.ts +9 -0
  42. package/dist/survey/enums/survey-question-type.enum.js +13 -0
  43. package/dist/survey/enums/survey-score-role.enum.d.ts +11 -0
  44. package/dist/survey/enums/survey-score-role.enum.js +15 -0
  45. package/dist/survey/enums/survey-status.enum.d.ts +5 -0
  46. package/dist/survey/enums/survey-status.enum.js +9 -0
  47. package/dist/survey/enums/survey-type.enum.d.ts +4 -0
  48. package/dist/survey/enums/survey-type.enum.js +8 -0
  49. package/dist/survey/mint-survey-link.dto.d.ts +6 -0
  50. package/dist/survey/mint-survey-link.dto.js +29 -0
  51. package/dist/survey/operator-submit-survey.dto.d.ts +11 -0
  52. package/dist/survey/operator-submit-survey.dto.js +40 -0
  53. package/dist/survey/order-survey-to-fill.ro.d.ts +65 -0
  54. package/dist/survey/order-survey-to-fill.ro.js +173 -0
  55. package/dist/survey/submit-survey.dto.d.ts +15 -0
  56. package/dist/survey/submit-survey.dto.js +40 -0
  57. package/dist/survey/survey-answer.type.d.ts +33 -0
  58. package/dist/survey/survey-answer.type.js +2 -0
  59. package/dist/survey/survey-final-screen.type.d.ts +45 -0
  60. package/dist/survey/survey-final-screen.type.js +2 -0
  61. package/dist/survey/survey-link.ro.d.ts +4 -0
  62. package/dist/survey/survey-link.ro.js +24 -0
  63. package/dist/survey/survey-order-summary.ro.d.ts +20 -0
  64. package/dist/survey/survey-order-summary.ro.js +50 -0
  65. package/dist/survey/survey-question.type.d.ts +91 -0
  66. package/dist/survey/survey-question.type.js +2 -0
  67. package/dist/survey/survey-response.ro.d.ts +32 -0
  68. package/dist/survey/survey-response.ro.js +110 -0
  69. package/dist/survey/survey-template-defaults.ro.d.ts +17 -0
  70. package/dist/survey/survey-template-defaults.ro.js +46 -0
  71. package/dist/survey/survey-template.ro.d.ts +17 -0
  72. package/dist/survey/survey-template.ro.js +57 -0
  73. package/dist/survey/update-survey-template.dto.d.ts +26 -0
  74. package/dist/survey/update-survey-template.dto.js +64 -0
  75. package/dist/translation/delete-orphaned-translations.dto.d.ts +4 -0
  76. package/dist/translation/delete-orphaned-translations.dto.js +23 -0
  77. package/dist/tsconfig.build.tsbuildinfo +1 -1
  78. package/dist/widget/create-widget.dto.d.ts +2 -0
  79. package/dist/widget/create-widget.dto.js +8 -0
  80. package/dist/widget/enum/widget-consent-mode.enum.d.ts +15 -0
  81. package/dist/widget/enum/widget-consent-mode.enum.js +19 -0
  82. package/dist/widget/widget.ro.d.ts +2 -0
  83. package/dist/widget-chat/widget-chat-ai-usage.ro.d.ts +7 -0
  84. package/dist/widget-chat/widget-chat-ai-usage.ro.js +2 -0
  85. package/dist/widget-chat/widget-chat-faq-template.ro.d.ts +9 -0
  86. package/dist/widget-chat/widget-chat-faq-template.ro.js +2 -0
  87. package/dist/widget-chat/widget-chat-init.ro.d.ts +4 -3
  88. package/dist/widget-chat/widget-chat-knowledge-save.dto.d.ts +11 -7
  89. package/dist/widget-chat/widget-chat-knowledge-save.dto.js +34 -27
  90. package/dist/widget-chat/widget-chat-message.ro.d.ts +21 -3
  91. package/dist/widget-chat/widget-chat-profile-settings-update.dto.d.ts +3 -0
  92. package/dist/widget-chat/widget-chat-profile-settings-update.dto.js +20 -0
  93. package/dist/widget-chat/widget-chat-profile-settings.ro.d.ts +3 -0
  94. package/dist/widget-chat/widget-chat-profile-settings.ro.js +2 -0
  95. package/dist/widget-chat/widget-chat-starter-chip-save.dto.d.ts +16 -0
  96. package/dist/widget-chat/widget-chat-starter-chip-save.dto.js +78 -0
  97. package/dist/widget-chat/widget-chat-starter-chip.ro.d.ts +43 -0
  98. package/dist/widget-chat/widget-chat-starter-chip.ro.js +23 -0
  99. package/package.json +2 -2
@@ -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
+ }
@@ -0,0 +1,29 @@
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.MintSurveyLinkDTO = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const class_validator_1 = require("class-validator");
15
+ const survey_channel_enum_1 = require("./enums/survey-channel.enum");
16
+ const survey_type_enum_1 = require("./enums/survey-type.enum");
17
+ class MintSurveyLinkDTO {
18
+ }
19
+ exports.MintSurveyLinkDTO = MintSurveyLinkDTO;
20
+ __decorate([
21
+ (0, class_validator_1.IsEnum)(survey_type_enum_1.SurveyTypeEnum),
22
+ (0, class_transformer_1.Expose)(),
23
+ __metadata("design:type", String)
24
+ ], MintSurveyLinkDTO.prototype, "type", void 0);
25
+ __decorate([
26
+ (0, class_validator_1.IsEnum)(survey_channel_enum_1.SurveyChannelEnum),
27
+ (0, class_transformer_1.Expose)(),
28
+ __metadata("design:type", String)
29
+ ], MintSurveyLinkDTO.prototype, "channel", void 0);
@@ -0,0 +1,11 @@
1
+ import { SurveyTypeEnum } from './enums/survey-type.enum';
2
+ import { SurveyAnswers } from './survey-answer.type';
3
+ /**
4
+ * Заполнение опроса оператором вручную в app (channel = app_modal,
5
+ * completedBy = operator). Доступ — через AppGuard, не через токен.
6
+ */
7
+ export declare class OperatorSubmitSurveyDTO {
8
+ type: SurveyTypeEnum;
9
+ answers: SurveyAnswers;
10
+ complete?: boolean;
11
+ }
@@ -0,0 +1,40 @@
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.OperatorSubmitSurveyDTO = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const class_validator_1 = require("class-validator");
15
+ const survey_type_enum_1 = require("./enums/survey-type.enum");
16
+ /**
17
+ * Заполнение опроса оператором вручную в app (channel = app_modal,
18
+ * completedBy = operator). Доступ — через AppGuard, не через токен.
19
+ */
20
+ class OperatorSubmitSurveyDTO {
21
+ }
22
+ exports.OperatorSubmitSurveyDTO = OperatorSubmitSurveyDTO;
23
+ __decorate([
24
+ (0, class_validator_1.IsEnum)(survey_type_enum_1.SurveyTypeEnum),
25
+ (0, class_transformer_1.Expose)(),
26
+ __metadata("design:type", String)
27
+ ], OperatorSubmitSurveyDTO.prototype, "type", void 0);
28
+ __decorate([
29
+ (0, class_validator_1.IsObject)(),
30
+ (0, class_transformer_1.Transform)(({ value }) => value !== null && value !== void 0 ? value : {}),
31
+ (0, class_transformer_1.Expose)(),
32
+ __metadata("design:type", Object)
33
+ ], OperatorSubmitSurveyDTO.prototype, "answers", void 0);
34
+ __decorate([
35
+ (0, class_validator_1.IsOptional)(),
36
+ (0, class_validator_1.IsBoolean)(),
37
+ (0, class_transformer_1.Transform)(({ value }) => value !== null && value !== void 0 ? value : false),
38
+ (0, class_transformer_1.Expose)(),
39
+ __metadata("design:type", Boolean)
40
+ ], OperatorSubmitSurveyDTO.prototype, "complete", void 0);
@@ -0,0 +1,65 @@
1
+ import { Languages } from '../shared/enum/languages.enum';
2
+ import { SurveyFinalScenarioEnum } from './enums/survey-final-scenario.enum';
3
+ import { SurveyQuestionTypeEnum } from './enums/survey-question-type.enum';
4
+ import { SurveyStatusEnum } from './enums/survey-status.enum';
5
+ import { SurveyTypeEnum } from './enums/survey-type.enum';
6
+ import { SurveyQuestionConditional } from './survey-question.type';
7
+ /** Вариант ответа, спроецированный на язык бронирования. */
8
+ export declare class ResolvedSurveyOption {
9
+ id: string;
10
+ label: string;
11
+ isOther?: boolean;
12
+ }
13
+ /** Вопрос, спроецированный на язык бронирования (тексты — строки). */
14
+ export declare class ResolvedSurveyQuestion {
15
+ id: string;
16
+ type: SurveyQuestionTypeEnum;
17
+ required: boolean;
18
+ order: number;
19
+ title: string;
20
+ description?: string;
21
+ options?: ResolvedSurveyOption[];
22
+ conditional?: SurveyQuestionConditional | null;
23
+ }
24
+ /**
25
+ * Опрос для прохождения в order-service. Язык уже выбран сервером по
26
+ * `order.language` (с фолбэком на язык профиля → EN), тексты приходят
27
+ * готовыми строками.
28
+ */
29
+ export declare class OrderSurveyToFillRO {
30
+ type: SurveyTypeEnum;
31
+ language: Languages;
32
+ title: string;
33
+ /** Подзаголовок под заголовком/логотипом (описание опроса). */
34
+ subtitle?: string;
35
+ profileTitle?: string;
36
+ profileLogo?: string;
37
+ profileSlug?: string;
38
+ questions: ResolvedSurveyQuestion[];
39
+ status: SurveyStatusEnum;
40
+ /** Уже завершён и повторное прохождение запрещено — показать заглушку. */
41
+ alreadyCompleted: boolean;
42
+ /** Сохранённые ранее ответы (для продолжения сессии). */
43
+ answers?: Record<string, unknown>;
44
+ /**
45
+ * Тест-режим (предпросмотр из настроек шаблона): ничего не сохраняется и
46
+ * не отправляется, промокоды — фейковые. UID показывает баннер и
47
+ * переключатель финальных экранов.
48
+ */
49
+ preview?: boolean;
50
+ }
51
+ /** Финальный экран, спроецированный на язык и вычисленный по оценке. */
52
+ export declare class ResolvedSurveyFinalScreen {
53
+ scenario: SurveyFinalScenarioEnum;
54
+ title: string;
55
+ text: string;
56
+ buttonText?: string;
57
+ reviewUrl?: string;
58
+ /** Код выданного промокода (тексты уже отрендерены с плейсхолдерами). */
59
+ promocode?: string | null;
60
+ }
61
+ export declare class SubmitSurveyResultRO {
62
+ success: boolean;
63
+ status: SurveyStatusEnum;
64
+ finalScreen: ResolvedSurveyFinalScreen | null;
65
+ }