twilio 3.75.0 → 3.76.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 (86) hide show
  1. package/README.md +0 -2
  2. package/lib/rest/Chat.d.ts +4 -0
  3. package/lib/rest/Chat.js +19 -0
  4. package/lib/rest/FlexApi.d.ts +2 -0
  5. package/lib/rest/FlexApi.js +8 -0
  6. package/lib/rest/Insights.d.ts +2 -0
  7. package/lib/rest/Insights.js +8 -0
  8. package/lib/rest/Media.d.ts +2 -0
  9. package/lib/rest/Media.js +9 -0
  10. package/lib/rest/Supersim.d.ts +0 -2
  11. package/lib/rest/Supersim.js +0 -8
  12. package/lib/rest/Verify.d.ts +2 -0
  13. package/lib/rest/Verify.js +9 -0
  14. package/lib/rest/api/v2010/account/call/payment.d.ts +1 -1
  15. package/lib/rest/api/v2010/account/call/payment.js +1 -1
  16. package/lib/rest/api/v2010/account/call/stream.d.ts +2 -8
  17. package/lib/rest/api/v2010/account/call/stream.js +8 -7
  18. package/lib/rest/api/v2010/account/call.d.ts +0 -2
  19. package/lib/rest/api/v2010/account/call.js +0 -2
  20. package/lib/rest/api/v2010/account/recording.d.ts +31 -2
  21. package/lib/rest/api/v2010/account/recording.js +25 -4
  22. package/lib/rest/api/v2010/account/usage/record/allTime.d.ts +1 -1
  23. package/lib/rest/api/v2010/account/usage/record/daily.d.ts +1 -1
  24. package/lib/rest/api/v2010/account/usage/record/lastMonth.d.ts +1 -1
  25. package/lib/rest/api/v2010/account/usage/record/monthly.d.ts +1 -1
  26. package/lib/rest/api/v2010/account/usage/record/thisMonth.d.ts +1 -1
  27. package/lib/rest/api/v2010/account/usage/record/today.d.ts +1 -1
  28. package/lib/rest/api/v2010/account/usage/record/yearly.d.ts +1 -1
  29. package/lib/rest/api/v2010/account/usage/record/yesterday.d.ts +1 -1
  30. package/lib/rest/api/v2010/account/usage/record.d.ts +1 -1
  31. package/lib/rest/api/v2010/account/usage/trigger.d.ts +1 -1
  32. package/lib/rest/chat/V3.d.ts +25 -0
  33. package/lib/rest/chat/V3.js +46 -0
  34. package/lib/rest/chat/v2/service/user/userChannel.d.ts +26 -1
  35. package/lib/rest/chat/v2/service/user/userChannel.js +18 -4
  36. package/lib/rest/chat/v3/channel.d.ts +177 -0
  37. package/lib/rest/chat/v3/channel.js +373 -0
  38. package/lib/rest/flexApi/V1.d.ts +3 -0
  39. package/lib/rest/flexApi/V1.js +11 -0
  40. package/lib/rest/flexApi/v1/configuration.d.ts +2 -0
  41. package/lib/rest/flexApi/v1/configuration.js +3 -0
  42. package/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelInvite.d.ts +266 -0
  43. package/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelInvite.js +505 -0
  44. package/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelParticipant.d.ts +323 -0
  45. package/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelParticipant.js +674 -0
  46. package/lib/rest/flexApi/v1/interaction/interactionChannel.d.ts +327 -0
  47. package/lib/rest/flexApi/v1/interaction/interactionChannel.js +718 -0
  48. package/lib/rest/flexApi/v1/interaction.d.ts +152 -0
  49. package/lib/rest/flexApi/v1/interaction.js +395 -0
  50. package/lib/rest/insights/V1.d.ts +3 -0
  51. package/lib/rest/insights/V1.js +11 -0
  52. package/lib/rest/insights/v1/annotation.d.ts +188 -0
  53. package/lib/rest/insights/v1/annotation.js +406 -0
  54. package/lib/rest/media/V1.d.ts +3 -0
  55. package/lib/rest/media/V1.js +12 -0
  56. package/lib/rest/media/v1/mediaProcessor.js +1 -1
  57. package/lib/rest/media/v1/mediaRecording.d.ts +358 -0
  58. package/lib/rest/{supersim/v1/command.js → media/v1/mediaRecording.js} +190 -176
  59. package/lib/rest/media/v1/playerStreamer.d.ts +4 -0
  60. package/lib/rest/media/v1/playerStreamer.js +5 -1
  61. package/lib/rest/numbers/v2/regulatoryCompliance/supportingDocument.d.ts +2 -0
  62. package/lib/rest/numbers/v2/regulatoryCompliance/supportingDocument.js +3 -0
  63. package/lib/rest/supersim/V1.d.ts +0 -3
  64. package/lib/rest/supersim/V1.js +0 -11
  65. package/lib/rest/supersim/v1/fleet.d.ts +0 -16
  66. package/lib/rest/supersim/v1/fleet.js +0 -18
  67. package/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueCumulativeStatistics.d.ts +1 -1
  68. package/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueCumulativeStatistics.js +2 -2
  69. package/lib/rest/taskrouter/v1/workspace/workflow/workflowCumulativeStatistics.d.ts +1 -1
  70. package/lib/rest/taskrouter/v1/workspace/workflow/workflowCumulativeStatistics.js +2 -2
  71. package/lib/rest/taskrouter/v1/workspace/workspaceCumulativeStatistics.d.ts +1 -1
  72. package/lib/rest/taskrouter/v1/workspace/workspaceCumulativeStatistics.js +2 -2
  73. package/lib/rest/verify/V2.d.ts +3 -0
  74. package/lib/rest/verify/V2.js +13 -0
  75. package/lib/rest/verify/v2/service/accessToken.d.ts +6 -0
  76. package/lib/rest/verify/v2/service/accessToken.js +9 -1
  77. package/lib/rest/verify/v2/service/entity/challenge.d.ts +4 -0
  78. package/lib/rest/verify/v2/service/entity/challenge.js +8 -1
  79. package/lib/rest/verify/v2/verificationAttemptsSummary.d.ts +156 -0
  80. package/lib/rest/verify/v2/verificationAttemptsSummary.js +362 -0
  81. package/lib/rest/video/v1/composition.d.ts +4 -0
  82. package/lib/rest/video/v1/composition.js +6 -0
  83. package/lib/rest/video/v1/recording.d.ts +4 -0
  84. package/lib/rest/video/v1/recording.js +6 -0
  85. package/package.json +3 -3
  86. package/lib/rest/supersim/v1/command.d.ts +0 -342
