twilio 3.77.1 → 3.78.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 (54) hide show
  1. package/README.md +1 -1
  2. package/lib/rest/Insights.d.ts +0 -2
  3. package/lib/rest/Insights.js +0 -8
  4. package/lib/rest/Lookups.d.ts +2 -0
  5. package/lib/rest/Lookups.js +11 -0
  6. package/lib/rest/Twilio.d.ts +1 -3
  7. package/lib/rest/Twilio.js +3 -17
  8. package/lib/rest/api/v2010/account/call/payment.d.ts +1 -1
  9. package/lib/rest/api/v2010/account/call/payment.js +1 -1
  10. package/lib/rest/api/v2010/account/usage/record/allTime.d.ts +1 -1
  11. package/lib/rest/api/v2010/account/usage/record/daily.d.ts +1 -1
  12. package/lib/rest/api/v2010/account/usage/record/lastMonth.d.ts +1 -1
  13. package/lib/rest/api/v2010/account/usage/record/monthly.d.ts +1 -1
  14. package/lib/rest/api/v2010/account/usage/record/thisMonth.d.ts +1 -1
  15. package/lib/rest/api/v2010/account/usage/record/today.d.ts +1 -1
  16. package/lib/rest/api/v2010/account/usage/record/yearly.d.ts +1 -1
  17. package/lib/rest/api/v2010/account/usage/record/yesterday.d.ts +1 -1
  18. package/lib/rest/api/v2010/account/usage/record.d.ts +1 -1
  19. package/lib/rest/api/v2010/account/usage/trigger.d.ts +1 -1
  20. package/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelInvite.d.ts +5 -5
  21. package/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelInvite.js +10 -9
  22. package/lib/rest/flexApi/v1/interaction/interactionChannel.d.ts +8 -8
  23. package/lib/rest/flexApi/v1/interaction/interactionChannel.js +12 -13
  24. package/lib/rest/flexApi/v1/interaction.js +2 -1
  25. package/lib/rest/insights/V1.d.ts +0 -3
  26. package/lib/rest/insights/V1.js +0 -11
  27. package/lib/rest/insights/v1/{annotation.d.ts → call/annotation.d.ts} +29 -17
  28. package/lib/rest/insights/v1/{annotation.js → call/annotation.js} +72 -55
  29. package/lib/rest/insights/v1/call/summary.d.ts +2 -0
  30. package/lib/rest/insights/v1/call/summary.js +2 -0
  31. package/lib/rest/insights/v1/call.d.ts +7 -16
  32. package/lib/rest/insights/v1/call.js +28 -16
  33. package/lib/rest/lookups/V2.d.ts +25 -0
  34. package/lib/rest/lookups/V2.js +47 -0
  35. package/lib/rest/lookups/v2/phoneNumber.d.ts +182 -0
  36. package/lib/rest/lookups/v2/phoneNumber.js +362 -0
  37. package/lib/rest/media/v1/mediaRecording.d.ts +2 -4
  38. package/lib/rest/media/v1/mediaRecording.js +2 -4
  39. package/lib/rest/verify/v2/service/verification.d.ts +3 -1
  40. package/lib/rest/verify/v2/service/verification.js +3 -0
  41. package/lib/rest/verify/v2/service/verificationCheck.d.ts +1 -1
  42. package/lib/rest/verify/v2/verificationAttemptsSummary.d.ts +2 -2
  43. package/lib/rest/verify/v2/verificationAttemptsSummary.js +3 -3
  44. package/lib/twiml/VoiceResponse.d.ts +81 -4
  45. package/lib/twiml/VoiceResponse.js +111 -3
  46. package/package.json +1 -1
  47. package/lib/rest/Fax.d.ts +0 -26
  48. package/lib/rest/Fax.js +0 -54
  49. package/lib/rest/fax/V1.d.ts +0 -25
  50. package/lib/rest/fax/V1.js +0 -46
  51. package/lib/rest/fax/v1/fax/faxMedia.d.ts +0 -310
  52. package/lib/rest/fax/v1/fax/faxMedia.js +0 -633
  53. package/lib/rest/fax/v1/fax.d.ts +0 -367
  54. package/lib/rest/fax/v1/fax.js +0 -700
