webapp/components/types.ts (26 lines of code) (raw):

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 };