@tiangong-ai/cli 0.0.50 → 0.0.55
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/AGENTS.md +22 -2
- package/README.md +200 -7
- package/dist/cli.js +10 -1
- package/dist/cli.js.map +1 -1
- package/dist/data/builtins.d.ts +1 -0
- package/dist/data/builtins.js +40 -0
- package/dist/data/builtins.js.map +1 -0
- package/dist/data/catalog.d.ts +25 -0
- package/dist/data/catalog.js +305 -0
- package/dist/data/catalog.js.map +1 -0
- package/dist/data/commands.d.ts +9 -0
- package/dist/data/commands.js +307 -0
- package/dist/data/commands.js.map +1 -0
- package/dist/data/connectors/airnow-hourly-observations.d.ts +2 -0
- package/dist/data/connectors/airnow-hourly-observations.js +522 -0
- package/dist/data/connectors/airnow-hourly-observations.js.map +1 -0
- package/dist/data/connectors/airnow-hourly-observations.schemas.d.ts +299 -0
- package/dist/data/connectors/airnow-hourly-observations.schemas.js +188 -0
- package/dist/data/connectors/airnow-hourly-observations.schemas.js.map +1 -0
- package/dist/data/connectors/bluesky-public-posts.d.ts +2 -0
- package/dist/data/connectors/bluesky-public-posts.js +705 -0
- package/dist/data/connectors/bluesky-public-posts.js.map +1 -0
- package/dist/data/connectors/bluesky-public-posts.schemas.d.ts +733 -0
- package/dist/data/connectors/bluesky-public-posts.schemas.js +422 -0
- package/dist/data/connectors/bluesky-public-posts.schemas.js.map +1 -0
- package/dist/data/connectors/epa-eis-records.d.ts +2 -0
- package/dist/data/connectors/epa-eis-records.js +566 -0
- package/dist/data/connectors/epa-eis-records.js.map +1 -0
- package/dist/data/connectors/epa-eis-records.schemas.d.ts +199 -0
- package/dist/data/connectors/epa-eis-records.schemas.js +146 -0
- package/dist/data/connectors/epa-eis-records.schemas.js.map +1 -0
- package/dist/data/connectors/federal-register-documents.d.ts +2 -0
- package/dist/data/connectors/federal-register-documents.js +517 -0
- package/dist/data/connectors/federal-register-documents.js.map +1 -0
- package/dist/data/connectors/federal-register-documents.schemas.d.ts +357 -0
- package/dist/data/connectors/federal-register-documents.schemas.js +243 -0
- package/dist/data/connectors/federal-register-documents.schemas.js.map +1 -0
- package/dist/data/connectors/gdelt-doc-search.d.ts +2 -0
- package/dist/data/connectors/gdelt-doc-search.js +658 -0
- package/dist/data/connectors/gdelt-doc-search.js.map +1 -0
- package/dist/data/connectors/gdelt-doc-search.schemas.d.ts +446 -0
- package/dist/data/connectors/gdelt-doc-search.schemas.js +330 -0
- package/dist/data/connectors/gdelt-doc-search.schemas.js.map +1 -0
- package/dist/data/connectors/gdelt-file-feeds.d.ts +4 -0
- package/dist/data/connectors/gdelt-file-feeds.js +591 -0
- package/dist/data/connectors/gdelt-file-feeds.js.map +1 -0
- package/dist/data/connectors/gdelt-file-feeds.schemas.d.ts +40 -0
- package/dist/data/connectors/gdelt-file-feeds.schemas.js +256 -0
- package/dist/data/connectors/gdelt-file-feeds.schemas.js.map +1 -0
- package/dist/data/connectors/nasa-firms-fire.d.ts +2 -0
- package/dist/data/connectors/nasa-firms-fire.js +578 -0
- package/dist/data/connectors/nasa-firms-fire.js.map +1 -0
- package/dist/data/connectors/nasa-firms-fire.schemas.d.ts +369 -0
- package/dist/data/connectors/nasa-firms-fire.schemas.js +238 -0
- package/dist/data/connectors/nasa-firms-fire.schemas.js.map +1 -0
- package/dist/data/connectors/open-meteo-air-quality.d.ts +2 -0
- package/dist/data/connectors/open-meteo-air-quality.js +401 -0
- package/dist/data/connectors/open-meteo-air-quality.js.map +1 -0
- package/dist/data/connectors/open-meteo-air-quality.schemas.d.ts +335 -0
- package/dist/data/connectors/open-meteo-air-quality.schemas.js +225 -0
- package/dist/data/connectors/open-meteo-air-quality.schemas.js.map +1 -0
- package/dist/data/connectors/open-meteo-flood.d.ts +2 -0
- package/dist/data/connectors/open-meteo-flood.js +446 -0
- package/dist/data/connectors/open-meteo-flood.js.map +1 -0
- package/dist/data/connectors/open-meteo-flood.schemas.d.ts +388 -0
- package/dist/data/connectors/open-meteo-flood.schemas.js +227 -0
- package/dist/data/connectors/open-meteo-flood.schemas.js.map +1 -0
- package/dist/data/connectors/open-meteo-historical-weather.d.ts +2 -0
- package/dist/data/connectors/open-meteo-historical-weather.js +468 -0
- package/dist/data/connectors/open-meteo-historical-weather.js.map +1 -0
- package/dist/data/connectors/open-meteo-historical-weather.schemas.d.ts +420 -0
- package/dist/data/connectors/open-meteo-historical-weather.schemas.js +282 -0
- package/dist/data/connectors/open-meteo-historical-weather.schemas.js.map +1 -0
- package/dist/data/connectors/openaq-air-quality.d.ts +2 -0
- package/dist/data/connectors/openaq-air-quality.js +734 -0
- package/dist/data/connectors/openaq-air-quality.js.map +1 -0
- package/dist/data/connectors/openaq-air-quality.schemas.d.ts +1067 -0
- package/dist/data/connectors/openaq-air-quality.schemas.js +512 -0
- package/dist/data/connectors/openaq-air-quality.schemas.js.map +1 -0
- package/dist/data/connectors/regulations-gov-attachments.d.ts +2 -0
- package/dist/data/connectors/regulations-gov-attachments.js +486 -0
- package/dist/data/connectors/regulations-gov-attachments.js.map +1 -0
- package/dist/data/connectors/regulations-gov-attachments.schemas.d.ts +270 -0
- package/dist/data/connectors/regulations-gov-attachments.schemas.js +181 -0
- package/dist/data/connectors/regulations-gov-attachments.schemas.js.map +1 -0
- package/dist/data/connectors/regulations-gov-comments.d.ts +2 -0
- package/dist/data/connectors/regulations-gov-comments.js +718 -0
- package/dist/data/connectors/regulations-gov-comments.js.map +1 -0
- package/dist/data/connectors/regulations-gov-comments.schemas.d.ts +717 -0
- package/dist/data/connectors/regulations-gov-comments.schemas.js +389 -0
- package/dist/data/connectors/regulations-gov-comments.schemas.js.map +1 -0
- package/dist/data/connectors/usbr-project-records.d.ts +2 -0
- package/dist/data/connectors/usbr-project-records.js +467 -0
- package/dist/data/connectors/usbr-project-records.js.map +1 -0
- package/dist/data/connectors/usbr-project-records.schemas.d.ts +194 -0
- package/dist/data/connectors/usbr-project-records.schemas.js +137 -0
- package/dist/data/connectors/usbr-project-records.schemas.js.map +1 -0
- package/dist/data/connectors/usbr-rise.d.ts +2 -0
- package/dist/data/connectors/usbr-rise.js +625 -0
- package/dist/data/connectors/usbr-rise.js.map +1 -0
- package/dist/data/connectors/usbr-rise.schemas.d.ts +623 -0
- package/dist/data/connectors/usbr-rise.schemas.js +407 -0
- package/dist/data/connectors/usbr-rise.schemas.js.map +1 -0
- package/dist/data/connectors/usgs-water-instantaneous-values.d.ts +2 -0
- package/dist/data/connectors/usgs-water-instantaneous-values.js +521 -0
- package/dist/data/connectors/usgs-water-instantaneous-values.js.map +1 -0
- package/dist/data/connectors/usgs-water-instantaneous-values.schemas.d.ts +496 -0
- package/dist/data/connectors/usgs-water-instantaneous-values.schemas.js +309 -0
- package/dist/data/connectors/usgs-water-instantaneous-values.schemas.js.map +1 -0
- package/dist/data/connectors/youtube-public-content.d.ts +2 -0
- package/dist/data/connectors/youtube-public-content.js +974 -0
- package/dist/data/connectors/youtube-public-content.js.map +1 -0
- package/dist/data/connectors/youtube-public-content.schemas.d.ts +773 -0
- package/dist/data/connectors/youtube-public-content.schemas.js +567 -0
- package/dist/data/connectors/youtube-public-content.schemas.js.map +1 -0
- package/dist/data/contracts.d.ts +374 -0
- package/dist/data/contracts.js +10 -0
- package/dist/data/contracts.js.map +1 -0
- package/dist/data/runtime/artifacts.d.ts +6 -0
- package/dist/data/runtime/artifacts.js +103 -0
- package/dist/data/runtime/artifacts.js.map +1 -0
- package/dist/data/runtime/bounded-http.d.ts +10 -0
- package/dist/data/runtime/bounded-http.js +403 -0
- package/dist/data/runtime/bounded-http.js.map +1 -0
- package/dist/data/runtime/canonical-json.d.ts +3 -0
- package/dist/data/runtime/canonical-json.js +59 -0
- package/dist/data/runtime/canonical-json.js.map +1 -0
- package/dist/data/runtime/credentials.d.ts +14 -0
- package/dist/data/runtime/credentials.js +67 -0
- package/dist/data/runtime/credentials.js.map +1 -0
- package/dist/data/runtime/csv.d.ts +4 -0
- package/dist/data/runtime/csv.js +51 -0
- package/dist/data/runtime/csv.js.map +1 -0
- package/dist/data/runtime/errors.d.ts +22 -0
- package/dist/data/runtime/errors.js +101 -0
- package/dist/data/runtime/errors.js.map +1 -0
- package/dist/data/runtime/execute.d.ts +11 -0
- package/dist/data/runtime/execute.js +358 -0
- package/dist/data/runtime/execute.js.map +1 -0
- package/dist/data/runtime/receipts.d.ts +13 -0
- package/dist/data/runtime/receipts.js +38 -0
- package/dist/data/runtime/receipts.js.map +1 -0
- package/dist/data/schemas/catalog.v1.json +73 -0
- package/dist/data/schemas/core-receipt.v1.json +117 -0
- package/dist/data/schemas/describe.v1.json +24 -0
- package/dist/data/schemas/discovery.v1.json +130 -0
- package/dist/data/schemas/doctor.v1.json +40 -0
- package/dist/data/schemas/error.v1.json +48 -0
- package/dist/data/schemas/manifest.v1.json +174 -0
- package/dist/data/schemas/run-request.v1.json +37 -0
- package/dist/data/schemas/run-result.v1.json +77 -0
- package/dist/data/schemas.d.ts +27 -0
- package/dist/data/schemas.js +69 -0
- package/dist/data/schemas.js.map +1 -0
- package/dist/env.js.map +1 -1
- package/dist/errors.js.map +1 -1
- package/dist/http.js.map +1 -1
- package/dist/kb/config.js.map +1 -1
- package/dist/kb/pipeline-health.js.map +1 -1
- package/dist/research/orchestration.js +71 -11
- package/dist/research/orchestration.js.map +1 -1
- package/dist/research/workspace/acquisition.js +70 -5
- package/dist/research/workspace/acquisition.js.map +1 -1
- package/dist/research/workspace/audit-bundle.js +7 -2
- package/dist/research/workspace/audit-bundle.js.map +1 -1
- package/dist/research/workspace/broker.js.map +1 -1
- package/dist/research/workspace/constants.js.map +1 -1
- package/dist/research/workspace/credentials.d.ts +3 -0
- package/dist/research/workspace/credentials.js +20 -3
- package/dist/research/workspace/credentials.js.map +1 -1
- package/dist/research/workspace/data-evidence-adapter.d.ts +60 -0
- package/dist/research/workspace/data-evidence-adapter.js +314 -0
- package/dist/research/workspace/data-evidence-adapter.js.map +1 -0
- package/dist/research/workspace/discovery-status.js +10 -7
- package/dist/research/workspace/discovery-status.js.map +1 -1
- package/dist/research/workspace/discovery.js +12 -11
- package/dist/research/workspace/discovery.js.map +1 -1
- package/dist/research/workspace/evidence-ledger.d.ts +8 -1
- package/dist/research/workspace/evidence-ledger.js +46 -4
- package/dist/research/workspace/evidence-ledger.js.map +1 -1
- package/dist/research/workspace/evidence.d.ts +31 -0
- package/dist/research/workspace/evidence.js +77 -0
- package/dist/research/workspace/evidence.js.map +1 -1
- package/dist/research/workspace/executor.js.map +1 -1
- package/dist/research/workspace/external-skills.d.ts +49 -49
- package/dist/research/workspace/external-skills.js.map +1 -1
- package/dist/research/workspace/platform-capabilities.js.map +1 -1
- package/dist/research/workspace/preflight.d.ts +4 -4
- package/dist/research/workspace/preflight.js +33 -8
- package/dist/research/workspace/preflight.js.map +1 -1
- package/dist/research/workspace/projects.js +203 -76
- package/dist/research/workspace/projects.js.map +1 -1
- package/dist/research/workspace/publication.js.map +1 -1
- package/dist/research/workspace/research-policy-wizard.js.map +1 -1
- package/dist/research/workspace/research-policy.js.map +1 -1
- package/dist/research/workspace/runtime.d.ts +7 -0
- package/dist/research/workspace/runtime.js +82 -23
- package/dist/research/workspace/runtime.js.map +1 -1
- package/dist/research/workspace/sanitization.js.map +1 -1
- package/dist/research/workspace/schemas.js +1 -1
- package/dist/research/workspace/schemas.js.map +1 -1
- package/dist/research/workspace/scientific-design.js.map +1 -1
- package/dist/research/workspace/scientific-review.js.map +1 -1
- package/dist/research/workspace/setup-catalog.d.ts +9 -9
- package/dist/research/workspace/setup-catalog.js +2 -2
- package/dist/research/workspace/setup-catalog.js.map +1 -1
- package/dist/research/workspace/setup-declarative.js.map +1 -1
- package/dist/research/workspace/setup-instructions.d.ts +42 -0
- package/dist/research/workspace/setup-instructions.js +413 -0
- package/dist/research/workspace/setup-instructions.js.map +1 -0
- package/dist/research/workspace/setup-invocation.js.map +1 -1
- package/dist/research/workspace/setup-wizard.js +7 -0
- package/dist/research/workspace/setup-wizard.js.map +1 -1
- package/dist/research/workspace/setup.d.ts +18 -15
- package/dist/research/workspace/setup.js +68 -3
- package/dist/research/workspace/setup.js.map +1 -1
- package/dist/research/workspace/workspace.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
export declare const EPA_EIS_COMMON_SEARCHES: readonly ["lastWeek", "openComment", "last60Issued", "last30Published"];
|
|
2
|
+
export declare const EPA_EIS_RECORDS_INPUT_SCHEMA: {
|
|
3
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
4
|
+
readonly $id: "https://schemas.tiangong.ai/data/epa/eis-records-search-input.v1.json";
|
|
5
|
+
readonly type: "object";
|
|
6
|
+
readonly additionalProperties: false;
|
|
7
|
+
readonly properties: {
|
|
8
|
+
readonly commonSearches: {
|
|
9
|
+
readonly type: "array";
|
|
10
|
+
readonly minItems: 1;
|
|
11
|
+
readonly maxItems: 4;
|
|
12
|
+
readonly uniqueItems: true;
|
|
13
|
+
readonly description: "Official EPA EIS Database common-search pages to retrieve in caller order.";
|
|
14
|
+
readonly examples: readonly [readonly ["openComment", "last30Published"]];
|
|
15
|
+
readonly items: {
|
|
16
|
+
readonly enum: readonly ["lastWeek", "openComment", "last60Issued", "last30Published"];
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
readonly searchUrls: {
|
|
20
|
+
readonly type: "array";
|
|
21
|
+
readonly minItems: 1;
|
|
22
|
+
readonly maxItems: 10;
|
|
23
|
+
readonly uniqueItems: true;
|
|
24
|
+
readonly description: "Explicit HTTPS search URLs copied from the official cdxapps.epa.gov EIS Database UI; other origins and paths are rejected.";
|
|
25
|
+
readonly examples: readonly [readonly ["https://cdxapps.epa.gov/cdx-enepa-II/public/action/eis/search?search=Glen+Canyon&state=CO"]];
|
|
26
|
+
readonly items: {
|
|
27
|
+
readonly type: "string";
|
|
28
|
+
readonly minLength: 1;
|
|
29
|
+
readonly maxLength: 4096;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
export declare const EPA_EIS_RECORDS_OUTPUT_SCHEMA: {
|
|
35
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
36
|
+
readonly $id: "https://schemas.tiangong.ai/data/epa/eis-records-search-output.v1.json";
|
|
37
|
+
readonly type: "object";
|
|
38
|
+
readonly additionalProperties: false;
|
|
39
|
+
readonly required: readonly ["source", "query", "pages", "records", "stopReason"];
|
|
40
|
+
readonly properties: {
|
|
41
|
+
readonly source: {
|
|
42
|
+
readonly type: "object";
|
|
43
|
+
readonly additionalProperties: false;
|
|
44
|
+
readonly required: readonly ["providerId", "endpoint", "interpretationBoundary"];
|
|
45
|
+
readonly properties: {
|
|
46
|
+
readonly providerId: {
|
|
47
|
+
readonly const: "epa-eis-database";
|
|
48
|
+
};
|
|
49
|
+
readonly endpoint: {
|
|
50
|
+
readonly const: "/cdx-enepa-II/public/action/eis/search";
|
|
51
|
+
};
|
|
52
|
+
readonly interpretationBoundary: {
|
|
53
|
+
readonly type: "string";
|
|
54
|
+
readonly minLength: 1;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
readonly query: {
|
|
59
|
+
readonly type: "object";
|
|
60
|
+
readonly additionalProperties: false;
|
|
61
|
+
readonly required: readonly ["commonSearches", "searchUrls"];
|
|
62
|
+
readonly properties: {
|
|
63
|
+
readonly commonSearches: {
|
|
64
|
+
readonly type: "array";
|
|
65
|
+
readonly items: {
|
|
66
|
+
readonly enum: readonly ["lastWeek", "openComment", "last60Issued", "last30Published"];
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
readonly searchUrls: {
|
|
70
|
+
readonly type: "array";
|
|
71
|
+
readonly items: {
|
|
72
|
+
readonly type: "string";
|
|
73
|
+
readonly minLength: 1;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
readonly pages: {
|
|
79
|
+
readonly type: "array";
|
|
80
|
+
readonly items: {
|
|
81
|
+
readonly type: "object";
|
|
82
|
+
readonly additionalProperties: false;
|
|
83
|
+
readonly required: readonly ["searchNumber", "sourceKind", "commonSearch", "requestedUrl", "providerResultCount", "recordCount", "responseBytes", "responseDigest"];
|
|
84
|
+
readonly properties: {
|
|
85
|
+
readonly searchNumber: {
|
|
86
|
+
readonly type: "integer";
|
|
87
|
+
readonly minimum: 1;
|
|
88
|
+
};
|
|
89
|
+
readonly sourceKind: {
|
|
90
|
+
readonly enum: readonly ["common-search", "explicit-search-url"];
|
|
91
|
+
};
|
|
92
|
+
readonly commonSearch: {
|
|
93
|
+
readonly anyOf: readonly [{
|
|
94
|
+
readonly enum: readonly ["lastWeek", "openComment", "last60Issued", "last30Published"];
|
|
95
|
+
}, {
|
|
96
|
+
readonly type: "null";
|
|
97
|
+
}];
|
|
98
|
+
};
|
|
99
|
+
readonly requestedUrl: {
|
|
100
|
+
readonly type: "string";
|
|
101
|
+
readonly minLength: 1;
|
|
102
|
+
};
|
|
103
|
+
readonly providerResultCount: {
|
|
104
|
+
readonly type: readonly ["integer", "null"];
|
|
105
|
+
readonly minimum: 0;
|
|
106
|
+
};
|
|
107
|
+
readonly recordCount: {
|
|
108
|
+
readonly type: "integer";
|
|
109
|
+
readonly minimum: 0;
|
|
110
|
+
};
|
|
111
|
+
readonly responseBytes: {
|
|
112
|
+
readonly type: "integer";
|
|
113
|
+
readonly minimum: 0;
|
|
114
|
+
};
|
|
115
|
+
readonly responseDigest: {
|
|
116
|
+
readonly type: "string";
|
|
117
|
+
readonly pattern: "^[0-9a-f]{64}$";
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
readonly records: {
|
|
123
|
+
readonly type: "array";
|
|
124
|
+
readonly items: {
|
|
125
|
+
readonly type: "object";
|
|
126
|
+
readonly additionalProperties: false;
|
|
127
|
+
readonly required: readonly ["recordId", "title", "ceqNumber", "uniqueIdentificationNumber", "documentType", "epaCommentLetterDate", "federalRegisterDate", "leadAgency", "federalCooperatingAgencies", "state", "detailUrl", "downloadLinks", "downloadDocumentIds", "sourcePageUrl"];
|
|
128
|
+
readonly properties: {
|
|
129
|
+
readonly recordId: {
|
|
130
|
+
readonly type: "string";
|
|
131
|
+
readonly minLength: 1;
|
|
132
|
+
};
|
|
133
|
+
readonly title: {
|
|
134
|
+
readonly type: "string";
|
|
135
|
+
};
|
|
136
|
+
readonly ceqNumber: {
|
|
137
|
+
readonly type: readonly ["string", "null"];
|
|
138
|
+
};
|
|
139
|
+
readonly uniqueIdentificationNumber: {
|
|
140
|
+
readonly type: readonly ["string", "null"];
|
|
141
|
+
};
|
|
142
|
+
readonly documentType: {
|
|
143
|
+
readonly type: readonly ["string", "null"];
|
|
144
|
+
};
|
|
145
|
+
readonly epaCommentLetterDate: {
|
|
146
|
+
readonly type: readonly ["string", "null"];
|
|
147
|
+
};
|
|
148
|
+
readonly federalRegisterDate: {
|
|
149
|
+
readonly type: readonly ["string", "null"];
|
|
150
|
+
};
|
|
151
|
+
readonly leadAgency: {
|
|
152
|
+
readonly type: readonly ["string", "null"];
|
|
153
|
+
};
|
|
154
|
+
readonly federalCooperatingAgencies: {
|
|
155
|
+
readonly type: readonly ["string", "null"];
|
|
156
|
+
};
|
|
157
|
+
readonly state: {
|
|
158
|
+
readonly type: readonly ["string", "null"];
|
|
159
|
+
};
|
|
160
|
+
readonly detailUrl: {
|
|
161
|
+
readonly type: readonly ["string", "null"];
|
|
162
|
+
};
|
|
163
|
+
readonly downloadLinks: {
|
|
164
|
+
readonly type: "array";
|
|
165
|
+
readonly items: {
|
|
166
|
+
readonly type: "object";
|
|
167
|
+
readonly additionalProperties: false;
|
|
168
|
+
readonly required: readonly ["url", "text"];
|
|
169
|
+
readonly properties: {
|
|
170
|
+
readonly url: {
|
|
171
|
+
readonly type: "string";
|
|
172
|
+
readonly minLength: 1;
|
|
173
|
+
};
|
|
174
|
+
readonly text: {
|
|
175
|
+
readonly type: "string";
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
readonly downloadDocumentIds: {
|
|
181
|
+
readonly type: "array";
|
|
182
|
+
readonly uniqueItems: true;
|
|
183
|
+
readonly items: {
|
|
184
|
+
readonly type: "string";
|
|
185
|
+
readonly minLength: 1;
|
|
186
|
+
};
|
|
187
|
+
};
|
|
188
|
+
readonly sourcePageUrl: {
|
|
189
|
+
readonly type: "string";
|
|
190
|
+
readonly minLength: 1;
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
readonly stopReason: {
|
|
196
|
+
readonly enum: readonly ["completed", "no-results", "max-pages", "max-records", "partial"];
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
};
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
export const EPA_EIS_COMMON_SEARCHES = [
|
|
2
|
+
"lastWeek",
|
|
3
|
+
"openComment",
|
|
4
|
+
"last60Issued",
|
|
5
|
+
"last30Published",
|
|
6
|
+
];
|
|
7
|
+
export const EPA_EIS_RECORDS_INPUT_SCHEMA = {
|
|
8
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
9
|
+
$id: "https://schemas.tiangong.ai/data/epa/eis-records-search-input.v1.json",
|
|
10
|
+
type: "object",
|
|
11
|
+
additionalProperties: false,
|
|
12
|
+
properties: {
|
|
13
|
+
commonSearches: {
|
|
14
|
+
type: "array",
|
|
15
|
+
minItems: 1,
|
|
16
|
+
maxItems: 4,
|
|
17
|
+
uniqueItems: true,
|
|
18
|
+
description: "Official EPA EIS Database common-search pages to retrieve in caller order.",
|
|
19
|
+
examples: [["openComment", "last30Published"]],
|
|
20
|
+
items: { enum: EPA_EIS_COMMON_SEARCHES },
|
|
21
|
+
},
|
|
22
|
+
searchUrls: {
|
|
23
|
+
type: "array",
|
|
24
|
+
minItems: 1,
|
|
25
|
+
maxItems: 10,
|
|
26
|
+
uniqueItems: true,
|
|
27
|
+
description: "Explicit HTTPS search URLs copied from the official cdxapps.epa.gov EIS Database UI; other origins and paths are rejected.",
|
|
28
|
+
examples: [
|
|
29
|
+
[
|
|
30
|
+
"https://cdxapps.epa.gov/cdx-enepa-II/public/action/eis/search?search=Glen+Canyon&state=CO",
|
|
31
|
+
],
|
|
32
|
+
],
|
|
33
|
+
items: { type: "string", minLength: 1, maxLength: 4_096 },
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
const NULLABLE_STRING = { type: ["string", "null"] };
|
|
38
|
+
const DOWNLOAD_LINK_SCHEMA = {
|
|
39
|
+
type: "object",
|
|
40
|
+
additionalProperties: false,
|
|
41
|
+
required: ["url", "text"],
|
|
42
|
+
properties: {
|
|
43
|
+
url: { type: "string", minLength: 1 },
|
|
44
|
+
text: { type: "string" },
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
const RECORD_SCHEMA = {
|
|
48
|
+
type: "object",
|
|
49
|
+
additionalProperties: false,
|
|
50
|
+
required: [
|
|
51
|
+
"recordId",
|
|
52
|
+
"title",
|
|
53
|
+
"ceqNumber",
|
|
54
|
+
"uniqueIdentificationNumber",
|
|
55
|
+
"documentType",
|
|
56
|
+
"epaCommentLetterDate",
|
|
57
|
+
"federalRegisterDate",
|
|
58
|
+
"leadAgency",
|
|
59
|
+
"federalCooperatingAgencies",
|
|
60
|
+
"state",
|
|
61
|
+
"detailUrl",
|
|
62
|
+
"downloadLinks",
|
|
63
|
+
"downloadDocumentIds",
|
|
64
|
+
"sourcePageUrl",
|
|
65
|
+
],
|
|
66
|
+
properties: {
|
|
67
|
+
recordId: { type: "string", minLength: 1 },
|
|
68
|
+
title: { type: "string" },
|
|
69
|
+
ceqNumber: NULLABLE_STRING,
|
|
70
|
+
uniqueIdentificationNumber: NULLABLE_STRING,
|
|
71
|
+
documentType: NULLABLE_STRING,
|
|
72
|
+
epaCommentLetterDate: NULLABLE_STRING,
|
|
73
|
+
federalRegisterDate: NULLABLE_STRING,
|
|
74
|
+
leadAgency: NULLABLE_STRING,
|
|
75
|
+
federalCooperatingAgencies: NULLABLE_STRING,
|
|
76
|
+
state: NULLABLE_STRING,
|
|
77
|
+
detailUrl: NULLABLE_STRING,
|
|
78
|
+
downloadLinks: { type: "array", items: DOWNLOAD_LINK_SCHEMA },
|
|
79
|
+
downloadDocumentIds: {
|
|
80
|
+
type: "array",
|
|
81
|
+
uniqueItems: true,
|
|
82
|
+
items: { type: "string", minLength: 1 },
|
|
83
|
+
},
|
|
84
|
+
sourcePageUrl: { type: "string", minLength: 1 },
|
|
85
|
+
},
|
|
86
|
+
};
|
|
87
|
+
const PAGE_SCHEMA = {
|
|
88
|
+
type: "object",
|
|
89
|
+
additionalProperties: false,
|
|
90
|
+
required: [
|
|
91
|
+
"searchNumber",
|
|
92
|
+
"sourceKind",
|
|
93
|
+
"commonSearch",
|
|
94
|
+
"requestedUrl",
|
|
95
|
+
"providerResultCount",
|
|
96
|
+
"recordCount",
|
|
97
|
+
"responseBytes",
|
|
98
|
+
"responseDigest",
|
|
99
|
+
],
|
|
100
|
+
properties: {
|
|
101
|
+
searchNumber: { type: "integer", minimum: 1 },
|
|
102
|
+
sourceKind: { enum: ["common-search", "explicit-search-url"] },
|
|
103
|
+
commonSearch: {
|
|
104
|
+
anyOf: [{ enum: EPA_EIS_COMMON_SEARCHES }, { type: "null" }],
|
|
105
|
+
},
|
|
106
|
+
requestedUrl: { type: "string", minLength: 1 },
|
|
107
|
+
providerResultCount: { type: ["integer", "null"], minimum: 0 },
|
|
108
|
+
recordCount: { type: "integer", minimum: 0 },
|
|
109
|
+
responseBytes: { type: "integer", minimum: 0 },
|
|
110
|
+
responseDigest: { type: "string", pattern: "^[0-9a-f]{64}$" },
|
|
111
|
+
},
|
|
112
|
+
};
|
|
113
|
+
export const EPA_EIS_RECORDS_OUTPUT_SCHEMA = {
|
|
114
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
115
|
+
$id: "https://schemas.tiangong.ai/data/epa/eis-records-search-output.v1.json",
|
|
116
|
+
type: "object",
|
|
117
|
+
additionalProperties: false,
|
|
118
|
+
required: ["source", "query", "pages", "records", "stopReason"],
|
|
119
|
+
properties: {
|
|
120
|
+
source: {
|
|
121
|
+
type: "object",
|
|
122
|
+
additionalProperties: false,
|
|
123
|
+
required: ["providerId", "endpoint", "interpretationBoundary"],
|
|
124
|
+
properties: {
|
|
125
|
+
providerId: { const: "epa-eis-database" },
|
|
126
|
+
endpoint: { const: "/cdx-enepa-II/public/action/eis/search" },
|
|
127
|
+
interpretationBoundary: { type: "string", minLength: 1 },
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
query: {
|
|
131
|
+
type: "object",
|
|
132
|
+
additionalProperties: false,
|
|
133
|
+
required: ["commonSearches", "searchUrls"],
|
|
134
|
+
properties: {
|
|
135
|
+
commonSearches: { type: "array", items: { enum: EPA_EIS_COMMON_SEARCHES } },
|
|
136
|
+
searchUrls: { type: "array", items: { type: "string", minLength: 1 } },
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
pages: { type: "array", items: PAGE_SCHEMA },
|
|
140
|
+
records: { type: "array", items: RECORD_SCHEMA },
|
|
141
|
+
stopReason: {
|
|
142
|
+
enum: ["completed", "no-results", "max-pages", "max-records", "partial"],
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
};
|
|
146
|
+
//# sourceMappingURL=epa-eis-records.schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"epa-eis-records.schemas.js","sourceRoot":"","sources":["../../../src/data/connectors/epa-eis-records.schemas.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,UAAU;IACV,aAAa;IACb,cAAc;IACd,iBAAiB;CACT,CAAC;AAEX,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,OAAO,EAAE,8CAA8C;IACvD,GAAG,EAAE,uEAAuE;IAC5E,IAAI,EAAE,QAAQ;IACd,oBAAoB,EAAE,KAAK;IAC3B,UAAU,EAAE;QACV,cAA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