@eluvio/elv-client-js 4.0.84 → 4.0.86

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 (35) hide show
  1. package/dist/ElvClient-min.js +12 -13
  2. package/dist/ElvClient-node-min.js +13 -14
  3. package/dist/ElvFrameClient-min.js +9 -9
  4. package/dist/ElvPermissionsClient-min.js +10 -10
  5. package/dist/ElvWalletClient-min.js +13 -14
  6. package/dist/ElvWalletClient-node-min.js +13 -14
  7. package/dist/src/AuthorizationClient.js +5 -4
  8. package/dist/src/Crypto.js +2 -2
  9. package/dist/src/ElvClient.js +2 -2
  10. package/dist/src/EthClient.js +2 -2
  11. package/dist/src/FrameClient.js +3 -3
  12. package/dist/src/PermissionsClient.js +2 -2
  13. package/dist/src/Utils.js +2 -2
  14. package/dist/src/abr_profiles/abr_profile_live_to_vod.js +0 -7
  15. package/dist/src/client/ABRPublishing.js +2 -2
  16. package/dist/src/client/AccessGroups.js +2 -2
  17. package/dist/src/client/ContentAccess.js +757 -821
  18. package/dist/src/client/ContentManagement.js +5 -37
  19. package/dist/src/client/Contracts.js +2 -2
  20. package/dist/src/client/Files.js +2 -2
  21. package/dist/src/client/LiveConf.js +35 -144
  22. package/dist/src/client/LiveStream.js +529 -1054
  23. package/dist/src/client/NFT.js +2 -2
  24. package/dist/src/walletClient/ClientMethods.js +2 -2
  25. package/dist/src/walletClient/Profile.js +2 -2
  26. package/dist/src/walletClient/Utils.js +2 -2
  27. package/dist/src/walletClient/index.js +2 -2
  28. package/package.json +1 -1
  29. package/src/ElvClient.js +80 -81
  30. package/src/RemoteSigner.js +54 -0
  31. package/src/client/ContentAccess.js +6 -6
  32. package/src/client/ContentManagement.js +20 -6
  33. package/src/client/LiveConf.js +3 -3
  34. package/src/client/LiveStream.js +13 -10
  35. package/src/walletClient/index.js +40 -13
@@ -3,8 +3,8 @@ var _typeof = require("@babel/runtime/helpers/typeof");
3
3
  var _defineProperty = require("@babel/runtime/helpers/defineProperty");
4
4
  var _regeneratorRuntime = require("@babel/runtime/regenerator");
5
5
  var _asyncToGenerator = require("@babel/runtime/helpers/asyncToGenerator");
6
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
7
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
7
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
8
8
  /**
9
9
  * Methods for accessing content types, libraries and objects
10
10
  *
@@ -1839,7 +1839,7 @@ exports.ContentObjectVersions = /*#__PURE__*/function () {
1839
1839
  }();
1840
1840
 
1841
1841
  /**
1842
- * Retrieve the version hash of the latest version of the specified object from chain
1842
+ * Retrieve the version hash of the latest version of the specified object
1843
1843
  *
1844
1844
  * @methodGroup Content Objects
1845
1845
  * @namedParams
@@ -1918,70 +1918,6 @@ exports.LatestVersionHash = /*#__PURE__*/function () {
1918
1918
  };
1919
1919
  }();
1920
1920
 
1921
- /**
1922
- * Retrieve the version hash of the latest version of the specified object via fabric API.
1923
- * Requires authorization.
1924
- *
1925
- * @methodGroup Content Objects
1926
- * @namedParams
1927
- * @param {string=} objectId - ID of the object
1928
- * @param {string=} versionHash - Version hash of the object
1929
- *
1930
- * @returns {Promise<string>} - The latest version hash of the object
1931
- */
1932
- exports.LatestVersionHashV2 = /*#__PURE__*/function () {
1933
- var _ref49 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee28(_ref48) {
1934
- var objectId, versionHash, latestHash, path, q;
1935
- return _regeneratorRuntime.wrap(function _callee28$(_context28) {
1936
- while (1) switch (_context28.prev = _context28.next) {
1937
- case 0:
1938
- objectId = _ref48.objectId, versionHash = _ref48.versionHash;
1939
- if (versionHash) {
1940
- objectId = this.utils.DecodeVersionHash(versionHash).objectId;
1941
- }
1942
- ValidateObject(objectId);
1943
- _context28.prev = 3;
1944
- path = UrlJoin("q", objectId);
1945
- _context28.t0 = this.utils;
1946
- _context28.t1 = this.HttpClient;
1947
- _context28.next = 9;
1948
- return this.authClient.AuthorizationHeader({
1949
- objectId: objectId
1950
- });
1951
- case 9:
1952
- _context28.t2 = _context28.sent;
1953
- _context28.t3 = path;
1954
- _context28.t4 = {
1955
- headers: _context28.t2,
1956
- method: "GET",
1957
- path: _context28.t3
1958
- };
1959
- _context28.t5 = _context28.t1.Request.call(_context28.t1, _context28.t4);
1960
- _context28.next = 15;
1961
- return _context28.t0.ResponseToJson.call(_context28.t0, _context28.t5);
1962
- case 15:
1963
- q = _context28.sent;
1964
- latestHash = q.hash;
1965
- _context28.next = 23;
1966
- break;
1967
- case 19:
1968
- _context28.prev = 19;
1969
- _context28.t6 = _context28["catch"](3);
1970
- console.log("ERROR", _context28.t6);
1971
- throw Error("Unable to determine latest version hash for ".concat(versionHash || objectId));
1972
- case 23:
1973
- return _context28.abrupt("return", latestHash);
1974
- case 24:
1975
- case "end":
1976
- return _context28.stop();
1977
- }
1978
- }, _callee28, this, [[3, 19]]);
1979
- }));
1980
- return function (_x29) {
1981
- return _ref49.apply(this, arguments);
1982
- };
1983
- }();
1984
-
1985
1921
  /* URL Methods */
1986
1922
 
1987
1923
  /**
@@ -1990,17 +1926,17 @@ exports.LatestVersionHashV2 = /*#__PURE__*/function () {
1990
1926
  * @methodGroup Media
1991
1927
  * @return {Promise<Array<string>>}
1992
1928
  */
1993
- exports.AvailableDRMs = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee29() {
1929
+ exports.AvailableDRMs = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee28() {
1994
1930
  var availableDRMs, info, version, major, minor, _version, _major, _minor, config;
1995
- return _regeneratorRuntime.wrap(function _callee29$(_context29) {
1996
- while (1) switch (_context29.prev = _context29.next) {
1931
+ return _regeneratorRuntime.wrap(function _callee28$(_context28) {
1932
+ while (1) switch (_context28.prev = _context28.next) {
1997
1933
  case 0:
1998
1934
  availableDRMs = ["clear", "aes-128"];
1999
1935
  if (!(typeof window === "undefined")) {
2000
- _context29.next = 3;
1936
+ _context28.next = 3;
2001
1937
  break;
2002
1938
  }
2003
- return _context29.abrupt("return", availableDRMs);
1939
+ return _context28.abrupt("return", availableDRMs);
2004
1940
  case 3:
2005
1941
  // Detect iOS > 13.1 or Safari > 13.1 and replace aes-128 with sample-aes
2006
1942
  if (window.navigator && window.navigator.userAgent) {
@@ -2030,12 +1966,12 @@ exports.AvailableDRMs = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regenerato
2030
1966
  }
2031
1967
  }
2032
1968
  if (!(typeof window !== "undefined" && typeof window.navigator.requestMediaKeySystemAccess !== "function")) {
2033
- _context29.next = 6;
1969
+ _context28.next = 6;
2034
1970
  break;
2035
1971
  }
2036
- return _context29.abrupt("return", availableDRMs);
1972
+ return _context28.abrupt("return", availableDRMs);
2037
1973
  case 6:
2038
- _context29.prev = 6;
1974
+ _context28.prev = 6;
2039
1975
  config = [{
2040
1976
  initDataTypes: ["cenc"],
2041
1977
  audioCapabilities: [{
@@ -2045,59 +1981,59 @@ exports.AvailableDRMs = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regenerato
2045
1981
  contentType: "video/mp4;codecs=\"avc1.42E01E\""
2046
1982
  }]
2047
1983
  }];
2048
- _context29.next = 10;
1984
+ _context28.next = 10;
2049
1985
  return navigator.requestMediaKeySystemAccess("com.widevine.alpha", config);
2050
1986
  case 10:
2051
1987
  availableDRMs.push("widevine");
2052
1988
  // eslint-disable-next-line no-empty
2053
- _context29.next = 15;
1989
+ _context28.next = 15;
2054
1990
  break;
2055
1991
  case 13:
2056
- _context29.prev = 13;
2057
- _context29.t0 = _context29["catch"](6);
1992
+ _context28.prev = 13;
1993
+ _context28.t0 = _context28["catch"](6);
2058
1994
  case 15:
2059
- return _context29.abrupt("return", availableDRMs);
1995
+ return _context28.abrupt("return", availableDRMs);
2060
1996
  case 16:
2061
1997
  case "end":
2062
- return _context29.stop();
1998
+ return _context28.stop();
2063
1999
  }
2064
- }, _callee29, null, [[6, 13]]);
2000
+ }, _callee28, null, [[6, 13]]);
2065
2001
  }));
