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,323 @@
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 InteractionChannelParticipantStatus = 'close'|'closed'|'wrapup';
14
+
15
+ type InteractionChannelParticipantType = 'supervisor'|'customer'|'external'|'agent'|'unknown';
16
+
17
+ /**
18
+ * Initialize the InteractionChannelParticipantList
19
+ *
20
+ * @param version - Version of the resource
21
+ * @param interactionSid - The Interaction Sid for this channel.
22
+ * @param channelSid - The Channel Sid for this Participant.
23
+ */
24
+ declare function InteractionChannelParticipantList(version: V1, interactionSid: string, channelSid: string): InteractionChannelParticipantListInstance;
25
+
26
+ /**
27
+ * Options to pass to update
28
+ *
29
+ * @property status - The Participant's status.
30
+ */
31
+ interface InteractionChannelParticipantInstanceUpdateOptions {
32
+ status: InteractionChannelParticipantStatus;
33
+ }
34
+
35
+ interface InteractionChannelParticipantListInstance {
36
+ /**
37
+ * @param sid - sid of instance
38
+ */
39
+ (sid: string): InteractionChannelParticipantContext;
40
+ /**
41
+ * create a InteractionChannelParticipantInstance
42
+ *
43
+ * @param opts - Options for request
44
+ * @param callback - Callback to handle processed record
45
+ */
46
+ create(opts: InteractionChannelParticipantListInstanceCreateOptions, callback?: (error: Error | null, item: InteractionChannelParticipantInstance) => any): Promise<InteractionChannelParticipantInstance>;
47
+ /**
48
+ * Streams InteractionChannelParticipantInstance 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: InteractionChannelParticipantInstance, done: (err?: Error) => void) => void): void;
62
+ /**
63
+ * Streams InteractionChannelParticipantInstance 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?: InteractionChannelParticipantListInstanceEachOptions, callback?: (item: InteractionChannelParticipantInstance, done: (err?: Error) => void) => void): void;
78
+ /**
79
+ * Constructs a interaction_channel_participant
80
+ *
81
+ * @param sid - The unique string that identifies the resource
82
+ */
83
+ get(sid: string): InteractionChannelParticipantContext;
84
+ /**
85
+ * Retrieve a single target page of InteractionChannelParticipantInstance records
86
+ * from the API.
87
+ *
88
+ * The request is executed immediately.
89
+ *
90
+ * If a function is passed as the first argument, it will be used as the callback
91
+ * function.
92
+ *
93
+ * @param callback - Callback to handle list of records
94
+ */
95
+ getPage(callback?: (error: Error | null, items: InteractionChannelParticipantPage) => any): Promise<InteractionChannelParticipantPage>;
96
+ /**
97
+ * Retrieve a single target page of InteractionChannelParticipantInstance records
98
+ * from the API.
99
+ *
100
+ * The request is executed immediately.
101
+ *
102
+ * If a function is passed as the first argument, it will be used as the callback
103
+ * function.
104
+ *
105
+ * @param targetUrl - API-generated URL for the requested results page
106
+ * @param callback - Callback to handle list of records
107
+ */
108
+ getPage(targetUrl?: string, callback?: (error: Error | null, items: InteractionChannelParticipantPage) => any): Promise<InteractionChannelParticipantPage>;
109
+ /**
110
+ * Lists InteractionChannelParticipantInstance records from the API as a list.
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
+ list(callback?: (error: Error | null, items: InteractionChannelParticipantInstance[]) => any): Promise<InteractionChannelParticipantInstance[]>;
118
+ /**
119
+ * Lists InteractionChannelParticipantInstance records from the API as a list.
120
+ *
121
+ * If a function is passed as the first argument, it will be used as the callback
122
+ * function.
123
+ *
124
+ * @param opts - Options for request
125
+ * @param callback - Callback to handle list of records
126
+ */
127
+ list(opts?: InteractionChannelParticipantListInstanceOptions, callback?: (error: Error | null, items: InteractionChannelParticipantInstance[]) => any): Promise<InteractionChannelParticipantInstance[]>;
128
+ /**
129
+ * Retrieve a single page of InteractionChannelParticipantInstance records from the
130
+ * API.
131
+ *
132
+ * The request is executed immediately.
133
+ *
134
+ * If a function is passed as the first argument, it will be used as the callback
135
+ * function.
136
+ *
137
+ * @param callback - Callback to handle list of records
138
+ */
139
+ page(callback?: (error: Error | null, items: InteractionChannelParticipantPage) => any): Promise<InteractionChannelParticipantPage>;
140
+ /**
141
+ * Retrieve a single page of InteractionChannelParticipantInstance records from the
142
+ * API.
143
+ *
144
+ * The request is executed immediately.
145
+ *
146
+ * If a function is passed as the first argument, it will be used as the callback
147
+ * function.
148
+ *
149
+ * @param opts - Options for request
150
+ * @param callback - Callback to handle list of records
151
+ */
152
+ page(opts?: InteractionChannelParticipantListInstancePageOptions, callback?: (error: Error | null, items: InteractionChannelParticipantPage) => any): Promise<InteractionChannelParticipantPage>;
153
+ /**
154
+ * Provide a user-friendly representation
155
+ */
156
+ toJSON(): any;
157
+ }
158
+
159
+ /**
160
+ * Options to pass to create
161
+ *
162
+ * @property mediaProperties - JSON representing the Media Properties for the new Participant.
163
+ * @property type - Participant type.
164
+ */
165
+ interface InteractionChannelParticipantListInstanceCreateOptions {
166
+ mediaProperties: object;
167
+ type: InteractionChannelParticipantType;
168
+ }
169
+
170
+ /**
171
+ * Options to pass to each
172
+ *
173
+ * @property callback -
174
+ * Function to process each record. If this and a positional
175
+ * callback are passed, this one will be used
176
+ * @property done - Function to be called upon completion of streaming
177
+ * @property limit -
178
+ * Upper limit for the number of records to return.
179
+ * each() 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 pageSize is defined but a limit is defined,
185
+ * each() will attempt to read the limit with the most efficient
186
+ * page size, i.e. min(limit, 1000)
187
+ */
188
+ interface InteractionChannelParticipantListInstanceEachOptions {
189
+ callback?: (item: InteractionChannelParticipantInstance, done: (err?: Error) => void) => void;
190
+ done?: Function;
191
+ limit?: number;
192
+ pageSize?: number;
193
+ }
194
+
195
+ /**
196
+ * Options to pass to list
197
+ *
198
+ * @property limit -
199
+ * Upper limit for the number of records to return.
200
+ * list() guarantees never to return more than limit.
201
+ * Default is no limit
202
+ * @property pageSize -
203
+ * Number of records to fetch per request,
204
+ * when not set will use the default value of 50 records.
205
+ * If no page_size is defined but a limit is defined,
206
+ * list() will attempt to read the limit with the most
207
+ * efficient page size, i.e. min(limit, 1000)
208
+ */
209
+ interface InteractionChannelParticipantListInstanceOptions {
210
+ limit?: number;
211
+ pageSize?: number;
212
+ }
213
+
214
+ /**
215
+ * Options to pass to page
216
+ *
217
+ * @property pageNumber - Page Number, this value is simply for client state
218
+ * @property pageSize - Number of records to return, defaults to 50
219
+ * @property pageToken - PageToken provided by the API
220
+ */
221
+ interface InteractionChannelParticipantListInstancePageOptions {
222
+ pageNumber?: number;
223
+ pageSize?: number;
224
+ pageToken?: string;
225
+ }
226
+
227
+ interface InteractionChannelParticipantPayload extends InteractionChannelParticipantResource, Page.TwilioResponsePayload {
228
+ }
229
+
230
+ interface InteractionChannelParticipantResource {
231
+ channel_sid: string;
232
+ interaction_sid: string;
233
+ sid: string;
234
+ type: InteractionChannelParticipantType;
235
+ url: string;
236
+ }
237
+
238
+ interface InteractionChannelParticipantSolution {
239
+ channelSid?: string;
240
+ interactionSid?: string;
241
+ }
242
+
243
+
244
+ declare class InteractionChannelParticipantContext {
245
+ /**
246
+ * Initialize the InteractionChannelParticipantContext
247
+ *
248
+ * @param version - Version of the resource
249
+ * @param interactionSid - The Interaction Sid for this channel.
250
+ * @param channelSid - The Channel Sid for this Participant.
251
+ * @param sid - The unique string that identifies the resource
252
+ */
253
+ constructor(version: V1, interactionSid: string, channelSid: string, sid: string);
254
+
255
+ /**
256
+ * Provide a user-friendly representation
257
+ */
258
+ toJSON(): any;
259
+ /**
260
+ * update a InteractionChannelParticipantInstance
261
+ *
262
+ * @param opts - Options for request
263
+ * @param callback - Callback to handle processed record
264
+ */
265
+ update(opts: InteractionChannelParticipantInstanceUpdateOptions, callback?: (error: Error | null, items: InteractionChannelParticipantInstance) => any): Promise<InteractionChannelParticipantInstance>;
266
+ }
267
+
268
+
269
+ declare class InteractionChannelParticipantInstance extends SerializableClass {
270
+ /**
271
+ * Initialize the InteractionChannelParticipantContext
272
+ *
273
+ * @param version - Version of the resource
274
+ * @param payload - The instance payload
275
+ * @param interactionSid - The Interaction Sid for this channel.
276
+ * @param channelSid - The Channel Sid for this Participant.
277
+ * @param sid - The unique string that identifies the resource
278
+ */
279
+ constructor(version: V1, payload: InteractionChannelParticipantPayload, interactionSid: string, channelSid: string, sid: string);
280
+
281
+ private _proxy: InteractionChannelParticipantContext;
282
+ channelSid: string;
283
+ interactionSid: string;
284
+ sid: string;
285
+ /**
286
+ * Provide a user-friendly representation
287
+ */
288
+ toJSON(): any;
289
+ type: InteractionChannelParticipantType;
290
+ /**
291
+ * update a InteractionChannelParticipantInstance
292
+ *
293
+ * @param opts - Options for request
294
+ * @param callback - Callback to handle processed record
295
+ */
296
+ update(opts: InteractionChannelParticipantInstanceUpdateOptions, callback?: (error: Error | null, items: InteractionChannelParticipantInstance) => any): Promise<InteractionChannelParticipantInstance>;
297
+ url: string;
298
+ }
299
+
300
+
301
+ declare class InteractionChannelParticipantPage extends Page<V1, InteractionChannelParticipantPayload, InteractionChannelParticipantResource, InteractionChannelParticipantInstance> {
302
+ /**
303
+ * Initialize the InteractionChannelParticipantPage
304
+ *
305
+ * @param version - Version of the resource
306
+ * @param response - Response from the API
307
+ * @param solution - Path solution
308
+ */
309
+ constructor(version: V1, response: Response<string>, solution: InteractionChannelParticipantSolution);
310
+
311
+ /**
312
+ * Build an instance of InteractionChannelParticipantInstance
313
+ *
314
+ * @param payload - Payload response from the API
315
+ */
316
+ getInstance(payload: InteractionChannelParticipantPayload): InteractionChannelParticipantInstance;
317
+ /**
318
+ * Provide a user-friendly representation
319
+ */
320
+ toJSON(): any;
321
+ }
322
+
323
+ export { InteractionChannelParticipantContext, InteractionChannelParticipantInstance, InteractionChannelParticipantInstanceUpdateOptions, InteractionChannelParticipantList, InteractionChannelParticipantListInstance, InteractionChannelParticipantListInstanceCreateOptions, InteractionChannelParticipantListInstanceEachOptions, InteractionChannelParticipantListInstanceOptions, InteractionChannelParticipantListInstancePageOptions, InteractionChannelParticipantPage, InteractionChannelParticipantPayload, InteractionChannelParticipantResource, InteractionChannelParticipantSolution, InteractionChannelParticipantStatus, InteractionChannelParticipantType }