twilio 3.67.2 → 3.71.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 (81) hide show
  1. package/CHANGES.md +97 -0
  2. package/README.md +1 -1
  3. package/lib/base/RequestClient.js +1 -0
  4. package/lib/jwt/AccessToken.d.ts +16 -0
  5. package/lib/jwt/AccessToken.js +20 -0
  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 +7 -0
  15. package/lib/rest/api/v2010/account/call.js +28 -0
  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/events/v1/sink.d.ts +1 -1
  27. package/lib/rest/flexApi/v1/configuration.d.ts +2 -0
  28. package/lib/rest/flexApi/v1/configuration.js +2 -0
  29. package/lib/rest/insights/v1/callSummaries.d.ts +27 -27
  30. package/lib/rest/insights/v1/callSummaries.js +36 -36
  31. package/lib/rest/media/V1.d.ts +28 -0
  32. package/lib/rest/media/V1.js +59 -0
  33. package/lib/rest/media/v1/mediaProcessor.d.ts +355 -0
  34. package/lib/rest/media/v1/mediaProcessor.js +702 -0
  35. package/lib/rest/media/v1/playerStreamer/playbackGrant.d.ts +162 -0
  36. package/lib/rest/media/v1/playerStreamer/playbackGrant.js +384 -0
  37. package/lib/rest/media/v1/playerStreamer.d.ts +366 -0
  38. package/lib/rest/media/v1/playerStreamer.js +729 -0
  39. package/lib/rest/messaging/v1/brandRegistration/brandVetting.d.ts +286 -0
  40. package/lib/rest/messaging/v1/brandRegistration/brandVetting.js +521 -0
  41. package/lib/rest/messaging/v1/brandRegistration.d.ts +27 -2
  42. package/lib/rest/messaging/v1/brandRegistration.js +48 -2
  43. package/lib/rest/messaging/v1/service.d.ts +8 -0
  44. package/lib/rest/messaging/v1/service.js +14 -0
  45. package/lib/rest/numbers/v2/regulatoryCompliance/bundle/bundleCopy.d.ts +133 -0
  46. package/lib/rest/numbers/v2/regulatoryCompliance/bundle/bundleCopy.js +268 -0
  47. package/lib/rest/numbers/v2/regulatoryCompliance/bundle/replaceItems.d.ts +127 -0
  48. package/lib/rest/numbers/v2/regulatoryCompliance/bundle/replaceItems.js +271 -0
  49. package/lib/rest/numbers/v2/regulatoryCompliance/bundle.d.ts +14 -0
  50. package/lib/rest/numbers/v2/regulatoryCompliance/bundle.js +56 -0
  51. package/lib/rest/serverless/v1/service/build.d.ts +1 -1
  52. package/lib/rest/serverless/v1/service/environment.js +1 -1
  53. package/lib/rest/serverless/v1/service.d.ts +2 -0
  54. package/lib/rest/serverless/v1/service.js +3 -0
  55. package/lib/rest/taskrouter/v1/workspace/task/reservation.d.ts +2 -0
  56. package/lib/rest/taskrouter/v1/workspace/task/reservation.js +4 -1
  57. package/lib/rest/taskrouter/v1/workspace/worker/reservation.d.ts +2 -0
  58. package/lib/rest/taskrouter/v1/workspace/worker/reservation.js +4 -1
  59. package/lib/rest/taskrouter/v1/workspace/worker.d.ts +27 -2
  60. package/lib/rest/taskrouter/v1/workspace/worker.js +22 -7
  61. package/lib/rest/trunking/v1/trunk.d.ts +9 -1
  62. package/lib/rest/trunking/v1/trunk.js +13 -2
  63. package/lib/rest/verify/V2.d.ts +3 -3
  64. package/lib/rest/verify/V2.js +6 -8
  65. package/lib/rest/verify/v2/service/entity/factor.d.ts +1 -1
  66. package/lib/rest/verify/v2/service/entity/factor.js +2 -2
  67. package/lib/rest/verify/v2/service/entity/newFactor.d.ts +1 -1
  68. package/lib/rest/verify/v2/service/entity/newFactor.js +1 -1
  69. package/lib/rest/verify/v2/service/verification.d.ts +5 -1
  70. package/lib/rest/verify/v2/service/verification.js +7 -2
  71. package/lib/rest/verify/v2/service.d.ts +6 -0
  72. package/lib/rest/verify/v2/service.js +12 -2
  73. package/lib/rest/verify/v2/{verificationTemplate.d.ts → template.d.ts} +35 -37
  74. package/lib/rest/verify/v2/{verificationTemplate.js → template.js} +58 -64
  75. package/lib/rest/video/v1/room.d.ts +4 -0
  76. package/lib/rest/video/v1/room.js +7 -1
  77. package/lib/rest/wireless/v1/ratePlan.d.ts +1 -1
  78. package/lib/rest/wireless/v1/ratePlan.js +3 -3
  79. package/lib/rest/wireless/v1/sim.d.ts +4 -4
  80. package/lib/rest/wireless/v1/sim.js +18 -24
  81. package/package.json +2 -2
