Files
Vector/packages/shared/src/manufacturer-insights.ts
T
josh 1d53e81d5e
CI / Lint · Typecheck · Test · Build (push) Successful in 47s
CI / Playwright (smoke) (push) Has been skipped
CI / Build & push images (push) Successful in 1m2s
feat(manufacturers): detail page with MPN-level insights
Adds /manufacturers/:id with vendor-wide KPIs, top MPNs by units,
failures by MPN, category mix, past-EOL exposure, and a filtered
PartModels table. Wires upstream links from PartDetail and
PartModelDetail so the manufacturer name is a navigable anchor.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-17 15:10:37 -04:00

50 lines
1.1 KiB
TypeScript

export interface ManufacturerPriceStats {
total: number;
average: number;
min: number | null;
max: number | null;
countWithPrice: number;
}
export interface ManufacturerFailureStats {
repairs: number;
distinctFailedParts: number;
fmsImplicating: number;
}
export interface ManufacturerCategoryCount {
categoryId: string | null;
categoryName: string;
count: number;
}
export interface ManufacturerModelCount {
partModelId: string;
mpn: string;
count: number;
}
export interface ManufacturerModelFailureCount {
partModelId: string;
mpn: string;
repairs: number;
}
export interface ManufacturerPastEolModel {
partModelId: string;
mpn: string;
eolDate: string;
deployedCount: number;
}
export interface ManufacturerInsights {
totalPartModels: number;
totalParts: number;
priceStats: ManufacturerPriceStats;
failures: ManufacturerFailureStats;
byCategory: ManufacturerCategoryCount[];
topModelsByUnits: ManufacturerModelCount[];
failuresByModel: ManufacturerModelFailureCount[];
pastEolModels: ManufacturerPastEolModel[];
}