InternalExport format being used.
Number of entries being exported.
Optionalfilters: ExportFilterOptionsOptional filter options applied.
Optionalsections: string[]Optional sections included (for statistics).
Complete metadata object.
export function buildExportMetadata(
format: ExportFormat,
totalEntries: number,
filters?: ExportFilterOptions,
sections?: string[],
): ExportMetadata {
const metadata: ExportMetadata = {
exportedAt: new Date().toISOString(),
appVersion: getAppVersion(),
format,
totalEntries,
};
if (filters) {
metadata.filters = {
statusFilter: filters.statusFilter,
confidenceThreshold: filters.confidenceThreshold,
includeUnmatched: filters.includeUnmatched,
unmatchedOnly: filters.unmatchedOnly,
};
}
if (sections) {
metadata.sections = sections;
}
return metadata;
}
Builds export metadata object with timestamp, version, format, filters, and entry count.