twilio 3.74.0 → 3.76.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 (90) hide show
  1. package/lib/rest/Chat.d.ts +4 -0
  2. package/lib/rest/Chat.js +19 -0
  3. package/lib/rest/FlexApi.d.ts +2 -0
  4. package/lib/rest/FlexApi.js +8 -0
  5. package/lib/rest/Insights.d.ts +2 -0
  6. package/lib/rest/Insights.js +8 -0
  7. package/lib/rest/Media.d.ts +2 -0
  8. package/lib/rest/Media.js +9 -0
  9. package/lib/rest/Supersim.d.ts +0 -2
  10. package/lib/rest/Supersim.js +0 -8
  11. package/lib/rest/api/v2010/account/call/payment.d.ts +1 -1
  12. package/lib/rest/api/v2010/account/call/payment.js +1 -1
  13. package/lib/rest/api/v2010/account/call/siprec.d.ts +2 -0
  14. package/lib/rest/api/v2010/account/call/siprec.js +3 -0
  15. package/lib/rest/api/v2010/account/call/stream.d.ts +4 -8
  16. package/lib/rest/api/v2010/account/call/stream.js +11 -7
  17. package/lib/rest/api/v2010/account/recording.d.ts +31 -2
  18. package/lib/rest/api/v2010/account/recording.js +25 -4
  19. package/lib/rest/api/v2010/account/usage/record/allTime.d.ts +1 -1
  20. package/lib/rest/api/v2010/account/usage/record/daily.d.ts +1 -1
  21. package/lib/rest/api/v2010/account/usage/record/lastMonth.d.ts +1 -1
  22. package/lib/rest/api/v2010/account/usage/record/monthly.d.ts +1 -1
  23. package/lib/rest/api/v2010/account/usage/record/thisMonth.d.ts +1 -1
  24. package/lib/rest/api/v2010/account/usage/record/today.d.ts +1 -1
  25. package/lib/rest/api/v2010/account/usage/record/yearly.d.ts +1 -1
  26. package/lib/rest/api/v2010/account/usage/record/yesterday.d.ts +1 -1
  27. package/lib/rest/api/v2010/account/usage/record.d.ts +1 -1
  28. package/lib/rest/api/v2010/account/usage/trigger.d.ts +1 -1
  29. package/lib/rest/chat/V3.d.ts +25 -0
  30. package/lib/rest/chat/V3.js +46 -0
  31. package/lib/rest/chat/v2/service/user/userChannel.d.ts +26 -1
  32. package/lib/rest/chat/v2/service/user/userChannel.js +18 -4
  33. package/lib/rest/chat/v3/channel.d.ts +177 -0
  34. package/lib/rest/chat/v3/channel.js +373 -0
  35. package/lib/rest/conversations/v1/addressConfiguration.d.ts +3 -3
  36. package/lib/rest/conversations/v1/addressConfiguration.js +4 -4
  37. package/lib/rest/flexApi/V1.d.ts +3 -0
  38. package/lib/rest/flexApi/V1.js +11 -0
  39. package/lib/rest/flexApi/v1/configuration.d.ts +2 -0
  40. package/lib/rest/flexApi/v1/configuration.js +3 -0
  41. package/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelInvite.d.ts +266 -0
  42. package/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelInvite.js +505 -0
  43. package/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelParticipant.d.ts +323 -0
  44. package/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelParticipant.js +674 -0
  45. package/lib/rest/flexApi/v1/interaction/interactionChannel.d.ts +327 -0
  46. package/lib/rest/flexApi/v1/interaction/interactionChannel.js +718 -0
  47. package/lib/rest/flexApi/v1/interaction.d.ts +152 -0
  48. package/lib/rest/flexApi/v1/interaction.js +395 -0
  49. package/lib/rest/insights/V1.d.ts +3 -0
  50. package/lib/rest/insights/V1.js +11 -0
  51. package/lib/rest/insights/v1/annotation.d.ts +188 -0
  52. package/lib/rest/insights/v1/annotation.js +406 -0
  53. package/lib/rest/media/V1.d.ts +3 -0
  54. package/lib/rest/media/V1.js +12 -0
  55. package/lib/rest/media/v1/mediaProcessor.js +1 -1
  56. package/lib/rest/media/v1/mediaRecording.d.ts +358 -0
  57. package/lib/rest/{supersim/v1/command.js → media/v1/mediaRecording.js} +190 -176
  58. package/lib/rest/media/v1/playerStreamer.d.ts +4 -0
  59. package/lib/rest/media/v1/playerStreamer.js +5 -1
  60. package/lib/rest/numbers/v2/regulatoryCompliance/bundle.d.ts +5 -5
  61. package/lib/rest/numbers/v2/regulatoryCompliance/bundle.js +3 -3
  62. package/lib/rest/numbers/v2/regulatoryCompliance/supportingDocument.d.ts +2 -0
  63. package/lib/rest/numbers/v2/regulatoryCompliance/supportingDocument.js +3 -0
  64. package/lib/rest/supersim/V1.d.ts +0 -3
  65. package/lib/rest/supersim/V1.js +0 -11
  66. package/lib/rest/supersim/v1/fleet.d.ts +0 -16
  67. package/lib/rest/supersim/v1/fleet.js +0 -18
  68. package/lib/rest/supersim/v1/usageRecord.d.ts +3 -3
  69. package/lib/rest/supersim/v1/usageRecord.js +3 -3
  70. package/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueCumulativeStatistics.d.ts +1 -1
  71. package/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueCumulativeStatistics.js +2 -2
  72. package/lib/rest/taskrouter/v1/workspace/workflow/workflowCumulativeStatistics.d.ts +1 -1
  73. package/lib/rest/taskrouter/v1/workspace/workflow/workflowCumulativeStatistics.js +2 -2
  74. package/lib/rest/taskrouter/v1/workspace/workspaceCumulativeStatistics.d.ts +1 -1
  75. package/lib/rest/taskrouter/v1/workspace/workspaceCumulativeStatistics.js +2 -2
  76. package/lib/rest/verify/v2/service/accessToken.d.ts +6 -0
  77. package/lib/rest/verify/v2/service/accessToken.js +9 -1
  78. package/lib/rest/verify/v2/service/entity/challenge.d.ts +4 -0
  79. package/lib/rest/verify/v2/service/entity/challenge.js +8 -1
  80. package/lib/rest/verify/v2/service/entity/factor.d.ts +2 -0
  81. package/lib/rest/verify/v2/service/entity/factor.js +2 -0
  82. package/lib/rest/verify/v2/service/entity/newFactor.d.ts +4 -0
  83. package/lib/rest/verify/v2/service/entity/newFactor.js +9 -3
  84. package/lib/rest/video/v1/composition.d.ts +4 -0
  85. package/lib/rest/video/v1/composition.js +6 -0
  86. package/lib/rest/video/v1/recording.d.ts +4 -0
  87. package/lib/rest/video/v1/recording.js +6 -0
  88. package/lib/twiml/VoiceResponse.d.ts +2 -2
  89. package/package.json +3 -3
  90. package/lib/rest/supersim/v1/command.d.ts +0 -342
