twilio 3.74.0 → 3.76.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/lib/rest/Chat.d.ts +4 -0
- package/lib/rest/Chat.js +19 -0
- package/lib/rest/FlexApi.d.ts +2 -0
- package/lib/rest/FlexApi.js +8 -0
- package/lib/rest/Insights.d.ts +2 -0
- package/lib/rest/Insights.js +8 -0
- package/lib/rest/Media.d.ts +2 -0
- package/lib/rest/Media.js +9 -0
- package/lib/rest/Supersim.d.ts +0 -2
- package/lib/rest/Supersim.js +0 -8
- 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/call/siprec.d.ts +2 -0
- package/lib/rest/api/v2010/account/call/siprec.js +3 -0
- package/lib/rest/api/v2010/account/call/stream.d.ts +4 -8
- package/lib/rest/api/v2010/account/call/stream.js +11 -7
- package/lib/rest/api/v2010/account/recording.d.ts +31 -2
- package/lib/rest/api/v2010/account/recording.js +25 -4
- package/lib/rest/api/v2010/account/usage/record/allTime.d.ts +1 -1
- package/lib/rest/api/v2010/account/usage/record/daily.d.ts +1 -1
- package/lib/rest/api/v2010/account/usage/record/lastMonth.d.ts +1 -1
- package/lib/rest/api/v2010/account/usage/record/monthly.d.ts +1 -1
- package/lib/rest/api/v2010/account/usage/record/thisMonth.d.ts +1 -1
- package/lib/rest/api/v2010/account/usage/record/today.d.ts +1 -1
- package/lib/rest/api/v2010/account/usage/record/yearly.d.ts +1 -1
- package/lib/rest/api/v2010/account/usage/record/yesterday.d.ts +1 -1
- package/lib/rest/api/v2010/account/usage/record.d.ts +1 -1
- package/lib/rest/api/v2010/account/usage/trigger.d.ts +1 -1
- package/lib/rest/chat/V3.d.ts +25 -0
- package/lib/rest/chat/V3.js +46 -0
- package/lib/rest/chat/v2/service/user/userChannel.d.ts +26 -1
- package/lib/rest/chat/v2/service/user/userChannel.js +18 -4
- package/lib/rest/chat/v3/channel.d.ts +177 -0
- package/lib/rest/chat/v3/channel.js +373 -0
- package/lib/rest/conversations/v1/addressConfiguration.d.ts +3 -3
- package/lib/rest/conversations/v1/addressConfiguration.js +4 -4
- package/lib/rest/flexApi/V1.d.ts +3 -0
- package/lib/rest/flexApi/V1.js +11 -0
- package/lib/rest/flexApi/v1/configuration.d.ts +2 -0
- package/lib/rest/flexApi/v1/configuration.js +3 -0
- package/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelInvite.d.ts +266 -0
- package/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelInvite.js +505 -0
- package/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelParticipant.d.ts +323 -0
- package/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelParticipant.js +674 -0
- package/lib/rest/flexApi/v1/interaction/interactionChannel.d.ts +327 -0
- package/lib/rest/flexApi/v1/interaction/interactionChannel.js +718 -0
- package/lib/rest/flexApi/v1/interaction.d.ts +152 -0
- package/lib/rest/flexApi/v1/interaction.js +395 -0
- package/lib/rest/insights/V1.d.ts +3 -0
- package/lib/rest/insights/V1.js +11 -0
- package/lib/rest/insights/v1/annotation.d.ts +188 -0
- package/lib/rest/insights/v1/annotation.js +406 -0
- package/lib/rest/media/V1.d.ts +3 -0
- package/lib/rest/media/V1.js +12 -0
- package/lib/rest/media/v1/mediaProcessor.js +1 -1
- package/lib/rest/media/v1/mediaRecording.d.ts +358 -0
- package/lib/rest/{supersim/v1/command.js → media/v1/mediaRecording.js} +190 -176
- package/lib/rest/media/v1/playerStreamer.d.ts +4 -0
- package/lib/rest/media/v1/playerStreamer.js +5 -1
- package/lib/rest/numbers/v2/regulatoryCompliance/bundle.d.ts +5 -5
- package/lib/rest/numbers/v2/regulatoryCompliance/bundle.js +3 -3
- package/lib/rest/numbers/v2/regulatoryCompliance/supportingDocument.d.ts +2 -0
- package/lib/rest/numbers/v2/regulatoryCompliance/supportingDocument.js +3 -0
- package/lib/rest/supersim/V1.d.ts +0 -3
- package/lib/rest/supersim/V1.js +0 -11
- package/lib/rest/supersim/v1/fleet.d.ts +0 -16
- package/lib/rest/supersim/v1/fleet.js +0 -18
- package/lib/rest/supersim/v1/usageRecord.d.ts +3 -3
- package/lib/rest/supersim/v1/usageRecord.js +3 -3
- package/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueCumulativeStatistics.d.ts +1 -1
- package/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueCumulativeStatistics.js +2 -2
- package/lib/rest/taskrouter/v1/workspace/workflow/workflowCumulativeStatistics.d.ts +1 -1
- package/lib/rest/taskrouter/v1/workspace/workflow/workflowCumulativeStatistics.js +2 -2
- package/lib/rest/taskrouter/v1/workspace/workspaceCumulativeStatistics.d.ts +1 -1
- package/lib/rest/taskrouter/v1/workspace/workspaceCumulativeStatistics.js +2 -2
- package/lib/rest/verify/v2/service/accessToken.d.ts +6 -0
- package/lib/rest/verify/v2/service/accessToken.js +9 -1
- package/lib/rest/verify/v2/service/entity/challenge.d.ts +4 -0
- package/lib/rest/verify/v2/service/entity/challenge.js +8 -1
- package/lib/rest/verify/v2/service/entity/factor.d.ts +2 -0
- package/lib/rest/verify/v2/service/entity/factor.js +2 -0
- package/lib/rest/verify/v2/service/entity/newFactor.d.ts +4 -0
- package/lib/rest/verify/v2/service/entity/newFactor.js +9 -3
- package/lib/rest/video/v1/composition.d.ts +4 -0
- package/lib/rest/video/v1/composition.js +6 -0
- package/lib/rest/video/v1/recording.d.ts +4 -0
- package/lib/rest/video/v1/recording.js +6 -0
- package/lib/twiml/VoiceResponse.d.ts +2 -2
- package/package.json +3 -3
- package/lib/rest/supersim/v1/command.d.ts +0 -342
|
@@ -165,11 +165,13 @@ interface PlayerStreamerListInstance {
|
|
|
165
165
|
/**
|
|
166
166
|
* Options to pass to create
|
|
167
167
|
*
|
|
168
|
+
* @property maxDuration - Maximum PlayerStreamer duration in seconds
|
|
168
169
|
* @property statusCallback - The URL to which Twilio will send PlayerStreamer event updates
|
|
169
170
|
* @property statusCallbackMethod - The HTTP method Twilio should use to call the `status_callback` URL
|
|
170
171
|
* @property video - Whether the PlayerStreamer is configured to stream video
|
|
171
172
|
*/
|
|
172
173
|
interface PlayerStreamerListInstanceCreateOptions {
|
|
174
|
+
maxDuration?: number;
|
|
173
175
|
statusCallback?: string;
|
|
174
176
|
statusCallbackMethod?: string;
|
|
175
177
|
video?: boolean;
|
|
@@ -253,6 +255,7 @@ interface PlayerStreamerResource {
|
|
|
253
255
|
date_updated: Date;
|
|
254
256
|
ended_reason: PlayerStreamerEndedReason;
|
|
255
257
|
links: string;
|
|
258
|
+
max_duration: number;
|
|
256
259
|
sid: string;
|
|
257
260
|
status: PlayerStreamerStatus;
|
|
258
261
|
status_callback: string;
|
|
@@ -317,6 +320,7 @@ declare class PlayerStreamerInstance extends SerializableClass {
|
|
|
317
320
|
*/
|
|
318
321
|
fetch(callback?: (error: Error | null, items: PlayerStreamerInstance) => any): Promise<PlayerStreamerInstance>;
|
|
319
322
|
links: string;
|
|
323
|
+
maxDuration: number;
|
|
320
324
|
/**
|
|
321
325
|
* Access the playbackGrant
|
|
322
326
|
*/
|
|
@@ -67,6 +67,7 @@ PlayerStreamerList = function PlayerStreamerList(version) {
|
|
|
67
67
|
* The URL to which Twilio will send PlayerStreamer event updates
|
|
68
68
|
* @param {string} [opts.statusCallbackMethod] -
|
|
69
69
|
* The HTTP method Twilio should use to call the `status_callback` URL
|
|
70
|
+
* @param {number} [opts.maxDuration] - Maximum PlayerStreamer duration in seconds
|
|
70
71
|
* @param {function} [callback] - Callback to handle processed record
|
|
71
72
|
*
|
|
72
73
|
* @returns {Promise} Resolves to processed PlayerStreamerInstance
|
|
@@ -83,7 +84,8 @@ PlayerStreamerList = function PlayerStreamerList(version) {
|
|
|
83
84
|
var data = values.of({
|
|
84
85
|
'Video': serialize.bool(_.get(opts, 'video')),
|
|
85
86
|
'StatusCallback': _.get(opts, 'statusCallback'),
|
|
86
|
-
'StatusCallbackMethod': _.get(opts, 'statusCallbackMethod')
|
|
87
|
+
'StatusCallbackMethod': _.get(opts, 'statusCallbackMethod'),
|
|
88
|
+
'MaxDuration': _.get(opts, 'maxDuration')
|
|
87
89
|
});
|
|
88
90
|
|
|
89
91
|
var promise = this._version.create({uri: this._uri, method: 'POST', data: data});
|
|
@@ -482,6 +484,7 @@ PlayerStreamerPage.prototype[util.inspect.custom] = function inspect(depth,
|
|
|
482
484
|
* The HTTP method Twilio should use to call the `status_callback` URL
|
|
483
485
|
* @property {player_streamer.ended_reason} endedReason -
|
|
484
486
|
* The reason why a PlayerStreamer ended
|
|
487
|
+
* @property {number} maxDuration - Maximum PlayerStreamer duration in seconds
|
|
485
488
|
*
|
|
486
489
|
* @param {V1} version - Version of the resource
|
|
487
490
|
* @param {PlayerStreamerPayload} payload - The instance payload
|
|
@@ -504,6 +507,7 @@ PlayerStreamerInstance = function PlayerStreamerInstance(version, payload, sid)
|
|
|
504
507
|
this.statusCallback = payload.status_callback; // jshint ignore:line
|
|
505
508
|
this.statusCallbackMethod = payload.status_callback_method; // jshint ignore:line
|
|
506
509
|
this.endedReason = payload.ended_reason; // jshint ignore:line
|
|
510
|
+
this.maxDuration = deserialize.integer(payload.max_duration); // jshint ignore:line
|
|
507
511
|
|
|
508
512
|
// Context
|
|
509
513
|
this._context = undefined;
|
|
@@ -20,9 +20,9 @@ import { SerializableClass } from '../../../../interfaces';
|
|
|
20
20
|
|
|
21
21
|
type BundleEndUserType = 'individual'|'business';
|
|
22
22
|
|
|
23
|
-
type BundleSortBy = '
|
|
23
|
+
type BundleSortBy = 'valid-until'|'date-updated';
|
|
24
24
|
|
|
25
|
-
type BundleSortDirection = '
|
|
25
|
+
type BundleSortDirection = 'ASC'|'DESC';
|
|
26
26
|
|
|
27
27
|
type BundleStatus = 'draft'|'pending-review'|'in-review'|'twilio-rejected'|'twilio-approved'|'provisionally-approved';
|
|
28
28
|
|
|
@@ -211,7 +211,7 @@ interface BundleListInstanceCreateOptions {
|
|
|
211
211
|
* each() will attempt to read the limit with the most efficient
|
|
212
212
|
* page size, i.e. min(limit, 1000)
|
|
213
213
|
* @property regulationSid - The unique string of a regulation.
|
|
214
|
-
* @property sortBy - Can be `
|
|
214
|
+
* @property sortBy - Can be `valid-until` or `date-updated`. Defaults to `date-created`.
|
|
215
215
|
* @property sortDirection - Default is `DESC`. Can be `ASC` or `DESC`.
|
|
216
216
|
* @property status - The verification status of the Bundle resource
|
|
217
217
|
* @property validUntilDate - Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well.
|
|
@@ -254,7 +254,7 @@ interface BundleListInstanceEachOptions {
|
|
|
254
254
|
* list() will attempt to read the limit with the most
|
|
255
255
|
* efficient page size, i.e. min(limit, 1000)
|
|
256
256
|
* @property regulationSid - The unique string of a regulation.
|
|
257
|
-
* @property sortBy - Can be `
|
|
257
|
+
* @property sortBy - Can be `valid-until` or `date-updated`. Defaults to `date-created`.
|
|
258
258
|
* @property sortDirection - Default is `DESC`. Can be `ASC` or `DESC`.
|
|
259
259
|
* @property status - The verification status of the Bundle resource
|
|
260
260
|
* @property validUntilDate - Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well.
|
|
@@ -288,7 +288,7 @@ interface BundleListInstanceOptions {
|
|
|
288
288
|
* @property pageSize - Number of records to return, defaults to 50
|
|
289
289
|
* @property pageToken - PageToken provided by the API
|
|
290
290
|
* @property regulationSid - The unique string of a regulation.
|
|
291
|
-
* @property sortBy - Can be `
|
|
291
|
+
* @property sortBy - Can be `valid-until` or `date-updated`. Defaults to `date-created`.
|
|
292
292
|
* @property sortDirection - Default is `DESC`. Can be `ASC` or `DESC`.
|
|
293
293
|
* @property status - The verification status of the Bundle resource
|
|
294
294
|
* @property validUntilDate - Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well.
|
|
@@ -144,7 +144,7 @@ BundleList = function BundleList(version) {
|
|
|
144
144
|
* @param {boolean} [opts.hasValidUntilDate] -
|
|
145
145
|
* Indicates that the Bundle is a valid Bundle until a specified expiration date.
|
|
146
146
|
* @param {bundle.sort_by} [opts.sortBy] -
|
|
147
|
-
* Can be `
|
|
147
|
+
* Can be `valid-until` or `date-updated`. Defaults to `date-created`.
|
|
148
148
|
* @param {bundle.sort_direction} [opts.sortDirection] -
|
|
149
149
|
* Default is `DESC`. Can be `ASC` or `DESC`.
|
|
150
150
|
* @param {Date} [opts.validUntilDateBefore] -
|
|
@@ -252,7 +252,7 @@ BundleList = function BundleList(version) {
|
|
|
252
252
|
* @param {boolean} [opts.hasValidUntilDate] -
|
|
253
253
|
* Indicates that the Bundle is a valid Bundle until a specified expiration date.
|
|
254
254
|
* @param {bundle.sort_by} [opts.sortBy] -
|
|
255
|
-
* Can be `
|
|
255
|
+
* Can be `valid-until` or `date-updated`. Defaults to `date-created`.
|
|
256
256
|
* @param {bundle.sort_direction} [opts.sortDirection] -
|
|
257
257
|
* Default is `DESC`. Can be `ASC` or `DESC`.
|
|
258
258
|
* @param {Date} [opts.validUntilDateBefore] -
|
|
@@ -331,7 +331,7 @@ BundleList = function BundleList(version) {
|
|
|
331
331
|
* @param {boolean} [opts.hasValidUntilDate] -
|
|
332
332
|
* Indicates that the Bundle is a valid Bundle until a specified expiration date.
|
|
333
333
|
* @param {bundle.sort_by} [opts.sortBy] -
|
|
334
|
-
* Can be `
|
|
334
|
+
* Can be `valid-until` or `date-updated`. Defaults to `date-created`.
|
|
335
335
|
* @param {bundle.sort_direction} [opts.sortDirection] -
|
|
336
336
|
* Default is `DESC`. Can be `ASC` or `DESC`.
|
|
337
337
|
* @param {Date} [opts.validUntilDateBefore] -
|
|
@@ -230,6 +230,7 @@ interface SupportingDocumentResource {
|
|
|
230
230
|
attributes: object;
|
|
231
231
|
date_created: Date;
|
|
232
232
|
date_updated: Date;
|
|
233
|
+
failure_reason: string;
|
|
233
234
|
friendly_name: string;
|
|
234
235
|
mime_type: string;
|
|
235
236
|
sid: string;
|
|
@@ -298,6 +299,7 @@ declare class SupportingDocumentInstance extends SerializableClass {
|
|
|
298
299
|
attributes: any;
|
|
299
300
|
dateCreated: Date;
|
|
300
301
|
dateUpdated: Date;
|
|
302
|
+
failureReason: string;
|
|
301
303
|
/**
|
|
302
304
|
* fetch a SupportingDocumentInstance
|
|
303
305
|
*
|
|
@@ -467,6 +467,8 @@ SupportingDocumentPage.prototype[util.inspect.custom] = function inspect(depth,
|
|
|
467
467
|
* @property {string} mimeType - The image type of the file
|
|
468
468
|
* @property {supporting_document.status} status -
|
|
469
469
|
* The verification status of the Supporting Document resource
|
|
470
|
+
* @property {string} failureReason -
|
|
471
|
+
* The failure reason of the Supporting Document Resource.
|
|
470
472
|
* @property {string} type - The type of the Supporting Document
|
|
471
473
|
* @property {object} attributes -
|
|
472
474
|
* The set of parameters that compose the Supporting Documents resource
|
|
@@ -491,6 +493,7 @@ SupportingDocumentInstance = function SupportingDocumentInstance(version,
|
|
|
491
493
|
this.friendlyName = payload.friendly_name; // jshint ignore:line
|
|
492
494
|
this.mimeType = payload.mime_type; // jshint ignore:line
|
|
493
495
|
this.status = payload.status; // jshint ignore:line
|
|
496
|
+
this.failureReason = payload.failure_reason; // jshint ignore:line
|
|
494
497
|
this.type = payload.type; // jshint ignore:line
|
|
495
498
|
this.attributes = payload.attributes; // jshint ignore:line
|
|
496
499
|
this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line
|
|
@@ -7,8 +7,6 @@
|
|
|
7
7
|
|
|
8
8
|
import Supersim = require('../Supersim');
|
|
9
9
|
import Version = require('../../base/Version');
|
|
10
|
-
import { CommandList } from './v1/command';
|
|
11
|
-
import { CommandListInstance } from './v1/command';
|
|
12
10
|
import { EsimProfileList } from './v1/esimProfile';
|
|
13
11
|
import { EsimProfileListInstance } from './v1/esimProfile';
|
|
14
12
|
import { FleetList } from './v1/fleet';
|
|
@@ -35,7 +33,6 @@ declare class V1 extends Version {
|
|
|
35
33
|
*/
|
|
36
34
|
constructor(domain: Supersim);
|
|
37
35
|
|
|
38
|
-
readonly commands: CommandListInstance;
|
|
39
36
|
readonly esimProfiles: EsimProfileListInstance;
|
|
40
37
|
readonly fleets: FleetListInstance;
|
|
41
38
|
readonly ipCommands: IpCommandListInstance;
|
package/lib/rest/supersim/V1.js
CHANGED
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
/* jshint ignore:end */
|
|
11
11
|
|
|
12
12
|
var _ = require('lodash'); /* jshint ignore:line */
|
|
13
|
-
var CommandList = require('./v1/command').CommandList;
|
|
14
13
|
var EsimProfileList = require('./v1/esimProfile').EsimProfileList;
|
|
15
14
|
var FleetList = require('./v1/fleet').FleetList;
|
|
16
15
|
var IpCommandList = require('./v1/ipCommand').IpCommandList;
|
|
@@ -29,7 +28,6 @@ var Version = require('../../base/Version'); /* jshint ignore:line */
|
|
|
29
28
|
*
|
|
30
29
|
* @constructor Twilio.Supersim.V1
|
|
31
30
|
*
|
|
32
|
-
* @property {Twilio.Supersim.V1.CommandList} commands - commands resource
|
|
33
31
|
* @property {Twilio.Supersim.V1.EsimProfileList} esimProfiles -
|
|
34
32
|
* esimProfiles resource
|
|
35
33
|
* @property {Twilio.Supersim.V1.FleetList} fleets - fleets resource
|
|
@@ -49,7 +47,6 @@ function V1(domain) {
|
|
|
49
47
|
Version.prototype.constructor.call(this, domain, 'v1');
|
|
50
48
|
|
|
51
49
|
// Resources
|
|
52
|
-
this._commands = undefined;
|
|
53
50
|
this._esimProfiles = undefined;
|
|
54
51
|
this._fleets = undefined;
|
|
55
52
|
this._ipCommands = undefined;
|
|
@@ -63,14 +60,6 @@ function V1(domain) {
|
|
|
63
60
|
_.extend(V1.prototype, Version.prototype);
|
|
64
61
|
V1.prototype.constructor = V1;
|
|
65
62
|
|
|
66
|
-
Object.defineProperty(V1.prototype,
|
|
67
|
-
'commands', {
|
|
68
|
-
get: function() {
|
|
69
|
-
this._commands = this._commands || new CommandList(this);
|
|
70
|
-
return this._commands;
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
|
|
74
63
|
Object.defineProperty(V1.prototype,
|
|
75
64
|
'esimProfiles', {
|
|
76
65
|
get: function() {
|
|
@@ -25,8 +25,6 @@ declare function FleetList(version: V1): FleetListInstance;
|
|
|
25
25
|
/**
|
|
26
26
|
* Options to pass to update
|
|
27
27
|
*
|
|
28
|
-
* @property commandsMethod - Deprecated
|
|
29
|
-
* @property commandsUrl - Deprecated
|
|
30
28
|
* @property ipCommandsMethod - A string representing the HTTP method to use when making a request to `ip_commands_url`
|
|
31
29
|
* @property ipCommandsUrl - The URL that will receive a webhook when a Super SIM in the Fleet is used to send an IP Command from your device
|
|
32
30
|
* @property networkAccessProfile - The SID or unique name of the Network Access Profile of the Fleet
|
|
@@ -35,8 +33,6 @@ declare function FleetList(version: V1): FleetListInstance;
|
|
|
35
33
|
* @property uniqueName - An application-defined string that uniquely identifies the resource
|
|
36
34
|
*/
|
|
37
35
|
interface FleetInstanceUpdateOptions {
|
|
38
|
-
commandsMethod?: string;
|
|
39
|
-
commandsUrl?: string;
|
|
40
36
|
ipCommandsMethod?: string;
|
|
41
37
|
ipCommandsUrl?: string;
|
|
42
38
|
networkAccessProfile?: string;
|
|
@@ -168,9 +164,6 @@ interface FleetListInstance {
|
|
|
168
164
|
/**
|
|
169
165
|
* Options to pass to create
|
|
170
166
|
*
|
|
171
|
-
* @property commandsEnabled - Deprecated
|
|
172
|
-
* @property commandsMethod - Deprecated
|
|
173
|
-
* @property commandsUrl - Deprecated
|
|
174
167
|
* @property dataEnabled - Defines whether SIMs in the Fleet are capable of using data connectivity
|
|
175
168
|
* @property dataLimit - The total data usage (download and upload combined) in Megabytes that each Sim resource assigned to the Fleet resource can consume
|
|
176
169
|
* @property ipCommandsMethod - A string representing the HTTP method to use when making a request to `ip_commands_url`
|
|
@@ -182,9 +175,6 @@ interface FleetListInstance {
|
|
|
182
175
|
* @property uniqueName - An application-defined string that uniquely identifies the resource
|
|
183
176
|
*/
|
|
184
177
|
interface FleetListInstanceCreateOptions {
|
|
185
|
-
commandsEnabled?: boolean;
|
|
186
|
-
commandsMethod?: string;
|
|
187
|
-
commandsUrl?: string;
|
|
188
178
|
dataEnabled?: boolean;
|
|
189
179
|
dataLimit?: number;
|
|
190
180
|
ipCommandsMethod?: string;
|
|
@@ -264,9 +254,6 @@ interface FleetPayload extends FleetResource, Page.TwilioResponsePayload {
|
|
|
264
254
|
|
|
265
255
|
interface FleetResource {
|
|
266
256
|
account_sid: string;
|
|
267
|
-
commands_enabled: boolean;
|
|
268
|
-
commands_method: string;
|
|
269
|
-
commands_url: string;
|
|
270
257
|
data_enabled: boolean;
|
|
271
258
|
data_limit: number;
|
|
272
259
|
data_metering: FleetDataMetering;
|
|
@@ -340,9 +327,6 @@ declare class FleetInstance extends SerializableClass {
|
|
|
340
327
|
|
|
341
328
|
private _proxy: FleetContext;
|
|
342
329
|
accountSid: string;
|
|
343
|
-
commandsEnabled: boolean;
|
|
344
|
-
commandsMethod: string;
|
|
345
|
-
commandsUrl: string;
|
|
346
330
|
dataEnabled: boolean;
|
|
347
331
|
dataLimit: number;
|
|
348
332
|
dataMetering: FleetDataMetering;
|
|
@@ -70,9 +70,6 @@ FleetList = function FleetList(version) {
|
|
|
70
70
|
* Defines whether SIMs in the Fleet are capable of using data connectivity
|
|
71
71
|
* @param {number} [opts.dataLimit] -
|
|
72
72
|
* The total data usage (download and upload combined) in Megabytes that each Sim resource assigned to the Fleet resource can consume
|
|
73
|
-
* @param {boolean} [opts.commandsEnabled] - Deprecated
|
|
74
|
-
* @param {string} [opts.commandsUrl] - Deprecated
|
|
75
|
-
* @param {string} [opts.commandsMethod] - Deprecated
|
|
76
73
|
* @param {string} [opts.ipCommandsUrl] -
|
|
77
74
|
* The URL that will receive a webhook when a Super SIM in the Fleet is used to send an IP Command from your device
|
|
78
75
|
* @param {string} [opts.ipCommandsMethod] -
|
|
@@ -102,9 +99,6 @@ FleetList = function FleetList(version) {
|
|
|
102
99
|
'UniqueName': _.get(opts, 'uniqueName'),
|
|
103
100
|
'DataEnabled': serialize.bool(_.get(opts, 'dataEnabled')),
|
|
104
101
|
'DataLimit': _.get(opts, 'dataLimit'),
|
|
105
|
-
'CommandsEnabled': serialize.bool(_.get(opts, 'commandsEnabled')),
|
|
106
|
-
'CommandsUrl': _.get(opts, 'commandsUrl'),
|
|
107
|
-
'CommandsMethod': _.get(opts, 'commandsMethod'),
|
|
108
102
|
'IpCommandsUrl': _.get(opts, 'ipCommandsUrl'),
|
|
109
103
|
'IpCommandsMethod': _.get(opts, 'ipCommandsMethod'),
|
|
110
104
|
'SmsCommandsEnabled': serialize.bool(_.get(opts, 'smsCommandsEnabled')),
|
|
@@ -509,9 +503,6 @@ FleetPage.prototype[util.inspect.custom] = function inspect(depth, options) {
|
|
|
509
503
|
* The total data usage (download and upload combined) in Megabytes that each Sim resource assigned to the Fleet resource can consume
|
|
510
504
|
* @property {fleet.data_metering} dataMetering -
|
|
511
505
|
* The model by which a SIM is metered and billed
|
|
512
|
-
* @property {boolean} commandsEnabled - Deprecated
|
|
513
|
-
* @property {string} commandsUrl - Deprecated
|
|
514
|
-
* @property {string} commandsMethod - Deprecated
|
|
515
506
|
* @property {boolean} smsCommandsEnabled -
|
|
516
507
|
* Defines whether SIMs in the Fleet are capable of sending and receiving machine-to-machine SMS via Commands
|
|
517
508
|
* @property {string} smsCommandsUrl -
|
|
@@ -543,9 +534,6 @@ FleetInstance = function FleetInstance(version, payload, sid) {
|
|
|
543
534
|
this.dataEnabled = payload.data_enabled; // jshint ignore:line
|
|
544
535
|
this.dataLimit = deserialize.integer(payload.data_limit); // jshint ignore:line
|
|
545
536
|
this.dataMetering = payload.data_metering; // jshint ignore:line
|
|
546
|
-
this.commandsEnabled = payload.commands_enabled; // jshint ignore:line
|
|
547
|
-
this.commandsUrl = payload.commands_url; // jshint ignore:line
|
|
548
|
-
this.commandsMethod = payload.commands_method; // jshint ignore:line
|
|
549
537
|
this.smsCommandsEnabled = payload.sms_commands_enabled; // jshint ignore:line
|
|
550
538
|
this.smsCommandsUrl = payload.sms_commands_url; // jshint ignore:line
|
|
551
539
|
this.smsCommandsMethod = payload.sms_commands_method; // jshint ignore:line
|
|
@@ -597,8 +585,6 @@ FleetInstance.prototype.fetch = function fetch(callback) {
|
|
|
597
585
|
* An application-defined string that uniquely identifies the resource
|
|
598
586
|
* @param {string} [opts.networkAccessProfile] -
|
|
599
587
|
* The SID or unique name of the Network Access Profile of the Fleet
|
|
600
|
-
* @param {string} [opts.commandsUrl] - Deprecated
|
|
601
|
-
* @param {string} [opts.commandsMethod] - Deprecated
|
|
602
588
|
* @param {string} [opts.ipCommandsUrl] -
|
|
603
589
|
* The URL that will receive a webhook when a Super SIM in the Fleet is used to send an IP Command from your device
|
|
604
590
|
* @param {string} [opts.ipCommandsMethod] -
|
|
@@ -706,8 +692,6 @@ FleetContext.prototype.fetch = function fetch(callback) {
|
|
|
706
692
|
* An application-defined string that uniquely identifies the resource
|
|
707
693
|
* @param {string} [opts.networkAccessProfile] -
|
|
708
694
|
* The SID or unique name of the Network Access Profile of the Fleet
|
|
709
|
-
* @param {string} [opts.commandsUrl] - Deprecated
|
|
710
|
-
* @param {string} [opts.commandsMethod] - Deprecated
|
|
711
695
|
* @param {string} [opts.ipCommandsUrl] -
|
|
712
696
|
* The URL that will receive a webhook when a Super SIM in the Fleet is used to send an IP Command from your device
|
|
713
697
|
* @param {string} [opts.ipCommandsMethod] -
|
|
@@ -732,8 +716,6 @@ FleetContext.prototype.update = function update(opts, callback) {
|
|
|
732
716
|
var data = values.of({
|
|
733
717
|
'UniqueName': _.get(opts, 'uniqueName'),
|
|
734
718
|
'NetworkAccessProfile': _.get(opts, 'networkAccessProfile'),
|
|
735
|
-
'CommandsUrl': _.get(opts, 'commandsUrl'),
|
|
736
|
-
'CommandsMethod': _.get(opts, 'commandsMethod'),
|
|
737
719
|
'IpCommandsUrl': _.get(opts, 'ipCommandsUrl'),
|
|
738
720
|
'IpCommandsMethod': _.get(opts, 'ipCommandsMethod'),
|
|
739
721
|
'SmsCommandsUrl': _.get(opts, 'smsCommandsUrl'),
|
|
@@ -136,7 +136,7 @@ interface UsageRecordListInstance {
|
|
|
136
136
|
* Function to process each record. If this and a positional
|
|
137
137
|
* callback are passed, this one will be used
|
|
138
138
|
* @property done - Function to be called upon completion of streaming
|
|
139
|
-
* @property endTime - Only include usage that occurred before this time.
|
|
139
|
+
* @property endTime - Only include usage that occurred before this time (exclusive).
|
|
140
140
|
* @property fleet - SID or unique name of a Fleet resource. Only show UsageRecords representing usage for Super SIMs belonging to this Fleet resource at the time the usage occurred.
|
|
141
141
|
* @property granularity - Time-based grouping that UsageRecords should be aggregated by. Can be: `hour`, `day`, or `all`. Default is `all`.
|
|
142
142
|
* @property group - Dimension over which to aggregate usage records.
|
|
@@ -173,7 +173,7 @@ interface UsageRecordListInstanceEachOptions {
|
|
|
173
173
|
/**
|
|
174
174
|
* Options to pass to list
|
|
175
175
|
*
|
|
176
|
-
* @property endTime - Only include usage that occurred before this time.
|
|
176
|
+
* @property endTime - Only include usage that occurred before this time (exclusive).
|
|
177
177
|
* @property fleet - SID or unique name of a Fleet resource. Only show UsageRecords representing usage for Super SIMs belonging to this Fleet resource at the time the usage occurred.
|
|
178
178
|
* @property granularity - Time-based grouping that UsageRecords should be aggregated by. Can be: `hour`, `day`, or `all`. Default is `all`.
|
|
179
179
|
* @property group - Dimension over which to aggregate usage records.
|
|
@@ -208,7 +208,7 @@ interface UsageRecordListInstanceOptions {
|
|
|
208
208
|
/**
|
|
209
209
|
* Options to pass to page
|
|
210
210
|
*
|
|
211
|
-
* @property endTime - Only include usage that occurred before this time.
|
|
211
|
+
* @property endTime - Only include usage that occurred before this time (exclusive).
|
|
212
212
|
* @property fleet - SID or unique name of a Fleet resource. Only show UsageRecords representing usage for Super SIMs belonging to this Fleet resource at the time the usage occurred.
|
|
213
213
|
* @property granularity - Time-based grouping that UsageRecords should be aggregated by. Can be: `hour`, `day`, or `all`. Default is `all`.
|
|
214
214
|
* @property group - Dimension over which to aggregate usage records.
|
|
@@ -85,7 +85,7 @@ UsageRecordList = function UsageRecordList(version) {
|
|
|
85
85
|
* @param {Date} [opts.startTime] -
|
|
86
86
|
* Only include usage that occurred at or after this time.
|
|
87
87
|
* @param {Date} [opts.endTime] -
|
|
88
|
-
* Only include usage that occurred before this time.
|
|
88
|
+
* Only include usage that occurred before this time (exclusive).
|
|
89
89
|
* @param {number} [opts.limit] -
|
|
90
90
|
* Upper limit for the number of records to return.
|
|
91
91
|
* each() guarantees never to return more than limit.
|
|
@@ -190,7 +190,7 @@ UsageRecordList = function UsageRecordList(version) {
|
|
|
190
190
|
* @param {Date} [opts.startTime] -
|
|
191
191
|
* Only include usage that occurred at or after this time.
|
|
192
192
|
* @param {Date} [opts.endTime] -
|
|
193
|
-
* Only include usage that occurred before this time.
|
|
193
|
+
* Only include usage that occurred before this time (exclusive).
|
|
194
194
|
* @param {number} [opts.limit] -
|
|
195
195
|
* Upper limit for the number of records to return.
|
|
196
196
|
* list() guarantees never to return more than limit.
|
|
@@ -266,7 +266,7 @@ UsageRecordList = function UsageRecordList(version) {
|
|
|
266
266
|
* @param {Date} [opts.startTime] -
|
|
267
267
|
* Only include usage that occurred at or after this time.
|
|
268
268
|
* @param {Date} [opts.endTime] -
|
|
269
|
-
* Only include usage that occurred before this time.
|
|
269
|
+
* Only include usage that occurred before this time (exclusive).
|
|
270
270
|
* @param {string} [opts.pageToken] - PageToken provided by the API
|
|
271
271
|
* @param {number} [opts.pageNumber] -
|
|
272
272
|
* Page Number, this value is simply for client state
|
|
@@ -24,7 +24,7 @@ declare function TaskQueueCumulativeStatisticsList(version: V1, workspaceSid: st
|
|
|
24
24
|
*
|
|
25
25
|
* @property endDate - Only calculate statistics from on or before this date
|
|
26
26
|
* @property minutes - Only calculate statistics since this many minutes in the past
|
|
27
|
-
* @property splitByWaitTime - A comma separated list of values that describes the thresholds to calculate statistics on
|
|
27
|
+
* @property splitByWaitTime - A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on
|
|
28
28
|
* @property startDate - Only calculate statistics from on or after this date
|
|
29
29
|
* @property taskChannel - Only calculate cumulative statistics on this TaskChannel
|
|
30
30
|
*/
|
|
@@ -295,7 +295,7 @@ Object.defineProperty(TaskQueueCumulativeStatisticsInstance.prototype,
|
|
|
295
295
|
* @param {string} [opts.taskChannel] -
|
|
296
296
|
* Only calculate cumulative statistics on this TaskChannel
|
|
297
297
|
* @param {string} [opts.splitByWaitTime] -
|
|
298
|
-
* A comma separated list of values that describes the thresholds to calculate statistics on
|
|
298
|
+
* A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on
|
|
299
299
|
* @param {function} [callback] - Callback to handle processed record
|
|
300
300
|
*
|
|
301
301
|
* @returns {Promise} Resolves to processed TaskQueueCumulativeStatisticsInstance
|
|
@@ -370,7 +370,7 @@ TaskQueueCumulativeStatisticsContext = function
|
|
|
370
370
|
* @param {string} [opts.taskChannel] -
|
|
371
371
|
* Only calculate cumulative statistics on this TaskChannel
|
|
372
372
|
* @param {string} [opts.splitByWaitTime] -
|
|
373
|
-
* A comma separated list of values that describes the thresholds to calculate statistics on
|
|
373
|
+
* A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on
|
|
374
374
|
* @param {function} [callback] - Callback to handle processed record
|
|
375
375
|
*
|
|
376
376
|
* @returns {Promise} Resolves to processed TaskQueueCumulativeStatisticsInstance
|
|
@@ -24,7 +24,7 @@ declare function WorkflowCumulativeStatisticsList(version: V1, workspaceSid: str
|
|
|
24
24
|
*
|
|
25
25
|
* @property endDate - Only include usage that occurred on or before this date
|
|
26
26
|
* @property minutes - Only calculate statistics since this many minutes in the past
|
|
27
|
-
* @property splitByWaitTime - A comma separated list of values that describes the thresholds to calculate statistics on
|
|
27
|
+
* @property splitByWaitTime - A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on
|
|
28
28
|
* @property startDate - Only calculate statistics from on or after this date
|
|
29
29
|
* @property taskChannel - Only calculate cumulative statistics on this TaskChannel
|
|
30
30
|
*/
|
|
@@ -293,7 +293,7 @@ Object.defineProperty(WorkflowCumulativeStatisticsInstance.prototype,
|
|
|
293
293
|
* @param {string} [opts.taskChannel] -
|
|
294
294
|
* Only calculate cumulative statistics on this TaskChannel
|
|
295
295
|
* @param {string} [opts.splitByWaitTime] -
|
|
296
|
-
* A comma separated list of values that describes the thresholds to calculate statistics on
|
|
296
|
+
* A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on
|
|
297
297
|
* @param {function} [callback] - Callback to handle processed record
|
|
298
298
|
*
|
|
299
299
|
* @returns {Promise} Resolves to processed WorkflowCumulativeStatisticsInstance
|
|
@@ -368,7 +368,7 @@ WorkflowCumulativeStatisticsContext = function
|
|
|
368
368
|
* @param {string} [opts.taskChannel] -
|
|
369
369
|
* Only calculate cumulative statistics on this TaskChannel
|
|
370
370
|
* @param {string} [opts.splitByWaitTime] -
|
|
371
|
-
* A comma separated list of values that describes the thresholds to calculate statistics on
|
|
371
|
+
* A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on
|
|
372
372
|
* @param {function} [callback] - Callback to handle processed record
|
|
373
373
|
*
|
|
374
374
|
* @returns {Promise} Resolves to processed WorkflowCumulativeStatisticsInstance
|
|
@@ -23,7 +23,7 @@ declare function WorkspaceCumulativeStatisticsList(version: V1, workspaceSid: st
|
|
|
23
23
|
*
|
|
24
24
|
* @property endDate - Only include usage that occurred on or before this date
|
|
25
25
|
* @property minutes - Only calculate statistics since this many minutes in the past
|
|
26
|
-
* @property splitByWaitTime - A comma separated list of values that describes the thresholds to calculate statistics on
|
|
26
|
+
* @property splitByWaitTime - A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on
|
|
27
27
|
* @property startDate - Only calculate statistics from on or after this date
|
|
28
28
|
* @property taskChannel - Only calculate cumulative statistics on this TaskChannel
|
|
29
29
|
*/
|
|
@@ -272,7 +272,7 @@ Object.defineProperty(WorkspaceCumulativeStatisticsInstance.prototype,
|
|
|
272
272
|
* @param {string} [opts.taskChannel] -
|
|
273
273
|
* Only calculate cumulative statistics on this TaskChannel
|
|
274
274
|
* @param {string} [opts.splitByWaitTime] -
|
|
275
|
-
* A comma separated list of values that describes the thresholds to calculate statistics on
|
|
275
|
+
* A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on
|
|
276
276
|
* @param {function} [callback] - Callback to handle processed record
|
|
277
277
|
*
|
|
278
278
|
* @returns {Promise} Resolves to processed WorkspaceCumulativeStatisticsInstance
|
|
@@ -345,7 +345,7 @@ WorkspaceCumulativeStatisticsContext = function
|
|
|
345
345
|
* @param {string} [opts.taskChannel] -
|
|
346
346
|
* Only calculate cumulative statistics on this TaskChannel
|
|
347
347
|
* @param {string} [opts.splitByWaitTime] -
|
|
348
|
-
* A comma separated list of values that describes the thresholds to calculate statistics on
|
|
348
|
+
* A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on
|
|
349
349
|
* @param {function} [callback] - Callback to handle processed record
|
|
350
350
|
*
|
|
351
351
|
* @returns {Promise} Resolves to processed WorkspaceCumulativeStatisticsInstance
|
|
@@ -53,11 +53,13 @@ interface AccessTokenListInstance {
|
|
|
53
53
|
* @property factorFriendlyName - The factor friendly name
|
|
54
54
|
* @property factorType - The Type of this Factor
|
|
55
55
|
* @property identity - Unique external identifier of the Entity
|
|
56
|
+
* @property ttl - How long, in seconds, the access token is valid.
|
|
56
57
|
*/
|
|
57
58
|
interface AccessTokenListInstanceCreateOptions {
|
|
58
59
|
factorFriendlyName?: string;
|
|
59
60
|
factorType: AccessTokenFactorTypes;
|
|
60
61
|
identity: string;
|
|
62
|
+
ttl?: number;
|
|
61
63
|
}
|
|
62
64
|
|
|
63
65
|
interface AccessTokenPayload extends AccessTokenResource, Page.TwilioResponsePayload {
|
|
@@ -65,12 +67,14 @@ interface AccessTokenPayload extends AccessTokenResource, Page.TwilioResponsePay
|
|
|
65
67
|
|
|
66
68
|
interface AccessTokenResource {
|
|
67
69
|
account_sid: string;
|
|
70
|
+
date_created: Date;
|
|
68
71
|
entity_identity: string;
|
|
69
72
|
factor_friendly_name: string;
|
|
70
73
|
factor_type: AccessTokenFactorTypes;
|
|
71
74
|
service_sid: string;
|
|
72
75
|
sid: string;
|
|
73
76
|
token: string;
|
|
77
|
+
ttl: number;
|
|
74
78
|
url: string;
|
|
75
79
|
}
|
|
76
80
|
|
|
@@ -121,6 +125,7 @@ declare class AccessTokenInstance extends SerializableClass {
|
|
|
121
125
|
|
|
122
126
|
private _proxy: AccessTokenContext;
|
|
123
127
|
accountSid: string;
|
|
128
|
+
dateCreated: Date;
|
|
124
129
|
entityIdentity: string;
|
|
125
130
|
factorFriendlyName: string;
|
|
126
131
|
factorType: AccessTokenFactorTypes;
|
|
@@ -137,6 +142,7 @@ declare class AccessTokenInstance extends SerializableClass {
|
|
|
137
142
|
*/
|
|
138
143
|
toJSON(): any;
|
|
139
144
|
token: string;
|
|
145
|
+
ttl: number;
|
|
140
146
|
url: string;
|
|
141
147
|
}
|
|
142
148
|
|
|
@@ -13,6 +13,8 @@ var Q = require('q'); /* jshint ignore:line */
|
|
|
13
13
|
var _ = require('lodash'); /* jshint ignore:line */
|
|
14
14
|
var util = require('util'); /* jshint ignore:line */
|
|
15
15
|
var Page = require('../../../../base/Page'); /* jshint ignore:line */
|
|
16
|
+
var deserialize = require(
|
|
17
|
+
'../../../../base/deserialize'); /* jshint ignore:line */
|
|
16
18
|
var values = require('../../../../base/values'); /* jshint ignore:line */
|
|
17
19
|
|
|
18
20
|
var AccessTokenList;
|
|
@@ -63,6 +65,7 @@ AccessTokenList = function AccessTokenList(version, serviceSid) {
|
|
|
63
65
|
* @param {string} opts.identity - Unique external identifier of the Entity
|
|
64
66
|
* @param {access_token.factor_types} opts.factorType - The Type of this Factor
|
|
65
67
|
* @param {string} [opts.factorFriendlyName] - The factor friendly name
|
|
68
|
+
* @param {number} [opts.ttl] - How long, in seconds, the access token is valid.
|
|
66
69
|
* @param {function} [callback] - Callback to handle processed record
|
|
67
70
|
*
|
|
68
71
|
* @returns {Promise} Resolves to processed AccessTokenInstance
|
|
@@ -83,7 +86,8 @@ AccessTokenList = function AccessTokenList(version, serviceSid) {
|
|
|
83
86
|
var data = values.of({
|
|
84
87
|
'Identity': _.get(opts, 'identity'),
|
|
85
88
|
'FactorType': _.get(opts, 'factorType'),
|
|
86
|
-
'FactorFriendlyName': _.get(opts, 'factorFriendlyName')
|
|
89
|
+
'FactorFriendlyName': _.get(opts, 'factorFriendlyName'),
|
|
90
|
+
'Ttl': _.get(opts, 'ttl')
|
|
87
91
|
});
|
|
88
92
|
|
|
89
93
|
var promise = this._version.create({uri: this._uri, method: 'POST', data: data});
|
|
@@ -233,6 +237,8 @@ AccessTokenPage.prototype[util.inspect.custom] = function inspect(depth,
|
|
|
233
237
|
* A human readable description of this factor.
|
|
234
238
|
* @property {string} token - Generated access token.
|
|
235
239
|
* @property {string} url - The URL of this resource.
|
|
240
|
+
* @property {number} ttl - How long, in seconds, the access token is valid.
|
|
241
|
+
* @property {Date} dateCreated - The date this access token was created
|
|
236
242
|
*
|
|
237
243
|
* @param {V2} version - Version of the resource
|
|
238
244
|
* @param {AccessTokenPayload} payload - The instance payload
|
|
@@ -253,6 +259,8 @@ AccessTokenInstance = function AccessTokenInstance(version, payload, serviceSid,
|
|
|
253
259
|
this.factorFriendlyName = payload.factor_friendly_name; // jshint ignore:line
|
|
254
260
|
this.token = payload.token; // jshint ignore:line
|
|
255
261
|
this.url = payload.url; // jshint ignore:line
|
|
262
|
+
this.ttl = deserialize.integer(payload.ttl); // jshint ignore:line
|
|
263
|
+
this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line
|
|
256
264
|
|
|
257
265
|
// Context
|
|
258
266
|
this._context = undefined;
|
|
@@ -36,9 +36,11 @@ declare function ChallengeList(version: V2, serviceSid: string, identity: string
|
|
|
36
36
|
* Options to pass to update
|
|
37
37
|
*
|
|
38
38
|
* @property authPayload - Optional payload to verify the Challenge
|
|
39
|
+
* @property metadata - Metadata of the challenge.
|
|
39
40
|
*/
|
|
40
41
|
interface ChallengeInstanceUpdateOptions {
|
|
41
42
|
authPayload?: string;
|
|
43
|
+
metadata?: object;
|
|
42
44
|
}
|
|
43
45
|
|
|
44
46
|
interface ChallengeListInstance {
|
|
@@ -273,6 +275,7 @@ interface ChallengeResource {
|
|
|
273
275
|
hidden_details: object;
|
|
274
276
|
identity: string;
|
|
275
277
|
links: string;
|
|
278
|
+
metadata: object;
|
|
276
279
|
responded_reason: ChallengeChallengeReasons;
|
|
277
280
|
service_sid: string;
|
|
278
281
|
sid: string;
|
|
@@ -361,6 +364,7 @@ declare class ChallengeInstance extends SerializableClass {
|
|
|
361
364
|
hiddenDetails: any;
|
|
362
365
|
identity: string;
|
|
363
366
|
links: string;
|
|
367
|
+
metadata: any;
|
|
364
368
|
/**
|
|
365
369
|
* Access the notifications
|
|
366
370
|
*/
|
|
@@ -518,6 +518,7 @@ ChallengePage.prototype[util.inspect.custom] = function inspect(depth, options)
|
|
|
518
518
|
* The Reason of this Challenge `status`
|
|
519
519
|
* @property {object} details - Details about the Challenge.
|
|
520
520
|
* @property {object} hiddenDetails - Hidden details about the Challenge
|
|
521
|
+
* @property {object} metadata - Metadata of the challenge.
|
|
521
522
|
* @property {challenge.factor_types} factorType -
|
|
522
523
|
* The Factor Type of this Challenge
|
|
523
524
|
* @property {string} url - The URL of this resource.
|
|
@@ -549,6 +550,7 @@ ChallengeInstance = function ChallengeInstance(version, payload, serviceSid,
|
|
|
549
550
|
this.respondedReason = payload.responded_reason; // jshint ignore:line
|
|
550
551
|
this.details = payload.details; // jshint ignore:line
|
|
551
552
|
this.hiddenDetails = payload.hidden_details; // jshint ignore:line
|
|
553
|
+
this.metadata = payload.metadata; // jshint ignore:line
|
|
552
554
|
this.factorType = payload.factor_type; // jshint ignore:line
|
|
553
555
|
this.url = payload.url; // jshint ignore:line
|
|
554
556
|
this.links = payload.links; // jshint ignore:line
|
|
@@ -599,6 +601,7 @@ ChallengeInstance.prototype.fetch = function fetch(callback) {
|
|
|
599
601
|
*
|
|
600
602
|
* @param {object} [opts] - Options for request
|
|
601
603
|
* @param {string} [opts.authPayload] - Optional payload to verify the Challenge
|
|
604
|
+
* @param {object} [opts.metadata] - Metadata of the challenge.
|
|
602
605
|
* @param {function} [callback] - Callback to handle processed record
|
|
603
606
|
*
|
|
604
607
|
* @returns {Promise} Resolves to processed ChallengeInstance
|
|
@@ -724,6 +727,7 @@ ChallengeContext.prototype.fetch = function fetch(callback) {
|
|
|
724
727
|
*
|
|
725
728
|
* @param {object} [opts] - Options for request
|
|
726
729
|
* @param {string} [opts.authPayload] - Optional payload to verify the Challenge
|
|
730
|
+
* @param {object} [opts.metadata] - Metadata of the challenge.
|
|
727
731
|
* @param {function} [callback] - Callback to handle processed record
|
|
728
732
|
*
|
|
729
733
|
* @returns {Promise} Resolves to processed ChallengeInstance
|
|
@@ -737,7 +741,10 @@ ChallengeContext.prototype.update = function update(opts, callback) {
|
|
|
737
741
|
opts = opts || {};
|
|
738
742
|
|
|
739
743
|
var deferred = Q.defer();
|
|
740
|
-
var data = values.of({
|
|
744
|
+
var data = values.of({
|
|
745
|
+
'AuthPayload': _.get(opts, 'authPayload'),
|
|
746
|
+
'Metadata': serialize.object(_.get(opts, 'metadata'))
|
|
747
|
+
});
|
|
741
748
|
|
|
742
749
|
var promise = this._version.update({uri: this._uri, method: 'POST', data: data});
|
|
743
750
|
|