@tiangong-ai/cli 0.0.51 → 0.0.56
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 +171 -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 +54 -7
- package/dist/research/orchestration.js.map +1 -1
- 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 -2
- 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.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 +77 -20
- 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 +71 -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,194 @@
|
|
|
1
|
+
export declare const USBR_PROJECT_RECORDS_INPUT_SCHEMA: {
|
|
2
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
3
|
+
readonly $id: "https://schemas.tiangong.ai/data/usbr/project-records-fetch-input.v1.json";
|
|
4
|
+
readonly type: "object";
|
|
5
|
+
readonly additionalProperties: false;
|
|
6
|
+
readonly required: readonly ["urls"];
|
|
7
|
+
readonly properties: {
|
|
8
|
+
readonly urls: {
|
|
9
|
+
readonly type: "array";
|
|
10
|
+
readonly minItems: 1;
|
|
11
|
+
readonly maxItems: 10;
|
|
12
|
+
readonly uniqueItems: true;
|
|
13
|
+
readonly description: "Caller-ordered HTTPS project or program page URLs on the exact www.usbr.gov origin.";
|
|
14
|
+
readonly examples: readonly [readonly ["https://www.usbr.gov/uc/progact/amp/index.html", "https://www.usbr.gov/lc/region/programs/crbstudy.html"]];
|
|
15
|
+
readonly items: {
|
|
16
|
+
readonly type: "string";
|
|
17
|
+
readonly minLength: 1;
|
|
18
|
+
readonly maxLength: 4096;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
readonly maxLinkedRecordsPerPage: {
|
|
22
|
+
readonly type: "integer";
|
|
23
|
+
readonly minimum: 0;
|
|
24
|
+
readonly maximum: 100;
|
|
25
|
+
readonly description: "Maximum same-origin links to inventory from each supplied page, in document order; defaults to 50.";
|
|
26
|
+
readonly examples: readonly [25];
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export declare const USBR_PROJECT_RECORDS_OUTPUT_SCHEMA: {
|
|
31
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
32
|
+
readonly $id: "https://schemas.tiangong.ai/data/usbr/project-records-fetch-output.v1.json";
|
|
33
|
+
readonly type: "object";
|
|
34
|
+
readonly additionalProperties: false;
|
|
35
|
+
readonly required: readonly ["source", "query", "pages", "records", "stopReason"];
|
|
36
|
+
readonly properties: {
|
|
37
|
+
readonly source: {
|
|
38
|
+
readonly type: "object";
|
|
39
|
+
readonly additionalProperties: false;
|
|
40
|
+
readonly required: readonly ["providerId", "endpoint", "interpretationBoundary"];
|
|
41
|
+
readonly properties: {
|
|
42
|
+
readonly providerId: {
|
|
43
|
+
readonly const: "usbr-project-records";
|
|
44
|
+
};
|
|
45
|
+
readonly endpoint: {
|
|
46
|
+
readonly const: "https://www.usbr.gov";
|
|
47
|
+
};
|
|
48
|
+
readonly interpretationBoundary: {
|
|
49
|
+
readonly type: "string";
|
|
50
|
+
readonly minLength: 1;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
readonly query: {
|
|
55
|
+
readonly type: "object";
|
|
56
|
+
readonly additionalProperties: false;
|
|
57
|
+
readonly required: readonly ["urls", "maxLinkedRecordsPerPage"];
|
|
58
|
+
readonly properties: {
|
|
59
|
+
readonly urls: {
|
|
60
|
+
readonly type: "array";
|
|
61
|
+
readonly items: {
|
|
62
|
+
readonly type: "string";
|
|
63
|
+
readonly minLength: 1;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
readonly maxLinkedRecordsPerPage: {
|
|
67
|
+
readonly type: "integer";
|
|
68
|
+
readonly minimum: 0;
|
|
69
|
+
readonly maximum: 100;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
readonly pages: {
|
|
74
|
+
readonly type: "array";
|
|
75
|
+
readonly items: {
|
|
76
|
+
readonly type: "object";
|
|
77
|
+
readonly additionalProperties: false;
|
|
78
|
+
readonly required: readonly ["pageNumber", "url", "title", "linkCount", "recordCount", "responseBytes", "responseDigest"];
|
|
79
|
+
readonly properties: {
|
|
80
|
+
readonly pageNumber: {
|
|
81
|
+
readonly type: "integer";
|
|
82
|
+
readonly minimum: 1;
|
|
83
|
+
};
|
|
84
|
+
readonly url: {
|
|
85
|
+
readonly type: "string";
|
|
86
|
+
readonly minLength: 1;
|
|
87
|
+
};
|
|
88
|
+
readonly title: {
|
|
89
|
+
readonly type: "string";
|
|
90
|
+
};
|
|
91
|
+
readonly linkCount: {
|
|
92
|
+
readonly type: "integer";
|
|
93
|
+
readonly minimum: 0;
|
|
94
|
+
};
|
|
95
|
+
readonly recordCount: {
|
|
96
|
+
readonly type: "integer";
|
|
97
|
+
readonly minimum: 1;
|
|
98
|
+
};
|
|
99
|
+
readonly responseBytes: {
|
|
100
|
+
readonly type: "integer";
|
|
101
|
+
readonly minimum: 0;
|
|
102
|
+
};
|
|
103
|
+
readonly responseDigest: {
|
|
104
|
+
readonly type: "string";
|
|
105
|
+
readonly pattern: "^[0-9a-f]{64}$";
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
readonly records: {
|
|
111
|
+
readonly type: "array";
|
|
112
|
+
readonly items: {
|
|
113
|
+
readonly type: "object";
|
|
114
|
+
readonly additionalProperties: false;
|
|
115
|
+
readonly required: readonly ["recordId", "recordType", "title", "summary", "url", "documentUrl", "documentType", "sourcePageUrl", "linkIndex", "links", "contentSha256", "contentByteLength", "contentType", "lastModified", "etag"];
|
|
116
|
+
readonly properties: {
|
|
117
|
+
readonly recordId: {
|
|
118
|
+
readonly type: "string";
|
|
119
|
+
readonly minLength: 1;
|
|
120
|
+
};
|
|
121
|
+
readonly recordType: {
|
|
122
|
+
readonly enum: readonly ["project-page", "linked-document"];
|
|
123
|
+
};
|
|
124
|
+
readonly title: {
|
|
125
|
+
readonly type: "string";
|
|
126
|
+
};
|
|
127
|
+
readonly summary: {
|
|
128
|
+
readonly type: readonly ["string", "null"];
|
|
129
|
+
};
|
|
130
|
+
readonly url: {
|
|
131
|
+
readonly type: "string";
|
|
132
|
+
readonly minLength: 1;
|
|
133
|
+
};
|
|
134
|
+
readonly documentUrl: {
|
|
135
|
+
readonly type: "string";
|
|
136
|
+
readonly minLength: 1;
|
|
137
|
+
};
|
|
138
|
+
readonly documentType: {
|
|
139
|
+
readonly type: "string";
|
|
140
|
+
readonly minLength: 1;
|
|
141
|
+
};
|
|
142
|
+
readonly sourcePageUrl: {
|
|
143
|
+
readonly type: readonly ["string", "null"];
|
|
144
|
+
};
|
|
145
|
+
readonly linkIndex: {
|
|
146
|
+
readonly type: readonly ["integer", "null"];
|
|
147
|
+
readonly minimum: 0;
|
|
148
|
+
};
|
|
149
|
+
readonly links: {
|
|
150
|
+
readonly type: "array";
|
|
151
|
+
readonly items: {
|
|
152
|
+
readonly type: "object";
|
|
153
|
+
readonly additionalProperties: false;
|
|
154
|
+
readonly required: readonly ["url", "text"];
|
|
155
|
+
readonly properties: {
|
|
156
|
+
readonly url: {
|
|
157
|
+
readonly type: "string";
|
|
158
|
+
readonly minLength: 1;
|
|
159
|
+
};
|
|
160
|
+
readonly text: {
|
|
161
|
+
readonly type: "string";
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
readonly contentSha256: {
|
|
167
|
+
readonly anyOf: readonly [{
|
|
168
|
+
readonly type: "string";
|
|
169
|
+
readonly pattern: "^[0-9a-f]{64}$";
|
|
170
|
+
}, {
|
|
171
|
+
readonly type: "null";
|
|
172
|
+
}];
|
|
173
|
+
};
|
|
174
|
+
readonly contentByteLength: {
|
|
175
|
+
readonly type: readonly ["integer", "null"];
|
|
176
|
+
readonly minimum: 0;
|
|
177
|
+
};
|
|
178
|
+
readonly contentType: {
|
|
179
|
+
readonly type: readonly ["string", "null"];
|
|
180
|
+
};
|
|
181
|
+
readonly lastModified: {
|
|
182
|
+
readonly type: readonly ["string", "null"];
|
|
183
|
+
};
|
|
184
|
+
readonly etag: {
|
|
185
|
+
readonly type: readonly ["string", "null"];
|
|
186
|
+
};
|
|
187
|
+
};
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
readonly stopReason: {
|
|
191
|
+
readonly enum: readonly ["completed", "max-pages", "max-records", "max-linked-records", "partial"];
|
|
192
|
+
};
|
|
193
|
+
};
|
|
194
|
+
};
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
export const USBR_PROJECT_RECORDS_INPUT_SCHEMA = {
|
|
2
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
$id: "https://schemas.tiangong.ai/data/usbr/project-records-fetch-input.v1.json",
|
|
4
|
+
type: "object",
|
|
5
|
+
additionalProperties: false,
|
|
6
|
+
required: ["urls"],
|
|
7
|
+
properties: {
|
|
8
|
+
urls: {
|
|
9
|
+
type: "array",
|
|
10
|
+
minItems: 1,
|
|
11
|
+
maxItems: 10,
|
|
12
|
+
uniqueItems: true,
|
|
13
|
+
description: "Caller-ordered HTTPS project or program page URLs on the exact www.usbr.gov origin.",
|
|
14
|
+
examples: [
|
|
15
|
+
[
|
|
16
|
+
"https://www.usbr.gov/uc/progact/amp/index.html",
|
|
17
|
+
"https://www.usbr.gov/lc/region/programs/crbstudy.html",
|
|
18
|
+
],
|
|
19
|
+
],
|
|
20
|
+
items: { type: "string", minLength: 1, maxLength: 4_096 },
|
|
21
|
+
},
|
|
22
|
+
maxLinkedRecordsPerPage: {
|
|
23
|
+
type: "integer",
|
|
24
|
+
minimum: 0,
|
|
25
|
+
maximum: 100,
|
|
26
|
+
description: "Maximum same-origin links to inventory from each supplied page, in document order; defaults to 50.",
|
|
27
|
+
examples: [25],
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
const NULLABLE_STRING = { type: ["string", "null"] };
|
|
32
|
+
const NULLABLE_INTEGER = { type: ["integer", "null"], minimum: 0 };
|
|
33
|
+
const LINK_SCHEMA = {
|
|
34
|
+
type: "object",
|
|
35
|
+
additionalProperties: false,
|
|
36
|
+
required: ["url", "text"],
|
|
37
|
+
properties: {
|
|
38
|
+
url: { type: "string", minLength: 1 },
|
|
39
|
+
text: { type: "string" },
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
const RECORD_SCHEMA = {
|
|
43
|
+
type: "object",
|
|
44
|
+
additionalProperties: false,
|
|
45
|
+
required: [
|
|
46
|
+
"recordId",
|
|
47
|
+
"recordType",
|
|
48
|
+
"title",
|
|
49
|
+
"summary",
|
|
50
|
+
"url",
|
|
51
|
+
"documentUrl",
|
|
52
|
+
"documentType",
|
|
53
|
+
"sourcePageUrl",
|
|
54
|
+
"linkIndex",
|
|
55
|
+
"links",
|
|
56
|
+
"contentSha256",
|
|
57
|
+
"contentByteLength",
|
|
58
|
+
"contentType",
|
|
59
|
+
"lastModified",
|
|
60
|
+
"etag",
|
|
61
|
+
],
|
|
62
|
+
properties: {
|
|
63
|
+
recordId: { type: "string", minLength: 1 },
|
|
64
|
+
recordType: { enum: ["project-page", "linked-document"] },
|
|
65
|
+
title: { type: "string" },
|
|
66
|
+
summary: NULLABLE_STRING,
|
|
67
|
+
url: { type: "string", minLength: 1 },
|
|
68
|
+
documentUrl: { type: "string", minLength: 1 },
|
|
69
|
+
documentType: { type: "string", minLength: 1 },
|
|
70
|
+
sourcePageUrl: NULLABLE_STRING,
|
|
71
|
+
linkIndex: NULLABLE_INTEGER,
|
|
72
|
+
links: { type: "array", items: LINK_SCHEMA },
|
|
73
|
+
contentSha256: {
|
|
74
|
+
anyOf: [{ type: "string", pattern: "^[0-9a-f]{64}$" }, { type: "null" }],
|
|
75
|
+
},
|
|
76
|
+
contentByteLength: NULLABLE_INTEGER,
|
|
77
|
+
contentType: NULLABLE_STRING,
|
|
78
|
+
lastModified: NULLABLE_STRING,
|
|
79
|
+
etag: NULLABLE_STRING,
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
const PAGE_SCHEMA = {
|
|
83
|
+
type: "object",
|
|
84
|
+
additionalProperties: false,
|
|
85
|
+
required: [
|
|
86
|
+
"pageNumber",
|
|
87
|
+
"url",
|
|
88
|
+
"title",
|
|
89
|
+
"linkCount",
|
|
90
|
+
"recordCount",
|
|
91
|
+
"responseBytes",
|
|
92
|
+
"responseDigest",
|
|
93
|
+
],
|
|
94
|
+
properties: {
|
|
95
|
+
pageNumber: { type: "integer", minimum: 1 },
|
|
96
|
+
url: { type: "string", minLength: 1 },
|
|
97
|
+
title: { type: "string" },
|
|
98
|
+
linkCount: { type: "integer", minimum: 0 },
|
|
99
|
+
recordCount: { type: "integer", minimum: 1 },
|
|
100
|
+
responseBytes: { type: "integer", minimum: 0 },
|
|
101
|
+
responseDigest: { type: "string", pattern: "^[0-9a-f]{64}$" },
|
|
102
|
+
},
|
|
103
|
+
};
|
|
104
|
+
export const USBR_PROJECT_RECORDS_OUTPUT_SCHEMA = {
|
|
105
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
106
|
+
$id: "https://schemas.tiangong.ai/data/usbr/project-records-fetch-output.v1.json",
|
|
107
|
+
type: "object",
|
|
108
|
+
additionalProperties: false,
|
|
109
|
+
required: ["source", "query", "pages", "records", "stopReason"],
|
|
110
|
+
properties: {
|
|
111
|
+
source: {
|
|
112
|
+
type: "object",
|
|
113
|
+
additionalProperties: false,
|
|
114
|
+
required: ["providerId", "endpoint", "interpretationBoundary"],
|
|
115
|
+
properties: {
|
|
116
|
+
providerId: { const: "usbr-project-records" },
|
|
117
|
+
endpoint: { const: "https://www.usbr.gov" },
|
|
118
|
+
interpretationBoundary: { type: "string", minLength: 1 },
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
query: {
|
|
122
|
+
type: "object",
|
|
123
|
+
additionalProperties: false,
|
|
124
|
+
required: ["urls", "maxLinkedRecordsPerPage"],
|
|
125
|
+
properties: {
|
|
126
|
+
urls: { type: "array", items: { type: "string", minLength: 1 } },
|
|
127
|
+
maxLinkedRecordsPerPage: { type: "integer", minimum: 0, maximum: 100 },
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
pages: { type: "array", items: PAGE_SCHEMA },
|
|
131
|
+
records: { type: "array", items: RECORD_SCHEMA },
|
|
132
|
+
stopReason: {
|
|
133
|
+
enum: ["completed", "max-pages", "max-records", "max-linked-records", "partial"],
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
};
|
|
137
|
+
//# sourceMappingURL=usbr-project-records.schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usbr-project-records.schemas.js","sourceRoot":"","sources":["../../../src/data/connectors/usbr-project-records.schemas.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,iCAAiC,GAAG;IAC/C,OAAO,EAAE,8CAA8C;IACvD,GAAG,EAAE,2EAA2E;IAChF,IAAI,EAAE,QAAQ;IACd,oBAAoB,EAAE,KAAK;IAC3B,QAAQ,EAAE,CAAC,MAAM,CAAC;IAClB,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,CAAC;YACX,QAAQ,EAAE,EAAE;YACZ,WAAW,EAAE,IAAI;YACjB,WAAW,EACT,qFAAqF;YACvF,QAAQ,EAAE;gBACR;oBACE,gDAAgD;oBAChD,uDAAuD;iBACxD;aACF;YACD,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE;SAC1D;QACD,uBAAuB,EAAE;YACvB,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,CAAC;YACV,OAAO,EAAE,GAAG;YACZ,WAAW,EACT,oGAAoG;YACtG,QAAQ,EAAE,CAAC,EAAE,CAAC;SACf;KACF;CAC4B,CAAC;AAEhC,MAAM,eAAe,GAAG,EAAE,IAAI,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC,EAAW,CAAC;AAC9D,MAAM,gBAAgB,GAAG,EAAE,IAAI,EAAE,CAAC,SAAS,EAAE,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAW,CAAC;AAE5E,MAAM,WAAW,GAAG;IAClB,IAAI,EAAE,QAAQ;IACd,oBAAoB,EAAE,KAAK;IAC3B,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE;QACV,GAAG,EA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