twilio 5.8.2 → 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 +103 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.js +2 -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/api/v2010/account/usage/record/allTime.d.ts +9 -10
- package/lib/rest/api/v2010/account/usage/record/daily.d.ts +9 -10
- package/lib/rest/api/v2010/account/usage/record/lastMonth.d.ts +9 -10
- package/lib/rest/api/v2010/account/usage/record/monthly.d.ts +9 -10
- package/lib/rest/api/v2010/account/usage/record/thisMonth.d.ts +9 -10
- package/lib/rest/api/v2010/account/usage/record/today.d.ts +9 -10
- package/lib/rest/api/v2010/account/usage/record/yearly.d.ts +9 -10
- package/lib/rest/api/v2010/account/usage/record/yesterday.d.ts +9 -10
- package/lib/rest/api/v2010/account/usage/record.d.ts +9 -10
- package/lib/rest/api/v2010/account/usage/trigger.d.ts +11 -12
- package/lib/rest/api/v2010/account/usage.d.ts +0 -4
- 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 +41 -25
- package/lib/rest/content/v1/content.js +7 -1
- package/lib/rest/flexApi/v1/interaction/interactionChannel.d.ts +1 -1
- package/lib/rest/insights/v1/room/participant.d.ts +1 -1
- package/lib/rest/insights/v1/room.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 +71 -71
- package/lib/rest/messaging/v2/channelsSender.js +6 -6
- 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`.
|
|
@@ -270,6 +319,60 @@ try {
|
|
|
270
319
|
}
|
|
271
320
|
```
|
|
272
321
|
|
|
322
|
+
#### Using RestException for Better Error Handling
|
|
323
|
+
|
|
324
|
+
For more specific error handling, you can import and use `RestException` directly:
|
|
325
|
+
|
|
326
|
+
**ESM/ES6 Modules:**
|
|
327
|
+
```js
|
|
328
|
+
import twilio from 'twilio';
|
|
329
|
+
const { RestException } = twilio;
|
|
330
|
+
|
|
331
|
+
const client = twilio(accountSid, authToken);
|
|
332
|
+
|
|
333
|
+
try {
|
|
334
|
+
const message = await client.messages.create({
|
|
335
|
+
body: 'Hello from Node',
|
|
336
|
+
to: '+12345678901',
|
|
337
|
+
from: '+12345678901',
|
|
338
|
+
});
|
|
339
|
+
console.log(message);
|
|
340
|
+
} catch (error) {
|
|
341
|
+
if (error instanceof RestException) {
|
|
342
|
+
console.log(`Twilio Error ${error.code}: ${error.message}`);
|
|
343
|
+
console.log(`Status: ${error.status}`);
|
|
344
|
+
console.log(`More info: ${error.moreInfo}`);
|
|
345
|
+
} else {
|
|
346
|
+
console.error('Other error:', error);
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
**CommonJS:**
|
|
352
|
+
```js
|
|
353
|
+
const twilio = require('twilio');
|
|
354
|
+
const { RestException } = require('twilio');
|
|
355
|
+
|
|
356
|
+
const client = twilio(accountSid, authToken);
|
|
357
|
+
|
|
358
|
+
client.messages
|
|
359
|
+
.create({
|
|
360
|
+
body: 'Hello from Node',
|
|
361
|
+
to: '+12345678901',
|
|
362
|
+
from: '+12345678901',
|
|
363
|
+
})
|
|
364
|
+
.then((message) => console.log(message))
|
|
365
|
+
.catch((error) => {
|
|
366
|
+
if (error instanceof RestException) {
|
|
367
|
+
console.log(`Twilio Error ${error.code}: ${error.message}`);
|
|
368
|
+
console.log(`Status: ${error.status}`);
|
|
369
|
+
console.log(`More info: ${error.moreInfo}`);
|
|
370
|
+
} else {
|
|
371
|
+
console.error('Other error:', error);
|
|
372
|
+
}
|
|
373
|
+
});
|
|
374
|
+
```
|
|
375
|
+
|
|
273
376
|
If you are using callbacks, error information will be included in the `error` parameter of the callback.
|
|
274
377
|
|
|
275
378
|
400-level errors are [normal during API operation](https://www.twilio.com/docs/api/rest/request#get-responses) ("Invalid number", "Cannot deliver SMS to that number", for example) and should be handled appropriately.
|
package/lib/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import ITwilio from "./rest/Twilio";
|
|
|
2
2
|
import * as webhooks from "./webhooks/webhooks";
|
|
3
3
|
import IRequestClient from "./base/RequestClient";
|
|
4
4
|
import type { ClientOpts as IClientOpts } from "./base/BaseTwilio";
|
|
5
|
+
import IRestException from "./base/RestException";
|
|
5
6
|
import IAccessToken from "./jwt/AccessToken";
|
|
6
7
|
import IValidationToken from "./jwt/validation/ValidationToken";
|
|
7
8
|
import IClientCapability from "./jwt/ClientCapability";
|
|
@@ -40,6 +41,8 @@ declare namespace TwilioSDK {
|
|
|
40
41
|
}
|
|
41
42
|
type RequestClient = IRequestClient;
|
|
42
43
|
const RequestClient: typeof IRequestClient;
|
|
44
|
+
type RestException = IRestException;
|
|
45
|
+
const RestException: typeof IRestException;
|
|
43
46
|
type ClientCredentialProviderBuilder = IClientCredentialProvider.ClientCredentialProviderBuilder;
|
|
44
47
|
const ClientCredentialProviderBuilder: typeof IClientCredentialProvider.ClientCredentialProviderBuilder;
|
|
45
48
|
type OrgsCredentialProviderBuilder = IOrgsCredentialProvider.OrgsCredentialProviderBuilder;
|
package/lib/index.js
CHANGED
|
@@ -38,6 +38,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
38
38
|
const Twilio_1 = __importDefault(require("./rest/Twilio"));
|
|
39
39
|
const webhooks = __importStar(require("./webhooks/webhooks"));
|
|
40
40
|
const RequestClient_1 = __importDefault(require("./base/RequestClient"));
|
|
41
|
+
const RestException_1 = __importDefault(require("./base/RestException"));
|
|
41
42
|
const AccessToken_1 = __importDefault(require("./jwt/AccessToken"));
|
|
42
43
|
const ValidationToken_1 = __importDefault(require("./jwt/validation/ValidationToken"));
|
|
43
44
|
const ClientCapability_1 = __importDefault(require("./jwt/ClientCapability"));
|
|
@@ -73,6 +74,7 @@ function TwilioSDK(accountSid, authToken, opts) {
|
|
|
73
74
|
twiml.FaxResponse = FaxResponse_1.default;
|
|
74
75
|
})(twiml = TwilioSDK.twiml || (TwilioSDK.twiml = {}));
|
|
75
76
|
TwilioSDK.RequestClient = RequestClient_1.default;
|
|
77
|
+
TwilioSDK.RestException = RestException_1.default;
|
|
76
78
|
TwilioSDK.ClientCredentialProviderBuilder = ClientCredentialProvider_1.default.ClientCredentialProviderBuilder;
|
|
77
79
|
TwilioSDK.OrgsCredentialProviderBuilder = OrgsCredentialProvider_1.default.OrgsCredentialProviderBuilder;
|
|
78
80
|
TwilioSDK.NoAuthCredentialProvider = NoAuthCredentialProvider_1.default.NoAuthCredentialProvider;
|
|
@@ -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;
|