import { type ToFileInput } from "../internal/to-file.js"; /** * The file of an mxjson `file` item. */ export interface MxjsonFile { /** * The file, as a base64 data URI (`data:application/pdf;base64,...`) or as plain base64. It * cannot be another mxjson file. */ file_data: string; /** * Filename of the file. Its type is detected from it when `file_data` is plain base64. */ filename?: string; } /** * An mxjson `file` item, which carries a file for Mixedbread to parse and chunk. */ export interface MxjsonFileItem { type: 'file'; /** * The file the item carries. */ file: MxjsonFile; /** * Custom fields added to every chunk of the file. */ generated_metadata?: Record; } export interface MxjsonFileItemOptions { /** * Filename of the file, instead of the one `file` has. */ filename?: string; /** * MIME type of the file, instead of the one `file` has. It makes `file_data` a data URI; * without one `file_data` is plain base64 and Mixedbread detects the type from the filename * and the bytes. */ mimeType?: string; /** * Custom fields added to every chunk of the file. */ generatedMetadata?: Record; } /** * Build an mxjson `file` item that carries `file` itself, base64 encoded. * * `file` is what `toFile` takes: a `File`, `Blob`, `Response`, buffer or stream. Its name and * type are used unless `options` give others. * * The file is read into memory, and base64 makes it a third larger. */ export declare function mxjsonFileItem(file: ToFileInput | PromiseLike, options?: MxjsonFileItemOptions): Promise; //# sourceMappingURL=mxjson.d.ts.map