@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.
Files changed (103) hide show
  1. package/dist/authentication.js +49 -33
  2. package/dist/communications/authentication.js +49 -33
  3. package/dist/communications/conference.js +306 -181
  4. package/dist/communications/index.js +11 -29
  5. package/dist/communications/internal/httpHelpers.js +56 -34
  6. package/dist/communications/internal/urls.js +8 -4
  7. package/dist/communications/monitor/conferences.js +322 -194
  8. package/dist/communications/monitor/index.js +9 -27
  9. package/dist/communications/monitor/recordings.js +274 -144
  10. package/dist/communications/monitor/webhooks.js +119 -83
  11. package/dist/communications/recording.js +74 -43
  12. package/dist/communications/remix.js +107 -0
  13. package/dist/communications/streaming.js +145 -77
  14. package/dist/communications/types/conference.js +4 -2
  15. package/dist/communications/types/conferences.js +4 -2
  16. package/dist/communications/types/core.js +4 -2
  17. package/dist/communications/types/participant.js +1 -3
  18. package/dist/communications/types/permission.js +18 -27
  19. package/dist/communications/types/recordings.js +4 -2
  20. package/dist/communications/types/remixStatus.js +1 -0
  21. package/dist/communications/types/rtcpMode.js +9 -9
  22. package/dist/communications/types/spatialAudio.js +4 -2
  23. package/dist/communications/types/videoCodec.js +8 -5
  24. package/dist/communications/types/webhooks.js +4 -2
  25. package/dist/index.d.ts +2 -1
  26. package/dist/index.js +12 -28
  27. package/dist/internal/httpHelpers.js +167 -134
  28. package/dist/internal/urls.js +6 -3
  29. package/dist/media/analyze.js +55 -21
  30. package/dist/media/analyzeSpeech.js +55 -21
  31. package/dist/media/diagnose.js +55 -21
  32. package/dist/media/enhance.js +55 -21
  33. package/dist/media/index.js +15 -33
  34. package/dist/media/internal/httpHelpers.js +27 -42
  35. package/dist/media/internal/jobsHelpers.js +82 -44
  36. package/dist/media/internal/urls.js +6 -3
  37. package/dist/media/io.js +131 -54
  38. package/dist/media/jobs.js +150 -88
  39. package/dist/media/mastering.js +101 -29
  40. package/dist/media/transcode.js +55 -21
  41. package/dist/media/types/analyze.js +4 -2
  42. package/dist/media/types/analyzeSpeech.js +4 -2
  43. package/dist/media/types/diagnose.js +4 -2
  44. package/dist/media/types/enhance.js +4 -2
  45. package/dist/media/types/jobResults.js +4 -2
  46. package/dist/media/types/jobs.js +4 -2
  47. package/dist/media/types/mastering.js +4 -2
  48. package/dist/media/types/transcode.js +4 -2
  49. package/dist/media/types/webhooks.js +4 -2
  50. package/dist/media/webhooks.js +176 -96
  51. package/dist/types/jwtToken.js +1 -3
  52. package/package.json +8 -3
  53. package/dist/authentication.js.map +0 -1
  54. package/dist/communications/authentication.js.map +0 -1
  55. package/dist/communications/conference.js.map +0 -1
  56. package/dist/communications/index.js.map +0 -1
  57. package/dist/communications/internal/httpHelpers.js.map +0 -1
  58. package/dist/communications/internal/urls.js.map +0 -1
  59. package/dist/communications/monitor/conferences.js.map +0 -1
  60. package/dist/communications/monitor/index.js.map +0 -1
  61. package/dist/communications/monitor/recordings.js.map +0 -1
  62. package/dist/communications/monitor/webhooks.js.map +0 -1
  63. package/dist/communications/recording.js.map +0 -1
  64. package/dist/communications/streaming.js.map +0 -1
  65. package/dist/communications/types/conference.js.map +0 -1
  66. package/dist/communications/types/conferences.js.map +0 -1
  67. package/dist/communications/types/core.js.map +0 -1
  68. package/dist/communications/types/participant.js.map +0 -1
  69. package/dist/communications/types/permission.js.map +0 -1
  70. package/dist/communications/types/recordings.js.map +0 -1
  71. package/dist/communications/types/rtcpMode.js.map +0 -1
  72. package/dist/communications/types/spatialAudio.js.map +0 -1
  73. package/dist/communications/types/videoCodec.js.map +0 -1
  74. package/dist/communications/types/webhooks.js.map +0 -1
  75. package/dist/index.js.map +0 -1
  76. package/dist/internal/httpHelpers.js.map +0 -1
  77. package/dist/internal/urls.js.map +0 -1
  78. package/dist/internal/version.d.ts +0 -5
  79. package/dist/internal/version.js +0 -31
  80. package/dist/internal/version.js.map +0 -1
  81. package/dist/media/analyze.js.map +0 -1
  82. package/dist/media/analyzeSpeech.js.map +0 -1
  83. package/dist/media/diagnose.js.map +0 -1
  84. package/dist/media/enhance.js.map +0 -1
  85. package/dist/media/index.js.map +0 -1
  86. package/dist/media/internal/httpHelpers.js.map +0 -1
  87. package/dist/media/internal/jobsHelpers.js.map +0 -1
  88. package/dist/media/internal/urls.js.map +0 -1
  89. package/dist/media/io.js.map +0 -1
  90. package/dist/media/jobs.js.map +0 -1
  91. package/dist/media/mastering.js.map +0 -1
  92. package/dist/media/transcode.js.map +0 -1
  93. package/dist/media/types/analyze.js.map +0 -1
  94. package/dist/media/types/analyzeSpeech.js.map +0 -1
  95. package/dist/media/types/diagnose.js.map +0 -1
  96. package/dist/media/types/enhance.js.map +0 -1
  97. package/dist/media/types/jobResults.js.map +0 -1
  98. package/dist/media/types/jobs.js.map +0 -1
  99. package/dist/media/types/mastering.js.map +0 -1
  100. package/dist/media/types/transcode.js.map +0 -1
  101. package/dist/media/types/webhooks.js.map +0 -1
  102. package/dist/media/webhooks.js.map +0 -1
  103. package/dist/types/jwtToken.js.map +0 -1
