twilio 3.83.3 → 3.83.4
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/FlexApi.d.ts +2 -0
- package/lib/rest/FlexApi.js +8 -0
- package/lib/rest/Messaging.d.ts +4 -0
- package/lib/rest/Messaging.js +18 -0
- package/lib/rest/Preview.d.ts +0 -10
- package/lib/rest/Preview.js +0 -46
- package/lib/rest/content/v1/content/approvalFetch.d.ts +139 -0
- package/lib/rest/content/v1/content/approvalFetch.js +328 -0
- package/lib/rest/content/v1/content.d.ts +7 -6
- package/lib/rest/content/v1/content.js +31 -31
- package/lib/rest/flexApi/V1.d.ts +3 -0
- package/lib/rest/flexApi/V1.js +11 -0
- package/lib/rest/flexApi/v1/assessments.d.ts +113 -0
- package/lib/rest/flexApi/v1/assessments.js +300 -0
- package/lib/rest/lookups/v2/phoneNumber.d.ts +22 -0
- package/lib/rest/lookups/v2/phoneNumber.js +43 -1
- package/lib/rest/messaging/V1.d.ts +6 -0
- package/lib/rest/messaging/V1.js +24 -0
- package/lib/rest/messaging/v1/domainCert.d.ts +178 -0
- package/lib/rest/messaging/v1/domainCert.js +447 -0
- package/lib/rest/messaging/v1/domainConfig.d.ts +172 -0
- package/lib/rest/messaging/v1/domainConfig.js +421 -0
- package/lib/rest/microvisor/v1/device.d.ts +2 -0
- package/lib/rest/microvisor/v1/device.js +2 -0
- package/lib/rest/serverless/v1/service/build.d.ts +1 -1
- package/package.json +1 -1
- package/lib/rest/preview/TrustedComms.d.ts +0 -34
- package/lib/rest/preview/TrustedComms.js +0 -84
- package/lib/rest/preview/trusted_comms/brandedChannel/channel.d.ts +0 -120
- package/lib/rest/preview/trusted_comms/brandedChannel/channel.js +0 -257
- package/lib/rest/preview/trusted_comms/brandedChannel.d.ts +0 -150
- package/lib/rest/preview/trusted_comms/brandedChannel.js +0 -362
- package/lib/rest/preview/trusted_comms/brandsInformation.d.ts +0 -158
- package/lib/rest/preview/trusted_comms/brandsInformation.js +0 -338
- package/lib/rest/preview/trusted_comms/cps.d.ts +0 -156
- package/lib/rest/preview/trusted_comms/cps.js +0 -332
- package/lib/rest/preview/trusted_comms/currentCall.d.ts +0 -180
- package/lib/rest/preview/trusted_comms/currentCall.js +0 -367
|
@@ -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 { ApprovalFetchList } from './content/approvalFetch';
|
|
12
|
+
import { ApprovalFetchListInstance } from './content/approvalFetch';
|
|
11
13
|
import { SerializableClass } from '../../../interfaces';
|
|
12
14
|
|
|
13
15
|
/**
|
|
@@ -26,12 +28,6 @@ interface ContentListInstance {
|
|
|
26
28
|
* @param sid - sid of instance
|
|
27
29
|
*/
|
|
28
30
|
(sid: string): ContentContext;
|
|
29
|
-
/**
|
|
30
|
-
* create a ContentInstance
|
|
31
|
-
*
|
|
32
|
-
* @param callback - Callback to handle processed record
|
|
33
|
-
*/
|
|
34
|
-
create(callback?: (error: Error | null, item: ContentInstance) => any): Promise<ContentInstance>;
|
|
35
31
|
/**
|
|
36
32
|
* Streams ContentInstance records from the API.
|
|
37
33
|
*
|
|
@@ -230,6 +226,7 @@ declare class ContentContext {
|
|
|
230
226
|
*/
|
|
231
227
|
constructor(version: V1, sid: string);
|
|
232
228
|
|
|
229
|
+
approvalFetch: ApprovalFetchListInstance;
|
|
233
230
|
/**
|
|
234
231
|
* fetch a ContentInstance
|
|
235
232
|
*
|
|
@@ -265,6 +262,10 @@ declare class ContentInstance extends SerializableClass {
|
|
|
265
262
|
|
|
266
263
|
private _proxy: ContentContext;
|
|
267
264
|
accountSid: string;
|
|
265
|
+
/**
|
|
266
|
+
* Access the approvalFetch
|
|
267
|
+
*/
|
|
268
|
+
approvalFetch(): ApprovalFetchListInstance;
|
|
268
269
|
dateCreated: Date;
|
|
269
270
|
dateUpdated: Date;
|
|
270
271
|
/**
|
|
@@ -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 ApprovalFetchList = require('./content/approvalFetch').ApprovalFetchList;
|
|
15
16
|
var Page = require('../../../base/Page'); /* jshint ignore:line */
|
|
16
17
|
var deserialize = require(
|
|
17
18
|
'../../../base/deserialize'); /* jshint ignore:line */
|
|
@@ -54,37 +55,6 @@ ContentList = function ContentList(version) {
|
|
|
54
55
|
// Path Solution
|
|
55
56
|
ContentListInstance._solution = {};
|
|
56
57
|
ContentListInstance._uri = `/Content`;
|
|
57
|
-
/* jshint ignore:start */
|
|
58
|
-
/**
|
|
59
|
-
* create a ContentInstance
|
|
60
|
-
*
|
|
61
|
-
* @function create
|
|
62
|
-
* @memberof Twilio.Content.V1.ContentList#
|
|
63
|
-
*
|
|
64
|
-
* @param {function} [callback] - Callback to handle processed record
|
|
65
|
-
*
|
|
66
|
-
* @returns {Promise} Resolves to processed ContentInstance
|
|
67
|
-
*/
|
|
68
|
-
/* jshint ignore:end */
|
|
69
|
-
ContentListInstance.create = function create(callback) {
|
|
70
|
-
var deferred = Q.defer();
|
|
71
|
-
var promise = this._version.create({uri: this._uri, method: 'POST'});
|
|
72
|
-
|
|
73
|
-
promise = promise.then(function(payload) {
|
|
74
|
-
deferred.resolve(new ContentInstance(this._version, payload, this._solution.sid));
|
|
75
|
-
}.bind(this));
|
|
76
|
-
|
|
77
|
-
promise.catch(function(error) {
|
|
78
|
-
deferred.reject(error);
|
|
79
|
-
});
|
|
80
|
-
|
|
81
|
-
if (_.isFunction(callback)) {
|
|
82
|
-
deferred.promise.nodeify(callback);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
return deferred.promise;
|
|
86
|
-
};
|
|
87
|
-
|
|
88
58
|
/* jshint ignore:start */
|
|
89
59
|
/**
|
|
90
60
|
* Streams ContentInstance records from the API.
|
|
@@ -531,6 +501,20 @@ ContentInstance.prototype.remove = function remove(callback) {
|
|
|
531
501
|
return this._proxy.remove(callback);
|
|
532
502
|
};
|
|
533
503
|
|
|
504
|
+
/* jshint ignore:start */
|
|
505
|
+
/**
|
|
506
|
+
* Access the approvalFetch
|
|
507
|
+
*
|
|
508
|
+
* @function approvalFetch
|
|
509
|
+
* @memberof Twilio.Content.V1.ContentInstance#
|
|
510
|
+
*
|
|
511
|
+
* @returns {Twilio.Content.V1.ContentContext.ApprovalFetchList}
|
|
512
|
+
*/
|
|
513
|
+
/* jshint ignore:end */
|
|
514
|
+
ContentInstance.prototype.approvalFetch = function approvalFetch() {
|
|
515
|
+
return this._proxy.approvalFetch;
|
|
516
|
+
};
|
|
517
|
+
|
|
534
518
|
/* jshint ignore:start */
|
|
535
519
|
/**
|
|
536
520
|
* Provide a user-friendly representation
|
|
@@ -567,6 +551,9 @@ ContentInstance.prototype[util.inspect.custom] = function inspect(depth,
|
|
|
567
551
|
*
|
|
568
552
|
* @constructor Twilio.Content.V1.ContentContext
|
|
569
553
|
*
|
|
554
|
+
* @property {Twilio.Content.V1.ContentContext.ApprovalFetchList} approvalFetch -
|
|
555
|
+
* approvalFetch resource
|
|
556
|
+
*
|
|
570
557
|
* @param {V1} version - Version of the resource
|
|
571
558
|
* @param {sid} sid - The unique string that identifies the resource
|
|
572
559
|
*/
|
|
@@ -577,6 +564,9 @@ ContentContext = function ContentContext(version, sid) {
|
|
|
577
564
|
// Path Solution
|
|
578
565
|
this._solution = {sid: sid, };
|
|
579
566
|
this._uri = `/Content/${sid}`;
|
|
567
|
+
|
|
568
|
+
// Dependents
|
|
569
|
+
this._approvalFetch = undefined;
|
|
580
570
|
};
|
|
581
571
|
|
|
582
572
|
/* jshint ignore:start */
|
|
@@ -641,6 +631,16 @@ ContentContext.prototype.remove = function remove(callback) {
|
|
|
641
631
|
return deferred.promise;
|
|
642
632
|
};
|
|
643
633
|
|
|
634
|
+
Object.defineProperty(ContentContext.prototype,
|
|
635
|
+
'approvalFetch', {
|
|
636
|
+
get: function() {
|
|
637
|
+
if (!this._approvalFetch) {
|
|
638
|
+
this._approvalFetch = new ApprovalFetchList(this._version, this._solution.sid);
|
|
639
|
+
}
|
|
640
|
+
return this._approvalFetch;
|
|
641
|
+
}
|
|
642
|
+
});
|
|
643
|
+
|
|
644
644
|
/* jshint ignore:start */
|
|
645
645
|
/**
|
|
646
646
|
* Provide a user-friendly representation
|
package/lib/rest/flexApi/V1.d.ts
CHANGED
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
import FlexApi = require('../FlexApi');
|
|
9
9
|
import Version = require('../../base/Version');
|
|
10
|
+
import { AssessmentsList } from './v1/assessments';
|
|
11
|
+
import { AssessmentsListInstance } from './v1/assessments';
|
|
10
12
|
import { ChannelList } from './v1/channel';
|
|
11
13
|
import { ChannelListInstance } from './v1/channel';
|
|
12
14
|
import { ConfigurationList } from './v1/configuration';
|
|
@@ -31,6 +33,7 @@ declare class V1 extends Version {
|
|
|
31
33
|
*/
|
|
32
34
|
constructor(domain: FlexApi);
|
|
33
35
|
|
|
36
|
+
readonly assessments: AssessmentsListInstance;
|
|
34
37
|
readonly channel: ChannelListInstance;
|
|
35
38
|
readonly configuration: ConfigurationListInstance;
|
|
36
39
|
readonly flexFlow: FlexFlowListInstance;
|
package/lib/rest/flexApi/V1.js
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
/* jshint ignore:end */
|
|
11
11
|
|
|
12
12
|
var _ = require('lodash'); /* jshint ignore:line */
|
|
13
|
+
var AssessmentsList = require('./v1/assessments').AssessmentsList;
|
|
13
14
|
var ChannelList = require('./v1/channel').ChannelList;
|
|
14
15
|
var ConfigurationList = require('./v1/configuration').ConfigurationList;
|
|
15
16
|
var FlexFlowList = require('./v1/flexFlow').FlexFlowList;
|
|
@@ -26,6 +27,7 @@ var WebChannelList = require('./v1/webChannel').WebChannelList;
|
|
|
26
27
|
*
|
|
27
28
|
* @constructor Twilio.FlexApi.V1
|
|
28
29
|
*
|
|
30
|
+
* @property {Twilio.FlexApi.V1.AssessmentsList} assessments - assessments resource
|
|
29
31
|
* @property {Twilio.FlexApi.V1.ChannelList} channel - channel resource
|
|
30
32
|
* @property {Twilio.FlexApi.V1.ConfigurationList} configuration -
|
|
31
33
|
* configuration resource
|
|
@@ -42,6 +44,7 @@ function V1(domain) {
|
|
|
42
44
|
Version.prototype.constructor.call(this, domain, 'v1');
|
|
43
45
|
|
|
44
46
|
// Resources
|
|
47
|
+
this._assessments = undefined;
|
|
45
48
|
this._channel = undefined;
|
|
46
49
|
this._configuration = undefined;
|
|
47
50
|
this._flexFlow = undefined;
|
|
@@ -54,6 +57,14 @@ function V1(domain) {
|
|
|
54
57
|
_.extend(V1.prototype, Version.prototype);
|
|
55
58
|
V1.prototype.constructor = V1;
|
|
56
59
|
|
|
60
|
+
Object.defineProperty(V1.prototype,
|
|
61
|
+
'assessments', {
|
|
62
|
+
get: function() {
|
|
63
|
+
this._assessments = this._assessments || new AssessmentsList(this);
|
|
64
|
+
return this._assessments;
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
|
|
57
68
|
Object.defineProperty(V1.prototype,
|
|
58
69
|
'channel', {
|
|
59
70
|
get: function() {
|
|
@@ -0,0 +1,113 @@
|
|
|
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
|
+
/**
|
|
14
|
+
* Initialize the AssessmentsList
|
|
15
|
+
*
|
|
16
|
+
* @param version - Version of the resource
|
|
17
|
+
*/
|
|
18
|
+
declare function AssessmentsList(version: V1): AssessmentsListInstance;
|
|
19
|
+
|
|
20
|
+
interface AssessmentsListInstance {
|
|
21
|
+
/**
|
|
22
|
+
* @param sid - sid of instance
|
|
23
|
+
*/
|
|
24
|
+
(sid: string): AssessmentsContext;
|
|
25
|
+
/**
|
|
26
|
+
* Constructs a assessments
|
|
27
|
+
*/
|
|
28
|
+
get(): AssessmentsContext;
|
|
29
|
+
/**
|
|
30
|
+
* Provide a user-friendly representation
|
|
31
|
+
*/
|
|
32
|
+
toJSON(): any;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
interface AssessmentsPayload extends AssessmentsResource, Page.TwilioResponsePayload {
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
interface AssessmentsResource {
|
|
39
|
+
url: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
interface AssessmentsSolution {
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
declare class AssessmentsContext {
|
|
47
|
+
/**
|
|
48
|
+
* Initialize the AssessmentsContext
|
|
49
|
+
*
|
|
50
|
+
* @param version - Version of the resource
|
|
51
|
+
*/
|
|
52
|
+
constructor(version: V1);
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* create a AssessmentsInstance
|
|
56
|
+
*
|
|
57
|
+
* @param callback - Callback to handle processed record
|
|
58
|
+
*/
|
|
59
|
+
create(callback?: (error: Error | null, item: AssessmentsInstance) => any): Promise<AssessmentsInstance>;
|
|
60
|
+
/**
|
|
61
|
+
* Provide a user-friendly representation
|
|
62
|
+
*/
|
|
63
|
+
toJSON(): any;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
declare class AssessmentsInstance extends SerializableClass {
|
|
68
|
+
/**
|
|
69
|
+
* Initialize the AssessmentsContext
|
|
70
|
+
*
|
|
71
|
+
* @param version - Version of the resource
|
|
72
|
+
* @param payload - The instance payload
|
|
73
|
+
*/
|
|
74
|
+
constructor(version: V1, payload: AssessmentsPayload);
|
|
75
|
+
|
|
76
|
+
private _proxy: AssessmentsContext;
|
|
77
|
+
/**
|
|
78
|
+
* create a AssessmentsInstance
|
|
79
|
+
*
|
|
80
|
+
* @param callback - Callback to handle processed record
|
|
81
|
+
*/
|
|
82
|
+
create(callback?: (error: Error | null, items: AssessmentsInstance) => any): Promise<AssessmentsInstance>;
|
|
83
|
+
/**
|
|
84
|
+
* Provide a user-friendly representation
|
|
85
|
+
*/
|
|
86
|
+
toJSON(): any;
|
|
87
|
+
url: string;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
declare class AssessmentsPage extends Page<V1, AssessmentsPayload, AssessmentsResource, AssessmentsInstance> {
|
|
92
|
+
/**
|
|
93
|
+
* Initialize the AssessmentsPage
|
|
94
|
+
*
|
|
95
|
+
* @param version - Version of the resource
|
|
96
|
+
* @param response - Response from the API
|
|
97
|
+
* @param solution - Path solution
|
|
98
|
+
*/
|
|
99
|
+
constructor(version: V1, response: Response<string>, solution: AssessmentsSolution);
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Build an instance of AssessmentsInstance
|
|
103
|
+
*
|
|
104
|
+
* @param payload - Payload response from the API
|
|
105
|
+
*/
|
|
106
|
+
getInstance(payload: AssessmentsPayload): AssessmentsInstance;
|
|
107
|
+
/**
|
|
108
|
+
* Provide a user-friendly representation
|
|
109
|
+
*/
|
|
110
|
+
toJSON(): any;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export { AssessmentsContext, AssessmentsInstance, AssessmentsList, AssessmentsListInstance, AssessmentsPage, AssessmentsPayload, AssessmentsResource, AssessmentsSolution }
|
|
@@ -0,0 +1,300 @@
|
|
|
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 values = require('../../../base/values'); /* jshint ignore:line */
|
|
17
|
+
|
|
18
|
+
var AssessmentsList;
|
|
19
|
+
var AssessmentsPage;
|
|
20
|
+
var AssessmentsInstance;
|
|
21
|
+
var AssessmentsContext;
|
|
22
|
+
|
|
23
|
+
/* jshint ignore:start */
|
|
24
|
+
/**
|
|
25
|
+
* Initialize the AssessmentsList
|
|
26
|
+
*
|
|
27
|
+
* @constructor Twilio.FlexApi.V1.AssessmentsList
|
|
28
|
+
*
|
|
29
|
+
* @param {Twilio.FlexApi.V1} version - Version of the resource
|
|
30
|
+
*/
|
|
31
|
+
/* jshint ignore:end */
|
|
32
|
+
AssessmentsList = function AssessmentsList(version) {
|
|
33
|
+
/* jshint ignore:start */
|
|
34
|
+
/**
|
|
35
|
+
* @function assessments
|
|
36
|
+
* @memberof Twilio.FlexApi.V1#
|
|
37
|
+
*
|
|
38
|
+
* @param {string} sid - sid of instance
|
|
39
|
+
*
|
|
40
|
+
* @returns {Twilio.FlexApi.V1.AssessmentsContext}
|
|
41
|
+
*/
|
|
42
|
+
/* jshint ignore:end */
|
|
43
|
+
function AssessmentsListInstance(sid) {
|
|
44
|
+
return AssessmentsListInstance.get(sid);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
AssessmentsListInstance._version = version;
|
|
48
|
+
// Path Solution
|
|
49
|
+
AssessmentsListInstance._solution = {};
|
|
50
|
+
/* jshint ignore:start */
|
|
51
|
+
/**
|
|
52
|
+
* Constructs a assessments
|
|
53
|
+
*
|
|
54
|
+
* @function get
|
|
55
|
+
* @memberof Twilio.FlexApi.V1.AssessmentsList#
|
|
56
|
+
*
|
|
57
|
+
* @returns {Twilio.FlexApi.V1.AssessmentsContext}
|
|
58
|
+
*/
|
|
59
|
+
/* jshint ignore:end */
|
|
60
|
+
AssessmentsListInstance.get = function get() {
|
|
61
|
+
return new AssessmentsContext(this._version);
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
/* jshint ignore:start */
|
|
65
|
+
/**
|
|
66
|
+
* Provide a user-friendly representation
|
|
67
|
+
*
|
|
68
|
+
* @function toJSON
|
|
69
|
+
* @memberof Twilio.FlexApi.V1.AssessmentsList#
|
|
70
|
+
*
|
|
71
|
+
* @returns Object
|
|
72
|
+
*/
|
|
73
|
+
/* jshint ignore:end */
|
|
74
|
+
AssessmentsListInstance.toJSON = function toJSON() {
|
|
75
|
+
return this._solution;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
AssessmentsListInstance[util.inspect.custom] = function inspect(depth, options)
|
|
79
|
+
{
|
|
80
|
+
return util.inspect(this.toJSON(), options);
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
return AssessmentsListInstance;
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
/* jshint ignore:start */
|
|
88
|
+
/**
|
|
89
|
+
* Initialize the AssessmentsPage
|
|
90
|
+
*
|
|
91
|
+
* @constructor Twilio.FlexApi.V1.AssessmentsPage
|
|
92
|
+
*
|
|
93
|
+
* @param {V1} version - Version of the resource
|
|
94
|
+
* @param {Response<string>} response - Response from the API
|
|
95
|
+
* @param {AssessmentsSolution} solution - Path solution
|
|
96
|
+
*
|
|
97
|
+
* @returns AssessmentsPage
|
|
98
|
+
*/
|
|
99
|
+
/* jshint ignore:end */
|
|
100
|
+
AssessmentsPage = function AssessmentsPage(version, response, solution) {
|
|
101
|
+
// Path Solution
|
|
102
|
+
this._solution = solution;
|
|
103
|
+
|
|
104
|
+
Page.prototype.constructor.call(this, version, response, this._solution);
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
_.extend(AssessmentsPage.prototype, Page.prototype);
|
|
108
|
+
AssessmentsPage.prototype.constructor = AssessmentsPage;
|
|
109
|
+
|
|
110
|
+
/* jshint ignore:start */
|
|
111
|
+
/**
|
|
112
|
+
* Build an instance of AssessmentsInstance
|
|
113
|
+
*
|
|
114
|
+
* @function getInstance
|
|
115
|
+
* @memberof Twilio.FlexApi.V1.AssessmentsPage#
|
|
116
|
+
*
|
|
117
|
+
* @param {AssessmentsPayload} payload - Payload response from the API
|
|
118
|
+
*
|
|
119
|
+
* @returns AssessmentsInstance
|
|
120
|
+
*/
|
|
121
|
+
/* jshint ignore:end */
|
|
122
|
+
AssessmentsPage.prototype.getInstance = function getInstance(payload) {
|
|
123
|
+
return new AssessmentsInstance(this._version, payload);
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
/* jshint ignore:start */
|
|
127
|
+
/**
|
|
128
|
+
* Provide a user-friendly representation
|
|
129
|
+
*
|
|
130
|
+
* @function toJSON
|
|
131
|
+
* @memberof Twilio.FlexApi.V1.AssessmentsPage#
|
|
132
|
+
*
|
|
133
|
+
* @returns Object
|
|
134
|
+
*/
|
|
135
|
+
/* jshint ignore:end */
|
|
136
|
+
AssessmentsPage.prototype.toJSON = function toJSON() {
|
|
137
|
+
let clone = {};
|
|
138
|
+
_.forOwn(this, function(value, key) {
|
|
139
|
+
if (!_.startsWith(key, '_') && ! _.isFunction(value)) {
|
|
140
|
+
clone[key] = value;
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
return clone;
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
AssessmentsPage.prototype[util.inspect.custom] = function inspect(depth,
|
|
147
|
+
options) {
|
|
148
|
+
return util.inspect(this.toJSON(), options);
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
/* jshint ignore:start */
|
|
153
|
+
/**
|
|
154
|
+
* Initialize the AssessmentsContext
|
|
155
|
+
*
|
|
156
|
+
* @constructor Twilio.FlexApi.V1.AssessmentsInstance
|
|
157
|
+
*
|
|
158
|
+
* @property {string} url - The URL of this resource.
|
|
159
|
+
*
|
|
160
|
+
* @param {V1} version - Version of the resource
|
|
161
|
+
* @param {AssessmentsPayload} payload - The instance payload
|
|
162
|
+
*/
|
|
163
|
+
/* jshint ignore:end */
|
|
164
|
+
AssessmentsInstance = function AssessmentsInstance(version, payload) {
|
|
165
|
+
this._version = version;
|
|
166
|
+
|
|
167
|
+
// Marshaled Properties
|
|
168
|
+
this.url = payload.url; // jshint ignore:line
|
|
169
|
+
|
|
170
|
+
// Context
|
|
171
|
+
this._context = undefined;
|
|
172
|
+
this._solution = {};
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
Object.defineProperty(AssessmentsInstance.prototype,
|
|
176
|
+
'_proxy', {
|
|
177
|
+
get: function() {
|
|
178
|
+
if (!this._context) {
|
|
179
|
+
this._context = new AssessmentsContext(this._version);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
return this._context;
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
/* jshint ignore:start */
|
|
187
|
+
/**
|
|
188
|
+
* create a AssessmentsInstance
|
|
189
|
+
*
|
|
190
|
+
* @function create
|
|
191
|
+
* @memberof Twilio.FlexApi.V1.AssessmentsInstance#
|
|
192
|
+
*
|
|
193
|
+
* @param {function} [callback] - Callback to handle processed record
|
|
194
|
+
*
|
|
195
|
+
* @returns {Promise} Resolves to processed AssessmentsInstance
|
|
196
|
+
*/
|
|
197
|
+
/* jshint ignore:end */
|
|
198
|
+
AssessmentsInstance.prototype.create = function create(callback) {
|
|
199
|
+
return this._proxy.create(callback);
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
/* jshint ignore:start */
|
|
203
|
+
/**
|
|
204
|
+
* Provide a user-friendly representation
|
|
205
|
+
*
|
|
206
|
+
* @function toJSON
|
|
207
|
+
* @memberof Twilio.FlexApi.V1.AssessmentsInstance#
|
|
208
|
+
*
|
|
209
|
+
* @returns Object
|
|
210
|
+
*/
|
|
211
|
+
/* jshint ignore:end */
|
|
212
|
+
AssessmentsInstance.prototype.toJSON = function toJSON() {
|
|
213
|
+
let clone = {};
|
|
214
|
+
_.forOwn(this, function(value, key) {
|
|
215
|
+
if (!_.startsWith(key, '_') && ! _.isFunction(value)) {
|
|
216
|
+
clone[key] = value;
|
|
217
|
+
}
|
|
218
|
+
});
|
|
219
|
+
return clone;
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
AssessmentsInstance.prototype[util.inspect.custom] = function inspect(depth,
|
|
223
|
+
options) {
|
|
224
|
+
return util.inspect(this.toJSON(), options);
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
/* jshint ignore:start */
|
|
229
|
+
/**
|
|
230
|
+
* Initialize the AssessmentsContext
|
|
231
|
+
*
|
|
232
|
+
* @constructor Twilio.FlexApi.V1.AssessmentsContext
|
|
233
|
+
*
|
|
234
|
+
* @param {V1} version - Version of the resource
|
|
235
|
+
*/
|
|
236
|
+
/* jshint ignore:end */
|
|
237
|
+
AssessmentsContext = function AssessmentsContext(version) {
|
|
238
|
+
this._version = version;
|
|
239
|
+
|
|
240
|
+
// Path Solution
|
|
241
|
+
this._solution = {};
|
|
242
|
+
this._uri = `/Accounts/Assessments`;
|
|
243
|
+
};
|
|
244
|
+
|
|
245
|
+
/* jshint ignore:start */
|
|
246
|
+
/**
|
|
247
|
+
* create a AssessmentsInstance
|
|
248
|
+
*
|
|
249
|
+
* @function create
|
|
250
|
+
* @memberof Twilio.FlexApi.V1.AssessmentsContext#
|
|
251
|
+
*
|
|
252
|
+
* @param {function} [callback] - Callback to handle processed record
|
|
253
|
+
*
|
|
254
|
+
* @returns {Promise} Resolves to processed AssessmentsInstance
|
|
255
|
+
*/
|
|
256
|
+
/* jshint ignore:end */
|
|
257
|
+
AssessmentsContext.prototype.create = function create(callback) {
|
|
258
|
+
var deferred = Q.defer();
|
|
259
|
+
var promise = this._version.create({uri: this._uri, method: 'POST'});
|
|
260
|
+
|
|
261
|
+
promise = promise.then(function(payload) {
|
|
262
|
+
deferred.resolve(new AssessmentsInstance(this._version, payload));
|
|
263
|
+
}.bind(this));
|
|
264
|
+
|
|
265
|
+
promise.catch(function(error) {
|
|
266
|
+
deferred.reject(error);
|
|
267
|
+
});
|
|
268
|
+
|
|
269
|
+
if (_.isFunction(callback)) {
|
|
270
|
+
deferred.promise.nodeify(callback);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
return deferred.promise;
|
|
274
|
+
};
|
|
275
|
+
|
|
276
|
+
/* jshint ignore:start */
|
|
277
|
+
/**
|
|
278
|
+
* Provide a user-friendly representation
|
|
279
|
+
*
|
|
280
|
+
* @function toJSON
|
|
281
|
+
* @memberof Twilio.FlexApi.V1.AssessmentsContext#
|
|
282
|
+
*
|
|
283
|
+
* @returns Object
|
|
284
|
+
*/
|
|
285
|
+
/* jshint ignore:end */
|
|
286
|
+
AssessmentsContext.prototype.toJSON = function toJSON() {
|
|
287
|
+
return this._solution;
|
|
288
|
+
};
|
|
289
|
+
|
|
290
|
+
AssessmentsContext.prototype[util.inspect.custom] = function inspect(depth,
|
|
291
|
+
options) {
|
|
292
|
+
return util.inspect(this.toJSON(), options);
|
|
293
|
+
};
|
|
294
|
+
|
|
295
|
+
module.exports = {
|
|
296
|
+
AssessmentsList: AssessmentsList,
|
|
297
|
+
AssessmentsPage: AssessmentsPage,
|
|
298
|
+
AssessmentsInstance: AssessmentsInstance,
|
|
299
|
+
AssessmentsContext: AssessmentsContext
|
|
300
|
+
};
|
|
@@ -27,12 +27,32 @@ declare function PhoneNumberList(version: V2): PhoneNumberListInstance;
|
|
|
27
27
|
/**
|
|
28
28
|
* Options to pass to fetch
|
|
29
29
|
*
|
|
30
|
+
* @property addressCountryCode - User’s country, up to two characters.
|
|
31
|
+
* @property addressLine1 - User’s first address line.
|
|
32
|
+
* @property addressLine2 - User’s second address line.
|
|
33
|
+
* @property city - User’s city.
|
|
30
34
|
* @property countryCode - Country code for national phone number lookups
|
|
35
|
+
* @property dateOfBirth - User’s date of birth, in YYYYMMDD format.
|
|
31
36
|
* @property fields - Fields to return
|
|
37
|
+
* @property firstName - User’s first name.
|
|
38
|
+
* @property lastName - User’s last name.
|
|
39
|
+
* @property nationalId - User’s national ID, such as SSN or Passport ID.
|
|
40
|
+
* @property postalCode - User’s postal zip code.
|
|
41
|
+
* @property state - User’s country subdivision, such as state, province, or locality.
|
|
32
42
|
*/
|
|
33
43
|
interface PhoneNumberInstanceFetchOptions {
|
|
44
|
+
addressCountryCode?: string;
|
|
45
|
+
addressLine1?: string;
|
|
46
|
+
addressLine2?: string;
|
|
47
|
+
city?: string;
|
|
34
48
|
countryCode?: string;
|
|
49
|
+
dateOfBirth?: string;
|
|
35
50
|
fields?: string;
|
|
51
|
+
firstName?: string;
|
|
52
|
+
lastName?: string;
|
|
53
|
+
nationalId?: string;
|
|
54
|
+
postalCode?: string;
|
|
55
|
+
state?: string;
|
|
36
56
|
}
|
|
37
57
|
|
|
38
58
|
interface PhoneNumberListInstance {
|
|
@@ -60,6 +80,7 @@ interface PhoneNumberResource {
|
|
|
60
80
|
caller_name: object;
|
|
61
81
|
calling_country_code: string;
|
|
62
82
|
country_code: string;
|
|
83
|
+
identity_match: object;
|
|
63
84
|
line_type_intelligence: object;
|
|
64
85
|
live_activity: object;
|
|
65
86
|
national_format: string;
|
|
@@ -137,6 +158,7 @@ declare class PhoneNumberInstance extends SerializableClass {
|
|
|
137
158
|
* @param callback - Callback to handle processed record
|
|
138
159
|
*/
|
|
139
160
|
fetch(opts?: PhoneNumberInstanceFetchOptions, callback?: (error: Error | null, items: PhoneNumberInstance) => any): Promise<PhoneNumberInstance>;
|
|
161
|
+
identityMatch: any;
|
|
140
162
|
lineTypeIntelligence: any;
|
|
141
163
|
liveActivity: any;
|
|
142
164
|
nationalFormat: string;
|