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
@@ -13,6 +13,7 @@ var _ = require('lodash'); /* jshint ignore:line */
13
13
  var ChannelList = require('./v1/channel').ChannelList;
14
14
  var ConfigurationList = require('./v1/configuration').ConfigurationList;
15
15
  var FlexFlowList = require('./v1/flexFlow').FlexFlowList;
16
+ var InteractionList = require('./v1/interaction').InteractionList;
16
17
  var Version = require('../../base/Version'); /* jshint ignore:line */
17
18
  var WebChannelList = require('./v1/webChannel').WebChannelList;
18
19
 
@@ -27,6 +28,7 @@ var WebChannelList = require('./v1/webChannel').WebChannelList;
27
28
  * @property {Twilio.FlexApi.V1.ConfigurationList} configuration -
28
29
  * configuration resource
29
30
  * @property {Twilio.FlexApi.V1.FlexFlowList} flexFlow - flexFlow resource
31
+ * @property {Twilio.FlexApi.V1.InteractionList} interaction - interaction resource
30
32
  * @property {Twilio.FlexApi.V1.WebChannelList} webChannel - webChannel resource
31
33
  *
32
34
  * @param {Twilio.FlexApi} domain - The twilio domain
@@ -39,6 +41,7 @@ function V1(domain) {
39
41
  this._channel = undefined;
40
42
  this._configuration = undefined;
41
43
  this._flexFlow = undefined;
44
+ this._interaction = undefined;
42
45
  this._webChannel = undefined;
43
46
  }
44
47
 
@@ -69,6 +72,14 @@ Object.defineProperty(V1.prototype,
69
72
  }
70
73
  });
71
74
 
