twilio 3.69.0 → 3.70.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 (32) hide show
  1. package/CHANGES.md +21 -0
  2. package/lib/jwt/AccessToken.d.ts +16 -0
  3. package/lib/jwt/AccessToken.js +20 -0
  4. package/lib/rest/Media.d.ts +28 -0
  5. package/lib/rest/Media.js +64 -0
  6. package/lib/rest/Twilio.d.ts +2 -0
  7. package/lib/rest/Twilio.js +14 -0
  8. package/lib/rest/api/v2010/account/incomingPhoneNumber/local.d.ts +5 -1
  9. package/lib/rest/api/v2010/account/incomingPhoneNumber/local.js +3 -0
  10. package/lib/rest/api/v2010/account/incomingPhoneNumber/mobile.d.ts +5 -1
  11. package/lib/rest/api/v2010/account/incomingPhoneNumber/mobile.js +3 -0
  12. package/lib/rest/api/v2010/account/incomingPhoneNumber/tollFree.d.ts +5 -1
  13. package/lib/rest/api/v2010/account/incomingPhoneNumber/tollFree.js +3 -0
  14. package/lib/rest/api/v2010/account/incomingPhoneNumber.d.ts +5 -1
  15. package/lib/rest/api/v2010/account/incomingPhoneNumber.js +3 -0
  16. package/lib/rest/media/V1.d.ts +28 -0
  17. package/lib/rest/media/V1.js +59 -0
  18. package/lib/rest/media/v1/mediaProcessor.d.ts +355 -0
  19. package/lib/rest/media/v1/mediaProcessor.js +702 -0
  20. package/lib/rest/media/v1/playerStreamer/playbackGrant.d.ts +162 -0
  21. package/lib/rest/media/v1/playerStreamer/playbackGrant.js +384 -0
  22. package/lib/rest/media/v1/playerStreamer.d.ts +366 -0
  23. package/lib/rest/media/v1/playerStreamer.js +729 -0
  24. package/lib/rest/messaging/v1/brandRegistration/brandVetting.d.ts +286 -0
  25. package/lib/rest/messaging/v1/brandRegistration/brandVetting.js +521 -0
  26. package/lib/rest/messaging/v1/brandRegistration.d.ts +14 -1
  27. package/lib/rest/messaging/v1/brandRegistration.js +36 -0
  28. package/lib/rest/messaging/v1/service.d.ts +8 -0
  29. package/lib/rest/messaging/v1/service.js +14 -0
  30. package/lib/rest/video/v1/room.d.ts +4 -0
  31. package/lib/rest/video/v1/room.js +7 -1
  32. package/package.json +2 -2
