Apache-3 BidOps · Docs · 04
Mock opportunity shape
The RawSamGovOpportunity TypeScript shape used in the fixtures. Same shape the real SAM.gov API returns.
Mock opportunities live at src/lib/sam-gov/fixtures.ts and use the same shape as the real SAM.gov Opportunities API v3 response.
Required fields
interface RawSamGovOpportunity {
noticeId: string;
title: string;
solicitationNumber: string | null;
fullParentPathName: string; // e.g. "DEPT OF DEFENSE / DEPT OF THE ARMY / USACE"
department: string; // "Department of Defense"
subTier: string; // "Department of the Army"
office: string; // "USACE Kansas City District"
type: string; // "Solicitation" | "RFI" | "Sources Sought" | "RFQ"
baseType: string; // "Combined Synopsis/Solicitation" | etc.
noticeType: string; // canonical notice type
postedDate: string; // ISO 8601
responseDeadLine: string; // ISO 8601
questionsDeadLine: string | null; // ISO 8601 or null
classificationCode: string; // PSC, e.g. "U012"
naicsCode: string; // 6-digit NAICS
typeOfSetAside: string | null; // "SDVOSBC" | "VOSBC" | "8A" | "SBA" | null
typeOfSetAsideDescription: string;
description: string;
placeOfPerformance: {
city: { name: string };
state: { code: string; name: string };
country: { code: string; name: string };
zip: string;
};
pointOfContact: Array<{
type: "primary" | "secondary";
title: string;
fullName: string;
email: string;
phone: string;
}>;
uiLink: string;
active: boolean;
award: object | null;
resourceLinks: string[] | null;
}
Set-aside codes
The typeOfSetAside field uses SAM.gov canonical codes:
| Code | Description |
|---|---|
SDVOSBC |
Service-Disabled Veteran-Owned Small Business (certified) |
VOSBC |
Veteran-Owned Small Business (certified) |
8A |
8(a) Sole Source / 8(a) Set-Aside |
SBA |
Small Business Set-Aside (Total Small Business) |
WOSB |
Woman-Owned Small Business |
HUBZONE |
HUBZone Set-Aside |
null |
No set-aside (open / full and open) |
Why mocks?
Three reasons:
- CI determinism. Mock opportunities never change. Tests against them produce stable signals.
- Coverage. We can hand-craft opportunities that exercise every set-aside, every NAICS, every notice type. Real SAM.gov coverage is whatever happens to be live.
- Pre-revenue. No SAM.gov API key required for the dev path. The real API integration is gated on
SAM_GOV_API_KEY.
Current count: 24+ mock opportunities across federal agencies including DoD (USACE, USAF Academy), VA, IHS, USDA, Treasury, GSA, AmeriCorps, NASA, DOE, EPA, DOJ, FEMA, NSF, DOT, HHS, USCG, USPS, DOL, ED, USAID, HUD, NRC, USPS-OIG.
See /showcase for the live preview.