@@ -1,18 +1,16 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.downloadMp3Recording = exports.downloadMp4Recording = exports.getDolbyVoiceRecording = exports.deleteRecording = exports.getRecording = exports.getAllRecordings = exports.getRecordings = void 0;
13
- const httpHelpers_1 = require("../../internal/httpHelpers");
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.getRecordings = exports.getRecording = exports.getDolbyVoiceRecording = exports.getAllRecordings = exports.downloadMp4Recording = exports.downloadMp3Recording = exports.deleteRecording = 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 the recorded conference metadata, such as duration or size of the recording.
18
16
  * This API checks only the recordings that have ended during a specific time range.
@@ -25,34 +23,53 @@ const urls_1 = require("../internal/urls");
25
23
  *
26
24
  * @returns A `GetRecordingsResponse` object through a `Promise`.
27
25
  */
28
- const getRecordings = (accessToken, options) => __awaiter(void 0, void 0, void 0, function* () {
29
- const optionsDefault = {
30
- from: 0,
31
- to: 9999999999999,
32
- max: 100,
33
- };
34
- const opts = Object.assign(optionsDefault, options);
35
- const params = {
36
- from: opts.from.toString(),
37
- to: opts.to.toString(),
38
- max: opts.max.toString(),
39
- };
40
- if (opts.start) {
41
- params['start'] = opts.start;
42
- }
43
- const requestOptions = {
44
- hostname: urls_1.COMMS_HOSTNAME,
45
- path: '/v1/monitor/recordings',
46
- params,
47
- headers: {
48
- Accept: 'application/json',
49
- Authorization: `${accessToken.token_type} ${accessToken.access_token}`,
50
- },
51
- };
52
- const response = yield (0, httpHelpers_1.sendGet)(requestOptions);
53
- return response;
54
- });
55
- exports.getRecordings = getRecordings;
26
+ var getRecordings = /*#__PURE__*/function () {
27
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(accessToken, options) {
28
+ var optionsDefault, opts, params, requestOptions, response;
29
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
30
+ while (1) {
31
+ switch (_context.prev = _context.next) {
32
+ case 0:
33
+ optionsDefault = {
34
+ from: 0,
35
+ to: 9999999999999,
36
+ max: 100
37
+ };
38
+ opts = Object.assign(optionsDefault, options);
39
+ params = {
40
+ from: opts.from.toString(),
41
+ to: opts.to.toString(),
42
+ max: opts.max.toString()
43
+ };
44
+ if (opts.start) {
45
+ params['start'] = opts.start;
46
+ }
47
+ requestOptions = {
48
+ hostname: _urls.COMMS_HOSTNAME,
49
+ path: '/v1/monitor/recordings',
50
+ params: params,
51
+ headers: {
52
+ Accept: 'application/json',
53
+ Authorization: "".concat(accessToken.token_type, " ").concat(accessToken.access_token)
54
+ }
55
+ };
56
+ _context.next = 7;
57
+ return (0, _httpHelpers.sendGet)(requestOptions);
58
+ case 7:
59
+ response = _context.sent;
60
+ return _context.abrupt("return", response);
61
+ case 9:
62
+ case "end":
63
+ return _context.stop();
64
+ }
65
+ }
66
+ }, _callee);
67
+ }));
68
+ return function getRecordings(_x, _x2) {
69
+ return _ref.apply(this, arguments);
70
+ };
71
+ }();
72
+
56
73
  /**
57
74
  * Get a list of the recorded conference metadata, such as duration or size of the recording.
58
75
  * This API checks only the recordings that have ended during a specific time range.
@@ -65,30 +82,50 @@ exports.getRecordings = getRecordings;
65
82
  *
66
83
  * @returns An array of `Recording` objects through a `Promise`.
67
84
  */
