@developer.notchatbot/webchat 1.1.6 → 1.1.8
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/config/endpoints.d.ts +5 -0
- package/dist/types.d.ts +11 -3
- package/dist/utils/encryption.d.ts +2 -0
- package/dist/webchat-bundle.min.js +4378 -4176
- package/dist/webchat-bundle.min.umd.cjs +50 -50
- package/package.json +1 -1
|
@@ -2,6 +2,7 @@ export interface EndpointConfig {
|
|
|
2
2
|
baseUrl: string;
|
|
3
3
|
chatEndpoint: string;
|
|
4
4
|
conversationEndpoint: string;
|
|
5
|
+
uploadEndpoint: string;
|
|
5
6
|
}
|
|
6
7
|
/**
|
|
7
8
|
* Detecta si estamos en ambiente de desarrollo
|
|
@@ -19,6 +20,10 @@ export declare function getChatEndpoint(): string;
|
|
|
19
20
|
* Obtiene el endpoint de conversación
|
|
20
21
|
*/
|
|
21
22
|
export declare function getConversationEndpoint(): string;
|
|
23
|
+
/**
|
|
24
|
+
* Obtiene el endpoint de upload
|
|
25
|
+
*/
|
|
26
|
+
export declare function getUploadEndpoint(): string;
|
|
22
27
|
/**
|
|
23
28
|
* Obtiene la URL base según el ambiente
|
|
24
29
|
*/
|
package/dist/types.d.ts
CHANGED
|
@@ -56,13 +56,19 @@ export interface EmbedChatConfig {
|
|
|
56
56
|
footerColor?: string;
|
|
57
57
|
customCSS?: string;
|
|
58
58
|
}
|
|
59
|
+
export interface FileWithBlobUrl {
|
|
60
|
+
url: string;
|
|
61
|
+
name: string;
|
|
62
|
+
type: string;
|
|
63
|
+
size?: number;
|
|
64
|
+
}
|
|
59
65
|
export interface EmbedChatProps {
|
|
60
66
|
config: EmbedChatConfig;
|
|
61
67
|
}
|
|
62
68
|
export interface EmbedChatWindowProps {
|
|
63
69
|
config: EmbedChatConfig;
|
|
64
70
|
messages: Message[];
|
|
65
|
-
onSendMessage: (message: string) => void;
|
|
71
|
+
onSendMessage: (message: string, files?: FileWithBlobUrl[]) => void;
|
|
66
72
|
isLoading?: boolean;
|
|
67
73
|
isAiTyping?: boolean;
|
|
68
74
|
}
|
|
@@ -89,6 +95,7 @@ export interface Message {
|
|
|
89
95
|
timestamp: Date | string;
|
|
90
96
|
conversationId?: string;
|
|
91
97
|
type: string;
|
|
98
|
+
metaContent?: string;
|
|
92
99
|
}
|
|
93
100
|
export interface ChatBotProps {
|
|
94
101
|
config: WebChatConfig;
|
|
@@ -108,7 +115,7 @@ export interface ChatWindowProps {
|
|
|
108
115
|
onClose: () => void;
|
|
109
116
|
config: WebChatConfig;
|
|
110
117
|
messages: Message[];
|
|
111
|
-
onSendMessage: (message: string) => void;
|
|
118
|
+
onSendMessage: (message: string, files?: FileWithBlobUrl[]) => void;
|
|
112
119
|
isLoading?: boolean;
|
|
113
120
|
isAiTyping?: boolean;
|
|
114
121
|
position?: 'bottom-right' | 'bottom-left';
|
|
@@ -139,11 +146,12 @@ export interface MessageProps {
|
|
|
139
146
|
bubbleUserColor?: string;
|
|
140
147
|
}
|
|
141
148
|
export interface MessageInputProps {
|
|
142
|
-
onSendMessage: (message: string) => void;
|
|
149
|
+
onSendMessage: (message: string, files?: FileWithBlobUrl[]) => void;
|
|
143
150
|
placeholder?: string;
|
|
144
151
|
primaryColor?: string;
|
|
145
152
|
disabled?: boolean;
|
|
146
153
|
input?: EmbedChatInputConfig;
|
|
154
|
+
apiKey?: string;
|
|
147
155
|
}
|
|
148
156
|
export interface TypingIndicatorProps {
|
|
149
157
|
avatar?: string;
|