@@ -0,0 +1,286 @@
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 BrandVettingVettingProvider = 'campaign-verify';
14
+
15
+ /**
16
+ * Initialize the BrandVettingList
17
+ *
18
+ * PLEASE NOTE that this class contains beta products that are subject to change.
19
+ * Use them with caution.
20
+ *
21
+ * @param version - Version of the resource
22
+ * @param brandSid - A2P BrandRegistration Sid
23
+ */
24
+ declare function BrandVettingList(version: V1, brandSid: string): BrandVettingListInstance;
25
+
26
+ interface BrandVettingListInstance {
27
+ /**
28
+ * create a BrandVettingInstance
29
+ *
30
+ * @param opts - Options for request
31
+ * @param callback - Callback to handle processed record
32
+ */
33
+ create(opts: BrandVettingListInstanceCreateOptions, callback?: (error: Error | null, item: BrandVettingInstance) => any): Promise<BrandVettingInstance>;
34
+ /**
35
+ * Streams BrandVettingInstance records from the API.
36
+ *
37
+ * This operation lazily loads records as efficiently as possible until the limit
38
+ * is reached.
39
+ *
40
+ * The results are passed into the callback function, so this operation is memory
41
+ * efficient.
42
+ *
43
+ * If a function is passed as the first argument, it will be used as the callback
44
+ * function.
45
+ *
46
+ * @param callback - Function to process each record
47
+ */
48
+ each(callback?: (item: BrandVettingInstance, done: (err?: Error) => void) => void): void;
49
+ /**
50
+ * Streams BrandVettingInstance records from the API.
51
+ *
52
+ * This operation lazily loads records as efficiently as possible until the limit
53
+ * is reached.
54
+ *
55
+ * The results are passed into the callback function, so this operation is memory
56
+ * efficient.
57
+ *
58
+ * If a function is passed as the first argument, it will be used as the callback
59
+ * function.
60
+ *
61
+ * @param opts - Options for request
62
+ * @param callback - Function to process each record
63
+ */
64
+ each(opts?: BrandVettingListInstanceEachOptions, callback?: (item: BrandVettingInstance, done: (err?: Error) => void) => void): void;
65
+ /**
66
+ * Retrieve a single target page of BrandVettingInstance records from the API.
67
+ *
68
+ * The request is executed immediately.
69
+ *
70
+ * If a function is passed as the first argument, it will be used as the callback
71
+ * function.
72
+ *
73
+ * @param callback - Callback to handle list of records
74
+ */
75
+ getPage(callback?: (error: Error | null, items: BrandVettingPage) => any): Promise<BrandVettingPage>;
76
+ /**
77
+ * Retrieve a single target page of BrandVettingInstance records from the API.
78
+ *
79
+ * The request is executed immediately.
80
+ *
81
+ * If a function is passed as the first argument, it will be used as the callback
82
+ * function.
83
+ *
84
+ * @param targetUrl - API-generated URL for the requested results page
85
+ * @param callback - Callback to handle list of records
86
+ */
87
+ getPage(targetUrl?: string, callback?: (error: Error | null, items: BrandVettingPage) => any): Promise<BrandVettingPage>;
88
+ /**
89
+ * Lists BrandVettingInstance records from the API as a list.
90
+ *
91
+ * If a function is passed as the first argument, it will be used as the callback
92
+ * function.
93
+ *
94
+ * @param callback - Callback to handle list of records
95
+ */
96
+ list(callback?: (error: Error | null, items: BrandVettingInstance[]) => any): Promise<BrandVettingInstance[]>;
97
+ /**
98
+ * Lists BrandVettingInstance records from the API as a list.
99
+ *
100
+ * If a function is passed as the first argument, it will be used as the callback
101
+ * function.
102
+ *
103
+ * @param opts - Options for request
104
+ * @param callback - Callback to handle list of records
105
+ */
106
+ list(opts?: BrandVettingListInstanceOptions, callback?: (error: Error | null, items: BrandVettingInstance[]) => any): Promise<BrandVettingInstance[]>;
107
+ /**
108
+ * Retrieve a single page of BrandVettingInstance records from the API.
109
+ *
110
+ * The request is executed immediately.
111
+ *
112
+ * If a function is passed as the first argument, it will be used as the callback
113
+ * function.
114
+ *
115
+ * @param callback - Callback to handle list of records
116
+ */
117
+ page(callback?: (error: Error | null, items: BrandVettingPage) => any): Promise<BrandVettingPage>;
118
+ /**
119
+ * Retrieve a single page of BrandVettingInstance records from the API.
120
+ *
121
+ * The request is executed immediately.
122
+ *
123
+ * If a function is passed as the first argument, it will be used as the callback
124
+ * function.
125
+ *
126
+ * @param opts - Options for request
127
+ * @param callback - Callback to handle list of records
128
+ */
129
+ page(opts?: BrandVettingListInstancePageOptions, callback?: (error: Error | null, items: BrandVettingPage) => any): Promise<BrandVettingPage>;
130
+ /**
131
+ * Provide a user-friendly representation
132
+ */
133
+ toJSON(): any;
134
+ }
135
+
136
+ /**
137
+ * Options to pass to create
138
+ *
139
+ * @property vettingId - The unique ID of the vetting
140
+ * @property vettingProvider - Third-party provider of the vettings to create
141
+ */
142
+ interface BrandVettingListInstanceCreateOptions {
143
+ vettingId?: string;
144
+ vettingProvider: BrandVettingVettingProvider;
145
+ }
146
+
147
+ /**
148
+ * Options to pass to each
149
+ *
150
+ * @property callback -
151
+ * Function to process each record. If this and a positional
152
+ * callback are passed, this one will be used
153
+ * @property done - Function to be called upon completion of streaming
154
+ * @property limit -
155
+ * Upper limit for the number of records to return.
156
+ * each() guarantees never to return more than limit.
157
+ * Default is no limit
158
+ * @property pageSize -
159
+ * Number of records to fetch per request,
160
+ * when not set will use the default value of 50 records.
161
+ * If no pageSize is defined but a limit is defined,
162
+ * each() will attempt to read the limit with the most efficient
163
+ * page size, i.e. min(limit, 1000)
164
+ * @property vettingProvider - Third-party provider of the vettings to create
165
+ */
166
+ interface BrandVettingListInstanceEachOptions {
167
+ callback?: (item: BrandVettingInstance, done: (err?: Error) => void) => void;
168
+ done?: Function;
169
+ limit?: number;
170
+ pageSize?: number;
171
+ vettingProvider?: BrandVettingVettingProvider;
172
+ }
173
+
174
+ /**
175
+ * Options to pass to list
176
+ *
177
+ * @property limit -
178
+ * Upper limit for the number of records to return.
179
+ * list() guarantees never to return more than limit.
180
+ * Default is no limit
181
+ * @property pageSize -
182
+ * Number of records to fetch per request,
183
+ * when not set will use the default value of 50 records.
184
+ * If no page_size is defined but a limit is defined,
185
+ * list() will attempt to read the limit with the most
186
+ * efficient page size, i.e. min(limit, 1000)
187
+ * @property vettingProvider - Third-party provider of the vettings to create
188
+ */
189
+ interface BrandVettingListInstanceOptions {
190
+ limit?: number;
191
+ pageSize?: number;
192
+ vettingProvider?: BrandVettingVettingProvider;
193
+ }
194
+
195
+ /**
196
+ * Options to pass to page
197
+ *
198
+ * @property pageNumber - Page Number, this value is simply for client state
199
+ * @property pageSize - Number of records to return, defaults to 50
200
+ * @property pageToken - PageToken provided by the API
201
+ * @property vettingProvider - Third-party provider of the vettings to create
202
+ */
203
+ interface BrandVettingListInstancePageOptions {
204
+ pageNumber?: number;
205
+ pageSize?: number;
206
+ pageToken?: string;
207
+ vettingProvider?: BrandVettingVettingProvider;
208
+ }
209
+
210
+ interface BrandVettingPayload extends BrandVettingResource, Page.TwilioResponsePayload {
211
+ }
212
+
213
+ interface BrandVettingResource {
214
+ account_sid: string;
215
+ brand_sid: string;
216
+ brand_vetting_sid: string;
217
+ date_created: Date;
218
+ date_updated: Date;
219
+ url: string;
220
+ vetting_class: string;
221
+ vetting_id: string;
222
+ vetting_provider: BrandVettingVettingProvider;
223
+ vetting_status: string;
224
+ }
225
+
226
+ interface BrandVettingSolution {
227
+ brandSid?: string;
228
+ }
229
+
230
+
231
+ declare class BrandVettingInstance extends SerializableClass {
232
+ /**
233
+ * Initialize the BrandVettingContext
234
+ *
235
+ * PLEASE NOTE that this class contains beta products that are subject to change.
236
+ * Use them with caution.
237
+ *
238
+ * @param version - Version of the resource
239
+ * @param payload - The instance payload
240
+ * @param brandSid - A2P BrandRegistration Sid
241
+ */
242
+ constructor(version: V1, payload: BrandVettingPayload, brandSid: string);
243
+
244
+ accountSid: string;
245
+ brandSid: string;
246
+ brandVettingSid: string;
247
+ dateCreated: Date;
248
+ dateUpdated: Date;
249
+ /**
250
+ * Provide a user-friendly representation
251
+ */
252
+ toJSON(): any;
253
+ url: string;
254
+ vettingClass: string;
255
+ vettingId: string;
256
+ vettingProvider: BrandVettingVettingProvider;
257
+ vettingStatus: string;
258
+ }
259
+
260
+
261
+ declare class BrandVettingPage extends Page<V1, BrandVettingPayload, BrandVettingResource, BrandVettingInstance> {
262
+ /**
263
+ * Initialize the BrandVettingPage
264
+ *
265
+ * PLEASE NOTE that this class contains beta products that are subject to change.
266
+ * Use them with caution.
267
+ *
268
+ * @param version - Version of the resource
269
+ * @param response - Response from the API
270
+ * @param solution - Path solution
271
+ */
272
+ constructor(version: V1, response: Response<string>, solution: BrandVettingSolution);
273
+
274
+ /**
275
+ * Build an instance of BrandVettingInstance
276
+ *
277
+ * @param payload - Payload response from the API
278
+ */
279
+ getInstance(payload: BrandVettingPayload): BrandVettingInstance;
280
+ /**
281
+ * Provide a user-friendly representation
282
+ */
283
+ toJSON(): any;
284
+ }
285
+
286
+ export { BrandVettingInstance, BrandVettingList, BrandVettingListInstance, BrandVettingListInstanceCreateOptions, BrandVettingListInstanceEachOptions, BrandVettingListInstanceOptions, BrandVettingListInstancePageOptions, BrandVettingPage, BrandVettingPayload, BrandVettingResource, BrandVettingSolution, BrandVettingVettingProvider }