68
- const getAllRecordings = (accessToken, options) => __awaiter(void 0, void 0, void 0, function* () {
69
- const optionsDefault = {
70
- from: 0,
71
- to: 9999999999999,
72
- page_size: 100,
73
- };
74
- const opts = Object.assign(optionsDefault, options);
75
- const params = {
76
- from: opts.from.toString(),
77
- to: opts.to.toString(),
78
- max: opts.page_size.toString(),
79
- };
80
- const requestOptions = {
81
- hostname: urls_1.COMMS_HOSTNAME,
82
- path: '/v1/monitor/recordings',
83
- params,
84
- headers: {
85
- Accept: 'application/json',
86
- Authorization: `${accessToken.token_type} ${accessToken.access_token}`,
87
- },
88
- };
89
- return yield (0, httpHelpers_2.getAll)(requestOptions, 'recordings');
90
- });
91
- exports.getAllRecordings = getAllRecordings;
85
+ exports.getRecordings = getRecordings;
86
+ var getAllRecordings = /*#__PURE__*/function () {
87
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(accessToken, options) {
88
+ var optionsDefault, opts, params, requestOptions;
89
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
90
+ while (1) {
91
+ switch (_context2.prev = _context2.next) {
92
+ case 0:
93
+ optionsDefault = {
94
+ from: 0,
95
+ to: 9999999999999,
96
+ page_size: 100
97
+ };
98
+ opts = Object.assign(optionsDefault, options);
99
+ params = {
100
+ from: opts.from.toString(),
101
+ to: opts.to.toString(),
102
+ max: opts.page_size.toString()
103
+ };
104
+ requestOptions = {
105
+ hostname: _urls.COMMS_HOSTNAME,
106
+ path: '/v1/monitor/recordings',
107
+ params: params,
108
+ headers: {
109
+ Accept: 'application/json',
110
+ Authorization: "".concat(accessToken.token_type, " ").concat(accessToken.access_token)
111
+ }
112
+ };
113
+ _context2.next = 6;
114
+ return (0, _httpHelpers2.getAll)(requestOptions, 'recordings');
115
+ case 6:
116
+ return _context2.abrupt("return", _context2.sent);
117
+ case 7:
118
+ case "end":
119
+ return _context2.stop();
120
+ }
121
+ }
122
+ }, _callee2);
123
+ }));
124
+ return function getAllRecordings(_x3, _x4) {
125
+ return _ref2.apply(this, arguments);
126
+ };
127
+ }();
128
+
92
129
  /**
93
130
  * Get a list of the recorded conference metadata, such as duration or size of the recording.
94
131
  * This API checks the recordings that have ended during a specific time range.
@@ -101,34 +138,54 @@ exports.getAllRecordings = getAllRecordings;
101
138
  *
102
139
  * @returns An array of `Recording` objects through a `Promise`.
103
140
  */
