import type { estypes } from '@elastic/elasticsearch';
import type { AuthorType, CnpmcorePatchInfo, PackageManifestType } from './PackageRepository.ts';
export type SearchJSONPickKey = '_rev' | 'name' | 'description' | 'keywords' | 'license' | 'maintainers' | 'dist-tags' | '_source_registry_name';
export type SearchMappingType = Pick<PackageManifestType, SearchJSONPickKey> & CnpmcorePatchInfo & {
    scope: string;
    version: string;
    versions: string[];
    date: Date;
    created: Date;
    modified: Date;
    author?: AuthorType | undefined;
    _npmUser?: {
        name: string;
        email: string;
    };
    publisher?: {
        username: string;
        email: string;
    };
    deprecated?: string;
};
export interface SearchManifestType {
    package: SearchMappingType;
    downloads: {
        all: number;
    };
}
export declare class SearchRepository {
    private readonly searchAdapter;
    searchPackage(query: any): Promise<estypes.SearchHitsMetadata<SearchManifestType>>;
    upsertPackage(document: SearchManifestType): Promise<string>;
    removePackage(fullname: string): Promise<string>;
}
