@bytescale/sdk 3.34.0 → 3.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/dist/browser/cjs/main.js +511 -448
  2. package/dist/browser/esm/main.mjs +513 -449
  3. package/dist/node/cjs/main.js +488 -431
  4. package/dist/node/esm/main.mjs +500 -438
  5. package/dist/types/private/StreamUtils.d.ts +2 -0
  6. package/dist/types/private/UploadManagerBase.d.ts +3 -2
  7. package/dist/types/private/UploadManagerBrowserWorkerBase.d.ts +1 -1
  8. package/dist/types/private/dtos/AuthSwConfigDto.d.ts +1 -1
  9. package/dist/types/private/model/AddCancellationHandler.d.ts +1 -1
  10. package/dist/types/private/model/OnPartProgress.d.ts +1 -1
  11. package/dist/types/private/model/ServiceWorkerConfig.d.ts +1 -1
  12. package/dist/types/private/model/UploadResult.d.ts +7 -0
  13. package/dist/types/private/model/UploadSourceProcessed.d.ts +4 -4
  14. package/dist/types/public/node/UploadManagerNode.d.ts +1 -1
  15. package/dist/types/public/shared/CommonTypes.d.ts +2 -1
  16. package/dist/types/public/shared/UrlBuilderTypes.d.ts +6 -6
  17. package/dist/types/public/shared/generated/apis/CacheApi.d.ts +23 -0
  18. package/dist/types/public/shared/generated/apis/FileApi.d.ts +7 -7
  19. package/dist/types/public/shared/generated/apis/JobApi.d.ts +1 -1
  20. package/dist/types/public/shared/generated/apis/UploadApi.d.ts +2 -2
  21. package/dist/types/public/shared/generated/apis/index.d.ts +1 -0
  22. package/dist/types/public/shared/generated/models/index.d.ts +139 -43
  23. package/dist/types/public/shared/generated/runtime.d.ts +8 -8
  24. package/dist/worker/cjs/main.js +455 -395
  25. package/dist/worker/esm/main.mjs +457 -396
  26. package/package.json +11 -12
@@ -26,29 +26,29 @@ var __lib_exports__ = {};
26
26
 
27
27
  // EXPORTS
28
28
  __lib_require__.d(__lib_exports__, {
29
- "AuthManager": function() { return /* reexport */ AuthManager; },
30
- "BaseAPI": function() { return /* reexport */ BaseAPI; },
31
- "BinaryResult": function() { return /* reexport */ BinaryResult; },
32
- "BytescaleApiClientConfigUtils": function() { return /* reexport */ BytescaleApiClientConfigUtils; },
33
- "BytescaleApiError": function() { return /* reexport */ BytescaleApiError; },
34
- "BytescaleGenericError": function() { return /* reexport */ BytescaleGenericError; },
35
- "CancelledError": function() { return /* reexport */ CancelledError; },
36
- "CommonTypesNoOp": function() { return /* reexport */ CommonTypesNoOp; },
37
- "FileApi": function() { return /* reexport */ FileApi; },
38
- "FolderApi": function() { return /* reexport */ FolderApi; },
39
- "JSONApiResponse": function() { return /* reexport */ JSONApiResponse; },
40
- "JobApi": function() { return /* reexport */ JobApi; },
41
- "UploadApi": function() { return /* reexport */ UploadApi; },
42
- "UploadManager": function() { return /* reexport */ UploadManager; },
43
- "UrlBuilder": function() { return /* reexport */ UrlBuilder; },
44
- "UrlBuilderTypesNoOp": function() { return /* reexport */ UrlBuilderTypesNoOp; },
45
- "VoidApiResponse": function() { return /* reexport */ VoidApiResponse; },
46
- "encodeBytescaleQuerystringKVP": function() { return /* reexport */ encodeBytescaleQuerystringKVP; },
47
- "querystring": function() { return /* reexport */ querystring; }
29
+ AuthManager: function() { return /* reexport */ AuthManager; },
30
+ BaseAPI: function() { return /* reexport */ BaseAPI; },
31
+ BinaryResult: function() { return /* reexport */ BinaryResult; },
32
+ BytescaleApiClientConfigUtils: function() { return /* reexport */ BytescaleApiClientConfigUtils; },
33
+ BytescaleApiError: function() { return /* reexport */ BytescaleApiError; },
34
+ BytescaleGenericError: function() { return /* reexport */ BytescaleGenericError; },
35
+ CacheApi: function() { return /* reexport */ CacheApi; },
36
+ CancelledError: function() { return /* reexport */ CancelledError; },
37
+ CommonTypesNoOp: function() { return /* reexport */ CommonTypesNoOp; },
38
+ FileApi: function() { return /* reexport */ FileApi; },
39
+ FolderApi: function() { return /* reexport */ FolderApi; },
40
+ JSONApiResponse: function() { return /* reexport */ JSONApiResponse; },
41
+ JobApi: function() { return /* reexport */ JobApi; },
42
+ UploadApi: function() { return /* reexport */ UploadApi; },
43
+ UploadManager: function() { return /* reexport */ UploadManager; },
44
+ UrlBuilder: function() { return /* reexport */ UrlBuilder; },
45
+ UrlBuilderTypesNoOp: function() { return /* reexport */ UrlBuilderTypesNoOp; },
46
+ VoidApiResponse: function() { return /* reexport */ VoidApiResponse; },
47
+ encodeBytescaleQuerystringKVP: function() { return /* reexport */ encodeBytescaleQuerystringKVP; },
48
+ querystring: function() { return /* reexport */ querystring; }
48
49
  });
49
50
 
50
51
  ;// CONCATENATED MODULE: ./src/private/FairMutex.ts
