import { type Result } from '@riverbankcms/core';
import { type FileAsset, type FileAssetSource, type FileDerivative, type FileKind } from './fileDomain';
import type { MediaAsset, MediaSource } from './types';
/**
 * Temporary bridge from today's `MediaAsset` rows to the wider file asset domain.
 *
 * Cleanup criteria: remove this projection after Phase 2 moves dashboard/SDK media list,
 * finalize, delete, and download services onto persisted file-kind/use/access fields.
 * Until then it keeps old image/video rows readable through the new typed model without
 * changing current storage or DB behavior.
 */
export type LegacyMediaAssetProjectionError = 'unsupported-mime-type' | 'non-renderable-legacy-media-kind' | 'empty-site-id' | 'empty-storage-bucket' | 'empty-storage-path' | 'empty-filename' | 'invalid-byte-count' | 'invalid-checksum' | 'invalid-created-at' | 'invalid-updated-at';
export declare function projectLegacyMediaAssetToFileAsset(asset: MediaAsset): Result<FileAsset, LegacyMediaAssetProjectionError>;
export declare function fileAssetSourceFromLegacyMediaSource(source: MediaSource): FileAssetSource;
export declare function deriveLegacyMediaAssetDerivatives(asset: MediaAsset, kind: FileKind): readonly FileDerivative[];
