twilio 3.75.0 → 3.76.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.
Files changed (86) hide show
  1. package/README.md +0 -2
  2. package/lib/rest/Chat.d.ts +4 -0
  3. package/lib/rest/Chat.js +19 -0
  4. package/lib/rest/FlexApi.d.ts +2 -0
  5. package/lib/rest/FlexApi.js +8 -0
  6. package/lib/rest/Insights.d.ts +2 -0
  7. package/lib/rest/Insights.js +8 -0
  8. package/lib/rest/Media.d.ts +2 -0
  9. package/lib/rest/Media.js +9 -0
  10. package/lib/rest/Supersim.d.ts +0 -2
  11. package/lib/rest/Supersim.js +0 -8
  12. package/lib/rest/Verify.d.ts +2 -0
  13. package/lib/rest/Verify.js +9 -0
  14. package/lib/rest/api/v2010/account/call/payment.d.ts +1 -1
  15. package/lib/rest/api/v2010/account/call/payment.js +1 -1
  16. package/lib/rest/api/v2010/account/call/stream.d.ts +2 -8
  17. package/lib/rest/api/v2010/account/call/stream.js +8 -7
  18. package/lib/rest/api/v2010/account/call.d.ts +0 -2
  19. package/lib/rest/api/v2010/account/call.js +0 -2
  20. package/lib/rest/api/v2010/account/recording.d.ts +31 -2
  21. package/lib/rest/api/v2010/account/recording.js +25 -4
  22. package/lib/rest/api/v2010/account/usage/record/allTime.d.ts +1 -1
  23. package/lib/rest/api/v2010/account/usage/record/daily.d.ts +1 -1
  24. package/lib/rest/api/v2010/account/usage/record/lastMonth.d.ts +1 -1
  25. package/lib/rest/api/v2010/account/usage/record/monthly.d.ts +1 -1
  26. package/lib/rest/api/v2010/account/usage/record/thisMonth.d.ts +1 -1
  27. package/lib/rest/api/v2010/account/usage/record/today.d.ts +1 -1
  28. package/lib/rest/api/v2010/account/usage/record/yearly.d.ts +1 -1
  29. package/lib/rest/api/v2010/account/usage/record/yesterday.d.ts +1 -1
  30. package/lib/rest/api/v2010/account/usage/record.d.ts +1 -1
  31. package/lib/rest/api/v2010/account/usage/trigger.d.ts +1 -1
  32. package/lib/rest/chat/V3.d.ts +25 -0
  33. package/lib/rest/chat/V3.js +46 -0
  34. package/lib/rest/chat/v2/service/user/userChannel.d.ts +26 -1
  35. package/lib/rest/chat/v2/service/user/userChannel.js +18 -4
  36. package/lib/rest/chat/v3/channel.d.ts +177 -0
  37. package/lib/rest/chat/v3/channel.js +373 -0
  38. package/lib/rest/flexApi/V1.d.ts +3 -0
  39. package/lib/rest/flexApi/V1.js +11 -0
  40. package/lib/rest/flexApi/v1/configuration.d.ts +2 -0
  41. package/lib/rest/flexApi/v1/configuration.js +3 -0
  42. package/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelInvite.d.ts +266 -0
  43. package/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelInvite.js +505 -0
  44. package/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelParticipant.d.ts +323 -0
  45. package/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelParticipant.js +674 -0
  46. package/lib/rest/flexApi/v1/interaction/interactionChannel.d.ts +327 -0
  47. package/lib/rest/flexApi/v1/interaction/interactionChannel.js +718 -0
  48. package/lib/rest/flexApi/v1/interaction.d.ts +152 -0
  49. package/lib/rest/flexApi/v1/interaction.js +395 -0
  50. package/lib/rest/insights/V1.d.ts +3 -0
  51. package/lib/rest/insights/V1.js +11 -0
  52. package/lib/rest/insights/v1/annotation.d.ts +188 -0
  53. package/lib/rest/insights/v1/annotation.js +406 -0
  54. package/lib/rest/media/V1.d.ts +3 -0
  55. package/lib/rest/media/V1.js +12 -0
  56. package/lib/rest/media/v1/mediaProcessor.js +1 -1
  57. package/lib/rest/media/v1/mediaRecording.d.ts +358 -0
  58. package/lib/rest/{supersim/v1/command.js → media/v1/mediaRecording.js} +190 -176
  59. package/lib/rest/media/v1/playerStreamer.d.ts +4 -0
  60. package/lib/rest/media/v1/playerStreamer.js +5 -1
  61. package/lib/rest/numbers/v2/regulatoryCompliance/supportingDocument.d.ts +2 -0
  62. package/lib/rest/numbers/v2/regulatoryCompliance/supportingDocument.js +3 -0
  63. package/lib/rest/supersim/V1.d.ts +0 -3
  64. package/lib/rest/supersim/V1.js +0 -11
  65. package/lib/rest/supersim/v1/fleet.d.ts +0 -16
  66. package/lib/rest/supersim/v1/fleet.js +0 -18
  67. package/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueCumulativeStatistics.d.ts +1 -1
  68. package/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueCumulativeStatistics.js +2 -2
  69. package/lib/rest/taskrouter/v1/workspace/workflow/workflowCumulativeStatistics.d.ts +1 -1
  70. package/lib/rest/taskrouter/v1/workspace/workflow/workflowCumulativeStatistics.js +2 -2
  71. package/lib/rest/taskrouter/v1/workspace/workspaceCumulativeStatistics.d.ts +1 -1
  72. package/lib/rest/taskrouter/v1/workspace/workspaceCumulativeStatistics.js +2 -2
  73. package/lib/rest/verify/V2.d.ts +3 -0
  74. package/lib/rest/verify/V2.js +13 -0
  75. package/lib/rest/verify/v2/service/accessToken.d.ts +6 -0
  76. package/lib/rest/verify/v2/service/accessToken.js +9 -1
  77. package/lib/rest/verify/v2/service/entity/challenge.d.ts +4 -0
  78. package/lib/rest/verify/v2/service/entity/challenge.js +8 -1
  79. package/lib/rest/verify/v2/verificationAttemptsSummary.d.ts +156 -0
  80. package/lib/rest/verify/v2/verificationAttemptsSummary.js +362 -0
  81. package/lib/rest/video/v1/composition.d.ts +4 -0
  82. package/lib/rest/video/v1/composition.js +6 -0
  83. package/lib/rest/video/v1/recording.d.ts +4 -0
  84. package/lib/rest/video/v1/recording.js +6 -0
  85. package/package.json +3 -3
  86. 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;
@@ -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;
@@ -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'),
@@ -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
@@ -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;
@@ -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() {
@@ -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({'AuthPayload': _.get(opts, 'authPayload')});
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