avin-ai 0.1.7 → 0.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/avin-ai.es.js +1536 -1253
- package/dist/avin-ai.js +602 -779
- package/dist/avin-ai.umd.js +602 -779
- package/dist/index.d.ts +32 -36
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3,46 +3,40 @@ export declare interface Agent {
|
|
|
3
3
|
}
|
|
4
4
|
|
|
5
5
|
export declare class AvinWidget extends HTMLElement {
|
|
6
|
-
private isPanelOpen;
|
|
7
|
-
private callActive;
|
|
8
|
-
private transcript;
|
|
9
|
-
private client;
|
|
10
6
|
private shadow;
|
|
7
|
+
private provider;
|
|
11
8
|
private widgetId;
|
|
12
|
-
private serverUrl;
|
|
13
9
|
private agentId;
|
|
14
|
-
private
|
|
15
|
-
private
|
|
16
|
-
private
|
|
17
|
-
private
|
|
18
|
-
private
|
|
19
|
-
private chatId;
|
|
20
|
-
private isLoading;
|
|
10
|
+
private serverUrl;
|
|
11
|
+
private position;
|
|
12
|
+
private primaryColor;
|
|
13
|
+
private secondaryColor;
|
|
14
|
+
private gradient;
|
|
21
15
|
static get observedAttributes(): string[];
|
|
22
16
|
constructor();
|
|
23
17
|
connectedCallback(): void;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
18
|
+
private readAttributes;
|
|
19
|
+
initializeExpandedConfig(): Promise<void>;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
declare interface ChatMessage {
|
|
23
|
+
role: 'user' | 'assistant';
|
|
24
|
+
content: string;
|
|
25
|
+
widget?: {
|
|
26
|
+
type: 'carousel' | 'button_list';
|
|
27
|
+
data: any;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export declare class ChatService {
|
|
32
|
+
static createChatProspect(prospectGroupId: string): Promise<string>;
|
|
33
|
+
static fetchWelcomeMessage(agentId: string, prospectId: string): Promise<ChatMessage | null>;
|
|
34
|
+
static sendChatMessage(agentId: string, prospectId: string, message: string, chatId: string | null, onChunk: (text: string) => void, onWidget: (widget: any) => void, onDone: (newChatId: string | null) => void): Promise<void>;
|
|
35
|
+
static createCall(agentId: string, prospectId: string | null, widgetMode: string): Promise<string>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export declare class ConfigService {
|
|
39
|
+
static fetchWidgetConfig(widgetId: string): Promise<WidgetConfig>;
|
|
46
40
|
}
|
|
47
41
|
|
|
48
42
|
export declare interface ControlEvent {
|
|
@@ -52,8 +46,6 @@ export declare interface ControlEvent {
|
|
|
52
46
|
name?: string;
|
|
53
47
|
}
|
|
54
48
|
|
|
55
|
-
export declare function fetchWidgetConfig(widgetId: string): Promise<WidgetConfig>;
|
|
56
|
-
|
|
57
49
|
export declare interface TTSProvider {
|
|
58
50
|
root_name: string;
|
|
59
51
|
provider_country?: string;
|
|
@@ -119,7 +111,11 @@ export declare interface WidgetConfig {
|
|
|
119
111
|
client_id: string;
|
|
120
112
|
mode: WidgetMode;
|
|
121
113
|
icon?: string;
|
|
114
|
+
gradient?: string;
|
|
122
115
|
agent?: Agent;
|
|
116
|
+
client?: {
|
|
117
|
+
base_prospect_group_id?: string;
|
|
118
|
+
};
|
|
123
119
|
}
|
|
124
120
|
|
|
125
121
|
export declare type WidgetMode = 'voice_only' | 'chat_voice' | 'avatar_only' | 'chat_avatar' | 'chat_only';
|