twilio 3.80.0 → 3.80.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 (36) hide show
  1. package/lib/rest/Microvisor.d.ts +28 -0
  2. package/lib/rest/Microvisor.js +62 -0
  3. package/lib/rest/Preview.d.ts +0 -6
  4. package/lib/rest/Preview.js +0 -28
  5. package/lib/rest/Routes.d.ts +30 -0
  6. package/lib/rest/Routes.js +71 -0
  7. package/lib/rest/Twilio.d.ts +4 -0
  8. package/lib/rest/Twilio.js +28 -0
  9. package/lib/rest/api/v2010/account/sip/ipAccessControlList/ipAddress.d.ts +2 -2
  10. package/lib/rest/api/v2010/account/sip/ipAccessControlList/ipAddress.js +4 -4
  11. package/lib/rest/microvisor/V1.d.ts +28 -0
  12. package/lib/rest/microvisor/V1.js +57 -0
  13. package/lib/rest/{preview/bulk_exports/export/day.d.ts → microvisor/v1/app.d.ts} +79 -69
  14. package/lib/rest/{preview/bulk_exports/export/day.js → microvisor/v1/app.js} +160 -122
  15. package/lib/rest/{preview/bulk_exports/export/exportCustomJob.d.ts → microvisor/v1/device.d.ts} +136 -84
  16. package/lib/rest/microvisor/v1/device.js +652 -0
  17. package/lib/rest/routes/V2.d.ts +31 -0
  18. package/lib/rest/routes/V2.js +69 -0
  19. package/lib/rest/routes/v2/phoneNumber.d.ts +193 -0
  20. package/lib/rest/routes/v2/phoneNumber.js +466 -0
  21. package/lib/rest/routes/v2/sipDomain.d.ts +205 -0
  22. package/lib/rest/routes/v2/sipDomain.js +447 -0
  23. package/lib/rest/routes/v2/trunk.d.ts +205 -0
  24. package/lib/rest/routes/v2/trunk.js +458 -0
  25. package/lib/rest/supersim/v1/fleet.d.ts +3 -1
  26. package/lib/rest/supersim/v1/fleet.js +8 -3
  27. package/package.json +1 -1
  28. package/lib/rest/preview/BulkExports.d.ts +0 -28
  29. package/lib/rest/preview/BulkExports.js +0 -59
  30. package/lib/rest/preview/bulk_exports/export/exportCustomJob.js +0 -540
  31. package/lib/rest/preview/bulk_exports/export/job.d.ts +0 -163
  32. package/lib/rest/preview/bulk_exports/export/job.js +0 -390
  33. package/lib/rest/preview/bulk_exports/export.d.ts +0 -153
  34. package/lib/rest/preview/bulk_exports/export.js +0 -402
  35. package/lib/rest/preview/bulk_exports/exportConfiguration.d.ts +0 -180
  36. package/lib/rest/preview/bulk_exports/exportConfiguration.js +0 -411
@@ -5,33 +5,42 @@
5
5
  * / /
6
6
  */
7
7
 
8
- import BulkExports = require('../../BulkExports');
9
- import Page = require('../../../../base/Page');
10
- import Response = require('../../../../http/response');
11
- import { SerializableClass } from '../../../../interfaces';
8
+ import Page = require('../../../base/Page');
9
+ import Response = require('../../../http/response');
10
+ import V1 = require('../V1');
11
+ import { SerializableClass } from '../../../interfaces';
12
12
 
13
13
  /**
14
- * Initialize the ExportCustomJobList
14
+ * Initialize the DeviceList
15
15
  *
16
16
  * PLEASE NOTE that this class contains preview products that are subject to
17
17
  * change. Use them with caution. If you currently do not have developer preview
18
18
  * access, please contact help@twilio.com.
19
19
  *
20
20
  * @param version - Version of the resource
21
- * @param resourceType - The type of communication – Messages, Calls, Conferences, and Participants
22
21
  */
23
- declare function ExportCustomJobList(version: BulkExports, resourceType: string): ExportCustomJobListInstance;
22
+ declare function DeviceList(version: V1): DeviceListInstance;
24
23
 
