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
@@ -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
+ };
@@ -267,6 +267,8 @@ interface CompositionResource {
267
267
  sid: string;
268
268
  size: number;
269
269
  status: CompositionStatus;
270
+ status_callback: string;
271
+ status_callback_method: string;
270
272
  trim: boolean;
271
273
  url: string;
272
274
  video_layout: object;
@@ -343,6 +345,8 @@ declare class CompositionInstance extends SerializableClass {
343
345
  sid: string;
344
346
  size: number;
345
347
  status: CompositionStatus;
348
+ statusCallback: string;
349
+ statusCallbackMethod: string;
346
350
  /**
347
351
  * Provide a user-friendly representation
348
352
  */
@@ -529,6 +529,10 @@ CompositionPage.prototype[util.inspect.custom] = function inspect(depth,
529
529
  * The duration of the composition's media file in seconds
530
530
  * @property {string} mediaExternalLocation -
531
531
  * The URL of the media file associated with the composition when stored externally
532
+ * @property {string} statusCallback -
533
+ * The URL called to send status information on every composition event.
534
+ * @property {string} statusCallbackMethod -
535
+ * The HTTP method used to call `status_callback`
532
536
  * @property {string} url - The absolute URL of the resource
533
537
  * @property {string} links -
534
538
  * The URL of the media file associated with the composition
@@ -559,6 +563,8 @@ CompositionInstance = function CompositionInstance(version, payload, sid) {
559
563
  this.size = deserialize.integer(payload.size); // jshint ignore:line
560
564
  this.duration = deserialize.integer(payload.duration); // jshint ignore:line
561
565
  this.mediaExternalLocation = payload.media_external_location; // jshint ignore:line
566
+ this.statusCallback = payload.status_callback; // jshint ignore:line
567
+ this.statusCallbackMethod = payload.status_callback_method; // jshint ignore:line
562
568
  this.url = payload.url; // jshint ignore:line
563
569
  this.links = payload.links; // jshint ignore:line
564
570
 
@@ -248,6 +248,8 @@ interface RecordingResource {
248
248
  size: number;
249
249
  source_sid: string;
250
250
  status: RecordingStatus;
251
+ status_callback: string;
252
+ status_callback_method: string;
251
253
  track_name: string;
252
254
  type: RecordingType;
253
255
  url: string;
@@ -321,6 +323,8 @@ declare class RecordingInstance extends SerializableClass {
321
323
  size: number;
322
324
  sourceSid: string;
323
325
  status: RecordingStatus;
326
+ statusCallback: string;
327
+ statusCallbackMethod: string;
324
328
  /**
325
329
  * Provide a user-friendly representation
326
330
  */
@@ -465,6 +465,10 @@ RecordingPage.prototype[util.inspect.custom] = function inspect(depth, options)
465
465
  * The number of milliseconds between a point in time that is common to all rooms in a group and when the source room of the recording started
466
466
  * @property {string} mediaExternalLocation -
467
467
  * The URL of the media file associated with the recording when stored externally
468
+ * @property {string} statusCallback -
469
+ * The URL called to send status information on every recording event.
470
+ * @property {string} statusCallbackMethod -
471
+ * The HTTP method used to call `status_callback`
468
472
  * @property {string} links - The URLs of related resources
469
473
  *
470
474
  * @param {V1} version - Version of the resource
@@ -491,6 +495,8 @@ RecordingInstance = function RecordingInstance(version, payload, sid) {
491
495
  this.trackName = payload.track_name; // jshint ignore:line
492
496
  this.offset = deserialize.integer(payload.offset); // jshint ignore:line
493
497
  this.mediaExternalLocation = payload.media_external_location; // jshint ignore:line
498
+ this.statusCallback = payload.status_callback; // jshint ignore:line
499
+ this.statusCallbackMethod = payload.status_callback_method; // jshint ignore:line
494
500
  this.links = payload.links; // jshint ignore:line
495
501
 
496
502
  // Context
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "twilio",
3
3
  "description": "A Twilio helper library",
4
- "version": "3.75.0",
4
+ "version": "3.76.1",
5
5
  "author": "API Team <api@twilio.com>",
6
6
  "contributors": [
7
7
  {
@@ -20,7 +20,7 @@
20
20
  "url": "https://github.com/twilio/twilio-node.git"
21
21
  },
22
22
  "dependencies": {
23
- "axios": "^0.25.0",
23
+ "axios": "^0.26.1",
24
24
  "dayjs": "^1.8.29",
25
25
  "https-proxy-agent": "^5.0.0",
26
26
  "jsonwebtoken": "^8.5.1",
@@ -29,7 +29,7 @@
29
29
  "qs": "^6.9.4",
30
30
  "rootpath": "^0.1.2",
31
31
  "scmp": "^2.1.0",
32
- "url-parse": "^1.5.6",
32
+ "url-parse": "^1.5.9",
33
33
  "xmlbuilder": "^13.0.2"
34
34
  },
35
35
  "devDependencies": {