From 20009aed53d8864c9204d43a17895168a777d2cc Mon Sep 17 00:00:00 2001 From: Ilan Bigio Date: Mon, 16 Dec 2024 13:06:08 -0800 Subject: Initial commit --- webapp/components/types.ts | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 webapp/components/types.ts (limited to 'webapp/components/types.ts') 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; + // For "function_call_output" items + output?: string; +}; + +export interface PhoneNumber { + sid: string; + friendlyName: string; + voiceUrl?: string; +} + +export type FunctionCall = { + name: string; + params: Record; + completed?: boolean; + response?: string; + status?: string; + call_id?: string; // ensure each call has a call_id +}; -- cgit v1.2.3