@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
@@ -1,3 +1,4 @@
1
+ import { WidgetConsentModeEnum } from './enum/widget-consent-mode.enum';
1
2
  import { WidgetTypeEnum } from './enum/widget-type.enum';
2
3
  export declare class CreateWidgetDto {
3
4
  type: WidgetTypeEnum;
@@ -10,6 +11,7 @@ export declare class CreateWidgetDto {
10
11
  fbPixelId?: string;
11
12
  gaCoversationId?: string;
12
13
  gaCoversationLabel?: string;
14
+ consentMode?: WidgetConsentModeEnum;
13
15
  daysAhead?: number;
14
16
  buttonTooltipText?: string;
15
17
  showOtherQuests?: boolean;
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.CreateWidgetDto = void 0;
13
13
  const class_transformer_1 = require("class-transformer");
14
14
  const class_validator_1 = require("class-validator");
15
+ const widget_consent_mode_enum_1 = require("./enum/widget-consent-mode.enum");
15
16
  const widget_type_enum_1 = require("./enum/widget-type.enum");
16
17
  class CreateWidgetDto {
17
18
  }
@@ -81,6 +82,13 @@ __decorate([
81
82
  (0, class_transformer_1.Expose)(),
82
83
  __metadata("design:type", String)
83
84
  ], CreateWidgetDto.prototype, "gaCoversationLabel", void 0);
85
+ __decorate([
86
+ (0, class_validator_1.IsOptional)(),
87
+ (0, class_validator_1.IsEnum)(widget_consent_mode_enum_1.WidgetConsentModeEnum),
88
+ (0, class_transformer_1.Transform)(({ value }) => value || widget_consent_mode_enum_1.WidgetConsentModeEnum.OFF),
89
+ (0, class_transformer_1.Expose)(),
90
+ __metadata("design:type", String)
91
+ ], CreateWidgetDto.prototype, "consentMode", void 0);
84
92
  __decorate([
85
93
  (0, class_validator_1.IsOptional)(),
86
94
  (0, class_validator_1.IsInt)(),
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Когда виджету разрешено поднимать GA4 / Google Ads / FB Pixel
3
+ * относительно cookie-баннера на сайте компании.
4
+ *
5
+ * - OFF — инициализировать метрики сразу (поведение по умолчанию,
6
+ * как было до фичи cookie-consent).
7
+ * - BLOCK — ждать явный сигнал согласия; пока его нет — ничего не слать.
8
+ * - TIMEOUT — ждать сигнал, но если за таймаут баннер не отозвался,
9
+ * включить ТОЛЬКО аналитику (рекламные пиксели остаются off).
10
+ */
11
+ export declare enum WidgetConsentModeEnum {
12
+ OFF = "off",
13
+ BLOCK = "block",
14
+ TIMEOUT = "timeout"
15
+ }
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WidgetConsentModeEnum = void 0;
4
+ /**
5
+ * Когда виджету разрешено поднимать GA4 / Google Ads / FB Pixel
6
+ * относительно cookie-баннера на сайте компании.
7
+ *
8
+ * - OFF — инициализировать метрики сразу (поведение по умолчанию,
9
+ * как было до фичи cookie-consent).
10
+ * - BLOCK — ждать явный сигнал согласия; пока его нет — ничего не слать.
11
+ * - TIMEOUT — ждать сигнал, но если за таймаут баннер не отозвался,
12
+ * включить ТОЛЬКО аналитику (рекламные пиксели остаются off).
13
+ */
14
+ var WidgetConsentModeEnum;
15
+ (function (WidgetConsentModeEnum) {
16
+ WidgetConsentModeEnum["OFF"] = "off";
17
+ WidgetConsentModeEnum["BLOCK"] = "block";
18
+ WidgetConsentModeEnum["TIMEOUT"] = "timeout";
19
+ })(WidgetConsentModeEnum || (exports.WidgetConsentModeEnum = WidgetConsentModeEnum = {}));
@@ -1,3 +1,4 @@
1
+ import { WidgetConsentModeEnum } from './enum/widget-consent-mode.enum';
1
2
  import { WidgetTypeEnum } from './enum/widget-type.enum';
2
3
  export type WidgetRO = {
3
4
  id: number;
@@ -8,6 +9,7 @@ export type WidgetRO = {
8
9
  ga4Id: string;
9
10
  gaCoversationId: string;
10
11
  gaCoversationLabel: string;
12
+ consentMode?: WidgetConsentModeEnum;
11
13
  allLocations?: boolean;
12
14
  locations: Array<{
13
15
  id: number;
@@ -0,0 +1,7 @@
1
+ export type WidgetChatAiUsageRO = {
2
+ periodStart: string;
3
+ periodEnd: string;
4
+ currency: string;
5
+ amountMinorUnits: number;
6
+ messages: number;
7
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ export type WidgetChatFaqTemplateFieldRO = {
2
+ key: string;
3
+ label: string;
4
+ };
5
+ export type WidgetChatFaqTemplateRO = {
6
+ topicKey: string;
7
+ title: string;
8
+ fields: WidgetChatFaqTemplateFieldRO[];
9
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,13 +1,14 @@
1
1
  import { WidgetChatConversationRO } from './widget-chat-conversation.ro';
2
2
  import { WidgetChatMessageRO } from './widget-chat-message.ro';
3
3
  export type WidgetChatStarterChipRO = {
4
- knowledgeId: number;
5
- label: string;
4
+ presetKey?: string;
5
+ knowledgeId?: number;
6
+ label?: string;
6
7
  emoji?: string;
7
8
  };
8
9
  export type WidgetChatInitRO = {
9
10
  visitorToken: string;
10
- conversation: WidgetChatConversationRO;
11
+ conversation: WidgetChatConversationRO | null;
11
12
  messages: WidgetChatMessageRO[];
12
13
  starterChips?: WidgetChatStarterChipRO[];
13
14
  };
@@ -2,15 +2,19 @@ export declare const WIDGET_CHAT_KNOWLEDGE_TITLE_MAX = 200;
2
2
  export declare const WIDGET_CHAT_KNOWLEDGE_CONTENT_MAX = 5000;
3
3
  export declare const WIDGET_CHAT_KNOWLEDGE_TAG_MAX = 50;
4
4
  export declare const WIDGET_CHAT_KNOWLEDGE_TAGS_MAX = 20;
5
- export declare const WIDGET_CHAT_CHIP_LABEL_MAX = 32;
6
- export declare const WIDGET_CHAT_CHIP_EMOJI_MAX = 8;
5
+ export declare const WIDGET_CHAT_KNOWLEDGE_EXAMPLE_MAX = 200;
6
+ export declare const WIDGET_CHAT_KNOWLEDGE_EXAMPLES_MAX = 20;
7
+ export declare const WIDGET_CHAT_KNOWLEDGE_TEMPLATE_KEY_MAX = 80;
8
+ export declare const WIDGET_CHAT_KNOWLEDGE_FIELD_KEY_MAX = 80;
9
+ export declare const WIDGET_CHAT_KNOWLEDGE_FIELD_VALUE_MAX = 1200;
10
+ export declare const WIDGET_CHAT_KNOWLEDGE_ANSWERS_MAX = 12;
7
11
  export declare class WidgetChatKnowledgeSaveDto {
8
12
  title: string;
9
- content: string;
13
+ content?: string;
14
+ templateKey?: string;
15
+ answers?: Record<string, string>;
10
16
  tags?: string[];
17
+ exampleQuestions?: string[];
11
18
  enabled?: boolean;
12
- showOnWelcome?: boolean;
13
- chipLabel?: string;
14
- chipEmoji?: string;
15
- chipOrder?: number;
19
+ needsReview?: boolean;
16
20
  }
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.WidgetChatKnowledgeSaveDto = exports.WIDGET_CHAT_CHIP_EMOJI_MAX = exports.WIDGET_CHAT_CHIP_LABEL_MAX = exports.WIDGET_CHAT_KNOWLEDGE_TAGS_MAX = exports.WIDGET_CHAT_KNOWLEDGE_TAG_MAX = exports.WIDGET_CHAT_KNOWLEDGE_CONTENT_MAX = exports.WIDGET_CHAT_KNOWLEDGE_TITLE_MAX = void 0;
12
+ exports.WidgetChatKnowledgeSaveDto = exports.WIDGET_CHAT_KNOWLEDGE_ANSWERS_MAX = exports.WIDGET_CHAT_KNOWLEDGE_FIELD_VALUE_MAX = exports.WIDGET_CHAT_KNOWLEDGE_FIELD_KEY_MAX = exports.WIDGET_CHAT_KNOWLEDGE_TEMPLATE_KEY_MAX = exports.WIDGET_CHAT_KNOWLEDGE_EXAMPLES_MAX = exports.WIDGET_CHAT_KNOWLEDGE_EXAMPLE_MAX = exports.WIDGET_CHAT_KNOWLEDGE_TAGS_MAX = exports.WIDGET_CHAT_KNOWLEDGE_TAG_MAX = exports.WIDGET_CHAT_KNOWLEDGE_CONTENT_MAX = exports.WIDGET_CHAT_KNOWLEDGE_TITLE_MAX = void 0;
13
13
  const class_transformer_1 = require("class-transformer");
14
14
  const class_validator_1 = require("class-validator");
15
15
  // Лимиты ручного FAQ: content инжектится в контекст модели при срабатывании
@@ -18,9 +18,15 @@ exports.WIDGET_CHAT_KNOWLEDGE_TITLE_MAX = 200;
18
18
  exports.WIDGET_CHAT_KNOWLEDGE_CONTENT_MAX = 5000;
19
19
  exports.WIDGET_CHAT_KNOWLEDGE_TAG_MAX = 50;
20
20
  exports.WIDGET_CHAT_KNOWLEDGE_TAGS_MAX = 20;
21
- // Лимиты стартового чипа (рендерится кнопкой на welcome-экране виджета).
22
- exports.WIDGET_CHAT_CHIP_LABEL_MAX = 32;
23
- exports.WIDGET_CHAT_CHIP_EMOJI_MAX = 8;
21
+ // «Примеры вопросов клиентов» дружелюбная замена ручным тегам: владелец пишет
22
+ // живые формулировки (по фразе на строку), из них авто-генерятся теги ретривала.
23
+ exports.WIDGET_CHAT_KNOWLEDGE_EXAMPLE_MAX = 200;
24
+ exports.WIDGET_CHAT_KNOWLEDGE_EXAMPLES_MAX = 20;
25
+ exports.WIDGET_CHAT_KNOWLEDGE_TEMPLATE_KEY_MAX = 80;
26
+ exports.WIDGET_CHAT_KNOWLEDGE_FIELD_KEY_MAX = 80;
27
+ exports.WIDGET_CHAT_KNOWLEDGE_FIELD_VALUE_MAX = 1200;
28
+ // Потолок числа ответов в одной шаблонной статье (защита payload).
29
+ exports.WIDGET_CHAT_KNOWLEDGE_ANSWERS_MAX = 12;
24
30
  // Runtime-валидируемый payload POST/PUT /widget-chat/knowledge. id берётся из
25
31
  // path-параметра (см. контроллер), в теле его нет.
26
32
  class WidgetChatKnowledgeSaveDto {
@@ -34,12 +40,25 @@ __decorate([
34
40
  __metadata("design:type", String)
35
41
  ], WidgetChatKnowledgeSaveDto.prototype, "title", void 0);
36
42
  __decorate([
43
+ (0, class_validator_1.IsOptional)(),
37
44
  (0, class_validator_1.IsString)(),
38
- (0, class_validator_1.MinLength)(1),
39
45
  (0, class_validator_1.MaxLength)(exports.WIDGET_CHAT_KNOWLEDGE_CONTENT_MAX),
40
46
  (0, class_transformer_1.Expose)(),
41
47
  __metadata("design:type", String)
42
48
  ], WidgetChatKnowledgeSaveDto.prototype, "content", void 0);
49
+ __decorate([
50
+ (0, class_validator_1.IsOptional)(),
51
+ (0, class_validator_1.IsString)(),
52
+ (0, class_validator_1.MaxLength)(exports.WIDGET_CHAT_KNOWLEDGE_TEMPLATE_KEY_MAX),
53
+ (0, class_transformer_1.Expose)(),
54
+ __metadata("design:type", String)
55
+ ], WidgetChatKnowledgeSaveDto.prototype, "templateKey", void 0);
56
+ __decorate([
57
+ (0, class_validator_1.IsOptional)(),
58
+ (0, class_validator_1.IsObject)(),
59
+ (0, class_transformer_1.Expose)(),
60
+ __metadata("design:type", Object)
61
+ ], WidgetChatKnowledgeSaveDto.prototype, "answers", void 0);
43
62
  __decorate([
44
63
  (0, class_validator_1.IsOptional)(),
45
64
  (0, class_validator_1.IsArray)(),
@@ -51,34 +70,22 @@ __decorate([
51
70
  ], WidgetChatKnowledgeSaveDto.prototype, "tags", void 0);
52
71
  __decorate([
53
72
  (0, class_validator_1.IsOptional)(),
54
- (0, class_validator_1.IsBoolean)(),
73
+ (0, class_validator_1.IsArray)(),
74
+ (0, class_validator_1.ArrayMaxSize)(exports.WIDGET_CHAT_KNOWLEDGE_EXAMPLES_MAX),
75
+ (0, class_validator_1.IsString)({ each: true }),
76
+ (0, class_validator_1.MaxLength)(exports.WIDGET_CHAT_KNOWLEDGE_EXAMPLE_MAX, { each: true }),
55
77
  (0, class_transformer_1.Expose)(),
56
- __metadata("design:type", Boolean)
57
- ], WidgetChatKnowledgeSaveDto.prototype, "enabled", void 0);
78
+ __metadata("design:type", Array)
79
+ ], WidgetChatKnowledgeSaveDto.prototype, "exampleQuestions", void 0);
58
80
  __decorate([
59
81
  (0, class_validator_1.IsOptional)(),
60
82
  (0, class_validator_1.IsBoolean)(),
61
83
  (0, class_transformer_1.Expose)(),
62
84
  __metadata("design:type", Boolean)
63
- ], WidgetChatKnowledgeSaveDto.prototype, "showOnWelcome", void 0);
64
- __decorate([
65
- (0, class_validator_1.IsOptional)(),
66
- (0, class_validator_1.IsString)(),
67
- (0, class_validator_1.MaxLength)(exports.WIDGET_CHAT_CHIP_LABEL_MAX),
68
- (0, class_transformer_1.Expose)(),
69
- __metadata("design:type", String)
70
- ], WidgetChatKnowledgeSaveDto.prototype, "chipLabel", void 0);
71
- __decorate([
72
- (0, class_validator_1.IsOptional)(),
73
- (0, class_validator_1.IsString)(),
74
- (0, class_validator_1.MaxLength)(exports.WIDGET_CHAT_CHIP_EMOJI_MAX),
75
- (0, class_transformer_1.Expose)(),
76
- __metadata("design:type", String)
77
- ], WidgetChatKnowledgeSaveDto.prototype, "chipEmoji", void 0);
85
+ ], WidgetChatKnowledgeSaveDto.prototype, "enabled", void 0);
78
86
  __decorate([
79
87
  (0, class_validator_1.IsOptional)(),
80
- (0, class_validator_1.IsInt)(),
81
- (0, class_validator_1.Min)(0),
88
+ (0, class_validator_1.IsBoolean)(),
82
89
  (0, class_transformer_1.Expose)(),
83
- __metadata("design:type", Number)
84
- ], WidgetChatKnowledgeSaveDto.prototype, "chipOrder", void 0);
90
+ __metadata("design:type", Boolean)
91
+ ], WidgetChatKnowledgeSaveDto.prototype, "needsReview", void 0);
@@ -5,16 +5,32 @@ export type WidgetChatSlotSuggestion = {
5
5
  date: string;
6
6
  players?: number;
7
7
  };
8
+ export type WidgetChatSlotCalendar = {
9
+ questroomId: number;
10
+ questroomTitle?: string;
11
+ players?: number;
12
+ initialDate?: string;
13
+ };
8
14
  export type WidgetChatCertificateAction = {
9
15
  designId?: number;
10
16
  nominalId?: number;
11
17
  customNominal?: number;
12
18
  deliveryType?: string;
13
19
  };
20
+ export type WidgetChatReplyChip = {
21
+ label: string;
22
+ locationId?: number;
23
+ questroomId?: number;
24
+ players?: number;
25
+ date?: string;
26
+ datePicker?: boolean;
27
+ };
14
28
  export type WidgetChatMessageMeta = {
15
29
  kind: 'slot_suggestions';
16
30
  items: WidgetChatSlotSuggestion[];
17
- } | {
31
+ } | ({
32
+ kind: 'slot_calendar';
33
+ } & WidgetChatSlotCalendar) | {
18
34
  kind: 'feedback_request';
19
35
  } | {
20
36
  kind: 'resolution_check';
@@ -24,8 +40,10 @@ export type WidgetChatMessageMeta = {
24
40
  kind: 'identify_request';
25
41
  } | {
26
42
  kind: 'reply_suggestions';
27
- items: string[];
28
- } | {
43
+ items: Array<string | WidgetChatReplyChip>;
44
+ } | ({
45
+ kind: 'reply_chip';
46
+ } & WidgetChatReplyChip) | {
29
47
  kind: 'starter_chip';
30
48
  knowledgeId: number;
31
49
  } | ({
@@ -0,0 +1,3 @@
1
+ export declare class WidgetChatProfileSettingsUpdateDto {
2
+ enabled: boolean;
3
+ }
@@ -0,0 +1,20 @@
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.WidgetChatProfileSettingsUpdateDto = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ class WidgetChatProfileSettingsUpdateDto {
15
+ }
16
+ exports.WidgetChatProfileSettingsUpdateDto = WidgetChatProfileSettingsUpdateDto;
17
+ __decorate([
18
+ (0, class_validator_1.IsBoolean)(),
19
+ __metadata("design:type", Boolean)
20
+ ], WidgetChatProfileSettingsUpdateDto.prototype, "enabled", void 0);
@@ -0,0 +1,3 @@
1
+ export type WidgetChatProfileSettingsRO = {
2
+ enabled: boolean;
3
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,16 @@
1
+ export declare const WIDGET_CHAT_CHIP_LABEL_MAX = 32;
2
+ export declare const WIDGET_CHAT_CHIP_EMOJI_MAX = 8;
3
+ export declare const WIDGET_CHAT_STARTER_CHIPS_MAX = 30;
4
+ export declare class WidgetChatStarterChipAddDto {
5
+ knowledgeId: number;
6
+ emoji?: string;
7
+ labelOverride?: string;
8
+ }
9
+ export declare class WidgetChatStarterChipUpdateDto {
10
+ enabled?: boolean;
11
+ emoji?: string;
12
+ labelOverride?: string;
13
+ }
14
+ export declare class WidgetChatStarterChipReorderDto {
15
+ ids: number[];
16
+ }
@@ -0,0 +1,78 @@
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.WidgetChatStarterChipReorderDto = exports.WidgetChatStarterChipUpdateDto = exports.WidgetChatStarterChipAddDto = exports.WIDGET_CHAT_STARTER_CHIPS_MAX = exports.WIDGET_CHAT_CHIP_EMOJI_MAX = exports.WIDGET_CHAT_CHIP_LABEL_MAX = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const class_validator_1 = require("class-validator");
15
+ // Те же лимиты, что и у прежнего чипа в статье — подпись и эмодзи рисуются кнопкой.
16
+ exports.WIDGET_CHAT_CHIP_LABEL_MAX = 32;
17
+ exports.WIDGET_CHAT_CHIP_EMOJI_MAX = 8;
18
+ // Защита payload reorder: чипов на welcome-экране заведомо немного.
19
+ exports.WIDGET_CHAT_STARTER_CHIPS_MAX = 30;
20
+ // Добавление кастомного (knowledge) чипа: привязка к статье FAQ по id.
21
+ // Preset-чипы не создаются через API — они сеются вместе с генерацией FAQ.
22
+ class WidgetChatStarterChipAddDto {
23
+ }
24
+ exports.WidgetChatStarterChipAddDto = WidgetChatStarterChipAddDto;
25
+ __decorate([
26
+ (0, class_validator_1.IsInt)(),
27
+ (0, class_transformer_1.Expose)(),
28
+ __metadata("design:type", Number)
29
+ ], WidgetChatStarterChipAddDto.prototype, "knowledgeId", void 0);
30
+ __decorate([
31
+ (0, class_validator_1.IsOptional)(),
32
+ (0, class_validator_1.IsString)(),
33
+ (0, class_validator_1.MaxLength)(exports.WIDGET_CHAT_CHIP_EMOJI_MAX),
34
+ (0, class_transformer_1.Expose)(),
35
+ __metadata("design:type", String)
36
+ ], WidgetChatStarterChipAddDto.prototype, "emoji", void 0);
37
+ __decorate([
38
+ (0, class_validator_1.IsOptional)(),
39
+ (0, class_validator_1.IsString)(),
40
+ (0, class_validator_1.MaxLength)(exports.WIDGET_CHAT_CHIP_LABEL_MAX),
41
+ (0, class_transformer_1.Expose)(),
42
+ __metadata("design:type", String)
43
+ ], WidgetChatStarterChipAddDto.prototype, "labelOverride", void 0);
44
+ // Частичное обновление чипа: вкл/выкл (в т.ч. для дефолтов), эмодзи, подпись.
45
+ class WidgetChatStarterChipUpdateDto {
46
+ }
47
+ exports.WidgetChatStarterChipUpdateDto = WidgetChatStarterChipUpdateDto;
48
+ __decorate([
49
+ (0, class_validator_1.IsOptional)(),
50
+ (0, class_validator_1.IsBoolean)(),
51
+ (0, class_transformer_1.Expose)(),
52
+ __metadata("design:type", Boolean)
53
+ ], WidgetChatStarterChipUpdateDto.prototype, "enabled", void 0);
54
+ __decorate([
55
+ (0, class_validator_1.IsOptional)(),
56
+ (0, class_validator_1.IsString)(),
57
+ (0, class_validator_1.MaxLength)(exports.WIDGET_CHAT_CHIP_EMOJI_MAX),
58
+ (0, class_transformer_1.Expose)(),
59
+ __metadata("design:type", String)
60
+ ], WidgetChatStarterChipUpdateDto.prototype, "emoji", void 0);
61
+ __decorate([
62
+ (0, class_validator_1.IsOptional)(),
63
+ (0, class_validator_1.IsString)(),
64
+ (0, class_validator_1.MaxLength)(exports.WIDGET_CHAT_CHIP_LABEL_MAX),
65
+ (0, class_transformer_1.Expose)(),
66
+ __metadata("design:type", String)
67
+ ], WidgetChatStarterChipUpdateDto.prototype, "labelOverride", void 0);
68
+ // Полный порядок чипов: массив id в нужной очерёдности (sortOrder = индекс).
69
+ class WidgetChatStarterChipReorderDto {
70
+ }
71
+ exports.WidgetChatStarterChipReorderDto = WidgetChatStarterChipReorderDto;
72
+ __decorate([
73
+ (0, class_validator_1.IsArray)(),
74
+ (0, class_validator_1.ArrayMaxSize)(exports.WIDGET_CHAT_STARTER_CHIPS_MAX),
75
+ (0, class_validator_1.IsInt)({ each: true }),
76
+ (0, class_transformer_1.Expose)(),
77
+ __metadata("design:type", Array)
78
+ ], WidgetChatStarterChipReorderDto.prototype, "ids", void 0);
@@ -0,0 +1,43 @@
1
+ export declare const WIDGET_CHAT_STARTER_PRESETS: readonly [{
2
+ readonly key: "book";
3
+ readonly i18nKey: "quickBook";
4
+ readonly emoji: "📅";
5
+ }, {
6
+ readonly key: "choose";
7
+ readonly i18nKey: "quickChoose";
8
+ readonly emoji: "🧩";
9
+ }, {
10
+ readonly key: "prices";
11
+ readonly i18nKey: "quickPrices";
12
+ readonly emoji: "💶";
13
+ }, {
14
+ readonly key: "location";
15
+ readonly i18nKey: "quickLocation";
16
+ readonly emoji: "📍";
17
+ }, {
18
+ readonly key: "certificate";
19
+ readonly i18nKey: "quickCertificate";
20
+ readonly emoji: "🎁";
21
+ }, {
22
+ readonly key: "order";
23
+ readonly i18nKey: "quickOrder";
24
+ readonly emoji: "🛟";
25
+ }];
26
+ export type WidgetChatStarterPresetKey = (typeof WIDGET_CHAT_STARTER_PRESETS)[number]['key'];
27
+ export declare const WIDGET_CHAT_STARTER_PRESET_KEYS: readonly string[];
28
+ export declare enum WidgetChatStarterChipType {
29
+ PRESET = "preset",
30
+ KNOWLEDGE = "knowledge"
31
+ }
32
+ export type WidgetChatStarterChipConfigRO = {
33
+ id: number;
34
+ type: WidgetChatStarterChipType;
35
+ presetKey?: string;
36
+ knowledgeId?: number;
37
+ articleTitle?: string;
38
+ articleMissing?: boolean;
39
+ emoji?: string;
40
+ labelOverride?: string;
41
+ sortOrder: number;
42
+ enabled: boolean;
43
+ };
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WidgetChatStarterChipType = exports.WIDGET_CHAT_STARTER_PRESET_KEYS = exports.WIDGET_CHAT_STARTER_PRESETS = void 0;
4
+ // Стабильные ключи дефолтных (preset) стартовых чипов welcome-экрана. Локализация
5
+ // подписи живёт в CDN-namespace `widget-chat` (ключи quickBook/quickChoose/...):
6
+ // виджет рисует label по presetKey, текст НЕ дублируется в БД. Эмодзи и порядок
7
+ // по умолчанию заданы здесь и сеются вместе с генерацией FAQ.
8
+ exports.WIDGET_CHAT_STARTER_PRESETS = [
9
+ { key: 'book', i18nKey: 'quickBook', emoji: '📅' },
10
+ { key: 'choose', i18nKey: 'quickChoose', emoji: '🧩' },
11
+ { key: 'prices', i18nKey: 'quickPrices', emoji: '💶' },
12
+ { key: 'location', i18nKey: 'quickLocation', emoji: '📍' },
13
+ { key: 'certificate', i18nKey: 'quickCertificate', emoji: '🎁' },
14
+ { key: 'order', i18nKey: 'quickOrder', emoji: '🛟' },
15
+ ];
16
+ exports.WIDGET_CHAT_STARTER_PRESET_KEYS = exports.WIDGET_CHAT_STARTER_PRESETS.map((p) => p.key);
17
+ var WidgetChatStarterChipType;
18
+ (function (WidgetChatStarterChipType) {
19
+ // Дефолтный чип-интент: подпись из i18n по presetKey, клик шлёт обычный текст.
20
+ WidgetChatStarterChipType["PRESET"] = "preset";
21
+ // Кастомный чип-ярлык к статье FAQ: клик заземляет ответ по knowledgeId.
22
+ WidgetChatStarterChipType["KNOWLEDGE"] = "knowledge";
23
+ })(WidgetChatStarterChipType || (exports.WidgetChatStarterChipType = WidgetChatStarterChipType = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@escapenavigator/types",
3
- "version": "1.10.161",
3
+ "version": "1.10.163",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -23,7 +23,7 @@
23
23
  "reflect-metadata": "^0.1.13",
24
24
  "rxjs": "^7.5.5"
25
25
  },
26
- "gitHead": "9e4821b3ad8e4b74479ab23a01b4189ebf9fe5b8",
26
+ "gitHead": "ad28ed8f74f9a00d33dffd883d7f9ed26d596629",
27
27
  "devDependencies": {
28
28
  "@types/validator": "13.0.0",
29
29
  "typescript": "^5.6"