@bytescale/sdk 1.0.0-alpha.2 → 1.0.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/cjs/{_96d8.main.js → _70b2.main.js} +2 -2
- package/dist/browser/cjs/{_9d47.main.js → _7392.main.js} +2 -2
- package/dist/browser/cjs/main.js +499 -1863
- package/dist/node/cjs/main.js +497 -1861
- package/dist/node/esm/main.mjs +499 -1910
- package/dist/types/generated/apis/FileApi.d.ts +98 -0
- package/dist/types/{gen → generated}/apis/FolderApi.d.ts +8 -36
- package/dist/types/{gen → generated}/apis/JobApi.d.ts +4 -16
- package/dist/types/{gen → generated}/apis/UploadApi.d.ts +6 -26
- package/dist/types/{gen → generated}/models/index.d.ts +41 -201
- package/dist/types/{gen → generated}/runtime.d.ts +8 -78
- package/dist/types/index.d.ts +2 -2
- package/dist/types/{utils → uploads}/NodeUtils.d.ts +1 -1
- package/dist/types/{utils → uploads}/UploadManager.d.ts +4 -4
- package/dist/types/{utils/Model.d.ts → uploads/UploadModel.d.ts} +1 -1
- package/dist/types/{utils → uploads}/index.d.ts +1 -1
- package/package.json +2 -2
- package/tests/ChunkedStream.test.ts +1 -1
- package/tests/UploadManager.test.ts +3 -3
- package/dist/types/gen/apis/FileApi.d.ts +0 -135
- /package/dist/types/{gen → generated}/apis/index.d.ts +0 -0
- /package/dist/types/{gen → generated}/index.d.ts +0 -0
- /package/dist/types/{utils → uploads}/ChunkedStream.d.ts +0 -0
package/dist/node/esm/main.mjs
CHANGED
|
@@ -93,75 +93,27 @@ var __lib_exports__ = {};
|
|
|
93
93
|
|
|
94
94
|
// EXPORTS
|
|
95
95
|
__lib_require__.d(__lib_exports__, {
|
|
96
|
-
"AccountJobStatus": function() { return /* reexport */ AccountJobStatus; },
|
|
97
|
-
"AccountJobType": function() { return /* reexport */ AccountJobType; },
|
|
98
|
-
"AsyncResponseJobDocsEnum": function() { return /* reexport */ AsyncResponseJobDocsEnum; },
|
|
99
|
-
"AwsRegion": function() { return /* reexport */ AwsRegion; },
|
|
100
96
|
"BASE_PATH": function() { return /* reexport */ BASE_PATH; },
|
|
101
97
|
"BaseAPI": function() { return /* reexport */ BaseAPI; },
|
|
102
98
|
"BinaryResult": function() { return /* reexport */ BinaryResult; },
|
|
103
|
-
"
|
|
99
|
+
"BytescaleApiError": function() { return /* reexport */ BytescaleApiError; },
|
|
104
100
|
"CancelledError": function() { return /* reexport */ CancelledError; },
|
|
105
101
|
"ChunkedStream": function() { return /* reexport */ ChunkedStream; },
|
|
106
|
-
"Configuration": function() { return /* reexport */ Configuration; },
|
|
107
|
-
"DefaultConfig": function() { return /* reexport */ DefaultConfig; },
|
|
108
|
-
"DigitalOceanStorageTypeEnum": function() { return /* reexport */ DigitalOceanStorageTypeEnum; },
|
|
109
102
|
"FetchError": function() { return /* reexport */ FetchError; },
|
|
110
103
|
"FileApi": function() { return /* reexport */ FileApi; },
|
|
111
|
-
"FileCopyStatus": function() { return /* reexport */ FileCopyStatus; },
|
|
112
|
-
"FileSummaryTypeEnum": function() { return /* reexport */ FileSummaryTypeEnum; },
|
|
113
104
|
"FolderApi": function() { return /* reexport */ FolderApi; },
|
|
114
|
-
"FolderDetailsTypeEnum": function() { return /* reexport */ FolderDetailsTypeEnum; },
|
|
115
|
-
"FolderSettingsStorageLayerSummaryStorageLayerTypeEnum": function() { return /* reexport */ FolderSettingsStorageLayerSummaryStorageLayerTypeEnum; },
|
|
116
|
-
"FolderSummaryTypeEnum": function() { return /* reexport */ FolderSummaryTypeEnum; },
|
|
117
|
-
"GoogleStorageTypeEnum": function() { return /* reexport */ GoogleStorageTypeEnum; },
|
|
118
|
-
"InternalStorageV1TypeEnum": function() { return /* reexport */ InternalStorageV1TypeEnum; },
|
|
119
|
-
"InternalStorageV2TypeEnum": function() { return /* reexport */ InternalStorageV2TypeEnum; },
|
|
120
105
|
"JSONApiResponse": function() { return /* reexport */ JSONApiResponse; },
|
|
121
106
|
"JobApi": function() { return /* reexport */ JobApi; },
|
|
122
|
-
"JobSummaryJobDocsEnum": function() { return /* reexport */ JobSummaryJobDocsEnum; },
|
|
123
|
-
"MultipartUploadProtocol": function() { return /* reexport */ MultipartUploadProtocol; },
|
|
124
|
-
"ObjectSummaryTypeEnum": function() { return /* reexport */ ObjectSummaryTypeEnum; },
|
|
125
|
-
"PathPermissionScope": function() { return /* reexport */ PathPermissionScope; },
|
|
126
|
-
"PickDigitalOceanStorageExcludeKeyofDigitalOceanStorageCredentialsTypeEnum": function() { return /* reexport */ PickDigitalOceanStorageExcludeKeyofDigitalOceanStorageCredentialsTypeEnum; },
|
|
127
|
-
"PickGoogleStorageExcludeKeyofGoogleStorageCredentialsTypeEnum": function() { return /* reexport */ PickGoogleStorageExcludeKeyofGoogleStorageCredentialsTypeEnum; },
|
|
128
|
-
"PickR2StorageExcludeKeyofR2StorageCredentialsTypeEnum": function() { return /* reexport */ PickR2StorageExcludeKeyofR2StorageCredentialsTypeEnum; },
|
|
129
|
-
"PickS3StorageExcludeKeyofS3StorageCredentialsTypeEnum": function() { return /* reexport */ PickS3StorageExcludeKeyofS3StorageCredentialsTypeEnum; },
|
|
130
|
-
"ProcessFileCachePermEnum": function() { return /* reexport */ ProcessFileCachePermEnum; },
|
|
131
|
-
"R2StorageTypeEnum": function() { return /* reexport */ R2StorageTypeEnum; },
|
|
132
107
|
"RequiredError": function() { return /* reexport */ RequiredError; },
|
|
133
108
|
"ResponseError": function() { return /* reexport */ ResponseError; },
|
|
134
|
-
"S3StorageTypeEnum": function() { return /* reexport */ S3StorageTypeEnum; },
|
|
135
|
-
"SpecifiedFieldValueFolderDescriptionOrNullSetEnum": function() { return /* reexport */ SpecifiedFieldValueFolderDescriptionOrNullSetEnum; },
|
|
136
|
-
"SpecifiedFieldValuePublicPermissionsArrayOrNullSetEnum": function() { return /* reexport */ SpecifiedFieldValuePublicPermissionsArrayOrNullSetEnum; },
|
|
137
|
-
"SpecifiedFieldValueStorageLayerUpdateOrNullSetEnum": function() { return /* reexport */ SpecifiedFieldValueStorageLayerUpdateOrNullSetEnum; },
|
|
138
|
-
"SpecifiedFieldValueStorageLayerUpdateOrNullValueTypeEnum": function() { return /* reexport */ SpecifiedFieldValueStorageLayerUpdateOrNullValueTypeEnum; },
|
|
139
|
-
"StorageLayerSummaryTypeEnum": function() { return /* reexport */ StorageLayerSummaryTypeEnum; },
|
|
140
|
-
"StorageLayerUpdateTypeEnum": function() { return /* reexport */ StorageLayerUpdateTypeEnum; },
|
|
141
|
-
"TagConditionAllTypeEnum": function() { return /* reexport */ TagConditionAllTypeEnum; },
|
|
142
|
-
"TagConditionAndTypeEnum": function() { return /* reexport */ TagConditionAndTypeEnum; },
|
|
143
|
-
"TagConditionAnyTypeEnum": function() { return /* reexport */ TagConditionAnyTypeEnum; },
|
|
144
|
-
"TagConditionEqualsTypeEnum": function() { return /* reexport */ TagConditionEqualsTypeEnum; },
|
|
145
|
-
"TagConditionNotTypeEnum": function() { return /* reexport */ TagConditionNotTypeEnum; },
|
|
146
|
-
"TagConditionOrTypeEnum": function() { return /* reexport */ TagConditionOrTypeEnum; },
|
|
147
|
-
"TagConditionTypeEnum": function() { return /* reexport */ TagConditionTypeEnum; },
|
|
148
|
-
"TextApiResponse": function() { return /* reexport */ TextApiResponse; },
|
|
149
|
-
"UnspecifiedFieldValueSetEnum": function() { return /* reexport */ UnspecifiedFieldValueSetEnum; },
|
|
150
|
-
"UpdatableFieldFolderDescriptionOrNullSetEnum": function() { return /* reexport */ UpdatableFieldFolderDescriptionOrNullSetEnum; },
|
|
151
|
-
"UpdatableFieldPublicPermissionsArrayOrNullSetEnum": function() { return /* reexport */ UpdatableFieldPublicPermissionsArrayOrNullSetEnum; },
|
|
152
|
-
"UpdatableFieldStorageLayerUpdateOrNullSetEnum": function() { return /* reexport */ UpdatableFieldStorageLayerUpdateOrNullSetEnum; },
|
|
153
109
|
"UploadApi": function() { return /* reexport */ UploadApi; },
|
|
154
|
-
"UploadApiError": function() { return /* reexport */ UploadApiError; },
|
|
155
110
|
"UploadManager": function() { return /* reexport */ UploadManager; },
|
|
156
111
|
"VoidApiResponse": function() { return /* reexport */ VoidApiResponse; },
|
|
157
|
-
"WebStorageTypeEnum": function() { return /* reexport */ WebStorageTypeEnum; },
|
|
158
|
-
"canConsumeForm": function() { return /* reexport */ canConsumeForm; },
|
|
159
112
|
"querystring": function() { return /* reexport */ querystring; }
|
|
160
113
|
});
|
|
161
114
|
|
|
162
|
-
;// CONCATENATED MODULE: ./src/
|
|
115
|
+
;// CONCATENATED MODULE: ./src/generated/runtime.ts
|
|
163
116
|
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); }
|
|
164
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
165
117
|
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); }
|
|
166
118
|
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); }; }
|
|
167
119
|
function _possibleConstructorReturn(self, call) { if (call && (_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); }
|
|
@@ -172,19 +124,6 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
172
124
|
function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; }
|
|
173
125
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
174
126
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
175
|
-
function _invoke(body, then) {
|
|
176
|
-
var result = body();
|
|
177
|
-
if (result && result.then) {
|
|
178
|
-
return result.then(then);
|
|
179
|
-
}
|
|
180
|
-
return then(result);
|
|
181
|
-
}
|
|
182
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
183
|
-
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."); }
|
|
184
|
-
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); }
|
|
185
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
186
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
187
|
-
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; }
|
|
188
127
|
function _await(value, then, direct) {
|
|
189
128
|
if (direct) {
|
|
190
129
|
return then ? then(value) : value;
|
|
@@ -194,170 +133,6 @@ function _await(value, then, direct) {
|
|
|
194
133
|
}
|
|
195
134
|
return then ? value.then(then) : value;
|
|
196
135
|
}
|
|
197
|
-
function _empty() {}
|
|
198
|
-
function _invokeIgnored(body) {
|
|
199
|
-
var result = body();
|
|
200
|
-
if (result && result.then) {
|
|
201
|
-
return result.then(_empty);
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
var _iteratorSymbol = /*#__PURE__*/typeof Symbol !== "undefined" ? Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator")) : "@@iterator";
|
|
205
|
-
function _settle(pact, state, value) {
|
|
206
|
-
if (!pact.s) {
|
|
207
|
-
if (value instanceof _Pact) {
|
|
208
|
-
if (value.s) {
|
|
209
|
-
if (state & 1) {
|
|
210
|
-
state = value.s;
|
|
211
|
-
}
|
|
212
|
-
value = value.v;
|
|
213
|
-
} else {
|
|
214
|
-
value.o = _settle.bind(null, pact, state);
|
|
215
|
-
return;
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
if (value && value.then) {
|
|
219
|
-
value.then(_settle.bind(null, pact, state), _settle.bind(null, pact, 2));
|
|
220
|
-
return;
|
|
221
|
-
}
|
|
222
|
-
pact.s = state;
|
|
223
|
-
pact.v = value;
|
|
224
|
-
var observer = pact.o;
|
|
225
|
-
if (observer) {
|
|
226
|
-
observer(pact);
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
var _Pact = /*#__PURE__*/function () {
|
|
231
|
-
function _Pact() {}
|
|
232
|
-
_Pact.prototype.then = function (onFulfilled, onRejected) {
|
|
233
|
-
var result = new _Pact();
|
|
234
|
-
var state = this.s;
|
|
235
|
-
if (state) {
|
|
236
|
-
var callback = state & 1 ? onFulfilled : onRejected;
|
|
237
|
-
if (callback) {
|
|
238
|
-
try {
|
|
239
|
-
_settle(result, 1, callback(this.v));
|
|
240
|
-
} catch (e) {
|
|
241
|
-
_settle(result, 2, e);
|
|
242
|
-
}
|
|
243
|
-
return result;
|
|
244
|
-
} else {
|
|
245
|
-
return this;
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
this.o = function (_this) {
|
|
249
|
-
try {
|
|
250
|
-
var value = _this.v;
|
|
251
|
-
if (_this.s & 1) {
|
|
252
|
-
_settle(result, 1, onFulfilled ? onFulfilled(value) : value);
|
|
253
|
-
} else if (onRejected) {
|
|
254
|
-
_settle(result, 1, onRejected(value));
|
|
255
|
-
} else {
|
|
256
|
-
_settle(result, 2, value);
|
|
257
|
-
}
|
|
258
|
-
} catch (e) {
|
|
259
|
-
_settle(result, 2, e);
|
|
260
|
-
}
|
|
261
|
-
};
|
|
262
|
-
return result;
|
|
263
|
-
};
|
|
264
|
-
return _Pact;
|
|
265
|
-
}();
|
|
266
|
-
function _isSettledPact(thenable) {
|
|
267
|
-
return thenable instanceof _Pact && thenable.s & 1;
|
|
268
|
-
}
|
|
269
|
-
function _forTo(array, body, check) {
|
|
270
|
-
var i = -1,
|
|
271
|
-
pact,
|
|
272
|
-
reject;
|
|
273
|
-
function _cycle(result) {
|
|
274
|
-
try {
|
|
275
|
-
while (++i < array.length && (!check || !check())) {
|
|
276
|
-
result = body(i);
|
|
277
|
-
if (result && result.then) {
|
|
278
|
-
if (_isSettledPact(result)) {
|
|
279
|
-
result = result.v;
|
|
280
|
-
} else {
|
|
281
|
-
result.then(_cycle, reject || (reject = _settle.bind(null, pact = new _Pact(), 2)));
|
|
282
|
-
return;
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
if (pact) {
|
|
287
|
-
_settle(pact, 1, result);
|
|
288
|
-
} else {
|
|
289
|
-
pact = result;
|
|
290
|
-
}
|
|
291
|
-
} catch (e) {
|
|
292
|
-
_settle(pact || (pact = new _Pact()), 2, e);
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
_cycle();
|
|
296
|
-
return pact;
|
|
297
|
-
}
|
|
298
|
-
function _forOf(target, body, check) {
|
|
299
|
-
if (typeof target[_iteratorSymbol] === "function") {
|
|
300
|
-
var _cycle = function _cycle(result) {
|
|
301
|
-
try {
|
|
302
|
-
while (!(step = iterator.next()).done && (!check || !check())) {
|
|
303
|
-
result = body(step.value);
|
|
304
|
-
if (result && result.then) {
|
|
305
|
-
if (_isSettledPact(result)) {
|
|
306
|
-
result = result.v;
|
|
307
|
-
} else {
|
|
308
|
-
result.then(_cycle, reject || (reject = _settle.bind(null, pact = new _Pact(), 2)));
|
|
309
|
-
return;
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
if (pact) {
|
|
314
|
-
_settle(pact, 1, result);
|
|
315
|
-
} else {
|
|
316
|
-
pact = result;
|
|
317
|
-
}
|
|
318
|
-
} catch (e) {
|
|
319
|
-
_settle(pact || (pact = new _Pact()), 2, e);
|
|
320
|
-
}
|
|
321
|
-
};
|
|
322
|
-
var iterator = target[_iteratorSymbol](),
|
|
323
|
-
step,
|
|
324
|
-
pact,
|
|
325
|
-
reject;
|
|
326
|
-
_cycle();
|
|
327
|
-
if (iterator["return"]) {
|
|
328
|
-
var _fixup = function _fixup(value) {
|
|
329
|
-
try {
|
|
330
|
-
if (!step.done) {
|
|
331
|
-
iterator["return"]();
|
|
332
|
-
}
|
|
333
|
-
} catch (e) {}
|
|
334
|
-
return value;
|
|
335
|
-
};
|
|
336
|
-
if (pact && pact.then) {
|
|
337
|
-
return pact.then(_fixup, function (e) {
|
|
338
|
-
throw _fixup(e);
|
|
339
|
-
});
|
|
340
|
-
}
|
|
341
|
-
_fixup();
|
|
342
|
-
}
|
|
343
|
-
return pact;
|
|
344
|
-
}
|
|
345
|
-
// No support for Symbol.iterator
|
|
346
|
-
if (!("length" in target)) {
|
|
347
|
-
throw new TypeError("Object is not iterable");
|
|
348
|
-
}
|
|
349
|
-
// Handle live collections properly
|
|
350
|
-
var values = [];
|
|
351
|
-
for (var i = 0; i < target.length; i++) {
|
|
352
|
-
values.push(target[i]);
|
|
353
|
-
}
|
|
354
|
-
return _forTo(values, function (i) {
|
|
355
|
-
return body(values[i]);
|
|
356
|
-
}, check);
|
|
357
|
-
}
|
|
358
|
-
function _continue(value, then) {
|
|
359
|
-
return value && value.then ? value.then(then) : then(value);
|
|
360
|
-
}
|
|
361
136
|
function _catch(body, recover) {
|
|
362
137
|
try {
|
|
363
138
|
var result = body();
|
|
@@ -369,6 +144,9 @@ function _catch(body, recover) {
|
|
|
369
144
|
}
|
|
370
145
|
return result;
|
|
371
146
|
}
|
|
147
|
+
function _continue(value, then) {
|
|
148
|
+
return value && value.then ? value.then(then) : then(value);
|
|
149
|
+
}
|
|
372
150
|
function _async(f) {
|
|
373
151
|
return function () {
|
|
374
152
|
for (var args = [], i = 0; i < arguments.length; i++) {
|
|
@@ -381,13 +159,21 @@ function _async(f) {
|
|
|
381
159
|
}
|
|
382
160
|
};
|
|
383
161
|
}
|
|
162
|
+
function _empty() {}
|
|
163
|
+
function _invoke(body, then) {
|
|
164
|
+
var result = body();
|
|
165
|
+
if (result && result.then) {
|
|
166
|
+
return result.then(then);
|
|
167
|
+
}
|
|
168
|
+
return then(result);
|
|
169
|
+
}
|
|
384
170
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
385
171
|
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); } }
|
|
386
172
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
387
173
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
388
174
|
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); }
|
|
389
175
|
/**
|
|
390
|
-
* @bytescale/
|
|
176
|
+
* @bytescale/api
|
|
391
177
|
* Bytescale API
|
|
392
178
|
*
|
|
393
179
|
* The version of the OpenAPI document: 2.0.0
|
|
@@ -398,200 +184,46 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
398
184
|
* Do not edit the class manually.
|
|
399
185
|
*/
|
|
400
186
|
var BASE_PATH = "https://api.bytescale.com".replace(/\/+$/, "");
|
|
401
|
-
var Configuration = /*#__PURE__*/function () {
|
|
402
|
-
function Configuration() {
|
|
403
|
-
var configuration = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
404
|
-
_classCallCheck(this, Configuration);
|
|
405
|
-
this.configuration = configuration;
|
|
406
|
-
}
|
|
407
|
-
_createClass(Configuration, [{
|
|
408
|
-
key: "config",
|
|
409
|
-
set: function set(configuration) {
|
|
410
|
-
this.configuration = configuration;
|
|
411
|
-
}
|
|
412
|
-
}, {
|
|
413
|
-
key: "basePath",
|
|
414
|
-
get: function get() {
|
|
415
|
-
return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH;
|
|
416
|
-
}
|
|
417
|
-
}, {
|
|
418
|
-
key: "fetchApi",
|
|
419
|
-
get: function get() {
|
|
420
|
-
return this.configuration.fetchApi;
|
|
421
|
-
}
|
|
422
|
-
}, {
|
|
423
|
-
key: "middleware",
|
|
424
|
-
get: function get() {
|
|
425
|
-
return this.configuration.middleware || [];
|
|
426
|
-
}
|
|
427
|
-
}, {
|
|
428
|
-
key: "queryParamsStringify",
|
|
429
|
-
get: function get() {
|
|
430
|
-
return this.configuration.queryParamsStringify || querystring;
|
|
431
|
-
}
|
|
432
|
-
}, {
|
|
433
|
-
key: "username",
|
|
434
|
-
get: function get() {
|
|
435
|
-
return this.configuration.username;
|
|
436
|
-
}
|
|
437
|
-
}, {
|
|
438
|
-
key: "password",
|
|
439
|
-
get: function get() {
|
|
440
|
-
return this.configuration.password;
|
|
441
|
-
}
|
|
442
|
-
}, {
|
|
443
|
-
key: "apiKey",
|
|
444
|
-
get: function get() {
|
|
445
|
-
var apiKey = this.configuration.apiKey;
|
|
446
|
-
if (apiKey) {
|
|
447
|
-
return typeof apiKey === "function" ? apiKey : function (name) {
|
|
448
|
-
return name === "Authorization" ? "Bearer ".concat(apiKey) : apiKey;
|
|
449
|
-
};
|
|
450
|
-
}
|
|
451
|
-
return undefined;
|
|
452
|
-
}
|
|
453
|
-
}, {
|
|
454
|
-
key: "accessToken",
|
|
455
|
-
get: function get() {
|
|
456
|
-
var accessToken = this.configuration.accessToken;
|
|
457
|
-
if (accessToken) {
|
|
458
|
-
return typeof accessToken === "function" ? accessToken : function () {
|
|
459
|
-
return _await(accessToken);
|
|
460
|
-
};
|
|
461
|
-
}
|
|
462
|
-
return undefined;
|
|
463
|
-
}
|
|
464
|
-
}, {
|
|
465
|
-
key: "headers",
|
|
466
|
-
get: function get() {
|
|
467
|
-
return this.configuration.headers;
|
|
468
|
-
}
|
|
469
|
-
}, {
|
|
470
|
-
key: "credentials",
|
|
471
|
-
get: function get() {
|
|
472
|
-
return this.configuration.credentials;
|
|
473
|
-
}
|
|
474
|
-
}]);
|
|
475
|
-
return Configuration;
|
|
476
|
-
}();
|
|
477
|
-
var DefaultConfig = new Configuration();
|
|
478
187
|
/**
|
|
479
188
|
* This is the base class for all generated API classes.
|
|
480
189
|
*/
|
|
481
190
|
var BaseAPI = /*#__PURE__*/function () {
|
|
482
|
-
function BaseAPI() {
|
|
191
|
+
function BaseAPI(config) {
|
|
483
192
|
var _this = this;
|
|
484
|
-
var configuration = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DefaultConfig;
|
|
485
193
|
_classCallCheck(this, BaseAPI);
|
|
486
|
-
this.
|
|
194
|
+
this.config = config;
|
|
487
195
|
this.fetchApi = _async(function (url, init) {
|
|
196
|
+
var _exit = false;
|
|
488
197
|
var fetchParams = {
|
|
489
198
|
url: url,
|
|
490
199
|
init: init
|
|
491
200
|
};
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
fetch: _this.fetchApi
|
|
497
|
-
}, fetchParams)), function (_middleware$pre) {
|
|
498
|
-
fetchParams = _middleware$pre || fetchParams;
|
|
499
|
-
});
|
|
500
|
-
}
|
|
501
|
-
});
|
|
502
|
-
}), function () {
|
|
503
|
-
var _exit = false;
|
|
504
|
-
var response = undefined;
|
|
505
|
-
return _continue(_catch(function () {
|
|
506
|
-
return _await((_this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init), function (_temp) {
|
|
507
|
-
response = _temp;
|
|
508
|
-
});
|
|
509
|
-
}, function (e) {
|
|
510
|
-
return _continue(_forOf(_this.middleware, function (middleware) {
|
|
511
|
-
return _invokeIgnored(function () {
|
|
512
|
-
if (middleware.onError) {
|
|
513
|
-
return _await(middleware.onError({
|
|
514
|
-
fetch: _this.fetchApi,
|
|
515
|
-
url: fetchParams.url,
|
|
516
|
-
init: fetchParams.init,
|
|
517
|
-
error: e,
|
|
518
|
-
response: response ? response.clone() : undefined
|
|
519
|
-
}), function (_middleware$onError) {
|
|
520
|
-
response = _middleware$onError || response;
|
|
521
|
-
});
|
|
522
|
-
}
|
|
523
|
-
});
|
|
524
|
-
}), function () {
|
|
525
|
-
if (response === undefined) {
|
|
526
|
-
if (e instanceof Error) {
|
|
527
|
-
throw new FetchError(e, "The request failed and the interceptors did not return an alternative response");
|
|
528
|
-
} else {
|
|
529
|
-
throw e;
|
|
530
|
-
}
|
|
531
|
-
}
|
|
532
|
-
});
|
|
533
|
-
}), function (_result) {
|
|
534
|
-
return _exit ? _result : _continue(_forOf(_this.middleware, function (middleware) {
|
|
535
|
-
return _invokeIgnored(function () {
|
|
536
|
-
if (middleware.post) {
|
|
537
|
-
return _await(middleware.post({
|
|
538
|
-
fetch: _this.fetchApi,
|
|
539
|
-
url: fetchParams.url,
|
|
540
|
-
init: fetchParams.init,
|
|
541
|
-
response: response.clone()
|
|
542
|
-
}), function (_middleware$post) {
|
|
543
|
-
response = _middleware$post || response;
|
|
544
|
-
});
|
|
545
|
-
}
|
|
546
|
-
});
|
|
547
|
-
}), function () {
|
|
548
|
-
return response;
|
|
549
|
-
});
|
|
201
|
+
var response = undefined;
|
|
202
|
+
return _continue(_catch(function () {
|
|
203
|
+
return _await((_this.config.fetchApi || fetch)(fetchParams.url, fetchParams.init), function (_temp) {
|
|
204
|
+
response = _temp;
|
|
550
205
|
});
|
|
206
|
+
}, function (e) {
|
|
207
|
+
if (response === undefined) {
|
|
208
|
+
if (e instanceof Error) {
|
|
209
|
+
throw new FetchError(e, "The request failed and the interceptors did not return an alternative response");
|
|
210
|
+
} else {
|
|
211
|
+
throw e;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}), function (_result) {
|
|
215
|
+
return _exit ? _result : response;
|
|
551
216
|
});
|
|
552
217
|
});
|
|
553
|
-
this.middleware = configuration.middleware;
|
|
554
218
|
}
|
|
555
219
|
_createClass(BaseAPI, [{
|
|
556
|
-
key: "withMiddleware",
|
|
557
|
-
value: function withMiddleware() {
|
|
558
|
-
var _next$middleware;
|
|
559
|
-
var next = this.clone();
|
|
560
|
-
next.middleware = (_next$middleware = next.middleware).concat.apply(_next$middleware, arguments);
|
|
561
|
-
return next;
|
|
562
|
-
}
|
|
563
|
-
}, {
|
|
564
|
-
key: "withPreMiddleware",
|
|
565
|
-
value: function withPreMiddleware() {
|
|
566
|
-
for (var _len = arguments.length, preMiddlewares = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
567
|
-
preMiddlewares[_key] = arguments[_key];
|
|
568
|
-
}
|
|
569
|
-
var middlewares = preMiddlewares.map(function (pre) {
|
|
570
|
-
return {
|
|
571
|
-
pre: pre
|
|
572
|
-
};
|
|
573
|
-
});
|
|
574
|
-
return this.withMiddleware.apply(this, _toConsumableArray(middlewares));
|
|
575
|
-
}
|
|
576
|
-
}, {
|
|
577
|
-
key: "withPostMiddleware",
|
|
578
|
-
value: function withPostMiddleware() {
|
|
579
|
-
for (var _len2 = arguments.length, postMiddlewares = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
580
|
-
postMiddlewares[_key2] = arguments[_key2];
|
|
581
|
-
}
|
|
582
|
-
var middlewares = postMiddlewares.map(function (post) {
|
|
583
|
-
return {
|
|
584
|
-
post: post
|
|
585
|
-
};
|
|
586
|
-
});
|
|
587
|
-
return this.withMiddleware.apply(this, _toConsumableArray(middlewares));
|
|
588
|
-
}
|
|
589
|
-
}, {
|
|
590
220
|
key: "request",
|
|
591
221
|
value: function request(context, initOverrides, operationBasePathOverride) {
|
|
592
222
|
try {
|
|
593
223
|
var _this3 = this;
|
|
594
224
|
var _a;
|
|
225
|
+
var apiKey = _this3.config.apiKey;
|
|
226
|
+
context.headers["Authorization"] = "Bearer ".concat(apiKey); // authorization-header authentication
|
|
595
227
|
return _await(_this3.createFetchParams(context, initOverrides, operationBasePathOverride), function (_ref) {
|
|
596
228
|
var url = _ref.url,
|
|
597
229
|
init = _ref.init;
|
|
@@ -606,7 +238,7 @@ var BaseAPI = /*#__PURE__*/function () {
|
|
|
606
238
|
});
|
|
607
239
|
}, _empty), function () {
|
|
608
240
|
if (typeof ((_a = jsonError === null || jsonError === void 0 ? void 0 : jsonError.error) === null || _a === void 0 ? void 0 : _a.code) === "string") {
|
|
609
|
-
throw new
|
|
241
|
+
throw new BytescaleApiError(jsonError);
|
|
610
242
|
}
|
|
611
243
|
});
|
|
612
244
|
}
|
|
@@ -620,61 +252,57 @@ var BaseAPI = /*#__PURE__*/function () {
|
|
|
620
252
|
return Promise.reject(e);
|
|
621
253
|
}
|
|
622
254
|
}
|
|
255
|
+
}, {
|
|
256
|
+
key: "encodeParam",
|
|
257
|
+
value: function encodeParam(paramName, paramValue) {
|
|
258
|
+
return paramName === "filePath" ? paramValue : encodeURIComponent(paramValue);
|
|
259
|
+
}
|
|
623
260
|
}, {
|
|
624
261
|
key: "createFetchParams",
|
|
625
262
|
value: function createFetchParams(context, initOverrides, operationBasePathOverride) {
|
|
626
263
|
try {
|
|
627
264
|
var _this5 = this;
|
|
628
|
-
var url = (operationBasePathOverride !== null && operationBasePathOverride !== void 0 ? operationBasePathOverride :
|
|
265
|
+
var url = (operationBasePathOverride !== null && operationBasePathOverride !== void 0 ? operationBasePathOverride : BASE_PATH) + context.path;
|
|
629
266
|
if (context.query !== undefined && Object.keys(context.query).length !== 0) {
|
|
630
267
|
// only add the querystring to the URL if there are query parameters.
|
|
631
268
|
// this is done to avoid urls ending with a "?" character which buggy webservers
|
|
632
269
|
// do not handle correctly sometimes.
|
|
633
|
-
url += "?" +
|
|
634
|
-
}
|
|
635
|
-
var
|
|
636
|
-
Object.
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
};
|
|
642
|
-
var initParams = {
|
|
643
|
-
method: context.method,
|
|
644
|
-
headers: headers,
|
|
645
|
-
body: context.body,
|
|
646
|
-
credentials: _this5.configuration.credentials
|
|
647
|
-
};
|
|
648
|
-
var _Object$assign2 = Object.assign({}, initParams);
|
|
649
|
-
return _await(initOverrideFn({
|
|
650
|
-
init: initParams,
|
|
651
|
-
context: context
|
|
652
|
-
}), function (_initOverrideFn) {
|
|
653
|
-
var overriddenInit = Object.assign(_Object$assign2, _initOverrideFn);
|
|
654
|
-
var init = Object.assign(Object.assign({}, overriddenInit), {
|
|
655
|
-
body: isFormData(overriddenInit.body) || overriddenInit.body instanceof URLSearchParams || isBlob(overriddenInit.body) ? overriddenInit.body : JSON.stringify(overriddenInit.body)
|
|
270
|
+
url += "?" + querystring(context.query);
|
|
271
|
+
}
|
|
272
|
+
var configHeaders = _this5.config.headers;
|
|
273
|
+
var _Object$assign3 = Object.assign({}, context.headers);
|
|
274
|
+
return _await(configHeaders === undefined ? {} : configHeaders(), function (_configHeaders) {
|
|
275
|
+
var headers = Object.assign(_Object$assign3, _configHeaders);
|
|
276
|
+
Object.keys(headers).forEach(function (key) {
|
|
277
|
+
return headers[key] === undefined ? delete headers[key] : {};
|
|
656
278
|
});
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
init: init
|
|
279
|
+
var initOverrideFn = typeof initOverrides === "function" ? initOverrides : function () {
|
|
280
|
+
return _await(initOverrides);
|
|
660
281
|
};
|
|
661
|
-
|
|
282
|
+
var initParams = {
|
|
283
|
+
method: context.method,
|
|
284
|
+
headers: headers,
|
|
285
|
+
body: context.body
|
|
286
|
+
};
|
|
287
|
+
var _Object$assign2 = Object.assign({}, initParams);
|
|
288
|
+
return _await(initOverrideFn({
|
|
289
|
+
init: initParams,
|
|
290
|
+
context: context
|
|
291
|
+
}), function (_initOverrideFn) {
|
|
292
|
+
var overriddenInit = Object.assign(_Object$assign2, _initOverrideFn);
|
|
293
|
+
var init = Object.assign(Object.assign({}, overriddenInit), {
|
|
294
|
+
body: isFormData(overriddenInit.body) || overriddenInit.body instanceof URLSearchParams || isBlob(overriddenInit.body) ? overriddenInit.body : JSON.stringify(overriddenInit.body)
|
|
295
|
+
});
|
|
296
|
+
return {
|
|
297
|
+
url: url,
|
|
298
|
+
init: init
|
|
299
|
+
};
|
|
300
|
+
});
|
|
301
|
+
}, configHeaders === undefined);
|
|
662
302
|
} catch (e) {
|
|
663
303
|
return Promise.reject(e);
|
|
664
304
|
}
|
|
665
305
|
}
|
|
666
|
-
/**
|
|
667
|
-
* Create a shallow clone of `this` by constructing a new instance
|
|
668
|
-
* and then shallow cloning data members.
|
|
669
|
-
*/
|
|
670
|
-
}, {
|
|
671
|
-
key: "clone",
|
|
672
|
-
value: function clone() {
|
|
673
|
-
var constructor = this.constructor;
|
|
674
|
-
var next = new constructor(this.configuration);
|
|
675
|
-
next.middleware = this.middleware.slice();
|
|
676
|
-
return next;
|
|
677
|
-
}
|
|
678
306
|
}]);
|
|
679
307
|
return BaseAPI;
|
|
680
308
|
}();
|
|
@@ -684,19 +312,19 @@ function isBlob(value) {
|
|
|
684
312
|
function isFormData(value) {
|
|
685
313
|
return typeof FormData !== "undefined" && value instanceof FormData;
|
|
686
314
|
}
|
|
687
|
-
var
|
|
688
|
-
_inherits(
|
|
689
|
-
var _super = _createSuper(
|
|
690
|
-
function
|
|
315
|
+
var BytescaleApiError = /*#__PURE__*/function (_Error) {
|
|
316
|
+
_inherits(BytescaleApiError, _Error);
|
|
317
|
+
var _super = _createSuper(BytescaleApiError);
|
|
318
|
+
function BytescaleApiError(response) {
|
|
691
319
|
var _this6;
|
|
692
|
-
_classCallCheck(this,
|
|
320
|
+
_classCallCheck(this, BytescaleApiError);
|
|
693
321
|
_this6 = _super.call(this, response.error.message);
|
|
694
|
-
_this6.name = "
|
|
322
|
+
_this6.name = "BytescaleApiError";
|
|
695
323
|
_this6.errorCode = response.error.code;
|
|
696
324
|
_this6.details = response.error.details;
|
|
697
325
|
return _this6;
|
|
698
326
|
}
|
|
699
|
-
return _createClass(
|
|
327
|
+
return _createClass(BytescaleApiError);
|
|
700
328
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
701
329
|
var ResponseError = /*#__PURE__*/function (_Error2) {
|
|
702
330
|
_inherits(ResponseError, _Error2);
|
|
@@ -737,12 +365,6 @@ var RequiredError = /*#__PURE__*/function (_Error4) {
|
|
|
737
365
|
}
|
|
738
366
|
return _createClass(RequiredError);
|
|
739
367
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
740
|
-
var COLLECTION_FORMATS = {
|
|
741
|
-
csv: ",",
|
|
742
|
-
ssv: " ",
|
|
743
|
-
tsv: "\t",
|
|
744
|
-
pipes: "|"
|
|
745
|
-
};
|
|
746
368
|
function querystring(params) {
|
|
747
369
|
var prefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
748
370
|
return Object.keys(params).map(function (key) {
|
|
@@ -772,23 +394,6 @@ function querystringSingleKey(key, value) {
|
|
|
772
394
|
}
|
|
773
395
|
return "".concat(encodeURIComponent(fullKey), "=").concat(encodeURIComponent(String(value)));
|
|
774
396
|
}
|
|
775
|
-
function canConsumeForm(consumes) {
|
|
776
|
-
var _iterator = _createForOfIteratorHelper(consumes),
|
|
777
|
-
_step;
|
|
778
|
-
try {
|
|
779
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
780
|
-
var consume = _step.value;
|
|
781
|
-
if ("multipart/form-data" === consume.contentType) {
|
|
782
|
-
return true;
|
|
783
|
-
}
|
|
784
|
-
}
|
|
785
|
-
} catch (err) {
|
|
786
|
-
_iterator.e(err);
|
|
787
|
-
} finally {
|
|
788
|
-
_iterator.f();
|
|
789
|
-
}
|
|
790
|
-
return false;
|
|
791
|
-
}
|
|
792
397
|
var JSONApiResponse = /*#__PURE__*/function () {
|
|
793
398
|
function JSONApiResponse(raw) {
|
|
794
399
|
var transformer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (jsonValue) {
|
|
@@ -876,25 +481,7 @@ var BinaryResult = /*#__PURE__*/function () {
|
|
|
876
481
|
}]);
|
|
877
482
|
return BinaryResult;
|
|
878
483
|
}();
|
|
879
|
-
|
|
880
|
-
function TextApiResponse(raw) {
|
|
881
|
-
_classCallCheck(this, TextApiResponse);
|
|
882
|
-
this.raw = raw;
|
|
883
|
-
}
|
|
884
|
-
_createClass(TextApiResponse, [{
|
|
885
|
-
key: "value",
|
|
886
|
-
value: function value() {
|
|
887
|
-
try {
|
|
888
|
-
var _this19 = this;
|
|
889
|
-
return _await(_this19.raw.text());
|
|
890
|
-
} catch (e) {
|
|
891
|
-
return Promise.reject(e);
|
|
892
|
-
}
|
|
893
|
-
}
|
|
894
|
-
}]);
|
|
895
|
-
return TextApiResponse;
|
|
896
|
-
}();
|
|
897
|
-
;// CONCATENATED MODULE: ./src/gen/apis/FileApi.ts
|
|
484
|
+
;// CONCATENATED MODULE: ./src/generated/apis/FileApi.ts
|
|
898
485
|
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); }
|
|
899
486
|
function FileApi_await(value, then, direct) {
|
|
900
487
|
if (direct) {
|
|
@@ -905,12 +492,6 @@ function FileApi_await(value, then, direct) {
|
|
|
905
492
|
}
|
|
906
493
|
return then ? value.then(then) : value;
|
|
907
494
|
}
|
|
908
|
-
function FileApi_empty() {}
|
|
909
|
-
function _awaitIgnored(value, direct) {
|
|
910
|
-
if (!direct) {
|
|
911
|
-
return value && value.then ? value.then(FileApi_empty) : Promise.resolve();
|
|
912
|
-
}
|
|
913
|
-
}
|
|
914
495
|
function FileApi_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
915
496
|
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); } }
|
|
916
497
|
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; }
|
|
@@ -926,7 +507,7 @@ function FileApi_getPrototypeOf(o) { FileApi_getPrototypeOf = Object.setPrototyp
|
|
|
926
507
|
/* tslint:disable */
|
|
927
508
|
/* eslint-disable */
|
|
928
509
|
/**
|
|
929
|
-
* @bytescale/
|
|
510
|
+
* @bytescale/api
|
|
930
511
|
* Bytescale API
|
|
931
512
|
*
|
|
932
513
|
* The version of the OpenAPI document: 2.0.0
|
|
@@ -949,320 +530,168 @@ var FileApi = /*#__PURE__*/function (_runtime$BaseAPI) {
|
|
|
949
530
|
return _super.apply(this, arguments);
|
|
950
531
|
}
|
|
951
532
|
FileApi_createClass(FileApi, [{
|
|
952
|
-
key: "
|
|
533
|
+
key: "copyFile",
|
|
953
534
|
value:
|
|
954
535
|
/**
|
|
955
536
|
* Copies a file synchronously.
|
|
956
537
|
*/
|
|
957
|
-
function
|
|
538
|
+
function copyFile(params) {
|
|
958
539
|
try {
|
|
959
540
|
var _this2 = this;
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
if (requestParameters.copyFileRequest === null || requestParameters.copyFileRequest === undefined) {
|
|
964
|
-
throw new RequiredError("copyFileRequest", "Required parameter requestParameters.copyFileRequest was null or undefined when calling copyFile.");
|
|
965
|
-
}
|
|
966
|
-
var queryParameters = {};
|
|
967
|
-
var headerParameters = {};
|
|
968
|
-
headerParameters["Content-Type"] = "application/json";
|
|
969
|
-
if (_this2.configuration && _this2.configuration.apiKey) {
|
|
970
|
-
headerParameters["Authorization"] = _this2.configuration.apiKey("Authorization"); // authorization-header authentication
|
|
971
|
-
}
|
|
972
|
-
|
|
973
|
-
var operationBasePathOverride = [][0];
|
|
541
|
+
var query = {};
|
|
542
|
+
var headers = {};
|
|
543
|
+
headers["Content-Type"] = "application/json";
|
|
974
544
|
return FileApi_await(_this2.request({
|
|
975
545
|
path: "/v2/accounts/{accountId}/files/copy".replace("{".concat("accountId", "}"),
|
|
976
546
|
// @ts-ignore
|
|
977
|
-
|
|
547
|
+
_this2.encodeParam("accountId", params.accountId)),
|
|
978
548
|
method: "POST",
|
|
979
|
-
headers:
|
|
980
|
-
query:
|
|
981
|
-
body:
|
|
982
|
-
},
|
|
983
|
-
return new JSONApiResponse(response);
|
|
549
|
+
headers: headers,
|
|
550
|
+
query: query,
|
|
551
|
+
body: params.copyFileRequest
|
|
552
|
+
}, undefined, [][0]), function (response) {
|
|
553
|
+
return FileApi_await(new JSONApiResponse(response).value());
|
|
984
554
|
});
|
|
985
555
|
} catch (e) {
|
|
986
556
|
return Promise.reject(e);
|
|
987
557
|
}
|
|
988
558
|
}
|
|
989
559
|
/**
|
|
990
|
-
* Copies
|
|
560
|
+
* Copies multiple files asynchronously.
|
|
991
561
|
*/
|
|
992
562
|
}, {
|
|
993
|
-
key: "
|
|
994
|
-
value: function
|
|
563
|
+
key: "copyFileBatch",
|
|
564
|
+
value: function copyFileBatch(params) {
|
|
995
565
|
try {
|
|
996
566
|
var _this4 = this;
|
|
997
|
-
|
|
998
|
-
|
|
567
|
+
var query = {};
|
|
568
|
+
var headers = {};
|
|
569
|
+
headers["Content-Type"] = "application/json";
|
|
570
|
+
return FileApi_await(_this4.request({
|
|
571
|
+
path: "/v2/accounts/{accountId}/files/copy/batch".replace("{".concat("accountId", "}"),
|
|
572
|
+
// @ts-ignore
|
|
573
|
+
_this4.encodeParam("accountId", params.accountId)),
|
|
574
|
+
method: "POST",
|
|
575
|
+
headers: headers,
|
|
576
|
+
query: query,
|
|
577
|
+
body: params.copyFileBatchRequest
|
|
578
|
+
}, undefined, [][0]), function (response) {
|
|
579
|
+
return FileApi_await(new JSONApiResponse(response).value());
|
|
999
580
|
});
|
|
1000
581
|
} catch (e) {
|
|
1001
582
|
return Promise.reject(e);
|
|
1002
583
|
}
|
|
1003
584
|
}
|
|
1004
585
|
/**
|
|
1005
|
-
*
|
|
586
|
+
* Deletes a file synchronously.
|
|
1006
587
|
*/
|
|
1007
588
|
}, {
|
|
1008
|
-
key: "
|
|
1009
|
-
value: function
|
|
589
|
+
key: "deleteFile",
|
|
590
|
+
value: function deleteFile(params) {
|
|
1010
591
|
try {
|
|
1011
592
|
var _this6 = this;
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
if (requestParameters.copyFileBatchRequest === null || requestParameters.copyFileBatchRequest === undefined) {
|
|
1016
|
-
throw new RequiredError("copyFileBatchRequest", "Required parameter requestParameters.copyFileBatchRequest was null or undefined when calling copyFileBatch.");
|
|
1017
|
-
}
|
|
1018
|
-
var queryParameters = {};
|
|
1019
|
-
var headerParameters = {};
|
|
1020
|
-
headerParameters["Content-Type"] = "application/json";
|
|
1021
|
-
if (_this6.configuration && _this6.configuration.apiKey) {
|
|
1022
|
-
headerParameters["Authorization"] = _this6.configuration.apiKey("Authorization"); // authorization-header authentication
|
|
593
|
+
var query = {};
|
|
594
|
+
if (params.filePath !== undefined) {
|
|
595
|
+
query["filePath"] = params.filePath;
|
|
1023
596
|
}
|
|
1024
|
-
|
|
1025
|
-
var operationBasePathOverride = [][0];
|
|
597
|
+
var headers = {};
|
|
1026
598
|
return FileApi_await(_this6.request({
|
|
1027
|
-
path: "/v2/accounts/{accountId}/files
|
|
599
|
+
path: "/v2/accounts/{accountId}/files".replace("{".concat("accountId", "}"),
|
|
1028
600
|
// @ts-ignore
|
|
1029
|
-
|
|
1030
|
-
method: "
|
|
1031
|
-
headers:
|
|
1032
|
-
query:
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
return new JSONApiResponse(response);
|
|
601
|
+
_this6.encodeParam("accountId", params.accountId)),
|
|
602
|
+
method: "DELETE",
|
|
603
|
+
headers: headers,
|
|
604
|
+
query: query
|
|
605
|
+
}, undefined, [][0]), function (response) {
|
|
606
|
+
return FileApi_await(new VoidApiResponse(response).value());
|
|
1036
607
|
});
|
|
1037
608
|
} catch (e) {
|
|
1038
609
|
return Promise.reject(e);
|
|
1039
610
|
}
|
|
1040
611
|
}
|
|
1041
612
|
/**
|
|
1042
|
-
*
|
|
613
|
+
* Deletes multiple files asynchronously.
|
|
1043
614
|
*/
|
|
1044
615
|
}, {
|
|
1045
|
-
key: "
|
|
1046
|
-
value: function
|
|
616
|
+
key: "deleteFileBatch",
|
|
617
|
+
value: function deleteFileBatch(params) {
|
|
1047
618
|
try {
|
|
1048
619
|
var _this8 = this;
|
|
1049
|
-
|
|
1050
|
-
|
|
620
|
+
var query = {};
|
|
621
|
+
var headers = {};
|
|
622
|
+
headers["Content-Type"] = "application/json";
|
|
623
|
+
return FileApi_await(_this8.request({
|
|
624
|
+
path: "/v2/accounts/{accountId}/files/batch".replace("{".concat("accountId", "}"),
|
|
625
|
+
// @ts-ignore
|
|
626
|
+
_this8.encodeParam("accountId", params.accountId)),
|
|
627
|
+
method: "DELETE",
|
|
628
|
+
headers: headers,
|
|
629
|
+
query: query,
|
|
630
|
+
body: params.deleteFileBatchRequest
|
|
631
|
+
}, undefined, [][0]), function (response) {
|
|
632
|
+
return FileApi_await(new JSONApiResponse(response).value());
|
|
1051
633
|
});
|
|
1052
634
|
} catch (e) {
|
|
1053
635
|
return Promise.reject(e);
|
|
1054
636
|
}
|
|
1055
637
|
}
|
|
1056
638
|
/**
|
|
1057
|
-
*
|
|
639
|
+
* Downloads a file in its original/unprocessed state.
|
|
1058
640
|
*/
|
|
1059
641
|
}, {
|
|
1060
|
-
key: "
|
|
1061
|
-
value: function
|
|
642
|
+
key: "downloadFile",
|
|
643
|
+
value: function downloadFile(params) {
|
|
1062
644
|
try {
|
|
1063
645
|
var _this10 = this;
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
if (requestParameters.filePath === null || requestParameters.filePath === undefined) {
|
|
1068
|
-
throw new RequiredError("filePath", "Required parameter requestParameters.filePath was null or undefined when calling deleteFile.");
|
|
646
|
+
var query = {};
|
|
647
|
+
if (params.cache !== undefined) {
|
|
648
|
+
query["cache"] = params.cache;
|
|
1069
649
|
}
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
queryParameters["filePath"] = requestParameters.filePath;
|
|
650
|
+
if (params.cacheTtl !== undefined) {
|
|
651
|
+
query["cache_ttl"] = params.cacheTtl;
|
|
1073
652
|
}
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
headerParameters["Authorization"] = _this10.configuration.apiKey("Authorization"); // authorization-header authentication
|
|
653
|
+
if (params.version !== undefined) {
|
|
654
|
+
query["version"] = params.version;
|
|
1077
655
|
}
|
|
1078
|
-
|
|
1079
|
-
var operationBasePathOverride = [][0];
|
|
656
|
+
var headers = {};
|
|
1080
657
|
return FileApi_await(_this10.request({
|
|
1081
|
-
path: "/v2/accounts/{accountId}/files".replace("{".concat("accountId", "}"),
|
|
1082
|
-
// @ts-ignore
|
|
1083
|
-
false ? 0 : encodeURIComponent(String(requestParameters.accountId))),
|
|
1084
|
-
method: "DELETE",
|
|
1085
|
-
headers: headerParameters,
|
|
1086
|
-
query: queryParameters
|
|
1087
|
-
}, initOverrides, operationBasePathOverride), function (response) {
|
|
1088
|
-
return new VoidApiResponse(response);
|
|
1089
|
-
});
|
|
1090
|
-
} catch (e) {
|
|
1091
|
-
return Promise.reject(e);
|
|
1092
|
-
}
|
|
1093
|
-
}
|
|
1094
|
-
/**
|
|
1095
|
-
* Deletes a file synchronously.
|
|
1096
|
-
*/
|
|
1097
|
-
}, {
|
|
1098
|
-
key: "deleteFile",
|
|
1099
|
-
value: function deleteFile(requestParameters, initOverrides) {
|
|
1100
|
-
try {
|
|
1101
|
-
var _this12 = this;
|
|
1102
|
-
return _awaitIgnored(_this12.deleteFileWithHttpInfo(requestParameters, initOverrides));
|
|
1103
|
-
} catch (e) {
|
|
1104
|
-
return Promise.reject(e);
|
|
1105
|
-
}
|
|
1106
|
-
}
|
|
1107
|
-
/**
|
|
1108
|
-
* Deletes multiple files asynchronously.
|
|
1109
|
-
*/
|
|
1110
|
-
}, {
|
|
1111
|
-
key: "deleteFileBatchWithHttpInfo",
|
|
1112
|
-
value: function deleteFileBatchWithHttpInfo(requestParameters, initOverrides) {
|
|
1113
|
-
try {
|
|
1114
|
-
var _this14 = this;
|
|
1115
|
-
if (requestParameters.accountId === null || requestParameters.accountId === undefined) {
|
|
1116
|
-
throw new RequiredError("accountId", "Required parameter requestParameters.accountId was null or undefined when calling deleteFileBatch.");
|
|
1117
|
-
}
|
|
1118
|
-
if (requestParameters.deleteFileBatchRequest === null || requestParameters.deleteFileBatchRequest === undefined) {
|
|
1119
|
-
throw new RequiredError("deleteFileBatchRequest", "Required parameter requestParameters.deleteFileBatchRequest was null or undefined when calling deleteFileBatch.");
|
|
1120
|
-
}
|
|
1121
|
-
var queryParameters = {};
|
|
1122
|
-
var headerParameters = {};
|
|
1123
|
-
headerParameters["Content-Type"] = "application/json";
|
|
1124
|
-
if (_this14.configuration && _this14.configuration.apiKey) {
|
|
1125
|
-
headerParameters["Authorization"] = _this14.configuration.apiKey("Authorization"); // authorization-header authentication
|
|
1126
|
-
}
|
|
1127
|
-
|
|
1128
|
-
var operationBasePathOverride = [][0];
|
|
1129
|
-
return FileApi_await(_this14.request({
|
|
1130
|
-
path: "/v2/accounts/{accountId}/files/batch".replace("{".concat("accountId", "}"),
|
|
1131
|
-
// @ts-ignore
|
|
1132
|
-
false ? 0 : encodeURIComponent(String(requestParameters.accountId))),
|
|
1133
|
-
method: "DELETE",
|
|
1134
|
-
headers: headerParameters,
|
|
1135
|
-
query: queryParameters,
|
|
1136
|
-
body: requestParameters.deleteFileBatchRequest
|
|
1137
|
-
}, initOverrides, operationBasePathOverride), function (response) {
|
|
1138
|
-
return new JSONApiResponse(response);
|
|
1139
|
-
});
|
|
1140
|
-
} catch (e) {
|
|
1141
|
-
return Promise.reject(e);
|
|
1142
|
-
}
|
|
1143
|
-
}
|
|
1144
|
-
/**
|
|
1145
|
-
* Deletes multiple files asynchronously.
|
|
1146
|
-
*/
|
|
1147
|
-
}, {
|
|
1148
|
-
key: "deleteFileBatch",
|
|
1149
|
-
value: function deleteFileBatch(requestParameters, initOverrides) {
|
|
1150
|
-
try {
|
|
1151
|
-
var _this16 = this;
|
|
1152
|
-
return FileApi_await(_this16.deleteFileBatchWithHttpInfo(requestParameters, initOverrides), function (response) {
|
|
1153
|
-
return FileApi_await(response.value());
|
|
1154
|
-
});
|
|
1155
|
-
} catch (e) {
|
|
1156
|
-
return Promise.reject(e);
|
|
1157
|
-
}
|
|
1158
|
-
}
|
|
1159
|
-
/**
|
|
1160
|
-
* Downloads a file in its original/unprocessed state.
|
|
1161
|
-
*/
|
|
1162
|
-
}, {
|
|
1163
|
-
key: "downloadFileWithHttpInfo",
|
|
1164
|
-
value: function downloadFileWithHttpInfo(requestParameters, initOverrides) {
|
|
1165
|
-
try {
|
|
1166
|
-
var _this18 = this;
|
|
1167
|
-
if (requestParameters.accountId === null || requestParameters.accountId === undefined) {
|
|
1168
|
-
throw new RequiredError("accountId", "Required parameter requestParameters.accountId was null or undefined when calling downloadFile.");
|
|
1169
|
-
}
|
|
1170
|
-
if (requestParameters.filePath === null || requestParameters.filePath === undefined) {
|
|
1171
|
-
throw new RequiredError("filePath", "Required parameter requestParameters.filePath was null or undefined when calling downloadFile.");
|
|
1172
|
-
}
|
|
1173
|
-
var queryParameters = {};
|
|
1174
|
-
if (requestParameters.cache !== undefined) {
|
|
1175
|
-
queryParameters["cache"] = requestParameters.cache;
|
|
1176
|
-
}
|
|
1177
|
-
if (requestParameters.cacheTtl !== undefined) {
|
|
1178
|
-
queryParameters["cache_ttl"] = requestParameters.cacheTtl;
|
|
1179
|
-
}
|
|
1180
|
-
if (requestParameters.version !== undefined) {
|
|
1181
|
-
queryParameters["version"] = requestParameters.version;
|
|
1182
|
-
}
|
|
1183
|
-
var headerParameters = {};
|
|
1184
|
-
if (_this18.configuration && _this18.configuration.apiKey) {
|
|
1185
|
-
headerParameters["Authorization"] = _this18.configuration.apiKey("Authorization"); // authorization-header authentication
|
|
1186
|
-
}
|
|
1187
|
-
|
|
1188
|
-
var operationBasePathOverride = ["https://upcdn.io"][0];
|
|
1189
|
-
return FileApi_await(_this18.request({
|
|
1190
658
|
path: "/{accountId}/raw{filePath}".replace("{".concat("accountId", "}"),
|
|
1191
659
|
// @ts-ignore
|
|
1192
|
-
|
|
660
|
+
_this10.encodeParam("accountId", params.accountId)).replace("{".concat("filePath", "}"),
|
|
1193
661
|
// @ts-ignore
|
|
1194
|
-
|
|
662
|
+
_this10.encodeParam("filePath", params.filePath)),
|
|
1195
663
|
method: "GET",
|
|
1196
|
-
headers:
|
|
1197
|
-
query:
|
|
1198
|
-
},
|
|
664
|
+
headers: headers,
|
|
665
|
+
query: query
|
|
666
|
+
}, undefined, ["https://upcdn.io"][0]), function (response) {
|
|
1199
667
|
return new BinaryResult(response);
|
|
1200
668
|
});
|
|
1201
669
|
} catch (e) {
|
|
1202
670
|
return Promise.reject(e);
|
|
1203
671
|
}
|
|
1204
672
|
}
|
|
1205
|
-
/**
|
|
1206
|
-
* Downloads a file in its original/unprocessed state.
|
|
1207
|
-
*/
|
|
1208
|
-
}, {
|
|
1209
|
-
key: "downloadFile",
|
|
1210
|
-
value: function downloadFile(requestParameters, initOverrides) {
|
|
1211
|
-
try {
|
|
1212
|
-
var _this20 = this;
|
|
1213
|
-
return FileApi_await(_this20.downloadFileWithHttpInfo(requestParameters, initOverrides));
|
|
1214
|
-
} catch (e) {
|
|
1215
|
-
return Promise.reject(e);
|
|
1216
|
-
}
|
|
1217
|
-
}
|
|
1218
673
|
/**
|
|
1219
674
|
* Gets the full details (e.g. metadata, tags, etc.) for a file.
|
|
1220
675
|
*/
|
|
1221
676
|
}, {
|
|
1222
|
-
key: "
|
|
1223
|
-
value: function
|
|
677
|
+
key: "getFileDetails",
|
|
678
|
+
value: function getFileDetails(params) {
|
|
1224
679
|
try {
|
|
1225
|
-
var
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
if (requestParameters.filePath === null || requestParameters.filePath === undefined) {
|
|
1230
|
-
throw new RequiredError("filePath", "Required parameter requestParameters.filePath was null or undefined when calling getFileDetails.");
|
|
1231
|
-
}
|
|
1232
|
-
var queryParameters = {};
|
|
1233
|
-
if (requestParameters.filePath !== undefined) {
|
|
1234
|
-
queryParameters["filePath"] = requestParameters.filePath;
|
|
1235
|
-
}
|
|
1236
|
-
var headerParameters = {};
|
|
1237
|
-
if (_this22.configuration && _this22.configuration.apiKey) {
|
|
1238
|
-
headerParameters["Authorization"] = _this22.configuration.apiKey("Authorization"); // authorization-header authentication
|
|
680
|
+
var _this12 = this;
|
|
681
|
+
var query = {};
|
|
682
|
+
if (params.filePath !== undefined) {
|
|
683
|
+
query["filePath"] = params.filePath;
|
|
1239
684
|
}
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
return FileApi_await(_this22.request({
|
|
685
|
+
var headers = {};
|
|
686
|
+
return FileApi_await(_this12.request({
|
|
1243
687
|
path: "/v2/accounts/{accountId}/files/details".replace("{".concat("accountId", "}"),
|
|
1244
688
|
// @ts-ignore
|
|
1245
|
-
|
|
689
|
+
_this12.encodeParam("accountId", params.accountId)),
|
|
1246
690
|
method: "GET",
|
|
1247
|
-
headers:
|
|
1248
|
-
query:
|
|
1249
|
-
},
|
|
1250
|
-
return new JSONApiResponse(response);
|
|
1251
|
-
});
|
|
1252
|
-
} catch (e) {
|
|
1253
|
-
return Promise.reject(e);
|
|
1254
|
-
}
|
|
1255
|
-
}
|
|
1256
|
-
/**
|
|
1257
|
-
* Gets the full details (e.g. metadata, tags, etc.) for a file.
|
|
1258
|
-
*/
|
|
1259
|
-
}, {
|
|
1260
|
-
key: "getFileDetails",
|
|
1261
|
-
value: function getFileDetails(requestParameters, initOverrides) {
|
|
1262
|
-
try {
|
|
1263
|
-
var _this24 = this;
|
|
1264
|
-
return FileApi_await(_this24.getFileDetailsWithHttpInfo(requestParameters, initOverrides), function (response) {
|
|
1265
|
-
return FileApi_await(response.value());
|
|
691
|
+
headers: headers,
|
|
692
|
+
query: query
|
|
693
|
+
}, undefined, [][0]), function (response) {
|
|
694
|
+
return FileApi_await(new JSONApiResponse(response).value());
|
|
1266
695
|
});
|
|
1267
696
|
} catch (e) {
|
|
1268
697
|
return Promise.reject(e);
|
|
@@ -1272,132 +701,73 @@ var FileApi = /*#__PURE__*/function (_runtime$BaseAPI) {
|
|
|
1272
701
|
* Processes a file and returns the result.
|
|
1273
702
|
*/
|
|
1274
703
|
}, {
|
|
1275
|
-
key: "
|
|
1276
|
-
value: function
|
|
704
|
+
key: "processFile",
|
|
705
|
+
value: function processFile(params) {
|
|
1277
706
|
try {
|
|
1278
|
-
var
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
if (requestParameters.filePath === null || requestParameters.filePath === undefined) {
|
|
1283
|
-
throw new RequiredError("filePath", "Required parameter requestParameters.filePath was null or undefined when calling processFile.");
|
|
1284
|
-
}
|
|
1285
|
-
if (requestParameters.transformation === null || requestParameters.transformation === undefined) {
|
|
1286
|
-
throw new RequiredError("transformation", "Required parameter requestParameters.transformation was null or undefined when calling processFile.");
|
|
1287
|
-
}
|
|
1288
|
-
var queryParameters = {};
|
|
1289
|
-
if (requestParameters.artifact !== undefined) {
|
|
1290
|
-
queryParameters["artifact"] = requestParameters.artifact;
|
|
1291
|
-
}
|
|
1292
|
-
if (requestParameters.cache !== undefined) {
|
|
1293
|
-
queryParameters["cache"] = requestParameters.cache;
|
|
707
|
+
var _this14 = this;
|
|
708
|
+
var query = {};
|
|
709
|
+
if (params.artifact !== undefined) {
|
|
710
|
+
query["artifact"] = params.artifact;
|
|
1294
711
|
}
|
|
1295
|
-
if (
|
|
1296
|
-
|
|
712
|
+
if (params.cache !== undefined) {
|
|
713
|
+
query["cache"] = params.cache;
|
|
1297
714
|
}
|
|
1298
|
-
if (
|
|
1299
|
-
|
|
715
|
+
if (params.cachePerm !== undefined) {
|
|
716
|
+
query["cache_perm"] = params.cachePerm;
|
|
1300
717
|
}
|
|
1301
|
-
if (
|
|
1302
|
-
|
|
718
|
+
if (params.cacheTtl !== undefined) {
|
|
719
|
+
query["cache_ttl"] = params.cacheTtl;
|
|
1303
720
|
}
|
|
1304
|
-
if (
|
|
1305
|
-
|
|
721
|
+
if (params.large !== undefined) {
|
|
722
|
+
query["large"] = params.large;
|
|
1306
723
|
}
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
headerParameters["Authorization"] = _this26.configuration.apiKey("Authorization"); // authorization-header authentication
|
|
724
|
+
if (params.version !== undefined) {
|
|
725
|
+
query["version"] = params.version;
|
|
1310
726
|
}
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
return FileApi_await(_this26.request({
|
|
727
|
+
var headers = {};
|
|
728
|
+
return FileApi_await(_this14.request({
|
|
1314
729
|
path: "/{accountId}/{transformation}{filePath}".replace("{".concat("accountId", "}"),
|
|
1315
730
|
// @ts-ignore
|
|
1316
|
-
|
|
731
|
+
_this14.encodeParam("accountId", params.accountId)).replace("{".concat("filePath", "}"),
|
|
1317
732
|
// @ts-ignore
|
|
1318
|
-
|
|
733
|
+
_this14.encodeParam("filePath", params.filePath)).replace("{".concat("transformation", "}"),
|
|
1319
734
|
// @ts-ignore
|
|
1320
|
-
|
|
735
|
+
_this14.encodeParam("transformation", params.transformation)),
|
|
1321
736
|
method: "GET",
|
|
1322
|
-
headers:
|
|
1323
|
-
query:
|
|
1324
|
-
},
|
|
737
|
+
headers: headers,
|
|
738
|
+
query: query
|
|
739
|
+
}, undefined, ["https://upcdn.io"][0]), function (response) {
|
|
1325
740
|
return new BinaryResult(response);
|
|
1326
741
|
});
|
|
1327
742
|
} catch (e) {
|
|
1328
743
|
return Promise.reject(e);
|
|
1329
744
|
}
|
|
1330
745
|
}
|
|
1331
|
-
/**
|
|
1332
|
-
* Processes a file and returns the result.
|
|
1333
|
-
*/
|
|
1334
|
-
}, {
|
|
1335
|
-
key: "processFile",
|
|
1336
|
-
value: function processFile(requestParameters, initOverrides) {
|
|
1337
|
-
try {
|
|
1338
|
-
var _this28 = this;
|
|
1339
|
-
return FileApi_await(_this28.processFileWithHttpInfo(requestParameters, initOverrides));
|
|
1340
|
-
} catch (e) {
|
|
1341
|
-
return Promise.reject(e);
|
|
1342
|
-
}
|
|
1343
|
-
}
|
|
1344
746
|
/**
|
|
1345
747
|
* Processes a file and saves the result.
|
|
1346
748
|
*/
|
|
1347
749
|
}, {
|
|
1348
|
-
key: "
|
|
1349
|
-
value: function
|
|
750
|
+
key: "processFileAndSave",
|
|
751
|
+
value: function processFileAndSave(params) {
|
|
1350
752
|
try {
|
|
1351
|
-
var
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
throw new RequiredError("filePath", "Required parameter requestParameters.filePath was null or undefined when calling processFileAndSave.");
|
|
1357
|
-
}
|
|
1358
|
-
if (requestParameters.transformation === null || requestParameters.transformation === undefined) {
|
|
1359
|
-
throw new RequiredError("transformation", "Required parameter requestParameters.transformation was null or undefined when calling processFileAndSave.");
|
|
1360
|
-
}
|
|
1361
|
-
if (requestParameters.processFileAndSaveRequest === null || requestParameters.processFileAndSaveRequest === undefined) {
|
|
1362
|
-
throw new RequiredError("processFileAndSaveRequest", "Required parameter requestParameters.processFileAndSaveRequest was null or undefined when calling processFileAndSave.");
|
|
1363
|
-
}
|
|
1364
|
-
var queryParameters = {};
|
|
1365
|
-
var headerParameters = {};
|
|
1366
|
-
headerParameters["Content-Type"] = "application/json";
|
|
1367
|
-
if (_this30.configuration && _this30.configuration.apiKey) {
|
|
1368
|
-
headerParameters["Authorization"] = _this30.configuration.apiKey("Authorization"); // authorization-header authentication
|
|
1369
|
-
}
|
|
1370
|
-
|
|
1371
|
-
var operationBasePathOverride = ["https://upcdn.io"][0];
|
|
1372
|
-
return FileApi_await(_this30.request({
|
|
753
|
+
var _this16 = this;
|
|
754
|
+
var query = {};
|
|
755
|
+
var headers = {};
|
|
756
|
+
headers["Content-Type"] = "application/json";
|
|
757
|
+
return FileApi_await(_this16.request({
|
|
1373
758
|
path: "/{accountId}/save/{transformation}{filePath}".replace("{".concat("accountId", "}"),
|
|
1374
759
|
// @ts-ignore
|
|
1375
|
-
|
|
760
|
+
_this16.encodeParam("accountId", params.accountId)).replace("{".concat("filePath", "}"),
|
|
1376
761
|
// @ts-ignore
|
|
1377
|
-
|
|
762
|
+
_this16.encodeParam("filePath", params.filePath)).replace("{".concat("transformation", "}"),
|
|
1378
763
|
// @ts-ignore
|
|
1379
|
-
|
|
764
|
+
_this16.encodeParam("transformation", params.transformation)),
|
|
1380
765
|
method: "POST",
|
|
1381
|
-
headers:
|
|
1382
|
-
query:
|
|
1383
|
-
body:
|
|
1384
|
-
},
|
|
1385
|
-
return new JSONApiResponse(response);
|
|
1386
|
-
});
|
|
1387
|
-
} catch (e) {
|
|
1388
|
-
return Promise.reject(e);
|
|
1389
|
-
}
|
|
1390
|
-
}
|
|
1391
|
-
/**
|
|
1392
|
-
* Processes a file and saves the result.
|
|
1393
|
-
*/
|
|
1394
|
-
}, {
|
|
1395
|
-
key: "processFileAndSave",
|
|
1396
|
-
value: function processFileAndSave(requestParameters, initOverrides) {
|
|
1397
|
-
try {
|
|
1398
|
-
var _this32 = this;
|
|
1399
|
-
return FileApi_await(_this32.processFileAndSaveWithHttpInfo(requestParameters, initOverrides), function (response) {
|
|
1400
|
-
return FileApi_await(response.value());
|
|
766
|
+
headers: headers,
|
|
767
|
+
query: query,
|
|
768
|
+
body: params.processFileAndSaveRequest
|
|
769
|
+
}, undefined, ["https://upcdn.io"][0]), function (response) {
|
|
770
|
+
return FileApi_await(new JSONApiResponse(response).value());
|
|
1401
771
|
});
|
|
1402
772
|
} catch (e) {
|
|
1403
773
|
return Promise.reject(e);
|
|
@@ -1406,15 +776,7 @@ var FileApi = /*#__PURE__*/function (_runtime$BaseAPI) {
|
|
|
1406
776
|
}]);
|
|
1407
777
|
return FileApi;
|
|
1408
778
|
}(BaseAPI);
|
|
1409
|
-
|
|
1410
|
-
* @export
|
|
1411
|
-
*/
|
|
1412
|
-
var ProcessFileCachePermEnum = {
|
|
1413
|
-
Auto: "auto",
|
|
1414
|
-
False: "false",
|
|
1415
|
-
True: "true"
|
|
1416
|
-
};
|
|
1417
|
-
;// CONCATENATED MODULE: ./src/gen/apis/FolderApi.ts
|
|
779
|
+
;// CONCATENATED MODULE: ./src/generated/apis/FolderApi.ts
|
|
1418
780
|
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); }
|
|
1419
781
|
function FolderApi_await(value, then, direct) {
|
|
1420
782
|
if (direct) {
|
|
@@ -1440,7 +802,7 @@ function FolderApi_getPrototypeOf(o) { FolderApi_getPrototypeOf = Object.setProt
|
|
|
1440
802
|
/* tslint:disable */
|
|
1441
803
|
/* eslint-disable */
|
|
1442
804
|
/**
|
|
1443
|
-
* @bytescale/
|
|
805
|
+
* @bytescale/api
|
|
1444
806
|
* Bytescale API
|
|
1445
807
|
*
|
|
1446
808
|
* The version of the OpenAPI document: 2.0.0
|
|
@@ -1463,53 +825,27 @@ var FolderApi = /*#__PURE__*/function (_runtime$BaseAPI) {
|
|
|
1463
825
|
return _super.apply(this, arguments);
|
|
1464
826
|
}
|
|
1465
827
|
FolderApi_createClass(FolderApi, [{
|
|
1466
|
-
key: "
|
|
828
|
+
key: "copyFolder",
|
|
1467
829
|
value:
|
|
1468
830
|
/**
|
|
1469
831
|
* Copies a folder asynchronously. You can use ListFolder to preview the operation: set `dryRun=true` with ```recursive```, ```includeFiles```, ```includeOverriddenStorage``` and ```includeVirtualFolders``` set to match the values you\'re using here. Leave all other flags unset.
|
|
1470
832
|
*/
|
|
1471
|
-
function
|
|
833
|
+
function copyFolder(params) {
|
|
1472
834
|
try {
|
|
1473
835
|
var _this2 = this;
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
if (requestParameters.copyFolderRequest === null || requestParameters.copyFolderRequest === undefined) {
|
|
1478
|
-
throw new RequiredError("copyFolderRequest", "Required parameter requestParameters.copyFolderRequest was null or undefined when calling copyFolder.");
|
|
1479
|
-
}
|
|
1480
|
-
var queryParameters = {};
|
|
1481
|
-
var headerParameters = {};
|
|
1482
|
-
headerParameters["Content-Type"] = "application/json";
|
|
1483
|
-
if (_this2.configuration && _this2.configuration.apiKey) {
|
|
1484
|
-
headerParameters["Authorization"] = _this2.configuration.apiKey("Authorization"); // authorization-header authentication
|
|
1485
|
-
}
|
|
1486
|
-
|
|
1487
|
-
var operationBasePathOverride = [][0];
|
|
836
|
+
var query = {};
|
|
837
|
+
var headers = {};
|
|
838
|
+
headers["Content-Type"] = "application/json";
|
|
1488
839
|
return FolderApi_await(_this2.request({
|
|
1489
840
|
path: "/v2/accounts/{accountId}/folders/copy".replace("{".concat("accountId", "}"),
|
|
1490
841
|
// @ts-ignore
|
|
1491
|
-
|
|
842
|
+
_this2.encodeParam("accountId", params.accountId)),
|
|
1492
843
|
method: "POST",
|
|
1493
|
-
headers:
|
|
1494
|
-
query:
|
|
1495
|
-
body:
|
|
1496
|
-
},
|
|
1497
|
-
return new JSONApiResponse(response);
|
|
1498
|
-
});
|
|
1499
|
-
} catch (e) {
|
|
1500
|
-
return Promise.reject(e);
|
|
1501
|
-
}
|
|
1502
|
-
}
|
|
1503
|
-
/**
|
|
1504
|
-
* Copies a folder asynchronously. You can use ListFolder to preview the operation: set `dryRun=true` with ```recursive```, ```includeFiles```, ```includeOverriddenStorage``` and ```includeVirtualFolders``` set to match the values you\'re using here. Leave all other flags unset.
|
|
1505
|
-
*/
|
|
1506
|
-
}, {
|
|
1507
|
-
key: "copyFolder",
|
|
1508
|
-
value: function copyFolder(requestParameters, initOverrides) {
|
|
1509
|
-
try {
|
|
1510
|
-
var _this4 = this;
|
|
1511
|
-
return FolderApi_await(_this4.copyFolderWithHttpInfo(requestParameters, initOverrides), function (response) {
|
|
1512
|
-
return FolderApi_await(response.value());
|
|
844
|
+
headers: headers,
|
|
845
|
+
query: query,
|
|
846
|
+
body: params.copyFolderRequest
|
|
847
|
+
}, undefined, [][0]), function (response) {
|
|
848
|
+
return FolderApi_await(new JSONApiResponse(response).value());
|
|
1513
849
|
});
|
|
1514
850
|
} catch (e) {
|
|
1515
851
|
return Promise.reject(e);
|
|
@@ -1519,49 +855,23 @@ var FolderApi = /*#__PURE__*/function (_runtime$BaseAPI) {
|
|
|
1519
855
|
* Copies multiple folders asynchronously. You can use ListFolder to preview the operation: set `dryRun=true` with ```recursive```, ```includeFiles```, ```includeOverriddenStorage``` and ```includeVirtualFolders``` set to match the values you\'re using here. Leave all other flags unset.
|
|
1520
856
|
*/
|
|
1521
857
|
}, {
|
|
1522
|
-
key: "
|
|
1523
|
-
value: function
|
|
858
|
+
key: "copyFolderBatch",
|
|
859
|
+
value: function copyFolderBatch(params) {
|
|
1524
860
|
try {
|
|
1525
|
-
var
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
throw new RequiredError("copyFolderBatchRequest", "Required parameter requestParameters.copyFolderBatchRequest was null or undefined when calling copyFolderBatch.");
|
|
1531
|
-
}
|
|
1532
|
-
var queryParameters = {};
|
|
1533
|
-
var headerParameters = {};
|
|
1534
|
-
headerParameters["Content-Type"] = "application/json";
|
|
1535
|
-
if (_this6.configuration && _this6.configuration.apiKey) {
|
|
1536
|
-
headerParameters["Authorization"] = _this6.configuration.apiKey("Authorization"); // authorization-header authentication
|
|
1537
|
-
}
|
|
1538
|
-
|
|
1539
|
-
var operationBasePathOverride = [][0];
|
|
1540
|
-
return FolderApi_await(_this6.request({
|
|
861
|
+
var _this4 = this;
|
|
862
|
+
var query = {};
|
|
863
|
+
var headers = {};
|
|
864
|
+
headers["Content-Type"] = "application/json";
|
|
865
|
+
return FolderApi_await(_this4.request({
|
|
1541
866
|
path: "/v2/accounts/{accountId}/folders/copy/batch".replace("{".concat("accountId", "}"),
|
|
1542
867
|
// @ts-ignore
|
|
1543
|
-
|
|
868
|
+
_this4.encodeParam("accountId", params.accountId)),
|
|
1544
869
|
method: "POST",
|
|
1545
|
-
headers:
|
|
1546
|
-
query:
|
|
1547
|
-
body:
|
|
1548
|
-
},
|
|
1549
|
-
return new JSONApiResponse(response);
|
|
1550
|
-
});
|
|
1551
|
-
} catch (e) {
|
|
1552
|
-
return Promise.reject(e);
|
|
1553
|
-
}
|
|
1554
|
-
}
|
|
1555
|
-
/**
|
|
1556
|
-
* Copies multiple folders asynchronously. You can use ListFolder to preview the operation: set `dryRun=true` with ```recursive```, ```includeFiles```, ```includeOverriddenStorage``` and ```includeVirtualFolders``` set to match the values you\'re using here. Leave all other flags unset.
|
|
1557
|
-
*/
|
|
1558
|
-
}, {
|
|
1559
|
-
key: "copyFolderBatch",
|
|
1560
|
-
value: function copyFolderBatch(requestParameters, initOverrides) {
|
|
1561
|
-
try {
|
|
1562
|
-
var _this8 = this;
|
|
1563
|
-
return FolderApi_await(_this8.copyFolderBatchWithHttpInfo(requestParameters, initOverrides), function (response) {
|
|
1564
|
-
return FolderApi_await(response.value());
|
|
870
|
+
headers: headers,
|
|
871
|
+
query: query,
|
|
872
|
+
body: params.copyFolderBatchRequest
|
|
873
|
+
}, undefined, [][0]), function (response) {
|
|
874
|
+
return FolderApi_await(new JSONApiResponse(response).value());
|
|
1565
875
|
});
|
|
1566
876
|
} catch (e) {
|
|
1567
877
|
return Promise.reject(e);
|
|
@@ -1571,49 +881,23 @@ var FolderApi = /*#__PURE__*/function (_runtime$BaseAPI) {
|
|
|
1571
881
|
* Deletes a folder asynchronously. If the folder has overridden storage settings, then no files will be deleted. You can use ListFolder to preview the operation: set `dryRun=true` with ```recursive```, ```includeFiles``` and ```includeVirtualFolders``` set to match the values you\'re using here. Leave all other flags unset.
|
|
1572
882
|
*/
|
|
1573
883
|
}, {
|
|
1574
|
-
key: "
|
|
1575
|
-
value: function
|
|
884
|
+
key: "deleteFolder",
|
|
885
|
+
value: function deleteFolder(params) {
|
|
1576
886
|
try {
|
|
1577
|
-
var
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
throw new RequiredError("deleteFolderRequest", "Required parameter requestParameters.deleteFolderRequest was null or undefined when calling deleteFolder.");
|
|
1583
|
-
}
|
|
1584
|
-
var queryParameters = {};
|
|
1585
|
-
var headerParameters = {};
|
|
1586
|
-
headerParameters["Content-Type"] = "application/json";
|
|
1587
|
-
if (_this10.configuration && _this10.configuration.apiKey) {
|
|
1588
|
-
headerParameters["Authorization"] = _this10.configuration.apiKey("Authorization"); // authorization-header authentication
|
|
1589
|
-
}
|
|
1590
|
-
|
|
1591
|
-
var operationBasePathOverride = [][0];
|
|
1592
|
-
return FolderApi_await(_this10.request({
|
|
887
|
+
var _this6 = this;
|
|
888
|
+
var query = {};
|
|
889
|
+
var headers = {};
|
|
890
|
+
headers["Content-Type"] = "application/json";
|
|
891
|
+
return FolderApi_await(_this6.request({
|
|
1593
892
|
path: "/v2/accounts/{accountId}/folders".replace("{".concat("accountId", "}"),
|
|
1594
893
|
// @ts-ignore
|
|
1595
|
-
|
|
894
|
+
_this6.encodeParam("accountId", params.accountId)),
|
|
1596
895
|
method: "DELETE",
|
|
1597
|
-
headers:
|
|
1598
|
-
query:
|
|
1599
|
-
body:
|
|
1600
|
-
},
|
|
1601
|
-
return new JSONApiResponse(response);
|
|
1602
|
-
});
|
|
1603
|
-
} catch (e) {
|
|
1604
|
-
return Promise.reject(e);
|
|
1605
|
-
}
|
|
1606
|
-
}
|
|
1607
|
-
/**
|
|
1608
|
-
* Deletes a folder asynchronously. If the folder has overridden storage settings, then no files will be deleted. You can use ListFolder to preview the operation: set `dryRun=true` with ```recursive```, ```includeFiles``` and ```includeVirtualFolders``` set to match the values you\'re using here. Leave all other flags unset.
|
|
1609
|
-
*/
|
|
1610
|
-
}, {
|
|
1611
|
-
key: "deleteFolder",
|
|
1612
|
-
value: function deleteFolder(requestParameters, initOverrides) {
|
|
1613
|
-
try {
|
|
1614
|
-
var _this12 = this;
|
|
1615
|
-
return FolderApi_await(_this12.deleteFolderWithHttpInfo(requestParameters, initOverrides), function (response) {
|
|
1616
|
-
return FolderApi_await(response.value());
|
|
896
|
+
headers: headers,
|
|
897
|
+
query: query,
|
|
898
|
+
body: params.deleteFolderRequest
|
|
899
|
+
}, undefined, [][0]), function (response) {
|
|
900
|
+
return FolderApi_await(new JSONApiResponse(response).value());
|
|
1617
901
|
});
|
|
1618
902
|
} catch (e) {
|
|
1619
903
|
return Promise.reject(e);
|
|
@@ -1623,49 +907,23 @@ var FolderApi = /*#__PURE__*/function (_runtime$BaseAPI) {
|
|
|
1623
907
|
* Deletes multiple folders asynchronously. If the folder has overridden storage settings, then no files will be deleted. You can use ListFolder to preview the operation: set `dryRun=true` with ```recursive```, ```includeFiles``` and ```includeVirtualFolders``` set to match the values you\'re using here. Leave all other flags unset.
|
|
1624
908
|
*/
|
|
1625
909
|
}, {
|
|
1626
|
-
key: "
|
|
1627
|
-
value: function
|
|
910
|
+
key: "deleteFolderBatch",
|
|
911
|
+
value: function deleteFolderBatch(params) {
|
|
1628
912
|
try {
|
|
1629
|
-
var
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
throw new RequiredError("deleteFolderBatchRequest", "Required parameter requestParameters.deleteFolderBatchRequest was null or undefined when calling deleteFolderBatch.");
|
|
1635
|
-
}
|
|
1636
|
-
var queryParameters = {};
|
|
1637
|
-
var headerParameters = {};
|
|
1638
|
-
headerParameters["Content-Type"] = "application/json";
|
|
1639
|
-
if (_this14.configuration && _this14.configuration.apiKey) {
|
|
1640
|
-
headerParameters["Authorization"] = _this14.configuration.apiKey("Authorization"); // authorization-header authentication
|
|
1641
|
-
}
|
|
1642
|
-
|
|
1643
|
-
var operationBasePathOverride = [][0];
|
|
1644
|
-
return FolderApi_await(_this14.request({
|
|
913
|
+
var _this8 = this;
|
|
914
|
+
var query = {};
|
|
915
|
+
var headers = {};
|
|
916
|
+
headers["Content-Type"] = "application/json";
|
|
917
|
+
return FolderApi_await(_this8.request({
|
|
1645
918
|
path: "/v2/accounts/{accountId}/folders/batch".replace("{".concat("accountId", "}"),
|
|
1646
919
|
// @ts-ignore
|
|
1647
|
-
|
|
920
|
+
_this8.encodeParam("accountId", params.accountId)),
|
|
1648
921
|
method: "DELETE",
|
|
1649
|
-
headers:
|
|
1650
|
-
query:
|
|
1651
|
-
body:
|
|
1652
|
-
},
|
|
1653
|
-
return new JSONApiResponse(response);
|
|
1654
|
-
});
|
|
1655
|
-
} catch (e) {
|
|
1656
|
-
return Promise.reject(e);
|
|
1657
|
-
}
|
|
1658
|
-
}
|
|
1659
|
-
/**
|
|
1660
|
-
* Deletes multiple folders asynchronously. If the folder has overridden storage settings, then no files will be deleted. You can use ListFolder to preview the operation: set `dryRun=true` with ```recursive```, ```includeFiles``` and ```includeVirtualFolders``` set to match the values you\'re using here. Leave all other flags unset.
|
|
1661
|
-
*/
|
|
1662
|
-
}, {
|
|
1663
|
-
key: "deleteFolderBatch",
|
|
1664
|
-
value: function deleteFolderBatch(requestParameters, initOverrides) {
|
|
1665
|
-
try {
|
|
1666
|
-
var _this16 = this;
|
|
1667
|
-
return FolderApi_await(_this16.deleteFolderBatchWithHttpInfo(requestParameters, initOverrides), function (response) {
|
|
1668
|
-
return FolderApi_await(response.value());
|
|
922
|
+
headers: headers,
|
|
923
|
+
query: query,
|
|
924
|
+
body: params.deleteFolderBatchRequest
|
|
925
|
+
}, undefined, [][0]), function (response) {
|
|
926
|
+
return FolderApi_await(new JSONApiResponse(response).value());
|
|
1669
927
|
});
|
|
1670
928
|
} catch (e) {
|
|
1671
929
|
return Promise.reject(e);
|
|
@@ -1675,50 +933,24 @@ var FolderApi = /*#__PURE__*/function (_runtime$BaseAPI) {
|
|
|
1675
933
|
* Gets the full details (e.g. permission, storage layer, etc.) for a folder. Returns an empty object if no settings have been configured for this folder.
|
|
1676
934
|
*/
|
|
1677
935
|
}, {
|
|
1678
|
-
key: "
|
|
1679
|
-
value: function
|
|
936
|
+
key: "getFolderDetails",
|
|
937
|
+
value: function getFolderDetails(params) {
|
|
1680
938
|
try {
|
|
1681
|
-
var
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
if (requestParameters.folderPath === null || requestParameters.folderPath === undefined) {
|
|
1686
|
-
throw new RequiredError("folderPath", "Required parameter requestParameters.folderPath was null or undefined when calling getFolderDetails.");
|
|
1687
|
-
}
|
|
1688
|
-
var queryParameters = {};
|
|
1689
|
-
if (requestParameters.folderPath !== undefined) {
|
|
1690
|
-
queryParameters["folderPath"] = requestParameters.folderPath;
|
|
1691
|
-
}
|
|
1692
|
-
var headerParameters = {};
|
|
1693
|
-
if (_this18.configuration && _this18.configuration.apiKey) {
|
|
1694
|
-
headerParameters["Authorization"] = _this18.configuration.apiKey("Authorization"); // authorization-header authentication
|
|
939
|
+
var _this10 = this;
|
|
940
|
+
var query = {};
|
|
941
|
+
if (params.folderPath !== undefined) {
|
|
942
|
+
query["folderPath"] = params.folderPath;
|
|
1695
943
|
}
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
return FolderApi_await(_this18.request({
|
|
944
|
+
var headers = {};
|
|
945
|
+
return FolderApi_await(_this10.request({
|
|
1699
946
|
path: "/v2/accounts/{accountId}/folders".replace("{".concat("accountId", "}"),
|
|
1700
947
|
// @ts-ignore
|
|
1701
|
-
|
|
948
|
+
_this10.encodeParam("accountId", params.accountId)),
|
|
1702
949
|
method: "GET",
|
|
1703
|
-
headers:
|
|
1704
|
-
query:
|
|
1705
|
-
},
|
|
1706
|
-
return new JSONApiResponse(response);
|
|
1707
|
-
});
|
|
1708
|
-
} catch (e) {
|
|
1709
|
-
return Promise.reject(e);
|
|
1710
|
-
}
|
|
1711
|
-
}
|
|
1712
|
-
/**
|
|
1713
|
-
* Gets the full details (e.g. permission, storage layer, etc.) for a folder. Returns an empty object if no settings have been configured for this folder.
|
|
1714
|
-
*/
|
|
1715
|
-
}, {
|
|
1716
|
-
key: "getFolderDetails",
|
|
1717
|
-
value: function getFolderDetails(requestParameters, initOverrides) {
|
|
1718
|
-
try {
|
|
1719
|
-
var _this20 = this;
|
|
1720
|
-
return FolderApi_await(_this20.getFolderDetailsWithHttpInfo(requestParameters, initOverrides), function (response) {
|
|
1721
|
-
return FolderApi_await(response.value());
|
|
950
|
+
headers: headers,
|
|
951
|
+
query: query
|
|
952
|
+
}, undefined, [][0]), function (response) {
|
|
953
|
+
return FolderApi_await(new JSONApiResponse(response).value());
|
|
1722
954
|
});
|
|
1723
955
|
} catch (e) {
|
|
1724
956
|
return Promise.reject(e);
|
|
@@ -1728,74 +960,48 @@ var FolderApi = /*#__PURE__*/function (_runtime$BaseAPI) {
|
|
|
1728
960
|
* Lists the folder\'s contents. The result may be paginated: subsequent pages can be requested by passing the ```cursor``` from the response into the ```cursor``` request parameter. Pagination is complete when the response includes `isPaginationComplete=true`.
|
|
1729
961
|
*/
|
|
1730
962
|
}, {
|
|
1731
|
-
key: "
|
|
1732
|
-
value: function
|
|
963
|
+
key: "listFolder",
|
|
964
|
+
value: function listFolder(params) {
|
|
1733
965
|
try {
|
|
1734
|
-
var
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
if (requestParameters.folderPath === null || requestParameters.folderPath === undefined) {
|
|
1739
|
-
throw new RequiredError("folderPath", "Required parameter requestParameters.folderPath was null or undefined when calling listFolder.");
|
|
1740
|
-
}
|
|
1741
|
-
var queryParameters = {};
|
|
1742
|
-
if (requestParameters.cursor !== undefined) {
|
|
1743
|
-
queryParameters["cursor"] = requestParameters.cursor;
|
|
1744
|
-
}
|
|
1745
|
-
if (requestParameters.dryRun !== undefined) {
|
|
1746
|
-
queryParameters["dryRun"] = requestParameters.dryRun;
|
|
966
|
+
var _this12 = this;
|
|
967
|
+
var query = {};
|
|
968
|
+
if (params.cursor !== undefined) {
|
|
969
|
+
query["cursor"] = params.cursor;
|
|
1747
970
|
}
|
|
1748
|
-
if (
|
|
1749
|
-
|
|
971
|
+
if (params.dryRun !== undefined) {
|
|
972
|
+
query["dryRun"] = params.dryRun;
|
|
1750
973
|
}
|
|
1751
|
-
if (
|
|
1752
|
-
|
|
974
|
+
if (params.folderPath !== undefined) {
|
|
975
|
+
query["folderPath"] = params.folderPath;
|
|
1753
976
|
}
|
|
1754
|
-
if (
|
|
1755
|
-
|
|
977
|
+
if (params.includeFiles !== undefined) {
|
|
978
|
+
query["includeFiles"] = params.includeFiles;
|
|
1756
979
|
}
|
|
1757
|
-
if (
|
|
1758
|
-
|
|
980
|
+
if (params.includeOverriddenStorage !== undefined) {
|
|
981
|
+
query["includeOverriddenStorage"] = params.includeOverriddenStorage;
|
|
1759
982
|
}
|
|
1760
|
-
if (
|
|
1761
|
-
|
|
983
|
+
if (params.includePhysicalFolders !== undefined) {
|
|
984
|
+
query["includePhysicalFolders"] = params.includePhysicalFolders;
|
|
1762
985
|
}
|
|
1763
|
-
if (
|
|
1764
|
-
|
|
986
|
+
if (params.includeVirtualFolders !== undefined) {
|
|
987
|
+
query["includeVirtualFolders"] = params.includeVirtualFolders;
|
|
1765
988
|
}
|
|
1766
|
-
if (
|
|
1767
|
-
|
|
989
|
+
if (params.limit !== undefined) {
|
|
990
|
+
query["limit"] = params.limit;
|
|
1768
991
|
}
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
headerParameters["Authorization"] = _this22.configuration.apiKey("Authorization"); // authorization-header authentication
|
|
992
|
+
if (params.recursive !== undefined) {
|
|
993
|
+
query["recursive"] = params.recursive;
|
|
1772
994
|
}
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
return FolderApi_await(_this22.request({
|
|
995
|
+
var headers = {};
|
|
996
|
+
return FolderApi_await(_this12.request({
|
|
1776
997
|
path: "/v2/accounts/{accountId}/folders/list".replace("{".concat("accountId", "}"),
|
|
1777
998
|
// @ts-ignore
|
|
1778
|
-
|
|
999
|
+
_this12.encodeParam("accountId", params.accountId)),
|
|
1779
1000
|
method: "GET",
|
|
1780
|
-
headers:
|
|
1781
|
-
query:
|
|
1782
|
-
},
|
|
1783
|
-
return new JSONApiResponse(response);
|
|
1784
|
-
});
|
|
1785
|
-
} catch (e) {
|
|
1786
|
-
return Promise.reject(e);
|
|
1787
|
-
}
|
|
1788
|
-
}
|
|
1789
|
-
/**
|
|
1790
|
-
* Lists the folder\'s contents. The result may be paginated: subsequent pages can be requested by passing the ```cursor``` from the response into the ```cursor``` request parameter. Pagination is complete when the response includes `isPaginationComplete=true`.
|
|
1791
|
-
*/
|
|
1792
|
-
}, {
|
|
1793
|
-
key: "listFolder",
|
|
1794
|
-
value: function listFolder(requestParameters, initOverrides) {
|
|
1795
|
-
try {
|
|
1796
|
-
var _this24 = this;
|
|
1797
|
-
return FolderApi_await(_this24.listFolderWithHttpInfo(requestParameters, initOverrides), function (response) {
|
|
1798
|
-
return FolderApi_await(response.value());
|
|
1001
|
+
headers: headers,
|
|
1002
|
+
query: query
|
|
1003
|
+
}, undefined, [][0]), function (response) {
|
|
1004
|
+
return FolderApi_await(new JSONApiResponse(response).value());
|
|
1799
1005
|
});
|
|
1800
1006
|
} catch (e) {
|
|
1801
1007
|
return Promise.reject(e);
|
|
@@ -1805,49 +1011,23 @@ var FolderApi = /*#__PURE__*/function (_runtime$BaseAPI) {
|
|
|
1805
1011
|
* Creates or updates the folder specified by the `folderPath`. If the folder\'s ancestors do not exist, they will be created automatically (with empty FolderSettings). Note: you don\'t need to create folders before uploading files to them.
|
|
1806
1012
|
*/
|
|
1807
1013
|
}, {
|
|
1808
|
-
key: "
|
|
1809
|
-
value: function
|
|
1014
|
+
key: "putFolder",
|
|
1015
|
+
value: function putFolder(params) {
|
|
1810
1016
|
try {
|
|
1811
|
-
var
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
throw new RequiredError("putFolderRequest", "Required parameter requestParameters.putFolderRequest was null or undefined when calling putFolder.");
|
|
1817
|
-
}
|
|
1818
|
-
var queryParameters = {};
|
|
1819
|
-
var headerParameters = {};
|
|
1820
|
-
headerParameters["Content-Type"] = "application/json";
|
|
1821
|
-
if (_this26.configuration && _this26.configuration.apiKey) {
|
|
1822
|
-
headerParameters["Authorization"] = _this26.configuration.apiKey("Authorization"); // authorization-header authentication
|
|
1823
|
-
}
|
|
1824
|
-
|
|
1825
|
-
var operationBasePathOverride = [][0];
|
|
1826
|
-
return FolderApi_await(_this26.request({
|
|
1017
|
+
var _this14 = this;
|
|
1018
|
+
var query = {};
|
|
1019
|
+
var headers = {};
|
|
1020
|
+
headers["Content-Type"] = "application/json";
|
|
1021
|
+
return FolderApi_await(_this14.request({
|
|
1827
1022
|
path: "/v2/accounts/{accountId}/folders".replace("{".concat("accountId", "}"),
|
|
1828
1023
|
// @ts-ignore
|
|
1829
|
-
|
|
1024
|
+
_this14.encodeParam("accountId", params.accountId)),
|
|
1830
1025
|
method: "PUT",
|
|
1831
|
-
headers:
|
|
1832
|
-
query:
|
|
1833
|
-
body:
|
|
1834
|
-
},
|
|
1835
|
-
return new JSONApiResponse(response);
|
|
1836
|
-
});
|
|
1837
|
-
} catch (e) {
|
|
1838
|
-
return Promise.reject(e);
|
|
1839
|
-
}
|
|
1840
|
-
}
|
|
1841
|
-
/**
|
|
1842
|
-
* Creates or updates the folder specified by the `folderPath`. If the folder\'s ancestors do not exist, they will be created automatically (with empty FolderSettings). Note: you don\'t need to create folders before uploading files to them.
|
|
1843
|
-
*/
|
|
1844
|
-
}, {
|
|
1845
|
-
key: "putFolder",
|
|
1846
|
-
value: function putFolder(requestParameters, initOverrides) {
|
|
1847
|
-
try {
|
|
1848
|
-
var _this28 = this;
|
|
1849
|
-
return FolderApi_await(_this28.putFolderWithHttpInfo(requestParameters, initOverrides), function (response) {
|
|
1850
|
-
return FolderApi_await(response.value());
|
|
1026
|
+
headers: headers,
|
|
1027
|
+
query: query,
|
|
1028
|
+
body: params.putFolderRequest
|
|
1029
|
+
}, undefined, [][0]), function (response) {
|
|
1030
|
+
return FolderApi_await(new JSONApiResponse(response).value());
|
|
1851
1031
|
});
|
|
1852
1032
|
} catch (e) {
|
|
1853
1033
|
return Promise.reject(e);
|
|
@@ -1856,7 +1036,7 @@ var FolderApi = /*#__PURE__*/function (_runtime$BaseAPI) {
|
|
|
1856
1036
|
}]);
|
|
1857
1037
|
return FolderApi;
|
|
1858
1038
|
}(BaseAPI);
|
|
1859
|
-
;// CONCATENATED MODULE: ./src/
|
|
1039
|
+
;// CONCATENATED MODULE: ./src/generated/apis/JobApi.ts
|
|
1860
1040
|
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); }
|
|
1861
1041
|
function JobApi_await(value, then, direct) {
|
|
1862
1042
|
if (direct) {
|
|
@@ -1867,12 +1047,6 @@ function JobApi_await(value, then, direct) {
|
|
|
1867
1047
|
}
|
|
1868
1048
|
return then ? value.then(then) : value;
|
|
1869
1049
|
}
|
|
1870
|
-
function JobApi_empty() {}
|
|
1871
|
-
function JobApi_awaitIgnored(value, direct) {
|
|
1872
|
-
if (!direct) {
|
|
1873
|
-
return value && value.then ? value.then(JobApi_empty) : Promise.resolve();
|
|
1874
|
-
}
|
|
1875
|
-
}
|
|
1876
1050
|
function JobApi_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
1877
1051
|
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); } }
|
|
1878
1052
|
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; }
|
|
@@ -1888,7 +1062,7 @@ function JobApi_getPrototypeOf(o) { JobApi_getPrototypeOf = Object.setPrototypeO
|
|
|
1888
1062
|
/* tslint:disable */
|
|
1889
1063
|
/* eslint-disable */
|
|
1890
1064
|
/**
|
|
1891
|
-
* @bytescale/
|
|
1065
|
+
* @bytescale/api
|
|
1892
1066
|
* Bytescale API
|
|
1893
1067
|
*
|
|
1894
1068
|
* The version of the OpenAPI document: 2.0.0
|
|
@@ -1911,98 +1085,29 @@ var JobApi = /*#__PURE__*/function (_runtime$BaseAPI) {
|
|
|
1911
1085
|
return _super.apply(this, arguments);
|
|
1912
1086
|
}
|
|
1913
1087
|
JobApi_createClass(JobApi, [{
|
|
1914
|
-
key: "cancelJobWithHttpInfo",
|
|
1915
|
-
value:
|
|
1916
|
-
/**
|
|
1917
|
-
* Cancels an in-progress background job. Requires a `secret_*` API key.
|
|
1918
|
-
*/
|
|
1919
|
-
function cancelJobWithHttpInfo(requestParameters, initOverrides) {
|
|
1920
|
-
try {
|
|
1921
|
-
var _this2 = this;
|
|
1922
|
-
if (requestParameters.accountId === null || requestParameters.accountId === undefined) {
|
|
1923
|
-
throw new RequiredError("accountId", "Required parameter requestParameters.accountId was null or undefined when calling cancelJob.");
|
|
1924
|
-
}
|
|
1925
|
-
if (requestParameters.jobId === null || requestParameters.jobId === undefined) {
|
|
1926
|
-
throw new RequiredError("jobId", "Required parameter requestParameters.jobId was null or undefined when calling cancelJob.");
|
|
1927
|
-
}
|
|
1928
|
-
if (requestParameters.jobType === null || requestParameters.jobType === undefined) {
|
|
1929
|
-
throw new RequiredError("jobType", "Required parameter requestParameters.jobType was null or undefined when calling cancelJob.");
|
|
1930
|
-
}
|
|
1931
|
-
var queryParameters = {};
|
|
1932
|
-
var headerParameters = {};
|
|
1933
|
-
if (_this2.configuration && _this2.configuration.apiKey) {
|
|
1934
|
-
headerParameters["Authorization"] = _this2.configuration.apiKey("Authorization"); // authorization-header authentication
|
|
1935
|
-
}
|
|
1936
|
-
|
|
1937
|
-
var operationBasePathOverride = [][0];
|
|
1938
|
-
return JobApi_await(_this2.request({
|
|
1939
|
-
path: "/v2/accounts/{accountId}/jobs/{jobType}/{jobId}".replace("{".concat("accountId", "}"),
|
|
1940
|
-
// @ts-ignore
|
|
1941
|
-
false ? 0 : encodeURIComponent(String(requestParameters.accountId))).replace("{".concat("jobId", "}"),
|
|
1942
|
-
// @ts-ignore
|
|
1943
|
-
false ? 0 : encodeURIComponent(String(requestParameters.jobId))).replace("{".concat("jobType", "}"),
|
|
1944
|
-
// @ts-ignore
|
|
1945
|
-
false ? 0 : encodeURIComponent(String(requestParameters.jobType))),
|
|
1946
|
-
method: "DELETE",
|
|
1947
|
-
headers: headerParameters,
|
|
1948
|
-
query: queryParameters
|
|
1949
|
-
}, initOverrides, operationBasePathOverride), function (response) {
|
|
1950
|
-
return new VoidApiResponse(response);
|
|
1951
|
-
});
|
|
1952
|
-
} catch (e) {
|
|
1953
|
-
return Promise.reject(e);
|
|
1954
|
-
}
|
|
1955
|
-
}
|
|
1956
|
-
/**
|
|
1957
|
-
* Cancels an in-progress background job. Requires a `secret_*` API key.
|
|
1958
|
-
*/
|
|
1959
|
-
}, {
|
|
1960
1088
|
key: "cancelJob",
|
|
1961
|
-
value:
|
|
1962
|
-
try {
|
|
1963
|
-
var _this4 = this;
|
|
1964
|
-
return JobApi_awaitIgnored(_this4.cancelJobWithHttpInfo(requestParameters, initOverrides));
|
|
1965
|
-
} catch (e) {
|
|
1966
|
-
return Promise.reject(e);
|
|
1967
|
-
}
|
|
1968
|
-
}
|
|
1089
|
+
value:
|
|
1969
1090
|
/**
|
|
1970
|
-
*
|
|
1971
|
-
*/
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
var
|
|
1977
|
-
|
|
1978
|
-
throw new RequiredError("accountId", "Required parameter requestParameters.accountId was null or undefined when calling getJob.");
|
|
1979
|
-
}
|
|
1980
|
-
if (requestParameters.jobId === null || requestParameters.jobId === undefined) {
|
|
1981
|
-
throw new RequiredError("jobId", "Required parameter requestParameters.jobId was null or undefined when calling getJob.");
|
|
1982
|
-
}
|
|
1983
|
-
if (requestParameters.jobType === null || requestParameters.jobType === undefined) {
|
|
1984
|
-
throw new RequiredError("jobType", "Required parameter requestParameters.jobType was null or undefined when calling getJob.");
|
|
1985
|
-
}
|
|
1986
|
-
var queryParameters = {};
|
|
1987
|
-
var headerParameters = {};
|
|
1988
|
-
if (_this6.configuration && _this6.configuration.apiKey) {
|
|
1989
|
-
headerParameters["Authorization"] = _this6.configuration.apiKey("Authorization"); // authorization-header authentication
|
|
1990
|
-
}
|
|
1991
|
-
|
|
1992
|
-
var operationBasePathOverride = [][0];
|
|
1993
|
-
return JobApi_await(_this6.request({
|
|
1091
|
+
* Cancels an in-progress background job. Requires a `secret_*` API key.
|
|
1092
|
+
*/
|
|
1093
|
+
function cancelJob(params) {
|
|
1094
|
+
try {
|
|
1095
|
+
var _this2 = this;
|
|
1096
|
+
var query = {};
|
|
1097
|
+
var headers = {};
|
|
1098
|
+
return JobApi_await(_this2.request({
|
|
1994
1099
|
path: "/v2/accounts/{accountId}/jobs/{jobType}/{jobId}".replace("{".concat("accountId", "}"),
|
|
1995
1100
|
// @ts-ignore
|
|
1996
|
-
|
|
1101
|
+
_this2.encodeParam("accountId", params.accountId)).replace("{".concat("jobId", "}"),
|
|
1997
1102
|
// @ts-ignore
|
|
1998
|
-
|
|
1103
|
+
_this2.encodeParam("jobId", params.jobId)).replace("{".concat("jobType", "}"),
|
|
1999
1104
|
// @ts-ignore
|
|
2000
|
-
|
|
2001
|
-
method: "
|
|
2002
|
-
headers:
|
|
2003
|
-
query:
|
|
2004
|
-
},
|
|
2005
|
-
return new
|
|
1105
|
+
_this2.encodeParam("jobType", params.jobType)),
|
|
1106
|
+
method: "DELETE",
|
|
1107
|
+
headers: headers,
|
|
1108
|
+
query: query
|
|
1109
|
+
}, undefined, [][0]), function (response) {
|
|
1110
|
+
return JobApi_await(new VoidApiResponse(response).value());
|
|
2006
1111
|
});
|
|
2007
1112
|
} catch (e) {
|
|
2008
1113
|
return Promise.reject(e);
|
|
@@ -2013,11 +1118,24 @@ var JobApi = /*#__PURE__*/function (_runtime$BaseAPI) {
|
|
|
2013
1118
|
*/
|
|
2014
1119
|
}, {
|
|
2015
1120
|
key: "getJob",
|
|
2016
|
-
value: function getJob(
|
|
1121
|
+
value: function getJob(params) {
|
|
2017
1122
|
try {
|
|
2018
|
-
var
|
|
2019
|
-
|
|
2020
|
-
|
|
1123
|
+
var _this4 = this;
|
|
1124
|
+
var query = {};
|
|
1125
|
+
var headers = {};
|
|
1126
|
+
return JobApi_await(_this4.request({
|
|
1127
|
+
path: "/v2/accounts/{accountId}/jobs/{jobType}/{jobId}".replace("{".concat("accountId", "}"),
|
|
1128
|
+
// @ts-ignore
|
|
1129
|
+
_this4.encodeParam("accountId", params.accountId)).replace("{".concat("jobId", "}"),
|
|
1130
|
+
// @ts-ignore
|
|
1131
|
+
_this4.encodeParam("jobId", params.jobId)).replace("{".concat("jobType", "}"),
|
|
1132
|
+
// @ts-ignore
|
|
1133
|
+
_this4.encodeParam("jobType", params.jobType)),
|
|
1134
|
+
method: "GET",
|
|
1135
|
+
headers: headers,
|
|
1136
|
+
query: query
|
|
1137
|
+
}, undefined, [][0]), function (response) {
|
|
1138
|
+
return JobApi_await(new JSONApiResponse(response).value());
|
|
2021
1139
|
});
|
|
2022
1140
|
} catch (e) {
|
|
2023
1141
|
return Promise.reject(e);
|
|
@@ -2027,50 +1145,24 @@ var JobApi = /*#__PURE__*/function (_runtime$BaseAPI) {
|
|
|
2027
1145
|
* Lists the most recently issued background jobs. Requires a `secret_*` API key.
|
|
2028
1146
|
*/
|
|
2029
1147
|
}, {
|
|
2030
|
-
key: "
|
|
2031
|
-
value: function
|
|
1148
|
+
key: "listRecentJobs",
|
|
1149
|
+
value: function listRecentJobs(params) {
|
|
2032
1150
|
try {
|
|
2033
|
-
var
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
if (requestParameters.jobType === null || requestParameters.jobType === undefined) {
|
|
2038
|
-
throw new RequiredError("jobType", "Required parameter requestParameters.jobType was null or undefined when calling listRecentJobs.");
|
|
2039
|
-
}
|
|
2040
|
-
var queryParameters = {};
|
|
2041
|
-
if (requestParameters.jobType) {
|
|
2042
|
-
queryParameters["jobType"] = requestParameters.jobType;
|
|
2043
|
-
}
|
|
2044
|
-
var headerParameters = {};
|
|
2045
|
-
if (_this10.configuration && _this10.configuration.apiKey) {
|
|
2046
|
-
headerParameters["Authorization"] = _this10.configuration.apiKey("Authorization"); // authorization-header authentication
|
|
1151
|
+
var _this6 = this;
|
|
1152
|
+
var query = {};
|
|
1153
|
+
if (params.jobType) {
|
|
1154
|
+
query["jobType"] = params.jobType;
|
|
2047
1155
|
}
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
return JobApi_await(_this10.request({
|
|
1156
|
+
var headers = {};
|
|
1157
|
+
return JobApi_await(_this6.request({
|
|
2051
1158
|
path: "/v2/accounts/{accountId}/jobs".replace("{".concat("accountId", "}"),
|
|
2052
1159
|
// @ts-ignore
|
|
2053
|
-
|
|
1160
|
+
_this6.encodeParam("accountId", params.accountId)),
|
|
2054
1161
|
method: "GET",
|
|
2055
|
-
headers:
|
|
2056
|
-
query:
|
|
2057
|
-
},
|
|
2058
|
-
return new JSONApiResponse(response);
|
|
2059
|
-
});
|
|
2060
|
-
} catch (e) {
|
|
2061
|
-
return Promise.reject(e);
|
|
2062
|
-
}
|
|
2063
|
-
}
|
|
2064
|
-
/**
|
|
2065
|
-
* Lists the most recently issued background jobs. Requires a `secret_*` API key.
|
|
2066
|
-
*/
|
|
2067
|
-
}, {
|
|
2068
|
-
key: "listRecentJobs",
|
|
2069
|
-
value: function listRecentJobs(requestParameters, initOverrides) {
|
|
2070
|
-
try {
|
|
2071
|
-
var _this12 = this;
|
|
2072
|
-
return JobApi_await(_this12.listRecentJobsWithHttpInfo(requestParameters, initOverrides), function (response) {
|
|
2073
|
-
return JobApi_await(response.value());
|
|
1162
|
+
headers: headers,
|
|
1163
|
+
query: query
|
|
1164
|
+
}, undefined, [][0]), function (response) {
|
|
1165
|
+
return JobApi_await(new JSONApiResponse(response).value());
|
|
2074
1166
|
});
|
|
2075
1167
|
} catch (e) {
|
|
2076
1168
|
return Promise.reject(e);
|
|
@@ -2079,7 +1171,7 @@ var JobApi = /*#__PURE__*/function (_runtime$BaseAPI) {
|
|
|
2079
1171
|
}]);
|
|
2080
1172
|
return JobApi;
|
|
2081
1173
|
}(BaseAPI);
|
|
2082
|
-
;// CONCATENATED MODULE: ./src/
|
|
1174
|
+
;// CONCATENATED MODULE: ./src/generated/apis/UploadApi.ts
|
|
2083
1175
|
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); }
|
|
2084
1176
|
function UploadApi_await(value, then, direct) {
|
|
2085
1177
|
if (direct) {
|
|
@@ -2090,12 +1182,6 @@ function UploadApi_await(value, then, direct) {
|
|
|
2090
1182
|
}
|
|
2091
1183
|
return then ? value.then(then) : value;
|
|
2092
1184
|
}
|
|
2093
|
-
function UploadApi_empty() {}
|
|
2094
|
-
function UploadApi_awaitIgnored(value, direct) {
|
|
2095
|
-
if (!direct) {
|
|
2096
|
-
return value && value.then ? value.then(UploadApi_empty) : Promise.resolve();
|
|
2097
|
-
}
|
|
2098
|
-
}
|
|
2099
1185
|
function UploadApi_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
2100
1186
|
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); } }
|
|
2101
1187
|
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; }
|
|
@@ -2111,7 +1197,7 @@ function UploadApi_getPrototypeOf(o) { UploadApi_getPrototypeOf = Object.setProt
|
|
|
2111
1197
|
/* tslint:disable */
|
|
2112
1198
|
/* eslint-disable */
|
|
2113
1199
|
/**
|
|
2114
|
-
* @bytescale/
|
|
1200
|
+
* @bytescale/api
|
|
2115
1201
|
* Bytescale API
|
|
2116
1202
|
*
|
|
2117
1203
|
* The version of the OpenAPI document: 2.0.0
|
|
@@ -2134,53 +1220,27 @@ var UploadApi = /*#__PURE__*/function (_runtime$BaseAPI) {
|
|
|
2134
1220
|
return _super.apply(this, arguments);
|
|
2135
1221
|
}
|
|
2136
1222
|
UploadApi_createClass(UploadApi, [{
|
|
2137
|
-
key: "
|
|
1223
|
+
key: "beginMultipartUpload",
|
|
2138
1224
|
value:
|
|
2139
1225
|
/**
|
|
2140
1226
|
* Begins a new multipart file upload process.
|
|
2141
1227
|
*/
|
|
2142
|
-
function
|
|
1228
|
+
function beginMultipartUpload(params) {
|
|
2143
1229
|
try {
|
|
2144
1230
|
var _this2 = this;
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
if (requestParameters.beginMultipartUploadRequest === null || requestParameters.beginMultipartUploadRequest === undefined) {
|
|
2149
|
-
throw new RequiredError("beginMultipartUploadRequest", "Required parameter requestParameters.beginMultipartUploadRequest was null or undefined when calling beginMultipartUpload.");
|
|
2150
|
-
}
|
|
2151
|
-
var queryParameters = {};
|
|
2152
|
-
var headerParameters = {};
|
|
2153
|
-
headerParameters["Content-Type"] = "application/json";
|
|
2154
|
-
if (_this2.configuration && _this2.configuration.apiKey) {
|
|
2155
|
-
headerParameters["Authorization"] = _this2.configuration.apiKey("Authorization"); // authorization-header authentication
|
|
2156
|
-
}
|
|
2157
|
-
|
|
2158
|
-
var operationBasePathOverride = [][0];
|
|
1231
|
+
var query = {};
|
|
1232
|
+
var headers = {};
|
|
1233
|
+
headers["Content-Type"] = "application/json";
|
|
2159
1234
|
return UploadApi_await(_this2.request({
|
|
2160
1235
|
path: "/v2/accounts/{accountId}/uploads".replace("{".concat("accountId", "}"),
|
|
2161
1236
|
// @ts-ignore
|
|
2162
|
-
|
|
1237
|
+
_this2.encodeParam("accountId", params.accountId)),
|
|
2163
1238
|
method: "POST",
|
|
2164
|
-
headers:
|
|
2165
|
-
query:
|
|
2166
|
-
body:
|
|
2167
|
-
},
|
|
2168
|
-
return new JSONApiResponse(response);
|
|
2169
|
-
});
|
|
2170
|
-
} catch (e) {
|
|
2171
|
-
return Promise.reject(e);
|
|
2172
|
-
}
|
|
2173
|
-
}
|
|
2174
|
-
/**
|
|
2175
|
-
* Begins a new multipart file upload process.
|
|
2176
|
-
*/
|
|
2177
|
-
}, {
|
|
2178
|
-
key: "beginMultipartUpload",
|
|
2179
|
-
value: function beginMultipartUpload(requestParameters, initOverrides) {
|
|
2180
|
-
try {
|
|
2181
|
-
var _this4 = this;
|
|
2182
|
-
return UploadApi_await(_this4.beginMultipartUploadWithHttpInfo(requestParameters, initOverrides), function (response) {
|
|
2183
|
-
return UploadApi_await(response.value());
|
|
1239
|
+
headers: headers,
|
|
1240
|
+
query: query,
|
|
1241
|
+
body: params.beginMultipartUploadRequest
|
|
1242
|
+
}, undefined, [][0]), function (response) {
|
|
1243
|
+
return UploadApi_await(new JSONApiResponse(response).value());
|
|
2184
1244
|
});
|
|
2185
1245
|
} catch (e) {
|
|
2186
1246
|
return Promise.reject(e);
|
|
@@ -2190,114 +1250,55 @@ var UploadApi = /*#__PURE__*/function (_runtime$BaseAPI) {
|
|
|
2190
1250
|
* Marks an upload part as uploaded. You must call this endpoint after you have successfully issued a `PUT` request to the `uploadUrl` on the corresponding UploadPart.
|
|
2191
1251
|
*/
|
|
2192
1252
|
}, {
|
|
2193
|
-
key: "
|
|
2194
|
-
value: function
|
|
1253
|
+
key: "completeUploadPart",
|
|
1254
|
+
value: function completeUploadPart(params) {
|
|
2195
1255
|
try {
|
|
2196
|
-
var
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
throw new RequiredError("uploadId", "Required parameter requestParameters.uploadId was null or undefined when calling completeUploadPart.");
|
|
2202
|
-
}
|
|
2203
|
-
if (requestParameters.uploadPartIndex === null || requestParameters.uploadPartIndex === undefined) {
|
|
2204
|
-
throw new RequiredError("uploadPartIndex", "Required parameter requestParameters.uploadPartIndex was null or undefined when calling completeUploadPart.");
|
|
2205
|
-
}
|
|
2206
|
-
if (requestParameters.completeUploadPartRequest === null || requestParameters.completeUploadPartRequest === undefined) {
|
|
2207
|
-
throw new RequiredError("completeUploadPartRequest", "Required parameter requestParameters.completeUploadPartRequest was null or undefined when calling completeUploadPart.");
|
|
2208
|
-
}
|
|
2209
|
-
var queryParameters = {};
|
|
2210
|
-
var headerParameters = {};
|
|
2211
|
-
headerParameters["Content-Type"] = "application/json";
|
|
2212
|
-
if (_this6.configuration && _this6.configuration.apiKey) {
|
|
2213
|
-
headerParameters["Authorization"] = _this6.configuration.apiKey("Authorization"); // authorization-header authentication
|
|
2214
|
-
}
|
|
2215
|
-
|
|
2216
|
-
var operationBasePathOverride = [][0];
|
|
2217
|
-
return UploadApi_await(_this6.request({
|
|
1256
|
+
var _this4 = this;
|
|
1257
|
+
var query = {};
|
|
1258
|
+
var headers = {};
|
|
1259
|
+
headers["Content-Type"] = "application/json";
|
|
1260
|
+
return UploadApi_await(_this4.request({
|
|
2218
1261
|
path: "/v2/accounts/{accountId}/uploads/{uploadId}/parts/{uploadPartIndex}".replace("{".concat("accountId", "}"),
|
|
2219
1262
|
// @ts-ignore
|
|
2220
|
-
|
|
1263
|
+
_this4.encodeParam("accountId", params.accountId)).replace("{".concat("uploadId", "}"),
|
|
2221
1264
|
// @ts-ignore
|
|
2222
|
-
|
|
1265
|
+
_this4.encodeParam("uploadId", params.uploadId)).replace("{".concat("uploadPartIndex", "}"),
|
|
2223
1266
|
// @ts-ignore
|
|
2224
|
-
|
|
1267
|
+
_this4.encodeParam("uploadPartIndex", params.uploadPartIndex)),
|
|
2225
1268
|
method: "PUT",
|
|
2226
|
-
headers:
|
|
2227
|
-
query:
|
|
2228
|
-
body:
|
|
2229
|
-
},
|
|
2230
|
-
return new VoidApiResponse(response);
|
|
1269
|
+
headers: headers,
|
|
1270
|
+
query: query,
|
|
1271
|
+
body: params.completeUploadPartRequest
|
|
1272
|
+
}, undefined, [][0]), function (response) {
|
|
1273
|
+
return UploadApi_await(new VoidApiResponse(response).value());
|
|
2231
1274
|
});
|
|
2232
1275
|
} catch (e) {
|
|
2233
1276
|
return Promise.reject(e);
|
|
2234
1277
|
}
|
|
2235
1278
|
}
|
|
2236
|
-
/**
|
|
2237
|
-
* Marks an upload part as uploaded. You must call this endpoint after you have successfully issued a `PUT` request to the `uploadUrl` on the corresponding UploadPart.
|
|
2238
|
-
*/
|
|
2239
|
-
}, {
|
|
2240
|
-
key: "completeUploadPart",
|
|
2241
|
-
value: function completeUploadPart(requestParameters, initOverrides) {
|
|
2242
|
-
try {
|
|
2243
|
-
var _this8 = this;
|
|
2244
|
-
return UploadApi_awaitIgnored(_this8.completeUploadPartWithHttpInfo(requestParameters, initOverrides));
|
|
2245
|
-
} catch (e) {
|
|
2246
|
-
return Promise.reject(e);
|
|
2247
|
-
}
|
|
2248
|
-
}
|
|
2249
1279
|
/**
|
|
2250
1280
|
* Gets a remaining upload part for a multipart file upload.
|
|
2251
1281
|
*/
|
|
2252
1282
|
}, {
|
|
2253
|
-
key: "
|
|
2254
|
-
value: function
|
|
1283
|
+
key: "getUploadPart",
|
|
1284
|
+
value: function getUploadPart(params) {
|
|
2255
1285
|
try {
|
|
2256
|
-
var
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
if (requestParameters.uploadId === null || requestParameters.uploadId === undefined) {
|
|
2261
|
-
throw new RequiredError("uploadId", "Required parameter requestParameters.uploadId was null or undefined when calling getUploadPart.");
|
|
2262
|
-
}
|
|
2263
|
-
if (requestParameters.uploadPartIndex === null || requestParameters.uploadPartIndex === undefined) {
|
|
2264
|
-
throw new RequiredError("uploadPartIndex", "Required parameter requestParameters.uploadPartIndex was null or undefined when calling getUploadPart.");
|
|
2265
|
-
}
|
|
2266
|
-
var queryParameters = {};
|
|
2267
|
-
var headerParameters = {};
|
|
2268
|
-
if (_this10.configuration && _this10.configuration.apiKey) {
|
|
2269
|
-
headerParameters["Authorization"] = _this10.configuration.apiKey("Authorization"); // authorization-header authentication
|
|
2270
|
-
}
|
|
2271
|
-
|
|
2272
|
-
var operationBasePathOverride = [][0];
|
|
2273
|
-
return UploadApi_await(_this10.request({
|
|
1286
|
+
var _this6 = this;
|
|
1287
|
+
var query = {};
|
|
1288
|
+
var headers = {};
|
|
1289
|
+
return UploadApi_await(_this6.request({
|
|
2274
1290
|
path: "/v2/accounts/{accountId}/uploads/{uploadId}/parts/{uploadPartIndex}".replace("{".concat("accountId", "}"),
|
|
2275
1291
|
// @ts-ignore
|
|
2276
|
-
|
|
1292
|
+
_this6.encodeParam("accountId", params.accountId)).replace("{".concat("uploadId", "}"),
|
|
2277
1293
|
// @ts-ignore
|
|
2278
|
-
|
|
1294
|
+
_this6.encodeParam("uploadId", params.uploadId)).replace("{".concat("uploadPartIndex", "}"),
|
|
2279
1295
|
// @ts-ignore
|
|
2280
|
-
|
|
1296
|
+
_this6.encodeParam("uploadPartIndex", params.uploadPartIndex)),
|
|
2281
1297
|
method: "GET",
|
|
2282
|
-
headers:
|
|
2283
|
-
query:
|
|
2284
|
-
},
|
|
2285
|
-
return new JSONApiResponse(response);
|
|
2286
|
-
});
|
|
2287
|
-
} catch (e) {
|
|
2288
|
-
return Promise.reject(e);
|
|
2289
|
-
}
|
|
2290
|
-
}
|
|
2291
|
-
/**
|
|
2292
|
-
* Gets a remaining upload part for a multipart file upload.
|
|
2293
|
-
*/
|
|
2294
|
-
}, {
|
|
2295
|
-
key: "getUploadPart",
|
|
2296
|
-
value: function getUploadPart(requestParameters, initOverrides) {
|
|
2297
|
-
try {
|
|
2298
|
-
var _this12 = this;
|
|
2299
|
-
return UploadApi_await(_this12.getUploadPartWithHttpInfo(requestParameters, initOverrides), function (response) {
|
|
2300
|
-
return UploadApi_await(response.value());
|
|
1298
|
+
headers: headers,
|
|
1299
|
+
query: query
|
|
1300
|
+
}, undefined, [][0]), function (response) {
|
|
1301
|
+
return UploadApi_await(new JSONApiResponse(response).value());
|
|
2301
1302
|
});
|
|
2302
1303
|
} catch (e) {
|
|
2303
1304
|
return Promise.reject(e);
|
|
@@ -2307,49 +1308,23 @@ var UploadApi = /*#__PURE__*/function (_runtime$BaseAPI) {
|
|
|
2307
1308
|
* Lists the remaining upload parts for a multipart file upload. An empty array is returned when the upload is complete.
|
|
2308
1309
|
*/
|
|
2309
1310
|
}, {
|
|
2310
|
-
key: "
|
|
2311
|
-
value: function
|
|
1311
|
+
key: "listUploadParts",
|
|
1312
|
+
value: function listUploadParts(params) {
|
|
2312
1313
|
try {
|
|
2313
|
-
var
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
if (requestParameters.uploadId === null || requestParameters.uploadId === undefined) {
|
|
2318
|
-
throw new RequiredError("uploadId", "Required parameter requestParameters.uploadId was null or undefined when calling listUploadParts.");
|
|
2319
|
-
}
|
|
2320
|
-
var queryParameters = {};
|
|
2321
|
-
var headerParameters = {};
|
|
2322
|
-
if (_this14.configuration && _this14.configuration.apiKey) {
|
|
2323
|
-
headerParameters["Authorization"] = _this14.configuration.apiKey("Authorization"); // authorization-header authentication
|
|
2324
|
-
}
|
|
2325
|
-
|
|
2326
|
-
var operationBasePathOverride = [][0];
|
|
2327
|
-
return UploadApi_await(_this14.request({
|
|
1314
|
+
var _this8 = this;
|
|
1315
|
+
var query = {};
|
|
1316
|
+
var headers = {};
|
|
1317
|
+
return UploadApi_await(_this8.request({
|
|
2328
1318
|
path: "/v2/accounts/{accountId}/uploads/{uploadId}/parts".replace("{".concat("accountId", "}"),
|
|
2329
1319
|
// @ts-ignore
|
|
2330
|
-
|
|
1320
|
+
_this8.encodeParam("accountId", params.accountId)).replace("{".concat("uploadId", "}"),
|
|
2331
1321
|
// @ts-ignore
|
|
2332
|
-
|
|
1322
|
+
_this8.encodeParam("uploadId", params.uploadId)),
|
|
2333
1323
|
method: "GET",
|
|
2334
|
-
headers:
|
|
2335
|
-
query:
|
|
2336
|
-
},
|
|
2337
|
-
return new JSONApiResponse(response);
|
|
2338
|
-
});
|
|
2339
|
-
} catch (e) {
|
|
2340
|
-
return Promise.reject(e);
|
|
2341
|
-
}
|
|
2342
|
-
}
|
|
2343
|
-
/**
|
|
2344
|
-
* Lists the remaining upload parts for a multipart file upload. An empty array is returned when the upload is complete.
|
|
2345
|
-
*/
|
|
2346
|
-
}, {
|
|
2347
|
-
key: "listUploadParts",
|
|
2348
|
-
value: function listUploadParts(requestParameters, initOverrides) {
|
|
2349
|
-
try {
|
|
2350
|
-
var _this16 = this;
|
|
2351
|
-
return UploadApi_await(_this16.listUploadPartsWithHttpInfo(requestParameters, initOverrides), function (response) {
|
|
2352
|
-
return UploadApi_await(response.value());
|
|
1324
|
+
headers: headers,
|
|
1325
|
+
query: query
|
|
1326
|
+
}, undefined, [][0]), function (response) {
|
|
1327
|
+
return UploadApi_await(new JSONApiResponse(response).value());
|
|
2353
1328
|
});
|
|
2354
1329
|
} catch (e) {
|
|
2355
1330
|
return Promise.reject(e);
|
|
@@ -2359,49 +1334,23 @@ var UploadApi = /*#__PURE__*/function (_runtime$BaseAPI) {
|
|
|
2359
1334
|
* Upload from a URL with a single HTTP request:
|
|
2360
1335
|
*/
|
|
2361
1336
|
}, {
|
|
2362
|
-
key: "
|
|
2363
|
-
value: function
|
|
1337
|
+
key: "uploadFromUrl",
|
|
1338
|
+
value: function uploadFromUrl(params) {
|
|
2364
1339
|
try {
|
|
2365
|
-
var
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
throw new RequiredError("uploadFromUrlRequest", "Required parameter requestParameters.uploadFromUrlRequest was null or undefined when calling uploadFromUrl.");
|
|
2371
|
-
}
|
|
2372
|
-
var queryParameters = {};
|
|
2373
|
-
var headerParameters = {};
|
|
2374
|
-
headerParameters["Content-Type"] = "application/json";
|
|
2375
|
-
if (_this18.configuration && _this18.configuration.apiKey) {
|
|
2376
|
-
headerParameters["Authorization"] = _this18.configuration.apiKey("Authorization"); // authorization-header authentication
|
|
2377
|
-
}
|
|
2378
|
-
|
|
2379
|
-
var operationBasePathOverride = [][0];
|
|
2380
|
-
return UploadApi_await(_this18.request({
|
|
1340
|
+
var _this10 = this;
|
|
1341
|
+
var query = {};
|
|
1342
|
+
var headers = {};
|
|
1343
|
+
headers["Content-Type"] = "application/json";
|
|
1344
|
+
return UploadApi_await(_this10.request({
|
|
2381
1345
|
path: "/v2/accounts/{accountId}/uploads/url".replace("{".concat("accountId", "}"),
|
|
2382
1346
|
// @ts-ignore
|
|
2383
|
-
|
|
1347
|
+
_this10.encodeParam("accountId", params.accountId)),
|
|
2384
1348
|
method: "POST",
|
|
2385
|
-
headers:
|
|
2386
|
-
query:
|
|
2387
|
-
body:
|
|
2388
|
-
},
|
|
2389
|
-
return new JSONApiResponse(response);
|
|
2390
|
-
});
|
|
2391
|
-
} catch (e) {
|
|
2392
|
-
return Promise.reject(e);
|
|
2393
|
-
}
|
|
2394
|
-
}
|
|
2395
|
-
/**
|
|
2396
|
-
* Upload from a URL with a single HTTP request:
|
|
2397
|
-
*/
|
|
2398
|
-
}, {
|
|
2399
|
-
key: "uploadFromUrl",
|
|
2400
|
-
value: function uploadFromUrl(requestParameters, initOverrides) {
|
|
2401
|
-
try {
|
|
2402
|
-
var _this20 = this;
|
|
2403
|
-
return UploadApi_await(_this20.uploadFromUrlWithHttpInfo(requestParameters, initOverrides), function (response) {
|
|
2404
|
-
return UploadApi_await(response.value());
|
|
1349
|
+
headers: headers,
|
|
1350
|
+
query: query,
|
|
1351
|
+
body: params.uploadFromUrlRequest
|
|
1352
|
+
}, undefined, [][0]), function (response) {
|
|
1353
|
+
return UploadApi_await(new JSONApiResponse(response).value());
|
|
2405
1354
|
});
|
|
2406
1355
|
} catch (e) {
|
|
2407
1356
|
return Promise.reject(e);
|
|
@@ -2410,332 +1359,20 @@ var UploadApi = /*#__PURE__*/function (_runtime$BaseAPI) {
|
|
|
2410
1359
|
}]);
|
|
2411
1360
|
return UploadApi;
|
|
2412
1361
|
}(BaseAPI);
|
|
2413
|
-
;// CONCATENATED MODULE: ./src/
|
|
1362
|
+
;// CONCATENATED MODULE: ./src/generated/apis/index.ts
|
|
2414
1363
|
/* tslint:disable */
|
|
2415
1364
|
/* eslint-disable */
|
|
2416
1365
|
|
|
2417
1366
|
|
|
2418
1367
|
|
|
2419
1368
|
|
|
2420
|
-
;// CONCATENATED MODULE: ./src/
|
|
2421
|
-
/* tslint:disable */
|
|
2422
|
-
/* eslint-disable */
|
|
2423
|
-
/**
|
|
2424
|
-
* "Created" is only used when issuing jobs non-transactionally (which we do if we want the job to be picked up sooner).
|
|
2425
|
-
* In this case, a two-phase transaction is performed.
|
|
2426
|
-
*
|
|
2427
|
-
* T=0) "Created" job tracker created.
|
|
2428
|
-
* T=1) SQS job enqueued.
|
|
2429
|
-
* T=2) "Pending" is set into job tracker.
|
|
2430
|
-
* T=3) Response returned to use
|
|
2431
|
-
* T=4) SQS picks up job. If status is "Created" it fails the job attempt. This keeps going until eventually the job perm-fails, or it sees "Pending". It should typically (always?) see "Pending" on the first attempt, if T=2 succeeded.
|
|
2432
|
-
* T=5) SQS processes the job as normal.
|
|
2433
|
-
*
|
|
2434
|
-
* As such, the "Created" state is an internal detail, and we never expose jobs in this state to the user.
|
|
2435
|
-
* @export
|
|
2436
|
-
*/
|
|
2437
|
-
var AccountJobStatus = {
|
|
2438
|
-
Created: "Created",
|
|
2439
|
-
Pending: "Pending",
|
|
2440
|
-
Running: "Running",
|
|
2441
|
-
Rollback: "Rollback",
|
|
2442
|
-
Failed: "Failed",
|
|
2443
|
-
Succeeded: "Succeeded",
|
|
2444
|
-
Cancelling: "Cancelling",
|
|
2445
|
-
Cancelled: "Cancelled"
|
|
2446
|
-
};
|
|
2447
|
-
/**
|
|
2448
|
-
* Job type.
|
|
2449
|
-
* @export
|
|
2450
|
-
*/
|
|
2451
|
-
var AccountJobType = {
|
|
2452
|
-
ProcessFileJob: "ProcessFileJob",
|
|
2453
|
-
DeleteFolderBatchJob: "DeleteFolderBatchJob",
|
|
2454
|
-
DeleteFileBatchJob: "DeleteFileBatchJob",
|
|
2455
|
-
CopyFolderBatchJob: "CopyFolderBatchJob",
|
|
2456
|
-
CopyFileBatchJob: "CopyFileBatchJob"
|
|
2457
|
-
};
|
|
2458
|
-
/**
|
|
2459
|
-
* @export
|
|
2460
|
-
*/
|
|
2461
|
-
var AsyncResponseJobDocsEnum = {
|
|
2462
|
-
HttpsWwwBytescaleComDocsJobApiGetJob: "https://www.bytescale.com/docs/job-api/GetJob"
|
|
2463
|
-
};
|
|
2464
|
-
/**
|
|
2465
|
-
* AWS Region.
|
|
2466
|
-
* @export
|
|
2467
|
-
*/
|
|
2468
|
-
var AwsRegion = {
|
|
2469
|
-
UsEast2: "us-east-2",
|
|
2470
|
-
UsEast1: "us-east-1",
|
|
2471
|
-
UsWest1: "us-west-1",
|
|
2472
|
-
UsWest2: "us-west-2",
|
|
2473
|
-
AfSouth1: "af-south-1",
|
|
2474
|
-
ApEast1: "ap-east-1",
|
|
2475
|
-
ApSoutheast3: "ap-southeast-3",
|
|
2476
|
-
ApSouth1: "ap-south-1",
|
|
2477
|
-
ApNortheast3: "ap-northeast-3",
|
|
2478
|
-
ApNortheast2: "ap-northeast-2",
|
|
2479
|
-
ApSoutheast1: "ap-southeast-1",
|
|
2480
|
-
ApSoutheast2: "ap-southeast-2",
|
|
2481
|
-
ApNortheast1: "ap-northeast-1",
|
|
2482
|
-
CaCentral1: "ca-central-1",
|
|
2483
|
-
EuCentral1: "eu-central-1",
|
|
2484
|
-
EuWest1: "eu-west-1",
|
|
2485
|
-
EuWest2: "eu-west-2",
|
|
2486
|
-
EuSouth1: "eu-south-1",
|
|
2487
|
-
EuWest3: "eu-west-3",
|
|
2488
|
-
EuNorth1: "eu-north-1",
|
|
2489
|
-
MeSouth1: "me-south-1",
|
|
2490
|
-
SaEast1: "sa-east-1"
|
|
2491
|
-
};
|
|
2492
|
-
/**
|
|
2493
|
-
* @export
|
|
2494
|
-
*/
|
|
2495
|
-
var DigitalOceanStorageTypeEnum = {
|
|
2496
|
-
DigitalOceanSpace: "DigitalOceanSpace"
|
|
2497
|
-
};
|
|
2498
|
-
/**
|
|
2499
|
-
* The result of the CopyFile operation.
|
|
2500
|
-
* @export
|
|
2501
|
-
*/
|
|
2502
|
-
var FileCopyStatus = {
|
|
2503
|
-
Copied: "Copied",
|
|
2504
|
-
FileNotFound: "FileNotFound",
|
|
2505
|
-
SkippedDueToCondition: "SkippedDueToCondition"
|
|
2506
|
-
};
|
|
2507
|
-
/**
|
|
2508
|
-
* @export
|
|
2509
|
-
*/
|
|
2510
|
-
var FileSummaryTypeEnum = {
|
|
2511
|
-
File: "File"
|
|
2512
|
-
};
|
|
2513
|
-
/**
|
|
2514
|
-
* @export
|
|
2515
|
-
*/
|
|
2516
|
-
var FolderDetailsTypeEnum = {
|
|
2517
|
-
Folder: "Folder"
|
|
2518
|
-
};
|
|
2519
|
-
/**
|
|
2520
|
-
* @export
|
|
2521
|
-
*/
|
|
2522
|
-
var FolderSettingsStorageLayerSummaryStorageLayerTypeEnum = {
|
|
2523
|
-
GoogleStorage: "GoogleStorage"
|
|
2524
|
-
};
|
|
2525
|
-
/**
|
|
2526
|
-
* @export
|
|
2527
|
-
*/
|
|
2528
|
-
var FolderSummaryTypeEnum = {
|
|
2529
|
-
Folder: "Folder"
|
|
2530
|
-
};
|
|
2531
|
-
/**
|
|
2532
|
-
* @export
|
|
2533
|
-
*/
|
|
2534
|
-
var GoogleStorageTypeEnum = {
|
|
2535
|
-
GoogleStorage: "GoogleStorage"
|
|
2536
|
-
};
|
|
2537
|
-
/**
|
|
2538
|
-
* @export
|
|
2539
|
-
*/
|
|
2540
|
-
var InternalStorageV1TypeEnum = {
|
|
2541
|
-
InternalStorageV1: "InternalStorageV1"
|
|
2542
|
-
};
|
|
2543
|
-
/**
|
|
2544
|
-
* @export
|
|
2545
|
-
*/
|
|
2546
|
-
var InternalStorageV2TypeEnum = {
|
|
2547
|
-
InternalStorageV2: "InternalStorageV2"
|
|
2548
|
-
};
|
|
2549
|
-
/**
|
|
2550
|
-
* @export
|
|
2551
|
-
*/
|
|
2552
|
-
var JobSummaryJobDocsEnum = {
|
|
2553
|
-
HttpsWwwBytescaleComDocsJobApiGetJob: "https://www.bytescale.com/docs/job-api/GetJob"
|
|
2554
|
-
};
|
|
2555
|
-
/**
|
|
2556
|
-
* Multipart file upload protocol version.
|
|
2557
|
-
*
|
|
2558
|
-
* - `1.0`: this protocol version automatically downgrades to single part uploads when files are below a certain size. When this protocol is used for small files, the file exists immediately after the `PUT` request to the `uploadUrl` completes. This protocol requires more client-side code to implement, and has a known issue whereby file TTLs are ignored if the client code fails to call CompleteUploadPart.
|
|
2559
|
-
*
|
|
2560
|
-
* - `1.1`: this protocol version uses multipart uploads for all files. When this protocol is used, files only exist after the last CompleteUploadPart request is made. This protocol simplifies client code, and fixes a known issue in the `2.0` protocol for file TTLs (described above).
|
|
2561
|
-
* @export
|
|
2562
|
-
*/
|
|
2563
|
-
var MultipartUploadProtocol = {
|
|
2564
|
-
_0: "1.0",
|
|
2565
|
-
_1: "1.1"
|
|
2566
|
-
};
|
|
2567
|
-
/**
|
|
2568
|
-
* @export
|
|
2569
|
-
*/
|
|
2570
|
-
var ObjectSummaryTypeEnum = {
|
|
2571
|
-
File: "File"
|
|
2572
|
-
};
|
|
2573
|
-
/**
|
|
2574
|
-
* Specifies the level in the file tree, relative to the path, that these permissions apply.
|
|
2575
|
-
*
|
|
2576
|
-
* - `"This"`: Permissions apply to the current path only.
|
|
2577
|
-
*
|
|
2578
|
-
* - `"Children"`: Permissions apply to the children (files and folders) of this path only.
|
|
2579
|
-
*
|
|
2580
|
-
* - `"Grandchildren+"`: Permissions apply to the grandchildren (files and folders) of this path and their descendants only.
|
|
2581
|
-
* @export
|
|
2582
|
-
*/
|
|
2583
|
-
var PathPermissionScope = {
|
|
2584
|
-
Children: "Children",
|
|
2585
|
-
Grandchildren: "Grandchildren+",
|
|
2586
|
-
This: "This"
|
|
2587
|
-
};
|
|
2588
|
-
/**
|
|
2589
|
-
* @export
|
|
2590
|
-
*/
|
|
2591
|
-
var PickDigitalOceanStorageExcludeKeyofDigitalOceanStorageCredentialsTypeEnum = {
|
|
2592
|
-
DigitalOceanSpace: "DigitalOceanSpace"
|
|
2593
|
-
};
|
|
2594
|
-
/**
|
|
2595
|
-
* @export
|
|
2596
|
-
*/
|
|
2597
|
-
var PickGoogleStorageExcludeKeyofGoogleStorageCredentialsTypeEnum = {
|
|
2598
|
-
GoogleStorage: "GoogleStorage"
|
|
2599
|
-
};
|
|
2600
|
-
/**
|
|
2601
|
-
* @export
|
|
2602
|
-
*/
|
|
2603
|
-
var PickR2StorageExcludeKeyofR2StorageCredentialsTypeEnum = {
|
|
2604
|
-
R2: "R2"
|
|
2605
|
-
};
|
|
2606
|
-
/**
|
|
2607
|
-
* @export
|
|
2608
|
-
*/
|
|
2609
|
-
var PickS3StorageExcludeKeyofS3StorageCredentialsTypeEnum = {
|
|
2610
|
-
S3: "S3"
|
|
2611
|
-
};
|
|
2612
|
-
/**
|
|
2613
|
-
* @export
|
|
2614
|
-
*/
|
|
2615
|
-
var R2StorageTypeEnum = {
|
|
2616
|
-
R2: "R2"
|
|
2617
|
-
};
|
|
2618
|
-
/**
|
|
2619
|
-
* @export
|
|
2620
|
-
*/
|
|
2621
|
-
var S3StorageTypeEnum = {
|
|
2622
|
-
S3: "S3"
|
|
2623
|
-
};
|
|
2624
|
-
/**
|
|
2625
|
-
* @export
|
|
2626
|
-
*/
|
|
2627
|
-
var SpecifiedFieldValueFolderDescriptionOrNullSetEnum = {
|
|
2628
|
-
True: true
|
|
2629
|
-
};
|
|
2630
|
-
/**
|
|
2631
|
-
* @export
|
|
2632
|
-
*/
|
|
2633
|
-
var SpecifiedFieldValuePublicPermissionsArrayOrNullSetEnum = {
|
|
2634
|
-
True: true
|
|
2635
|
-
};
|
|
2636
|
-
/**
|
|
2637
|
-
* @export
|
|
2638
|
-
*/
|
|
2639
|
-
var SpecifiedFieldValueStorageLayerUpdateOrNullSetEnum = {
|
|
2640
|
-
True: true
|
|
2641
|
-
};
|
|
2642
|
-
/**
|
|
2643
|
-
* @export
|
|
2644
|
-
*/
|
|
2645
|
-
var SpecifiedFieldValueStorageLayerUpdateOrNullValueTypeEnum = {
|
|
2646
|
-
GoogleStorage: "GoogleStorage"
|
|
2647
|
-
};
|
|
2648
|
-
/**
|
|
2649
|
-
* @export
|
|
2650
|
-
*/
|
|
2651
|
-
var StorageLayerSummaryTypeEnum = {
|
|
2652
|
-
GoogleStorage: "GoogleStorage"
|
|
2653
|
-
};
|
|
2654
|
-
/**
|
|
2655
|
-
* @export
|
|
2656
|
-
*/
|
|
2657
|
-
var StorageLayerUpdateTypeEnum = {
|
|
2658
|
-
GoogleStorage: "GoogleStorage"
|
|
2659
|
-
};
|
|
2660
|
-
/**
|
|
2661
|
-
* @export
|
|
2662
|
-
*/
|
|
2663
|
-
var TagConditionTypeEnum = {
|
|
2664
|
-
All: "All"
|
|
2665
|
-
};
|
|
2666
|
-
/**
|
|
2667
|
-
* @export
|
|
2668
|
-
*/
|
|
2669
|
-
var TagConditionAllTypeEnum = {
|
|
2670
|
-
All: "All"
|
|
2671
|
-
};
|
|
2672
|
-
/**
|
|
2673
|
-
* @export
|
|
2674
|
-
*/
|
|
2675
|
-
var TagConditionAndTypeEnum = {
|
|
2676
|
-
And: "And"
|
|
2677
|
-
};
|
|
2678
|
-
/**
|
|
2679
|
-
* @export
|
|
2680
|
-
*/
|
|
2681
|
-
var TagConditionAnyTypeEnum = {
|
|
2682
|
-
Any: "Any"
|
|
2683
|
-
};
|
|
2684
|
-
/**
|
|
2685
|
-
* @export
|
|
2686
|
-
*/
|
|
2687
|
-
var TagConditionEqualsTypeEnum = {
|
|
2688
|
-
Equals: "Equals"
|
|
2689
|
-
};
|
|
2690
|
-
/**
|
|
2691
|
-
* @export
|
|
2692
|
-
*/
|
|
2693
|
-
var TagConditionNotTypeEnum = {
|
|
2694
|
-
Not: "Not"
|
|
2695
|
-
};
|
|
2696
|
-
/**
|
|
2697
|
-
* @export
|
|
2698
|
-
*/
|
|
2699
|
-
var TagConditionOrTypeEnum = {
|
|
2700
|
-
Or: "Or"
|
|
2701
|
-
};
|
|
2702
|
-
/**
|
|
2703
|
-
* @export
|
|
2704
|
-
*/
|
|
2705
|
-
var UnspecifiedFieldValueSetEnum = {
|
|
2706
|
-
False: false
|
|
2707
|
-
};
|
|
2708
|
-
/**
|
|
2709
|
-
* @export
|
|
2710
|
-
*/
|
|
2711
|
-
var UpdatableFieldFolderDescriptionOrNullSetEnum = {
|
|
2712
|
-
True: true
|
|
2713
|
-
};
|
|
2714
|
-
/**
|
|
2715
|
-
* @export
|
|
2716
|
-
*/
|
|
2717
|
-
var UpdatableFieldPublicPermissionsArrayOrNullSetEnum = {
|
|
2718
|
-
True: true
|
|
2719
|
-
};
|
|
2720
|
-
/**
|
|
2721
|
-
* @export
|
|
2722
|
-
*/
|
|
2723
|
-
var UpdatableFieldStorageLayerUpdateOrNullSetEnum = {
|
|
2724
|
-
True: true
|
|
2725
|
-
};
|
|
2726
|
-
/**
|
|
2727
|
-
* @export
|
|
2728
|
-
*/
|
|
2729
|
-
var WebStorageTypeEnum = {
|
|
2730
|
-
Web: "Web"
|
|
2731
|
-
};
|
|
2732
|
-
;// CONCATENATED MODULE: ./src/gen/index.ts
|
|
1369
|
+
;// CONCATENATED MODULE: ./src/generated/index.ts
|
|
2733
1370
|
/* tslint:disable */
|
|
2734
1371
|
/* eslint-disable */
|
|
2735
1372
|
|
|
2736
1373
|
|
|
2737
1374
|
|
|
2738
|
-
;// CONCATENATED MODULE: ./src/
|
|
1375
|
+
;// CONCATENATED MODULE: ./src/uploads/NodeUtils.ts
|
|
2739
1376
|
function NodeUtils_typeof(obj) { "@babel/helpers - typeof"; return NodeUtils_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; }, NodeUtils_typeof(obj); }
|
|
2740
1377
|
function NodeUtils_await(value, then, direct) {
|
|
2741
1378
|
if (direct) {
|
|
@@ -2791,7 +1428,7 @@ var NodeUtils = /*#__PURE__*/function () {
|
|
|
2791
1428
|
}]);
|
|
2792
1429
|
return NodeUtils;
|
|
2793
1430
|
}();
|
|
2794
|
-
;// CONCATENATED MODULE: ./src/
|
|
1431
|
+
;// CONCATENATED MODULE: ./src/uploads/ChunkedStream.ts
|
|
2795
1432
|
function ChunkedStream_typeof(obj) { "@babel/helpers - typeof"; return ChunkedStream_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; }, ChunkedStream_typeof(obj); }
|
|
2796
1433
|
function ChunkedStream_invoke(body, then) {
|
|
2797
1434
|
var result = body();
|
|
@@ -2800,10 +1437,10 @@ function ChunkedStream_invoke(body, then) {
|
|
|
2800
1437
|
}
|
|
2801
1438
|
return then(result);
|
|
2802
1439
|
}
|
|
2803
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) ||
|
|
1440
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2804
1441
|
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."); }
|
|
2805
|
-
function
|
|
2806
|
-
function
|
|
1442
|
+
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); }
|
|
1443
|
+
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; }
|
|
2807
1444
|
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; } }
|
|
2808
1445
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
2809
1446
|
function ChunkedStream_await(value, then, direct) {
|
|
@@ -3008,37 +1645,37 @@ var ChunkedStream = /*#__PURE__*/function () {
|
|
|
3008
1645
|
}]);
|
|
3009
1646
|
return ChunkedStream;
|
|
3010
1647
|
}();
|
|
3011
|
-
;// CONCATENATED MODULE: ./src/
|
|
3012
|
-
function
|
|
3013
|
-
function
|
|
3014
|
-
function
|
|
3015
|
-
function
|
|
3016
|
-
function
|
|
3017
|
-
function
|
|
3018
|
-
function
|
|
3019
|
-
function
|
|
3020
|
-
function
|
|
3021
|
-
function
|
|
3022
|
-
function
|
|
3023
|
-
function
|
|
3024
|
-
function
|
|
3025
|
-
function
|
|
3026
|
-
function
|
|
3027
|
-
function
|
|
1648
|
+
;// CONCATENATED MODULE: ./src/uploads/UploadModel.ts
|
|
1649
|
+
function UploadModel_typeof(obj) { "@babel/helpers - typeof"; return UploadModel_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; }, UploadModel_typeof(obj); }
|
|
1650
|
+
function UploadModel_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, UploadModel_toPropertyKey(descriptor.key), descriptor); } }
|
|
1651
|
+
function UploadModel_createClass(Constructor, protoProps, staticProps) { if (protoProps) UploadModel_defineProperties(Constructor.prototype, protoProps); if (staticProps) UploadModel_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
1652
|
+
function UploadModel_toPropertyKey(arg) { var key = UploadModel_toPrimitive(arg, "string"); return UploadModel_typeof(key) === "symbol" ? key : String(key); }
|
|
1653
|
+
function UploadModel_toPrimitive(input, hint) { if (UploadModel_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (UploadModel_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
1654
|
+
function UploadModel_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
1655
|
+
function UploadModel_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) UploadModel_setPrototypeOf(subClass, superClass); }
|
|
1656
|
+
function UploadModel_createSuper(Derived) { var hasNativeReflectConstruct = UploadModel_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = UploadModel_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = UploadModel_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return UploadModel_possibleConstructorReturn(this, result); }; }
|
|
1657
|
+
function UploadModel_possibleConstructorReturn(self, call) { if (call && (UploadModel_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 UploadModel_assertThisInitialized(self); }
|
|
1658
|
+
function UploadModel_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
1659
|
+
function UploadModel_wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; UploadModel_wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !UploadModel_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 UploadModel_construct(Class, arguments, UploadModel_getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return UploadModel_setPrototypeOf(Wrapper, Class); }; return UploadModel_wrapNativeSuper(Class); }
|
|
1660
|
+
function UploadModel_construct(Parent, args, Class) { if (UploadModel_isNativeReflectConstruct()) { UploadModel_construct = Reflect.construct.bind(); } else { UploadModel_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) UploadModel_setPrototypeOf(instance, Class.prototype); return instance; }; } return UploadModel_construct.apply(null, arguments); }
|
|
1661
|
+
function UploadModel_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; } }
|
|
1662
|
+
function UploadModel_isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; }
|
|
1663
|
+
function UploadModel_setPrototypeOf(o, p) { UploadModel_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return UploadModel_setPrototypeOf(o, p); }
|
|
1664
|
+
function UploadModel_getPrototypeOf(o) { UploadModel_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return UploadModel_getPrototypeOf(o); }
|
|
3028
1665
|
var CancelledError = /*#__PURE__*/function (_Error) {
|
|
3029
|
-
|
|
3030
|
-
var _super =
|
|
1666
|
+
UploadModel_inherits(CancelledError, _Error);
|
|
1667
|
+
var _super = UploadModel_createSuper(CancelledError);
|
|
3031
1668
|
function CancelledError(msg) {
|
|
3032
1669
|
var _this;
|
|
3033
|
-
|
|
1670
|
+
UploadModel_classCallCheck(this, CancelledError);
|
|
3034
1671
|
_this = _super.call(this, msg);
|
|
3035
1672
|
_this.msg = msg;
|
|
3036
1673
|
_this.name = "CancelledError";
|
|
3037
1674
|
return _this;
|
|
3038
1675
|
}
|
|
3039
|
-
return
|
|
3040
|
-
}( /*#__PURE__*/
|
|
3041
|
-
;// CONCATENATED MODULE: ./src/
|
|
1676
|
+
return UploadModel_createClass(CancelledError);
|
|
1677
|
+
}( /*#__PURE__*/UploadModel_wrapNativeSuper(Error));
|
|
1678
|
+
;// CONCATENATED MODULE: ./src/uploads/UploadManager.ts
|
|
3042
1679
|
function UploadManager_typeof(obj) { "@babel/helpers - typeof"; return UploadManager_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; }, UploadManager_typeof(obj); }
|
|
3043
1680
|
function UploadManager_async(f) {
|
|
3044
1681
|
return function () {
|
|
@@ -3053,7 +1690,7 @@ function UploadManager_async(f) {
|
|
|
3053
1690
|
};
|
|
3054
1691
|
}
|
|
3055
1692
|
function UploadManager_empty() {}
|
|
3056
|
-
function
|
|
1693
|
+
function _awaitIgnored(value, direct) {
|
|
3057
1694
|
if (!direct) {
|
|
3058
1695
|
return value && value.then ? value.then(UploadManager_empty) : Promise.resolve();
|
|
3059
1696
|
}
|
|
@@ -3065,27 +1702,27 @@ function UploadManager_invoke(body, then) {
|
|
|
3065
1702
|
}
|
|
3066
1703
|
return then(result);
|
|
3067
1704
|
}
|
|
3068
|
-
function
|
|
1705
|
+
function _invokeIgnored(body) {
|
|
3069
1706
|
var result = body();
|
|
3070
1707
|
if (result && result.then) {
|
|
3071
1708
|
return result.then(UploadManager_empty);
|
|
3072
1709
|
}
|
|
3073
1710
|
}
|
|
3074
|
-
function
|
|
1711
|
+
function _settle(pact, state, value) {
|
|
3075
1712
|
if (!pact.s) {
|
|
3076
|
-
if (value instanceof
|
|
1713
|
+
if (value instanceof _Pact) {
|
|
3077
1714
|
if (value.s) {
|
|
3078
1715
|
if (state & 1) {
|
|
3079
1716
|
state = value.s;
|
|
3080
1717
|
}
|
|
3081
1718
|
value = value.v;
|
|
3082
1719
|
} else {
|
|
3083
|
-
value.o =
|
|
1720
|
+
value.o = _settle.bind(null, pact, state);
|
|
3084
1721
|
return;
|
|
3085
1722
|
}
|
|
3086
1723
|
}
|
|
3087
1724
|
if (value && value.then) {
|
|
3088
|
-
value.then(
|
|
1725
|
+
value.then(_settle.bind(null, pact, state), _settle.bind(null, pact, 2));
|
|
3089
1726
|
return;
|
|
3090
1727
|
}
|
|
3091
1728
|
pact.s = state;
|
|
@@ -3096,7 +1733,7 @@ function UploadManager_settle(pact, state, value) {
|
|
|
3096
1733
|
}
|
|
3097
1734
|
}
|
|
3098
1735
|
}
|
|
3099
|
-
var
|
|
1736
|
+
var _Pact = /*#__PURE__*/function () {
|
|
3100
1737
|
function _Pact() {}
|
|
3101
1738
|
_Pact.prototype.then = function (onFulfilled, onRejected) {
|
|
3102
1739
|
var result = new _Pact();
|
|
@@ -3105,9 +1742,9 @@ var UploadManager_Pact = /*#__PURE__*/function () {
|
|
|
3105
1742
|
var callback = state & 1 ? onFulfilled : onRejected;
|
|
3106
1743
|
if (callback) {
|
|
3107
1744
|
try {
|
|
3108
|
-
|
|
1745
|
+
_settle(result, 1, callback(this.v));
|
|
3109
1746
|
} catch (e) {
|
|
3110
|
-
|
|
1747
|
+
_settle(result, 2, e);
|
|
3111
1748
|
}
|
|
3112
1749
|
return result;
|
|
3113
1750
|
} else {
|
|
@@ -3118,28 +1755,28 @@ var UploadManager_Pact = /*#__PURE__*/function () {
|
|
|
3118
1755
|
try {
|
|
3119
1756
|
var value = _this.v;
|
|
3120
1757
|
if (_this.s & 1) {
|
|
3121
|
-
|
|
1758
|
+
_settle(result, 1, onFulfilled ? onFulfilled(value) : value);
|
|
3122
1759
|
} else if (onRejected) {
|
|
3123
|
-
|
|
1760
|
+
_settle(result, 1, onRejected(value));
|
|
3124
1761
|
} else {
|
|
3125
|
-
|
|
1762
|
+
_settle(result, 2, value);
|
|
3126
1763
|
}
|
|
3127
1764
|
} catch (e) {
|
|
3128
|
-
|
|
1765
|
+
_settle(result, 2, e);
|
|
3129
1766
|
}
|
|
3130
1767
|
};
|
|
3131
1768
|
return result;
|
|
3132
1769
|
};
|
|
3133
1770
|
return _Pact;
|
|
3134
1771
|
}();
|
|
3135
|
-
function
|
|
3136
|
-
return thenable instanceof
|
|
1772
|
+
function _isSettledPact(thenable) {
|
|
1773
|
+
return thenable instanceof _Pact && thenable.s & 1;
|
|
3137
1774
|
}
|
|
3138
1775
|
function _for(test, update, body) {
|
|
3139
1776
|
var stage;
|
|
3140
1777
|
for (;;) {
|
|
3141
1778
|
var shouldContinue = test();
|
|
3142
|
-
if (
|
|
1779
|
+
if (_isSettledPact(shouldContinue)) {
|
|
3143
1780
|
shouldContinue = shouldContinue.v;
|
|
3144
1781
|
}
|
|
3145
1782
|
if (!shouldContinue) {
|
|
@@ -3151,7 +1788,7 @@ function _for(test, update, body) {
|
|
|
3151
1788
|
}
|
|
3152
1789
|
var result = body();
|
|
3153
1790
|
if (result && result.then) {
|
|
3154
|
-
if (
|
|
1791
|
+
if (_isSettledPact(result)) {
|
|
3155
1792
|
result = result.s;
|
|
3156
1793
|
} else {
|
|
3157
1794
|
stage = 1;
|
|
@@ -3160,14 +1797,14 @@ function _for(test, update, body) {
|
|
|
3160
1797
|
}
|
|
3161
1798
|
if (update) {
|
|
3162
1799
|
var updateValue = update();
|
|
3163
|
-
if (updateValue && updateValue.then && !
|
|
1800
|
+
if (updateValue && updateValue.then && !_isSettledPact(updateValue)) {
|
|
3164
1801
|
stage = 2;
|
|
3165
1802
|
break;
|
|
3166
1803
|
}
|
|
3167
1804
|
}
|
|
3168
1805
|
}
|
|
3169
|
-
var pact = new
|
|
3170
|
-
var reject =
|
|
1806
|
+
var pact = new _Pact();
|
|
1807
|
+
var reject = _settle.bind(null, pact, 2);
|
|
3171
1808
|
(stage === 0 ? shouldContinue.then(_resumeAfterTest) : stage === 1 ? result.then(_resumeAfterBody) : updateValue.then(_resumeAfterUpdate)).then(void 0, reject);
|
|
3172
1809
|
return pact;
|
|
3173
1810
|
function _resumeAfterBody(value) {
|
|
@@ -3175,14 +1812,14 @@ function _for(test, update, body) {
|
|
|
3175
1812
|
do {
|
|
3176
1813
|
if (update) {
|
|
3177
1814
|
updateValue = update();
|
|
3178
|
-
if (updateValue && updateValue.then && !
|
|
1815
|
+
if (updateValue && updateValue.then && !_isSettledPact(updateValue)) {
|
|
3179
1816
|
updateValue.then(_resumeAfterUpdate).then(void 0, reject);
|
|
3180
1817
|
return;
|
|
3181
1818
|
}
|
|
3182
1819
|
}
|
|
3183
1820
|
shouldContinue = test();
|
|
3184
|
-
if (!shouldContinue ||
|
|
3185
|
-
|
|
1821
|
+
if (!shouldContinue || _isSettledPact(shouldContinue) && !shouldContinue.v) {
|
|
1822
|
+
_settle(pact, 1, result);
|
|
3186
1823
|
return;
|
|
3187
1824
|
}
|
|
3188
1825
|
if (shouldContinue.then) {
|
|
@@ -3190,7 +1827,7 @@ function _for(test, update, body) {
|
|
|
3190
1827
|
return;
|
|
3191
1828
|
}
|
|
3192
1829
|
result = body();
|
|
3193
|
-
if (
|
|
1830
|
+
if (_isSettledPact(result)) {
|
|
3194
1831
|
result = result.v;
|
|
3195
1832
|
}
|
|
3196
1833
|
} while (!result || !result.then);
|
|
@@ -3205,7 +1842,7 @@ function _for(test, update, body) {
|
|
|
3205
1842
|
_resumeAfterBody(result);
|
|
3206
1843
|
}
|
|
3207
1844
|
} else {
|
|
3208
|
-
|
|
1845
|
+
_settle(pact, 1, result);
|
|
3209
1846
|
}
|
|
3210
1847
|
}
|
|
3211
1848
|
function _resumeAfterUpdate() {
|
|
@@ -3216,7 +1853,7 @@ function _for(test, update, body) {
|
|
|
3216
1853
|
_resumeAfterTest(shouldContinue);
|
|
3217
1854
|
}
|
|
3218
1855
|
} else {
|
|
3219
|
-
|
|
1856
|
+
_settle(pact, 1, result);
|
|
3220
1857
|
}
|
|
3221
1858
|
}
|
|
3222
1859
|
}
|
|
@@ -3225,11 +1862,11 @@ function _continueIgnored(value) {
|
|
|
3225
1862
|
return value.then(UploadManager_empty);
|
|
3226
1863
|
}
|
|
3227
1864
|
}
|
|
3228
|
-
function
|
|
3229
|
-
function
|
|
1865
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || UploadManager_unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
1866
|
+
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."); }
|
|
3230
1867
|
function UploadManager_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return UploadManager_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 UploadManager_arrayLikeToArray(o, minLen); }
|
|
3231
|
-
function
|
|
3232
|
-
function
|
|
1868
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
1869
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return UploadManager_arrayLikeToArray(arr); }
|
|
3233
1870
|
function UploadManager_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; }
|
|
3234
1871
|
function UploadManager_await(value, then, direct) {
|
|
3235
1872
|
if (direct) {
|
|
@@ -3250,13 +1887,12 @@ function UploadManager_toPrimitive(input, hint) { if (UploadManager_typeof(input
|
|
|
3250
1887
|
|
|
3251
1888
|
|
|
3252
1889
|
var UploadManager = /*#__PURE__*/function () {
|
|
3253
|
-
function UploadManager() {
|
|
3254
|
-
var configuration = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DefaultConfig;
|
|
1890
|
+
function UploadManager(config) {
|
|
3255
1891
|
UploadManager_classCallCheck(this, UploadManager);
|
|
3256
|
-
this.
|
|
1892
|
+
this.config = config;
|
|
3257
1893
|
this.stringMimeType = "text/plain";
|
|
3258
1894
|
this.defaultMaxConcurrentUploadParts = 4;
|
|
3259
|
-
this.uploadApi = new UploadApi(
|
|
1895
|
+
this.uploadApi = new UploadApi(config);
|
|
3260
1896
|
}
|
|
3261
1897
|
UploadManager_createClass(UploadManager, [{
|
|
3262
1898
|
key: "upload",
|
|
@@ -3269,7 +1905,7 @@ var UploadManager = /*#__PURE__*/function () {
|
|
|
3269
1905
|
_this2.checkIfCancelled(request);
|
|
3270
1906
|
var maxConcurrency = _this2.calculateMaxConcurrency(request, data);
|
|
3271
1907
|
var partCount = uploadInfo.uploadParts.count;
|
|
3272
|
-
var parts =
|
|
1908
|
+
var parts = _toConsumableArray(Array(partCount).keys());
|
|
3273
1909
|
var runSourceStreamPump = chunkedStream === null || chunkedStream === void 0 ? void 0 : chunkedStream.runChunkPipeline();
|
|
3274
1910
|
return UploadManager_await(_this2.mapAsync(parts, maxConcurrency, UploadManager_async(function (part) {
|
|
3275
1911
|
return _this2.uploadPart(request, data, part, uploadInfo);
|
|
@@ -3329,7 +1965,7 @@ var UploadManager = /*#__PURE__*/function () {
|
|
|
3329
1965
|
_this6.checkIfCancelled(request);
|
|
3330
1966
|
return UploadManager_await(_this6.putUploadPart(part, data), function (etag) {
|
|
3331
1967
|
_this6.checkIfCancelled(request);
|
|
3332
|
-
return
|
|
1968
|
+
return _awaitIgnored(_this6.uploadApi.completeUploadPart({
|
|
3333
1969
|
accountId: request.accountId,
|
|
3334
1970
|
uploadId: uploadInfo.uploadId,
|
|
3335
1971
|
uploadPartIndex: partIndex,
|
|
@@ -3352,7 +1988,7 @@ var UploadManager = /*#__PURE__*/function () {
|
|
|
3352
1988
|
try {
|
|
3353
1989
|
var _this8 = this;
|
|
3354
1990
|
var _a, _b;
|
|
3355
|
-
var fetchApi = (_a = _this8.
|
|
1991
|
+
var fetchApi = (_a = _this8.config.fetchApi) !== null && _a !== void 0 ? _a : fetch;
|
|
3356
1992
|
var headers = {
|
|
3357
1993
|
// Required to prevent fetch using "Transfer-Encoding: Chunked" when body is a stream.
|
|
3358
1994
|
"content-length": (part.range.inclusiveEnd + 1 - part.range.inclusiveStart).toString()
|
|
@@ -3719,15 +2355,15 @@ var UploadManager = /*#__PURE__*/function () {
|
|
|
3719
2355
|
key: "mapAsync",
|
|
3720
2356
|
value: function mapAsync(items, concurrency, callback) {
|
|
3721
2357
|
try {
|
|
3722
|
-
var workQueue =
|
|
3723
|
-
return
|
|
2358
|
+
var workQueue = _toConsumableArray(items);
|
|
2359
|
+
return _awaitIgnored(Promise.all(_toConsumableArray(Array(concurrency).keys()).map(UploadManager_async(function () {
|
|
3724
2360
|
return _continueIgnored(_for(function () {
|
|
3725
2361
|
return workQueue.length > 0;
|
|
3726
2362
|
}, void 0, function () {
|
|
3727
2363
|
var work = workQueue.shift(); // IMPORTANT: use 'shift' instead of 'pop' to ensure 'items' are processed in order when 'concurrency = 1'.
|
|
3728
|
-
return
|
|
2364
|
+
return _invokeIgnored(function () {
|
|
3729
2365
|
if (work !== undefined) {
|
|
3730
|
-
return
|
|
2366
|
+
return _awaitIgnored(callback(work));
|
|
3731
2367
|
}
|
|
3732
2368
|
});
|
|
3733
2369
|
}));
|
|
@@ -3739,7 +2375,7 @@ var UploadManager = /*#__PURE__*/function () {
|
|
|
3739
2375
|
}]);
|
|
3740
2376
|
return UploadManager;
|
|
3741
2377
|
}();
|
|
3742
|
-
;// CONCATENATED MODULE: ./src/
|
|
2378
|
+
;// CONCATENATED MODULE: ./src/uploads/index.ts
|
|
3743
2379
|
|
|
3744
2380
|
|
|
3745
2381
|
|
|
@@ -3749,68 +2385,21 @@ var UploadManager = /*#__PURE__*/function () {
|
|
|
3749
2385
|
|
|
3750
2386
|
|
|
3751
2387
|
}();
|
|
3752
|
-
var __lib_exports__AccountJobStatus = __lib_exports__.AccountJobStatus;
|
|
3753
|
-
var __lib_exports__AccountJobType = __lib_exports__.AccountJobType;
|
|
3754
|
-
var __lib_exports__AsyncResponseJobDocsEnum = __lib_exports__.AsyncResponseJobDocsEnum;
|
|
3755
|
-
var __lib_exports__AwsRegion = __lib_exports__.AwsRegion;
|
|
3756
2388
|
var __lib_exports__BASE_PATH = __lib_exports__.BASE_PATH;
|
|
3757
2389
|
var __lib_exports__BaseAPI = __lib_exports__.BaseAPI;
|
|
3758
2390
|
var __lib_exports__BinaryResult = __lib_exports__.BinaryResult;
|
|
3759
|
-
var
|
|
2391
|
+
var __lib_exports__BytescaleApiError = __lib_exports__.BytescaleApiError;
|
|
3760
2392
|
var __lib_exports__CancelledError = __lib_exports__.CancelledError;
|
|
3761
2393
|
var __lib_exports__ChunkedStream = __lib_exports__.ChunkedStream;
|
|
3762
|
-
var __lib_exports__Configuration = __lib_exports__.Configuration;
|
|
3763
|
-
var __lib_exports__DefaultConfig = __lib_exports__.DefaultConfig;
|
|
3764
|
-
var __lib_exports__DigitalOceanStorageTypeEnum = __lib_exports__.DigitalOceanStorageTypeEnum;
|
|
3765
2394
|
var __lib_exports__FetchError = __lib_exports__.FetchError;
|
|
3766
2395
|
var __lib_exports__FileApi = __lib_exports__.FileApi;
|
|
3767
|
-
var __lib_exports__FileCopyStatus = __lib_exports__.FileCopyStatus;
|
|
3768
|
-
var __lib_exports__FileSummaryTypeEnum = __lib_exports__.FileSummaryTypeEnum;
|
|
3769
2396
|
var __lib_exports__FolderApi = __lib_exports__.FolderApi;
|
|
3770
|
-
var __lib_exports__FolderDetailsTypeEnum = __lib_exports__.FolderDetailsTypeEnum;
|
|
3771
|
-
var __lib_exports__FolderSettingsStorageLayerSummaryStorageLayerTypeEnum = __lib_exports__.FolderSettingsStorageLayerSummaryStorageLayerTypeEnum;
|
|
3772
|
-
var __lib_exports__FolderSummaryTypeEnum = __lib_exports__.FolderSummaryTypeEnum;
|
|
3773
|
-
var __lib_exports__GoogleStorageTypeEnum = __lib_exports__.GoogleStorageTypeEnum;
|
|
3774
|
-
var __lib_exports__InternalStorageV1TypeEnum = __lib_exports__.InternalStorageV1TypeEnum;
|
|
3775
|
-
var __lib_exports__InternalStorageV2TypeEnum = __lib_exports__.InternalStorageV2TypeEnum;
|
|
3776
2397
|
var __lib_exports__JSONApiResponse = __lib_exports__.JSONApiResponse;
|
|
3777
2398
|
var __lib_exports__JobApi = __lib_exports__.JobApi;
|
|
3778
|
-
var __lib_exports__JobSummaryJobDocsEnum = __lib_exports__.JobSummaryJobDocsEnum;
|
|
3779
|
-
var __lib_exports__MultipartUploadProtocol = __lib_exports__.MultipartUploadProtocol;
|
|
3780
|
-
var __lib_exports__ObjectSummaryTypeEnum = __lib_exports__.ObjectSummaryTypeEnum;
|
|
3781
|
-
var __lib_exports__PathPermissionScope = __lib_exports__.PathPermissionScope;
|
|
3782
|
-
var __lib_exports__PickDigitalOceanStorageExcludeKeyofDigitalOceanStorageCredentialsTypeEnum = __lib_exports__.PickDigitalOceanStorageExcludeKeyofDigitalOceanStorageCredentialsTypeEnum;
|
|
3783
|
-
var __lib_exports__PickGoogleStorageExcludeKeyofGoogleStorageCredentialsTypeEnum = __lib_exports__.PickGoogleStorageExcludeKeyofGoogleStorageCredentialsTypeEnum;
|
|
3784
|
-
var __lib_exports__PickR2StorageExcludeKeyofR2StorageCredentialsTypeEnum = __lib_exports__.PickR2StorageExcludeKeyofR2StorageCredentialsTypeEnum;
|
|
3785
|
-
var __lib_exports__PickS3StorageExcludeKeyofS3StorageCredentialsTypeEnum = __lib_exports__.PickS3StorageExcludeKeyofS3StorageCredentialsTypeEnum;
|
|
3786
|
-
var __lib_exports__ProcessFileCachePermEnum = __lib_exports__.ProcessFileCachePermEnum;
|
|
3787
|
-
var __lib_exports__R2StorageTypeEnum = __lib_exports__.R2StorageTypeEnum;
|
|
3788
2399
|
var __lib_exports__RequiredError = __lib_exports__.RequiredError;
|
|
3789
2400
|
var __lib_exports__ResponseError = __lib_exports__.ResponseError;
|
|
3790
|
-
var __lib_exports__S3StorageTypeEnum = __lib_exports__.S3StorageTypeEnum;
|
|
3791
|
-
var __lib_exports__SpecifiedFieldValueFolderDescriptionOrNullSetEnum = __lib_exports__.SpecifiedFieldValueFolderDescriptionOrNullSetEnum;
|
|
3792
|
-
var __lib_exports__SpecifiedFieldValuePublicPermissionsArrayOrNullSetEnum = __lib_exports__.SpecifiedFieldValuePublicPermissionsArrayOrNullSetEnum;
|
|
3793
|
-
var __lib_exports__SpecifiedFieldValueStorageLayerUpdateOrNullSetEnum = __lib_exports__.SpecifiedFieldValueStorageLayerUpdateOrNullSetEnum;
|
|
3794
|
-
var __lib_exports__SpecifiedFieldValueStorageLayerUpdateOrNullValueTypeEnum = __lib_exports__.SpecifiedFieldValueStorageLayerUpdateOrNullValueTypeEnum;
|
|
3795
|
-
var __lib_exports__StorageLayerSummaryTypeEnum = __lib_exports__.StorageLayerSummaryTypeEnum;
|
|
3796
|
-
var __lib_exports__StorageLayerUpdateTypeEnum = __lib_exports__.StorageLayerUpdateTypeEnum;
|
|
3797
|
-
var __lib_exports__TagConditionAllTypeEnum = __lib_exports__.TagConditionAllTypeEnum;
|
|
3798
|
-
var __lib_exports__TagConditionAndTypeEnum = __lib_exports__.TagConditionAndTypeEnum;
|
|
3799
|
-
var __lib_exports__TagConditionAnyTypeEnum = __lib_exports__.TagConditionAnyTypeEnum;
|
|
3800
|
-
var __lib_exports__TagConditionEqualsTypeEnum = __lib_exports__.TagConditionEqualsTypeEnum;
|
|
3801
|
-
var __lib_exports__TagConditionNotTypeEnum = __lib_exports__.TagConditionNotTypeEnum;
|
|
3802
|
-
var __lib_exports__TagConditionOrTypeEnum = __lib_exports__.TagConditionOrTypeEnum;
|
|
3803
|
-
var __lib_exports__TagConditionTypeEnum = __lib_exports__.TagConditionTypeEnum;
|
|
3804
|
-
var __lib_exports__TextApiResponse = __lib_exports__.TextApiResponse;
|
|
3805
|
-
var __lib_exports__UnspecifiedFieldValueSetEnum = __lib_exports__.UnspecifiedFieldValueSetEnum;
|
|
3806
|
-
var __lib_exports__UpdatableFieldFolderDescriptionOrNullSetEnum = __lib_exports__.UpdatableFieldFolderDescriptionOrNullSetEnum;
|
|
3807
|
-
var __lib_exports__UpdatableFieldPublicPermissionsArrayOrNullSetEnum = __lib_exports__.UpdatableFieldPublicPermissionsArrayOrNullSetEnum;
|
|
3808
|
-
var __lib_exports__UpdatableFieldStorageLayerUpdateOrNullSetEnum = __lib_exports__.UpdatableFieldStorageLayerUpdateOrNullSetEnum;
|
|
3809
2401
|
var __lib_exports__UploadApi = __lib_exports__.UploadApi;
|
|
3810
|
-
var __lib_exports__UploadApiError = __lib_exports__.UploadApiError;
|
|
3811
2402
|
var __lib_exports__UploadManager = __lib_exports__.UploadManager;
|
|
3812
2403
|
var __lib_exports__VoidApiResponse = __lib_exports__.VoidApiResponse;
|
|
3813
|
-
var __lib_exports__WebStorageTypeEnum = __lib_exports__.WebStorageTypeEnum;
|
|
3814
|
-
var __lib_exports__canConsumeForm = __lib_exports__.canConsumeForm;
|
|
3815
2404
|
var __lib_exports__querystring = __lib_exports__.querystring;
|
|
3816
|
-
export {
|
|
2405
|
+
export { __lib_exports__BASE_PATH as BASE_PATH, __lib_exports__BaseAPI as BaseAPI, __lib_exports__BinaryResult as BinaryResult, __lib_exports__BytescaleApiError as BytescaleApiError, __lib_exports__CancelledError as CancelledError, __lib_exports__ChunkedStream as ChunkedStream, __lib_exports__FetchError as FetchError, __lib_exports__FileApi as FileApi, __lib_exports__FolderApi as FolderApi, __lib_exports__JSONApiResponse as JSONApiResponse, __lib_exports__JobApi as JobApi, __lib_exports__RequiredError as RequiredError, __lib_exports__ResponseError as ResponseError, __lib_exports__UploadApi as UploadApi, __lib_exports__UploadManager as UploadManager, __lib_exports__VoidApiResponse as VoidApiResponse, __lib_exports__querystring as querystring };
|