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 Pub package URL. * Lowercases name and replaces dashes with underscores. */ export declare function normalize(purl: PurlObject): PurlObject; /** * Check if a Dart/Flutter package exists on pub.dev. * * Queries pub.dev API to verify package existence and retrieve * the latest version. * * @param name - Package name (e.g., 'flutter_bloc') * @param version - Optional version to validate (e.g., '8.1.3') * @param options - Optional configuration including cache * @returns Promise resolving to existence result with latest version * * @example * ```typescript * // Check if package exists * const result = await pubExists('flutter_bloc') * // -> { exists: true, latestVersion: '8.1.3' } * * // Validate specific version * const result = await pubExists('flutter_bloc', '8.1.3') * // -> { exists: true, latestVersion: '8.1.3' } * * // Non-existent package * const result = await pubExists('fake_package') * // -> { exists: false, error: 'Package not found' } * ``` */ export declare function pubExists(name: string, version?: string, options?: ExistsOptions): Promise; /** * Validate Pub package URL. * Name may only contain [a-z0-9_] characters. */ export declare function validate(purl: PurlObject, throws: boolean): boolean; export {};