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 an Elixir/Erlang package exists on hex.pm. * * Queries hex.pm API to verify package existence and retrieve * the latest version. * * @param name - Package name (e.g., 'phoenix') * @param version - Optional version to validate (e.g., '1.7.10') * @param options - Optional configuration including cache * @returns Promise resolving to existence result with latest version * * @example * ```typescript * // Check if package exists * const result = await hexExists('phoenix') * // -> { exists: true, latestVersion: '1.7.10' } * * // Validate specific version * const result = await hexExists('phoenix', '1.7.10') * // -> { exists: true, latestVersion: '1.7.10' } * * // Non-existent package * const result = await hexExists('fake_package') * // -> { exists: false, error: 'Package not found' } * ``` */ export declare function hexExists(name: string, version?: string, options?: ExistsOptions): Promise; /** * Normalize Hex package URL. * Lowercases both namespace and name. */ export declare function normalize(purl: PurlObject): PurlObject; /** * Validate Hex package URL. * Name and namespace must not contain injection characters. */ export declare function validate(purl: PurlObject, throws: boolean): boolean; export {};