import type { Collection } from '../collections/config/types.js';
import type { SanitizedConfig } from '../config/types.js';
import type { PayloadRequest } from '../types/index.js';
import type { ExternalUploadSource } from './sanitizeUploadData.js';
import type { FileToSave } from './types.js';
type Args<T> = {
    collection: Collection;
    config: SanitizedConfig;
    data: T;
    draft?: boolean;
    externalUploadSource?: ExternalUploadSource;
    isDuplicating?: boolean;
    operation: 'create' | 'update';
    originalDoc?: T;
    overwriteExistingFiles?: boolean;
    req: PayloadRequest;
    throwOnMissingFile?: boolean;
};
type Result<T> = Promise<{
    data: T;
    files: FileToSave[];
}>;
/**
 * Builds the document's file metadata and the list of files to write to disk.
 *
 * A file uploaded with `useTempFiles` enabled arrives as a temp file path instead of an
 * in-memory buffer, and that temp file can be far larger than server memory allows. To avoid
 * loading it into memory unnecessarily, this skips reading the temp file entirely when local
 * storage is disabled, and copies it straight to its destination when local storage is enabled.
 */
export declare const generateFileData: <T>({ collection: { config: collectionConfig }, data, draft, externalUploadSource, isDuplicating, operation, originalDoc, overwriteExistingFiles, req, throwOnMissingFile, }: Args<T>) => Result<T>;
export {};
//# sourceMappingURL=generateFileData.d.ts.map