104
- const getRecording = (accessToken, options) => __awaiter(void 0, void 0, void 0, function* () {
105
- const optionsDefault = {
106
- from: 0,
107
- to: 9999999999999,
108
- max: 100,
109
- };
110
- const opts = Object.assign(optionsDefault, options);
111
- const params = {
112
- from: opts.from.toString(),
113
- to: opts.to.toString(),
114
- max: opts.max.toString(),
115
- };
116
- if (opts.start) {
117
- params['start'] = opts.start;
118
- }
119
- const requestOptions = {
120
- hostname: urls_1.COMMS_HOSTNAME,
121
- path: `/v1/monitor/conferences/${opts.confId}/recordings`,
122
- params,
123
- headers: {
124
- Accept: 'application/json',
125
- Authorization: `${accessToken.token_type} ${accessToken.access_token}`,
126
- },
127
- };
128
- const response = yield (0, httpHelpers_1.sendGet)(requestOptions);
129
- return response.recordings;
130
- });
131
- exports.getRecording = getRecording;
141
+ exports.getAllRecordings = getAllRecordings;
142
+ var getRecording = /*#__PURE__*/function () {
143
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(accessToken, options) {
144
+ var optionsDefault, opts, params, requestOptions, response;
145
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
146
+ while (1) {
147
+ switch (_context3.prev = _context3.next) {
148
+ case 0:
149
+ optionsDefault = {
150
+ from: 0,
151
+ to: 9999999999999,
152
+ max: 100
153
+ };
154
+ opts = Object.assign(optionsDefault, options);
155
+ params = {
156
+ from: opts.from.toString(),
157
+ to: opts.to.toString(),
158
+ max: opts.max.toString()
159
+ };
160
+ if (opts.start) {
161
+ params['start'] = opts.start;
162
+ }
163
+ requestOptions = {
164
+ hostname: _urls.COMMS_HOSTNAME,
165
+ path: "/v1/monitor/conferences/".concat(opts.confId, "/recordings"),
166
+ params: params,
167
+ headers: {
168
+ Accept: 'application/json',
169
+ Authorization: "".concat(accessToken.token_type, " ").concat(accessToken.access_token)
170
+ }
171
+ };
172
+ _context3.next = 7;
173
+ return (0, _httpHelpers.sendGet)(requestOptions);
174
+ case 7:
175
+ response = _context3.sent;
176
+ return _context3.abrupt("return", response.recordings);
177
+ case 9:
178
+ case "end":
179
+ return _context3.stop();
180
+ }
181
+ }
182
+ }, _callee3);
183
+ }));
184
+ return function getRecording(_x5, _x6) {
185
+ return _ref3.apply(this, arguments);
186
+ };
187
+ }();
188
+
132
189
  /**
133
190
  * Delete all recording data related to a specific conference.
134
191
  *
@@ -139,18 +196,36 @@ exports.getRecording = getRecording;
139
196
  * @param accessToken Access token to use for authentication.
140
197
  * @param confId Identifier of the conference.
141
198
  */
