-
Notifications
You must be signed in to change notification settings - Fork 180
/
CreateCallRequest.ts
55 lines (49 loc) · 1.37 KB
/
CreateCallRequest.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import { OutboundCall } from '../OutboundCall';
import { AdvancedMachineDetection } from '../AdvancedMachineDetection';
import { MachineDetection } from '../../enums';
/**
* Represents the request payload for creating a call, including various call settings.
*
* @remarks
* Vonage API's will return information using `snake_case`. This represents the
* pure response before the client will transform the keys into `camelCase`.
*/
export type CreateCallRequest = {
/**
* Specifies whether to use a random caller number for the call.
*/
random_from_number?: boolean;
/**
* An array of URLs for event callbacks during the call's lifecycle.
*/
event_url?: Array<string>;
/**
* The type of machine detection to use for the call.
*/
machine_detection?: MachineDetection;
/**
* Advanced machine detection settings, including beep timeout.
*/
advanced_machine_detection: {
/**
* The beep timeout setting for advanced machine detection.
*/
beep_timeout?: number;
} & Omit<AdvancedMachineDetection, 'beepTimeout'>;
/**
* The length timer setting for the call.
*/
length_timer?: number;
/**
* The ringing timer setting for the call.
*/
ringing_timer?: number;
} & Omit<
OutboundCall,
| 'randomFromNumber'
| 'eventUrl'
| 'machineDetection'
| 'advancedMachineDetection'
| 'lengthTimer'
| 'ringingTimer'
>;