@buni.ai/chatbot-core 1.0.20 → 1.0.22
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/index.esm.js +191 -19
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +191 -19
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +19 -0
- package/dist/widget.d.ts +5 -0
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -29,6 +29,24 @@ export interface BuniChatConfig {
|
|
|
29
29
|
showPreChatForm?: boolean;
|
|
30
30
|
showStartButton?: boolean;
|
|
31
31
|
preChatFormFields?: any;
|
|
32
|
+
enableMinimalMode?: boolean;
|
|
33
|
+
defaultMode?: "full" | "minimal" | "hidden";
|
|
34
|
+
autoMessages?: Array<{
|
|
35
|
+
id: string;
|
|
36
|
+
condition: unknown;
|
|
37
|
+
delayMs?: number;
|
|
38
|
+
message: {
|
|
39
|
+
text: string;
|
|
40
|
+
buttons?: Array<{
|
|
41
|
+
text: string;
|
|
42
|
+
value: string;
|
|
43
|
+
}>;
|
|
44
|
+
quickReplies?: Array<{
|
|
45
|
+
text: string;
|
|
46
|
+
value: string;
|
|
47
|
+
}>;
|
|
48
|
+
};
|
|
49
|
+
}>;
|
|
32
50
|
}
|
|
33
51
|
export interface BuniChatOptions {
|
|
34
52
|
token: string;
|
|
@@ -50,6 +68,7 @@ export interface BuniChatState {
|
|
|
50
68
|
isLoaded: boolean;
|
|
51
69
|
isMinimized: boolean;
|
|
52
70
|
unreadCount: number;
|
|
71
|
+
displayMode?: "full" | "minimal" | "hidden";
|
|
53
72
|
}
|
|
54
73
|
export interface CustomerData {
|
|
55
74
|
name?: string;
|
package/dist/widget.d.ts
CHANGED
|
@@ -11,10 +11,15 @@ export declare class BuniChatWidget implements BuniChatAPI {
|
|
|
11
11
|
private chatTargetOrigin;
|
|
12
12
|
private handshakeComplete;
|
|
13
13
|
private outboundMessageQueue;
|
|
14
|
+
private displayMode;
|
|
15
|
+
private readonly serverBehavior;
|
|
14
16
|
constructor();
|
|
17
|
+
private isMinimalModeEnabled;
|
|
18
|
+
private syncServerBehaviorFromData;
|
|
15
19
|
initialize(options: BuniChatOptions): Promise<void>;
|
|
16
20
|
private loadWidget;
|
|
17
21
|
private buildTriggerHTML;
|
|
22
|
+
private openChatInMinimalMode;
|
|
18
23
|
private openChat;
|
|
19
24
|
private closeChat;
|
|
20
25
|
private getPositionStyles;
|