twilio 3.80.0 → 3.82.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 (63) hide show
  1. package/lib/base/RequestClient.d.ts +26 -2
  2. package/lib/base/RequestClient.js +14 -2
  3. package/lib/rest/Messaging.d.ts +2 -0
  4. package/lib/rest/Messaging.js +9 -0
  5. package/lib/rest/Microvisor.d.ts +28 -0
  6. package/lib/rest/Microvisor.js +62 -0
  7. package/lib/rest/Preview.d.ts +0 -6
  8. package/lib/rest/Preview.js +0 -28
  9. package/lib/rest/Routes.d.ts +30 -0
  10. package/lib/rest/Routes.js +71 -0
  11. package/lib/rest/Twilio.d.ts +4 -0
  12. package/lib/rest/Twilio.js +28 -0
  13. package/lib/rest/Verify.d.ts +2 -0
  14. package/lib/rest/Verify.js +8 -0
  15. package/lib/rest/api/v2010/account/sip/ipAccessControlList/ipAddress.d.ts +2 -2
  16. package/lib/rest/api/v2010/account/sip/ipAccessControlList/ipAddress.js +4 -4
  17. package/lib/rest/flexApi/v1/configuration.d.ts +4 -0
  18. package/lib/rest/flexApi/v1/configuration.js +6 -0
  19. package/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelParticipant.d.ts +1 -1
  20. package/lib/rest/flexApi/v1/interaction/interactionChannel.d.ts +1 -1
  21. package/lib/rest/flexApi/v1/interaction.d.ts +1 -3
  22. package/lib/rest/messaging/V1.d.ts +3 -0
  23. package/lib/rest/messaging/V1.js +13 -0
  24. package/lib/rest/messaging/v1/tollfreeVerification.d.ts +418 -0
  25. package/lib/rest/messaging/v1/tollfreeVerification.js +802 -0
  26. package/lib/rest/microvisor/V1.d.ts +28 -0
  27. package/lib/rest/microvisor/V1.js +57 -0
  28. package/lib/rest/{preview/bulk_exports/export/day.d.ts → microvisor/v1/app.d.ts} +79 -69
  29. package/lib/rest/{preview/bulk_exports/export/day.js → microvisor/v1/app.js} +160 -122
  30. package/lib/rest/{preview/bulk_exports/export/exportCustomJob.d.ts → microvisor/v1/device.d.ts} +136 -84
  31. package/lib/rest/microvisor/v1/device.js +652 -0
  32. package/lib/rest/routes/V2.d.ts +31 -0
  33. package/lib/rest/routes/V2.js +69 -0
  34. package/lib/rest/routes/v2/phoneNumber.d.ts +168 -0
  35. package/lib/rest/routes/v2/phoneNumber.js +394 -0
  36. package/lib/rest/routes/v2/sipDomain.d.ts +168 -0
  37. package/lib/rest/routes/v2/sipDomain.js +383 -0
  38. package/lib/rest/routes/v2/trunk.d.ts +168 -0
  39. package/lib/rest/routes/v2/trunk.js +390 -0
  40. package/lib/rest/supersim/v1/fleet.d.ts +3 -1
  41. package/lib/rest/supersim/v1/fleet.js +8 -3
  42. package/lib/rest/verify/V2.d.ts +3 -0
  43. package/lib/rest/verify/V2.js +11 -0
  44. package/lib/rest/verify/v2/safelist.d.ts +161 -0
  45. package/lib/rest/verify/v2/safelist.js +408 -0
  46. package/lib/rest/verify/v2/service/verification.d.ts +1 -1
  47. package/lib/rest/verify/v2/service/verification.js +1 -1
  48. package/lib/rest/video/v1/room/roomParticipant/roomParticipantAnonymize.d.ts +143 -0
  49. package/lib/rest/video/v1/room/roomParticipant/roomParticipantAnonymize.js +337 -0
  50. package/lib/rest/video/v1/room/roomParticipant.d.ts +7 -0
  51. package/lib/rest/video/v1/room/roomParticipant.js +29 -0
  52. package/lib/twiml/VoiceResponse.d.ts +3 -3
  53. package/lib/webhooks/webhooks.js +1 -0
  54. package/package.json +1 -1
  55. package/lib/rest/preview/BulkExports.d.ts +0 -28
  56. package/lib/rest/preview/BulkExports.js +0 -59
  57. package/lib/rest/preview/bulk_exports/export/exportCustomJob.js +0 -540
  58. package/lib/rest/preview/bulk_exports/export/job.d.ts +0 -163
  59. package/lib/rest/preview/bulk_exports/export/job.js +0 -390
  60. package/lib/rest/preview/bulk_exports/export.d.ts +0 -153
  61. package/lib/rest/preview/bulk_exports/export.js +0 -402
  62. package/lib/rest/preview/bulk_exports/exportConfiguration.d.ts +0 -180
  63. package/lib/rest/preview/bulk_exports/exportConfiguration.js +0 -411
