twilio 3.82.2 → 3.83.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 (61) 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/call/userDefinedMessage.d.ts +107 -0
  8. package/lib/rest/api/v2010/account/call/userDefinedMessage.js +259 -0
  9. package/lib/rest/api/v2010/account/call/userDefinedMessageSubscription.d.ts +153 -0
  10. package/lib/rest/api/v2010/account/call/userDefinedMessageSubscription.js +407 -0
  11. package/lib/rest/api/v2010/account/call.d.ts +14 -0
  12. package/lib/rest/api/v2010/account/call.js +67 -0
  13. package/lib/rest/api/v2010/account/conference/participant.d.ts +2 -2
  14. package/lib/rest/api/v2010/account/conference/participant.js +6 -4
  15. package/lib/rest/api/v2010/account/message.d.ts +6 -0
  16. package/lib/rest/api/v2010/account/message.js +10 -1
  17. package/lib/rest/oauth/V1.d.ts +34 -0
  18. package/lib/rest/oauth/V1.js +80 -0
  19. package/lib/rest/oauth/v1/oauth.d.ts +115 -0
  20. package/lib/rest/oauth/v1/oauth.js +299 -0
  21. package/lib/rest/oauth/v1/openidDiscovery.d.ts +137 -0
  22. package/lib/rest/oauth/v1/openidDiscovery.js +329 -0
  23. package/lib/rest/oauth/v1/token.d.ts +115 -0
  24. package/lib/rest/oauth/v1/token.js +265 -0
  25. package/lib/rest/oauth/v1/userInfo.d.ts +123 -0
  26. package/lib/rest/oauth/v1/userInfo.js +308 -0
  27. package/lib/rest/proxy/v1/service/session/participant.d.ts +0 -2
  28. package/lib/rest/proxy/v1/service/session/participant.js +1 -6
  29. package/lib/rest/proxy/v1/service/session.d.ts +0 -4
  30. package/lib/rest/proxy/v1/service/session.js +2 -10
  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/taskrouter/v1/workspace/task/reservation.d.ts +6 -0
  36. package/lib/rest/taskrouter/v1/workspace/task/reservation.js +7 -0
  37. package/lib/rest/taskrouter/v1/workspace/taskQueue.d.ts +6 -0
  38. package/lib/rest/taskrouter/v1/workspace/taskQueue.js +4 -0
  39. package/lib/rest/taskrouter/v1/workspace/worker.d.ts +6 -0
  40. package/lib/rest/taskrouter/v1/workspace/worker.js +4 -0
  41. package/lib/rest/verify/v2/service/accessToken.d.ts +0 -12
  42. package/lib/rest/verify/v2/service/accessToken.js +0 -12
  43. package/lib/rest/verify/v2/service/entity/challenge/notification.d.ts +0 -9
  44. package/lib/rest/verify/v2/service/entity/challenge/notification.js +0 -9
  45. package/lib/rest/verify/v2/service/entity/challenge.d.ts +0 -12
  46. package/lib/rest/verify/v2/service/entity/challenge.js +0 -12
  47. package/lib/rest/verify/v2/service/entity/factor.d.ts +0 -12
  48. package/lib/rest/verify/v2/service/entity/factor.js +0 -12
  49. package/lib/rest/verify/v2/service/entity/newFactor.d.ts +0 -9
  50. package/lib/rest/verify/v2/service/entity/newFactor.js +0 -9
  51. package/lib/rest/verify/v2/service/entity.d.ts +0 -12
  52. package/lib/rest/verify/v2/service/entity.js +0 -12
  53. package/lib/rest/verify/v2/service/verification.d.ts +1 -1
  54. package/lib/rest/verify/v2/service/verification.js +2 -1
  55. package/lib/rest/verify/v2/service/webhook.d.ts +0 -12
  56. package/lib/rest/verify/v2/service/webhook.js +0 -12
  57. package/lib/rest/verify/v2/template.d.ts +2 -0
  58. package/lib/rest/verify/v2/template.js +2 -0
  59. package/lib/twiml/VoiceResponse.d.ts +7 -1
  60. package/lib/twiml/VoiceResponse.js +6 -0
  61. package/package.json +1 -1
