/** * Client for the Trustify DA backend License Analysis API (POST /api/v5/licenses). * The same license data shape is returned in the dependency analysis JSON report (result.licenses). * @see https://github.com/guacsec/trustify-dependency-analytics#license-analysis-apiv5licenses * @see https://github.com/guacsec/trustify-da-api-spec/blob/main/api/v5/openapi.yaml */ /** * Fetch license details by SPDX identifier from the backend GET /api/v5/licenses/{spdx}. * Returns detailed information about a specific license including category, name, and text. * * @param {string} spdxId - SPDX identifier (e.g., "Apache-2.0", "MIT") * @param {import('../index.js').Options} [opts={}] - options (proxy, token, TRUSTIFY_DA_BACKEND_URL, etc.) * @returns {Promise} License details or null if not found */ export declare function getLicenseDetails(spdxId: string, opts?: import('../index.js').Options): Promise; /** * Normalize the LicensesResponse shape (array of LicenseProviderResult) into a map of purl -> license info. * Each provider result has { status, summary, packages } where packages is { [purl]: { concluded, evidence } }. * We merge the first successful provider's packages; concluded has identifiers[], category (PERMISSIVE | WEAK_COPYLEFT | STRONG_COPYLEFT | UNKNOWN). * * @param {unknown} data - LicensesResponse (array) or analysis report's licenses field * @param {string[]} [purls] - optional list of purls to restrict to (for consistency with getLicensesByPurl) * @returns {Map} */ export declare function normalizeLicensesResponse(data: unknown, purls?: string[]): Map; /** * Build license map from an analysis report that already includes license data (result.licenses). * Use this when the dependency analysis response already contains the licenses array to avoid a second request. * * @param {import('@trustify-da/trustify-da-api-model/model/v5/AnalysisReport.ts').AnalysisReport} analysisReport - full analysis JSON * @param {string[]} [purls] - optional list of purls to restrict to * @returns {Map} */ export declare function licensesFromReport(analysisReport: import('@trustify-da/trustify-da-api-model/model/v5/AnalysisReport.ts').AnalysisReport, purls?: string[]): Map;