@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.
Files changed (129) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +331 -0
  3. package/dist/cjs/client.cjs +138 -0
  4. package/dist/cjs/errors.cjs +200 -0
  5. package/dist/cjs/http.cjs +449 -0
  6. package/dist/cjs/index.cjs +65 -0
  7. package/dist/cjs/resources/analytics.cjs +134 -0
  8. package/dist/cjs/resources/assistance.cjs +101 -0
  9. package/dist/cjs/resources/entities.cjs +149 -0
  10. package/dist/cjs/resources/exclusions.cjs +135 -0
  11. package/dist/cjs/resources/intelligence.cjs +96 -0
  12. package/dist/cjs/resources/opportunities.cjs +170 -0
  13. package/dist/cjs/resources/webhooks.cjs +262 -0
  14. package/dist/cjs/types/analytics.cjs +5 -0
  15. package/dist/cjs/types/assistance.cjs +5 -0
  16. package/dist/cjs/types/common.cjs +5 -0
  17. package/dist/cjs/types/entities.cjs +5 -0
  18. package/dist/cjs/types/exclusions.cjs +5 -0
  19. package/dist/cjs/types/index.cjs +5 -0
  20. package/dist/cjs/types/intelligence.cjs +5 -0
  21. package/dist/cjs/types/opportunities.cjs +5 -0
  22. package/dist/cjs/types/webhooks.cjs +5 -0
  23. package/dist/cjs/webhooks-verify.cjs +184 -0
  24. package/dist/esm/client.js +135 -0
  25. package/dist/esm/client.js.map +1 -0
  26. package/dist/esm/errors.js +187 -0
  27. package/dist/esm/errors.js.map +1 -0
  28. package/dist/esm/http.js +445 -0
  29. package/dist/esm/http.js.map +1 -0
  30. package/dist/esm/index.js +40 -0
  31. package/dist/esm/index.js.map +1 -0
  32. package/dist/esm/resources/analytics.js +131 -0
  33. package/dist/esm/resources/analytics.js.map +1 -0
  34. package/dist/esm/resources/assistance.js +98 -0
  35. package/dist/esm/resources/assistance.js.map +1 -0
  36. package/dist/esm/resources/entities.js +146 -0
  37. package/dist/esm/resources/entities.js.map +1 -0
  38. package/dist/esm/resources/exclusions.js +132 -0
  39. package/dist/esm/resources/exclusions.js.map +1 -0
  40. package/dist/esm/resources/intelligence.js +93 -0
  41. package/dist/esm/resources/intelligence.js.map +1 -0
  42. package/dist/esm/resources/opportunities.js +167 -0
  43. package/dist/esm/resources/opportunities.js.map +1 -0
  44. package/dist/esm/resources/webhooks.js +259 -0
  45. package/dist/esm/resources/webhooks.js.map +1 -0
  46. package/dist/esm/types/analytics.js +5 -0
  47. package/dist/esm/types/analytics.js.map +1 -0
  48. package/dist/esm/types/assistance.js +5 -0
  49. package/dist/esm/types/assistance.js.map +1 -0
  50. package/dist/esm/types/common.js +5 -0
  51. package/dist/esm/types/common.js.map +1 -0
  52. package/dist/esm/types/entities.js +5 -0
  53. package/dist/esm/types/entities.js.map +1 -0
  54. package/dist/esm/types/exclusions.js +5 -0
  55. package/dist/esm/types/exclusions.js.map +1 -0
  56. package/dist/esm/types/index.js +5 -0
  57. package/dist/esm/types/index.js.map +1 -0
  58. package/dist/esm/types/intelligence.js +5 -0
  59. package/dist/esm/types/intelligence.js.map +1 -0
  60. package/dist/esm/types/opportunities.js +5 -0
  61. package/dist/esm/types/opportunities.js.map +1 -0
  62. package/dist/esm/types/webhooks.js +5 -0
  63. package/dist/esm/types/webhooks.js.map +1 -0
  64. package/dist/esm/webhooks-verify.js +179 -0
  65. package/dist/esm/webhooks-verify.js.map +1 -0
  66. package/dist/types/client.d.cts +136 -0
  67. package/dist/types/client.d.ts +136 -0
  68. package/dist/types/client.d.ts.map +1 -0
  69. package/dist/types/errors.d.cts +139 -0
  70. package/dist/types/errors.d.ts +139 -0
  71. package/dist/types/errors.d.ts.map +1 -0
  72. package/dist/types/http.d.cts +137 -0
  73. package/dist/types/http.d.ts +137 -0
  74. package/dist/types/http.d.ts.map +1 -0
  75. package/dist/types/index.d.cts +39 -0
  76. package/dist/types/index.d.ts +39 -0
  77. package/dist/types/index.d.ts.map +1 -0
  78. package/dist/types/resources/analytics.d.cts +94 -0
  79. package/dist/types/resources/analytics.d.ts +94 -0
  80. package/dist/types/resources/analytics.d.ts.map +1 -0
  81. package/dist/types/resources/assistance.d.cts +66 -0
  82. package/dist/types/resources/assistance.d.ts +66 -0
  83. package/dist/types/resources/assistance.d.ts.map +1 -0
  84. package/dist/types/resources/entities.d.cts +101 -0
  85. package/dist/types/resources/entities.d.ts +101 -0
  86. package/dist/types/resources/entities.d.ts.map +1 -0
  87. package/dist/types/resources/exclusions.d.cts +84 -0
  88. package/dist/types/resources/exclusions.d.ts +84 -0
  89. package/dist/types/resources/exclusions.d.ts.map +1 -0
  90. package/dist/types/resources/intelligence.d.cts +66 -0
  91. package/dist/types/resources/intelligence.d.ts +66 -0
  92. package/dist/types/resources/intelligence.d.ts.map +1 -0
  93. package/dist/types/resources/opportunities.d.cts +116 -0
  94. package/dist/types/resources/opportunities.d.ts +116 -0
  95. package/dist/types/resources/opportunities.d.ts.map +1 -0
  96. package/dist/types/resources/webhooks.d.cts +180 -0
  97. package/dist/types/resources/webhooks.d.ts +180 -0
  98. package/dist/types/resources/webhooks.d.ts.map +1 -0
  99. package/dist/types/types/analytics.d.cts +85 -0
  100. package/dist/types/types/analytics.d.ts +85 -0
  101. package/dist/types/types/analytics.d.ts.map +1 -0
  102. package/dist/types/types/assistance.d.cts +55 -0
  103. package/dist/types/types/assistance.d.ts +55 -0
  104. package/dist/types/types/assistance.d.ts.map +1 -0
  105. package/dist/types/types/common.d.cts +58 -0
  106. package/dist/types/types/common.d.ts +58 -0
  107. package/dist/types/types/common.d.ts.map +1 -0
  108. package/dist/types/types/entities.d.cts +85 -0
  109. package/dist/types/types/entities.d.ts +85 -0
  110. package/dist/types/types/entities.d.ts.map +1 -0
  111. package/dist/types/types/exclusions.d.cts +81 -0
  112. package/dist/types/types/exclusions.d.ts +81 -0
  113. package/dist/types/types/exclusions.d.ts.map +1 -0
  114. package/dist/types/types/index.d.cts +12 -0
  115. package/dist/types/types/index.d.ts +12 -0
  116. package/dist/types/types/index.d.ts.map +1 -0
  117. package/dist/types/types/intelligence.d.cts +104 -0
  118. package/dist/types/types/intelligence.d.ts +104 -0
  119. package/dist/types/types/intelligence.d.ts.map +1 -0
  120. package/dist/types/types/opportunities.d.cts +149 -0
  121. package/dist/types/types/opportunities.d.ts +149 -0
  122. package/dist/types/types/opportunities.d.ts.map +1 -0
  123. package/dist/types/types/webhooks.d.cts +106 -0
  124. package/dist/types/types/webhooks.d.ts +106 -0
  125. package/dist/types/types/webhooks.d.ts.map +1 -0
  126. package/dist/types/webhooks-verify.d.cts +102 -0
  127. package/dist/types/webhooks-verify.d.ts +102 -0
  128. package/dist/types/webhooks-verify.d.ts.map +1 -0
  129. package/package.json +62 -0