@@ -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 }
@@ -0,0 +1,329 @@
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 OpenidDiscoveryList;
19
+ var OpenidDiscoveryPage;
20
+ var OpenidDiscoveryInstance;
21
+ var OpenidDiscoveryContext;
22
+
23
+ /* jshint ignore:start */
24
+ /**
25
+ * Initialize the OpenidDiscoveryList
26
+ *
27
+ * @constructor Twilio.Oauth.V1.OpenidDiscoveryList
28
+ *
29
+ * @param {Twilio.Oauth.V1} version - Version of the resource
30
+ */
31
+ /* jshint ignore:end */
32
+ OpenidDiscoveryList = function OpenidDiscoveryList(version) {
33
+ /* jshint ignore:start */
34
+ /**
35
+ * @function openidDiscovery
36
+ * @memberof Twilio.Oauth.V1#
37
+ *
38
+ * @param {string} sid - sid of instance
39
+ *
40
+ * @returns {Twilio.Oauth.V1.OpenidDiscoveryContext}
41
+ */
42
+ /* jshint ignore:end */
43
+ function OpenidDiscoveryListInstance(sid) {
44
+ return OpenidDiscoveryListInstance.get(sid);
45
+ }
46
+
47
+ OpenidDiscoveryListInstance._version = version;
48
+ // Path Solution
49
+ OpenidDiscoveryListInstance._solution = {};
50
+ /* jshint ignore:start */
51
+ /**
52
+ * Constructs a openid_discovery
53
+ *
54
+ * @function get
55
+ * @memberof Twilio.Oauth.V1.OpenidDiscoveryList#
56
+ *
57
+ * @returns {Twilio.Oauth.V1.OpenidDiscoveryContext}
58
+ */
59
+ /* jshint ignore:end */
60
+ OpenidDiscoveryListInstance.get = function get() {
61
+ return new OpenidDiscoveryContext(this._version);
62
+ };
63
+
64
+ /* jshint ignore:start */
65
+ /**
66
+ * Provide a user-friendly representation
67
+ *
68
+ * @function toJSON
69
+ * @memberof Twilio.Oauth.V1.OpenidDiscoveryList#
70
+ *
71
+ * @returns Object
72
+ */
73
+ /* jshint ignore:end */
74
+ OpenidDiscoveryListInstance.toJSON = function toJSON() {
75
+ return this._solution;
76
+ };
77
+
78
+ OpenidDiscoveryListInstance[util.inspect.custom] = function inspect(depth,
79
+ options) {
80
+ return util.inspect(this.toJSON(), options);
81
+ };
82
+
83
+ return OpenidDiscoveryListInstance;
84
+ };
85
+
86
+
87
+ /* jshint ignore:start */
88
+ /**
89
+ * Initialize the OpenidDiscoveryPage
90
+ *
91
+ * @constructor Twilio.Oauth.V1.OpenidDiscoveryPage
92
+ *
93
+ * @param {V1} version - Version of the resource
94
+ * @param {Response<string>} response - Response from the API
95
+ * @param {OpenidDiscoverySolution} solution - Path solution
96
+ *
97
+ * @returns OpenidDiscoveryPage
98
+ */
99
+ /* jshint ignore:end */
100
+ OpenidDiscoveryPage = function OpenidDiscoveryPage(version, response, solution)
101
+ {
102
+ // Path Solution
103
+ this._solution = solution;
104
+
105
+ Page.prototype.constructor.call(this, version, response, this._solution);
106
+ };
107
+
108
+ _.extend(OpenidDiscoveryPage.prototype, Page.prototype);
109
+ OpenidDiscoveryPage.prototype.constructor = OpenidDiscoveryPage;
110
+
111
+ /* jshint ignore:start */
112
+ /**
113
+ * Build an instance of OpenidDiscoveryInstance
114
+ *
115
+ * @function getInstance
116
+ * @memberof Twilio.Oauth.V1.OpenidDiscoveryPage#
117
+ *
118
+ * @param {OpenidDiscoveryPayload} payload - Payload response from the API
119
+ *
120
+ * @returns OpenidDiscoveryInstance
121
+ */
122
+ /* jshint ignore:end */
123
+ OpenidDiscoveryPage.prototype.getInstance = function getInstance(payload) {
124
+ return new OpenidDiscoveryInstance(this._version, payload);
125
+ };
126
+
127
+ /* jshint ignore:start */
128
+ /**
129
+ * Provide a user-friendly representation
130
+ *
131
+ * @function toJSON
132
+ * @memberof Twilio.Oauth.V1.OpenidDiscoveryPage#
133
+ *
134
+ * @returns Object
135
+ */
136
+ /* jshint ignore:end */
137
+ OpenidDiscoveryPage.prototype.toJSON = function toJSON() {
138
+ let clone = {};
139
+ _.forOwn(this, function(value, key) {
140
+ if (!_.startsWith(key, '_') && ! _.isFunction(value)) {
141
+ clone[key] = value;
142
+ }
143
+ });
144
+ return clone;
145
+ };
146
+
147
+ OpenidDiscoveryPage.prototype[util.inspect.custom] = function inspect(depth,
148
+ options) {
149
+ return util.inspect(this.toJSON(), options);
150
+ };
151
+
152
+
153
+ /* jshint ignore:start */
154
+ /**
155
+ * Initialize the OpenidDiscoveryContext
156
+ *
157
+ * @constructor Twilio.Oauth.V1.OpenidDiscoveryInstance
158
+ *
159
+ * @property {string} issuer - The issuer URL
160
+ * @property {string} authorizationEndpoint - The URL of authorization endpoint
161
+ * @property {string} deviceAuthorizationEndpoint -
162
+ * The URL of device code authorization endpoint
163
+ * @property {string} tokenEndpoint - The URL of token endpoint
164
+ * @property {string} userinfoEndpoint - The URL of user info endpoint
165
+ * @property {string} revocationEndpoint - The URL of revocation endpoint
166
+ * @property {string} jwkUri - The URL of public JWK endpoint
167
+ * @property {string} responseTypeSupported -
168
+ * List of response type supported for identity token
169
+ * @property {string} subjectTypeSupported -
170
+ * List of subject supported for identity token
171
+ * @property {string} idTokenSigningAlgValuesSupported -
172
+ * List of JWS signing algorithms supported for identity token
173
+ * @property {string} scopesSupported - List of scopes supported identity token
174
+ * @property {string} claimsSupported - List of claims supported for identity token
175
+ * @property {string} url - The url
176
+ *
177
+ * @param {V1} version - Version of the resource
178
+ * @param {OpenidDiscoveryPayload} payload - The instance payload
179
+ */
180
+ /* jshint ignore:end */
181
+ OpenidDiscoveryInstance = function OpenidDiscoveryInstance(version, payload) {
182
+ this._version = version;
183
+
184
+ // Marshaled Properties
185
+ this.issuer = payload.issuer; // jshint ignore:line
186
+ this.authorizationEndpoint = payload.authorization_endpoint; // jshint ignore:line
187
+ this.deviceAuthorizationEndpoint = payload.device_authorization_endpoint; // jshint ignore:line
188
+ this.tokenEndpoint = payload.token_endpoint; // jshint ignore:line
189
+ this.userinfoEndpoint = payload.userinfo_endpoint; // jshint ignore:line
190
+ this.revocationEndpoint = payload.revocation_endpoint; // jshint ignore:line
191
+ this.jwkUri = payload.jwk_uri; // jshint ignore:line
192
+ this.responseTypeSupported = payload.response_type_supported; // jshint ignore:line
193
+ this.subjectTypeSupported = payload.subject_type_supported; // jshint ignore:line
194
+ this.idTokenSigningAlgValuesSupported = payload.id_token_signing_alg_values_supported; // jshint ignore:line
195
+ this.scopesSupported = payload.scopes_supported; // jshint ignore:line
196
+ this.claimsSupported = payload.claims_supported; // jshint ignore:line
197
+ this.url = payload.url; // jshint ignore:line
198
+
199
+ // Context
200
+ this._context = undefined;
201
+ this._solution = {};
202
+ };
203
+
204
+ Object.defineProperty(OpenidDiscoveryInstance.prototype,
205
+ '_proxy', {
206
+ get: function() {
207
+ if (!this._context) {
208
+ this._context = new OpenidDiscoveryContext(this._version);
209
+ }
210
+
211
+ return this._context;
212
+ }
213
+ });
214
+
215
+ /* jshint ignore:start */
216
+ /**
217
+ * fetch a OpenidDiscoveryInstance
218
+ *
219
+ * @function fetch
220
+ * @memberof Twilio.Oauth.V1.OpenidDiscoveryInstance#
221
+ *
222
+ * @param {function} [callback] - Callback to handle processed record
223
+ *
224
+ * @returns {Promise} Resolves to processed OpenidDiscoveryInstance
225
+ */
226
+ /* jshint ignore:end */
227
+ OpenidDiscoveryInstance.prototype.fetch = function fetch(callback) {
228
+ return this._proxy.fetch(callback);
229
+ };
230
+
231
+ /* jshint ignore:start */
232
+ /**
233
+ * Provide a user-friendly representation
234
+ *
235
+ * @function toJSON
236
+ * @memberof Twilio.Oauth.V1.OpenidDiscoveryInstance#
237
+ *
238
+ * @returns Object
239
+ */
240
+ /* jshint ignore:end */
241
+ OpenidDiscoveryInstance.prototype.toJSON = function toJSON() {
242
+ let clone = {};
243
+ _.forOwn(this, function(value, key) {
244
+ if (!_.startsWith(key, '_') && ! _.isFunction(value)) {
245
+ clone[key] = value;
246
+ }
247
+ });
248
+ return clone;
249
+ };
250
+
251
+ OpenidDiscoveryInstance.prototype[util.inspect.custom] = function inspect(depth,
252
+ options) {
253
+ return util.inspect(this.toJSON(), options);
254
+ };
255
+
256
+
257
+ /* jshint ignore:start */
258
+ /**
259
+ * Initialize the OpenidDiscoveryContext
260
+ *
261
+ * @constructor Twilio.Oauth.V1.OpenidDiscoveryContext
262
+ *
263
+ * @param {V1} version - Version of the resource
264
+ */
265
+ /* jshint ignore:end */
266
+ OpenidDiscoveryContext = function OpenidDiscoveryContext(version) {
267
+ this._version = version;
268
+
269
+ // Path Solution
270
+ this._solution = {};
271
+ this._uri = `/well-known/openid-configuration`;
272
+ };
273
+
274
+ /* jshint ignore:start */
275
+ /**
276
+ * fetch a OpenidDiscoveryInstance
277
+ *
278
+ * @function fetch
279
+ * @memberof Twilio.Oauth.V1.OpenidDiscoveryContext#
280
+ *
281
+ * @param {function} [callback] - Callback to handle processed record
282
+ *
283
+ * @returns {Promise} Resolves to processed OpenidDiscoveryInstance
284
+ */
285
+ /* jshint ignore:end */
286
+ OpenidDiscoveryContext.prototype.fetch = function fetch(callback) {
287
+ var deferred = Q.defer();
288
+ var promise = this._version.fetch({uri: this._uri, method: 'GET'});
289
+
290
+ promise = promise.then(function(payload) {
291
+ deferred.resolve(new OpenidDiscoveryInstance(this._version, payload));
292
+ }.bind(this));
293
+
294
+ promise.catch(function(error) {
295
+ deferred.reject(error);
296
+ });
297
+
298
+ if (_.isFunction(callback)) {
299
+ deferred.promise.nodeify(callback);
300
+ }
301
+
302
+ return deferred.promise;
303
+ };
304
+
305
+ /* jshint ignore:start */
306
+ /**
307
+ * Provide a user-friendly representation
308
+ *
309
+ * @function toJSON
310
+ * @memberof Twilio.Oauth.V1.OpenidDiscoveryContext#
311
+ *
312
+ * @returns Object
313
+ */
314
+ /* jshint ignore:end */
315
+ OpenidDiscoveryContext.prototype.toJSON = function toJSON() {
316
+ return this._solution;
317
+ };
318
+
319
+ OpenidDiscoveryContext.prototype[util.inspect.custom] = function inspect(depth,
320
+ options) {
321
+ return util.inspect(this.toJSON(), options);
322
+ };
323
+
324
+ module.exports = {
325
+ OpenidDiscoveryList: OpenidDiscoveryList,
326
+ OpenidDiscoveryPage: OpenidDiscoveryPage,
327
+ OpenidDiscoveryInstance: OpenidDiscoveryInstance,
328
+ OpenidDiscoveryContext: OpenidDiscoveryContext
329
+ };
@@ -0,0 +1,115 @@
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 TokenList
15
+ *
16
+ * @param version - Version of the resource
17
+ */
18
+ declare function TokenList(version: V1): TokenListInstance;
19
+
20
+ interface TokenListInstance {
21
+ /**
22
+ * create a TokenInstance
23
+ *
24
+ * @param opts - Options for request
25
+ * @param callback - Callback to handle processed record
26
+ */
27
+ create(opts: TokenListInstanceCreateOptions, callback?: (error: Error | null, item: TokenInstance) => any): Promise<TokenInstance>;
28
+ /**
29
+ * Provide a user-friendly representation
30
+ */
31
+ toJSON(): any;
32
+ }
33
+
34
+ /**
35
+ * Options to pass to create
36
+ *
37
+ * @property clientSecret - The credential for confidential OAuth App
38
+ * @property clientSid - A string that uniquely identifies this oauth app
39
+ * @property code - Jwt token
40
+ * @property codeVerifier - The cryptographically generated code
41
+ * @property deviceCode - Jwt token
42
+ * @property deviceId - An Id of device
43
+ * @property grantType - A way of representing resource owner's to obtain access token
44
+ * @property refreshToken - Jwt token
45
+ */
46
+ interface TokenListInstanceCreateOptions {
47
+ clientSecret?: string;
48
+ clientSid: string;
49
+ code?: string;
50
+ codeVerifier?: string;
51
+ deviceCode?: string;
52
+ deviceId?: string;
53
+ grantType: string;
54
+ refreshToken?: string;
55
+ }
56
+
57
+ interface TokenPayload extends TokenResource, Page.TwilioResponsePayload {
58
+ }
59
+
60
+ interface TokenResource {
61
+ access_token: string;
62
+ access_token_expires_at: Date;
63
+ id_token: string;
64
+ refresh_token: string;
65
+ refresh_token_expires_at: Date;
66
+ }
67
+
68
+ interface TokenSolution {
69
+ }
70
+
71
+
72
+ declare class TokenInstance extends SerializableClass {
73
+ /**
74
+ * Initialize the TokenContext
75
+ *
76
+ * @param version - Version of the resource
77
+ * @param payload - The instance payload
78
+ */
79
+ constructor(version: V1, payload: TokenPayload);
80
+
81
+ accessToken: string;
82
+ accessTokenExpiresAt: Date;
83
+ idToken: string;
84
+ refreshToken: string;
85
+ refreshTokenExpiresAt: Date;
86
+ /**
87
+ * Provide a user-friendly representation
88
+ */
89
+ toJSON(): any;
90
+ }
91
+
92
+
93
+ declare class TokenPage extends Page<V1, TokenPayload, TokenResource, TokenInstance> {
94
+ /**
95
+ * Initialize the TokenPage
96
+ *
97
+ * @param version - Version of the resource
98
+ * @param response - Response from the API
99
+ * @param solution - Path solution
100
+ */
101
+ constructor(version: V1, response: Response<string>, solution: TokenSolution);
102
+
103
+ /**
104
+ * Build an instance of TokenInstance
105
+ *
106
+ * @param payload - Payload response from the API
107
+ */
108
+ getInstance(payload: TokenPayload): TokenInstance;
109
+ /**
110
+ * Provide a user-friendly representation
111
+ */
112
+ toJSON(): any;
113
+ }
114
+
115
+ export { TokenInstance, TokenList, TokenListInstance, TokenListInstanceCreateOptions, TokenPage, TokenPayload, TokenResource, TokenSolution }