@eluvio/elv-client-js 4.0.86 → 4.0.88

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