@cliwant/mcp-sam-gov 0.3.0 → 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.
- package/LICENSE +21 -21
- package/README.ja.md +48 -16
- package/README.ko.md +48 -16
- package/README.md +226 -64
- package/dist/attachments.d.ts +63 -0
- package/dist/attachments.d.ts.map +1 -0
- package/dist/attachments.js +576 -0
- package/dist/attachments.js.map +1 -0
- package/dist/bls.d.ts +267 -0
- package/dist/bls.d.ts.map +1 -0
- package/dist/bls.js +1549 -0
- package/dist/bls.js.map +1 -0
- package/dist/cache.d.ts +2 -0
- package/dist/cache.d.ts.map +1 -1
- package/dist/cache.js +4 -0
- package/dist/cache.js.map +1 -1
- package/dist/census.d.ts +182 -0
- package/dist/census.d.ts.map +1 -0
- package/dist/census.js +576 -0
- package/dist/census.js.map +1 -0
- package/dist/ckan.d.ts +141 -0
- package/dist/ckan.d.ts.map +1 -0
- package/dist/ckan.js +393 -0
- package/dist/ckan.js.map +1 -0
- package/dist/clinicaltrials.d.ts +180 -0
- package/dist/clinicaltrials.d.ts.map +1 -0
- package/dist/clinicaltrials.js +730 -0
- package/dist/clinicaltrials.js.map +1 -0
- package/dist/cms.d.ts +140 -0
- package/dist/cms.d.ts.map +1 -0
- package/dist/cms.js +482 -0
- package/dist/cms.js.map +1 -0
- package/dist/coerce.d.ts +32 -0
- package/dist/coerce.d.ts.map +1 -0
- package/dist/coerce.js +50 -0
- package/dist/coerce.js.map +1 -0
- package/dist/datagov-catalog.d.ts +84 -0
- package/dist/datagov-catalog.d.ts.map +1 -0
- package/dist/datagov-catalog.js +233 -0
- package/dist/datagov-catalog.js.map +1 -0
- package/dist/datagov.d.ts +146 -0
- package/dist/datagov.d.ts.map +1 -0
- package/dist/datagov.js +689 -0
- package/dist/datagov.js.map +1 -0
- package/dist/datagovKey.d.ts +36 -0
- package/dist/datagovKey.d.ts.map +1 -0
- package/dist/datagovKey.js +60 -0
- package/dist/datagovKey.js.map +1 -0
- package/dist/datasource.d.ts +313 -0
- package/dist/datasource.d.ts.map +1 -0
- package/dist/datasource.js +551 -0
- package/dist/datasource.js.map +1 -0
- package/dist/disclosure.d.ts +55 -0
- package/dist/disclosure.d.ts.map +1 -0
- package/dist/disclosure.js +57 -0
- package/dist/disclosure.js.map +1 -0
- package/dist/ecfr.d.ts +4 -2
- package/dist/ecfr.d.ts.map +1 -1
- package/dist/ecfr.js +74 -1
- package/dist/ecfr.js.map +1 -1
- package/dist/echo.d.ts +143 -0
- package/dist/echo.d.ts.map +1 -0
- package/dist/echo.js +424 -0
- package/dist/echo.js.map +1 -0
- package/dist/edgar.d.ts +377 -0
- package/dist/edgar.d.ts.map +1 -0
- package/dist/edgar.js +2418 -0
- package/dist/edgar.js.map +1 -0
- package/dist/errors.d.ts +26 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +69 -1
- package/dist/errors.js.map +1 -1
- package/dist/fac.d.ts +180 -0
- package/dist/fac.d.ts.map +1 -0
- package/dist/fac.js +416 -0
- package/dist/fac.js.map +1 -0
- package/dist/far.d.ts +170 -0
- package/dist/far.d.ts.map +1 -0
- package/dist/far.js +804 -0
- package/dist/far.js.map +1 -0
- package/dist/fdic.d.ts +599 -0
- package/dist/fdic.d.ts.map +1 -0
- package/dist/fdic.js +1624 -0
- package/dist/fdic.js.map +1 -0
- package/dist/federal-register.d.ts +139 -2
- package/dist/federal-register.d.ts.map +1 -1
- package/dist/federal-register.js +419 -3
- package/dist/federal-register.js.map +1 -1
- package/dist/fema.d.ts +181 -0
- package/dist/fema.d.ts.map +1 -0
- package/dist/fema.js +436 -0
- package/dist/fema.js.map +1 -0
- package/dist/fpds.d.ts +108 -0
- package/dist/fpds.d.ts.map +1 -0
- package/dist/fpds.js +519 -0
- package/dist/fpds.js.map +1 -0
- package/dist/gao.d.ts +64 -0
- package/dist/gao.d.ts.map +1 -0
- package/dist/gao.js +640 -0
- package/dist/gao.js.map +1 -0
- package/dist/govinfo.d.ts +111 -0
- package/dist/govinfo.d.ts.map +1 -0
- package/dist/govinfo.js +422 -0
- package/dist/govinfo.js.map +1 -0
- package/dist/grants.d.ts +27 -4
- package/dist/grants.d.ts.map +1 -1
- package/dist/grants.js +111 -6
- package/dist/grants.js.map +1 -1
- package/dist/gsa-csv.d.ts +249 -0
- package/dist/gsa-csv.d.ts.map +1 -0
- package/dist/gsa-csv.js +784 -0
- package/dist/gsa-csv.js.map +1 -0
- package/dist/integrity.d.ts +212 -0
- package/dist/integrity.d.ts.map +1 -0
- package/dist/integrity.js +707 -0
- package/dist/integrity.js.map +1 -0
- package/dist/meta.d.ts +165 -0
- package/dist/meta.d.ts.map +1 -0
- package/dist/meta.js +162 -0
- package/dist/meta.js.map +1 -0
- package/dist/nih.d.ts +117 -0
- package/dist/nih.d.ts.map +1 -0
- package/dist/nih.js +291 -0
- package/dist/nih.js.map +1 -0
- package/dist/nppes.d.ts +157 -0
- package/dist/nppes.d.ts.map +1 -0
- package/dist/nppes.js +648 -0
- package/dist/nppes.js.map +1 -0
- package/dist/nsf.d.ts +176 -0
- package/dist/nsf.d.ts.map +1 -0
- package/dist/nsf.js +554 -0
- package/dist/nsf.js.map +1 -0
- package/dist/nvd.d.ts +176 -0
- package/dist/nvd.d.ts.map +1 -0
- package/dist/nvd.js +912 -0
- package/dist/nvd.js.map +1 -0
- package/dist/ofac.d.ts +205 -0
- package/dist/ofac.d.ts.map +1 -0
- package/dist/ofac.js +919 -0
- package/dist/ofac.js.map +1 -0
- package/dist/pricing.d.ts +110 -0
- package/dist/pricing.d.ts.map +1 -0
- package/dist/pricing.js +843 -0
- package/dist/pricing.js.map +1 -0
- package/dist/sam-gov/client.d.ts +60 -2
- package/dist/sam-gov/client.d.ts.map +1 -1
- package/dist/sam-gov/client.js +320 -54
- package/dist/sam-gov/client.js.map +1 -1
- package/dist/sam-gov/index.d.ts +1 -1
- package/dist/sam-gov/index.d.ts.map +1 -1
- package/dist/sam-gov/index.js +1 -1
- package/dist/sam-gov/index.js.map +1 -1
- package/dist/sam-gov/types.d.ts +24 -0
- package/dist/sam-gov/types.d.ts.map +1 -1
- package/dist/sba.d.ts +72 -0
- package/dist/sba.d.ts.map +1 -0
- package/dist/sba.js +281 -0
- package/dist/sba.js.map +1 -0
- package/dist/server.d.ts +14 -2
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +3889 -296
- package/dist/server.js.map +1 -1
- package/dist/snapshot.d.ts +98 -0
- package/dist/snapshot.d.ts.map +1 -0
- package/dist/snapshot.js +146 -0
- package/dist/snapshot.js.map +1 -0
- package/dist/socrata.d.ts +157 -0
- package/dist/socrata.d.ts.map +1 -0
- package/dist/socrata.js +448 -0
- package/dist/socrata.js.map +1 -0
- package/dist/treasury.d.ts +143 -0
- package/dist/treasury.d.ts.map +1 -0
- package/dist/treasury.js +436 -0
- package/dist/treasury.js.map +1 -0
- package/dist/usaspending.d.ts +260 -65
- package/dist/usaspending.d.ts.map +1 -1
- package/dist/usaspending.js +1629 -201
- package/dist/usaspending.js.map +1 -1
- package/dist/usitc.d.ts +142 -0
- package/dist/usitc.d.ts.map +1 -0
- package/dist/usitc.js +339 -0
- package/dist/usitc.js.map +1 -0
- package/package.json +24 -2
- package/src/attachments.ts +652 -0
- package/src/bls.ts +1943 -0
- package/src/cache.ts +5 -0
- package/src/census.ts +735 -0
- package/src/ckan.ts +495 -0
- package/src/clinicaltrials.ts +923 -0
- package/src/cms.ts +634 -0
- package/src/coerce.ts +47 -0
- package/src/datagov-catalog.ts +296 -0
- package/src/datagov.ts +907 -0
- package/src/datagovKey.ts +68 -0
- package/src/datasource.ts +721 -0
- package/src/disclosure.ts +61 -0
- package/src/ecfr.ts +98 -1
- package/src/echo.ts +496 -0
- package/src/edgar.ts +3014 -0
- package/src/errors.ts +84 -1
- package/src/fac.ts +529 -0
- package/src/far.ts +1007 -0
- package/src/fdic.ts +2052 -0
- package/src/federal-register.ts +512 -3
- package/src/fema.ts +541 -0
- package/src/fpds.ts +620 -0
- package/src/gao.ts +744 -0
- package/src/govinfo.ts +497 -0
- package/src/grants.ts +139 -7
- package/src/gsa-csv.ts +992 -0
- package/src/integrity.ts +928 -0
- package/src/meta.ts +292 -0
- package/src/nih.ts +375 -0
- package/src/nppes.ts +834 -0
- package/src/nsf.ts +706 -0
- package/src/nvd.ts +1124 -0
- package/src/ofac.ts +1166 -0
- package/src/pricing.ts +1075 -0
- package/src/sam-gov/client.ts +345 -63
- package/src/sam-gov/index.ts +5 -1
- package/src/sam-gov/types.ts +22 -0
- package/src/sba.ts +357 -0
- package/src/server.ts +4551 -328
- package/src/snapshot.ts +192 -0
- package/src/socrata.ts +532 -0
- package/src/treasury.ts +575 -0
- package/src/usaspending.ts +1946 -214
- package/src/usitc.ts +420 -0
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* clinicaltrials.ts — ClinicalTrials.gov API v2 (`clinicaltrials.gov/api/v2`) —
|
|
3
|
+
* federally-registered clinical-research studies with LEAD-SPONSOR / COLLABORATOR
|
|
4
|
+
* / ORGANIZATION / FUNDING-SOURCE entity enrichment. ADR-0021. Source #21 on the
|
|
5
|
+
* R2 `getJson` GET port (a plain keyless GET — no key, no signup, no UA).
|
|
6
|
+
*
|
|
7
|
+
* WHAT IT ADDS: the trial-REGISTRATION axis of the research-funding entity layer
|
|
8
|
+
* already served by NIH RePORTER (ADR-0014) + NSF Awards (ADR-0020). The
|
|
9
|
+
* `leadSponsor` / `collaborators` / `organization` here are the pharma / biotech /
|
|
10
|
+
* university / agency entities that ALSO receive federal grants/contracts — the
|
|
11
|
+
* study-registration SIBLING of the grant sources, not a duplicate. On-mission =
|
|
12
|
+
* the ENTITY/sponsor/funding dimension (NOT the clinical minutiae).
|
|
13
|
+
*
|
|
14
|
+
* The module writes ZERO fetch/coercion/error/meta code — it REUSES `getJson`
|
|
15
|
+
* (redirect:"error", a plain GET) / `driftError` / `num`·`str` (coerce.ts,
|
|
16
|
+
* null-never-0 / null-never-empty-string) / `withMeta`·`buildMeta` /
|
|
17
|
+
* `ResponseMeta.nextCursor`, and COPIES (does NOT import) the GovInfo opaque-cursor
|
|
18
|
+
* honesty + the fixed-host SSRF idiom into the single audited `getCT` helper [M2].
|
|
19
|
+
*
|
|
20
|
+
* ★ SSRF ([M2] — one audited fetch home): BOTH tools route through `getCT(path,
|
|
21
|
+
* label, params)`. The host is a compile-time literal (`CT_BASE`); every filter
|
|
22
|
+
* rides in a MODULE-BUILT `URLSearchParams` (each value URLSearchParams-encoded)
|
|
23
|
+
* assembled key-by-key from validated typed args — NO raw-query passthrough. The
|
|
24
|
+
* single-study path segment `nctId` is regex-validated `^NCT\d{8}$` BEFORE the
|
|
25
|
+
* path is built (a `../` / `%2F` / non-matching id → invalid_input, 0 fetch —
|
|
26
|
+
* mirror edgar `buildFramesUrl` S1/S2). A post-construction hostname/protocol
|
|
27
|
+
* assertion + `redirect:"error"` lock it (fail closed on any off-host 3xx).
|
|
28
|
+
*
|
|
29
|
+
* ★ THE THREE HONESTY FACTS (LIVE-verified 2026-07-12, keyless plain GET, this IP):
|
|
30
|
+
* 1. `totalCount` is EXACT + filter-respecting + UNCAPPED — but OMITTED unless
|
|
31
|
+
* `countTotal=true` is sent (default keys = [studies, nextPageToken]). So the
|
|
32
|
+
* module ALWAYS sends `countTotal=true`; `totalAvailable = num(totalCount)`
|
|
33
|
+
* (a genuine 0 → 0, NEVER null, NEVER studies.length); a missing/non-number
|
|
34
|
+
* totalCount on a countTotal=true call ⇒ schema_drift. (cancer=142304,
|
|
35
|
+
* unfiltered=593334 — an exact non-round number, no saturation cap.)
|
|
36
|
+
* 2. Pagination is an OPAQUE cursor (`nextPageToken`). Terminal = token ABSENT
|
|
37
|
+
* (BOTH genuine-empty AND a single-complete-page omit it — live-verified
|
|
38
|
+
* progeria total=10/returned=10/no token). `nextCursor` is passed back
|
|
39
|
+
* VERBATIM as the `pageToken` argument (never fabricated/derived); a bad
|
|
40
|
+
* token loud-fails at HTTP 400 ⇒ getJson THROWS (never a silent-empty cursor).
|
|
41
|
+
* offset/nextOffset are null (meaningless for a cursor). CT's terminal is
|
|
42
|
+
* token-absent — there is NO GovInfo-style `"*"` sentinel.
|
|
43
|
+
* 3. An INVALID `funderType` SILENTLY returns `totalCount:0` at HTTP 200 (NOT a
|
|
44
|
+
* 400 — contrast a bad overallStatus / pageToken / aggFilters-KEY, which all
|
|
45
|
+
* 400). So `funderType` is a FROZEN 4-value enum ([M1] re-validated IN THE
|
|
46
|
+
* HANDLER, not only in Zod) — a non-member ⇒ invalid_input PRE-fetch, 0
|
|
47
|
+
* network call, NEVER passed through to be read as a genuine empty.
|
|
48
|
+
*
|
|
49
|
+
* ★ [M1] IN-HANDLER ENUM RE-GUARD: `funderType` AND `overallStatus` are re-checked
|
|
50
|
+
* against the frozen CT enum arrays INLINE in the search handler (throw
|
|
51
|
+
* invalid_input pre-fetch, 0 fetch) — closing the funderType silent fake-empty
|
|
52
|
+
* even on a Zod-BYPASSING direct handler call (mirror govinfo's in-handler
|
|
53
|
+
* collection re-check).
|
|
54
|
+
*
|
|
55
|
+
* ★ TOKENIZATION is AND-conjunctive for query.term/query.spons/query.cond, and CT
|
|
56
|
+
* splits on whitespace AND a PUNCTUATION set (NOT whitespace alone) — live-verified
|
|
57
|
+
* 2026-07-12: `query.spons=sanofi<delim>aventis` == the whitespace count (3) for
|
|
58
|
+
* space + `- , / ; + & | @ # =`; `. : _ '` do NOT split. So a single-token-LOOKING
|
|
59
|
+
* compound like "Sanofi-Aventis" is really 'Sanofi' AND 'Aventis' (→3 vs Sanofi
|
|
60
|
+
* →3416 — a ~1000× silent false-negative). A multi-TOKEN value (tokenized via the
|
|
61
|
+
* shared tokenizeForDisclosure / DISCLOSURE_SPLIT_RE, not just whitespace) fires a
|
|
62
|
+
* MANDATORY `_meta` AND-note (the mirror of NSF's OR-note, but AND); a multi-token
|
|
63
|
+
* sponsor SUPPRESSES the
|
|
64
|
+
* contradictory "matches more variants" broadening note (CT NARROWED, not broadened).
|
|
65
|
+
*
|
|
66
|
+
* ★ funderType facets OVERLAP (non-exclusive: nih+fed+industry+other sum >
|
|
67
|
+
* registry total) — a `_meta` note forbids summing them into a partition.
|
|
68
|
+
*
|
|
69
|
+
* ★ trial ≠ federal award (EVERY response): a registration is NOT an award;
|
|
70
|
+
* leadSponsor.name is FREE TEXT (not a UEI) → a NOMINAL name match only.
|
|
71
|
+
*/
|
|
72
|
+
import { num } from "./coerce.js";
|
|
73
|
+
import { type MetaBundle } from "./meta.js";
|
|
74
|
+
export { num };
|
|
75
|
+
export { tokenizeForDisclosure } from "./disclosure.js";
|
|
76
|
+
export declare const CT_STATUSES: readonly ["COMPLETED", "UNKNOWN", "RECRUITING", "TERMINATED", "NOT_YET_RECRUITING", "ACTIVE_NOT_RECRUITING", "WITHDRAWN", "ENROLLING_BY_INVITATION", "SUSPENDED", "WITHHELD", "NO_LONGER_AVAILABLE", "AVAILABLE", "APPROVED_FOR_MARKETING", "TEMPORARILY_NOT_AVAILABLE"];
|
|
77
|
+
export type CtStatus = (typeof CT_STATUSES)[number];
|
|
78
|
+
export declare const CT_FUNDER_TYPES: readonly ["nih", "fed", "industry", "other"];
|
|
79
|
+
export type CtFunderType = (typeof CT_FUNDER_TYPES)[number];
|
|
80
|
+
export declare const CT_FACET_FIELDS: readonly ["OverallStatus", "StudyType", "Phase", "LeadSponsorClass", "Sex", "DesignAllocation", "DesignPrimaryPurpose", "DesignInterventionModel", "DesignMasking", "DesignObservationalModel", "DesignTimePerspective"];
|
|
81
|
+
export type CtFacetField = (typeof CT_FACET_FIELDS)[number];
|
|
82
|
+
export declare const CT_FACET_ARRAY_FIELDS: ReadonlySet<string>;
|
|
83
|
+
export declare const CT_NCT_RE: RegExp;
|
|
84
|
+
export declare const CT_TOKEN_RE: RegExp;
|
|
85
|
+
export type CtEntity = {
|
|
86
|
+
name: string | null;
|
|
87
|
+
class: string | null;
|
|
88
|
+
};
|
|
89
|
+
export type ClinicalStudy = {
|
|
90
|
+
nctId: string | null;
|
|
91
|
+
briefTitle: string | null;
|
|
92
|
+
orgStudyId: string | null;
|
|
93
|
+
/** identificationModule.organization — the REGISTERING org. */
|
|
94
|
+
organization: CtEntity;
|
|
95
|
+
/** sponsorCollaboratorsModule.leadSponsor — class = the FUNDING SOURCE. */
|
|
96
|
+
leadSponsor: CtEntity;
|
|
97
|
+
/** sponsorCollaboratorsModule.collaborators[] — [] when none listed (honest). */
|
|
98
|
+
collaborators: CtEntity[];
|
|
99
|
+
/** leadSponsor.class promoted (NIH/FED = federally-funded; the B2G axis). */
|
|
100
|
+
fundingClass: string | null;
|
|
101
|
+
overallStatus: string | null;
|
|
102
|
+
startDate: string | null;
|
|
103
|
+
studyType: string | null;
|
|
104
|
+
phases: string[];
|
|
105
|
+
conditions: string[];
|
|
106
|
+
/** ONLY populated by clinicaltrials_get_study (search rows OMIT it — payload). */
|
|
107
|
+
briefSummary?: string | null;
|
|
108
|
+
};
|
|
109
|
+
export type CtSearchArgs = {
|
|
110
|
+
"query.term"?: string;
|
|
111
|
+
sponsor?: string;
|
|
112
|
+
condition?: string;
|
|
113
|
+
location?: string;
|
|
114
|
+
overallStatus?: CtStatus;
|
|
115
|
+
funderType?: CtFunderType;
|
|
116
|
+
pageSize?: number;
|
|
117
|
+
pageToken?: string;
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
* Search federally-registered clinical studies with sponsor / condition /
|
|
121
|
+
* location / status / funding-source filters. Each shipped filter is
|
|
122
|
+
* LIVE-CONFIRMED to narrow; the query is MODULE-BUILT from validated typed args
|
|
123
|
+
* through URLSearchParams (NO raw passthrough) with `countTotal=true` ALWAYS
|
|
124
|
+
* appended (§Honesty #1). Returns curated ENTITY rows (briefSummary EXCLUDED —
|
|
125
|
+
* payload) + honest `_meta`: the EXACT filtered total, the opaque-cursor
|
|
126
|
+
* continuation, the AND-tokenization disclosure, the funderType-overlap note, and
|
|
127
|
+
* the mandatory trial≠federal-award caveat. Disclose-not-refuse: an unscoped call
|
|
128
|
+
* is NOT refused — it returns the first page + the exact total + a narrowing note.
|
|
129
|
+
*/
|
|
130
|
+
export declare function searchStudies(args: CtSearchArgs): Promise<MetaBundle>;
|
|
131
|
+
/**
|
|
132
|
+
* Fetch ONE study by its NCT id; returns the fuller single record (entity fields
|
|
133
|
+
* + briefSummary). [M2] `nctId` is regex-validated `^NCT\d{8}$` BEFORE the path is
|
|
134
|
+
* built (a `../` / non-matching id ⇒ invalid_input, 0 fetch). A 404 (nonexistent
|
|
135
|
+
* NCT id) ⇒ honest found:false (never a fabricated study).
|
|
136
|
+
*/
|
|
137
|
+
export declare function getStudy(args: {
|
|
138
|
+
nctId: string;
|
|
139
|
+
}): Promise<MetaBundle>;
|
|
140
|
+
export type CtFacetValue = {
|
|
141
|
+
/** The enum value (str — null-never-empty-string). */
|
|
142
|
+
value: string | null;
|
|
143
|
+
/** The EXACT per-value study count (num — null-never-0; a non-number ⇒ drift). */
|
|
144
|
+
studiesCount: number | null;
|
|
145
|
+
};
|
|
146
|
+
export type CtFacet = {
|
|
147
|
+
/** The requested/echoed field name (the `piece`). */
|
|
148
|
+
field: string;
|
|
149
|
+
/** The dotted upstream JSON path (the `field`), e.g. protocolSection.statusModule.overallStatus. */
|
|
150
|
+
fieldPath: string | null;
|
|
151
|
+
/** The echoed upstream `type` (asserted "ENUM"; else drift). */
|
|
152
|
+
valueType: string | null;
|
|
153
|
+
/** Distinct values that exist upstream (num — non-number ⇒ drift). */
|
|
154
|
+
uniqueValuesCount: number | null;
|
|
155
|
+
/** Studies with NO value for this field (num — null-never-0). */
|
|
156
|
+
missingStudiesCount: number | null;
|
|
157
|
+
/** values.length (== uniqueValuesCount for a COMPLETE ENUM facet). */
|
|
158
|
+
returned: number;
|
|
159
|
+
/** returned < uniqueValuesCount (the 250-cap surface; never true for v1 ENUMs). */
|
|
160
|
+
truncated: boolean;
|
|
161
|
+
/** true for an ARRAY-valued field (Phase) — counts OVERLAP, must not be summed. */
|
|
162
|
+
overlapping: boolean;
|
|
163
|
+
/** The EXACT per-value distribution. */
|
|
164
|
+
values: CtFacetValue[];
|
|
165
|
+
};
|
|
166
|
+
export type CtFacetArgs = {
|
|
167
|
+
fields: string[];
|
|
168
|
+
};
|
|
169
|
+
/**
|
|
170
|
+
* Aggregate / statistical view: EXACT per-value study counts over the WHOLE
|
|
171
|
+
* ClinicalTrials.gov registry for one or more whitelisted ENUM fields
|
|
172
|
+
* (studies-by-OverallStatus / by-Phase / by-LeadSponsorClass = the funding-source
|
|
173
|
+
* distribution / …). The aggregate SIBLING of clinicaltrials_search_studies (which
|
|
174
|
+
* gives the exact FILTERED total for a query) — this gives the exact WHOLE-REGISTRY
|
|
175
|
+
* distribution across a field's values. Reuses the shipped getCT verbatim (one new
|
|
176
|
+
* path constant), coerce.num/str, buildMeta/withMeta — ZERO new fetch/coerce/error/
|
|
177
|
+
* meta code.
|
|
178
|
+
*/
|
|
179
|
+
export declare function facetCounts(args: CtFacetArgs): Promise<MetaBundle>;
|
|
180
|
+
//# sourceMappingURL=clinicaltrials.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clinicaltrials.d.ts","sourceRoot":"","sources":["../src/clinicaltrials.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsEG;AAIH,OAAO,EAAE,GAAG,EAAO,MAAM,aAAa,CAAC;AAEvC,OAAO,EAAY,KAAK,UAAU,EAAqB,MAAM,WAAW,CAAC;AAMzE,OAAO,EAAE,GAAG,EAAE,CAAC;AAMf,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAsBxD,eAAO,MAAM,WAAW,0QAed,CAAC;AACX,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAQpD,eAAO,MAAM,eAAe,8CAA+C,CAAC;AAC5E,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,eAAe,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