twilio 3.82.1 → 3.83.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.
Files changed (53) hide show
  1. package/lib/rest/Oauth.d.ts +32 -0
  2. package/lib/rest/Oauth.js +79 -0
  3. package/lib/rest/Supersim.d.ts +2 -0
  4. package/lib/rest/Supersim.js +9 -0
  5. package/lib/rest/Twilio.d.ts +2 -0
  6. package/lib/rest/Twilio.js +14 -0
  7. package/lib/rest/api/v2010/account/conference/participant.d.ts +16 -2
  8. package/lib/rest/api/v2010/account/conference/participant.js +28 -5
  9. package/lib/rest/api/v2010/account/message.d.ts +2 -0
  10. package/lib/rest/api/v2010/account/message.js +3 -0
  11. package/lib/rest/api/v2010/account/usage/record/allTime.d.ts +1 -1
  12. package/lib/rest/api/v2010/account/usage/record/daily.d.ts +1 -1
  13. package/lib/rest/api/v2010/account/usage/record/lastMonth.d.ts +1 -1
  14. package/lib/rest/api/v2010/account/usage/record/monthly.d.ts +1 -1
  15. package/lib/rest/api/v2010/account/usage/record/thisMonth.d.ts +1 -1
  16. package/lib/rest/api/v2010/account/usage/record/today.d.ts +1 -1
  17. package/lib/rest/api/v2010/account/usage/record/yearly.d.ts +1 -1
  18. package/lib/rest/api/v2010/account/usage/record/yesterday.d.ts +1 -1
  19. package/lib/rest/api/v2010/account/usage/record.d.ts +1 -1
  20. package/lib/rest/api/v2010/account/usage/trigger.d.ts +1 -1
  21. package/lib/rest/oauth/V1.d.ts +34 -0
  22. package/lib/rest/oauth/V1.js +80 -0
  23. package/lib/rest/oauth/v1/oauth.d.ts +115 -0
  24. package/lib/rest/oauth/v1/oauth.js +299 -0
  25. package/lib/rest/oauth/v1/openidDiscovery.d.ts +137 -0
  26. package/lib/rest/oauth/v1/openidDiscovery.js +329 -0
  27. package/lib/rest/oauth/v1/token.d.ts +115 -0
  28. package/lib/rest/oauth/v1/token.js +265 -0
  29. package/lib/rest/oauth/v1/userInfo.d.ts +123 -0
  30. package/lib/rest/oauth/v1/userInfo.js +308 -0
  31. package/lib/rest/supersim/V1.d.ts +3 -0
  32. package/lib/rest/supersim/V1.js +12 -0
  33. package/lib/rest/supersim/v1/settingsUpdate.d.ts +261 -0
  34. package/lib/rest/supersim/v1/settingsUpdate.js +466 -0
  35. package/lib/rest/verify/v2/service/accessToken.d.ts +0 -12
  36. package/lib/rest/verify/v2/service/accessToken.js +0 -12
  37. package/lib/rest/verify/v2/service/entity/challenge/notification.d.ts +0 -9
  38. package/lib/rest/verify/v2/service/entity/challenge/notification.js +0 -9
  39. package/lib/rest/verify/v2/service/entity/challenge.d.ts +0 -12
  40. package/lib/rest/verify/v2/service/entity/challenge.js +0 -12
  41. package/lib/rest/verify/v2/service/entity/factor.d.ts +0 -12
  42. package/lib/rest/verify/v2/service/entity/factor.js +0 -12
  43. package/lib/rest/verify/v2/service/entity/newFactor.d.ts +0 -9
  44. package/lib/rest/verify/v2/service/entity/newFactor.js +0 -9
  45. package/lib/rest/verify/v2/service/entity.d.ts +0 -12
  46. package/lib/rest/verify/v2/service/entity.js +0 -12
  47. package/lib/rest/verify/v2/service/webhook.d.ts +0 -12
  48. package/lib/rest/verify/v2/service/webhook.js +0 -12
  49. package/lib/rest/verify/v2/template.d.ts +2 -0
  50. package/lib/rest/verify/v2/template.js +2 -0
  51. package/lib/twiml/VoiceResponse.d.ts +31 -1
  52. package/lib/twiml/VoiceResponse.js +34 -2
  53. package/package.json +1 -1
