diff options
Diffstat (limited to 'webapp/components/types.ts')
| -rw-r--r-- | webapp/components/types.ts | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/webapp/components/types.ts b/webapp/components/types.ts new file mode 100644 index 0000000..76992b5 --- /dev/null +++ b/webapp/components/types.ts @@ -0,0 +1,31 @@ +export type Item = { + id: string; + object: string; // e.g. "realtime.item" + type: "message" | "function_call" | "function_call_output"; + timestamp?: string; + status?: "running" | "completed"; + // For "message" items + role?: "system" | "user" | "assistant" | "tool"; + content?: { type: string; text: string }[]; + // For "function_call" items + name?: string; + call_id?: string; + params?: Record<string, any>; + // For "function_call_output" items + output?: string; +}; + +export interface PhoneNumber { + sid: string; + friendlyName: string; + voiceUrl?: string; +} + +export type FunctionCall = { + name: string; + params: Record<string, any>; + completed?: boolean; + response?: string; + status?: string; + call_id?: string; // ensure each call has a call_id +}; |