@@ -0,0 +1,85 @@
1
+ /**
2
+ * Types for the Analytics domain (/v1/analytics).
3
+ */
4
+ export type AnalyticsRange = '24h' | '7d' | '30d' | '90d';
5
+ export interface AnalyticsSummary {
6
+ requestsToday: number;
7
+ requestsThisMonth: number;
8
+ requestsInRange: number;
9
+ errors4xx: number;
10
+ errors5xx: number;
11
+ rateLimitEvents: number;
12
+ /** 4xx error rate as a fraction (0–1). */
13
+ errorRate4xx: number;
14
+ /** 5xx error rate as a fraction (0–1). */
15
+ errorRate5xx: number;
16
+ }
17
+ export interface AnalyticsChartDay {
18
+ /** ISO date string (YYYY-MM-DD). */
19
+ date: string;
20
+ total: number;
21
+ success: number;
22
+ /** 4xx count. */
23
+ e4xx: number;
24
+ /** 5xx count. */
25
+ e5xx: number;
26
+ }
27
+ export interface AnalyticsChart {
28
+ days: AnalyticsChartDay[];
29
+ }
30
+ export interface AnalyticsEndpoint {
31
+ endpoint: string;
32
+ method?: string | null;
33
+ requestCount: number;
34
+ /** P95 response time in milliseconds. */
35
+ p95LatencyMs: number;
36
+ errorRate: number;
37
+ }
38
+ export interface AnalyticsEndpoints {
39
+ byVolume: AnalyticsEndpoint[];
40
+ byLatency: AnalyticsEndpoint[];
41
+ }
42
+ export type LogStatusFilter = 'all' | '2xx' | '4xx' | '5xx';
43
+ export interface AnalyticsLogEntry {
44
+ requestId: string;
45
+ method: string;
46
+ endpoint: string;
47
+ statusCode: number;
48
+ latencyMs?: number | null;
49
+ apiKeyId?: string | null;
50
+ createdAt: string;
51
+ }
52
+ export interface AnalyticsLogs {
53
+ items: AnalyticsLogEntry[];
54
+ nextCursor: string | null;
55
+ hasNextPage: boolean;
56
+ }
57
+ export interface AnalyticsSummaryParams {
58
+ /** Scope to a specific API key UUID. */
59
+ keyId?: string;
60
+ /** Time window. Default: '30d'. */
61
+ range?: AnalyticsRange;
62
+ }
63
+ export interface AnalyticsChartParams {
64
+ keyId?: string;
65
+ range?: AnalyticsRange;
66
+ }
67
+ export interface AnalyticsEndpointsParams {
68
+ keyId?: string;
69
+ range?: AnalyticsRange;
70
+ }
71
+ export interface AnalyticsLogsParams {
72
+ keyId?: string;
73
+ range?: AnalyticsRange;
74
+ /** Maximum number of log entries (1–1000). Default: 100. */
75
+ limit?: number;
76
+ /** Pagination cursor. */
77
+ cursor?: string;
78
+ /** Filter by status class. Default: 'all'. */
79
+ status?: LogStatusFilter;
80
+ /** Filter by exact endpoint pattern. */
81
+ endpoint?: string;
82
+ /** Partial match on request ID. */
83
+ requestId?: string;
84
+ }
85
+ //# sourceMappingURL=analytics.d.ts.map
@@ -0,0 +1,85 @@
1
+ /**
2
+ * Types for the Analytics domain (/v1/analytics).
3
+ */
4
+ export type AnalyticsRange = '24h' | '7d' | '30d' | '90d';
5
+ export interface AnalyticsSummary {
6
+ requestsToday: number;
7
+ requestsThisMonth: number;
8
+ requestsInRange: number;
9
+ errors4xx: number;
10
+ errors5xx: number;
11
+ rateLimitEvents: number;
12
+ /** 4xx error rate as a fraction (0–1). */
13
+ errorRate4xx: number;
14
+ /** 5xx error rate as a fraction (0–1). */
15
+ errorRate5xx: number;
16
+ }
17
+ export interface AnalyticsChartDay {
18
+ /** ISO date string (YYYY-MM-DD). */
19
+ date: string;
20
+ total: number;
21
+ success: number;
22
+ /** 4xx count. */
23
+ e4xx: number;
24
+ /** 5xx count. */
25
+ e5xx: number;
26
+ }
27
+ export interface AnalyticsChart {
28
+ days: AnalyticsChartDay[];
29
+ }
30
+ export interface AnalyticsEndpoint {
31
+ endpoint: string;
32
+ method?: string | null;
33
+ requestCount: number;
34
+ /** P95 response time in milliseconds. */
35
+ p95LatencyMs: number;
36
+ errorRate: number;
37
+ }
38
+ export interface AnalyticsEndpoints {
39
+ byVolume: AnalyticsEndpoint[];
40
+ byLatency: AnalyticsEndpoint[];
41
+ }
42
+ export type LogStatusFilter = 'all' | '2xx' | '4xx' | '5xx';
43
+ export interface AnalyticsLogEntry {
44
+ requestId: string;
45
+ method: string;
46
+ endpoint: string;
47
+ statusCode: number;
48
+ latencyMs?: number | null;
49
+ apiKeyId?: string | null;
50
+ createdAt: string;
51
+ }
52
+ export interface AnalyticsLogs {
53
+ items: AnalyticsLogEntry[];
54
+ nextCursor: string | null;
55
+ hasNextPage: boolean;
56
+ }
57
+ export interface AnalyticsSummaryParams {
58
+ /** Scope to a specific API key UUID. */
59
+ keyId?: string;
60
+ /** Time window. Default: '30d'. */
61
+ range?: AnalyticsRange;
62
+ }
63
+ export interface AnalyticsChartParams {
64
+ keyId?: string;
65
+ range?: AnalyticsRange;
66
+ }
67
+ export interface AnalyticsEndpointsParams {
68
+ keyId?: string;
69
+ range?: AnalyticsRange;
70
+ }
71
+ export interface AnalyticsLogsParams {
72
+ keyId?: string;
73
+ range?: AnalyticsRange;
74
+ /** Maximum number of log entries (1–1000). Default: 100. */
75
+ limit?: number;
76
+ /** Pagination cursor. */
77
+ cursor?: string;
78
+ /** Filter by status class. Default: 'all'. */
79
+ status?: LogStatusFilter;
80
+ /** Filter by exact endpoint pattern. */
81
+ endpoint?: string;
82
+ /** Partial match on request ID. */
83
+ requestId?: string;
84
+ }
85
+ //# sourceMappingURL=analytics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../../../src/types/analytics.ts"],"names":[],"mappings":"AAAA;;GAEG;AAI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SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAC3B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,WAAW,EAAE,OAAO,CAAC;CACtB;AAID,MAAM,WAAW,sBAAsB;IACrC,wCAAwC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mCAAmC;IACnC,KAAK,CAAC,EAAE,cAAc,CAAC;CACxB;AAED,MAAM,WAAW,oBAAoB;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,cAAc,CAAC;CACxB;AAED,MAAM,WAAW,wBAAwB;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,cAAc,CAAC;CACxB;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB,4DAA4D;IAC5D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yBAAyB;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9C,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,wCAAwC;IACxC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mCAAmC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Types for the Assistance Listings domain (/v1/assistance).
3
+ */
4
+ import type { PaginationParams } from './common.cjs';
5
+ export interface AssistanceListing {
6
+ /** CFDA program number (XX.XXX format). */
7
+ programNumber: string;
8
+ programTitle: string;
9
+ federalAgency?: string | null;
10
+ programType?: string | null;
11
+ objectives?: string | null;
12
+ typesOfAssistance?: string[] | null;
13
+ eligibilityApplicants?: string | null;
14
+ eligibilityBeneficiaries?: string | null;
15
+ applicationProcedure?: string | null;
16
+ postAwardRequirements?: string | null;
17
+ fundingRangeDescription?: string | null;
18
+ averageAward?: number | null;
19
+ /** Number of awards made in the most recent fiscal year. */
20
+ awardsCount?: number | null;
21
+ regulations?: string | null;
22
+ contactName?: string | null;
23
+ contactPhone?: string | null;
24
+ contactEmail?: string | null;
25
+ contactAddress?: string | null;
26
+ websiteAddress?: string | null;
27
+ isActive?: boolean | null;
28
+ fiscalYear?: number | null;
29
+ lastUpdated?: string | null;
30
+ }
31
+ export interface AssistanceStats {
32
+ total: number;
33
+ active: number;
34
+ byAgency: Array<{
35
+ agency: string;
36
+ count: number;
37
+ }>;
38
+ byType: Array<{
39
+ type: string;
40
+ count: number;
41
+ }>;
42
+ }
43
+ export interface ListAssistanceParams extends PaginationParams {
44
+ /** Full-text search query. */
45
+ q?: string;
46
+ /** Filter by federal agency name or code. */
47
+ agency?: string;
48
+ /** Filter by assistance type. */
49
+ type?: string;
50
+ }
51
+ export interface GetAssistanceStatsParams {
52
+ /** Filter by federal agency. */
53
+ agency?: string;
54
+ }
55
+ //# sourceMappingURL=assistance.d.ts.map
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Types for the Assistance Listings domain (/v1/assistance).
3
+ */
4
+ import type { PaginationParams } from './common.js';
5
+ export interface AssistanceListing {
6
+ /** CFDA program number (XX.XXX format). */
7
+ programNumber: string;
8
+ programTitle: string;
9
+ federalAgency?: string | null;
10
+ programType?: string | null;
11
+ objectives?: string | null;
12
+ typesOfAssistance?: string[] | null;
13
+ eligibilityApplicants?: string | null;
14
+ eligibilityBeneficiaries?: string | null;
15
+ applicationProcedure?: string | null;
16
+ postAwardRequirements?: string | null;
17
+ fundingRangeDescription?: string | null;
18
+ averageAward?: number | null;
19
+ /** Number of awards made in the most recent fiscal year. */
20
+ awardsCount?: number | null;
21
+ regulations?: string | null;
22
+ contactName?: string | null;
23
+ contactPhone?: string | null;
24
+ contactEmail?: string | null;
25
+ contactAddress?: string | null;
26
+ websiteAddress?: string | null;
27
+ isActive?: boolean | null;
28
+ fiscalYear?: number | null;
29
+ lastUpdated?: string | null;
30
+ }
31
+ export interface AssistanceStats {
32
+ total: number;
33
+ active: number;
34
+ byAgency: Array<{
35
+ agency: string;
36
+ count: number;
37
+ }>;
38
+ byType: Array<{
39
+ type: string;
40
+ count: number;
41
+ }>;
42
+ }
43
+ export interface ListAssistanceParams extends PaginationParams {
44
+ /** Full-text search query. */
45
+ q?: string;
46
+ /** Filter by federal agency name or code. */
47
+ agency?: string;
48
+ /** Filter by assistance type. */
49
+ type?: string;
50
+ }
51
+ export interface GetAssistanceStatsParams {
52
+ /** Filter by federal agency. */
53
+ agency?: string;
54
+ }
55
+ //# sourceMappingURL=assistance.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assistance.d.ts","sourceRoot":"","sources":["../../../src/types/assistance.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAIpD,MAAM,WAAW,iBAAiB;IAChC,2CAA2C;IAC3C,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,iBAAiB,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IACpC,qBAAqB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,wBAAwB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzC,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,qBAAqB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,uBAAuB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC,YAAY,CAAC,E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allowed in the current window. */
6
+ limit: number;
7
+ /** Requests remaining in the current window. */
8
+ remaining: number;
9
+ /** Unix epoch seconds when the window resets. */
10
+ reset: number;
11
+ }
12
+ export interface OffsetPagination {
13
+ total: number;
14
+ page: number;
15
+ limit: number;
16
+ totalPages: number;
17
+ hasNextPage: boolean;
18
+ hasPreviousPage: boolean;
19
+ }
20
+ export interface CursorPagination {
21
+ nextCursor: string | null;
22
+ hasNextPage: boolean;
23
+ limit: number;
24
+ }
25
+ export type Pagination = OffsetPagination | CursorPagination | null;
26
+ export interface ResponseMeta {
27
+ requestId: string;
28
+ /** Whether the result was served from cache. */
29
+ cached?: boolean;
30
+ [key: string]: unknown;
31
+ }
32
+ export interface ApiResponse<T> {
33
+ success: true;
34
+ data: T;
35
+ pagination: Pagination;
36
+ meta: ResponseMeta;
37
+ rateLimit: RateLimitInfo | null;
38
+ }
39
+ export interface PaginationParams {
40
+ /** Page number (1–1000). Default: 1. */
41
+ page?: number;
42
+ /** Results per page (1–100). Default: 25. */
43
+ limit?: number;
44
+ /** Opaque cursor for cursor-based pagination. */
45
+ cursor?: string;
46
+ }
47
+ export interface SortParams {
48
+ sort?: string;
49
+ dir?: 'asc' | 'desc';
50
+ }
51
+ export interface FieldsParam {
52
+ /**
53
+ * Comma-separated list of fields to include in the response.
54
+ * Reduces payload size when only a subset of fields is needed.
55
+ */
56
+ fields?: string;
57
+ }
58
+ //# sourceMappingURL=common.d.ts.map
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Common types shared across all FedPulse API domains.
3
+ */
4
+ export interface RateLimitInfo {
5
+ /** Maximum requests allowed in the current window. */
6
+ limit: number;
7
+ /** Requests remaining in the current window. */
8
+ remaining: number;
9
+ /** Unix epoch seconds when the window resets. */
10
+ reset: number;
11
+ }
12
+ export interface OffsetPagination {
13
+ total: number;
14
+ page: number;
15
+ limit: number;
16
+ totalPages: number;
17
+ hasNextPage: boolean;
18
+ hasPreviousPage: boolean;
19
+ }
20
+ export interface CursorPagination {
21
+ nextCursor: string | null;
22
+ hasNextPage: boolean;
23
+ limit: number;
24
+ }
25
+ export type Pagination = OffsetPagination | CursorPagination | null;
26
+ export interface ResponseMeta {
27
+ requestId: string;
28
+ /** Whether the result was served from cache. */
29
+ cached?: boolean;
30
+ [key: string]: unknown;
31
+ }
32
+ export interface ApiResponse<T> {
33
+ success: true;
34
+ data: T;
35
+ pagination: Pagination;
36
+ meta: ResponseMeta;
37
+ rateLimit: RateLimitInfo | null;
38
+ }
39
+ export interface PaginationParams {
40
+ /** Page number (1–1000). Default: 1. */
41
+ page?: number;
42
+ /** Results per page (1–100). Default: 25. */
43
+ limit?: number;
44
+ /** Opaque cursor for cursor-based pagination. */
45
+ cursor?: string;
46
+ }
47
+ export interface SortParams {
48
+ sort?: string;
49
+ dir?: 'asc' | 'desc';
50
+ }
51
+ export interface FieldsParam {
52
+ /**
53
+ * Comma-separated list of fields to include in the response.
54
+ * Reduces payload size when only a subset of fields is needed.
55
+ */
56
+ fields?: string;
57
+ }
58
+ //# sourceMappingURL=common.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/types/common.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,WAAW,aAAa;IAC5B,sDAAsD;IACtD,KAAK,EAAE,MAAM,CAAC;IACd,gDAAgD;IAChD,SAAS,EAAE,MAAM,CAAC;IAClB,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAC;CACf;AAID,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,OAAO,CAAC;IACrB,eAAe,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,WAAW,EAAE,OAAO,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,UAAU,GAAG,gBAAgB,GAAG,gBAAgB,GAAG,IAAI,CAAC;AAIpE,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,gDAAgD;IAChD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAID,MAAM,WAAW,WAAW,CAAC,CAAC;IAC5B,OAAO,EAAE,IAAI,CAAC;IACd,IAAI,EAAE,CAAC,CAAC;IACR,UAAU,EAAE,UAAU,CAAC;IACvB,IAAI,EAAE,YAAY,CAAC;IACnB,SAAS,EAAE,aAAa,GAAG,IAAI,CAAC;CACjC;AAID,MAAM,WAAW,gBAAgB;IAC/B,wCAAwC;IACxC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iDAAiD;IACjD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;CACtB;AAID,MAAM,WAAW,WAAW;IAC1B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
@@ -0,0 +1,85 @@
1
+ /**
2
+ * Types for the Entities domain (/v1/entities).
3
+ */
4
+ import type { PaginationParams } from './common.cjs';
5
+ export interface EntityAddress {
6
+ street?: string | null;
7
+ street2?: string | null;
8
+ city?: string | null;
9
+ state?: string | null;
10
+ zip?: string | null;
11
+ country?: string | null;
12
+ }
13
+ export interface EntityCertification {
14
+ type: string;
15
+ value?: string | null;
16
+ expirationDate?: string | null;
17
+ }
18
+ export interface EntityNaicsEntry {
19
+ naicsCode: string;
20
+ isPrimary: boolean;
21
+ description?: string | null;
22
+ }
23
+ export interface Entity {
24
+ uei: string;
25
+ cage?: string | null;
26
+ legalBusinessName: string;
27
+ dbaName?: string | null;
28
+ status?: string | null;
29
+ entityType?: string | null;
30
+ registrationDate?: string | null;
31
+ expirationDate?: string | null;
32
+ lastUpdated?: string | null;
33
+ physicalAddress?: EntityAddress | null;
34
+ mailingAddress?: EntityAddress | null;
35
+ naicsCodes?: EntityNaicsEntry[] | null;
36
+ primaryNaics?: string | null;
37
+ certifications?: EntityCertification[] | null;
38
+ purposeOfRegistration?: string | null;
39
+ organizationStructure?: string | null;
40
+ stateOfIncorporation?: string | null;
41
+ countryOfIncorporation?: string | null;
42
+ congressionalDistrict?: string | null;
43
+ submissionDate?: string | null;
44
+ activationDate?: string | null;
45
+ /** Number of open contract opportunities linked to this entity. */
46
+ openOpportunitiesCount?: number | null;
47
+ /** Total value of awarded contracts (in cents). */
48
+ totalAwardAmount?: number | null;
49
+ hasActiveExclusion?: boolean | null;
50
+ rawJson?: unknown;
51
+ }
52
+ export interface EntityStats {
53
+ total: number;
54
+ active: number;
55
+ byState: Array<{
56
+ state: string;
57
+ count: number;
58
+ }>;
59
+ byNaics: Array<{
60
+ naics: string;
61
+ count: number;
62
+ }>;
63
+ byCertification: Array<{
64
+ certification: string;
65
+ count: number;
66
+ }>;
67
+ }
68
+ export interface EntityExclusionCheckResult {
69
+ uei: string;
70
+ excluded: boolean;
71
+ /** The active exclusion record, or null if not excluded. */
72
+ exclusion: import('./exclusions.js').Exclusion | null;
73
+ checkedAt: string;
74
+ }
75
+ export interface ListEntitiesParams extends PaginationParams {
76
+ /** Search by legal business name or DBA name. */
77
+ q?: string;
78
+ /** Filter by NAICS code (2–6 digits). */
79
+ naics?: string;
80
+ /** Filter by small-business certification type (e.g. '8A', 'WOSB', 'HUBZone'). */
81
+ certification?: string;
82
+ /** Filter by US state code (2-letter). */
83
+ state?: string;
84
+ }
85
+ //# sourceMappingURL=entities.d.ts.map
@@ -0,0 +1,85 @@
1
+ /**
2
+ * Types for the Entities domain (/v1/entities).
3
+ */
4
+ import type { PaginationParams } from './common.js';
5
+ export interface EntityAddress {
6
+ street?: string | null;
7
+ street2?: string | null;
8
+ city?: string | null;
9
+ state?: string | null;
10
+ zip?: string | null;
11
+ country?: string | null;
12
+ }
13
+ export interface EntityCertification {
14
+ type: string;
15
+ value?: string | null;
16
+ expirationDate?: string | null;
17
+ }
18
+ export interface EntityNaicsEntry {
19
+ naicsCode: string;
20
+ isPrimary: boolean;
21
+ description?: string | null;
22
+ }
23
+ export interface Entity {
24
+ uei: string;
25
+ cage?: string | null;
26
+ legalBusinessName: string;
27
+ dbaName?: string | null;
28
+ status?: string | null;
29
+ entityType?: string | null;
30
+ registrationDate?: string | null;
31
+ expirationDate?: string | null;
32
+ lastUpdated?: string | null;
33
+ physicalAddress?: EntityAddress | null;
34
+ mailingAddress?: EntityAddress | null;
35
+ naicsCodes?: EntityNaicsEntry[] | null;
36
+ primaryNaics?: string | null;
37
+ certifications?: EntityCertification[] | null;
38
+ purposeOfRegistration?: string | null;
39
+ organizationStructure?: string | null;
40
+ stateOfIncorporation?: string | null;
41
+ countryOfIncorporation?: string | null;
42
+ congressionalDistrict?: string | null;
43
+ submissionDate?: string | null;
44
+ activationDate?: string | null;
45
+ /** Number of open contract opportunities linked to this entity. */
46
+ openOpportunitiesCount?: number | null;
47
+ /** Total value of awarded contracts (in cents). */
48
+ totalAwardAmount?: number | null;
49
+ hasActiveExclusion?: boolean | null;
50
+ rawJson?: unknown;
51
+ }
52
+ export interface EntityStats {
53
+ total: number;
54
+ active: number;
55
+ byState: Array<{
56
+ state: string;
57
+ count: number;
58
+ }>;
59
+ byNaics: Array<{
60
+ naics: string;
61
+ count: number;
62
+ }>;
63
+ byCertification: Array<{
64
+ certification: string;
65
+ count: number;
66
+ }>;
67
+ }
68
+ export interface EntityExclusionCheckResult {
69
+ uei: string;
70
+ excluded: boolean;
71
+ /** The active exclusion record, or null if not excluded. */
72
+ exclusion: import('./exclusions.js').Exclusion | null;
73
+ checkedAt: string;
74
+ }
75
+ export interface ListEntitiesParams extends PaginationParams {
76
+ /** Search by legal business name or DBA name. */
77
+ q?: string;
78
+ /** Filter by NAICS code (2–6 digits). */
79
+ naics?: string;
80
+ /** Filter by small-business certification type (e.g. '8A', 'WOSB', 'HUBZone'). */
81
+ certification?: string;
82
+ /** Filter by US state code (2-letter). */
83
+ state?: string;
84
+ }
85
+ //# sourceMappingURL=entities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entities.d.ts","sourceRoot":"","sources":["../../../src/types/entities.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAIpD,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAED,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED,MAAM,WAAW,MAAM;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;I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,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACjD,eAAe,EAAE,KAAK,CAAC;QAAE,aAAa,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAClE;AAID,MAAM,WAAW,0BAA0B;IACzC,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,OAAO,CAAC;IAClB,4DAA4D;IAC5D,SAAS,EAAE,OAAO,iBAAiB,EAAE,SAAS,GAAG,IAAI,CAAC;IACtD,SAAS,EAAE,MAAM,CAAC;CACnB;AAID,MAAM,WAAW,kBAAmB,SAAQ,gBAAgB;IAC1D,iDAAiD;IACjD,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,yCAAyC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kFAAkF;IAClF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,0CAA0C;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
@@ -0,0 +1,81 @@
1
+ /**
2
+ * Types for the Exclusions domain (/v1/exclusions).
3
+ */
4
+ import type { PaginationParams } from './common.cjs';
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