UNPKG

@vonage/voice

Version:

The Voice API lets you create outbound calls, control in-progress calls and get information about historical calls.

56 lines (53 loc) 1.59 kB
import { XOR } from 'ts-xor'; import { NCCOAction } from '../NCCO/NCCOActions.js'; import '../NCCO/RecordAction.js'; import '../../enums/NCCOActions.js'; import '../../enums/NCCO/RecordingFormat.js'; import '../NCCO/ConversationAction.js'; import '../NCCO/ConnectAction.js'; import '../Endpoint/CallEndpoint.js'; import '../Endpoint/PhoneEndpoint.js'; import '../Endpoint/SIPEndpoint.js'; import '../Endpoint/VBCEndpoint.js'; import '../Endpoint/WebsocketEndpoint.js'; import '../Endpoint/AppEndpoint.js'; import '../../enums/NCCO/ConnectEventType.js'; import '../../enums/NCCO/MachineDetection.js'; import '../NCCO/TalkAction.js'; import '../../enums/TTSLanguages.js'; import '../NCCO/StreamAction.js'; import '../NCCO/InputAction.js'; import '../NCCO/DTMFSettings.js'; import '../NCCO/SpeechSettings.js'; import '../NCCO/NotifyAction.js'; /** * Destination using URL. */ type TransferWithURL = { ncco: Array<NCCOAction>; }; /** * Destination using NCCO. */ type TransferWithNCCO = { url: Array<string>; }; /** * Represents parameters for transferring a call to another destination. */ type TransferCallParameters = { /** * The action type indicating a call transfer. */ action: 'transfer'; /** * The destination of the transfer, which can be specified using NCCO or a URL. */ destination: { /** * The type of destination, either 'ncco' for NCCO-based transfer or 'url' for URL-based transfer. */ type: 'ncco'; } & XOR<TransferWithURL, TransferWithNCCO>; }; export type { TransferCallParameters };