import { Vulnerability } from './vulnerability-checker'; export interface Registrar { retrieve: RegistryRetriever; } export type RegistryRetriever = (libraryName: string) => LibraryInfo | Promise; interface LibraryVersion { version: string; timestamp: number; licenses?: string | string[]; downloads?: number; latest: boolean; } export interface LibraryInfo { name: string; description?: string; versions: LibraryVersion[]; licenses: string[]; keywords?: string[]; issuesUrl?: string[]; reposUrl?: string[]; homepageUrl?: string; documentationUrl?: string; packageUrl?: string; downloads?: number; authors?: string[]; vulnerabilities?: Vulnerability[]; requiresLicenseAcceptance?: boolean; } export declare abstract class AbstractRegistrar implements Registrar { private readonly next; constructor(next?: Registrar | null); retrieve(libraryName: string): Promise; abstract retrieveFromRegistry(libraryName: string): LibraryInfo | Promise; } export type RegistryType = 'maven' | 'npm' | 'pypi' | 'nuget' | 'packagist'; export declare class LibrariesIORegistrar extends AbstractRegistrar { private readonly registryType; constructor(registryType: RegistryType); retrieveFromRegistry(libraryName: string): Promise; } export {};