import type { Readable } from 'stream'; import type { BINARY_DATA_MODES } from './binary-data.config'; export declare namespace BinaryData { type LegacyMode = 'filesystem'; type UpgradedMode = 'filesystem-v2'; export type ConfigMode = (typeof BINARY_DATA_MODES)[number]; export type ServiceMode = Exclude | UpgradedMode; export type StoredMode = Exclude; export type Metadata = { fileName?: string; mimeType?: string; fileSize: number; }; export type WriteResult = { fileId: string; fileSize: number; }; export type PreWriteMetadata = Omit; export type FileLocation = { type: 'execution'; workflowId: string; executionId: string; } | { type: 'custom'; pathSegments: string[]; sourceType?: string; sourceId?: string; }; export interface Manager { init(): Promise; store(location: FileLocation, bufferOrStream: Buffer | Readable, metadata: PreWriteMetadata): Promise; getPath(fileId: string): string; getAsBuffer(fileId: string): Promise; getAsStream(fileId: string, chunkSize?: number): Promise; getMetadata(fileId: string): Promise; deleteMany?(locations: FileLocation[]): Promise; deleteManyByFileId?(ids: string[]): Promise; copyByFileId(targetLocation: FileLocation, sourceFileId: string): Promise; copyByFilePath(targetLocation: FileLocation, sourcePath: string, metadata: PreWriteMetadata): Promise; rename(oldFileId: string, newFileId: string): Promise; } export type SigningPayload = { id: string; }; export {}; }