@koolbase/core 12.21.0 → 12.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -258,6 +258,22 @@ export declare class KoolbaseStorageFileInUseError extends KoolbaseStorageError
|
|
|
258
258
|
export declare class KoolbaseStorageNameHasHistoryError extends KoolbaseStorageError {
|
|
259
259
|
constructor(message?: string);
|
|
260
260
|
}
|
|
261
|
+
/**
|
|
262
|
+
* An upload refused because malware was found in it (storage S6). Nothing of
|
|
263
|
+
* it was kept; the message names what was found. Trying again with the same
|
|
264
|
+
* file will be refused again. Code: `malware_found`.
|
|
265
|
+
*/
|
|
266
|
+
export declare class KoolbaseStorageMalwareError extends KoolbaseStorageError {
|
|
267
|
+
constructor(message?: string);
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* A file found to contain malware after it was stored (storage S6): it is
|
|
271
|
+
* quarantined, and no link to it is given. The server answers 423. Code:
|
|
272
|
+
* `quarantined`.
|
|
273
|
+
*/
|
|
274
|
+
export declare class KoolbaseStorageQuarantinedError extends KoolbaseStorageError {
|
|
275
|
+
constructor(message?: string);
|
|
276
|
+
}
|
|
261
277
|
/**
|
|
262
278
|
* Maps a non-2xx storage-layer response to a typed
|
|
263
279
|
* {@link KoolbaseStorageError}, preferring the server's stable `code` and
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.KoolbaseStorageNameHasHistoryError = exports.KoolbaseStorageFileInUseError = exports.KoolbaseDownloadCancelledError = exports.KoolbaseUploadIncompleteError = exports.KoolbaseStorageSignInRequiredError = exports.KoolbaseStorageInvalidCursorError = exports.KoolbaseStorageBusyError = exports.KoolbaseUploadNotFoundError = exports.KoolbaseUploadCancelledError = exports.KoolbaseStorageMetadataInvalidError = exports.KoolbaseStorageMimeTypeError = exports.KoolbaseStorageFileTooLargeError = exports.KoolbaseStorageQuotaError = exports.KoolbaseCapBelowUsageError = exports.KoolbaseUploadExpiredError = exports.KoolbaseUploadURLFailedError = exports.KoolbaseStoragePermissionError = exports.KoolbaseStorageValidationError = exports.KoolbaseStorageNotFoundError = exports.KoolbaseStorageConflictError = exports.KoolbaseStorageProjectIdentityError = exports.KoolbaseStorageError = void 0;
|
|
3
|
+
exports.KoolbaseStorageQuarantinedError = exports.KoolbaseStorageMalwareError = exports.KoolbaseStorageNameHasHistoryError = exports.KoolbaseStorageFileInUseError = exports.KoolbaseDownloadCancelledError = exports.KoolbaseUploadIncompleteError = exports.KoolbaseStorageSignInRequiredError = exports.KoolbaseStorageInvalidCursorError = exports.KoolbaseStorageBusyError = exports.KoolbaseUploadNotFoundError = exports.KoolbaseUploadCancelledError = exports.KoolbaseStorageMetadataInvalidError = exports.KoolbaseStorageMimeTypeError = exports.KoolbaseStorageFileTooLargeError = exports.KoolbaseStorageQuotaError = exports.KoolbaseCapBelowUsageError = exports.KoolbaseUploadExpiredError = exports.KoolbaseUploadURLFailedError = exports.KoolbaseStoragePermissionError = exports.KoolbaseStorageValidationError = exports.KoolbaseStorageNotFoundError = exports.KoolbaseStorageConflictError = exports.KoolbaseStorageProjectIdentityError = exports.KoolbaseStorageError = void 0;
|
|
4
4
|
exports.koolbaseStorageError = koolbaseStorageError;
|
|
5
5
|
exports.koolbaseStorageErrorFromResponse = koolbaseStorageErrorFromResponse;
|
|
6
6
|
const errors_js_1 = require("./errors.js");
|
|
@@ -368,6 +368,32 @@ class KoolbaseStorageNameHasHistoryError extends KoolbaseStorageError {
|
|
|
368
368
|
}
|
|
369
369
|
}
|
|
370
370
|
exports.KoolbaseStorageNameHasHistoryError = KoolbaseStorageNameHasHistoryError;
|
|
371
|
+
/**
|
|
372
|
+
* An upload refused because malware was found in it (storage S6). Nothing of
|
|
373
|
+
* it was kept; the message names what was found. Trying again with the same
|
|
374
|
+
* file will be refused again. Code: `malware_found`.
|
|
375
|
+
*/
|
|
376
|
+
class KoolbaseStorageMalwareError extends KoolbaseStorageError {
|
|
377
|
+
constructor(message) {
|
|
378
|
+
super(message ?? 'This file contains malware and was not uploaded', 'malware_found');
|
|
379
|
+
this.name = 'KoolbaseStorageMalwareError';
|
|
380
|
+
Object.setPrototypeOf(this, KoolbaseStorageMalwareError.prototype);
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
exports.KoolbaseStorageMalwareError = KoolbaseStorageMalwareError;
|
|
384
|
+
/**
|
|
385
|
+
* A file found to contain malware after it was stored (storage S6): it is
|
|
386
|
+
* quarantined, and no link to it is given. The server answers 423. Code:
|
|
387
|
+
* `quarantined`.
|
|
388
|
+
*/
|
|
389
|
+
class KoolbaseStorageQuarantinedError extends KoolbaseStorageError {
|
|
390
|
+
constructor(message) {
|
|
391
|
+
super(message ?? 'This file is quarantined: malware was found in it', 'quarantined');
|
|
392
|
+
this.name = 'KoolbaseStorageQuarantinedError';
|
|
393
|
+
Object.setPrototypeOf(this, KoolbaseStorageQuarantinedError.prototype);
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
exports.KoolbaseStorageQuarantinedError = KoolbaseStorageQuarantinedError;
|
|
371
397
|
/**
|
|
372
398
|
* Maps a non-2xx storage-layer response to a typed
|
|
373
399
|
* {@link KoolbaseStorageError}, preferring the server's stable `code` and
|
|
@@ -421,6 +447,10 @@ function koolbaseStorageError(status, body, fallbackMessage = 'Storage request f
|
|
|
421
447
|
}
|
|
422
448
|
case 'name_has_history':
|
|
423
449
|
return new KoolbaseStorageNameHasHistoryError(message);
|
|
450
|
+
case 'malware_found':
|
|
451
|
+
return new KoolbaseStorageMalwareError(message);
|
|
452
|
+
case 'quarantined':
|
|
453
|
+
return new KoolbaseStorageQuarantinedError(message);
|
|
424
454
|
case 'upload_incomplete': {
|
|
425
455
|
const d = (body?.details ?? {});
|
|
426
456
|
return new KoolbaseUploadIncompleteError(message, Array.isArray(d.missing) ? d.missing : []);
|
|
@@ -434,6 +464,8 @@ function koolbaseStorageError(status, body, fallbackMessage = 'Storage request f
|
|
|
434
464
|
return new KoolbaseStorageFileTooLargeError(message);
|
|
435
465
|
case 415:
|
|
436
466
|
return new KoolbaseStorageMimeTypeError(message);
|
|
467
|
+
case 423:
|
|
468
|
+
return new KoolbaseStorageQuarantinedError(message);
|
|
437
469
|
case 404:
|
|
438
470
|
return new KoolbaseStorageNotFoundError(message);
|
|
439
471
|
case 401:
|
|
@@ -258,6 +258,22 @@ export declare class KoolbaseStorageFileInUseError extends KoolbaseStorageError
|
|
|
258
258
|
export declare class KoolbaseStorageNameHasHistoryError extends KoolbaseStorageError {
|
|
259
259
|
constructor(message?: string);
|
|
260
260
|
}
|
|
261
|
+
/**
|
|
262
|
+
* An upload refused because malware was found in it (storage S6). Nothing of
|
|
263
|
+
* it was kept; the message names what was found. Trying again with the same
|
|
264
|
+
* file will be refused again. Code: `malware_found`.
|
|
265
|
+
*/
|
|
266
|
+
export declare class KoolbaseStorageMalwareError extends KoolbaseStorageError {
|
|
267
|
+
constructor(message?: string);
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* A file found to contain malware after it was stored (storage S6): it is
|
|
271
|
+
* quarantined, and no link to it is given. The server answers 423. Code:
|
|
272
|
+
* `quarantined`.
|
|
273
|
+
*/
|
|
274
|
+
export declare class KoolbaseStorageQuarantinedError extends KoolbaseStorageError {
|
|
275
|
+
constructor(message?: string);
|
|
276
|
+
}
|
|
261
277
|
/**
|
|
262
278
|
* Maps a non-2xx storage-layer response to a typed
|
|
263
279
|
* {@link KoolbaseStorageError}, preferring the server's stable `code` and
|
|
@@ -341,6 +341,30 @@ export class KoolbaseStorageNameHasHistoryError extends KoolbaseStorageError {
|
|
|
341
341
|
Object.setPrototypeOf(this, KoolbaseStorageNameHasHistoryError.prototype);
|
|
342
342
|
}
|
|
343
343
|
}
|
|
344
|
+
/**
|
|
345
|
+
* An upload refused because malware was found in it (storage S6). Nothing of
|
|
346
|
+
* it was kept; the message names what was found. Trying again with the same
|
|
347
|
+
* file will be refused again. Code: `malware_found`.
|
|
348
|
+
*/
|
|
349
|
+
export class KoolbaseStorageMalwareError extends KoolbaseStorageError {
|
|
350
|
+
constructor(message) {
|
|
351
|
+
super(message ?? 'This file contains malware and was not uploaded', 'malware_found');
|
|
352
|
+
this.name = 'KoolbaseStorageMalwareError';
|
|
353
|
+
Object.setPrototypeOf(this, KoolbaseStorageMalwareError.prototype);
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
/**
|
|
357
|
+
* A file found to contain malware after it was stored (storage S6): it is
|
|
358
|
+
* quarantined, and no link to it is given. The server answers 423. Code:
|
|
359
|
+
* `quarantined`.
|
|
360
|
+
*/
|
|
361
|
+
export class KoolbaseStorageQuarantinedError extends KoolbaseStorageError {
|
|
362
|
+
constructor(message) {
|
|
363
|
+
super(message ?? 'This file is quarantined: malware was found in it', 'quarantined');
|
|
364
|
+
this.name = 'KoolbaseStorageQuarantinedError';
|
|
365
|
+
Object.setPrototypeOf(this, KoolbaseStorageQuarantinedError.prototype);
|
|
366
|
+
}
|
|
367
|
+
}
|
|
344
368
|
/**
|
|
345
369
|
* Maps a non-2xx storage-layer response to a typed
|
|
346
370
|
* {@link KoolbaseStorageError}, preferring the server's stable `code` and
|
|
@@ -394,6 +418,10 @@ export function koolbaseStorageError(status, body, fallbackMessage = 'Storage re
|
|
|
394
418
|
}
|
|
395
419
|
case 'name_has_history':
|
|
396
420
|
return new KoolbaseStorageNameHasHistoryError(message);
|
|
421
|
+
case 'malware_found':
|
|
422
|
+
return new KoolbaseStorageMalwareError(message);
|
|
423
|
+
case 'quarantined':
|
|
424
|
+
return new KoolbaseStorageQuarantinedError(message);
|
|
397
425
|
case 'upload_incomplete': {
|
|
398
426
|
const d = (body?.details ?? {});
|
|
399
427
|
return new KoolbaseUploadIncompleteError(message, Array.isArray(d.missing) ? d.missing : []);
|
|
@@ -407,6 +435,8 @@ export function koolbaseStorageError(status, body, fallbackMessage = 'Storage re
|
|
|
407
435
|
return new KoolbaseStorageFileTooLargeError(message);
|
|
408
436
|
case 415:
|
|
409
437
|
return new KoolbaseStorageMimeTypeError(message);
|
|
438
|
+
case 423:
|
|
439
|
+
return new KoolbaseStorageQuarantinedError(message);
|
|
410
440
|
case 404:
|
|
411
441
|
return new KoolbaseStorageNotFoundError(message);
|
|
412
442
|
case 401:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koolbase/core",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.22.0",
|
|
4
4
|
"description": "Koolbase SDK core \u2014 shared behaviour behind @koolbase/react-native and @koolbase/js. Install one of those, not this.",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"types": "./dist/esm/index.d.ts",
|