@escapenavigator/types 1.10.161 → 1.10.162

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/dist/client/client.ro.d.ts +6 -0
  2. package/dist/client/client.ro.js +18 -0
  3. package/dist/client/query-client.dto.d.ts +1 -1
  4. package/dist/emails/index.d.ts +2 -0
  5. package/dist/openapi/widget/openapi-widget-info.ro.d.ts +2 -0
  6. package/dist/openapi/widget/openapi-widget-info.ro.js +5 -0
  7. package/dist/profile/marketing-automation/marketing-automation-config.dto.d.ts +7 -0
  8. package/dist/profile/marketing-automation/marketing-automation-config.dto.js +6 -0
  9. package/dist/questroom/create-questroom.dto.d.ts +1 -0
  10. package/dist/questroom/create-questroom.dto.js +8 -0
  11. package/dist/questroom/questroom.ro.d.ts +1 -0
  12. package/dist/questroom/questroom.ro.js +4 -0
  13. package/dist/statistics/pnl.d.ts +13 -0
  14. package/dist/statistics/pnl.js +5 -0
  15. package/dist/statistics/surveys.d.ts +148 -0
  16. package/dist/statistics/surveys.js +60 -0
  17. package/dist/survey/enums/marketing-audience-status.enum.d.ts +8 -0
  18. package/dist/survey/enums/marketing-audience-status.enum.js +13 -0
  19. package/dist/survey/enums/nps-status.enum.d.ts +12 -0
  20. package/dist/survey/enums/nps-status.enum.js +23 -0
  21. package/dist/survey/enums/survey-channel.enum.d.ts +5 -0
  22. package/dist/survey/enums/survey-channel.enum.js +9 -0
  23. package/dist/survey/enums/survey-completed-by.enum.d.ts +4 -0
  24. package/dist/survey/enums/survey-completed-by.enum.js +8 -0
  25. package/dist/survey/enums/survey-final-scenario.enum.d.ts +5 -0
  26. package/dist/survey/enums/survey-final-scenario.enum.js +9 -0
  27. package/dist/survey/enums/survey-question-type.enum.d.ts +9 -0
  28. package/dist/survey/enums/survey-question-type.enum.js +13 -0
  29. package/dist/survey/enums/survey-score-role.enum.d.ts +11 -0
  30. package/dist/survey/enums/survey-score-role.enum.js +15 -0
  31. package/dist/survey/enums/survey-status.enum.d.ts +5 -0
  32. package/dist/survey/enums/survey-status.enum.js +9 -0
  33. package/dist/survey/enums/survey-type.enum.d.ts +4 -0
  34. package/dist/survey/enums/survey-type.enum.js +8 -0
  35. package/dist/survey/mint-survey-link.dto.d.ts +6 -0
  36. package/dist/survey/mint-survey-link.dto.js +29 -0
  37. package/dist/survey/operator-submit-survey.dto.d.ts +11 -0
  38. package/dist/survey/operator-submit-survey.dto.js +40 -0
  39. package/dist/survey/order-survey-to-fill.ro.d.ts +65 -0
  40. package/dist/survey/order-survey-to-fill.ro.js +173 -0
  41. package/dist/survey/submit-survey.dto.d.ts +15 -0
  42. package/dist/survey/submit-survey.dto.js +40 -0
  43. package/dist/survey/survey-answer.type.d.ts +33 -0
  44. package/dist/survey/survey-answer.type.js +2 -0
  45. package/dist/survey/survey-final-screen.type.d.ts +45 -0
  46. package/dist/survey/survey-final-screen.type.js +2 -0
  47. package/dist/survey/survey-link.ro.d.ts +4 -0
  48. package/dist/survey/survey-link.ro.js +24 -0
  49. package/dist/survey/survey-order-summary.ro.d.ts +20 -0
  50. package/dist/survey/survey-order-summary.ro.js +50 -0
  51. package/dist/survey/survey-question.type.d.ts +91 -0
  52. package/dist/survey/survey-question.type.js +2 -0
  53. package/dist/survey/survey-response.ro.d.ts +32 -0
  54. package/dist/survey/survey-response.ro.js +110 -0
  55. package/dist/survey/survey-template-defaults.ro.d.ts +17 -0
  56. package/dist/survey/survey-template-defaults.ro.js +46 -0
  57. package/dist/survey/survey-template.ro.d.ts +17 -0
  58. package/dist/survey/survey-template.ro.js +57 -0
  59. package/dist/survey/update-survey-template.dto.d.ts +26 -0
  60. package/dist/survey/update-survey-template.dto.js +64 -0
  61. package/dist/translation/delete-orphaned-translations.dto.d.ts +4 -0
  62. package/dist/translation/delete-orphaned-translations.dto.js +23 -0
  63. package/dist/tsconfig.build.tsbuildinfo +1 -1
  64. package/dist/widget/create-widget.dto.d.ts +2 -0
  65. package/dist/widget/create-widget.dto.js +8 -0
  66. package/dist/widget/enum/widget-consent-mode.enum.d.ts +15 -0
  67. package/dist/widget/enum/widget-consent-mode.enum.js +19 -0
  68. package/dist/widget/widget.ro.d.ts +2 -0
  69. package/dist/widget-chat/widget-chat-init.ro.d.ts +1 -1
  70. package/package.json +2 -2
