• Internal

    Builds export metadata object with timestamp, version, format, filters, and entry count.

    Parameters

    • format: ExportFormat

      Export format being used.

    • totalEntries: number

      Number of entries being exported.

    • Optionalfilters: ExportFilterOptions

      Optional filter options applied.

    • Optionalsections: string[]

      Optional sections included (for statistics).

    Returns ExportMetadata

    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;
    }