AndesOps-AI / frontend /lib /types.ts
Álvaro Valenzuela Valdes
feat: implement IA recommendation engine based on company keywords
8663682
export type TenderItem = {
correlative?: number;
product_code?: string;
category?: string;
name: string;
description?: string;
quantity: number;
unit: string;
};
export type TenderAttachment = {
name: string;
url: string;
};
export type Tender = {
code: string;
name: string;
description: string;
buyer: string;
buyer_region?: string;
status: string;
status_code?: string;
type?: string;
currency?: string;
closing_date: string | null;
publication_date?: string | null;
estimated_amount: number | null;
source: string;
region?: string;
sector?: string;
items?: TenderItem[];
attachments?: TenderAttachment[];
evaluation_criteria?: { name?: string; weight?: string; description?: string }[];
contract_duration?: string;
buyer_complaints?: number;
buyer_purchases?: number;
};
export type CompanyProfile = {
name: string;
industry: string;
services: string[];
experience: string;
certifications: string[];
regions: string[];
documents_available: string[];
keywords: string[];
};
export type RiskItem = {
title: string;
severity: "High" | "Medium" | "Low";
explanation: string;
};
export type ActionItem = {
task: string;
priority: string;
owner: string;
timeline: string;
};
export type QAResponse = {
question: string;
answer: string;
};
export type AnalysisResult = {
fit_score: number;
decision: string;
executive_summary: string;
key_requirements: string[];
risks: RiskItem[];
compliance_gaps: string[];
action_plan: ActionItem[];
proposal_draft: string;
report_markdown: string;
strategic_roadmap?: string;
requirement_responses?: QAResponse[];
audit_log: string[];
raw_responses?: Record<string, string>;
};
export type OCItem = {
correlative?: number;
product_code?: string;
name: string;
description?: string;
quantity: number;
unit: string;
price?: number;
total?: number;
};
export type PurchaseOrder = {
code: string;
name: string;
status: string;
status_code?: string;
buyer: string;
buyer_rut?: string;
provider: string;
provider_rut?: string;
date_creation: string | null;
total_amount: number | null;
currency: string | null;
type?: string;
items?: OCItem[];
};
export type AnalysisHistoryItem = {
tender_code: string;
tender_name: string;
analyzed_at: string;
analysis: AnalysisResult;
};
export type TenderDetailTab = {
name: string;
found: boolean;
};
export type TenderDetailInfo = {
tender_code: string;
url: string;
tabs: Record<string, TenderDetailTab>;
attachments: TenderAttachment[];
metadata: {
has_administrative_docs?: boolean;
has_technical_docs?: boolean;
has_economic_docs?: boolean;
question_count?: number;
has_adjudication?: boolean;
buyer_complaints?: number;
buyer_purchases?: number;
guarantees?: Array<{ type: string; amount: string }>;
detailed_items?: Array<{ code: string; description: string }>;
};
error?: string;
};