UNPKG

@tixae-labs/web-sdk

Version:

Javascript Web SDK for doing WebRTC AI Voice Calls with TIXAE Agents.

23 lines (20 loc) 848 B
import TypedEmitter from "typed-emitter"; import EventEmitter from "events"; import type { AppTranscriptPayload, OnConversationUpdated, } from "../../../../src/app/Types/firebase"; // ----------------------------------------------------------- // 1. EVENT TYPE DEFINITIONS // ----------------------------------------------------------- export type WebCallEventsEmitter = { "call-start": () => void; "call-end": () => void; "call-ended": () => void; "state-change": (state: "idle" | "connecting" | "connected") => void; "error": (error: unknown) => void; "conversation-update": (payload: OnConversationUpdated) => void; "final_transcript": (payload: AppTranscriptPayload) => void; "mute-change": (isMuted: boolean) => void; }; export class TypedWebCall extends (EventEmitter as new () => TypedEmitter<WebCallEventsEmitter>) {}