/*!
 * name: nuget-server
 * version: 0.19.0
 * description: NuGet server on Node.js
 * author: Kouji Matsui (@kekyo@mi.kekyo.net)
 * license: MIT
 * repository.url: https://github.com/kekyo/nuget-server.git
 * git.commit.hash: 5b9501882b352a0490b3091210ed1740cfb81389
 */

import { FastifyInstance } from 'fastify';
import { ReaderWriterLock } from 'async-primitives';
import { Logger } from '../../types';
import { MetadataService } from '../../services/metadataService';
import { AuthService } from '../../services/authService';
import { FastifyAuthConfig } from '../../middleware/fastifyAuth';
import { createUrlResolver } from '../../utils/urlResolver';
/**
 * Service Index Resource interface for NuGet V3 API
 */
export interface ServiceIndexResource {
    "@id": string;
    "@type": string;
    comment: string;
}
/**
 * Service Index response structure
 */
export interface ServiceIndex {
    "@context": string;
    version: string;
    resources: ServiceIndexResource[];
}
/**
 * Search result version entry
 */
export interface SearchResultVersion {
    version: string;
    downloads: number;
    "@id": string;
}
/**
 * Individual package search result
 */
export interface SearchResult {
    "@type": string;
    registration: string;
    id: string;
    version: string;
    description: string;
    summary: string;
    title: string;
    iconUrl?: string;
    licenseUrl?: string;
    license?: string;
    projectUrl?: string;
    tags: string[];
    authors: string[];
    totalDownloads: number;
    verified: boolean;
    packageTypes: Array<{
        name: string;
    }>;
    versions: SearchResultVersion[];
}
/**
 * Search query response
 */
export interface SearchResponse {
    "@context": {
        "@vocab": string;
        "@base": string;
    };
    totalHits: number;
    lastReopen: string;
    index: string;
    data: SearchResult[];
}
/**
 * Registration index response for a package
 */
export interface RegistrationIndex {
    "@id": string;
    "@type": string[];
    commitId?: string;
    commitTimeStamp?: string;
    count: number;
    items: RegistrationPage[];
}
/**
 * Registration page containing package versions
 */
export interface RegistrationPage {
    "@id": string;
    "@type": string;
    commitId?: string;
    commitTimeStamp?: string;
    count: number;
    items: RegistrationLeaf[];
    lower?: string;
    upper?: string;
}
/**
 * Individual package version entry in registration
 */
export interface RegistrationLeaf {
    "@id": string;
    "@type": string;
    commitId?: string;
    commitTimeStamp?: string;
    catalogEntry: CatalogEntry;
    packageContent: string;
    registration: string;
}
/**
 * Catalog entry with package metadata
 */
export interface CatalogEntry {
    "@id": string;
    "@type": string;
    authors: string;
    description?: string;
    iconUrl?: string;
    icon?: string;
    id: string;
    language?: string;
    licenseExpression?: string;
    licenseUrl?: string;
    listed?: boolean;
    minClientVersion?: string;
    packageContent: string;
    projectUrl?: string;
    published: string;
    requireLicenseAcceptance?: boolean;
    summary?: string;
    tags?: string[];
    title?: string;
    version: string;
}
/**
 * Configuration for V3 API routes
 */
export interface V3RoutesConfig {
    metadataService: MetadataService;
    authService: AuthService;
    authConfig: FastifyAuthConfig;
    packagesRoot: string;
    logger: Logger;
    urlResolver: ReturnType<typeof createUrlResolver>;
}
/**
 * Registers NuGet V3 API routes with Fastify instance
 */
export declare const registerV3Routes: (fastify: FastifyInstance, config: V3RoutesConfig, locker: ReaderWriterLock) => Promise<void>;
//# sourceMappingURL=index.d.ts.map