@@ -0,0 +1,299 @@
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 values = require('../../../base/values'); /* jshint ignore:line */
17
+
18
+ var OauthList;
19
+ var OauthPage;
20
+ var OauthInstance;
21
+ var OauthContext;
22
+
23
+ /* jshint ignore:start */
24
+ /**
25
+ * Initialize the OauthList
26
+ *
27
+ * @constructor Twilio.Oauth.V1.OauthList
28
+ *
29
+ * @param {Twilio.Oauth.V1} version - Version of the resource
30
+ */
31
+ /* jshint ignore:end */
32
+ OauthList = function OauthList(version) {
33
+ /* jshint ignore:start */
34
+ /**
35
+ * @function oauth
36
+ * @memberof Twilio.Oauth.V1#
37
+ *
38
+ * @param {string} sid - sid of instance
39
+ *
40
+ * @returns {Twilio.Oauth.V1.OauthContext}
41
+ */
42
+ /* jshint ignore:end */
43
+ function OauthListInstance(sid) {
44
+ return OauthListInstance.get(sid);
45
+ }
46
+
47
+ OauthListInstance._version = version;
48
+ // Path Solution
49
+ OauthListInstance._solution = {};
50
+ /* jshint ignore:start */
51
+ /**
52
+ * Constructs a oauth
53
+ *
54
+ * @function get
55
+ * @memberof Twilio.Oauth.V1.OauthList#
56
+ *
57
+ * @returns {Twilio.Oauth.V1.OauthContext}
58
+ */
59
+ /* jshint ignore:end */
60
+ OauthListInstance.get = function get() {
61
+ return new OauthContext(this._version);
62
+ };
63
+
64
+ /* jshint ignore:start */
65
+ /**
66
+ * Provide a user-friendly representation
67
+ *
68
+ * @function toJSON
69
+ * @memberof Twilio.Oauth.V1.OauthList#
70
+ *
71
+ * @returns Object
72
+ */
73
+ /* jshint ignore:end */
74
+ OauthListInstance.toJSON = function toJSON() {
75
+ return this._solution;
76
+ };
77
+
78
+ OauthListInstance[util.inspect.custom] = function inspect(depth, options) {
79
+ return util.inspect(this.toJSON(), options);
80
+ };
81
+
82
+ return OauthListInstance;
83
+ };
84
+
85
+
86
+ /* jshint ignore:start */
87
+ /**
88
+ * Initialize the OauthPage
89
+ *
90
+ * @constructor Twilio.Oauth.V1.OauthPage
91
+ *
92
+ * @param {V1} version - Version of the resource
93
+ * @param {Response<string>} response - Response from the API
94
+ * @param {OauthSolution} solution - Path solution
95
+ *
96
+ * @returns OauthPage
97
+ */
98
+ /* jshint ignore:end */
99
+ OauthPage = function OauthPage(version, response, solution) {
100
+ // Path Solution
101
+ this._solution = solution;
102
+
103
+ Page.prototype.constructor.call(this, version, response, this._solution);
104
+ };
105
+
106
+ _.extend(OauthPage.prototype, Page.prototype);
107
+ OauthPage.prototype.constructor = OauthPage;
108
+
109
+ /* jshint ignore:start */
110
+ /**
111
+ * Build an instance of OauthInstance
112
+ *
113
+ * @function getInstance
114
+ * @memberof Twilio.Oauth.V1.OauthPage#
115
+ *
116
+ * @param {OauthPayload} payload - Payload response from the API
117
+ *
118
+ * @returns OauthInstance
119
+ */
120
+ /* jshint ignore:end */
121
+ OauthPage.prototype.getInstance = function getInstance(payload) {
122
+ return new OauthInstance(this._version, payload);
123
+ };
124
+
125
+ /* jshint ignore:start */
126
+ /**
127
+ * Provide a user-friendly representation
128
+ *
129
+ * @function toJSON
130
+ * @memberof Twilio.Oauth.V1.OauthPage#
131
+ *
132
+ * @returns Object
133
+ */
134
+ /* jshint ignore:end */
135
+ OauthPage.prototype.toJSON = function toJSON() {
136
+ let clone = {};
137
+ _.forOwn(this, function(value, key) {
138
+ if (!_.startsWith(key, '_') && ! _.isFunction(value)) {
139
+ clone[key] = value;
140
+ }
141
+ });
142
+ return clone;
143
+ };
144
+
145
+ OauthPage.prototype[util.inspect.custom] = function inspect(depth, options) {
146
+ return util.inspect(this.toJSON(), options);
147
+ };
148
+
149
+
150
+ /* jshint ignore:start */
151
+ /**
152
+ * Initialize the OauthContext
153
+ *
154
+ * @constructor Twilio.Oauth.V1.OauthInstance
155
+ *
156
+ * @property {object} keys - A collection of certificates
157
+ * @property {string} url - The url
158
+ *
159
+ * @param {V1} version - Version of the resource
160
+ * @param {OauthPayload} payload - The instance payload
161
+ */
162
+ /* jshint ignore:end */
163
+ OauthInstance = function OauthInstance(version, payload) {
164
+ this._version = version;
165
+
166
+ // Marshaled Properties
167
+ this.keys = payload.keys; // jshint ignore:line
168
+ this.url = payload.url; // jshint ignore:line
169
+
170
+ // Context
171
+ this._context = undefined;
172
+ this._solution = {};
173
+ };
174
+
175
+ Object.defineProperty(OauthInstance.prototype,
176
+ '_proxy', {
177
+ get: function() {
178
+ if (!this._context) {
179
+ this._context = new OauthContext(this._version);
180
+ }
181
+
182
+ return this._context;
183
+ }
184
+ });
185
+
186
+ /* jshint ignore:start */
187
+ /**
188
+ * fetch a OauthInstance
189
+ *
190
+ * @function fetch
191
+ * @memberof Twilio.Oauth.V1.OauthInstance#
192
+ *
193
+ * @param {function} [callback] - Callback to handle processed record
194
+ *
195
+ * @returns {Promise} Resolves to processed OauthInstance
196
+ */
197
+ /* jshint ignore:end */
198
+ OauthInstance.prototype.fetch = function fetch(callback) {
199
+ return this._proxy.fetch(callback);
200
+ };
201
+
202
+ /* jshint ignore:start */
203
+ /**
204
+ * Provide a user-friendly representation
205
+ *
206
+ * @function toJSON
207
+ * @memberof Twilio.Oauth.V1.OauthInstance#
208
+ *
209
+ * @returns Object
210
+ */
211
+ /* jshint ignore:end */
212
+ OauthInstance.prototype.toJSON = function toJSON() {
213
+ let clone = {};
214
+ _.forOwn(this, function(value, key) {
215
+ if (!_.startsWith(key, '_') && ! _.isFunction(value)) {
216
+ clone[key] = value;
217
+ }
218
+ });
219
+ return clone;
220
+ };
221
+
222
+ OauthInstance.prototype[util.inspect.custom] = function inspect(depth, options)
223
+ {
224
+ return util.inspect(this.toJSON(), options);
225
+ };
226
+
227
+
228
+ /* jshint ignore:start */
229
+ /**
230
+ * Initialize the OauthContext
231
+ *
232
+ * @constructor Twilio.Oauth.V1.OauthContext
233
+ *
234
+ * @param {V1} version - Version of the resource
235
+ */
236
+ /* jshint ignore:end */
237
+ OauthContext = function OauthContext(version) {
238
+ this._version = version;
239
+
240
+ // Path Solution
241
+ this._solution = {};
242
+ this._uri = `/certs`;
243
+ };
244
+
245
+ /* jshint ignore:start */
246
+ /**
247
+ * fetch a OauthInstance
248
+ *
249
+ * @function fetch
250
+ * @memberof Twilio.Oauth.V1.OauthContext#
251
+ *
252
+ * @param {function} [callback] - Callback to handle processed record
253
+ *
254
+ * @returns {Promise} Resolves to processed OauthInstance
255
+ */
256
+ /* jshint ignore:end */
257
+ OauthContext.prototype.fetch = function fetch(callback) {
258
+ var deferred = Q.defer();
259
+ var promise = this._version.fetch({uri: this._uri, method: 'GET'});
260
+
261
+ promise = promise.then(function(payload) {
262
+ deferred.resolve(new OauthInstance(this._version, payload));
263
+ }.bind(this));
264
+
265
+ promise.catch(function(error) {
266
+ deferred.reject(error);
267
+ });
268
+
269
+ if (_.isFunction(callback)) {
270
+ deferred.promise.nodeify(callback);
271
+ }
272
+
273
+ return deferred.promise;
274
+ };
275
+
276
+ /* jshint ignore:start */
277
+ /**
278
+ * Provide a user-friendly representation
279
+ *
280
+ * @function toJSON
281
+ * @memberof Twilio.Oauth.V1.OauthContext#
282
+ *
283
+ * @returns Object
284
+ */
285
+ /* jshint ignore:end */
286
+ OauthContext.prototype.toJSON = function toJSON() {
287
+ return this._solution;
288
+ };
289
+
290
+ OauthContext.prototype[util.inspect.custom] = function inspect(depth, options) {
291
+ return util.inspect(this.toJSON(), options);
292
+ };
293
+
294
+ module.exports = {
295
+ OauthList: OauthList,
296
+ OauthPage: OauthPage,
297
+ OauthInstance: OauthInstance,
298
+ OauthContext: OauthContext
299
+ };
@@ -0,0 +1,137 @@
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 V1 = require('../V1');
11
+ import { SerializableClass } from '../../../interfaces';
12
+
13
+ /**
14
+ * Initialize the OpenidDiscoveryList
15
+ *
16
+ * @param version - Version of the resource
17
+ */
18
+ declare function OpenidDiscoveryList(version: V1): OpenidDiscoveryListInstance;
19
+
20
+ interface OpenidDiscoveryListInstance {
21
+ /**
22
+ * @param sid - sid of instance
23
+ */
24
+ (sid: string): OpenidDiscoveryContext;
25
+ /**
26
+ * Constructs a openid_discovery
27
+ */
28
+ get(): OpenidDiscoveryContext;
29
+ /**
30
+ * Provide a user-friendly representation
31
+ */
32
+ toJSON(): any;
33
+ }
34
+
35
+ interface OpenidDiscoveryPayload extends OpenidDiscoveryResource, Page.TwilioResponsePayload {
36
+ }
37
+
38
+ interface OpenidDiscoveryResource {
39
+ authorization_endpoint: string;
40
+ claims_supported: string[];
41
+ device_authorization_endpoint: string;
42
+ id_token_signing_alg_values_supported: string[];
43
+ issuer: string;
44
+ jwk_uri: string;
45
+ response_type_supported: string[];
46
+ revocation_endpoint: string;
47
+ scopes_supported: string[];
48
+ subject_type_supported: string[];
49
+ token_endpoint: string;
50
+ url: string;
51
+ userinfo_endpoint: string;
52
+ }
53
+
54
+ interface OpenidDiscoverySolution {
55
+ }
56
+
57
+
58
+ declare class OpenidDiscoveryContext {
59
+ /**
60
+ * Initialize the OpenidDiscoveryContext
61
+ *
62
+ * @param version - Version of the resource
63
+ */
64
+ constructor(version: V1);
65
+
66
+ /**
67
+ * fetch a OpenidDiscoveryInstance
68
+ *
69
+ * @param callback - Callback to handle processed record
70
+ */
71
+ fetch(callback?: (error: Error | null, items: OpenidDiscoveryInstance) => any): Promise<OpenidDiscoveryInstance>;
72
+ /**
73
+ * Provide a user-friendly representation
74
+ */
75
+ toJSON(): any;
76
+ }
77
+
78
+
79
+ declare class OpenidDiscoveryInstance extends SerializableClass {
80
+ /**
81
+ * Initialize the OpenidDiscoveryContext
82
+ *
83
+ * @param version - Version of the resource
84
+ * @param payload - The instance payload
85
+ */
86
+ constructor(version: V1, payload: OpenidDiscoveryPayload);
87
+
88
+ private _proxy: OpenidDiscoveryContext;
89
+ authorizationEndpoint: string;
90
+ claimsSupported: string[];
91
+ deviceAuthorizationEndpoint: string;
92
+ /**
93
+ * fetch a OpenidDiscoveryInstance
94
+ *
95
+ * @param callback - Callback to handle processed record
96
+ */
97
+ fetch(callback?: (error: Error | null, items: OpenidDiscoveryInstance) => any): Promise<OpenidDiscoveryInstance>;
98
+ idTokenSigningAlgValuesSupported: string[];
99
+ issuer: string;
100
+ jwkUri: string;
101
+ responseTypeSupported: string[];
102
+ revocationEndpoint: string;
103
+ scopesSupported: string[];
104
+ subjectTypeSupported: string[];
105
+ /**
106
+ * Provide a user-friendly representation
107
+ */
108
+ toJSON(): any;
109
+ tokenEndpoint: string;
110
+ url: string;
111
+ userinfoEndpoint: string;
112
+ }
113
+
114
+
115
+ declare class OpenidDiscoveryPage extends Page<V1, OpenidDiscoveryPayload, OpenidDiscoveryResource, OpenidDiscoveryInstance> {
116
+ /**
117
+ * Initialize the OpenidDiscoveryPage
118
+ *
119
+ * @param version - Version of the resource
120
+ * @param response - Response from the API
121
+ * @param solution - Path solution
122
+ */
123
+ constructor(version: V1, response: Response<string>, solution: OpenidDiscoverySolution);
124
+
125
+ /**
126
+ * Build an instance of OpenidDiscoveryInstance
127
+ *
128
+ * @param payload - Payload response from the API
129
+ */
130
+ getInstance(payload: OpenidDiscoveryPayload): OpenidDiscoveryInstance;
131
+ /**
132
+ * Provide a user-friendly representation
133
+ */
134
+ toJSON(): any;
135
+ }
136
+
137
+ export { OpenidDiscoveryContext, OpenidDiscoveryInstance, OpenidDiscoveryList, OpenidDiscoveryListInstance, OpenidDiscoveryPage, OpenidDiscoveryPayload, OpenidDiscoveryResource, OpenidDiscoverySolution }