@@ -0,0 +1,168 @@
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
+ /**
14
+ * Initialize the SipDomainList
15
+ *
16
+ * @param version - Version of the resource
17
+ */
18
+ declare function SipDomainList(version: V2): SipDomainListInstance;
19
+
20
+ /**
21
+ * Options to pass to update
22
+ *
23
+ * @property friendlyName - The friendly_name
24
+ * @property voiceRegion - The voice_region
25
+ */
26
+ interface SipDomainInstanceUpdateOptions {
27
+ friendlyName?: string;
28
+ voiceRegion?: string;
29
+ }
30
+
31
+ interface SipDomainListInstance {
32
+ /**
33
+ * @param sid - sid of instance
34
+ */
35
+ (sid: string): SipDomainContext;
36
+ /**
37
+ * Constructs a sip_domain
38
+ *
39
+ * @param sipDomain - The sip_domain
40
+ */
41
+ get(sipDomain: string): SipDomainContext;
42
+ /**
43
+ * Provide a user-friendly representation
44
+ */
45
+ toJSON(): any;
46
+ }
47
+
48
+ interface SipDomainPayload extends SipDomainResource, Page.TwilioResponsePayload {
49
+ }
50
+
51
+ interface SipDomainResource {
52
+ account_sid: string;
53
+ date_created: Date;
54
+ date_updated: Date;
55
+ friendly_name: string;
56
+ sid: string;
57
+ sip_domain: string;
58
+ url: string;
59
+ voice_region: string;
60
+ }
61
+
62
+ interface SipDomainSolution {
63
+ }
64
+
65
+
66
+ declare class SipDomainContext {
67
+ /**
68
+ * Initialize the SipDomainContext
69
+ *
70
+ * @param version - Version of the resource
71
+ * @param sipDomain - The sip_domain
72
+ */
73
+ constructor(version: V2, sipDomain: string);
74
+
75
+ /**
76
+ * fetch a SipDomainInstance
77
+ *
78
+ * @param callback - Callback to handle processed record
79
+ */
80
+ fetch(callback?: (error: Error | null, items: SipDomainInstance) => any): Promise<SipDomainInstance>;
81
+ /**
82
+ * Provide a user-friendly representation
83
+ */
84
+ toJSON(): any;
85
+ /**
86
+ * update a SipDomainInstance
87
+ *
88
+ * @param callback - Callback to handle processed record
89
+ */
90
+ update(callback?: (error: Error | null, items: SipDomainInstance) => any): Promise<SipDomainInstance>;
91
+ /**
92
+ * update a SipDomainInstance
93
+ *
94
+ * @param opts - Options for request
95
+ * @param callback - Callback to handle processed record
96
+ */
97
+ update(opts?: SipDomainInstanceUpdateOptions, callback?: (error: Error | null, items: SipDomainInstance) => any): Promise<SipDomainInstance>;
98
+ }
99
+
100
+
101
+ declare class SipDomainInstance extends SerializableClass {
102
+ /**
103
+ * Initialize the SipDomainContext
104
+ *
105
+ * @param version - Version of the resource
106
+ * @param payload - The instance payload
107
+ * @param sipDomain - The sip_domain
108
+ */
109
+ constructor(version: V2, payload: SipDomainPayload, sipDomain: string);
110
+
111
+ private _proxy: SipDomainContext;
112
+ accountSid: string;
113
+ dateCreated: Date;
114
+ dateUpdated: Date;
115
+ /**
116
+ * fetch a SipDomainInstance
117
+ *
118
+ * @param callback - Callback to handle processed record
119
+ */
120
+ fetch(callback?: (error: Error | null, items: SipDomainInstance) => any): Promise<SipDomainInstance>;
121
+ friendlyName: string;
122
+ sid: string;
123
+ sipDomain: string;
124
+ /**
125
+ * Provide a user-friendly representation
126
+ */
127
+ toJSON(): any;
128
+ /**
129
+ * update a SipDomainInstance
130
+ *
131
+ * @param callback - Callback to handle processed record
132
+ */
133
+ update(callback?: (error: Error | null, items: SipDomainInstance) => any): Promise<SipDomainInstance>;
134
+ /**
135
+ * update a SipDomainInstance
136
+ *
137
+ * @param opts - Options for request
138
+ * @param callback - Callback to handle processed record
139
+ */
140
+ update(opts?: SipDomainInstanceUpdateOptions, callback?: (error: Error | null, items: SipDomainInstance) => any): Promise<SipDomainInstance>;
141
+ url: string;
142
+ voiceRegion: string;
143
+ }
144
+
145
+
146
+ declare class SipDomainPage extends Page<V2, SipDomainPayload, SipDomainResource, SipDomainInstance> {
147
+ /**
148
+ * Initialize the SipDomainPage
149
+ *
150
+ * @param version - Version of the resource
151
+ * @param response - Response from the API
152
+ * @param solution - Path solution
153
+ */
154
+ constructor(version: V2, response: Response<string>, solution: SipDomainSolution);
155
+
156
+ /**
157
+ * Build an instance of SipDomainInstance
158
+ *
159
+ * @param payload - Payload response from the API
160
+ */
161
+ getInstance(payload: SipDomainPayload): SipDomainInstance;
162
+ /**
163
+ * Provide a user-friendly representation
164
+ */
165
+ toJSON(): any;
166
+ }
167
+
168
+ export { SipDomainContext, SipDomainInstance, SipDomainInstanceUpdateOptions, SipDomainList, SipDomainListInstance, SipDomainPage, SipDomainPayload, SipDomainResource, SipDomainSolution }
@@ -0,0 +1,383 @@
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 values = require('../../../base/values'); /* jshint ignore:line */
19
+
20
+ var SipDomainList;
21
+ var SipDomainPage;
22
+ var SipDomainInstance;
23
+ var SipDomainContext;
24
+
25
+ /* jshint ignore:start */
26
+ /**
27
+ * Initialize the SipDomainList
28
+ *
29
+ * @constructor Twilio.Routes.V2.SipDomainList
30
+ *
31
+ * @param {Twilio.Routes.V2} version - Version of the resource
32
+ */
33
+ /* jshint ignore:end */
34
+ SipDomainList = function SipDomainList(version) {
35
+ /* jshint ignore:start */
36
+ /**
37
+ * @function sipDomains
38
+ * @memberof Twilio.Routes.V2#
39
+ *
40
+ * @param {string} sid - sid of instance
41
+ *
42
+ * @returns {Twilio.Routes.V2.SipDomainContext}
43
+ */
44
+ /* jshint ignore:end */
45
+ function SipDomainListInstance(sid) {
46
+ return SipDomainListInstance.get(sid);
47
+ }
48
+
49
+ SipDomainListInstance._version = version;
50
+ // Path Solution
51
+ SipDomainListInstance._solution = {};
52
+ /* jshint ignore:start */
53
+ /**
54
+ * Constructs a sip_domain
55
+ *
56
+ * @function get
57
+ * @memberof Twilio.Routes.V2.SipDomainList#
58
+ *
59
+ * @param {string} sipDomain - The sip_domain
60
+ *
61
+ * @returns {Twilio.Routes.V2.SipDomainContext}
62
+ */
63
+ /* jshint ignore:end */
64
+ SipDomainListInstance.get = function get(sipDomain) {
65
+ return new SipDomainContext(this._version, sipDomain);
66
+ };
67
+
68
+ /* jshint ignore:start */
69
+ /**
70
+ * Provide a user-friendly representation
71
+ *
72
+ * @function toJSON
73
+ * @memberof Twilio.Routes.V2.SipDomainList#
74
+ *
75
+ * @returns Object
76
+ */
77
+ /* jshint ignore:end */
78
+ SipDomainListInstance.toJSON = function toJSON() {
79
+ return this._solution;
80
+ };
81
+
82
+ SipDomainListInstance[util.inspect.custom] = function inspect(depth, options) {
83
+ return util.inspect(this.toJSON(), options);
84
+ };
85
+
86
+ return SipDomainListInstance;
87
+ };
88
+
89
+
90
+ /* jshint ignore:start */
91
+ /**
92
+ * Initialize the SipDomainPage
93
+ *
94
+ * @constructor Twilio.Routes.V2.SipDomainPage
95
+ *
96
+ * @param {V2} version - Version of the resource
97
+ * @param {Response<string>} response - Response from the API
98
+ * @param {SipDomainSolution} solution - Path solution
99
+ *
100
+ * @returns SipDomainPage
101
+ */
102
+ /* jshint ignore:end */
103
+ SipDomainPage = function SipDomainPage(version, response, solution) {
104
+ // Path Solution
105
+ this._solution = solution;
106
+
107
+ Page.prototype.constructor.call(this, version, response, this._solution);
108
+ };
109
+
110
+ _.extend(SipDomainPage.prototype, Page.prototype);
111
+ SipDomainPage.prototype.constructor = SipDomainPage;
112
+
113
+ /* jshint ignore:start */
114
+ /**
115
+ * Build an instance of SipDomainInstance
116
+ *
117
+ * @function getInstance
118
+ * @memberof Twilio.Routes.V2.SipDomainPage#
119
+ *
120
+ * @param {SipDomainPayload} payload - Payload response from the API
121
+ *
122
+ * @returns SipDomainInstance
123
+ */
124
+ /* jshint ignore:end */
125
+ SipDomainPage.prototype.getInstance = function getInstance(payload) {
126
+ return new SipDomainInstance(this._version, payload);
127
+ };
128
+
129
+ /* jshint ignore:start */
130
+ /**
131
+ * Provide a user-friendly representation
132
+ *
133
+ * @function toJSON
134
+ * @memberof Twilio.Routes.V2.SipDomainPage#
135
+ *
136
+ * @returns Object
137
+ */
138
+ /* jshint ignore:end */
139
+ SipDomainPage.prototype.toJSON = function toJSON() {
140
+ let clone = {};
141
+ _.forOwn(this, function(value, key) {
142
+ if (!_.startsWith(key, '_') && ! _.isFunction(value)) {
143
+ clone[key] = value;
144
+ }
145
+ });
146
+ return clone;
147
+ };
148
+
149
+ SipDomainPage.prototype[util.inspect.custom] = function inspect(depth, options)
150
+ {
151
+ return util.inspect(this.toJSON(), options);
152
+ };
153
+
154
+
155
+ /* jshint ignore:start */
156
+ /**
157
+ * Initialize the SipDomainContext
158
+ *
159
+ * @constructor Twilio.Routes.V2.SipDomainInstance
160
+ *
161
+ * @property {string} sipDomain - The sip_domain
162
+ * @property {string} url - The url
163
+ * @property {string} sid - The sid
164
+ * @property {string} accountSid - The account_sid
165
+ * @property {string} friendlyName - The friendly_name
166
+ * @property {string} voiceRegion - The voice_region
167
+ * @property {Date} dateCreated - The date_created
168
+ * @property {Date} dateUpdated - The date_updated
169
+ *
170
+ * @param {V2} version - Version of the resource
171
+ * @param {SipDomainPayload} payload - The instance payload
172
+ * @param {string} sipDomain - The sip_domain
173
+ */
174
+ /* jshint ignore:end */
175
+ SipDomainInstance = function SipDomainInstance(version, payload, sipDomain) {
176
+ this._version = version;
177
+
178
+ // Marshaled Properties
179
+ this.sipDomain = payload.sip_domain; // jshint ignore:line
180
+ this.url = payload.url; // jshint ignore:line
181
+ this.sid = payload.sid; // jshint ignore:line
182
+ this.accountSid = payload.account_sid; // jshint ignore:line
183
+ this.friendlyName = payload.friendly_name; // jshint ignore:line
184
+ this.voiceRegion = payload.voice_region; // jshint ignore:line
185
+ this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line
186
+ this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line
187
+
188
+ // Context
189
+ this._context = undefined;
190
+ this._solution = {sipDomain: sipDomain || this.sipDomain, };
191
+ };
192
+
193
+ Object.defineProperty(SipDomainInstance.prototype,
194
+ '_proxy', {
195
+ get: function() {
196
+ if (!this._context) {
197
+ this._context = new SipDomainContext(this._version, this._solution.sipDomain);
198
+ }
199
+
200
+ return this._context;
201
+ }
202
+ });
203
+
204
+ /* jshint ignore:start */
205
+ /**
206
+ * update a SipDomainInstance
207
+ *
208
+ * @function update
209
+ * @memberof Twilio.Routes.V2.SipDomainInstance#
210
+ *
211
+ * @param {object} [opts] - Options for request
212
+ * @param {string} [opts.voiceRegion] - The voice_region
213
+ * @param {string} [opts.friendlyName] - The friendly_name
214
+ * @param {function} [callback] - Callback to handle processed record
215
+ *
216
+ * @returns {Promise} Resolves to processed SipDomainInstance
217
+ */
218
+ /* jshint ignore:end */
219
+ SipDomainInstance.prototype.update = function update(opts, callback) {
220
+ return this._proxy.update(opts, callback);
221
+ };
222
+
223
+ /* jshint ignore:start */
224
+ /**
225
+ * fetch a SipDomainInstance
226
+ *
227
+ * @function fetch
228
+ * @memberof Twilio.Routes.V2.SipDomainInstance#
229
+ *
230
+ * @param {function} [callback] - Callback to handle processed record
231
+ *
232
+ * @returns {Promise} Resolves to processed SipDomainInstance
233
+ */
234
+ /* jshint ignore:end */
235
+ SipDomainInstance.prototype.fetch = function fetch(callback) {
236
+ return this._proxy.fetch(callback);
237
+ };
238
+
239
+ /* jshint ignore:start */
240
+ /**
241
+ * Provide a user-friendly representation
242
+ *
243
+ * @function toJSON
244
+ * @memberof Twilio.Routes.V2.SipDomainInstance#
245
+ *
246
+ * @returns Object
247
+ */
248
+ /* jshint ignore:end */
249
+ SipDomainInstance.prototype.toJSON = function toJSON() {
250
+ let clone = {};
251
+ _.forOwn(this, function(value, key) {
252
+ if (!_.startsWith(key, '_') && ! _.isFunction(value)) {
253
+ clone[key] = value;
254
+ }
255
+ });
256
+ return clone;
257
+ };
258
+
259
+ SipDomainInstance.prototype[util.inspect.custom] = function inspect(depth,
260
+ options) {
261
+ return util.inspect(this.toJSON(), options);
262
+ };
263
+
264
+
265
+ /* jshint ignore:start */
266
+ /**
267
+ * Initialize the SipDomainContext
268
+ *
269
+ * @constructor Twilio.Routes.V2.SipDomainContext
270
+ *
271
+ * @param {V2} version - Version of the resource
272
+ * @param {string} sipDomain - The sip_domain
273
+ */
274
+ /* jshint ignore:end */
275
+ SipDomainContext = function SipDomainContext(version, sipDomain) {
276
+ this._version = version;
277
+
278
+ // Path Solution
279
+ this._solution = {sipDomain: sipDomain, };
280
+ this._uri = `/SipDomains/${sipDomain}`;
281
+ };
282
+
283
+ /* jshint ignore:start */
284
+ /**
285
+ * update a SipDomainInstance
286
+ *
287
+ * @function update
288
+ * @memberof Twilio.Routes.V2.SipDomainContext#
289
+ *
290
+ * @param {object} [opts] - Options for request
291
+ * @param {string} [opts.voiceRegion] - The voice_region
292
+ * @param {string} [opts.friendlyName] - The friendly_name
293
+ * @param {function} [callback] - Callback to handle processed record
294
+ *
295
+ * @returns {Promise} Resolves to processed SipDomainInstance
296
+ */
297
+ /* jshint ignore:end */
298
+ SipDomainContext.prototype.update = function update(opts, callback) {
299
+ if (_.isFunction(opts)) {
300
+ callback = opts;
301
+ opts = {};
302
+ }
303
+ opts = opts || {};
304
+
305
+ var deferred = Q.defer();
306
+ var data = values.of({
307
+ 'VoiceRegion': _.get(opts, 'voiceRegion'),
308
+ 'FriendlyName': _.get(opts, 'friendlyName')
309
+ });
310
+
311
+ var promise = this._version.update({uri: this._uri, method: 'POST', data: data});
312
+
313
+ promise = promise.then(function(payload) {
314
+ deferred.resolve(new SipDomainInstance(this._version, payload, this._solution.sipDomain));
315
+ }.bind(this));
316
+
317
+ promise.catch(function(error) {
318
+ deferred.reject(error);
319
+ });
320
+
321
+ if (_.isFunction(callback)) {
322
+ deferred.promise.nodeify(callback);
323
+ }
324
+
325
+ return deferred.promise;
326
+ };
327
+
328
+ /* jshint ignore:start */
329
+ /**
330
+ * fetch a SipDomainInstance
331
+ *
332
+ * @function fetch
333
+ * @memberof Twilio.Routes.V2.SipDomainContext#
334
+ *
335
+ * @param {function} [callback] - Callback to handle processed record
336
+ *
337
+ * @returns {Promise} Resolves to processed SipDomainInstance
338
+ */
339
+ /* jshint ignore:end */
340
+ SipDomainContext.prototype.fetch = function fetch(callback) {
341
+ var deferred = Q.defer();
342
+ var promise = this._version.fetch({uri: this._uri, method: 'GET'});
343
+
344
+ promise = promise.then(function(payload) {
345
+ deferred.resolve(new SipDomainInstance(this._version, payload, this._solution.sipDomain));
346
+ }.bind(this));
347
+
348
+ promise.catch(function(error) {
349
+ deferred.reject(error);
350
+ });
351
+
352
+ if (_.isFunction(callback)) {
353
+ deferred.promise.nodeify(callback);
354
+ }
355
+
356
+ return deferred.promise;
357
+ };
358
+
359
+ /* jshint ignore:start */
360
+ /**
361
+ * Provide a user-friendly representation
362
+ *
363
+ * @function toJSON
364
+ * @memberof Twilio.Routes.V2.SipDomainContext#
365
+ *
366
+ * @returns Object
367
+ */
368
+ /* jshint ignore:end */
369
+ SipDomainContext.prototype.toJSON = function toJSON() {
370
+ return this._solution;
371
+ };
372
+
373
+ SipDomainContext.prototype[util.inspect.custom] = function inspect(depth,
374
+ options) {
375
+ return util.inspect(this.toJSON(), options);
376
+ };
377
+
378
+ module.exports = {
379
+ SipDomainList: SipDomainList,
380
+ SipDomainPage: SipDomainPage,
381
+ SipDomainInstance: SipDomainInstance,
382
+ SipDomainContext: SipDomainContext
383
+ };
@@ -0,0 +1,168 @@
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
+ /**
14
+ * Initialize the TrunkList
15
+ *
16
+ * @param version - Version of the resource
17
+ */
18
+ declare function TrunkList(version: V2): TrunkListInstance;
19
+
20
+ /**
21
+ * Options to pass to update
22
+ *
23
+ * @property friendlyName - A human readable description of this resource.
24
+ * @property voiceRegion - The Inbound Processing Region used for this SIP Trunk for voice
25
+ */
26
+ interface TrunkInstanceUpdateOptions {
27
+ friendlyName?: string;
28
+ voiceRegion?: string;
29
+ }
30
+
31
+ interface TrunkListInstance {
32
+ /**
33
+ * @param sid - sid of instance
34
+ */
35
+ (sid: string): TrunkContext;
36
+ /**
37
+ * Constructs a trunk
38
+ *
39
+ * @param sipTrunkDomain - The SIP Trunk
40
+ */
41
+ get(sipTrunkDomain: string): TrunkContext;
42
+ /**
43
+ * Provide a user-friendly representation
44
+ */
45
+ toJSON(): any;
46
+ }
47
+
48
+ interface TrunkPayload extends TrunkResource, Page.TwilioResponsePayload {
49
+ }
50
+
51
+ interface TrunkResource {
52
+ account_sid: string;
53
+ date_created: Date;
54
+ date_updated: Date;
55
+ friendly_name: string;
56
+ sid: string;
57
+ sip_trunk_domain: string;
58
+ url: string;
59
+ voice_region: string;
60
+ }
61
+
62
+ interface TrunkSolution {
63
+ }
64
+
65
+
66
+ declare class TrunkContext {
67
+ /**
68
+ * Initialize the TrunkContext
69
+ *
70
+ * @param version - Version of the resource
71
+ * @param sipTrunkDomain - The SIP Trunk
72
+ */
73
+ constructor(version: V2, sipTrunkDomain: string);
74
+
75
+ /**
76
+ * fetch a TrunkInstance
77
+ *
78
+ * @param callback - Callback to handle processed record
79
+ */
80
+ fetch(callback?: (error: Error | null, items: TrunkInstance) => any): Promise<TrunkInstance>;
81
+ /**
82
+ * Provide a user-friendly representation
83
+ */
84
+ toJSON(): any;
85
+ /**
86
+ * update a TrunkInstance
87
+ *
88
+ * @param callback - Callback to handle processed record
89
+ */
90
+ update(callback?: (error: Error | null, items: TrunkInstance) => any): Promise<TrunkInstance>;
91
+ /**
92
+ * update a TrunkInstance
93
+ *
94
+ * @param opts - Options for request
95
+ * @param callback - Callback to handle processed record
96
+ */
97
+ update(opts?: TrunkInstanceUpdateOptions, callback?: (error: Error | null, items: TrunkInstance) => any): Promise<TrunkInstance>;
98
+ }
99
+
100
+
101
+ declare class TrunkInstance extends SerializableClass {
102
+ /**
103
+ * Initialize the TrunkContext
104
+ *
105
+ * @param version - Version of the resource
106
+ * @param payload - The instance payload
107
+ * @param sipTrunkDomain - The SIP Trunk
108
+ */
109
+ constructor(version: V2, payload: TrunkPayload, sipTrunkDomain: string);
110
+
111
+ private _proxy: TrunkContext;
112
+ accountSid: string;
113
+ dateCreated: Date;
114
+ dateUpdated: Date;
115
+ /**
116
+ * fetch a TrunkInstance
117
+ *
118
+ * @param callback - Callback to handle processed record
119
+ */
120
+ fetch(callback?: (error: Error | null, items: TrunkInstance) => any): Promise<TrunkInstance>;
121
+ friendlyName: string;
122
+ sid: string;
123
+ sipTrunkDomain: string;
124
+ /**
125
+ * Provide a user-friendly representation
126
+ */
127
+ toJSON(): any;
128
+ /**
129
+ * update a TrunkInstance
130
+ *
131
+ * @param callback - Callback to handle processed record
132
+ */
133
+ update(callback?: (error: Error | null, items: TrunkInstance) => any): Promise<TrunkInstance>;
134
+ /**
135
+ * update a TrunkInstance
136
+ *
137
+ * @param opts - Options for request
138
+ * @param callback - Callback to handle processed record
139
+ */
140
+ update(opts?: TrunkInstanceUpdateOptions, callback?: (error: Error | null, items: TrunkInstance) => any): Promise<TrunkInstance>;
141
+ url: string;
142
+ voiceRegion: string;
143
+ }
144
+
145
+
146
+ declare class TrunkPage extends Page<V2, TrunkPayload, TrunkResource, TrunkInstance> {
147
+ /**
148
+ * Initialize the TrunkPage
149
+ *
150
+ * @param version - Version of the resource
151
+ * @param response - Response from the API
152
+ * @param solution - Path solution
153
+ */
154
+ constructor(version: V2, response: Response<string>, solution: TrunkSolution);
155
+
156
+ /**
157
+ * Build an instance of TrunkInstance
158
+ *
159
+ * @param payload - Payload response from the API
160
+ */
161
+ getInstance(payload: TrunkPayload): TrunkInstance;
162
+ /**
163
+ * Provide a user-friendly representation
164
+ */
165
+ toJSON(): any;
166
+ }
167
+
168
+ export { TrunkContext, TrunkInstance, TrunkInstanceUpdateOptions, TrunkList, TrunkListInstance, TrunkPage, TrunkPayload, TrunkResource, TrunkSolution }