2066
2002
  exports.PlayoutPathResolution = /*#__PURE__*/function () {
2067
- var _ref52 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee30(_ref51) {
2068
- var libraryId, objectId, versionHash, writeToken, linkPath, handler, _ref51$offering, offering, _ref51$signedLink, signedLink, authorizationToken, path, linkTargetLibraryId, linkTargetId, linkTargetHash, multiOfferingLink, linkInfo;
2069
- return _regeneratorRuntime.wrap(function _callee30$(_context30) {
2070
- while (1) switch (_context30.prev = _context30.next) {
2003
+ var _ref50 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee29(_ref49) {
2004
+ var libraryId, objectId, versionHash, writeToken, linkPath, handler, _ref49$offering, offering, _ref49$signedLink, signedLink, authorizationToken, path, linkTargetLibraryId, linkTargetId, linkTargetHash, multiOfferingLink, linkInfo;
2005
+ return _regeneratorRuntime.wrap(function _callee29$(_context29) {
2006
+ while (1) switch (_context29.prev = _context29.next) {
2071
2007
  case 0:
2072
- libraryId = _ref51.libraryId, objectId = _ref51.objectId, versionHash = _ref51.versionHash, writeToken = _ref51.writeToken, linkPath = _ref51.linkPath, handler = _ref51.handler, _ref51$offering = _ref51.offering, offering = _ref51$offering === void 0 ? "" : _ref51$offering, _ref51$signedLink = _ref51.signedLink, signedLink = _ref51$signedLink === void 0 ? false : _ref51$signedLink, authorizationToken = _ref51.authorizationToken;
2008
+ libraryId = _ref49.libraryId, objectId = _ref49.objectId, versionHash = _ref49.versionHash, writeToken = _ref49.writeToken, linkPath = _ref49.linkPath, handler = _ref49.handler, _ref49$offering = _ref49.offering, offering = _ref49$offering === void 0 ? "" : _ref49$offering, _ref49$signedLink = _ref49.signedLink, signedLink = _ref49$signedLink === void 0 ? false : _ref49$signedLink, authorizationToken = _ref49.authorizationToken;
2073
2009
  if (libraryId) {
2074
- _context30.next = 5;
2010
+ _context29.next = 5;
2075
2011
  break;
2076
2012
  }
2077
- _context30.next = 4;
2013
+ _context29.next = 4;
2078
2014
  return this.ContentObjectLibraryId({
2079
2015
  objectId: objectId
2080
2016
  });
2081
2017
  case 4:
2082
- libraryId = _context30.sent;
2018
+ libraryId = _context29.sent;
2083
2019
  case 5:
2084
2020
  if (versionHash) {
2085
- _context30.next = 9;
2021
+ _context29.next = 9;
2086
2022
  break;
2087
2023
  }
2088
- _context30.next = 8;
2024
+ _context29.next = 8;
2089
2025
  return this.LatestVersionHash({
2090
2026
  objectId: objectId
2091
2027
  });
2092
2028
  case 8:
2093
- versionHash = _context30.sent;
2029
+ versionHash = _context29.sent;
2094
2030
  case 9:
2095
2031
  path = UrlJoin("qlibs", libraryId, "q", writeToken || versionHash, "rep", handler, offering, "options.json");
2096
2032
  if (!linkPath) {
2097
- _context30.next = 26;
2033
+ _context29.next = 26;
2098
2034
  break;
2099
2035
  }
2100
- _context30.next = 13;
2036
+ _context29.next = 13;
2101
2037
  return this.ContentObjectMetadata({
2102
2038
  libraryId: libraryId,
2103
2039
  objectId: objectId,
@@ -2110,16 +2046,16 @@ exports.PlayoutPathResolution = /*#__PURE__*/function () {
2110
2046
  authorizationToken: authorizationToken
2111
2047
  });
2112
2048
  case 13:
2113
- linkInfo = _context30.sent;
2049
+ linkInfo = _context29.sent;
2114
2050
  multiOfferingLink = !!linkInfo && !!linkInfo["/"] && !linkInfo["/"].endsWith("options.json");
2115
2051
 
2116
2052
  // Default case: Use link path directly
2117
2053
  path = UrlJoin("qlibs", libraryId, "q", writeToken || versionHash, "meta", linkPath);
2118
2054
  if (signedLink) {
2119
- _context30.next = 25;
2055
+ _context29.next = 25;
2120
2056
  break;
2121
2057
  }
2122
- _context30.next = 19;
2058
+ _context29.next = 19;
2123
2059
  return this.LinkTarget({
2124
2060
  libraryId: libraryId,
2125
2061
  objectId: objectId,
@@ -2130,14 +2066,14 @@ exports.PlayoutPathResolution = /*#__PURE__*/function () {
2130
2066
  authorizationToken: authorizationToken
2131
2067
  });
2132
2068
  case 19:
2133
- linkTargetHash = _context30.sent;
2069
+ linkTargetHash = _context29.sent;
2134
2070
  linkTargetId = this.utils.DecodeVersionHash(linkTargetHash).objectId;
2135
- _context30.next = 23;
2071
+ _context29.next = 23;
2136
2072
  return this.ContentObjectLibraryId({
2137
2073
  objectId: linkTargetId
2138
2074
  });
2139
2075
  case 23:
2140
- linkTargetLibraryId = _context30.sent;
2076
+ linkTargetLibraryId = _context29.sent;
2141
2077
  if (!multiOfferingLink && !offering) {
2142
2078
  // If the offering is not specified, the intent is to get available offerings. For a single offering link, must
2143
2079
  // access available offerings on the object directly
@@ -2149,7 +2085,7 @@ exports.PlayoutPathResolution = /*#__PURE__*/function () {
2149
2085
  path = UrlJoin(path, offering, "options.json");
2150
2086
  }
2151
2087
  case 26:
2152
- return _context30.abrupt("return", {
2088
+ return _context29.abrupt("return", {
2153
2089
  path: path,
2154
2090
  multiOfferingLink: multiOfferingLink,
2155
2091
  linkTarget: {
@@ -2160,12 +2096,12 @@ exports.PlayoutPathResolution = /*#__PURE__*/function () {
2160
2096
  });
2161
2097
  case 27:
2162
2098
  case "end":
2163
- return _context30.stop();
2099
+ return _context29.stop();
2164
2100
  }
2165
- }, _callee30, this);
2101
+ }, _callee29, this);
2166
2102
  }));
2167
- return function (_x30) {
2168
- return _ref52.apply(this, arguments);
2103
+ return function (_x29) {
2104
+ return _ref50.apply(this, arguments);
2169
2105
  };
2170
2106
  }();
2171
2107
 
@@ -2185,44 +2121,44 @@ exports.PlayoutPathResolution = /*#__PURE__*/function () {
2185
2121
  * @return {Promise<Object>} - The available offerings
2186
2122
  */
2187
2123
  exports.AvailableOfferings = /*#__PURE__*/function () {
2188
- var _ref54 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee31(_ref53) {
2189
- var objectId, versionHash, writeToken, linkPath, signedLink, directLink, _ref53$handler, handler, authorizationToken, _yield$this$PlayoutPa, path, authorization;
2190
- return _regeneratorRuntime.wrap(function _callee31$(_context31) {
2191
- while (1) switch (_context31.prev = _context31.next) {
2124
+ var _ref52 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee30(_ref51) {
2125
+ var objectId, versionHash, writeToken, linkPath, signedLink, directLink, _ref51$handler, handler, authorizationToken, _yield$this$PlayoutPa, path, authorization;
2126
+ return _regeneratorRuntime.wrap(function _callee30$(_context30) {
2127
+ while (1) switch (_context30.prev = _context30.next) {
2192
2128
  case 0:
2193
- objectId = _ref53.objectId, versionHash = _ref53.versionHash, writeToken = _ref53.writeToken, linkPath = _ref53.linkPath, signedLink = _ref53.signedLink, directLink = _ref53.directLink, _ref53$handler = _ref53.handler, handler = _ref53$handler === void 0 ? "playout" : _ref53$handler, authorizationToken = _ref53.authorizationToken;
2129
+ objectId = _ref51.objectId, versionHash = _ref51.versionHash, writeToken = _ref51.writeToken, linkPath = _ref51.linkPath, signedLink = _ref51.signedLink, directLink = _ref51.directLink, _ref51$handler = _ref51.handler, handler = _ref51$handler === void 0 ? "playout" : _ref51$handler, authorizationToken = _ref51.authorizationToken;
2194
2130
  if (!objectId) {
2195
2131
  objectId = this.utils.DecodeVersionHash(versionHash).objectId;
2196
2132
  }
2197
2133
  if (!directLink) {
2198
- _context31.next = 15;
2134
+ _context30.next = 15;
2199
2135
  break;
2200
2136
  }
2201
- _context31.t0 = this;
2202
- _context31.next = 6;
2137
+ _context30.t0 = this;
2138
+ _context30.next = 6;
2203
2139
  return this.ContentObjectLibraryId({
2204
2140
  objectId: objectId
2205
2141
  });
2206
2142
  case 6:
2207
- _context31.t1 = _context31.sent;
2208
- _context31.t2 = objectId;
2209
- _context31.t3 = versionHash;
2210
- _context31.t4 = linkPath;
2211
- _context31.t5 = authorizationToken;
2212
- _context31.t6 = {
2213
- libraryId: _context31.t1,
2214
- objectId: _context31.t2,
2215
- versionHash: _context31.t3,
2216
- metadataSubtree: _context31.t4,
2143
+ _context30.t1 = _context30.sent;
2144
+ _context30.t2 = objectId;
2145
+ _context30.t3 = versionHash;
2146
+ _context30.t4 = linkPath;
2147
+ _context30.t5 = authorizationToken;
2148
+ _context30.t6 = {
2149
+ libraryId: _context30.t1,
2150
+ objectId: _context30.t2,
2151
+ versionHash: _context30.t3,
2152
+ metadataSubtree: _context30.t4,
2217
2153
  resolveLinks: true,
2218
- authorizationToken: _context31.t5
2154
+ authorizationToken: _context30.t5
2219
2155
  };
2220
- _context31.next = 14;
2221
- return _context31.t0.ContentObjectMetadata.call(_context31.t0, _context31.t6);
2156
+ _context30.next = 14;
2157
+ return _context30.t0.ContentObjectMetadata.call(_context30.t0, _context30.t6);
2222
2158
  case 14:
2223
- return _context31.abrupt("return", _context31.sent);
2159
+ return _context30.abrupt("return", _context30.sent);
2224
2160
  case 15:
2225
- _context31.next = 17;
2161
+ _context30.next = 17;
2226
2162
  return this.PlayoutPathResolution({
2227
2163
  objectId: objectId,
2228
2164
  versionHash: versionHash,
@@ -2233,22 +2169,22 @@ exports.AvailableOfferings = /*#__PURE__*/function () {
2233
2169
  authorizationToken: authorizationToken
2234
2170
  });
2235
2171
  case 17:
2236
- _yield$this$PlayoutPa = _context31.sent;
2172
+ _yield$this$PlayoutPa = _context30.sent;
2237
2173
  path = _yield$this$PlayoutPa.path;
2238
- _context31.prev = 19;
2239
- _context31.t7 = authorizationToken;
2240
- _context31.next = 23;
2174
+ _context30.prev = 19;
2175
+ _context30.t7 = authorizationToken;
2176
+ _context30.next = 23;
2241
2177
  return this.authClient.AuthorizationToken({
2242
2178
  objectId: objectId,
2243
2179
  channelAuth: true,
2244
2180
  oauthToken: this.oauthToken
2245
2181
  });
2246
2182
  case 23:
2247
- _context31.t8 = _context31.sent;
2248
- authorization = [_context31.t7, _context31.t8].flat().filter(function (token) {
2183
+ _context30.t8 = _context30.sent;
2184
+ authorization = [_context30.t7, _context30.t8].flat().filter(function (token) {
2249
2185
  return token;
2250
2186
  });
2251
- _context31.next = 27;
2187
+ _context30.next = 27;
2252
2188
  return this.utils.ResponseToJson(this.HttpClient.Request({
2253
2189
  path: path,
2254
2190
  method: "GET",
@@ -2257,25 +2193,25 @@ exports.AvailableOfferings = /*#__PURE__*/function () {
2257
2193
  }
2258
2194
  }));
2259
2195
  case 27:
2260
- return _context31.abrupt("return", _context31.sent);
2196
+ return _context30.abrupt("return", _context30.sent);
2261
2197
  case 30:
2262
- _context31.prev = 30;
2263
- _context31.t9 = _context31["catch"](19);
2264
- if (!(_context31.t9.status && parseInt(_context31.t9.status) === 500)) {
2265
- _context31.next = 34;
2198
+ _context30.prev = 30;
2199
+ _context30.t9 = _context30["catch"](19);
2200
+ if (!(_context30.t9.status && parseInt(_context30.t9.status) === 500)) {
2201
+ _context30.next = 34;
2266
2202
  break;
2267
2203
  }
2268
- return _context31.abrupt("return", {});
2204
+ return _context30.abrupt("return", {});
2269
2205
  case 34:
2270
- throw _context31.t9;
2206
+ throw _context30.t9;
2271
2207
  case 35:
2272
2208
  case "end":
2273
- return _context31.stop();
2209
+ return _context30.stop();
2274
2210
  }
2275
- }, _callee31, this, [[19, 30]]);
2211
+ }, _callee30, this, [[19, 30]]);
2276
2212
  }));
2277
- return function (_x31) {
2278
- return _ref54.apply(this, arguments);
2213
+ return function (_x30) {
2214
+ return _ref52.apply(this, arguments);
2279
2215
  };
2280
2216
  }();
2281
2217
 
@@ -2308,15 +2244,15 @@ exports.AvailableOfferings = /*#__PURE__*/function () {
2308
2244
  * @param {Object=} options - Additional query parameters to pass when requesting available playout options, such as clipping parameters.
2309
2245
  */
2310
2246
  exports.PlayoutOptions = /*#__PURE__*/function () {
2311
- var _ref56 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee34(_ref55) {
2247
+ var _ref54 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee33(_ref53) {
2312
2248
  var _this9 = this;
2313
- var offeringURI, objectId, versionHash, writeToken, linkPath, _ref55$signedLink, signedLink, _ref55$protocols, protocols, _ref55$handler, handler, _ref55$offering, offering, playoutType, _ref55$drms, drms, context, _ref55$hlsjsProfile, hlsjsProfile, authorizationToken, _ref55$options, options, uriInfo, libraryId, offeringPath, link, _yield$this$PlayoutPa2, path, linkTarget, audienceData, authorization, queryParams, playoutOptions, playoutMap, sessionId, multiview, i, option, protocol, drm, playoutPath, licenseServers, cert, method, certUrl, protocolMatch, drmMatch;
2314
- return _regeneratorRuntime.wrap(function _callee34$(_context34) {
2315
- while (1) switch (_context34.prev = _context34.next) {
2249
+ var offeringURI, objectId, versionHash, writeToken, linkPath, _ref53$signedLink, signedLink, _ref53$protocols, protocols, _ref53$handler, handler, _ref53$offering, offering, playoutType, _ref53$drms, drms, context, _ref53$hlsjsProfile, hlsjsProfile, authorizationToken, _ref53$options, options, uriInfo, libraryId, offeringPath, link, _yield$this$PlayoutPa2, path, linkTarget, audienceData, authorization, queryParams, playoutOptions, playoutMap, sessionId, multiview, i, option, protocol, drm, playoutPath, licenseServers, cert, method, certUrl, protocolMatch, drmMatch;
2250
+ return _regeneratorRuntime.wrap(function _callee33$(_context33) {
2251
+ while (1) switch (_context33.prev = _context33.next) {
2316
2252
  case 0:
2317
- offeringURI = _ref55.offeringURI, objectId = _ref55.objectId, versionHash = _ref55.versionHash, writeToken = _ref55.writeToken, linkPath = _ref55.linkPath, _ref55$signedLink = _ref55.signedLink, signedLink = _ref55$signedLink === void 0 ? false : _ref55$signedLink, _ref55$protocols = _ref55.protocols, protocols = _ref55$protocols === void 0 ? ["dash", "hls"] : _ref55$protocols, _ref55$handler = _ref55.handler, handler = _ref55$handler === void 0 ? "playout" : _ref55$handler, _ref55$offering = _ref55.offering, offering = _ref55$offering === void 0 ? "default" : _ref55$offering, playoutType = _ref55.playoutType, _ref55$drms = _ref55.drms, drms = _ref55$drms === void 0 ? [] : _ref55$drms, context = _ref55.context, _ref55$hlsjsProfile = _ref55.hlsjsProfile, hlsjsProfile = _ref55$hlsjsProfile === void 0 ? true : _ref55$hlsjsProfile, authorizationToken = _ref55.authorizationToken, _ref55$options = _ref55.options, options = _ref55$options === void 0 ? {} : _ref55$options;
2253
+ offeringURI = _ref53.offeringURI, objectId = _ref53.objectId, versionHash = _ref53.versionHash, writeToken = _ref53.writeToken, linkPath = _ref53.linkPath, _ref53$signedLink = _ref53.signedLink, signedLink = _ref53$signedLink === void 0 ? false : _ref53$signedLink, _ref53$protocols = _ref53.protocols, protocols = _ref53$protocols === void 0 ? ["dash", "hls"] : _ref53$protocols, _ref53$handler = _ref53.handler, handler = _ref53$handler === void 0 ? "playout" : _ref53$handler, _ref53$offering = _ref53.offering, offering = _ref53$offering === void 0 ? "default" : _ref53$offering, playoutType = _ref53.playoutType, _ref53$drms = _ref53.drms, drms = _ref53$drms === void 0 ? [] : _ref53$drms, context = _ref53.context, _ref53$hlsjsProfile = _ref53.hlsjsProfile, hlsjsProfile = _ref53$hlsjsProfile === void 0 ? true : _ref53$hlsjsProfile, authorizationToken = _ref53.authorizationToken, _ref53$options = _ref53.options, options = _ref53$options === void 0 ? {} : _ref53$options;
2318
2254
  if (!offeringURI) {
2319
- _context34.next = 8;
2255
+ _context33.next = 8;
2320
2256
  break;
2321
2257
  }
2322
2258
  uriInfo = offeringURI.match(/(hq__[^/]+)\/rep\/([^/]+)\/([^/]+)\/options.json/);
@@ -2324,7 +2260,7 @@ exports.PlayoutOptions = /*#__PURE__*/function () {
2324
2260
  handler = uriInfo[2];
2325
2261
  offering = uriInfo[3];
2326
2262
  if (!(!versionHash || !handler || !offering)) {
2327
- _context34.next = 8;
2263
+ _context33.next = 8;
2328
2264
  break;
2329
2265
  }
2330
2266
  throw Error("Invalid offering URI: ".concat(offeringURI));
@@ -2337,37 +2273,37 @@ exports.PlayoutOptions = /*#__PURE__*/function () {
2337
2273
  return d.toLowerCase();
2338
2274
  });
2339
2275
  if (objectId) {
2340
- _context34.next = 15;
2276
+ _context33.next = 15;
2341
2277
  break;
2342
2278
  }
2343
2279
  objectId = this.utils.DecodeVersionHash(versionHash).objectId;
2344
- _context34.next = 19;
2280
+ _context33.next = 19;
2345
2281
  break;
2346
2282
  case 15:
2347
2283
  if (versionHash) {
2348
- _context34.next = 19;
2284
+ _context33.next = 19;
2349
2285
  break;
2350
2286
  }
2351
- _context34.next = 18;
2287
+ _context33.next = 18;
2352
2288
  return this.LatestVersionHash({
2353
2289
  objectId: objectId
2354
2290
  });
2355
2291
  case 18:
2356
- versionHash = _context34.sent;
2292
+ versionHash = _context33.sent;
2357
2293
  case 19:
2358
- _context34.next = 21;
2294
+ _context33.next = 21;
2359
2295
  return this.ContentObjectLibraryId({
2360
2296
  objectId: objectId
2361
2297
  });
2362
2298
  case 21:
2363
- libraryId = _context34.sent;
2364
- _context34.prev = 22;
2299
+ libraryId = _context33.sent;
2300
+ _context33.prev = 22;
2365
2301
  if (linkPath) {
2366
- _context34.next = 29;
2302
+ _context33.next = 29;
2367
2303
  break;
2368
2304
  }
2369
2305
  offeringPath = UrlJoin("public", "asset_metadata", "sources", offering);
2370
- _context34.next = 27;
2306
+ _context33.next = 27;
2371
2307
  return this.ContentObjectMetadata({
2372
2308
  libraryId: libraryId,
2373
2309
  objectId: objectId,
@@ -2376,18 +2312,18 @@ exports.PlayoutOptions = /*#__PURE__*/function () {
2376
2312
  authorizationToken: authorizationToken
2377
2313
  });
2378
2314
  case 27:
2379
- link = _context34.sent;
2315
+ link = _context33.sent;
2380
2316
  if (link) {
2381
2317
  linkPath = offeringPath;
2382
2318
  }
2383
2319
  case 29:
2384
- _context34.next = 33;
2320
+ _context33.next = 33;
2385
2321
  break;
2386
2322
  case 31:
2387
- _context34.prev = 31;
2388
- _context34.t0 = _context34["catch"](22);
2323
+ _context33.prev = 31;
2324
+ _context33.t0 = _context33["catch"](22);
2389
2325
  case 33:
2390
- _context34.next = 35;
2326
+ _context33.next = 35;
2391
2327
  return this.PlayoutPathResolution({
2392
2328
  libraryId: libraryId,
2393
2329
  objectId: objectId,
@@ -2400,37 +2336,37 @@ exports.PlayoutOptions = /*#__PURE__*/function () {
2400
2336
  authorizationToken: authorizationToken
2401
2337
  });
2402
2338
  case 35:
2403
- _yield$this$PlayoutPa2 = _context34.sent;
2339
+ _yield$this$PlayoutPa2 = _context33.sent;
2404
2340
  path = _yield$this$PlayoutPa2.path;
2405
2341
  linkTarget = _yield$this$PlayoutPa2.linkTarget;
2406
- _context34.t1 = this.authClient;
2407
- _context34.t2 = linkTarget.objectId || objectId;
2408
- _context34.t3 = linkTarget.versionHash || versionHash;
2409
- if (_context34.t3) {
2410
- _context34.next = 45;
2342
+ _context33.t1 = this.authClient;
2343
+ _context33.t2 = linkTarget.objectId || objectId;
2344
+ _context33.t3 = linkTarget.versionHash || versionHash;
2345
+ if (_context33.t3) {
2346
+ _context33.next = 45;
2411
2347
  break;
2412
2348
  }
2413
- _context34.next = 44;
2349
+ _context33.next = 44;
2414
2350
  return this.LatestVersionHash({
2415
2351
  objectId: objectId
2416
2352
  });
2417
2353
  case 44:
2418
- _context34.t3 = _context34.sent;
2354
+ _context33.t3 = _context33.sent;
2419
2355
  case 45:
2420
- _context34.t4 = _context34.t3;
2421
- _context34.t5 = protocols;
2422
- _context34.t6 = drms;
2423
- _context34.t7 = context;
2424
- _context34.t8 = {
2425
- objectId: _context34.t2,
2426
- versionHash: _context34.t4,
2427
- protocols: _context34.t5,
2428
- drms: _context34.t6,
2429
- context: _context34.t7
2356
+ _context33.t4 = _context33.t3;
2357
+ _context33.t5 = protocols;
2358
+ _context33.t6 = drms;
2359
+ _context33.t7 = context;
2360
+ _context33.t8 = {
2361
+ objectId: _context33.t2,
2362
+ versionHash: _context33.t4,
2363
+ protocols: _context33.t5,
2364
+ drms: _context33.t6,
2365
+ context: _context33.t7
2430
2366
  };
2431
- audienceData = _context34.t1.AudienceData.call(_context34.t1, _context34.t8);
2432
- _context34.t9 = authorizationToken;
2433
- _context34.next = 54;
2367
+ audienceData = _context33.t1.AudienceData.call(_context33.t1, _context33.t8);
2368
+ _context33.t9 = authorizationToken;
2369
+ _context33.next = 54;
2434
2370
  return this.authClient.AuthorizationToken({
2435
2371
  libraryId: libraryId,
2436
2372
  objectId: objectId,
@@ -2439,30 +2375,30 @@ exports.PlayoutOptions = /*#__PURE__*/function () {
2439
2375
  audienceData: audienceData
2440
2376
  });
2441
2377
  case 54:
2442
- _context34.t10 = _context34.sent;
2443
- authorization = [_context34.t9, _context34.t10].flat().filter(function (token) {
2378
+ _context33.t10 = _context33.sent;
2379
+ authorization = [_context33.t9, _context33.t10].flat().filter(function (token) {
2444
2380
  return token;
2445
2381
  });
2446
2382
  queryParams = _objectSpread({
2447
2383
  authorization: authorization,
2448
2384
  resolve: !!linkPath
2449
2385
  }, options);
2450
- _context34.t11 = Object;
2451
- _context34.next = 60;
2386
+ _context33.t11 = Object;
2387
+ _context33.next = 60;
2452
2388
  return this.utils.ResponseToJson(this.HttpClient.Request({
2453
2389
  path: path,
2454
2390
  method: "GET",
2455
2391
  queryParams: queryParams
2456
2392
  }));
2457
2393
  case 60:
2458
- _context34.t12 = _context34.sent;
2459
- playoutOptions = _context34.t11.values.call(_context34.t11, _context34.t12);
2394
+ _context33.t12 = _context33.sent;
2395
+ playoutOptions = _context33.t11.values.call(_context33.t11, _context33.t12);
2460
2396
  if (!(!signedLink && linkTarget.versionHash)) {
2461
- _context34.next = 68;
2397
+ _context33.next = 68;
2462
2398
  break;
2463
2399
  }
2464
- _context34.t13 = authorizationToken;
2465
- _context34.next = 66;
2400
+ _context33.t13 = authorizationToken;
2401
+ _context33.next = 66;
2466
2402
  return this.authClient.AuthorizationToken({
2467
2403
  libraryId: linkTarget.libraryId,
2468
2404
  objectId: linkTarget.objectId,
@@ -2471,8 +2407,8 @@ exports.PlayoutOptions = /*#__PURE__*/function () {
2471
2407
  audienceData: audienceData
2472
2408
  });
2473
2409
  case 66:
2474
- _context34.t14 = _context34.sent;
2475
- queryParams.authorization = [_context34.t13, _context34.t14].flat().filter(function (token) {
2410
+ _context33.t14 = _context33.sent;
2411
+ queryParams.authorization = [_context33.t13, _context33.t14].flat().filter(function (token) {
2476
2412
  return token;
2477
2413
  });
2478
2414
  case 68:
@@ -2480,7 +2416,7 @@ exports.PlayoutOptions = /*#__PURE__*/function () {
2480
2416
  i = 0;
2481
2417
  case 70:
2482
2418
  if (!(i < playoutOptions.length)) {
2483
- _context34.next = 116;
2419
+ _context33.next = 116;
2484
2420
  break;
2485
2421
  }
2486
2422
  option = playoutOptions[i];
@@ -2504,20 +2440,20 @@ exports.PlayoutOptions = /*#__PURE__*/function () {
2504
2440
  }
2505
2441
 
2506
2442
  // Create full playout URLs for this protocol / drm combo
2507
- _context34.t15 = _objectSpread;
2508
- _context34.t16 = _objectSpread({}, playoutMap[protocol] || {});
2509
- _context34.t17 = {};
2510
- _context34.t18 = _objectSpread;
2511
- _context34.t19 = _objectSpread({}, (playoutMap[protocol] || {}).playoutMethods || {});
2512
- _context34.t20 = {};
2513
- _context34.t21 = _defineProperty;
2514
- _context34.t22 = {};
2515
- _context34.t23 = drm || "clear";
2443
+ _context33.t15 = _objectSpread;
2444
+ _context33.t16 = _objectSpread({}, playoutMap[protocol] || {});
2445
+ _context33.t17 = {};
2446
+ _context33.t18 = _objectSpread;
2447
+ _context33.t19 = _objectSpread({}, (playoutMap[protocol] || {}).playoutMethods || {});
2448
+ _context33.t20 = {};
2449
+ _context33.t21 = _defineProperty;
2450
+ _context33.t22 = {};
2451
+ _context33.t23 = drm || "clear";
2516
2452
  if (!signedLink) {
2517
- _context34.next = 97;
2453
+ _context33.next = 97;
2518
2454
  break;
2519
2455
  }
2520
- _context34.next = 94;
2456
+ _context33.next = 94;
2521
2457
  return this.LinkUrl({
2522
2458
  versionHash: versionHash,
2523
2459
  linkPath: UrlJoin(linkPath, offering, playoutPath),
@@ -2525,11 +2461,11 @@ exports.PlayoutOptions = /*#__PURE__*/function () {
2525
2461
  noAuth: true
2526
2462
  });
2527
2463
  case 94:
2528
- _context34.t24 = _context34.sent;
2529
- _context34.next = 100;
2464
+ _context33.t24 = _context33.sent;
2465
+ _context33.next = 100;
2530
2466
  break;
2531
2467
  case 97:
2532
- _context34.next = 99;
2468
+ _context33.next = 99;
2533
2469
  return this.Rep({
2534
2470
  libraryId: linkTarget.libraryId || libraryId,
2535
2471
  objectId: linkTarget.objectId || objectId,
@@ -2539,23 +2475,23 @@ exports.PlayoutOptions = /*#__PURE__*/function () {
2539
2475
  queryParams: queryParams
2540
2476
  });
2541
2477
  case 99:
2542
- _context34.t24 = _context34.sent;
2478
+ _context33.t24 = _context33.sent;
2543
2479
  case 100:
2544
- _context34.t25 = _context34.t24;
2545
- _context34.t26 = drm ? _defineProperty({}, drm, {
2480
+ _context33.t25 = _context33.t24;
2481
+ _context33.t26 = drm ? _defineProperty({}, drm, {
2546
2482
  licenseServers: licenseServers,
2547
2483
  cert: cert
2548
2484
  }) : undefined;
2549
- _context34.t27 = {
2550
- playoutUrl: _context34.t25,
2551
- drms: _context34.t26
2485
+ _context33.t27 = {
2486
+ playoutUrl: _context33.t25,
2487
+ drms: _context33.t26
2552
2488
  };
2553
- _context34.t28 = (0, _context34.t21)(_context34.t22, _context34.t23, _context34.t27);
2554
- _context34.t29 = (0, _context34.t18)(_context34.t19, _context34.t20, _context34.t28);
2555
- _context34.t30 = {
2556
- playoutMethods: _context34.t29
2489
+ _context33.t28 = (0, _context33.t21)(_context33.t22, _context33.t23, _context33.t27);
2490
+ _context33.t29 = (0, _context33.t18)(_context33.t19, _context33.t20, _context33.t28);
2491
+ _context33.t30 = {
2492
+ playoutMethods: _context33.t29
2557
2493
  };
2558
- playoutMap[protocol] = (0, _context34.t15)(_context34.t16, _context34.t17, _context34.t30);
2494
+ playoutMap[protocol] = (0, _context33.t15)(_context33.t16, _context33.t17, _context33.t30);
2559
2495
  // Add .cert_url if playoutMap[protocol].playoutMethods[].drms[].cert is present
2560
2496
  // (for clients that need cert supplied as a URL reference rather than as a string literal)
2561
2497
  for (method in playoutMap[protocol].playoutMethods) {
@@ -2571,10 +2507,10 @@ exports.PlayoutOptions = /*#__PURE__*/function () {
2571
2507
  protocolMatch = protocols.includes(protocol);
2572
2508
  drmMatch = drms.includes(drm || "clear") || drms.length === 0 && !drm;
2573
2509
  if (!(!protocolMatch || !drmMatch)) {
2574
- _context34.next = 112;
2510
+ _context33.next = 112;
2575
2511
  break;
2576
2512
  }
2577
- return _context34.abrupt("continue", 113);
2513
+ return _context33.abrupt("continue", 113);
2578
2514
  case 112:
2579
2515
  // This protocol / DRM satisfies the specifications (prefer DRM over clear, if available)
2580
2516
  if (!playoutMap[protocol].playoutUrl || drm && drm !== "clear") {
@@ -2583,19 +2519,19 @@ exports.PlayoutOptions = /*#__PURE__*/function () {
2583
2519
  }
2584
2520
  case 113:
2585
2521
  i++;
2586
- _context34.next = 70;
2522
+ _context33.next = 70;
2587
2523
  break;
2588
2524
  case 116:
2589
2525
  // Callbacks for retrieving and setting multiview views
2590
2526
  if (multiview && sessionId) {
2591
2527
  playoutMap.sessionId = sessionId;
2592
2528
  playoutMap.multiview = true;
2593
- playoutMap.AvailableViews = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee32() {
2594
- return _regeneratorRuntime.wrap(function _callee32$(_context32) {
2595
- while (1) switch (_context32.prev = _context32.next) {
2529
+ playoutMap.AvailableViews = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee31() {
2530
+ return _regeneratorRuntime.wrap(function _callee31$(_context31) {
2531
+ while (1) switch (_context31.prev = _context31.next) {
2596
2532
  case 0:
2597
- _context32.t0 = _this9.utils;
2598
- _context32.next = 3;
2533
+ _context31.t0 = _this9.utils;
2534
+ _context31.next = 3;
2599
2535
  return _this9.HttpClient.Request({
2600
2536
  path: UrlJoin("q", linkTarget.versionHash || versionHash, "rep", handler, offering, "views.json"),
2601
2537
  method: "GET",
@@ -2605,23 +2541,23 @@ exports.PlayoutOptions = /*#__PURE__*/function () {
2605
2541
  }
2606
2542
  });
2607
2543
  case 3:
2608
- _context32.t1 = _context32.sent;
2609
- _context32.next = 6;
2610
- return _context32.t0.ResponseToFormat.call(_context32.t0, "json", _context32.t1);
2544
+ _context31.t1 = _context31.sent;
2545
+ _context31.next = 6;
2546
+ return _context31.t0.ResponseToFormat.call(_context31.t0, "json", _context31.t1);
2611
2547
  case 6:
2612
- return _context32.abrupt("return", _context32.sent);
2548
+ return _context31.abrupt("return", _context31.sent);
2613
2549
  case 7:
2614
2550
  case "end":
2615
- return _context32.stop();
2551
+ return _context31.stop();
2616
2552
  }
2617
- }, _callee32);
2553
+ }, _callee31);
2618
2554
  }));
2619
2555
  playoutMap.SwitchView = /*#__PURE__*/function () {
2620
- var _ref59 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee33(view) {
2621
- return _regeneratorRuntime.wrap(function _callee33$(_context33) {
2622
- while (1) switch (_context33.prev = _context33.next) {
2556
+ var _ref57 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee32(view) {
2557
+ return _regeneratorRuntime.wrap(function _callee32$(_context32) {
2558
+ while (1) switch (_context32.prev = _context32.next) {
2623
2559
  case 0:
2624
- _context33.next = 2;
2560
+ _context32.next = 2;
2625
2561
  return _this9.HttpClient.Request({
2626
2562
  path: UrlJoin("q", linkTarget.versionHash || versionHash, "rep", handler, offering, "select_view"),
2627
2563
  method: "POST",
@@ -2635,25 +2571,25 @@ exports.PlayoutOptions = /*#__PURE__*/function () {
2635
2571
  });
2636
2572
  case 2:
2637
2573
  case "end":
2638
- return _context33.stop();
2574
+ return _context32.stop();
2639
2575
  }
2640
- }, _callee33);
2576
+ }, _callee32);
2641
2577
  }));
2642
- return function (_x33) {
2643
- return _ref59.apply(this, arguments);
2578
+ return function (_x32) {
2579
+ return _ref57.apply(this, arguments);
2644
2580
  };
2645
2581
  }();
2646
2582
  }
2647
2583
  this.Log(playoutMap);
2648
- return _context34.abrupt("return", playoutMap);
2584
+ return _context33.abrupt("return", playoutMap);
2649
2585
  case 119:
2650
2586
  case "end":
2651
- return _context34.stop();
2587
+ return _context33.stop();
2652
2588
  }
2653
- }, _callee34, this, [[22, 31]]);
2589
+ }, _callee33, this, [[22, 31]]);
2654
2590
  }));
2655
- return function (_x32) {
2656
- return _ref56.apply(this, arguments);
2591
+ return function (_x31) {
2592
+ return _ref54.apply(this, arguments);
2657
2593
  };
2658
2594
  }();
2659
2595
 
@@ -2682,17 +2618,17 @@ exports.PlayoutOptions = /*#__PURE__*/function () {
2682
2618
  * @param {Object=} options - Additional query parameters to pass when requesting available playout options, such as clipping parameters.
2683
2619
  */
2684
2620
  exports.BitmovinPlayoutOptions = /*#__PURE__*/function () {
2685
- var _ref61 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee35(_ref60) {
2686
- var objectId, versionHash, writeToken, linkPath, _ref60$signedLink, signedLink, _ref60$protocols, protocols, _ref60$drms, drms, _ref60$handler, handler, _ref60$offering, offering, playoutType, context, authorizationToken, _ref60$options, options, playoutOptions, _yield$this$PlayoutPa3, linkTarget, authorization, config;
2687
- return _regeneratorRuntime.wrap(function _callee35$(_context35) {
2688
- while (1) switch (_context35.prev = _context35.next) {
2621
+ var _ref59 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee34(_ref58) {
2622
+ var objectId, versionHash, writeToken, linkPath, _ref58$signedLink, signedLink, _ref58$protocols, protocols, _ref58$drms, drms, _ref58$handler, handler, _ref58$offering, offering, playoutType, context, authorizationToken, _ref58$options, options, playoutOptions, _yield$this$PlayoutPa3, linkTarget, authorization, config;
2623
+ return _regeneratorRuntime.wrap(function _callee34$(_context34) {
2624
+ while (1) switch (_context34.prev = _context34.next) {
2689
2625
  case 0:
2690
- objectId = _ref60.objectId, versionHash = _ref60.versionHash, writeToken = _ref60.writeToken, linkPath = _ref60.linkPath, _ref60$signedLink = _ref60.signedLink, signedLink = _ref60$signedLink === void 0 ? false : _ref60$signedLink, _ref60$protocols = _ref60.protocols, protocols = _ref60$protocols === void 0 ? ["dash", "hls"] : _ref60$protocols, _ref60$drms = _ref60.drms, drms = _ref60$drms === void 0 ? [] : _ref60$drms, _ref60$handler = _ref60.handler, handler = _ref60$handler === void 0 ? "playout" : _ref60$handler, _ref60$offering = _ref60.offering, offering = _ref60$offering === void 0 ? "default" : _ref60$offering, playoutType = _ref60.playoutType, context = _ref60.context, authorizationToken = _ref60.authorizationToken, _ref60$options = _ref60.options, options = _ref60$options === void 0 ? {} : _ref60$options;
2626
+ objectId = _ref58.objectId, versionHash = _ref58.versionHash, writeToken = _ref58.writeToken, linkPath = _ref58.linkPath, _ref58$signedLink = _ref58.signedLink, signedLink = _ref58$signedLink === void 0 ? false : _ref58$signedLink, _ref58$protocols = _ref58.protocols, protocols = _ref58$protocols === void 0 ? ["dash", "hls"] : _ref58$protocols, _ref58$drms = _ref58.drms, drms = _ref58$drms === void 0 ? [] : _ref58$drms, _ref58$handler = _ref58.handler, handler = _ref58$handler === void 0 ? "playout" : _ref58$handler, _ref58$offering = _ref58.offering, offering = _ref58$offering === void 0 ? "default" : _ref58$offering, playoutType = _ref58.playoutType, context = _ref58.context, authorizationToken = _ref58.authorizationToken, _ref58$options = _ref58.options, options = _ref58$options === void 0 ? {} : _ref58$options;
2691
2627
  versionHash ? ValidateVersion(versionHash) : ValidateObject(objectId);
2692
2628
  if (!objectId) {
2693
2629
  objectId = this.utils.DecodeVersionHash(versionHash).objectId;
2694
2630
  }
2695
- _context35.next = 5;
2631
+ _context34.next = 5;
2696
2632
  return this.PlayoutOptions({
2697
2633
  objectId: objectId,
2698
2634
  versionHash: versionHash,
@@ -2710,9 +2646,9 @@ exports.BitmovinPlayoutOptions = /*#__PURE__*/function () {
2710
2646
  options: options
2711
2647
  });
2712
2648
  case 5:
2713
- playoutOptions = _context35.sent;
2649
+ playoutOptions = _context34.sent;
2714
2650
  delete playoutOptions.playoutMethods;
2715
- _context35.next = 9;
2651
+ _context34.next = 9;
2716
2652
  return this.PlayoutPathResolution({
2717
2653
  objectId: objectId,
2718
2654
  versionHash: versionHash,
@@ -2724,31 +2660,31 @@ exports.BitmovinPlayoutOptions = /*#__PURE__*/function () {
2724
2660
  authorizationToken: authorizationToken
2725
2661
  });
2726
2662
  case 9:
2727
- _yield$this$PlayoutPa3 = _context35.sent;
2663
+ _yield$this$PlayoutPa3 = _context34.sent;
2728
2664
  linkTarget = _yield$this$PlayoutPa3.linkTarget;
2729
2665
  authorization = [];
2730
2666
  if (authorizationToken) {
2731
2667
  authorization.push(authorizationToken);
2732
2668
  }
2733
2669
  if (!(signedLink || !linkTarget.versionHash)) {
2734
- _context35.next = 21;
2670
+ _context34.next = 21;
2735
2671
  break;
2736
2672
  }
2737
- _context35.t0 = authorization;
2738
- _context35.next = 17;
2673
+ _context34.t0 = authorization;
2674
+ _context34.next = 17;
2739
2675
  return this.authClient.AuthorizationToken({
2740
2676
  objectId: objectId,
2741
2677
  channelAuth: true,
2742
2678
  oauthToken: this.oauthToken
2743
2679
  });
2744
2680
  case 17:
2745
- _context35.t1 = _context35.sent;
2746
- _context35.t0.push.call(_context35.t0, _context35.t1);
2747
- _context35.next = 26;
2681
+ _context34.t1 = _context34.sent;
2682
+ _context34.t0.push.call(_context34.t0, _context34.t1);
2683
+ _context34.next = 26;
2748
2684
  break;
2749
2685
  case 21:
2750
- _context35.t2 = authorization;
2751
- _context35.next = 24;
2686
+ _context34.t2 = authorization;
2687
+ _context34.next = 24;
2752
2688
  return this.authClient.AuthorizationToken({
2753
2689
  libraryId: linkTarget.libraryId,
2754
2690
  objectId: linkTarget.objectId,
@@ -2756,8 +2692,8 @@ exports.BitmovinPlayoutOptions = /*#__PURE__*/function () {
2756
2692
  oauthToken: this.oauthToken
2757
2693
  });
2758
2694
  case 24:
2759
- _context35.t3 = _context35.sent;
2760
- _context35.t2.push.call(_context35.t2, _context35.t3);
2695
+ _context34.t3 = _context34.sent;
2696
+ _context34.t2.push.call(_context34.t2, _context34.t3);
2761
2697
  case 26:
2762
2698
  config = {
2763
2699
  drm: {}
@@ -2798,15 +2734,15 @@ exports.BitmovinPlayoutOptions = /*#__PURE__*/function () {
2798
2734
  });
2799
2735
  }
2800
2736
  });
2801
- return _context35.abrupt("return", config);
2737
+ return _context34.abrupt("return", config);
2802
2738
  case 29:
2803
2739
  case "end":
2804
- return _context35.stop();
2740
+ return _context34.stop();
2805
2741
  }
2806
- }, _callee35, this);
2742
+ }, _callee34, this);
2807
2743
  }));
2808
- return function (_x34) {
2809
- return _ref61.apply(this, arguments);
2744
+ return function (_x33) {
2745
+ return _ref59.apply(this, arguments);
2810
2746
  };
2811
2747
  }();
2812
2748
 
@@ -2830,19 +2766,19 @@ exports.BitmovinPlayoutOptions = /*#__PURE__*/function () {
2830
2766
  * @returns {Promise<format>} - The response from the call in the specified format
2831
2767
  */
2832
2768
  exports.CallBitcodeMethod = /*#__PURE__*/function () {
2833
- var _ref63 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee36(_ref62) {
2834
- var libraryId, objectId, versionHash, writeToken, method, _ref62$queryParams, queryParams, _ref62$body, body, _ref62$headers, headers, _ref62$constant, constant, _ref62$format, format, path, authHeader;
2835
- return _regeneratorRuntime.wrap(function _callee36$(_context36) {
2836
- while (1) switch (_context36.prev = _context36.next) {
2769
+ var _ref61 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee35(_ref60) {
2770
+ var libraryId, objectId, versionHash, writeToken, method, _ref60$queryParams, queryParams, _ref60$body, body, _ref60$headers, headers, _ref60$constant, constant, _ref60$format, format, path, authHeader;
2771
+ return _regeneratorRuntime.wrap(function _callee35$(_context35) {
2772
+ while (1) switch (_context35.prev = _context35.next) {
2837
2773
  case 0:
2838
- libraryId = _ref62.libraryId, objectId = _ref62.objectId, versionHash = _ref62.versionHash, writeToken = _ref62.writeToken, method = _ref62.method, _ref62$queryParams = _ref62.queryParams, queryParams = _ref62$queryParams === void 0 ? {} : _ref62$queryParams, _ref62$body = _ref62.body, body = _ref62$body === void 0 ? {} : _ref62$body, _ref62$headers = _ref62.headers, headers = _ref62$headers === void 0 ? {} : _ref62$headers, _ref62$constant = _ref62.constant, constant = _ref62$constant === void 0 ? true : _ref62$constant, _ref62$format = _ref62.format, format = _ref62$format === void 0 ? "json" : _ref62$format;
2774
+ libraryId = _ref60.libraryId, objectId = _ref60.objectId, versionHash = _ref60.versionHash, writeToken = _ref60.writeToken, method = _ref60.method, _ref60$queryParams = _ref60.queryParams, queryParams = _ref60$queryParams === void 0 ? {} : _ref60$queryParams, _ref60$body = _ref60.body, body = _ref60$body === void 0 ? {} : _ref60$body, _ref60$headers = _ref60.headers, headers = _ref60$headers === void 0 ? {} : _ref60$headers, _ref60$constant = _ref60.constant, constant = _ref60$constant === void 0 ? true : _ref60$constant, _ref60$format = _ref60.format, format = _ref60$format === void 0 ? "json" : _ref60$format;
2839
2775
  ValidateParameters({
2840
2776
  libraryId: libraryId,
2841
2777
  objectId: objectId,
2842
2778
  versionHash: versionHash
2843
2779
  });
2844
2780
  if (method) {
2845
- _context36.next = 4;
2781
+ _context35.next = 4;
2846
2782
  break;
2847
2783
  }
2848
2784
  throw "Bitcode method not specified";
@@ -2856,22 +2792,22 @@ exports.CallBitcodeMethod = /*#__PURE__*/function () {
2856
2792
  }
2857
2793
  authHeader = headers.authorization || headers.Authorization;
2858
2794
  if (authHeader) {
2859
- _context36.next = 12;
2795
+ _context35.next = 12;
2860
2796
  break;
2861
2797
  }
2862
- _context36.next = 11;
2798
+ _context35.next = 11;
2863
2799
  return this.authClient.AuthorizationHeader({
2864
2800
  libraryId: libraryId,
2865
2801
  objectId: objectId,
2866
2802
  update: !constant
2867
2803
  });
2868
2804
  case 11:
2869
- headers.Authorization = _context36.sent.Authorization;
2805
+ headers.Authorization = _context35.sent.Authorization;
2870
2806
  case 12:
2871
2807
  this.Log("Calling bitcode method: ".concat(libraryId || "", " ").concat(objectId || versionHash, " ").concat(writeToken || "", "\n ").concat(constant ? "GET" : "POST", " ").concat(path, "\n Query Params:\n ").concat(JSON.stringify(queryParams || ""), "\n Body:\n ").concat(JSON.stringify(body || ""), "\n Headers\n ").concat(JSON.stringify(headers || "")));
2872
- _context36.t0 = this.utils;
2873
- _context36.t1 = format;
2874
- _context36.next = 17;
2808
+ _context35.t0 = this.utils;
2809
+ _context35.t1 = format;
2810
+ _context35.next = 17;
2875
2811
  return this.HttpClient.Request({
2876
2812
  body: body,
2877
2813
  headers: headers,
@@ -2881,16 +2817,16 @@ exports.CallBitcodeMethod = /*#__PURE__*/function () {
2881
2817
  allowFailover: false
2882
2818
  });
2883
2819
  case 17:
2884
- _context36.t2 = _context36.sent;
2885
- return _context36.abrupt("return", _context36.t0.ResponseToFormat.call(_context36.t0, _context36.t1, _context36.t2));
2820
+ _context35.t2 = _context35.sent;
2821
+ return _context35.abrupt("return", _context35.t0.ResponseToFormat.call(_context35.t0, _context35.t1, _context35.t2));
2886
2822
  case 19:
2887
2823
  case "end":
2888
- return _context36.stop();
2824
+ return _context35.stop();
2889
2825
  }
2890
- }, _callee36, this);
2826
+ }, _callee35, this);
2891
2827
  }));
2892
- return function (_x35) {
2893
- return _ref63.apply(this, arguments);
2828
+ return function (_x34) {
2829
+ return _ref61.apply(this, arguments);
2894
2830
  };
2895
2831
  }();
2896
2832
 
@@ -2919,24 +2855,24 @@ exports.CallBitcodeMethod = /*#__PURE__*/function () {
2919
2855
  * @returns {Promise<string>} - URL to the specified rep endpoint with authorization token
2920
2856
  */
2921
2857
  exports.Rep = /*#__PURE__*/function () {
2922
- var _ref65 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee37(_ref64) {
2923
- var libraryId, objectId, versionHash, rep, _ref64$queryParams, queryParams, _ref64$service, service, _ref64$makeAccessRequ, makeAccessRequest, _ref64$channelAuth, channelAuth, _ref64$noAuth, noAuth, _ref64$noCache, noCache;
2924
- return _regeneratorRuntime.wrap(function _callee37$(_context37) {
2925
- while (1) switch (_context37.prev = _context37.next) {
2858
+ var _ref63 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee36(_ref62) {
2859
+ var libraryId, objectId, versionHash, rep, _ref62$queryParams, queryParams, _ref62$service, service, _ref62$makeAccessRequ, makeAccessRequest, _ref62$channelAuth, channelAuth, _ref62$noAuth, noAuth, _ref62$noCache, noCache;
2860
+ return _regeneratorRuntime.wrap(function _callee36$(_context36) {
2861
+ while (1) switch (_context36.prev = _context36.next) {
2926
2862
  case 0:
2927
- libraryId = _ref64.libraryId, objectId = _ref64.objectId, versionHash = _ref64.versionHash, rep = _ref64.rep, _ref64$queryParams = _ref64.queryParams, queryParams = _ref64$queryParams === void 0 ? {} : _ref64$queryParams, _ref64$service = _ref64.service, service = _ref64$service === void 0 ? "fabric" : _ref64$service, _ref64$makeAccessRequ = _ref64.makeAccessRequest, makeAccessRequest = _ref64$makeAccessRequ === void 0 ? false : _ref64$makeAccessRequ, _ref64$channelAuth = _ref64.channelAuth, channelAuth = _ref64$channelAuth === void 0 ? false : _ref64$channelAuth, _ref64$noAuth = _ref64.noAuth, noAuth = _ref64$noAuth === void 0 ? false : _ref64$noAuth, _ref64$noCache = _ref64.noCache, noCache = _ref64$noCache === void 0 ? false : _ref64$noCache;
2863
+ libraryId = _ref62.libraryId, objectId = _ref62.objectId, versionHash = _ref62.versionHash, rep = _ref62.rep, _ref62$queryParams = _ref62.queryParams, queryParams = _ref62$queryParams === void 0 ? {} : _ref62$queryParams, _ref62$service = _ref62.service, service = _ref62$service === void 0 ? "fabric" : _ref62$service, _ref62$makeAccessRequ = _ref62.makeAccessRequest, makeAccessRequest = _ref62$makeAccessRequ === void 0 ? false : _ref62$makeAccessRequ, _ref62$channelAuth = _ref62.channelAuth, channelAuth = _ref62$channelAuth === void 0 ? false : _ref62$channelAuth, _ref62$noAuth = _ref62.noAuth, noAuth = _ref62$noAuth === void 0 ? false : _ref62$noAuth, _ref62$noCache = _ref62.noCache, noCache = _ref62$noCache === void 0 ? false : _ref62$noCache;
2928
2864
  ValidateParameters({
2929
2865
  libraryId: libraryId,
2930
2866
  objectId: objectId,
2931
2867
  versionHash: versionHash
2932
2868
  });
2933
2869
  if (rep) {
2934
- _context37.next = 4;
2870
+ _context36.next = 4;
2935
2871
  break;
2936
2872
  }
2937
2873
  throw "Rep not specified";
2938
2874
  case 4:
2939
- return _context37.abrupt("return", this.FabricUrl({
2875
+ return _context36.abrupt("return", this.FabricUrl({
2940
2876
  libraryId: libraryId,
2941
2877
  objectId: objectId,
2942
2878
  versionHash: versionHash,
@@ -2950,12 +2886,12 @@ exports.Rep = /*#__PURE__*/function () {
2950
2886
  }));
2951
2887
  case 5:
2952
2888
  case "end":
2953
- return _context37.stop();
2889
+ return _context36.stop();
2954
2890
  }
2955
- }, _callee37, this);
2891
+ }, _callee36, this);
2956
2892
  }));
2957
- return function (_x36) {
2958
- return _ref65.apply(this, arguments);
2893
+ return function (_x35) {
2894
+ return _ref63.apply(this, arguments);
2959
2895
  };
2960
2896
  }();
2961
2897
 
@@ -2977,24 +2913,24 @@ exports.Rep = /*#__PURE__*/function () {
2977
2913
  * @returns {Promise<string>} - URL to the specified rep endpoint with authorization token
2978
2914
  */
2979
2915
  exports.PublicRep = /*#__PURE__*/function () {
2980
- var _ref67 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee38(_ref66) {
2981
- var libraryId, objectId, versionHash, rep, _ref66$queryParams, queryParams, _ref66$service, service;
2982
- return _regeneratorRuntime.wrap(function _callee38$(_context38) {
2983
- while (1) switch (_context38.prev = _context38.next) {
2916
+ var _ref65 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee37(_ref64) {
2917
+ var libraryId, objectId, versionHash, rep, _ref64$queryParams, queryParams, _ref64$service, service;
2918
+ return _regeneratorRuntime.wrap(function _callee37$(_context37) {
2919
+ while (1) switch (_context37.prev = _context37.next) {
2984
2920
  case 0:
2985
- libraryId = _ref66.libraryId, objectId = _ref66.objectId, versionHash = _ref66.versionHash, rep = _ref66.rep, _ref66$queryParams = _ref66.queryParams, queryParams = _ref66$queryParams === void 0 ? {} : _ref66$queryParams, _ref66$service = _ref66.service, service = _ref66$service === void 0 ? "fabric" : _ref66$service;
2921
+ libraryId = _ref64.libraryId, objectId = _ref64.objectId, versionHash = _ref64.versionHash, rep = _ref64.rep, _ref64$queryParams = _ref64.queryParams, queryParams = _ref64$queryParams === void 0 ? {} : _ref64$queryParams, _ref64$service = _ref64.service, service = _ref64$service === void 0 ? "fabric" : _ref64$service;
2986
2922
  ValidateParameters({
2987
2923
  libraryId: libraryId,
2988
2924
  objectId: objectId,
2989
2925
  versionHash: versionHash
2990
2926
  });
2991
2927
  if (rep) {
2992
- _context38.next = 4;
2928
+ _context37.next = 4;
2993
2929
  break;
2994
2930
  }
2995
2931
  throw "Rep not specified";
2996
2932
  case 4:
2997
- return _context38.abrupt("return", this.FabricUrl({
2933
+ return _context37.abrupt("return", this.FabricUrl({
2998
2934
  libraryId: libraryId,
2999
2935
  objectId: objectId,
3000
2936
  versionHash: versionHash,
@@ -3005,12 +2941,12 @@ exports.PublicRep = /*#__PURE__*/function () {
3005
2941
  }));
3006
2942
  case 5:
3007
2943
  case "end":
3008
- return _context38.stop();
2944
+ return _context37.stop();
3009
2945
  }
3010
- }, _callee38, this);
2946
+ }, _callee37, this);
3011
2947
  }));
3012
- return function (_x37) {
3013
- return _ref67.apply(this, arguments);
2948
+ return function (_x36) {
2949
+ return _ref65.apply(this, arguments);
3014
2950
  };
3015
2951
  }();
3016
2952
 
@@ -3039,12 +2975,12 @@ exports.PublicRep = /*#__PURE__*/function () {
3039
2975
  * @returns {Promise<string>} - URL to the specified endpoint with authorization token
3040
2976
  */
3041
2977
  exports.FabricUrl = /*#__PURE__*/function () {
3042
- var _ref69 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee39(_ref68) {
3043
- var libraryId, objectId, versionHash, writeToken, partHash, rep, publicRep, call, _ref68$queryParams, queryParams, _ref68$service, service, _ref68$channelAuth, channelAuth, _ref68$makeAccessRequ, makeAccessRequest, _ref68$noAuth, noAuth, _ref68$noCache, noCache, authorization, path, httpClient;
3044
- return _regeneratorRuntime.wrap(function _callee39$(_context39) {
3045
- while (1) switch (_context39.prev = _context39.next) {
2978
+ var _ref67 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee38(_ref66) {
2979
+ var libraryId, objectId, versionHash, writeToken, partHash, rep, publicRep, call, _ref66$queryParams, queryParams, _ref66$service, service, _ref66$channelAuth, channelAuth, _ref66$makeAccessRequ, makeAccessRequest, _ref66$noAuth, noAuth, _ref66$noCache, noCache, authorization, path, httpClient;
2980
+ return _regeneratorRuntime.wrap(function _callee38$(_context38) {
2981
+ while (1) switch (_context38.prev = _context38.next) {
3046
2982
  case 0:
3047
- libraryId = _ref68.libraryId, objectId = _ref68.objectId, versionHash = _ref68.versionHash, writeToken = _ref68.writeToken, partHash = _ref68.partHash, rep = _ref68.rep, publicRep = _ref68.publicRep, call = _ref68.call, _ref68$queryParams = _ref68.queryParams, queryParams = _ref68$queryParams === void 0 ? {} : _ref68$queryParams, _ref68$service = _ref68.service, service = _ref68$service === void 0 ? "fabric" : _ref68$service, _ref68$channelAuth = _ref68.channelAuth, channelAuth = _ref68$channelAuth === void 0 ? false : _ref68$channelAuth, _ref68$makeAccessRequ = _ref68.makeAccessRequest, makeAccessRequest = _ref68$makeAccessRequ === void 0 ? false : _ref68$makeAccessRequ, _ref68$noAuth = _ref68.noAuth, noAuth = _ref68$noAuth === void 0 ? false : _ref68$noAuth, _ref68$noCache = _ref68.noCache, noCache = _ref68$noCache === void 0 ? false : _ref68$noCache;
2983
+ libraryId = _ref66.libraryId, objectId = _ref66.objectId, versionHash = _ref66.versionHash, writeToken = _ref66.writeToken, partHash = _ref66.partHash, rep = _ref66.rep, publicRep = _ref66.publicRep, call = _ref66.call, _ref66$queryParams = _ref66.queryParams, queryParams = _ref66$queryParams === void 0 ? {} : _ref66$queryParams, _ref66$service = _ref66.service, service = _ref66$service === void 0 ? "fabric" : _ref66$service, _ref66$channelAuth = _ref66.channelAuth, channelAuth = _ref66$channelAuth === void 0 ? false : _ref66$channelAuth, _ref66$makeAccessRequ = _ref66.makeAccessRequest, makeAccessRequest = _ref66$makeAccessRequ === void 0 ? false : _ref66$makeAccessRequ, _ref66$noAuth = _ref66.noAuth, noAuth = _ref66$noAuth === void 0 ? false : _ref66$noAuth, _ref66$noCache = _ref66.noCache, noCache = _ref66$noCache === void 0 ? false : _ref66$noCache;
3048
2984
  if (objectId || versionHash) {
3049
2985
  ValidateParameters({
3050
2986
  libraryId: libraryId,
@@ -3061,11 +2997,11 @@ exports.FabricUrl = /*#__PURE__*/function () {
3061
2997
  authorization.push(queryParams.authorization);
3062
2998
  }
3063
2999
  if (noAuth && queryParams.authorization) {
3064
- _context39.next = 12;
3000
+ _context38.next = 12;
3065
3001
  break;
3066
3002
  }
3067
- _context39.t0 = authorization;
3068
- _context39.next = 10;
3003
+ _context38.t0 = authorization;
3004
+ _context38.next = 10;
3069
3005
  return this.authClient.AuthorizationToken({
3070
3006
  libraryId: libraryId,
3071
3007
  objectId: objectId,
@@ -3076,23 +3012,23 @@ exports.FabricUrl = /*#__PURE__*/function () {
3076
3012
  noCache: noCache
3077
3013
  });
3078
3014
  case 10:
3079
- _context39.t1 = _context39.sent;
3080
- _context39.t0.push.call(_context39.t0, _context39.t1);
3015
+ _context38.t1 = _context38.sent;
3016
+ _context38.t0.push.call(_context38.t0, _context38.t1);
3081
3017
  case 12:
3082
3018
  // Clone queryParams to avoid modification of the original
3083
3019
  queryParams = _objectSpread(_objectSpread({}, queryParams), {}, {
3084
3020
  authorization: authorization.flat()
3085
3021
  });
3086
3022
  if (!((rep || publicRep) && objectId && !versionHash)) {
3087
- _context39.next = 17;
3023
+ _context38.next = 17;
3088
3024
  break;
3089
3025
  }
3090
- _context39.next = 16;
3026
+ _context38.next = 16;
3091
3027
  return this.LatestVersionHash({
3092
3028
  objectId: objectId
3093
3029
  });
3094
3030
  case 16:
3095
- versionHash = _context39.sent;
3031
+ versionHash = _context38.sent;
3096
3032
  case 17:
3097
3033
  path = "";
3098
3034
  if (libraryId) {
@@ -3118,18 +3054,18 @@ exports.FabricUrl = /*#__PURE__*/function () {
3118
3054
  } else if (service === "auth") {
3119
3055
  httpClient = this.AuthHttpClient;
3120
3056
  }
3121
- return _context39.abrupt("return", httpClient.URL({
3057
+ return _context38.abrupt("return", httpClient.URL({
3122
3058
  path: path,
3123
3059
  queryParams: queryParams
3124
3060
  }));
3125
3061
  case 23:
3126
3062
  case "end":
3127
- return _context39.stop();
3063
+ return _context38.stop();
3128
3064
  }
3129
- }, _callee39, this);
3065
+ }, _callee38, this);
3130
3066
  }));
3131
- return function (_x38) {
3132
- return _ref69.apply(this, arguments);
3067
+ return function (_x37) {
3068
+ return _ref67.apply(this, arguments);
3133
3069
  };
3134
3070
  }();
3135
3071
 
@@ -3150,19 +3086,19 @@ exports.FabricUrl = /*#__PURE__*/function () {
3150
3086
  * @returns {Promise<string>} - URL to the specified file with authorization token
3151
3087
  */
3152
3088
  exports.FileUrl = /*#__PURE__*/function () {
3153
- var _ref71 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee40(_ref70) {
3154
- var libraryId, objectId, versionHash, writeToken, filePath, _ref70$queryParams, queryParams, _ref70$noCache, noCache, path, authorizationToken, fileInfo, encrypted;
3155
- return _regeneratorRuntime.wrap(function _callee40$(_context40) {
3156
- while (1) switch (_context40.prev = _context40.next) {
3089
+ var _ref69 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee39(_ref68) {
3090
+ var libraryId, objectId, versionHash, writeToken, filePath, _ref68$queryParams, queryParams, _ref68$noCache, noCache, path, authorizationToken, fileInfo, encrypted;
3091
+ return _regeneratorRuntime.wrap(function _callee39$(_context39) {
3092
+ while (1) switch (_context39.prev = _context39.next) {
3157
3093
  case 0:
3158
- libraryId = _ref70.libraryId, objectId = _ref70.objectId, versionHash = _ref70.versionHash, writeToken = _ref70.writeToken, filePath = _ref70.filePath, _ref70$queryParams = _ref70.queryParams, queryParams = _ref70$queryParams === void 0 ? {} : _ref70$queryParams, _ref70$noCache = _ref70.noCache, noCache = _ref70$noCache === void 0 ? false : _ref70$noCache;
3094
+ libraryId = _ref68.libraryId, objectId = _ref68.objectId, versionHash = _ref68.versionHash, writeToken = _ref68.writeToken, filePath = _ref68.filePath, _ref68$queryParams = _ref68.queryParams, queryParams = _ref68$queryParams === void 0 ? {} : _ref68$queryParams, _ref68$noCache = _ref68.noCache, noCache = _ref68$noCache === void 0 ? false : _ref68$noCache;
3159
3095
  ValidateParameters({
3160
3096
  libraryId: libraryId,
3161
3097
  objectId: objectId,
3162
3098
  versionHash: versionHash
3163
3099
  });
3164
3100
  if (filePath) {
3165
- _context40.next = 4;
3101
+ _context39.next = 4;
3166
3102
  break;
3167
3103
  }
3168
3104
  throw "File path not specified";
@@ -3175,18 +3111,18 @@ exports.FileUrl = /*#__PURE__*/function () {
3175
3111
  } else {
3176
3112
  path = UrlJoin("q", versionHash);
3177
3113
  }
3178
- _context40.next = 8;
3114
+ _context39.next = 8;
3179
3115
  return this.authClient.AuthorizationToken({
3180
3116
  libraryId: libraryId,
3181
3117
  objectId: objectId,
3182
3118
  noCache: noCache
3183
3119
  });
3184
3120
  case 8:
3185
- authorizationToken = _context40.sent;
3121
+ authorizationToken = _context39.sent;
3186
3122
  queryParams = _objectSpread(_objectSpread({}, queryParams), {}, {
3187
3123
  authorization: authorizationToken
3188
3124
  });
3189
- _context40.next = 12;
3125
+ _context39.next = 12;
3190
3126
  return this.ContentObjectMetadata({
3191
3127
  libraryId: libraryId,
3192
3128
  objectId: objectId,
@@ -3195,7 +3131,7 @@ exports.FileUrl = /*#__PURE__*/function () {
3195
3131
  metadataSubtree: UrlJoin("files", filePath)
3196
3132
  });
3197
3133
  case 12:
3198
- fileInfo = _context40.sent;
3134
+ fileInfo = _context39.sent;
3199
3135
  encrypted = fileInfo && fileInfo["."].encryption && fileInfo["."].encryption.scheme === "cgck";
3200
3136
  if (encrypted) {
3201
3137
  path = UrlJoin(path, "rep", "files_download", filePath);
@@ -3203,18 +3139,18 @@ exports.FileUrl = /*#__PURE__*/function () {
3203
3139
  } else {
3204
3140
  path = UrlJoin(path, "files", filePath);
3205
3141
  }
3206
- return _context40.abrupt("return", this.HttpClient.URL({
3142
+ return _context39.abrupt("return", this.HttpClient.URL({
3207
3143
  path: path,
3208
3144
  queryParams: queryParams
3209
3145
  }));
3210
3146
  case 16:
3211
3147
  case "end":
3212
- return _context40.stop();
3148
+ return _context39.stop();
3213
3149
  }
3214
- }, _callee40, this);
3150
+ }, _callee39, this);
3215
3151
  }));
3216
- return function (_x39) {
3217
- return _ref71.apply(this, arguments);
3152
+ return function (_x38) {
3153
+ return _ref69.apply(this, arguments);
3218
3154
  };
3219
3155
  }();
3220
3156
 
@@ -3234,78 +3170,78 @@ exports.FileUrl = /*#__PURE__*/function () {
3234
3170
  * @returns {Promise<string | undefined>} - If the object has an image, will return a URL for that image.
3235
3171
  */
3236
3172
  exports.ContentObjectImageUrl = /*#__PURE__*/function () {
3237
- var _ref73 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee41(_ref72) {
3238
- var libraryId, objectId, versionHash, height, _ref72$imagePath, imagePath, imageMetadata, _queryParams;
3239
- return _regeneratorRuntime.wrap(function _callee41$(_context41) {
3240
- while (1) switch (_context41.prev = _context41.next) {
3173
+ var _ref71 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee40(_ref70) {
3174
+ var libraryId, objectId, versionHash, height, _ref70$imagePath, imagePath, imageMetadata, _queryParams;
3175
+ return _regeneratorRuntime.wrap(function _callee40$(_context40) {
3176
+ while (1) switch (_context40.prev = _context40.next) {
3241
3177
  case 0:
3242
- libraryId = _ref72.libraryId, objectId = _ref72.objectId, versionHash = _ref72.versionHash, height = _ref72.height, _ref72$imagePath = _ref72.imagePath, imagePath = _ref72$imagePath === void 0 ? "public/display_image" : _ref72$imagePath;
3178
+ libraryId = _ref70.libraryId, objectId = _ref70.objectId, versionHash = _ref70.versionHash, height = _ref70.height, _ref70$imagePath = _ref70.imagePath, imagePath = _ref70$imagePath === void 0 ? "public/display_image" : _ref70$imagePath;
3243
3179
  ValidateParameters({
3244
3180
  libraryId: libraryId,
3245
3181
  objectId: objectId,
3246
3182
  versionHash: versionHash
3247
3183
  });
3248
3184
  if (versionHash) {
3249
- _context41.next = 6;
3185
+ _context40.next = 6;
3250
3186
  break;
3251
3187
  }
3252
- _context41.next = 5;
3188
+ _context40.next = 5;
3253
3189
  return this.LatestVersionHash({
3254
3190
  objectId: objectId
3255
3191
  });
3256
3192
  case 5:
3257
- versionHash = _context41.sent;
3193
+ versionHash = _context40.sent;
3258
3194
  case 6:
3259
3195
  this.Log("Retrieving content object image url: ".concat(libraryId, " ").concat(objectId, " ").concat(versionHash));
3260
3196
  if (this.objectImageUrls[versionHash]) {
3261
- _context41.next = 26;
3197
+ _context40.next = 26;
3262
3198
  break;
3263
3199
  }
3264
- _context41.prev = 8;
3265
- _context41.next = 11;
3200
+ _context40.prev = 8;
3201
+ _context40.next = 11;
3266
3202
  return this.ContentObjectMetadata({
3267
3203
  versionHash: versionHash,
3268
3204
  metadataSubtree: imagePath
3269
3205
  });
3270
3206
  case 11:
3271
- imageMetadata = _context41.sent;
3207
+ imageMetadata = _context40.sent;
3272
3208
  if (imageMetadata) {
3273
- _context41.next = 15;
3209
+ _context40.next = 15;
3274
3210
  break;
3275
3211
  }
3276
3212
  this.Log("No image url set: ".concat(libraryId, " ").concat(objectId, " ").concat(versionHash));
3277
- return _context41.abrupt("return");
3213
+ return _context40.abrupt("return");
3278
3214
  case 15:
3279
- _context41.next = 21;
3215
+ _context40.next = 21;
3280
3216
  break;
3281
3217
  case 17:
3282
- _context41.prev = 17;
3283
- _context41.t0 = _context41["catch"](8);
3218
+ _context40.prev = 17;
3219
+ _context40.t0 = _context40["catch"](8);
3284
3220
  this.Log("Unable to query for image metadata: ".concat(libraryId, " ").concat(objectId, " ").concat(versionHash), true);
3285
- this.Log(_context41.t0, true);
3221
+ this.Log(_context40.t0, true);
3286
3222
  case 21:
3287
3223
  _queryParams = {};
3288
3224
  if (height && !isNaN(parseInt(height))) {
3289
3225
  _queryParams["height"] = parseInt(height);
3290
3226
  }
3291
- _context41.next = 25;
3227
+ _context40.next = 25;
3292
3228
  return this.LinkUrl({
3293
3229
  versionHash: versionHash,
3294
3230
  linkPath: imagePath,
3295
3231
  queryParams: _queryParams
3296
3232
  });
3297
3233
  case 25:
3298
- this.objectImageUrls[versionHash] = _context41.sent;
3234
+ this.objectImageUrls[versionHash] = _context40.sent;
3299
3235
  case 26:
3300
- return _context41.abrupt("return", this.objectImageUrls[versionHash]);
3236
+ return _context40.abrupt("return", this.objectImageUrls[versionHash]);
3301
3237
  case 27:
3302
3238
  case "end":
3303
- return _context41.stop();
3239
+ return _context40.stop();
3304
3240
  }
3305
- }, _callee41, this, [[8, 17]]);
3241
+ }, _callee40, this, [[8, 17]]);
3306
3242
  }));
3307
- return function (_x40) {
3308
- return _ref73.apply(this, arguments);
3243
+ return function (_x39) {
3244
+ return _ref71.apply(this, arguments);
3309
3245
  };
3310
3246
  }();
3311
3247
  var EmbedMediaTypes = {
@@ -3362,12 +3298,12 @@ var EmbedMediaTypes = {
3362
3298
  * @returns {Promise<string>} - Will return an embed URL
3363
3299
  */
3364
3300
  exports.EmbedUrl = /*#__PURE__*/function () {
3365
- var _ref75 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee42(_ref74) {
3366
- var objectId, versionHash, _ref74$duration, duration, _ref74$mediaType, mediaType, _ref74$options, options, controlsMap, embedUrl, networkInfo, networkName, permission, data, _i, _Object$keys, option, token;
3367
- return _regeneratorRuntime.wrap(function _callee42$(_context42) {
3368
- while (1) switch (_context42.prev = _context42.next) {
3301
+ var _ref73 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee41(_ref72) {
3302
+ var objectId, versionHash, _ref72$duration, duration, _ref72$mediaType, mediaType, _ref72$options, options, controlsMap, embedUrl, networkInfo, networkName, permission, data, _i, _Object$keys, option, token;
3303
+ return _regeneratorRuntime.wrap(function _callee41$(_context41) {
3304
+ while (1) switch (_context41.prev = _context41.next) {
3369
3305
  case 0:
3370
- objectId = _ref74.objectId, versionHash = _ref74.versionHash, _ref74$duration = _ref74.duration, duration = _ref74$duration === void 0 ? 86400000 : _ref74$duration, _ref74$mediaType = _ref74.mediaType, mediaType = _ref74$mediaType === void 0 ? "video" : _ref74$mediaType, _ref74$options = _ref74.options, options = _ref74$options === void 0 ? {} : _ref74$options;
3306
+ objectId = _ref72.objectId, versionHash = _ref72.versionHash, _ref72$duration = _ref72.duration, duration = _ref72$duration === void 0 ? 86400000 : _ref72$duration, _ref72$mediaType = _ref72.mediaType, mediaType = _ref72$mediaType === void 0 ? "video" : _ref72$mediaType, _ref72$options = _ref72.options, options = _ref72$options === void 0 ? {} : _ref72$options;
3371
3307
  if (versionHash) {
3372
3308
  ValidateVersion(versionHash);
3373
3309
  } else if (objectId) {
@@ -3383,17 +3319,17 @@ exports.EmbedUrl = /*#__PURE__*/function () {
3383
3319
  hideWithVolume: "hv"
3384
3320
  };
3385
3321
  embedUrl = new URL("https://embed.v3.contentfabric.io");
3386
- _context42.next = 7;
3322
+ _context41.next = 7;
3387
3323
  return this.NetworkInfo();
3388
3324
  case 7:
3389
- networkInfo = _context42.sent;
3325
+ networkInfo = _context41.sent;
3390
3326
  networkName = networkInfo.name === "demov3" ? "demo" : networkInfo.name === "test" && networkInfo.id === 955205 ? "testv4" : networkInfo.name;
3391
- _context42.next = 11;
3327
+ _context41.next = 11;
3392
3328
  return this.Permission({
3393
3329
  objectId: objectId ? objectId : this.utils.DecodeVersionHash(versionHash).objectId
3394
3330
  });
3395
3331
  case 11:
3396
- permission = _context42.sent;
3332
+ permission = _context41.sent;
3397
3333
  embedUrl.searchParams.set("p", "");
3398
3334
  embedUrl.searchParams.set("net", networkName);
3399
3335
  if (versionHash) {
@@ -3406,69 +3342,69 @@ exports.EmbedUrl = /*#__PURE__*/function () {
3406
3342
  _i = 0, _Object$keys = Object.keys(options);
3407
3343
  case 18:
3408
3344
  if (!(_i < _Object$keys.length)) {
3409
- _context42.next = 68;
3345
+ _context41.next = 68;
3410
3346
  break;
3411
3347
  }
3412
3348
  option = _Object$keys[_i];
3413
- _context42.t0 = option;
3414
- _context42.next = _context42.t0 === "accountWatermark" ? 23 : _context42.t0 === "autoplay" ? 25 : _context42.t0 === "capLevelToPlayerSize" ? 27 : _context42.t0 === "clipEnd" ? 29 : _context42.t0 === "clipStart" ? 31 : _context42.t0 === "controls" ? 33 : _context42.t0 === "description" ? 35 : _context42.t0 === "directLink" ? 37 : _context42.t0 === "linkPath" ? 39 : _context42.t0 === "loop" ? 41 : _context42.t0 === "muted" ? 43 : _context42.t0 === "offerings" ? 45 : _context42.t0 === "posterUrl" ? 47 : _context42.t0 === "protocols" ? 49 : _context42.t0 === "showShare" ? 51 : _context42.t0 === "showTitle" ? 53 : _context42.t0 === "title" ? 55 : _context42.t0 === "viewRecordKey" ? 57 : _context42.t0 === "useTicketCodes" ? 59 : 65;
3349
+ _context41.t0 = option;
3350
+ _context41.next = _context41.t0 === "accountWatermark" ? 23 : _context41.t0 === "autoplay" ? 25 : _context41.t0 === "capLevelToPlayerSize" ? 27 : _context41.t0 === "clipEnd" ? 29 : _context41.t0 === "clipStart" ? 31 : _context41.t0 === "controls" ? 33 : _context41.t0 === "description" ? 35 : _context41.t0 === "directLink" ? 37 : _context41.t0 === "linkPath" ? 39 : _context41.t0 === "loop" ? 41 : _context41.t0 === "muted" ? 43 : _context41.t0 === "offerings" ? 45 : _context41.t0 === "posterUrl" ? 47 : _context41.t0 === "protocols" ? 49 : _context41.t0 === "showShare" ? 51 : _context41.t0 === "showTitle" ? 53 : _context41.t0 === "title" ? 55 : _context41.t0 === "viewRecordKey" ? 57 : _context41.t0 === "useTicketCodes" ? 59 : 65;
3415
3351
  break;
3416
3352
  case 23:
3417
3353
  embedUrl.searchParams.set("awm", "");
3418
- return _context42.abrupt("break", 65);
3354
+ return _context41.abrupt("break", 65);
3419
3355
  case 25:
3420
3356
  embedUrl.searchParams.set("ap", "");
3421
- return _context42.abrupt("break", 65);
3357
+ return _context41.abrupt("break", 65);
3422
3358
  case 27:
3423
3359
  embedUrl.searchParams.set("cap", "");
3424
- return _context42.abrupt("break", 65);
3360
+ return _context41.abrupt("break", 65);
3425
3361
  case 29:
3426
3362
  embedUrl.searchParams.set("end", options.clipEnd);
3427
- return _context42.abrupt("break", 65);
3363
+ return _context41.abrupt("break", 65);
3428
3364
  case 31:
3429
3365
  embedUrl.searchParams.set("start", options.clipStart);
3430
- return _context42.abrupt("break", 65);
3366
+ return _context41.abrupt("break", 65);
3431
3367
  case 33:
3432
3368
  if (options.controls !== "hide") {
3433
3369
  embedUrl.searchParams.set("ct", controlsMap[options.controls]);
3434
3370
  }
3435
- return _context42.abrupt("break", 65);
3371
+ return _context41.abrupt("break", 65);
3436
3372
  case 35:
3437
3373
  data["og:description"] = options.description;
3438
- return _context42.abrupt("break", 65);
3374
+ return _context41.abrupt("break", 65);
3439
3375
  case 37:
3440
3376
  embedUrl.searchParams.set("dr", "");
3441
- return _context42.abrupt("break", 65);
3377
+ return _context41.abrupt("break", 65);
3442
3378
  case 39:
3443
3379
  embedUrl.searchParams.set("ln", this.utils.B64(options.linkPath));
3444
- return _context42.abrupt("break", 65);
3380
+ return _context41.abrupt("break", 65);
3445
3381
  case 41:
3446
3382
  embedUrl.searchParams.set("lp", "");
3447
- return _context42.abrupt("break", 65);
3383
+ return _context41.abrupt("break", 65);
3448
3384
  case 43:
3449
3385
  embedUrl.searchParams.set("m", "");
3450
- return _context42.abrupt("break", 65);
3386
+ return _context41.abrupt("break", 65);
3451
3387
  case 45:
3452
3388
  embedUrl.searchParams.set("off", options.offerings.join(","));
3453
- return _context42.abrupt("break", 65);
3389
+ return _context41.abrupt("break", 65);
3454
3390
  case 47:
3455
3391
  embedUrl.searchParams.set("pst", options.posterUrl);
3456
- return _context42.abrupt("break", 65);
3392
+ return _context41.abrupt("break", 65);
3457
3393
  case 49:
3458
3394
  embedUrl.searchParams.set("ptc", options.protocols.join(","));
3459
- return _context42.abrupt("break", 65);
3395
+ return _context41.abrupt("break", 65);
3460
3396
  case 51:
3461
3397
  embedUrl.searchParams.set("sh", "");
3462
- return _context42.abrupt("break", 65);
3398
+ return _context41.abrupt("break", 65);
3463
3399
  case 53:
3464
3400
  embedUrl.searchParams.set("st", "");
3465
- return _context42.abrupt("break", 65);
3401
+ return _context41.abrupt("break", 65);
3466
3402
  case 55:
3467
3403
  data["og:title"] = options.title;
3468
- return _context42.abrupt("break", 65);
3404
+ return _context41.abrupt("break", 65);
3469
3405
  case 57:
3470
3406
  embedUrl.searchParams.set("vrk", options.viewRecordKey);
3471
- return _context42.abrupt("break", 65);
3407
+ return _context41.abrupt("break", 65);
3472
3408
  case 59:
3473
3409
  embedUrl.searchParams.set("ptk", "");
3474
3410
  if (options.tenantId) {
@@ -3483,10 +3419,10 @@ exports.EmbedUrl = /*#__PURE__*/function () {
3483
3419
  if (options.ticketSubject) {
3484
3420
  embedUrl.searchParams.set("sbj", Buffer.from(options.ticketSubject).toString("base64"));
3485
3421
  }
3486
- return _context42.abrupt("break", 65);
3422
+ return _context41.abrupt("break", 65);
3487
3423
  case 65:
3488
3424
  _i++;
3489
- _context42.next = 18;
3425
+ _context41.next = 18;
3490
3426
  break;
3491
3427
  case 68:
3492
3428
  if (Object.keys(data).length > 0) {
@@ -3495,28 +3431,28 @@ exports.EmbedUrl = /*#__PURE__*/function () {
3495
3431
  })));
3496
3432
  }
3497
3433
  if (!["owner", "editable", "viewable"].includes(permission)) {
3498
- _context42.next = 74;
3434
+ _context41.next = 74;
3499
3435
  break;
3500
3436
  }
3501
- _context42.next = 72;
3437
+ _context41.next = 72;
3502
3438
  return this.CreateSignedToken({
3503
3439
  objectId: objectId,
3504
3440
  versionHash: versionHash,
3505
3441
  duration: duration
3506
3442
  });
3507
3443
  case 72:
3508
- token = _context42.sent;
3444
+ token = _context41.sent;
3509
3445
  embedUrl.searchParams.set("ath", token);
3510
3446
  case 74:
3511
- return _context42.abrupt("return", embedUrl.toString());
3447
+ return _context41.abrupt("return", embedUrl.toString());
3512
3448
  case 75:
3513
3449
  case "end":
3514
- return _context42.stop();
3450
+ return _context41.stop();
3515
3451
  }
3516
- }, _callee42, this);
3452
+ }, _callee41, this);
3517
3453
  }));
3518
- return function (_x41) {
3519
- return _ref75.apply(this, arguments);
3454
+ return function (_x40) {
3455
+ return _ref73.apply(this, arguments);
3520
3456
  };
3521
3457
  }();
3522
3458
 
@@ -3536,13 +3472,13 @@ exports.EmbedUrl = /*#__PURE__*/function () {
3536
3472
  * @returns {Promise<Object>} - Description of created object
3537
3473
  */
3538
3474
  exports.ContentObjectGraph = /*#__PURE__*/function () {
3539
- var _ref77 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee44(_ref76) {
3475
+ var _ref75 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee43(_ref74) {
3540
3476
  var _this10 = this;
3541
- var libraryId, objectId, versionHash, _ref76$autoUpdate, autoUpdate, select, path, errorInfo, cycles, info;
3542
- return _regeneratorRuntime.wrap(function _callee44$(_context44) {
3543
- while (1) switch (_context44.prev = _context44.next) {
3477
+ var libraryId, objectId, versionHash, _ref74$autoUpdate, autoUpdate, select, path, errorInfo, cycles, info;
3478
+ return _regeneratorRuntime.wrap(function _callee43$(_context43) {
3479
+ while (1) switch (_context43.prev = _context43.next) {
3544
3480
  case 0:
3545
- libraryId = _ref76.libraryId, objectId = _ref76.objectId, versionHash = _ref76.versionHash, _ref76$autoUpdate = _ref76.autoUpdate, autoUpdate = _ref76$autoUpdate === void 0 ? false : _ref76$autoUpdate, select = _ref76.select;
3481
+ libraryId = _ref74.libraryId, objectId = _ref74.objectId, versionHash = _ref74.versionHash, _ref74$autoUpdate = _ref74.autoUpdate, autoUpdate = _ref74$autoUpdate === void 0 ? false : _ref74$autoUpdate, select = _ref74.select;
3546
3482
  ValidateParameters({
3547
3483
  libraryId: libraryId,
3548
3484
  objectId: objectId,
@@ -3553,133 +3489,133 @@ exports.ContentObjectGraph = /*#__PURE__*/function () {
3553
3489
  objectId = this.utils.DecodeVersionHash(versionHash).objectId;
3554
3490
  }
3555
3491
  path = UrlJoin("q", versionHash || objectId, "links");
3556
- _context44.prev = 5;
3557
- _context44.t0 = this.utils;
3558
- _context44.t1 = this.HttpClient;
3559
- _context44.next = 10;
3492
+ _context43.prev = 5;
3493
+ _context43.t0 = this.utils;
3494
+ _context43.t1 = this.HttpClient;
3495
+ _context43.next = 10;
3560
3496
  return this.authClient.AuthorizationHeader({
3561
3497
  libraryId: libraryId,
3562
3498
  objectId: objectId,
3563
3499
  versionHash: versionHash
3564
3500
  });
3565
3501
  case 10:
3566
- _context44.t2 = _context44.sent;
3567
- _context44.t3 = {
3502
+ _context43.t2 = _context43.sent;
3503
+ _context43.t3 = {
3568
3504
  auto_update: autoUpdate,
3569
3505
  select: select
3570
3506
  };
3571
- _context44.t4 = path;
3572
- _context44.t5 = {
3573
- headers: _context44.t2,
3574
- queryParams: _context44.t3,
3507
+ _context43.t4 = path;
3508
+ _context43.t5 = {
3509
+ headers: _context43.t2,
3510
+ queryParams: _context43.t3,
3575
3511
  method: "GET",
3576
- path: _context44.t4
3512
+ path: _context43.t4
3577
3513
  };
3578
- _context44.t6 = _context44.t1.Request.call(_context44.t1, _context44.t5);
3579
- _context44.next = 17;
3580
- return _context44.t0.ResponseToJson.call(_context44.t0, _context44.t6);
3514
+ _context43.t6 = _context43.t1.Request.call(_context43.t1, _context43.t5);
3515
+ _context43.next = 17;
3516
+ return _context43.t0.ResponseToJson.call(_context43.t0, _context43.t6);
3581
3517
  case 17:
3582
- return _context44.abrupt("return", _context44.sent);
3518
+ return _context43.abrupt("return", _context43.sent);
3583
3519
  case 20:
3584
- _context44.prev = 20;
3585
- _context44.t7 = _context44["catch"](5);
3586
- _context44.prev = 22;
3587
- cycles = _context44.t7.body.errors[0].cause.cause.cause.cycle;
3520
+ _context43.prev = 20;
3521
+ _context43.t7 = _context43["catch"](5);
3522
+ _context43.prev = 22;
3523
+ cycles = _context43.t7.body.errors[0].cause.cause.cause.cycle;
3588
3524
  if (!(!cycles || cycles.length === 0)) {
3589
- _context44.next = 26;
3525
+ _context43.next = 26;
3590
3526
  break;
3591
3527
  }
3592
- throw _context44.t7;
3528
+ throw _context43.t7;
3593
3529
  case 26:
3594
3530
  info = {};
3595
- _context44.next = 29;
3531
+ _context43.next = 29;
3596
3532
  return Promise.all(cycles.map( /*#__PURE__*/function () {
3597
- var _ref78 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee43(cycleHash) {
3533
+ var _ref76 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee42(cycleHash) {
3598
3534
  var cycleId, name;
3599
- return _regeneratorRuntime.wrap(function _callee43$(_context43) {
3600
- while (1) switch (_context43.prev = _context43.next) {
3535
+ return _regeneratorRuntime.wrap(function _callee42$(_context42) {
3536
+ while (1) switch (_context42.prev = _context42.next) {
3601
3537
  case 0:
3602
3538
  if (!info[cycleHash]) {
3603
- _context43.next = 2;
3539
+ _context42.next = 2;
3604
3540
  break;
3605
3541
  }
3606
- return _context43.abrupt("return");
3542
+ return _context42.abrupt("return");
3607
3543
  case 2:
3608
3544
  cycleId = _this10.utils.DecodeVersionHash(cycleHash).objectId;
3609
- _context43.next = 5;
3545
+ _context42.next = 5;
3610
3546
  return _this10.ContentObjectMetadata({
3611
3547
  versionHash: cycleHash,
3612
3548
  metadataSubtree: "public/asset_metadata/display_title"
3613
3549
  });
3614
3550
  case 5:
3615
- _context43.t2 = _context43.sent;
3616
- if (_context43.t2) {
3617
- _context43.next = 10;
3551
+ _context42.t2 = _context42.sent;
3552
+ if (_context42.t2) {
3553
+ _context42.next = 10;
3618
3554
  break;
3619
3555
  }
3620
- _context43.next = 9;
3556
+ _context42.next = 9;
3621
3557
  return _this10.ContentObjectMetadata({
3622
3558
  versionHash: cycleHash,
3623
3559
  metadataSubtree: "public/name"
3624
3560
  });
3625
3561
  case 9:
3626
- _context43.t2 = _context43.sent;
3562
+ _context42.t2 = _context42.sent;
3627
3563
  case 10:
3628
- _context43.t1 = _context43.t2;
3629
- if (_context43.t1) {
3630
- _context43.next = 15;
3564
+ _context42.t1 = _context42.t2;
3565
+ if (_context42.t1) {
3566
+ _context42.next = 15;
3631
3567
  break;
3632
3568
  }
3633
- _context43.next = 14;
3569
+ _context42.next = 14;
3634
3570
  return _this10.ContentObjectMetadata({
3635
3571
  versionHash: cycleHash,
3636
3572
  metadataSubtree: "name"
3637
3573
  });
3638
3574
  case 14:
3639
- _context43.t1 = _context43.sent;
3575
+ _context42.t1 = _context42.sent;
3640
3576
  case 15:
3641
- _context43.t0 = _context43.t1;
3642
- if (_context43.t0) {
3643
- _context43.next = 18;
3577
+ _context42.t0 = _context42.t1;
3578
+ if (_context42.t0) {
3579
+ _context42.next = 18;
3644
3580
  break;
3645
3581
  }
3646
- _context43.t0 = cycleId;
3582
+ _context42.t0 = cycleId;
3647
3583
  case 18:
3648
- name = _context43.t0;
3584
+ name = _context42.t0;
3649
3585
  info[cycleHash] = {
3650
3586
  name: name,
3651
3587
  objectId: cycleId
3652
3588
  };
3653
3589
  case 20:
3654
3590
  case "end":
3655
- return _context43.stop();
3591
+ return _context42.stop();
3656
3592
  }
3657
- }, _callee43);
3593
+ }, _callee42);
3658
3594
  }));
3659
- return function (_x43) {
3660
- return _ref78.apply(this, arguments);
3595
+ return function (_x42) {
3596
+ return _ref76.apply(this, arguments);
3661
3597
  };
3662
3598
  }()));
3663
3599
  case 29:
3664
3600
  errorInfo = cycles.map(function (cycleHash) {
3665
3601
  return "".concat(info[cycleHash].name, " (").concat(info[cycleHash].objectId, ")");
3666
3602
  });
3667
- _context44.next = 35;
3603
+ _context43.next = 35;
3668
3604
  break;
3669
3605
  case 32:
3670
- _context44.prev = 32;
3671
- _context44.t8 = _context44["catch"](22);
3672
- throw _context44.t7;
3606
+ _context43.prev = 32;
3607
+ _context43.t8 = _context43["catch"](22);
3608
+ throw _context43.t7;
3673
3609
  case 35:
3674
3610
  throw new Error("Cycle found in links: ".concat(errorInfo.join(" -> ")));
3675
3611
  case 36:
3676
3612
  case "end":
3677
- return _context44.stop();
3613
+ return _context43.stop();
3678
3614
  }
3679
- }, _callee44, this, [[5, 20], [22, 32]]);
3615
+ }, _callee43, this, [[5, 20], [22, 32]]);
3680
3616
  }));
3681
- return function (_x42) {
3682
- return _ref77.apply(this, arguments);
3617
+ return function (_x41) {
3618
+ return _ref75.apply(this, arguments);
3683
3619
  };
3684
3620
  }();
3685
3621
 
@@ -3699,12 +3635,12 @@ exports.ContentObjectGraph = /*#__PURE__*/function () {
3699
3635
  * @returns {Promise<string>} - Version hash of the link's target
3700
3636
  */
3701
3637
  exports.LinkTarget = /*#__PURE__*/function () {
3702
- var _ref80 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee45(_ref79) {
3638
+ var _ref78 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee44(_ref77) {
3703
3639
  var libraryId, objectId, versionHash, writeToken, linkPath, authorizationToken, linkInfo, targetHash, subPath;
3704
- return _regeneratorRuntime.wrap(function _callee45$(_context45) {
3705
- while (1) switch (_context45.prev = _context45.next) {
3640
+ return _regeneratorRuntime.wrap(function _callee44$(_context44) {
3641
+ while (1) switch (_context44.prev = _context44.next) {
3706
3642
  case 0:
3707
- libraryId = _ref79.libraryId, objectId = _ref79.objectId, versionHash = _ref79.versionHash, writeToken = _ref79.writeToken, linkPath = _ref79.linkPath, authorizationToken = _ref79.authorizationToken, linkInfo = _ref79.linkInfo;
3643
+ libraryId = _ref77.libraryId, objectId = _ref77.objectId, versionHash = _ref77.versionHash, writeToken = _ref77.writeToken, linkPath = _ref77.linkPath, authorizationToken = _ref77.authorizationToken, linkInfo = _ref77.linkInfo;
3708
3644
  ValidateParameters({
3709
3645
  libraryId: libraryId,
3710
3646
  objectId: objectId,
@@ -3717,21 +3653,21 @@ exports.LinkTarget = /*#__PURE__*/function () {
3717
3653
  objectId = this.utils.DecodeVersionHash(versionHash).objectId;
3718
3654
  }
3719
3655
  if (!(writeToken && !libraryId)) {
3720
- _context45.next = 8;
3656
+ _context44.next = 8;
3721
3657
  break;
3722
3658
  }
3723
- _context45.next = 7;
3659
+ _context44.next = 7;
3724
3660
  return this.ContentObjectLibraryId({
3725
3661
  objectId: objectId
3726
3662
  });
3727
3663
  case 7:
3728
- libraryId = _context45.sent;
3664
+ libraryId = _context44.sent;
3729
3665
  case 8:
3730
3666
  if (linkInfo) {
3731
- _context45.next = 12;
3667
+ _context44.next = 12;
3732
3668
  break;
3733
3669
  }
3734
- _context45.next = 11;
3670
+ _context44.next = 11;
3735
3671
  return this.ContentObjectMetadata({
3736
3672
  libraryId: libraryId,
3737
3673
  objectId: objectId,
@@ -3744,10 +3680,10 @@ exports.LinkTarget = /*#__PURE__*/function () {
3744
3680
  authorizationToken: authorizationToken
3745
3681
  });
3746
3682
  case 11:
3747
- linkInfo = _context45.sent;
3683
+ linkInfo = _context44.sent;
3748
3684
  case 12:
3749
3685
  if (!(linkInfo && linkInfo["/"])) {
3750
- _context45.next = 27;
3686
+ _context44.next = 27;
3751
3687
  break;
3752
3688
  }
3753
3689
  /* For absolute links - extract the hash from the link itself. Otherwise use "container" */
@@ -3756,32 +3692,32 @@ exports.LinkTarget = /*#__PURE__*/function () {
3756
3692
  targetHash = linkInfo["."].container;
3757
3693
  }
3758
3694
  if (!targetHash) {
3759
- _context45.next = 19;
3695
+ _context44.next = 19;
3760
3696
  break;
3761
3697
  }
3762
- return _context45.abrupt("return", targetHash);
3698
+ return _context44.abrupt("return", targetHash);
3763
3699
  case 19:
3764
3700
  if (!versionHash) {
3765
- _context45.next = 21;
3701
+ _context44.next = 21;
3766
3702
  break;
3767
3703
  }
3768
- return _context45.abrupt("return", versionHash);
3704
+ return _context44.abrupt("return", versionHash);
3769
3705
  case 21:
3770
- _context45.t0 = versionHash;
3771
- if (_context45.t0) {
3772
- _context45.next = 26;
3706
+ _context44.t0 = versionHash;
3707
+ if (_context44.t0) {
3708
+ _context44.next = 26;
3773
3709
  break;
3774
3710
  }
3775
- _context45.next = 25;
3711
+ _context44.next = 25;
3776
3712
  return this.LatestVersionHash({
3777
3713
  objectId: objectId
3778
3714
  });
3779
3715
  case 25:
3780
- _context45.t0 = _context45.sent;
3716
+ _context44.t0 = _context44.sent;
3781
3717
  case 26:
3782
- return _context45.abrupt("return", _context45.t0);
3718
+ return _context44.abrupt("return", _context44.t0);
3783
3719
  case 27:
3784
- _context45.next = 29;
3720
+ _context44.next = 29;
3785
3721
  return this.ContentObjectMetadata({
3786
3722
  libraryId: libraryId,
3787
3723
  objectId: objectId,
@@ -3792,50 +3728,50 @@ exports.LinkTarget = /*#__PURE__*/function () {
3792
3728
  authorizationToken: authorizationToken
3793
3729
  });
3794
3730
  case 29:
3795
- linkInfo = _context45.sent;
3731
+ linkInfo = _context44.sent;
3796
3732
  if (!(!linkInfo || !linkInfo["."])) {
3797
- _context45.next = 49;
3733
+ _context44.next = 49;
3798
3734
  break;
3799
3735
  }
3800
3736
  if (!(_typeof(linkInfo) === "object")) {
3801
- _context45.next = 38;
3737
+ _context44.next = 38;
3802
3738
  break;
3803
3739
  }
3804
- _context45.t1 = versionHash;
3805
- if (_context45.t1) {
3806
- _context45.next = 37;
3740
+ _context44.t1 = versionHash;
3741
+ if (_context44.t1) {
3742
+ _context44.next = 37;
3807
3743
  break;
3808
3744
  }
3809
- _context45.next = 36;
3745
+ _context44.next = 36;
3810
3746
  return this.LatestVersionHash({
3811
3747
  objectId: objectId
3812
3748
  });
3813
3749
  case 36:
3814
- _context45.t1 = _context45.sent;
3750
+ _context44.t1 = _context44.sent;
3815
3751
  case 37:
3816
- return _context45.abrupt("return", _context45.t1);
3752
+ return _context44.abrupt("return", _context44.t1);
3817
3753
  case 38:
3818
3754
  // linkPath is not a direct link, but points to a literal value - back up one path element to find the container
3819
3755
  subPath = linkPath.split("/").slice(0, -1).join("/");
3820
3756
  if (subPath) {
3821
- _context45.next = 46;
3757
+ _context44.next = 46;
3822
3758
  break;
3823
3759
  }
3824
- _context45.t2 = versionHash;
3825
- if (_context45.t2) {
3826
- _context45.next = 45;
3760
+ _context44.t2 = versionHash;
3761
+ if (_context44.t2) {
3762
+ _context44.next = 45;
3827
3763
  break;
3828
3764
  }
3829
- _context45.next = 44;
3765
+ _context44.next = 44;
3830
3766
  return this.LatestVersionHash({
3831
3767
  objectId: objectId
3832
3768
  });
3833
3769
  case 44:
3834
- _context45.t2 = _context45.sent;
3770
+ _context44.t2 = _context44.sent;
3835
3771
  case 45:
3836
- return _context45.abrupt("return", _context45.t2);
3772
+ return _context44.abrupt("return", _context44.t2);
3837
3773
  case 46:
3838
- _context45.next = 48;
3774
+ _context44.next = 48;
3839
3775
  return this.ContentObjectMetadata({
3840
3776
  libraryId: libraryId,
3841
3777
  objectId: objectId,
@@ -3846,17 +3782,17 @@ exports.LinkTarget = /*#__PURE__*/function () {
3846
3782
  authorizationToken: authorizationToken
3847
3783
  });
3848
3784
  case 48:
3849
- linkInfo = _context45.sent;
3785
+ linkInfo = _context44.sent;
3850
3786
  case 49:
3851
- return _context45.abrupt("return", linkInfo["."].source);
3787
+ return _context44.abrupt("return", linkInfo["."].source);
3852
3788
  case 50:
3853
3789
  case "end":
3854
- return _context45.stop();
3790
+ return _context44.stop();
3855
3791
  }
3856
- }, _callee45, this);
3792
+ }, _callee44, this);
3857
3793
  }));
3858
- return function (_x44) {
3859
- return _ref80.apply(this, arguments);
3794
+ return function (_x43) {
3795
+ return _ref78.apply(this, arguments);
3860
3796
  };
3861
3797
  }();
3862
3798
 
@@ -3879,12 +3815,12 @@ exports.LinkTarget = /*#__PURE__*/function () {
3879
3815
  * @returns {Promise<string>} - URL to the specified file with authorization token
3880
3816
  */
3881
3817
  exports.LinkUrl = /*#__PURE__*/function () {
3882
- var _ref82 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee46(_ref81) {
3883
- var libraryId, objectId, versionHash, writeToken, linkPath, mimeType, authorizationToken, _ref81$queryParams, queryParams, _ref81$channelAuth, channelAuth, _ref81$noAuth, noAuth, path, authorization;
3884
- return _regeneratorRuntime.wrap(function _callee46$(_context46) {
3885
- while (1) switch (_context46.prev = _context46.next) {
3818
+ var _ref80 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee45(_ref79) {
3819
+ var libraryId, objectId, versionHash, writeToken, linkPath, mimeType, authorizationToken, _ref79$queryParams, queryParams, _ref79$channelAuth, channelAuth, _ref79$noAuth, noAuth, path, authorization;
3820
+ return _regeneratorRuntime.wrap(function _callee45$(_context45) {
3821
+ while (1) switch (_context45.prev = _context45.next) {
3886
3822
  case 0:
3887
- libraryId = _ref81.libraryId, objectId = _ref81.objectId, versionHash = _ref81.versionHash, writeToken = _ref81.writeToken, linkPath = _ref81.linkPath, mimeType = _ref81.mimeType, authorizationToken = _ref81.authorizationToken, _ref81$queryParams = _ref81.queryParams, queryParams = _ref81$queryParams === void 0 ? {} : _ref81$queryParams, _ref81$channelAuth = _ref81.channelAuth, channelAuth = _ref81$channelAuth === void 0 ? false : _ref81$channelAuth, _ref81$noAuth = _ref81.noAuth, noAuth = _ref81$noAuth === void 0 ? false : _ref81$noAuth;
3823
+ libraryId = _ref79.libraryId, objectId = _ref79.objectId, versionHash = _ref79.versionHash, writeToken = _ref79.writeToken, linkPath = _ref79.linkPath, mimeType = _ref79.mimeType, authorizationToken = _ref79.authorizationToken, _ref79$queryParams = _ref79.queryParams, queryParams = _ref79$queryParams === void 0 ? {} : _ref79$queryParams, _ref79$channelAuth = _ref79.channelAuth, channelAuth = _ref79$channelAuth === void 0 ? false : _ref79$channelAuth, _ref79$noAuth = _ref79.noAuth, noAuth = _ref79$noAuth === void 0 ? false : _ref79$noAuth;
3888
3824
  ValidateParameters({
3889
3825
  libraryId: libraryId,
3890
3826
  objectId: objectId,
@@ -3894,7 +3830,7 @@ exports.LinkUrl = /*#__PURE__*/function () {
3894
3830
  ValidateWriteToken(writeToken);
3895
3831
  }
3896
3832
  if (linkPath) {
3897
- _context46.next = 5;
3833
+ _context45.next = 5;
3898
3834
  break;
3899
3835
  }
3900
3836
  throw Error("Link path not specified");
@@ -3908,8 +3844,8 @@ exports.LinkUrl = /*#__PURE__*/function () {
3908
3844
  path = UrlJoin("q", versionHash, "meta", linkPath);
3909
3845
  }
3910
3846
  authorization = [authorizationToken];
3911
- _context46.t0 = authorization;
3912
- _context46.next = 11;
3847
+ _context45.t0 = authorization;
3848
+ _context45.next = 11;
3913
3849
  return this.MetadataAuth({
3914
3850
  libraryId: libraryId,
3915
3851
  objectId: objectId,
@@ -3919,8 +3855,8 @@ exports.LinkUrl = /*#__PURE__*/function () {
3919
3855
  noAuth: noAuth
3920
3856
  });
3921
3857
  case 11:
3922
- _context46.t1 = _context46.sent;
3923
- _context46.t0.push.call(_context46.t0, _context46.t1);
3858
+ _context45.t1 = _context45.sent;
3859
+ _context45.t0.push.call(_context45.t0, _context45.t1);
3924
3860
  if (queryParams.authorization) {
3925
3861
  authorization.push(queryParams.authorization);
3926
3862
  }
@@ -3933,18 +3869,18 @@ exports.LinkUrl = /*#__PURE__*/function () {
3933
3869
  if (mimeType) {
3934
3870
  queryParams["header-accept"] = mimeType;
3935
3871
  }
3936
- return _context46.abrupt("return", this.HttpClient.URL({
3872
+ return _context45.abrupt("return", this.HttpClient.URL({
3937
3873
  path: path,
3938
3874
  queryParams: queryParams
3939
3875
  }));
3940
3876
  case 17:
3941
3877
  case "end":
3942
- return _context46.stop();
3878
+ return _context45.stop();
3943
3879
  }
3944
- }, _callee46, this);
3880
+ }, _callee45, this);
3945
3881
  }));
3946
- return function (_x45) {
3947
- return _ref82.apply(this, arguments);
3882
+ return function (_x44) {
3883
+ return _ref80.apply(this, arguments);
3948
3884
  };
3949
3885
  }();
3950
3886
 
@@ -3963,13 +3899,13 @@ exports.LinkUrl = /*#__PURE__*/function () {
3963
3899
  * @param {boolean=} channelAuth=false - If specified, state channel authorization will be performed instead of access request authorization
3964
3900
  */
3965
3901
  exports.LinkData = /*#__PURE__*/function () {
3966
- var _ref84 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee47(_ref83) {
3967
- var libraryId, objectId, versionHash, writeToken, linkPath, _ref83$queryParams, queryParams, _ref83$format, format, channelAuth, linkUrl;
3968
- return _regeneratorRuntime.wrap(function _callee47$(_context47) {
3969
- while (1) switch (_context47.prev = _context47.next) {
3902
+ var _ref82 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee46(_ref81) {
3903
+ var libraryId, objectId, versionHash, writeToken, linkPath, _ref81$queryParams, queryParams, _ref81$format, format, channelAuth, linkUrl;
3904
+ return _regeneratorRuntime.wrap(function _callee46$(_context46) {
3905
+ while (1) switch (_context46.prev = _context46.next) {
3970
3906
  case 0:
3971
- libraryId = _ref83.libraryId, objectId = _ref83.objectId, versionHash = _ref83.versionHash, writeToken = _ref83.writeToken, linkPath = _ref83.linkPath, _ref83$queryParams = _ref83.queryParams, queryParams = _ref83$queryParams === void 0 ? {} : _ref83$queryParams, _ref83$format = _ref83.format, format = _ref83$format === void 0 ? "json" : _ref83$format, channelAuth = _ref83.channelAuth;
3972
- _context47.next = 3;
3907
+ libraryId = _ref81.libraryId, objectId = _ref81.objectId, versionHash = _ref81.versionHash, writeToken = _ref81.writeToken, linkPath = _ref81.linkPath, _ref81$queryParams = _ref81.queryParams, queryParams = _ref81$queryParams === void 0 ? {} : _ref81$queryParams, _ref81$format = _ref81.format, format = _ref81$format === void 0 ? "json" : _ref81$format, channelAuth = _ref81.channelAuth;
3908
+ _context46.next = 3;
3973
3909
  return this.LinkUrl({
3974
3910
  libraryId: libraryId,
3975
3911
  objectId: objectId,
@@ -3980,39 +3916,39 @@ exports.LinkData = /*#__PURE__*/function () {
3980
3916
  channelAuth: channelAuth
3981
3917
  });
3982
3918
  case 3:
3983
- linkUrl = _context47.sent;
3984
- _context47.t0 = this.utils;
3985
- _context47.t1 = format;
3986
- _context47.next = 8;
3919
+ linkUrl = _context46.sent;
3920
+ _context46.t0 = this.utils;
3921
+ _context46.t1 = format;
3922
+ _context46.next = 8;
3987
3923
  return HttpClient.Fetch(linkUrl);
3988
3924
  case 8:
3989
- _context47.t2 = _context47.sent;
3990
- return _context47.abrupt("return", _context47.t0.ResponseToFormat.call(_context47.t0, _context47.t1, _context47.t2));
3925
+ _context46.t2 = _context46.sent;
3926
+ return _context46.abrupt("return", _context46.t0.ResponseToFormat.call(_context46.t0, _context46.t1, _context46.t2));
3991
3927
  case 10:
3992
3928
  case "end":
3993
- return _context47.stop();
3929
+ return _context46.stop();
3994
3930
  }
3995
- }, _callee47, this);
3931
+ }, _callee46, this);
3996
3932
  }));
3997
- return function (_x46) {
3998
- return _ref84.apply(this, arguments);
3933
+ return function (_x45) {
3934
+ return _ref82.apply(this, arguments);
3999
3935
  };
4000
3936
  }();
4001
3937
 
4002
3938
  /* Encryption */
4003
3939
 
4004
3940
  exports.CreateEncryptionConk = /*#__PURE__*/function () {
4005
- var _ref86 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee48(_ref85) {
4006
- var libraryId, objectId, versionHash, writeToken, _ref85$createKMSConk, createKMSConk, capKey, existingUserCap, kmsAddress, kmsPublicKey, kmsCapKey, existingKMSCap;
4007
- return _regeneratorRuntime.wrap(function _callee48$(_context48) {
4008
- while (1) switch (_context48.prev = _context48.next) {
3941
+ var _ref84 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee47(_ref83) {
3942
+ var libraryId, objectId, versionHash, writeToken, _ref83$createKMSConk, createKMSConk, capKey, existingUserCap, kmsAddress, kmsPublicKey, kmsCapKey, existingKMSCap;
3943
+ return _regeneratorRuntime.wrap(function _callee47$(_context47) {
3944
+ while (1) switch (_context47.prev = _context47.next) {
4009
3945
  case 0:
4010
- libraryId = _ref85.libraryId, objectId = _ref85.objectId, versionHash = _ref85.versionHash, writeToken = _ref85.writeToken, _ref85$createKMSConk = _ref85.createKMSConk, createKMSConk = _ref85$createKMSConk === void 0 ? true : _ref85$createKMSConk;
3946
+ libraryId = _ref83.libraryId, objectId = _ref83.objectId, versionHash = _ref83.versionHash, writeToken = _ref83.writeToken, _ref83$createKMSConk = _ref83.createKMSConk, createKMSConk = _ref83$createKMSConk === void 0 ? true : _ref83$createKMSConk;
4011
3947
  if (!this.signer.remoteSigner) {
4012
- _context48.next = 3;
3948
+ _context47.next = 3;
4013
3949
  break;
4014
3950
  }
4015
- return _context48.abrupt("return");
3951
+ return _context47.abrupt("return");
4016
3952
  case 3:
4017
3953
  ValidateParameters({
4018
3954
  libraryId: libraryId,
@@ -4024,18 +3960,18 @@ exports.CreateEncryptionConk = /*#__PURE__*/function () {
4024
3960
  objectId = client.DecodeVersionHash(versionHash).objectId;
4025
3961
  }
4026
3962
  if (libraryId) {
4027
- _context48.next = 10;
3963
+ _context47.next = 10;
4028
3964
  break;
4029
3965
  }
4030
- _context48.next = 9;
3966
+ _context47.next = 9;
4031
3967
  return this.ContentObjectLibraryId({
4032
3968
  objectId: objectId
4033
3969
  });
4034
3970
  case 9:
4035
- libraryId = _context48.sent;
3971
+ libraryId = _context47.sent;
4036
3972
  case 10:
4037
3973
  capKey = "eluv.caps.iusr".concat(this.utils.AddressToHash(this.signer.address));
4038
- _context48.next = 13;
3974
+ _context47.next = 13;
4039
3975
  return this.ContentObjectMetadata({
4040
3976
  libraryId: libraryId,
4041
3977
  objectId: objectId,
@@ -4043,63 +3979,63 @@ exports.CreateEncryptionConk = /*#__PURE__*/function () {
4043
3979
  metadataSubtree: capKey
4044
3980
  });
4045
3981
  case 13:
4046
- existingUserCap = _context48.sent;
3982
+ existingUserCap = _context47.sent;
4047
3983
  if (!existingUserCap) {
4048
- _context48.next = 20;
3984
+ _context47.next = 20;
4049
3985
  break;
4050
3986
  }
4051
- _context48.next = 17;
3987
+ _context47.next = 17;
4052
3988
  return this.Crypto.DecryptCap(existingUserCap, this.signer._signingKey().privateKey);
4053
3989
  case 17:
4054
- this.encryptionConks[objectId] = _context48.sent;
4055
- _context48.next = 34;
3990
+ this.encryptionConks[objectId] = _context47.sent;
3991
+ _context47.next = 34;
4056
3992
  break;
4057
3993
  case 20:
4058
- _context48.next = 22;
3994
+ _context47.next = 22;
4059
3995
  return this.Crypto.GeneratePrimaryConk({
4060
3996
  spaceId: this.contentSpaceId,
4061
3997
  objectId: objectId
4062
3998
  });
4063
3999
  case 22:
4064
- this.encryptionConks[objectId] = _context48.sent;
4065
- _context48.t0 = this;
4066
- _context48.t1 = libraryId;
4067
- _context48.t2 = objectId;
4068
- _context48.t3 = writeToken;
4069
- _context48.t4 = capKey;
4070
- _context48.next = 30;
4000
+ this.encryptionConks[objectId] = _context47.sent;
4001
+ _context47.t0 = this;
4002
+ _context47.t1 = libraryId;
4003
+ _context47.t2 = objectId;
4004
+ _context47.t3 = writeToken;
4005
+ _context47.t4 = capKey;
4006
+ _context47.next = 30;
4071
4007
  return this.Crypto.EncryptConk(this.encryptionConks[objectId], this.signer._signingKey().publicKey);
4072
4008
  case 30:
4073
- _context48.t5 = _context48.sent;
4074
- _context48.t6 = {
4075
- libraryId: _context48.t1,
4076
- objectId: _context48.t2,
4077
- writeToken: _context48.t3,
4078
- metadataSubtree: _context48.t4,
4079
- metadata: _context48.t5
4009
+ _context47.t5 = _context47.sent;
4010
+ _context47.t6 = {
4011
+ libraryId: _context47.t1,
4012
+ objectId: _context47.t2,
4013
+ writeToken: _context47.t3,
4014
+ metadataSubtree: _context47.t4,
4015
+ metadata: _context47.t5
4080
4016
  };
4081
- _context48.next = 34;
4082
- return _context48.t0.ReplaceMetadata.call(_context48.t0, _context48.t6);
4017
+ _context47.next = 34;
4018
+ return _context47.t0.ReplaceMetadata.call(_context47.t0, _context47.t6);
4083
4019
  case 34:
4084
4020
  if (!createKMSConk) {
4085
- _context48.next = 64;
4021
+ _context47.next = 64;
4086
4022
  break;
4087
4023
  }
4088
- _context48.prev = 35;
4089
- _context48.next = 38;
4024
+ _context47.prev = 35;
4025
+ _context47.next = 38;
4090
4026
  return this.authClient.KMSAddress({
4091
4027
  objectId: objectId
4092
4028
  });
4093
4029
  case 38:
4094
- kmsAddress = _context48.sent;
4095
- _context48.next = 41;
4030
+ kmsAddress = _context47.sent;
4031
+ _context47.next = 41;
4096
4032
  return this.authClient.KMSInfo({
4097
4033
  objectId: objectId
4098
4034
  });
4099
4035
  case 41:
4100
- kmsPublicKey = _context48.sent.publicKey;
4036
+ kmsPublicKey = _context47.sent.publicKey;
4101
4037
  kmsCapKey = "eluv.caps.ikms".concat(this.utils.AddressToHash(kmsAddress));
4102
- _context48.next = 45;
4038
+ _context47.next = 45;
4103
4039
  return this.ContentObjectMetadata({
4104
4040
  libraryId: libraryId,
4105
4041
  // Cap may only exist in draft
@@ -4108,49 +4044,49 @@ exports.CreateEncryptionConk = /*#__PURE__*/function () {
4108
4044
  metadataSubtree: kmsCapKey
4109
4045
  });
4110
4046
  case 45:
4111
- existingKMSCap = _context48.sent;
4047
+ existingKMSCap = _context47.sent;
4112
4048
  if (existingKMSCap) {
4113
- _context48.next = 58;
4049
+ _context47.next = 58;
4114
4050
  break;
4115
4051
  }
4116
- _context48.t7 = this;
4117
- _context48.t8 = libraryId;
4118
- _context48.t9 = objectId;
4119
- _context48.t10 = writeToken;
4120
- _context48.t11 = kmsCapKey;
4121
- _context48.next = 54;
4052
+ _context47.t7 = this;
4053
+ _context47.t8 = libraryId;
4054
+ _context47.t9 = objectId;
4055
+ _context47.t10 = writeToken;
4056
+ _context47.t11 = kmsCapKey;
4057
+ _context47.next = 54;
4122
4058
  return this.Crypto.EncryptConk(this.encryptionConks[objectId], kmsPublicKey);
4123
4059
  case 54:
4124
- _context48.t12 = _context48.sent;
4125
- _context48.t13 = {
4126
- libraryId: _context48.t8,
4127
- objectId: _context48.t9,
4128
- writeToken: _context48.t10,
4129
- metadataSubtree: _context48.t11,
4130
- metadata: _context48.t12
4060
+ _context47.t12 = _context47.sent;
4061
+ _context47.t13 = {
4062
+ libraryId: _context47.t8,
4063
+ objectId: _context47.t9,
4064
+ writeToken: _context47.t10,
4065
+ metadataSubtree: _context47.t11,
4066
+ metadata: _context47.t12
4131
4067
  };
4132
- _context48.next = 58;
4133
- return _context48.t7.ReplaceMetadata.call(_context48.t7, _context48.t13);
4068
+ _context47.next = 58;
4069
+ return _context47.t7.ReplaceMetadata.call(_context47.t7, _context47.t13);
4134
4070
  case 58:
4135
- _context48.next = 64;
4071
+ _context47.next = 64;
4136
4072
  break;
4137
4073
  case 60:
4138
- _context48.prev = 60;
4139
- _context48.t14 = _context48["catch"](35);
4074
+ _context47.prev = 60;
4075
+ _context47.t14 = _context47["catch"](35);
4140
4076
  // eslint-disable-next-line no-console
4141
4077
  console.error("Failed to create encryption cap for KMS:");
4142
4078
  // eslint-disable-next-line no-console
4143
- console.error(_context48.t14);
4079
+ console.error(_context47.t14);
4144
4080
  case 64:
4145
- return _context48.abrupt("return", this.encryptionConks[objectId]);
4081
+ return _context47.abrupt("return", this.encryptionConks[objectId]);
4146
4082
  case 65:
4147
4083
  case "end":
4148
- return _context48.stop();
4084
+ return _context47.stop();
4149
4085
  }
4150
- }, _callee48, this, [[35, 60]]);
4086
+ }, _callee47, this, [[35, 60]]);
4151
4087
  }));
4152
- return function (_x47) {
4153
- return _ref86.apply(this, arguments);
4088
+ return function (_x46) {
4089
+ return _ref84.apply(this, arguments);
4154
4090
  };
4155
4091
  }();
4156
4092
 
@@ -4172,12 +4108,12 @@ exports.CreateEncryptionConk = /*#__PURE__*/function () {
4172
4108
  * @return Promise<Object> - The encryption conk for the object
4173
4109
  */
4174
4110
  exports.EncryptionConk = /*#__PURE__*/function () {
4175
- var _ref88 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee49(_ref87) {
4176
- var libraryId, objectId, versionHash, writeToken, _ref87$download, download, owner, ownerCapKey, ownerCap, capKey, existingUserCap;
4177
- return _regeneratorRuntime.wrap(function _callee49$(_context49) {
4178
- while (1) switch (_context49.prev = _context49.next) {
4111
+ var _ref86 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee48(_ref85) {
4112
+ var libraryId, objectId, versionHash, writeToken, _ref85$download, download, owner, ownerCapKey, ownerCap, capKey, existingUserCap;
4113
+ return _regeneratorRuntime.wrap(function _callee48$(_context48) {
4114
+ while (1) switch (_context48.prev = _context48.next) {
4179
4115
  case 0:
4180
- libraryId = _ref87.libraryId, objectId = _ref87.objectId, versionHash = _ref87.versionHash, writeToken = _ref87.writeToken, _ref87$download = _ref87.download, download = _ref87$download === void 0 ? false : _ref87$download;
4116
+ libraryId = _ref85.libraryId, objectId = _ref85.objectId, versionHash = _ref85.versionHash, writeToken = _ref85.writeToken, _ref85$download = _ref85.download, download = _ref85$download === void 0 ? false : _ref85$download;
4181
4117
  ValidateParameters({
4182
4118
  libraryId: libraryId,
4183
4119
  objectId: objectId,
@@ -4189,14 +4125,14 @@ exports.EncryptionConk = /*#__PURE__*/function () {
4189
4125
  if (!objectId) {
4190
4126
  objectId = client.DecodeVersionHash(versionHash).objectId;
4191
4127
  }
4192
- _context49.next = 6;
4128
+ _context48.next = 6;
4193
4129
  return this.authClient.Owner({
4194
4130
  id: objectId
4195
4131
  });
4196
4132
  case 6:
4197
- owner = _context49.sent;
4133
+ owner = _context48.sent;
4198
4134
  ownerCapKey = "eluv.caps.iusr".concat(this.utils.AddressToHash(this.signer.address));
4199
- _context49.next = 10;
4135
+ _context48.next = 10;
4200
4136
  return this.ContentObjectMetadata({
4201
4137
  libraryId: libraryId,
4202
4138
  objectId: objectId,
@@ -4204,39 +4140,39 @@ exports.EncryptionConk = /*#__PURE__*/function () {
4204
4140
  metadataSubtree: ownerCapKey
4205
4141
  });
4206
4142
  case 10:
4207
- ownerCap = _context49.sent;
4143
+ ownerCap = _context48.sent;
4208
4144
  if (!(!this.utils.EqualAddress(owner, this.signer.address) && !ownerCap)) {
4209
- _context49.next = 21;
4145
+ _context48.next = 21;
4210
4146
  break;
4211
4147
  }
4212
4148
  if (!download) {
4213
- _context49.next = 18;
4149
+ _context48.next = 18;
4214
4150
  break;
4215
4151
  }
4216
- _context49.next = 15;
4152
+ _context48.next = 15;
4217
4153
  return this.authClient.ReEncryptionConk({
4218
4154
  libraryId: libraryId,
4219
4155
  objectId: objectId,
4220
4156
  versionHash: versionHash
4221
4157
  });
4222
4158
  case 15:
4223
- return _context49.abrupt("return", _context49.sent);
4159
+ return _context48.abrupt("return", _context48.sent);
4224
4160
  case 18:
4225
- _context49.next = 20;
4161
+ _context48.next = 20;
4226
4162
  return this.authClient.EncryptionConk({
4227
4163
  libraryId: libraryId,
4228
4164
  objectId: objectId,
4229
4165
  versionHash: versionHash
4230
4166
  });
4231
4167
  case 20:
4232
- return _context49.abrupt("return", _context49.sent);
4168
+ return _context48.abrupt("return", _context48.sent);
4233
4169
  case 21:
4234
4170
  if (this.encryptionConks[objectId]) {
4235
- _context49.next = 38;
4171
+ _context48.next = 38;
4236
4172
  break;
4237
4173
  }
4238
4174
  capKey = "eluv.caps.iusr".concat(this.utils.AddressToHash(this.signer.address));
4239
- _context49.next = 25;
4175
+ _context48.next = 25;
4240
4176
  return this.ContentObjectMetadata({
4241
4177
  libraryId: libraryId,
4242
4178
  objectId: objectId,
@@ -4246,23 +4182,23 @@ exports.EncryptionConk = /*#__PURE__*/function () {
4246
4182
  metadataSubtree: capKey
4247
4183
  });
4248
4184
  case 25:
4249
- existingUserCap = _context49.sent;
4185
+ existingUserCap = _context48.sent;
4250
4186
  if (!existingUserCap) {
4251
- _context49.next = 32;
4187
+ _context48.next = 32;
4252
4188
  break;
4253
4189
  }
4254
- _context49.next = 29;
4190
+ _context48.next = 29;
4255
4191
  return this.Crypto.DecryptCap(existingUserCap, this.signer._signingKey().privateKey);
4256
4192
  case 29:
4257
- this.encryptionConks[objectId] = _context49.sent;
4258
- _context49.next = 38;
4193
+ this.encryptionConks[objectId] = _context48.sent;
4194
+ _context48.next = 38;
4259
4195
  break;
4260
4196
  case 32:
4261
4197
  if (!writeToken) {
4262
- _context49.next = 37;
4198
+ _context48.next = 37;
4263
4199
  break;
4264
4200
  }
4265
- _context49.next = 35;
4201
+ _context48.next = 35;
4266
4202
  return this.CreateEncryptionConk({
4267
4203
  libraryId: libraryId,
4268
4204
  objectId: objectId,
@@ -4271,20 +4207,20 @@ exports.EncryptionConk = /*#__PURE__*/function () {
4271
4207
  createKMSConk: false
4272
4208
  });
4273
4209
  case 35:
4274
- _context49.next = 38;
4210
+ _context48.next = 38;
4275
4211
  break;
4276
4212
  case 37:
4277
4213
  throw "No encryption conk present for " + objectId;
4278
4214
  case 38:
4279
- return _context49.abrupt("return", this.encryptionConks[objectId]);
4215
+ return _context48.abrupt("return", this.encryptionConks[objectId]);
4280
4216
  case 39:
4281
4217
  case "end":
4282
- return _context49.stop();
4218
+ return _context48.stop();
4283
4219
  }
4284
- }, _callee49, this);
4220
+ }, _callee48, this);
4285
4221
  }));
4286
- return function (_x48) {
4287
- return _ref88.apply(this, arguments);
4222
+ return function (_x47) {
4223
+ return _ref86.apply(this, arguments);
4288
4224
  };
4289
4225
  }();
4290
4226
 
@@ -4302,37 +4238,37 @@ exports.EncryptionConk = /*#__PURE__*/function () {
4302
4238
  * @return {Promise<ArrayBuffer>}
4303
4239
  */
4304
4240
  exports.Encrypt = /*#__PURE__*/function () {
4305
- var _ref90 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee50(_ref89) {
4241
+ var _ref88 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee49(_ref87) {
4306
4242
  var libraryId, objectId, writeToken, chunk, conk, data;
4307
- return _regeneratorRuntime.wrap(function _callee50$(_context50) {
4308
- while (1) switch (_context50.prev = _context50.next) {
4243
+ return _regeneratorRuntime.wrap(function _callee49$(_context49) {
4244
+ while (1) switch (_context49.prev = _context49.next) {
4309
4245
  case 0:
4310
- libraryId = _ref89.libraryId, objectId = _ref89.objectId, writeToken = _ref89.writeToken, chunk = _ref89.chunk;
4246
+ libraryId = _ref87.libraryId, objectId = _ref87.objectId, writeToken = _ref87.writeToken, chunk = _ref87.chunk;
4311
4247
  ValidateParameters({
4312
4248
  libraryId: libraryId,
4313
4249
  objectId: objectId
4314
4250
  });
4315
- _context50.next = 4;
4251
+ _context49.next = 4;
4316
4252
  return this.EncryptionConk({
4317
4253
  libraryId: libraryId,
4318
4254
  objectId: objectId,
4319
4255
  writeToken: writeToken
4320
4256
  });
4321
4257
  case 4:
4322
- conk = _context50.sent;
4323
- _context50.next = 7;
4258
+ conk = _context49.sent;
4259
+ _context49.next = 7;
4324
4260
  return this.Crypto.Encrypt(conk, chunk);
4325
4261
  case 7:
4326
- data = _context50.sent;
4327
- return _context50.abrupt("return", data.buffer.slice(data.byteOffset, data.byteOffset + data.byteLength));
4262
+ data = _context49.sent;
4263
+ return _context49.abrupt("return", data.buffer.slice(data.byteOffset, data.byteOffset + data.byteLength));
4328
4264
  case 9:
4329
4265
  case "end":
4330
- return _context50.stop();
4266
+ return _context49.stop();
4331
4267
  }
4332
- }, _callee50, this);
4268
+ }, _callee49, this);
4333
4269
  }));
4334
- return function (_x49) {
4335
- return _ref90.apply(this, arguments);
4270
+ return function (_x48) {
4271
+ return _ref88.apply(this, arguments);
4336
4272
  };
4337
4273
  }();
4338
4274
 
@@ -4350,17 +4286,17 @@ exports.Encrypt = /*#__PURE__*/function () {
4350
4286
  * @return {Promise<ArrayBuffer>}
4351
4287
  */
4352
4288
  exports.Decrypt = /*#__PURE__*/function () {
4353
- var _ref92 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee51(_ref91) {
4289
+ var _ref90 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee50(_ref89) {
4354
4290
  var libraryId, objectId, writeToken, chunk, conk, data;
4355
- return _regeneratorRuntime.wrap(function _callee51$(_context51) {
4356
- while (1) switch (_context51.prev = _context51.next) {
4291
+ return _regeneratorRuntime.wrap(function _callee50$(_context50) {
4292
+ while (1) switch (_context50.prev = _context50.next) {
4357
4293
  case 0:
4358
- libraryId = _ref91.libraryId, objectId = _ref91.objectId, writeToken = _ref91.writeToken, chunk = _ref91.chunk;
4294
+ libraryId = _ref89.libraryId, objectId = _ref89.objectId, writeToken = _ref89.writeToken, chunk = _ref89.chunk;
4359
4295
  ValidateParameters({
4360
4296
  libraryId: libraryId,
4361
4297
  objectId: objectId
4362
4298
  });
4363
- _context51.next = 4;
4299
+ _context50.next = 4;
4364
4300
  return this.EncryptionConk({
4365
4301
  libraryId: libraryId,
4366
4302
  objectId: objectId,
@@ -4368,20 +4304,20 @@ exports.Decrypt = /*#__PURE__*/function () {
4368
4304
  download: true
4369
4305
  });
4370
4306
  case 4:
4371
- conk = _context51.sent;
4372
- _context51.next = 7;
4307
+ conk = _context50.sent;
4308
+ _context50.next = 7;
4373
4309
  return this.Crypto.Decrypt(conk, chunk);
4374
4310
  case 7:
4375
- data = _context51.sent;
4376
- return _context51.abrupt("return", data.buffer.slice(data.byteOffset, data.byteOffset + data.byteLength));
4311
+ data = _context50.sent;
4312
+ return _context50.abrupt("return", data.buffer.slice(data.byteOffset, data.byteOffset + data.byteLength));
4377
4313
  case 9:
4378
4314
  case "end":
4379
- return _context51.stop();
4315
+ return _context50.stop();
4380
4316
  }
4381
- }, _callee51, this);
4317
+ }, _callee50, this);
4382
4318
  }));
4383
- return function (_x50) {
4384
- return _ref92.apply(this, arguments);
4319
+ return function (_x49) {
4320
+ return _ref90.apply(this, arguments);
4385
4321
  };
4386
4322
  }();
4387
4323
 
@@ -4397,24 +4333,24 @@ exports.Decrypt = /*#__PURE__*/function () {
4397
4333
  * @return {Promise<string>} - Contract type of the item - "space", "library", "type", "object", "wallet", "group", or "other"
4398
4334
  */
4399
4335
  exports.AccessType = /*#__PURE__*/function () {
4400
- var _ref94 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee52(_ref93) {
4336
+ var _ref92 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee51(_ref91) {
4401
4337
  var id;
4402
- return _regeneratorRuntime.wrap(function _callee52$(_context52) {
4403
- while (1) switch (_context52.prev = _context52.next) {
4338
+ return _regeneratorRuntime.wrap(function _callee51$(_context51) {
4339
+ while (1) switch (_context51.prev = _context51.next) {
4404
4340
  case 0:
4405
- id = _ref93.id;
4406
- _context52.next = 3;
4341
+ id = _ref91.id;
4342
+ _context51.next = 3;
4407
4343
  return this.authClient.AccessType(id);
4408
4344
  case 3:
4409
- return _context52.abrupt("return", _context52.sent);
4345
+ return _context51.abrupt("return", _context51.sent);
4410
4346
  case 4:
4411
4347
  case "end":
4412
- return _context52.stop();
4348
+ return _context51.stop();
4413
4349
  }
4414
- }, _callee52, this);
4350
+ }, _callee51, this);
4415
4351
  }));
4416
- return function (_x51) {
4417
- return _ref94.apply(this, arguments);
4352
+ return function (_x50) {
4353
+ return _ref92.apply(this, arguments);
4418
4354
  };
4419
4355
  }();
4420
4356
 
@@ -4430,12 +4366,12 @@ exports.AccessType = /*#__PURE__*/function () {
4430
4366
  *
4431
4367
  * @return {Promise<Object>} - Info about the access charge and whether or not the object is accessible to the current user */
4432
4368
  exports.AccessInfo = /*#__PURE__*/function () {
4433
- var _ref96 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee53(_ref95) {
4369
+ var _ref94 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee52(_ref93) {
4434
4370
  var objectId, args, info;
4435
- return _regeneratorRuntime.wrap(function _callee53$(_context53) {
4436
- while (1) switch (_context53.prev = _context53.next) {
4371
+ return _regeneratorRuntime.wrap(function _callee52$(_context52) {
4372
+ while (1) switch (_context52.prev = _context52.next) {
4437
4373
  case 0:
4438
- objectId = _ref95.objectId, args = _ref95.args;
4374
+ objectId = _ref93.objectId, args = _ref93.args;
4439
4375
  ValidateObject(objectId);
4440
4376
  if (!args) {
4441
4377
  args = [0,
@@ -4447,16 +4383,16 @@ exports.AccessInfo = /*#__PURE__*/function () {
4447
4383
  }
4448
4384
 
4449
4385
  this.Log("Retrieving access info: ".concat(objectId));
4450
- _context53.next = 6;
4386
+ _context52.next = 6;
4451
4387
  return this.ethClient.CallContractMethod({
4452
4388
  contractAddress: this.utils.HashToAddress(objectId),
4453
4389
  methodName: "getAccessInfo",
4454
4390
  methodArgs: args
4455
4391
  });
4456
4392
  case 6:
4457
- info = _context53.sent;
4393
+ info = _context52.sent;
4458
4394
  this.Log(info);
4459
- return _context53.abrupt("return", {
4395
+ return _context52.abrupt("return", {
4460
4396
  visibilityCode: info[0],
4461
4397
  visible: info[0] >= 1,
4462
4398
  accessible: info[0] >= 10,
@@ -4467,12 +4403,12 @@ exports.AccessInfo = /*#__PURE__*/function () {
4467
4403
  });
4468
4404
  case 9:
4469
4405
  case "end":
4470
- return _context53.stop();
4406
+ return _context52.stop();
4471
4407
  }
4472
- }, _callee53, this);
4408
+ }, _callee52, this);
4473
4409
  }));
4474
- return function (_x52) {
4475
- return _ref96.apply(this, arguments);
4410
+ return function (_x51) {
4411
+ return _ref94.apply(this, arguments);
4476
4412
  };
4477
4413
  }();
4478
4414
 
@@ -4500,12 +4436,12 @@ exports.AccessInfo = /*#__PURE__*/function () {
4500
4436
  * @return {Promise<Object>} - Resultant AccessRequest or UpdateRequest event
4501
4437
  */
4502
4438
  exports.AccessRequest = /*#__PURE__*/function () {
4503
- var _ref98 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee54(_ref97) {
4504
- var libraryId, objectId, versionHash, _ref97$args, args, _ref97$update, update, _ref97$noCache, noCache;
4505
- return _regeneratorRuntime.wrap(function _callee54$(_context54) {
4506
- while (1) switch (_context54.prev = _context54.next) {
4439
+ var _ref96 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee53(_ref95) {
4440
+ var libraryId, objectId, versionHash, _ref95$args, args, _ref95$update, update, _ref95$noCache, noCache;
4441
+ return _regeneratorRuntime.wrap(function _callee53$(_context53) {
4442
+ while (1) switch (_context53.prev = _context53.next) {
4507
4443
  case 0:
4508
- libraryId = _ref97.libraryId, objectId = _ref97.objectId, versionHash = _ref97.versionHash, _ref97$args = _ref97.args, args = _ref97$args === void 0 ? [] : _ref97$args, _ref97$update = _ref97.update, update = _ref97$update === void 0 ? false : _ref97$update, _ref97$noCache = _ref97.noCache, noCache = _ref97$noCache === void 0 ? false : _ref97$noCache;
4444
+ libraryId = _ref95.libraryId, objectId = _ref95.objectId, versionHash = _ref95.versionHash, _ref95$args = _ref95.args, args = _ref95$args === void 0 ? [] : _ref95$args, _ref95$update = _ref95.update, update = _ref95$update === void 0 ? false : _ref95$update, _ref95$noCache = _ref95.noCache, noCache = _ref95$noCache === void 0 ? false : _ref95$noCache;
4509
4445
  ValidateParameters({
4510
4446
  libraryId: libraryId,
4511
4447
  objectId: objectId,
@@ -4514,7 +4450,7 @@ exports.AccessRequest = /*#__PURE__*/function () {
4514
4450
  if (versionHash) {
4515
4451
  objectId = this.utils.DecodeVersionHash(versionHash).objectId;
4516
4452
  }
4517
- _context54.next = 5;
4453
+ _context53.next = 5;
4518
4454
  return this.authClient.MakeAccessRequest({
4519
4455
  libraryId: libraryId,
4520
4456
  objectId: objectId,
@@ -4525,15 +4461,15 @@ exports.AccessRequest = /*#__PURE__*/function () {
4525
4461
  noCache: noCache
4526
4462
  });
4527
4463
  case 5:
4528
- return _context54.abrupt("return", _context54.sent);
4464
+ return _context53.abrupt("return", _context53.sent);
4529
4465
  case 6:
4530
4466
  case "end":
4531
- return _context54.stop();
4467
+ return _context53.stop();
4532
4468
  }
4533
- }, _callee54, this);
4469
+ }, _callee53, this);
4534
4470
  }));
4535
- return function (_x53) {
4536
- return _ref98.apply(this, arguments);
4471
+ return function (_x52) {
4472
+ return _ref96.apply(this, arguments);
4537
4473
  };
4538
4474
  }();
4539
4475
 
@@ -4545,8 +4481,8 @@ exports.AccessRequest = /*#__PURE__*/function () {
4545
4481
  * @param {Object=} context - Additional context to include in state channel requests
4546
4482
  * - Note: Context must be a map of string->string
4547
4483
  */
4548
- exports.SetAuthContext = function (_ref99) {
4549
- var context = _ref99.context;
4484
+ exports.SetAuthContext = function (_ref97) {
4485
+ var context = _ref97.context;
4550
4486
  if (context && Object.values(context).find(function (value) {
4551
4487
  return typeof value !== "string";
4552
4488
  })) {
@@ -4570,34 +4506,34 @@ exports.SetAuthContext = function (_ref99) {
4570
4506
  * @return {Promise<string>} - The state channel token
4571
4507
  */
4572
4508
  exports.GenerateStateChannelToken = /*#__PURE__*/function () {
4573
- var _ref101 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee55(_ref100) {
4574
- var objectId, versionHash, context, _ref100$noCache, noCache;
4575
- return _regeneratorRuntime.wrap(function _callee55$(_context55) {
4576
- while (1) switch (_context55.prev = _context55.next) {
4509
+ var _ref99 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee54(_ref98) {
4510
+ var objectId, versionHash, context, _ref98$noCache, noCache;
4511
+ return _regeneratorRuntime.wrap(function _callee54$(_context54) {
4512
+ while (1) switch (_context54.prev = _context54.next) {
4577
4513
  case 0:
4578
- objectId = _ref100.objectId, versionHash = _ref100.versionHash, context = _ref100.context, _ref100$noCache = _ref100.noCache, noCache = _ref100$noCache === void 0 ? false : _ref100$noCache;
4514
+ objectId = _ref98.objectId, versionHash = _ref98.versionHash, context = _ref98.context, _ref98$noCache = _ref98.noCache, noCache = _ref98$noCache === void 0 ? false : _ref98$noCache;
4579
4515
  versionHash ? ValidateVersion(versionHash) : ValidateObject(objectId);
4580
4516
  if (!versionHash) {
4581
- _context55.next = 6;
4517
+ _context54.next = 6;
4582
4518
  break;
4583
4519
  }
4584
4520
  objectId = this.utils.DecodeVersionHash(versionHash).objectId;
4585
- _context55.next = 10;
4521
+ _context54.next = 10;
4586
4522
  break;
4587
4523
  case 6:
4588
4524
  if (this.stateChannelAccess[objectId]) {
4589
- _context55.next = 10;
4525
+ _context54.next = 10;
4590
4526
  break;
4591
4527
  }
4592
- _context55.next = 9;
4528
+ _context54.next = 9;
4593
4529
  return this.LatestVersionHash({
4594
4530
  objectId: objectId
4595
4531
  });
4596
4532
  case 9:
4597
- versionHash = _context55.sent;
4533
+ versionHash = _context54.sent;
4598
4534
  case 10:
4599
4535
  this.stateChannelAccess[objectId] = versionHash;
4600
- _context55.next = 13;
4536
+ _context54.next = 13;
4601
4537
  return this.authClient.AuthorizationToken({
4602
4538
  objectId: objectId,
4603
4539
  channelAuth: true,
@@ -4606,15 +4542,15 @@ exports.GenerateStateChannelToken = /*#__PURE__*/function () {
4606
4542
  noCache: noCache
4607
4543
  });
4608
4544
  case 13:
4609
- return _context55.abrupt("return", _context55.sent);
4545
+ return _context54.abrupt("return", _context54.sent);
4610
4546
  case 14:
4611
4547
  case "end":
4612
- return _context55.stop();
4548
+ return _context54.stop();
4613
4549
  }
4614
- }, _callee55, this);
4550
+ }, _callee54, this);
4615
4551
  }));
4616
- return function (_x54) {
4617
- return _ref101.apply(this, arguments);
4552
+ return function (_x53) {
4553
+ return _ref99.apply(this, arguments);
4618
4554
  };
4619
4555
  }();
4620
4556
 
@@ -4628,38 +4564,38 @@ exports.GenerateStateChannelToken = /*#__PURE__*/function () {
4628
4564
  * @param {number} percentComplete - Completion percentage of the content
4629
4565
  */
4630
4566
  exports.FinalizeStateChannelAccess = /*#__PURE__*/function () {
4631
- var _ref103 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee56(_ref102) {
4567
+ var _ref101 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee55(_ref100) {
4632
4568
  var objectId, versionHash, percentComplete;
4633
- return _regeneratorRuntime.wrap(function _callee56$(_context56) {
4634
- while (1) switch (_context56.prev = _context56.next) {
4569
+ return _regeneratorRuntime.wrap(function _callee55$(_context55) {
4570
+ while (1) switch (_context55.prev = _context55.next) {
4635
4571
  case 0:
4636
- objectId = _ref102.objectId, versionHash = _ref102.versionHash, percentComplete = _ref102.percentComplete;
4572
+ objectId = _ref100.objectId, versionHash = _ref100.versionHash, percentComplete = _ref100.percentComplete;
4637
4573
  versionHash ? ValidateVersion(versionHash) : ValidateObject(objectId);
4638
4574
  if (!versionHash) {
4639
- _context56.next = 6;
4575
+ _context55.next = 6;
4640
4576
  break;
4641
4577
  }
4642
4578
  objectId = this.utils.DecodeVersionHash(versionHash).objectId;
4643
- _context56.next = 13;
4579
+ _context55.next = 13;
4644
4580
  break;
4645
4581
  case 6:
4646
4582
  if (!this.stateChannelAccess[objectId]) {
4647
- _context56.next = 10;
4583
+ _context55.next = 10;
4648
4584
  break;
4649
4585
  }
4650
4586
  versionHash = this.stateChannelAccess[objectId];
4651
- _context56.next = 13;
4587
+ _context55.next = 13;
4652
4588
  break;
4653
4589
  case 10:
4654
- _context56.next = 12;
4590
+ _context55.next = 12;
4655
4591
  return this.LatestVersionHash({
4656
4592
  objectId: objectId
4657
4593
  });
4658
4594
  case 12:
4659
- versionHash = _context56.sent;
4595
+ versionHash = _context55.sent;
4660
4596
  case 13:
4661
4597
  this.stateChannelAccess[objectId] = undefined;
4662
- _context56.next = 16;
4598
+ _context55.next = 16;
4663
4599
  return this.authClient.ChannelContentFinalize({
4664
4600
  objectId: objectId,
4665
4601
  versionHash: versionHash,
@@ -4667,12 +4603,12 @@ exports.FinalizeStateChannelAccess = /*#__PURE__*/function () {
4667
4603
  });
4668
4604
  case 16:
4669
4605
  case "end":
4670
- return _context56.stop();
4606
+ return _context55.stop();
4671
4607
  }
4672
- }, _callee56, this);
4608
+ }, _callee55, this);
4673
4609
  }));
4674
- return function (_x55) {
4675
- return _ref103.apply(this, arguments);
4610
+ return function (_x54) {
4611
+ return _ref101.apply(this, arguments);
4676
4612
  };
4677
4613
  }();
4678
4614
 
@@ -4689,34 +4625,34 @@ exports.FinalizeStateChannelAccess = /*#__PURE__*/function () {
4689
4625
  * @returns {Promise<Object>} - Transaction log of the AccessComplete event
4690
4626
  */
4691
4627
  exports.ContentObjectAccessComplete = /*#__PURE__*/function () {
4692
- var _ref105 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee57(_ref104) {
4693
- var objectId, _ref104$score, score;
4694
- return _regeneratorRuntime.wrap(function _callee57$(_context57) {
4695
- while (1) switch (_context57.prev = _context57.next) {
4628
+ var _ref103 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee56(_ref102) {
4629
+ var objectId, _ref102$score, score;
4630
+ return _regeneratorRuntime.wrap(function _callee56$(_context56) {
4631
+ while (1) switch (_context56.prev = _context56.next) {
4696
4632
  case 0:
4697
- objectId = _ref104.objectId, _ref104$score = _ref104.score, score = _ref104$score === void 0 ? 100 : _ref104$score;
4633
+ objectId = _ref102.objectId, _ref102$score = _ref102.score, score = _ref102$score === void 0 ? 100 : _ref102$score;
4698
4634
  ValidateObject(objectId);
4699
4635
  if (!(score < 0 || score > 100)) {
4700
- _context57.next = 4;
4636
+ _context56.next = 4;
4701
4637
  break;
4702
4638
  }
4703
4639
  throw Error("Invalid AccessComplete score: " + score);
4704
4640
  case 4:
4705
- _context57.next = 6;
4641
+ _context56.next = 6;
4706
4642
  return this.authClient.AccessComplete({
4707
4643
  id: objectId,
4708
4644
  score: score
4709
4645
  });
4710
4646
  case 6:
4711
- return _context57.abrupt("return", _context57.sent);
4647
+ return _context56.abrupt("return", _context56.sent);
4712
4648
  case 7:
4713
4649
  case "end":
4714
- return _context57.stop();
4650
+ return _context56.stop();
4715
4651
  }
4716
- }, _callee57, this);
4652
+ }, _callee56, this);
4717
4653
  }));
4718
- return function (_x56) {
4719
- return _ref105.apply(this, arguments);
4654
+ return function (_x55) {
4655
+ return _ref103.apply(this, arguments);
4720
4656
  };
4721
4657
  }();
4722
4658
 
@@ -4738,62 +4674,62 @@ exports.ContentObjectAccessComplete = /*#__PURE__*/function () {
4738
4674
  * @return {Promise<Array<string>>} - List of addresses of available items
4739
4675
  */
4740
4676
  exports.Collection = /*#__PURE__*/function () {
4741
- var _ref107 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee58(_ref106) {
4677
+ var _ref105 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee57(_ref104) {
4742
4678
  var collectionType, validCollectionTypes, walletAddress;
4743
- return _regeneratorRuntime.wrap(function _callee58$(_context58) {
4744
- while (1) switch (_context58.prev = _context58.next) {
4679
+ return _regeneratorRuntime.wrap(function _callee57$(_context57) {
4680
+ while (1) switch (_context57.prev = _context57.next) {
4745
4681
  case 0:
4746
- collectionType = _ref106.collectionType;
4682
+ collectionType = _ref104.collectionType;
4747
4683
  validCollectionTypes = ["accessGroups", "contentObjects", "contentTypes", "contracts", "libraries"];
4748
4684
  if (validCollectionTypes.includes(collectionType)) {
4749
- _context58.next = 4;
4685
+ _context57.next = 4;
4750
4686
  break;
4751
4687
  }
4752
4688
  throw new Error("Invalid collection type: " + collectionType);
4753
4689
  case 4:
4754
4690
  if (!this.signer) {
4755
- _context58.next = 10;
4691
+ _context57.next = 10;
4756
4692
  break;
4757
4693
  }
4758
- _context58.next = 7;
4694
+ _context57.next = 7;
4759
4695
  return this.userProfileClient.WalletAddress();
4760
4696
  case 7:
4761
- _context58.t0 = _context58.sent;
4762
- _context58.next = 11;
4697
+ _context57.t0 = _context57.sent;
4698
+ _context57.next = 11;
4763
4699
  break;
4764
4700
  case 10:
4765
- _context58.t0 = undefined;
4701
+ _context57.t0 = undefined;
4766
4702
  case 11:
4767
- walletAddress = _context58.t0;
4703
+ walletAddress = _context57.t0;
4768
4704
  if (walletAddress) {
4769
- _context58.next = 14;
4705
+ _context57.next = 14;
4770
4706
  break;
4771
4707
  }
4772
4708
  throw new Error("Unable to get collection: User wallet doesn't exist");
4773
4709
  case 14:
4774
4710
  this.Log("Retrieving ".concat(collectionType, " contract collection for user ").concat(this.signer.address));
4775
- _context58.next = 17;
4711
+ _context57.next = 17;
4776
4712
  return this.ethClient.MakeProviderCall({
4777
4713
  methodName: "send",
4778
4714
  args: ["elv_getWalletCollection", [this.contentSpaceId, "iusr".concat(this.utils.AddressToHash(this.signer.address)), collectionType]]
4779
4715
  });
4780
4716
  case 17:
4781
- _context58.t1 = _context58.sent;
4782
- if (_context58.t1) {
4783
- _context58.next = 20;
4717
+ _context57.t1 = _context57.sent;
4718
+ if (_context57.t1) {
4719
+ _context57.next = 20;
4784
4720
  break;
4785
4721
  }
4786
- _context58.t1 = [];
4722
+ _context57.t1 = [];
4787
4723
  case 20:
4788
- return _context58.abrupt("return", _context58.t1);
4724
+ return _context57.abrupt("return", _context57.t1);
4789
4725
  case 21:
4790
4726
  case "end":
4791
- return _context58.stop();
4727
+ return _context57.stop();
4792
4728
  }
4793
- }, _callee58, this);
4729
+ }, _callee57, this);
4794
4730
  }));
4795
- return function (_x57) {
4796
- return _ref107.apply(this, arguments);
4731
+ return function (_x56) {
4732
+ return _ref105.apply(this, arguments);
4797
4733
  };
4798
4734
  }();
4799
4735
 
@@ -4811,18 +4747,18 @@ exports.Collection = /*#__PURE__*/function () {
4811
4747
  * @returns {Promise<Object>} - Response describing verification results
4812
4748
  */
4813
4749
  exports.VerifyContentObject = /*#__PURE__*/function () {
4814
- var _ref109 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee59(_ref108) {
4750
+ var _ref107 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee58(_ref106) {
4815
4751
  var libraryId, objectId, versionHash;
4816
- return _regeneratorRuntime.wrap(function _callee59$(_context59) {
4817
- while (1) switch (_context59.prev = _context59.next) {
4752
+ return _regeneratorRuntime.wrap(function _callee58$(_context58) {
4753
+ while (1) switch (_context58.prev = _context58.next) {
4818
4754
  case 0:
4819
- libraryId = _ref108.libraryId, objectId = _ref108.objectId, versionHash = _ref108.versionHash;
4755
+ libraryId = _ref106.libraryId, objectId = _ref106.objectId, versionHash = _ref106.versionHash;
4820
4756
  ValidateParameters({
4821
4757
  libraryId: libraryId,
4822
4758
  objectId: objectId,
4823
4759
  versionHash: versionHash
4824
4760
  });
4825
- _context59.next = 4;
4761
+ _context58.next = 4;
4826
4762
  return ContentObjectVerification.VerifyContentObject({
4827
4763
  client: this,
4828
4764
  libraryId: libraryId,
@@ -4830,15 +4766,15 @@ exports.VerifyContentObject = /*#__PURE__*/function () {
4830
4766
  versionHash: versionHash
4831
4767
  });
4832
4768
  case 4:
4833
- return _context59.abrupt("return", _context59.sent);
4769
+ return _context58.abrupt("return", _context58.sent);
4834
4770
  case 5:
4835
4771
  case "end":
4836
- return _context59.stop();
4772
+ return _context58.stop();
4837
4773
  }
4838
- }, _callee59, this);
4774
+ }, _callee58, this);
4839
4775
  }));
4840
- return function (_x58) {
4841
- return _ref109.apply(this, arguments);
4776
+ return function (_x57) {
4777
+ return _ref107.apply(this, arguments);
4842
4778
  };
4843
4779
  }();
4844
4780
 
@@ -4855,12 +4791,12 @@ exports.VerifyContentObject = /*#__PURE__*/function () {
4855
4791
  * @returns {Promise<Object>} - Response containing proof information
4856
4792
  */
4857
4793
  exports.Proofs = /*#__PURE__*/function () {
4858
- var _ref111 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee60(_ref110) {
4794
+ var _ref109 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee59(_ref108) {
4859
4795
  var libraryId, objectId, versionHash, partHash, path;
4860
- return _regeneratorRuntime.wrap(function _callee60$(_context60) {
4861
- while (1) switch (_context60.prev = _context60.next) {
4796
+ return _regeneratorRuntime.wrap(function _callee59$(_context59) {
4797
+ while (1) switch (_context59.prev = _context59.next) {
4862
4798
  case 0:
4863
- libraryId = _ref110.libraryId, objectId = _ref110.objectId, versionHash = _ref110.versionHash, partHash = _ref110.partHash;
4799
+ libraryId = _ref108.libraryId, objectId = _ref108.objectId, versionHash = _ref108.versionHash, partHash = _ref108.partHash;
4864
4800
  ValidateParameters({
4865
4801
  libraryId: libraryId,
4866
4802
  objectId: objectId,
@@ -4871,32 +4807,32 @@ exports.Proofs = /*#__PURE__*/function () {
4871
4807
  objectId = this.utils.DecodeVersionHash(versionHash).objectId;
4872
4808
  }
4873
4809
  path = UrlJoin("q", versionHash || objectId, "data", partHash, "proofs");
4874
- _context60.t0 = this.utils;
4875
- _context60.t1 = this.HttpClient;
4876
- _context60.next = 9;
4810
+ _context59.t0 = this.utils;
4811
+ _context59.t1 = this.HttpClient;
4812
+ _context59.next = 9;
4877
4813
  return this.authClient.AuthorizationHeader({
4878
4814
  libraryId: libraryId,
4879
4815
  objectId: objectId,
4880
4816
  versionHash: versionHash
4881
4817
  });
4882
4818
  case 9:
4883
- _context60.t2 = _context60.sent;
4884
- _context60.t3 = path;
4885
- _context60.t4 = {
4886
- headers: _context60.t2,
4819
+ _context59.t2 = _context59.sent;
4820
+ _context59.t3 = path;
4821
+ _context59.t4 = {
4822
+ headers: _context59.t2,
4887
4823
  method: "GET",
4888
- path: _context60.t3
4824
+ path: _context59.t3
4889
4825
  };
4890
- _context60.t5 = _context60.t1.Request.call(_context60.t1, _context60.t4);
4891
- return _context60.abrupt("return", _context60.t0.ResponseToJson.call(_context60.t0, _context60.t5));
4826
+ _context59.t5 = _context59.t1.Request.call(_context59.t1, _context59.t4);
4827
+ return _context59.abrupt("return", _context59.t0.ResponseToJson.call(_context59.t0, _context59.t5));
4892
4828
  case 14:
4893
4829
  case "end":
4894
- return _context60.stop();
4830
+ return _context59.stop();
4895
4831
  }
4896
- }, _callee60, this);
4832
+ }, _callee59, this);
4897
4833
  }));
4898
- return function (_x59) {
4899
- return _ref111.apply(this, arguments);
4834
+ return function (_x58) {
4835
+ return _ref109.apply(this, arguments);
4900
4836
  };
4901
4837
  }();
4902
4838
 
@@ -4913,12 +4849,12 @@ exports.Proofs = /*#__PURE__*/function () {
4913
4849
  * @returns {Promise<Format>} - Response containing the CBOR response in the specified format
4914
4850
  */
4915
4851
  exports.QParts = /*#__PURE__*/function () {
4916
- var _ref113 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee61(_ref112) {
4917
- var libraryId, objectId, partHash, _ref112$format, format, path;
4918
- return _regeneratorRuntime.wrap(function _callee61$(_context61) {
4919
- while (1) switch (_context61.prev = _context61.next) {
4852
+ var _ref111 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee60(_ref110) {
4853
+ var libraryId, objectId, partHash, _ref110$format, format, path;
4854
+ return _regeneratorRuntime.wrap(function _callee60$(_context60) {
4855
+ while (1) switch (_context60.prev = _context60.next) {
4920
4856
  case 0:
4921
- libraryId = _ref112.libraryId, objectId = _ref112.objectId, partHash = _ref112.partHash, _ref112$format = _ref112.format, format = _ref112$format === void 0 ? "blob" : _ref112$format;
4857
+ libraryId = _ref110.libraryId, objectId = _ref110.objectId, partHash = _ref110.partHash, _ref110$format = _ref110.format, format = _ref110$format === void 0 ? "blob" : _ref110$format;
4922
4858
  ValidateParameters({
4923
4859
  libraryId: libraryId,
4924
4860
  objectId: objectId,
@@ -4926,32 +4862,32 @@ exports.QParts = /*#__PURE__*/function () {
4926
4862
  });
4927
4863
  ValidatePartHash(partHash);
4928
4864
  path = UrlJoin("qparts", partHash);
4929
- _context61.t0 = this.utils;
4930
- _context61.t1 = format;
4931
- _context61.t2 = this.HttpClient;
4932
- _context61.next = 9;
4865
+ _context60.t0 = this.utils;
4866
+ _context60.t1 = format;
4867
+ _context60.t2 = this.HttpClient;
4868
+ _context60.next = 9;
4933
4869
  return this.authClient.AuthorizationHeader({
4934
4870
  libraryId: libraryId,
4935
4871
  objectId: objectId,
4936
4872
  partHash: partHash
4937
4873
  });
4938
4874
  case 9:
4939
- _context61.t3 = _context61.sent;
4940
- _context61.t4 = path;
4941
- _context61.t5 = {
4942
- headers: _context61.t3,
4875
+ _context60.t3 = _context60.sent;
4876
+ _context60.t4 = path;
4877
+ _context60.t5 = {
4878
+ headers: _context60.t3,
4943
4879
  method: "GET",
4944
- path: _context61.t4
4880
+ path: _context60.t4
4945
4881
  };
4946
- _context61.t6 = _context61.t2.Request.call(_context61.t2, _context61.t5);
4947
- return _context61.abrupt("return", _context61.t0.ResponseToFormat.call(_context61.t0, _context61.t1, _context61.t6));
4882
+ _context60.t6 = _context60.t2.Request.call(_context60.t2, _context60.t5);
4883
+ return _context60.abrupt("return", _context60.t0.ResponseToFormat.call(_context60.t0, _context60.t1, _context60.t6));
4948
4884
  case 14:
4949
4885
  case "end":
4950
- return _context61.stop();
4886
+ return _context60.stop();
4951
4887
  }
4952
- }, _callee61, this);
4888
+ }, _callee60, this);
4953
4889
  }));
4954
- return function (_x60) {
4955
- return _ref113.apply(this, arguments);
4890
+ return function (_x59) {
4891
+ return _ref111.apply(this, arguments);
4956
4892
  };
4957
4893
  }();