twilio 5.0.0 → 5.0.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/lib/rest/Oauth.d.ts +4 -0
- package/lib/rest/{Media.js → Oauth.js} +3 -3
- package/lib/rest/{MediaBase.d.ts → OauthBase.d.ts} +4 -4
- package/lib/rest/{MediaBase.js → OauthBase.js} +5 -5
- package/lib/rest/Twilio.d.ts +5 -5
- package/lib/rest/Twilio.js +5 -5
- package/lib/rest/api/v2010/account/call.d.ts +34 -10
- package/lib/rest/api/v2010/account/call.js +8 -0
- package/lib/rest/api/v2010/account/conference/participant.d.ts +6 -0
- package/lib/rest/api/v2010/account/conference/participant.js +2 -0
- package/lib/rest/api/v2010/account/conference.d.ts +24 -0
- package/lib/rest/api/v2010/account/conference.js +8 -0
- package/lib/rest/api/v2010/account/message.d.ts +12 -0
- package/lib/rest/api/v2010/account/message.js +4 -0
- package/lib/rest/content/v1/content/approvalCreate.d.ts +3 -3
- package/lib/rest/content/v1/content/approvalCreate.js +7 -7
- package/lib/rest/content/v1/content/approvalFetch.d.ts +5 -5
- package/lib/rest/content/v1/content/approvalFetch.js +14 -14
- package/lib/rest/content/v1/content.d.ts +20 -0
- package/lib/rest/content/v1/content.js +10 -1
- package/lib/rest/conversations/v1/service/conversation.d.ts +6 -6
- package/lib/rest/flexApi/v1/plugin.d.ts +4 -0
- package/lib/rest/flexApi/v1/plugin.js +4 -0
- package/lib/rest/numbers/v1/portingPortInFetch.d.ts +6 -0
- package/lib/rest/numbers/v1/portingPortInFetch.js +2 -0
- package/lib/rest/numbers/v2/regulatoryCompliance/bundle.d.ts +12 -0
- package/lib/rest/numbers/v2/regulatoryCompliance/bundle.js +4 -0
- package/lib/rest/oauth/V1.d.ts +20 -0
- package/lib/rest/oauth/V1.js +42 -0
- package/lib/rest/oauth/v1/authorize.d.ts +69 -0
- package/lib/rest/oauth/v1/authorize.js +83 -0
- package/lib/rest/oauth/v1/token.d.ts +88 -0
- package/lib/rest/oauth/v1/token.js +98 -0
- package/lib/rest/trusthub/v1/complianceRegistrationInquiries.d.ts +84 -10
- package/lib/rest/trusthub/v1/complianceRegistrationInquiries.js +92 -28
- package/lib/rest/trusthub/v1/customerProfiles/customerProfilesEntityAssignments.d.ts +6 -0
- package/lib/rest/trusthub/v1/customerProfiles/customerProfilesEntityAssignments.js +2 -0
- package/lib/rest/trusthub/v1/trustProducts/trustProductsEntityAssignments.d.ts +6 -0
- package/lib/rest/trusthub/v1/trustProducts/trustProductsEntityAssignments.js +2 -0
- package/lib/rest/trusthub/v1/trustProducts.d.ts +16 -16
- package/lib/twiml/VoiceResponse.d.ts +2 -2
- package/package.json +1 -1
- package/lib/rest/Media.d.ts +0 -4
- package/lib/rest/media/V1.d.ts +0 -25
- package/lib/rest/media/V1.js +0 -51
- package/lib/rest/media/v1/mediaProcessor.d.ts +0 -317
- package/lib/rest/media/v1/mediaProcessor.js +0 -256
- package/lib/rest/media/v1/mediaRecording.d.ts +0 -309
- package/lib/rest/media/v1/mediaRecording.js +0 -226
- package/lib/rest/media/v1/playerStreamer/playbackGrant.d.ts +0 -151
- package/lib/rest/media/v1/playerStreamer/playbackGrant.js +0 -146
- package/lib/rest/media/v1/playerStreamer.d.ts +0 -327
- package/lib/rest/media/v1/playerStreamer.js +0 -264
|
@@ -1,264 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* This code was generated by
|
|
4
|
-
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
|
5
|
-
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
|
6
|
-
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
|
7
|
-
*
|
|
8
|
-
* Twilio - Media
|
|
9
|
-
* This is the public Twilio REST API.
|
|
10
|
-
*
|
|
11
|
-
* NOTE: This class is auto generated by OpenAPI Generator.
|
|
12
|
-
* https://openapi-generator.tech
|
|
13
|
-
* Do not edit the class manually.
|
|
14
|
-
*/
|
|
15
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
16
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
17
|
-
};
|
|
18
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.PlayerStreamerPage = exports.PlayerStreamerListInstance = exports.PlayerStreamerInstance = exports.PlayerStreamerContextImpl = void 0;
|
|
20
|
-
const util_1 = require("util");
|
|
21
|
-
const Page_1 = __importDefault(require("../../../base/Page"));
|
|
22
|
-
const deserialize = require("../../../base/deserialize");
|
|
23
|
-
const serialize = require("../../../base/serialize");
|
|
24
|
-
const utility_1 = require("../../../base/utility");
|
|
25
|
-
const playbackGrant_1 = require("./playerStreamer/playbackGrant");
|
|
26
|
-
class PlayerStreamerContextImpl {
|
|
27
|
-
constructor(_version, sid) {
|
|
28
|
-
this._version = _version;
|
|
29
|
-
if (!(0, utility_1.isValidPathParam)(sid)) {
|
|
30
|
-
throw new Error("Parameter 'sid' is not valid.");
|
|
31
|
-
}
|
|
32
|
-
this._solution = { sid };
|
|
33
|
-
this._uri = `/PlayerStreamers/${sid}`;
|
|
34
|
-
}
|
|
35
|
-
get playbackGrant() {
|
|
36
|
-
this._playbackGrant =
|
|
37
|
-
this._playbackGrant ||
|
|
38
|
-
(0, playbackGrant_1.PlaybackGrantListInstance)(this._version, this._solution.sid);
|
|
39
|
-
return this._playbackGrant;
|
|
40
|
-
}
|
|
41
|
-
fetch(callback) {
|
|
42
|
-
const instance = this;
|
|
43
|
-
let operationVersion = instance._version, operationPromise = operationVersion.fetch({
|
|
44
|
-
uri: instance._uri,
|
|
45
|
-
method: "get",
|
|
46
|
-
});
|
|
47
|
-
operationPromise = operationPromise.then((payload) => new PlayerStreamerInstance(operationVersion, payload, instance._solution.sid));
|
|
48
|
-
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
49
|
-
return operationPromise;
|
|
50
|
-
}
|
|
51
|
-
update(params, callback) {
|
|
52
|
-
if (params === null || params === undefined) {
|
|
53
|
-
throw new Error('Required parameter "params" missing.');
|
|
54
|
-
}
|
|
55
|
-
if (params["status"] === null || params["status"] === undefined) {
|
|
56
|
-
throw new Error("Required parameter \"params['status']\" missing.");
|
|
57
|
-
}
|
|
58
|
-
let data = {};
|
|
59
|
-
data["Status"] = params["status"];
|
|
60
|
-
const headers = {};
|
|
61
|
-
headers["Content-Type"] = "application/x-www-form-urlencoded";
|
|
62
|
-
const instance = this;
|
|
63
|
-
let operationVersion = instance._version, operationPromise = operationVersion.update({
|
|
64
|
-
uri: instance._uri,
|
|
65
|
-
method: "post",
|
|
66
|
-
data,
|
|
67
|
-
headers,
|
|
68
|
-
});
|
|
69
|
-
operationPromise = operationPromise.then((payload) => new PlayerStreamerInstance(operationVersion, payload, instance._solution.sid));
|
|
70
|
-
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
71
|
-
return operationPromise;
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Provide a user-friendly representation
|
|
75
|
-
*
|
|
76
|
-
* @returns Object
|
|
77
|
-
*/
|
|
78
|
-
toJSON() {
|
|
79
|
-
return this._solution;
|
|
80
|
-
}
|
|
81
|
-
[util_1.inspect.custom](_depth, options) {
|
|
82
|
-
return (0, util_1.inspect)(this.toJSON(), options);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
exports.PlayerStreamerContextImpl = PlayerStreamerContextImpl;
|
|
86
|
-
class PlayerStreamerInstance {
|
|
87
|
-
constructor(_version, payload, sid) {
|
|
88
|
-
this._version = _version;
|
|
89
|
-
this.accountSid = payload.account_sid;
|
|
90
|
-
this.dateCreated = deserialize.iso8601DateTime(payload.date_created);
|
|
91
|
-
this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated);
|
|
92
|
-
this.video = payload.video;
|
|
93
|
-
this.links = payload.links;
|
|
94
|
-
this.sid = payload.sid;
|
|
95
|
-
this.status = payload.status;
|
|
96
|
-
this.url = payload.url;
|
|
97
|
-
this.statusCallback = payload.status_callback;
|
|
98
|
-
this.statusCallbackMethod = payload.status_callback_method;
|
|
99
|
-
this.endedReason = payload.ended_reason;
|
|
100
|
-
this.maxDuration = deserialize.integer(payload.max_duration);
|
|
101
|
-
this._solution = { sid: sid || this.sid };
|
|
102
|
-
}
|
|
103
|
-
get _proxy() {
|
|
104
|
-
this._context =
|
|
105
|
-
this._context ||
|
|
106
|
-
new PlayerStreamerContextImpl(this._version, this._solution.sid);
|
|
107
|
-
return this._context;
|
|
108
|
-
}
|
|
109
|
-
/**
|
|
110
|
-
* Fetch a PlayerStreamerInstance
|
|
111
|
-
*
|
|
112
|
-
* @param callback - Callback to handle processed record
|
|
113
|
-
*
|
|
114
|
-
* @returns Resolves to processed PlayerStreamerInstance
|
|
115
|
-
*/
|
|
116
|
-
fetch(callback) {
|
|
117
|
-
return this._proxy.fetch(callback);
|
|
118
|
-
}
|
|
119
|
-
update(params, callback) {
|
|
120
|
-
return this._proxy.update(params, callback);
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* Access the playbackGrant.
|
|
124
|
-
*/
|
|
125
|
-
playbackGrant() {
|
|
126
|
-
return this._proxy.playbackGrant;
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* Provide a user-friendly representation
|
|
130
|
-
*
|
|
131
|
-
* @returns Object
|
|
132
|
-
*/
|
|
133
|
-
toJSON() {
|
|
134
|
-
return {
|
|
135
|
-
accountSid: this.accountSid,
|
|
136
|
-
dateCreated: this.dateCreated,
|
|
137
|
-
dateUpdated: this.dateUpdated,
|
|
138
|
-
video: this.video,
|
|
139
|
-
links: this.links,
|
|
140
|
-
sid: this.sid,
|
|
141
|
-
status: this.status,
|
|
142
|
-
url: this.url,
|
|
143
|
-
statusCallback: this.statusCallback,
|
|
144
|
-
statusCallbackMethod: this.statusCallbackMethod,
|
|
145
|
-
endedReason: this.endedReason,
|
|
146
|
-
maxDuration: this.maxDuration,
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
[util_1.inspect.custom](_depth, options) {
|
|
150
|
-
return (0, util_1.inspect)(this.toJSON(), options);
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
exports.PlayerStreamerInstance = PlayerStreamerInstance;
|
|
154
|
-
function PlayerStreamerListInstance(version) {
|
|
155
|
-
const instance = ((sid) => instance.get(sid));
|
|
156
|
-
instance.get = function get(sid) {
|
|
157
|
-
return new PlayerStreamerContextImpl(version, sid);
|
|
158
|
-
};
|
|
159
|
-
instance._version = version;
|
|
160
|
-
instance._solution = {};
|
|
161
|
-
instance._uri = `/PlayerStreamers`;
|
|
162
|
-
instance.create = function create(params, callback) {
|
|
163
|
-
if (params instanceof Function) {
|
|
164
|
-
callback = params;
|
|
165
|
-
params = {};
|
|
166
|
-
}
|
|
167
|
-
else {
|
|
168
|
-
params = params || {};
|
|
169
|
-
}
|
|
170
|
-
let data = {};
|
|
171
|
-
if (params["video"] !== undefined)
|
|
172
|
-
data["Video"] = serialize.bool(params["video"]);
|
|
173
|
-
if (params["statusCallback"] !== undefined)
|
|
174
|
-
data["StatusCallback"] = params["statusCallback"];
|
|
175
|
-
if (params["statusCallbackMethod"] !== undefined)
|
|
176
|
-
data["StatusCallbackMethod"] = params["statusCallbackMethod"];
|
|
177
|
-
if (params["maxDuration"] !== undefined)
|
|
178
|
-
data["MaxDuration"] = params["maxDuration"];
|
|
179
|
-
const headers = {};
|
|
180
|
-
headers["Content-Type"] = "application/x-www-form-urlencoded";
|
|
181
|
-
let operationVersion = version, operationPromise = operationVersion.create({
|
|
182
|
-
uri: instance._uri,
|
|
183
|
-
method: "post",
|
|
184
|
-
data,
|
|
185
|
-
headers,
|
|
186
|
-
});
|
|
187
|
-
operationPromise = operationPromise.then((payload) => new PlayerStreamerInstance(operationVersion, payload));
|
|
188
|
-
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
189
|
-
return operationPromise;
|
|
190
|
-
};
|
|
191
|
-
instance.page = function page(params, callback) {
|
|
192
|
-
if (params instanceof Function) {
|
|
193
|
-
callback = params;
|
|
194
|
-
params = {};
|
|
195
|
-
}
|
|
196
|
-
else {
|
|
197
|
-
params = params || {};
|
|
198
|
-
}
|
|
199
|
-
let data = {};
|
|
200
|
-
if (params["order"] !== undefined)
|
|
201
|
-
data["Order"] = params["order"];
|
|
202
|
-
if (params["status"] !== undefined)
|
|
203
|
-
data["Status"] = params["status"];
|
|
204
|
-
if (params["pageSize"] !== undefined)
|
|
205
|
-
data["PageSize"] = params["pageSize"];
|
|
206
|
-
if (params.pageNumber !== undefined)
|
|
207
|
-
data["Page"] = params.pageNumber;
|
|
208
|
-
if (params.pageToken !== undefined)
|
|
209
|
-
data["PageToken"] = params.pageToken;
|
|
210
|
-
const headers = {};
|
|
211
|
-
let operationVersion = version, operationPromise = operationVersion.page({
|
|
212
|
-
uri: instance._uri,
|
|
213
|
-
method: "get",
|
|
214
|
-
params: data,
|
|
215
|
-
headers,
|
|
216
|
-
});
|
|
217
|
-
operationPromise = operationPromise.then((payload) => new PlayerStreamerPage(operationVersion, payload, instance._solution));
|
|
218
|
-
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
219
|
-
return operationPromise;
|
|
220
|
-
};
|
|
221
|
-
instance.each = instance._version.each;
|
|
222
|
-
instance.list = instance._version.list;
|
|
223
|
-
instance.getPage = function getPage(targetUrl, callback) {
|
|
224
|
-
const operationPromise = instance._version._domain.twilio.request({
|
|
225
|
-
method: "get",
|
|
226
|
-
uri: targetUrl,
|
|
227
|
-
});
|
|
228
|
-
let pagePromise = operationPromise.then((payload) => new PlayerStreamerPage(instance._version, payload, instance._solution));
|
|
229
|
-
pagePromise = instance._version.setPromiseCallback(pagePromise, callback);
|
|
230
|
-
return pagePromise;
|
|
231
|
-
};
|
|
232
|
-
instance.toJSON = function toJSON() {
|
|
233
|
-
return instance._solution;
|
|
234
|
-
};
|
|
235
|
-
instance[util_1.inspect.custom] = function inspectImpl(_depth, options) {
|
|
236
|
-
return (0, util_1.inspect)(instance.toJSON(), options);
|
|
237
|
-
};
|
|
238
|
-
return instance;
|
|
239
|
-
}
|
|
240
|
-
exports.PlayerStreamerListInstance = PlayerStreamerListInstance;
|
|
241
|
-
class PlayerStreamerPage extends Page_1.default {
|
|
242
|
-
/**
|
|
243
|
-
* Initialize the PlayerStreamerPage
|
|
244
|
-
*
|
|
245
|
-
* @param version - Version of the resource
|
|
246
|
-
* @param response - Response from the API
|
|
247
|
-
* @param solution - Path solution
|
|
248
|
-
*/
|
|
249
|
-
constructor(version, response, solution) {
|
|
250
|
-
super(version, response, solution);
|
|
251
|
-
}
|
|
252
|
-
/**
|
|
253
|
-
* Build an instance of PlayerStreamerInstance
|
|
254
|
-
*
|
|
255
|
-
* @param payload - Payload response from the API
|
|
256
|
-
*/
|
|
257
|
-
getInstance(payload) {
|
|
258
|
-
return new PlayerStreamerInstance(this._version, payload);
|
|
259
|
-
}
|
|
260
|
-
[util_1.inspect.custom](depth, options) {
|
|
261
|
-
return (0, util_1.inspect)(this.toJSON(), options);
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
exports.PlayerStreamerPage = PlayerStreamerPage;
|