export type ProposalStatus = 'Draft' | 'InReview' | 'Approved' | 'Sent' | 'Revised'; // Fix: WEB-M4 — align with API enum (ProposalSystem.Domain.Entities.ServiceCategory includes 'Other') export type ServiceCategory = 'HVAC' | 'Plumbing' | 'Electrical' | 'General' | 'Renovation' | 'Other'; export type Priority = 'Standard' | 'Urgent' | 'Emergency'; export type LineItemSource = 'AI' | 'Vendor' | 'Manual' | 'Historical'; export type PricingMode = 'UnitPrice' | 'TotalPrice' | 'Both'; export type UserRole = 'Dispatcher' | 'Admin' | 'SysAdmin'; export interface Proposal { id: string; proposalNumber: string; workOrderNumber: string; customerName: string; customerAddress: string; scopeOfWork: string; refinedScope: string | null; serviceCategory: ServiceCategory; priority: Priority; status: ProposalStatus; totalBidAmount: number; vendorTotalCost: number | null; notes: string; submittedById: string; submittedAt: string; assignedAdminId: string | null; approvedById: string | null; approvedAt: string | null; sentAt: string | null; currentRevision: number; parentProposalId: string | null; createdAt: string; updatedAt: string; } export interface LineItem { id: string; proposalId: string; description: string; quantity: number; unit: string; unitPrice: number | null; totalPrice: number; pricingMode: PricingMode; sortOrder: number; source: LineItemSource; createdAt: string; updatedAt: string; } export interface CreateProposalRequest { workOrderNumber: string; customerName: string; customerAddress: string; scopeOfWork: string; serviceCategory: ServiceCategory; priority: Priority; notes?: string; } export interface UpdateLineItemsRequest { lineItems: Omit[]; } export interface Customer { id: string; name: string; addresses: string[]; contactEmail: string | null; createdAt: string; } export interface CreateCustomerRequest { name: string; addresses?: string[]; contactEmail?: string; } export interface UpdateCustomerRequest { name?: string; addresses?: string[]; contactEmail?: string | null; } export interface PagedResponse { items: T[]; totalCount: number; page: number; pageSize: number; } // PR5: Pricing Library types export interface PricingLibraryItem { id: string; title: string; description: string | null; serviceCategory: ServiceCategory; unit: string | null; unitPrice: number | null; keywords: string | null; source: string; createdAt: string; updatedAt: string; } export interface CreatePricingLibraryItemRequest { title: string; description?: string; serviceCategory: ServiceCategory; unit?: string; unitPrice?: number; keywords?: string; source?: string; } export interface UpdatePricingLibraryItemRequest { title?: string; description?: string; serviceCategory?: ServiceCategory; unit?: string; unitPrice?: number; keywords?: string; }