25
- interface ExportCustomJobListInstance {
24
+ /**
25
+ * Options to pass to update
26
+ *
27
+ * @property loggingEnabled - Whether to enable logging.
28
+ * @property targetApp - The target App SID or unique name.
29
+ * @property uniqueName - A unique, developer-assigned name for this Device.
30
+ */
31
+ interface DeviceInstanceUpdateOptions {
32
+ loggingEnabled?: boolean;
33
+ targetApp?: string;
34
+ uniqueName?: string;
35
+ }
36
+
37
+ interface DeviceListInstance {
26
38
  /**
27
- * create a ExportCustomJobInstance
28
- *
29
- * @param opts - Options for request
30
- * @param callback - Callback to handle processed record
39
+ * @param sid - sid of instance
31
40
  */
32
- create(opts: ExportCustomJobListInstanceCreateOptions, callback?: (error: Error | null, item: ExportCustomJobInstance) => any): Promise<ExportCustomJobInstance>;
41
+ (sid: string): DeviceContext;
33
42
  /**
34
- * Streams ExportCustomJobInstance records from the API.
43
+ * Streams DeviceInstance records from the API.
35
44
  *
36
45
  * This operation lazily loads records as efficiently as possible until the limit
37
46
  * is reached.
@@ -44,9 +53,9 @@ interface ExportCustomJobListInstance {
44
53
  *
45
54
  * @param callback - Function to process each record
46
55
  */
47
- each(callback?: (item: ExportCustomJobInstance, done: (err?: Error) => void) => void): void;
56
+ each(callback?: (item: DeviceInstance, done: (err?: Error) => void) => void): void;
48
57
  /**
49
- * Streams ExportCustomJobInstance records from the API.
58
+ * Streams DeviceInstance records from the API.
50
59
  *
51
60
  * This operation lazily loads records as efficiently as possible until the limit
52
61
  * is reached.
@@ -60,9 +69,15 @@ interface ExportCustomJobListInstance {
60
69
  * @param opts - Options for request
61
70
  * @param callback - Function to process each record
62
71
  */
63
- each(opts?: ExportCustomJobListInstanceEachOptions, callback?: (item: ExportCustomJobInstance, done: (err?: Error) => void) => void): void;
72
+ each(opts?: DeviceListInstanceEachOptions, callback?: (item: DeviceInstance, done: (err?: Error) => void) => void): void;
64
73
  /**
65
- * Retrieve a single target page of ExportCustomJobInstance records from the API.
74
+ * Constructs a device
75
+ *
76
+ * @param sid - A string that uniquely identifies this Device.
77
+ */
78
+ get(sid: string): DeviceContext;
79
+ /**
80
+ * Retrieve a single target page of DeviceInstance records from the API.
66
81
  *
67
82
  * The request is executed immediately.
68
83
  *
@@ -71,9 +86,9 @@ interface ExportCustomJobListInstance {
71
86
  *
72
87
  * @param callback - Callback to handle list of records
73
88
  */
74
- getPage(callback?: (error: Error | null, items: ExportCustomJobPage) => any): Promise<ExportCustomJobPage>;
89
+ getPage(callback?: (error: Error | null, items: DevicePage) => any): Promise<DevicePage>;
75
90
  /**
76
- * Retrieve a single target page of ExportCustomJobInstance records from the API.
91
+ * Retrieve a single target page of DeviceInstance records from the API.
77
92
  *
78
93
  * The request is executed immediately.
79
94
  *
@@ -83,18 +98,18 @@ interface ExportCustomJobListInstance {
83
98
  * @param targetUrl - API-generated URL for the requested results page
84
99
  * @param callback - Callback to handle list of records
85
100
  */
86
- getPage(targetUrl?: string, callback?: (error: Error | null, items: ExportCustomJobPage) => any): Promise<ExportCustomJobPage>;
101
+ getPage(targetUrl?: string, callback?: (error: Error | null, items: DevicePage) => any): Promise<DevicePage>;
87
102
  /**
88
- * Lists ExportCustomJobInstance records from the API as a list.
103
+ * Lists DeviceInstance records from the API as a list.
89
104
  *
90
105
  * If a function is passed as the first argument, it will be used as the callback
91
106
  * function.
92
107
  *
93
108
  * @param callback - Callback to handle list of records
94
109
  */
95
- list(callback?: (error: Error | null, items: ExportCustomJobInstance[]) => any): Promise<ExportCustomJobInstance[]>;
110
+ list(callback?: (error: Error | null, items: DeviceInstance[]) => any): Promise<DeviceInstance[]>;
96
111
  /**
97
- * Lists ExportCustomJobInstance records from the API as a list.
112
+ * Lists DeviceInstance records from the API as a list.
98
113
  *
99
114
  * If a function is passed as the first argument, it will be used as the callback
100
115
  * function.
@@ -102,9 +117,9 @@ interface ExportCustomJobListInstance {
102
117
  * @param opts - Options for request
103
118
  * @param callback - Callback to handle list of records
104
119
  */
105
- list(opts?: ExportCustomJobListInstanceOptions, callback?: (error: Error | null, items: ExportCustomJobInstance[]) => any): Promise<ExportCustomJobInstance[]>;
120
+ list(opts?: DeviceListInstanceOptions, callback?: (error: Error | null, items: DeviceInstance[]) => any): Promise<DeviceInstance[]>;
106
121
  /**
107
- * Retrieve a single page of ExportCustomJobInstance records from the API.
122
+ * Retrieve a single page of DeviceInstance records from the API.
108
123
  *
109
124
  * The request is executed immediately.
110
125
  *
@@ -113,9 +128,9 @@ interface ExportCustomJobListInstance {
113
128
  *
114
129
  * @param callback - Callback to handle list of records
115
130
  */
116
- page(callback?: (error: Error | null, items: ExportCustomJobPage) => any): Promise<ExportCustomJobPage>;
131
+ page(callback?: (error: Error | null, items: DevicePage) => any): Promise<DevicePage>;
117
132
  /**
118
- * Retrieve a single page of ExportCustomJobInstance records from the API.
133
+ * Retrieve a single page of DeviceInstance records from the API.
119
134
  *
120
135
  * The request is executed immediately.
121
136
  *
@@ -125,32 +140,13 @@ interface ExportCustomJobListInstance {
125
140
  * @param opts - Options for request
126
141
  * @param callback - Callback to handle list of records
127
142
  */
128
- page(opts?: ExportCustomJobListInstancePageOptions, callback?: (error: Error | null, items: ExportCustomJobPage) => any): Promise<ExportCustomJobPage>;
143
+ page(opts?: DeviceListInstancePageOptions, callback?: (error: Error | null, items: DevicePage) => any): Promise<DevicePage>;
129
144
  /**
130
145
  * Provide a user-friendly representation
131
146
  */
132
147
  toJSON(): any;
133
148
  }
134
149
 
135
- /**
136
- * Options to pass to create
137
- *
138
- * @property email - The optional email to send the completion notification to
139
- * @property endDay - The end day for the custom export specified as a string in the format of yyyy-mm-dd. End day is inclusive and must be 2 days earlier than the current UTC day.
140
- * @property friendlyName - The friendly name specified when creating the job
141
- * @property startDay - The start day for the custom export specified as a string in the format of yyyy-mm-dd
142
- * @property webhookMethod - This is the method used to call the webhook on completion of the job. If this is supplied, `WebhookUrl` must also be supplied.
143
- * @property webhookUrl - The optional webhook url called on completion of the job. If this is supplied, `WebhookMethod` must also be supplied.
144
- */
145
- interface ExportCustomJobListInstanceCreateOptions {
146
- email?: string;
147
- endDay: string;
148
- friendlyName: string;
149
- startDay: string;
150
- webhookMethod?: string;
151
- webhookUrl?: string;
152
- }
153
-
154
150
  /**
155
151
  * Options to pass to each
156
152
  *
@@ -169,8 +165,8 @@ interface ExportCustomJobListInstanceCreateOptions {
169
165
  * each() will attempt to read the limit with the most efficient
170
166
  * page size, i.e. min(limit, 1000)
171
167
  */
172
- interface ExportCustomJobListInstanceEachOptions {
173
- callback?: (item: ExportCustomJobInstance, done: (err?: Error) => void) => void;
168
+ interface DeviceListInstanceEachOptions {
169
+ callback?: (item: DeviceInstance, done: (err?: Error) => void) => void;
174
170
  done?: Function;
175
171
  limit?: number;
176
172
  pageSize?: number;
@@ -190,7 +186,7 @@ interface ExportCustomJobListInstanceEachOptions {
190
186
  * list() will attempt to read the limit with the most
191
187
  * efficient page size, i.e. min(limit, 1000)
192
188
  */
193
- interface ExportCustomJobListInstanceOptions {
189
+ interface DeviceListInstanceOptions {
194
190
  limit?: number;
195
191
  pageSize?: number;
196
192
  }
@@ -202,35 +198,72 @@ interface ExportCustomJobListInstanceOptions {
202
198
  * @property pageSize - Number of records to return, defaults to 50
203
199
  * @property pageToken - PageToken provided by the API
204
200
  */
205
- interface ExportCustomJobListInstancePageOptions {
201
+ interface DeviceListInstancePageOptions {
206
202
  pageNumber?: number;
207
203
  pageSize?: number;
208
204
  pageToken?: string;
209
205
  }
210
206
 
211
- interface ExportCustomJobPayload extends ExportCustomJobResource, Page.TwilioResponsePayload {
207
+ interface DevicePayload extends DeviceResource, Page.TwilioResponsePayload {
208
+ }
209
+
210
+ interface DeviceResource {
211
+ account_sid: string;
212
+ app: object;
213
+ date_created: Date;
214
+ date_updated: Date;
215
+ logging: object;
216
+ sid: string;
217
+ unique_name: string;
218
+ url: string;
212
219
  }
213
220
 
214
- interface ExportCustomJobResource {
215
- details: object;
216
- email: string;
217
- end_day: string;
218
- friendly_name: string;
219
- job_sid: string;
220
- resource_type: string;
221
- start_day: string;
222
- webhook_method: string;
223
- webhook_url: string;
221
+ interface DeviceSolution {
224
222
  }
225
223
 
226
- interface ExportCustomJobSolution {
227
- resourceType?: string;
224
+
225
+ declare class DeviceContext {
226
+ /**
227
+ * Initialize the DeviceContext
228
+ *
229
+ * PLEASE NOTE that this class contains preview products that are subject to
230
+ * change. Use them with caution. If you currently do not have developer preview
231
+ * access, please contact help@twilio.com.
232
+ *
233
+ * @param version - Version of the resource
234
+ * @param sid - A string that uniquely identifies this Device.
235
+ */
236
+ constructor(version: V1, sid: string);
237
+
238
+ /**
239
+ * fetch a DeviceInstance
240
+ *
241
+ * @param callback - Callback to handle processed record
242
+ */
243
+ fetch(callback?: (error: Error | null, items: DeviceInstance) => any): Promise<DeviceInstance>;
244
+ /**
245
+ * Provide a user-friendly representation
246
+ */
247
+ toJSON(): any;
248
+ /**
249
+ * update a DeviceInstance
250
+ *
251
+ * @param callback - Callback to handle processed record
252
+ */
253
+ update(callback?: (error: Error | null, items: DeviceInstance) => any): Promise<DeviceInstance>;
254
+ /**
255
+ * update a DeviceInstance
256
+ *
257
+ * @param opts - Options for request
258
+ * @param callback - Callback to handle processed record
259
+ */
260
+ update(opts?: DeviceInstanceUpdateOptions, callback?: (error: Error | null, items: DeviceInstance) => any): Promise<DeviceInstance>;
228
261
  }
229
262
 
230
263
 
231
- declare class ExportCustomJobInstance extends SerializableClass {
264
+ declare class DeviceInstance extends SerializableClass {
232
265
  /**
233
- * Initialize the ExportCustomJobContext
266
+ * Initialize the DeviceContext
234
267
  *
235
268
  * PLEASE NOTE that this class contains preview products that are subject to
236
269
  * change. Use them with caution. If you currently do not have developer preview
@@ -238,29 +271,48 @@ declare class ExportCustomJobInstance extends SerializableClass {
238
271
  *
239
272
  * @param version - Version of the resource
240
273
  * @param payload - The instance payload
241
- * @param resourceType - The type of communication Messages, Calls, Conferences, and Participants
274
+ * @param sid - A string that uniquely identifies this Device.
242
275
  */
243
- constructor(version: BulkExports, payload: ExportCustomJobPayload, resourceType: string);
276
+ constructor(version: V1, payload: DevicePayload, sid: string);
244
277
 
245
- details: any;
246
- email: string;
247
- endDay: string;
248
- friendlyName: string;
249
- jobSid: string;
250
- resourceType: string;
251
- startDay: string;
278
+ private _proxy: DeviceContext;
279
+ accountSid: string;
280
+ app: any;
281
+ dateCreated: Date;
282
+ dateUpdated: Date;
283
+ /**
284
+ * fetch a DeviceInstance
285
+ *
286
+ * @param callback - Callback to handle processed record
287
+ */
288
+ fetch(callback?: (error: Error | null, items: DeviceInstance) => any): Promise<DeviceInstance>;
289
+ logging: any;
290
+ sid: string;
252
291
  /**
253
292
  * Provide a user-friendly representation
254
293
  */
255
294
  toJSON(): any;
256
- webhookMethod: string;
257
- webhookUrl: string;
295
+ uniqueName: string;
296
+ /**
297
+ * update a DeviceInstance
298
+ *
299
+ * @param callback - Callback to handle processed record
300
+ */
301
+ update(callback?: (error: Error | null, items: DeviceInstance) => any): Promise<DeviceInstance>;
302
+ /**
303
+ * update a DeviceInstance
304
+ *
305
+ * @param opts - Options for request
306
+ * @param callback - Callback to handle processed record
307
+ */
308
+ update(opts?: DeviceInstanceUpdateOptions, callback?: (error: Error | null, items: DeviceInstance) => any): Promise<DeviceInstance>;
309
+ url: string;
258
310
  }
259
311
 
260
312
 
261
- declare class ExportCustomJobPage extends Page<BulkExports, ExportCustomJobPayload, ExportCustomJobResource, ExportCustomJobInstance> {
313
+ declare class DevicePage extends Page<V1, DevicePayload, DeviceResource, DeviceInstance> {
262
314
  /**
263
- * Initialize the ExportCustomJobPage
315
+ * Initialize the DevicePage
264
316
  *
265
317
  * PLEASE NOTE that this class contains preview products that are subject to
266
318
  * change. Use them with caution. If you currently do not have developer preview
@@ -270,18 +322,18 @@ declare class ExportCustomJobPage extends Page<BulkExports, ExportCustomJobPaylo
270
322
  * @param response - Response from the API
271
323
  * @param solution - Path solution
272
324
  */
273
- constructor(version: BulkExports, response: Response<string>, solution: ExportCustomJobSolution);
325
+ constructor(version: V1, response: Response<string>, solution: DeviceSolution);
274
326
 
275
327
  /**
276
- * Build an instance of ExportCustomJobInstance
328
+ * Build an instance of DeviceInstance
277
329
  *
278
330
  * @param payload - Payload response from the API
279
331
  */
280
- getInstance(payload: ExportCustomJobPayload): ExportCustomJobInstance;
332
+ getInstance(payload: DevicePayload): DeviceInstance;
281
333
  /**
282
334
  * Provide a user-friendly representation
283
335
  */
284
336
  toJSON(): any;
285
337
  }
286
338
 
287
- export { ExportCustomJobInstance, ExportCustomJobList, ExportCustomJobListInstance, ExportCustomJobListInstanceCreateOptions, ExportCustomJobListInstanceEachOptions, ExportCustomJobListInstanceOptions, ExportCustomJobListInstancePageOptions, ExportCustomJobPage, ExportCustomJobPayload, ExportCustomJobResource, ExportCustomJobSolution }
339
+ export { DeviceContext, DeviceInstance, DeviceInstanceUpdateOptions, DeviceList, DeviceListInstance, DeviceListInstanceEachOptions, DeviceListInstanceOptions, DeviceListInstancePageOptions, DevicePage, DevicePayload, DeviceResource, DeviceSolution }