twilio 3.77.0 → 3.77.3
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/lib/rest/Lookups.d.ts +2 -0
- package/lib/rest/Lookups.js +11 -0
- package/lib/rest/Twilio.d.ts +1 -3
- package/lib/rest/Twilio.js +3 -17
- package/lib/rest/api/v2010/account/call/payment.d.ts +1 -1
- package/lib/rest/api/v2010/account/call/payment.js +1 -1
- package/lib/rest/api/v2010/account/recording.d.ts +2 -0
- package/lib/rest/api/v2010/account/recording.js +2 -0
- package/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelInvite.d.ts +5 -5
- package/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelInvite.js +10 -9
- package/lib/rest/flexApi/v1/interaction/interactionChannel.d.ts +8 -8
- package/lib/rest/flexApi/v1/interaction/interactionChannel.js +12 -13
- package/lib/rest/flexApi/v1/interaction.js +2 -1
- package/lib/rest/lookups/V2.d.ts +25 -0
- package/lib/rest/lookups/V2.js +47 -0
- package/lib/rest/lookups/v2/phoneNumber.d.ts +182 -0
- package/lib/rest/lookups/v2/phoneNumber.js +362 -0
- package/lib/rest/media/v1/mediaRecording.d.ts +2 -2
- package/lib/rest/media/v1/mediaRecording.js +2 -2
- package/lib/rest/verify/v2/service/verification.d.ts +3 -1
- package/lib/rest/verify/v2/service/verification.js +3 -0
- package/lib/rest/verify/v2/service/verificationCheck.d.ts +1 -1
- package/lib/twiml/VoiceResponse.d.ts +79 -4
- package/lib/twiml/VoiceResponse.js +110 -3
- package/package.json +1 -1
- package/lib/rest/Fax.d.ts +0 -26
- package/lib/rest/Fax.js +0 -54
- package/lib/rest/fax/V1.d.ts +0 -25
- package/lib/rest/fax/V1.js +0 -46
- package/lib/rest/fax/v1/fax/faxMedia.d.ts +0 -310
- package/lib/rest/fax/v1/fax/faxMedia.js +0 -633
- package/lib/rest/fax/v1/fax.d.ts +0 -367
- package/lib/rest/fax/v1/fax.js +0 -700
package/lib/rest/Lookups.d.ts
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
import Domain = require('../base/Domain');
|
|
9
9
|
import Twilio = require('./Twilio');
|
|
10
10
|
import V1 = require('./lookups/V1');
|
|
11
|
+
import V2 = require('./lookups/V2');
|
|
11
12
|
import { PhoneNumberListInstance } from './lookups/v1/phoneNumber';
|
|
12
13
|
|
|
13
14
|
|
|
@@ -21,6 +22,7 @@ declare class Lookups extends Domain {
|
|
|
21
22
|
|
|
22
23
|
readonly phoneNumbers: PhoneNumberListInstance;
|
|
23
24
|
readonly v1: V1;
|
|
25
|
+
readonly v2: V2;
|
|
24
26
|
}
|
|
25
27
|
|
|
26
28
|
export = Lookups;
|
package/lib/rest/Lookups.js
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
var _ = require('lodash'); /* jshint ignore:line */
|
|
13
13
|
var Domain = require('../base/Domain'); /* jshint ignore:line */
|
|
14
14
|
var V1 = require('./lookups/V1'); /* jshint ignore:line */
|
|
15
|
+
var V2 = require('./lookups/V2'); /* jshint ignore:line */
|
|
15
16
|
|
|
16
17
|
|
|
17
18
|
/* jshint ignore:start */
|
|
@@ -21,6 +22,7 @@ var V1 = require('./lookups/V1'); /* jshint ignore:line */
|
|
|
21
22
|
* @constructor Twilio.Lookups
|
|
22
23
|
*
|
|
23
24
|
* @property {Twilio.Lookups.V1} v1 - v1 version
|
|
25
|
+
* @property {Twilio.Lookups.V2} v2 - v2 version
|
|
24
26
|
* @property {Twilio.Lookups.V1.PhoneNumberList} phoneNumbers -
|
|
25
27
|
* phoneNumbers resource
|
|
26
28
|
*
|
|
@@ -32,6 +34,7 @@ function Lookups(twilio) {
|
|
|
32
34
|
|
|
33
35
|
// Versions
|
|
34
36
|
this._v1 = undefined;
|
|
37
|
+
this._v2 = undefined;
|
|
35
38
|
}
|
|
36
39
|
|
|
37
40
|
_.extend(Lookups.prototype, Domain.prototype);
|
|
@@ -45,6 +48,14 @@ Object.defineProperty(Lookups.prototype,
|
|
|
45
48
|
}
|
|
46
49
|
});
|
|
47
50
|
|
|
51
|
+
Object.defineProperty(Lookups.prototype,
|
|
52
|
+
'v2', {
|
|
53
|
+
get: function() {
|
|
54
|
+
this._v2 = this._v2 || new V2(this);
|
|
55
|
+
return this._v2;
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
|
|
48
59
|
Object.defineProperty(Lookups.prototype,
|
|
49
60
|
'phoneNumbers', {
|
|
50
61
|
get: function() {
|
package/lib/rest/Twilio.d.ts
CHANGED
|
@@ -12,7 +12,6 @@ import Bulkexports = require('./Bulkexports');
|
|
|
12
12
|
import Chat = require('./Chat');
|
|
13
13
|
import Conversations = require('./Conversations');
|
|
14
14
|
import Events = require('./Events');
|
|
15
|
-
import Fax = require('./Fax');
|
|
16
15
|
import FlexApi = require('./FlexApi');
|
|
17
16
|
import FrontlineApi = require('./FrontlineApi');
|
|
18
17
|
import Insights = require('./Insights');
|
|
@@ -64,7 +63,6 @@ declare class Twilio {
|
|
|
64
63
|
connectApps: (typeof Api.prototype.account.connectApps);
|
|
65
64
|
conversations: Conversations;
|
|
66
65
|
events: Events;
|
|
67
|
-
fax: Fax;
|
|
68
66
|
flexApi: FlexApi;
|
|
69
67
|
frontlineApi: FrontlineApi;
|
|
70
68
|
httpClient?: RequestClient;
|
|
@@ -157,7 +155,7 @@ declare namespace Twilio {
|
|
|
157
155
|
* @property edge - Twilio edge to use. Defaults to none
|
|
158
156
|
* @property env - The environment object. Defaults to process.env
|
|
159
157
|
* @property httpClient - The client used for http requests. Defaults to RequestClient
|
|
160
|
-
* @property lazyLoading - Enable lazy loading, loading time will decrease if enabled
|
|
158
|
+
* @property lazyLoading - Enable lazy loading, loading time will decrease if enabled. Defaults to true
|
|
161
159
|
* @property logLevel - Debug logs will be shown. Defaults to none
|
|
162
160
|
* @property region - Twilio region to use. Defaults to us1 if edge defined
|
|
163
161
|
* @property userAgentExtensions - Additions to the user agent string
|
package/lib/rest/Twilio.js
CHANGED
|
@@ -28,7 +28,6 @@ var RestException = require('../base/RestException'); /* jshint ignore:line */
|
|
|
28
28
|
* @property {Twilio.Chat} chat - chat domain
|
|
29
29
|
* @property {Twilio.Conversations} conversations - conversations domain
|
|
30
30
|
* @property {Twilio.Events} events - events domain
|
|
31
|
-
* @property {Twilio.Fax} fax - fax domain
|
|
32
31
|
* @property {Twilio.FlexApi} flexApi - flex_api domain
|
|
33
32
|
* @property {Twilio.FrontlineApi} frontlineApi - frontline_api domain
|
|
34
33
|
* @property {Twilio.Insights} insights - insights domain
|
|
@@ -111,7 +110,7 @@ var RestException = require('../base/RestException'); /* jshint ignore:line */
|
|
|
111
110
|
* @param {string} [opts.region] -
|
|
112
111
|
* Twilio region to use. Defaults to us1 if edge defined
|
|
113
112
|
* @param {boolean} [opts.lazyLoading] -
|
|
114
|
-
* Enable lazy loading, loading time will decrease if enabled
|
|
113
|
+
* Enable lazy loading, loading time will decrease if enabled. Defaults to true
|
|
115
114
|
* @param {string} [opts.logLevel] - Debug logs will be shown. Defaults to none
|
|
116
115
|
* @param {string[]} [opts.userAgentExtensions] -
|
|
117
116
|
* Additions to the user agent string
|
|
@@ -127,7 +126,7 @@ function Twilio(username, password, opts) {
|
|
|
127
126
|
this.password = password || env.TWILIO_AUTH_TOKEN;
|
|
128
127
|
this.accountSid = opts.accountSid || this.username;
|
|
129
128
|
this._httpClient = opts.httpClient;
|
|
130
|
-
if (
|
|
129
|
+
if (opts.lazyLoading == false) {
|
|
131
130
|
this._httpClient = this.httpClient;
|
|
132
131
|
}
|
|
133
132
|
this.edge = opts.edge || env.TWILIO_EDGE;
|
|
@@ -154,7 +153,6 @@ function Twilio(username, password, opts) {
|
|
|
154
153
|
this._chat = undefined;
|
|
155
154
|
this._conversations = undefined;
|
|
156
155
|
this._events = undefined;
|
|
157
|
-
this._fax = undefined;
|
|
158
156
|
this._flexApi = undefined;
|
|
159
157
|
this._frontlineApi = undefined;
|
|
160
158
|
this._insights = undefined;
|
|
@@ -181,14 +179,13 @@ function Twilio(username, password, opts) {
|
|
|
181
179
|
this._supersim = undefined;
|
|
182
180
|
this._bulkexports = undefined;
|
|
183
181
|
|
|
184
|
-
if (
|
|
182
|
+
if (opts.lazyLoading == false) {
|
|
185
183
|
this.accounts;
|
|
186
184
|
this.api;
|
|
187
185
|
this.autopilot;
|
|
188
186
|
this.chat;
|
|
189
187
|
this.conversations;
|
|
190
188
|
this.events;
|
|
191
|
-
this.fax;
|
|
192
189
|
this.flexApi;
|
|
193
190
|
this.frontlineApi;
|
|
194
191
|
this.insights;
|
|
@@ -428,17 +425,6 @@ Object.defineProperty(Twilio.prototype,
|
|
|
428
425
|
}
|
|
429
426
|
});
|
|
430
427
|
|
|
431
|
-
Object.defineProperty(Twilio.prototype,
|
|
432
|
-
'fax', {
|
|
433
|
-
get: function() {
|
|
434
|
-
if (!this._fax) {
|
|
435
|
-
var Fax = require('./Fax'); /* jshint ignore:line */
|
|
436
|
-
this._fax = new Fax(this);
|
|
437
|
-
}
|
|
438
|
-
return this._fax;
|
|
439
|
-
}
|
|
440
|
-
});
|
|
441
|
-
|
|
442
428
|
Object.defineProperty(Twilio.prototype,
|
|
443
429
|
'flexApi', {
|
|
444
430
|
get: function() {
|
|
@@ -83,7 +83,7 @@ interface PaymentListInstance {
|
|
|
83
83
|
* @property input - A list of inputs that should be accepted. Currently only `dtmf` is supported.
|
|
84
84
|
* @property minPostalCodeLength - A positive integer that is used to validate the length of the `PostalCode` inputted by the user.
|
|
85
85
|
* @property parameter - A single-level JSON object used to pass custom parameters to payment processors. (Required for ACH payments)
|
|
86
|
-
* @property paymentConnector - This is the unique name corresponding to the
|
|
86
|
+
* @property paymentConnector - This is the unique name corresponding to the Pay Connector installed in the Twilio Add-ons.
|
|
87
87
|
* @property paymentMethod - Type of payment being captured.
|
|
88
88
|
* @property postalCode - Indicates whether the credit card PostalCode (zip code) is a required piece of payment information that must be provided by the caller.
|
|
89
89
|
* @property securityCode - Indicates whether the credit card security code is a required piece of payment information that must be provided by the caller.
|
|
@@ -85,7 +85,7 @@ PaymentList = function PaymentList(version, accountSid, callSid) {
|
|
|
85
85
|
* @param {object} [opts.parameter] -
|
|
86
86
|
* A single-level JSON object used to pass custom parameters to payment processors. (Required for ACH payments)
|
|
87
87
|
* @param {string} [opts.paymentConnector] -
|
|
88
|
-
* This is the unique name corresponding to the
|
|
88
|
+
* This is the unique name corresponding to the Pay Connector installed in the Twilio Add-ons.
|
|
89
89
|
* @param {payment.payment_method} [opts.paymentMethod] -
|
|
90
90
|
* Type of payment being captured.
|
|
91
91
|
* @param {boolean} [opts.postalCode] -
|
|
@@ -255,6 +255,7 @@ interface RecordingResource {
|
|
|
255
255
|
duration: string;
|
|
256
256
|
encryption_details: object;
|
|
257
257
|
error_code: number;
|
|
258
|
+
media_url: string;
|
|
258
259
|
price: string;
|
|
259
260
|
price_unit: string;
|
|
260
261
|
sid: string;
|
|
@@ -347,6 +348,7 @@ declare class RecordingInstance extends SerializableClass {
|
|
|
347
348
|
* @param callback - Callback to handle processed record
|
|
348
349
|
*/
|
|
349
350
|
fetch(opts?: RecordingInstanceFetchOptions, callback?: (error: Error | null, items: RecordingInstance) => any): Promise<RecordingInstance>;
|
|
351
|
+
mediaUrl: string;
|
|
350
352
|
price: string;
|
|
351
353
|
priceUnit: string;
|
|
352
354
|
/**
|
|
@@ -472,6 +472,7 @@ RecordingPage.prototype[util.inspect.custom] = function inspect(depth, options)
|
|
|
472
472
|
* @property {object} encryptionDetails - How to decrypt the recording.
|
|
473
473
|
* @property {string} subresourceUris -
|
|
474
474
|
* A list of related resources identified by their relative URIs
|
|
475
|
+
* @property {string} mediaUrl - The URL of the media file.
|
|
475
476
|
*
|
|
476
477
|
* @param {V2010} version - Version of the resource
|
|
477
478
|
* @param {RecordingPayload} payload - The instance payload
|
|
@@ -502,6 +503,7 @@ RecordingInstance = function RecordingInstance(version, payload, accountSid,
|
|
|
502
503
|
this.uri = payload.uri; // jshint ignore:line
|
|
503
504
|
this.encryptionDetails = payload.encryption_details; // jshint ignore:line
|
|
504
505
|
this.subresourceUris = payload.subresource_uris; // jshint ignore:line
|
|
506
|
+
this.mediaUrl = payload.media_url; // jshint ignore:line
|
|
505
507
|
|
|
506
508
|
// Context
|
|
507
509
|
this._context = undefined;
|
|
@@ -18,8 +18,8 @@ type InteractionChannelInviteType = 'taskrouter';
|
|
|
18
18
|
* Initialize the InteractionChannelInviteList
|
|
19
19
|
*
|
|
20
20
|
* @param version - Version of the resource
|
|
21
|
-
* @param interactionSid - The
|
|
22
|
-
* @param channelSid - The
|
|
21
|
+
* @param interactionSid - The Interaction SID for this Channel
|
|
22
|
+
* @param channelSid - The Channel SID for this Invite
|
|
23
23
|
*/
|
|
24
24
|
declare function InteractionChannelInviteList(version: V1, interactionSid: string, channelSid: string): InteractionChannelInviteListInstance;
|
|
25
25
|
|
|
@@ -138,7 +138,7 @@ interface InteractionChannelInviteListInstance {
|
|
|
138
138
|
/**
|
|
139
139
|
* Options to pass to create
|
|
140
140
|
*
|
|
141
|
-
* @property routing - The routing
|
|
141
|
+
* @property routing - The Interaction's routing logic
|
|
142
142
|
*/
|
|
143
143
|
interface InteractionChannelInviteListInstanceCreateOptions {
|
|
144
144
|
routing: object;
|
|
@@ -224,8 +224,8 @@ declare class InteractionChannelInviteInstance extends SerializableClass {
|
|
|
224
224
|
*
|
|
225
225
|
* @param version - Version of the resource
|
|
226
226
|
* @param payload - The instance payload
|
|
227
|
-
* @param interactionSid - The
|
|
228
|
-
* @param channelSid - The
|
|
227
|
+
* @param interactionSid - The Interaction SID for this Channel
|
|
228
|
+
* @param channelSid - The Channel SID for this Invite
|
|
229
229
|
*/
|
|
230
230
|
constructor(version: V1, payload: InteractionChannelInvitePayload, interactionSid: string, channelSid: string);
|
|
231
231
|
|
|
@@ -28,8 +28,8 @@ var InteractionChannelInviteInstance;
|
|
|
28
28
|
* @constructor Twilio.FlexApi.V1.InteractionContext.InteractionChannelContext.InteractionChannelInviteList
|
|
29
29
|
*
|
|
30
30
|
* @param {Twilio.FlexApi.V1} version - Version of the resource
|
|
31
|
-
* @param {string} interactionSid - The
|
|
32
|
-
* @param {string} channelSid - The
|
|
31
|
+
* @param {string} interactionSid - The Interaction SID for this Channel
|
|
32
|
+
* @param {string} channelSid - The Channel SID for this Invite
|
|
33
33
|
*/
|
|
34
34
|
/* jshint ignore:end */
|
|
35
35
|
InteractionChannelInviteList = function InteractionChannelInviteList(version,
|
|
@@ -63,7 +63,7 @@ InteractionChannelInviteList = function InteractionChannelInviteList(version,
|
|
|
63
63
|
* @memberof Twilio.FlexApi.V1.InteractionContext.InteractionChannelContext.InteractionChannelInviteList#
|
|
64
64
|
*
|
|
65
65
|
* @param {object} opts - Options for request
|
|
66
|
-
* @param {object} opts.routing - The routing
|
|
66
|
+
* @param {object} opts.routing - The Interaction's routing logic
|
|
67
67
|
* @param {function} [callback] - Callback to handle processed record
|
|
68
68
|
*
|
|
69
69
|
* @returns {Promise} Resolves to processed InteractionChannelInviteInstance
|
|
@@ -444,16 +444,17 @@ InteractionChannelInvitePage.prototype[util.inspect.custom] = function
|
|
|
444
444
|
*
|
|
445
445
|
* @constructor Twilio.FlexApi.V1.InteractionContext.InteractionChannelContext.InteractionChannelInviteInstance
|
|
446
446
|
*
|
|
447
|
-
* @property {string} sid - The
|
|
448
|
-
* @property {string} interactionSid - The
|
|
449
|
-
* @property {string} channelSid - The
|
|
450
|
-
* @property {object} routing -
|
|
447
|
+
* @property {string} sid - The unique string that identifies the resource
|
|
448
|
+
* @property {string} interactionSid - The Interaction SID for this Channel
|
|
449
|
+
* @property {string} channelSid - The Channel SID for this Invite
|
|
450
|
+
* @property {object} routing -
|
|
451
|
+
* A JSON object representing the routing rules for the Interaction Channel
|
|
451
452
|
* @property {string} url - The url
|
|
452
453
|
*
|
|
453
454
|
* @param {V1} version - Version of the resource
|
|
454
455
|
* @param {InteractionChannelInvitePayload} payload - The instance payload
|
|
455
|
-
* @param {sid} interactionSid - The
|
|
456
|
-
* @param {sid} channelSid - The
|
|
456
|
+
* @param {sid} interactionSid - The Interaction SID for this Channel
|
|
457
|
+
* @param {sid} channelSid - The Channel SID for this Invite
|
|
457
458
|
*/
|
|
458
459
|
/* jshint ignore:end */
|
|
459
460
|
InteractionChannelInviteInstance = function
|
|
@@ -22,15 +22,15 @@ type InteractionChannelType = 'voice'|'sms'|'email'|'web'|'whatsapp'|'chat';
|
|
|
22
22
|
* Initialize the InteractionChannelList
|
|
23
23
|
*
|
|
24
24
|
* @param version - Version of the resource
|
|
25
|
-
* @param interactionSid - The
|
|
25
|
+
* @param interactionSid - The unique string that identifies the resource
|
|
26
26
|
*/
|
|
27
27
|
declare function InteractionChannelList(version: V1, interactionSid: string): InteractionChannelListInstance;
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* Options to pass to update
|
|
31
31
|
*
|
|
32
|
-
* @property routing - The
|
|
33
|
-
* @property status - The Interaction
|
|
32
|
+
* @property routing - Optional. The state of associated tasks.
|
|
33
|
+
* @property status - Required. The Interaction channels's status
|
|
34
34
|
*/
|
|
35
35
|
interface InteractionChannelInstanceUpdateOptions {
|
|
36
36
|
routing?: object;
|
|
@@ -76,7 +76,7 @@ interface InteractionChannelListInstance {
|
|
|
76
76
|
/**
|
|
77
77
|
* Constructs a interaction_channel
|
|
78
78
|
*
|
|
79
|
-
* @param sid - The
|
|
79
|
+
* @param sid - The unique string that identifies the resource
|
|
80
80
|
*/
|
|
81
81
|
get(sid: string): InteractionChannelContext;
|
|
82
82
|
/**
|
|
@@ -230,8 +230,8 @@ declare class InteractionChannelContext {
|
|
|
230
230
|
* Initialize the InteractionChannelContext
|
|
231
231
|
*
|
|
232
232
|
* @param version - Version of the resource
|
|
233
|
-
* @param interactionSid - The
|
|
234
|
-
* @param sid - The
|
|
233
|
+
* @param interactionSid - The unique string that identifies the resource
|
|
234
|
+
* @param sid - The unique string that identifies the resource
|
|
235
235
|
*/
|
|
236
236
|
constructor(version: V1, interactionSid: string, sid: string);
|
|
237
237
|
|
|
@@ -263,8 +263,8 @@ declare class InteractionChannelInstance extends SerializableClass {
|
|
|
263
263
|
*
|
|
264
264
|
* @param version - Version of the resource
|
|
265
265
|
* @param payload - The instance payload
|
|
266
|
-
* @param interactionSid - The
|
|
267
|
-
* @param sid - The
|
|
266
|
+
* @param interactionSid - The unique string that identifies the resource
|
|
267
|
+
* @param sid - The unique string that identifies the resource
|
|
268
268
|
*/
|
|
269
269
|
constructor(version: V1, payload: InteractionChannelPayload, interactionSid: string, sid: string);
|
|
270
270
|
|
|
@@ -32,7 +32,7 @@ var InteractionChannelContext;
|
|
|
32
32
|
* @constructor Twilio.FlexApi.V1.InteractionContext.InteractionChannelList
|
|
33
33
|
*
|
|
34
34
|
* @param {Twilio.FlexApi.V1} version - Version of the resource
|
|
35
|
-
* @param {string} interactionSid - The
|
|
35
|
+
* @param {string} interactionSid - The unique string that identifies the resource
|
|
36
36
|
*/
|
|
37
37
|
/* jshint ignore:end */
|
|
38
38
|
InteractionChannelList = function InteractionChannelList(version,
|
|
@@ -307,7 +307,7 @@ InteractionChannelList = function InteractionChannelList(version,
|
|
|
307
307
|
* @function get
|
|
308
308
|
* @memberof Twilio.FlexApi.V1.InteractionContext.InteractionChannelList#
|
|
309
309
|
*
|
|
310
|
-
* @param {string} sid - The
|
|
310
|
+
* @param {string} sid - The unique string that identifies the resource
|
|
311
311
|
*
|
|
312
312
|
* @returns {Twilio.FlexApi.V1.InteractionContext.InteractionChannelContext}
|
|
313
313
|
*/
|
|
@@ -412,15 +412,16 @@ InteractionChannelPage.prototype[util.inspect.custom] = function inspect(depth,
|
|
|
412
412
|
* @constructor Twilio.FlexApi.V1.InteractionContext.InteractionChannelInstance
|
|
413
413
|
*
|
|
414
414
|
* @property {string} sid - The unique string that identifies the resource
|
|
415
|
-
* @property {string} interactionSid -
|
|
415
|
+
* @property {string} interactionSid -
|
|
416
|
+
* The unique string that identifies the resource
|
|
416
417
|
* @property {interaction_channel.type} type - The Interaction Channel's type.
|
|
417
418
|
* @property {string} url - The url
|
|
418
419
|
* @property {string} links - The links
|
|
419
420
|
*
|
|
420
421
|
* @param {V1} version - Version of the resource
|
|
421
422
|
* @param {InteractionChannelPayload} payload - The instance payload
|
|
422
|
-
* @param {sid} interactionSid - The
|
|
423
|
-
* @param {sid} sid - The
|
|
423
|
+
* @param {sid} interactionSid - The unique string that identifies the resource
|
|
424
|
+
* @param {sid} sid - The unique string that identifies the resource
|
|
424
425
|
*/
|
|
425
426
|
/* jshint ignore:end */
|
|
426
427
|
InteractionChannelInstance = function InteractionChannelInstance(version,
|
|
@@ -479,9 +480,8 @@ InteractionChannelInstance.prototype.fetch = function fetch(callback) {
|
|
|
479
480
|
*
|
|
480
481
|
* @param {object} opts - Options for request
|
|
481
482
|
* @param {interaction_channel.status} opts.status -
|
|
482
|
-
* The Interaction
|
|
483
|
-
* @param {object} [opts.routing] -
|
|
484
|
-
* The Interaction Channels's optional routing parameters
|
|
483
|
+
* Required. The Interaction channels's status
|
|
484
|
+
* @param {object} [opts.routing] - Optional. The state of associated tasks.
|
|
485
485
|
* @param {function} [callback] - Callback to handle processed record
|
|
486
486
|
*
|
|
487
487
|
* @returns {Promise} Resolves to processed InteractionChannelInstance
|
|
@@ -557,8 +557,8 @@ InteractionChannelInstance.prototype[util.inspect.custom] = function
|
|
|
557
557
|
* participants resource
|
|
558
558
|
*
|
|
559
559
|
* @param {V1} version - Version of the resource
|
|
560
|
-
* @param {sid} interactionSid - The
|
|
561
|
-
* @param {sid} sid - The
|
|
560
|
+
* @param {sid} interactionSid - The unique string that identifies the resource
|
|
561
|
+
* @param {sid} sid - The unique string that identifies the resource
|
|
562
562
|
*/
|
|
563
563
|
/* jshint ignore:end */
|
|
564
564
|
InteractionChannelContext = function InteractionChannelContext(version,
|
|
@@ -619,9 +619,8 @@ InteractionChannelContext.prototype.fetch = function fetch(callback) {
|
|
|
619
619
|
*
|
|
620
620
|
* @param {object} opts - Options for request
|
|
621
621
|
* @param {interaction_channel.status} opts.status -
|
|
622
|
-
* The Interaction
|
|
623
|
-
* @param {object} [opts.routing] -
|
|
624
|
-
* The Interaction Channels's optional routing parameters
|
|
622
|
+
* Required. The Interaction channels's status
|
|
623
|
+
* @param {object} [opts.routing] - Optional. The state of associated tasks.
|
|
625
624
|
* @param {function} [callback] - Callback to handle processed record
|
|
626
625
|
*
|
|
627
626
|
* @returns {Promise} Resolves to processed InteractionChannelInstance
|
|
@@ -212,7 +212,8 @@ InteractionPage.prototype[util.inspect.custom] = function inspect(depth,
|
|
|
212
212
|
*
|
|
213
213
|
* @property {string} sid - The unique string that identifies the resource
|
|
214
214
|
* @property {object} channel - The Interaction's channel
|
|
215
|
-
* @property {object} routing -
|
|
215
|
+
* @property {object} routing -
|
|
216
|
+
* A JSON Object representing the routing rules for the Interaction Channel
|
|
216
217
|
* @property {string} url - The url
|
|
217
218
|
* @property {string} links - The links
|
|
218
219
|
*
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was generated by
|
|
3
|
+
* \ / _ _ _| _ _
|
|
4
|
+
* | (_)\/(_)(_|\/| |(/_ v1.0.0
|
|
5
|
+
* / /
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import Lookups = require('../Lookups');
|
|
9
|
+
import Version = require('../../base/Version');
|
|
10
|
+
import { PhoneNumberList } from './v2/phoneNumber';
|
|
11
|
+
import { PhoneNumberListInstance } from './v2/phoneNumber';
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
declare class V2 extends Version {
|
|
15
|
+
/**
|
|
16
|
+
* Initialize the V2 version of Lookups
|
|
17
|
+
*
|
|
18
|
+
* @param domain - The twilio domain
|
|
19
|
+
*/
|
|
20
|
+
constructor(domain: Lookups);
|
|
21
|
+
|
|
22
|
+
readonly phoneNumbers: PhoneNumberListInstance;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export = V2;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/* jshint ignore:start */
|
|
4
|
+
/**
|
|
5
|
+
* This code was generated by
|
|
6
|
+
* \ / _ _ _| _ _
|
|
7
|
+
* | (_)\/(_)(_|\/| |(/_ v1.0.0
|
|
8
|
+
* / /
|
|
9
|
+
*/
|
|
10
|
+
/* jshint ignore:end */
|
|
11
|
+
|
|
12
|
+
var _ = require('lodash'); /* jshint ignore:line */
|
|
13
|
+
var PhoneNumberList = require('./v2/phoneNumber').PhoneNumberList;
|
|
14
|
+
var Version = require('../../base/Version'); /* jshint ignore:line */
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
/* jshint ignore:start */
|
|
18
|
+
/**
|
|
19
|
+
* Initialize the V2 version of Lookups
|
|
20
|
+
*
|
|
21
|
+
* @constructor Twilio.Lookups.V2
|
|
22
|
+
*
|
|
23
|
+
* @property {Twilio.Lookups.V2.PhoneNumberList} phoneNumbers -
|
|
24
|
+
* phoneNumbers resource
|
|
25
|
+
*
|
|
26
|
+
* @param {Twilio.Lookups} domain - The twilio domain
|
|
27
|
+
*/
|
|
28
|
+
/* jshint ignore:end */
|
|
29
|
+
function V2(domain) {
|
|
30
|
+
Version.prototype.constructor.call(this, domain, 'v2');
|
|
31
|
+
|
|
32
|
+
// Resources
|
|
33
|
+
this._phoneNumbers = undefined;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
_.extend(V2.prototype, Version.prototype);
|
|
37
|
+
V2.prototype.constructor = V2;
|
|
38
|
+
|
|
39
|
+
Object.defineProperty(V2.prototype,
|
|
40
|
+
'phoneNumbers', {
|
|
41
|
+
get: function() {
|
|
42
|
+
this._phoneNumbers = this._phoneNumbers || new PhoneNumberList(this);
|
|
43
|
+
return this._phoneNumbers;
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
module.exports = V2;
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was generated by
|
|
3
|
+
* \ / _ _ _| _ _
|
|
4
|
+
* | (_)\/(_)(_|\/| |(/_ v1.0.0
|
|
5
|
+
* / /
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import Page = require('../../../base/Page');
|
|
9
|
+
import Response = require('../../../http/response');
|
|
10
|
+
import V2 = require('../V2');
|
|
11
|
+
import { SerializableClass } from '../../../interfaces';
|
|
12
|
+
|
|
13
|
+
type PhoneNumberType = 'landline'|'mobile'|'voip';
|
|
14
|
+
|
|
15
|
+
type PhoneNumberValidationError = 'TOO_SHORT'|'TOO_LONG'|'INVALID_BUT_POSSIBLE'|'INVALID_COUNTRY_CODE'|'INVALID_LENGTH'|'NOT_A_NUMBER';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Initialize the PhoneNumberList
|
|
19
|
+
*
|
|
20
|
+
* PLEASE NOTE that this class contains beta products that are subject to change.
|
|
21
|
+
* Use them with caution.
|
|
22
|
+
*
|
|
23
|
+
* @param version - Version of the resource
|
|
24
|
+
*/
|
|
25
|
+
declare function PhoneNumberList(version: V2): PhoneNumberListInstance;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Options to pass to fetch
|
|
29
|
+
*
|
|
30
|
+
* @property countryCode - Country code for national phone number lookups
|
|
31
|
+
* @property fields - Fields to return
|
|
32
|
+
*/
|
|
33
|
+
interface PhoneNumberInstanceFetchOptions {
|
|
34
|
+
countryCode?: string;
|
|
35
|
+
fields?: string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
interface PhoneNumberListInstance {
|
|
39
|
+
/**
|
|
40
|
+
* @param sid - sid of instance
|
|
41
|
+
*/
|
|
42
|
+
(sid: string): PhoneNumberContext;
|
|
43
|
+
/**
|
|
44
|
+
* Constructs a phone_number
|
|
45
|
+
*
|
|
46
|
+
* @param phoneNumber - Phone number to lookup
|
|
47
|
+
*/
|
|
48
|
+
get(phoneNumber: string): PhoneNumberContext;
|
|
49
|
+
/**
|
|
50
|
+
* Provide a user-friendly representation
|
|
51
|
+
*/
|
|
52
|
+
toJSON(): any;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
interface PhoneNumberPayload extends PhoneNumberResource, Page.TwilioResponsePayload {
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
interface PhoneNumberResource {
|
|
59
|
+
call_forwarding: object;
|
|
60
|
+
caller_name: object;
|
|
61
|
+
calling_country_code: string;
|
|
62
|
+
country_code: string;
|
|
63
|
+
enhanced_line_type: object;
|
|
64
|
+
line_type_intelligence: object;
|
|
65
|
+
live_activity: object;
|
|
66
|
+
national_format: string;
|
|
67
|
+
phone_number: string;
|
|
68
|
+
sim_swap: object;
|
|
69
|
+
url: string;
|
|
70
|
+
valid: boolean;
|
|
71
|
+
validation_errors: PhoneNumberValidationError[];
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
interface PhoneNumberSolution {
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
declare class PhoneNumberContext {
|
|
79
|
+
/**
|
|
80
|
+
* Initialize the PhoneNumberContext
|
|
81
|
+
*
|
|
82
|
+
* PLEASE NOTE that this class contains beta products that are subject to change.
|
|
83
|
+
* Use them with caution.
|
|
84
|
+
*
|
|
85
|
+
* @param version - Version of the resource
|
|
86
|
+
* @param phoneNumber - Phone number to lookup
|
|
87
|
+
*/
|
|
88
|
+
constructor(version: V2, phoneNumber: string);
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* fetch a PhoneNumberInstance
|
|
92
|
+
*
|
|
93
|
+
* @param callback - Callback to handle processed record
|
|
94
|
+
*/
|
|
95
|
+
fetch(callback?: (error: Error | null, items: PhoneNumberInstance) => any): Promise<PhoneNumberInstance>;
|
|
96
|
+
/**
|
|
97
|
+
* fetch a PhoneNumberInstance
|
|
98
|
+
*
|
|
99
|
+
* @param opts - Options for request
|
|
100
|
+
* @param callback - Callback to handle processed record
|
|
101
|
+
*/
|
|
102
|
+
fetch(opts?: PhoneNumberInstanceFetchOptions, callback?: (error: Error | null, items: PhoneNumberInstance) => any): Promise<PhoneNumberInstance>;
|
|
103
|
+
/**
|
|
104
|
+
* Provide a user-friendly representation
|
|
105
|
+
*/
|
|
106
|
+
toJSON(): any;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
declare class PhoneNumberInstance extends SerializableClass {
|
|
111
|
+
/**
|
|
112
|
+
* Initialize the PhoneNumberContext
|
|
113
|
+
*
|
|
114
|
+
* PLEASE NOTE that this class contains beta products that are subject to change.
|
|
115
|
+
* Use them with caution.
|
|
116
|
+
*
|
|
117
|
+
* @param version - Version of the resource
|
|
118
|
+
* @param payload - The instance payload
|
|
119
|
+
* @param phoneNumber - Phone number to lookup
|
|
120
|
+
*/
|
|
121
|
+
constructor(version: V2, payload: PhoneNumberPayload, phoneNumber: string);
|
|
122
|
+
|
|
123
|
+
private _proxy: PhoneNumberContext;
|
|
124
|
+
callForwarding: any;
|
|
125
|
+
callerName: any;
|
|
126
|
+
callingCountryCode: string;
|
|
127
|
+
countryCode: string;
|
|
128
|
+
enhancedLineType: any;
|
|
129
|
+
/**
|
|
130
|
+
* fetch a PhoneNumberInstance
|
|
131
|
+
*
|
|
132
|
+
* @param callback - Callback to handle processed record
|
|
133
|
+
*/
|
|
134
|
+
fetch(callback?: (error: Error | null, items: PhoneNumberInstance) => any): Promise<PhoneNumberInstance>;
|
|
135
|
+
/**
|
|
136
|
+
* fetch a PhoneNumberInstance
|
|
137
|
+
*
|
|
138
|
+
* @param opts - Options for request
|
|
139
|
+
* @param callback - Callback to handle processed record
|
|
140
|
+
*/
|
|
141
|
+
fetch(opts?: PhoneNumberInstanceFetchOptions, callback?: (error: Error | null, items: PhoneNumberInstance) => any): Promise<PhoneNumberInstance>;
|
|
142
|
+
lineTypeIntelligence: any;
|
|
143
|
+
liveActivity: any;
|
|
144
|
+
nationalFormat: string;
|
|
145
|
+
phoneNumber: string;
|
|
146
|
+
simSwap: any;
|
|
147
|
+
/**
|
|
148
|
+
* Provide a user-friendly representation
|
|
149
|
+
*/
|
|
150
|
+
toJSON(): any;
|
|
151
|
+
url: string;
|
|
152
|
+
valid: boolean;
|
|
153
|
+
validationErrors: PhoneNumberValidationError[];
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
declare class PhoneNumberPage extends Page<V2, PhoneNumberPayload, PhoneNumberResource, PhoneNumberInstance> {
|
|
158
|
+
/**
|
|
159
|
+
* Initialize the PhoneNumberPage
|
|
160
|
+
*
|
|
161
|
+
* PLEASE NOTE that this class contains beta products that are subject to change.
|
|
162
|
+
* Use them with caution.
|
|
163
|
+
*
|
|
164
|
+
* @param version - Version of the resource
|
|
165
|
+
* @param response - Response from the API
|
|
166
|
+
* @param solution - Path solution
|
|
167
|
+
*/
|
|
168
|
+
constructor(version: V2, response: Response<string>, solution: PhoneNumberSolution);
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Build an instance of PhoneNumberInstance
|
|
172
|
+
*
|
|
173
|
+
* @param payload - Payload response from the API
|
|
174
|
+
*/
|
|
175
|
+
getInstance(payload: PhoneNumberPayload): PhoneNumberInstance;
|
|
176
|
+
/**
|
|
177
|
+
* Provide a user-friendly representation
|
|
178
|
+
*/
|
|
179
|
+
toJSON(): any;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export { PhoneNumberContext, PhoneNumberInstance, PhoneNumberInstanceFetchOptions, PhoneNumberList, PhoneNumberListInstance, PhoneNumberPage, PhoneNumberPayload, PhoneNumberResource, PhoneNumberSolution, PhoneNumberType, PhoneNumberValidationError }
|