/** * Sourcing facade — a single entry point for tools to resolve part * sourcing/pricing data across the keyless tier (LCSC via jlcsearch) and * authenticated tiers (Mouser, DigiKey), reusing the {@link SupplierAdapter} * normalization already built for BOM quality checks. * * @module */ import { type ToolContext } from '../tools/types.js'; export type SourcingTier = 'keyless' | 'authenticated'; export interface SourcingIdentifier { lcsc?: string; mpn?: string; } export interface SourcingTierResult { supplier: string; tier: SourcingTier; found: boolean; in_stock: boolean; quantity_available?: number; unit_price?: number; currency?: string; lead_time_days?: number; classification?: string; status: string; source: string; from_cache: boolean; cache_age_seconds: number; reason?: string; } export interface ResolvePartSourcingOptions { /** Restrict to these supplier keys (case-insensitive). Omit to try every configured supplier. */ suppliers?: string[]; /** Whether the keyless LCSC tier should be attempted. Defaults to true. */ keylessSourcingEnabled?: boolean; } /** * Resolve sourcing/pricing data for a single part identifier across every * configured, available supplier. LCSC is queried keyless-first via the * public jlcsearch dataset when an LCSC code is known; Mouser/DigiKey are * queried only when a manufacturer part number is known, since neither * exposes a keyless tier. */ export declare function resolvePartSourcing(vendors: ToolContext['vendors'], identifier: SourcingIdentifier, options?: ResolvePartSourcingOptions): Promise;