new-site/site/src/lib/intake_manifest.ts
justin 8ce9e2e118 Unified DOT intake form — one form for all trucking services
Single DOTIntakeStep shows/hides sections based on services ordered:
- Company info + address + signer (always)
- Entity & operations (MCS-150, USDOT, MC Auth, bundles)
- Fleet info (MCS-150, UCR, bundles)
- UCR fleet bracket + base state (UCR)
- Cargo types (MCS-150, bundles)
- D&A program (CDL drivers, DER, consortium)
- BOC-3 docket info (BOC-3)
- Photo ID upload (MCS-150, MC Auth)
- Security/encryption notices

All DOT services now use ["dot-intake", "review"] instead of ["review"].

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-30 15:23:48 -05:00

195 lines
10 KiB
TypeScript

/**
* Per-service intake step manifest.
*
* Each service slug maps to the ordered list of wizard steps. The Wizard
* component inserts category-gated dynamic steps (wireless, earth_station,
* audio_bridging, icc_import, reseller_cert) at runtime based on the
* user's Line 105 selection, between the declared step markers.
*
* Keep in sync with:
* - api/src/routes/compliance-orders.ts REQUIRED_FIELDS
* - scripts/workers/services/__init__.py SERVICE_HANDLERS registry
*/
export type IntakeStep =
| "entity"
| "category" // NEW: Line 105 ranked multi-select
| "officer"
| "jurisdiction"
| "history" // NEW: Line 228 first-service date
| "wireless" // NEW: category-gated — inserted when wireless selected
| "earth_station" // NEW: category-gated — satellite + private_line
| "audio_bridging" // NEW: category-gated — audio_bridging
| "revenue"
| "bundled_service" // NEW: local+toll bundle allocation
| "icc_import" // NEW: ICC revenue file uploads
| "reseller_cert" // NEW: Line 303 reseller certifications
| "lnpa_region" // NEW: Block 5 Lines 503-510 LNPA regions
| "block6_cert" // NEW: exemptions + nondisclosure + filing type
| "bdc_data"
| "stir_shaken"
| "calea"
| "foreign_carrier"
| "foreign_qual" // NEW: multi-state COA picker
| "dc_agent" // NEW: DC registered agent choice
| "cpni_questions" // NEW: CPNI certification questionnaire (sec 5-9)
| "cdr_period"
| "ocn"
| "mcs150" // MCS-150 biennial update form fields (standalone)
| "dot-intake" // Unified DOT intake — shows sections based on services ordered
| "review"
| "payment";
export const INTAKE_MANIFEST: Record<string, IntakeStep[]> = {
// Diagnostic — lightweight; just needs the entity
"fcc-compliance-checkup": ["entity", "review", "payment"],
// Entry-point filings
"cores-frn-registration": ["entity", "officer", "review", "payment"],
"fcc-499-initial": [
"entity", "classification", "category", "officer", "jurisdiction", "history",
"dc_agent", "block6_cert", "review", "payment",
],
// Annual + quarterly revenue filings — the full fidelity flow
"fcc-499a": [
"entity", "classification", "category", "officer", "jurisdiction", "history",
"dc_agent", "revenue", "bundled_service", "icc_import",
"reseller_cert", "lnpa_region",
"block6_cert", "review", "payment",
],
"fcc-499a-499q": [
"entity", "classification", "category", "officer", "jurisdiction",
"revenue", "icc_import",
"block6_cert", "review", "payment",
],
// RMD + CPNI + STIR/SHAKEN
"rmd-filing": ["entity", "officer", "stir_shaken", "review", "payment"],
"cpni-certification": ["entity", "officer", "cpni_questions", "review", "payment"],
"stir-shaken": ["entity", "stir_shaken", "review", "payment"],
// BDC tiers (formerly Form 477)
"bdc-broadband": ["entity", "bdc_data", "review", "payment"],
"bdc-voice": ["entity", "bdc_data", "review", "payment"],
"bdc-filing": ["entity", "bdc_data", "review", "payment"],
// CALEA + foreign-affiliation
"calea-ssi": ["entity", "category", "calea", "review", "payment"],
"fcc-63-11-notification": ["entity", "foreign_carrier", "review", "payment"],
// Supporting services
"ocn-registration": ["entity", "ocn", "review", "payment"],
"dc-agent": ["entity", "review", "payment"],
"cdr-analysis": ["entity", "cdr_period", "review", "payment"],
// Foreign qualification — Certificate of Authority across US states
"foreign-qualification-single": [
"entity", "foreign_qual", "review", "payment",
],
"foreign-qualification-multi": [
"entity", "foreign_qual", "review", "payment",
],
// Bundles
"fcc-full-compliance": [
"entity", "category", "officer", "jurisdiction", "history",
"revenue", "stir_shaken", "icc_import",
"reseller_cert", "lnpa_region", "block6_cert",
"review", "payment",
],
"new-carrier-bundle": [
"entity", "category", "officer", "jurisdiction", "history",
"dc_agent", "calea", "review", "payment",
],
// ── DOT / FMCSA Motor Carrier Services ──────────────────────────
// Unified DOT intake form — shows relevant sections based on service.
"mcs150-update": ["dot-intake", "review"],
"boc3-filing": ["dot-intake", "review"],
"ucr-registration": ["dot-intake", "review"],
"dot-registration": ["dot-intake", "review"],
"mc-authority": ["dot-intake", "review"],
"dot-drug-alcohol": ["dot-intake", "review"],
"dot-audit-prep": ["dot-intake", "review"],
"dot-full-compliance": ["dot-intake", "review"],
// ── State-Level Trucking Compliance ─────────────────────────────────
// Admin-assisted: info collected at checkout, no intake form needed.
"irp-registration": ["review"],
"ifta-application": ["review"],
"ifta-quarterly": ["review"],
"or-weight-mile-tax": ["review"],
"ny-hut-registration": ["review"],
"ky-kyu-registration": ["review"],
"nm-weight-distance": ["review"],
"ct-highway-use-fee": ["review"],
"ca-mcp-carb": ["review"],
"state-dot-registration":["review"],
"intrastate-authority": ["review"],
"osow-permit": ["review"],
"state-trucking-bundle": ["review"],
};
// Category-gated dynamic steps. The Wizard inserts these after the `category`
// step when the corresponding Line 105 category is in line_105_categories.
export const CATEGORY_GATED_STEPS: Record<string, IntakeStep[]> = {
wireless: ["wireless"],
satellite: ["earth_station"],
mobile_satellite:["earth_station"],
private_line: ["earth_station"],
audio_bridging: ["audio_bridging"],
};
// ── Pricing + human name lookup (mirrors COMPLIANCE_SERVICES server-side)
export const SERVICE_META: Record<string, { name: string; price_cents: number }> = {
"fcc-compliance-checkup": { name: "FCC Carrier Compliance Checkup", price_cents: 79900 },
"fcc-499a": { name: "FCC Form 499-A Filing", price_cents: 49900 },
"fcc-499a-499q": { name: "FCC Form 499-A + 499-Q Bundle", price_cents: 59900 },
"fcc-full-compliance": { name: "FCC Full Compliance Bundle", price_cents: 149900 },
"cpni-certification": { name: "CPNI Annual Certification", price_cents: 14900 },
"rmd-filing": { name: "RMD Registration / Recertification", price_cents: 21900 }, // + $100 FCC filing fee passthrough
"stir-shaken": { name: "STIR/SHAKEN Implementation Assistance", price_cents: 49900 },
"dc-agent": { name: "D.C. Registered Agent (Annual)", price_cents: 9900 },
"bdc-broadband": { name: "BDC Broadband Deployment Filing", price_cents: 19900 },
"bdc-voice": { name: "BDC Voice Subscription (formerly Form 477)", price_cents: 14900 },
"bdc-filing": { name: "BDC Filing (Broadband + Voice)", price_cents: 29900 },
"ocn-registration": { name: "NECA OCN / Company Code Registration", price_cents: 65000 },
"cdr-analysis": { name: "CDR Traffic Study (Annual)", price_cents: 49900 },
"cores-frn-registration": { name: "CORES / FRN Registration", price_cents: 9900 },
"fcc-499-initial": { name: "Form 499 Initial Registration", price_cents: 29900 },
"calea-ssi": { name: "CALEA SSI Plan", price_cents: 29900 },
"fcc-63-11-notification": { name: "Foreign Carrier Affiliation Notification", price_cents: 34900 },
"new-carrier-bundle": { name: "New Carrier Onboarding Bundle", price_cents: 179900 },
"foreign-qualification-single": { name: "Foreign Qualification (One State)", price_cents: 14900 },
"foreign-qualification-multi": { name: "Foreign Qualification (Multi-State)", price_cents: 9900 },
// DOT / FMCSA
"mcs150-update": { name: "MCS-150 Biennial Update", price_cents: 6900 },
"boc3-filing": { name: "BOC-3 Process Agent Filing", price_cents: 8900 },
"ucr-registration": { name: "UCR Annual Registration", price_cents: 6900 },
"dot-registration": { name: "New USDOT Number Registration", price_cents: 8900 },
"mc-authority": { name: "MC Operating Authority Application", price_cents: 34900 },
"dot-drug-alcohol": { name: "DOT Drug & Alcohol Compliance Program", price_cents: 14900 },
"dot-audit-prep": { name: "New Entrant Safety Audit Preparation", price_cents: 39900 },
"dot-full-compliance": { name: "DOT Full Compliance Bundle", price_cents: 39900 },
// State-level trucking
"irp-registration": { name: "IRP Registration Assistance", price_cents: 19900 },
"ifta-application": { name: "IFTA Application + Decals", price_cents: 14900 },
"ifta-quarterly": { name: "IFTA Quarterly Filing", price_cents: 9900 },
"or-weight-mile-tax": { name: "Oregon Weight-Mile Tax Setup", price_cents: 19900 },
"ny-hut-registration": { name: "NY Highway Use Tax Registration", price_cents: 19900 },
"ky-kyu-registration": { name: "KY Weight-Distance Tax Setup", price_cents: 19900 },
"nm-weight-distance": { name: "NM Weight-Distance Tax Setup", price_cents: 19900 },
"ct-highway-use-fee": { name: "CT Highway Use Fee Setup", price_cents: 19900 },
"ca-mcp-carb": { name: "California MCP + CARB Compliance", price_cents: 34900 },
"state-dot-registration": { name: "State DOT Registration", price_cents: 14900 },
"intrastate-authority": { name: "Intrastate Operating Authority", price_cents: 24900 },
"osow-permit": { name: "Oversize/Overweight Permit", price_cents: 9900 },
"state-trucking-bundle": { name: "State Compliance Bundle", price_cents: 49900 },
};
export function formatUSD(cents: number): string {
return `$${(cents / 100).toLocaleString("en-US", {
minimumFractionDigits: 2, maximumFractionDigits: 2,
})}`;
}