UNPKG

phonic

Version:

[![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2FPhonic-Co%2Fphonic-node) [![npm shield](htt

118 lines (117 loc) 4.55 kB
/** * This file was auto-generated by Fern from our API Definition. */ import * as Phonic from "../index.js"; export interface Conversation { /** The conversation ID. */ id: string; /** The agent associated with the conversation. */ agent: Conversation.Agent | null; /** The organization/workspace name. */ workspace: string; /** The project associated with the conversation. */ project: Conversation.Project; /** External ID for conversation tracking. */ external_id: string | null; /** The STS model used. */ model: string; /** Will be `true` if welcome message was automatically generated. */ generate_welcome_message: boolean; /** Welcome message played at start. Will be `null` when `generate_welcome_message` is `true`. */ welcome_message: string | null; /** Template variables used in the conversation. */ template_variables: Record<string, string>; /** Audio input format. */ input_format: string; /** Audio output format. */ output_format: string; /** Background noise level used in the conversation. */ background_noise_level: number; /** The background noise type used in the conversation. */ background_noise: Conversation.BackgroundNoise | null; /** Live transcript of the conversation. */ live_transcript: string; /** Post-call processed transcript. */ post_call_transcript: string | null; /** Duration of the conversation in milliseconds. */ duration_ms: number; /** Presigned URL to the conversation audio file. */ audio_url: string | null; /** When the conversation started. */ started_at: string; /** When the conversation ended. */ ended_at: string | null; /** Who or what ended the conversation. */ ended_by: Conversation.EndedBy | null; /** These words, or short phrases, are more accurately recognized by the model. */ boosted_keywords: string[] | null; /** Array of ISO 639-1 language codes recognized by the model. */ languages: string[] | null; /** Number of seconds of silence before a poke message is sent. `null` means the poke message is disabled. */ no_input_poke_sec: number | null; /** The message to send after the specified silence. Relevant only if `no_input_poke_sec` is not `null`. */ no_input_poke_text: string | null; /** Seconds of silence before the conversation is ended. */ no_input_end_conversation_sec: number | null; /** Results from conversation evaluations and extractions. */ task_results: Record<string, unknown>; /** Array of conversation items (turns). */ items: Phonic.ConversationItem[]; /** Phone call metadata. `null` for non-phone call conversations. */ call_info: Conversation.CallInfo | null; /** Analysis of the conversation including latencies and interruptions. */ analysis: Phonic.ConversationAnalysis; } export declare namespace Conversation { /** * The agent associated with the conversation. */ interface Agent { /** The ID of the agent. */ id: string; /** The name of the agent. */ name: string; /** Whether the agent has been deleted. */ is_deleted: boolean; } /** * The project associated with the conversation. */ interface Project { /** The ID of the project. */ id: string; /** The name of the project. */ name: string; } /** * The background noise type used in the conversation. */ type BackgroundNoise = "office" | "call-center" | "coffee-shop"; const BackgroundNoise: { readonly Office: "office"; readonly CallCenter: "call-center"; readonly CoffeeShop: "coffee-shop"; }; /** * Who or what ended the conversation. */ type EndedBy = "user" | "user_canceled" | "user_validation_failed" | "assistant" | "error"; const EndedBy: { readonly User: "user"; readonly UserCanceled: "user_canceled"; readonly UserValidationFailed: "user_validation_failed"; readonly Assistant: "assistant"; readonly Error: "error"; }; /** * Phone call metadata. `null` for non-phone call conversations. */ interface CallInfo { /** Caller phone number in E.164 format. */ from_phone_number: string; /** Callee phone number in E.164 format. */ to_phone_number: string; /** Twilio Call SID. Only present for user SIP trunking calls. */ twilio_call_sid?: string; } }