51
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
52
52
  function _call(body, then, direct) {
53
53
  if (direct) {
54
54
  return then ? then(body()) : body();
@@ -97,11 +97,12 @@ function _invoke(body, then) {
97
97
  }
98
98
  return then(result);
99
99
  }
100
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
100
101
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
101
102
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
102
103
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
103
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
104
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
104
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
105
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
105
106
  /**
106
107
  * A lightweight fair mutex. (Other libraries contain too many features and we want to keep size down).
107
108
  *
@@ -120,14 +121,14 @@ var FairMutex = /*#__PURE__*/function () {
120
121
  this.locked = false;
121
122
  this.queue = [];
122
123
  }
123
- _createClass(FairMutex, [{
124
+ return _createClass(FairMutex, [{
124
125
  key: "safe",
125
126
  value: function safe(callback) {
126
127
  try {
127
- var _this2 = this;
128
- return _await(_this2.lock(), function () {
128
+ var _this = this;
129
+ return _await(_this.lock(), function () {
129
130
  return _finallyRethrows(callback, function (_wasThrown, _result) {
130
- _this2.unlock();
131
+ _this.unlock();
131
132
  return _rethrow(_wasThrown, _result);
132
133
  });
133
134
  });
@@ -139,10 +140,10 @@ var FairMutex = /*#__PURE__*/function () {
139
140
  key: "lock",
140
141
  value: function lock() {
141
142
  try {
142
- var _exit2 = false;
143
- var _this4 = this;
144
- return _invoke(function () {
145
- if (_this4.locked) {
143
+ var _exit = false;
144
+ var _this2 = this;
145
+ return _await(_invoke(function () {
146
+ if (_this2.locked) {
146
147
  var unlockNext;
147
148
  var lockPromise = new Promise(function (resolve) {
148
149
  unlockNext = resolve;
@@ -150,15 +151,15 @@ var FairMutex = /*#__PURE__*/function () {
150
151
  if (unlockNext === undefined) {
151
152
  throw new Error("unlockNext was undefined");
152
153
  }
153
- _this4.queue.push({
154
+ _this2.queue.push({
154
155
  resolve: unlockNext
155
156
  });
156
157
  return _awaitIgnored(lockPromise);
157
158
  }
158
159
  }, function (_result2) {
159
- if (_exit2) return _result2;
160
- _this4.locked = true;
161
- });
160
+ if (_exit) return _result2;
161
+ _this2.locked = true;
162
+ }));
162
163
  } catch (e) {
163
164
  return Promise.reject(e);
164
165
  }
@@ -177,15 +178,14 @@ var FairMutex = /*#__PURE__*/function () {
177
178
  }
178
179
  }
179
180
  }]);
180
- return FairMutex;
181
181
  }();
182
182
  ;// CONCATENATED MODULE: ./src/private/AuthSessionState.ts
183
- function AuthSessionState_typeof(obj) { "@babel/helpers - typeof"; return AuthSessionState_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, AuthSessionState_typeof(obj); }
183
+ function AuthSessionState_typeof(o) { "@babel/helpers - typeof"; return AuthSessionState_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, AuthSessionState_typeof(o); }
184
184
  function AuthSessionState_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
185
185
  function AuthSessionState_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, AuthSessionState_toPropertyKey(descriptor.key), descriptor); } }
186
186
  function AuthSessionState_createClass(Constructor, protoProps, staticProps) { if (protoProps) AuthSessionState_defineProperties(Constructor.prototype, protoProps); if (staticProps) AuthSessionState_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
187
- function AuthSessionState_toPropertyKey(arg) { var key = AuthSessionState_toPrimitive(arg, "string"); return AuthSessionState_typeof(key) === "symbol" ? key : String(key); }
188
- function AuthSessionState_toPrimitive(input, hint) { if (AuthSessionState_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (AuthSessionState_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
187
+ function AuthSessionState_toPropertyKey(t) { var i = AuthSessionState_toPrimitive(t, "string"); return "symbol" == AuthSessionState_typeof(i) ? i : i + ""; }
188
+ function AuthSessionState_toPrimitive(t, r) { if ("object" != AuthSessionState_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != AuthSessionState_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
189
189
 
190
190
  /**
191
191
  * Maintains a global session state, even across package versions.
@@ -203,7 +203,7 @@ var AuthSessionState = /*#__PURE__*/function () {
203
203
  function AuthSessionState() {
204
204
  AuthSessionState_classCallCheck(this, AuthSessionState);
205
205
  }
206
- AuthSessionState_createClass(AuthSessionState, null, [{
206
+ return AuthSessionState_createClass(AuthSessionState, null, [{
207
207
  key: "getMutex",
208
208
  value:
209
209
  /**
@@ -238,22 +238,21 @@ var AuthSessionState = /*#__PURE__*/function () {
238
238
  return window[AuthSessionState.stateKey];
239
239
  }
240
240
  }]);
241
- return AuthSessionState;
242
241
  }();
243
242
  AuthSessionState.stateKey = "BytescaleSessionState";
244
243
  AuthSessionState.mutexKey = "BytescaleSessionStateMutex";
245
244
  ;// CONCATENATED MODULE: ./src/private/ConsoleUtils.ts
246
- function ConsoleUtils_typeof(obj) { "@babel/helpers - typeof"; return ConsoleUtils_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, ConsoleUtils_typeof(obj); }
245
+ function ConsoleUtils_typeof(o) { "@babel/helpers - typeof"; return ConsoleUtils_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, ConsoleUtils_typeof(o); }
247
246
  function ConsoleUtils_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
248
247
  function ConsoleUtils_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, ConsoleUtils_toPropertyKey(descriptor.key), descriptor); } }
249
248
  function ConsoleUtils_createClass(Constructor, protoProps, staticProps) { if (protoProps) ConsoleUtils_defineProperties(Constructor.prototype, protoProps); if (staticProps) ConsoleUtils_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
250
- function ConsoleUtils_toPropertyKey(arg) { var key = ConsoleUtils_toPrimitive(arg, "string"); return ConsoleUtils_typeof(key) === "symbol" ? key : String(key); }
251
- function ConsoleUtils_toPrimitive(input, hint) { if (ConsoleUtils_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (ConsoleUtils_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
249
+ function ConsoleUtils_toPropertyKey(t) { var i = ConsoleUtils_toPrimitive(t, "string"); return "symbol" == ConsoleUtils_typeof(i) ? i : i + ""; }
250
+ function ConsoleUtils_toPrimitive(t, r) { if ("object" != ConsoleUtils_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != ConsoleUtils_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
252
251
  var ConsoleUtils = /*#__PURE__*/function () {
253
252
  function ConsoleUtils() {
254
253
  ConsoleUtils_classCallCheck(this, ConsoleUtils);
255
254
  }
256
- ConsoleUtils_createClass(ConsoleUtils, null, [{
255
+ return ConsoleUtils_createClass(ConsoleUtils, null, [{
257
256
  key: "debug",
258
257
  value: function debug(message) {
259
258
  console.log(ConsoleUtils.prefix(message));
@@ -274,26 +273,17 @@ var ConsoleUtils = /*#__PURE__*/function () {
274
273
  return "[bytescale-sdk] ".concat(message);
275
274
  }
276
275
  }]);
277
- return ConsoleUtils;
278
276
  }();
279
277
  ;// CONCATENATED MODULE: ./src/public/shared/generated/runtime.ts
280
- function runtime_typeof(obj) { "@babel/helpers - typeof"; return runtime_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, runtime_typeof(obj); }
281
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
282
- function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
283
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
284
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
285
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
286
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
287
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
288
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
289
- function _possibleConstructorReturn(self, call) { if (call && (runtime_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
290
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
291
- function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }
292
- function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct.bind(); } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }
293
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
294
- function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; }
295
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
296
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
278
+ function runtime_await(value, then, direct) {
279
+ if (direct) {
280
+ return then ? then(value) : value;
281
+ }
282
+ if (!value || !value.then) {
283
+ value = Promise.resolve(value);
284
+ }
285
+ return then ? value.then(then) : value;
286
+ }
297
287
  function _catch(body, recover) {
298
288
  try {
299
289
  var result = body();
@@ -316,28 +306,36 @@ function runtime_invoke(body, then) {
316
306
  }
317
307
  return then(result);
318
308
  }
309
+ function runtime_typeof(o) { "@babel/helpers - typeof"; return runtime_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, runtime_typeof(o); }
310
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
311
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
312
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
313
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
314
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
315
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
316
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
317
+ function _possibleConstructorReturn(self, call) { if (call && (runtime_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
318
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
319
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
320
+ function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }
321
+ function _construct(t, e, r) { if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments); var o = [null]; o.push.apply(o, e); var p = new (t.bind.apply(t, o))(); return r && _setPrototypeOf(p, r.prototype), p; }
322
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
323
+ function _isNativeFunction(fn) { try { return Function.toString.call(fn).indexOf("[native code]") !== -1; } catch (e) { return typeof fn === "function"; } }
324
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
325
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
319
326
  function _defineProperty(obj, key, value) { key = runtime_toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
320
- function runtime_await(value, then, direct) {
321
- if (direct) {
322
- return then ? then(value) : value;
323
- }
324
- if (!value || !value.then) {
325
- value = Promise.resolve(value);
326
- }
327
- return then ? value.then(then) : value;
328
- }
329
327
  function runtime_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
330
328
  function runtime_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, runtime_toPropertyKey(descriptor.key), descriptor); } }
331
329
  function runtime_createClass(Constructor, protoProps, staticProps) { if (protoProps) runtime_defineProperties(Constructor.prototype, protoProps); if (staticProps) runtime_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
332
- function runtime_toPropertyKey(arg) { var key = runtime_toPrimitive(arg, "string"); return runtime_typeof(key) === "symbol" ? key : String(key); }
333
- function runtime_toPrimitive(input, hint) { if (runtime_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (runtime_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
330
+ function runtime_toPropertyKey(t) { var i = runtime_toPrimitive(t, "string"); return "symbol" == runtime_typeof(i) ? i : i + ""; }
331
+ function runtime_toPrimitive(t, r) { if ("object" != runtime_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != runtime_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
334
332
 
335
333
 
336
334
  var BytescaleApiClientConfigUtils = /*#__PURE__*/function () {
337
335
  function BytescaleApiClientConfigUtils() {
338
336
  runtime_classCallCheck(this, BytescaleApiClientConfigUtils);
339
337
  }
340
- runtime_createClass(BytescaleApiClientConfigUtils, null, [{
338
+ return runtime_createClass(BytescaleApiClientConfigUtils, null, [{
341
339
  key: "getApiUrl",
342
340
  value: function getApiUrl(config) {
343
341
  var _a;
@@ -390,7 +388,6 @@ var BytescaleApiClientConfigUtils = /*#__PURE__*/function () {
390
388
  BytescaleApiClientConfigUtils.getAccountId(config);
391
389
  }
392
390
  }]);
393
- return BytescaleApiClientConfigUtils;
394
391
  }();
395
392
  BytescaleApiClientConfigUtils.defaultApiUrl = "https://api.bytescale.com";
396
393
  BytescaleApiClientConfigUtils.defaultCdnUrl = "https://upcdn.io";
@@ -409,13 +406,13 @@ var BaseAPI = /*#__PURE__*/function () {
409
406
  /**
410
407
  * Returns a successful response (2**) else throws an error.
411
408
  */
412
- runtime_createClass(BaseAPI, [{
409
+ return runtime_createClass(BaseAPI, [{
413
410
  key: "request",
414
411
  value: function request(context, initOverrides, baseUrlOverride) {
415
412
  try {
416
- var _this2 = this;
413
+ var _this = this;
417
414
  var _a;
418
- var apiKey = _this2.config.apiKey;
415
+ var apiKey = _this.config.apiKey;
419
416
  context.headers["Authorization"] = "Bearer ".concat(apiKey); // authorization-header authentication
420
417
  var session = AuthSessionState.getSession();
421
418
  if ((session === null || session === void 0 ? void 0 : session.accessToken) !== undefined) {
@@ -423,11 +420,11 @@ var BaseAPI = /*#__PURE__*/function () {
423
420
  }
424
421
  // Key: any possible value for 'baseUrlOverride'
425
422
  // Value: user-overridden value for that base URL from the config.
426
- var nonDefaultBasePaths = _defineProperty({}, BytescaleApiClientConfigUtils.defaultCdnUrl, BytescaleApiClientConfigUtils.getCdnUrl(_this2.config));
427
- return runtime_await(_this2.createFetchParams(context, initOverrides, baseUrlOverride === undefined ? undefined : (_a = nonDefaultBasePaths[baseUrlOverride]) !== null && _a !== void 0 ? _a : baseUrlOverride), function (_ref) {
423
+ var nonDefaultBasePaths = _defineProperty({}, BytescaleApiClientConfigUtils.defaultCdnUrl, BytescaleApiClientConfigUtils.getCdnUrl(_this.config));
424
+ return runtime_await(_this.createFetchParams(context, initOverrides, baseUrlOverride === undefined ? undefined : (_a = nonDefaultBasePaths[baseUrlOverride]) !== null && _a !== void 0 ? _a : baseUrlOverride), function (_ref) {
428
425
  var url = _ref.url,
429
426
  init = _ref.init;
430
- return BaseAPI.fetch(url, init, Object.assign(Object.assign({}, _this2.config), {
427
+ return BaseAPI.fetch(url, init, Object.assign(Object.assign({}, _this.config), {
431
428
  isBytescaleApi: true
432
429
  }));
433
430
  });
@@ -452,18 +449,18 @@ var BaseAPI = /*#__PURE__*/function () {
452
449
  key: "createFetchParams",
453
450
  value: function createFetchParams(context, initOverrides, baseUrlOverride) {
454
451
  try {
455
- var _this4 = this;
456
- var url = (baseUrlOverride !== null && baseUrlOverride !== void 0 ? baseUrlOverride : BytescaleApiClientConfigUtils.getApiUrl(_this4.config)) + context.path;
452
+ var _this2 = this;
453
+ var url = (baseUrlOverride !== null && baseUrlOverride !== void 0 ? baseUrlOverride : BytescaleApiClientConfigUtils.getApiUrl(_this2.config)) + context.path;
457
454
  if (context.query !== undefined && Object.keys(context.query).length !== 0) {
458
455
  // only add the querystring to the URL if there are query parameters.
459
456
  // this is done to avoid urls ending with a "?" character which buggy webservers
460
457
  // do not handle correctly sometimes.
461
458
  url += "?" + querystring(context.query);
462
459
  }
463
- var configHeaders = _this4.config.headers;
464
- var _Object$assign3 = Object.assign({}, context.headers);
465
- return runtime_await(configHeaders === undefined ? {} : typeof configHeaders === "function" ? configHeaders() : configHeaders, function (_configHeaders) {
466
- var headers = Object.assign(_Object$assign3, configHeaders === undefined ? _configHeaders : _configHeaders);
460
+ var configHeaders = _this2.config.headers;
461
+ var _Object$assign = Object.assign({}, context.headers);
462
+ return runtime_await(runtime_await(configHeaders === undefined ? {} : typeof configHeaders === "function" ? configHeaders() : configHeaders, function (_configHeaders) {
463
+ var headers = Object.assign(_Object$assign, configHeaders === undefined ? _configHeaders : _configHeaders);
467
464
  Object.keys(headers).forEach(function (key) {
468
465
  return headers[key] === undefined ? delete headers[key] : {};
469
466
  });
@@ -489,7 +486,7 @@ var BaseAPI = /*#__PURE__*/function () {
489
486
  init: init
490
487
  };
491
488
  });
492
- }, configHeaders === undefined || !(typeof configHeaders === "function"));
489
+ }, configHeaders === undefined || !(typeof configHeaders === "function")));
493
490
  } catch (e) {
494
491
  return Promise.reject(e);
495
492
  }
@@ -498,10 +495,10 @@ var BaseAPI = /*#__PURE__*/function () {
498
495
  key: "fetch",
499
496
  value: function fetch(url, init, config) {
500
497
  try {
501
- var _exit3 = false;
498
+ var _exit = false;
502
499
  var _a, _b;
503
500
  var response;
504
- return _continue(_catch(function () {
501
+ return runtime_await(_continue(_catch(function () {
505
502
  return runtime_await(BytescaleApiClientConfigUtils.getFetchApi(config)(url, Object.assign(Object.assign({}, init), {
506
503
  // This is specifically added to cater for Next.js's Fetch implementation, which caches POST requests...
507
504
  //
@@ -520,7 +517,7 @@ var BaseAPI = /*#__PURE__*/function () {
520
517
  throw new Error(config.isBytescaleApi ? "Unable to resolve the Bytescale API: ".concat(e.message, " If the problem persists, and your network connection is OK, then please contact support@bytescale.com and provide: (a) time of failed request in UTC (b) screenshot of failed network response header + body (c) screenshot of failed network request header + body (d) browser and OS version.") : "Unable to resolve URL (".concat(url, "): ").concat(e.message));
521
518
  }), function (_result) {
522
519
  var _exit2 = false;
523
- if (_exit3) return _result;
520
+ if (_exit) return _result;
524
521
  return response.status >= 200 && response.status < 300 ? response : runtime_invoke(function () {
525
522
  if (config.isBytescaleApi) {
526
523
  var errorText = undefined;
@@ -554,59 +551,55 @@ var BaseAPI = /*#__PURE__*/function () {
554
551
  if (_exit2) return _result2;
555
552
  throw new Error("Failure status code (".concat(response.status, ") received for request: ").concat((_b = init.method) !== null && _b !== void 0 ? _b : "GET", " ").concat(url));
556
553
  });
557
- });
554
+ }));
558
555
  } catch (e) {
559
556
  return Promise.reject(e);
560
557
  }
561
558
  }
562
559
  }]);
563
- return BaseAPI;
564
560
  }();
565
561
  var CancelledError = /*#__PURE__*/function (_Error) {
566
- _inherits(CancelledError, _Error);
567
- var _super = _createSuper(CancelledError);
568
562
  function CancelledError() {
569
- var _this5;
563
+ var _this3;
570
564
  runtime_classCallCheck(this, CancelledError);
571
- _this5 = _super.call(this, "Operation cancelled by caller.");
572
- _this5.name = "CancelledError";
573
- return _this5;
565
+ _this3 = _callSuper(this, CancelledError, ["Operation cancelled by caller."]);
566
+ _this3.name = "CancelledError";
567
+ return _this3;
574
568
  }
569
+ _inherits(CancelledError, _Error);
575
570
  return runtime_createClass(CancelledError);
576
571
  }( /*#__PURE__*/_wrapNativeSuper(Error));
577
572
  /**
578
573
  * Thrown when the Bytescale API cannot be reached or when an error is returned that cannot be parsed as a JSON error response.
579
574
  */
580
575
  var BytescaleGenericError = /*#__PURE__*/function (_Error2) {
581
- _inherits(BytescaleGenericError, _Error2);
582
- var _super2 = _createSuper(BytescaleGenericError);
583
576
  function BytescaleGenericError(response, responseText, responseJson) {
584
- var _this6;
577
+ var _this4;
585
578
  runtime_classCallCheck(this, BytescaleGenericError);
586
- _this6 = _super2.call(this, "Unable to connect to the Bytescale API (".concat(response.status, "): please try again."));
587
- _this6.response = response;
588
- _this6.responseText = responseText;
589
- _this6.responseJson = responseJson;
590
- _this6.name = "BytescaleGenericError";
591
- return _this6;
579
+ _this4 = _callSuper(this, BytescaleGenericError, ["Unable to connect to the Bytescale API (".concat(response.status, "): please try again.")]);
580
+ _this4.response = response;
581
+ _this4.responseText = responseText;
582
+ _this4.responseJson = responseJson;
583
+ _this4.name = "BytescaleGenericError";
584
+ return _this4;
592
585
  }
586
+ _inherits(BytescaleGenericError, _Error2);
593
587
  return runtime_createClass(BytescaleGenericError);
594
588
  }( /*#__PURE__*/_wrapNativeSuper(Error));
595
589
  /**
596
590
  * Thrown when the Bytescale API returns a JSON error response.
597
591
  */
598
592
  var BytescaleApiError = /*#__PURE__*/function (_Error3) {
599
- _inherits(BytescaleApiError, _Error3);
600
- var _super3 = _createSuper(BytescaleApiError);
601
593
  function BytescaleApiError(response) {
602
- var _this7;
594
+ var _this5;
603
595
  runtime_classCallCheck(this, BytescaleApiError);
604
- _this7 = _super3.call(this, response.error.message);
605
- _this7.name = "BytescaleApiError";
606
- _this7.errorCode = response.error.code;
607
- _this7.details = response.error.details;
608
- return _this7;
596
+ _this5 = _callSuper(this, BytescaleApiError, [response.error.message]);
597
+ _this5.name = "BytescaleApiError";
598
+ _this5.errorCode = response.error.code;
599
+ _this5.details = response.error.details;
600
+ return _this5;
609
601
  }
602
+ _inherits(BytescaleApiError, _Error3);
610
603
  return runtime_createClass(BytescaleApiError);
611
604
  }( /*#__PURE__*/_wrapNativeSuper(Error));
612
605
  function moveElementToEnd(array, element) {
@@ -655,38 +648,36 @@ var JSONApiResponse = /*#__PURE__*/function () {
655
648
  runtime_classCallCheck(this, JSONApiResponse);
656
649
  this.raw = raw;
657
650
  }
658
- runtime_createClass(JSONApiResponse, [{
651
+ return runtime_createClass(JSONApiResponse, [{
659
652
  key: "value",
660
653
  value: function value() {
661
654
  try {
662
- var _this9 = this;
663
- return runtime_await(_this9.raw.json());
655
+ var _this6 = this;
656
+ return runtime_await(_this6.raw.json());
664
657
  } catch (e) {
665
658
  return Promise.reject(e);
666
659
  }
667
660
  }
668
661
  }]);
669
- return JSONApiResponse;
670
662
  }();
671
663
  var VoidApiResponse = /*#__PURE__*/function () {
672
664
  function VoidApiResponse(raw) {
673
665
  runtime_classCallCheck(this, VoidApiResponse);
674
666
  this.raw = raw;
675
667
  }
676
- runtime_createClass(VoidApiResponse, [{
668
+ return runtime_createClass(VoidApiResponse, [{
677
669
  key: "value",
678
670
  value: function value() {
679
671
  return runtime_await(undefined);
680
672
  }
681
673
  }]);
682
- return VoidApiResponse;
683
674
  }();
684
675
  var BinaryResult = /*#__PURE__*/function () {
685
676
  function BinaryResult(raw) {
686
677
  runtime_classCallCheck(this, BinaryResult);
687
678
  this.raw = raw;
688
679
  }
689
- runtime_createClass(BinaryResult, [{
680
+ return runtime_createClass(BinaryResult, [{
690
681
  key: "stream",
691
682
  value: function stream() {
692
683
  if (this.raw.bodyUsed) {
@@ -701,8 +692,8 @@ var BinaryResult = /*#__PURE__*/function () {
701
692
  key: "text",
702
693
  value: function text() {
703
694
  try {
704
- var _this11 = this;
705
- return runtime_await(_this11.raw.text());
695
+ var _this7 = this;
696
+ return runtime_await(_this7.raw.text());
706
697
  } catch (e) {
707
698
  return Promise.reject(e);
708
699
  }
@@ -711,8 +702,8 @@ var BinaryResult = /*#__PURE__*/function () {
711
702
  key: "blob",
712
703
  value: function blob() {
713
704
  try {
714
- var _this13 = this;
715
- return runtime_await(_this13.raw.blob());
705
+ var _this8 = this;
706
+ return runtime_await(_this8.raw.blob());
716
707
  } catch (e) {
717
708
  return Promise.reject(e);
718
709
  }
@@ -721,17 +712,89 @@ var BinaryResult = /*#__PURE__*/function () {
721
712
  key: "json",
722
713
  value: function json() {
723
714
  try {
724
- var _this15 = this;
725
- return runtime_await(_this15.raw.json());
715
+ var _this9 = this;
716
+ return runtime_await(_this9.raw.json());
726
717
  } catch (e) {
727
718
  return Promise.reject(e);
728
719
  }
729
720
  }
730
721
  }]);
731
- return BinaryResult;
732
722
  }();
723
+ ;// CONCATENATED MODULE: ./src/public/shared/generated/apis/CacheApi.ts
724
+ function CacheApi_typeof(o) { "@babel/helpers - typeof"; return CacheApi_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, CacheApi_typeof(o); }
725
+ function CacheApi_await(value, then, direct) {
726
+ if (direct) {
727
+ return then ? then(value) : value;
728
+ }
729
+ if (!value || !value.then) {
730
+ value = Promise.resolve(value);
731
+ }
732
+ return then ? value.then(then) : value;
733
+ }
734
+ function CacheApi_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
735
+ function CacheApi_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, CacheApi_toPropertyKey(descriptor.key), descriptor); } }
736
+ function CacheApi_createClass(Constructor, protoProps, staticProps) { if (protoProps) CacheApi_defineProperties(Constructor.prototype, protoProps); if (staticProps) CacheApi_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
737
+ function CacheApi_toPropertyKey(t) { var i = CacheApi_toPrimitive(t, "string"); return "symbol" == CacheApi_typeof(i) ? i : i + ""; }
738
+ function CacheApi_toPrimitive(t, r) { if ("object" != CacheApi_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != CacheApi_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
739
+ function CacheApi_callSuper(t, o, e) { return o = CacheApi_getPrototypeOf(o), CacheApi_possibleConstructorReturn(t, CacheApi_isNativeReflectConstruct() ? Reflect.construct(o, e || [], CacheApi_getPrototypeOf(t).constructor) : o.apply(t, e)); }
740
+ function CacheApi_possibleConstructorReturn(self, call) { if (call && (CacheApi_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return CacheApi_assertThisInitialized(self); }
741
+ function CacheApi_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
742
+ function CacheApi_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (CacheApi_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
743
+ function CacheApi_getPrototypeOf(o) { CacheApi_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return CacheApi_getPrototypeOf(o); }
744
+ function CacheApi_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) CacheApi_setPrototypeOf(subClass, superClass); }
745
+ function CacheApi_setPrototypeOf(o, p) { CacheApi_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return CacheApi_setPrototypeOf(o, p); }
746
+ /* tslint:disable */
747
+ /* eslint-disable */
748
+ /**
749
+ * @bytescale/api
750
+ * Bytescale API
751
+ *
752
+ * The version of the OpenAPI document: 2.0.0
753
+ * Contact: hello@bytescale.com
754
+ *
755
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
756
+ * https://openapi-generator.tech
757
+ * Do not edit the class manually.
758
+ */
759
+ // @ts-ignore
760
+
761
+ var CacheApi = /*#__PURE__*/function (_runtime$BaseAPI) {
762
+ function CacheApi() {
763
+ CacheApi_classCallCheck(this, CacheApi);
764
+ return CacheApi_callSuper(this, CacheApi, arguments);
765
+ }
766
+ CacheApi_inherits(CacheApi, _runtime$BaseAPI);
767
+ return CacheApi_createClass(CacheApi, [{
768
+ key: "resetCache",
769
+ value:
770
+ /**
771
+ * Resets the Bytescale CDN cache for a specific path, path prefix, or for your entire account. You can choose to reset the edge cache, or permanent cache, or both caches. *Warning:* Resetting the permanent cache (by setting ```resetPermanentCache: true```) may lead to a significant increase in processing time if numerous file transformations need to be re-performed upon their next request. *Recommended:* Prevent cache resets by adding a ```?v=<etag>``` querystring parameter to your URLs. This ensures your URLs change when your files change, eliminating the need for cache resets. The `etag` field is returned by GetFileDetails and all upload operations. *Example patterns:* - ```\"/_*\"``` - ```\"/raw/example.jpg\"``` - ```\"/image/example.jpg\"``` - ```\"/image/customers/abc/_*\"``` You may only use ```*``` at the end of the pattern. You must not include your account ID prefix in the pattern.
772
+ */
773
+ function resetCache(params) {
774
+ try {
775
+ var _this = this;
776
+ var query = {};
777
+ var headers = {};
778
+ headers["Content-Type"] = "application/json";
779
+ return CacheApi_await(_this.request({
780
+ path: "/v2/accounts/{accountId}/cache/reset".replace("{".concat("accountId", "}"),
781
+ // @ts-ignore
782
+ _this.encodeParam("accountId", params.accountId)),
783
+ method: "POST",
784
+ headers: headers,
785
+ query: query,
786
+ body: params.resetCacheRequest
787
+ }, undefined, [][0]), function (response) {
788
+ return CacheApi_await(new JSONApiResponse(response).value());
789
+ });
790
+ } catch (e) {
791
+ return Promise.reject(e);
792
+ }
793
+ }
794
+ }]);
795
+ }(BaseAPI);
733
796
  ;// CONCATENATED MODULE: ./src/public/shared/generated/apis/FileApi.ts
734
- function FileApi_typeof(obj) { "@babel/helpers - typeof"; return FileApi_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, FileApi_typeof(obj); }
797
+ function FileApi_typeof(o) { "@babel/helpers - typeof"; return FileApi_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, FileApi_typeof(o); }
735
798
  function FileApi_await(value, then, direct) {
736
799
  if (direct) {
737
800
  return then ? then(value) : value;
@@ -744,15 +807,15 @@ function FileApi_await(value, then, direct) {
744
807
  function FileApi_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
745
808
  function FileApi_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, FileApi_toPropertyKey(descriptor.key), descriptor); } }
746
809
  function FileApi_createClass(Constructor, protoProps, staticProps) { if (protoProps) FileApi_defineProperties(Constructor.prototype, protoProps); if (staticProps) FileApi_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
747
- function FileApi_toPropertyKey(arg) { var key = FileApi_toPrimitive(arg, "string"); return FileApi_typeof(key) === "symbol" ? key : String(key); }
748
- function FileApi_toPrimitive(input, hint) { if (FileApi_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (FileApi_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
749
- function FileApi_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) FileApi_setPrototypeOf(subClass, superClass); }
750
- function FileApi_setPrototypeOf(o, p) { FileApi_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return FileApi_setPrototypeOf(o, p); }
751
- function FileApi_createSuper(Derived) { var hasNativeReflectConstruct = FileApi_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = FileApi_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = FileApi_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return FileApi_possibleConstructorReturn(this, result); }; }
810
+ function FileApi_toPropertyKey(t) { var i = FileApi_toPrimitive(t, "string"); return "symbol" == FileApi_typeof(i) ? i : i + ""; }
811
+ function FileApi_toPrimitive(t, r) { if ("object" != FileApi_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != FileApi_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
812
+ function FileApi_callSuper(t, o, e) { return o = FileApi_getPrototypeOf(o), FileApi_possibleConstructorReturn(t, FileApi_isNativeReflectConstruct() ? Reflect.construct(o, e || [], FileApi_getPrototypeOf(t).constructor) : o.apply(t, e)); }
752
813
  function FileApi_possibleConstructorReturn(self, call) { if (call && (FileApi_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return FileApi_assertThisInitialized(self); }
753
814
  function FileApi_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
754
- function FileApi_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
815
+ function FileApi_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (FileApi_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
755
816
  function FileApi_getPrototypeOf(o) { FileApi_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return FileApi_getPrototypeOf(o); }
817
+ function FileApi_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) FileApi_setPrototypeOf(subClass, superClass); }
818
+ function FileApi_setPrototypeOf(o, p) { FileApi_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return FileApi_setPrototypeOf(o, p); }
756
819
  /* tslint:disable */
757
820
  /* eslint-disable */
758
821
  /**
@@ -769,13 +832,12 @@ function FileApi_getPrototypeOf(o) { FileApi_getPrototypeOf = Object.setPrototyp
769
832
  // @ts-ignore
770
833
 
771
834
  var FileApi = /*#__PURE__*/function (_runtime$BaseAPI) {
772
- FileApi_inherits(FileApi, _runtime$BaseAPI);
773
- var _super = FileApi_createSuper(FileApi);
774
835
  function FileApi() {
775
836
  FileApi_classCallCheck(this, FileApi);
776
- return _super.apply(this, arguments);
837
+ return FileApi_callSuper(this, FileApi, arguments);
777
838
  }
778
- FileApi_createClass(FileApi, [{
839
+ FileApi_inherits(FileApi, _runtime$BaseAPI);
840
+ return FileApi_createClass(FileApi, [{
779
841
  key: "copyFile",
780
842
  value:
781
843
  /**
@@ -783,14 +845,14 @@ var FileApi = /*#__PURE__*/function (_runtime$BaseAPI) {
783
845
  */
784
846
  function copyFile(params) {
785
847
  try {
786
- var _this2 = this;
848
+ var _this = this;
787
849
  var query = {};
788
850
  var headers = {};
789
851
  headers["Content-Type"] = "application/json";
790
- return FileApi_await(_this2.request({
852
+ return FileApi_await(_this.request({
791
853
  path: "/v2/accounts/{accountId}/files/copy".replace("{".concat("accountId", "}"),
792
854
  // @ts-ignore
793
- _this2.encodeParam("accountId", params.accountId)),
855
+ _this.encodeParam("accountId", params.accountId)),
794
856
  method: "POST",
795
857
  headers: headers,
796
858
  query: query,
@@ -809,14 +871,14 @@ var FileApi = /*#__PURE__*/function (_runtime$BaseAPI) {
809
871
  key: "copyFileBatch",
810
872
  value: function copyFileBatch(params) {
811
873
  try {
812
- var _this4 = this;
874
+ var _this2 = this;
813
875
  var query = {};
814
876
  var headers = {};
815
877
  headers["Content-Type"] = "application/json";
816
- return FileApi_await(_this4.request({
878
+ return FileApi_await(_this2.request({
817
879
  path: "/v2/accounts/{accountId}/files/copy/batch".replace("{".concat("accountId", "}"),
818
880
  // @ts-ignore
819
- _this4.encodeParam("accountId", params.accountId)),
881
+ _this2.encodeParam("accountId", params.accountId)),
820
882
  method: "POST",
821
883
  headers: headers,
822
884
  query: query,
@@ -835,16 +897,16 @@ var FileApi = /*#__PURE__*/function (_runtime$BaseAPI) {
835
897
  key: "deleteFile",
836
898
  value: function deleteFile(params) {
837
899
  try {
838
- var _this6 = this;
900
+ var _this3 = this;
839
901
  var query = {};
840
902
  if (params.filePath !== undefined) {
841
903
  query["filePath"] = params.filePath;
842
904
  }
843
905
  var headers = {};
844
- return FileApi_await(_this6.request({
906
+ return FileApi_await(_this3.request({
845
907
  path: "/v2/accounts/{accountId}/files".replace("{".concat("accountId", "}"),
846
908
  // @ts-ignore
847
- _this6.encodeParam("accountId", params.accountId)),
909
+ _this3.encodeParam("accountId", params.accountId)),
848
910
  method: "DELETE",
849
911
  headers: headers,
850
912
  query: query
@@ -862,14 +924,14 @@ var FileApi = /*#__PURE__*/function (_runtime$BaseAPI) {
862
924
  key: "deleteFileBatch",
863
925
  value: function deleteFileBatch(params) {
864
926
  try {
865
- var _this8 = this;
927
+ var _this4 = this;
866
928
  var query = {};
867
929
  var headers = {};
868
930
  headers["Content-Type"] = "application/json";
869
- return FileApi_await(_this8.request({
931
+ return FileApi_await(_this4.request({
870
932
  path: "/v2/accounts/{accountId}/files/batch".replace("{".concat("accountId", "}"),
871
933
  // @ts-ignore
872
- _this8.encodeParam("accountId", params.accountId)),
934
+ _this4.encodeParam("accountId", params.accountId)),
873
935
  method: "DELETE",
874
936
  headers: headers,
875
937
  query: query,
@@ -888,10 +950,10 @@ var FileApi = /*#__PURE__*/function (_runtime$BaseAPI) {
888
950
  key: "downloadFile",
889
951
  value: function downloadFile(params) {
890
952
  try {
891
- var _this10 = this;
953
+ var _this5 = this;
892
954
  var query = {};
893
955
  if (params.cache !== undefined) {
894
- query["cache"] = params.cache;
956
+ query["Cache"] = params.cache;
895
957
  }
896
958
  if (params.cacheTtl !== undefined) {
897
959
  query["cache_ttl"] = params.cacheTtl;
@@ -900,12 +962,12 @@ var FileApi = /*#__PURE__*/function (_runtime$BaseAPI) {
900
962
  query["version"] = params.version;
901
963
  }
902
964
  var headers = {};
903
- return FileApi_await(_this10.request({
965
+ return FileApi_await(_this5.request({
904
966
  path: "/{accountId}/raw{filePath}".replace("{".concat("accountId", "}"),
905
967
  // @ts-ignore
906
- _this10.encodeParam("accountId", params.accountId)).replace("{".concat("filePath", "}"),
968
+ _this5.encodeParam("accountId", params.accountId)).replace("{".concat("filePath", "}"),
907
969
  // @ts-ignore
908
- _this10.encodeParam("filePath", params.filePath)),
970
+ _this5.encodeParam("filePath", params.filePath)),
909
971
  method: "GET",
910
972
  headers: headers,
911
973
  query: query
@@ -923,16 +985,16 @@ var FileApi = /*#__PURE__*/function (_runtime$BaseAPI) {
923
985
  key: "getFileDetails",
924
986
  value: function getFileDetails(params) {
925
987
  try {
926
- var _this12 = this;
988
+ var _this6 = this;
927
989
  var query = {};
928
990
  if (params.filePath !== undefined) {
929
991
  query["filePath"] = params.filePath;
930
992
  }
931
993
  var headers = {};
932
- return FileApi_await(_this12.request({
994
+ return FileApi_await(_this6.request({
933
995
  path: "/v2/accounts/{accountId}/files/details".replace("{".concat("accountId", "}"),
934
996
  // @ts-ignore
935
- _this12.encodeParam("accountId", params.accountId)),
997
+ _this6.encodeParam("accountId", params.accountId)),
936
998
  method: "GET",
937
999
  headers: headers,
938
1000
  query: query
@@ -950,14 +1012,14 @@ var FileApi = /*#__PURE__*/function (_runtime$BaseAPI) {
950
1012
  key: "processFile",
951
1013
  value: function processFile(params) {
952
1014
  try {
953
- var _this14 = this;
1015
+ var _this7 = this;
954
1016
  var query = {};
1017
+ if (params.cache !== undefined) {
1018
+ query["Cache"] = params.cache;
1019
+ }
955
1020
  if (params.artifact !== undefined) {
956
1021
  query["artifact"] = params.artifact;
957
1022
  }
958
- if (params.cache !== undefined) {
959
- query["cache"] = params.cache;
960
- }
961
1023
  if (params.cacheOnly !== undefined) {
962
1024
  query["cache_only"] = params.cacheOnly;
963
1025
  }
@@ -974,14 +1036,14 @@ var FileApi = /*#__PURE__*/function (_runtime$BaseAPI) {
974
1036
  query["version"] = params.version;
975
1037
  }
976
1038
  var headers = {};
977
- return FileApi_await(_this14.request({
1039
+ return FileApi_await(_this7.request({
978
1040
  path: "/{accountId}/{transformation}{filePath}".replace("{".concat("accountId", "}"),
979
1041
  // @ts-ignore
980
- _this14.encodeParam("accountId", params.accountId)).replace("{".concat("filePath", "}"),
1042
+ _this7.encodeParam("accountId", params.accountId)).replace("{".concat("filePath", "}"),
981
1043
  // @ts-ignore
982
- _this14.encodeParam("filePath", params.filePath)).replace("{".concat("transformation", "}"),
1044
+ _this7.encodeParam("filePath", params.filePath)).replace("{".concat("transformation", "}"),
983
1045
  // @ts-ignore
984
- _this14.encodeParam("transformation", params.transformation)),
1046
+ _this7.encodeParam("transformation", params.transformation)),
985
1047
  method: "GET",
986
1048
  headers: headers,
987
1049
  query: query
@@ -999,21 +1061,21 @@ var FileApi = /*#__PURE__*/function (_runtime$BaseAPI) {
999
1061
  key: "processFileAndSave",
1000
1062
  value: function processFileAndSave(params) {
1001
1063
  try {
1002
- var _this16 = this;
1064
+ var _this8 = this;
1003
1065
  var query = {};
1004
1066
  if (params.transformationParams !== undefined) {
1005
1067
  query["transformationParams"] = params.transformationParams;
1006
1068
  }
1007
1069
  var headers = {};
1008
1070
  headers["Content-Type"] = "application/json";
1009
- return FileApi_await(_this16.request({
1071
+ return FileApi_await(_this8.request({
1010
1072
  path: "/{accountId}/save/{transformation}{filePath}".replace("{".concat("accountId", "}"),
1011
1073
  // @ts-ignore
1012
- _this16.encodeParam("accountId", params.accountId)).replace("{".concat("filePath", "}"),
1074
+ _this8.encodeParam("accountId", params.accountId)).replace("{".concat("filePath", "}"),
1013
1075
  // @ts-ignore
1014
- _this16.encodeParam("filePath", params.filePath)).replace("{".concat("transformation", "}"),
1076
+ _this8.encodeParam("filePath", params.filePath)).replace("{".concat("transformation", "}"),
1015
1077
  // @ts-ignore
1016
- _this16.encodeParam("transformation", params.transformation)),
1078
+ _this8.encodeParam("transformation", params.transformation)),
1017
1079
  method: "POST",
1018
1080
  headers: headers,
1019
1081
  query: query,
@@ -1026,10 +1088,9 @@ var FileApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1026
1088
  }
1027
1089
  }
1028
1090
  }]);
1029
- return FileApi;
1030
1091
  }(BaseAPI);
1031
1092
  ;// CONCATENATED MODULE: ./src/public/shared/generated/apis/FolderApi.ts
1032
- function FolderApi_typeof(obj) { "@babel/helpers - typeof"; return FolderApi_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, FolderApi_typeof(obj); }
1093
+ function FolderApi_typeof(o) { "@babel/helpers - typeof"; return FolderApi_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, FolderApi_typeof(o); }
1033
1094
  function FolderApi_await(value, then, direct) {
1034
1095
  if (direct) {
1035
1096
  return then ? then(value) : value;
@@ -1042,15 +1103,15 @@ function FolderApi_await(value, then, direct) {
1042
1103
  function FolderApi_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1043
1104
  function FolderApi_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, FolderApi_toPropertyKey(descriptor.key), descriptor); } }
1044
1105
  function FolderApi_createClass(Constructor, protoProps, staticProps) { if (protoProps) FolderApi_defineProperties(Constructor.prototype, protoProps); if (staticProps) FolderApi_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
1045
- function FolderApi_toPropertyKey(arg) { var key = FolderApi_toPrimitive(arg, "string"); return FolderApi_typeof(key) === "symbol" ? key : String(key); }
1046
- function FolderApi_toPrimitive(input, hint) { if (FolderApi_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (FolderApi_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
1047
- function FolderApi_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) FolderApi_setPrototypeOf(subClass, superClass); }
1048
- function FolderApi_setPrototypeOf(o, p) { FolderApi_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return FolderApi_setPrototypeOf(o, p); }
1049
- function FolderApi_createSuper(Derived) { var hasNativeReflectConstruct = FolderApi_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = FolderApi_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = FolderApi_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return FolderApi_possibleConstructorReturn(this, result); }; }
1106
+ function FolderApi_toPropertyKey(t) { var i = FolderApi_toPrimitive(t, "string"); return "symbol" == FolderApi_typeof(i) ? i : i + ""; }
1107
+ function FolderApi_toPrimitive(t, r) { if ("object" != FolderApi_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != FolderApi_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
1108
+ function FolderApi_callSuper(t, o, e) { return o = FolderApi_getPrototypeOf(o), FolderApi_possibleConstructorReturn(t, FolderApi_isNativeReflectConstruct() ? Reflect.construct(o, e || [], FolderApi_getPrototypeOf(t).constructor) : o.apply(t, e)); }
1050
1109
  function FolderApi_possibleConstructorReturn(self, call) { if (call && (FolderApi_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return FolderApi_assertThisInitialized(self); }
1051
1110
  function FolderApi_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
1052
- function FolderApi_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
1111
+ function FolderApi_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (FolderApi_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
1053
1112
  function FolderApi_getPrototypeOf(o) { FolderApi_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return FolderApi_getPrototypeOf(o); }
1113
+ function FolderApi_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) FolderApi_setPrototypeOf(subClass, superClass); }
1114
+ function FolderApi_setPrototypeOf(o, p) { FolderApi_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return FolderApi_setPrototypeOf(o, p); }
1054
1115
  /* tslint:disable */
1055
1116
  /* eslint-disable */
1056
1117
  /**
@@ -1067,13 +1128,12 @@ function FolderApi_getPrototypeOf(o) { FolderApi_getPrototypeOf = Object.setProt
1067
1128
  // @ts-ignore
1068
1129
 
1069
1130
  var FolderApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1070
- FolderApi_inherits(FolderApi, _runtime$BaseAPI);
1071
- var _super = FolderApi_createSuper(FolderApi);
1072
1131
  function FolderApi() {
1073
1132
  FolderApi_classCallCheck(this, FolderApi);
1074
- return _super.apply(this, arguments);
1133
+ return FolderApi_callSuper(this, FolderApi, arguments);
1075
1134
  }
1076
- FolderApi_createClass(FolderApi, [{
1135
+ FolderApi_inherits(FolderApi, _runtime$BaseAPI);
1136
+ return FolderApi_createClass(FolderApi, [{
1077
1137
  key: "copyFolder",
1078
1138
  value:
1079
1139
  /**
@@ -1081,14 +1141,14 @@ var FolderApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1081
1141
  */
1082
1142
  function copyFolder(params) {
1083
1143
  try {
1084
- var _this2 = this;
1144
+ var _this = this;
1085
1145
  var query = {};
1086
1146
  var headers = {};
1087
1147
  headers["Content-Type"] = "application/json";
1088
- return FolderApi_await(_this2.request({
1148
+ return FolderApi_await(_this.request({
1089
1149
  path: "/v2/accounts/{accountId}/folders/copy".replace("{".concat("accountId", "}"),
1090
1150
  // @ts-ignore
1091
- _this2.encodeParam("accountId", params.accountId)),
1151
+ _this.encodeParam("accountId", params.accountId)),
1092
1152
  method: "POST",
1093
1153
  headers: headers,
1094
1154
  query: query,
@@ -1107,14 +1167,14 @@ var FolderApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1107
1167
  key: "copyFolderBatch",
1108
1168
  value: function copyFolderBatch(params) {
1109
1169
  try {
1110
- var _this4 = this;
1170
+ var _this2 = this;
1111
1171
  var query = {};
1112
1172
  var headers = {};
1113
1173
  headers["Content-Type"] = "application/json";
1114
- return FolderApi_await(_this4.request({
1174
+ return FolderApi_await(_this2.request({
1115
1175
  path: "/v2/accounts/{accountId}/folders/copy/batch".replace("{".concat("accountId", "}"),
1116
1176
  // @ts-ignore
1117
- _this4.encodeParam("accountId", params.accountId)),
1177
+ _this2.encodeParam("accountId", params.accountId)),
1118
1178
  method: "POST",
1119
1179
  headers: headers,
1120
1180
  query: query,
@@ -1133,14 +1193,14 @@ var FolderApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1133
1193
  key: "deleteFolder",
1134
1194
  value: function deleteFolder(params) {
1135
1195
  try {
1136
- var _this6 = this;
1196
+ var _this3 = this;
1137
1197
  var query = {};
1138
1198
  var headers = {};
1139
1199
  headers["Content-Type"] = "application/json";
1140
- return FolderApi_await(_this6.request({
1200
+ return FolderApi_await(_this3.request({
1141
1201
  path: "/v2/accounts/{accountId}/folders".replace("{".concat("accountId", "}"),
1142
1202
  // @ts-ignore
1143
- _this6.encodeParam("accountId", params.accountId)),
1203
+ _this3.encodeParam("accountId", params.accountId)),
1144
1204
  method: "DELETE",
1145
1205
  headers: headers,
1146
1206
  query: query,
@@ -1159,14 +1219,14 @@ var FolderApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1159
1219
  key: "deleteFolderBatch",
1160
1220
  value: function deleteFolderBatch(params) {
1161
1221
  try {
1162
- var _this8 = this;
1222
+ var _this4 = this;
1163
1223
  var query = {};
1164
1224
  var headers = {};
1165
1225
  headers["Content-Type"] = "application/json";
1166
- return FolderApi_await(_this8.request({
1226
+ return FolderApi_await(_this4.request({
1167
1227
  path: "/v2/accounts/{accountId}/folders/batch".replace("{".concat("accountId", "}"),
1168
1228
  // @ts-ignore
1169
- _this8.encodeParam("accountId", params.accountId)),
1229
+ _this4.encodeParam("accountId", params.accountId)),
1170
1230
  method: "DELETE",
1171
1231
  headers: headers,
1172
1232
  query: query,
@@ -1185,16 +1245,16 @@ var FolderApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1185
1245
  key: "getFolderDetails",
1186
1246
  value: function getFolderDetails(params) {
1187
1247
  try {
1188
- var _this10 = this;
1248
+ var _this5 = this;
1189
1249
  var query = {};
1190
1250
  if (params.folderPath !== undefined) {
1191
1251
  query["folderPath"] = params.folderPath;
1192
1252
  }
1193
1253
  var headers = {};
1194
- return FolderApi_await(_this10.request({
1254
+ return FolderApi_await(_this5.request({
1195
1255
  path: "/v2/accounts/{accountId}/folders".replace("{".concat("accountId", "}"),
1196
1256
  // @ts-ignore
1197
- _this10.encodeParam("accountId", params.accountId)),
1257
+ _this5.encodeParam("accountId", params.accountId)),
1198
1258
  method: "GET",
1199
1259
  headers: headers,
1200
1260
  query: query
@@ -1212,7 +1272,7 @@ var FolderApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1212
1272
  key: "listFolder",
1213
1273
  value: function listFolder(params) {
1214
1274
  try {
1215
- var _this12 = this;
1275
+ var _this6 = this;
1216
1276
  var query = {};
1217
1277
  if (params.cursor !== undefined) {
1218
1278
  query["cursor"] = params.cursor;
@@ -1242,10 +1302,10 @@ var FolderApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1242
1302
  query["recursive"] = params.recursive;
1243
1303
  }
1244
1304
  var headers = {};
1245
- return FolderApi_await(_this12.request({
1305
+ return FolderApi_await(_this6.request({
1246
1306
  path: "/v2/accounts/{accountId}/folders/list".replace("{".concat("accountId", "}"),
1247
1307
  // @ts-ignore
1248
- _this12.encodeParam("accountId", params.accountId)),
1308
+ _this6.encodeParam("accountId", params.accountId)),
1249
1309
  method: "GET",
1250
1310
  headers: headers,
1251
1311
  query: query
@@ -1263,14 +1323,14 @@ var FolderApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1263
1323
  key: "putFolder",
1264
1324
  value: function putFolder(params) {
1265
1325
  try {
1266
- var _this14 = this;
1326
+ var _this7 = this;
1267
1327
  var query = {};
1268
1328
  var headers = {};
1269
1329
  headers["Content-Type"] = "application/json";
1270
- return FolderApi_await(_this14.request({
1330
+ return FolderApi_await(_this7.request({
1271
1331
  path: "/v2/accounts/{accountId}/folders".replace("{".concat("accountId", "}"),
1272
1332
  // @ts-ignore
1273
- _this14.encodeParam("accountId", params.accountId)),
1333
+ _this7.encodeParam("accountId", params.accountId)),
1274
1334
  method: "PUT",
1275
1335
  headers: headers,
1276
1336
  query: query,
@@ -1283,10 +1343,9 @@ var FolderApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1283
1343
  }
1284
1344
  }
1285
1345
  }]);
1286
- return FolderApi;
1287
1346
  }(BaseAPI);
1288
1347
  ;// CONCATENATED MODULE: ./src/public/shared/generated/apis/JobApi.ts
1289
- function JobApi_typeof(obj) { "@babel/helpers - typeof"; return JobApi_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, JobApi_typeof(obj); }
1348
+ function JobApi_typeof(o) { "@babel/helpers - typeof"; return JobApi_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, JobApi_typeof(o); }
1290
1349
  function JobApi_await(value, then, direct) {
1291
1350
  if (direct) {
1292
1351
  return then ? then(value) : value;
@@ -1299,15 +1358,15 @@ function JobApi_await(value, then, direct) {
1299
1358
  function JobApi_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1300
1359
  function JobApi_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, JobApi_toPropertyKey(descriptor.key), descriptor); } }
1301
1360
  function JobApi_createClass(Constructor, protoProps, staticProps) { if (protoProps) JobApi_defineProperties(Constructor.prototype, protoProps); if (staticProps) JobApi_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
1302
- function JobApi_toPropertyKey(arg) { var key = JobApi_toPrimitive(arg, "string"); return JobApi_typeof(key) === "symbol" ? key : String(key); }
1303
- function JobApi_toPrimitive(input, hint) { if (JobApi_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (JobApi_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
1304
- function JobApi_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) JobApi_setPrototypeOf(subClass, superClass); }
1305
- function JobApi_setPrototypeOf(o, p) { JobApi_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return JobApi_setPrototypeOf(o, p); }
1306
- function JobApi_createSuper(Derived) { var hasNativeReflectConstruct = JobApi_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = JobApi_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = JobApi_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return JobApi_possibleConstructorReturn(this, result); }; }
1361
+ function JobApi_toPropertyKey(t) { var i = JobApi_toPrimitive(t, "string"); return "symbol" == JobApi_typeof(i) ? i : i + ""; }
1362
+ function JobApi_toPrimitive(t, r) { if ("object" != JobApi_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != JobApi_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
1363
+ function JobApi_callSuper(t, o, e) { return o = JobApi_getPrototypeOf(o), JobApi_possibleConstructorReturn(t, JobApi_isNativeReflectConstruct() ? Reflect.construct(o, e || [], JobApi_getPrototypeOf(t).constructor) : o.apply(t, e)); }
1307
1364
  function JobApi_possibleConstructorReturn(self, call) { if (call && (JobApi_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return JobApi_assertThisInitialized(self); }
1308
1365
  function JobApi_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
1309
- function JobApi_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
1366
+ function JobApi_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (JobApi_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
1310
1367
  function JobApi_getPrototypeOf(o) { JobApi_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return JobApi_getPrototypeOf(o); }
1368
+ function JobApi_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) JobApi_setPrototypeOf(subClass, superClass); }
1369
+ function JobApi_setPrototypeOf(o, p) { JobApi_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return JobApi_setPrototypeOf(o, p); }
1311
1370
  /* tslint:disable */
1312
1371
  /* eslint-disable */
1313
1372
  /**
@@ -1324,13 +1383,12 @@ function JobApi_getPrototypeOf(o) { JobApi_getPrototypeOf = Object.setPrototypeO
1324
1383
  // @ts-ignore
1325
1384
 
1326
1385
  var JobApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1327
- JobApi_inherits(JobApi, _runtime$BaseAPI);
1328
- var _super = JobApi_createSuper(JobApi);
1329
1386
  function JobApi() {
1330
1387
  JobApi_classCallCheck(this, JobApi);
1331
- return _super.apply(this, arguments);
1388
+ return JobApi_callSuper(this, JobApi, arguments);
1332
1389
  }
1333
- JobApi_createClass(JobApi, [{
1390
+ JobApi_inherits(JobApi, _runtime$BaseAPI);
1391
+ return JobApi_createClass(JobApi, [{
1334
1392
  key: "cancelJob",
1335
1393
  value:
1336
1394
  /**
@@ -1338,17 +1396,17 @@ var JobApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1338
1396
  */
1339
1397
  function cancelJob(params) {
1340
1398
  try {
1341
- var _this2 = this;
1399
+ var _this = this;
1342
1400
  var query = {};
1343
1401
  var headers = {};
1344
- return JobApi_await(_this2.request({
1402
+ return JobApi_await(_this.request({
1345
1403
  path: "/v2/accounts/{accountId}/jobs/{jobType}/{jobId}".replace("{".concat("accountId", "}"),
1346
1404
  // @ts-ignore
1347
- _this2.encodeParam("accountId", params.accountId)).replace("{".concat("jobId", "}"),
1405
+ _this.encodeParam("accountId", params.accountId)).replace("{".concat("jobId", "}"),
1348
1406
  // @ts-ignore
1349
- _this2.encodeParam("jobId", params.jobId)).replace("{".concat("jobType", "}"),
1407
+ _this.encodeParam("jobId", params.jobId)).replace("{".concat("jobType", "}"),
1350
1408
  // @ts-ignore
1351
- _this2.encodeParam("jobType", params.jobType)),
1409
+ _this.encodeParam("jobType", params.jobType)),
1352
1410
  method: "DELETE",
1353
1411
  headers: headers,
1354
1412
  query: query
@@ -1366,17 +1424,17 @@ var JobApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1366
1424
  key: "getJob",
1367
1425
  value: function getJob(params) {
1368
1426
  try {
1369
- var _this4 = this;
1427
+ var _this2 = this;
1370
1428
  var query = {};
1371
1429
  var headers = {};
1372
- return JobApi_await(_this4.request({
1430
+ return JobApi_await(_this2.request({
1373
1431
  path: "/v2/accounts/{accountId}/jobs/{jobType}/{jobId}".replace("{".concat("accountId", "}"),
1374
1432
  // @ts-ignore
1375
- _this4.encodeParam("accountId", params.accountId)).replace("{".concat("jobId", "}"),
1433
+ _this2.encodeParam("accountId", params.accountId)).replace("{".concat("jobId", "}"),
1376
1434
  // @ts-ignore
1377
- _this4.encodeParam("jobId", params.jobId)).replace("{".concat("jobType", "}"),
1435
+ _this2.encodeParam("jobId", params.jobId)).replace("{".concat("jobType", "}"),
1378
1436
  // @ts-ignore
1379
- _this4.encodeParam("jobType", params.jobType)),
1437
+ _this2.encodeParam("jobType", params.jobType)),
1380
1438
  method: "GET",
1381
1439
  headers: headers,
1382
1440
  query: query
@@ -1388,22 +1446,22 @@ var JobApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1388
1446
  }
1389
1447
  }
1390
1448
  /**
1391
- * Lists the most recently issued background jobs. Requires a `secret_*` API key.
1449
+ * Lists the 10 most recently created jobs for the specified job type(s). Requires a `secret_*` API key.
1392
1450
  */
1393
1451
  }, {
1394
1452
  key: "listRecentJobs",
1395
1453
  value: function listRecentJobs(params) {
1396
1454
  try {
1397
- var _this6 = this;
1455
+ var _this3 = this;
1398
1456
  var query = {};
1399
1457
  if (params.jobType) {
1400
1458
  query["jobType"] = params.jobType;
1401
1459
  }
1402
1460
  var headers = {};
1403
- return JobApi_await(_this6.request({
1461
+ return JobApi_await(_this3.request({
1404
1462
  path: "/v2/accounts/{accountId}/jobs".replace("{".concat("accountId", "}"),
1405
1463
  // @ts-ignore
1406
- _this6.encodeParam("accountId", params.accountId)),
1464
+ _this3.encodeParam("accountId", params.accountId)),
1407
1465
  method: "GET",
1408
1466
  headers: headers,
1409
1467
  query: query
@@ -1415,10 +1473,9 @@ var JobApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1415
1473
  }
1416
1474
  }
1417
1475
  }]);
1418
- return JobApi;
1419
1476
  }(BaseAPI);
1420
1477
  ;// CONCATENATED MODULE: ./src/public/shared/generated/apis/UploadApi.ts
1421
- function UploadApi_typeof(obj) { "@babel/helpers - typeof"; return UploadApi_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, UploadApi_typeof(obj); }
1478
+ function UploadApi_typeof(o) { "@babel/helpers - typeof"; return UploadApi_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, UploadApi_typeof(o); }
1422
1479
  function UploadApi_await(value, then, direct) {
1423
1480
  if (direct) {
1424
1481
  return then ? then(value) : value;
@@ -1431,15 +1488,15 @@ function UploadApi_await(value, then, direct) {
1431
1488
  function UploadApi_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1432
1489
  function UploadApi_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, UploadApi_toPropertyKey(descriptor.key), descriptor); } }
1433
1490
  function UploadApi_createClass(Constructor, protoProps, staticProps) { if (protoProps) UploadApi_defineProperties(Constructor.prototype, protoProps); if (staticProps) UploadApi_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
1434
- function UploadApi_toPropertyKey(arg) { var key = UploadApi_toPrimitive(arg, "string"); return UploadApi_typeof(key) === "symbol" ? key : String(key); }
1435
- function UploadApi_toPrimitive(input, hint) { if (UploadApi_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (UploadApi_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
1436
- function UploadApi_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) UploadApi_setPrototypeOf(subClass, superClass); }
1437
- function UploadApi_setPrototypeOf(o, p) { UploadApi_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return UploadApi_setPrototypeOf(o, p); }
1438
- function UploadApi_createSuper(Derived) { var hasNativeReflectConstruct = UploadApi_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = UploadApi_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = UploadApi_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return UploadApi_possibleConstructorReturn(this, result); }; }
1491
+ function UploadApi_toPropertyKey(t) { var i = UploadApi_toPrimitive(t, "string"); return "symbol" == UploadApi_typeof(i) ? i : i + ""; }
1492
+ function UploadApi_toPrimitive(t, r) { if ("object" != UploadApi_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != UploadApi_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
1493
+ function UploadApi_callSuper(t, o, e) { return o = UploadApi_getPrototypeOf(o), UploadApi_possibleConstructorReturn(t, UploadApi_isNativeReflectConstruct() ? Reflect.construct(o, e || [], UploadApi_getPrototypeOf(t).constructor) : o.apply(t, e)); }
1439
1494
  function UploadApi_possibleConstructorReturn(self, call) { if (call && (UploadApi_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return UploadApi_assertThisInitialized(self); }
1440
1495
  function UploadApi_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
1441
- function UploadApi_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
1496
+ function UploadApi_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (UploadApi_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
1442
1497
  function UploadApi_getPrototypeOf(o) { UploadApi_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return UploadApi_getPrototypeOf(o); }
1498
+ function UploadApi_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) UploadApi_setPrototypeOf(subClass, superClass); }
1499
+ function UploadApi_setPrototypeOf(o, p) { UploadApi_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return UploadApi_setPrototypeOf(o, p); }
1443
1500
  /* tslint:disable */
1444
1501
  /* eslint-disable */
1445
1502
  /**
@@ -1456,13 +1513,12 @@ function UploadApi_getPrototypeOf(o) { UploadApi_getPrototypeOf = Object.setProt
1456
1513
  // @ts-ignore
1457
1514
 
1458
1515
  var UploadApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1459
- UploadApi_inherits(UploadApi, _runtime$BaseAPI);
1460
- var _super = UploadApi_createSuper(UploadApi);
1461
1516
  function UploadApi() {
1462
1517
  UploadApi_classCallCheck(this, UploadApi);
1463
- return _super.apply(this, arguments);
1518
+ return UploadApi_callSuper(this, UploadApi, arguments);
1464
1519
  }
1465
- UploadApi_createClass(UploadApi, [{
1520
+ UploadApi_inherits(UploadApi, _runtime$BaseAPI);
1521
+ return UploadApi_createClass(UploadApi, [{
1466
1522
  key: "beginMultipartUpload",
1467
1523
  value:
1468
1524
  /**
@@ -1470,14 +1526,14 @@ var UploadApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1470
1526
  */
1471
1527
  function beginMultipartUpload(params) {
1472
1528
  try {
1473
- var _this2 = this;
1529
+ var _this = this;
1474
1530
  var query = {};
1475
1531
  var headers = {};
1476
1532
  headers["Content-Type"] = "application/json";
1477
- return UploadApi_await(_this2.request({
1533
+ return UploadApi_await(_this.request({
1478
1534
  path: "/v2/accounts/{accountId}/uploads".replace("{".concat("accountId", "}"),
1479
1535
  // @ts-ignore
1480
- _this2.encodeParam("accountId", params.accountId)),
1536
+ _this.encodeParam("accountId", params.accountId)),
1481
1537
  method: "POST",
1482
1538
  headers: headers,
1483
1539
  query: query,
@@ -1496,24 +1552,24 @@ var UploadApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1496
1552
  key: "completeUploadPart",
1497
1553
  value: function completeUploadPart(params) {
1498
1554
  try {
1499
- var _this4 = this;
1555
+ var _this2 = this;
1500
1556
  var query = {};
1501
1557
  var headers = {};
1502
1558
  headers["Content-Type"] = "application/json";
1503
- return UploadApi_await(_this4.request({
1559
+ return UploadApi_await(_this2.request({
1504
1560
  path: "/v2/accounts/{accountId}/uploads/{uploadId}/parts/{uploadPartIndex}".replace("{".concat("accountId", "}"),
1505
1561
  // @ts-ignore
1506
- _this4.encodeParam("accountId", params.accountId)).replace("{".concat("uploadId", "}"),
1562
+ _this2.encodeParam("accountId", params.accountId)).replace("{".concat("uploadId", "}"),
1507
1563
  // @ts-ignore
1508
- _this4.encodeParam("uploadId", params.uploadId)).replace("{".concat("uploadPartIndex", "}"),
1564
+ _this2.encodeParam("uploadId", params.uploadId)).replace("{".concat("uploadPartIndex", "}"),
1509
1565
  // @ts-ignore
1510
- _this4.encodeParam("uploadPartIndex", params.uploadPartIndex)),
1566
+ _this2.encodeParam("uploadPartIndex", params.uploadPartIndex)),
1511
1567
  method: "PUT",
1512
1568
  headers: headers,
1513
1569
  query: query,
1514
1570
  body: params.completeUploadPartRequest
1515
1571
  }, undefined, [][0]), function (response) {
1516
- return UploadApi_await(new VoidApiResponse(response).value());
1572
+ return UploadApi_await(new JSONApiResponse(response).value());
1517
1573
  });
1518
1574
  } catch (e) {
1519
1575
  return Promise.reject(e);
@@ -1526,17 +1582,17 @@ var UploadApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1526
1582
  key: "getUploadPart",
1527
1583
  value: function getUploadPart(params) {
1528
1584
  try {
1529
- var _this6 = this;
1585
+ var _this3 = this;
1530
1586
  var query = {};
1531
1587
  var headers = {};
1532
- return UploadApi_await(_this6.request({
1588
+ return UploadApi_await(_this3.request({
1533
1589
  path: "/v2/accounts/{accountId}/uploads/{uploadId}/parts/{uploadPartIndex}".replace("{".concat("accountId", "}"),
1534
1590
  // @ts-ignore
1535
- _this6.encodeParam("accountId", params.accountId)).replace("{".concat("uploadId", "}"),
1591
+ _this3.encodeParam("accountId", params.accountId)).replace("{".concat("uploadId", "}"),
1536
1592
  // @ts-ignore
1537
- _this6.encodeParam("uploadId", params.uploadId)).replace("{".concat("uploadPartIndex", "}"),
1593
+ _this3.encodeParam("uploadId", params.uploadId)).replace("{".concat("uploadPartIndex", "}"),
1538
1594
  // @ts-ignore
1539
- _this6.encodeParam("uploadPartIndex", params.uploadPartIndex)),
1595
+ _this3.encodeParam("uploadPartIndex", params.uploadPartIndex)),
1540
1596
  method: "GET",
1541
1597
  headers: headers,
1542
1598
  query: query
@@ -1554,15 +1610,15 @@ var UploadApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1554
1610
  key: "listUploadParts",
1555
1611
  value: function listUploadParts(params) {
1556
1612
  try {
1557
- var _this8 = this;
1613
+ var _this4 = this;
1558
1614
  var query = {};
1559
1615
  var headers = {};
1560
- return UploadApi_await(_this8.request({
1616
+ return UploadApi_await(_this4.request({
1561
1617
  path: "/v2/accounts/{accountId}/uploads/{uploadId}/parts".replace("{".concat("accountId", "}"),
1562
1618
  // @ts-ignore
1563
- _this8.encodeParam("accountId", params.accountId)).replace("{".concat("uploadId", "}"),
1619
+ _this4.encodeParam("accountId", params.accountId)).replace("{".concat("uploadId", "}"),
1564
1620
  // @ts-ignore
1565
- _this8.encodeParam("uploadId", params.uploadId)),
1621
+ _this4.encodeParam("uploadId", params.uploadId)),
1566
1622
  method: "GET",
1567
1623
  headers: headers,
1568
1624
  query: query
@@ -1580,14 +1636,14 @@ var UploadApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1580
1636
  key: "uploadFromUrl",
1581
1637
  value: function uploadFromUrl(params) {
1582
1638
  try {
1583
- var _this10 = this;
1639
+ var _this5 = this;
1584
1640
  var query = {};
1585
1641
  var headers = {};
1586
1642
  headers["Content-Type"] = "application/json";
1587
- return UploadApi_await(_this10.request({
1643
+ return UploadApi_await(_this5.request({
1588
1644
  path: "/v2/accounts/{accountId}/uploads/url".replace("{".concat("accountId", "}"),
1589
1645
  // @ts-ignore
1590
- _this10.encodeParam("accountId", params.accountId)),
1646
+ _this5.encodeParam("accountId", params.accountId)),
1591
1647
  method: "POST",
1592
1648
  headers: headers,
1593
1649
  query: query,
@@ -1600,7 +1656,6 @@ var UploadApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1600
1656
  }
1601
1657
  }
1602
1658
  }]);
1603
- return UploadApi;
1604
1659
  }(BaseAPI);
1605
1660
  ;// CONCATENATED MODULE: ./src/public/shared/generated/apis/index.ts
1606
1661
  /* tslint:disable */
@@ -1609,6 +1664,7 @@ var UploadApi = /*#__PURE__*/function (_runtime$BaseAPI) {
1609
1664
 
1610
1665
 
1611
1666
 
1667
+
1612
1668
  ;// CONCATENATED MODULE: ./src/public/shared/generated/index.ts
1613
1669
  /* tslint:disable */
1614
1670
  /* eslint-disable */
@@ -1628,29 +1684,29 @@ function isDefinedEntry(object) {
1628
1684
  return object[1] !== undefined && object[1] !== null;
1629
1685
  }
1630
1686
  ;// CONCATENATED MODULE: ./src/public/shared/UrlBuilder.ts
1631
- function UrlBuilder_typeof(obj) { "@babel/helpers - typeof"; return UrlBuilder_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, UrlBuilder_typeof(obj); }
1687
+ function UrlBuilder_typeof(o) { "@babel/helpers - typeof"; return UrlBuilder_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, UrlBuilder_typeof(o); }
1632
1688
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || UrlBuilder_unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
1633
1689
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
1634
- function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
1690
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
1635
1691
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
1636
1692
  function UrlBuilder_toConsumableArray(arr) { return UrlBuilder_arrayWithoutHoles(arr) || UrlBuilder_iterableToArray(arr) || UrlBuilder_unsupportedIterableToArray(arr) || UrlBuilder_nonIterableSpread(); }
1637
1693
  function UrlBuilder_nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
1638
1694
  function UrlBuilder_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return UrlBuilder_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return UrlBuilder_arrayLikeToArray(o, minLen); }
1639
1695
  function UrlBuilder_iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
1640
1696
  function UrlBuilder_arrayWithoutHoles(arr) { if (Array.isArray(arr)) return UrlBuilder_arrayLikeToArray(arr); }
1641
- function UrlBuilder_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
1697
+ function UrlBuilder_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
1642
1698
  function UrlBuilder_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1643
1699
  function UrlBuilder_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, UrlBuilder_toPropertyKey(descriptor.key), descriptor); } }
1644
1700
  function UrlBuilder_createClass(Constructor, protoProps, staticProps) { if (protoProps) UrlBuilder_defineProperties(Constructor.prototype, protoProps); if (staticProps) UrlBuilder_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
1645
- function UrlBuilder_toPropertyKey(arg) { var key = UrlBuilder_toPrimitive(arg, "string"); return UrlBuilder_typeof(key) === "symbol" ? key : String(key); }
1646
- function UrlBuilder_toPrimitive(input, hint) { if (UrlBuilder_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (UrlBuilder_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
1701
+ function UrlBuilder_toPropertyKey(t) { var i = UrlBuilder_toPrimitive(t, "string"); return "symbol" == UrlBuilder_typeof(i) ? i : i + ""; }
1702
+ function UrlBuilder_toPrimitive(t, r) { if ("object" != UrlBuilder_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != UrlBuilder_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
1647
1703
 
1648
1704
 
1649
1705
  var UrlBuilder = /*#__PURE__*/function () {
1650
1706
  function UrlBuilder() {
1651
1707
  UrlBuilder_classCallCheck(this, UrlBuilder);
1652
1708
  }
1653
- UrlBuilder_createClass(UrlBuilder, null, [{
1709
+ return UrlBuilder_createClass(UrlBuilder, null, [{
1654
1710
  key: "url",
1655
1711
  value:
1656
1712
  /**
@@ -1786,7 +1842,6 @@ var UrlBuilder = /*#__PURE__*/function () {
1786
1842
  }).join("&"));
1787
1843
  }
1788
1844
  }]);
1789
- return UrlBuilder;
1790
1845
  }();
1791
1846
  ;// CONCATENATED MODULE: ./src/public/shared/UrlBuilderTypes.ts
1792
1847
  /**
@@ -1799,7 +1854,39 @@ var UrlBuilderTypesNoOp = false;
1799
1854
 
1800
1855
 
1801
1856
  ;// CONCATENATED MODULE: ./src/private/UploadManagerBase.ts
1802
- function UploadManagerBase_typeof(obj) { "@babel/helpers - typeof"; return UploadManagerBase_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, UploadManagerBase_typeof(obj); }
1857
+ function UploadManagerBase_empty() {}
1858
+ function UploadManagerBase_awaitIgnored(value, direct) {
1859
+ if (!direct) {
1860
+ return value && value.then ? value.then(UploadManagerBase_empty) : Promise.resolve();
1861
+ }
1862
+ }
1863
+ function UploadManagerBase_await(value, then, direct) {
1864
+ if (direct) {
1865
+ return then ? then(value) : value;
1866
+ }
1867
+ if (!value || !value.then) {
1868
+ value = Promise.resolve(value);
1869
+ }
1870
+ return then ? value.then(then) : value;
1871
+ }
1872
+ function UploadManagerBase_rethrow(thrown, value) {
1873
+ if (thrown) throw value;
1874
+ return value;
1875
+ }
1876
+ function UploadManagerBase_finallyRethrows(body, finalizer) {
1877
+ try {
1878
+ var result = body();
1879
+ } catch (e) {
1880
+ return finalizer(true, e);
1881
+ }
1882
+ if (result && result.then) {
1883
+ return result.then(finalizer.bind(null, false), finalizer.bind(null, true));
1884
+ }
1885
+ return finalizer(false, result);
1886
+ }
1887
+ function UploadManagerBase_continue(value, then) {
1888
+ return value && value.then ? value.then(then) : then(value);
1889
+ }
1803
1890
  function _async(f) {
1804
1891
  return function () {
1805
1892
  for (var args = [], i = 0; i < arguments.length; i++) {
@@ -1972,50 +2059,18 @@ function _continueIgnored(value) {
1972
2059
  return value.then(UploadManagerBase_empty);
1973
2060
  }
1974
2061
  }
2062
+ function UploadManagerBase_typeof(o) { "@babel/helpers - typeof"; return UploadManagerBase_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, UploadManagerBase_typeof(o); }
1975
2063
  function UploadManagerBase_toConsumableArray(arr) { return UploadManagerBase_arrayWithoutHoles(arr) || UploadManagerBase_iterableToArray(arr) || UploadManagerBase_unsupportedIterableToArray(arr) || UploadManagerBase_nonIterableSpread(); }
1976
2064
  function UploadManagerBase_nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
1977
2065
  function UploadManagerBase_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return UploadManagerBase_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return UploadManagerBase_arrayLikeToArray(o, minLen); }
1978
2066
  function UploadManagerBase_iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
1979
2067
  function UploadManagerBase_arrayWithoutHoles(arr) { if (Array.isArray(arr)) return UploadManagerBase_arrayLikeToArray(arr); }
1980
- function UploadManagerBase_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
1981
- function UploadManagerBase_empty() {}
1982
- function UploadManagerBase_awaitIgnored(value, direct) {
1983
- if (!direct) {
1984
- return value && value.then ? value.then(UploadManagerBase_empty) : Promise.resolve();
1985
- }
1986
- }
1987
- function UploadManagerBase_await(value, then, direct) {
1988
- if (direct) {
1989
- return then ? then(value) : value;
1990
- }
1991
- if (!value || !value.then) {
1992
- value = Promise.resolve(value);
1993
- }
1994
- return then ? value.then(then) : value;
1995
- }
1996
- function UploadManagerBase_rethrow(thrown, value) {
1997
- if (thrown) throw value;
1998
- return value;
1999
- }
2000
- function UploadManagerBase_finallyRethrows(body, finalizer) {
2001
- try {
2002
- var result = body();
2003
- } catch (e) {
2004
- return finalizer(true, e);
2005
- }
2006
- if (result && result.then) {
2007
- return result.then(finalizer.bind(null, false), finalizer.bind(null, true));
2008
- }
2009
- return finalizer(false, result);
2010
- }
2011
- function UploadManagerBase_continue(value, then) {
2012
- return value && value.then ? value.then(then) : then(value);
2013
- }
2068
+ function UploadManagerBase_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
2014
2069
  function UploadManagerBase_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2015
2070
  function UploadManagerBase_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, UploadManagerBase_toPropertyKey(descriptor.key), descriptor); } }
2016
2071
  function UploadManagerBase_createClass(Constructor, protoProps, staticProps) { if (protoProps) UploadManagerBase_defineProperties(Constructor.prototype, protoProps); if (staticProps) UploadManagerBase_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
2017
- function UploadManagerBase_toPropertyKey(arg) { var key = UploadManagerBase_toPrimitive(arg, "string"); return UploadManagerBase_typeof(key) === "symbol" ? key : String(key); }
2018
- function UploadManagerBase_toPrimitive(input, hint) { if (UploadManagerBase_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (UploadManagerBase_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
2072
+ function UploadManagerBase_toPropertyKey(t) { var i = UploadManagerBase_toPrimitive(t, "string"); return "symbol" == UploadManagerBase_typeof(i) ? i : i + ""; }
2073
+ function UploadManagerBase_toPrimitive(t, r) { if ("object" != UploadManagerBase_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != UploadManagerBase_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
2019
2074
 
2020
2075
  /**
2021
2076
  * Methods common to UploadManagerNode and UploadManagerBrowser.
@@ -2030,39 +2085,46 @@ var UploadManagerBase = /*#__PURE__*/function () {
2030
2085
  this.uploadApi = new UploadApi(config);
2031
2086
  this.accountId = BytescaleApiClientConfigUtils.getAccountId(config);
2032
2087
  }
2033
- UploadManagerBase_createClass(UploadManagerBase, [{
2088
+ return UploadManagerBase_createClass(UploadManagerBase, [{
2034
2089
  key: "upload",
2035
2090
  value: function upload(request) {
2036
2091
  try {
2037
- var _this2 = this;
2038
- _this2.assertNotCancelled(request);
2039
- var source = _this2.processUploadSource(request.data);
2040
- var preUploadInfo = _this2.getPreUploadInfo(request, source);
2092
+ var _this = this;
2093
+ _this.assertNotCancelled(request);
2094
+ var source = _this.processUploadSource(request.data);
2095
+ var preUploadInfo = _this.getPreUploadInfo(request, source);
2041
2096
  var bytesTotal = preUploadInfo.size;
2042
- var makeOnProgressForPart = _this2.makeOnProgressForPartFactory(request, bytesTotal);
2043
- var init = _this2.preUpload(source);
2097
+ var makeOnProgressForPart = _this.makeOnProgressForPartFactory(request, bytesTotal);
2098
+ var init = _this.preUpload(source);
2044
2099
  // Raise initial progress event SYNCHRONOUSLY.
2045
2100
  if (request.onProgress !== undefined) {
2046
- request.onProgress(_this2.makeProgressEvent(0, bytesTotal));
2101
+ request.onProgress(_this.makeProgressEvent(0, bytesTotal));
2047
2102
  }
2048
- return UploadManagerBase_await(_this2.beginUpload(request, preUploadInfo), function (uploadInfo) {
2103
+ return UploadManagerBase_await(_this.beginUpload(request, preUploadInfo), function (uploadInfo) {
2049
2104
  var partCount = uploadInfo.uploadParts.count;
2050
2105
  var parts = UploadManagerBase_toConsumableArray(Array(partCount).keys());
2051
- var _this2$makeCancellati = _this2.makeCancellationMethods(),
2052
- cancel = _this2$makeCancellati.cancel,
2053
- addCancellationHandler = _this2$makeCancellati.addCancellationHandler;
2054
- var intervalHandle = setInterval(_this2.onIntervalTick(request, cancel), _this2.intervalMs);
2106
+ var _this$makeCancellatio = _this.makeCancellationMethods(),
2107
+ cancel = _this$makeCancellatio.cancel,
2108
+ addCancellationHandler = _this$makeCancellatio.addCancellationHandler;
2109
+ var intervalHandle = setInterval(_this.onIntervalTick(request, cancel), _this.intervalMs);
2110
+ var uploadedParts;
2055
2111
  return UploadManagerBase_continue(UploadManagerBase_finallyRethrows(function () {
2056
- return UploadManagerBase_await(_this2.mapAsync(parts, preUploadInfo.maxConcurrentUploadParts, _async(function (part) {
2057
- return _this2.uploadPart(request, source, part, uploadInfo, makeOnProgressForPart(), addCancellationHandler);
2058
- })), function () {
2059
- return UploadManagerBase_awaitIgnored(_this2.postUpload(init));
2112
+ return UploadManagerBase_await(_this.mapAsync(parts, preUploadInfo.maxConcurrentUploadParts, _async(function (part) {
2113
+ return _this.uploadPart(request, source, part, uploadInfo, makeOnProgressForPart(), addCancellationHandler);
2114
+ })), function (_this$mapAsync) {
2115
+ uploadedParts = _this$mapAsync;
2116
+ return UploadManagerBase_awaitIgnored(_this.postUpload(init));
2060
2117
  });
2061
2118
  }, function (_wasThrown, _result) {
2062
2119
  clearInterval(intervalHandle);
2063
2120
  return UploadManagerBase_rethrow(_wasThrown, _result);
2064
2121
  }), function () {
2065
- return uploadInfo.file;
2122
+ var etag = uploadedParts.flatMap(function (x) {
2123
+ return x.status === "Completed" ? [x.etag] : [];
2124
+ })[0];
2125
+ return Object.assign(Object.assign({}, uploadInfo.file), {
2126
+ etag: etag // The 'etag' in the original 'uploadInfo.file' will be null, so we set it to the final etag value here.
2127
+ });
2066
2128
  });
2067
2129
  });
2068
2130
  } catch (e) {
@@ -2088,9 +2150,9 @@ var UploadManagerBase = /*#__PURE__*/function () {
2088
2150
  }, {
2089
2151
  key: "onIntervalTick",
2090
2152
  value: function onIntervalTick(request, cancel) {
2091
- var _this3 = this;
2153
+ var _this2 = this;
2092
2154
  return function () {
2093
- if (_this3.isCancelled(request)) {
2155
+ if (_this2.isCancelled(request)) {
2094
2156
  cancel();
2095
2157
  }
2096
2158
  };
@@ -2118,7 +2180,7 @@ var UploadManagerBase = /*#__PURE__*/function () {
2118
2180
  }, {
2119
2181
  key: "makeOnProgressForPartFactory",
2120
2182
  value: function makeOnProgressForPartFactory(request, bytesTotal) {
2121
- var _this4 = this;
2183
+ var _this3 = this;
2122
2184
  var onProgress = request.onProgress;
2123
2185
  if (onProgress === undefined) {
2124
2186
  return function () {
@@ -2132,7 +2194,7 @@ var UploadManagerBase = /*#__PURE__*/function () {
2132
2194
  var delta = bytesSentTotalForPart - bytesSentForPart;
2133
2195
  bytesSentForPart += delta;
2134
2196
  bytesSent += delta;
2135
- onProgress(_this4.makeProgressEvent(bytesSent, bytesTotal));
2197
+ onProgress(_this3.makeProgressEvent(bytesSent, bytesTotal));
2136
2198
  };
2137
2199
  };
2138
2200
  }
@@ -2165,9 +2227,9 @@ var UploadManagerBase = /*#__PURE__*/function () {
2165
2227
  mime = _ref2.mime,
2166
2228
  originalFileName = _ref2.originalFileName;
2167
2229
  try {
2168
- var _this6 = this;
2169
- return UploadManagerBase_await(_this6.uploadApi.beginMultipartUpload({
2170
- accountId: _this6.accountId,
2230
+ var _this4 = this;
2231
+ return UploadManagerBase_await(_this4.uploadApi.beginMultipartUpload({
2232
+ accountId: _this4.accountId,
2171
2233
  beginMultipartUploadRequest: {
2172
2234
  metadata: request.metadata,
2173
2235
  mime: mime,
@@ -2186,14 +2248,14 @@ var UploadManagerBase = /*#__PURE__*/function () {
2186
2248
  key: "uploadPart",
2187
2249
  value: function uploadPart(request, source, partIndex, uploadInfo, onProgress, addCancellationHandler) {
2188
2250
  try {
2189
- var _this8 = this;
2190
- _this8.assertNotCancelled(request);
2191
- return UploadManagerBase_await(_this8.getUploadPart(partIndex, uploadInfo), function (part) {
2192
- _this8.assertNotCancelled(request);
2193
- return UploadManagerBase_await(_this8.putUploadPart(part, source, onProgress, addCancellationHandler), function (etag) {
2194
- _this8.assertNotCancelled(request);
2195
- return UploadManagerBase_awaitIgnored(_this8.uploadApi.completeUploadPart({
2196
- accountId: _this8.accountId,
2251
+ var _this5 = this;
2252
+ _this5.assertNotCancelled(request);
2253
+ return UploadManagerBase_await(_this5.getUploadPart(partIndex, uploadInfo), function (part) {
2254
+ _this5.assertNotCancelled(request);
2255
+ return UploadManagerBase_await(_this5.putUploadPart(part, source, onProgress, addCancellationHandler), function (etag) {
2256
+ _this5.assertNotCancelled(request);
2257
+ return UploadManagerBase_await(_this5.uploadApi.completeUploadPart({
2258
+ accountId: _this5.accountId,
2197
2259
  uploadId: uploadInfo.uploadId,
2198
2260
  uploadPartIndex: partIndex,
2199
2261
  completeUploadPartRequest: {
@@ -2213,9 +2275,9 @@ var UploadManagerBase = /*#__PURE__*/function () {
2213
2275
  key: "putUploadPart",
2214
2276
  value: function putUploadPart(part, source, onProgress, addCancellationHandler) {
2215
2277
  try {
2216
- var _this10 = this;
2278
+ var _this6 = this;
2217
2279
  var contentLength = part.range.inclusiveEnd + 1 - part.range.inclusiveStart;
2218
- return UploadManagerBase_await(_this10.doPutUploadPart(part, contentLength, source, onProgress, addCancellationHandler), function (_ref3) {
2280
+ return UploadManagerBase_await(_this6.doPutUploadPart(part, contentLength, source, onProgress, addCancellationHandler), function (_ref3) {
2219
2281
  var status = _ref3.status,
2220
2282
  etag = _ref3.etag;
2221
2283
  if (Math.floor(status / 100) !== 2) {
@@ -2236,13 +2298,13 @@ var UploadManagerBase = /*#__PURE__*/function () {
2236
2298
  key: "getUploadPart",
2237
2299
  value: function getUploadPart(partIndex, uploadInfo) {
2238
2300
  try {
2239
- var _this12 = this;
2301
+ var _this7 = this;
2240
2302
  if (partIndex === 0) {
2241
- return uploadInfo.uploadParts.first;
2303
+ return UploadManagerBase_await(uploadInfo.uploadParts.first);
2242
2304
  }
2243
- return UploadManagerBase_await(_this12.uploadApi.getUploadPart({
2305
+ return UploadManagerBase_await(_this7.uploadApi.getUploadPart({
2244
2306
  uploadId: uploadInfo.uploadId,
2245
- accountId: _this12.accountId,
2307
+ accountId: _this7.accountId,
2246
2308
  uploadPartIndex: partIndex
2247
2309
  }));
2248
2310
  } catch (e) {
@@ -2265,43 +2327,50 @@ var UploadManagerBase = /*#__PURE__*/function () {
2265
2327
  key: "mapAsync",
2266
2328
  value: function mapAsync(items, concurrency, callback) {
2267
2329
  try {
2330
+ var result = [];
2268
2331
  var workQueue = UploadManagerBase_toConsumableArray(items);
2269
- return UploadManagerBase_awaitIgnored(Promise.all(UploadManagerBase_toConsumableArray(Array(concurrency).keys()).map(_async(function () {
2332
+ return UploadManagerBase_await(Promise.all(UploadManagerBase_toConsumableArray(Array(concurrency).keys()).map(_async(function () {
2270
2333
  return _continueIgnored(_for(function () {
2271
2334
  return workQueue.length > 0;
2272
2335
  }, void 0, function () {
2273
2336
  var work = workQueue.shift(); // IMPORTANT: use 'shift' instead of 'pop' to ensure 'items' are processed in order when 'concurrency = 1'.
2274
2337
  return _invokeIgnored(function () {
2275
2338
  if (work !== undefined) {
2276
- return UploadManagerBase_awaitIgnored(callback(work));
2339
+ var _push = result.push;
2340
+ return UploadManagerBase_await(callback(work), function (_callback) {
2341
+ _push.call(result, _callback);
2342
+ });
2277
2343
  }
2278
2344
  });
2279
2345
  }));
2280
- }))));
2346
+ }))), function () {
2347
+ return result;
2348
+ });
2281
2349
  } catch (e) {
2282
2350
  return Promise.reject(e);
2283
2351
  }
2284
2352
  }
2285
2353
  }]);
2286
- return UploadManagerBase;
2287
2354
  }();
2288
2355
  ;// CONCATENATED MODULE: external "stream"
2289
- var x = y => { var x = {}; __lib_require__.d(x, y); return x; }
2290
- var y = x => () => x
2291
- var external_stream_namespaceObject = x({ ["Readable"]: () => __WEBPACK_EXTERNAL_MODULE_stream__.Readable });
2356
+ var x = function(y) {
2357
+ var x = {}; __lib_require__.d(x, y); return x
2358
+ }
2359
+ var y = function(x) { return function() { return x; }; }
2360
+ var external_stream_namespaceObject = x({ ["Readable"]: function() { return __WEBPACK_EXTERNAL_MODULE_stream__.Readable; } });
2292
2361
  ;// CONCATENATED MODULE: ./src/private/StreamUtils.ts
2293
- function StreamUtils_typeof(obj) { "@babel/helpers - typeof"; return StreamUtils_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, StreamUtils_typeof(obj); }
2362
+ function StreamUtils_typeof(o) { "@babel/helpers - typeof"; return StreamUtils_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, StreamUtils_typeof(o); }
2294
2363
  function StreamUtils_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2295
2364
  function StreamUtils_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, StreamUtils_toPropertyKey(descriptor.key), descriptor); } }
2296
2365
  function StreamUtils_createClass(Constructor, protoProps, staticProps) { if (protoProps) StreamUtils_defineProperties(Constructor.prototype, protoProps); if (staticProps) StreamUtils_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
2297
- function StreamUtils_toPropertyKey(arg) { var key = StreamUtils_toPrimitive(arg, "string"); return StreamUtils_typeof(key) === "symbol" ? key : String(key); }
2298
- function StreamUtils_toPrimitive(input, hint) { if (StreamUtils_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (StreamUtils_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
2366
+ function StreamUtils_toPropertyKey(t) { var i = StreamUtils_toPrimitive(t, "string"); return "symbol" == StreamUtils_typeof(i) ? i : i + ""; }
2367
+ function StreamUtils_toPrimitive(t, r) { if ("object" != StreamUtils_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != StreamUtils_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
2299
2368
 
2300
2369
  var StreamUtils = /*#__PURE__*/function () {
2301
2370
  function StreamUtils() {
2302
2371
  StreamUtils_classCallCheck(this, StreamUtils);
2303
2372
  }
2304
- StreamUtils_createClass(StreamUtils, null, [{
2373
+ return StreamUtils_createClass(StreamUtils, null, [{
2305
2374
  key: "create",
2306
2375
  value: function create() {
2307
2376
  var readable = new external_stream_namespaceObject.Readable();
@@ -2334,16 +2403,8 @@ var StreamUtils = /*#__PURE__*/function () {
2334
2403
  readable.push(null);
2335
2404
  }
2336
2405
  }]);
2337
- return StreamUtils;
2338
2406
  }();
2339
2407
  ;// CONCATENATED MODULE: ./src/private/NodeChunkedStream.ts
2340
- function NodeChunkedStream_typeof(obj) { "@babel/helpers - typeof"; return NodeChunkedStream_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, NodeChunkedStream_typeof(obj); }
2341
- function NodeChunkedStream_slicedToArray(arr, i) { return NodeChunkedStream_arrayWithHoles(arr) || NodeChunkedStream_iterableToArrayLimit(arr, i) || NodeChunkedStream_unsupportedIterableToArray(arr, i) || NodeChunkedStream_nonIterableRest(); }
2342
- function NodeChunkedStream_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
2343
- function NodeChunkedStream_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return NodeChunkedStream_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return NodeChunkedStream_arrayLikeToArray(o, minLen); }
2344
- function NodeChunkedStream_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
2345
- function NodeChunkedStream_iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
2346
- function NodeChunkedStream_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2347
2408
  function NodeChunkedStream_await(value, then, direct) {
2348
2409
  if (direct) {
2349
2410
  return then ? then(value) : value;
@@ -2353,11 +2414,18 @@ function NodeChunkedStream_await(value, then, direct) {
2353
2414
  }
2354
2415
  return then ? value.then(then) : value;
2355
2416
  }
2417
+ function NodeChunkedStream_typeof(o) { "@babel/helpers - typeof"; return NodeChunkedStream_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, NodeChunkedStream_typeof(o); }
2418
+ function NodeChunkedStream_slicedToArray(arr, i) { return NodeChunkedStream_arrayWithHoles(arr) || NodeChunkedStream_iterableToArrayLimit(arr, i) || NodeChunkedStream_unsupportedIterableToArray(arr, i) || NodeChunkedStream_nonIterableRest(); }
2419
+ function NodeChunkedStream_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
2420
+ function NodeChunkedStream_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return NodeChunkedStream_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return NodeChunkedStream_arrayLikeToArray(o, minLen); }
2421
+ function NodeChunkedStream_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
2422
+ function NodeChunkedStream_iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
2423
+ function NodeChunkedStream_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2356
2424
  function NodeChunkedStream_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2357
2425
  function NodeChunkedStream_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, NodeChunkedStream_toPropertyKey(descriptor.key), descriptor); } }
2358
2426
  function NodeChunkedStream_createClass(Constructor, protoProps, staticProps) { if (protoProps) NodeChunkedStream_defineProperties(Constructor.prototype, protoProps); if (staticProps) NodeChunkedStream_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
2359
- function NodeChunkedStream_toPropertyKey(arg) { var key = NodeChunkedStream_toPrimitive(arg, "string"); return NodeChunkedStream_typeof(key) === "symbol" ? key : String(key); }
2360
- function NodeChunkedStream_toPrimitive(input, hint) { if (NodeChunkedStream_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (NodeChunkedStream_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
2427
+ function NodeChunkedStream_toPropertyKey(t) { var i = NodeChunkedStream_toPrimitive(t, "string"); return "symbol" == NodeChunkedStream_typeof(i) ? i : i + ""; }
2428
+ function NodeChunkedStream_toPrimitive(t, r) { if ("object" != NodeChunkedStream_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != NodeChunkedStream_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
2361
2429
 
2362
2430
  /**
2363
2431
  * For Node.js streams only:
@@ -2382,7 +2450,7 @@ var NodeChunkedStream = /*#__PURE__*/function () {
2382
2450
  * of the stream) then the stream won't be resolved by the 'end' event inside 'runChunkPipeline', so calling this
2383
2451
  * method is necessary.
2384
2452
  */
2385
- NodeChunkedStream_createClass(NodeChunkedStream, [{
2453
+ return NodeChunkedStream_createClass(NodeChunkedStream, [{
2386
2454
  key: "finishedConsuming",
2387
2455
  value: function finishedConsuming() {
2388
2456
  this.isFinishedConsuming = true;
@@ -2398,49 +2466,48 @@ var NodeChunkedStream = /*#__PURE__*/function () {
2398
2466
  key: "runChunkPipeline",
2399
2467
  value: function runChunkPipeline() {
2400
2468
  try {
2401
- var _this2 = this;
2469
+ var _this = this;
2402
2470
  return NodeChunkedStream_await(new Promise(function (resolve, reject) {
2403
- _this2.resolver = resolve;
2471
+ _this.resolver = resolve;
2404
2472
  var onError = function onError(error) {
2405
2473
  removeListeners();
2406
2474
  reject(error);
2407
2475
  };
2408
2476
  var onEnd = function onEnd() {
2409
- _this2.isSourceFullyConsumed = true;
2477
+ _this.isSourceFullyConsumed = true;
2410
2478
  removeListeners();
2411
2479
  resolve();
2412
2480
  };
2413
2481
  var onData = function onData(buffer) {
2414
2482
  try {
2415
- if (_this2.isFinishedConsuming) {
2483
+ if (_this.isFinishedConsuming) {
2416
2484
  return;
2417
2485
  }
2418
- if (_this2.consumer === undefined) {
2486
+ if (_this.consumer === undefined) {
2419
2487
  console.warn("Stream yielded data while paused. The data will be buffered, but excessive buffering can cause memory issues.");
2420
- _this2.buffer = Buffer.concat([_this2.buffer, buffer]);
2488
+ _this.buffer = Buffer.concat([_this.buffer, buffer]);
2421
2489
  return;
2422
2490
  }
2423
- if (_this2.consumer.bytesRemaining <= 0) {
2491
+ if (_this.consumer.bytesRemaining <= 0) {
2424
2492
  throw new Error("Consumer requires zero bytes, so should not be consuming from the stream.");
2425
2493
  }
2426
- if (_this2.buffer.byteLength > 0) {
2494
+ if (_this.buffer.byteLength > 0) {
2427
2495
  throw new Error("Buffer was expected to be empty (as it should have been flushed to the consumer when '.take' was called).");
2428
2496
  }
2429
- var splitResult = _this2.splitBuffer(buffer, _this2.consumer.bytesRemaining);
2497
+ var splitResult = _this.splitBuffer(buffer, _this.consumer.bytesRemaining);
2430
2498
  if (splitResult === undefined) {
2431
2499
  return; // Received empty data.
2432
2500
  }
2433
-
2434
2501
  var _splitResult = NodeChunkedStream_slicedToArray(splitResult, 2),
2435
2502
  consumed = _splitResult[0],
2436
2503
  remaining = _splitResult[1];
2437
- _this2.buffer = remaining;
2438
- _this2.consumer.bytesRemaining -= consumed.byteLength;
2439
- _this2.consumer.stream.push(consumed);
2440
- if (_this2.consumer.bytesRemaining === 0) {
2441
- StreamUtils.endStream(_this2.consumer.stream);
2442
- _this2.consumer = undefined;
2443
- _this2.source.pause();
2504
+ _this.buffer = remaining;
2505
+ _this.consumer.bytesRemaining -= consumed.byteLength;
2506
+ _this.consumer.stream.push(consumed);
2507
+ if (_this.consumer.bytesRemaining === 0) {
2508
+ StreamUtils.endStream(_this.consumer.stream);
2509
+ _this.consumer = undefined;
2510
+ _this.source.pause();
2444
2511
  }
2445
2512
  } catch (e) {
2446
2513
  removeListeners();
@@ -2448,14 +2515,14 @@ var NodeChunkedStream = /*#__PURE__*/function () {
2448
2515
  }
2449
2516
  };
2450
2517
  var removeListeners = function removeListeners() {
2451
- _this2.source.removeListener("data", onData);
2452
- _this2.source.removeListener("error", onError);
2453
- _this2.source.removeListener("end", onEnd);
2518
+ _this.source.removeListener("data", onData);
2519
+ _this.source.removeListener("error", onError);
2520
+ _this.source.removeListener("end", onEnd);
2454
2521
  };
2455
- _this2.source.on("data", onData);
2456
- _this2.source.on("error", onError);
2457
- _this2.source.on("end", onEnd);
2458
- _this2.source.pause(); // Resumed when 'take' is called.
2522
+ _this.source.on("data", onData);
2523
+ _this.source.on("error", onError);
2524
+ _this.source.on("end", onEnd);
2525
+ _this.source.pause(); // Resumed when 'take' is called.
2459
2526
  }));
2460
2527
  } catch (e) {
2461
2528
  return Promise.reject(e);
@@ -2518,20 +2585,19 @@ var NodeChunkedStream = /*#__PURE__*/function () {
2518
2585
  if (bytesToConsume === buffer.byteLength) {
2519
2586
  return [buffer, Buffer.alloc(0)]; // Optimization
2520
2587
  }
2521
-
2522
2588
  var consumed = buffer.subarray(0, bytesToConsume);
2523
2589
  var remaining = buffer.subarray(bytesToConsume);
2524
2590
  return [consumed, remaining];
2525
2591
  }
2526
2592
  }]);
2527
- return NodeChunkedStream;
2528
2593
  }();
2529
2594
  ;// CONCATENATED MODULE: external "buffer"
2530
- var external_buffer_x = y => { var x = {}; __lib_require__.d(x, y); return x; }
2531
- var external_buffer_y = x => () => x
2532
- var external_buffer_namespaceObject = external_buffer_x({ ["Blob"]: () => __WEBPACK_EXTERNAL_MODULE_buffer__.Blob });
2595
+ var external_buffer_x = function(y) {
2596
+ var x = {}; __lib_require__.d(x, y); return x
2597
+ }
2598
+ var external_buffer_y = function(x) { return function() { return x; }; }
2599
+ var external_buffer_namespaceObject = external_buffer_x({ ["Blob"]: function() { return __WEBPACK_EXTERNAL_MODULE_buffer__.Blob; } });
2533
2600
  ;// CONCATENATED MODULE: ./src/private/UploadManagerFetchUtils.ts
2534
- function UploadManagerFetchUtils_typeof(obj) { "@babel/helpers - typeof"; return UploadManagerFetchUtils_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, UploadManagerFetchUtils_typeof(obj); }
2535
2601
  function UploadManagerFetchUtils_await(value, then, direct) {
2536
2602
  if (direct) {
2537
2603
  return then ? then(value) : value;
@@ -2541,17 +2607,18 @@ function UploadManagerFetchUtils_await(value, then, direct) {
2541
2607
  }
2542
2608
  return then ? value.then(then) : value;
2543
2609
  }
2610
+ function UploadManagerFetchUtils_typeof(o) { "@babel/helpers - typeof"; return UploadManagerFetchUtils_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, UploadManagerFetchUtils_typeof(o); }
2544
2611
  function UploadManagerFetchUtils_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2545
2612
  function UploadManagerFetchUtils_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, UploadManagerFetchUtils_toPropertyKey(descriptor.key), descriptor); } }
2546
2613
  function UploadManagerFetchUtils_createClass(Constructor, protoProps, staticProps) { if (protoProps) UploadManagerFetchUtils_defineProperties(Constructor.prototype, protoProps); if (staticProps) UploadManagerFetchUtils_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
2547
- function UploadManagerFetchUtils_toPropertyKey(arg) { var key = UploadManagerFetchUtils_toPrimitive(arg, "string"); return UploadManagerFetchUtils_typeof(key) === "symbol" ? key : String(key); }
2548
- function UploadManagerFetchUtils_toPrimitive(input, hint) { if (UploadManagerFetchUtils_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (UploadManagerFetchUtils_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
2614
+ function UploadManagerFetchUtils_toPropertyKey(t) { var i = UploadManagerFetchUtils_toPrimitive(t, "string"); return "symbol" == UploadManagerFetchUtils_typeof(i) ? i : i + ""; }
2615
+ function UploadManagerFetchUtils_toPrimitive(t, r) { if ("object" != UploadManagerFetchUtils_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != UploadManagerFetchUtils_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
2549
2616
 
2550
2617
  var UploadManagerFetchUtils = /*#__PURE__*/function () {
2551
2618
  function UploadManagerFetchUtils() {
2552
2619
  UploadManagerFetchUtils_classCallCheck(this, UploadManagerFetchUtils);
2553
2620
  }
2554
- UploadManagerFetchUtils_createClass(UploadManagerFetchUtils, null, [{
2621
+ return UploadManagerFetchUtils_createClass(UploadManagerFetchUtils, null, [{
2555
2622
  key: "doPutUploadPart",
2556
2623
  value: function doPutUploadPart(config, part, content, contentLength, addCancellationHandler) {
2557
2624
  try {
@@ -2584,10 +2651,9 @@ var UploadManagerFetchUtils = /*#__PURE__*/function () {
2584
2651
  }
2585
2652
  }
2586
2653
  }]);
2587
- return UploadManagerFetchUtils;
2588
2654
  }();
2589
2655
  ;// CONCATENATED MODULE: ./src/public/node/UploadManagerNode.ts
2590
- function UploadManagerNode_typeof(obj) { "@babel/helpers - typeof"; return UploadManagerNode_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, UploadManagerNode_typeof(obj); }
2656
+ function UploadManagerNode_typeof(o) { "@babel/helpers - typeof"; return UploadManagerNode_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, UploadManagerNode_typeof(o); }
2591
2657
  function UploadManagerNode_empty() {}
2592
2658
  function UploadManagerNode_awaitIgnored(value, direct) {
2593
2659
  if (!direct) {
@@ -2771,15 +2837,15 @@ function _switch(discriminant, cases) {
2771
2837
  function UploadManagerNode_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2772
2838
  function UploadManagerNode_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, UploadManagerNode_toPropertyKey(descriptor.key), descriptor); } }
2773
2839
  function UploadManagerNode_createClass(Constructor, protoProps, staticProps) { if (protoProps) UploadManagerNode_defineProperties(Constructor.prototype, protoProps); if (staticProps) UploadManagerNode_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
2774
- function UploadManagerNode_toPropertyKey(arg) { var key = UploadManagerNode_toPrimitive(arg, "string"); return UploadManagerNode_typeof(key) === "symbol" ? key : String(key); }
2775
- function UploadManagerNode_toPrimitive(input, hint) { if (UploadManagerNode_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (UploadManagerNode_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
2776
- function UploadManagerNode_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) UploadManagerNode_setPrototypeOf(subClass, superClass); }
2777
- function UploadManagerNode_setPrototypeOf(o, p) { UploadManagerNode_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return UploadManagerNode_setPrototypeOf(o, p); }
2778
- function UploadManagerNode_createSuper(Derived) { var hasNativeReflectConstruct = UploadManagerNode_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = UploadManagerNode_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = UploadManagerNode_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return UploadManagerNode_possibleConstructorReturn(this, result); }; }
2840
+ function UploadManagerNode_toPropertyKey(t) { var i = UploadManagerNode_toPrimitive(t, "string"); return "symbol" == UploadManagerNode_typeof(i) ? i : i + ""; }
2841
+ function UploadManagerNode_toPrimitive(t, r) { if ("object" != UploadManagerNode_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != UploadManagerNode_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
2842
+ function UploadManagerNode_callSuper(t, o, e) { return o = UploadManagerNode_getPrototypeOf(o), UploadManagerNode_possibleConstructorReturn(t, UploadManagerNode_isNativeReflectConstruct() ? Reflect.construct(o, e || [], UploadManagerNode_getPrototypeOf(t).constructor) : o.apply(t, e)); }
2779
2843
  function UploadManagerNode_possibleConstructorReturn(self, call) { if (call && (UploadManagerNode_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return UploadManagerNode_assertThisInitialized(self); }
2780
2844
  function UploadManagerNode_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
2781
- function UploadManagerNode_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
2845
+ function UploadManagerNode_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (UploadManagerNode_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
2782
2846
  function UploadManagerNode_getPrototypeOf(o) { UploadManagerNode_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return UploadManagerNode_getPrototypeOf(o); }
2847
+ function UploadManagerNode_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) UploadManagerNode_setPrototypeOf(subClass, superClass); }
2848
+ function UploadManagerNode_setPrototypeOf(o, p) { UploadManagerNode_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return UploadManagerNode_setPrototypeOf(o, p); }
2783
2849
 
2784
2850
 
2785
2851
 
@@ -2787,13 +2853,12 @@ function UploadManagerNode_getPrototypeOf(o) { UploadManagerNode_getPrototypeOf
2787
2853
 
2788
2854
 
2789
2855
  var UploadManager = /*#__PURE__*/function (_UploadManagerBase) {
2790
- UploadManagerNode_inherits(UploadManager, _UploadManagerBase);
2791
- var _super = UploadManagerNode_createSuper(UploadManager);
2792
2856
  function UploadManager() {
2793
2857
  UploadManagerNode_classCallCheck(this, UploadManager);
2794
- return _super.apply(this, arguments);
2858
+ return UploadManagerNode_callSuper(this, UploadManager, arguments);
2795
2859
  }
2796
- UploadManagerNode_createClass(UploadManager, [{
2860
+ UploadManagerNode_inherits(UploadManager, _UploadManagerBase);
2861
+ return UploadManagerNode_createClass(UploadManager, [{
2797
2862
  key: "processUploadSource",
2798
2863
  value: function processUploadSource(data) {
2799
2864
  if (typeof data === "string") {
@@ -2855,7 +2920,6 @@ var UploadManager = /*#__PURE__*/function (_UploadManagerBase) {
2855
2920
  originalFileName: undefined,
2856
2921
  maxConcurrentUploadParts: 1 // Uploading from a stream concurrently is complex, so we serialize it.
2857
2922
  };
2858
-
2859
2923
  default:
2860
2924
  assertUnreachable(data);
2861
2925
  }
@@ -2878,11 +2942,11 @@ var UploadManager = /*#__PURE__*/function (_UploadManagerBase) {
2878
2942
  value: function postUpload(init) {
2879
2943
  try {
2880
2944
  if (init === undefined) {
2881
- return;
2945
+ return UploadManagerNode_await();
2882
2946
  }
2883
2947
  init.chunkedStream.finishedConsuming();
2884
2948
  // Raise any errors from the stream chunking task.
2885
- return UploadManagerNode_awaitIgnored(init.chunkedStreamPromise);
2949
+ return UploadManagerNode_await(UploadManagerNode_awaitIgnored(init.chunkedStreamPromise));
2886
2950
  } catch (e) {
2887
2951
  return Promise.reject(e);
2888
2952
  }
@@ -2891,11 +2955,11 @@ var UploadManager = /*#__PURE__*/function (_UploadManagerBase) {
2891
2955
  key: "doPutUploadPart",
2892
2956
  value: function doPutUploadPart(part, contentLength, source, onProgress, addCancellationHandler) {
2893
2957
  try {
2894
- var _this2 = this;
2958
+ var _this = this;
2895
2959
  // Report progress:
2896
2960
  var hasWarned = false;
2897
2961
  var bytesSent = 0;
2898
- return UploadManagerNode_await(_this2.sliceDataForRequest(source, part), function (stream) {
2962
+ return UploadManagerNode_await(_this.sliceDataForRequest(source, part), function (stream) {
2899
2963
  var streamWithProgress = stream.on("data", function (data) {
2900
2964
  if (data.byteLength !== undefined) {
2901
2965
  bytesSent += data.byteLength;
@@ -2905,7 +2969,7 @@ var UploadManager = /*#__PURE__*/function (_UploadManagerBase) {
2905
2969
  console.warn("Expected stream to contain buffers, but it did not, so upload progress won't be reported.");
2906
2970
  }
2907
2971
  });
2908
- return UploadManagerNode_await(UploadManagerFetchUtils.doPutUploadPart(_this2.config, part, _this2.coerceRequestBody(streamWithProgress), contentLength, addCancellationHandler));
2972
+ return UploadManagerNode_await(UploadManagerFetchUtils.doPutUploadPart(_this.config, part, _this.coerceRequestBody(streamWithProgress), contentLength, addCancellationHandler));
2909
2973
  });
2910
2974
  } catch (e) {
2911
2975
  return Promise.reject(e);
@@ -2921,12 +2985,12 @@ var UploadManager = /*#__PURE__*/function (_UploadManagerBase) {
2921
2985
  value: function sliceDataForRequest(data, part) {
2922
2986
  try {
2923
2987
  if (part.range.inclusiveEnd === -1) {
2924
- return StreamUtils.empty();
2988
+ return UploadManagerNode_await(StreamUtils.empty());
2925
2989
  }
2926
2990
  var start = part.range.inclusiveStart;
2927
2991
  var endExclusive = part.range.inclusiveEnd + 1;
2928
2992
  var partSize = endExclusive - start;
2929
- return _switch(data.type, [[function () {
2993
+ return UploadManagerNode_await(_switch(data.type, [[function () {
2930
2994
  return "Blob";
2931
2995
  }, function () {
2932
2996
  var _fromArrayBuffer = StreamUtils.fromArrayBuffer;
@@ -2947,26 +3011,25 @@ var UploadManager = /*#__PURE__*/function (_UploadManagerBase) {
2947
3011
  return data.value.take(partSize);
2948
3012
  }], [void 0, function () {
2949
3013
  assertUnreachable(data);
2950
- }, UploadManagerNode_empty]]);
3014
+ }, UploadManagerNode_empty]]));
2951
3015
  } catch (e) {
2952
3016
  return Promise.reject(e);
2953
3017
  }
2954
3018
  }
2955
3019
  }]);
2956
- return UploadManager;
2957
3020
  }(UploadManagerBase);
2958
3021
  ;// CONCATENATED MODULE: ./src/private/EnvChecker.ts
2959
- function EnvChecker_typeof(obj) { "@babel/helpers - typeof"; return EnvChecker_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, EnvChecker_typeof(obj); }
3022
+ function EnvChecker_typeof(o) { "@babel/helpers - typeof"; return EnvChecker_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, EnvChecker_typeof(o); }
2960
3023
  function EnvChecker_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2961
3024
  function EnvChecker_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, EnvChecker_toPropertyKey(descriptor.key), descriptor); } }
2962
3025
  function EnvChecker_createClass(Constructor, protoProps, staticProps) { if (protoProps) EnvChecker_defineProperties(Constructor.prototype, protoProps); if (staticProps) EnvChecker_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
2963
- function EnvChecker_toPropertyKey(arg) { var key = EnvChecker_toPrimitive(arg, "string"); return EnvChecker_typeof(key) === "symbol" ? key : String(key); }
2964
- function EnvChecker_toPrimitive(input, hint) { if (EnvChecker_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (EnvChecker_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
3026
+ function EnvChecker_toPropertyKey(t) { var i = EnvChecker_toPrimitive(t, "string"); return "symbol" == EnvChecker_typeof(i) ? i : i + ""; }
3027
+ function EnvChecker_toPrimitive(t, r) { if ("object" != EnvChecker_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != EnvChecker_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
2965
3028
  var EnvChecker = /*#__PURE__*/function () {
2966
3029
  function EnvChecker() {
2967
3030
  EnvChecker_classCallCheck(this, EnvChecker);
2968
3031
  }
2969
- EnvChecker_createClass(EnvChecker, null, [{
3032
+ return EnvChecker_createClass(EnvChecker, null, [{
2970
3033
  key: "isBrowser",
2971
3034
  value: function isBrowser() {
2972
3035
  return typeof window !== "undefined";
@@ -2980,21 +3043,20 @@ var EnvChecker = /*#__PURE__*/function () {
2980
3043
  return new Error("The '".concat(methodName, "' method cannot be called because you have bundled a non-browser implementation of the Bytescale JavaScript SDK into your client-side code. Please ensure your bundling tool (Webpack, Rollup, etc.) is honouring the \"browser\" field of the \"package.json\" file for this package, as this will allow the browser implementation of the Bytescale JavaScript SDK to be included in your client-side code."));
2981
3044
  }
2982
3045
  }]);
2983
- return EnvChecker;
2984
3046
  }();
2985
3047
  ;// CONCATENATED MODULE: ./src/public/node/AuthManagerNode.ts
2986
- function AuthManagerNode_typeof(obj) { "@babel/helpers - typeof"; return AuthManagerNode_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, AuthManagerNode_typeof(obj); }
3048
+ function AuthManagerNode_typeof(o) { "@babel/helpers - typeof"; return AuthManagerNode_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, AuthManagerNode_typeof(o); }
2987
3049
  function AuthManagerNode_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2988
3050
  function AuthManagerNode_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, AuthManagerNode_toPropertyKey(descriptor.key), descriptor); } }
2989
3051
  function AuthManagerNode_createClass(Constructor, protoProps, staticProps) { if (protoProps) AuthManagerNode_defineProperties(Constructor.prototype, protoProps); if (staticProps) AuthManagerNode_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
2990
- function AuthManagerNode_toPropertyKey(arg) { var key = AuthManagerNode_toPrimitive(arg, "string"); return AuthManagerNode_typeof(key) === "symbol" ? key : String(key); }
2991
- function AuthManagerNode_toPrimitive(input, hint) { if (AuthManagerNode_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (AuthManagerNode_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
3052
+ function AuthManagerNode_toPropertyKey(t) { var i = AuthManagerNode_toPrimitive(t, "string"); return "symbol" == AuthManagerNode_typeof(i) ? i : i + ""; }
3053
+ function AuthManagerNode_toPrimitive(t, r) { if ("object" != AuthManagerNode_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != AuthManagerNode_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
2992
3054
 
2993
3055
  var AuthManagerImpl = /*#__PURE__*/function () {
2994
3056
  function AuthManagerImpl() {
2995
3057
  AuthManagerNode_classCallCheck(this, AuthManagerImpl);
2996
3058
  }
2997
- AuthManagerNode_createClass(AuthManagerImpl, [{
3059
+ return AuthManagerNode_createClass(AuthManagerImpl, [{
2998
3060
  key: "beginAuthSession",
2999
3061
  value: function beginAuthSession(_params) {
3000
3062
  try {
@@ -3018,7 +3080,6 @@ var AuthManagerImpl = /*#__PURE__*/function () {
3018
3080
  return false;
3019
3081
  }
3020
3082
  }]);
3021
- return AuthManagerImpl;
3022
3083
  }();
3023
3084
  /**
3024
3085
  * Alternative way of implementing a static class (i.e. all methods static). We do this so we can use a interface on the class (interfaces can't define static methods).
@@ -3038,6 +3099,7 @@ var __lib_exports__BinaryResult = __lib_exports__.BinaryResult;
3038
3099
  var __lib_exports__BytescaleApiClientConfigUtils = __lib_exports__.BytescaleApiClientConfigUtils;
3039
3100
  var __lib_exports__BytescaleApiError = __lib_exports__.BytescaleApiError;
3040
3101
  var __lib_exports__BytescaleGenericError = __lib_exports__.BytescaleGenericError;
3102
+ var __lib_exports__CacheApi = __lib_exports__.CacheApi;
3041
3103
  var __lib_exports__CancelledError = __lib_exports__.CancelledError;
3042
3104
  var __lib_exports__CommonTypesNoOp = __lib_exports__.CommonTypesNoOp;
3043
3105
  var __lib_exports__FileApi = __lib_exports__.FileApi;
@@ -3051,4 +3113,4 @@ var __lib_exports__UrlBuilderTypesNoOp = __lib_exports__.UrlBuilderTypesNoOp;
3051
3113
  var __lib_exports__VoidApiResponse = __lib_exports__.VoidApiResponse;
3052
3114
  var __lib_exports__encodeBytescaleQuerystringKVP = __lib_exports__.encodeBytescaleQuerystringKVP;
3053
3115
  var __lib_exports__querystring = __lib_exports__.querystring;
3054
- export { __lib_exports__AuthManager as AuthManager, __lib_exports__BaseAPI as BaseAPI, __lib_exports__BinaryResult as BinaryResult, __lib_exports__BytescaleApiClientConfigUtils as BytescaleApiClientConfigUtils, __lib_exports__BytescaleApiError as BytescaleApiError, __lib_exports__BytescaleGenericError as BytescaleGenericError, __lib_exports__CancelledError as CancelledError, __lib_exports__CommonTypesNoOp as CommonTypesNoOp, __lib_exports__FileApi as FileApi, __lib_exports__FolderApi as FolderApi, __lib_exports__JSONApiResponse as JSONApiResponse, __lib_exports__JobApi as JobApi, __lib_exports__UploadApi as UploadApi, __lib_exports__UploadManager as UploadManager, __lib_exports__UrlBuilder as UrlBuilder, __lib_exports__UrlBuilderTypesNoOp as UrlBuilderTypesNoOp, __lib_exports__VoidApiResponse as VoidApiResponse, __lib_exports__encodeBytescaleQuerystringKVP as encodeBytescaleQuerystringKVP, __lib_exports__querystring as querystring };
3116
+ export { __lib_exports__AuthManager as AuthManager, __lib_exports__BaseAPI as BaseAPI, __lib_exports__BinaryResult as BinaryResult, __lib_exports__BytescaleApiClientConfigUtils as BytescaleApiClientConfigUtils, __lib_exports__BytescaleApiError as BytescaleApiError, __lib_exports__BytescaleGenericError as BytescaleGenericError, __lib_exports__CacheApi as CacheApi, __lib_exports__CancelledError as CancelledError, __lib_exports__CommonTypesNoOp as CommonTypesNoOp, __lib_exports__FileApi as FileApi, __lib_exports__FolderApi as FolderApi, __lib_exports__JSONApiResponse as JSONApiResponse, __lib_exports__JobApi as JobApi, __lib_exports__UploadApi as UploadApi, __lib_exports__UploadManager as UploadManager, __lib_exports__UrlBuilder as UrlBuilder, __lib_exports__UrlBuilderTypesNoOp as UrlBuilderTypesNoOp, __lib_exports__VoidApiResponse as VoidApiResponse, __lib_exports__encodeBytescaleQuerystringKVP as encodeBytescaleQuerystringKVP, __lib_exports__querystring as querystring };