phonic
Version:
[](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2FPhonic-Co%2Fphonic-node) [ • 3.12 kB
TypeScript
/**
* This file was auto-generated by Fern from our API Definition.
*/
export interface ConversationItem {
/** Index of the item in the conversation. */
item_idx: number;
/** Who spoke in this turn. */
role: ConversationItem.Role;
/** Live transcript of this turn. */
live_transcript: string;
/** Post-call processed transcript. */
post_call_transcript: string | null;
/** Duration of this turn in milliseconds. */
duration_ms: number;
/** When this turn started. */
started_at: string;
/** Voice ID used (assistant only). */
voice_id?: string;
/** Audio speed used (assistant only). */
audio_speed?: number;
/** System prompt used for this assistant turn. */
system_prompt?: string;
/** Tool calls made by the assistant. */
tool_calls?: ConversationItem.ToolCalls.Item[];
}
export declare namespace ConversationItem {
/**
* Who spoke in this turn.
*/
type Role = "user" | "assistant";
const Role: {
readonly User: "user";
readonly Assistant: "assistant";
};
type ToolCalls = ToolCalls.Item[];
namespace ToolCalls {
interface Item {
/** The tool call ID. */
id: string;
tool: Item.Tool;
/** HTTP method for webhook tool calls. */
endpoint_method?: string | null;
/** URL for webhook tool calls. */
endpoint_url?: string | null;
/** Headers for webhook tool calls. */
endpoint_headers?: Record<string, string | null> | null;
/** Timeout in milliseconds for webhook tool calls. */
endpoint_timeout_ms?: number | null;
/** When the webhook endpoint was called (null on error). */
endpoint_called_at?: string | null;
/** Query parameters for webhook tool calls (null on error or when no params). */
query_params?: Record<string, unknown> | null;
/** HTTP response status code for webhook tool calls (null on error). */
response_status_code?: number | null;
/** Timeout in milliseconds for websocket tool calls. */
tool_call_output_timeout_ms?: number | null;
/** The request body sent to the tool. Can be any JSON-serializable value. */
request_body: Item.RequestBody | null;
/** The response body received from the tool. */
response_body: Record<string, unknown> | null;
/** Whether the tool call timed out. */
timed_out: boolean | null;
/** Error message if the tool call failed. */
error_message: string | null;
}
namespace Item {
interface Tool {
/** The tool ID. */
id: string;
/** The tool name. */
name: string;
}
/**
* The request body sent to the tool. Can be any JSON-serializable value.
*/
type RequestBody = Record<string, unknown> | unknown[] | string | number | boolean;
}
}
}