/** * @module FileStorage */ import { type InferInstance } from "../../utilities/_module.js"; /** * The error is thrown when a file key is not found * * IMPORT_PATH: `"@daiso-tech/core/file-storage/contracts"` * @group Errors */ export declare class KeyNotFoundFileError extends Error { static create(key: string, cause?: unknown): KeyNotFoundFileError; /** * Note: Do not instantiate `KeyNotFoundFileError` directly via the constructor. Use the static `create()` factory method instead. * The constructor remains public only to maintain compatibility with errorPolicy types and prevent type errors. * @internal */ constructor(message: string, cause?: unknown); } /** * The error is thrown when a file key already exists found * * IMPORT_PATH: `"@daiso-tech/core/file-storage/contracts"` * @group Errors */ export declare class KeyExistsFileError extends Error { static create(key: string, cause?: unknown): KeyExistsFileError; /** * Note: Do not instantiate `KeyExistsFileError` directly via the constructor. Use the static `create()` factory method instead. * The constructor remains public only to maintain compatibility with errorPolicy types and prevent type errors. * @internal */ constructor(message: string, cause?: unknown); } /** * The error is thrown when file key is invalid. * * IMPORT_PATH: `"@daiso-tech/core/file-storage/contracts"` * @group Errors */ export declare class InvalidKeyFileError extends Error { static create(message: string, cause?: unknown): InvalidKeyFileError; /** * Note: Do not instantiate `InvalidKeyFileError` directly via the constructor. Use the static `create()` factory method instead. * The constructor remains public only to maintain compatibility with errorPolicy types and prevent type errors. * @internal */ constructor(message: string, cause?: unknown); } /** * IMPORT_PATH: `"@daiso-tech/core/file-storage/contracts"` * @group Errors */ export declare const FILE_STORAGE_ERRORS: { readonly KeyNotFound: typeof KeyNotFoundFileError; readonly KeyExists: typeof KeyExistsFileError; readonly InvalidKey: typeof InvalidKeyFileError; }; /** * IMPORT_PATH: `"@daiso-tech/core/file-storage/contracts"` * @group Errors */ export type AllFileErrors = InferInstance<(typeof FILE_STORAGE_ERRORS)[keyof typeof FILE_STORAGE_ERRORS]>; /** * IMPORT_PATH: `"@daiso-tech/core/file-storage/contracts"` * @group Errors */ export declare function isFileError(value: unknown): value is AllFileErrors;