@@ -0,0 +1,355 @@
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 MediaProcessorOrder = 'asc'|'desc';
14
+
15
+ type MediaProcessorStatus = 'failed'|'started'|'ended';
16
+
17
+ type MediaProcessorUpdateStatus = 'ended';
18
+
19
+ /**
20
+ * Initialize the MediaProcessorList
21
+ *
22
+ * @param version - Version of the resource
23
+ */
24
+ declare function MediaProcessorList(version: V1): MediaProcessorListInstance;
25
+
26
+ /**
27
+ * Options to pass to update
28
+ *
29
+ * @property status - The status of the MediaProcessor
30
+ */
31
+ interface MediaProcessorInstanceUpdateOptions {
32
+ status: MediaProcessorUpdateStatus;
33
+ }
34
+
35
+ interface MediaProcessorListInstance {
36
+ /**
37
+ * @param sid - sid of instance
38
+ */
39
+ (sid: string): MediaProcessorContext;
40
+ /**
41
+ * create a MediaProcessorInstance
42
+ *
43
+ * @param opts - Options for request
44
+ * @param callback - Callback to handle processed record
45
+ */
46
+ create(opts: MediaProcessorListInstanceCreateOptions, callback?: (error: Error | null, item: MediaProcessorInstance) => any): Promise<MediaProcessorInstance>;
47
+ /**
48
+ * Streams MediaProcessorInstance records from the API.
49
+ *
50
+ * This operation lazily loads records as efficiently as possible until the limit
51
+ * is reached.
52
+ *
53
+ * The results are passed into the callback function, so this operation is memory
54
+ * efficient.
55
+ *
56
+ * If a function is passed as the first argument, it will be used as the callback
57
+ * function.
58
+ *
59
+ * @param callback - Function to process each record
60
+ */
61
+ each(callback?: (item: MediaProcessorInstance, done: (err?: Error) => void) => void): void;
62
+ /**
63
+ * Streams MediaProcessorInstance records from the API.
64
+ *
65
+ * This operation lazily loads records as efficiently as possible until the limit
66
+ * is reached.
67
+ *
68
+ * The results are passed into the callback function, so this operation is memory
69
+ * efficient.
70
+ *
71
+ * If a function is passed as the first argument, it will be used as the callback
72
+ * function.
73
+ *
74
+ * @param opts - Options for request
75
+ * @param callback - Function to process each record
76
+ */
77
+ each(opts?: MediaProcessorListInstanceEachOptions, callback?: (item: MediaProcessorInstance, done: (err?: Error) => void) => void): void;
78
+ /**
79
+ * Constructs a media_processor
80
+ *
81
+ * @param sid - The SID that identifies the resource to fetch
82
+ */
83
+ get(sid: string): MediaProcessorContext;
84
+ /**
85
+ * Retrieve a single target page of MediaProcessorInstance records from the API.
86
+ *
87
+ * The request is executed immediately.
88
+ *
89
+ * If a function is passed as the first argument, it will be used as the callback
90
+ * function.
91
+ *
92
+ * @param callback - Callback to handle list of records
93
+ */
94
+ getPage(callback?: (error: Error | null, items: MediaProcessorPage) => any): Promise<MediaProcessorPage>;
95
+ /**
96
+ * Retrieve a single target page of MediaProcessorInstance records from the API.
97
+ *
98
+ * The request is executed immediately.
99
+ *
100
+ * If a function is passed as the first argument, it will be used as the callback
101
+ * function.
102
+ *
103
+ * @param targetUrl - API-generated URL for the requested results page
104
+ * @param callback - Callback to handle list of records
105
+ */
106
+ getPage(targetUrl?: string, callback?: (error: Error | null, items: MediaProcessorPage) => any): Promise<MediaProcessorPage>;
107
+ /**
108
+ * Lists MediaProcessorInstance 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 callback - Callback to handle list of records
114
+ */
115
+ list(callback?: (error: Error | null, items: MediaProcessorInstance[]) => any): Promise<MediaProcessorInstance[]>;
116
+ /**
117
+ * Lists MediaProcessorInstance records from the API as a list.
118
+ *
119
+ * If a function is passed as the first argument, it will be used as the callback
120
+ * function.
121
+ *
122
+ * @param opts - Options for request
123
+ * @param callback - Callback to handle list of records
124
+ */
125
+ list(opts?: MediaProcessorListInstanceOptions, callback?: (error: Error | null, items: MediaProcessorInstance[]) => any): Promise<MediaProcessorInstance[]>;
126
+ /**
127
+ * Retrieve a single page of MediaProcessorInstance records from the API.
128
+ *
129
+ * The request is executed immediately.
130
+ *
131
+ * If a function is passed as the first argument, it will be used as the callback
132
+ * function.
133
+ *
134
+ * @param callback - Callback to handle list of records
135
+ */
136
+ page(callback?: (error: Error | null, items: MediaProcessorPage) => any): Promise<MediaProcessorPage>;
137
+ /**
138
+ * Retrieve a single page of MediaProcessorInstance records from the API.
139
+ *
140
+ * The request is executed immediately.
141
+ *
142
+ * If a function is passed as the first argument, it will be used as the callback
143
+ * function.
144
+ *
145
+ * @param opts - Options for request
146
+ * @param callback - Callback to handle list of records
147
+ */
148
+ page(opts?: MediaProcessorListInstancePageOptions, callback?: (error: Error | null, items: MediaProcessorPage) => any): Promise<MediaProcessorPage>;
149
+ /**
150
+ * Provide a user-friendly representation
151
+ */
152
+ toJSON(): any;
153
+ }
154
+
155
+ /**
156
+ * Options to pass to create
157
+ *
158
+ * @property extension - The Media Extension name or URL
159
+ * @property extensionContext - The Media Extension context
160
+ * @property extensionEnvironment - The Media Extension environment
161
+ * @property statusCallback - The URL to send MediaProcessor event updates to your application
162
+ * @property statusCallbackMethod - The HTTP method Twilio should use to call the `status_callback` URL
163
+ */
164
+ interface MediaProcessorListInstanceCreateOptions {
165
+ extension: string;
166
+ extensionContext: string;
167
+ extensionEnvironment?: object;
168
+ statusCallback?: string;
169
+ statusCallbackMethod?: string;
170
+ }
171
+
172
+ /**
173
+ * Options to pass to each
174
+ *
175
+ * @property callback -
176
+ * Function to process each record. If this and a positional
177
+ * callback are passed, this one will be used
178
+ * @property done - Function to be called upon completion of streaming
179
+ * @property limit -
180
+ * Upper limit for the number of records to return.
181
+ * each() 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 pageSize is defined but a limit is defined,
188
+ * each() will attempt to read the limit with the most efficient
189
+ * page size, i.e. min(limit, 1000)
190
+ * @property status - Status to filter by
191
+ */
192
+ interface MediaProcessorListInstanceEachOptions {
193
+ callback?: (item: MediaProcessorInstance, done: (err?: Error) => void) => void;
194
+ done?: Function;
195
+ limit?: number;
196
+ order?: MediaProcessorOrder;
197
+ pageSize?: number;
198
+ status?: MediaProcessorStatus;
199
+ }
200
+
201
+ /**
202
+ * Options to pass to list
203
+ *
204
+ * @property limit -
205
+ * Upper limit for the number of records to return.
206
+ * list() guarantees never to return more than limit.
207
+ * Default is no limit
208
+ * @property order - The sort order of the list
209
+ * @property pageSize -
210
+ * Number of records to fetch per request,
211
+ * when not set will use the default value of 50 records.
212
+ * If no page_size is defined but a limit is defined,
213
+ * list() will attempt to read the limit with the most
214
+ * efficient page size, i.e. min(limit, 1000)
215
+ * @property status - Status to filter by
216
+ */
217
+ interface MediaProcessorListInstanceOptions {
218
+ limit?: number;
219
+ order?: MediaProcessorOrder;
220
+ pageSize?: number;
221
+ status?: MediaProcessorStatus;
222
+ }
223
+
224
+ /**
225
+ * Options to pass to page
226
+ *
227
+ * @property order - The sort order of the list
228
+ * @property pageNumber - Page Number, this value is simply for client state
229
+ * @property pageSize - Number of records to return, defaults to 50
230
+ * @property pageToken - PageToken provided by the API
231
+ * @property status - Status to filter by
232
+ */
233
+ interface MediaProcessorListInstancePageOptions {
234
+ order?: MediaProcessorOrder;
235
+ pageNumber?: number;
236
+ pageSize?: number;
237
+ pageToken?: string;
238
+ status?: MediaProcessorStatus;
239
+ }
240
+
241
+ interface MediaProcessorPayload extends MediaProcessorResource, Page.TwilioResponsePayload {
242
+ }
243
+
244
+ interface MediaProcessorResource {
245
+ account_sid: string;
246
+ date_created: Date;
247
+ date_updated: Date;
248
+ ended_reason: string;
249
+ extension: string;
250
+ extension_context: string;
251
+ sid: string;
252
+ status: MediaProcessorStatus;
253
+ status_callback: string;
254
+ status_callback_method: string;
255
+ url: string;
256
+ }
257
+
258
+ interface MediaProcessorSolution {
259
+ }
260
+
261
+
262
+ declare class MediaProcessorContext {
263
+ /**
264
+ * Initialize the MediaProcessorContext
265
+ *
266
+ * @param version - Version of the resource
267
+ * @param sid - The SID that identifies the resource to fetch
268
+ */
269
+ constructor(version: V1, sid: string);
270
+
271
+ /**
272
+ * fetch a MediaProcessorInstance
273
+ *
274
+ * @param callback - Callback to handle processed record
275
+ */
276
+ fetch(callback?: (error: Error | null, items: MediaProcessorInstance) => any): Promise<MediaProcessorInstance>;
277
+ /**
278
+ * Provide a user-friendly representation
279
+ */
280
+ toJSON(): any;
281
+ /**
282
+ * update a MediaProcessorInstance
283
+ *
284
+ * @param opts - Options for request
285
+ * @param callback - Callback to handle processed record
286
+ */
287
+ update(opts: MediaProcessorInstanceUpdateOptions, callback?: (error: Error | null, items: MediaProcessorInstance) => any): Promise<MediaProcessorInstance>;
288
+ }
289
+
290
+
291
+ declare class MediaProcessorInstance extends SerializableClass {
292
+ /**
293
+ * Initialize the MediaProcessorContext
294
+ *
295
+ * @param version - Version of the resource
296
+ * @param payload - The instance payload
297
+ * @param sid - The SID that identifies the resource to fetch
298
+ */
299
+ constructor(version: V1, payload: MediaProcessorPayload, sid: string);
300
+
301
+ private _proxy: MediaProcessorContext;
302
+ accountSid: string;
303
+ dateCreated: Date;
304
+ dateUpdated: Date;
305
+ endedReason: string;
306
+ extension: string;
307
+ extensionContext: string;
308
+ /**
309
+ * fetch a MediaProcessorInstance
310
+ *
311
+ * @param callback - Callback to handle processed record
312
+ */
313
+ fetch(callback?: (error: Error | null, items: MediaProcessorInstance) => any): Promise<MediaProcessorInstance>;
314
+ sid: string;
315
+ status: MediaProcessorStatus;
316
+ statusCallback: string;
317
+ statusCallbackMethod: string;
318
+ /**
319
+ * Provide a user-friendly representation
320
+ */
321
+ toJSON(): any;
322
+ /**
323
+ * update a MediaProcessorInstance
324
+ *
325
+ * @param opts - Options for request
326
+ * @param callback - Callback to handle processed record
327
+ */
328
+ update(opts: MediaProcessorInstanceUpdateOptions, callback?: (error: Error | null, items: MediaProcessorInstance) => any): Promise<MediaProcessorInstance>;
329
+ url: string;
330
+ }
331
+
332
+
333
+ declare class MediaProcessorPage extends Page<V1, MediaProcessorPayload, MediaProcessorResource, MediaProcessorInstance> {
334
+ /**
335
+ * Initialize the MediaProcessorPage
336
+ *
337
+ * @param version - Version of the resource
338
+ * @param response - Response from the API
339
+ * @param solution - Path solution
340
+ */
341
+ constructor(version: V1, response: Response<string>, solution: MediaProcessorSolution);
342
+
343
+ /**
344
+ * Build an instance of MediaProcessorInstance
345
+ *
346
+ * @param payload - Payload response from the API
347
+ */
348
+ getInstance(payload: MediaProcessorPayload): MediaProcessorInstance;
349
+ /**
350
+ * Provide a user-friendly representation
351
+ */
352
+ toJSON(): any;
353
+ }
354
+
355
+ export { MediaProcessorContext, MediaProcessorInstance, MediaProcessorInstanceUpdateOptions, MediaProcessorList, MediaProcessorListInstance, MediaProcessorListInstanceCreateOptions, MediaProcessorListInstanceEachOptions, MediaProcessorListInstanceOptions, MediaProcessorListInstancePageOptions, MediaProcessorOrder, MediaProcessorPage, MediaProcessorPayload, MediaProcessorResource, MediaProcessorSolution, MediaProcessorStatus, MediaProcessorUpdateStatus }