@@ -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);
@@ -0,0 +1,17 @@
1
+ import { Languages } from '../shared/enum/languages.enum';
2
+ import { SurveyTypeEnum } from './enums/survey-type.enum';
3
+ import { SurveyFinalScreensConfig } from './survey-final-screen.type';
4
+ import { SurveyQuestion } from './survey-question.type';
5
+ /**
6
+ * Рекомендуемые (best-practice) значения шаблона опроса. Не персистится —
7
+ * используется кнопкой «Рекомендуемые значения» на фронте, чтобы перезаписать
8
+ * черновик. Языки заполнены по составу профиля.
9
+ */
10
+ export declare class SurveyTemplateDefaultsRO {
11
+ type: SurveyTypeEnum;
12
+ title: Partial<Record<Languages, string>>;
13
+ description: Partial<Record<Languages, string>>;
14
+ questions: SurveyQuestion[];
15
+ finalScreens: SurveyFinalScreensConfig | null;
16
+ reviewLink: string | null;
17
+ }
@@ -0,0 +1,46 @@
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.SurveyTemplateDefaultsRO = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const survey_type_enum_1 = require("./enums/survey-type.enum");
15
+ /**
16
+ * Рекомендуемые (best-practice) значения шаблона опроса. Не персистится —
17
+ * используется кнопкой «Рекомендуемые значения» на фронте, чтобы перезаписать
18
+ * черновик. Языки заполнены по составу профиля.
19
+ */
20
+ class SurveyTemplateDefaultsRO {
21
+ }
22
+ exports.SurveyTemplateDefaultsRO = SurveyTemplateDefaultsRO;
23
+ __decorate([
24
+ (0, class_transformer_1.Expose)(),
25
+ __metadata("design:type", String)
26
+ ], SurveyTemplateDefaultsRO.prototype, "type", void 0);
27
+ __decorate([
28
+ (0, class_transformer_1.Expose)(),
29
+ __metadata("design:type", Object)
30
+ ], SurveyTemplateDefaultsRO.prototype, "title", void 0);
31
+ __decorate([
32
+ (0, class_transformer_1.Expose)(),
33
+ __metadata("design:type", Object)
34
+ ], SurveyTemplateDefaultsRO.prototype, "description", void 0);
35
+ __decorate([
36
+ (0, class_transformer_1.Expose)(),
37
+ __metadata("design:type", Array)
38
+ ], SurveyTemplateDefaultsRO.prototype, "questions", void 0);
39
+ __decorate([
40
+ (0, class_transformer_1.Expose)(),
41
+ __metadata("design:type", Object)
42
+ ], SurveyTemplateDefaultsRO.prototype, "finalScreens", void 0);
43
+ __decorate([
44
+ (0, class_transformer_1.Expose)(),
45
+ __metadata("design:type", String)
46
+ ], SurveyTemplateDefaultsRO.prototype, "reviewLink", void 0);
@@ -0,0 +1,17 @@
1
+ import { Languages } from '../shared/enum/languages.enum';
2
+ import { SurveyTypeEnum } from './enums/survey-type.enum';
3
+ import { SurveyFinalScreensConfig } from './survey-final-screen.type';
4
+ import { SurveyQuestion } from './survey-question.type';
5
+ export declare class SurveyTemplateRO {
6
+ id: number;
7
+ type: SurveyTypeEnum;
8
+ enabled: boolean;
9
+ title: Partial<Record<Languages, string>>;
10
+ /** Локализованное описание/подзаголовок опроса (под заголовком на странице). */
11
+ description: Partial<Record<Languages, string>>;
12
+ questions: SurveyQuestion[];
13
+ finalScreens: SurveyFinalScreensConfig | null;
14
+ reviewLink: string | null;
15
+ createdAt: Date;
16
+ updatedAt: Date;
17
+ }
@@ -0,0 +1,57 @@
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.SurveyTemplateRO = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const survey_type_enum_1 = require("./enums/survey-type.enum");
15
+ class SurveyTemplateRO {
16
+ }
17
+ exports.SurveyTemplateRO = SurveyTemplateRO;
18
+ __decorate([
19
+ (0, class_transformer_1.Expose)(),
20
+ __metadata("design:type", Number)
21
+ ], SurveyTemplateRO.prototype, "id", void 0);
22
+ __decorate([
23
+ (0, class_transformer_1.Expose)(),
24
+ __metadata("design:type", String)
25
+ ], SurveyTemplateRO.prototype, "type", void 0);
26
+ __decorate([
27
+ (0, class_transformer_1.Expose)(),
28
+ __metadata("design:type", Boolean)
29
+ ], SurveyTemplateRO.prototype, "enabled", void 0);
30
+ __decorate([
31
+ (0, class_transformer_1.Expose)(),
32
+ __metadata("design:type", Object)
33
+ ], SurveyTemplateRO.prototype, "title", void 0);
34
+ __decorate([
35
+ (0, class_transformer_1.Expose)(),
36
+ __metadata("design:type", Object)
37
+ ], SurveyTemplateRO.prototype, "description", void 0);
38
+ __decorate([
39
+ (0, class_transformer_1.Expose)(),
40
+ __metadata("design:type", Array)
41
+ ], SurveyTemplateRO.prototype, "questions", void 0);
42
+ __decorate([
43
+ (0, class_transformer_1.Expose)(),
44
+ __metadata("design:type", Object)
45
+ ], SurveyTemplateRO.prototype, "finalScreens", void 0);
46
+ __decorate([
47
+ (0, class_transformer_1.Expose)(),
48
+ __metadata("design:type", String)
49
+ ], SurveyTemplateRO.prototype, "reviewLink", void 0);
50
+ __decorate([
51
+ (0, class_transformer_1.Expose)(),
52
+ __metadata("design:type", Date)
53
+ ], SurveyTemplateRO.prototype, "createdAt", void 0);
54
+ __decorate([
55
+ (0, class_transformer_1.Expose)(),
56
+ __metadata("design:type", Date)
57
+ ], SurveyTemplateRO.prototype, "updatedAt", void 0);
@@ -0,0 +1,26 @@
1
+ import { Languages } from '../shared/enum/languages.enum';
2
+ import { SurveyTypeEnum } from './enums/survey-type.enum';
3
+ import { SurveyFinalScreensConfig } from './survey-final-screen.type';
4
+ import { SurveyQuestion } from './survey-question.type';
5
+ /**
6
+ * Обновление шаблона опроса. Структурные JSONB-поля (`questions`,
7
+ * `finalScreens`) валидируются «легко» (как `contentJson` в
8
+ * маркетинг-автоматизации): запись может храниться выключенным черновиком,
9
+ * жёсткая проверка полноты переводов выполняется на фронте при активации.
10
+ */
11
+ export declare class UpdateSurveyTemplateDTO {
12
+ type: SurveyTypeEnum;
13
+ enabled: boolean;
14
+ /** Локализованный заголовок опроса. */
15
+ title?: Partial<Record<Languages, string>>;
16
+ /** Локализованное описание/подзаголовок опроса. */
17
+ description?: Partial<Record<Languages, string>>;
18
+ questions: SurveyQuestion[];
19
+ /** Только для post_game. */
20
+ finalScreens?: SurveyFinalScreensConfig | null;
21
+ /**
22
+ * Только для post_game. Единая ссылка для отзыва (фолбэк, если в квесте
23
+ * не задана своя `reviewLink`).
24
+ */
25
+ reviewLink?: string | null;
26
+ }
@@ -0,0 +1,64 @@
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.UpdateSurveyTemplateDTO = 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
+ * Обновление шаблона опроса. Структурные JSONB-поля (`questions`,
18
+ * `finalScreens`) валидируются «легко» (как `contentJson` в
19
+ * маркетинг-автоматизации): запись может храниться выключенным черновиком,
20
+ * жёсткая проверка полноты переводов выполняется на фронте при активации.
21
+ */
22
+ class UpdateSurveyTemplateDTO {
23
+ }
24
+ exports.UpdateSurveyTemplateDTO = UpdateSurveyTemplateDTO;
25
+ __decorate([
26
+ (0, class_validator_1.IsEnum)(survey_type_enum_1.SurveyTypeEnum),
27
+ (0, class_transformer_1.Expose)(),
28
+ __metadata("design:type", String)
29
+ ], UpdateSurveyTemplateDTO.prototype, "type", void 0);
30
+ __decorate([
31
+ (0, class_validator_1.IsBoolean)(),
32
+ (0, class_transformer_1.Transform)(({ value }) => value !== null && value !== void 0 ? value : false),
33
+ (0, class_transformer_1.Expose)(),
34
+ __metadata("design:type", Boolean)
35
+ ], UpdateSurveyTemplateDTO.prototype, "enabled", void 0);
36
+ __decorate([
37
+ (0, class_validator_1.IsOptional)(),
38
+ (0, class_validator_1.IsObject)(),
39
+ (0, class_transformer_1.Expose)(),
40
+ __metadata("design:type", Object)
41
+ ], UpdateSurveyTemplateDTO.prototype, "title", void 0);
42
+ __decorate([
43
+ (0, class_validator_1.IsOptional)(),
44
+ (0, class_validator_1.IsObject)(),
45
+ (0, class_transformer_1.Expose)(),
46
+ __metadata("design:type", Object)
47
+ ], UpdateSurveyTemplateDTO.prototype, "description", void 0);
48
+ __decorate([
49
+ (0, class_validator_1.IsArray)(),
50
+ (0, class_transformer_1.Expose)(),
51
+ __metadata("design:type", Array)
52
+ ], UpdateSurveyTemplateDTO.prototype, "questions", void 0);
53
+ __decorate([
54
+ (0, class_validator_1.IsOptional)(),
55
+ (0, class_validator_1.IsObject)(),
56
+ (0, class_transformer_1.Expose)(),
57
+ __metadata("design:type", Object)
58
+ ], UpdateSurveyTemplateDTO.prototype, "finalScreens", void 0);
59
+ __decorate([
60
+ (0, class_validator_1.IsOptional)(),
61
+ (0, class_validator_1.IsString)(),
62
+ (0, class_transformer_1.Expose)(),
63
+ __metadata("design:type", String)
64
+ ], UpdateSurveyTemplateDTO.prototype, "reviewLink", void 0);
@@ -0,0 +1,4 @@
1
+ /** JSON: `{ [namespaceTitle]: { [rowKey]: "" } }` — пустая строка = удалить ключ. */
2
+ export declare class DeleteOrphanedTranslationsDto {
3
+ json: string;
4
+ }
@@ -0,0 +1,23 @@
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.DeleteOrphanedTranslationsDto = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const is_not_blank_1 = require("../shared/is-not-blank");
15
+ /** JSON: `{ [namespaceTitle]: { [rowKey]: "" } }` — пустая строка = удалить ключ. */
16
+ class DeleteOrphanedTranslationsDto {
17
+ }
18
+ exports.DeleteOrphanedTranslationsDto = DeleteOrphanedTranslationsDto;
19
+ __decorate([
20
+ (0, is_not_blank_1.IsNotBlank)(),
21
+ (0, class_transformer_1.Expose)(),
22
+ __metadata("design:type", String)
23
+ ], DeleteOrphanedTranslationsDto.prototype, "json", void 0);