@@ -1,367 +0,0 @@
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 { FaxMediaList } from './fax/faxMedia';
12
- import { FaxMediaListInstance } from './fax/faxMedia';
13
- import { SerializableClass } from '../../../interfaces';
14
-
15
- type FaxDirection = 'inbound'|'outbound';
16
-
17
- type FaxQuality = 'standard'|'fine'|'superfine';
18
-
19
- type FaxStatus = 'queued'|'processing'|'sending'|'delivered'|'receiving'|'received'|'no-answer'|'busy'|'failed'|'canceled';
20
-
21
- type FaxUpdateStatus = 'canceled';
22
-
23
- /**
24
- * Initialize the FaxList
25
- *
26
- * PLEASE NOTE that this class contains beta products that are subject to change.
27
- * Use them with caution.
28
- *
29
- * @param version - Version of the resource
30
- */
31
- declare function FaxList(version: V1): FaxListInstance;
32
-
33
- interface FaxListInstance {
34
- /**
35
- * @param sid - sid of instance
36
- */
37
- (sid: string): FaxContext;
38
- /**
39
- * Streams FaxInstance records from the API.
40
- *
41
- * This operation lazily loads records as efficiently as possible until the limit
42
- * is reached.
43
- *
44
- * The results are passed into the callback function, so this operation is memory
45
- * efficient.
46
- *
47
- * If a function is passed as the first argument, it will be used as the callback
48
- * function.
49
- *
50
- * @param callback - Function to process each record
51
- */
52
- each(callback?: (item: FaxInstance, done: (err?: Error) => void) => void): void;
53
- /**
54
- * Streams FaxInstance records from the API.
55
- *
56
- * This operation lazily loads records as efficiently as possible until the limit
57
- * is reached.
58
- *
59
- * The results are passed into the callback function, so this operation is memory
60
- * efficient.
61
- *
62
- * If a function is passed as the first argument, it will be used as the callback
63
- * function.
64
- *
65
- * @param opts - Options for request
66
- * @param callback - Function to process each record
67
- */
68
- each(opts?: FaxListInstanceEachOptions, callback?: (item: FaxInstance, done: (err?: Error) => void) => void): void;
69
- /**
70
- * Constructs a fax
71
- *
72
- * @param sid - The unique string that identifies the resource
73
- */
74
- get(sid: string): FaxContext;
75
- /**
76
- * Retrieve a single target page of FaxInstance records from the API.
77
- *
78
- * The request is executed immediately.
79
- *
80
- * If a function is passed as the first argument, it will be used as the callback
81
- * function.
82
- *
83
- * @param callback - Callback to handle list of records
84
- */
85
- getPage(callback?: (error: Error | null, items: FaxPage) => any): Promise<FaxPage>;
86
- /**
87
- * Retrieve a single target page of FaxInstance records from the API.
88
- *
89
- * The request is executed immediately.
90
- *
91
- * If a function is passed as the first argument, it will be used as the callback
92
- * function.
93
- *
94
- * @param targetUrl - API-generated URL for the requested results page
95
- * @param callback - Callback to handle list of records
96
- */
97
- getPage(targetUrl?: string, callback?: (error: Error | null, items: FaxPage) => any): Promise<FaxPage>;
98
- /**
99
- * Lists FaxInstance records from the API as a list.
100
- *
101
- * If a function is passed as the first argument, it will be used as the callback
102
- * function.
103
- *
104
- * @param callback - Callback to handle list of records
105
- */
106
- list(callback?: (error: Error | null, items: FaxInstance[]) => any): Promise<FaxInstance[]>;
107
- /**
108
- * Lists FaxInstance records from the API as a list.
109
- *
110
- * If a function is passed as the first argument, it will be used as the callback
111
- * function.
112
- *
113
- * @param opts - Options for request
114
- * @param callback - Callback to handle list of records
115
- */
116
- list(opts?: FaxListInstanceOptions, callback?: (error: Error | null, items: FaxInstance[]) => any): Promise<FaxInstance[]>;
117
- /**
118
- * Retrieve a single page of FaxInstance records from the API.
119
- *
120
- * The request is executed immediately.
121
- *
122
- * If a function is passed as the first argument, it will be used as the callback
123
- * function.
124
- *
125
- * @param callback - Callback to handle list of records
126
- */
127
- page(callback?: (error: Error | null, items: FaxPage) => any): Promise<FaxPage>;
128
- /**
129
- * Retrieve a single page of FaxInstance records from the API.
130
- *
131
- * The request is executed immediately.
132
- *
133
- * If a function is passed as the first argument, it will be used as the callback
134
- * function.
135
- *
136
- * @param opts - Options for request
137
- * @param callback - Callback to handle list of records
138
- */
139
- page(opts?: FaxListInstancePageOptions, callback?: (error: Error | null, items: FaxPage) => any): Promise<FaxPage>;
140
- /**
141
- * Provide a user-friendly representation
142
- */
143
- toJSON(): any;
144
- }
145
-
146
- /**
147
- * Options to pass to each
148
- *
149
- * @property callback -
150
- * Function to process each record. If this and a positional
151
- * callback are passed, this one will be used
152
- * @property dateCreatedAfter - Retrieve only faxes created after this date
153
- * @property dateCreatedOnOrBefore - Retrieve only faxes created on or before this date
154
- * @property done - Function to be called upon completion of streaming
155
- * @property from - Retrieve only those faxes sent from this phone number
156
- * @property limit -
157
- * Upper limit for the number of records to return.
158
- * each() guarantees never to return more than limit.
159
- * Default is no limit
160
- * @property pageSize -
161
- * Number of records to fetch per request,
162
- * when not set will use the default value of 50 records.
163
- * If no pageSize is defined but a limit is defined,
164
- * each() will attempt to read the limit with the most efficient
165
- * page size, i.e. min(limit, 1000)
166
- * @property to - Retrieve only those faxes sent to this phone number
167
- */
168
- interface FaxListInstanceEachOptions {
169
- callback?: (item: FaxInstance, done: (err?: Error) => void) => void;
170
- dateCreatedAfter?: Date;
171
- dateCreatedOnOrBefore?: Date;
172
- done?: Function;
173
- from?: string;
174
- limit?: number;
175
- pageSize?: number;
176
- to?: string;
177
- }
178
-
179
- /**
180
- * Options to pass to list
181
- *
182
- * @property dateCreatedAfter - Retrieve only faxes created after this date
183
- * @property dateCreatedOnOrBefore - Retrieve only faxes created on or before this date
184
- * @property from - Retrieve only those faxes sent from this phone number
185
- * @property limit -
186
- * Upper limit for the number of records to return.
187
- * list() guarantees never to return more than limit.
188
- * Default is no limit
189
- * @property pageSize -
190
- * Number of records to fetch per request,
191
- * when not set will use the default value of 50 records.
192
- * If no page_size is defined but a limit is defined,
193
- * list() will attempt to read the limit with the most
194
- * efficient page size, i.e. min(limit, 1000)
195
- * @property to - Retrieve only those faxes sent to this phone number
196
- */
197
- interface FaxListInstanceOptions {
198
- dateCreatedAfter?: Date;
199
- dateCreatedOnOrBefore?: Date;
200
- from?: string;
201
- limit?: number;
202
- pageSize?: number;
203
- to?: string;
204
- }
205
-
206
- /**
207
- * Options to pass to page
208
- *
209
- * @property dateCreatedAfter - Retrieve only faxes created after this date
210
- * @property dateCreatedOnOrBefore - Retrieve only faxes created on or before this date
211
- * @property from - Retrieve only those faxes sent from this phone number
212
- * @property pageNumber - Page Number, this value is simply for client state
213
- * @property pageSize - Number of records to return, defaults to 50
214
- * @property pageToken - PageToken provided by the API
215
- * @property to - Retrieve only those faxes sent to this phone number
216
- */
217
- interface FaxListInstancePageOptions {
218
- dateCreatedAfter?: Date;
219
- dateCreatedOnOrBefore?: Date;
220
- from?: string;
221
- pageNumber?: number;
222
- pageSize?: number;
223
- pageToken?: string;
224
- to?: string;
225
- }
226
-
227
- interface FaxPayload extends FaxResource, Page.TwilioResponsePayload {
228
- }
229
-
230
- interface FaxResource {
231
- account_sid: string;
232
- api_version: string;
233
- date_created: Date;
234
- date_updated: Date;
235
- direction: FaxDirection;
236
- duration: number;
237
- from: string;
238
- links: string;
239
- media_sid: string;
240
- media_url: string;
241
- num_pages: number;
242
- price: number;
243
- price_unit: string;
244
- quality: FaxQuality;
245
- sid: string;
246
- status: FaxStatus;
247
- to: string;
248
- url: string;
249
- }
250
-
251
- interface FaxSolution {
252
- }
253
-
254
-
255
- declare class FaxContext {
256
- /**
257
- * Initialize the FaxContext
258
- *
259
- * PLEASE NOTE that this class contains beta products that are subject to change.
260
- * Use them with caution.
261
- *
262
- * @param version - Version of the resource
263
- * @param sid - The unique string that identifies the resource
264
- */
265
- constructor(version: V1, sid: string);
266
-
267
- /**
268
- * fetch a FaxInstance
269
- *
270
- * @param callback - Callback to handle processed record
271
- */
272
- fetch(callback?: (error: Error | null, items: FaxInstance) => any): Promise<FaxInstance>;
273
- media: FaxMediaListInstance;
274
- /**
275
- * remove a FaxInstance
276
- *
277
- * @param callback - Callback to handle processed record
278
- */
279
- remove(callback?: (error: Error | null, items: FaxInstance) => any): Promise<boolean>;
280
- /**
281
- * Provide a user-friendly representation
282
- */
283
- toJSON(): any;
284
- }
285
-
286
-
287
- declare class FaxInstance extends SerializableClass {
288
- /**
289
- * Initialize the FaxContext
290
- *
291
- * PLEASE NOTE that this class contains beta products that are subject to change.
292
- * Use them with caution.
293
- *
294
- * @param version - Version of the resource
295
- * @param payload - The instance payload
296
- * @param sid - The unique string that identifies the resource
297
- */
298
- constructor(version: V1, payload: FaxPayload, sid: string);
299
-
300
- private _proxy: FaxContext;
301
- accountSid: string;
302
- apiVersion: string;
303
- dateCreated: Date;
304
- dateUpdated: Date;
305
- direction: FaxDirection;
306
- duration: number;
307
- /**
308
- * fetch a FaxInstance
309
- *
310
- * @param callback - Callback to handle processed record
311
- */
312
- fetch(callback?: (error: Error | null, items: FaxInstance) => any): Promise<FaxInstance>;
313
- from: string;
314
- links: string;
315
- /**
316
- * Access the media
317
- */
318
- media(): FaxMediaListInstance;
319
- mediaSid: string;
320
- mediaUrl: string;
321
- numPages: number;
322
- price: number;
323
- priceUnit: string;
324
- quality: FaxQuality;
325
- /**
326
- * remove a FaxInstance
327
- *
328
- * @param callback - Callback to handle processed record
329
- */
330
- remove(callback?: (error: Error | null, items: FaxInstance) => any): Promise<boolean>;
331
- sid: string;
332
- status: FaxStatus;
333
- to: string;
334
- /**
335
- * Provide a user-friendly representation
336
- */
337
- toJSON(): any;
338
- url: string;
339
- }
340
-
341
-
342
- declare class FaxPage extends Page<V1, FaxPayload, FaxResource, FaxInstance> {
343
- /**
344
- * Initialize the FaxPage
345
- *
346
- * PLEASE NOTE that this class contains beta products that are subject to change.
347
- * Use them with caution.
348
- *
349
- * @param version - Version of the resource
350
- * @param response - Response from the API
351
- * @param solution - Path solution
352
- */
353
- constructor(version: V1, response: Response<string>, solution: FaxSolution);
354
-
355
- /**
356
- * Build an instance of FaxInstance
357
- *
358
- * @param payload - Payload response from the API
359
- */
360
- getInstance(payload: FaxPayload): FaxInstance;
361
- /**
362
- * Provide a user-friendly representation
363
- */
364
- toJSON(): any;
365
- }
366
-
367
- export { FaxContext, FaxDirection, FaxInstance, FaxList, FaxListInstance, FaxListInstanceEachOptions, FaxListInstanceOptions, FaxListInstancePageOptions, FaxPage, FaxPayload, FaxQuality, FaxResource, FaxSolution, FaxStatus, FaxUpdateStatus }