75
+ Object.defineProperty(V1.prototype,
76
+ 'interaction', {
77
+ get: function() {
78
+ this._interaction = this._interaction || new InteractionList(this);
79
+ return this._interaction;
80
+ }
81
+ });
82
+
72
83
  Object.defineProperty(V1.prototype,
73
84
  'webChannel', {
74
85
  get: function() {
@@ -51,6 +51,7 @@ interface ConfigurationResource {
51
51
  attributes: object;
52
52
  call_recording_enabled: boolean;
53
53
  call_recording_webhook_url: string;
54
+ channel_configs: object[];
54
55
  chat_service_instance_sid: string;
55
56
  crm_attributes: object;
56
57
  crm_callback_url: string;
@@ -149,6 +150,7 @@ declare class ConfigurationInstance extends SerializableClass {
149
150
  attributes: any;
150
151
  callRecordingEnabled: boolean;
151
152
  callRecordingWebhookUrl: string;
153
+ channelConfigs: object[];
152
154
  chatServiceInstanceSid: string;
153
155
  /**
154
156
  * create a ConfigurationInstance
@@ -214,6 +214,8 @@ ConfigurationPage.prototype[util.inspect.custom] = function inspect(depth,
214
214
  * @property {boolean} flexInsightsDrilldown -
215
215
  * Setting to enable Flex UI redirection
216
216
  * @property {string} flexUrl - URL to redirect to in case drilldown is enabled.
217
+ * @property {object} channelConfigs -
218
+ * Flex Conversations channels' attachments configurations
217
219
  *
218
220
  * @param {V1} version - Version of the resource
219
221
  * @param {ConfigurationPayload} payload - The instance payload
@@ -265,6 +267,7 @@ ConfigurationInstance = function ConfigurationInstance(version, payload) {
265
267
  this.flexInsightsHr = payload.flex_insights_hr; // jshint ignore:line
266
268
  this.flexInsightsDrilldown = payload.flex_insights_drilldown; // jshint ignore:line
267
269
  this.flexUrl = payload.flex_url; // jshint ignore:line
270
+ this.channelConfigs = payload.channel_configs; // jshint ignore:line
268
271
 
269
272
  // Context
270
273
  this._context = undefined;
@@ -0,0 +1,266 @@
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 InteractionChannelInviteAction = 'accept'|'decline';
14
+
15
+ type InteractionChannelInviteType = 'taskrouter';
16
+
17
+ /**
18
+ * Initialize the InteractionChannelInviteList
19
+ *
20
+ * @param version - Version of the resource
21
+ * @param interactionSid - The interaction_sid
22
+ * @param channelSid - The channel_sid
23
+ */
24
+ declare function InteractionChannelInviteList(version: V1, interactionSid: string, channelSid: string): InteractionChannelInviteListInstance;
25
+
26
+ interface InteractionChannelInviteListInstance {
27
+ /**
28
+ * create a InteractionChannelInviteInstance
29
+ *
30
+ * @param opts - Options for request
31
+ * @param callback - Callback to handle processed record
32
+ */
33
+ create(opts: InteractionChannelInviteListInstanceCreateOptions, callback?: (error: Error | null, item: InteractionChannelInviteInstance) => any): Promise<InteractionChannelInviteInstance>;
34
+ /**
35
+ * Streams InteractionChannelInviteInstance 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: InteractionChannelInviteInstance, done: (err?: Error) => void) => void): void;
49
+ /**
50
+ * Streams InteractionChannelInviteInstance 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?: InteractionChannelInviteListInstanceEachOptions, callback?: (item: InteractionChannelInviteInstance, done: (err?: Error) => void) => void): void;
65
+ /**
66
+ * Retrieve a single target page of InteractionChannelInviteInstance records from
67
+ * the API.
68
+ *
69
+ * The request is executed immediately.
70
+ *
71
+ * If a function is passed as the first argument, it will be used as the callback
72
+ * function.
73
+ *
74
+ * @param callback - Callback to handle list of records
75
+ */
76
+ getPage(callback?: (error: Error | null, items: InteractionChannelInvitePage) => any): Promise<InteractionChannelInvitePage>;
77
+ /**
78
+ * Retrieve a single target page of InteractionChannelInviteInstance records from
79
+ * the API.
80
+ *
81
+ * The request is executed immediately.
82
+ *
83
+ * If a function is passed as the first argument, it will be used as the callback
84
+ * function.
85
+ *
86
+ * @param targetUrl - API-generated URL for the requested results page
87
+ * @param callback - Callback to handle list of records
88
+ */
89
+ getPage(targetUrl?: string, callback?: (error: Error | null, items: InteractionChannelInvitePage) => any): Promise<InteractionChannelInvitePage>;
90
+ /**
91
+ * Lists InteractionChannelInviteInstance records from the API as a list.
92
+ *
93
+ * If a function is passed as the first argument, it will be used as the callback
94
+ * function.
95
+ *
96
+ * @param callback - Callback to handle list of records
97
+ */
98
+ list(callback?: (error: Error | null, items: InteractionChannelInviteInstance[]) => any): Promise<InteractionChannelInviteInstance[]>;
99
+ /**
100
+ * Lists InteractionChannelInviteInstance records from the API as a list.
101
+ *
102
+ * If a function is passed as the first argument, it will be used as the callback
103
+ * function.
104
+ *
105
+ * @param opts - Options for request
106
+ * @param callback - Callback to handle list of records
107
+ */
108
+ list(opts?: InteractionChannelInviteListInstanceOptions, callback?: (error: Error | null, items: InteractionChannelInviteInstance[]) => any): Promise<InteractionChannelInviteInstance[]>;
109
+ /**
110
+ * Retrieve a single page of InteractionChannelInviteInstance records from the API.
111
+ *
112
+ * The request is executed immediately.
113
+ *
114
+ * If a function is passed as the first argument, it will be used as the callback
115
+ * function.
116
+ *
117
+ * @param callback - Callback to handle list of records
118
+ */
119
+ page(callback?: (error: Error | null, items: InteractionChannelInvitePage) => any): Promise<InteractionChannelInvitePage>;
120
+ /**
121
+ * Retrieve a single page of InteractionChannelInviteInstance records from the API.
122
+ *
123
+ * The request is executed immediately.
124
+ *
125
+ * If a function is passed as the first argument, it will be used as the callback
126
+ * function.
127
+ *
128
+ * @param opts - Options for request
129
+ * @param callback - Callback to handle list of records
130
+ */
131
+ page(opts?: InteractionChannelInviteListInstancePageOptions, callback?: (error: Error | null, items: InteractionChannelInvitePage) => any): Promise<InteractionChannelInvitePage>;
132
+ /**
133
+ * Provide a user-friendly representation
134
+ */
135
+ toJSON(): any;
136
+ }
137
+
138
+ /**
139
+ * Options to pass to create
140
+ *
141
+ * @property routing - The routing
142
+ */
143
+ interface InteractionChannelInviteListInstanceCreateOptions {
144
+ routing: object;
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
+ */
165
+ interface InteractionChannelInviteListInstanceEachOptions {
166
+ callback?: (item: InteractionChannelInviteInstance, done: (err?: Error) => void) => void;
167
+ done?: Function;
168
+ limit?: number;
169
+ pageSize?: number;
170
+ }
171
+
172
+ /**
173
+ * Options to pass to list
174
+ *
175
+ * @property limit -
176
+ * Upper limit for the number of records to return.
177
+ * list() guarantees never to return more than limit.
178
+ * Default is no limit
179
+ * @property pageSize -
180
+ * Number of records to fetch per request,
181
+ * when not set will use the default value of 50 records.
182
+ * If no page_size is defined but a limit is defined,
183
+ * list() will attempt to read the limit with the most
184
+ * efficient page size, i.e. min(limit, 1000)
185
+ */
186
+ interface InteractionChannelInviteListInstanceOptions {
187
+ limit?: number;
188
+ pageSize?: number;
189
+ }
190
+
191
+ /**
192
+ * Options to pass to page
193
+ *
194
+ * @property pageNumber - Page Number, this value is simply for client state
195
+ * @property pageSize - Number of records to return, defaults to 50
196
+ * @property pageToken - PageToken provided by the API
197
+ */
198
+ interface InteractionChannelInviteListInstancePageOptions {
199
+ pageNumber?: number;
200
+ pageSize?: number;
201
+ pageToken?: string;
202
+ }
203
+
204
+ interface InteractionChannelInvitePayload extends InteractionChannelInviteResource, Page.TwilioResponsePayload {
205
+ }
206
+
207
+ interface InteractionChannelInviteResource {
208
+ channel_sid: string;
209
+ interaction_sid: string;
210
+ routing: object;
211
+ sid: string;
212
+ url: string;
213
+ }
214
+
215
+ interface InteractionChannelInviteSolution {
216
+ channelSid?: string;
217
+ interactionSid?: string;
218
+ }
219
+
220
+
221
+ declare class InteractionChannelInviteInstance extends SerializableClass {
222
+ /**
223
+ * Initialize the InteractionChannelInviteContext
224
+ *
225
+ * @param version - Version of the resource
226
+ * @param payload - The instance payload
227
+ * @param interactionSid - The interaction_sid
228
+ * @param channelSid - The channel_sid
229
+ */
230
+ constructor(version: V1, payload: InteractionChannelInvitePayload, interactionSid: string, channelSid: string);
231
+
232
+ channelSid: string;
233
+ interactionSid: string;
234
+ routing: any;
235
+ sid: string;
236
+ /**
237
+ * Provide a user-friendly representation
238
+ */
239
+ toJSON(): any;
240
+ url: string;
241
+ }
242
+
243
+
244
+ declare class InteractionChannelInvitePage extends Page<V1, InteractionChannelInvitePayload, InteractionChannelInviteResource, InteractionChannelInviteInstance> {
245
+ /**
246
+ * Initialize the InteractionChannelInvitePage
247
+ *
248
+ * @param version - Version of the resource
249
+ * @param response - Response from the API
250
+ * @param solution - Path solution
251
+ */
252
+ constructor(version: V1, response: Response<string>, solution: InteractionChannelInviteSolution);
253
+
254
+ /**
255
+ * Build an instance of InteractionChannelInviteInstance
256
+ *
257
+ * @param payload - Payload response from the API
258
+ */
259
+ getInstance(payload: InteractionChannelInvitePayload): InteractionChannelInviteInstance;
260
+ /**
261
+ * Provide a user-friendly representation
262
+ */
263
+ toJSON(): any;
264
+ }
265
+
266
+ export { InteractionChannelInviteAction, InteractionChannelInviteInstance, InteractionChannelInviteList, InteractionChannelInviteListInstance, InteractionChannelInviteListInstanceCreateOptions, InteractionChannelInviteListInstanceEachOptions, InteractionChannelInviteListInstanceOptions, InteractionChannelInviteListInstancePageOptions, InteractionChannelInvitePage, InteractionChannelInvitePayload, InteractionChannelInviteResource, InteractionChannelInviteSolution, InteractionChannelInviteType }