@lineai/gov-deals
Version:
Explore Federal contracts for government building renovations, city hall renovations, courthouse updates, library modernizations, federal building improvement contracts, base housing and facilities upgrades.
208 lines (207 loc) • 7.58 kB
TypeScript
/**
* Configuration constants for the gov-deals package
* These values can be updated as the SAM.gov API evolves
*/
import { z } from 'zod';
/**
* SAM.gov Opportunity Type Codes
* Source: SAM.gov API Documentation
* Last verified: 2024
*/
export declare const OPPORTUNITY_TYPES: {
readonly PRESOLICITATION: "p";
readonly SOLICITATION: "o";
readonly AWARD_NOTICE: "a";
readonly INTENT_TO_BUNDLE: "i";
readonly JUSTIFICATION: "u";
readonly SOURCES_SOUGHT: "r";
readonly SPECIAL_NOTICE: "s";
readonly COMBINED_SYNOPSIS: "k";
readonly SALE_OF_SURPLUS: "g";
};
export type OpportunityTypeCode = typeof OPPORTUNITY_TYPES[keyof typeof OPPORTUNITY_TYPES];
export type OpportunityTypeKey = keyof typeof OPPORTUNITY_TYPES;
export declare const OpportunityTypeSchema: z.ZodEnum<["p", "o", "a", "i", "u", "r", "s", "k", "g"]>;
/**
* Federal Set-Aside Type Codes
* Source: Federal Acquisition Regulation (FAR)
*/
export declare const SET_ASIDE_TYPES: {
readonly SMALL_BUSINESS: "SBA";
readonly SMALL_BUSINESS_SET_ASIDE: "SBP";
readonly EIGHT_A: "8A";
readonly EIGHT_A_SOLE_SOURCE: "8AN";
readonly EIGHT_A_COMPETITIVE: "8AC";
readonly HUB_ZONE: "HZC";
readonly HUB_ZONE_SOLE_SOURCE: "HZS";
readonly SDVOSB: "SDVOSBC";
readonly SDVOSB_SOLE_SOURCE: "SDVOSBS";
readonly WOMEN_OWNED: "WOSB";
readonly EDWOSB: "EDWOSB";
readonly LOCAL_AREA: "LAS";
readonly INDIAN_ECONOMIC: "IEE";
readonly INDIAN_SMALL_BUSINESS: "ISBEE";
readonly BUY_INDIAN: "BICiv";
readonly VETERAN_OWNED: "VSA";
readonly VETERAN_OWNED_SOLE_SOURCE: "VSS";
readonly NONE: "NONE";
};
export type SetAsideTypeCode = typeof SET_ASIDE_TYPES[keyof typeof SET_ASIDE_TYPES];
export type SetAsideTypeKey = keyof typeof SET_ASIDE_TYPES;
export declare const TypeOfSetAsideSchema: z.ZodEnum<["SBA", "SBP", "8A", "8AN", "8AC", "HZC", "HZS", "SDVOSBC", "SDVOSBS", "WOSB", "EDWOSB", "LAS", "IEE", "ISBEE", "BICiv", "VSA", "VSS", "NONE"]>;
export declare const SetAsideTypeSchema: z.ZodEnum<["SBA", "SBP", "8A", "8AN", "8AC", "HZC", "HZS", "SDVOSBC", "SDVOSBS", "WOSB", "EDWOSB", "LAS", "IEE", "ISBEE", "BICiv", "VSA", "VSS", "NONE"]>;
/**
* Construction-related NAICS Codes
* Source: North American Industry Classification System
*/
export declare const CONSTRUCTION_NAICS_CODES: {
readonly COMMERCIAL_BUILDING: "236220";
readonly INDUSTRIAL_BUILDING: "236210";
readonly RESIDENTIAL_REMODELING: "236118";
readonly ELECTRICAL_CONTRACTORS: "238210";
readonly PLUMBING_HVAC: "238220";
readonly DRYWALL_INSULATION: "238310";
readonly PAINTING: "238320";
readonly SITE_PREPARATION: "238910";
readonly ROOFING: "238160";
readonly CONCRETE: "238110";
};
export type ConstructionNAICSCode = typeof CONSTRUCTION_NAICS_CODES[keyof typeof CONSTRUCTION_NAICS_CODES];
export type ConstructionNAICSKey = keyof typeof CONSTRUCTION_NAICS_CODES;
export declare const ConstructionNAICSSchema: z.ZodEnum<[string, ...string[]]>;
/**
* Contract Pricing Types
* Source: Federal Acquisition Regulation (FAR) Part 16
*/
export declare const CONTRACT_PRICING_TYPES: {
readonly FIRM_FIXED_PRICE: "FFP";
readonly FIXED_PRICE_EPA: "FPE";
readonly FIXED_PRICE_INCENTIVE: "FPI";
readonly FIXED_PRICE_REDETERMINATION: "FPR";
readonly COST_PLUS_FIXED_FEE: "CPFF";
readonly COST_PLUS_INCENTIVE_FEE: "CPIF";
readonly COST_PLUS_AWARD_FEE: "CPAF";
readonly COST_SHARING: "CS";
readonly COST_REIMBURSEMENT: "CR";
readonly TIME_AND_MATERIALS: "TM";
readonly LABOR_HOURS: "LH";
readonly OTHER: "OT";
};
export type ContractPricingTypeCode = typeof CONTRACT_PRICING_TYPES[keyof typeof CONTRACT_PRICING_TYPES];
export type ContractPricingTypeKey = keyof typeof CONTRACT_PRICING_TYPES;
export declare const ContractPricingTypeSchema: z.ZodEnum<[string, ...string[]]>;
/**
* API Configuration
*/
export declare const API_CONFIG: {
readonly SAM_GOV: {
readonly BASE_URL: "https://api.sam.gov/prod";
readonly OPPORTUNITIES_ENDPOINT: "/opportunities/v2/search";
readonly ENTITIES_ENDPOINT: "/entity-information/v3/entities";
readonly HIERARCHY_ENDPOINT: "/federalorganizations/v2/hierarchy";
readonly DESCRIPTION_ENDPOINT: "/opportunities/v1/noticedesc";
readonly DEFAULT_PAGE_SIZE: 100;
readonly MAX_PAGE_SIZE: 1000;
};
readonly RETRY: {
readonly MAX_ATTEMPTS: 3;
readonly INITIAL_DELAY_MS: 1000;
readonly MAX_DELAY_MS: 10000;
};
readonly CACHE: {
readonly DEFAULT_TTL_SECONDS: 300;
readonly MAX_CACHE_SIZE: 100;
};
};
/**
* US State Codes
*/
export declare const US_STATES: {
readonly ALABAMA: "AL";
readonly ALASKA: "AK";
readonly ARIZONA: "AZ";
readonly ARKANSAS: "AR";
readonly CALIFORNIA: "CA";
readonly COLORADO: "CO";
readonly CONNECTICUT: "CT";
readonly DELAWARE: "DE";
readonly FLORIDA: "FL";
readonly GEORGIA: "GA";
readonly HAWAII: "HI";
readonly IDAHO: "ID";
readonly ILLINOIS: "IL";
readonly INDIANA: "IN";
readonly IOWA: "IA";
readonly KANSAS: "KS";
readonly KENTUCKY: "KY";
readonly LOUISIANA: "LA";
readonly MAINE: "ME";
readonly MARYLAND: "MD";
readonly MASSACHUSETTS: "MA";
readonly MICHIGAN: "MI";
readonly MINNESOTA: "MN";
readonly MISSISSIPPI: "MS";
readonly MISSOURI: "MO";
readonly MONTANA: "MT";
readonly NEBRASKA: "NE";
readonly NEVADA: "NV";
readonly NEW_HAMPSHIRE: "NH";
readonly NEW_JERSEY: "NJ";
readonly NEW_MEXICO: "NM";
readonly NEW_YORK: "NY";
readonly NORTH_CAROLINA: "NC";
readonly NORTH_DAKOTA: "ND";
readonly OHIO: "OH";
readonly OKLAHOMA: "OK";
readonly OREGON: "OR";
readonly PENNSYLVANIA: "PA";
readonly RHODE_ISLAND: "RI";
readonly SOUTH_CAROLINA: "SC";
readonly SOUTH_DAKOTA: "SD";
readonly TENNESSEE: "TN";
readonly TEXAS: "TX";
readonly UTAH: "UT";
readonly VERMONT: "VT";
readonly VIRGINIA: "VA";
readonly WASHINGTON: "WA";
readonly WEST_VIRGINIA: "WV";
readonly WISCONSIN: "WI";
readonly WYOMING: "WY";
readonly DISTRICT_OF_COLUMBIA: "DC";
readonly PUERTO_RICO: "PR";
readonly US_VIRGIN_ISLANDS: "VI";
readonly GUAM: "GU";
readonly AMERICAN_SAMOA: "AS";
readonly NORTHERN_MARIANA_ISLANDS: "MP";
};
export type StateCode = typeof US_STATES[keyof typeof US_STATES];
export type StateKey = keyof typeof US_STATES;
export declare const StateCodeSchema: z.ZodEnum<[string, ...string[]]>;
/**
* Helper function to get state code from name
*/
export declare function getStateCode(stateName: StateKey): StateCode;
/**
* Helper function to validate if a string is a valid state code
*/
export declare function isValidStateCode(code: string): code is StateCode;
/**
* Competition Strategy
*/
export declare const COMPETITION_STRATEGIES: {
readonly FULL_AND_OPEN: "fullAndOpen";
readonly SET_ASIDE: "setAside";
readonly SOLE_SOURCE: "soleSource";
readonly LIMITED_SOURCES: "limitedSources";
};
export type CompetitionStrategy = typeof COMPETITION_STRATEGIES[keyof typeof COMPETITION_STRATEGIES];
export declare const CompetitionStrategySchema: z.ZodEnum<[string, ...string[]]>;
/**
* Active Status for opportunities (as returned by API)
*/
export declare const ACTIVE_STATUS: {
readonly YES: "Yes";
readonly NO: "No";
};
export type ActiveStatus = typeof ACTIVE_STATUS[keyof typeof ACTIVE_STATUS];
export declare const ActiveStatusSchema: z.ZodEnum<["Yes", "No"]>;