@escapenavigator/types 1.10.160 → 1.10.162

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/dist/certificate-v2/certificate-settings.ro.d.ts +1 -0
  2. package/dist/certificate-v2/certificate-settings.ro.js +4 -0
  3. package/dist/certificate-v2/update-certificate-settings.dto.d.ts +1 -0
  4. package/dist/certificate-v2/update-certificate-settings.dto.js +8 -0
  5. package/dist/client/client.ro.d.ts +6 -0
  6. package/dist/client/client.ro.js +18 -0
  7. package/dist/client/query-client.dto.d.ts +1 -1
  8. package/dist/emails/index.d.ts +2 -0
  9. package/dist/log/log-title.enum.d.ts +1 -0
  10. package/dist/log/log-title.enum.js +1 -0
  11. package/dist/openapi/certificates/openapi-cancel-certificate.dto.d.ts +8 -0
  12. package/dist/openapi/certificates/openapi-cancel-certificate.dto.js +27 -0
  13. package/dist/openapi/certificates/openapi-certificate-sale.ro.d.ts +13 -0
  14. package/dist/openapi/certificates/openapi-certificate-sale.ro.js +8 -0
  15. package/dist/openapi/ru-aggregators/mk-order-dto.d.ts +6 -3
  16. package/dist/openapi/ru-aggregators/mk-order-dto.js +2 -0
  17. package/dist/openapi/widget/openapi-widget-info.ro.d.ts +2 -0
  18. package/dist/openapi/widget/openapi-widget-info.ro.js +5 -0
  19. package/dist/profile/marketing-automation/marketing-automation-config.dto.d.ts +7 -0
  20. package/dist/profile/marketing-automation/marketing-automation-config.dto.js +6 -0
  21. package/dist/questroom/create-questroom.dto.d.ts +1 -0
  22. package/dist/questroom/create-questroom.dto.js +8 -0
  23. package/dist/questroom/questroom.ro.d.ts +1 -0
  24. package/dist/questroom/questroom.ro.js +4 -0
  25. package/dist/slot/slot.ro.d.ts +2 -0
  26. package/dist/statistics/pnl.d.ts +13 -0
  27. package/dist/statistics/pnl.js +5 -0
  28. package/dist/statistics/surveys.d.ts +148 -0
  29. package/dist/statistics/surveys.js +60 -0
  30. package/dist/survey/enums/marketing-audience-status.enum.d.ts +8 -0
  31. package/dist/survey/enums/marketing-audience-status.enum.js +13 -0
  32. package/dist/survey/enums/nps-status.enum.d.ts +12 -0
  33. package/dist/survey/enums/nps-status.enum.js +23 -0
  34. package/dist/survey/enums/survey-channel.enum.d.ts +5 -0
  35. package/dist/survey/enums/survey-channel.enum.js +9 -0
  36. package/dist/survey/enums/survey-completed-by.enum.d.ts +4 -0
  37. package/dist/survey/enums/survey-completed-by.enum.js +8 -0
  38. package/dist/survey/enums/survey-final-scenario.enum.d.ts +5 -0
  39. package/dist/survey/enums/survey-final-scenario.enum.js +9 -0
  40. package/dist/survey/enums/survey-question-type.enum.d.ts +9 -0
  41. package/dist/survey/enums/survey-question-type.enum.js +13 -0
  42. package/dist/survey/enums/survey-score-role.enum.d.ts +11 -0
  43. package/dist/survey/enums/survey-score-role.enum.js +15 -0
  44. package/dist/survey/enums/survey-status.enum.d.ts +5 -0
  45. package/dist/survey/enums/survey-status.enum.js +9 -0
  46. package/dist/survey/enums/survey-type.enum.d.ts +4 -0
  47. package/dist/survey/enums/survey-type.enum.js +8 -0
  48. package/dist/survey/mint-survey-link.dto.d.ts +6 -0
  49. package/dist/survey/mint-survey-link.dto.js +29 -0
  50. package/dist/survey/operator-submit-survey.dto.d.ts +11 -0
  51. package/dist/survey/operator-submit-survey.dto.js +40 -0
  52. package/dist/survey/order-survey-to-fill.ro.d.ts +65 -0
  53. package/dist/survey/order-survey-to-fill.ro.js +173 -0
  54. package/dist/survey/submit-survey.dto.d.ts +15 -0
  55. package/dist/survey/submit-survey.dto.js +40 -0
  56. package/dist/survey/survey-answer.type.d.ts +33 -0
  57. package/dist/survey/survey-answer.type.js +2 -0
  58. package/dist/survey/survey-final-screen.type.d.ts +45 -0
  59. package/dist/survey/survey-final-screen.type.js +2 -0
  60. package/dist/survey/survey-link.ro.d.ts +4 -0
  61. package/dist/survey/survey-link.ro.js +24 -0
  62. package/dist/survey/survey-order-summary.ro.d.ts +20 -0
  63. package/dist/survey/survey-order-summary.ro.js +50 -0
  64. package/dist/survey/survey-question.type.d.ts +91 -0
  65. package/dist/survey/survey-question.type.js +2 -0
  66. package/dist/survey/survey-response.ro.d.ts +32 -0
  67. package/dist/survey/survey-response.ro.js +110 -0
  68. package/dist/survey/survey-template-defaults.ro.d.ts +17 -0
  69. package/dist/survey/survey-template-defaults.ro.js +46 -0
  70. package/dist/survey/survey-template.ro.d.ts +17 -0
  71. package/dist/survey/survey-template.ro.js +57 -0
  72. package/dist/survey/update-survey-template.dto.d.ts +26 -0
  73. package/dist/survey/update-survey-template.dto.js +64 -0
  74. package/dist/translation/delete-orphaned-translations.dto.d.ts +4 -0
  75. package/dist/translation/delete-orphaned-translations.dto.js +23 -0
  76. package/dist/tsconfig.build.tsbuildinfo +1 -1
  77. package/dist/widget/create-widget.dto.d.ts +2 -0
  78. package/dist/widget/create-widget.dto.js +8 -0
  79. package/dist/widget/enum/widget-consent-mode.enum.d.ts +15 -0
  80. package/dist/widget/enum/widget-consent-mode.enum.js +19 -0
  81. package/dist/widget/widget.ro.d.ts +2 -0
  82. package/dist/widget-chat/widget-chat-init.ro.d.ts +1 -1
  83. package/package.json +2 -2
@@ -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
+ }
@@ -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
+ }