@escapenavigator/types 1.10.162 → 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.
- package/dist/location/create-location.dto.d.ts +1 -0
- package/dist/location/create-location.dto.js +6 -0
- package/dist/location/location-light.ro.d.ts +1 -0
- package/dist/location/location-light.ro.js +4 -0
- package/dist/location/update-location-for-admin.dto.d.ts +1 -0
- package/dist/location/update-location-for-admin.dto.js +7 -0
- package/dist/openapi/widget/openapi-widget-info.ro.d.ts +3 -1
- package/dist/openapi/widget/openapi-widget-info.ro.js +8 -0
- package/dist/profile/company-ai-context.d.ts +2 -0
- package/dist/profile/profile.ro.d.ts +2 -0
- package/dist/profile/profile.ro.js +4 -0
- package/dist/questroom/create-questroom.dto.d.ts +9 -0
- package/dist/questroom/create-questroom.dto.js +56 -0
- package/dist/questroom/questroom-ai-context.d.ts +16 -0
- package/dist/questroom/questroom-light.ro.d.ts +2 -0
- package/dist/questroom/questroom-light.ro.js +4 -0
- package/dist/questroom/questroom.ro.d.ts +7 -0
- package/dist/questroom/questroom.ro.js +28 -0
- package/dist/questroom/update-questroom-game-conduction.dto.d.ts +3 -0
- package/dist/questroom/update-questroom-game-conduction.dto.js +22 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/widget-chat/widget-chat-ai-usage.ro.d.ts +7 -0
- package/dist/widget-chat/widget-chat-ai-usage.ro.js +2 -0
- package/dist/widget-chat/widget-chat-faq-template.ro.d.ts +9 -0
- package/dist/widget-chat/widget-chat-faq-template.ro.js +2 -0
- package/dist/widget-chat/widget-chat-init.ro.d.ts +3 -2
- package/dist/widget-chat/widget-chat-knowledge-save.dto.d.ts +11 -7
- package/dist/widget-chat/widget-chat-knowledge-save.dto.js +34 -27
- package/dist/widget-chat/widget-chat-message.ro.d.ts +21 -3
- package/dist/widget-chat/widget-chat-profile-settings-update.dto.d.ts +3 -0
- package/dist/widget-chat/widget-chat-profile-settings-update.dto.js +20 -0
- package/dist/widget-chat/widget-chat-profile-settings.ro.d.ts +3 -0
- package/dist/widget-chat/widget-chat-profile-settings.ro.js +2 -0
- package/dist/widget-chat/widget-chat-starter-chip-save.dto.d.ts +16 -0
- package/dist/widget-chat/widget-chat-starter-chip-save.dto.js +78 -0
- package/dist/widget-chat/widget-chat-starter-chip.ro.d.ts +43 -0
- package/dist/widget-chat/widget-chat-starter-chip.ro.js +23 -0
- package/package.json +2 -2
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { WidgetChatConversationRO } from './widget-chat-conversation.ro';
|
|
2
2
|
import { WidgetChatMessageRO } from './widget-chat-message.ro';
|
|
3
3
|
export type WidgetChatStarterChipRO = {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
presetKey?: string;
|
|
5
|
+
knowledgeId?: number;
|
|
6
|
+
label?: string;
|
|
6
7
|
emoji?: string;
|
|
7
8
|
};
|
|
8
9
|
export type WidgetChatInitRO = {
|
|
@@ -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
|
|
6
|
-
export declare const
|
|
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
|
|
13
|
+
content?: string;
|
|
14
|
+
templateKey?: string;
|
|
15
|
+
answers?: Record<string, string>;
|
|
10
16
|
tags?: string[];
|
|
17
|
+
exampleQuestions?: string[];
|
|
11
18
|
enabled?: boolean;
|
|
12
|
-
|
|
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.
|
|
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
|
-
//
|
|
22
|
-
|
|
23
|
-
exports.
|
|
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.
|
|
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",
|
|
57
|
-
], WidgetChatKnowledgeSaveDto.prototype, "
|
|
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, "
|
|
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.
|
|
81
|
-
(0, class_validator_1.Min)(0),
|
|
88
|
+
(0, class_validator_1.IsBoolean)(),
|
|
82
89
|
(0, class_transformer_1.Expose)(),
|
|
83
|
-
__metadata("design:type",
|
|
84
|
-
], WidgetChatKnowledgeSaveDto.prototype, "
|
|
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,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,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.
|
|
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": "
|
|
26
|
+
"gitHead": "ad28ed8f74f9a00d33dffd883d7f9ed26d596629",
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/validator": "13.0.0",
|
|
29
29
|
"typescript": "^5.6"
|