@signalwire/realtime-api
Version:
SignalWire RealTime SDK for Node.js
39 lines • 1.74 kB
TypeScript
import { VoiceCallCollectContract, CallingCallCollectEventParams } from '@signalwire/core';
import { ListenSubscriber } from '../../ListenSubscriber';
import { CallCollectEvents, CallCollectListeners, CallCollectListenersEventsMapping } from '../../types';
import { Call } from '../Call';
export interface CallCollectOptions {
call: Call;
payload: CallingCallCollectEventParams;
listeners?: CallCollectListeners;
}
export declare class CallCollect extends ListenSubscriber<CallCollectListeners, CallCollectEvents> implements VoiceCallCollectContract {
private _payload;
protected _eventMap: CallCollectListenersEventsMapping;
constructor(options: CallCollectOptions);
get id(): string;
get controlId(): string;
get callId(): string;
get nodeId(): string;
get result(): import("@signalwire/core").CallingCallCollectResult;
get type(): "error" | "no_input" | "digit" | "no_match" | "start_of_input" | "speech";
/**
* User-friendly alias to understand the reason in case of errors
* no_match | no_input | error
*/
get reason(): "error" | "no_input" | "digit" | "no_match" | "start_of_input" | "speech";
get digits(): string | undefined;
get speech(): string | undefined;
get terminator(): string | undefined;
get text(): string | undefined;
get confidence(): number | undefined;
get state(): import("@signalwire/core").CallingCallCollectState | undefined;
get final(): boolean | undefined;
get hasEnded(): boolean;
/** @internal */
setPayload(payload: CallingCallCollectEventParams): void;
stop(): Promise<this>;
startInputTimers(): Promise<this>;
ended(): Promise<this>;
}
//# sourceMappingURL=CallCollect.d.ts.map