@vonage/voice
Version:
The Voice API lets you create outbound calls, control in-progress calls and get information about historical calls.
59 lines (56 loc) • 1.74 kB
text/typescript
import { XOR } from 'ts-xor';
import { NCCOAction } from '../NCCO/NCCOActions.mjs';
import '../NCCO/RecordAction.mjs';
import '../../enums/NCCOActions.mjs';
import '../../enums/NCCO/RecordingFormat.mjs';
import '../NCCO/ConversationAction.mjs';
import '../NCCO/ConnectAction.mjs';
import '../Endpoint/CallEndpoint.mjs';
import '../Endpoint/PhoneEndpoint.mjs';
import '../Endpoint/SIPEndpoint.mjs';
import '../Endpoint/VBCEndpoint.mjs';
import '../Endpoint/WebsocketEndpoint.mjs';
import '../Endpoint/WebsocketAuthorization.mjs';
import '../../enums/Endpoint/WebsocketBitrate.mjs';
import '../Endpoint/AppEndpoint.mjs';
import '../../enums/NCCO/ConnectEventType.mjs';
import '../../enums/NCCO/MachineDetection.mjs';
import '../NCCO/TalkAction.mjs';
import '../../enums/TTSLanguages.mjs';
import '../NCCO/StreamAction.mjs';
import '../NCCO/InputAction.mjs';
import '../NCCO/DTMFSettings.mjs';
import '../NCCO/SpeechSettings.mjs';
import '../NCCO/NotifyAction.mjs';
import '../NCCO/WaitAction.mjs';
/**
* 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 };