twilio 3.68.0 → 3.71.2

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