/
client.ts
51 lines (47 loc) · 967 Bytes
/
client.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
/** @module @twilio-labs/serverless-api */
type BaseClientConfig = {
/**
* Twilio Region
*/
region?: string;
/**
* Twilio Edge
*/
edge?: string;
/**
* Limit concurrency
*/
concurrency?: number;
/**
* Number of retry attempts the client will make on a failure
*/
retryLimit?: number;
/**
* Additional information to pass to the User-Agent. !!!Should not contain sensitive information
*/
userAgentExtensions?: string[];
};
export type AccountSidConfig = BaseClientConfig & {
/**
* Twilio AccountSID or API Key
*/
accountSid: string;
/**
* Twilio Auth Token or API Secret
*/
authToken: string;
};
export type UsernameConfig = BaseClientConfig & {
/**
* Twilio AccountSID or API Key
*/
username: string;
/**
* Twilio Auth Token or API Secret
*/
password: string;
};
/**
* Config to set up a API request client
*/
export type ClientConfig = AccountSidConfig | UsernameConfig;