import type { ExistsOptions, ExistsResult } from './npm.js'; interface PurlObject { name: string; namespace?: string | undefined; qualifiers?: Record | undefined; subpath?: string | undefined; type?: string | undefined; version?: string | undefined; } /** * Normalize Conda package URL. * Lowercases name only. */ export declare function normalize(purl: PurlObject): PurlObject; /** * Validate Conda package URL. * Conda packages must not have a namespace. Name must not contain injection characters. */ export declare function validate(purl: PurlObject, throws: boolean): boolean; /** * Check if a Conda package exists in Anaconda.org. * * Queries Anaconda.org at https://api.anaconda.org/package to verify package * existence and optionally validate a specific version. Returns the latest * version from package metadata. * * **Note:** Defaults to conda-forge channel. Specify channel parameter for * other channels like 'defaults', 'anaconda', etc. * * **Caching:** Responses can be cached using a TTL cache to reduce registry * requests. Pass `{ cache }` option with a cache instance from `createTtlCache()`. * * @param name - Package name (e.g., 'numpy', 'pandas') * @param version - Optional version to validate (e.g., '1.24.3') * @param channel - Optional channel name (defaults to 'conda-forge') * @param options - Optional configuration including cache * @returns Promise resolving to existence result with latest version * * @example * ```typescript * // Check if package exists (defaults to conda-forge) * const result = await condaExists('numpy') * // -> { exists: true, latestVersion: '1.26.3' } * * // Check with custom channel * const result = await condaExists('numpy', undefined, 'defaults') * // -> { exists: true, latestVersion: '1.26.3' } * * // Validate specific version * const result = await condaExists('pandas', '2.1.4') * // -> { exists: true, latestVersion: '2.2.0' } * * // With caching * import { createTtlCache } from '@socketsecurity/lib/cache-with-ttl' * const cache = createTtlCache({ ttl: 5 * 60 * 1000, prefix: 'conda' }) * const result = await condaExists('numpy', undefined, undefined, { cache }) * * // Non-existent package * const result = await condaExists('this-package-does-not-exist') * // -> { exists: false, error: 'Package not found' } * ``` */ export declare function condaExists(name: string, version?: string, channel?: string, options?: ExistsOptions): Promise; export {};