export declare const API_URL = "https://api.securityscorecards.dev"; export type ScorecardCheck = { name: string; score: number; reason: string; details: null | string[]; documentation: { short: string; url: string; }; }; export type ScorecardResult = { date: string; metadata: string; repo: { name: string; commit: string; }; scorecard: { version: string; commit: string; }; score: number; checks: ScorecardCheck[]; }; export interface ResultOptions { /** * @description VCS platform. eg. github.com * @default github.com */ platform?: "github.com" | "github.corp.com" | "gitlab.com"; /** * @description Try to resolve the given repository on the NPM registry if its not found on the given platform. * @default true */ resolveOnNpmRegistry?: boolean; /** * @description Try to resolve the given repository on the given platform. This can be useful when the given repository * is not exactly the same as the one on the given platform (case sensitive). * @default true */ resolveOnVersionControl?: boolean; /** * @description The version of the npm package (when `resolveOnNpmRegistry` only) to retrieve the scorecard for. * @default "latest" */ npmPackageVersion?: string; } /** * @description Get a repository's ScorecardResult * @see https://api.securityscorecards.dev/#/results/getResult */ export declare function result(repository: string, options?: ResultOptions): Promise; export interface BadgeOptions extends ResultOptions { /** * Style to render the badge * * @default flat */ style?: "plastic" | "flat" | "flat-square" | "for-the-badge" | "social"; } export interface BadgeResult { image: string; svg: string; } /** * @description Get a repository's Scorecard badge URL * @see https://api.securityscorecards.dev/#/badge/getBadge */ export declare function badge(repository: string, options?: BadgeOptions): Promise; //# sourceMappingURL=index.d.ts.map