import type { ExistsResult, ExistsOptions } from './npm.js'; interface PurlObject { name: string; namespace?: string | undefined; qualifiers?: Record | undefined; subpath?: string | undefined; type?: string | undefined; version?: string | undefined; } /** * Check if a Maven package exists in Maven Central. * * Queries search.maven.org API to verify package existence and retrieve * the latest version. Maven packages are identified by group ID (namespace) * and artifact ID (name). * * @param name - Artifact ID (e.g., 'commons-lang3') * @param namespace - Group ID (e.g., 'org.apache.commons') * @param version - Optional version to validate (e.g., '3.12.0') * @param options - Optional configuration including cache * @returns Promise resolving to existence result with latest version * * @example * ```typescript * // Check if package exists * const result = await mavenExists('commons-lang3', 'org.apache.commons') * // -> { exists: true, latestVersion: '3.12.0' } * * // Validate specific version * const result = await mavenExists('commons-lang3', 'org.apache.commons', '3.12.0') * // -> { exists: true, latestVersion: '3.12.0' } * * // Non-existent package * const result = await mavenExists('fake-artifact', 'com.example') * // -> { exists: false, error: 'Package not found' } * ``` */ export declare function mavenExists(name: string, namespace?: string, version?: string, options?: ExistsOptions): Promise; /** * Validate Maven package URL. * Maven packages require a namespace (groupId). Name and namespace must not * contain injection characters. */ export declare function validate(purl: PurlObject, throws: boolean): boolean; export {};