142
- const deleteRecording = (accessToken, confId) => __awaiter(void 0, void 0, void 0, function* () {
143
- const requestOptions = {
144
- hostname: urls_1.COMMS_HOSTNAME,
145
- path: `/v1/monitor/conferences/${confId}/recordings`,
146
- headers: {
147
- Accept: 'application/json',
148
- Authorization: `${accessToken.token_type} ${accessToken.access_token}`,
149
- },
150
- };
151
- yield (0, httpHelpers_1.sendDelete)(requestOptions);
152
- });
153
- exports.deleteRecording = deleteRecording;
199
+ exports.getRecording = getRecording;
200
+ var deleteRecording = /*#__PURE__*/function () {
201
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(accessToken, confId) {
202
+ var requestOptions;
203
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
204
+ while (1) {
205
+ switch (_context4.prev = _context4.next) {
206
+ case 0:
207
+ requestOptions = {
208
+ hostname: _urls.COMMS_HOSTNAME,
209
+ path: "/v1/monitor/conferences/".concat(confId, "/recordings"),
210
+ headers: {
211
+ Accept: 'application/json',
212
+ Authorization: "".concat(accessToken.token_type, " ").concat(accessToken.access_token)
213
+ }
214
+ };
215
+ _context4.next = 3;
216
+ return (0, _httpHelpers.sendDelete)(requestOptions);
217
+ case 3:
218
+ case "end":
219
+ return _context4.stop();
220
+ }
221
+ }
222
+ }, _callee4);
223
+ }));
224
+ return function deleteRecording(_x7, _x8) {
225
+ return _ref4.apply(this, arguments);
226
+ };
227
+ }();
228
+
154
229
  /**
155
230
  * Get details of all Dolby Voice-based audio recordings, and associated split recordings,
156
231
  * for a given conference and download the conference recording in the MP3 audio format.
@@ -162,19 +237,39 @@ exports.deleteRecording = deleteRecording;
162
237
  *
163
238
  * @returns A `DolbyVoiceRecording` object through a `Promise`.
164
239
  */
165
- const getDolbyVoiceRecording = (accessToken, confId) => __awaiter(void 0, void 0, void 0, function* () {
166
- const requestOptions = {
167
- hostname: urls_1.COMMS_HOSTNAME,
168
- path: `/v1/monitor/conferences/${confId}/recordings/audio`,
169
- headers: {
170
- Accept: 'application/json',
171
- Authorization: `${accessToken.token_type} ${accessToken.access_token}`,
172
- },
173
- };
174
- const response = yield (0, httpHelpers_1.sendGet)(requestOptions);
175
- return response;
176
- });
177
- exports.getDolbyVoiceRecording = getDolbyVoiceRecording;
240
+ exports.deleteRecording = deleteRecording;
241
+ var getDolbyVoiceRecording = /*#__PURE__*/function () {
242
+ var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(accessToken, confId) {
243
+ var requestOptions, response;
244
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
245
+ while (1) {
246
+ switch (_context5.prev = _context5.next) {
247
+ case 0:
248
+ requestOptions = {
249
+ hostname: _urls.COMMS_HOSTNAME,
250
+ path: "/v1/monitor/conferences/".concat(confId, "/recordings/audio"),
251
+ headers: {
252
+ Accept: 'application/json',
253
+ Authorization: "".concat(accessToken.token_type, " ").concat(accessToken.access_token)
254
+ }
255
+ };
256
+ _context5.next = 3;
257
+ return (0, _httpHelpers.sendGet)(requestOptions);
258
+ case 3:
259
+ response = _context5.sent;
260
+ return _context5.abrupt("return", response);
261
+ case 5:
262
+ case "end":
263
+ return _context5.stop();
264
+ }
265
+ }
266
+ }, _callee5);
267
+ }));
268
+ return function getDolbyVoiceRecording(_x9, _x10) {
269
+ return _ref5.apply(this, arguments);
270
+ };
271
+ }();
272
+
178
273
  /**
179
274
  * Download the conference recording in the MP4 video format.
180
275
  * For more information, see the [Recording](https://docs.dolby.io/communications-apis/docs/guides-recording-mechanisms) document.
@@ -187,18 +282,36 @@ exports.getDolbyVoiceRecording = getDolbyVoiceRecording;
187
282
  * @param confId Identifier of the conference.
188
283
  * @param filepath Where to save the file.
189
284
  */