@@ -0,0 +1,358 @@
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
+ type MediaRecordingFormat = 'mp4'|'webm';
14
+
15
+ type MediaRecordingOrder = 'asc'|'desc';
16
+
17
+ type MediaRecordingStatus = 'processing'|'completed'|'deleted'|'failed';
18
+
19
+ /**
20
+ * Initialize the MediaRecordingList
21
+ *
22
+ * PLEASE NOTE that this class contains preview products that are subject to
23
+ * change. Use them with caution. If you currently do not have developer preview
24
+ * access, please contact help@twilio.com.
25
+ *
26
+ * @param version - Version of the resource
27
+ */
28
+ declare function MediaRecordingList(version: V1): MediaRecordingListInstance;
29
+
30
+ interface MediaRecordingListInstance {
31
+ /**
32
+ * @param sid - sid of instance
33
+ */
34
+ (sid: string): MediaRecordingContext;
35
+ /**
36
+ * Streams MediaRecordingInstance records from the API.
37
+ *
38
+ * This operation lazily loads records as efficiently as possible until the limit
39
+ * is reached.
40
+ *
41
+ * The results are passed into the callback function, so this operation is memory
42
+ * efficient.
43
+ *
44
+ * If a function is passed as the first argument, it will be used as the callback
45
+ * function.
46
+ *
47
+ * @param callback - Function to process each record
48
+ */
49
+ each(callback?: (item: MediaRecordingInstance, done: (err?: Error) => void) => void): void;
50
+ /**
51
+ * Streams MediaRecordingInstance records from the API.
52
+ *
53
+ * This operation lazily loads records as efficiently as possible until the limit
54
+ * is reached.
55
+ *
56
+ * The results are passed into the callback function, so this operation is memory
57
+ * efficient.
58
+ *
59
+ * If a function is passed as the first argument, it will be used as the callback
60
+ * function.
61
+ *
62
+ * @param opts - Options for request
63
+ * @param callback - Function to process each record
64
+ */
65
+ each(opts?: MediaRecordingListInstanceEachOptions, callback?: (item: MediaRecordingInstance, done: (err?: Error) => void) => void): void;
66
+ /**
67
+ * Constructs a media_recording
68
+ *
69
+ * @param sid - The SID that identifies the resource to fetch
70
+ */
71
+ get(sid: string): MediaRecordingContext;
72
+ /**
73
+ * Retrieve a single target page of MediaRecordingInstance records from the API.
74
+ *
75
+ * The request is executed immediately.
76
+ *
77
+ * If a function is passed as the first argument, it will be used as the callback
78
+ * function.
79
+ *
80
+ * @param callback - Callback to handle list of records
81
+ */
82
+ getPage(callback?: (error: Error | null, items: MediaRecordingPage) => any): Promise<MediaRecordingPage>;
83
+ /**
84
+ * Retrieve a single target page of MediaRecordingInstance records from the API.
85
+ *
86
+ * The request is executed immediately.
87
+ *
88
+ * If a function is passed as the first argument, it will be used as the callback
89
+ * function.
90
+ *
91
+ * @param targetUrl - API-generated URL for the requested results page
92
+ * @param callback - Callback to handle list of records
93
+ */
94
+ getPage(targetUrl?: string, callback?: (error: Error | null, items: MediaRecordingPage) => any): Promise<MediaRecordingPage>;
95
+ /**
96
+ * Lists MediaRecordingInstance records from the API as a list.
97
+ *
98
+ * If a function is passed as the first argument, it will be used as the callback
99
+ * function.
100
+ *
101
+ * @param callback - Callback to handle list of records
102
+ */
103
+ list(callback?: (error: Error | null, items: MediaRecordingInstance[]) => any): Promise<MediaRecordingInstance[]>;
104
+ /**
105
+ * Lists MediaRecordingInstance records from the API as a list.
106
+ *
107
+ * If a function is passed as the first argument, it will be used as the callback
108
+ * function.
109
+ *
110
+ * @param opts - Options for request
111
+ * @param callback - Callback to handle list of records
112
+ */
113
+ list(opts?: MediaRecordingListInstanceOptions, callback?: (error: Error | null, items: MediaRecordingInstance[]) => any): Promise<MediaRecordingInstance[]>;
114
+ /**
115
+ * Retrieve a single page of MediaRecordingInstance records from the API.
116
+ *
117
+ * The request is executed immediately.
118
+ *
119
+ * If a function is passed as the first argument, it will be used as the callback
120
+ * function.
121
+ *
122
+ * @param callback - Callback to handle list of records
123
+ */
124
+ page(callback?: (error: Error | null, items: MediaRecordingPage) => any): Promise<MediaRecordingPage>;
125
+ /**
126
+ * Retrieve a single page of MediaRecordingInstance records from the API.
127
+ *
128
+ * The request is executed immediately.
129
+ *
130
+ * If a function is passed as the first argument, it will be used as the callback
131
+ * function.
132
+ *
133
+ * @param opts - Options for request
134
+ * @param callback - Callback to handle list of records
135
+ */
136
+ page(opts?: MediaRecordingListInstancePageOptions, callback?: (error: Error | null, items: MediaRecordingPage) => any): Promise<MediaRecordingPage>;
137
+ /**
138
+ * Provide a user-friendly representation
139
+ */
140
+ toJSON(): any;
141
+ }
142
+
143
+ /**
144
+ * Options to pass to each
145
+ *
146
+ * @property callback -
147
+ * Function to process each record. If this and a positional
148
+ * callback are passed, this one will be used
149
+ * @property done - Function to be called upon completion of streaming
150
+ * @property limit -
151
+ * Upper limit for the number of records to return.
152
+ * each() guarantees never to return more than limit.
153
+ * Default is no limit
154
+ * @property order - The sort order of the list
155
+ * @property pageSize -
156
+ * Number of records to fetch per request,
157
+ * when not set will use the default value of 50 records.
158
+ * If no pageSize is defined but a limit is defined,
159
+ * each() will attempt to read the limit with the most efficient
160
+ * page size, i.e. min(limit, 1000)
161
+ * @property processorSid - MediaProcessor to filter by
162
+ * @property sourceSid - Source SID to filter by
163
+ * @property status - Status to filter by
164
+ */
165
+ interface MediaRecordingListInstanceEachOptions {
166
+ callback?: (item: MediaRecordingInstance, done: (err?: Error) => void) => void;
167
+ done?: Function;
168
+ limit?: number;
169
+ order?: MediaRecordingOrder;
170
+ pageSize?: number;
171
+ processorSid?: string;
172
+ sourceSid?: string;
173
+ status?: MediaRecordingStatus;
174
+ }
175
+
176
+ /**
177
+ * Options to pass to list
178
+ *
179
+ * @property limit -
180
+ * Upper limit for the number of records to return.
181
+ * list() guarantees never to return more than limit.
182
+ * Default is no limit
183
+ * @property order - The sort order of the list
184
+ * @property pageSize -
185
+ * Number of records to fetch per request,
186
+ * when not set will use the default value of 50 records.
187
+ * If no page_size is defined but a limit is defined,
188
+ * list() will attempt to read the limit with the most
189
+ * efficient page size, i.e. min(limit, 1000)
190
+ * @property processorSid - MediaProcessor to filter by
191
+ * @property sourceSid - Source SID to filter by
192
+ * @property status - Status to filter by
193
+ */
194
+ interface MediaRecordingListInstanceOptions {
195
+ limit?: number;
196
+ order?: MediaRecordingOrder;
197
+ pageSize?: number;
198
+ processorSid?: string;
199
+ sourceSid?: string;
200
+ status?: MediaRecordingStatus;
201
+ }
202
+
203
+ /**
204
+ * Options to pass to page
205
+ *
206
+ * @property order - The sort order of the list
207
+ * @property pageNumber - Page Number, this value is simply for client state
208
+ * @property pageSize - Number of records to return, defaults to 50
209
+ * @property pageToken - PageToken provided by the API
210
+ * @property processorSid - MediaProcessor to filter by
211
+ * @property sourceSid - Source SID to filter by
212
+ * @property status - Status to filter by
213
+ */
214
+ interface MediaRecordingListInstancePageOptions {
215
+ order?: MediaRecordingOrder;
216
+ pageNumber?: number;
217
+ pageSize?: number;
218
+ pageToken?: string;
219
+ processorSid?: string;
220
+ sourceSid?: string;
221
+ status?: MediaRecordingStatus;
222
+ }
223
+
224
+ interface MediaRecordingPayload extends MediaRecordingResource, Page.TwilioResponsePayload {
225
+ }
226
+
227
+ interface MediaRecordingResource {
228
+ account_sid: string;
229
+ bitrate: number;
230
+ date_created: Date;
231
+ date_updated: Date;
232
+ duration: number;
233
+ format: MediaRecordingFormat;
234
+ links: string;
235
+ processor_sid: string;
236
+ resolution: string;
237
+ sid: string;
238
+ size: number;
239
+ source_sid: string;
240
+ status: MediaRecordingStatus;
241
+ status_callback: string;
242
+ status_callback_method: string;
243
+ url: string;
244
+ }
245
+
246
+ interface MediaRecordingSolution {
247
+ }
248
+
249
+
250
+ declare class MediaRecordingContext {
251
+ /**
252
+ * Initialize the MediaRecordingContext
253
+ *
254
+ * PLEASE NOTE that this class contains preview products that are subject to
255
+ * change. Use them with caution. If you currently do not have developer preview
256
+ * access, please contact help@twilio.com.
257
+ *
258
+ * @param version - Version of the resource
259
+ * @param sid - The SID that identifies the resource to fetch
260
+ */
261
+ constructor(version: V1, sid: string);
262
+
263
+ /**
264
+ * fetch a MediaRecordingInstance
265
+ *
266
+ * @param callback - Callback to handle processed record
267
+ */
268
+ fetch(callback?: (error: Error | null, items: MediaRecordingInstance) => any): Promise<MediaRecordingInstance>;
269
+ /**
270
+ * remove a MediaRecordingInstance
271
+ *
272
+ * @param callback - Callback to handle processed record
273
+ */
274
+ remove(callback?: (error: Error | null, items: MediaRecordingInstance) => any): Promise<boolean>;
275
+ /**
276
+ * Provide a user-friendly representation
277
+ */
278
+ toJSON(): any;
279
+ }
280
+
281
+
282
+ declare class MediaRecordingInstance extends SerializableClass {
283
+ /**
284
+ * Initialize the MediaRecordingContext
285
+ *
286
+ * PLEASE NOTE that this class contains preview products that are subject to
287
+ * change. Use them with caution. If you currently do not have developer preview
288
+ * access, please contact help@twilio.com.
289
+ *
290
+ * @param version - Version of the resource
291
+ * @param payload - The instance payload
292
+ * @param sid - The SID that identifies the resource to fetch
293
+ */
294
+ constructor(version: V1, payload: MediaRecordingPayload, sid: string);
295
+
296
+ private _proxy: MediaRecordingContext;
297
+ accountSid: string;
298
+ bitrate: number;
299
+ dateCreated: Date;
300
+ dateUpdated: Date;
301
+ duration: number;
302
+ /**
303
+ * fetch a MediaRecordingInstance
304
+ *
305
+ * @param callback - Callback to handle processed record
306
+ */
307
+ fetch(callback?: (error: Error | null, items: MediaRecordingInstance) => any): Promise<MediaRecordingInstance>;
308
+ format: MediaRecordingFormat;
309
+ links: string;
310
+ processorSid: string;
311
+ /**
312
+ * remove a MediaRecordingInstance
313
+ *
314
+ * @param callback - Callback to handle processed record
315
+ */
316
+ remove(callback?: (error: Error | null, items: MediaRecordingInstance) => any): Promise<boolean>;
317
+ resolution: string;
318
+ sid: string;
319
+ size: number;
320
+ sourceSid: string;
321
+ status: MediaRecordingStatus;
322
+ statusCallback: string;
323
+ statusCallbackMethod: string;
324
+ /**
325
+ * Provide a user-friendly representation
326
+ */
327
+ toJSON(): any;
328
+ url: string;
329
+ }
330
+
331
+
332
+ declare class MediaRecordingPage extends Page<V1, MediaRecordingPayload, MediaRecordingResource, MediaRecordingInstance> {
333
+ /**
334
+ * Initialize the MediaRecordingPage
335
+ *
336
+ * PLEASE NOTE that this class contains preview products that are subject to
337
+ * change. Use them with caution. If you currently do not have developer preview
338
+ * access, please contact help@twilio.com.
339
+ *
340
+ * @param version - Version of the resource
341
+ * @param response - Response from the API
342
+ * @param solution - Path solution
343
+ */
344
+ constructor(version: V1, response: Response<string>, solution: MediaRecordingSolution);
345
+
346
+ /**
347
+ * Build an instance of MediaRecordingInstance
348
+ *
349
+ * @param payload - Payload response from the API
350
+ */
351
+ getInstance(payload: MediaRecordingPayload): MediaRecordingInstance;
352
+ /**
353
+ * Provide a user-friendly representation
354
+ */
355
+ toJSON(): any;
356
+ }
357
+
358
+ export { MediaRecordingContext, MediaRecordingFormat, MediaRecordingInstance, MediaRecordingList, MediaRecordingListInstance, MediaRecordingListInstanceEachOptions, MediaRecordingListInstanceOptions, MediaRecordingListInstancePageOptions, MediaRecordingOrder, MediaRecordingPage, MediaRecordingPayload, MediaRecordingResource, MediaRecordingSolution, MediaRecordingStatus }