twilio 3.68.0 → 3.71.2
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/CHANGES.md +104 -0
- package/README.md +1 -1
- package/lib/jwt/AccessToken.d.ts +16 -0
- package/lib/jwt/AccessToken.js +20 -0
- package/lib/jwt/ClientCapability.d.ts +1 -1
- package/lib/rest/Media.d.ts +28 -0
- package/lib/rest/Media.js +64 -0
- package/lib/rest/Twilio.d.ts +2 -0
- package/lib/rest/Twilio.js +14 -0
- package/lib/rest/Verify.d.ts +2 -2
- package/lib/rest/Verify.js +3 -4
- package/lib/rest/api/v2010/account/call/siprec.d.ts +776 -0
- package/lib/rest/api/v2010/account/call/siprec.js +811 -0
- package/lib/rest/api/v2010/account/call.d.ts +8 -1
- package/lib/rest/api/v2010/account/call.js +29 -1
- package/lib/rest/api/v2010/account/incomingPhoneNumber/local.d.ts +6 -2
- package/lib/rest/api/v2010/account/incomingPhoneNumber/local.js +5 -2
- package/lib/rest/api/v2010/account/incomingPhoneNumber/mobile.d.ts +6 -2
- package/lib/rest/api/v2010/account/incomingPhoneNumber/mobile.js +5 -2
- package/lib/rest/api/v2010/account/incomingPhoneNumber/tollFree.d.ts +6 -2
- package/lib/rest/api/v2010/account/incomingPhoneNumber/tollFree.js +5 -2
- package/lib/rest/api/v2010/account/incomingPhoneNumber.d.ts +7 -3
- package/lib/rest/api/v2010/account/incomingPhoneNumber.js +7 -4
- package/lib/rest/conversations/v1/service/configuration/notification.d.ts +6 -0
- package/lib/rest/conversations/v1/service/configuration/notification.js +11 -1
- package/lib/rest/flexApi/v1/configuration.d.ts +2 -0
- package/lib/rest/flexApi/v1/configuration.js +2 -0
- package/lib/rest/frontlineApi/v1/user.d.ts +4 -0
- package/lib/rest/frontlineApi/v1/user.js +10 -1
- package/lib/rest/insights/v1/callSummaries.d.ts +27 -27
- package/lib/rest/insights/v1/callSummaries.js +36 -36
- package/lib/rest/media/V1.d.ts +28 -0
- package/lib/rest/media/V1.js +59 -0
- package/lib/rest/media/v1/mediaProcessor.d.ts +355 -0
- package/lib/rest/media/v1/mediaProcessor.js +702 -0
- package/lib/rest/media/v1/playerStreamer/playbackGrant.d.ts +162 -0
- package/lib/rest/media/v1/playerStreamer/playbackGrant.js +384 -0
- package/lib/rest/media/v1/playerStreamer.d.ts +366 -0
- package/lib/rest/media/v1/playerStreamer.js +729 -0
- package/lib/rest/messaging/v1/brandRegistration/brandVetting.d.ts +330 -0
- package/lib/rest/messaging/v1/brandRegistration/brandVetting.js +655 -0
- package/lib/rest/messaging/v1/brandRegistration.d.ts +15 -2
- package/lib/rest/messaging/v1/brandRegistration.js +37 -1
- package/lib/rest/messaging/v1/service.d.ts +8 -0
- package/lib/rest/messaging/v1/service.js +14 -0
- package/lib/rest/numbers/v2/regulatoryCompliance/bundle/bundleCopy.d.ts +133 -0
- package/lib/rest/numbers/v2/regulatoryCompliance/bundle/bundleCopy.js +268 -0
- package/lib/rest/numbers/v2/regulatoryCompliance/bundle/replaceItems.d.ts +127 -0
- package/lib/rest/numbers/v2/regulatoryCompliance/bundle/replaceItems.js +271 -0
- package/lib/rest/numbers/v2/regulatoryCompliance/bundle.d.ts +14 -0
- package/lib/rest/numbers/v2/regulatoryCompliance/bundle.js +56 -0
- package/lib/rest/serverless/v1/service/build.d.ts +1 -1
- package/lib/rest/serverless/v1/service/environment.js +1 -1
- package/lib/rest/serverless/v1/service.d.ts +2 -0
- package/lib/rest/serverless/v1/service.js +3 -0
- package/lib/rest/taskrouter/v1/workspace/task/reservation.d.ts +2 -0
- package/lib/rest/taskrouter/v1/workspace/task/reservation.js +4 -1
- package/lib/rest/taskrouter/v1/workspace/worker/reservation.d.ts +2 -0
- package/lib/rest/taskrouter/v1/workspace/worker/reservation.js +4 -1
- package/lib/rest/taskrouter/v1/workspace/worker.d.ts +27 -2
- package/lib/rest/taskrouter/v1/workspace/worker.js +22 -7
- package/lib/rest/trunking/v1/trunk.d.ts +9 -1
- package/lib/rest/trunking/v1/trunk.js +13 -2
- package/lib/rest/verify/V2.d.ts +3 -3
- package/lib/rest/verify/V2.js +6 -8
- package/lib/rest/verify/v2/service/entity/factor.d.ts +4 -2
- package/lib/rest/verify/v2/service/entity/factor.js +8 -3
- package/lib/rest/verify/v2/service/entity/newFactor.d.ts +2 -2
- package/lib/rest/verify/v2/service/entity/newFactor.js +1 -1
- package/lib/rest/verify/v2/service/verification.d.ts +5 -1
- package/lib/rest/verify/v2/service/verification.js +7 -2
- package/lib/rest/verify/v2/service.d.ts +6 -0
- package/lib/rest/verify/v2/service.js +12 -2
- package/lib/rest/verify/v2/{verificationTemplate.d.ts → template.d.ts} +35 -37
- package/lib/rest/verify/v2/{verificationTemplate.js → template.js} +58 -64
- package/lib/rest/verify/v2/verificationAttempt.d.ts +1 -1
- package/lib/rest/video/v1/room.d.ts +4 -0
- package/lib/rest/video/v1/room.js +7 -1
- package/lib/rest/wireless/v1/ratePlan.d.ts +1 -1
- package/lib/rest/wireless/v1/ratePlan.js +3 -3
- package/lib/rest/wireless/v1/sim.d.ts +4 -4
- package/lib/rest/wireless/v1/sim.js +18 -24
- package/lib/twiml/VoiceResponse.d.ts +1296 -24
- package/lib/twiml/VoiceResponse.js +2170 -82
- package/package.json +2 -2
|
@@ -0,0 +1,127 @@
|
|
|
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 V2 = require('../../../V2');
|
|
11
|
+
import { SerializableClass } from '../../../../../interfaces';
|
|
12
|
+
|
|
13
|
+
type ReplaceItemsEndUserType = 'individual'|'business';
|
|
14
|
+
|
|
15
|
+
type ReplaceItemsStatus = 'draft'|'pending-review'|'in-review'|'twilio-rejected'|'twilio-approved'|'provisionally-approved';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Initialize the ReplaceItemsList
|
|
19
|
+
*
|
|
20
|
+
* PLEASE NOTE that this class contains beta products that are subject to change.
|
|
21
|
+
* Use them with caution.
|
|
22
|
+
*
|
|
23
|
+
* @param version - Version of the resource
|
|
24
|
+
* @param bundleSid - The unique string that identifies the resource.
|
|
25
|
+
*/
|
|
26
|
+
declare function ReplaceItemsList(version: V2, bundleSid: string): ReplaceItemsListInstance;
|
|
27
|
+
|
|
28
|
+
interface ReplaceItemsListInstance {
|
|
29
|
+
/**
|
|
30
|
+
* create a ReplaceItemsInstance
|
|
31
|
+
*
|
|
32
|
+
* @param opts - Options for request
|
|
33
|
+
* @param callback - Callback to handle processed record
|
|
34
|
+
*/
|
|
35
|
+
create(opts: ReplaceItemsListInstanceCreateOptions, callback?: (error: Error | null, item: ReplaceItemsInstance) => any): Promise<ReplaceItemsInstance>;
|
|
36
|
+
/**
|
|
37
|
+
* Provide a user-friendly representation
|
|
38
|
+
*/
|
|
39
|
+
toJSON(): any;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Options to pass to create
|
|
44
|
+
*
|
|
45
|
+
* @property fromBundleSid - The source bundle sid to copy the item assignments from
|
|
46
|
+
*/
|
|
47
|
+
interface ReplaceItemsListInstanceCreateOptions {
|
|
48
|
+
fromBundleSid: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
interface ReplaceItemsPayload extends ReplaceItemsResource, Page.TwilioResponsePayload {
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
interface ReplaceItemsResource {
|
|
55
|
+
account_sid: string;
|
|
56
|
+
date_created: Date;
|
|
57
|
+
date_updated: Date;
|
|
58
|
+
email: string;
|
|
59
|
+
friendly_name: string;
|
|
60
|
+
regulation_sid: string;
|
|
61
|
+
sid: string;
|
|
62
|
+
status: ReplaceItemsStatus;
|
|
63
|
+
status_callback: string;
|
|
64
|
+
valid_until: Date;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
interface ReplaceItemsSolution {
|
|
68
|
+
bundleSid?: string;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
declare class ReplaceItemsInstance extends SerializableClass {
|
|
73
|
+
/**
|
|
74
|
+
* Initialize the ReplaceItemsContext
|
|
75
|
+
*
|
|
76
|
+
* PLEASE NOTE that this class contains beta products that are subject to change.
|
|
77
|
+
* Use them with caution.
|
|
78
|
+
*
|
|
79
|
+
* @param version - Version of the resource
|
|
80
|
+
* @param payload - The instance payload
|
|
81
|
+
* @param bundleSid - The unique string that identifies the resource.
|
|
82
|
+
*/
|
|
83
|
+
constructor(version: V2, payload: ReplaceItemsPayload, bundleSid: string);
|
|
84
|
+
|
|
85
|
+
accountSid: string;
|
|
86
|
+
dateCreated: Date;
|
|
87
|
+
dateUpdated: Date;
|
|
88
|
+
email: string;
|
|
89
|
+
friendlyName: string;
|
|
90
|
+
regulationSid: string;
|
|
91
|
+
sid: string;
|
|
92
|
+
status: ReplaceItemsStatus;
|
|
93
|
+
statusCallback: string;
|
|
94
|
+
/**
|
|
95
|
+
* Provide a user-friendly representation
|
|
96
|
+
*/
|
|
97
|
+
toJSON(): any;
|
|
98
|
+
validUntil: Date;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
declare class ReplaceItemsPage extends Page<V2, ReplaceItemsPayload, ReplaceItemsResource, ReplaceItemsInstance> {
|
|
103
|
+
/**
|
|
104
|
+
* Initialize the ReplaceItemsPage
|
|
105
|
+
*
|
|
106
|
+
* PLEASE NOTE that this class contains beta products that are subject to change.
|
|
107
|
+
* Use them with caution.
|
|
108
|
+
*
|
|
109
|
+
* @param version - Version of the resource
|
|
110
|
+
* @param response - Response from the API
|
|
111
|
+
* @param solution - Path solution
|
|
112
|
+
*/
|
|
113
|
+
constructor(version: V2, response: Response<string>, solution: ReplaceItemsSolution);
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Build an instance of ReplaceItemsInstance
|
|
117
|
+
*
|
|
118
|
+
* @param payload - Payload response from the API
|
|
119
|
+
*/
|
|
120
|
+
getInstance(payload: ReplaceItemsPayload): ReplaceItemsInstance;
|
|
121
|
+
/**
|
|
122
|
+
* Provide a user-friendly representation
|
|
123
|
+
*/
|
|
124
|
+
toJSON(): any;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export { ReplaceItemsEndUserType, ReplaceItemsInstance, ReplaceItemsList, ReplaceItemsListInstance, ReplaceItemsListInstanceCreateOptions, ReplaceItemsPage, ReplaceItemsPayload, ReplaceItemsResource, ReplaceItemsSolution, ReplaceItemsStatus }
|
|
@@ -0,0 +1,271 @@
|
|
|
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 ReplaceItemsList;
|
|
21
|
+
var ReplaceItemsPage;
|
|
22
|
+
var ReplaceItemsInstance;
|
|
23
|
+
|
|
24
|
+
/* jshint ignore:start */
|
|
25
|
+
/**
|
|
26
|
+
* Initialize the ReplaceItemsList
|
|
27
|
+
*
|
|
28
|
+
* PLEASE NOTE that this class contains beta products that are subject to change.
|
|
29
|
+
* Use them with caution.
|
|
30
|
+
*
|
|
31
|
+
* @constructor Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.ReplaceItemsList
|
|
32
|
+
*
|
|
33
|
+
* @param {Twilio.Numbers.V2} version - Version of the resource
|
|
34
|
+
* @param {string} bundleSid - The unique string that identifies the resource.
|
|
35
|
+
*/
|
|
36
|
+
/* jshint ignore:end */
|
|
37
|
+
ReplaceItemsList = function ReplaceItemsList(version, bundleSid) {
|
|
38
|
+
/* jshint ignore:start */
|
|
39
|
+
/**
|
|
40
|
+
* @function replaceItems
|
|
41
|
+
* @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext#
|
|
42
|
+
*
|
|
43
|
+
* @param {string} sid - sid of instance
|
|
44
|
+
*
|
|
45
|
+
* @returns {Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.ReplaceItemsContext}
|
|
46
|
+
*/
|
|
47
|
+
/* jshint ignore:end */
|
|
48
|
+
function ReplaceItemsListInstance(sid) {
|
|
49
|
+
return ReplaceItemsListInstance.get(sid);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
ReplaceItemsListInstance._version = version;
|
|
53
|
+
// Path Solution
|
|
54
|
+
ReplaceItemsListInstance._solution = {bundleSid: bundleSid};
|
|
55
|
+
ReplaceItemsListInstance._uri = `/RegulatoryCompliance/Bundles/${bundleSid}/ReplaceItems`;
|
|
56
|
+
/* jshint ignore:start */
|
|
57
|
+
/**
|
|
58
|
+
* create a ReplaceItemsInstance
|
|
59
|
+
*
|
|
60
|
+
* @function create
|
|
61
|
+
* @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.ReplaceItemsList#
|
|
62
|
+
*
|
|
63
|
+
* @param {object} opts - Options for request
|
|
64
|
+
* @param {string} opts.fromBundleSid -
|
|
65
|
+
* The source bundle sid to copy the item assignments from
|
|
66
|
+
* @param {function} [callback] - Callback to handle processed record
|
|
67
|
+
*
|
|
68
|
+
* @returns {Promise} Resolves to processed ReplaceItemsInstance
|
|
69
|
+
*/
|
|
70
|
+
/* jshint ignore:end */
|
|
71
|
+
ReplaceItemsListInstance.create = function create(opts, callback) {
|
|
72
|
+
if (_.isUndefined(opts)) {
|
|
73
|
+
throw new Error('Required parameter "opts" missing.');
|
|
74
|
+
}
|
|
75
|
+
if (_.isUndefined(opts.fromBundleSid)) {
|
|
76
|
+
throw new Error('Required parameter "opts.fromBundleSid" missing.');
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
var deferred = Q.defer();
|
|
80
|
+
var data = values.of({'FromBundleSid': _.get(opts, 'fromBundleSid')});
|
|
81
|
+
|
|
82
|
+
var promise = this._version.create({uri: this._uri, method: 'POST', data: data});
|
|
83
|
+
|
|
84
|
+
promise = promise.then(function(payload) {
|
|
85
|
+
deferred.resolve(new ReplaceItemsInstance(this._version, payload));
|
|
86
|
+
}.bind(this));
|
|
87
|
+
|
|
88
|
+
promise.catch(function(error) {
|
|
89
|
+
deferred.reject(error);
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
if (_.isFunction(callback)) {
|
|
93
|
+
deferred.promise.nodeify(callback);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
return deferred.promise;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
/* jshint ignore:start */
|
|
100
|
+
/**
|
|
101
|
+
* Provide a user-friendly representation
|
|
102
|
+
*
|
|
103
|
+
* @function toJSON
|
|
104
|
+
* @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.ReplaceItemsList#
|
|
105
|
+
*
|
|
106
|
+
* @returns Object
|
|
107
|
+
*/
|
|
108
|
+
/* jshint ignore:end */
|
|
109
|
+
ReplaceItemsListInstance.toJSON = function toJSON() {
|
|
110
|
+
return this._solution;
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
ReplaceItemsListInstance[util.inspect.custom] = function inspect(depth, options)
|
|
114
|
+
{
|
|
115
|
+
return util.inspect(this.toJSON(), options);
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
return ReplaceItemsListInstance;
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
/* jshint ignore:start */
|
|
123
|
+
/**
|
|
124
|
+
* Initialize the ReplaceItemsPage
|
|
125
|
+
*
|
|
126
|
+
* PLEASE NOTE that this class contains beta products that are subject to change.
|
|
127
|
+
* Use them with caution.
|
|
128
|
+
*
|
|
129
|
+
* @constructor Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.ReplaceItemsPage
|
|
130
|
+
*
|
|
131
|
+
* @param {V2} version - Version of the resource
|
|
132
|
+
* @param {Response<string>} response - Response from the API
|
|
133
|
+
* @param {ReplaceItemsSolution} solution - Path solution
|
|
134
|
+
*
|
|
135
|
+
* @returns ReplaceItemsPage
|
|
136
|
+
*/
|
|
137
|
+
/* jshint ignore:end */
|
|
138
|
+
ReplaceItemsPage = function ReplaceItemsPage(version, response, solution) {
|
|
139
|
+
// Path Solution
|
|
140
|
+
this._solution = solution;
|
|
141
|
+
|
|
142
|
+
Page.prototype.constructor.call(this, version, response, this._solution);
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
_.extend(ReplaceItemsPage.prototype, Page.prototype);
|
|
146
|
+
ReplaceItemsPage.prototype.constructor = ReplaceItemsPage;
|
|
147
|
+
|
|
148
|
+
/* jshint ignore:start */
|
|
149
|
+
/**
|
|
150
|
+
* Build an instance of ReplaceItemsInstance
|
|
151
|
+
*
|
|
152
|
+
* @function getInstance
|
|
153
|
+
* @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.ReplaceItemsPage#
|
|
154
|
+
*
|
|
155
|
+
* @param {ReplaceItemsPayload} payload - Payload response from the API
|
|
156
|
+
*
|
|
157
|
+
* @returns ReplaceItemsInstance
|
|
158
|
+
*/
|
|
159
|
+
/* jshint ignore:end */
|
|
160
|
+
ReplaceItemsPage.prototype.getInstance = function getInstance(payload) {
|
|
161
|
+
return new ReplaceItemsInstance(this._version, payload, this._solution.bundleSid);
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
/* jshint ignore:start */
|
|
165
|
+
/**
|
|
166
|
+
* Provide a user-friendly representation
|
|
167
|
+
*
|
|
168
|
+
* @function toJSON
|
|
169
|
+
* @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.ReplaceItemsPage#
|
|
170
|
+
*
|
|
171
|
+
* @returns Object
|
|
172
|
+
*/
|
|
173
|
+
/* jshint ignore:end */
|
|
174
|
+
ReplaceItemsPage.prototype.toJSON = function toJSON() {
|
|
175
|
+
let clone = {};
|
|
176
|
+
_.forOwn(this, function(value, key) {
|
|
177
|
+
if (!_.startsWith(key, '_') && ! _.isFunction(value)) {
|
|
178
|
+
clone[key] = value;
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
return clone;
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
ReplaceItemsPage.prototype[util.inspect.custom] = function inspect(depth,
|
|
185
|
+
options) {
|
|
186
|
+
return util.inspect(this.toJSON(), options);
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
/* jshint ignore:start */
|
|
191
|
+
/**
|
|
192
|
+
* Initialize the ReplaceItemsContext
|
|
193
|
+
*
|
|
194
|
+
* PLEASE NOTE that this class contains beta products that are subject to change.
|
|
195
|
+
* Use them with caution.
|
|
196
|
+
*
|
|
197
|
+
* @constructor Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.ReplaceItemsInstance
|
|
198
|
+
*
|
|
199
|
+
* @property {string} sid - The unique string that identifies the resource
|
|
200
|
+
* @property {string} accountSid - The SID of the Account that created the resource
|
|
201
|
+
* @property {string} regulationSid - The unique string of a regulation
|
|
202
|
+
* @property {string} friendlyName -
|
|
203
|
+
* The string that you assigned to describe the resource
|
|
204
|
+
* @property {replace_items.status} status -
|
|
205
|
+
* The verification status of the Bundle resource
|
|
206
|
+
* @property {Date} validUntil -
|
|
207
|
+
* The ISO 8601 date and time in GMT when the resource will be valid until
|
|
208
|
+
* @property {string} email - The email address
|
|
209
|
+
* @property {string} statusCallback -
|
|
210
|
+
* The URL we call to inform your application of status changes
|
|
211
|
+
* @property {Date} dateCreated -
|
|
212
|
+
* The ISO 8601 date and time in GMT when the resource was created
|
|
213
|
+
* @property {Date} dateUpdated -
|
|
214
|
+
* The ISO 8601 date and time in GMT when the resource was last updated
|
|
215
|
+
*
|
|
216
|
+
* @param {V2} version - Version of the resource
|
|
217
|
+
* @param {ReplaceItemsPayload} payload - The instance payload
|
|
218
|
+
* @param {sid} bundleSid - The unique string that identifies the resource.
|
|
219
|
+
*/
|
|
220
|
+
/* jshint ignore:end */
|
|
221
|
+
ReplaceItemsInstance = function ReplaceItemsInstance(version, payload,
|
|
222
|
+
bundleSid) {
|
|
223
|
+
this._version = version;
|
|
224
|
+
|
|
225
|
+
// Marshaled Properties
|
|
226
|
+
this.sid = payload.sid; // jshint ignore:line
|
|
227
|
+
this.accountSid = payload.account_sid; // jshint ignore:line
|
|
228
|
+
this.regulationSid = payload.regulation_sid; // jshint ignore:line
|
|
229
|
+
this.friendlyName = payload.friendly_name; // jshint ignore:line
|
|
230
|
+
this.status = payload.status; // jshint ignore:line
|
|
231
|
+
this.validUntil = deserialize.iso8601DateTime(payload.valid_until); // jshint ignore:line
|
|
232
|
+
this.email = payload.email; // jshint ignore:line
|
|
233
|
+
this.statusCallback = payload.status_callback; // jshint ignore:line
|
|
234
|
+
this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line
|
|
235
|
+
this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line
|
|
236
|
+
|
|
237
|
+
// Context
|
|
238
|
+
this._context = undefined;
|
|
239
|
+
this._solution = {bundleSid: bundleSid, };
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
/* jshint ignore:start */
|
|
243
|
+
/**
|
|
244
|
+
* Provide a user-friendly representation
|
|
245
|
+
*
|
|
246
|
+
* @function toJSON
|
|
247
|
+
* @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.ReplaceItemsInstance#
|
|
248
|
+
*
|
|
249
|
+
* @returns Object
|
|
250
|
+
*/
|
|
251
|
+
/* jshint ignore:end */
|
|
252
|
+
ReplaceItemsInstance.prototype.toJSON = function toJSON() {
|
|
253
|
+
let clone = {};
|
|
254
|
+
_.forOwn(this, function(value, key) {
|
|
255
|
+
if (!_.startsWith(key, '_') && ! _.isFunction(value)) {
|
|
256
|
+
clone[key] = value;
|
|
257
|
+
}
|
|
258
|
+
});
|
|
259
|
+
return clone;
|
|
260
|
+
};
|
|
261
|
+
|
|
262
|
+
ReplaceItemsInstance.prototype[util.inspect.custom] = function inspect(depth,
|
|
263
|
+
options) {
|
|
264
|
+
return util.inspect(this.toJSON(), options);
|
|
265
|
+
};
|
|
266
|
+
|
|
267
|
+
module.exports = {
|
|
268
|
+
ReplaceItemsList: ReplaceItemsList,
|
|
269
|
+
ReplaceItemsPage: ReplaceItemsPage,
|
|
270
|
+
ReplaceItemsInstance: ReplaceItemsInstance
|
|
271
|
+
};
|
|
@@ -8,10 +8,14 @@
|
|
|
8
8
|
import Page = require('../../../../base/Page');
|
|
9
9
|
import Response = require('../../../../http/response');
|
|
10
10
|
import V2 = require('../../V2');
|
|
11
|
+
import { BundleCopyList } from './bundle/bundleCopy';
|
|
12
|
+
import { BundleCopyListInstance } from './bundle/bundleCopy';
|
|
11
13
|
import { EvaluationList } from './bundle/evaluation';
|
|
12
14
|
import { EvaluationListInstance } from './bundle/evaluation';
|
|
13
15
|
import { ItemAssignmentList } from './bundle/itemAssignment';
|
|
14
16
|
import { ItemAssignmentListInstance } from './bundle/itemAssignment';
|
|
17
|
+
import { ReplaceItemsList } from './bundle/replaceItems';
|
|
18
|
+
import { ReplaceItemsListInstance } from './bundle/replaceItems';
|
|
15
19
|
import { SerializableClass } from '../../../../interfaces';
|
|
16
20
|
|
|
17
21
|
type BundleEndUserType = 'individual'|'business';
|
|
@@ -299,6 +303,7 @@ declare class BundleContext {
|
|
|
299
303
|
*/
|
|
300
304
|
constructor(version: V2, sid: string);
|
|
301
305
|
|
|
306
|
+
bundleCopies: BundleCopyListInstance;
|
|
302
307
|
evaluations: EvaluationListInstance;
|
|
303
308
|
/**
|
|
304
309
|
* fetch a BundleInstance
|
|
@@ -313,6 +318,7 @@ declare class BundleContext {
|
|
|
313
318
|
* @param callback - Callback to handle processed record
|
|
314
319
|
*/
|
|
315
320
|
remove(callback?: (error: Error | null, items: BundleInstance) => any): Promise<boolean>;
|
|
321
|
+
replaceItems: ReplaceItemsListInstance;
|
|
316
322
|
/**
|
|
317
323
|
* Provide a user-friendly representation
|
|
318
324
|
*/
|
|
@@ -345,6 +351,10 @@ declare class BundleInstance extends SerializableClass {
|
|
|
345
351
|
|
|
346
352
|
private _proxy: BundleContext;
|
|
347
353
|
accountSid: string;
|
|
354
|
+
/**
|
|
355
|
+
* Access the bundleCopies
|
|
356
|
+
*/
|
|
357
|
+
bundleCopies(): BundleCopyListInstance;
|
|
348
358
|
dateCreated: Date;
|
|
349
359
|
dateUpdated: Date;
|
|
350
360
|
email: string;
|
|
@@ -371,6 +381,10 @@ declare class BundleInstance extends SerializableClass {
|
|
|
371
381
|
* @param callback - Callback to handle processed record
|
|
372
382
|
*/
|
|
373
383
|
remove(callback?: (error: Error | null, items: BundleInstance) => any): Promise<boolean>;
|
|
384
|
+
/**
|
|
385
|
+
* Access the replaceItems
|
|
386
|
+
*/
|
|
387
|
+
replaceItems(): ReplaceItemsListInstance;
|
|
374
388
|
sid: string;
|
|
375
389
|
status: BundleStatus;
|
|
376
390
|
statusCallback: string;
|
|
@@ -12,9 +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 BundleCopyList = require('./bundle/bundleCopy').BundleCopyList;
|
|
15
16
|
var EvaluationList = require('./bundle/evaluation').EvaluationList;
|
|
16
17
|
var ItemAssignmentList = require('./bundle/itemAssignment').ItemAssignmentList;
|
|
17
18
|
var Page = require('../../../../base/Page'); /* jshint ignore:line */
|
|
19
|
+
var ReplaceItemsList = require('./bundle/replaceItems').ReplaceItemsList;
|
|
18
20
|
var deserialize = require(
|
|
19
21
|
'../../../../base/deserialize'); /* jshint ignore:line */
|
|
20
22
|
var values = require('../../../../base/values'); /* jshint ignore:line */
|
|
@@ -631,6 +633,34 @@ BundleInstance.prototype.itemAssignments = function itemAssignments() {
|
|
|
631
633
|
return this._proxy.itemAssignments;
|
|
632
634
|
};
|
|
633
635
|
|
|
636
|
+
/* jshint ignore:start */
|
|
637
|
+
/**
|
|
638
|
+
* Access the bundleCopies
|
|
639
|
+
*
|
|
640
|
+
* @function bundleCopies
|
|
641
|
+
* @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleInstance#
|
|
642
|
+
*
|
|
643
|
+
* @returns {Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.BundleCopyList}
|
|
644
|
+
*/
|
|
645
|
+
/* jshint ignore:end */
|
|
646
|
+
BundleInstance.prototype.bundleCopies = function bundleCopies() {
|
|
647
|
+
return this._proxy.bundleCopies;
|
|
648
|
+
};
|
|
649
|
+
|
|
650
|
+
/* jshint ignore:start */
|
|
651
|
+
/**
|
|
652
|
+
* Access the replaceItems
|
|
653
|
+
*
|
|
654
|
+
* @function replaceItems
|
|
655
|
+
* @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleInstance#
|
|
656
|
+
*
|
|
657
|
+
* @returns {Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.ReplaceItemsList}
|
|
658
|
+
*/
|
|
659
|
+
/* jshint ignore:end */
|
|
660
|
+
BundleInstance.prototype.replaceItems = function replaceItems() {
|
|
661
|
+
return this._proxy.replaceItems;
|
|
662
|
+
};
|
|
663
|
+
|
|
634
664
|
/* jshint ignore:start */
|
|
635
665
|
/**
|
|
636
666
|
* Provide a user-friendly representation
|
|
@@ -667,6 +697,10 @@ BundleInstance.prototype[util.inspect.custom] = function inspect(depth, options)
|
|
|
667
697
|
* evaluations resource
|
|
668
698
|
* @property {Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.ItemAssignmentList} itemAssignments -
|
|
669
699
|
* itemAssignments resource
|
|
700
|
+
* @property {Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.BundleCopyList} bundleCopies -
|
|
701
|
+
* bundleCopies resource
|
|
702
|
+
* @property {Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.ReplaceItemsList} replaceItems -
|
|
703
|
+
* replaceItems resource
|
|
670
704
|
*
|
|
671
705
|
* @param {V2} version - Version of the resource
|
|
672
706
|
* @param {sid} sid - The unique string that identifies the resource.
|
|
@@ -682,6 +716,8 @@ BundleContext = function BundleContext(version, sid) {
|
|
|
682
716
|
// Dependents
|
|
683
717
|
this._evaluations = undefined;
|
|
684
718
|
this._itemAssignments = undefined;
|
|
719
|
+
this._bundleCopies = undefined;
|
|
720
|
+
this._replaceItems = undefined;
|
|
685
721
|
};
|
|
686
722
|
|
|
687
723
|
/* jshint ignore:start */
|
|
@@ -818,6 +854,26 @@ Object.defineProperty(BundleContext.prototype,
|
|
|
818
854
|
}
|
|
819
855
|
});
|
|
820
856
|
|
|
857
|
+
Object.defineProperty(BundleContext.prototype,
|
|
858
|
+
'bundleCopies', {
|
|
859
|
+
get: function() {
|
|
860
|
+
if (!this._bundleCopies) {
|
|
861
|
+
this._bundleCopies = new BundleCopyList(this._version, this._solution.sid);
|
|
862
|
+
}
|
|
863
|
+
return this._bundleCopies;
|
|
864
|
+
}
|
|
865
|
+
});
|
|
866
|
+
|
|
867
|
+
Object.defineProperty(BundleContext.prototype,
|
|
868
|
+
'replaceItems', {
|
|
869
|
+
get: function() {
|
|
870
|
+
if (!this._replaceItems) {
|
|
871
|
+
this._replaceItems = new ReplaceItemsList(this._version, this._solution.sid);
|
|
872
|
+
}
|
|
873
|
+
return this._replaceItems;
|
|
874
|
+
}
|
|
875
|
+
});
|
|
876
|
+
|
|
821
877
|
/* jshint ignore:start */
|
|
822
878
|
/**
|
|
823
879
|
* Provide a user-friendly representation
|
|
@@ -12,7 +12,7 @@ import { BuildStatusList } from './build/buildStatus';
|
|
|
12
12
|
import { BuildStatusListInstance } from './build/buildStatus';
|
|
13
13
|
import { SerializableClass } from '../../../../interfaces';
|
|
14
14
|
|
|
15
|
-
type BuildRuntime = 'node8'|'node10'|'node12';
|
|
15
|
+
type BuildRuntime = 'node8'|'node10'|'node12'|'node14';
|
|
16
16
|
|
|
17
17
|
type BuildStatus = 'building'|'completed'|'failed';
|
|
18
18
|
|
|
@@ -481,7 +481,7 @@ EnvironmentPage.prototype[util.inspect.custom] = function inspect(depth,
|
|
|
481
481
|
* @property {string} domainSuffix -
|
|
482
482
|
* A URL-friendly name that represents the environment
|
|
483
483
|
* @property {string} domainName -
|
|
484
|
-
* The
|
|
484
|
+
* The domain name for all Functions and Assets deployed in the Environment
|
|
485
485
|
* @property {Date} dateCreated -
|
|
486
486
|
* The ISO 8601 date and time in GMT when the Environment resource was created
|
|
487
487
|
* @property {Date} dateUpdated -
|
|
@@ -240,6 +240,7 @@ interface ServiceResource {
|
|
|
240
240
|
account_sid: string;
|
|
241
241
|
date_created: Date;
|
|
242
242
|
date_updated: Date;
|
|
243
|
+
domain_base: string;
|
|
243
244
|
friendly_name: string;
|
|
244
245
|
include_credentials: boolean;
|
|
245
246
|
links: string;
|
|
@@ -326,6 +327,7 @@ declare class ServiceInstance extends SerializableClass {
|
|
|
326
327
|
builds(): BuildListInstance;
|
|
327
328
|
dateCreated: Date;
|
|
328
329
|
dateUpdated: Date;
|
|
330
|
+
domainBase: string;
|
|
329
331
|
/**
|
|
330
332
|
* Access the environments
|
|
331
333
|
*/
|
|
@@ -481,6 +481,8 @@ ServicePage.prototype[util.inspect.custom] = function inspect(depth, options) {
|
|
|
481
481
|
* Whether to inject Account credentials into a function invocation context
|
|
482
482
|
* @property {boolean} uiEditable -
|
|
483
483
|
* Whether the Service resource's properties and subresources can be edited via the UI
|
|
484
|
+
* @property {string} domainBase -
|
|
485
|
+
* The base domain name for this Service, which is a combination of the unique name and a randomly generated string
|
|
484
486
|
* @property {Date} dateCreated -
|
|
485
487
|
* The ISO 8601 date and time in GMT when the Service resource was created
|
|
486
488
|
* @property {Date} dateUpdated -
|
|
@@ -503,6 +505,7 @@ ServiceInstance = function ServiceInstance(version, payload, sid) {
|
|
|
503
505
|
this.uniqueName = payload.unique_name; // jshint ignore:line
|
|
504
506
|
this.includeCredentials = payload.include_credentials; // jshint ignore:line
|
|
505
507
|
this.uiEditable = payload.ui_editable; // jshint ignore:line
|
|
508
|
+
this.domainBase = payload.domain_base; // jshint ignore:line
|
|
506
509
|
this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line
|
|
507
510
|
this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line
|
|
508
511
|
this.url = payload.url; // jshint ignore:line
|
|
@@ -57,6 +57,7 @@ declare function ReservationList(version: V1, workspaceSid: string, taskSid: str
|
|
|
57
57
|
* @property endConferenceOnCustomerExit - Whether to end the conference when the customer leaves
|
|
58
58
|
* @property endConferenceOnExit - Whether to end the conference when the agent leaves
|
|
59
59
|
* @property from - The Caller ID of the call to the worker when executing a Conference instruction
|
|
60
|
+
* @property ifMatch - The If-Match HTTP request header
|
|
60
61
|
* @property instruction - The assignment instruction for reservation
|
|
61
62
|
* @property maxParticipants - The maximum number of agent conference participants
|
|
62
63
|
* @property muted - Whether to mute the agent
|
|
@@ -112,6 +113,7 @@ interface ReservationInstanceUpdateOptions {
|
|
|
112
113
|
endConferenceOnCustomerExit?: boolean;
|
|
113
114
|
endConferenceOnExit?: boolean;
|
|
114
115
|
from?: string;
|
|
116
|
+
ifMatch?: string;
|
|
115
117
|
instruction?: string;
|
|
116
118
|
maxParticipants?: number;
|
|
117
119
|
muted?: boolean;
|
|
@@ -613,6 +613,7 @@ ReservationInstance.prototype.fetch = function fetch(callback) {
|
|
|
613
613
|
* Whether to end the conference when the customer leaves
|
|
614
614
|
* @param {boolean} [opts.beepOnCustomerEntrance] -
|
|
615
615
|
* Whether to play a notification beep when the customer joins
|
|
616
|
+
* @param {string} [opts.ifMatch] - The If-Match HTTP request header
|
|
616
617
|
* @param {function} [callback] - Callback to handle processed record
|
|
617
618
|
*
|
|
618
619
|
* @returns {Promise} Resolves to processed ReservationInstance
|
|
@@ -818,6 +819,7 @@ ReservationContext.prototype.fetch = function fetch(callback) {
|
|
|
818
819
|
* Whether to end the conference when the customer leaves
|
|
819
820
|
* @param {boolean} [opts.beepOnCustomerEntrance] -
|
|
820
821
|
* Whether to play a notification beep when the customer joins
|
|
822
|
+
* @param {string} [opts.ifMatch] - The If-Match HTTP request header
|
|
821
823
|
* @param {function} [callback] - Callback to handle processed record
|
|
822
824
|
*
|
|
823
825
|
* @returns {Promise} Resolves to processed ReservationInstance
|
|
@@ -886,8 +888,9 @@ ReservationContext.prototype.update = function update(opts, callback) {
|
|
|
886
888
|
'EndConferenceOnCustomerExit': serialize.bool(_.get(opts, 'endConferenceOnCustomerExit')),
|
|
887
889
|
'BeepOnCustomerEntrance': serialize.bool(_.get(opts, 'beepOnCustomerEntrance'))
|
|
888
890
|
});
|
|
891
|
+
var headers = values.of({'If-Match': _.get(opts, 'ifMatch')});
|
|
889
892
|
|
|
890
|
-
var promise = this._version.update({uri: this._uri, method: 'POST', data: data});
|
|
893
|
+
var promise = this._version.update({uri: this._uri, method: 'POST', data: data, headers: headers});
|
|
891
894
|
|
|
892
895
|
promise = promise.then(function(payload) {
|
|
893
896
|
deferred.resolve(new ReservationInstance(
|
|
@@ -55,6 +55,7 @@ declare function ReservationList(version: V1, workspaceSid: string, workerSid: s
|
|
|
55
55
|
* @property endConferenceOnCustomerExit - Whether to end the conference when the customer leaves
|
|
56
56
|
* @property endConferenceOnExit - Whether to end the conference when the agent leaves
|
|
57
57
|
* @property from - The caller ID of the call to the worker when executing a Conference instruction
|
|
58
|
+
* @property ifMatch - The If-Match HTTP request header
|
|
58
59
|
* @property instruction - The assignment instruction for the reservation
|
|
59
60
|
* @property maxParticipants - The maximum number of agent conference participants
|
|
60
61
|
* @property muted - Whether to mute the agent
|
|
@@ -108,6 +109,7 @@ interface ReservationInstanceUpdateOptions {
|
|
|
108
109
|
endConferenceOnCustomerExit?: boolean;
|
|
109
110
|
endConferenceOnExit?: boolean;
|
|
110
111
|
from?: string;
|
|
112
|
+
ifMatch?: string;
|
|
111
113
|
instruction?: string;
|
|
112
114
|
maxParticipants?: number;
|
|
113
115
|
muted?: boolean;
|
|
@@ -610,6 +610,7 @@ ReservationInstance.prototype.fetch = function fetch(callback) {
|
|
|
610
610
|
* Whether to end the conference when the customer leaves
|
|
611
611
|
* @param {boolean} [opts.beepOnCustomerEntrance] -
|
|
612
612
|
* Whether to play a notification beep when the customer joins
|
|
613
|
+
* @param {string} [opts.ifMatch] - The If-Match HTTP request header
|
|
613
614
|
* @param {function} [callback] - Callback to handle processed record
|
|
614
615
|
*
|
|
615
616
|
* @returns {Promise} Resolves to processed ReservationInstance
|
|
@@ -812,6 +813,7 @@ ReservationContext.prototype.fetch = function fetch(callback) {
|
|
|
812
813
|
* Whether to end the conference when the customer leaves
|
|
813
814
|
* @param {boolean} [opts.beepOnCustomerEntrance] -
|
|
814
815
|
* Whether to play a notification beep when the customer joins
|
|
816
|
+
* @param {string} [opts.ifMatch] - The If-Match HTTP request header
|
|
815
817
|
* @param {function} [callback] - Callback to handle processed record
|
|
816
818
|
*
|
|
817
819
|
* @returns {Promise} Resolves to processed ReservationInstance
|
|
@@ -878,8 +880,9 @@ ReservationContext.prototype.update = function update(opts, callback) {
|
|
|
878
880
|
'EndConferenceOnCustomerExit': serialize.bool(_.get(opts, 'endConferenceOnCustomerExit')),
|
|
879
881
|
'BeepOnCustomerEntrance': serialize.bool(_.get(opts, 'beepOnCustomerEntrance'))
|
|
880
882
|
});
|
|
883
|
+
var headers = values.of({'If-Match': _.get(opts, 'ifMatch')});
|
|
881
884
|
|
|
882
|
-
var promise = this._version.update({uri: this._uri, method: 'POST', data: data});
|
|
885
|
+
var promise = this._version.update({uri: this._uri, method: 'POST', data: data, headers: headers});
|
|
883
886
|
|
|
884
887
|
promise = promise.then(function(payload) {
|
|
885
888
|
deferred.resolve(new ReservationInstance(
|