twilio 3.77.3 → 3.78.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/README.md +1 -1
- package/lib/rest/Insights.d.ts +0 -2
- package/lib/rest/Insights.js +0 -8
- 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/insights/V1.d.ts +0 -3
- package/lib/rest/insights/V1.js +0 -11
- package/lib/rest/insights/v1/{annotation.d.ts → call/annotation.d.ts} +29 -17
- package/lib/rest/insights/v1/{annotation.js → call/annotation.js} +72 -55
- package/lib/rest/insights/v1/call/summary.d.ts +2 -0
- package/lib/rest/insights/v1/call/summary.js +2 -0
- package/lib/rest/insights/v1/call.d.ts +7 -16
- package/lib/rest/insights/v1/call.js +28 -16
- package/lib/rest/media/v1/mediaRecording.d.ts +0 -2
- package/lib/rest/media/v1/mediaRecording.js +0 -2
- package/lib/rest/verify/v2/verificationAttemptsSummary.d.ts +2 -2
- package/lib/rest/verify/v2/verificationAttemptsSummary.js +3 -3
- package/lib/twiml/VoiceResponse.d.ts +2 -0
- package/lib/twiml/VoiceResponse.js +1 -0
- package/package.json +1 -1
package/lib/rest/insights/V1.js
CHANGED
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
/* jshint ignore:end */
|
|
11
11
|
|
|
12
12
|
var _ = require('lodash'); /* jshint ignore:line */
|
|
13
|
-
var AnnotationList = require('./v1/annotation').AnnotationList;
|
|
14
13
|
var CallList = require('./v1/call').CallList;
|
|
15
14
|
var CallSummariesList = require('./v1/callSummaries').CallSummariesList;
|
|
16
15
|
var ConferenceList = require('./v1/conference').ConferenceList;
|
|
@@ -26,7 +25,6 @@ var Version = require('../../base/Version'); /* jshint ignore:line */
|
|
|
26
25
|
* @constructor Twilio.Insights.V1
|
|
27
26
|
*
|
|
28
27
|
* @property {Twilio.Insights.V1.SettingList} settings - settings resource
|
|
29
|
-
* @property {Twilio.Insights.V1.AnnotationList} annotation - annotation resource
|
|
30
28
|
* @property {Twilio.Insights.V1.CallList} calls - calls resource
|
|
31
29
|
* @property {Twilio.Insights.V1.CallSummariesList} callSummaries -
|
|
32
30
|
* callSummaries resource
|
|
@@ -41,7 +39,6 @@ function V1(domain) {
|
|
|
41
39
|
|
|
42
40
|
// Resources
|
|
43
41
|
this._settings = undefined;
|
|
44
|
-
this._annotation = undefined;
|
|
45
42
|
this._calls = undefined;
|
|
46
43
|
this._callSummaries = undefined;
|
|
47
44
|
this._conferences = undefined;
|
|
@@ -59,14 +56,6 @@ Object.defineProperty(V1.prototype,
|
|
|
59
56
|
}
|
|
60
57
|
});
|
|
61
58
|
|
|
62
|
-
Object.defineProperty(V1.prototype,
|
|
63
|
-
'annotation', {
|
|
64
|
-
get: function() {
|
|
65
|
-
this._annotation = this._annotation || new AnnotationList(this);
|
|
66
|
-
return this._annotation;
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
|
|
70
59
|
Object.defineProperty(V1.prototype,
|
|
71
60
|
'calls', {
|
|
72
61
|
get: function() {
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
* / /
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import Page = require('
|
|
9
|
-
import Response = require('
|
|
10
|
-
import V1 = require('
|
|
11
|
-
import { SerializableClass } from '
|
|
8
|
+
import Page = require('../../../../base/Page');
|
|
9
|
+
import Response = require('../../../../http/response');
|
|
10
|
+
import V1 = require('../../V1');
|
|
11
|
+
import { SerializableClass } from '../../../../interfaces';
|
|
12
12
|
|
|
13
13
|
type AnnotationAnsweredBy = 'unknown_answered_by'|'human'|'machine';
|
|
14
14
|
|
|
@@ -19,20 +19,24 @@ type AnnotationQualityIssues = 'unknown_quality_issue'|'no_quality_issue'|'low_v
|
|
|
19
19
|
/**
|
|
20
20
|
* Initialize the AnnotationList
|
|
21
21
|
*
|
|
22
|
+
* PLEASE NOTE that this class contains beta products that are subject to change.
|
|
23
|
+
* Use them with caution.
|
|
24
|
+
*
|
|
22
25
|
* @param version - Version of the resource
|
|
26
|
+
* @param callSid - Call SID.
|
|
23
27
|
*/
|
|
24
|
-
declare function AnnotationList(version: V1): AnnotationListInstance;
|
|
28
|
+
declare function AnnotationList(version: V1, callSid: string): AnnotationListInstance;
|
|
25
29
|
|
|
26
30
|
/**
|
|
27
31
|
* Options to pass to update
|
|
28
32
|
*
|
|
29
|
-
* @property answeredBy -
|
|
30
|
-
* @property callScore -
|
|
31
|
-
* @property comment -
|
|
32
|
-
* @property connectivityIssue -
|
|
33
|
-
* @property incident -
|
|
34
|
-
* @property qualityIssues -
|
|
35
|
-
* @property spam -
|
|
33
|
+
* @property answeredBy - Indicates the answering entity as determined by Answering Machine Detection.
|
|
34
|
+
* @property callScore - Call Score
|
|
35
|
+
* @property comment - User comments
|
|
36
|
+
* @property connectivityIssue - Indicates if the call had any connectivity issue
|
|
37
|
+
* @property incident - Call tag for incidents or support ticket
|
|
38
|
+
* @property qualityIssues - Indicates if the call had audio quality issues.
|
|
39
|
+
* @property spam - Call spam indicator
|
|
36
40
|
*/
|
|
37
41
|
interface AnnotationInstanceUpdateOptions {
|
|
38
42
|
answeredBy?: AnnotationAnsweredBy;
|
|
@@ -51,10 +55,8 @@ interface AnnotationListInstance {
|
|
|
51
55
|
(sid: string): AnnotationContext;
|
|
52
56
|
/**
|
|
53
57
|
* Constructs a annotation
|
|
54
|
-
*
|
|
55
|
-
* @param callSid - The call_sid
|
|
56
58
|
*/
|
|
57
|
-
get(
|
|
59
|
+
get(): AnnotationContext;
|
|
58
60
|
/**
|
|
59
61
|
* Provide a user-friendly representation
|
|
60
62
|
*/
|
|
@@ -78,6 +80,7 @@ interface AnnotationResource {
|
|
|
78
80
|
}
|
|
79
81
|
|
|
80
82
|
interface AnnotationSolution {
|
|
83
|
+
callSid?: string;
|
|
81
84
|
}
|
|
82
85
|
|
|
83
86
|
|
|
@@ -85,8 +88,11 @@ declare class AnnotationContext {
|
|
|
85
88
|
/**
|
|
86
89
|
* Initialize the AnnotationContext
|
|
87
90
|
*
|
|
91
|
+
* PLEASE NOTE that this class contains beta products that are subject to change.
|
|
92
|
+
* Use them with caution.
|
|
93
|
+
*
|
|
88
94
|
* @param version - Version of the resource
|
|
89
|
-
* @param callSid -
|
|
95
|
+
* @param callSid - Call SID.
|
|
90
96
|
*/
|
|
91
97
|
constructor(version: V1, callSid: string);
|
|
92
98
|
|
|
@@ -120,9 +126,12 @@ declare class AnnotationInstance extends SerializableClass {
|
|
|
120
126
|
/**
|
|
121
127
|
* Initialize the AnnotationContext
|
|
122
128
|
*
|
|
129
|
+
* PLEASE NOTE that this class contains beta products that are subject to change.
|
|
130
|
+
* Use them with caution.
|
|
131
|
+
*
|
|
123
132
|
* @param version - Version of the resource
|
|
124
133
|
* @param payload - The instance payload
|
|
125
|
-
* @param callSid -
|
|
134
|
+
* @param callSid - Call SID.
|
|
126
135
|
*/
|
|
127
136
|
constructor(version: V1, payload: AnnotationPayload, callSid: string);
|
|
128
137
|
|
|
@@ -167,6 +176,9 @@ declare class AnnotationPage extends Page<V1, AnnotationPayload, AnnotationResou
|
|
|
167
176
|
/**
|
|
168
177
|
* Initialize the AnnotationPage
|
|
169
178
|
*
|
|
179
|
+
* PLEASE NOTE that this class contains beta products that are subject to change.
|
|
180
|
+
* Use them with caution.
|
|
181
|
+
*
|
|
170
182
|
* @param version - Version of the resource
|
|
171
183
|
* @param response - Response from the API
|
|
172
184
|
* @param solution - Path solution
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
var Q = require('q'); /* jshint ignore:line */
|
|
13
13
|
var _ = require('lodash'); /* jshint ignore:line */
|
|
14
14
|
var util = require('util'); /* jshint ignore:line */
|
|
15
|
-
var Page = require('
|
|
15
|
+
var Page = require('../../../../base/Page'); /* jshint ignore:line */
|
|
16
16
|
var deserialize = require(
|
|
17
|
-
'
|
|
18
|
-
var serialize = require('
|
|
19
|
-
var values = require('
|
|
17
|
+
'../../../../base/deserialize'); /* jshint ignore:line */
|
|
18
|
+
var serialize = require('../../../../base/serialize'); /* jshint ignore:line */
|
|
19
|
+
var values = require('../../../../base/values'); /* jshint ignore:line */
|
|
20
20
|
|
|
21
21
|
var AnnotationList;
|
|
22
22
|
var AnnotationPage;
|
|
@@ -27,20 +27,24 @@ var AnnotationContext;
|
|
|
27
27
|
/**
|
|
28
28
|
* Initialize the AnnotationList
|
|
29
29
|
*
|
|
30
|
-
*
|
|
30
|
+
* PLEASE NOTE that this class contains beta products that are subject to change.
|
|
31
|
+
* Use them with caution.
|
|
32
|
+
*
|
|
33
|
+
* @constructor Twilio.Insights.V1.CallContext.AnnotationList
|
|
31
34
|
*
|
|
32
35
|
* @param {Twilio.Insights.V1} version - Version of the resource
|
|
36
|
+
* @param {string} callSid - Call SID.
|
|
33
37
|
*/
|
|
34
38
|
/* jshint ignore:end */
|
|
35
|
-
AnnotationList = function AnnotationList(version) {
|
|
39
|
+
AnnotationList = function AnnotationList(version, callSid) {
|
|
36
40
|
/* jshint ignore:start */
|
|
37
41
|
/**
|
|
38
42
|
* @function annotation
|
|
39
|
-
* @memberof Twilio.Insights.V1#
|
|
43
|
+
* @memberof Twilio.Insights.V1.CallContext#
|
|
40
44
|
*
|
|
41
45
|
* @param {string} sid - sid of instance
|
|
42
46
|
*
|
|
43
|
-
* @returns {Twilio.Insights.V1.AnnotationContext}
|
|
47
|
+
* @returns {Twilio.Insights.V1.CallContext.AnnotationContext}
|
|
44
48
|
*/
|
|
45
49
|
/* jshint ignore:end */
|
|
46
50
|
function AnnotationListInstance(sid) {
|
|
@@ -49,21 +53,19 @@ AnnotationList = function AnnotationList(version) {
|
|
|
49
53
|
|
|
50
54
|
AnnotationListInstance._version = version;
|
|
51
55
|
// Path Solution
|
|
52
|
-
AnnotationListInstance._solution = {};
|
|
56
|
+
AnnotationListInstance._solution = {callSid: callSid};
|
|
53
57
|
/* jshint ignore:start */
|
|
54
58
|
/**
|
|
55
59
|
* Constructs a annotation
|
|
56
60
|
*
|
|
57
61
|
* @function get
|
|
58
|
-
* @memberof Twilio.Insights.V1.AnnotationList#
|
|
59
|
-
*
|
|
60
|
-
* @param {string} callSid - The call_sid
|
|
62
|
+
* @memberof Twilio.Insights.V1.CallContext.AnnotationList#
|
|
61
63
|
*
|
|
62
|
-
* @returns {Twilio.Insights.V1.AnnotationContext}
|
|
64
|
+
* @returns {Twilio.Insights.V1.CallContext.AnnotationContext}
|
|
63
65
|
*/
|
|
64
66
|
/* jshint ignore:end */
|
|
65
|
-
AnnotationListInstance.get = function get(
|
|
66
|
-
return new AnnotationContext(this._version, callSid);
|
|
67
|
+
AnnotationListInstance.get = function get() {
|
|
68
|
+
return new AnnotationContext(this._version, this._solution.callSid);
|
|
67
69
|
};
|
|
68
70
|
|
|
69
71
|
/* jshint ignore:start */
|
|
@@ -71,7 +73,7 @@ AnnotationList = function AnnotationList(version) {
|
|
|
71
73
|
* Provide a user-friendly representation
|
|
72
74
|
*
|
|
73
75
|
* @function toJSON
|
|
74
|
-
* @memberof Twilio.Insights.V1.AnnotationList#
|
|
76
|
+
* @memberof Twilio.Insights.V1.CallContext.AnnotationList#
|
|
75
77
|
*
|
|
76
78
|
* @returns Object
|
|
77
79
|
*/
|
|
@@ -92,7 +94,10 @@ AnnotationList = function AnnotationList(version) {
|
|
|
92
94
|
/**
|
|
93
95
|
* Initialize the AnnotationPage
|
|
94
96
|
*
|
|
95
|
-
*
|
|
97
|
+
* PLEASE NOTE that this class contains beta products that are subject to change.
|
|
98
|
+
* Use them with caution.
|
|
99
|
+
*
|
|
100
|
+
* @constructor Twilio.Insights.V1.CallContext.AnnotationPage
|
|
96
101
|
*
|
|
97
102
|
* @param {V1} version - Version of the resource
|
|
98
103
|
* @param {Response<string>} response - Response from the API
|
|
@@ -116,7 +121,7 @@ AnnotationPage.prototype.constructor = AnnotationPage;
|
|
|
116
121
|
* Build an instance of AnnotationInstance
|
|
117
122
|
*
|
|
118
123
|
* @function getInstance
|
|
119
|
-
* @memberof Twilio.Insights.V1.AnnotationPage#
|
|
124
|
+
* @memberof Twilio.Insights.V1.CallContext.AnnotationPage#
|
|
120
125
|
*
|
|
121
126
|
* @param {AnnotationPayload} payload - Payload response from the API
|
|
122
127
|
*
|
|
@@ -124,7 +129,7 @@ AnnotationPage.prototype.constructor = AnnotationPage;
|
|
|
124
129
|
*/
|
|
125
130
|
/* jshint ignore:end */
|
|
126
131
|
AnnotationPage.prototype.getInstance = function getInstance(payload) {
|
|
127
|
-
return new AnnotationInstance(this._version, payload);
|
|
132
|
+
return new AnnotationInstance(this._version, payload, this._solution.callSid);
|
|
128
133
|
};
|
|
129
134
|
|
|
130
135
|
/* jshint ignore:start */
|
|
@@ -132,7 +137,7 @@ AnnotationPage.prototype.getInstance = function getInstance(payload) {
|
|
|
132
137
|
* Provide a user-friendly representation
|
|
133
138
|
*
|
|
134
139
|
* @function toJSON
|
|
135
|
-
* @memberof Twilio.Insights.V1.AnnotationPage#
|
|
140
|
+
* @memberof Twilio.Insights.V1.CallContext.AnnotationPage#
|
|
136
141
|
*
|
|
137
142
|
* @returns Object
|
|
138
143
|
*/
|
|
@@ -157,23 +162,28 @@ AnnotationPage.prototype[util.inspect.custom] = function inspect(depth, options)
|
|
|
157
162
|
/**
|
|
158
163
|
* Initialize the AnnotationContext
|
|
159
164
|
*
|
|
160
|
-
*
|
|
165
|
+
* PLEASE NOTE that this class contains beta products that are subject to change.
|
|
166
|
+
* Use them with caution.
|
|
161
167
|
*
|
|
162
|
-
* @
|
|
163
|
-
*
|
|
164
|
-
* @property {
|
|
168
|
+
* @constructor Twilio.Insights.V1.CallContext.AnnotationInstance
|
|
169
|
+
*
|
|
170
|
+
* @property {string} callSid - Call SID.
|
|
171
|
+
* @property {string} accountSid - Account SID.
|
|
172
|
+
* @property {annotation.answered_by} answeredBy -
|
|
173
|
+
* Indicates the answering entity as determined by Answering Machine Detection.
|
|
165
174
|
* @property {annotation.connectivity_issue} connectivityIssue -
|
|
166
|
-
*
|
|
167
|
-
* @property {string} qualityIssues -
|
|
168
|
-
*
|
|
169
|
-
* @property {
|
|
170
|
-
* @property {
|
|
171
|
-
* @property {string}
|
|
172
|
-
* @property {string}
|
|
175
|
+
* Indicates if the call had any connectivity issue
|
|
176
|
+
* @property {string} qualityIssues -
|
|
177
|
+
* Indicates if the call had audio quality issues.
|
|
178
|
+
* @property {boolean} spam - Call spam indicator
|
|
179
|
+
* @property {number} callScore - Call Score
|
|
180
|
+
* @property {string} comment - User comments
|
|
181
|
+
* @property {string} incident - Call tag for incidents or support ticket
|
|
182
|
+
* @property {string} url - The URL of this resource.
|
|
173
183
|
*
|
|
174
184
|
* @param {V1} version - Version of the resource
|
|
175
185
|
* @param {AnnotationPayload} payload - The instance payload
|
|
176
|
-
* @param {sid} callSid -
|
|
186
|
+
* @param {sid} callSid - Call SID.
|
|
177
187
|
*/
|
|
178
188
|
/* jshint ignore:end */
|
|
179
189
|
AnnotationInstance = function AnnotationInstance(version, payload, callSid) {
|
|
@@ -193,7 +203,7 @@ AnnotationInstance = function AnnotationInstance(version, payload, callSid) {
|
|
|
193
203
|
|
|
194
204
|
// Context
|
|
195
205
|
this._context = undefined;
|
|
196
|
-
this._solution = {callSid: callSid
|
|
206
|
+
this._solution = {callSid: callSid, };
|
|
197
207
|
};
|
|
198
208
|
|
|
199
209
|
Object.defineProperty(AnnotationInstance.prototype,
|
|
@@ -212,17 +222,19 @@ Object.defineProperty(AnnotationInstance.prototype,
|
|
|
212
222
|
* update a AnnotationInstance
|
|
213
223
|
*
|
|
214
224
|
* @function update
|
|
215
|
-
* @memberof Twilio.Insights.V1.AnnotationInstance#
|
|
225
|
+
* @memberof Twilio.Insights.V1.CallContext.AnnotationInstance#
|
|
216
226
|
*
|
|
217
227
|
* @param {object} [opts] - Options for request
|
|
218
|
-
* @param {annotation.answered_by} [opts.answeredBy] -
|
|
228
|
+
* @param {annotation.answered_by} [opts.answeredBy] -
|
|
229
|
+
* Indicates the answering entity as determined by Answering Machine Detection.
|
|
219
230
|
* @param {annotation.connectivity_issue} [opts.connectivityIssue] -
|
|
220
|
-
*
|
|
221
|
-
* @param {string} [opts.qualityIssues] -
|
|
222
|
-
*
|
|
223
|
-
* @param {
|
|
224
|
-
* @param {
|
|
225
|
-
* @param {string} [opts.
|
|
231
|
+
* Indicates if the call had any connectivity issue
|
|
232
|
+
* @param {string} [opts.qualityIssues] -
|
|
233
|
+
* Indicates if the call had audio quality issues.
|
|
234
|
+
* @param {boolean} [opts.spam] - Call spam indicator
|
|
235
|
+
* @param {number} [opts.callScore] - Call Score
|
|
236
|
+
* @param {string} [opts.comment] - User comments
|
|
237
|
+
* @param {string} [opts.incident] - Call tag for incidents or support ticket
|
|
226
238
|
* @param {function} [callback] - Callback to handle processed record
|
|
227
239
|
*
|
|
228
240
|
* @returns {Promise} Resolves to processed AnnotationInstance
|
|
@@ -237,7 +249,7 @@ AnnotationInstance.prototype.update = function update(opts, callback) {
|
|
|
237
249
|
* fetch a AnnotationInstance
|
|
238
250
|
*
|
|
239
251
|
* @function fetch
|
|
240
|
-
* @memberof Twilio.Insights.V1.AnnotationInstance#
|
|
252
|
+
* @memberof Twilio.Insights.V1.CallContext.AnnotationInstance#
|
|
241
253
|
*
|
|
242
254
|
* @param {function} [callback] - Callback to handle processed record
|
|
243
255
|
*
|
|
@@ -253,7 +265,7 @@ AnnotationInstance.prototype.fetch = function fetch(callback) {
|
|
|
253
265
|
* Provide a user-friendly representation
|
|
254
266
|
*
|
|
255
267
|
* @function toJSON
|
|
256
|
-
* @memberof Twilio.Insights.V1.AnnotationInstance#
|
|
268
|
+
* @memberof Twilio.Insights.V1.CallContext.AnnotationInstance#
|
|
257
269
|
*
|
|
258
270
|
* @returns Object
|
|
259
271
|
*/
|
|
@@ -278,10 +290,13 @@ AnnotationInstance.prototype[util.inspect.custom] = function inspect(depth,
|
|
|
278
290
|
/**
|
|
279
291
|
* Initialize the AnnotationContext
|
|
280
292
|
*
|
|
281
|
-
*
|
|
293
|
+
* PLEASE NOTE that this class contains beta products that are subject to change.
|
|
294
|
+
* Use them with caution.
|
|
295
|
+
*
|
|
296
|
+
* @constructor Twilio.Insights.V1.CallContext.AnnotationContext
|
|
282
297
|
*
|
|
283
298
|
* @param {V1} version - Version of the resource
|
|
284
|
-
* @param {sid} callSid -
|
|
299
|
+
* @param {sid} callSid - Call SID.
|
|
285
300
|
*/
|
|
286
301
|
/* jshint ignore:end */
|
|
287
302
|
AnnotationContext = function AnnotationContext(version, callSid) {
|
|
@@ -297,17 +312,19 @@ AnnotationContext = function AnnotationContext(version, callSid) {
|
|
|
297
312
|
* update a AnnotationInstance
|
|
298
313
|
*
|
|
299
314
|
* @function update
|
|
300
|
-
* @memberof Twilio.Insights.V1.AnnotationContext#
|
|
315
|
+
* @memberof Twilio.Insights.V1.CallContext.AnnotationContext#
|
|
301
316
|
*
|
|
302
317
|
* @param {object} [opts] - Options for request
|
|
303
|
-
* @param {annotation.answered_by} [opts.answeredBy] -
|
|
318
|
+
* @param {annotation.answered_by} [opts.answeredBy] -
|
|
319
|
+
* Indicates the answering entity as determined by Answering Machine Detection.
|
|
304
320
|
* @param {annotation.connectivity_issue} [opts.connectivityIssue] -
|
|
305
|
-
*
|
|
306
|
-
* @param {string} [opts.qualityIssues] -
|
|
307
|
-
*
|
|
308
|
-
* @param {
|
|
309
|
-
* @param {
|
|
310
|
-
* @param {string} [opts.
|
|
321
|
+
* Indicates if the call had any connectivity issue
|
|
322
|
+
* @param {string} [opts.qualityIssues] -
|
|
323
|
+
* Indicates if the call had audio quality issues.
|
|
324
|
+
* @param {boolean} [opts.spam] - Call spam indicator
|
|
325
|
+
* @param {number} [opts.callScore] - Call Score
|
|
326
|
+
* @param {string} [opts.comment] - User comments
|
|
327
|
+
* @param {string} [opts.incident] - Call tag for incidents or support ticket
|
|
311
328
|
* @param {function} [callback] - Callback to handle processed record
|
|
312
329
|
*
|
|
313
330
|
* @returns {Promise} Resolves to processed AnnotationInstance
|
|
@@ -353,7 +370,7 @@ AnnotationContext.prototype.update = function update(opts, callback) {
|
|
|
353
370
|
* fetch a AnnotationInstance
|
|
354
371
|
*
|
|
355
372
|
* @function fetch
|
|
356
|
-
* @memberof Twilio.Insights.V1.AnnotationContext#
|
|
373
|
+
* @memberof Twilio.Insights.V1.CallContext.AnnotationContext#
|
|
357
374
|
*
|
|
358
375
|
* @param {function} [callback] - Callback to handle processed record
|
|
359
376
|
*
|
|
@@ -384,7 +401,7 @@ AnnotationContext.prototype.fetch = function fetch(callback) {
|
|
|
384
401
|
* Provide a user-friendly representation
|
|
385
402
|
*
|
|
386
403
|
* @function toJSON
|
|
387
|
-
* @memberof Twilio.Insights.V1.AnnotationContext#
|
|
404
|
+
* @memberof Twilio.Insights.V1.CallContext.AnnotationContext#
|
|
388
405
|
*
|
|
389
406
|
* @returns Object
|
|
390
407
|
*/
|
|
@@ -53,6 +53,7 @@ interface CallSummaryPayload extends CallSummaryResource, Page.TwilioResponsePay
|
|
|
53
53
|
|
|
54
54
|
interface CallSummaryResource {
|
|
55
55
|
account_sid: string;
|
|
56
|
+
annotation: object;
|
|
56
57
|
attributes: object;
|
|
57
58
|
call_sid: string;
|
|
58
59
|
call_state: CallSummaryCallState;
|
|
@@ -121,6 +122,7 @@ declare class CallSummaryInstance extends SerializableClass {
|
|
|
121
122
|
|
|
122
123
|
private _proxy: CallSummaryContext;
|
|
123
124
|
accountSid: string;
|
|
125
|
+
annotation: any;
|
|
124
126
|
attributes: any;
|
|
125
127
|
callSid: string;
|
|
126
128
|
callState: CallSummaryCallState;
|
|
@@ -179,6 +179,7 @@ CallSummaryPage.prototype[util.inspect.custom] = function inspect(depth,
|
|
|
179
179
|
* @property {object} attributes - The attributes
|
|
180
180
|
* @property {object} properties - The properties
|
|
181
181
|
* @property {object} trust - The trust
|
|
182
|
+
* @property {object} annotation - The annotation
|
|
182
183
|
*
|
|
183
184
|
* @param {V1} version - Version of the resource
|
|
184
185
|
* @param {CallSummaryPayload} payload - The instance payload
|
|
@@ -210,6 +211,7 @@ CallSummaryInstance = function CallSummaryInstance(version, payload, callSid) {
|
|
|
210
211
|
this.attributes = payload.attributes; // jshint ignore:line
|
|
211
212
|
this.properties = payload.properties; // jshint ignore:line
|
|
212
213
|
this.trust = payload.trust; // jshint ignore:line
|
|
214
|
+
this.annotation = payload.annotation; // jshint ignore:line
|
|
213
215
|
|
|
214
216
|
// Context
|
|
215
217
|
this._context = undefined;
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
import Page = require('../../../base/Page');
|
|
9
9
|
import Response = require('../../../http/response');
|
|
10
10
|
import V1 = require('../V1');
|
|
11
|
+
import { AnnotationList } from './call/annotation';
|
|
12
|
+
import { AnnotationListInstance } from './call/annotation';
|
|
11
13
|
import { CallSummaryList } from './call/summary';
|
|
12
14
|
import { CallSummaryListInstance } from './call/summary';
|
|
13
15
|
import { EventList } from './call/event';
|
|
@@ -19,10 +21,6 @@ import { SerializableClass } from '../../../interfaces';
|
|
|
19
21
|
/**
|
|
20
22
|
* Initialize the CallList
|
|
21
23
|
*
|
|
22
|
-
* PLEASE NOTE that this class contains preview products that are subject to
|
|
23
|
-
* change. Use them with caution. If you currently do not have developer preview
|
|
24
|
-
* access, please contact help@twilio.com.
|
|
25
|
-
*
|
|
26
24
|
* @param version - Version of the resource
|
|
27
25
|
*/
|
|
28
26
|
declare function CallList(version: V1): CallListInstance;
|
|
@@ -61,15 +59,12 @@ declare class CallContext {
|
|
|
61
59
|
/**
|
|
62
60
|
* Initialize the CallContext
|
|
63
61
|
*
|
|
64
|
-
* PLEASE NOTE that this class contains preview products that are subject to
|
|
65
|
-
* change. Use them with caution. If you currently do not have developer preview
|
|
66
|
-
* access, please contact help@twilio.com.
|
|
67
|
-
*
|
|
68
62
|
* @param version - Version of the resource
|
|
69
63
|
* @param sid - The sid
|
|
70
64
|
*/
|
|
71
65
|
constructor(version: V1, sid: string);
|
|
72
66
|
|
|
67
|
+
annotation: AnnotationListInstance;
|
|
73
68
|
events: EventListInstance;
|
|
74
69
|
/**
|
|
75
70
|
* fetch a CallInstance
|
|
@@ -90,10 +85,6 @@ declare class CallInstance extends SerializableClass {
|
|
|
90
85
|
/**
|
|
91
86
|
* Initialize the CallContext
|
|
92
87
|
*
|
|
93
|
-
* PLEASE NOTE that this class contains preview products that are subject to
|
|
94
|
-
* change. Use them with caution. If you currently do not have developer preview
|
|
95
|
-
* access, please contact help@twilio.com.
|
|
96
|
-
*
|
|
97
88
|
* @param version - Version of the resource
|
|
98
89
|
* @param payload - The instance payload
|
|
99
90
|
* @param sid - The sid
|
|
@@ -101,6 +92,10 @@ declare class CallInstance extends SerializableClass {
|
|
|
101
92
|
constructor(version: V1, payload: CallPayload, sid: string);
|
|
102
93
|
|
|
103
94
|
private _proxy: CallContext;
|
|
95
|
+
/**
|
|
96
|
+
* Access the annotation
|
|
97
|
+
*/
|
|
98
|
+
annotation(): AnnotationListInstance;
|
|
104
99
|
/**
|
|
105
100
|
* Access the events
|
|
106
101
|
*/
|
|
@@ -133,10 +128,6 @@ declare class CallPage extends Page<V1, CallPayload, CallResource, CallInstance>
|
|
|
133
128
|
/**
|
|
134
129
|
* Initialize the CallPage
|
|
135
130
|
*
|
|
136
|
-
* PLEASE NOTE that this class contains preview products that are subject to
|
|
137
|
-
* change. Use them with caution. If you currently do not have developer preview
|
|
138
|
-
* access, please contact help@twilio.com.
|
|
139
|
-
*
|
|
140
131
|
* @param version - Version of the resource
|
|
141
132
|
* @param response - Response from the API
|
|
142
133
|
* @param solution - Path solution
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
var Q = require('q'); /* jshint ignore:line */
|
|
13
13
|
var _ = require('lodash'); /* jshint ignore:line */
|
|
14
14
|
var util = require('util'); /* jshint ignore:line */
|
|
15
|
+
var AnnotationList = require('./call/annotation').AnnotationList;
|
|
15
16
|
var CallSummaryList = require('./call/summary').CallSummaryList;
|
|
16
17
|
var EventList = require('./call/event').EventList;
|
|
17
18
|
var MetricList = require('./call/metric').MetricList;
|
|
@@ -27,10 +28,6 @@ var CallContext;
|
|
|
27
28
|
/**
|
|
28
29
|
* Initialize the CallList
|
|
29
30
|
*
|
|
30
|
-
* PLEASE NOTE that this class contains preview products that are subject to
|
|
31
|
-
* change. Use them with caution. If you currently do not have developer preview
|
|
32
|
-
* access, please contact help@twilio.com.
|
|
33
|
-
*
|
|
34
31
|
* @constructor Twilio.Insights.V1.CallList
|
|
35
32
|
*
|
|
36
33
|
* @param {Twilio.Insights.V1} version - Version of the resource
|
|
@@ -96,10 +93,6 @@ CallList = function CallList(version) {
|
|
|
96
93
|
/**
|
|
97
94
|
* Initialize the CallPage
|
|
98
95
|
*
|
|
99
|
-
* PLEASE NOTE that this class contains preview products that are subject to
|
|
100
|
-
* change. Use them with caution. If you currently do not have developer preview
|
|
101
|
-
* access, please contact help@twilio.com.
|
|
102
|
-
*
|
|
103
96
|
* @constructor Twilio.Insights.V1.CallPage
|
|
104
97
|
*
|
|
105
98
|
* @param {V1} version - Version of the resource
|
|
@@ -164,10 +157,6 @@ CallPage.prototype[util.inspect.custom] = function inspect(depth, options) {
|
|
|
164
157
|
/**
|
|
165
158
|
* Initialize the CallContext
|
|
166
159
|
*
|
|
167
|
-
* PLEASE NOTE that this class contains preview products that are subject to
|
|
168
|
-
* change. Use them with caution. If you currently do not have developer preview
|
|
169
|
-
* access, please contact help@twilio.com.
|
|
170
|
-
*
|
|
171
160
|
* @constructor Twilio.Insights.V1.CallInstance
|
|
172
161
|
*
|
|
173
162
|
* @property {string} sid - The sid
|
|
@@ -261,6 +250,20 @@ CallInstance.prototype.summary = function summary() {
|
|
|
261
250
|
return this._proxy.summary;
|
|
262
251
|
};
|
|
263
252
|
|
|
253
|
+
/* jshint ignore:start */
|
|
254
|
+
/**
|
|
255
|
+
* Access the annotation
|
|
256
|
+
*
|
|
257
|
+
* @function annotation
|
|
258
|
+
* @memberof Twilio.Insights.V1.CallInstance#
|
|
259
|
+
*
|
|
260
|
+
* @returns {Twilio.Insights.V1.CallContext.AnnotationList}
|
|
261
|
+
*/
|
|
262
|
+
/* jshint ignore:end */
|
|
263
|
+
CallInstance.prototype.annotation = function annotation() {
|
|
264
|
+
return this._proxy.annotation;
|
|
265
|
+
};
|
|
266
|
+
|
|
264
267
|
/* jshint ignore:start */
|
|
265
268
|
/**
|
|
266
269
|
* Provide a user-friendly representation
|
|
@@ -290,16 +293,14 @@ CallInstance.prototype[util.inspect.custom] = function inspect(depth, options) {
|
|
|
290
293
|
/**
|
|
291
294
|
* Initialize the CallContext
|
|
292
295
|
*
|
|
293
|
-
* PLEASE NOTE that this class contains preview products that are subject to
|
|
294
|
-
* change. Use them with caution. If you currently do not have developer preview
|
|
295
|
-
* access, please contact help@twilio.com.
|
|
296
|
-
*
|
|
297
296
|
* @constructor Twilio.Insights.V1.CallContext
|
|
298
297
|
*
|
|
299
298
|
* @property {Twilio.Insights.V1.CallContext.EventList} events - events resource
|
|
300
299
|
* @property {Twilio.Insights.V1.CallContext.MetricList} metrics - metrics resource
|
|
301
300
|
* @property {Twilio.Insights.V1.CallContext.CallSummaryList} summary -
|
|
302
301
|
* summary resource
|
|
302
|
+
* @property {Twilio.Insights.V1.CallContext.AnnotationList} annotation -
|
|
303
|
+
* annotation resource
|
|
303
304
|
*
|
|
304
305
|
* @param {V1} version - Version of the resource
|
|
305
306
|
* @param {sid} sid - The sid
|
|
@@ -316,6 +317,7 @@ CallContext = function CallContext(version, sid) {
|
|
|
316
317
|
this._events = undefined;
|
|
317
318
|
this._metrics = undefined;
|
|
318
319
|
this._summary = undefined;
|
|
320
|
+
this._annotation = undefined;
|
|
319
321
|
};
|
|
320
322
|
|
|
321
323
|
/* jshint ignore:start */
|
|
@@ -379,6 +381,16 @@ Object.defineProperty(CallContext.prototype,
|
|
|
379
381
|
}
|
|
380
382
|
});
|
|
381
383
|
|
|
384
|
+
Object.defineProperty(CallContext.prototype,
|
|
385
|
+
'annotation', {
|
|
386
|
+
get: function() {
|
|
387
|
+
if (!this._annotation) {
|
|
388
|
+
this._annotation = new AnnotationList(this._version, this._solution.sid);
|
|
389
|
+
}
|
|
390
|
+
return this._annotation;
|
|
391
|
+
}
|
|
392
|
+
});
|
|
393
|
+
|
|
382
394
|
/* jshint ignore:start */
|
|
383
395
|
/**
|
|
384
396
|
* Provide a user-friendly representation
|
|
@@ -226,7 +226,6 @@ interface MediaRecordingPayload extends MediaRecordingResource, Page.TwilioRespo
|
|
|
226
226
|
|
|
227
227
|
interface MediaRecordingResource {
|
|
228
228
|
account_sid: string;
|
|
229
|
-
bitrate: number;
|
|
230
229
|
date_created: Date;
|
|
231
230
|
date_updated: Date;
|
|
232
231
|
duration: number;
|
|
@@ -295,7 +294,6 @@ declare class MediaRecordingInstance extends SerializableClass {
|
|
|
295
294
|
|
|
296
295
|
private _proxy: MediaRecordingContext;
|
|
297
296
|
accountSid: string;
|
|
298
|
-
bitrate: number;
|
|
299
297
|
dateCreated: Date;
|
|
300
298
|
dateUpdated: Date;
|
|
301
299
|
duration: number;
|
|
@@ -433,7 +433,6 @@ MediaRecordingPage.prototype[util.inspect.custom] = function inspect(depth,
|
|
|
433
433
|
* @constructor Twilio.Media.V1.MediaRecordingInstance
|
|
434
434
|
*
|
|
435
435
|
* @property {string} accountSid - The SID of the Account that created the resource
|
|
436
|
-
* @property {number} bitrate - The bitrate of the media
|
|
437
436
|
* @property {Date} dateCreated -
|
|
438
437
|
* The ISO 8601 date and time in GMT when the resource was created
|
|
439
438
|
* @property {Date} dateUpdated -
|
|
@@ -465,7 +464,6 @@ MediaRecordingInstance = function MediaRecordingInstance(version, payload, sid)
|
|
|
465
464
|
|
|
466
465
|
// Marshaled Properties
|
|
467
466
|
this.accountSid = payload.account_sid; // jshint ignore:line
|
|
468
|
-
this.bitrate = deserialize.integer(payload.bitrate); // jshint ignore:line
|
|
469
467
|
this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line
|
|
470
468
|
this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line
|
|
471
469
|
this.duration = deserialize.integer(payload.duration); // jshint ignore:line
|
|
@@ -27,7 +27,7 @@ declare function VerificationAttemptsSummaryList(version: V2): VerificationAttem
|
|
|
27
27
|
* @property dateCreatedAfter - Consider verification attempts create after this date on the summary.
|
|
28
28
|
* @property dateCreatedBefore - Consider verification attempts created before this date on the summary.
|
|
29
29
|
* @property destinationPrefix - Filters the attempts considered on the summary by destination prefix.
|
|
30
|
-
* @property
|
|
30
|
+
* @property serviceSid - Filter the verification attempts considered on the summary by verify service.
|
|
31
31
|
*/
|
|
32
32
|
interface VerificationAttemptsSummaryInstanceFetchOptions {
|
|
33
33
|
channel?: VerificationAttemptsSummaryChannels;
|
|
@@ -35,7 +35,7 @@ interface VerificationAttemptsSummaryInstanceFetchOptions {
|
|
|
35
35
|
dateCreatedAfter?: Date;
|
|
36
36
|
dateCreatedBefore?: Date;
|
|
37
37
|
destinationPrefix?: string;
|
|
38
|
-
|
|
38
|
+
serviceSid?: string;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
interface VerificationAttemptsSummaryListInstance {
|