190
- const downloadMp4Recording = (accessToken, confId, filepath) => __awaiter(void 0, void 0, void 0, function* () {
191
- const requestOptions = {
192
- hostname: urls_1.COMMS_HOSTNAME,
193
- path: `/v1/monitor/conferences/${confId}/recordings/mp4`,
194
- headers: {
195
- Accept: 'video/mp4',
196
- Authorization: `${accessToken.token_type} ${accessToken.access_token}`,
197
- },
198
- };
199
- yield (0, httpHelpers_1.download)(filepath, requestOptions);
200
- });
201
- exports.downloadMp4Recording = downloadMp4Recording;
285
+ exports.getDolbyVoiceRecording = getDolbyVoiceRecording;
286
+ var downloadMp4Recording = /*#__PURE__*/function () {
287
+ var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(accessToken, confId, filepath) {
288
+ var requestOptions;
289
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
290
+ while (1) {
291
+ switch (_context6.prev = _context6.next) {
292
+ case 0:
293
+ requestOptions = {
294
+ hostname: _urls.COMMS_HOSTNAME,
295
+ path: "/v1/monitor/conferences/".concat(confId, "/recordings/mp4"),
296
+ headers: {
297
+ Accept: 'video/mp4',
298
+ Authorization: "".concat(accessToken.token_type, " ").concat(accessToken.access_token)
299
+ }
300
+ };
301
+ _context6.next = 3;
302
+ return (0, _httpHelpers.download)(filepath, requestOptions);
303
+ case 3:
304
+ case "end":
305
+ return _context6.stop();
306
+ }
307
+ }
308
+ }, _callee6);
309
+ }));
310
+ return function downloadMp4Recording(_x11, _x12, _x13) {
311
+ return _ref6.apply(this, arguments);
312
+ };
313
+ }();
314
+
202
315
  /**
203
316
  * Download the conference recording in the MP3 audio format.
204
317
  * For more information, see the [Recording](https://docs.dolby.io/communications-apis/docs/guides-recording-mechanisms) document.
@@ -211,16 +324,33 @@ exports.downloadMp4Recording = downloadMp4Recording;
211
324
  * @param confId Identifier of the conference.
212
325
  * @param filepath Where to save the file.
213
326
  */
214
- const downloadMp3Recording = (accessToken, confId, filepath) => __awaiter(void 0, void 0, void 0, function* () {
215
- const requestOptions = {
216
- hostname: urls_1.COMMS_HOSTNAME,
217
- path: `/v1/monitor/conferences/${confId}/recordings/mp3`,
218
- headers: {
219
- Accept: 'video/mpeg',
220
- Authorization: `${accessToken.token_type} ${accessToken.access_token}`,
221
- },
222
- };
223
- yield (0, httpHelpers_1.download)(filepath, requestOptions);
224
- });
225
- exports.downloadMp3Recording = downloadMp3Recording;
226
- //# sourceMappingURL=recordings.js.map
327
+ exports.downloadMp4Recording = downloadMp4Recording;
328
+ var downloadMp3Recording = /*#__PURE__*/function () {
329
+ var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(accessToken, confId, filepath) {
330
+ var requestOptions;
331
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
332
+ while (1) {
333
+ switch (_context7.prev = _context7.next) {
334
+ case 0:
335
+ requestOptions = {
336
+ hostname: _urls.COMMS_HOSTNAME,
337
+ path: "/v1/monitor/conferences/".concat(confId, "/recordings/mp3"),
338
+ headers: {
339
+ Accept: 'video/mpeg',
340
+ Authorization: "".concat(accessToken.token_type, " ").concat(accessToken.access_token)
341
+ }
342
+ };
343
+ _context7.next = 3;
344
+ return (0, _httpHelpers.download)(filepath, requestOptions);
345
+ case 3:
346
+ case "end":
347
+ return _context7.stop();
348
+ }
349
+ }
350
+ }, _callee7);
351
+ }));
352
+ return function downloadMp3Recording(_x14, _x15, _x16) {
353
+ return _ref7.apply(this, arguments);
354
+ };
355
+ }();
356
+ exports.downloadMp3Recording = downloadMp3Recording;