@tavus/widget 0.16.0 → 0.18.0
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.iife.js +32 -32
- package/dist/index.mjs +4878 -4743
- package/dist/integration.d.ts +10 -0
- package/package.json +1 -1
package/dist/integration.d.ts
CHANGED
|
@@ -24,6 +24,13 @@ export type TavusInteraction = {
|
|
|
24
24
|
properties: {
|
|
25
25
|
context: string;
|
|
26
26
|
};
|
|
27
|
+
} | {
|
|
28
|
+
event_type: "conversation.tool_result";
|
|
29
|
+
properties: {
|
|
30
|
+
tool_call_id: string;
|
|
31
|
+
output?: string | Record<string, unknown>;
|
|
32
|
+
status?: "success" | "error";
|
|
33
|
+
};
|
|
27
34
|
};
|
|
28
35
|
export type TavusEventName = "tavus:ready" | "tavus:conversation-created" | "tavus:conversation-started" | "tavus:conversation-ended" | "tavus:error" | "tavus:state-change" | "tavus:chat-message"
|
|
29
36
|
/** Retained for type-back-compat; never emitted at runtime. */
|
|
@@ -57,6 +64,7 @@ export interface TavusEventMap {
|
|
|
57
64
|
"tavus:tool-call": {
|
|
58
65
|
name: string;
|
|
59
66
|
arguments: string;
|
|
67
|
+
tool_call_id?: string;
|
|
60
68
|
seq?: number;
|
|
61
69
|
turn_idx?: number;
|
|
62
70
|
};
|
|
@@ -66,7 +74,9 @@ export interface TavusEventMap {
|
|
|
66
74
|
}
|
|
67
75
|
export declare const TAVUS_EVENT_NAMES: TavusEventName[];
|
|
68
76
|
interface TavusElementTavusApi {
|
|
77
|
+
/** @deprecated Use the element's `startConversation()`; this is an alias of it. */
|
|
69
78
|
start?: () => Promise<void>;
|
|
79
|
+
/** @deprecated Use the element's `endConversation()`; this is an alias of it. */
|
|
70
80
|
end?: () => Promise<void>;
|
|
71
81
|
sendChat?: (text: string) => void;
|
|
72
82
|
sendMessage?: (interaction: TavusInteraction) => void;
|