twilio 3.75.1 → 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.
- package/lib/rest/Chat.d.ts +4 -0
- package/lib/rest/Chat.js +19 -0
- package/lib/rest/FlexApi.d.ts +2 -0
- package/lib/rest/FlexApi.js +8 -0
- package/lib/rest/Insights.d.ts +2 -0
- package/lib/rest/Insights.js +8 -0
- package/lib/rest/Supersim.d.ts +0 -2
- package/lib/rest/Supersim.js +0 -8
- package/lib/rest/api/v2010/account/call/payment.d.ts +1 -1
- package/lib/rest/api/v2010/account/call/payment.js +1 -1
- package/lib/rest/api/v2010/account/call/stream.d.ts +2 -8
- package/lib/rest/api/v2010/account/call/stream.js +8 -7
- package/lib/rest/api/v2010/account/usage/record/allTime.d.ts +1 -1
- package/lib/rest/api/v2010/account/usage/record/daily.d.ts +1 -1
- package/lib/rest/api/v2010/account/usage/record/lastMonth.d.ts +1 -1
- package/lib/rest/api/v2010/account/usage/record/monthly.d.ts +1 -1
- package/lib/rest/api/v2010/account/usage/record/thisMonth.d.ts +1 -1
- package/lib/rest/api/v2010/account/usage/record/today.d.ts +1 -1
- package/lib/rest/api/v2010/account/usage/record/yearly.d.ts +1 -1
- package/lib/rest/api/v2010/account/usage/record/yesterday.d.ts +1 -1
- package/lib/rest/api/v2010/account/usage/record.d.ts +1 -1
- package/lib/rest/api/v2010/account/usage/trigger.d.ts +1 -1
- package/lib/rest/chat/V3.d.ts +25 -0
- package/lib/rest/chat/V3.js +46 -0
- package/lib/rest/chat/v3/channel.d.ts +177 -0
- package/lib/rest/chat/v3/channel.js +373 -0
- package/lib/rest/flexApi/V1.d.ts +3 -0
- package/lib/rest/flexApi/V1.js +11 -0
- package/lib/rest/flexApi/v1/configuration.d.ts +2 -0
- package/lib/rest/flexApi/v1/configuration.js +3 -0
- package/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelInvite.d.ts +266 -0
- package/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelInvite.js +505 -0
- package/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelParticipant.d.ts +323 -0
- package/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelParticipant.js +674 -0
- package/lib/rest/flexApi/v1/interaction/interactionChannel.d.ts +327 -0
- package/lib/rest/flexApi/v1/interaction/interactionChannel.js +718 -0
- package/lib/rest/flexApi/v1/interaction.d.ts +152 -0
- package/lib/rest/flexApi/v1/interaction.js +395 -0
- package/lib/rest/insights/V1.d.ts +3 -0
- package/lib/rest/insights/V1.js +11 -0
- package/lib/rest/insights/v1/annotation.d.ts +188 -0
- package/lib/rest/insights/v1/annotation.js +406 -0
- package/lib/rest/media/v1/mediaProcessor.js +1 -1
- package/lib/rest/media/v1/mediaRecording.d.ts +12 -0
- package/lib/rest/media/v1/mediaRecording.js +8 -0
- package/lib/rest/media/v1/playerStreamer.d.ts +4 -0
- package/lib/rest/media/v1/playerStreamer.js +5 -1
- package/lib/rest/supersim/V1.d.ts +0 -3
- package/lib/rest/supersim/V1.js +0 -11
- package/lib/rest/supersim/v1/fleet.d.ts +0 -16
- package/lib/rest/supersim/v1/fleet.js +0 -18
- package/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueCumulativeStatistics.d.ts +1 -1
- package/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueCumulativeStatistics.js +2 -2
- package/lib/rest/taskrouter/v1/workspace/workflow/workflowCumulativeStatistics.d.ts +1 -1
- package/lib/rest/taskrouter/v1/workspace/workflow/workflowCumulativeStatistics.js +2 -2
- package/lib/rest/taskrouter/v1/workspace/workspaceCumulativeStatistics.d.ts +1 -1
- package/lib/rest/taskrouter/v1/workspace/workspaceCumulativeStatistics.js +2 -2
- package/lib/rest/video/v1/composition.d.ts +4 -0
- package/lib/rest/video/v1/composition.js +6 -0
- package/lib/rest/video/v1/recording.d.ts +4 -0
- package/lib/rest/video/v1/recording.js +6 -0
- package/package.json +3 -3
- package/lib/rest/supersim/v1/command.d.ts +0 -342
- package/lib/rest/supersim/v1/command.js +0 -652
|
@@ -0,0 +1,373 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/* jshint ignore:start */
|
|
4
|
+
/**
|
|
5
|
+
* This code was generated by
|
|
6
|
+
* \ / _ _ _| _ _
|
|
7
|
+
* | (_)\/(_)(_|\/| |(/_ v1.0.0
|
|
8
|
+
* / /
|
|
9
|
+
*/
|
|
10
|
+
/* jshint ignore:end */
|
|
11
|
+
|
|
12
|
+
var Q = require('q'); /* jshint ignore:line */
|
|
13
|
+
var _ = require('lodash'); /* jshint ignore:line */
|
|
14
|
+
var util = require('util'); /* jshint ignore:line */
|
|
15
|
+
var Page = require('../../../base/Page'); /* jshint ignore:line */
|
|
16
|
+
var deserialize = require(
|
|
17
|
+
'../../../base/deserialize'); /* jshint ignore:line */
|
|
18
|
+
var values = require('../../../base/values'); /* jshint ignore:line */
|
|
19
|
+
|
|
20
|
+
var ChannelList;
|
|
21
|
+
var ChannelPage;
|
|
22
|
+
var ChannelInstance;
|
|
23
|
+
var ChannelContext;
|
|
24
|
+
|
|
25
|
+
/* jshint ignore:start */
|
|
26
|
+
/**
|
|
27
|
+
* Initialize the ChannelList
|
|
28
|
+
*
|
|
29
|
+
* @constructor Twilio.Chat.V3.ChannelList
|
|
30
|
+
*
|
|
31
|
+
* @param {Twilio.Chat.V3} version - Version of the resource
|
|
32
|
+
*/
|
|
33
|
+
/* jshint ignore:end */
|
|
34
|
+
ChannelList = function ChannelList(version) {
|
|
35
|
+
/* jshint ignore:start */
|
|
36
|
+
/**
|
|
37
|
+
* @function channels
|
|
38
|
+
* @memberof Twilio.Chat.V3#
|
|
39
|
+
*
|
|
40
|
+
* @param {string} sid - sid of instance
|
|
41
|
+
*
|
|
42
|
+
* @returns {Twilio.Chat.V3.ChannelContext}
|
|
43
|
+
*/
|
|
44
|
+
/* jshint ignore:end */
|
|
45
|
+
function ChannelListInstance(sid) {
|
|
46
|
+
return ChannelListInstance.get(sid);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
ChannelListInstance._version = version;
|
|
50
|
+
// Path Solution
|
|
51
|
+
ChannelListInstance._solution = {};
|
|
52
|
+
/* jshint ignore:start */
|
|
53
|
+
/**
|
|
54
|
+
* Constructs a channel
|
|
55
|
+
*
|
|
56
|
+
* @function get
|
|
57
|
+
* @memberof Twilio.Chat.V3.ChannelList#
|
|
58
|
+
*
|
|
59
|
+
* @param {string} serviceSid - Service Sid.
|
|
60
|
+
* @param {string} sid - A string that uniquely identifies this Channel.
|
|
61
|
+
*
|
|
62
|
+
* @returns {Twilio.Chat.V3.ChannelContext}
|
|
63
|
+
*/
|
|
64
|
+
/* jshint ignore:end */
|
|
65
|
+
ChannelListInstance.get = function get(serviceSid, sid) {
|
|
66
|
+
return new ChannelContext(this._version, serviceSid, sid);
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
/* jshint ignore:start */
|
|
70
|
+
/**
|
|
71
|
+
* Provide a user-friendly representation
|
|
72
|
+
*
|
|
73
|
+
* @function toJSON
|
|
74
|
+
* @memberof Twilio.Chat.V3.ChannelList#
|
|
75
|
+
*
|
|
76
|
+
* @returns Object
|
|
77
|
+
*/
|
|
78
|
+
/* jshint ignore:end */
|
|
79
|
+
ChannelListInstance.toJSON = function toJSON() {
|
|
80
|
+
return this._solution;
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
ChannelListInstance[util.inspect.custom] = function inspect(depth, options) {
|
|
84
|
+
return util.inspect(this.toJSON(), options);
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
return ChannelListInstance;
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
/* jshint ignore:start */
|
|
92
|
+
/**
|
|
93
|
+
* Initialize the ChannelPage
|
|
94
|
+
*
|
|
95
|
+
* @constructor Twilio.Chat.V3.ChannelPage
|
|
96
|
+
*
|
|
97
|
+
* @param {V3} version - Version of the resource
|
|
98
|
+
* @param {Response<string>} response - Response from the API
|
|
99
|
+
* @param {ChannelSolution} solution - Path solution
|
|
100
|
+
*
|
|
101
|
+
* @returns ChannelPage
|
|
102
|
+
*/
|
|
103
|
+
/* jshint ignore:end */
|
|
104
|
+
ChannelPage = function ChannelPage(version, response, solution) {
|
|
105
|
+
// Path Solution
|
|
106
|
+
this._solution = solution;
|
|
107
|
+
|
|
108
|
+
Page.prototype.constructor.call(this, version, response, this._solution);
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
_.extend(ChannelPage.prototype, Page.prototype);
|
|
112
|
+
ChannelPage.prototype.constructor = ChannelPage;
|
|
113
|
+
|
|
114
|
+
/* jshint ignore:start */
|
|
115
|
+
/**
|
|
116
|
+
* Build an instance of ChannelInstance
|
|
117
|
+
*
|
|
118
|
+
* @function getInstance
|
|
119
|
+
* @memberof Twilio.Chat.V3.ChannelPage#
|
|
120
|
+
*
|
|
121
|
+
* @param {ChannelPayload} payload - Payload response from the API
|
|
122
|
+
*
|
|
123
|
+
* @returns ChannelInstance
|
|
124
|
+
*/
|
|
125
|
+
/* jshint ignore:end */
|
|
126
|
+
ChannelPage.prototype.getInstance = function getInstance(payload) {
|
|
127
|
+
return new ChannelInstance(this._version, payload);
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
/* jshint ignore:start */
|
|
131
|
+
/**
|
|
132
|
+
* Provide a user-friendly representation
|
|
133
|
+
*
|
|
134
|
+
* @function toJSON
|
|
135
|
+
* @memberof Twilio.Chat.V3.ChannelPage#
|
|
136
|
+
*
|
|
137
|
+
* @returns Object
|
|
138
|
+
*/
|
|
139
|
+
/* jshint ignore:end */
|
|
140
|
+
ChannelPage.prototype.toJSON = function toJSON() {
|
|
141
|
+
let clone = {};
|
|
142
|
+
_.forOwn(this, function(value, key) {
|
|
143
|
+
if (!_.startsWith(key, '_') && ! _.isFunction(value)) {
|
|
144
|
+
clone[key] = value;
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
return clone;
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
ChannelPage.prototype[util.inspect.custom] = function inspect(depth, options) {
|
|
151
|
+
return util.inspect(this.toJSON(), options);
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
/* jshint ignore:start */
|
|
156
|
+
/**
|
|
157
|
+
* Initialize the ChannelContext
|
|
158
|
+
*
|
|
159
|
+
* @constructor Twilio.Chat.V3.ChannelInstance
|
|
160
|
+
*
|
|
161
|
+
* @property {string} sid - The unique string that identifies the resource
|
|
162
|
+
* @property {string} accountSid - The SID of the Account that created the resource
|
|
163
|
+
* @property {string} serviceSid -
|
|
164
|
+
* The SID of the Service that the resource is associated with
|
|
165
|
+
* @property {string} friendlyName -
|
|
166
|
+
* The string that you assigned to describe the resource
|
|
167
|
+
* @property {string} uniqueName -
|
|
168
|
+
* An application-defined string that uniquely identifies the resource
|
|
169
|
+
* @property {string} attributes -
|
|
170
|
+
* The JSON string that stores application-specific data
|
|
171
|
+
* @property {channel.channel_type} type -
|
|
172
|
+
* The visibility of the channel. Can be: `public` or `private`
|
|
173
|
+
* @property {Date} dateCreated -
|
|
174
|
+
* The ISO 8601 date and time in GMT when the resource was created
|
|
175
|
+
* @property {Date} dateUpdated -
|
|
176
|
+
* The ISO 8601 date and time in GMT when the resource was last updated
|
|
177
|
+
* @property {string} createdBy - The identity of the User that created the channel
|
|
178
|
+
* @property {number} membersCount - The number of Members in the Channel
|
|
179
|
+
* @property {number} messagesCount -
|
|
180
|
+
* The number of Messages that have been passed in the Channel
|
|
181
|
+
* @property {string} messagingServiceSid -
|
|
182
|
+
* The unique ID of the Messaging Service this channel belongs to.
|
|
183
|
+
* @property {string} url - The absolute URL of the Channel resource
|
|
184
|
+
*
|
|
185
|
+
* @param {V3} version - Version of the resource
|
|
186
|
+
* @param {ChannelPayload} payload - The instance payload
|
|
187
|
+
* @param {sid} serviceSid - Service Sid.
|
|
188
|
+
* @param {sid_like} sid - A string that uniquely identifies this Channel.
|
|
189
|
+
*/
|
|
190
|
+
/* jshint ignore:end */
|
|
191
|
+
ChannelInstance = function ChannelInstance(version, payload, serviceSid, sid) {
|
|
192
|
+
this._version = version;
|
|
193
|
+
|
|
194
|
+
// Marshaled Properties
|
|
195
|
+
this.sid = payload.sid; // jshint ignore:line
|
|
196
|
+
this.accountSid = payload.account_sid; // jshint ignore:line
|
|
197
|
+
this.serviceSid = payload.service_sid; // jshint ignore:line
|
|
198
|
+
this.friendlyName = payload.friendly_name; // jshint ignore:line
|
|
199
|
+
this.uniqueName = payload.unique_name; // jshint ignore:line
|
|
200
|
+
this.attributes = payload.attributes; // jshint ignore:line
|
|
201
|
+
this.type = payload.type; // jshint ignore:line
|
|
202
|
+
this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line
|
|
203
|
+
this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line
|
|
204
|
+
this.createdBy = payload.created_by; // jshint ignore:line
|
|
205
|
+
this.membersCount = deserialize.integer(payload.members_count); // jshint ignore:line
|
|
206
|
+
this.messagesCount = deserialize.integer(payload.messages_count); // jshint ignore:line
|
|
207
|
+
this.messagingServiceSid = payload.messaging_service_sid; // jshint ignore:line
|
|
208
|
+
this.url = payload.url; // jshint ignore:line
|
|
209
|
+
|
|
210
|
+
// Context
|
|
211
|
+
this._context = undefined;
|
|
212
|
+
this._solution = {serviceSid: serviceSid || this.serviceSid, sid: sid || this.sid, };
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
Object.defineProperty(ChannelInstance.prototype,
|
|
216
|
+
'_proxy', {
|
|
217
|
+
get: function() {
|
|
218
|
+
if (!this._context) {
|
|
219
|
+
this._context = new ChannelContext(this._version, this._solution.serviceSid, this._solution.sid);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
return this._context;
|
|
223
|
+
}
|
|
224
|
+
});
|
|
225
|
+
|
|
226
|
+
/* jshint ignore:start */
|
|
227
|
+
/**
|
|
228
|
+
* update a ChannelInstance
|
|
229
|
+
*
|
|
230
|
+
* @function update
|
|
231
|
+
* @memberof Twilio.Chat.V3.ChannelInstance#
|
|
232
|
+
*
|
|
233
|
+
* @param {object} [opts] - Options for request
|
|
234
|
+
* @param {channel.channel_type} [opts.type] -
|
|
235
|
+
* The Type for this Channel to migrate to.
|
|
236
|
+
* @param {string} [opts.messagingServiceSid] -
|
|
237
|
+
* The unique ID of the Messaging Service this channel belongs to.
|
|
238
|
+
* @param {channel.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -
|
|
239
|
+
* The X-Twilio-Webhook-Enabled HTTP request header
|
|
240
|
+
* @param {function} [callback] - Callback to handle processed record
|
|
241
|
+
*
|
|
242
|
+
* @returns {Promise} Resolves to processed ChannelInstance
|
|
243
|
+
*/
|
|
244
|
+
/* jshint ignore:end */
|
|
245
|
+
ChannelInstance.prototype.update = function update(opts, callback) {
|
|
246
|
+
return this._proxy.update(opts, callback);
|
|
247
|
+
};
|
|
248
|
+
|
|
249
|
+
/* jshint ignore:start */
|
|
250
|
+
/**
|
|
251
|
+
* Provide a user-friendly representation
|
|
252
|
+
*
|
|
253
|
+
* @function toJSON
|
|
254
|
+
* @memberof Twilio.Chat.V3.ChannelInstance#
|
|
255
|
+
*
|
|
256
|
+
* @returns Object
|
|
257
|
+
*/
|
|
258
|
+
/* jshint ignore:end */
|
|
259
|
+
ChannelInstance.prototype.toJSON = function toJSON() {
|
|
260
|
+
let clone = {};
|
|
261
|
+
_.forOwn(this, function(value, key) {
|
|
262
|
+
if (!_.startsWith(key, '_') && ! _.isFunction(value)) {
|
|
263
|
+
clone[key] = value;
|
|
264
|
+
}
|
|
265
|
+
});
|
|
266
|
+
return clone;
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
ChannelInstance.prototype[util.inspect.custom] = function inspect(depth,
|
|
270
|
+
options) {
|
|
271
|
+
return util.inspect(this.toJSON(), options);
|
|
272
|
+
};
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
/* jshint ignore:start */
|
|
276
|
+
/**
|
|
277
|
+
* Initialize the ChannelContext
|
|
278
|
+
*
|
|
279
|
+
* @constructor Twilio.Chat.V3.ChannelContext
|
|
280
|
+
*
|
|
281
|
+
* @param {V3} version - Version of the resource
|
|
282
|
+
* @param {sid} serviceSid - Service Sid.
|
|
283
|
+
* @param {sid_like} sid - A string that uniquely identifies this Channel.
|
|
284
|
+
*/
|
|
285
|
+
/* jshint ignore:end */
|
|
286
|
+
ChannelContext = function ChannelContext(version, serviceSid, sid) {
|
|
287
|
+
this._version = version;
|
|
288
|
+
|
|
289
|
+
// Path Solution
|
|
290
|
+
this._solution = {serviceSid: serviceSid, sid: sid, };
|
|
291
|
+
this._uri = `/Services/${serviceSid}/Channels/${sid}`;
|
|
292
|
+
};
|
|
293
|
+
|
|
294
|
+
/* jshint ignore:start */
|
|
295
|
+
/**
|
|
296
|
+
* update a ChannelInstance
|
|
297
|
+
*
|
|
298
|
+
* @function update
|
|
299
|
+
* @memberof Twilio.Chat.V3.ChannelContext#
|
|
300
|
+
*
|
|
301
|
+
* @param {object} [opts] - Options for request
|
|
302
|
+
* @param {channel.channel_type} [opts.type] -
|
|
303
|
+
* The Type for this Channel to migrate to.
|
|
304
|
+
* @param {string} [opts.messagingServiceSid] -
|
|
305
|
+
* The unique ID of the Messaging Service this channel belongs to.
|
|
306
|
+
* @param {channel.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -
|
|
307
|
+
* The X-Twilio-Webhook-Enabled HTTP request header
|
|
308
|
+
* @param {function} [callback] - Callback to handle processed record
|
|
309
|
+
*
|
|
310
|
+
* @returns {Promise} Resolves to processed ChannelInstance
|
|
311
|
+
*/
|
|
312
|
+
/* jshint ignore:end */
|
|
313
|
+
ChannelContext.prototype.update = function update(opts, callback) {
|
|
314
|
+
if (_.isFunction(opts)) {
|
|
315
|
+
callback = opts;
|
|
316
|
+
opts = {};
|
|
317
|
+
}
|
|
318
|
+
opts = opts || {};
|
|
319
|
+
|
|
320
|
+
var deferred = Q.defer();
|
|
321
|
+
var data = values.of({
|
|
322
|
+
'Type': _.get(opts, 'type'),
|
|
323
|
+
'MessagingServiceSid': _.get(opts, 'messagingServiceSid')
|
|
324
|
+
});
|
|
325
|
+
var headers = values.of({'X-Twilio-Webhook-Enabled': _.get(opts, 'xTwilioWebhookEnabled')});
|
|
326
|
+
|
|
327
|
+
var promise = this._version.update({uri: this._uri, method: 'POST', data: data, headers: headers});
|
|
328
|
+
|
|
329
|
+
promise = promise.then(function(payload) {
|
|
330
|
+
deferred.resolve(new ChannelInstance(
|
|
331
|
+
this._version,
|
|
332
|
+
payload,
|
|
333
|
+
this._solution.serviceSid,
|
|
334
|
+
this._solution.sid
|
|
335
|
+
));
|
|
336
|
+
}.bind(this));
|
|
337
|
+
|
|
338
|
+
promise.catch(function(error) {
|
|
339
|
+
deferred.reject(error);
|
|
340
|
+
});
|
|
341
|
+
|
|
342
|
+
if (_.isFunction(callback)) {
|
|
343
|
+
deferred.promise.nodeify(callback);
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
return deferred.promise;
|
|
347
|
+
};
|
|
348
|
+
|
|
349
|
+
/* jshint ignore:start */
|
|
350
|
+
/**
|
|
351
|
+
* Provide a user-friendly representation
|
|
352
|
+
*
|
|
353
|
+
* @function toJSON
|
|
354
|
+
* @memberof Twilio.Chat.V3.ChannelContext#
|
|
355
|
+
*
|
|
356
|
+
* @returns Object
|
|
357
|
+
*/
|
|
358
|
+
/* jshint ignore:end */
|
|
359
|
+
ChannelContext.prototype.toJSON = function toJSON() {
|
|
360
|
+
return this._solution;
|
|
361
|
+
};
|
|
362
|
+
|
|
363
|
+
ChannelContext.prototype[util.inspect.custom] = function inspect(depth, options)
|
|
364
|
+
{
|
|
365
|
+
return util.inspect(this.toJSON(), options);
|
|
366
|
+
};
|
|
367
|
+
|
|
368
|
+
module.exports = {
|
|
369
|
+
ChannelList: ChannelList,
|
|
370
|
+
ChannelPage: ChannelPage,
|
|
371
|
+
ChannelInstance: ChannelInstance,
|
|
372
|
+
ChannelContext: ChannelContext
|
|
373
|
+
};
|
package/lib/rest/flexApi/V1.d.ts
CHANGED
|
@@ -13,6 +13,8 @@ import { ConfigurationList } from './v1/configuration';
|
|
|
13
13
|
import { ConfigurationListInstance } from './v1/configuration';
|
|
14
14
|
import { FlexFlowList } from './v1/flexFlow';
|
|
15
15
|
import { FlexFlowListInstance } from './v1/flexFlow';
|
|
16
|
+
import { InteractionList } from './v1/interaction';
|
|
17
|
+
import { InteractionListInstance } from './v1/interaction';
|
|
16
18
|
import { WebChannelList } from './v1/webChannel';
|
|
17
19
|
import { WebChannelListInstance } from './v1/webChannel';
|
|
18
20
|
|
|
@@ -28,6 +30,7 @@ declare class V1 extends Version {
|
|
|
28
30
|
readonly channel: ChannelListInstance;
|
|
29
31
|
readonly configuration: ConfigurationListInstance;
|
|
30
32
|
readonly flexFlow: FlexFlowListInstance;
|
|
33
|
+
readonly interaction: InteractionListInstance;
|
|
31
34
|
readonly webChannel: WebChannelListInstance;
|
|
32
35
|
}
|
|
33
36
|
|
package/lib/rest/flexApi/V1.js
CHANGED
|
@@ -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;
|