@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,173 @@
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.SubmitSurveyResultRO = exports.ResolvedSurveyFinalScreen = exports.OrderSurveyToFillRO = exports.ResolvedSurveyQuestion = exports.ResolvedSurveyOption = void 0;
13
+ /* eslint-disable max-classes-per-file */
14
+ const class_transformer_1 = require("class-transformer");
15
+ const languages_enum_1 = require("../shared/enum/languages.enum");
16
+ const survey_final_scenario_enum_1 = require("./enums/survey-final-scenario.enum");
17
+ const survey_question_type_enum_1 = require("./enums/survey-question-type.enum");
18
+ const survey_status_enum_1 = require("./enums/survey-status.enum");
19
+ const survey_type_enum_1 = require("./enums/survey-type.enum");
20
+ /** Вариант ответа, спроецированный на язык бронирования. */
21
+ class ResolvedSurveyOption {
22
+ }
23
+ exports.ResolvedSurveyOption = ResolvedSurveyOption;
24
+ __decorate([
25
+ (0, class_transformer_1.Expose)(),
26
+ __metadata("design:type", String)
27
+ ], ResolvedSurveyOption.prototype, "id", void 0);
28
+ __decorate([
29
+ (0, class_transformer_1.Expose)(),
30
+ __metadata("design:type", String)
31
+ ], ResolvedSurveyOption.prototype, "label", void 0);
32
+ __decorate([
33
+ (0, class_transformer_1.Expose)(),
34
+ __metadata("design:type", Boolean)
35
+ ], ResolvedSurveyOption.prototype, "isOther", void 0);
36
+ /** Вопрос, спроецированный на язык бронирования (тексты — строки). */
37
+ class ResolvedSurveyQuestion {
38
+ }
39
+ exports.ResolvedSurveyQuestion = ResolvedSurveyQuestion;
40
+ __decorate([
41
+ (0, class_transformer_1.Expose)(),
42
+ __metadata("design:type", String)
43
+ ], ResolvedSurveyQuestion.prototype, "id", void 0);
44
+ __decorate([
45
+ (0, class_transformer_1.Expose)(),
46
+ __metadata("design:type", String)
47
+ ], ResolvedSurveyQuestion.prototype, "type", void 0);
48
+ __decorate([
49
+ (0, class_transformer_1.Expose)(),
50
+ __metadata("design:type", Boolean)
51
+ ], ResolvedSurveyQuestion.prototype, "required", void 0);
52
+ __decorate([
53
+ (0, class_transformer_1.Expose)(),
54
+ __metadata("design:type", Number)
55
+ ], ResolvedSurveyQuestion.prototype, "order", void 0);
56
+ __decorate([
57
+ (0, class_transformer_1.Expose)(),
58
+ __metadata("design:type", String)
59
+ ], ResolvedSurveyQuestion.prototype, "title", void 0);
60
+ __decorate([
61
+ (0, class_transformer_1.Expose)(),
62
+ __metadata("design:type", String)
63
+ ], ResolvedSurveyQuestion.prototype, "description", void 0);
64
+ __decorate([
65
+ (0, class_transformer_1.Expose)(),
66
+ (0, class_transformer_1.Type)(() => ResolvedSurveyOption),
67
+ __metadata("design:type", Array)
68
+ ], ResolvedSurveyQuestion.prototype, "options", void 0);
69
+ __decorate([
70
+ (0, class_transformer_1.Expose)(),
71
+ __metadata("design:type", Object)
72
+ ], ResolvedSurveyQuestion.prototype, "conditional", void 0);
73
+ /**
74
+ * Опрос для прохождения в order-service. Язык уже выбран сервером по
75
+ * `order.language` (с фолбэком на язык профиля → EN), тексты приходят
76
+ * готовыми строками.
77
+ */
78
+ class OrderSurveyToFillRO {
79
+ }
80
+ exports.OrderSurveyToFillRO = OrderSurveyToFillRO;
81
+ __decorate([
82
+ (0, class_transformer_1.Expose)(),
83
+ __metadata("design:type", String)
84
+ ], OrderSurveyToFillRO.prototype, "type", void 0);
85
+ __decorate([
86
+ (0, class_transformer_1.Expose)(),
87
+ __metadata("design:type", String)
88
+ ], OrderSurveyToFillRO.prototype, "language", void 0);
89
+ __decorate([
90
+ (0, class_transformer_1.Expose)(),
91
+ __metadata("design:type", String)
92
+ ], OrderSurveyToFillRO.prototype, "title", void 0);
93
+ __decorate([
94
+ (0, class_transformer_1.Expose)(),
95
+ __metadata("design:type", String)
96
+ ], OrderSurveyToFillRO.prototype, "subtitle", void 0);
97
+ __decorate([
98
+ (0, class_transformer_1.Expose)(),
99
+ __metadata("design:type", String)
100
+ ], OrderSurveyToFillRO.prototype, "profileTitle", void 0);
101
+ __decorate([
102
+ (0, class_transformer_1.Expose)(),
103
+ __metadata("design:type", String)
104
+ ], OrderSurveyToFillRO.prototype, "profileLogo", void 0);
105
+ __decorate([
106
+ (0, class_transformer_1.Expose)(),
107
+ __metadata("design:type", String)
108
+ ], OrderSurveyToFillRO.prototype, "profileSlug", void 0);
109
+ __decorate([
110
+ (0, class_transformer_1.Expose)(),
111
+ (0, class_transformer_1.Type)(() => ResolvedSurveyQuestion),
112
+ __metadata("design:type", Array)
113
+ ], OrderSurveyToFillRO.prototype, "questions", void 0);
114
+ __decorate([
115
+ (0, class_transformer_1.Expose)(),
116
+ __metadata("design:type", String)
117
+ ], OrderSurveyToFillRO.prototype, "status", void 0);
118
+ __decorate([
119
+ (0, class_transformer_1.Expose)(),
120
+ __metadata("design:type", Boolean)
121
+ ], OrderSurveyToFillRO.prototype, "alreadyCompleted", void 0);
122
+ __decorate([
123
+ (0, class_transformer_1.Expose)(),
124
+ __metadata("design:type", Object)
125
+ ], OrderSurveyToFillRO.prototype, "answers", void 0);
126
+ __decorate([
127
+ (0, class_transformer_1.Expose)(),
128
+ __metadata("design:type", Boolean)
129
+ ], OrderSurveyToFillRO.prototype, "preview", void 0);
130
+ /** Финальный экран, спроецированный на язык и вычисленный по оценке. */
131
+ class ResolvedSurveyFinalScreen {
132
+ }
133
+ exports.ResolvedSurveyFinalScreen = ResolvedSurveyFinalScreen;
134
+ __decorate([
135
+ (0, class_transformer_1.Expose)(),
136
+ __metadata("design:type", String)
137
+ ], ResolvedSurveyFinalScreen.prototype, "scenario", void 0);
138
+ __decorate([
139
+ (0, class_transformer_1.Expose)(),
140
+ __metadata("design:type", String)
141
+ ], ResolvedSurveyFinalScreen.prototype, "title", void 0);
142
+ __decorate([
143
+ (0, class_transformer_1.Expose)(),
144
+ __metadata("design:type", String)
145
+ ], ResolvedSurveyFinalScreen.prototype, "text", void 0);
146
+ __decorate([
147
+ (0, class_transformer_1.Expose)(),
148
+ __metadata("design:type", String)
149
+ ], ResolvedSurveyFinalScreen.prototype, "buttonText", void 0);
150
+ __decorate([
151
+ (0, class_transformer_1.Expose)(),
152
+ __metadata("design:type", String)
153
+ ], ResolvedSurveyFinalScreen.prototype, "reviewUrl", void 0);
154
+ __decorate([
155
+ (0, class_transformer_1.Expose)(),
156
+ __metadata("design:type", String)
157
+ ], ResolvedSurveyFinalScreen.prototype, "promocode", void 0);
158
+ class SubmitSurveyResultRO {
159
+ }
160
+ exports.SubmitSurveyResultRO = SubmitSurveyResultRO;
161
+ __decorate([
162
+ (0, class_transformer_1.Expose)(),
163
+ __metadata("design:type", Boolean)
164
+ ], SubmitSurveyResultRO.prototype, "success", void 0);
165
+ __decorate([
166
+ (0, class_transformer_1.Expose)(),
167
+ __metadata("design:type", String)
168
+ ], SubmitSurveyResultRO.prototype, "status", void 0);
169
+ __decorate([
170
+ (0, class_transformer_1.Expose)(),
171
+ (0, class_transformer_1.Type)(() => ResolvedSurveyFinalScreen),
172
+ __metadata("design:type", ResolvedSurveyFinalScreen)
173
+ ], SubmitSurveyResultRO.prototype, "finalScreen", void 0);
@@ -0,0 +1,15 @@
1
+ import { SurveyAnswers } from './survey-answer.type';
2
+ /**
3
+ * Публичная отправка ответов опроса (order-service). Доступ скоупится
4
+ * токеном: внутри зашит конкретный response/order, чужие данные недоступны.
5
+ */
6
+ export declare class SubmitSurveyDTO {
7
+ token: string;
8
+ answers: SurveyAnswers;
9
+ /**
10
+ * `true` — финальная отправка (статус `completed`). `false`/отсутствие —
11
+ * промежуточное сохранение прогресса в рамках сессии (остаётся
12
+ * `not_completed`).
13
+ */
14
+ complete?: boolean;
15
+ }
@@ -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.SubmitSurveyDTO = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const class_validator_1 = require("class-validator");
15
+ const is_not_blank_1 = require("../shared/is-not-blank");
16
+ /**
17
+ * Публичная отправка ответов опроса (order-service). Доступ скоупится
18
+ * токеном: внутри зашит конкретный response/order, чужие данные недоступны.
19
+ */
20
+ class SubmitSurveyDTO {
21
+ }
22
+ exports.SubmitSurveyDTO = SubmitSurveyDTO;
23
+ __decorate([
24
+ (0, is_not_blank_1.IsNotBlank)(),
25
+ (0, class_transformer_1.Expose)(),
26
+ __metadata("design:type", String)
27
+ ], SubmitSurveyDTO.prototype, "token", 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
+ ], SubmitSurveyDTO.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
+ ], SubmitSurveyDTO.prototype, "complete", void 0);
@@ -0,0 +1,33 @@
1
+ import { SurveyQuestionTypeEnum } from './enums/survey-question-type.enum';
2
+ /**
3
+ * Значение ответа на один вопрос. Хранится по стабильному id вопроса
4
+ * (язык-независимо). Варианты ответа тоже хранятся как `optionId`, а не
5
+ * как текст — это и обеспечивает корректную недублирующую агрегацию в
6
+ * статистике, независимо от языка прохождения.
7
+ */
8
+ export type SurveyAnswerValue = {
9
+ type: SurveyQuestionTypeEnum.CHIPS_SINGLE;
10
+ optionId: string;
11
+ customText?: string;
12
+ } | {
13
+ type: SurveyQuestionTypeEnum.CHIPS_MULTI;
14
+ optionIds: string[];
15
+ customText?: string;
16
+ } | {
17
+ type: SurveyQuestionTypeEnum.INPUT;
18
+ text: string;
19
+ } | {
20
+ type: SurveyQuestionTypeEnum.TEXTAREA;
21
+ text: string;
22
+ } | {
23
+ type: SurveyQuestionTypeEnum.RATING;
24
+ value: number;
25
+ } | {
26
+ type: SurveyQuestionTypeEnum.NPS;
27
+ value: number;
28
+ } | {
29
+ type: SurveyQuestionTypeEnum.YES_NO;
30
+ value: boolean;
31
+ };
32
+ /** Карта ответов: questionId → значение. */
33
+ export type SurveyAnswers = Record<string, SurveyAnswerValue>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,45 @@
1
+ import { Languages } from '../shared/enum/languages.enum';
2
+ export interface SurveyFinalScreenI18n {
3
+ title: string;
4
+ text: string;
5
+ buttonText?: string;
6
+ }
7
+ /**
8
+ * Настраиваемый финальный экран post-game опроса для одного сценария
9
+ * (позитив/нейтрал/негатив). Тексты локализованы.
10
+ *
11
+ * Тексты (`title`/`text`/`buttonText`) поддерживают динамические
12
+ * плейсхолдеры промокода (см. `showPromocode`):
13
+ * - `{promocodeNumber}` — код промокода;
14
+ * - `{promocodeDiscount}` — отформатированная скидка (сумма или %);
15
+ * - `{promocodeValidityDays}` — срок действия в днях.
16
+ */
17
+ export interface SurveyFinalScreen {
18
+ enabled: boolean;
19
+ i18n: Partial<Record<Languages, SurveyFinalScreenI18n>>;
20
+ /**
21
+ * Показывать ли промокод за прохождение опроса. Промокод берётся из
22
+ * настроек cross-sale автоматизации и выдаётся один раз на бронирование
23
+ * (тем, кто сработал первым — опрос или cross-sale письмо). Значения
24
+ * подставляются в тексты через плейсхолдеры `{promocode*}`.
25
+ */
26
+ showPromocode?: boolean;
27
+ }
28
+ /**
29
+ * Пороги классификации финального экрана. Дефолты соответствуют
30
+ * NPS 9–10 / 7–8 / 0–6 и rating 4–5 / 3 / 1–2 (rating используется
31
+ * как фолбэк, если в опросе нет NPS-вопроса). Настраиваются дефолтами
32
+ * (best-practice), отдельного UI-редактора нет.
33
+ */
34
+ export interface SurveyFinalScreenThresholds {
35
+ npsPositiveMin: number;
36
+ npsNeutralMin: number;
37
+ ratingPositiveMin: number;
38
+ ratingNeutralMin: number;
39
+ }
40
+ export interface SurveyFinalScreensConfig {
41
+ positive: SurveyFinalScreen;
42
+ neutral: SurveyFinalScreen;
43
+ negative: SurveyFinalScreen;
44
+ thresholds: SurveyFinalScreenThresholds;
45
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ export declare class SurveyLinkRO {
2
+ token: string;
3
+ url: string;
4
+ }
@@ -0,0 +1,24 @@
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.SurveyLinkRO = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ class SurveyLinkRO {
15
+ }
16
+ exports.SurveyLinkRO = SurveyLinkRO;
17
+ __decorate([
18
+ (0, class_transformer_1.Expose)(),
19
+ __metadata("design:type", String)
20
+ ], SurveyLinkRO.prototype, "token", void 0);
21
+ __decorate([
22
+ (0, class_transformer_1.Expose)(),
23
+ __metadata("design:type", String)
24
+ ], SurveyLinkRO.prototype, "url", void 0);
@@ -0,0 +1,20 @@
1
+ import { SurveyStatusEnum } from './enums/survey-status.enum';
2
+ /**
3
+ * Лёгкий агрегат по опросам бронирования для карточки игры. Детали по
4
+ * каждому участнику (ответы, имена) сюда НЕ тянем — они грузятся отдельным
5
+ * запросом при открытии панели опроса.
6
+ */
7
+ export declare class SurveyOrderSummaryRO {
8
+ preGameEnabled: boolean;
9
+ /** Статус pre-game (один ответ на бронь — заполняет заказчик/оператор). */
10
+ preGameStatus: SurveyStatusEnum;
11
+ postGameEnabled: boolean;
12
+ /** Сколько участников начали post-game (создана запись ответа). */
13
+ postGameStarted: number;
14
+ /** Сколько участников завершили post-game. */
15
+ postGameCompleted: number;
16
+ /** Средний NPS по завершённым (для мини-метрики в карточке). */
17
+ postGameAvgNps: number | null;
18
+ /** Средняя оценка игры по завершённым. */
19
+ postGameAvgRating: number | null;
20
+ }
@@ -0,0 +1,50 @@
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.SurveyOrderSummaryRO = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const survey_status_enum_1 = require("./enums/survey-status.enum");
15
+ /**
16
+ * Лёгкий агрегат по опросам бронирования для карточки игры. Детали по
17
+ * каждому участнику (ответы, имена) сюда НЕ тянем — они грузятся отдельным
18
+ * запросом при открытии панели опроса.
19
+ */
20
+ class SurveyOrderSummaryRO {
21
+ }
22
+ exports.SurveyOrderSummaryRO = SurveyOrderSummaryRO;
23
+ __decorate([
24
+ (0, class_transformer_1.Expose)(),
25
+ __metadata("design:type", Boolean)
26
+ ], SurveyOrderSummaryRO.prototype, "preGameEnabled", void 0);
27
+ __decorate([
28
+ (0, class_transformer_1.Expose)(),
29
+ __metadata("design:type", String)
30
+ ], SurveyOrderSummaryRO.prototype, "preGameStatus", void 0);
31
+ __decorate([
32
+ (0, class_transformer_1.Expose)(),
33
+ __metadata("design:type", Boolean)
34
+ ], SurveyOrderSummaryRO.prototype, "postGameEnabled", void 0);
35
+ __decorate([
36
+ (0, class_transformer_1.Expose)(),
37
+ __metadata("design:type", Number)
38
+ ], SurveyOrderSummaryRO.prototype, "postGameStarted", void 0);
39
+ __decorate([
40
+ (0, class_transformer_1.Expose)(),
41
+ __metadata("design:type", Number)
42
+ ], SurveyOrderSummaryRO.prototype, "postGameCompleted", void 0);
43
+ __decorate([
44
+ (0, class_transformer_1.Expose)(),
45
+ __metadata("design:type", Number)
46
+ ], SurveyOrderSummaryRO.prototype, "postGameAvgNps", void 0);
47
+ __decorate([
48
+ (0, class_transformer_1.Expose)(),
49
+ __metadata("design:type", Number)
50
+ ], SurveyOrderSummaryRO.prototype, "postGameAvgRating", void 0);
@@ -0,0 +1,91 @@
1
+ import { Languages } from '../shared/enum/languages.enum';
2
+ import { SurveyQuestionTypeEnum } from './enums/survey-question-type.enum';
3
+ import { SurveyScoreRoleEnum } from './enums/survey-score-role.enum';
4
+ /**
5
+ * Локализованная строка. Тексты опросов хранятся отдельно от структуры:
6
+ * скелет (id вопросов/опций, типы, порядок, условия) единый на все языки,
7
+ * а переводы лежат тут, по ключу языка. Благодаря этому статистика
8
+ * агрегируется по стабильным `id`, а не по тексту — один и тот же вариант
9
+ * ответа на разных языках считается одним.
10
+ */
11
+ export type LocalizedString = Partial<Record<Languages, string>>;
12
+ export interface SurveyQuestionOption {
13
+ /** Стабильный язык-независимый идентификатор варианта (для агрегации). */
14
+ id: string;
15
+ order: number;
16
+ /** Локализованные подписи варианта. */
17
+ i18n: LocalizedString;
18
+ /**
19
+ * Помечает вариант как «другое/свой ответ»: при выборе можно показать
20
+ * условный input-вопрос (через `conditional` другого вопроса).
21
+ */
22
+ isOther?: boolean;
23
+ /**
24
+ * Системный вариант best-practice шаблона. Его нельзя удалить и нельзя
25
+ * переопределить id — только переименовать (i18n) или выключить (active).
26
+ * Кастомные варианты пользователя — `system: false`.
27
+ */
28
+ system?: boolean;
29
+ /**
30
+ * Активен ли вариант. Неактивный вариант не показывается в форме, но
31
+ * остаётся в шаблоне, чтобы статистика по старым ответам резолвила
32
+ * подпись. `undefined` трактуется как активный (обратная совместимость).
33
+ */
34
+ active?: boolean;
35
+ }
36
+ /**
37
+ * Условие показа вопроса. Зависит от ответа на вопрос `questionId`.
38
+ * Поддерживаются два режима (можно комбинировать — должны выполниться все
39
+ * заданные критерии):
40
+ * - option-based: показывать, если в chips-вопросе выбран `optionId`
41
+ * (сценарий «Другое → уточните»);
42
+ * - score-based: показывать, если балл RATING/NPS-вопроса попадает в
43
+ * диапазон `[minScore, maxScore]` (сценарий «низкая оценка → уточняющий
44
+ * вопрос»).
45
+ */
46
+ export interface SurveyQuestionConditional {
47
+ questionId: string;
48
+ /** Показать, если в chips-вопросе выбран этот вариант. */
49
+ optionId?: string;
50
+ /** Показать, если балл RATING/NPS ≥ minScore. */
51
+ minScore?: number;
52
+ /** Показать, если балл RATING/NPS ≤ maxScore. */
53
+ maxScore?: number;
54
+ }
55
+ export interface SurveyQuestionI18n {
56
+ title: string;
57
+ description?: string;
58
+ }
59
+ export interface SurveyQuestion {
60
+ /** Стабильный язык-независимый идентификатор вопроса (для агрегации). */
61
+ id: string;
62
+ type: SurveyQuestionTypeEnum;
63
+ required: boolean;
64
+ /** Выключенный вопрос не показывается и не участвует в логике. */
65
+ enabled: boolean;
66
+ order: number;
67
+ /** Для chips_single / chips_multi. */
68
+ options?: SurveyQuestionOption[];
69
+ /**
70
+ * Системный (core) вопрос best-practice шаблона. На таких вопросах
71
+ * держится аналитика/NPS/финальные экраны, поэтому их нельзя удалять,
72
+ * менять тип, обязательность, роль, порядок и логику. Кастомные вопросы
73
+ * пользователя — `system: false`/отсутствует.
74
+ */
75
+ system?: boolean;
76
+ /**
77
+ * Разрешено ли редактировать варианты chips у системного вопроса
78
+ * (добавлять/переименовывать/выключать). Для зафиксированных шкал
79
+ * (например, «сложность») — `false`.
80
+ */
81
+ optionsEditable?: boolean;
82
+ /**
83
+ * Роль числового вопроса (RATING/NPS) для скоринга/аналитики. Для
84
+ * RATING помечает основную «оценку игры» или «оценку ведущего».
85
+ */
86
+ scoreRole?: SurveyScoreRoleEnum;
87
+ /** Условная логика показа. `null`/отсутствие — показывать всегда. */
88
+ conditional?: SurveyQuestionConditional | null;
89
+ /** Локализованные тексты вопроса по языкам. */
90
+ i18n: Partial<Record<Languages, SurveyQuestionI18n>>;
91
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,32 @@
1
+ import { Languages } from '../shared/enum/languages.enum';
2
+ import { NpsStatusEnum } from './enums/nps-status.enum';
3
+ import { SurveyChannelEnum } from './enums/survey-channel.enum';
4
+ import { SurveyCompletedByEnum } from './enums/survey-completed-by.enum';
5
+ import { SurveyStatusEnum } from './enums/survey-status.enum';
6
+ import { SurveyTypeEnum } from './enums/survey-type.enum';
7
+ import { SurveyAnswers } from './survey-answer.type';
8
+ export declare class SurveyResponseRO {
9
+ id: number;
10
+ surveyTemplateId: number;
11
+ type: SurveyTypeEnum;
12
+ orderId: number;
13
+ clientId: number;
14
+ /** Имя участника, за которым закреплён ответ (для списка в панели). */
15
+ clientName?: string;
16
+ questroomId: number;
17
+ locationId: number;
18
+ status: SurveyStatusEnum;
19
+ channel: SurveyChannelEnum | null;
20
+ language: Languages | null;
21
+ startedAt: Date | null;
22
+ completedAt: Date | null;
23
+ interruptedAt: Date | null;
24
+ completedBy: SurveyCompletedByEnum | null;
25
+ answers: SurveyAnswers;
26
+ npsScore: number | null;
27
+ npsStatus: NpsStatusEnum | null;
28
+ ratingScore: number | null;
29
+ hostRatingScore: number | null;
30
+ createdAt: Date;
31
+ updatedAt: Date;
32
+ }
@@ -0,0 +1,110 @@
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.SurveyResponseRO = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const languages_enum_1 = require("../shared/enum/languages.enum");
15
+ const nps_status_enum_1 = require("./enums/nps-status.enum");
16
+ const survey_channel_enum_1 = require("./enums/survey-channel.enum");
17
+ const survey_completed_by_enum_1 = require("./enums/survey-completed-by.enum");
18
+ const survey_status_enum_1 = require("./enums/survey-status.enum");
19
+ const survey_type_enum_1 = require("./enums/survey-type.enum");
20
+ class SurveyResponseRO {
21
+ }
22
+ exports.SurveyResponseRO = SurveyResponseRO;
23
+ __decorate([
24
+ (0, class_transformer_1.Expose)(),
25
+ __metadata("design:type", Number)
26
+ ], SurveyResponseRO.prototype, "id", void 0);
27
+ __decorate([
28
+ (0, class_transformer_1.Expose)(),
29
+ __metadata("design:type", Number)
30
+ ], SurveyResponseRO.prototype, "surveyTemplateId", void 0);
31
+ __decorate([
32
+ (0, class_transformer_1.Expose)(),
33
+ __metadata("design:type", String)
34
+ ], SurveyResponseRO.prototype, "type", void 0);
35
+ __decorate([
36
+ (0, class_transformer_1.Expose)(),
37
+ __metadata("design:type", Number)
38
+ ], SurveyResponseRO.prototype, "orderId", void 0);
39
+ __decorate([
40
+ (0, class_transformer_1.Expose)(),
41
+ __metadata("design:type", Number)
42
+ ], SurveyResponseRO.prototype, "clientId", void 0);
43
+ __decorate([
44
+ (0, class_transformer_1.Expose)(),
45
+ __metadata("design:type", String)
46
+ ], SurveyResponseRO.prototype, "clientName", void 0);
47
+ __decorate([
48
+ (0, class_transformer_1.Expose)(),
49
+ __metadata("design:type", Number)
50
+ ], SurveyResponseRO.prototype, "questroomId", void 0);
51
+ __decorate([
52
+ (0, class_transformer_1.Expose)(),
53
+ __metadata("design:type", Number)
54
+ ], SurveyResponseRO.prototype, "locationId", void 0);
55
+ __decorate([
56
+ (0, class_transformer_1.Expose)(),
57
+ __metadata("design:type", String)
58
+ ], SurveyResponseRO.prototype, "status", void 0);
59
+ __decorate([
60
+ (0, class_transformer_1.Expose)(),
61
+ __metadata("design:type", String)
62
+ ], SurveyResponseRO.prototype, "channel", void 0);
63
+ __decorate([
64
+ (0, class_transformer_1.Expose)(),
65
+ __metadata("design:type", String)
66
+ ], SurveyResponseRO.prototype, "language", void 0);
67
+ __decorate([
68
+ (0, class_transformer_1.Expose)(),
69
+ __metadata("design:type", Date)
70
+ ], SurveyResponseRO.prototype, "startedAt", void 0);
71
+ __decorate([
72
+ (0, class_transformer_1.Expose)(),
73
+ __metadata("design:type", Date)
74
+ ], SurveyResponseRO.prototype, "completedAt", void 0);
75
+ __decorate([
76
+ (0, class_transformer_1.Expose)(),
77
+ __metadata("design:type", Date)
78
+ ], SurveyResponseRO.prototype, "interruptedAt", void 0);
79
+ __decorate([
80
+ (0, class_transformer_1.Expose)(),
81
+ __metadata("design:type", String)
82
+ ], SurveyResponseRO.prototype, "completedBy", void 0);
83
+ __decorate([
84
+ (0, class_transformer_1.Expose)(),
85
+ __metadata("design:type", Object)
86
+ ], SurveyResponseRO.prototype, "answers", void 0);
87
+ __decorate([
88
+ (0, class_transformer_1.Expose)(),
89
+ __metadata("design:type", Number)
90
+ ], SurveyResponseRO.prototype, "npsScore", void 0);
91
+ __decorate([
92
+ (0, class_transformer_1.Expose)(),
93
+ __metadata("design:type", String)
94
+ ], SurveyResponseRO.prototype, "npsStatus", void 0);
95
+ __decorate([
96
+ (0, class_transformer_1.Expose)(),
97
+ __metadata("design:type", Number)
98
+ ], SurveyResponseRO.prototype, "ratingScore", void 0);
99
+ __decorate([
100
+ (0, class_transformer_1.Expose)(),
101
+ __metadata("design:type", Number)
102
+ ], SurveyResponseRO.prototype, "hostRatingScore", void 0);
103
+ __decorate([
104
+ (0, class_transformer_1.Expose)(),
105
+ __metadata("design:type", Date)
106
+ ], SurveyResponseRO.prototype, "createdAt", void 0);
107
+ __decorate([
108
+ (0, class_transformer_1.Expose)(),
109
+ __metadata("design:type", Date)
110
+ ], SurveyResponseRO.prototype, "updatedAt", void 0);