@fedpulse/sdk 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of @fedpulse/sdk might be problematic. Click here for more details.
- package/LICENSE +21 -0
- package/README.md +331 -0
- package/dist/cjs/client.cjs +138 -0
- package/dist/cjs/errors.cjs +200 -0
- package/dist/cjs/http.cjs +449 -0
- package/dist/cjs/index.cjs +65 -0
- package/dist/cjs/resources/analytics.cjs +134 -0
- package/dist/cjs/resources/assistance.cjs +101 -0
- package/dist/cjs/resources/entities.cjs +149 -0
- package/dist/cjs/resources/exclusions.cjs +135 -0
- package/dist/cjs/resources/intelligence.cjs +96 -0
- package/dist/cjs/resources/opportunities.cjs +170 -0
- package/dist/cjs/resources/webhooks.cjs +262 -0
- package/dist/cjs/types/analytics.cjs +5 -0
- package/dist/cjs/types/assistance.cjs +5 -0
- package/dist/cjs/types/common.cjs +5 -0
- package/dist/cjs/types/entities.cjs +5 -0
- package/dist/cjs/types/exclusions.cjs +5 -0
- package/dist/cjs/types/index.cjs +5 -0
- package/dist/cjs/types/intelligence.cjs +5 -0
- package/dist/cjs/types/opportunities.cjs +5 -0
- package/dist/cjs/types/webhooks.cjs +5 -0
- package/dist/cjs/webhooks-verify.cjs +184 -0
- package/dist/esm/client.js +135 -0
- package/dist/esm/client.js.map +1 -0
- package/dist/esm/errors.js +187 -0
- package/dist/esm/errors.js.map +1 -0
- package/dist/esm/http.js +445 -0
- package/dist/esm/http.js.map +1 -0
- package/dist/esm/index.js +40 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/resources/analytics.js +131 -0
- package/dist/esm/resources/analytics.js.map +1 -0
- package/dist/esm/resources/assistance.js +98 -0
- package/dist/esm/resources/assistance.js.map +1 -0
- package/dist/esm/resources/entities.js +146 -0
- package/dist/esm/resources/entities.js.map +1 -0
- package/dist/esm/resources/exclusions.js +132 -0
- package/dist/esm/resources/exclusions.js.map +1 -0
- package/dist/esm/resources/intelligence.js +93 -0
- package/dist/esm/resources/intelligence.js.map +1 -0
- package/dist/esm/resources/opportunities.js +167 -0
- package/dist/esm/resources/opportunities.js.map +1 -0
- package/dist/esm/resources/webhooks.js +259 -0
- package/dist/esm/resources/webhooks.js.map +1 -0
- package/dist/esm/types/analytics.js +5 -0
- package/dist/esm/types/analytics.js.map +1 -0
- package/dist/esm/types/assistance.js +5 -0
- package/dist/esm/types/assistance.js.map +1 -0
- package/dist/esm/types/common.js +5 -0
- package/dist/esm/types/common.js.map +1 -0
- package/dist/esm/types/entities.js +5 -0
- package/dist/esm/types/entities.js.map +1 -0
- package/dist/esm/types/exclusions.js +5 -0
- package/dist/esm/types/exclusions.js.map +1 -0
- package/dist/esm/types/index.js +5 -0
- package/dist/esm/types/index.js.map +1 -0
- package/dist/esm/types/intelligence.js +5 -0
- package/dist/esm/types/intelligence.js.map +1 -0
- package/dist/esm/types/opportunities.js +5 -0
- package/dist/esm/types/opportunities.js.map +1 -0
- package/dist/esm/types/webhooks.js +5 -0
- package/dist/esm/types/webhooks.js.map +1 -0
- package/dist/esm/webhooks-verify.js +179 -0
- package/dist/esm/webhooks-verify.js.map +1 -0
- package/dist/types/client.d.cts +136 -0
- package/dist/types/client.d.ts +136 -0
- package/dist/types/client.d.ts.map +1 -0
- package/dist/types/errors.d.cts +139 -0
- package/dist/types/errors.d.ts +139 -0
- package/dist/types/errors.d.ts.map +1 -0
- package/dist/types/http.d.cts +137 -0
- package/dist/types/http.d.ts +137 -0
- package/dist/types/http.d.ts.map +1 -0
- package/dist/types/index.d.cts +39 -0
- package/dist/types/index.d.ts +39 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/resources/analytics.d.cts +94 -0
- package/dist/types/resources/analytics.d.ts +94 -0
- package/dist/types/resources/analytics.d.ts.map +1 -0
- package/dist/types/resources/assistance.d.cts +66 -0
- package/dist/types/resources/assistance.d.ts +66 -0
- package/dist/types/resources/assistance.d.ts.map +1 -0
- package/dist/types/resources/entities.d.cts +101 -0
- package/dist/types/resources/entities.d.ts +101 -0
- package/dist/types/resources/entities.d.ts.map +1 -0
- package/dist/types/resources/exclusions.d.cts +84 -0
- package/dist/types/resources/exclusions.d.ts +84 -0
- package/dist/types/resources/exclusions.d.ts.map +1 -0
- package/dist/types/resources/intelligence.d.cts +66 -0
- package/dist/types/resources/intelligence.d.ts +66 -0
- package/dist/types/resources/intelligence.d.ts.map +1 -0
- package/dist/types/resources/opportunities.d.cts +116 -0
- package/dist/types/resources/opportunities.d.ts +116 -0
- package/dist/types/resources/opportunities.d.ts.map +1 -0
- package/dist/types/resources/webhooks.d.cts +180 -0
- package/dist/types/resources/webhooks.d.ts +180 -0
- package/dist/types/resources/webhooks.d.ts.map +1 -0
- package/dist/types/types/analytics.d.cts +85 -0
- package/dist/types/types/analytics.d.ts +85 -0
- package/dist/types/types/analytics.d.ts.map +1 -0
- package/dist/types/types/assistance.d.cts +55 -0
- package/dist/types/types/assistance.d.ts +55 -0
- package/dist/types/types/assistance.d.ts.map +1 -0
- package/dist/types/types/common.d.cts +58 -0
- package/dist/types/types/common.d.ts +58 -0
- package/dist/types/types/common.d.ts.map +1 -0
- package/dist/types/types/entities.d.cts +85 -0
- package/dist/types/types/entities.d.ts +85 -0
- package/dist/types/types/entities.d.ts.map +1 -0
- package/dist/types/types/exclusions.d.cts +81 -0
- package/dist/types/types/exclusions.d.ts +81 -0
- package/dist/types/types/exclusions.d.ts.map +1 -0
- package/dist/types/types/index.d.cts +12 -0
- package/dist/types/types/index.d.ts +12 -0
- package/dist/types/types/index.d.ts.map +1 -0
- package/dist/types/types/intelligence.d.cts +104 -0
- package/dist/types/types/intelligence.d.ts +104 -0
- package/dist/types/types/intelligence.d.ts.map +1 -0
- package/dist/types/types/opportunities.d.cts +149 -0
- package/dist/types/types/opportunities.d.ts +149 -0
- package/dist/types/types/opportunities.d.ts.map +1 -0
- package/dist/types/types/webhooks.d.cts +106 -0
- package/dist/types/types/webhooks.d.ts +106 -0
- package/dist/types/types/webhooks.d.ts.map +1 -0
- package/dist/types/webhooks-verify.d.cts +102 -0
- package/dist/types/webhooks-verify.d.ts +102 -0
- package/dist/types/webhooks-verify.d.ts.map +1 -0
- package/package.json +62 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types for the Exclusions domain (/v1/exclusions).
|
|
3
|
+
*/
|
|
4
|
+
import type { PaginationParams } from './common.js';
|
|
5
|
+
export interface Exclusion {
|
|
6
|
+
exclusionId: string;
|
|
7
|
+
uei?: string | null;
|
|
8
|
+
cage?: string | null;
|
|
9
|
+
name?: string | null;
|
|
10
|
+
legalName?: string | null;
|
|
11
|
+
exclusionType?: string | null;
|
|
12
|
+
exclusionProgram?: string | null;
|
|
13
|
+
exclusionAction?: string | null;
|
|
14
|
+
agencyCode?: string | null;
|
|
15
|
+
agency?: string | null;
|
|
16
|
+
effectiveDate?: string | null;
|
|
17
|
+
expirationDate?: string | null;
|
|
18
|
+
terminationDate?: string | null;
|
|
19
|
+
terminatedBy?: string | null;
|
|
20
|
+
address?: {
|
|
21
|
+
street?: string | null;
|
|
22
|
+
city?: string | null;
|
|
23
|
+
state?: string | null;
|
|
24
|
+
zip?: string | null;
|
|
25
|
+
country?: string | null;
|
|
26
|
+
} | null;
|
|
27
|
+
ctCode?: string | null;
|
|
28
|
+
additionalRemarks?: string | null;
|
|
29
|
+
crossReferenceList?: string[] | null;
|
|
30
|
+
rawJson?: unknown;
|
|
31
|
+
}
|
|
32
|
+
export interface ComplianceCheckEntity {
|
|
33
|
+
/** Unique Entity Identifier (12-char alphanumeric). */
|
|
34
|
+
uei?: string;
|
|
35
|
+
/** CAGE code. */
|
|
36
|
+
cage?: string;
|
|
37
|
+
/** Legal entity name (enables fuzzy matching). */
|
|
38
|
+
name?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface ComplianceCheckResult {
|
|
41
|
+
input: ComplianceCheckEntity;
|
|
42
|
+
excluded: boolean;
|
|
43
|
+
/** Confidence level when matched by name (0–1). Present when fuzzy match used. */
|
|
44
|
+
matchConfidence?: number | null;
|
|
45
|
+
/** The matched exclusion record, or null if not excluded / no match. */
|
|
46
|
+
exclusion: Exclusion | null;
|
|
47
|
+
/** Human-readable explanation of the result. */
|
|
48
|
+
message: string;
|
|
49
|
+
}
|
|
50
|
+
export interface ExclusionsStats {
|
|
51
|
+
total: number;
|
|
52
|
+
active: number;
|
|
53
|
+
expired: number;
|
|
54
|
+
byType: Array<{
|
|
55
|
+
type: string;
|
|
56
|
+
count: number;
|
|
57
|
+
}>;
|
|
58
|
+
byAgency: Array<{
|
|
59
|
+
agency: string;
|
|
60
|
+
count: number;
|
|
61
|
+
}>;
|
|
62
|
+
}
|
|
63
|
+
export interface ListExclusionsParams extends PaginationParams {
|
|
64
|
+
/** Search by entity name or legal name. */
|
|
65
|
+
q?: string;
|
|
66
|
+
/** Filter by Unique Entity Identifier. */
|
|
67
|
+
uei?: string;
|
|
68
|
+
/** Filter by CAGE code. */
|
|
69
|
+
cage?: string;
|
|
70
|
+
/** Filter by excluding agency code or name. */
|
|
71
|
+
agency?: string;
|
|
72
|
+
/** Only return active exclusions (not yet terminated/expired). */
|
|
73
|
+
activeOnly?: boolean;
|
|
74
|
+
}
|
|
75
|
+
export interface BulkComplianceCheckParams {
|
|
76
|
+
/** List of entities to check (1–100). Each must include at least one of uei, cage, or name. */
|
|
77
|
+
entities: ComplianceCheckEntity[];
|
|
78
|
+
/** Enable fuzzy name matching (default: true). Recommended when only names are available. */
|
|
79
|
+
fuzzyMatch?: boolean;
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=exclusions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exclusions.d.ts","sourceRoot":"","sources":["../../../src/types/exclusions.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAIpD,MAAM,WAAW,SAAS;IACxB,WAAW,EAAE,MAAM,C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js';
|
|
5
|
+
export type * from './opportunities.cjs';
|
|
6
|
+
export type * from './exclusions.cjs';
|
|
7
|
+
export type * from './entities.cjs';
|
|
8
|
+
export type * from './intelligence.cjs';
|
|
9
|
+
export type * from './assistance.cjs';
|
|
10
|
+
export type * from './analytics.cjs';
|
|
11
|
+
export type * from './webhooks.cjs';
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Barrel export for all FedPulse SDK TypeScript types.
|
|
3
|
+
*/
|
|
4
|
+
export type * from './common.js';
|
|
5
|
+
export type * from './opportunities.js';
|
|
6
|
+
export type * from './exclusions.js';
|
|
7
|
+
export type * from './entities.js';
|
|
8
|
+
export type * from './intelligence.js';
|
|
9
|
+
export type * from './assistance.js';
|
|
10
|
+
export type * from './analytics.js';
|
|
11
|
+
export type * from './webhooks.js';
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,mBAAmB,aAAa,CAAC;AACjC,mBAAmB,oBAAoB,CAAC;AACxC,mBAAmB,iBAAiB,CAAC;AACrC,mBAAmB,eAAe,CAAC;AACnC,mBAAmB,mBAAmB,CAAC;AACvC,mBAAmB,iBAAiB,CAAC;AACrC,mBAAmB,gBAAgB,CAAC;AACpC,mBAAmB,eAAe,CAAC"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types for the Intelligence domain (/v1/intelligence).
|
|
3
|
+
*/
|
|
4
|
+
import type { AiCategory } from './opportunities.cjs';
|
|
5
|
+
export interface AgencyRelationship {
|
|
6
|
+
agency: string;
|
|
7
|
+
contractCount: number;
|
|
8
|
+
totalAwardAmount: number;
|
|
9
|
+
lastAwardDate?: string | null;
|
|
10
|
+
}
|
|
11
|
+
export interface ContractHistoryItem {
|
|
12
|
+
noticeId: string;
|
|
13
|
+
title: string;
|
|
14
|
+
agency?: string | null;
|
|
15
|
+
awardAmount?: number | null;
|
|
16
|
+
awardDate?: string | null;
|
|
17
|
+
naicsCode?: string | null;
|
|
18
|
+
}
|
|
19
|
+
export interface RiskIndicator {
|
|
20
|
+
type: string;
|
|
21
|
+
description: string;
|
|
22
|
+
severity: 'low' | 'medium' | 'high';
|
|
23
|
+
detectedAt?: string | null;
|
|
24
|
+
}
|
|
25
|
+
export interface EntityIntelProfile {
|
|
26
|
+
uei: string;
|
|
27
|
+
legalBusinessName: string;
|
|
28
|
+
cage?: string | null;
|
|
29
|
+
hasActiveExclusion: boolean;
|
|
30
|
+
exclusionSummary?: string | null;
|
|
31
|
+
registrationStatus?: string | null;
|
|
32
|
+
registrationExpiresAt?: string | null;
|
|
33
|
+
/** Number of awarded contracts found. */
|
|
34
|
+
contractCount: number;
|
|
35
|
+
/** Total value of awarded contracts in cents. */
|
|
36
|
+
totalAwardAmount: number;
|
|
37
|
+
/** Average award contract value in cents. */
|
|
38
|
+
averageAwardAmount: number;
|
|
39
|
+
agencyRelationships: AgencyRelationship[];
|
|
40
|
+
recentContracts: ContractHistoryItem[];
|
|
41
|
+
topNaicsCodes: Array<{
|
|
42
|
+
naicsCode: string;
|
|
43
|
+
count: number;
|
|
44
|
+
}>;
|
|
45
|
+
certifications: string[];
|
|
46
|
+
riskIndicators: RiskIndicator[];
|
|
47
|
+
aiCategories?: AiCategory[] | null;
|
|
48
|
+
lastUpdated: string;
|
|
49
|
+
}
|
|
50
|
+
export interface MarketAwardee {
|
|
51
|
+
name: string;
|
|
52
|
+
uei?: string | null;
|
|
53
|
+
awardCount: number;
|
|
54
|
+
totalAwardAmount: number;
|
|
55
|
+
marketShare: number;
|
|
56
|
+
}
|
|
57
|
+
export interface MarketAgency {
|
|
58
|
+
agency: string;
|
|
59
|
+
awardCount: number;
|
|
60
|
+
totalAwardAmount: number;
|
|
61
|
+
}
|
|
62
|
+
export interface SetAsideBreakdown {
|
|
63
|
+
setAsideType: string;
|
|
64
|
+
count: number;
|
|
65
|
+
percentage: number;
|
|
66
|
+
}
|
|
67
|
+
export interface MarketAnalysis {
|
|
68
|
+
naicsCode: string;
|
|
69
|
+
naicsDescription?: string | null;
|
|
70
|
+
/** Total market size (sum of all award amounts) in cents. */
|
|
71
|
+
totalMarketSize: number;
|
|
72
|
+
/** Average award value in cents. */
|
|
73
|
+
averageAwardValue: number;
|
|
74
|
+
/** Total number of contracts in the analysis window. */
|
|
75
|
+
contractCount: number;
|
|
76
|
+
/** Number of currently open/active solicitations. */
|
|
77
|
+
activeOpportunities: number;
|
|
78
|
+
topAwardees: MarketAwardee[];
|
|
79
|
+
topAgencies: MarketAgency[];
|
|
80
|
+
setAsideBreakdown: SetAsideBreakdown[];
|
|
81
|
+
recentTrends: Array<{
|
|
82
|
+
period: string;
|
|
83
|
+
contractCount: number;
|
|
84
|
+
totalAwardAmount: number;
|
|
85
|
+
}>;
|
|
86
|
+
lastUpdated: string;
|
|
87
|
+
}
|
|
88
|
+
export interface CompliancePackage {
|
|
89
|
+
uei: string;
|
|
90
|
+
legalBusinessName?: string | null;
|
|
91
|
+
excluded: boolean;
|
|
92
|
+
exclusionDetails?: import('./exclusions.js').Exclusion | null;
|
|
93
|
+
registrationActive: boolean;
|
|
94
|
+
registrationExpiresAt?: string | null;
|
|
95
|
+
hasActiveExclusion: boolean;
|
|
96
|
+
riskScore: number;
|
|
97
|
+
riskLevel: 'low' | 'medium' | 'high';
|
|
98
|
+
riskIndicators: RiskIndicator[];
|
|
99
|
+
checkedAt: string;
|
|
100
|
+
}
|
|
101
|
+
export interface ComplianceCheckRequestParams {
|
|
102
|
+
uei: string;
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=intelligence.d.ts.map
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types for the Intelligence domain (/v1/intelligence).
|
|
3
|
+
*/
|
|
4
|
+
import type { AiCategory } from './opportunities.js';
|
|
5
|
+
export interface AgencyRelationship {
|
|
6
|
+
agency: string;
|
|
7
|
+
contractCount: number;
|
|
8
|
+
totalAwardAmount: number;
|
|
9
|
+
lastAwardDate?: string | null;
|
|
10
|
+
}
|
|
11
|
+
export interface ContractHistoryItem {
|
|
12
|
+
noticeId: string;
|
|
13
|
+
title: string;
|
|
14
|
+
agency?: string | null;
|
|
15
|
+
awardAmount?: number | null;
|
|
16
|
+
awardDate?: string | null;
|
|
17
|
+
naicsCode?: string | null;
|
|
18
|
+
}
|
|
19
|
+
export interface RiskIndicator {
|
|
20
|
+
type: string;
|
|
21
|
+
description: string;
|
|
22
|
+
severity: 'low' | 'medium' | 'high';
|
|
23
|
+
detectedAt?: string | null;
|
|
24
|
+
}
|
|
25
|
+
export interface EntityIntelProfile {
|
|
26
|
+
uei: string;
|
|
27
|
+
legalBusinessName: string;
|
|
28
|
+
cage?: string | null;
|
|
29
|
+
hasActiveExclusion: boolean;
|
|
30
|
+
exclusionSummary?: string | null;
|
|
31
|
+
registrationStatus?: string | null;
|
|
32
|
+
registrationExpiresAt?: string | null;
|
|
33
|
+
/** Number of awarded contracts found. */
|
|
34
|
+
contractCount: number;
|
|
35
|
+
/** Total value of awarded contracts in cents. */
|
|
36
|
+
totalAwardAmount: number;
|
|
37
|
+
/** Average award contract value in cents. */
|
|
38
|
+
averageAwardAmount: number;
|
|
39
|
+
agencyRelationships: AgencyRelationship[];
|
|
40
|
+
recentContracts: ContractHistoryItem[];
|
|
41
|
+
topNaicsCodes: Array<{
|
|
42
|
+
naicsCode: string;
|
|
43
|
+
count: number;
|
|
44
|
+
}>;
|
|
45
|
+
certifications: string[];
|
|
46
|
+
riskIndicators: RiskIndicator[];
|
|
47
|
+
aiCategories?: AiCategory[] | null;
|
|
48
|
+
lastUpdated: string;
|
|
49
|
+
}
|
|
50
|
+
export interface MarketAwardee {
|
|
51
|
+
name: string;
|
|
52
|
+
uei?: string | null;
|
|
53
|
+
awardCount: number;
|
|
54
|
+
totalAwardAmount: number;
|
|
55
|
+
marketShare: number;
|
|
56
|
+
}
|
|
57
|
+
export interface MarketAgency {
|
|
58
|
+
agency: string;
|
|
59
|
+
awardCount: number;
|
|
60
|
+
totalAwardAmount: number;
|
|
61
|
+
}
|
|
62
|
+
export interface SetAsideBreakdown {
|
|
63
|
+
setAsideType: string;
|
|
64
|
+
count: number;
|
|
65
|
+
percentage: number;
|
|
66
|
+
}
|
|
67
|
+
export interface MarketAnalysis {
|
|
68
|
+
naicsCode: string;
|
|
69
|
+
naicsDescription?: string | null;
|
|
70
|
+
/** Total market size (sum of all award amounts) in cents. */
|
|
71
|
+
totalMarketSize: number;
|
|
72
|
+
/** Average award value in cents. */
|
|
73
|
+
averageAwardValue: number;
|
|
74
|
+
/** Total number of contracts in the analysis window. */
|
|
75
|
+
contractCount: number;
|
|
76
|
+
/** Number of currently open/active solicitations. */
|
|
77
|
+
activeOpportunities: number;
|
|
78
|
+
topAwardees: MarketAwardee[];
|
|
79
|
+
topAgencies: MarketAgency[];
|
|
80
|
+
setAsideBreakdown: SetAsideBreakdown[];
|
|
81
|
+
recentTrends: Array<{
|
|
82
|
+
period: string;
|
|
83
|
+
contractCount: number;
|
|
84
|
+
totalAwardAmount: number;
|
|
85
|
+
}>;
|
|
86
|
+
lastUpdated: string;
|
|
87
|
+
}
|
|
88
|
+
export interface CompliancePackage {
|
|
89
|
+
uei: string;
|
|
90
|
+
legalBusinessName?: string | null;
|
|
91
|
+
excluded: boolean;
|
|
92
|
+
exclusionDetails?: import('./exclusions.js').Exclusion | null;
|
|
93
|
+
registrationActive: boolean;
|
|
94
|
+
registrationExpiresAt?: string | null;
|
|
95
|
+
hasActiveExclusion: boolean;
|
|
96
|
+
riskScore: number;
|
|
97
|
+
riskLevel: 'low' | 'medium' | 'high';
|
|
98
|
+
riskIndicators: RiskIndicator[];
|
|
99
|
+
checkedAt: string;
|
|
100
|
+
}
|
|
101
|
+
export interface ComplianceCheckRequestParams {
|
|
102
|
+
uei: string;
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=intelligence.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intelligence.d.ts","sourceRoot":"","sources":["../../../src/types/intelligence.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAIrD,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;IACpC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,iBAAiB,EAAE,MAAM,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,qBAAqB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,yCAAyC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aAAa,EAAE,CAAC;IAC7B,WAAW,EAAE,YAAY,EAAE,CAAC;IAC5B,iBAAiB,EAAE,iBAAiB,EAAE,CAAC;IACvC,YAAY,EAAE,KAAK,CAAC;QAClB,MAAM,EAAE,MAAM,CAAC;QACf,aAAa,EAAE,MAAM,CAAC;QACtB,gBAAgB,EAAE,MAAM,CAAC;KAC1B,CAAC,CAAC;IACH,WAAW,EAAE,MAAM,CAAC;CACrB;AAID,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,QAAQ,EAAE,OAAO,CAAC;IAClB,gBAAgB,CAAC,EAAE,OAAO,iBAAiB,EAAE,SAAS,GAAG,IAAI,CAAC;IAC9D,kBAAkB,EAAE,OAAO,CAAC;IAC5B,qBAAqB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,kBAAkB,EAAE,OAAO,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;IACrC,cAAc,EAAE,aAAa,EAAE,CAAC;IAChC,SAAS,EAAE,MAAM,CAAC;CACnB;AAID,MAAM,WAAW,4BAA4B;IAC3C,GAAG,EAAE,MAAM,CAAC;CACb"}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types for the Opportunities domain (/v1/opportunities).
|
|
3
|
+
*/
|
|
4
|
+
import type { PaginationParams, FieldsParam } from './common.cjs';
|
|
5
|
+
export type AiCategory = 'technology' | 'defense' | 'construction' | 'professional-services' | 'logistics' | 'medical' | 'research' | 'energy' | 'environmental' | 'education-training' | 'intelligence-surveillance' | 'space-aviation' | 'maritime' | 'agriculture-food' | 'other';
|
|
6
|
+
export type AiDifficulty = 'easy' | 'medium' | 'hard' | 'unknown';
|
|
7
|
+
export interface Opportunity {
|
|
8
|
+
noticeId: string;
|
|
9
|
+
solicitationNumber?: string | null;
|
|
10
|
+
solNumber?: string | null;
|
|
11
|
+
baseNoticeId?: string | null;
|
|
12
|
+
title: string;
|
|
13
|
+
noticeType?: string | null;
|
|
14
|
+
type?: string | null;
|
|
15
|
+
baseType?: string | null;
|
|
16
|
+
descriptionRaw?: string | null;
|
|
17
|
+
descriptionClean?: string | null;
|
|
18
|
+
postedDate?: string | null;
|
|
19
|
+
responseDeadline?: string | null;
|
|
20
|
+
archiveDate?: string | null;
|
|
21
|
+
modifiedDate?: string | null;
|
|
22
|
+
naicsCode?: string | null;
|
|
23
|
+
classificationCode?: string | null;
|
|
24
|
+
setAsideType?: string | null;
|
|
25
|
+
setAsideDescription?: string | null;
|
|
26
|
+
department?: string | null;
|
|
27
|
+
subTier?: string | null;
|
|
28
|
+
office?: string | null;
|
|
29
|
+
officeAddress?: unknown;
|
|
30
|
+
awardDate?: string | null;
|
|
31
|
+
awardNumber?: string | null;
|
|
32
|
+
awardAmount?: string | number | null;
|
|
33
|
+
awardAmountRaw?: string | null;
|
|
34
|
+
awardeeName?: string | null;
|
|
35
|
+
awardeeUei?: string | null;
|
|
36
|
+
awardeeCage?: string | null;
|
|
37
|
+
awardeeCity?: string | null;
|
|
38
|
+
awardeeState?: string | null;
|
|
39
|
+
awardeeZip?: string | null;
|
|
40
|
+
contactName?: string | null;
|
|
41
|
+
contactTitle?: string | null;
|
|
42
|
+
contactEmail?: string | null;
|
|
43
|
+
contactPhone?: string | null;
|
|
44
|
+
popCity?: string | null;
|
|
45
|
+
popState?: string | null;
|
|
46
|
+
popZip?: string | null;
|
|
47
|
+
popCountry?: string | null;
|
|
48
|
+
popAddress?: string | null;
|
|
49
|
+
samUiLink?: string | null;
|
|
50
|
+
resourceLinks?: unknown;
|
|
51
|
+
isActive?: boolean | null;
|
|
52
|
+
dataSource?: string | null;
|
|
53
|
+
sourceFile?: string | null;
|
|
54
|
+
aiTags?: string[] | null;
|
|
55
|
+
aiCategory?: AiCategory | null;
|
|
56
|
+
aiDifficulty?: AiDifficulty | null;
|
|
57
|
+
aiSummary?: string | null;
|
|
58
|
+
aiEnrichedAt?: string | null;
|
|
59
|
+
}
|
|
60
|
+
export type OpportunitiesStatsGroupBy = 'department' | 'naics' | 'setAsideType' | 'postedYear' | 'aiCategory' | 'aiDifficulty';
|
|
61
|
+
export interface OpportunityStatsItem {
|
|
62
|
+
group: string | null;
|
|
63
|
+
count: number;
|
|
64
|
+
totalAwardAmount?: number | null;
|
|
65
|
+
}
|
|
66
|
+
export interface OpportunitiesStats {
|
|
67
|
+
groupBy: OpportunitiesStatsGroupBy;
|
|
68
|
+
items: OpportunityStatsItem[];
|
|
69
|
+
}
|
|
70
|
+
/** ISO date string: `YYYY-MM-DD` */
|
|
71
|
+
type ISODate = string;
|
|
72
|
+
export interface ListOpportunitiesParams extends PaginationParams, FieldsParam {
|
|
73
|
+
/** Full-text search query. */
|
|
74
|
+
q?: string;
|
|
75
|
+
/** NAICS code(s) — 2–6 digits. */
|
|
76
|
+
naics?: string | string[];
|
|
77
|
+
/** Department/agency name (substring match). */
|
|
78
|
+
agency?: string;
|
|
79
|
+
/** Office name (substring match). */
|
|
80
|
+
office?: string;
|
|
81
|
+
/** Set-aside type code(s) (e.g. '8A', 'WOSB'). */
|
|
82
|
+
setAside?: string | string[];
|
|
83
|
+
/** SAM.gov notice type(s) (e.g. 'Solicitation', 'Award Notice'). */
|
|
84
|
+
noticeType?: string | string[];
|
|
85
|
+
/** Results posted on or after this date (YYYY-MM-DD). */
|
|
86
|
+
postedAfter?: ISODate;
|
|
87
|
+
/** Results posted on or before this date (YYYY-MM-DD). */
|
|
88
|
+
postedBefore?: ISODate;
|
|
89
|
+
/** Response deadline on or after this date (YYYY-MM-DD). */
|
|
90
|
+
deadlineAfter?: ISODate;
|
|
91
|
+
/** Place of performance (2-letter US state code or full state name). */
|
|
92
|
+
state?: string;
|
|
93
|
+
/** Minimum award amount in **cents** (integer). */
|
|
94
|
+
minAward?: number;
|
|
95
|
+
/** Maximum award amount in **cents** (integer). */
|
|
96
|
+
maxAward?: number;
|
|
97
|
+
/** Data source filter (e.g. 'sam.gov'). */
|
|
98
|
+
dataSource?: string;
|
|
99
|
+
/** Filter by AI-assigned category (requires enrichment to have run). */
|
|
100
|
+
aiCategory?: AiCategory;
|
|
101
|
+
/** Filter by AI-assigned tag(s). */
|
|
102
|
+
aiTag?: string | string[];
|
|
103
|
+
/** Filter by AI-assigned difficulty. */
|
|
104
|
+
aiDifficulty?: AiDifficulty;
|
|
105
|
+
/** Sort field. Default: 'postedDate'. */
|
|
106
|
+
sort?: 'postedDate' | 'awardAmount' | 'responseDeadline';
|
|
107
|
+
/** Sort direction. Default: 'desc'. */
|
|
108
|
+
dir?: 'asc' | 'desc';
|
|
109
|
+
}
|
|
110
|
+
export interface GetOpportunitiesStatsParams {
|
|
111
|
+
/** Dimension to group results by. Default: 'department'. */
|
|
112
|
+
groupBy?: OpportunitiesStatsGroupBy;
|
|
113
|
+
/** Maximum number of groups to return (1–100). Default: 25. */
|
|
114
|
+
limit?: number;
|
|
115
|
+
/** Filter by data source. */
|
|
116
|
+
dataSource?: string;
|
|
117
|
+
}
|
|
118
|
+
export type ExportFormat = 'ndjson' | 'csv';
|
|
119
|
+
export type ExportStatus = 'pending' | 'running' | 'done' | 'failed';
|
|
120
|
+
export interface CreateExportParams {
|
|
121
|
+
/** Output format. Developer plan supports CSV only; Professional/Enterprise support all. */
|
|
122
|
+
format: ExportFormat;
|
|
123
|
+
/** Same filters as the opportunities search endpoint. */
|
|
124
|
+
q?: string;
|
|
125
|
+
naics?: string | string[];
|
|
126
|
+
agency?: string;
|
|
127
|
+
setAside?: string | string[];
|
|
128
|
+
noticeType?: string | string[];
|
|
129
|
+
postedAfter?: ISODate;
|
|
130
|
+
postedBefore?: ISODate;
|
|
131
|
+
state?: string;
|
|
132
|
+
minAward?: number;
|
|
133
|
+
maxAward?: number;
|
|
134
|
+
dataSource?: string;
|
|
135
|
+
aiCategory?: AiCategory;
|
|
136
|
+
aiDifficulty?: AiDifficulty;
|
|
137
|
+
}
|
|
138
|
+
export interface ExportJob {
|
|
139
|
+
exportId: string;
|
|
140
|
+
status: ExportStatus;
|
|
141
|
+
format: ExportFormat;
|
|
142
|
+
createdAt: string;
|
|
143
|
+
startedAt?: string | null;
|
|
144
|
+
completedAt?: string | null;
|
|
145
|
+
outputBytes?: number | null;
|
|
146
|
+
errorMessage?: string | null;
|
|
147
|
+
}
|
|
148
|
+
export {};
|
|
149
|
+
//# sourceMappingURL=opportunities.d.ts.map
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types for the Opportunities domain (/v1/opportunities).
|
|
3
|
+
*/
|
|
4
|
+
import type { PaginationParams, FieldsParam } from './common.js';
|
|
5
|
+
export type AiCategory = 'technology' | 'defense' | 'construction' | 'professional-services' | 'logistics' | 'medical' | 'research' | 'energy' | 'environmental' | 'education-training' | 'intelligence-surveillance' | 'space-aviation' | 'maritime' | 'agriculture-food' | 'other';
|
|
6
|
+
export type AiDifficulty = 'easy' | 'medium' | 'hard' | 'unknown';
|
|
7
|
+
export interface Opportunity {
|
|
8
|
+
noticeId: string;
|
|
9
|
+
solicitationNumber?: string | null;
|
|
10
|
+
solNumber?: string | null;
|
|
11
|
+
baseNoticeId?: string | null;
|
|
12
|
+
title: string;
|
|
13
|
+
noticeType?: string | null;
|
|
14
|
+
type?: string | null;
|
|
15
|
+
baseType?: string | null;
|
|
16
|
+
descriptionRaw?: string | null;
|
|
17
|
+
descriptionClean?: string | null;
|
|
18
|
+
postedDate?: string | null;
|
|
19
|
+
responseDeadline?: string | null;
|
|
20
|
+
archiveDate?: string | null;
|
|
21
|
+
modifiedDate?: string | null;
|
|
22
|
+
naicsCode?: string | null;
|
|
23
|
+
classificationCode?: string | null;
|
|
24
|
+
setAsideType?: string | null;
|
|
25
|
+
setAsideDescription?: string | null;
|
|
26
|
+
department?: string | null;
|
|
27
|
+
subTier?: string | null;
|
|
28
|
+
office?: string | null;
|
|
29
|
+
officeAddress?: unknown;
|
|
30
|
+
awardDate?: string | null;
|
|
31
|
+
awardNumber?: string | null;
|
|
32
|
+
awardAmount?: string | number | null;
|
|
33
|
+
awardAmountRaw?: string | null;
|
|
34
|
+
awardeeName?: string | null;
|
|
35
|
+
awardeeUei?: string | null;
|
|
36
|
+
awardeeCage?: string | null;
|
|
37
|
+
awardeeCity?: string | null;
|
|
38
|
+
awardeeState?: string | null;
|
|
39
|
+
awardeeZip?: string | null;
|
|
40
|
+
contactName?: string | null;
|
|
41
|
+
contactTitle?: string | null;
|
|
42
|
+
contactEmail?: string | null;
|
|
43
|
+
contactPhone?: string | null;
|
|
44
|
+
popCity?: string | null;
|
|
45
|
+
popState?: string | null;
|
|
46
|
+
popZip?: string | null;
|
|
47
|
+
popCountry?: string | null;
|
|
48
|
+
popAddress?: string | null;
|
|
49
|
+
samUiLink?: string | null;
|
|
50
|
+
resourceLinks?: unknown;
|
|
51
|
+
isActive?: boolean | null;
|
|
52
|
+
dataSource?: string | null;
|
|
53
|
+
sourceFile?: string | null;
|
|
54
|
+
aiTags?: string[] | null;
|
|
55
|
+
aiCategory?: AiCategory | null;
|
|
56
|
+
aiDifficulty?: AiDifficulty | null;
|
|
57
|
+
aiSummary?: string | null;
|
|
58
|
+
aiEnrichedAt?: string | null;
|
|
59
|
+
}
|
|
60
|
+
export type OpportunitiesStatsGroupBy = 'department' | 'naics' | 'setAsideType' | 'postedYear' | 'aiCategory' | 'aiDifficulty';
|
|
61
|
+
export interface OpportunityStatsItem {
|
|
62
|
+
group: string | null;
|
|
63
|
+
count: number;
|
|
64
|
+
totalAwardAmount?: number | null;
|
|
65
|
+
}
|
|
66
|
+
export interface OpportunitiesStats {
|
|
67
|
+
groupBy: OpportunitiesStatsGroupBy;
|
|
68
|
+
items: OpportunityStatsItem[];
|
|
69
|
+
}
|
|
70
|
+
/** ISO date string: `YYYY-MM-DD` */
|
|
71
|
+
type ISODate = string;
|
|
72
|
+
export interface ListOpportunitiesParams extends PaginationParams, FieldsParam {
|
|
73
|
+
/** Full-text search query. */
|
|
74
|
+
q?: string;
|
|
75
|
+
/** NAICS code(s) — 2–6 digits. */
|
|
76
|
+
naics?: string | string[];
|
|
77
|
+
/** Department/agency name (substring match). */
|
|
78
|
+
agency?: string;
|
|
79
|
+
/** Office name (substring match). */
|
|
80
|
+
office?: string;
|
|
81
|
+
/** Set-aside type code(s) (e.g. '8A', 'WOSB'). */
|
|
82
|
+
setAside?: string | string[];
|
|
83
|
+
/** SAM.gov notice type(s) (e.g. 'Solicitation', 'Award Notice'). */
|
|
84
|
+
noticeType?: string | string[];
|
|
85
|
+
/** Results posted on or after this date (YYYY-MM-DD). */
|
|
86
|
+
postedAfter?: ISODate;
|
|
87
|
+
/** Results posted on or before this date (YYYY-MM-DD). */
|
|
88
|
+
postedBefore?: ISODate;
|
|
89
|
+
/** Response deadline on or after this date (YYYY-MM-DD). */
|
|
90
|
+
deadlineAfter?: ISODate;
|
|
91
|
+
/** Place of performance (2-letter US state code or full state name). */
|
|
92
|
+
state?: string;
|
|
93
|
+
/** Minimum award amount in **cents** (integer). */
|
|
94
|
+
minAward?: number;
|
|
95
|
+
/** Maximum award amount in **cents** (integer). */
|
|
96
|
+
maxAward?: number;
|
|
97
|
+
/** Data source filter (e.g. 'sam.gov'). */
|
|
98
|
+
dataSource?: string;
|
|
99
|
+
/** Filter by AI-assigned category (requires enrichment to have run). */
|
|
100
|
+
aiCategory?: AiCategory;
|
|
101
|
+
/** Filter by AI-assigned tag(s). */
|
|
102
|
+
aiTag?: string | string[];
|
|
103
|
+
/** Filter by AI-assigned difficulty. */
|
|
104
|
+
aiDifficulty?: AiDifficulty;
|
|
105
|
+
/** Sort field. Default: 'postedDate'. */
|
|
106
|
+
sort?: 'postedDate' | 'awardAmount' | 'responseDeadline';
|
|
107
|
+
/** Sort direction. Default: 'desc'. */
|
|
108
|
+
dir?: 'asc' | 'desc';
|
|
109
|
+
}
|
|
110
|
+
export interface GetOpportunitiesStatsParams {
|
|
111
|
+
/** Dimension to group results by. Default: 'department'. */
|
|
112
|
+
groupBy?: OpportunitiesStatsGroupBy;
|
|
113
|
+
/** Maximum number of groups to return (1–100). Default: 25. */
|
|
114
|
+
limit?: number;
|
|
115
|
+
/** Filter by data source. */
|
|
116
|
+
dataSource?: string;
|
|
117
|
+
}
|
|
118
|
+
export type ExportFormat = 'ndjson' | 'csv';
|
|
119
|
+
export type ExportStatus = 'pending' | 'running' | 'done' | 'failed';
|
|
120
|
+
export interface CreateExportParams {
|
|
121
|
+
/** Output format. Developer plan supports CSV only; Professional/Enterprise support all. */
|
|
122
|
+
format: ExportFormat;
|
|
123
|
+
/** Same filters as the opportunities search endpoint. */
|
|
124
|
+
q?: string;
|
|
125
|
+
naics?: string | string[];
|
|
126
|
+
agency?: string;
|
|
127
|
+
setAside?: string | string[];
|
|
128
|
+
noticeType?: string | string[];
|
|
129
|
+
postedAfter?: ISODate;
|
|
130
|
+
postedBefore?: ISODate;
|
|
131
|
+
state?: string;
|
|
132
|
+
minAward?: number;
|
|
133
|
+
maxAward?: number;
|
|
134
|
+
dataSource?: string;
|
|
135
|
+
aiCategory?: AiCategory;
|
|
136
|
+
aiDifficulty?: AiDifficulty;
|
|
137
|
+
}
|
|
138
|
+
export interface ExportJob {
|
|
139
|
+
exportId: string;
|
|
140
|
+
status: ExportStatus;
|
|
141
|
+
format: ExportFormat;
|
|
142
|
+
createdAt: string;
|
|
143
|
+
startedAt?: string | null;
|
|
144
|
+
completedAt?: string | null;
|
|
145
|
+
outputBytes?: number | null;
|
|
146
|
+
errorMessage?: string | null;
|
|
147
|
+
}
|
|
148
|
+
export {};
|
|
149
|
+
//# sourceMappingURL=opportunities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opportunities.d.ts","sourceRoot":"","sources":["../../../src/types/opportunities.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAc,WAAW,EAAE,MAAM,aAAa,CAAC;AAI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