export type Vulnerability = { id: string; severity: string; advisories: Array<{ id: string; url: string; }>; }; export type Remediation = { purl: string; groupId: string; artifactId: string; currentVersion: string; fixedInVersion: string; fixedInPurl: string; provider: string; source: string; vulnerabilities: Vulnerability[]; }; export type VersionStrategy = { selectVersion: (fixedInVersions: string[], currentVersion: string) => string; resolveConflict: (existing: ConflictCandidate, candidate: ConflictCandidate) => 'existing' | 'candidate'; }; /** * @typedef {{selectVersion: (fixedInVersions: string[], currentVersion: string) => string, resolveConflict: (existing: ConflictCandidate, candidate: ConflictCandidate) => 'existing'|'candidate'}} VersionStrategy */ /** * Version selection strategy that prefers the closest compatible version * within the same major version stream. Falls back to the lowest cross-major * version when no same-major option exists. * @type {VersionStrategy} */ export declare const closestCoverageStrategy: VersionStrategy; /** * Version selection strategy that always picks the highest version regardless * of major version distance. Guarantees maximum CVE coverage but may produce * large version jumps. This is the original behavior before pluggable strategies. * @type {VersionStrategy} */ export declare const highestStrategy: VersionStrategy; /** * Extracts actionable remediation instructions from a DA AnalysisReport response. * * Walks the provider/source/dependency/issue tree, collects fixedIn and trustedContent * remediation data, applies provider priority resolution, and uses the configured * version selection strategy to resolve conflicts. Dependencies with no remediation * data are skipped. * * @param {import('@trustify-da/trustify-da-api-model/model/v5/AnalysisReport.ts').AnalysisReport} analysisReport - raw DA AnalysisReport JSON response * @param {object} [options] - extraction options * @param {string[]} [options.providerPriority] - provider names in descending priority order. * The first entry has the highest priority. Providers not listed share the lowest priority. * When omitted or empty, all providers are treated equally and the highest fix version wins. * @param {VersionStrategy} [options.versionStrategy] - version selection strategy with selectVersion * and resolveConflict methods. Defaults to closestCoverageStrategy. * @returns {Remediation[]} `vulnerabilities` is the sole source of vulnerability data — each entry * holds one CVE with its own severity and advisories. Use {@link maxSeverity} to derive a * dependency-level severity. */ export declare function extractRemediations(analysisReport: import('@trustify-da/trustify-da-api-model/model/v5/AnalysisReport.ts').AnalysisReport, options?: { providerPriority?: string[]; versionStrategy?: VersionStrategy; }): Remediation[]; export declare const SEVERITY_ORDER: string[]; /** * Derives a dependency-level severity as the max across a list of vulnerabilities. * Returns 'UNKNOWN' for an empty or missing list. * @param {Array<{severity: string}>} [vulnerabilities] * @returns {string} */ export declare function maxSeverity(vulnerabilities?: Array<{ severity: string; }>): string;