twilio 5.9.0 → 5.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +49 -0
- package/lib/rest/NumbersBase.d.ts +3 -0
- package/lib/rest/NumbersBase.js +5 -0
- package/lib/rest/OauthBase.d.ts +3 -0
- package/lib/rest/OauthBase.js +5 -0
- package/lib/rest/api/v2010/account/availablePhoneNumberCountry/local.d.ts +3 -3
- package/lib/rest/api/v2010/account/availablePhoneNumberCountry/machineToMachine.d.ts +3 -3
- package/lib/rest/api/v2010/account/availablePhoneNumberCountry/mobile.d.ts +3 -3
- package/lib/rest/api/v2010/account/availablePhoneNumberCountry/national.d.ts +3 -3
- package/lib/rest/api/v2010/account/availablePhoneNumberCountry/sharedCost.d.ts +3 -3
- package/lib/rest/api/v2010/account/availablePhoneNumberCountry/tollFree.d.ts +3 -3
- package/lib/rest/api/v2010/account/availablePhoneNumberCountry/voip.d.ts +3 -3
- package/lib/rest/api/v2010/account/recording.d.ts +1 -1
- package/lib/rest/assistants/v1/assistant/feedback.d.ts +2 -2
- package/lib/rest/assistants/v1/assistant/message.d.ts +1 -1
- package/lib/rest/assistants/v1/assistant.d.ts +20 -20
- package/lib/rest/assistants/v1/knowledge.d.ts +6 -6
- package/lib/rest/assistants/v1/tool.d.ts +8 -8
- package/lib/rest/content/v1/content.d.ts +39 -25
- package/lib/rest/content/v1/content.js +7 -1
- package/lib/rest/flexApi/v1/interaction/interactionChannel.d.ts +1 -1
- package/lib/rest/intelligence/v2/service.d.ts +10 -0
- package/lib/rest/intelligence/v2/service.js +6 -0
- package/lib/rest/intelligence/v2/transcript/encryptedOperatorResults.d.ts +113 -0
- package/lib/rest/intelligence/v2/transcript/encryptedOperatorResults.js +120 -0
- package/lib/rest/intelligence/v2/transcript/encryptedSentences.d.ts +113 -0
- package/lib/rest/intelligence/v2/transcript/encryptedSentences.js +120 -0
- package/lib/rest/intelligence/v2/transcript.d.ts +22 -0
- package/lib/rest/intelligence/v2/transcript.js +28 -0
- package/lib/rest/lookups/v2/lookupOverride.d.ts +1 -1
- package/lib/rest/lookups/v2/query.d.ts +71 -71
- package/lib/rest/marketplace/v1/installedAddOn/installedAddOnUsage.d.ts +2 -2
- package/lib/rest/marketplace/v1/referralConversion.d.ts +1 -1
- package/lib/rest/messaging/v2/channelsSender.d.ts +30 -30
- package/lib/rest/numbers/V3.d.ts +15 -0
- package/lib/rest/numbers/V3.js +37 -0
- package/lib/rest/numbers/v1/portingPortIn.d.ts +3 -3
- package/lib/rest/numbers/v3/hostedNumberOrder.d.ts +210 -0
- package/lib/rest/numbers/v3/hostedNumberOrder.js +154 -0
- package/lib/rest/oauth/V2.d.ts +15 -0
- package/lib/rest/oauth/V2.js +36 -0
- package/lib/rest/oauth/v2/token.d.ts +87 -0
- package/lib/rest/oauth/v2/token.js +99 -0
- package/lib/rest/previewIam/versionless/organization/roleAssignment.d.ts +1 -1
- package/lib/rest/pricing/v1/messaging/country.d.ts +6 -6
- package/lib/rest/pricing/v1/phoneNumber/country.d.ts +3 -3
- package/lib/rest/pricing/v1/voice/country.d.ts +6 -6
- package/lib/rest/pricing/v1/voice/number.d.ts +5 -5
- package/lib/rest/pricing/v2/country.d.ts +8 -8
- package/lib/rest/pricing/v2/number.d.ts +8 -8
- package/lib/rest/pricing/v2/voice/country.d.ts +8 -8
- package/lib/rest/pricing/v2/voice/number.d.ts +6 -6
- package/lib/rest/verify/V2.d.ts +5 -0
- package/lib/rest/verify/V2.js +6 -0
- package/lib/rest/verify/v2/newChallenge.d.ts +204 -0
- package/lib/rest/verify/v2/newChallenge.js +150 -0
- package/lib/rest/verify/v2/service/newFactor.d.ts +154 -0
- package/lib/rest/verify/v2/service/newFactor.js +118 -0
- package/lib/rest/verify/v2/service.d.ts +8 -0
- package/lib/rest/verify/v2/service.js +13 -0
- package/lib/twiml/VoiceResponse.d.ts +22 -0
- package/lib/twiml/VoiceResponse.js +19 -0
- package/lib-esm/index.js +49 -0
- package/lib-esm/package.json +3 -0
- package/package.json +15 -4
package/README.md
CHANGED
|
@@ -38,6 +38,7 @@ TypeScript is supported for TypeScript version 2.9 and above.
|
|
|
38
38
|
|
|
39
39
|
To make sure the installation was successful, try sending yourself an SMS message, like this:
|
|
40
40
|
|
|
41
|
+
**CommonJS:**
|
|
41
42
|
```js
|
|
42
43
|
// Your AccountSID and Auth Token from console.twilio.com
|
|
43
44
|
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
|
|
@@ -54,6 +55,25 @@ client.messages
|
|
|
54
55
|
.then((message) => console.log(message.sid));
|
|
55
56
|
```
|
|
56
57
|
|
|
58
|
+
**ESM/ES6 Modules:**
|
|
59
|
+
```js
|
|
60
|
+
// Your AccountSID and Auth Token from console.twilio.com
|
|
61
|
+
import twilio from 'twilio';
|
|
62
|
+
|
|
63
|
+
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
|
|
64
|
+
const authToken = 'your_auth_token';
|
|
65
|
+
|
|
66
|
+
const client = twilio(accountSid, authToken);
|
|
67
|
+
|
|
68
|
+
client.messages
|
|
69
|
+
.create({
|
|
70
|
+
body: 'Hello from twilio-node',
|
|
71
|
+
to: '+12345678901', // Text your number
|
|
72
|
+
from: '+12345678901', // From a valid Twilio number
|
|
73
|
+
})
|
|
74
|
+
.then((message) => console.log(message.sid));
|
|
75
|
+
```
|
|
76
|
+
|
|
57
77
|
After a brief delay, you will receive the text message on your phone.
|
|
58
78
|
|
|
59
79
|
> **Warning**
|
|
@@ -80,6 +100,7 @@ If your environment requires SSL decryption, you can set the path to CA bundle i
|
|
|
80
100
|
|
|
81
101
|
If you invoke any V2010 operations without specifying an account SID, `twilio-node` will automatically use the `TWILIO_ACCOUNT_SID` value that the client was initialized with. This is useful for when you'd like to, for example, fetch resources for your main account but also your subaccount. See below:
|
|
82
102
|
|
|
103
|
+
**CommonJS:**
|
|
83
104
|
```javascript
|
|
84
105
|
// Your Account SID, Subaccount SID Auth Token from console.twilio.com
|
|
85
106
|
const accountSid = process.env.TWILIO_ACCOUNT_SID;
|
|
@@ -91,10 +112,25 @@ const mainAccountCalls = client.api.v2010.account.calls.list; // SID not specifi
|
|
|
91
112
|
const subaccountCalls = client.api.v2010.account(subaccountSid).calls.list; // SID specified as subaccountSid
|
|
92
113
|
```
|
|
93
114
|
|
|
115
|
+
**ESM/ES6 Modules:**
|
|
116
|
+
```javascript
|
|
117
|
+
// Your Account SID, Subaccount SID Auth Token from console.twilio.com
|
|
118
|
+
import twilio from 'twilio';
|
|
119
|
+
|
|
120
|
+
const accountSid = process.env.TWILIO_ACCOUNT_SID;
|
|
121
|
+
const authToken = process.env.TWILIO_AUTH_TOKEN;
|
|
122
|
+
const subaccountSid = process.env.TWILIO_ACCOUNT_SUBACCOUNT_SID;
|
|
123
|
+
|
|
124
|
+
const client = twilio(accountSid, authToken);
|
|
125
|
+
const mainAccountCalls = client.api.v2010.account.calls.list; // SID not specified, so defaults to accountSid
|
|
126
|
+
const subaccountCalls = client.api.v2010.account(subaccountSid).calls.list; // SID specified as subaccountSid
|
|
127
|
+
```
|
|
128
|
+
|
|
94
129
|
### Lazy Loading
|
|
95
130
|
|
|
96
131
|
`twilio-node` supports lazy loading required modules for faster loading time. Lazy loading is enabled by default. To disable lazy loading, simply instantiate the Twilio client with the `lazyLoading` flag set to `false`:
|
|
97
132
|
|
|
133
|
+
**CommonJS:**
|
|
98
134
|
```javascript
|
|
99
135
|
// Your Account SID and Auth Token from console.twilio.com
|
|
100
136
|
const accountSid = process.env.TWILIO_ACCOUNT_SID;
|
|
@@ -105,6 +141,19 @@ const client = require('twilio')(accountSid, authToken, {
|
|
|
105
141
|
});
|
|
106
142
|
```
|
|
107
143
|
|
|
144
|
+
**ESM/ES6 Modules:**
|
|
145
|
+
```javascript
|
|
146
|
+
// Your Account SID and Auth Token from console.twilio.com
|
|
147
|
+
import twilio from 'twilio';
|
|
148
|
+
|
|
149
|
+
const accountSid = process.env.TWILIO_ACCOUNT_SID;
|
|
150
|
+
const authToken = process.env.TWILIO_AUTH_TOKEN;
|
|
151
|
+
|
|
152
|
+
const client = twilio(accountSid, authToken, {
|
|
153
|
+
lazyLoading: false,
|
|
154
|
+
});
|
|
155
|
+
```
|
|
156
|
+
|
|
108
157
|
### Enable Auto-Retry with Exponential Backoff
|
|
109
158
|
|
|
110
159
|
`twilio-node` supports automatic retry with exponential backoff when API requests receive an [Error 429 response](https://support.twilio.com/hc/en-us/articles/360044308153-Twilio-API-response-Error-429-Too-Many-Requests-). This retry with exponential backoff feature is disabled by default. To enable this feature, instantiate the Twilio client with the `autoRetry` flag set to `true`.
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import Domain from "../base/Domain";
|
|
2
2
|
import V1 from "./numbers/V1";
|
|
3
3
|
import V2 from "./numbers/V2";
|
|
4
|
+
import V3 from "./numbers/V3";
|
|
4
5
|
declare class NumbersBase extends Domain {
|
|
5
6
|
_v1?: V1;
|
|
6
7
|
_v2?: V2;
|
|
8
|
+
_v3?: V3;
|
|
7
9
|
/**
|
|
8
10
|
* Initialize numbers domain
|
|
9
11
|
*
|
|
@@ -12,5 +14,6 @@ declare class NumbersBase extends Domain {
|
|
|
12
14
|
constructor(twilio: any);
|
|
13
15
|
get v1(): V1;
|
|
14
16
|
get v2(): V2;
|
|
17
|
+
get v3(): V3;
|
|
15
18
|
}
|
|
16
19
|
export = NumbersBase;
|
package/lib/rest/NumbersBase.js
CHANGED
|
@@ -15,6 +15,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
15
15
|
const Domain_1 = __importDefault(require("../base/Domain"));
|
|
16
16
|
const V1_1 = __importDefault(require("./numbers/V1"));
|
|
17
17
|
const V2_1 = __importDefault(require("./numbers/V2"));
|
|
18
|
+
const V3_1 = __importDefault(require("./numbers/V3"));
|
|
18
19
|
class NumbersBase extends Domain_1.default {
|
|
19
20
|
/**
|
|
20
21
|
* Initialize numbers domain
|
|
@@ -32,5 +33,9 @@ class NumbersBase extends Domain_1.default {
|
|
|
32
33
|
this._v2 = this._v2 || new V2_1.default(this);
|
|
33
34
|
return this._v2;
|
|
34
35
|
}
|
|
36
|
+
get v3() {
|
|
37
|
+
this._v3 = this._v3 || new V3_1.default(this);
|
|
38
|
+
return this._v3;
|
|
39
|
+
}
|
|
35
40
|
}
|
|
36
41
|
module.exports = NumbersBase;
|
package/lib/rest/OauthBase.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import Domain from "../base/Domain";
|
|
2
2
|
import V1 from "./oauth/V1";
|
|
3
|
+
import V2 from "./oauth/V2";
|
|
3
4
|
declare class OauthBase extends Domain {
|
|
4
5
|
_v1?: V1;
|
|
6
|
+
_v2?: V2;
|
|
5
7
|
/**
|
|
6
8
|
* Initialize oauth domain
|
|
7
9
|
*
|
|
@@ -9,5 +11,6 @@ declare class OauthBase extends Domain {
|
|
|
9
11
|
*/
|
|
10
12
|
constructor(twilio: any);
|
|
11
13
|
get v1(): V1;
|
|
14
|
+
get v2(): V2;
|
|
12
15
|
}
|
|
13
16
|
export = OauthBase;
|
package/lib/rest/OauthBase.js
CHANGED
|
@@ -14,6 +14,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
};
|
|
15
15
|
const Domain_1 = __importDefault(require("../base/Domain"));
|
|
16
16
|
const V1_1 = __importDefault(require("./oauth/V1"));
|
|
17
|
+
const V2_1 = __importDefault(require("./oauth/V2"));
|
|
17
18
|
class OauthBase extends Domain_1.default {
|
|
18
19
|
/**
|
|
19
20
|
* Initialize oauth domain
|
|
@@ -27,5 +28,9 @@ class OauthBase extends Domain_1.default {
|
|
|
27
28
|
this._v1 = this._v1 || new V1_1.default(this);
|
|
28
29
|
return this._v1;
|
|
29
30
|
}
|
|
31
|
+
get v2() {
|
|
32
|
+
this._v2 = this._v2 || new V2_1.default(this);
|
|
33
|
+
return this._v2;
|
|
34
|
+
}
|
|
30
35
|
}
|
|
31
36
|
module.exports = OauthBase;
|
|
@@ -9,7 +9,7 @@ import { PhoneNumberCapabilities } from "../../../../../interfaces";
|
|
|
9
9
|
export interface LocalListInstanceEachOptions {
|
|
10
10
|
/** The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. */
|
|
11
11
|
areaCode?: number;
|
|
12
|
-
/**
|
|
12
|
+
/** Matching pattern to identify phone numbers. This pattern can be between 2 and 16 characters long and allows all digits (0-9) and all non-diacritic latin alphabet letters (a-z, A-Z). It accepts four meta-characters: `*`, `%`, `+`, `$`. The `*` and `%` meta-characters can appear multiple times in the pattern. To match wildcards at the beginning or end of the pattern, use `*` to match any single character or `%` to match a sequence of characters. If you use the wildcard patterns, it must include at least two non-meta-characters. To match the beginning of a pattern, start the pattern with `+`. To match the end of the pattern, append the pattern with `$`. These meta-characters can\'t be adjacent to each other. */
|
|
13
13
|
contains?: string;
|
|
14
14
|
/** Whether the phone numbers can receive text messages. Can be: `true` or `false`. */
|
|
15
15
|
smsEnabled?: boolean;
|
|
@@ -58,7 +58,7 @@ export interface LocalListInstanceEachOptions {
|
|
|
58
58
|
export interface LocalListInstanceOptions {
|
|
59
59
|
/** The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. */
|
|
60
60
|
areaCode?: number;
|
|
61
|
-
/**
|
|
61
|
+
/** Matching pattern to identify phone numbers. This pattern can be between 2 and 16 characters long and allows all digits (0-9) and all non-diacritic latin alphabet letters (a-z, A-Z). It accepts four meta-characters: `*`, `%`, `+`, `$`. The `*` and `%` meta-characters can appear multiple times in the pattern. To match wildcards at the beginning or end of the pattern, use `*` to match any single character or `%` to match a sequence of characters. If you use the wildcard patterns, it must include at least two non-meta-characters. To match the beginning of a pattern, start the pattern with `+`. To match the end of the pattern, append the pattern with `$`. These meta-characters can\'t be adjacent to each other. */
|
|
62
62
|
contains?: string;
|
|
63
63
|
/** Whether the phone numbers can receive text messages. Can be: `true` or `false`. */
|
|
64
64
|
smsEnabled?: boolean;
|
|
@@ -103,7 +103,7 @@ export interface LocalListInstanceOptions {
|
|
|
103
103
|
export interface LocalListInstancePageOptions {
|
|
104
104
|
/** The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. */
|
|
105
105
|
areaCode?: number;
|
|
106
|
-
/**
|
|
106
|
+
/** Matching pattern to identify phone numbers. This pattern can be between 2 and 16 characters long and allows all digits (0-9) and all non-diacritic latin alphabet letters (a-z, A-Z). It accepts four meta-characters: `*`, `%`, `+`, `$`. The `*` and `%` meta-characters can appear multiple times in the pattern. To match wildcards at the beginning or end of the pattern, use `*` to match any single character or `%` to match a sequence of characters. If you use the wildcard patterns, it must include at least two non-meta-characters. To match the beginning of a pattern, start the pattern with `+`. To match the end of the pattern, append the pattern with `$`. These meta-characters can\'t be adjacent to each other. */
|
|
107
107
|
contains?: string;
|
|
108
108
|
/** Whether the phone numbers can receive text messages. Can be: `true` or `false`. */
|
|
109
109
|
smsEnabled?: boolean;
|
|
@@ -9,7 +9,7 @@ import { PhoneNumberCapabilities } from "../../../../../interfaces";
|
|
|
9
9
|
export interface MachineToMachineListInstanceEachOptions {
|
|
10
10
|
/** The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. */
|
|
11
11
|
areaCode?: number;
|
|
12
|
-
/**
|
|
12
|
+
/** Matching pattern to identify phone numbers. This pattern can be between 2 and 16 characters long and allows all digits (0-9) and all non-diacritic latin alphabet letters (a-z, A-Z). It accepts four meta-characters: `*`, `%`, `+`, `$`. The `*` and `%` meta-characters can appear multiple times in the pattern. To match wildcards at the beginning or end of the pattern, use `*` to match any single character or `%` to match a sequence of characters. If you use the wildcard patterns, it must include at least two non-meta-characters. To match the beginning of a pattern, start the pattern with `+`. To match the end of the pattern, append the pattern with `$`. These meta-characters can\'t be adjacent to each other. */
|
|
13
13
|
contains?: string;
|
|
14
14
|
/** Whether the phone numbers can receive text messages. Can be: `true` or `false`. */
|
|
15
15
|
smsEnabled?: boolean;
|
|
@@ -58,7 +58,7 @@ export interface MachineToMachineListInstanceEachOptions {
|
|
|
58
58
|
export interface MachineToMachineListInstanceOptions {
|
|
59
59
|
/** The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. */
|
|
60
60
|
areaCode?: number;
|
|
61
|
-
/**
|
|
61
|
+
/** Matching pattern to identify phone numbers. This pattern can be between 2 and 16 characters long and allows all digits (0-9) and all non-diacritic latin alphabet letters (a-z, A-Z). It accepts four meta-characters: `*`, `%`, `+`, `$`. The `*` and `%` meta-characters can appear multiple times in the pattern. To match wildcards at the beginning or end of the pattern, use `*` to match any single character or `%` to match a sequence of characters. If you use the wildcard patterns, it must include at least two non-meta-characters. To match the beginning of a pattern, start the pattern with `+`. To match the end of the pattern, append the pattern with `$`. These meta-characters can\'t be adjacent to each other. */
|
|
62
62
|
contains?: string;
|
|
63
63
|
/** Whether the phone numbers can receive text messages. Can be: `true` or `false`. */
|
|
64
64
|
smsEnabled?: boolean;
|
|
@@ -103,7 +103,7 @@ export interface MachineToMachineListInstanceOptions {
|
|
|
103
103
|
export interface MachineToMachineListInstancePageOptions {
|
|
104
104
|
/** The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. */
|
|
105
105
|
areaCode?: number;
|
|
106
|
-
/**
|
|
106
|
+
/** Matching pattern to identify phone numbers. This pattern can be between 2 and 16 characters long and allows all digits (0-9) and all non-diacritic latin alphabet letters (a-z, A-Z). It accepts four meta-characters: `*`, `%`, `+`, `$`. The `*` and `%` meta-characters can appear multiple times in the pattern. To match wildcards at the beginning or end of the pattern, use `*` to match any single character or `%` to match a sequence of characters. If you use the wildcard patterns, it must include at least two non-meta-characters. To match the beginning of a pattern, start the pattern with `+`. To match the end of the pattern, append the pattern with `$`. These meta-characters can\'t be adjacent to each other. */
|
|
107
107
|
contains?: string;
|
|
108
108
|
/** Whether the phone numbers can receive text messages. Can be: `true` or `false`. */
|
|
109
109
|
smsEnabled?: boolean;
|
|
@@ -9,7 +9,7 @@ import { PhoneNumberCapabilities } from "../../../../../interfaces";
|
|
|
9
9
|
export interface MobileListInstanceEachOptions {
|
|
10
10
|
/** The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. */
|
|
11
11
|
areaCode?: number;
|
|
12
|
-
/**
|
|
12
|
+
/** Matching pattern to identify phone numbers. This pattern can be between 2 and 16 characters long and allows all digits (0-9) and all non-diacritic latin alphabet letters (a-z, A-Z). It accepts four meta-characters: `*`, `%`, `+`, `$`. The `*` and `%` meta-characters can appear multiple times in the pattern. To match wildcards at the beginning or end of the pattern, use `*` to match any single character or `%` to match a sequence of characters. If you use the wildcard patterns, it must include at least two non-meta-characters. To match the beginning of a pattern, start the pattern with `+`. To match the end of the pattern, append the pattern with `$`. These meta-characters can\'t be adjacent to each other. */
|
|
13
13
|
contains?: string;
|
|
14
14
|
/** Whether the phone numbers can receive text messages. Can be: `true` or `false`. */
|
|
15
15
|
smsEnabled?: boolean;
|
|
@@ -58,7 +58,7 @@ export interface MobileListInstanceEachOptions {
|
|
|
58
58
|
export interface MobileListInstanceOptions {
|
|
59
59
|
/** The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. */
|
|
60
60
|
areaCode?: number;
|
|
61
|
-
/**
|
|
61
|
+
/** Matching pattern to identify phone numbers. This pattern can be between 2 and 16 characters long and allows all digits (0-9) and all non-diacritic latin alphabet letters (a-z, A-Z). It accepts four meta-characters: `*`, `%`, `+`, `$`. The `*` and `%` meta-characters can appear multiple times in the pattern. To match wildcards at the beginning or end of the pattern, use `*` to match any single character or `%` to match a sequence of characters. If you use the wildcard patterns, it must include at least two non-meta-characters. To match the beginning of a pattern, start the pattern with `+`. To match the end of the pattern, append the pattern with `$`. These meta-characters can\'t be adjacent to each other. */
|
|
62
62
|
contains?: string;
|
|
63
63
|
/** Whether the phone numbers can receive text messages. Can be: `true` or `false`. */
|
|
64
64
|
smsEnabled?: boolean;
|
|
@@ -103,7 +103,7 @@ export interface MobileListInstanceOptions {
|
|
|
103
103
|
export interface MobileListInstancePageOptions {
|
|
104
104
|
/** The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. */
|
|
105
105
|
areaCode?: number;
|
|
106
|
-
/**
|
|
106
|
+
/** Matching pattern to identify phone numbers. This pattern can be between 2 and 16 characters long and allows all digits (0-9) and all non-diacritic latin alphabet letters (a-z, A-Z). It accepts four meta-characters: `*`, `%`, `+`, `$`. The `*` and `%` meta-characters can appear multiple times in the pattern. To match wildcards at the beginning or end of the pattern, use `*` to match any single character or `%` to match a sequence of characters. If you use the wildcard patterns, it must include at least two non-meta-characters. To match the beginning of a pattern, start the pattern with `+`. To match the end of the pattern, append the pattern with `$`. These meta-characters can\'t be adjacent to each other. */
|
|
107
107
|
contains?: string;
|
|
108
108
|
/** Whether the phone numbers can receive text messages. Can be: `true` or `false`. */
|
|
109
109
|
smsEnabled?: boolean;
|
|
@@ -9,7 +9,7 @@ import { PhoneNumberCapabilities } from "../../../../../interfaces";
|
|
|
9
9
|
export interface NationalListInstanceEachOptions {
|
|
10
10
|
/** The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. */
|
|
11
11
|
areaCode?: number;
|
|
12
|
-
/**
|
|
12
|
+
/** Matching pattern to identify phone numbers. This pattern can be between 2 and 16 characters long and allows all digits (0-9) and all non-diacritic latin alphabet letters (a-z, A-Z). It accepts four meta-characters: `*`, `%`, `+`, `$`. The `*` and `%` meta-characters can appear multiple times in the pattern. To match wildcards at the beginning or end of the pattern, use `*` to match any single character or `%` to match a sequence of characters. If you use the wildcard patterns, it must include at least two non-meta-characters. To match the beginning of a pattern, start the pattern with `+`. To match the end of the pattern, append the pattern with `$`. These meta-characters can\'t be adjacent to each other. */
|
|
13
13
|
contains?: string;
|
|
14
14
|
/** Whether the phone numbers can receive text messages. Can be: `true` or `false`. */
|
|
15
15
|
smsEnabled?: boolean;
|
|
@@ -58,7 +58,7 @@ export interface NationalListInstanceEachOptions {
|
|
|
58
58
|
export interface NationalListInstanceOptions {
|
|
59
59
|
/** The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. */
|
|
60
60
|
areaCode?: number;
|
|
61
|
-
/**
|
|
61
|
+
/** Matching pattern to identify phone numbers. This pattern can be between 2 and 16 characters long and allows all digits (0-9) and all non-diacritic latin alphabet letters (a-z, A-Z). It accepts four meta-characters: `*`, `%`, `+`, `$`. The `*` and `%` meta-characters can appear multiple times in the pattern. To match wildcards at the beginning or end of the pattern, use `*` to match any single character or `%` to match a sequence of characters. If you use the wildcard patterns, it must include at least two non-meta-characters. To match the beginning of a pattern, start the pattern with `+`. To match the end of the pattern, append the pattern with `$`. These meta-characters can\'t be adjacent to each other. */
|
|
62
62
|
contains?: string;
|
|
63
63
|
/** Whether the phone numbers can receive text messages. Can be: `true` or `false`. */
|
|
64
64
|
smsEnabled?: boolean;
|
|
@@ -103,7 +103,7 @@ export interface NationalListInstanceOptions {
|
|
|
103
103
|
export interface NationalListInstancePageOptions {
|
|
104
104
|
/** The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. */
|
|
105
105
|
areaCode?: number;
|
|
106
|
-
/**
|
|
106
|
+
/** Matching pattern to identify phone numbers. This pattern can be between 2 and 16 characters long and allows all digits (0-9) and all non-diacritic latin alphabet letters (a-z, A-Z). It accepts four meta-characters: `*`, `%`, `+`, `$`. The `*` and `%` meta-characters can appear multiple times in the pattern. To match wildcards at the beginning or end of the pattern, use `*` to match any single character or `%` to match a sequence of characters. If you use the wildcard patterns, it must include at least two non-meta-characters. To match the beginning of a pattern, start the pattern with `+`. To match the end of the pattern, append the pattern with `$`. These meta-characters can\'t be adjacent to each other. */
|
|
107
107
|
contains?: string;
|
|
108
108
|
/** Whether the phone numbers can receive text messages. Can be: `true` or `false`. */
|
|
109
109
|
smsEnabled?: boolean;
|
|
@@ -9,7 +9,7 @@ import { PhoneNumberCapabilities } from "../../../../../interfaces";
|
|
|
9
9
|
export interface SharedCostListInstanceEachOptions {
|
|
10
10
|
/** The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. */
|
|
11
11
|
areaCode?: number;
|
|
12
|
-
/**
|
|
12
|
+
/** Matching pattern to identify phone numbers. This pattern can be between 2 and 16 characters long and allows all digits (0-9) and all non-diacritic latin alphabet letters (a-z, A-Z). It accepts four meta-characters: `*`, `%`, `+`, `$`. The `*` and `%` meta-characters can appear multiple times in the pattern. To match wildcards at the beginning or end of the pattern, use `*` to match any single character or `%` to match a sequence of characters. If you use the wildcard patterns, it must include at least two non-meta-characters. To match the beginning of a pattern, start the pattern with `+`. To match the end of the pattern, append the pattern with `$`. These meta-characters can\'t be adjacent to each other. */
|
|
13
13
|
contains?: string;
|
|
14
14
|
/** Whether the phone numbers can receive text messages. Can be: `true` or `false`. */
|
|
15
15
|
smsEnabled?: boolean;
|
|
@@ -58,7 +58,7 @@ export interface SharedCostListInstanceEachOptions {
|
|
|
58
58
|
export interface SharedCostListInstanceOptions {
|
|
59
59
|
/** The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. */
|
|
60
60
|
areaCode?: number;
|
|
61
|
-
/**
|
|
61
|
+
/** Matching pattern to identify phone numbers. This pattern can be between 2 and 16 characters long and allows all digits (0-9) and all non-diacritic latin alphabet letters (a-z, A-Z). It accepts four meta-characters: `*`, `%`, `+`, `$`. The `*` and `%` meta-characters can appear multiple times in the pattern. To match wildcards at the beginning or end of the pattern, use `*` to match any single character or `%` to match a sequence of characters. If you use the wildcard patterns, it must include at least two non-meta-characters. To match the beginning of a pattern, start the pattern with `+`. To match the end of the pattern, append the pattern with `$`. These meta-characters can\'t be adjacent to each other. */
|
|
62
62
|
contains?: string;
|
|
63
63
|
/** Whether the phone numbers can receive text messages. Can be: `true` or `false`. */
|
|
64
64
|
smsEnabled?: boolean;
|
|
@@ -103,7 +103,7 @@ export interface SharedCostListInstanceOptions {
|
|
|
103
103
|
export interface SharedCostListInstancePageOptions {
|
|
104
104
|
/** The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. */
|
|
105
105
|
areaCode?: number;
|
|
106
|
-
/**
|
|
106
|
+
/** Matching pattern to identify phone numbers. This pattern can be between 2 and 16 characters long and allows all digits (0-9) and all non-diacritic latin alphabet letters (a-z, A-Z). It accepts four meta-characters: `*`, `%`, `+`, `$`. The `*` and `%` meta-characters can appear multiple times in the pattern. To match wildcards at the beginning or end of the pattern, use `*` to match any single character or `%` to match a sequence of characters. If you use the wildcard patterns, it must include at least two non-meta-characters. To match the beginning of a pattern, start the pattern with `+`. To match the end of the pattern, append the pattern with `$`. These meta-characters can\'t be adjacent to each other. */
|
|
107
107
|
contains?: string;
|
|
108
108
|
/** Whether the phone numbers can receive text messages. Can be: `true` or `false`. */
|
|
109
109
|
smsEnabled?: boolean;
|
|
@@ -9,7 +9,7 @@ import { PhoneNumberCapabilities } from "../../../../../interfaces";
|
|
|
9
9
|
export interface TollFreeListInstanceEachOptions {
|
|
10
10
|
/** The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. */
|
|
11
11
|
areaCode?: number;
|
|
12
|
-
/**
|
|
12
|
+
/** Matching pattern to identify phone numbers. This pattern can be between 2 and 16 characters long and allows all digits (0-9) and all non-diacritic latin alphabet letters (a-z, A-Z). It accepts four meta-characters: `*`, `%`, `+`, `$`. The `*` and `%` meta-characters can appear multiple times in the pattern. To match wildcards at the beginning or end of the pattern, use `*` to match any single character or `%` to match a sequence of characters. If you use the wildcard patterns, it must include at least two non-meta-characters. To match the beginning of a pattern, start the pattern with `+`. To match the end of the pattern, append the pattern with `$`. These meta-characters can\'t be adjacent to each other. */
|
|
13
13
|
contains?: string;
|
|
14
14
|
/** Whether the phone numbers can receive text messages. Can be: `true` or `false`. */
|
|
15
15
|
smsEnabled?: boolean;
|
|
@@ -58,7 +58,7 @@ export interface TollFreeListInstanceEachOptions {
|
|
|
58
58
|
export interface TollFreeListInstanceOptions {
|
|
59
59
|
/** The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. */
|
|
60
60
|
areaCode?: number;
|
|
61
|
-
/**
|
|
61
|
+
/** Matching pattern to identify phone numbers. This pattern can be between 2 and 16 characters long and allows all digits (0-9) and all non-diacritic latin alphabet letters (a-z, A-Z). It accepts four meta-characters: `*`, `%`, `+`, `$`. The `*` and `%` meta-characters can appear multiple times in the pattern. To match wildcards at the beginning or end of the pattern, use `*` to match any single character or `%` to match a sequence of characters. If you use the wildcard patterns, it must include at least two non-meta-characters. To match the beginning of a pattern, start the pattern with `+`. To match the end of the pattern, append the pattern with `$`. These meta-characters can\'t be adjacent to each other. */
|
|
62
62
|
contains?: string;
|
|
63
63
|
/** Whether the phone numbers can receive text messages. Can be: `true` or `false`. */
|
|
64
64
|
smsEnabled?: boolean;
|
|
@@ -103,7 +103,7 @@ export interface TollFreeListInstanceOptions {
|
|
|
103
103
|
export interface TollFreeListInstancePageOptions {
|
|
104
104
|
/** The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. */
|
|
105
105
|
areaCode?: number;
|
|
106
|
-
/**
|
|
106
|
+
/** Matching pattern to identify phone numbers. This pattern can be between 2 and 16 characters long and allows all digits (0-9) and all non-diacritic latin alphabet letters (a-z, A-Z). It accepts four meta-characters: `*`, `%`, `+`, `$`. The `*` and `%` meta-characters can appear multiple times in the pattern. To match wildcards at the beginning or end of the pattern, use `*` to match any single character or `%` to match a sequence of characters. If you use the wildcard patterns, it must include at least two non-meta-characters. To match the beginning of a pattern, start the pattern with `+`. To match the end of the pattern, append the pattern with `$`. These meta-characters can\'t be adjacent to each other. */
|
|
107
107
|
contains?: string;
|
|
108
108
|
/** Whether the phone numbers can receive text messages. Can be: `true` or `false`. */
|
|
109
109
|
smsEnabled?: boolean;
|
|
@@ -9,7 +9,7 @@ import { PhoneNumberCapabilities } from "../../../../../interfaces";
|
|
|
9
9
|
export interface VoipListInstanceEachOptions {
|
|
10
10
|
/** The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. */
|
|
11
11
|
areaCode?: number;
|
|
12
|
-
/**
|
|
12
|
+
/** Matching pattern to identify phone numbers. This pattern can be between 2 and 16 characters long and allows all digits (0-9) and all non-diacritic latin alphabet letters (a-z, A-Z). It accepts four meta-characters: `*`, `%`, `+`, `$`. The `*` and `%` meta-characters can appear multiple times in the pattern. To match wildcards at the beginning or end of the pattern, use `*` to match any single character or `%` to match a sequence of characters. If you use the wildcard patterns, it must include at least two non-meta-characters. To match the beginning of a pattern, start the pattern with `+`. To match the end of the pattern, append the pattern with `$`. These meta-characters can\'t be adjacent to each other. */
|
|
13
13
|
contains?: string;
|
|
14
14
|
/** Whether the phone numbers can receive text messages. Can be: `true` or `false`. */
|
|
15
15
|
smsEnabled?: boolean;
|
|
@@ -58,7 +58,7 @@ export interface VoipListInstanceEachOptions {
|
|
|
58
58
|
export interface VoipListInstanceOptions {
|
|
59
59
|
/** The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. */
|
|
60
60
|
areaCode?: number;
|
|
61
|
-
/**
|
|
61
|
+
/** Matching pattern to identify phone numbers. This pattern can be between 2 and 16 characters long and allows all digits (0-9) and all non-diacritic latin alphabet letters (a-z, A-Z). It accepts four meta-characters: `*`, `%`, `+`, `$`. The `*` and `%` meta-characters can appear multiple times in the pattern. To match wildcards at the beginning or end of the pattern, use `*` to match any single character or `%` to match a sequence of characters. If you use the wildcard patterns, it must include at least two non-meta-characters. To match the beginning of a pattern, start the pattern with `+`. To match the end of the pattern, append the pattern with `$`. These meta-characters can\'t be adjacent to each other. */
|
|
62
62
|
contains?: string;
|
|
63
63
|
/** Whether the phone numbers can receive text messages. Can be: `true` or `false`. */
|
|
64
64
|
smsEnabled?: boolean;
|
|
@@ -103,7 +103,7 @@ export interface VoipListInstanceOptions {
|
|
|
103
103
|
export interface VoipListInstancePageOptions {
|
|
104
104
|
/** The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. */
|
|
105
105
|
areaCode?: number;
|
|
106
|
-
/**
|
|
106
|
+
/** Matching pattern to identify phone numbers. This pattern can be between 2 and 16 characters long and allows all digits (0-9) and all non-diacritic latin alphabet letters (a-z, A-Z). It accepts four meta-characters: `*`, `%`, `+`, `$`. The `*` and `%` meta-characters can appear multiple times in the pattern. To match wildcards at the beginning or end of the pattern, use `*` to match any single character or `%` to match a sequence of characters. If you use the wildcard patterns, it must include at least two non-meta-characters. To match the beginning of a pattern, start the pattern with `+`. To match the end of the pattern, append the pattern with `$`. These meta-characters can\'t be adjacent to each other. */
|
|
107
107
|
contains?: string;
|
|
108
108
|
/** Whether the phone numbers can receive text messages. Can be: `true` or `false`. */
|
|
109
109
|
smsEnabled?: boolean;
|
|
@@ -220,7 +220,7 @@ export declare class RecordingInstance {
|
|
|
220
220
|
priceUnit: string;
|
|
221
221
|
status: RecordingStatus;
|
|
222
222
|
/**
|
|
223
|
-
* The number of channels in the
|
|
223
|
+
* The number of channels in the recording resource. For information on specifying the number of channels in the downloaded recording file, check out [Fetch a Recording’s media file](https://www.twilio.com/docs/voice/api/recording#download-dual-channel-media-file).
|
|
224
224
|
*/
|
|
225
225
|
channels: number;
|
|
226
226
|
source: RecordingSource;
|
|
@@ -6,7 +6,7 @@ export declare class AssistantsV1ServiceCreateFeedbackRequest {
|
|
|
6
6
|
/**
|
|
7
7
|
* The message ID.
|
|
8
8
|
*/
|
|
9
|
-
"
|
|
9
|
+
"messageId"?: string;
|
|
10
10
|
/**
|
|
11
11
|
* The score to be given(0-1).
|
|
12
12
|
*/
|
|
@@ -14,7 +14,7 @@ export declare class AssistantsV1ServiceCreateFeedbackRequest {
|
|
|
14
14
|
/**
|
|
15
15
|
* The Session ID.
|
|
16
16
|
*/
|
|
17
|
-
"
|
|
17
|
+
"sessionId": string;
|
|
18
18
|
/**
|
|
19
19
|
* The text to be given as feedback.
|
|
20
20
|
*/
|
|
@@ -7,7 +7,7 @@ import { AssistantsToolListInstance } from "./assistant/assistantsTool";
|
|
|
7
7
|
import { FeedbackListInstance } from "./assistant/feedback";
|
|
8
8
|
import { MessageListInstance } from "./assistant/message";
|
|
9
9
|
export declare class AssistantsV1ServiceCreateAssistantRequest {
|
|
10
|
-
"
|
|
10
|
+
"customerAi"?: AssistantsV1ServiceCustomerAi;
|
|
11
11
|
/**
|
|
12
12
|
* The name of the assistant.
|
|
13
13
|
*/
|
|
@@ -19,18 +19,18 @@ export declare class AssistantsV1ServiceCreateAssistantRequest {
|
|
|
19
19
|
/**
|
|
20
20
|
* The personality prompt to be used for assistant.
|
|
21
21
|
*/
|
|
22
|
-
"
|
|
23
|
-
"
|
|
22
|
+
"personalityPrompt"?: string;
|
|
23
|
+
"segmentCredential"?: AssistantsV1ServiceSegmentCredential;
|
|
24
24
|
}
|
|
25
25
|
export declare class AssistantsV1ServiceCustomerAi {
|
|
26
26
|
/**
|
|
27
27
|
* True if the perception engine is enabled.
|
|
28
28
|
*/
|
|
29
|
-
"
|
|
29
|
+
"perceptionEngineEnabled": boolean;
|
|
30
30
|
/**
|
|
31
31
|
* True if the personalization engine is enabled.
|
|
32
32
|
*/
|
|
33
|
-
"
|
|
33
|
+
"personalizationEngineEnabled": boolean;
|
|
34
34
|
}
|
|
35
35
|
export declare class AssistantsV1ServiceKnowledge {
|
|
36
36
|
/**
|
|
@@ -44,11 +44,11 @@ export declare class AssistantsV1ServiceKnowledge {
|
|
|
44
44
|
/**
|
|
45
45
|
* The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Knowledge resource.
|
|
46
46
|
*/
|
|
47
|
-
"
|
|
47
|
+
"accountSid"?: string;
|
|
48
48
|
/**
|
|
49
49
|
* The details of the knowledge source based on the type.
|
|
50
50
|
*/
|
|
51
|
-
"
|
|
51
|
+
"knowledgeSourceDetails"?: Record<string, object>;
|
|
52
52
|
/**
|
|
53
53
|
* The name of the knowledge source.
|
|
54
54
|
*/
|
|
@@ -68,35 +68,35 @@ export declare class AssistantsV1ServiceKnowledge {
|
|
|
68
68
|
/**
|
|
69
69
|
* The embedding model to be used for the knowledge source.
|
|
70
70
|
*/
|
|
71
|
-
"
|
|
71
|
+
"embeddingModel"?: string;
|
|
72
72
|
/**
|
|
73
73
|
* The date and time in GMT when the Knowledge was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
74
74
|
*/
|
|
75
|
-
"
|
|
75
|
+
"dateCreated": Date;
|
|
76
76
|
/**
|
|
77
77
|
* The date and time in GMT when the Knowledge was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
78
78
|
*/
|
|
79
|
-
"
|
|
79
|
+
"dateUpdated": Date;
|
|
80
80
|
}
|
|
81
81
|
export declare class AssistantsV1ServiceSegmentCredential {
|
|
82
82
|
/**
|
|
83
83
|
* The profile API key.
|
|
84
84
|
*/
|
|
85
|
-
"
|
|
85
|
+
"profileApiKey"?: string;
|
|
86
86
|
/**
|
|
87
87
|
* The space ID.
|
|
88
88
|
*/
|
|
89
|
-
"
|
|
89
|
+
"spaceId"?: string;
|
|
90
90
|
/**
|
|
91
91
|
* The write key.
|
|
92
92
|
*/
|
|
93
|
-
"
|
|
93
|
+
"writeKey"?: string;
|
|
94
94
|
}
|
|
95
95
|
export declare class AssistantsV1ServiceTool {
|
|
96
96
|
/**
|
|
97
97
|
* The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Tool resource.
|
|
98
98
|
*/
|
|
99
|
-
"
|
|
99
|
+
"accountSid"?: string;
|
|
100
100
|
/**
|
|
101
101
|
* The description of the tool.
|
|
102
102
|
*/
|
|
@@ -120,7 +120,7 @@ export declare class AssistantsV1ServiceTool {
|
|
|
120
120
|
/**
|
|
121
121
|
* The authentication requirement for the tool.
|
|
122
122
|
*/
|
|
123
|
-
"
|
|
123
|
+
"requiresAuth": boolean;
|
|
124
124
|
/**
|
|
125
125
|
* The type of the tool. (\'WEBHOOK\')
|
|
126
126
|
*/
|
|
@@ -132,14 +132,14 @@ export declare class AssistantsV1ServiceTool {
|
|
|
132
132
|
/**
|
|
133
133
|
* The date and time in GMT when the Tool was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
134
134
|
*/
|
|
135
|
-
"
|
|
135
|
+
"dateCreated": Date;
|
|
136
136
|
/**
|
|
137
137
|
* The date and time in GMT when the Tool was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
138
138
|
*/
|
|
139
|
-
"
|
|
139
|
+
"dateUpdated": Date;
|
|
140
140
|
}
|
|
141
141
|
export declare class AssistantsV1ServiceUpdateAssistantRequest {
|
|
142
|
-
"
|
|
142
|
+
"customerAi"?: AssistantsV1ServiceCustomerAi;
|
|
143
143
|
/**
|
|
144
144
|
* The name of the assistant.
|
|
145
145
|
*/
|
|
@@ -151,8 +151,8 @@ export declare class AssistantsV1ServiceUpdateAssistantRequest {
|
|
|
151
151
|
/**
|
|
152
152
|
* The personality prompt to be used for assistant.
|
|
153
153
|
*/
|
|
154
|
-
"
|
|
155
|
-
"
|
|
154
|
+
"personalityPrompt"?: string;
|
|
155
|
+
"segmentCredential"?: AssistantsV1ServiceSegmentCredential;
|
|
156
156
|
}
|
|
157
157
|
/**
|
|
158
158
|
* Options to pass to update a AssistantInstance
|