Initial scaffold: monorepo structure, CDK stacks, CI/CD, domain model
Phase 0 of proposal-system: complete project setup including:
- CDK infrastructure (3 stacks: foundation, compute, frontend)
- .NET 8 solution with Clean Architecture (Domain, Application, Infrastructure, Api)
- EF Core data model (PostgreSQL) with all entities
- Python Lambda placeholders (pdf-extract, pdf-generate, library-ingest)
- React 19 web frontend scaffold (Vite + MUI)
- React Native mobile placeholder
- Shared TypeScript API contracts
- GitHub Actions CI/CD (ci.yaml + deploy.yaml)
- OIDC deploy role (githubdeploy-proposal-system)
- Dependabot configuration
- Cognito User Pool with Google OAuth, PKCE clients, groups
2026-05-16 18:40:46 -04:00
|
|
|
export type ProposalStatus = 'Draft' | 'InReview' | 'Approved' | 'Sent' | 'Revised';
|
2026-05-27 18:04:47 -04:00
|
|
|
// Fix: WEB-M4 — align with API enum (ProposalSystem.Domain.Entities.ServiceCategory includes 'Other')
|
|
|
|
|
export type ServiceCategory = 'HVAC' | 'Plumbing' | 'Electrical' | 'General' | 'Renovation' | 'Other';
|
Initial scaffold: monorepo structure, CDK stacks, CI/CD, domain model
Phase 0 of proposal-system: complete project setup including:
- CDK infrastructure (3 stacks: foundation, compute, frontend)
- .NET 8 solution with Clean Architecture (Domain, Application, Infrastructure, Api)
- EF Core data model (PostgreSQL) with all entities
- Python Lambda placeholders (pdf-extract, pdf-generate, library-ingest)
- React 19 web frontend scaffold (Vite + MUI)
- React Native mobile placeholder
- Shared TypeScript API contracts
- GitHub Actions CI/CD (ci.yaml + deploy.yaml)
- OIDC deploy role (githubdeploy-proposal-system)
- Dependabot configuration
- Cognito User Pool with Google OAuth, PKCE clients, groups
2026-05-16 18:40:46 -04:00
|
|
|
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<LineItem, 'id' | 'proposalId' | 'createdAt' | 'updatedAt'>[];
|
|
|
|
|
}
|
2026-06-18 12:40:55 -04:00
|
|
|
|
|
|
|
|
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<T> {
|
|
|
|
|
items: T[];
|
|
|
|
|
totalCount: number;
|
|
|
|
|
page: number;
|
|
|
|
|
pageSize: number;
|
|
|
|
|
}
|
2026-06-18 12:49:47 -04:00
|
|
|
|
|
|
|
|
// 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;
|
|
|
|
|
}
|