@dolbyio/dolbyio-rest-apis-client 3.4.3 → 3.4.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/dist/authentication.js +49 -33
- package/dist/communications/authentication.js +49 -33
- package/dist/communications/conference.js +306 -181
- package/dist/communications/index.js +11 -29
- package/dist/communications/internal/httpHelpers.js +56 -34
- package/dist/communications/internal/urls.js +8 -4
- package/dist/communications/monitor/conferences.js +322 -194
- package/dist/communications/monitor/index.js +9 -27
- package/dist/communications/monitor/recordings.js +274 -144
- package/dist/communications/monitor/webhooks.js +119 -83
- package/dist/communications/recording.js +74 -43
- package/dist/communications/remix.js +107 -0
- package/dist/communications/streaming.js +145 -77
- package/dist/communications/types/conference.js +4 -2
- package/dist/communications/types/conferences.js +4 -2
- package/dist/communications/types/core.js +4 -2
- package/dist/communications/types/participant.js +1 -3
- package/dist/communications/types/permission.js +18 -27
- package/dist/communications/types/recordings.js +4 -2
- package/dist/communications/types/remixStatus.js +1 -0
- package/dist/communications/types/rtcpMode.js +9 -9
- package/dist/communications/types/spatialAudio.js +4 -2
- package/dist/communications/types/videoCodec.js +8 -5
- package/dist/communications/types/webhooks.js +4 -2
- package/dist/index.d.ts +2 -1
- package/dist/index.js +12 -28
- package/dist/internal/httpHelpers.js +167 -134
- package/dist/internal/urls.js +6 -3
- package/dist/media/analyze.js +55 -21
- package/dist/media/analyzeSpeech.js +55 -21
- package/dist/media/diagnose.js +55 -21
- package/dist/media/enhance.js +55 -21
- package/dist/media/index.js +15 -33
- package/dist/media/internal/httpHelpers.js +27 -42
- package/dist/media/internal/jobsHelpers.js +82 -44
- package/dist/media/internal/urls.js +6 -3
- package/dist/media/io.js +131 -54
- package/dist/media/jobs.js +150 -88
- package/dist/media/mastering.js +101 -29
- package/dist/media/transcode.js +55 -21
- package/dist/media/types/analyze.js +4 -2
- package/dist/media/types/analyzeSpeech.js +4 -2
- package/dist/media/types/diagnose.js +4 -2
- package/dist/media/types/enhance.js +4 -2
- package/dist/media/types/jobResults.js +4 -2
- package/dist/media/types/jobs.js +4 -2
- package/dist/media/types/mastering.js +4 -2
- package/dist/media/types/transcode.js +4 -2
- package/dist/media/types/webhooks.js +4 -2
- package/dist/media/webhooks.js +176 -96
- package/dist/types/jwtToken.js +1 -3
- package/package.json +8 -3
- package/dist/authentication.js.map +0 -1
- package/dist/communications/authentication.js.map +0 -1
- package/dist/communications/conference.js.map +0 -1
- package/dist/communications/index.js.map +0 -1
- package/dist/communications/internal/httpHelpers.js.map +0 -1
- package/dist/communications/internal/urls.js.map +0 -1
- package/dist/communications/monitor/conferences.js.map +0 -1
- package/dist/communications/monitor/index.js.map +0 -1
- package/dist/communications/monitor/recordings.js.map +0 -1
- package/dist/communications/monitor/webhooks.js.map +0 -1
- package/dist/communications/recording.js.map +0 -1
- package/dist/communications/streaming.js.map +0 -1
- package/dist/communications/types/conference.js.map +0 -1
- package/dist/communications/types/conferences.js.map +0 -1
- package/dist/communications/types/core.js.map +0 -1
- package/dist/communications/types/participant.js.map +0 -1
- package/dist/communications/types/permission.js.map +0 -1
- package/dist/communications/types/recordings.js.map +0 -1
- package/dist/communications/types/rtcpMode.js.map +0 -1
- package/dist/communications/types/spatialAudio.js.map +0 -1
- package/dist/communications/types/videoCodec.js.map +0 -1
- package/dist/communications/types/webhooks.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/internal/httpHelpers.js.map +0 -1
- package/dist/internal/urls.js.map +0 -1
- package/dist/internal/version.d.ts +0 -5
- package/dist/internal/version.js +0 -31
- package/dist/internal/version.js.map +0 -1
- package/dist/media/analyze.js.map +0 -1
- package/dist/media/analyzeSpeech.js.map +0 -1
- package/dist/media/diagnose.js.map +0 -1
- package/dist/media/enhance.js.map +0 -1
- package/dist/media/index.js.map +0 -1
- package/dist/media/internal/httpHelpers.js.map +0 -1
- package/dist/media/internal/jobsHelpers.js.map +0 -1
- package/dist/media/internal/urls.js.map +0 -1
- package/dist/media/io.js.map +0 -1
- package/dist/media/jobs.js.map +0 -1
- package/dist/media/mastering.js.map +0 -1
- package/dist/media/transcode.js.map +0 -1
- package/dist/media/types/analyze.js.map +0 -1
- package/dist/media/types/analyzeSpeech.js.map +0 -1
- package/dist/media/types/diagnose.js.map +0 -1
- package/dist/media/types/enhance.js.map +0 -1
- package/dist/media/types/jobResults.js.map +0 -1
- package/dist/media/types/jobs.js.map +0 -1
- package/dist/media/types/mastering.js.map +0 -1
- package/dist/media/types/transcode.js.map +0 -1
- package/dist/media/types/webhooks.js.map +0 -1
- package/dist/media/webhooks.js.map +0 -1
- package/dist/types/jwtToken.js.map +0 -1
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const httpHelpers_2 = require("../internal/httpHelpers");
|
|
15
|
-
const urls_1 = require("../internal/urls");
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.listConferences = exports.listAllConferences = exports.getConferenceStatistics = exports.getConferenceParticipants = exports.getConference = exports.getAllConferenceParticipants = void 0;
|
|
8
|
+
var _httpHelpers = require("../../internal/httpHelpers");
|
|
9
|
+
var _httpHelpers2 = require("../internal/httpHelpers");
|
|
10
|
+
var _urls = require("../internal/urls");
|
|
11
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
12
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
13
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
16
14
|
/**
|
|
17
15
|
* Get a list of conferences that were started in a specific time range, including ongoing conferences.
|
|
18
16
|
*
|
|
@@ -26,44 +24,63 @@ const urls_1 = require("../internal/urls");
|
|
|
26
24
|
*
|
|
27
25
|
* @returns A `ListConferencesResponse` object through a `Promise`.
|
|
28
26
|
*/
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
27
|
+
var listConferences = /*#__PURE__*/function () {
|
|
28
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(accessToken, options) {
|
|
29
|
+
var optionsDefault, opts, params, requestOptions, response;
|
|
30
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
31
|
+
while (1) {
|
|
32
|
+
switch (_context.prev = _context.next) {
|
|
33
|
+
case 0:
|
|
34
|
+
optionsDefault = {
|
|
35
|
+
from: 0,
|
|
36
|
+
to: 9999999999999,
|
|
37
|
+
max: 100,
|
|
38
|
+
active: false,
|
|
39
|
+
livestats: false
|
|
40
|
+
};
|
|
41
|
+
opts = Object.assign(optionsDefault, options);
|
|
42
|
+
params = {
|
|
43
|
+
from: opts.from.toString(),
|
|
44
|
+
to: opts.to.toString(),
|
|
45
|
+
max: opts.max.toString(),
|
|
46
|
+
active: opts.active.toString(),
|
|
47
|
+
livestats: opts.livestats.toString()
|
|
48
|
+
};
|
|
49
|
+
if (opts.start) {
|
|
50
|
+
params['start'] = opts.start;
|
|
51
|
+
}
|
|
52
|
+
if (opts.alias) {
|
|
53
|
+
params['alias'] = opts.alias;
|
|
54
|
+
}
|
|
55
|
+
if (opts.exid) {
|
|
56
|
+
params['exid'] = opts.exid;
|
|
57
|
+
}
|
|
58
|
+
requestOptions = {
|
|
59
|
+
hostname: _urls.COMMS_HOSTNAME,
|
|
60
|
+
path: '/v1/monitor/conferences',
|
|
61
|
+
params: params,
|
|
62
|
+
headers: {
|
|
63
|
+
Accept: 'application/json',
|
|
64
|
+
Authorization: "".concat(accessToken.token_type, " ").concat(accessToken.access_token)
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
_context.next = 9;
|
|
68
|
+
return (0, _httpHelpers.sendGet)(requestOptions);
|
|
69
|
+
case 9:
|
|
70
|
+
response = _context.sent;
|
|
71
|
+
return _context.abrupt("return", response);
|
|
72
|
+
case 11:
|
|
73
|
+
case "end":
|
|
74
|
+
return _context.stop();
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}, _callee);
|
|
78
|
+
}));
|
|
79
|
+
return function listConferences(_x, _x2) {
|
|
80
|
+
return _ref.apply(this, arguments);
|
|
81
|
+
};
|
|
82
|
+
}();
|
|
83
|
+
|
|
67
84
|
/**
|
|
68
85
|
* Get a list of all the conferences that were started in a specific time range, including ongoing conferences.
|
|
69
86
|
*
|
|
@@ -77,40 +94,60 @@ exports.listConferences = listConferences;
|
|
|
77
94
|
*
|
|
78
95
|
* @returns An array of `Conference` objects through a `Promise`.
|
|
79
96
|
*/
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
97
|
+
exports.listConferences = listConferences;
|
|
98
|
+
var listAllConferences = /*#__PURE__*/function () {
|
|
99
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(accessToken, options) {
|
|
100
|
+
var optionsDefault, opts, params, requestOptions;
|
|
101
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
102
|
+
while (1) {
|
|
103
|
+
switch (_context2.prev = _context2.next) {
|
|
104
|
+
case 0:
|
|
105
|
+
optionsDefault = {
|
|
106
|
+
from: 0,
|
|
107
|
+
to: 9999999999999,
|
|
108
|
+
page_size: 100,
|
|
109
|
+
active: false,
|
|
110
|
+
livestats: false
|
|
111
|
+
};
|
|
112
|
+
opts = Object.assign(optionsDefault, options);
|
|
113
|
+
params = {
|
|
114
|
+
from: opts.from.toString(),
|
|
115
|
+
to: opts.to.toString(),
|
|
116
|
+
max: opts.page_size.toString(),
|
|
117
|
+
active: opts.active.toString(),
|
|
118
|
+
livestats: opts.livestats.toString()
|
|
119
|
+
};
|
|
120
|
+
if (opts.alias) {
|
|
121
|
+
params['alias'] = opts.alias;
|
|
122
|
+
}
|
|
123
|
+
if (opts.exid) {
|
|
124
|
+
params['exid'] = opts.exid;
|
|
125
|
+
}
|
|
126
|
+
requestOptions = {
|
|
127
|
+
hostname: _urls.COMMS_HOSTNAME,
|
|
128
|
+
path: '/v1/monitor/conferences',
|
|
129
|
+
params: params,
|
|
130
|
+
headers: {
|
|
131
|
+
Accept: 'application/json',
|
|
132
|
+
Authorization: "".concat(accessToken.token_type, " ").concat(accessToken.access_token)
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
_context2.next = 8;
|
|
136
|
+
return (0, _httpHelpers2.getAll)(requestOptions, 'conferences');
|
|
137
|
+
case 8:
|
|
138
|
+
return _context2.abrupt("return", _context2.sent);
|
|
139
|
+
case 9:
|
|
140
|
+
case "end":
|
|
141
|
+
return _context2.stop();
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}, _callee2);
|
|
145
|
+
}));
|
|
146
|
+
return function listAllConferences(_x3, _x4) {
|
|
147
|
+
return _ref2.apply(this, arguments);
|
|
148
|
+
};
|
|
149
|
+
}();
|
|
150
|
+
|
|
114
151
|
/**
|
|
115
152
|
* Get a summary of a conference.
|
|
116
153
|
*
|
|
@@ -125,19 +162,43 @@ exports.listAllConferences = listAllConferences;
|
|
|
125
162
|
*
|
|
126
163
|
* @returns A `Conference` object through a `Promise`.
|
|
127
164
|
*/
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
165
|
+
exports.listAllConferences = listAllConferences;
|
|
166
|
+
var getConference = /*#__PURE__*/function () {
|
|
167
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(accessToken, conferenceId) {
|
|
168
|
+
var livestats,
|
|
169
|
+
options,
|
|
170
|
+
response,
|
|
171
|
+
_args3 = arguments;
|
|
172
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
173
|
+
while (1) {
|
|
174
|
+
switch (_context3.prev = _context3.next) {
|
|
175
|
+
case 0:
|
|
176
|
+
livestats = _args3.length > 2 && _args3[2] !== undefined ? _args3[2] : false;
|
|
177
|
+
options = {
|
|
178
|
+
hostname: _urls.COMMS_HOSTNAME,
|
|
179
|
+
path: "/v1/monitor/conferences/".concat(conferenceId, "?livestats=").concat(livestats),
|
|
180
|
+
headers: {
|
|
181
|
+
Accept: 'application/json',
|
|
182
|
+
Authorization: "".concat(accessToken.token_type, " ").concat(accessToken.access_token)
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
_context3.next = 4;
|
|
186
|
+
return (0, _httpHelpers.sendGet)(options);
|
|
187
|
+
case 4:
|
|
188
|
+
response = _context3.sent;
|
|
189
|
+
return _context3.abrupt("return", response);
|
|
190
|
+
case 6:
|
|
191
|
+
case "end":
|
|
192
|
+
return _context3.stop();
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}, _callee3);
|
|
196
|
+
}));
|
|
197
|
+
return function getConference(_x5, _x6) {
|
|
198
|
+
return _ref3.apply(this, arguments);
|
|
199
|
+
};
|
|
200
|
+
}();
|
|
201
|
+
|
|
141
202
|
/**
|
|
142
203
|
* Get statistics of a terminated conference. The statistics include the maximum number of participants present during a conference and the maximum number of the transmitted and received packets, bytes, and streams.
|
|
143
204
|
*
|
|
@@ -150,19 +211,39 @@ exports.getConference = getConference;
|
|
|
150
211
|
*
|
|
151
212
|
* @returns A `Statistics` object through a `Promise`.
|
|
152
213
|
*/
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
214
|
+
exports.getConference = getConference;
|
|
215
|
+
var getConferenceStatistics = /*#__PURE__*/function () {
|
|
216
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(accessToken, conferenceId) {
|
|
217
|
+
var options, response;
|
|
218
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
219
|
+
while (1) {
|
|
220
|
+
switch (_context4.prev = _context4.next) {
|
|
221
|
+
case 0:
|
|
222
|
+
options = {
|
|
223
|
+
hostname: _urls.COMMS_HOSTNAME,
|
|
224
|
+
path: "/v1/monitor/conferences/".concat(conferenceId, "/statistics"),
|
|
225
|
+
headers: {
|
|
226
|
+
Accept: 'application/json',
|
|
227
|
+
Authorization: "".concat(accessToken.token_type, " ").concat(accessToken.access_token)
|
|
228
|
+
}
|
|
229
|
+
};
|
|
230
|
+
_context4.next = 3;
|
|
231
|
+
return (0, _httpHelpers.sendGet)(options);
|
|
232
|
+
case 3:
|
|
233
|
+
response = _context4.sent;
|
|
234
|
+
return _context4.abrupt("return", response);
|
|
235
|
+
case 5:
|
|
236
|
+
case "end":
|
|
237
|
+
return _context4.stop();
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}, _callee4);
|
|
241
|
+
}));
|
|
242
|
+
return function getConferenceStatistics(_x7, _x8) {
|
|
243
|
+
return _ref4.apply(this, arguments);
|
|
244
|
+
};
|
|
245
|
+
}();
|
|
246
|
+
|
|
166
247
|
/**
|
|
167
248
|
* Get statistics and connection details of all participants in a conference. Optionally limit the search result with a specific time range.
|
|
168
249
|
*
|
|
@@ -173,42 +254,62 @@ exports.getConferenceStatistics = getConferenceStatistics;
|
|
|
173
254
|
*
|
|
174
255
|
* @returns A `ParticipantsResponse` object through a `Promise`.
|
|
175
256
|
*/
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
257
|
+
exports.getConferenceStatistics = getConferenceStatistics;
|
|
258
|
+
var getConferenceParticipants = /*#__PURE__*/function () {
|
|
259
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(accessToken, options) {
|
|
260
|
+
var optionsDefault, opts, path, params, requestOptions, response;
|
|
261
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
262
|
+
while (1) {
|
|
263
|
+
switch (_context5.prev = _context5.next) {
|
|
264
|
+
case 0:
|
|
265
|
+
optionsDefault = {
|
|
266
|
+
confId: options.confId,
|
|
267
|
+
from: 0,
|
|
268
|
+
to: 9999999999999,
|
|
269
|
+
max: 100
|
|
270
|
+
};
|
|
271
|
+
opts = Object.assign(optionsDefault, options);
|
|
272
|
+
path = "/v1/monitor/conferences/".concat(opts.confId, "/participants");
|
|
273
|
+
if (opts.userId) {
|
|
274
|
+
path += "/".concat(opts.userId);
|
|
275
|
+
}
|
|
276
|
+
params = {
|
|
277
|
+
from: opts.from.toString(),
|
|
278
|
+
to: opts.to.toString(),
|
|
279
|
+
max: opts.max.toString()
|
|
280
|
+
};
|
|
281
|
+
if (opts.start) {
|
|
282
|
+
params['start'] = opts.start;
|
|
283
|
+
}
|
|
284
|
+
if (opts.type) {
|
|
285
|
+
params['type'] = opts.type;
|
|
286
|
+
}
|
|
287
|
+
requestOptions = {
|
|
288
|
+
hostname: _urls.COMMS_HOSTNAME,
|
|
289
|
+
path: path,
|
|
290
|
+
params: params,
|
|
291
|
+
headers: {
|
|
292
|
+
Accept: 'application/json',
|
|
293
|
+
Authorization: "".concat(accessToken.token_type, " ").concat(accessToken.access_token)
|
|
294
|
+
}
|
|
295
|
+
};
|
|
296
|
+
_context5.next = 10;
|
|
297
|
+
return (0, _httpHelpers.sendGet)(requestOptions);
|
|
298
|
+
case 10:
|
|
299
|
+
response = _context5.sent;
|
|
300
|
+
return _context5.abrupt("return", response);
|
|
301
|
+
case 12:
|
|
302
|
+
case "end":
|
|
303
|
+
return _context5.stop();
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
}, _callee5);
|
|
307
|
+
}));
|
|
308
|
+
return function getConferenceParticipants(_x9, _x10) {
|
|
309
|
+
return _ref5.apply(this, arguments);
|
|
310
|
+
};
|
|
311
|
+
}();
|
|
312
|
+
|
|
212
313
|
/**
|
|
213
314
|
* Get statistics and connection details of all participants in a conference. Optionally limit the search result with a specific time range.
|
|
214
315
|
*
|
|
@@ -219,53 +320,80 @@ exports.getConferenceParticipants = getConferenceParticipants;
|
|
|
219
320
|
*
|
|
220
321
|
* @returns A dictionary of `Participant` object through a `Promise`.
|
|
221
322
|
*/
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
323
|
+
exports.getConferenceParticipants = getConferenceParticipants;
|
|
324
|
+
var getAllConferenceParticipants = /*#__PURE__*/function () {
|
|
325
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(accessToken, options) {
|
|
326
|
+
var optionsDefault, opts, path, params, requestOptions, result, response, dico, key, pagedResponse;
|
|
327
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
328
|
+
while (1) {
|
|
329
|
+
switch (_context6.prev = _context6.next) {
|
|
330
|
+
case 0:
|
|
331
|
+
optionsDefault = {
|
|
332
|
+
confId: options.confId,
|
|
333
|
+
from: 0,
|
|
334
|
+
to: 9999999999999,
|
|
335
|
+
page_size: 100
|
|
336
|
+
};
|
|
337
|
+
opts = Object.assign(optionsDefault, options);
|
|
338
|
+
path = "/v1/monitor/conferences/".concat(opts.confId, "/participants");
|
|
339
|
+
if (opts.userId) {
|
|
340
|
+
path += "/".concat(opts.userId);
|
|
341
|
+
}
|
|
342
|
+
params = {
|
|
343
|
+
from: opts.from.toString(),
|
|
344
|
+
to: opts.to.toString(),
|
|
345
|
+
max: opts.page_size.toString()
|
|
346
|
+
};
|
|
347
|
+
if (opts.type) {
|
|
348
|
+
params['type'] = opts.type;
|
|
349
|
+
}
|
|
350
|
+
requestOptions = {
|
|
351
|
+
hostname: _urls.COMMS_HOSTNAME,
|
|
352
|
+
path: path,
|
|
353
|
+
params: params,
|
|
354
|
+
headers: {
|
|
355
|
+
Accept: 'application/json',
|
|
356
|
+
Authorization: "".concat(accessToken.token_type, " ").concat(accessToken.access_token)
|
|
357
|
+
}
|
|
358
|
+
};
|
|
359
|
+
result = {};
|
|
360
|
+
case 8:
|
|
361
|
+
_context6.next = 10;
|
|
362
|
+
return (0, _httpHelpers.sendGet)(requestOptions);
|
|
363
|
+
case 10:
|
|
364
|
+
response = _context6.sent;
|
|
365
|
+
if (response.hasOwnProperty('participants')) {
|
|
366
|
+
dico = response['participants'];
|
|
367
|
+
for (key in dico) {
|
|
257
368
|
if (dico.hasOwnProperty(key)) {
|
|
258
|
-
|
|
369
|
+
result[key] = dico[key];
|
|
259
370
|
}
|
|
371
|
+
}
|
|
260
372
|
}
|
|
373
|
+
pagedResponse = response;
|
|
374
|
+
if (!(!pagedResponse.next || pagedResponse.next.length <= 0)) {
|
|
375
|
+
_context6.next = 15;
|
|
376
|
+
break;
|
|
377
|
+
}
|
|
378
|
+
return _context6.abrupt("break", 17);
|
|
379
|
+
case 15:
|
|
380
|
+
requestOptions.params['start'] = pagedResponse.next;
|
|
381
|
+
case 16:
|
|
382
|
+
if (true) {
|
|
383
|
+
_context6.next = 8;
|
|
384
|
+
break;
|
|
385
|
+
}
|
|
386
|
+
case 17:
|
|
387
|
+
return _context6.abrupt("return", result);
|
|
388
|
+
case 18:
|
|
389
|
+
case "end":
|
|
390
|
+
return _context6.stop();
|
|
261
391
|
}
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
exports.getAllConferenceParticipants = getAllConferenceParticipants;
|
|
271
|
-
//# sourceMappingURL=conferences.js.map
|
|
392
|
+
}
|
|
393
|
+
}, _callee6);
|
|
394
|
+
}));
|
|
395
|
+
return function getAllConferenceParticipants(_x11, _x12) {
|
|
396
|
+
return _ref6.apply(this, arguments);
|
|
397
|
+
};
|
|
398
|
+
}();
|
|
399
|
+
exports.getAllConferenceParticipants = getAllConferenceParticipants;
|
|
@@ -1,33 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
17
6
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
7
|
exports.webhooks = exports.recordings = exports.conferences = void 0;
|
|
27
|
-
|
|
8
|
+
var conferences = _interopRequireWildcard(require("./conferences"));
|
|
28
9
|
exports.conferences = conferences;
|
|
29
|
-
|
|
10
|
+
var recordings = _interopRequireWildcard(require("./recordings"));
|
|
30
11
|
exports.recordings = recordings;
|
|
31
|
-
|
|
12
|
+
var webhooks = _interopRequireWildcard(require("./webhooks"));
|
|
32
13
|
exports.webhooks = webhooks;
|
|
33
|
-
|
|
14
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|