@@ -0,0 +1,327 @@
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 { InteractionChannelInviteList } from './interactionChannel/interactionChannelInvite';
12
+ import { InteractionChannelInviteListInstance } from './interactionChannel/interactionChannelInvite';
13
+ import { InteractionChannelParticipantList } from './interactionChannel/interactionChannelParticipant';
14
+ import { InteractionChannelParticipantListInstance } from './interactionChannel/interactionChannelParticipant';
15
+ import { SerializableClass } from '../../../../interfaces';
16
+
17
+ type InteractionChannelStatus = 'close'|'closed'|'wrapup';
18
+
19
+ type InteractionChannelType = 'voice'|'sms'|'email'|'web'|'whatsapp'|'chat';
20
+
21
+ /**
22
+ * Initialize the InteractionChannelList
23
+ *
24
+ * @param version - Version of the resource
25
+ * @param interactionSid - The Interaction Sid for this channel.
26
+ */
27
+ declare function InteractionChannelList(version: V1, interactionSid: string): InteractionChannelListInstance;
28
+
29
+ /**
30
+ * Options to pass to update
31
+ *
32
+ * @property routing - The Interaction Channels's optional routing parameters
33
+ * @property status - The Interaction Channels's status
34
+ */
35
+ interface InteractionChannelInstanceUpdateOptions {
36
+ routing?: object;
37
+ status: InteractionChannelStatus;
38
+ }
39
+
40
+ interface InteractionChannelListInstance {
41
+ /**
42
+ * @param sid - sid of instance
43
+ */
44
+ (sid: string): InteractionChannelContext;
45
+ /**
46
+ * Streams InteractionChannelInstance records from the API.
47
+ *
48
+ * This operation lazily loads records as efficiently as possible until the limit
49
+ * is reached.
50
+ *
51
+ * The results are passed into the callback function, so this operation is memory
52
+ * efficient.
53
+ *
54
+ * If a function is passed as the first argument, it will be used as the callback
55
+ * function.
56
+ *
57
+ * @param callback - Function to process each record
58
+ */
59
+ each(callback?: (item: InteractionChannelInstance, done: (err?: Error) => void) => void): void;
60
+ /**
61
+ * Streams InteractionChannelInstance records from the API.
62
+ *
63
+ * This operation lazily loads records as efficiently as possible until the limit
64
+ * is reached.
65
+ *
66
+ * The results are passed into the callback function, so this operation is memory
67
+ * efficient.
68
+ *
69
+ * If a function is passed as the first argument, it will be used as the callback
70
+ * function.
71
+ *
72
+ * @param opts - Options for request
73
+ * @param callback - Function to process each record
74
+ */
75
+ each(opts?: InteractionChannelListInstanceEachOptions, callback?: (item: InteractionChannelInstance, done: (err?: Error) => void) => void): void;
76
+ /**
77
+ * Constructs a interaction_channel
78
+ *
79
+ * @param sid - The Channel Sid for this Participant.
80
+ */
81
+ get(sid: string): InteractionChannelContext;
82
+ /**
83
+ * Retrieve a single target page of InteractionChannelInstance records from the
84
+ * 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 callback - Callback to handle list of records
92
+ */
93
+ getPage(callback?: (error: Error | null, items: InteractionChannelPage) => any): Promise<InteractionChannelPage>;
94
+ /**
95
+ * Retrieve a single target page of InteractionChannelInstance records from the
96
+ * 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: InteractionChannelPage) => any): Promise<InteractionChannelPage>;
107
+ /**
108
+ * Lists InteractionChannelInstance 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: InteractionChannelInstance[]) => any): Promise<InteractionChannelInstance[]>;
116
+ /**
117
+ * Lists InteractionChannelInstance 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?: InteractionChannelListInstanceOptions, callback?: (error: Error | null, items: InteractionChannelInstance[]) => any): Promise<InteractionChannelInstance[]>;
126
+ /**
127
+ * Retrieve a single page of InteractionChannelInstance 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: InteractionChannelPage) => any): Promise<InteractionChannelPage>;
137
+ /**
138
+ * Retrieve a single page of InteractionChannelInstance 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?: InteractionChannelListInstancePageOptions, callback?: (error: Error | null, items: InteractionChannelPage) => any): Promise<InteractionChannelPage>;
149
+ /**
150
+ * Provide a user-friendly representation
151
+ */
152
+ toJSON(): any;
153
+ }
154
+
155
+ /**
156
+ * Options to pass to each
157
+ *
158
+ * @property callback -
159
+ * Function to process each record. If this and a positional
160
+ * callback are passed, this one will be used
161
+ * @property done - Function to be called upon completion of streaming
162
+ * @property limit -
163
+ * Upper limit for the number of records to return.
164
+ * each() guarantees never to return more than limit.
165
+ * Default is no limit
166
+ * @property pageSize -
167
+ * Number of records to fetch per request,
168
+ * when not set will use the default value of 50 records.
169
+ * If no pageSize is defined but a limit is defined,
170
+ * each() will attempt to read the limit with the most efficient
171
+ * page size, i.e. min(limit, 1000)
172
+ */
173
+ interface InteractionChannelListInstanceEachOptions {
174
+ callback?: (item: InteractionChannelInstance, done: (err?: Error) => void) => void;
175
+ done?: Function;
176
+ limit?: number;
177
+ pageSize?: number;
178
+ }
179
+
180
+ /**
181
+ * Options to pass to list
182
+ *
183
+ * @property limit -
184
+ * Upper limit for the number of records to return.
185
+ * list() guarantees never to return more than limit.
186
+ * Default is no limit
187
+ * @property pageSize -
188
+ * Number of records to fetch per request,
189
+ * when not set will use the default value of 50 records.
190
+ * If no page_size is defined but a limit is defined,
191
+ * list() will attempt to read the limit with the most
192
+ * efficient page size, i.e. min(limit, 1000)
193
+ */
194
+ interface InteractionChannelListInstanceOptions {
195
+ limit?: number;
196
+ pageSize?: number;
197
+ }
198
+
199
+ /**
200
+ * Options to pass to page
201
+ *
202
+ * @property pageNumber - Page Number, this value is simply for client state
203
+ * @property pageSize - Number of records to return, defaults to 50
204
+ * @property pageToken - PageToken provided by the API
205
+ */
206
+ interface InteractionChannelListInstancePageOptions {
207
+ pageNumber?: number;
208
+ pageSize?: number;
209
+ pageToken?: string;
210
+ }
211
+
212
+ interface InteractionChannelPayload extends InteractionChannelResource, Page.TwilioResponsePayload {
213
+ }
214
+
215
+ interface InteractionChannelResource {
216
+ interaction_sid: string;
217
+ links: string;
218
+ sid: string;
219
+ type: InteractionChannelType;
220
+ url: string;
221
+ }
222
+
223
+ interface InteractionChannelSolution {
224
+ interactionSid?: string;
225
+ }
226
+
227
+
228
+ declare class InteractionChannelContext {
229
+ /**
230
+ * Initialize the InteractionChannelContext
231
+ *
232
+ * @param version - Version of the resource
233
+ * @param interactionSid - The Interaction Sid for this channel.
234
+ * @param sid - The Channel Sid for this Participant.
235
+ */
236
+ constructor(version: V1, interactionSid: string, sid: string);
237
+
238
+ /**
239
+ * fetch a InteractionChannelInstance
240
+ *
241
+ * @param callback - Callback to handle processed record
242
+ */
243
+ fetch(callback?: (error: Error | null, items: InteractionChannelInstance) => any): Promise<InteractionChannelInstance>;
244
+ invites: InteractionChannelInviteListInstance;
245
+ participants: InteractionChannelParticipantListInstance;
246
+ /**
247
+ * Provide a user-friendly representation
248
+ */
249
+ toJSON(): any;
250
+ /**
251
+ * update a InteractionChannelInstance
252
+ *
253
+ * @param opts - Options for request
254
+ * @param callback - Callback to handle processed record
255
+ */
256
+ update(opts: InteractionChannelInstanceUpdateOptions, callback?: (error: Error | null, items: InteractionChannelInstance) => any): Promise<InteractionChannelInstance>;
257
+ }
258
+
259
+
260
+ declare class InteractionChannelInstance extends SerializableClass {
261
+ /**
262
+ * Initialize the InteractionChannelContext
263
+ *
264
+ * @param version - Version of the resource
265
+ * @param payload - The instance payload
266
+ * @param interactionSid - The Interaction Sid for this channel.
267
+ * @param sid - The Channel Sid for this Participant.
268
+ */
269
+ constructor(version: V1, payload: InteractionChannelPayload, interactionSid: string, sid: string);
270
+
271
+ private _proxy: InteractionChannelContext;
272
+ /**
273
+ * fetch a InteractionChannelInstance
274
+ *
275
+ * @param callback - Callback to handle processed record
276
+ */
277
+ fetch(callback?: (error: Error | null, items: InteractionChannelInstance) => any): Promise<InteractionChannelInstance>;
278
+ interactionSid: string;
279
+ /**
280
+ * Access the invites
281
+ */
282
+ invites(): InteractionChannelInviteListInstance;
283
+ links: string;
284
+ /**
285
+ * Access the participants
286
+ */
287
+ participants(): InteractionChannelParticipantListInstance;
288
+ sid: string;
289
+ /**
290
+ * Provide a user-friendly representation
291
+ */
292
+ toJSON(): any;
293
+ type: InteractionChannelType;
294
+ /**
295
+ * update a InteractionChannelInstance
296
+ *
297
+ * @param opts - Options for request
298
+ * @param callback - Callback to handle processed record
299
+ */
300
+ update(opts: InteractionChannelInstanceUpdateOptions, callback?: (error: Error | null, items: InteractionChannelInstance) => any): Promise<InteractionChannelInstance>;
301
+ url: string;
302
+ }
303
+
304
+
305
+ declare class InteractionChannelPage extends Page<V1, InteractionChannelPayload, InteractionChannelResource, InteractionChannelInstance> {
306
+ /**
307
+ * Initialize the InteractionChannelPage
308
+ *
309
+ * @param version - Version of the resource
310
+ * @param response - Response from the API
311
+ * @param solution - Path solution
312
+ */
313
+ constructor(version: V1, response: Response<string>, solution: InteractionChannelSolution);
314
+
315
+ /**
316
+ * Build an instance of InteractionChannelInstance
317
+ *
318
+ * @param payload - Payload response from the API
319
+ */
320
+ getInstance(payload: InteractionChannelPayload): InteractionChannelInstance;
321
+ /**
322
+ * Provide a user-friendly representation
323
+ */
324
+ toJSON(): any;
325
+ }
326
+
327
+ export { InteractionChannelContext, InteractionChannelInstance, InteractionChannelInstanceUpdateOptions, InteractionChannelList, InteractionChannelListInstance, InteractionChannelListInstanceEachOptions, InteractionChannelListInstanceOptions, InteractionChannelListInstancePageOptions, InteractionChannelPage, InteractionChannelPayload, InteractionChannelResource, InteractionChannelSolution, InteractionChannelStatus, InteractionChannelType }