twilio 3.76.0 → 3.77.1
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 +0 -2
- package/lib/rest/Verify.d.ts +2 -0
- package/lib/rest/Verify.js +9 -0
- package/lib/rest/api/v2010/account/call.d.ts +0 -2
- package/lib/rest/api/v2010/account/call.js +0 -2
- package/lib/rest/api/v2010/account/message.d.ts +1 -1
- package/lib/rest/api/v2010/account/message.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/conversations/v1/addressConfiguration.d.ts +6 -0
- package/lib/rest/conversations/v1/addressConfiguration.js +4 -0
- package/lib/rest/supersim/v1/esimProfile.d.ts +8 -2
- package/lib/rest/supersim/v1/esimProfile.js +9 -10
- package/lib/rest/supersim/v1/usageRecord.d.ts +4 -0
- package/lib/rest/supersim/v1/usageRecord.js +6 -0
- package/lib/rest/verify/V2.d.ts +3 -0
- package/lib/rest/verify/V2.js +13 -0
- package/lib/rest/verify/v2/service/verification.d.ts +1 -1
- package/lib/rest/verify/v2/service/verificationCheck.d.ts +1 -1
- package/lib/rest/verify/v2/service.d.ts +2 -2
- package/lib/rest/verify/v2/service.js +3 -3
- package/lib/rest/verify/v2/verificationAttemptsSummary.d.ts +156 -0
- package/lib/rest/verify/v2/verificationAttemptsSummary.js +362 -0
- package/lib/rest/video/v1/room.d.ts +4 -0
- package/lib/rest/video/v1/room.js +5 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,8 +5,6 @@
|
|
|
5
5
|
[](https://github.com/twilio/twilio-node/actions/workflows/test-and-deploy.yml)
|
|
6
6
|
[](https://twil.io/learn-open-source)
|
|
7
7
|
|
|
8
|
-
**The default branch name for this repository has been changed to `main` as of 07/27/2020.**
|
|
9
|
-
|
|
10
8
|
## Documentation
|
|
11
9
|
|
|
12
10
|
The documentation for the Twilio API can be found [here][apidocs].
|
package/lib/rest/Verify.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ import { FormListInstance } from './verify/v2/form';
|
|
|
12
12
|
import { ServiceListInstance } from './verify/v2/service';
|
|
13
13
|
import { TemplateListInstance } from './verify/v2/template';
|
|
14
14
|
import { VerificationAttemptListInstance } from './verify/v2/verificationAttempt';
|
|
15
|
+
import { VerificationAttemptsSummaryListInstance } from './verify/v2/verificationAttemptsSummary';
|
|
15
16
|
|
|
16
17
|
|
|
17
18
|
declare class Verify extends Domain {
|
|
@@ -27,6 +28,7 @@ declare class Verify extends Domain {
|
|
|
27
28
|
readonly templates: TemplateListInstance;
|
|
28
29
|
readonly v2: V2;
|
|
29
30
|
readonly verificationAttempts: VerificationAttemptListInstance;
|
|
31
|
+
readonly verificationAttemptsSummary: VerificationAttemptsSummaryListInstance;
|
|
30
32
|
}
|
|
31
33
|
|
|
32
34
|
export = Verify;
|
package/lib/rest/Verify.js
CHANGED
|
@@ -25,6 +25,8 @@ var V2 = require('./verify/V2'); /* jshint ignore:line */
|
|
|
25
25
|
* @property {Twilio.Verify.V2.ServiceList} services - services resource
|
|
26
26
|
* @property {Twilio.Verify.V2.VerificationAttemptList} verificationAttempts -
|
|
27
27
|
* verificationAttempts resource
|
|
28
|
+
* @property {Twilio.Verify.V2.VerificationAttemptsSummaryList} verificationAttemptsSummary -
|
|
29
|
+
* verificationAttemptsSummary resource
|
|
28
30
|
* @property {Twilio.Verify.V2.TemplateList} templates - templates resource
|
|
29
31
|
*
|
|
30
32
|
* @param {Twilio} twilio - The twilio client
|
|
@@ -69,6 +71,13 @@ Object.defineProperty(Verify.prototype,
|
|
|
69
71
|
}
|
|
70
72
|
});
|
|
71
73
|
|
|
74
|
+
Object.defineProperty(Verify.prototype,
|
|
75
|
+
'verificationAttemptsSummary', {
|
|
76
|
+
get: function() {
|
|
77
|
+
return this.v2.verificationAttemptsSummary;
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
|
|
72
81
|
Object.defineProperty(Verify.prototype,
|
|
73
82
|
'templates', {
|
|
74
83
|
get: function() {
|
|
@@ -384,7 +384,6 @@ interface CallPayload extends CallResource, Page.TwilioResponsePayload {
|
|
|
384
384
|
|
|
385
385
|
interface CallResource {
|
|
386
386
|
account_sid: string;
|
|
387
|
-
annotation: string;
|
|
388
387
|
answered_by: string;
|
|
389
388
|
api_version: string;
|
|
390
389
|
caller_name: string;
|
|
@@ -479,7 +478,6 @@ declare class CallInstance extends SerializableClass {
|
|
|
479
478
|
|
|
480
479
|
private _proxy: CallContext;
|
|
481
480
|
accountSid: string;
|
|
482
|
-
annotation: string;
|
|
483
481
|
answeredBy: string;
|
|
484
482
|
apiVersion: string;
|
|
485
483
|
callerName: string;
|
|
@@ -653,7 +653,6 @@ CallPage.prototype[util.inspect.custom] = function inspect(depth, options) {
|
|
|
653
653
|
* A string describing the direction of the call. `inbound` for inbound calls, `outbound-api` for calls initiated via the REST API or `outbound-dial` for calls initiated by a `Dial` verb.
|
|
654
654
|
* @property {string} answeredBy -
|
|
655
655
|
* Either `human` or `machine` if this call was initiated with answering machine detection. Empty otherwise.
|
|
656
|
-
* @property {string} annotation - The annotation provided for the call
|
|
657
656
|
* @property {string} apiVersion - The API Version used to create the call
|
|
658
657
|
* @property {string} forwardedFrom -
|
|
659
658
|
* The forwarding phone number if this call was an incoming call forwarded from another number (depends on carrier supporting forwarding). Otherwise, empty.
|
|
@@ -698,7 +697,6 @@ CallInstance = function CallInstance(version, payload, accountSid, sid) {
|
|
|
698
697
|
this.priceUnit = payload.price_unit; // jshint ignore:line
|
|
699
698
|
this.direction = payload.direction; // jshint ignore:line
|
|
700
699
|
this.answeredBy = payload.answered_by; // jshint ignore:line
|
|
701
|
-
this.annotation = payload.annotation; // jshint ignore:line
|
|
702
700
|
this.apiVersion = payload.api_version; // jshint ignore:line
|
|
703
701
|
this.forwardedFrom = payload.forwarded_from; // jshint ignore:line
|
|
704
702
|
this.groupSid = payload.group_sid; // jshint ignore:line
|
|
@@ -183,7 +183,7 @@ interface MessageListInstance {
|
|
|
183
183
|
* @property persistentAction - Rich actions for Channels Messages.
|
|
184
184
|
* @property provideFeedback - Whether to confirm delivery of the message
|
|
185
185
|
* @property scheduleType - Pass the value `fixed` to schedule a message at a fixed time.
|
|
186
|
-
* @property sendAsMms - If set to True, Twilio will deliver the message as a single MMS message, regardless of the presence of media
|
|
186
|
+
* @property sendAsMms - If set to True, Twilio will deliver the message as a single MMS message, regardless of the presence of media.
|
|
187
187
|
* @property sendAt - The time that Twilio will send the message. Must be in ISO 8601 format.
|
|
188
188
|
* @property smartEncoded - Whether to detect Unicode characters that have a similar GSM-7 character and replace them
|
|
189
189
|
* @property statusCallback - The URL we should call to send status information to your application
|
|
@@ -88,7 +88,7 @@ MessageList = function MessageList(version, accountSid) {
|
|
|
88
88
|
* @param {Date} [opts.sendAt] -
|
|
89
89
|
* The time that Twilio will send the message. Must be in ISO 8601 format.
|
|
90
90
|
* @param {boolean} [opts.sendAsMms] -
|
|
91
|
-
* If set to True, Twilio will deliver the message as a single MMS message, regardless of the presence of media
|
|
91
|
+
* If set to True, Twilio will deliver the message as a single MMS message, regardless of the presence of media.
|
|
92
92
|
* @param {string} [opts.from] - The phone number that initiated the message
|
|
93
93
|
* @param {string} [opts.messagingServiceSid] -
|
|
94
94
|
* The SID of the Messaging Service you want to associate with the message.
|
|
@@ -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;
|
|
@@ -220,12 +220,14 @@ interface AddressConfigurationListInstanceCreateOptions {
|
|
|
220
220
|
* If no pageSize is defined but a limit is defined,
|
|
221
221
|
* each() will attempt to read the limit with the most efficient
|
|
222
222
|
* page size, i.e. min(limit, 1000)
|
|
223
|
+
* @property type - The type of address configuration.
|
|
223
224
|
*/
|
|
224
225
|
interface AddressConfigurationListInstanceEachOptions {
|
|
225
226
|
callback?: (item: AddressConfigurationInstance, done: (err?: Error) => void) => void;
|
|
226
227
|
done?: Function;
|
|
227
228
|
limit?: number;
|
|
228
229
|
pageSize?: number;
|
|
230
|
+
type?: string;
|
|
229
231
|
}
|
|
230
232
|
|
|
231
233
|
/**
|
|
@@ -241,10 +243,12 @@ interface AddressConfigurationListInstanceEachOptions {
|
|
|
241
243
|
* If no page_size is defined but a limit is defined,
|
|
242
244
|
* list() will attempt to read the limit with the most
|
|
243
245
|
* efficient page size, i.e. min(limit, 1000)
|
|
246
|
+
* @property type - The type of address configuration.
|
|
244
247
|
*/
|
|
245
248
|
interface AddressConfigurationListInstanceOptions {
|
|
246
249
|
limit?: number;
|
|
247
250
|
pageSize?: number;
|
|
251
|
+
type?: string;
|
|
248
252
|
}
|
|
249
253
|
|
|
250
254
|
/**
|
|
@@ -253,11 +257,13 @@ interface AddressConfigurationListInstanceOptions {
|
|
|
253
257
|
* @property pageNumber - Page Number, this value is simply for client state
|
|
254
258
|
* @property pageSize - Number of records to return, defaults to 50
|
|
255
259
|
* @property pageToken - PageToken provided by the API
|
|
260
|
+
* @property type - The type of address configuration.
|
|
256
261
|
*/
|
|
257
262
|
interface AddressConfigurationListInstancePageOptions {
|
|
258
263
|
pageNumber?: number;
|
|
259
264
|
pageSize?: number;
|
|
260
265
|
pageToken?: string;
|
|
266
|
+
type?: string;
|
|
261
267
|
}
|
|
262
268
|
|
|
263
269
|
interface AddressConfigurationPayload extends AddressConfigurationResource, Page.TwilioResponsePayload {
|
|
@@ -68,6 +68,7 @@ AddressConfigurationList = function AddressConfigurationList(version) {
|
|
|
68
68
|
* @memberof Twilio.Conversations.V1.AddressConfigurationList#
|
|
69
69
|
*
|
|
70
70
|
* @param {object} [opts] - Options for request
|
|
71
|
+
* @param {string} [opts.type] - The type of address configuration.
|
|
71
72
|
* @param {number} [opts.limit] -
|
|
72
73
|
* Upper limit for the number of records to return.
|
|
73
74
|
* each() guarantees never to return more than limit.
|
|
@@ -157,6 +158,7 @@ AddressConfigurationList = function AddressConfigurationList(version) {
|
|
|
157
158
|
* @memberof Twilio.Conversations.V1.AddressConfigurationList#
|
|
158
159
|
*
|
|
159
160
|
* @param {object} [opts] - Options for request
|
|
161
|
+
* @param {string} [opts.type] - The type of address configuration.
|
|
160
162
|
* @param {number} [opts.limit] -
|
|
161
163
|
* Upper limit for the number of records to return.
|
|
162
164
|
* list() guarantees never to return more than limit.
|
|
@@ -217,6 +219,7 @@ AddressConfigurationList = function AddressConfigurationList(version) {
|
|
|
217
219
|
* @memberof Twilio.Conversations.V1.AddressConfigurationList#
|
|
218
220
|
*
|
|
219
221
|
* @param {object} [opts] - Options for request
|
|
222
|
+
* @param {string} [opts.type] - The type of address configuration.
|
|
220
223
|
* @param {string} [opts.pageToken] - PageToken provided by the API
|
|
221
224
|
* @param {number} [opts.pageNumber] -
|
|
222
225
|
* Page Number, this value is simply for client state
|
|
@@ -235,6 +238,7 @@ AddressConfigurationList = function AddressConfigurationList(version) {
|
|
|
235
238
|
|
|
236
239
|
var deferred = Q.defer();
|
|
237
240
|
var data = values.of({
|
|
241
|
+
'Type': _.get(opts, 'type'),
|
|
238
242
|
'PageToken': opts.pageToken,
|
|
239
243
|
'Page': opts.pageNumber,
|
|
240
244
|
'PageSize': opts.pageSize
|
|
@@ -27,13 +27,19 @@ interface EsimProfileListInstance {
|
|
|
27
27
|
* @param sid - sid of instance
|
|
28
28
|
*/
|
|
29
29
|
(sid: string): EsimProfileContext;
|
|
30
|
+
/**
|
|
31
|
+
* create a EsimProfileInstance
|
|
32
|
+
*
|
|
33
|
+
* @param callback - Callback to handle processed record
|
|
34
|
+
*/
|
|
35
|
+
create(callback?: (error: Error | null, item: EsimProfileInstance) => any): Promise<EsimProfileInstance>;
|
|
30
36
|
/**
|
|
31
37
|
* create a EsimProfileInstance
|
|
32
38
|
*
|
|
33
39
|
* @param opts - Options for request
|
|
34
40
|
* @param callback - Callback to handle processed record
|
|
35
41
|
*/
|
|
36
|
-
create(opts
|
|
42
|
+
create(opts?: EsimProfileListInstanceCreateOptions, callback?: (error: Error | null, item: EsimProfileInstance) => any): Promise<EsimProfileInstance>;
|
|
37
43
|
/**
|
|
38
44
|
* Streams EsimProfileInstance records from the API.
|
|
39
45
|
*
|
|
@@ -152,7 +158,7 @@ interface EsimProfileListInstance {
|
|
|
152
158
|
interface EsimProfileListInstanceCreateOptions {
|
|
153
159
|
callbackMethod?: string;
|
|
154
160
|
callbackUrl?: string;
|
|
155
|
-
eid
|
|
161
|
+
eid?: string;
|
|
156
162
|
}
|
|
157
163
|
|
|
158
164
|
/**
|
|
@@ -60,31 +60,30 @@ EsimProfileList = function EsimProfileList(version) {
|
|
|
60
60
|
* @function create
|
|
61
61
|
* @memberof Twilio.Supersim.V1.EsimProfileList#
|
|
62
62
|
*
|
|
63
|
-
* @param {object} opts - Options for request
|
|
64
|
-
* @param {string} opts.eid -
|
|
65
|
-
* Identifier of the eUICC that will claim the eSIM Profile
|
|
63
|
+
* @param {object} [opts] - Options for request
|
|
66
64
|
* @param {string} [opts.callbackUrl] -
|
|
67
65
|
* The URL we should call after we have sent when the status of the eSIM Profile changes
|
|
68
66
|
* @param {string} [opts.callbackMethod] -
|
|
69
67
|
* The HTTP method we should use to call callback_url
|
|
68
|
+
* @param {string} [opts.eid] -
|
|
69
|
+
* Identifier of the eUICC that will claim the eSIM Profile
|
|
70
70
|
* @param {function} [callback] - Callback to handle processed record
|
|
71
71
|
*
|
|
72
72
|
* @returns {Promise} Resolves to processed EsimProfileInstance
|
|
73
73
|
*/
|
|
74
74
|
/* jshint ignore:end */
|
|
75
75
|
EsimProfileListInstance.create = function create(opts, callback) {
|
|
76
|
-
if (_.
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
if (_.isUndefined(opts['eid'])) {
|
|
80
|
-
throw new Error('Required parameter "opts[\'eid\']" missing.');
|
|
76
|
+
if (_.isFunction(opts)) {
|
|
77
|
+
callback = opts;
|
|
78
|
+
opts = {};
|
|
81
79
|
}
|
|
80
|
+
opts = opts || {};
|
|
82
81
|
|
|
83
82
|
var deferred = Q.defer();
|
|
84
83
|
var data = values.of({
|
|
85
|
-
'Eid': _.get(opts, 'eid'),
|
|
86
84
|
'CallbackUrl': _.get(opts, 'callbackUrl'),
|
|
87
|
-
'CallbackMethod': _.get(opts, 'callbackMethod')
|
|
85
|
+
'CallbackMethod': _.get(opts, 'callbackMethod'),
|
|
86
|
+
'Eid': _.get(opts, 'eid')
|
|
88
87
|
});
|
|
89
88
|
|
|
90
89
|
var promise = this._version.create({uri: this._uri, method: 'POST', data: data});
|
|
@@ -239,8 +239,10 @@ interface UsageRecordPayload extends UsageRecordResource, Page.TwilioResponsePay
|
|
|
239
239
|
|
|
240
240
|
interface UsageRecordResource {
|
|
241
241
|
account_sid: string;
|
|
242
|
+
billed_unit: string;
|
|
242
243
|
data_download: number;
|
|
243
244
|
data_total: number;
|
|
245
|
+
data_total_billed: number;
|
|
244
246
|
data_upload: number;
|
|
245
247
|
fleet_sid: string;
|
|
246
248
|
iso_country: string;
|
|
@@ -266,8 +268,10 @@ declare class UsageRecordInstance extends SerializableClass {
|
|
|
266
268
|
constructor(version: V1, payload: UsageRecordPayload);
|
|
267
269
|
|
|
268
270
|
accountSid: string;
|
|
271
|
+
billedUnit: string;
|
|
269
272
|
dataDownload: number;
|
|
270
273
|
dataTotal: number;
|
|
274
|
+
dataTotalBilled: number;
|
|
271
275
|
dataUpload: number;
|
|
272
276
|
fleetSid: string;
|
|
273
277
|
isoCountry: string;
|
|
@@ -468,6 +468,10 @@ UsageRecordPage.prototype[util.inspect.custom] = function inspect(depth,
|
|
|
468
468
|
* @property {number} dataDownload -
|
|
469
469
|
* Total data downloaded in bytes, aggregated by the query parameters.
|
|
470
470
|
* @property {number} dataTotal - Total of data_upload and data_download.
|
|
471
|
+
* @property {number} dataTotalBilled -
|
|
472
|
+
* Total amount in the `billed_unit` that was charged for the data uploaded or downloaded.
|
|
473
|
+
* @property {string} billedUnit -
|
|
474
|
+
* The currency in which the billed amounts are measured, specified in the 3 letter ISO 4127 format (e.g. `USD`, `EUR`, `JPY`).
|
|
471
475
|
*
|
|
472
476
|
* @param {V1} version - Version of the resource
|
|
473
477
|
* @param {UsageRecordPayload} payload - The instance payload
|
|
@@ -486,6 +490,8 @@ UsageRecordInstance = function UsageRecordInstance(version, payload) {
|
|
|
486
490
|
this.dataUpload = deserialize.integer(payload.data_upload); // jshint ignore:line
|
|
487
491
|
this.dataDownload = deserialize.integer(payload.data_download); // jshint ignore:line
|
|
488
492
|
this.dataTotal = deserialize.integer(payload.data_total); // jshint ignore:line
|
|
493
|
+
this.dataTotalBilled = deserialize.decimal(payload.data_total_billed); // jshint ignore:line
|
|
494
|
+
this.billedUnit = payload.billed_unit; // jshint ignore:line
|
|
489
495
|
|
|
490
496
|
// Context
|
|
491
497
|
this._context = undefined;
|
package/lib/rest/verify/V2.d.ts
CHANGED
|
@@ -15,6 +15,8 @@ import { TemplateList } from './v2/template';
|
|
|
15
15
|
import { TemplateListInstance } from './v2/template';
|
|
16
16
|
import { VerificationAttemptList } from './v2/verificationAttempt';
|
|
17
17
|
import { VerificationAttemptListInstance } from './v2/verificationAttempt';
|
|
18
|
+
import { VerificationAttemptsSummaryList } from './v2/verificationAttemptsSummary';
|
|
19
|
+
import { VerificationAttemptsSummaryListInstance } from './v2/verificationAttemptsSummary';
|
|
18
20
|
|
|
19
21
|
|
|
20
22
|
declare class V2 extends Version {
|
|
@@ -29,6 +31,7 @@ declare class V2 extends Version {
|
|
|
29
31
|
readonly services: ServiceListInstance;
|
|
30
32
|
readonly templates: TemplateListInstance;
|
|
31
33
|
readonly verificationAttempts: VerificationAttemptListInstance;
|
|
34
|
+
readonly verificationAttemptsSummary: VerificationAttemptsSummaryListInstance;
|
|
32
35
|
}
|
|
33
36
|
|
|
34
37
|
export = V2;
|
package/lib/rest/verify/V2.js
CHANGED
|
@@ -15,6 +15,8 @@ var ServiceList = require('./v2/service').ServiceList;
|
|
|
15
15
|
var TemplateList = require('./v2/template').TemplateList;
|
|
16
16
|
var VerificationAttemptList = require(
|
|
17
17
|
'./v2/verificationAttempt').VerificationAttemptList;
|
|
18
|
+
var VerificationAttemptsSummaryList = require(
|
|
19
|
+
'./v2/verificationAttemptsSummary').VerificationAttemptsSummaryList;
|
|
18
20
|
var Version = require('../../base/Version'); /* jshint ignore:line */
|
|
19
21
|
|
|
20
22
|
|
|
@@ -28,6 +30,8 @@ var Version = require('../../base/Version'); /* jshint ignore:line */
|
|
|
28
30
|
* @property {Twilio.Verify.V2.ServiceList} services - services resource
|
|
29
31
|
* @property {Twilio.Verify.V2.VerificationAttemptList} verificationAttempts -
|
|
30
32
|
* verificationAttempts resource
|
|
33
|
+
* @property {Twilio.Verify.V2.VerificationAttemptsSummaryList} verificationAttemptsSummary -
|
|
34
|
+
* verificationAttemptsSummary resource
|
|
31
35
|
* @property {Twilio.Verify.V2.TemplateList} templates - templates resource
|
|
32
36
|
*
|
|
33
37
|
* @param {Twilio.Verify} domain - The twilio domain
|
|
@@ -40,6 +44,7 @@ function V2(domain) {
|
|
|
40
44
|
this._forms = undefined;
|
|
41
45
|
this._services = undefined;
|
|
42
46
|
this._verificationAttempts = undefined;
|
|
47
|
+
this._verificationAttemptsSummary = undefined;
|
|
43
48
|
this._templates = undefined;
|
|
44
49
|
}
|
|
45
50
|
|
|
@@ -70,6 +75,14 @@ Object.defineProperty(V2.prototype,
|
|
|
70
75
|
}
|
|
71
76
|
});
|
|
72
77
|
|
|
78
|
+
Object.defineProperty(V2.prototype,
|
|
79
|
+
'verificationAttemptsSummary', {
|
|
80
|
+
get: function() {
|
|
81
|
+
this._verificationAttemptsSummary = this._verificationAttemptsSummary || new VerificationAttemptsSummaryList(this);
|
|
82
|
+
return this._verificationAttemptsSummary;
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
|
|
73
86
|
Object.defineProperty(V2.prototype,
|
|
74
87
|
'templates', {
|
|
75
88
|
get: function() {
|
|
@@ -10,7 +10,7 @@ import Response = require('../../../../http/response');
|
|
|
10
10
|
import V2 = require('../../V2');
|
|
11
11
|
import { SerializableClass } from '../../../../interfaces';
|
|
12
12
|
|
|
13
|
-
type VerificationChannel = 'sms'|'call'|'email'|'whatsapp';
|
|
13
|
+
type VerificationChannel = 'sms'|'call'|'email'|'whatsapp'|'silent';
|
|
14
14
|
|
|
15
15
|
type VerificationStatus = 'canceled'|'approved';
|
|
16
16
|
|
|
@@ -10,7 +10,7 @@ import Response = require('../../../../http/response');
|
|
|
10
10
|
import V2 = require('../../V2');
|
|
11
11
|
import { SerializableClass } from '../../../../interfaces';
|
|
12
12
|
|
|
13
|
-
type VerificationCheckChannel = 'sms'|'call'|'email'|'whatsapp';
|
|
13
|
+
type VerificationCheckChannel = 'sms'|'call'|'email'|'whatsapp'|'silent';
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Initialize the VerificationCheckList
|
|
@@ -44,7 +44,7 @@ declare function ServiceList(version: V2): ServiceListInstance;
|
|
|
44
44
|
* @property psd2Enabled - Whether to pass PSD2 transaction parameters when starting a verification
|
|
45
45
|
* @property push.apnCredentialSid - Optional. Set APN Credential for this service.
|
|
46
46
|
* @property push.fcmCredentialSid - Optional. Set FCM Credential for this service.
|
|
47
|
-
* @property push.includeDate - Optional. Include the date in the Challenge's
|
|
47
|
+
* @property push.includeDate - Optional. Include the date in the Challenge's response. Default: false. **Deprecated** do not use this parameter.
|
|
48
48
|
* @property skipSmsToLandlines - Whether to skip sending SMS verifications to landlines
|
|
49
49
|
* @property totp.codeLength - Optional. Number of digits for generated TOTP codes
|
|
50
50
|
* @property totp.issuer - Optional. Set TOTP Issuer for this service.
|
|
@@ -209,7 +209,7 @@ interface ServiceListInstance {
|
|
|
209
209
|
* @property psd2Enabled - Whether to pass PSD2 transaction parameters when starting a verification
|
|
210
210
|
* @property push.apnCredentialSid - Optional. Set APN Credential for this service.
|
|
211
211
|
* @property push.fcmCredentialSid - Optional. Set FCM Credential for this service.
|
|
212
|
-
* @property push.includeDate - Optional. Include the date in the Challenge's
|
|
212
|
+
* @property push.includeDate - Optional. Include the date in the Challenge's response. Default: false. **Deprecated** do not use this parameter.
|
|
213
213
|
* @property skipSmsToLandlines - Whether to skip sending SMS verifications to landlines
|
|
214
214
|
* @property totp.codeLength - Optional. Number of digits for generated TOTP codes
|
|
215
215
|
* @property totp.issuer - Optional. Set TOTP Issuer for this service.
|
|
@@ -87,7 +87,7 @@ ServiceList = function ServiceList(version) {
|
|
|
87
87
|
* @param {boolean} [opts.customCodeEnabled] -
|
|
88
88
|
* Whether to allow sending verifications with a custom code.
|
|
89
89
|
* @param {boolean} [opts.push.includeDate] -
|
|
90
|
-
* Optional. Include the date in the Challenge's
|
|
90
|
+
* Optional. Include the date in the Challenge's response. Default: false. **Deprecated** do not use this parameter.
|
|
91
91
|
* @param {string} [opts.push.apnCredentialSid] -
|
|
92
92
|
* Optional. Set APN Credential for this service.
|
|
93
93
|
* @param {string} [opts.push.fcmCredentialSid] -
|
|
@@ -636,7 +636,7 @@ ServiceInstance.prototype.remove = function remove(callback) {
|
|
|
636
636
|
* @param {boolean} [opts.customCodeEnabled] -
|
|
637
637
|
* Whether to allow sending verifications with a custom code.
|
|
638
638
|
* @param {boolean} [opts.push.includeDate] -
|
|
639
|
-
* Optional. Include the date in the Challenge's
|
|
639
|
+
* Optional. Include the date in the Challenge's response. Default: false. **Deprecated** do not use this parameter.
|
|
640
640
|
* @param {string} [opts.push.apnCredentialSid] -
|
|
641
641
|
* Optional. Set APN Credential for this service.
|
|
642
642
|
* @param {string} [opts.push.fcmCredentialSid] -
|
|
@@ -915,7 +915,7 @@ ServiceContext.prototype.remove = function remove(callback) {
|
|
|
915
915
|
* @param {boolean} [opts.customCodeEnabled] -
|
|
916
916
|
* Whether to allow sending verifications with a custom code.
|
|
917
917
|
* @param {boolean} [opts.push.includeDate] -
|
|
918
|
-
* Optional. Include the date in the Challenge's
|
|
918
|
+
* Optional. Include the date in the Challenge's response. Default: false. **Deprecated** do not use this parameter.
|
|
919
919
|
* @param {string} [opts.push.apnCredentialSid] -
|
|
920
920
|
* Optional. Set APN Credential for this service.
|
|
921
921
|
* @param {string} [opts.push.fcmCredentialSid] -
|
|
@@ -0,0 +1,156 @@
|
|
|
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 VerificationAttemptsSummaryChannels = 'sms'|'call'|'email'|'whatsapp';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Initialize the VerificationAttemptsSummaryList
|
|
17
|
+
*
|
|
18
|
+
* @param version - Version of the resource
|
|
19
|
+
*/
|
|
20
|
+
declare function VerificationAttemptsSummaryList(version: V2): VerificationAttemptsSummaryListInstance;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Options to pass to fetch
|
|
24
|
+
*
|
|
25
|
+
* @property channel - Filter verification attempts considered on the summary by communication channel.
|
|
26
|
+
* @property country - Filter verification attempts considered on the summary by destination country.
|
|
27
|
+
* @property dateCreatedAfter - Consider verification attempts create after this date on the summary.
|
|
28
|
+
* @property dateCreatedBefore - Consider verification attempts created before this date on the summary.
|
|
29
|
+
* @property destinationPrefix - Filters the attempts considered on the summary by destination prefix.
|
|
30
|
+
* @property verifyServiceSid - Filter the verification attempts considered on the summary by verify service.
|
|
31
|
+
*/
|
|
32
|
+
interface VerificationAttemptsSummaryInstanceFetchOptions {
|
|
33
|
+
channel?: VerificationAttemptsSummaryChannels;
|
|
34
|
+
country?: string;
|
|
35
|
+
dateCreatedAfter?: Date;
|
|
36
|
+
dateCreatedBefore?: Date;
|
|
37
|
+
destinationPrefix?: string;
|
|
38
|
+
verifyServiceSid?: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
interface VerificationAttemptsSummaryListInstance {
|
|
42
|
+
/**
|
|
43
|
+
* @param sid - sid of instance
|
|
44
|
+
*/
|
|
45
|
+
(sid: string): VerificationAttemptsSummaryContext;
|
|
46
|
+
/**
|
|
47
|
+
* Constructs a verification_attempts_summary
|
|
48
|
+
*/
|
|
49
|
+
get(): VerificationAttemptsSummaryContext;
|
|
50
|
+
/**
|
|
51
|
+
* Provide a user-friendly representation
|
|
52
|
+
*/
|
|
53
|
+
toJSON(): any;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
interface VerificationAttemptsSummaryPayload extends VerificationAttemptsSummaryResource, Page.TwilioResponsePayload {
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
interface VerificationAttemptsSummaryResource {
|
|
60
|
+
conversion_rate_percentage: number;
|
|
61
|
+
total_attempts: number;
|
|
62
|
+
total_converted: number;
|
|
63
|
+
total_unconverted: number;
|
|
64
|
+
url: string;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
interface VerificationAttemptsSummarySolution {
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
declare class VerificationAttemptsSummaryContext {
|
|
72
|
+
/**
|
|
73
|
+
* Initialize the VerificationAttemptsSummaryContext
|
|
74
|
+
*
|
|
75
|
+
* @param version - Version of the resource
|
|
76
|
+
*/
|
|
77
|
+
constructor(version: V2);
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* fetch a VerificationAttemptsSummaryInstance
|
|
81
|
+
*
|
|
82
|
+
* @param callback - Callback to handle processed record
|
|
83
|
+
*/
|
|
84
|
+
fetch(callback?: (error: Error | null, items: VerificationAttemptsSummaryInstance) => any): Promise<VerificationAttemptsSummaryInstance>;
|
|
85
|
+
/**
|
|
86
|
+
* fetch a VerificationAttemptsSummaryInstance
|
|
87
|
+
*
|
|
88
|
+
* @param opts - Options for request
|
|
89
|
+
* @param callback - Callback to handle processed record
|
|
90
|
+
*/
|
|
91
|
+
fetch(opts?: VerificationAttemptsSummaryInstanceFetchOptions, callback?: (error: Error | null, items: VerificationAttemptsSummaryInstance) => any): Promise<VerificationAttemptsSummaryInstance>;
|
|
92
|
+
/**
|
|
93
|
+
* Provide a user-friendly representation
|
|
94
|
+
*/
|
|
95
|
+
toJSON(): any;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
declare class VerificationAttemptsSummaryInstance extends SerializableClass {
|
|
100
|
+
/**
|
|
101
|
+
* Initialize the VerificationAttemptsSummaryContext
|
|
102
|
+
*
|
|
103
|
+
* @param version - Version of the resource
|
|
104
|
+
* @param payload - The instance payload
|
|
105
|
+
*/
|
|
106
|
+
constructor(version: V2, payload: VerificationAttemptsSummaryPayload);
|
|
107
|
+
|
|
108
|
+
private _proxy: VerificationAttemptsSummaryContext;
|
|
109
|
+
conversionRatePercentage: number;
|
|
110
|
+
/**
|
|
111
|
+
* fetch a VerificationAttemptsSummaryInstance
|
|
112
|
+
*
|
|
113
|
+
* @param callback - Callback to handle processed record
|
|
114
|
+
*/
|
|
115
|
+
fetch(callback?: (error: Error | null, items: VerificationAttemptsSummaryInstance) => any): Promise<VerificationAttemptsSummaryInstance>;
|
|
116
|
+
/**
|
|
117
|
+
* fetch a VerificationAttemptsSummaryInstance
|
|
118
|
+
*
|
|
119
|
+
* @param opts - Options for request
|
|
120
|
+
* @param callback - Callback to handle processed record
|
|
121
|
+
*/
|
|
122
|
+
fetch(opts?: VerificationAttemptsSummaryInstanceFetchOptions, callback?: (error: Error | null, items: VerificationAttemptsSummaryInstance) => any): Promise<VerificationAttemptsSummaryInstance>;
|
|
123
|
+
/**
|
|
124
|
+
* Provide a user-friendly representation
|
|
125
|
+
*/
|
|
126
|
+
toJSON(): any;
|
|
127
|
+
totalAttempts: number;
|
|
128
|
+
totalConverted: number;
|
|
129
|
+
totalUnconverted: number;
|
|
130
|
+
url: string;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
declare class VerificationAttemptsSummaryPage extends Page<V2, VerificationAttemptsSummaryPayload, VerificationAttemptsSummaryResource, VerificationAttemptsSummaryInstance> {
|
|
135
|
+
/**
|
|
136
|
+
* Initialize the VerificationAttemptsSummaryPage
|
|
137
|
+
*
|
|
138
|
+
* @param version - Version of the resource
|
|
139
|
+
* @param response - Response from the API
|
|
140
|
+
* @param solution - Path solution
|
|
141
|
+
*/
|
|
142
|
+
constructor(version: V2, response: Response<string>, solution: VerificationAttemptsSummarySolution);
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Build an instance of VerificationAttemptsSummaryInstance
|
|
146
|
+
*
|
|
147
|
+
* @param payload - Payload response from the API
|
|
148
|
+
*/
|
|
149
|
+
getInstance(payload: VerificationAttemptsSummaryPayload): VerificationAttemptsSummaryInstance;
|
|
150
|
+
/**
|
|
151
|
+
* Provide a user-friendly representation
|
|
152
|
+
*/
|
|
153
|
+
toJSON(): any;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export { VerificationAttemptsSummaryChannels, VerificationAttemptsSummaryContext, VerificationAttemptsSummaryInstance, VerificationAttemptsSummaryInstanceFetchOptions, VerificationAttemptsSummaryList, VerificationAttemptsSummaryListInstance, VerificationAttemptsSummaryPage, VerificationAttemptsSummaryPayload, VerificationAttemptsSummaryResource, VerificationAttemptsSummarySolution }
|
|
@@ -0,0 +1,362 @@
|
|
|
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 Q = require('q'); /* jshint ignore:line */
|
|
13
|
+
var _ = require('lodash'); /* jshint ignore:line */
|
|
14
|
+
var util = require('util'); /* jshint ignore:line */
|
|
15
|
+
var Page = require('../../../base/Page'); /* jshint ignore:line */
|
|
16
|
+
var deserialize = require(
|
|
17
|
+
'../../../base/deserialize'); /* jshint ignore:line */
|
|
18
|
+
var serialize = require('../../../base/serialize'); /* jshint ignore:line */
|
|
19
|
+
var values = require('../../../base/values'); /* jshint ignore:line */
|
|
20
|
+
|
|
21
|
+
var VerificationAttemptsSummaryList;
|
|
22
|
+
var VerificationAttemptsSummaryPage;
|
|
23
|
+
var VerificationAttemptsSummaryInstance;
|
|
24
|
+
var VerificationAttemptsSummaryContext;
|
|
25
|
+
|
|
26
|
+
/* jshint ignore:start */
|
|
27
|
+
/**
|
|
28
|
+
* Initialize the VerificationAttemptsSummaryList
|
|
29
|
+
*
|
|
30
|
+
* @constructor Twilio.Verify.V2.VerificationAttemptsSummaryList
|
|
31
|
+
*
|
|
32
|
+
* @param {Twilio.Verify.V2} version - Version of the resource
|
|
33
|
+
*/
|
|
34
|
+
/* jshint ignore:end */
|
|
35
|
+
VerificationAttemptsSummaryList = function
|
|
36
|
+
VerificationAttemptsSummaryList(version) {
|
|
37
|
+
/* jshint ignore:start */
|
|
38
|
+
/**
|
|
39
|
+
* @function verificationAttemptsSummary
|
|
40
|
+
* @memberof Twilio.Verify.V2#
|
|
41
|
+
*
|
|
42
|
+
* @param {string} sid - sid of instance
|
|
43
|
+
*
|
|
44
|
+
* @returns {Twilio.Verify.V2.VerificationAttemptsSummaryContext}
|
|
45
|
+
*/
|
|
46
|
+
/* jshint ignore:end */
|
|
47
|
+
function VerificationAttemptsSummaryListInstance(sid) {
|
|
48
|
+
return VerificationAttemptsSummaryListInstance.get(sid);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
VerificationAttemptsSummaryListInstance._version = version;
|
|
52
|
+
// Path Solution
|
|
53
|
+
VerificationAttemptsSummaryListInstance._solution = {};
|
|
54
|
+
/* jshint ignore:start */
|
|
55
|
+
/**
|
|
56
|
+
* Constructs a verification_attempts_summary
|
|
57
|
+
*
|
|
58
|
+
* @function get
|
|
59
|
+
* @memberof Twilio.Verify.V2.VerificationAttemptsSummaryList#
|
|
60
|
+
*
|
|
61
|
+
* @returns {Twilio.Verify.V2.VerificationAttemptsSummaryContext}
|
|
62
|
+
*/
|
|
63
|
+
/* jshint ignore:end */
|
|
64
|
+
VerificationAttemptsSummaryListInstance.get = function get() {
|
|
65
|
+
return new VerificationAttemptsSummaryContext(this._version);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
/* jshint ignore:start */
|
|
69
|
+
/**
|
|
70
|
+
* Provide a user-friendly representation
|
|
71
|
+
*
|
|
72
|
+
* @function toJSON
|
|
73
|
+
* @memberof Twilio.Verify.V2.VerificationAttemptsSummaryList#
|
|
74
|
+
*
|
|
75
|
+
* @returns Object
|
|
76
|
+
*/
|
|
77
|
+
/* jshint ignore:end */
|
|
78
|
+
VerificationAttemptsSummaryListInstance.toJSON = function toJSON() {
|
|
79
|
+
return this._solution;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
VerificationAttemptsSummaryListInstance[util.inspect.custom] = function
|
|
83
|
+
inspect(depth, options) {
|
|
84
|
+
return util.inspect(this.toJSON(), options);
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
return VerificationAttemptsSummaryListInstance;
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
/* jshint ignore:start */
|
|
92
|
+
/**
|
|
93
|
+
* Initialize the VerificationAttemptsSummaryPage
|
|
94
|
+
*
|
|
95
|
+
* @constructor Twilio.Verify.V2.VerificationAttemptsSummaryPage
|
|
96
|
+
*
|
|
97
|
+
* @param {V2} version - Version of the resource
|
|
98
|
+
* @param {Response<string>} response - Response from the API
|
|
99
|
+
* @param {VerificationAttemptsSummarySolution} solution - Path solution
|
|
100
|
+
*
|
|
101
|
+
* @returns VerificationAttemptsSummaryPage
|
|
102
|
+
*/
|
|
103
|
+
/* jshint ignore:end */
|
|
104
|
+
VerificationAttemptsSummaryPage = function
|
|
105
|
+
VerificationAttemptsSummaryPage(version, response, solution) {
|
|
106
|
+
// Path Solution
|
|
107
|
+
this._solution = solution;
|
|
108
|
+
|
|
109
|
+
Page.prototype.constructor.call(this, version, response, this._solution);
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
_.extend(VerificationAttemptsSummaryPage.prototype, Page.prototype);
|
|
113
|
+
VerificationAttemptsSummaryPage.prototype.constructor = VerificationAttemptsSummaryPage;
|
|
114
|
+
|
|
115
|
+
/* jshint ignore:start */
|
|
116
|
+
/**
|
|
117
|
+
* Build an instance of VerificationAttemptsSummaryInstance
|
|
118
|
+
*
|
|
119
|
+
* @function getInstance
|
|
120
|
+
* @memberof Twilio.Verify.V2.VerificationAttemptsSummaryPage#
|
|
121
|
+
*
|
|
122
|
+
* @param {VerificationAttemptsSummaryPayload} payload -
|
|
123
|
+
* Payload response from the API
|
|
124
|
+
*
|
|
125
|
+
* @returns VerificationAttemptsSummaryInstance
|
|
126
|
+
*/
|
|
127
|
+
/* jshint ignore:end */
|
|
128
|
+
VerificationAttemptsSummaryPage.prototype.getInstance = function
|
|
129
|
+
getInstance(payload) {
|
|
130
|
+
return new VerificationAttemptsSummaryInstance(this._version, payload);
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
/* jshint ignore:start */
|
|
134
|
+
/**
|
|
135
|
+
* Provide a user-friendly representation
|
|
136
|
+
*
|
|
137
|
+
* @function toJSON
|
|
138
|
+
* @memberof Twilio.Verify.V2.VerificationAttemptsSummaryPage#
|
|
139
|
+
*
|
|
140
|
+
* @returns Object
|
|
141
|
+
*/
|
|
142
|
+
/* jshint ignore:end */
|
|
143
|
+
VerificationAttemptsSummaryPage.prototype.toJSON = function toJSON() {
|
|
144
|
+
let clone = {};
|
|
145
|
+
_.forOwn(this, function(value, key) {
|
|
146
|
+
if (!_.startsWith(key, '_') && ! _.isFunction(value)) {
|
|
147
|
+
clone[key] = value;
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
return clone;
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
VerificationAttemptsSummaryPage.prototype[util.inspect.custom] = function
|
|
154
|
+
inspect(depth, options) {
|
|
155
|
+
return util.inspect(this.toJSON(), options);
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
/* jshint ignore:start */
|
|
160
|
+
/**
|
|
161
|
+
* Initialize the VerificationAttemptsSummaryContext
|
|
162
|
+
*
|
|
163
|
+
* @constructor Twilio.Verify.V2.VerificationAttemptsSummaryInstance
|
|
164
|
+
*
|
|
165
|
+
* @property {number} totalAttempts - Total of attempts made.
|
|
166
|
+
* @property {number} totalConverted - Total of attempts confirmed by the end user.
|
|
167
|
+
* @property {number} totalUnconverted -
|
|
168
|
+
* Total of attempts made that were not confirmed by the end user.
|
|
169
|
+
* @property {number} conversionRatePercentage -
|
|
170
|
+
* Percentage of the confirmed messages over the total.
|
|
171
|
+
* @property {string} url - The url
|
|
172
|
+
*
|
|
173
|
+
* @param {V2} version - Version of the resource
|
|
174
|
+
* @param {VerificationAttemptsSummaryPayload} payload - The instance payload
|
|
175
|
+
*/
|
|
176
|
+
/* jshint ignore:end */
|
|
177
|
+
VerificationAttemptsSummaryInstance = function
|
|
178
|
+
VerificationAttemptsSummaryInstance(version, payload) {
|
|
179
|
+
this._version = version;
|
|
180
|
+
|
|
181
|
+
// Marshaled Properties
|
|
182
|
+
this.totalAttempts = deserialize.integer(payload.total_attempts); // jshint ignore:line
|
|
183
|
+
this.totalConverted = deserialize.integer(payload.total_converted); // jshint ignore:line
|
|
184
|
+
this.totalUnconverted = deserialize.integer(payload.total_unconverted); // jshint ignore:line
|
|
185
|
+
this.conversionRatePercentage = deserialize.decimal(payload.conversion_rate_percentage); // jshint ignore:line
|
|
186
|
+
this.url = payload.url; // jshint ignore:line
|
|
187
|
+
|
|
188
|
+
// Context
|
|
189
|
+
this._context = undefined;
|
|
190
|
+
this._solution = {};
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
Object.defineProperty(VerificationAttemptsSummaryInstance.prototype,
|
|
194
|
+
'_proxy', {
|
|
195
|
+
get: function() {
|
|
196
|
+
if (!this._context) {
|
|
197
|
+
this._context = new VerificationAttemptsSummaryContext(this._version);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
return this._context;
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
/* jshint ignore:start */
|
|
205
|
+
/**
|
|
206
|
+
* fetch a VerificationAttemptsSummaryInstance
|
|
207
|
+
*
|
|
208
|
+
* @function fetch
|
|
209
|
+
* @memberof Twilio.Verify.V2.VerificationAttemptsSummaryInstance#
|
|
210
|
+
*
|
|
211
|
+
* @param {object} [opts] - Options for request
|
|
212
|
+
* @param {string} [opts.verifyServiceSid] -
|
|
213
|
+
* Filter the verification attempts considered on the summary by verify service.
|
|
214
|
+
* @param {Date} [opts.dateCreatedAfter] -
|
|
215
|
+
* Consider verification attempts create after this date on the summary.
|
|
216
|
+
* @param {Date} [opts.dateCreatedBefore] -
|
|
217
|
+
* Consider verification attempts created before this date on the summary.
|
|
218
|
+
* @param {string} [opts.country] -
|
|
219
|
+
* Filter verification attempts considered on the summary by destination country.
|
|
220
|
+
* @param {verification_attempts_summary.channels} [opts.channel] -
|
|
221
|
+
* Filter verification attempts considered on the summary by communication channel.
|
|
222
|
+
* @param {string} [opts.destinationPrefix] -
|
|
223
|
+
* Filters the attempts considered on the summary by destination prefix.
|
|
224
|
+
* @param {function} [callback] - Callback to handle processed record
|
|
225
|
+
*
|
|
226
|
+
* @returns {Promise} Resolves to processed VerificationAttemptsSummaryInstance
|
|
227
|
+
*/
|
|
228
|
+
/* jshint ignore:end */
|
|
229
|
+
VerificationAttemptsSummaryInstance.prototype.fetch = function fetch(opts,
|
|
230
|
+
callback) {
|
|
231
|
+
return this._proxy.fetch(opts, callback);
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
/* jshint ignore:start */
|
|
235
|
+
/**
|
|
236
|
+
* Provide a user-friendly representation
|
|
237
|
+
*
|
|
238
|
+
* @function toJSON
|
|
239
|
+
* @memberof Twilio.Verify.V2.VerificationAttemptsSummaryInstance#
|
|
240
|
+
*
|
|
241
|
+
* @returns Object
|
|
242
|
+
*/
|
|
243
|
+
/* jshint ignore:end */
|
|
244
|
+
VerificationAttemptsSummaryInstance.prototype.toJSON = function toJSON() {
|
|
245
|
+
let clone = {};
|
|
246
|
+
_.forOwn(this, function(value, key) {
|
|
247
|
+
if (!_.startsWith(key, '_') && ! _.isFunction(value)) {
|
|
248
|
+
clone[key] = value;
|
|
249
|
+
}
|
|
250
|
+
});
|
|
251
|
+
return clone;
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
VerificationAttemptsSummaryInstance.prototype[util.inspect.custom] = function
|
|
255
|
+
inspect(depth, options) {
|
|
256
|
+
return util.inspect(this.toJSON(), options);
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
/* jshint ignore:start */
|
|
261
|
+
/**
|
|
262
|
+
* Initialize the VerificationAttemptsSummaryContext
|
|
263
|
+
*
|
|
264
|
+
* @constructor Twilio.Verify.V2.VerificationAttemptsSummaryContext
|
|
265
|
+
*
|
|
266
|
+
* @param {V2} version - Version of the resource
|
|
267
|
+
*/
|
|
268
|
+
/* jshint ignore:end */
|
|
269
|
+
VerificationAttemptsSummaryContext = function
|
|
270
|
+
VerificationAttemptsSummaryContext(version) {
|
|
271
|
+
this._version = version;
|
|
272
|
+
|
|
273
|
+
// Path Solution
|
|
274
|
+
this._solution = {};
|
|
275
|
+
this._uri = `/Attempts/Summary`;
|
|
276
|
+
};
|
|
277
|
+
|
|
278
|
+
/* jshint ignore:start */
|
|
279
|
+
/**
|
|
280
|
+
* fetch a VerificationAttemptsSummaryInstance
|
|
281
|
+
*
|
|
282
|
+
* @function fetch
|
|
283
|
+
* @memberof Twilio.Verify.V2.VerificationAttemptsSummaryContext#
|
|
284
|
+
*
|
|
285
|
+
* @param {object} [opts] - Options for request
|
|
286
|
+
* @param {string} [opts.verifyServiceSid] -
|
|
287
|
+
* Filter the verification attempts considered on the summary by verify service.
|
|
288
|
+
* @param {Date} [opts.dateCreatedAfter] -
|
|
289
|
+
* Consider verification attempts create after this date on the summary.
|
|
290
|
+
* @param {Date} [opts.dateCreatedBefore] -
|
|
291
|
+
* Consider verification attempts created before this date on the summary.
|
|
292
|
+
* @param {string} [opts.country] -
|
|
293
|
+
* Filter verification attempts considered on the summary by destination country.
|
|
294
|
+
* @param {verification_attempts_summary.channels} [opts.channel] -
|
|
295
|
+
* Filter verification attempts considered on the summary by communication channel.
|
|
296
|
+
* @param {string} [opts.destinationPrefix] -
|
|
297
|
+
* Filters the attempts considered on the summary by destination prefix.
|
|
298
|
+
* @param {function} [callback] - Callback to handle processed record
|
|
299
|
+
*
|
|
300
|
+
* @returns {Promise} Resolves to processed VerificationAttemptsSummaryInstance
|
|
301
|
+
*/
|
|
302
|
+
/* jshint ignore:end */
|
|
303
|
+
VerificationAttemptsSummaryContext.prototype.fetch = function fetch(opts,
|
|
304
|
+
callback) {
|
|
305
|
+
if (_.isFunction(opts)) {
|
|
306
|
+
callback = opts;
|
|
307
|
+
opts = {};
|
|
308
|
+
}
|
|
309
|
+
opts = opts || {};
|
|
310
|
+
|
|
311
|
+
var deferred = Q.defer();
|
|
312
|
+
var data = values.of({
|
|
313
|
+
'VerifyServiceSid': _.get(opts, 'verifyServiceSid'),
|
|
314
|
+
'DateCreatedAfter': serialize.iso8601DateTime(_.get(opts, 'dateCreatedAfter')),
|
|
315
|
+
'DateCreatedBefore': serialize.iso8601DateTime(_.get(opts, 'dateCreatedBefore')),
|
|
316
|
+
'Country': _.get(opts, 'country'),
|
|
317
|
+
'Channel': _.get(opts, 'channel'),
|
|
318
|
+
'DestinationPrefix': _.get(opts, 'destinationPrefix')
|
|
319
|
+
});
|
|
320
|
+
|
|
321
|
+
var promise = this._version.fetch({uri: this._uri, method: 'GET', params: data});
|
|
322
|
+
|
|
323
|
+
promise = promise.then(function(payload) {
|
|
324
|
+
deferred.resolve(new VerificationAttemptsSummaryInstance(this._version, payload));
|
|
325
|
+
}.bind(this));
|
|
326
|
+
|
|
327
|
+
promise.catch(function(error) {
|
|
328
|
+
deferred.reject(error);
|
|
329
|
+
});
|
|
330
|
+
|
|
331
|
+
if (_.isFunction(callback)) {
|
|
332
|
+
deferred.promise.nodeify(callback);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
return deferred.promise;
|
|
336
|
+
};
|
|
337
|
+
|
|
338
|
+
/* jshint ignore:start */
|
|
339
|
+
/**
|
|
340
|
+
* Provide a user-friendly representation
|
|
341
|
+
*
|
|
342
|
+
* @function toJSON
|
|
343
|
+
* @memberof Twilio.Verify.V2.VerificationAttemptsSummaryContext#
|
|
344
|
+
*
|
|
345
|
+
* @returns Object
|
|
346
|
+
*/
|
|
347
|
+
/* jshint ignore:end */
|
|
348
|
+
VerificationAttemptsSummaryContext.prototype.toJSON = function toJSON() {
|
|
349
|
+
return this._solution;
|
|
350
|
+
};
|
|
351
|
+
|
|
352
|
+
VerificationAttemptsSummaryContext.prototype[util.inspect.custom] = function
|
|
353
|
+
inspect(depth, options) {
|
|
354
|
+
return util.inspect(this.toJSON(), options);
|
|
355
|
+
};
|
|
356
|
+
|
|
357
|
+
module.exports = {
|
|
358
|
+
VerificationAttemptsSummaryList: VerificationAttemptsSummaryList,
|
|
359
|
+
VerificationAttemptsSummaryPage: VerificationAttemptsSummaryPage,
|
|
360
|
+
VerificationAttemptsSummaryInstance: VerificationAttemptsSummaryInstance,
|
|
361
|
+
VerificationAttemptsSummaryContext: VerificationAttemptsSummaryContext
|
|
362
|
+
};
|
|
@@ -170,6 +170,7 @@ interface RoomListInstance {
|
|
|
170
170
|
* @property audioOnly - Indicates whether the room will only contain audio track participants for group rooms.
|
|
171
171
|
* @property emptyRoomTimeout - Configures the time a room will remain active after last participant leaves.
|
|
172
172
|
* @property enableTurn - Enable Twilio's Network Traversal TURN service
|
|
173
|
+
* @property largeRoom - Indicates whether this is a large room.
|
|
173
174
|
* @property maxParticipantDuration - The maximum number of seconds a Participant can be connected to the room
|
|
174
175
|
* @property maxParticipants - The maximum number of concurrent Participants allowed in the room
|
|
175
176
|
* @property mediaRegion - The region for the media server in Group Rooms
|
|
@@ -186,6 +187,7 @@ interface RoomListInstanceCreateOptions {
|
|
|
186
187
|
audioOnly?: boolean;
|
|
187
188
|
emptyRoomTimeout?: number;
|
|
188
189
|
enableTurn?: boolean;
|
|
190
|
+
largeRoom?: boolean;
|
|
189
191
|
maxParticipantDuration?: number;
|
|
190
192
|
maxParticipants?: number;
|
|
191
193
|
mediaRegion?: string;
|
|
@@ -292,6 +294,7 @@ interface RoomResource {
|
|
|
292
294
|
empty_room_timeout: number;
|
|
293
295
|
enable_turn: boolean;
|
|
294
296
|
end_time: Date;
|
|
297
|
+
large_room: boolean;
|
|
295
298
|
links: string;
|
|
296
299
|
max_concurrent_published_tracks: number;
|
|
297
300
|
max_participant_duration: number;
|
|
@@ -370,6 +373,7 @@ declare class RoomInstance extends SerializableClass {
|
|
|
370
373
|
* @param callback - Callback to handle processed record
|
|
371
374
|
*/
|
|
372
375
|
fetch(callback?: (error: Error | null, items: RoomInstance) => any): Promise<RoomInstance>;
|
|
376
|
+
largeRoom: boolean;
|
|
373
377
|
links: string;
|
|
374
378
|
maxConcurrentPublishedTracks: number;
|
|
375
379
|
maxParticipantDuration: number;
|
|
@@ -88,6 +88,7 @@ RoomList = function RoomList(version) {
|
|
|
88
88
|
* Configures the time a room will remain active after last participant leaves.
|
|
89
89
|
* @param {number} [opts.unusedRoomTimeout] -
|
|
90
90
|
* Configures the time a room will remain active when no one joins.
|
|
91
|
+
* @param {boolean} [opts.largeRoom] - Indicates whether this is a large room.
|
|
91
92
|
* @param {function} [callback] - Callback to handle processed record
|
|
92
93
|
*
|
|
93
94
|
* @returns {Promise} Resolves to processed RoomInstance
|
|
@@ -115,7 +116,8 @@ RoomList = function RoomList(version) {
|
|
|
115
116
|
'AudioOnly': serialize.bool(_.get(opts, 'audioOnly')),
|
|
116
117
|
'MaxParticipantDuration': _.get(opts, 'maxParticipantDuration'),
|
|
117
118
|
'EmptyRoomTimeout': _.get(opts, 'emptyRoomTimeout'),
|
|
118
|
-
'UnusedRoomTimeout': _.get(opts, 'unusedRoomTimeout')
|
|
119
|
+
'UnusedRoomTimeout': _.get(opts, 'unusedRoomTimeout'),
|
|
120
|
+
'LargeRoom': serialize.bool(_.get(opts, 'largeRoom'))
|
|
119
121
|
});
|
|
120
122
|
|
|
121
123
|
var promise = this._version.create({uri: this._uri, method: 'POST', data: data});
|
|
@@ -543,6 +545,7 @@ RoomPage.prototype[util.inspect.custom] = function inspect(depth, options) {
|
|
|
543
545
|
* The time a room will remain active after last participant leaves.
|
|
544
546
|
* @property {number} unusedRoomTimeout -
|
|
545
547
|
* The time a room will remain active when no one joins.
|
|
548
|
+
* @property {boolean} largeRoom - Indicates if this is a large room.
|
|
546
549
|
* @property {string} url - The absolute URL of the resource
|
|
547
550
|
* @property {string} links - The URLs of related resources
|
|
548
551
|
*
|
|
@@ -576,6 +579,7 @@ RoomInstance = function RoomInstance(version, payload, sid) {
|
|
|
576
579
|
this.audioOnly = payload.audio_only; // jshint ignore:line
|
|
577
580
|
this.emptyRoomTimeout = deserialize.integer(payload.empty_room_timeout); // jshint ignore:line
|
|
578
581
|
this.unusedRoomTimeout = deserialize.integer(payload.unused_room_timeout); // jshint ignore:line
|
|
582
|
+
this.largeRoom = payload.large_room; // jshint ignore:line
|
|
579
583
|
this.url = payload.url; // jshint ignore:line
|
|
580
584
|
this.links = payload.links; // jshint ignore:line
|
|
581
585
|
|