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; } /** * Normalize Composer package URL. * Lowercases both namespace and name. */ export declare function normalize(purl: PurlObject): PurlObject; /** * Check if a Composer package exists on Packagist. * * Queries Packagist.org API to verify package existence and retrieve * the latest version. Composer packages have vendor/package format. * * @param name - Package name (e.g., 'http-foundation') * @param namespace - Vendor name (e.g., 'symfony') * @param version - Optional version to validate (e.g., 'v6.3.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 packagistExists('http-foundation', 'symfony') * // -> { exists: true, latestVersion: 'v6.3.0' } * * // Validate specific version * const result = await packagistExists('http-foundation', 'symfony', 'v6.3.0') * // -> { exists: true, latestVersion: 'v6.3.0' } * * // Non-existent package * const result = await packagistExists('fake-package', 'vendor') * // -> { exists: false, error: 'Package not found' } * ``` */ export declare function packagistExists(name: string, namespace?: string, version?: string, options?: ExistsOptions): Promise; export {};