@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,1067 @@
|
|
|
1
|
+
export declare const OPENAQ_LOCATION_SEARCH_INPUT_SCHEMA: {
|
|
2
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
3
|
+
readonly $id: "https://schemas.tiangong.ai/data/openaq/location-search-input.v1.json";
|
|
4
|
+
readonly type: "object";
|
|
5
|
+
readonly additionalProperties: false;
|
|
6
|
+
readonly properties: {
|
|
7
|
+
readonly countryCode: {
|
|
8
|
+
readonly type: "string";
|
|
9
|
+
readonly pattern: "^[A-Z]{2}$";
|
|
10
|
+
readonly description: "One ISO 3166-1 alpha-2 country code used to narrow locations.";
|
|
11
|
+
readonly examples: readonly ["NL"];
|
|
12
|
+
};
|
|
13
|
+
readonly countryIds: {
|
|
14
|
+
readonly type: "array";
|
|
15
|
+
readonly minItems: 1;
|
|
16
|
+
readonly maxItems: 25;
|
|
17
|
+
readonly uniqueItems: true;
|
|
18
|
+
readonly items: {
|
|
19
|
+
readonly type: "integer";
|
|
20
|
+
readonly minimum: 1;
|
|
21
|
+
};
|
|
22
|
+
readonly description: "One or more OpenAQ country IDs, normalized into ascending order.";
|
|
23
|
+
readonly examples: readonly [readonly [7]];
|
|
24
|
+
};
|
|
25
|
+
readonly providerIds: {
|
|
26
|
+
readonly type: "array";
|
|
27
|
+
readonly minItems: 1;
|
|
28
|
+
readonly maxItems: 25;
|
|
29
|
+
readonly uniqueItems: true;
|
|
30
|
+
readonly items: {
|
|
31
|
+
readonly type: "integer";
|
|
32
|
+
readonly minimum: 1;
|
|
33
|
+
};
|
|
34
|
+
readonly description: "One or more OpenAQ data-provider IDs, normalized into ascending order.";
|
|
35
|
+
readonly examples: readonly [readonly [51, 52]];
|
|
36
|
+
};
|
|
37
|
+
readonly parameterIds: {
|
|
38
|
+
readonly type: "array";
|
|
39
|
+
readonly minItems: 1;
|
|
40
|
+
readonly maxItems: 25;
|
|
41
|
+
readonly uniqueItems: true;
|
|
42
|
+
readonly items: {
|
|
43
|
+
readonly type: "integer";
|
|
44
|
+
readonly minimum: 1;
|
|
45
|
+
};
|
|
46
|
+
readonly description: "One or more OpenAQ pollutant or parameter IDs measured at the location.";
|
|
47
|
+
readonly examples: readonly [readonly [1, 2]];
|
|
48
|
+
};
|
|
49
|
+
readonly licenseIds: {
|
|
50
|
+
readonly type: "array";
|
|
51
|
+
readonly minItems: 1;
|
|
52
|
+
readonly maxItems: 25;
|
|
53
|
+
readonly uniqueItems: true;
|
|
54
|
+
readonly items: {
|
|
55
|
+
readonly type: "integer";
|
|
56
|
+
readonly minimum: 1;
|
|
57
|
+
};
|
|
58
|
+
readonly description: "One or more OpenAQ license IDs used to filter location data terms.";
|
|
59
|
+
readonly examples: readonly [readonly [81]];
|
|
60
|
+
};
|
|
61
|
+
readonly monitor: {
|
|
62
|
+
readonly type: "boolean";
|
|
63
|
+
readonly description: "Filter by OpenAQ's reference-monitor classification.";
|
|
64
|
+
readonly examples: readonly [true];
|
|
65
|
+
};
|
|
66
|
+
readonly mobile: {
|
|
67
|
+
readonly type: "boolean";
|
|
68
|
+
readonly description: "Filter mobile or stationary OpenAQ locations.";
|
|
69
|
+
readonly examples: readonly [false];
|
|
70
|
+
};
|
|
71
|
+
readonly center: {
|
|
72
|
+
readonly type: "object";
|
|
73
|
+
readonly additionalProperties: false;
|
|
74
|
+
readonly required: readonly ["latitude", "longitude", "radiusMeters"];
|
|
75
|
+
readonly description: "One WGS84 center and radius search. Do not combine it with boundingBox; OpenAQ limits the radius to 25 km.";
|
|
76
|
+
readonly examples: readonly [{
|
|
77
|
+
readonly latitude: 52.37;
|
|
78
|
+
readonly longitude: 4.9;
|
|
79
|
+
readonly radiusMeters: 5000;
|
|
80
|
+
}];
|
|
81
|
+
readonly properties: {
|
|
82
|
+
readonly latitude: {
|
|
83
|
+
readonly type: "number";
|
|
84
|
+
readonly minimum: -90;
|
|
85
|
+
readonly maximum: 90;
|
|
86
|
+
readonly description: "Center latitude in WGS84 decimal degrees.";
|
|
87
|
+
readonly examples: readonly [52.37];
|
|
88
|
+
};
|
|
89
|
+
readonly longitude: {
|
|
90
|
+
readonly type: "number";
|
|
91
|
+
readonly minimum: -180;
|
|
92
|
+
readonly maximum: 180;
|
|
93
|
+
readonly description: "Center longitude in WGS84 decimal degrees.";
|
|
94
|
+
readonly examples: readonly [4.9];
|
|
95
|
+
};
|
|
96
|
+
readonly radiusMeters: {
|
|
97
|
+
readonly type: "integer";
|
|
98
|
+
readonly minimum: 1;
|
|
99
|
+
readonly maximum: 25000;
|
|
100
|
+
readonly description: "Search radius in meters, capped by OpenAQ at 25,000.";
|
|
101
|
+
readonly examples: readonly [5000];
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
readonly boundingBox: {
|
|
106
|
+
readonly type: "object";
|
|
107
|
+
readonly additionalProperties: false;
|
|
108
|
+
readonly required: readonly ["west", "south", "east", "north"];
|
|
109
|
+
readonly description: "One non-antimeridian WGS84 bounding box. Do not combine it with center; the CLI rejects world-scale scans.";
|
|
110
|
+
readonly examples: readonly [{
|
|
111
|
+
readonly west: 4.7;
|
|
112
|
+
readonly south: 52.25;
|
|
113
|
+
readonly east: 5.05;
|
|
114
|
+
readonly north: 52.5;
|
|
115
|
+
}];
|
|
116
|
+
readonly properties: {
|
|
117
|
+
readonly west: {
|
|
118
|
+
readonly type: "number";
|
|
119
|
+
readonly minimum: -180;
|
|
120
|
+
readonly maximum: 180;
|
|
121
|
+
readonly description: "Western longitude; it must be lower than east.";
|
|
122
|
+
readonly examples: readonly [4.7];
|
|
123
|
+
};
|
|
124
|
+
readonly south: {
|
|
125
|
+
readonly type: "number";
|
|
126
|
+
readonly minimum: -90;
|
|
127
|
+
readonly maximum: 90;
|
|
128
|
+
readonly description: "Southern latitude; it must be lower than north.";
|
|
129
|
+
readonly examples: readonly [52.25];
|
|
130
|
+
};
|
|
131
|
+
readonly east: {
|
|
132
|
+
readonly type: "number";
|
|
133
|
+
readonly minimum: -180;
|
|
134
|
+
readonly maximum: 180;
|
|
135
|
+
readonly description: "Eastern longitude; it must be greater than west.";
|
|
136
|
+
readonly examples: readonly [5.05];
|
|
137
|
+
};
|
|
138
|
+
readonly north: {
|
|
139
|
+
readonly type: "number";
|
|
140
|
+
readonly minimum: -90;
|
|
141
|
+
readonly maximum: 90;
|
|
142
|
+
readonly description: "Northern latitude; it must be greater than south.";
|
|
143
|
+
readonly examples: readonly [52.5];
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
readonly pageSize: {
|
|
148
|
+
readonly type: "integer";
|
|
149
|
+
readonly minimum: 1;
|
|
150
|
+
readonly maximum: 1000;
|
|
151
|
+
readonly description: "Provider records requested per page; runtime page and record limits still bound the operation.";
|
|
152
|
+
readonly examples: readonly [250];
|
|
153
|
+
};
|
|
154
|
+
readonly sortOrder: {
|
|
155
|
+
readonly enum: readonly ["asc", "desc"];
|
|
156
|
+
readonly description: "Stable OpenAQ location-ID sort direction; defaults to ascending.";
|
|
157
|
+
readonly examples: readonly ["asc"];
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
export declare const OPENAQ_MEASUREMENT_INPUT_SCHEMA: {
|
|
162
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
163
|
+
readonly $id: "https://schemas.tiangong.ai/data/openaq/sensor-measurements-input.v1.json";
|
|
164
|
+
readonly type: "object";
|
|
165
|
+
readonly additionalProperties: false;
|
|
166
|
+
readonly required: readonly ["sensorId", "granularity", "startDateTime", "endDateTime"];
|
|
167
|
+
readonly properties: {
|
|
168
|
+
readonly sensorId: {
|
|
169
|
+
readonly type: "integer";
|
|
170
|
+
readonly minimum: 1;
|
|
171
|
+
readonly description: "One OpenAQ sensor ID obtained from search-locations or another trusted OpenAQ metadata lookup.";
|
|
172
|
+
readonly examples: readonly [1001];
|
|
173
|
+
};
|
|
174
|
+
readonly granularity: {
|
|
175
|
+
readonly enum: readonly ["raw", "hourly", "daily"];
|
|
176
|
+
readonly description: "raw returns upstream-reported measurements; hourly and daily use OpenAQ's preferred precomputed aggregates.";
|
|
177
|
+
readonly examples: readonly ["hourly"];
|
|
178
|
+
};
|
|
179
|
+
readonly startDateTime: {
|
|
180
|
+
readonly type: "string";
|
|
181
|
+
readonly pattern: "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[+-]\\d{2}:\\d{2})$";
|
|
182
|
+
readonly description: "Inclusive RFC3339 lower time bound. Together with endDateTime, the window may not exceed 366 days.";
|
|
183
|
+
readonly examples: readonly ["2026-03-01T00:00:00Z"];
|
|
184
|
+
};
|
|
185
|
+
readonly endDateTime: {
|
|
186
|
+
readonly type: "string";
|
|
187
|
+
readonly pattern: "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[+-]\\d{2}:\\d{2})$";
|
|
188
|
+
readonly description: "Inclusive RFC3339 upper time bound. It must not precede startDateTime.";
|
|
189
|
+
readonly examples: readonly ["2026-03-07T23:59:59Z"];
|
|
190
|
+
};
|
|
191
|
+
readonly pageSize: {
|
|
192
|
+
readonly type: "integer";
|
|
193
|
+
readonly minimum: 1;
|
|
194
|
+
readonly maximum: 1000;
|
|
195
|
+
readonly description: "Provider records requested per page; runtime page and record limits still bound the operation.";
|
|
196
|
+
readonly examples: readonly [1000];
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
export declare const OPENAQ_LOCATION_SEARCH_OUTPUT_SCHEMA: {
|
|
201
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
202
|
+
readonly $id: "https://schemas.tiangong.ai/data/openaq/location-search-output.v1.json";
|
|
203
|
+
readonly type: "object";
|
|
204
|
+
readonly additionalProperties: false;
|
|
205
|
+
readonly required: readonly ["source", "query", "provider", "pages", "records", "stopReason"];
|
|
206
|
+
readonly properties: {
|
|
207
|
+
readonly source: {
|
|
208
|
+
readonly type: "object";
|
|
209
|
+
readonly additionalProperties: false;
|
|
210
|
+
readonly required: readonly ["providerId", "service", "apiVersion", "sourceSpecificTerms"];
|
|
211
|
+
readonly properties: {
|
|
212
|
+
readonly providerId: {
|
|
213
|
+
readonly const: "openaq";
|
|
214
|
+
};
|
|
215
|
+
readonly service: {
|
|
216
|
+
readonly const: "OpenAQ API";
|
|
217
|
+
};
|
|
218
|
+
readonly apiVersion: {
|
|
219
|
+
readonly const: "v3";
|
|
220
|
+
};
|
|
221
|
+
readonly sourceSpecificTerms: {
|
|
222
|
+
readonly const: true;
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
readonly query: {
|
|
227
|
+
readonly type: "object";
|
|
228
|
+
readonly additionalProperties: false;
|
|
229
|
+
readonly required: readonly ["countryCode", "countryIds", "providerIds", "parameterIds", "licenseIds", "monitor", "mobile", "center", "boundingBox", "pageSize", "sortOrder"];
|
|
230
|
+
readonly properties: {
|
|
231
|
+
readonly countryCode: {
|
|
232
|
+
readonly anyOf: readonly [{
|
|
233
|
+
readonly type: "string";
|
|
234
|
+
}, {
|
|
235
|
+
readonly type: "null";
|
|
236
|
+
}];
|
|
237
|
+
};
|
|
238
|
+
readonly countryIds: {
|
|
239
|
+
readonly type: "array";
|
|
240
|
+
readonly maxItems: 25;
|
|
241
|
+
readonly uniqueItems: true;
|
|
242
|
+
readonly items: {
|
|
243
|
+
readonly type: "integer";
|
|
244
|
+
readonly minimum: 1;
|
|
245
|
+
};
|
|
246
|
+
readonly minItems: 0;
|
|
247
|
+
};
|
|
248
|
+
readonly providerIds: {
|
|
249
|
+
readonly type: "array";
|
|
250
|
+
readonly maxItems: 25;
|
|
251
|
+
readonly uniqueItems: true;
|
|
252
|
+
readonly items: {
|
|
253
|
+
readonly type: "integer";
|
|
254
|
+
readonly minimum: 1;
|
|
255
|
+
};
|
|
256
|
+
readonly minItems: 0;
|
|
257
|
+
};
|
|
258
|
+
readonly parameterIds: {
|
|
259
|
+
readonly type: "array";
|
|
260
|
+
readonly maxItems: 25;
|
|
261
|
+
readonly uniqueItems: true;
|
|
262
|
+
readonly items: {
|
|
263
|
+
readonly type: "integer";
|
|
264
|
+
readonly minimum: 1;
|
|
265
|
+
};
|
|
266
|
+
readonly minItems: 0;
|
|
267
|
+
};
|
|
268
|
+
readonly licenseIds: {
|
|
269
|
+
readonly type: "array";
|
|
270
|
+
readonly maxItems: 25;
|
|
271
|
+
readonly uniqueItems: true;
|
|
272
|
+
readonly items: {
|
|
273
|
+
readonly type: "integer";
|
|
274
|
+
readonly minimum: 1;
|
|
275
|
+
};
|
|
276
|
+
readonly minItems: 0;
|
|
277
|
+
};
|
|
278
|
+
readonly monitor: {
|
|
279
|
+
readonly anyOf: readonly [{
|
|
280
|
+
readonly type: "boolean";
|
|
281
|
+
}, {
|
|
282
|
+
readonly type: "null";
|
|
283
|
+
}];
|
|
284
|
+
};
|
|
285
|
+
readonly mobile: {
|
|
286
|
+
readonly anyOf: readonly [{
|
|
287
|
+
readonly type: "boolean";
|
|
288
|
+
}, {
|
|
289
|
+
readonly type: "null";
|
|
290
|
+
}];
|
|
291
|
+
};
|
|
292
|
+
readonly center: {
|
|
293
|
+
readonly anyOf: readonly [{
|
|
294
|
+
readonly type: "object";
|
|
295
|
+
readonly additionalProperties: false;
|
|
296
|
+
readonly required: readonly ["latitude", "longitude", "radiusMeters"];
|
|
297
|
+
readonly description: "One WGS84 center and radius search. Do not combine it with boundingBox; OpenAQ limits the radius to 25 km.";
|
|
298
|
+
readonly examples: readonly [{
|
|
299
|
+
readonly latitude: 52.37;
|
|
300
|
+
readonly longitude: 4.9;
|
|
301
|
+
readonly radiusMeters: 5000;
|
|
302
|
+
}];
|
|
303
|
+
readonly properties: {
|
|
304
|
+
readonly latitude: {
|
|
305
|
+
readonly type: "number";
|
|
306
|
+
readonly minimum: -90;
|
|
307
|
+
readonly maximum: 90;
|
|
308
|
+
readonly description: "Center latitude in WGS84 decimal degrees.";
|
|
309
|
+
readonly examples: readonly [52.37];
|
|
310
|
+
};
|
|
311
|
+
readonly longitude: {
|
|
312
|
+
readonly type: "number";
|
|
313
|
+
readonly minimum: -180;
|
|
314
|
+
readonly maximum: 180;
|
|
315
|
+
readonly description: "Center longitude in WGS84 decimal degrees.";
|
|
316
|
+
readonly examples: readonly [4.9];
|
|
317
|
+
};
|
|
318
|
+
readonly radiusMeters: {
|
|
319
|
+
readonly type: "integer";
|
|
320
|
+
readonly minimum: 1;
|
|
321
|
+
readonly maximum: 25000;
|
|
322
|
+
readonly description: "Search radius in meters, capped by OpenAQ at 25,000.";
|
|
323
|
+
readonly examples: readonly [5000];
|
|
324
|
+
};
|
|
325
|
+
};
|
|
326
|
+
}, {
|
|
327
|
+
readonly type: "null";
|
|
328
|
+
}];
|
|
329
|
+
};
|
|
330
|
+
readonly boundingBox: {
|
|
331
|
+
readonly anyOf: readonly [{
|
|
332
|
+
readonly type: "object";
|
|
333
|
+
readonly additionalProperties: false;
|
|
334
|
+
readonly required: readonly ["west", "south", "east", "north"];
|
|
335
|
+
readonly description: "One non-antimeridian WGS84 bounding box. Do not combine it with center; the CLI rejects world-scale scans.";
|
|
336
|
+
readonly examples: readonly [{
|
|
337
|
+
readonly west: 4.7;
|
|
338
|
+
readonly south: 52.25;
|
|
339
|
+
readonly east: 5.05;
|
|
340
|
+
readonly north: 52.5;
|
|
341
|
+
}];
|
|
342
|
+
readonly properties: {
|
|
343
|
+
readonly west: {
|
|
344
|
+
readonly type: "number";
|
|
345
|
+
readonly minimum: -180;
|
|
346
|
+
readonly maximum: 180;
|
|
347
|
+
readonly description: "Western longitude; it must be lower than east.";
|
|
348
|
+
readonly examples: readonly [4.7];
|
|
349
|
+
};
|
|
350
|
+
readonly south: {
|
|
351
|
+
readonly type: "number";
|
|
352
|
+
readonly minimum: -90;
|
|
353
|
+
readonly maximum: 90;
|
|
354
|
+
readonly description: "Southern latitude; it must be lower than north.";
|
|
355
|
+
readonly examples: readonly [52.25];
|
|
356
|
+
};
|
|
357
|
+
readonly east: {
|
|
358
|
+
readonly type: "number";
|
|
359
|
+
readonly minimum: -180;
|
|
360
|
+
readonly maximum: 180;
|
|
361
|
+
readonly description: "Eastern longitude; it must be greater than west.";
|
|
362
|
+
readonly examples: readonly [5.05];
|
|
363
|
+
};
|
|
364
|
+
readonly north: {
|
|
365
|
+
readonly type: "number";
|
|
366
|
+
readonly minimum: -90;
|
|
367
|
+
readonly maximum: 90;
|
|
368
|
+
readonly description: "Northern latitude; it must be greater than south.";
|
|
369
|
+
readonly examples: readonly [52.5];
|
|
370
|
+
};
|
|
371
|
+
};
|
|
372
|
+
}, {
|
|
373
|
+
readonly type: "null";
|
|
374
|
+
}];
|
|
375
|
+
};
|
|
376
|
+
readonly pageSize: {
|
|
377
|
+
readonly type: "integer";
|
|
378
|
+
readonly minimum: 1;
|
|
379
|
+
readonly maximum: 1000;
|
|
380
|
+
};
|
|
381
|
+
readonly sortOrder: {
|
|
382
|
+
readonly enum: readonly ["asc", "desc"];
|
|
383
|
+
};
|
|
384
|
+
};
|
|
385
|
+
};
|
|
386
|
+
readonly provider: {
|
|
387
|
+
readonly type: "object";
|
|
388
|
+
readonly additionalProperties: false;
|
|
389
|
+
readonly required: readonly ["name", "website", "found"];
|
|
390
|
+
readonly properties: {
|
|
391
|
+
readonly name: {
|
|
392
|
+
readonly const: "openaq-api";
|
|
393
|
+
};
|
|
394
|
+
readonly website: {
|
|
395
|
+
readonly type: "string";
|
|
396
|
+
};
|
|
397
|
+
readonly found: {
|
|
398
|
+
readonly anyOf: readonly [{
|
|
399
|
+
readonly type: "integer";
|
|
400
|
+
readonly minimum: 0;
|
|
401
|
+
}, {
|
|
402
|
+
readonly type: "string";
|
|
403
|
+
}, {
|
|
404
|
+
readonly type: "null";
|
|
405
|
+
}];
|
|
406
|
+
};
|
|
407
|
+
};
|
|
408
|
+
};
|
|
409
|
+
readonly pages: {
|
|
410
|
+
readonly type: "array";
|
|
411
|
+
readonly maxItems: 10;
|
|
412
|
+
readonly items: {
|
|
413
|
+
readonly type: "object";
|
|
414
|
+
readonly additionalProperties: false;
|
|
415
|
+
readonly required: readonly ["pageNumber", "inputRecords", "emittedRecords"];
|
|
416
|
+
readonly properties: {
|
|
417
|
+
readonly pageNumber: {
|
|
418
|
+
readonly type: "integer";
|
|
419
|
+
readonly minimum: 1;
|
|
420
|
+
};
|
|
421
|
+
readonly inputRecords: {
|
|
422
|
+
readonly type: "integer";
|
|
423
|
+
readonly minimum: 0;
|
|
424
|
+
};
|
|
425
|
+
readonly emittedRecords: {
|
|
426
|
+
readonly type: "integer";
|
|
427
|
+
readonly minimum: 0;
|
|
428
|
+
};
|
|
429
|
+
};
|
|
430
|
+
};
|
|
431
|
+
};
|
|
432
|
+
readonly records: {
|
|
433
|
+
readonly type: "array";
|
|
434
|
+
readonly maxItems: 10000;
|
|
435
|
+
readonly items: {
|
|
436
|
+
readonly type: "object";
|
|
437
|
+
readonly additionalProperties: false;
|
|
438
|
+
readonly required: readonly ["recordIndex", "sourcePageNumber", "locationId", "name", "locality", "timezone", "country", "owner", "provider", "isMobile", "isMonitor", "coordinates", "bounds", "distanceMeters", "datetimeFirstUtc", "datetimeLastUtc", "instruments", "sensors", "licenses"];
|
|
439
|
+
readonly properties: {
|
|
440
|
+
readonly recordIndex: {
|
|
441
|
+
readonly type: "integer";
|
|
442
|
+
readonly minimum: 0;
|
|
443
|
+
};
|
|
444
|
+
readonly sourcePageNumber: {
|
|
445
|
+
readonly type: "integer";
|
|
446
|
+
readonly minimum: 1;
|
|
447
|
+
};
|
|
448
|
+
readonly locationId: {
|
|
449
|
+
readonly type: "integer";
|
|
450
|
+
readonly minimum: 1;
|
|
451
|
+
};
|
|
452
|
+
readonly name: {
|
|
453
|
+
readonly anyOf: readonly [{
|
|
454
|
+
readonly type: "string";
|
|
455
|
+
}, {
|
|
456
|
+
readonly type: "null";
|
|
457
|
+
}];
|
|
458
|
+
};
|
|
459
|
+
readonly locality: {
|
|
460
|
+
readonly anyOf: readonly [{
|
|
461
|
+
readonly type: "string";
|
|
462
|
+
}, {
|
|
463
|
+
readonly type: "null";
|
|
464
|
+
}];
|
|
465
|
+
};
|
|
466
|
+
readonly timezone: {
|
|
467
|
+
readonly type: "string";
|
|
468
|
+
readonly minLength: 1;
|
|
469
|
+
};
|
|
470
|
+
readonly country: {
|
|
471
|
+
readonly type: "object";
|
|
472
|
+
readonly additionalProperties: false;
|
|
473
|
+
readonly required: readonly ["id", "code", "name"];
|
|
474
|
+
readonly properties: {
|
|
475
|
+
readonly id: {
|
|
476
|
+
readonly anyOf: readonly [{
|
|
477
|
+
readonly type: "integer";
|
|
478
|
+
readonly minimum: 1;
|
|
479
|
+
}, {
|
|
480
|
+
readonly type: "null";
|
|
481
|
+
}];
|
|
482
|
+
};
|
|
483
|
+
readonly code: {
|
|
484
|
+
readonly type: "string";
|
|
485
|
+
readonly minLength: 2;
|
|
486
|
+
};
|
|
487
|
+
readonly name: {
|
|
488
|
+
readonly type: "string";
|
|
489
|
+
readonly minLength: 1;
|
|
490
|
+
};
|
|
491
|
+
};
|
|
492
|
+
};
|
|
493
|
+
readonly owner: {
|
|
494
|
+
readonly type: "object";
|
|
495
|
+
readonly additionalProperties: false;
|
|
496
|
+
readonly required: readonly ["id", "name"];
|
|
497
|
+
readonly properties: {
|
|
498
|
+
readonly id: {
|
|
499
|
+
readonly type: "integer";
|
|
500
|
+
readonly minimum: 1;
|
|
501
|
+
};
|
|
502
|
+
readonly name: {
|
|
503
|
+
readonly type: "string";
|
|
504
|
+
readonly minLength: 1;
|
|
505
|
+
};
|
|
506
|
+
};
|
|
507
|
+
};
|
|
508
|
+
readonly provider: {
|
|
509
|
+
readonly type: "object";
|
|
510
|
+
readonly additionalProperties: false;
|
|
511
|
+
readonly required: readonly ["id", "name"];
|
|
512
|
+
readonly properties: {
|
|
513
|
+
readonly id: {
|
|
514
|
+
readonly type: "integer";
|
|
515
|
+
readonly minimum: 1;
|
|
516
|
+
};
|
|
517
|
+
readonly name: {
|
|
518
|
+
readonly type: "string";
|
|
519
|
+
readonly minLength: 1;
|
|
520
|
+
};
|
|
521
|
+
};
|
|
522
|
+
};
|
|
523
|
+
readonly isMobile: {
|
|
524
|
+
readonly type: "boolean";
|
|
525
|
+
};
|
|
526
|
+
readonly isMonitor: {
|
|
527
|
+
readonly type: "boolean";
|
|
528
|
+
};
|
|
529
|
+
readonly coordinates: {
|
|
530
|
+
readonly anyOf: readonly [{
|
|
531
|
+
readonly type: "object";
|
|
532
|
+
readonly additionalProperties: false;
|
|
533
|
+
readonly required: readonly ["latitude", "longitude"];
|
|
534
|
+
readonly properties: {
|
|
535
|
+
readonly latitude: {
|
|
536
|
+
readonly anyOf: readonly [{
|
|
537
|
+
readonly type: "number";
|
|
538
|
+
readonly minimum: -90;
|
|
539
|
+
readonly maximum: 90;
|
|
540
|
+
}, {
|
|
541
|
+
readonly type: "null";
|
|
542
|
+
}];
|
|
543
|
+
};
|
|
544
|
+
readonly longitude: {
|
|
545
|
+
readonly anyOf: readonly [{
|
|
546
|
+
readonly type: "number";
|
|
547
|
+
readonly minimum: -180;
|
|
548
|
+
readonly maximum: 180;
|
|
549
|
+
}, {
|
|
550
|
+
readonly type: "null";
|
|
551
|
+
}];
|
|
552
|
+
};
|
|
553
|
+
};
|
|
554
|
+
}, {
|
|
555
|
+
readonly type: "null";
|
|
556
|
+
}];
|
|
557
|
+
};
|
|
558
|
+
readonly bounds: {
|
|
559
|
+
readonly type: "array";
|
|
560
|
+
readonly minItems: 4;
|
|
561
|
+
readonly maxItems: 4;
|
|
562
|
+
readonly items: {
|
|
563
|
+
readonly type: "number";
|
|
564
|
+
};
|
|
565
|
+
};
|
|
566
|
+
readonly distanceMeters: {
|
|
567
|
+
readonly anyOf: readonly [{
|
|
568
|
+
readonly type: "number";
|
|
569
|
+
}, {
|
|
570
|
+
readonly type: "null";
|
|
571
|
+
}];
|
|
572
|
+
};
|
|
573
|
+
readonly datetimeFirstUtc: {
|
|
574
|
+
readonly anyOf: readonly [{
|
|
575
|
+
readonly type: "string";
|
|
576
|
+
readonly pattern: "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[+-]\\d{2}:\\d{2})$";
|
|
577
|
+
}, {
|
|
578
|
+
readonly type: "null";
|
|
579
|
+
}];
|
|
580
|
+
};
|
|
581
|
+
readonly datetimeLastUtc: {
|
|
582
|
+
readonly anyOf: readonly [{
|
|
583
|
+
readonly type: "string";
|
|
584
|
+
readonly pattern: "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[+-]\\d{2}:\\d{2})$";
|
|
585
|
+
}, {
|
|
586
|
+
readonly type: "null";
|
|
587
|
+
}];
|
|
588
|
+
};
|
|
589
|
+
readonly instruments: {
|
|
590
|
+
readonly type: "array";
|
|
591
|
+
readonly items: {
|
|
592
|
+
readonly type: "object";
|
|
593
|
+
readonly additionalProperties: false;
|
|
594
|
+
readonly required: readonly ["id", "name"];
|
|
595
|
+
readonly properties: {
|
|
596
|
+
readonly id: {
|
|
597
|
+
readonly type: "integer";
|
|
598
|
+
readonly minimum: 1;
|
|
599
|
+
};
|
|
600
|
+
readonly name: {
|
|
601
|
+
readonly type: "string";
|
|
602
|
+
readonly minLength: 1;
|
|
603
|
+
};
|
|
604
|
+
};
|
|
605
|
+
};
|
|
606
|
+
};
|
|
607
|
+
readonly sensors: {
|
|
608
|
+
readonly type: "array";
|
|
609
|
+
readonly items: {
|
|
610
|
+
readonly type: "object";
|
|
611
|
+
readonly additionalProperties: false;
|
|
612
|
+
readonly required: readonly ["id", "name", "parameter"];
|
|
613
|
+
readonly properties: {
|
|
614
|
+
readonly id: {
|
|
615
|
+
readonly type: "integer";
|
|
616
|
+
readonly minimum: 1;
|
|
617
|
+
};
|
|
618
|
+
readonly name: {
|
|
619
|
+
readonly type: "string";
|
|
620
|
+
readonly minLength: 1;
|
|
621
|
+
};
|
|
622
|
+
readonly parameter: {
|
|
623
|
+
readonly type: "object";
|
|
624
|
+
readonly additionalProperties: false;
|
|
625
|
+
readonly required: readonly ["id", "name", "units", "displayName"];
|
|
626
|
+
readonly properties: {
|
|
627
|
+
readonly id: {
|
|
628
|
+
readonly type: "integer";
|
|
629
|
+
readonly minimum: 1;
|
|
630
|
+
};
|
|
631
|
+
readonly name: {
|
|
632
|
+
readonly type: "string";
|
|
633
|
+
readonly minLength: 1;
|
|
634
|
+
};
|
|
635
|
+
readonly units: {
|
|
636
|
+
readonly type: "string";
|
|
637
|
+
readonly minLength: 1;
|
|
638
|
+
};
|
|
639
|
+
readonly displayName: {
|
|
640
|
+
readonly anyOf: readonly [{
|
|
641
|
+
readonly type: "string";
|
|
642
|
+
}, {
|
|
643
|
+
readonly type: "null";
|
|
644
|
+
}];
|
|
645
|
+
};
|
|
646
|
+
};
|
|
647
|
+
};
|
|
648
|
+
};
|
|
649
|
+
};
|
|
650
|
+
};
|
|
651
|
+
readonly licenses: {
|
|
652
|
+
readonly type: "array";
|
|
653
|
+
readonly items: {
|
|
654
|
+
readonly type: "object";
|
|
655
|
+
readonly additionalProperties: false;
|
|
656
|
+
readonly required: readonly ["id", "name", "attributionName", "attributionUrl", "dateFrom", "dateTo"];
|
|
657
|
+
readonly properties: {
|
|
658
|
+
readonly id: {
|
|
659
|
+
readonly type: "integer";
|
|
660
|
+
readonly minimum: 1;
|
|
661
|
+
};
|
|
662
|
+
readonly name: {
|
|
663
|
+
readonly type: "string";
|
|
664
|
+
readonly minLength: 1;
|
|
665
|
+
};
|
|
666
|
+
readonly attributionName: {
|
|
667
|
+
readonly type: "string";
|
|
668
|
+
readonly minLength: 1;
|
|
669
|
+
};
|
|
670
|
+
readonly attributionUrl: {
|
|
671
|
+
readonly anyOf: readonly [{
|
|
672
|
+
readonly type: "string";
|
|
673
|
+
}, {
|
|
674
|
+
readonly type: "null";
|
|
675
|
+
}];
|
|
676
|
+
};
|
|
677
|
+
readonly dateFrom: {
|
|
678
|
+
readonly anyOf: readonly [{
|
|
679
|
+
readonly type: "string";
|
|
680
|
+
readonly pattern: "^\\d{4}-\\d{2}-\\d{2}$";
|
|
681
|
+
}, {
|
|
682
|
+
readonly type: "null";
|
|
683
|
+
}];
|
|
684
|
+
};
|
|
685
|
+
readonly dateTo: {
|
|
686
|
+
readonly anyOf: readonly [{
|
|
687
|
+
readonly type: "string";
|
|
688
|
+
readonly pattern: "^\\d{4}-\\d{2}-\\d{2}$";
|
|
689
|
+
}, {
|
|
690
|
+
readonly type: "null";
|
|
691
|
+
}];
|
|
692
|
+
};
|
|
693
|
+
};
|
|
694
|
+
};
|
|
695
|
+
};
|
|
696
|
+
};
|
|
697
|
+
};
|
|
698
|
+
};
|
|
699
|
+
readonly stopReason: {
|
|
700
|
+
readonly enum: readonly ["completed", "no-results", "max-pages", "max-records", "partial"];
|
|
701
|
+
};
|
|
702
|
+
};
|
|
703
|
+
};
|
|
704
|
+
export declare const OPENAQ_MEASUREMENT_OUTPUT_SCHEMA: {
|
|
705
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
706
|
+
readonly $id: "https://schemas.tiangong.ai/data/openaq/sensor-measurements-output.v1.json";
|
|
707
|
+
readonly type: "object";
|
|
708
|
+
readonly additionalProperties: false;
|
|
709
|
+
readonly required: readonly ["source", "query", "provider", "pages", "records", "stopReason"];
|
|
710
|
+
readonly properties: {
|
|
711
|
+
readonly source: {
|
|
712
|
+
readonly type: "object";
|
|
713
|
+
readonly additionalProperties: false;
|
|
714
|
+
readonly required: readonly ["providerId", "service", "apiVersion", "sourceSpecificTerms"];
|
|
715
|
+
readonly properties: {
|
|
716
|
+
readonly providerId: {
|
|
717
|
+
readonly const: "openaq";
|
|
718
|
+
};
|
|
719
|
+
readonly service: {
|
|
720
|
+
readonly const: "OpenAQ API";
|
|
721
|
+
};
|
|
722
|
+
readonly apiVersion: {
|
|
723
|
+
readonly const: "v3";
|
|
724
|
+
};
|
|
725
|
+
readonly sourceSpecificTerms: {
|
|
726
|
+
readonly const: true;
|
|
727
|
+
};
|
|
728
|
+
};
|
|
729
|
+
};
|
|
730
|
+
readonly query: {
|
|
731
|
+
readonly type: "object";
|
|
732
|
+
readonly additionalProperties: false;
|
|
733
|
+
readonly required: readonly ["sensorId", "granularity", "startDateTime", "endDateTime", "pageSize"];
|
|
734
|
+
readonly properties: {
|
|
735
|
+
readonly sensorId: {
|
|
736
|
+
readonly type: "integer";
|
|
737
|
+
readonly minimum: 1;
|
|
738
|
+
};
|
|
739
|
+
readonly granularity: {
|
|
740
|
+
readonly enum: readonly ["raw", "hourly", "daily"];
|
|
741
|
+
};
|
|
742
|
+
readonly startDateTime: {
|
|
743
|
+
readonly type: "string";
|
|
744
|
+
readonly pattern: "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[+-]\\d{2}:\\d{2})$";
|
|
745
|
+
};
|
|
746
|
+
readonly endDateTime: {
|
|
747
|
+
readonly type: "string";
|
|
748
|
+
readonly pattern: "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[+-]\\d{2}:\\d{2})$";
|
|
749
|
+
};
|
|
750
|
+
readonly pageSize: {
|
|
751
|
+
readonly type: "integer";
|
|
752
|
+
readonly minimum: 1;
|
|
753
|
+
readonly maximum: 1000;
|
|
754
|
+
};
|
|
755
|
+
};
|
|
756
|
+
};
|
|
757
|
+
readonly provider: {
|
|
758
|
+
readonly type: "object";
|
|
759
|
+
readonly additionalProperties: false;
|
|
760
|
+
readonly required: readonly ["name", "website", "found"];
|
|
761
|
+
readonly properties: {
|
|
762
|
+
readonly name: {
|
|
763
|
+
readonly const: "openaq-api";
|
|
764
|
+
};
|
|
765
|
+
readonly website: {
|
|
766
|
+
readonly type: "string";
|
|
767
|
+
};
|
|
768
|
+
readonly found: {
|
|
769
|
+
readonly anyOf: readonly [{
|
|
770
|
+
readonly type: "integer";
|
|
771
|
+
readonly minimum: 0;
|
|
772
|
+
}, {
|
|
773
|
+
readonly type: "string";
|
|
774
|
+
}, {
|
|
775
|
+
readonly type: "null";
|
|
776
|
+
}];
|
|
777
|
+
};
|
|
778
|
+
};
|
|
779
|
+
};
|
|
780
|
+
readonly pages: {
|
|
781
|
+
readonly type: "array";
|
|
782
|
+
readonly maxItems: 10;
|
|
783
|
+
readonly items: {
|
|
784
|
+
readonly type: "object";
|
|
785
|
+
readonly additionalProperties: false;
|
|
786
|
+
readonly required: readonly ["pageNumber", "inputRecords", "emittedRecords"];
|
|
787
|
+
readonly properties: {
|
|
788
|
+
readonly pageNumber: {
|
|
789
|
+
readonly type: "integer";
|
|
790
|
+
readonly minimum: 1;
|
|
791
|
+
};
|
|
792
|
+
readonly inputRecords: {
|
|
793
|
+
readonly type: "integer";
|
|
794
|
+
readonly minimum: 0;
|
|
795
|
+
};
|
|
796
|
+
readonly emittedRecords: {
|
|
797
|
+
readonly type: "integer";
|
|
798
|
+
readonly minimum: 0;
|
|
799
|
+
};
|
|
800
|
+
};
|
|
801
|
+
};
|
|
802
|
+
};
|
|
803
|
+
readonly records: {
|
|
804
|
+
readonly type: "array";
|
|
805
|
+
readonly maxItems: 10000;
|
|
806
|
+
readonly items: {
|
|
807
|
+
readonly type: "object";
|
|
808
|
+
readonly additionalProperties: false;
|
|
809
|
+
readonly required: readonly ["recordIndex", "sourcePageNumber", "sensorId", "granularity", "value", "flagInfo", "parameter", "period", "coordinates", "summary", "coverage"];
|
|
810
|
+
readonly properties: {
|
|
811
|
+
readonly recordIndex: {
|
|
812
|
+
readonly type: "integer";
|
|
813
|
+
readonly minimum: 0;
|
|
814
|
+
};
|
|
815
|
+
readonly sourcePageNumber: {
|
|
816
|
+
readonly type: "integer";
|
|
817
|
+
readonly minimum: 1;
|
|
818
|
+
};
|
|
819
|
+
readonly sensorId: {
|
|
820
|
+
readonly type: "integer";
|
|
821
|
+
readonly minimum: 1;
|
|
822
|
+
};
|
|
823
|
+
readonly granularity: {
|
|
824
|
+
readonly enum: readonly ["raw", "hourly", "daily"];
|
|
825
|
+
};
|
|
826
|
+
readonly value: {
|
|
827
|
+
readonly anyOf: readonly [{
|
|
828
|
+
readonly type: "number";
|
|
829
|
+
}, {
|
|
830
|
+
readonly type: "null";
|
|
831
|
+
}];
|
|
832
|
+
};
|
|
833
|
+
readonly flagInfo: {
|
|
834
|
+
readonly type: "object";
|
|
835
|
+
readonly additionalProperties: false;
|
|
836
|
+
readonly required: readonly ["hasFlags"];
|
|
837
|
+
readonly properties: {
|
|
838
|
+
readonly hasFlags: {
|
|
839
|
+
readonly type: "boolean";
|
|
840
|
+
};
|
|
841
|
+
};
|
|
842
|
+
};
|
|
843
|
+
readonly parameter: {
|
|
844
|
+
readonly type: "object";
|
|
845
|
+
readonly additionalProperties: false;
|
|
846
|
+
readonly required: readonly ["id", "name", "units", "displayName"];
|
|
847
|
+
readonly properties: {
|
|
848
|
+
readonly id: {
|
|
849
|
+
readonly type: "integer";
|
|
850
|
+
readonly minimum: 1;
|
|
851
|
+
};
|
|
852
|
+
readonly name: {
|
|
853
|
+
readonly type: "string";
|
|
854
|
+
readonly minLength: 1;
|
|
855
|
+
};
|
|
856
|
+
readonly units: {
|
|
857
|
+
readonly type: "string";
|
|
858
|
+
readonly minLength: 1;
|
|
859
|
+
};
|
|
860
|
+
readonly displayName: {
|
|
861
|
+
readonly anyOf: readonly [{
|
|
862
|
+
readonly type: "string";
|
|
863
|
+
}, {
|
|
864
|
+
readonly type: "null";
|
|
865
|
+
}];
|
|
866
|
+
};
|
|
867
|
+
};
|
|
868
|
+
};
|
|
869
|
+
readonly period: {
|
|
870
|
+
readonly anyOf: readonly [{
|
|
871
|
+
readonly type: "object";
|
|
872
|
+
readonly additionalProperties: false;
|
|
873
|
+
readonly required: readonly ["label", "interval", "datetimeFromUtc", "datetimeToUtc"];
|
|
874
|
+
readonly properties: {
|
|
875
|
+
readonly label: {
|
|
876
|
+
readonly type: "string";
|
|
877
|
+
readonly minLength: 1;
|
|
878
|
+
};
|
|
879
|
+
readonly interval: {
|
|
880
|
+
readonly type: "string";
|
|
881
|
+
readonly minLength: 1;
|
|
882
|
+
};
|
|
883
|
+
readonly datetimeFromUtc: {
|
|
884
|
+
readonly anyOf: readonly [{
|
|
885
|
+
readonly type: "string";
|
|
886
|
+
readonly pattern: "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[+-]\\d{2}:\\d{2})$";
|
|
887
|
+
}, {
|
|
888
|
+
readonly type: "null";
|
|
889
|
+
}];
|
|
890
|
+
};
|
|
891
|
+
readonly datetimeToUtc: {
|
|
892
|
+
readonly anyOf: readonly [{
|
|
893
|
+
readonly type: "string";
|
|
894
|
+
readonly pattern: "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[+-]\\d{2}:\\d{2})$";
|
|
895
|
+
}, {
|
|
896
|
+
readonly type: "null";
|
|
897
|
+
}];
|
|
898
|
+
};
|
|
899
|
+
};
|
|
900
|
+
}, {
|
|
901
|
+
readonly type: "null";
|
|
902
|
+
}];
|
|
903
|
+
};
|
|
904
|
+
readonly coordinates: {
|
|
905
|
+
readonly anyOf: readonly [{
|
|
906
|
+
readonly type: "object";
|
|
907
|
+
readonly additionalProperties: false;
|
|
908
|
+
readonly required: readonly ["latitude", "longitude"];
|
|
909
|
+
readonly properties: {
|
|
910
|
+
readonly latitude: {
|
|
911
|
+
readonly anyOf: readonly [{
|
|
912
|
+
readonly type: "number";
|
|
913
|
+
readonly minimum: -90;
|
|
914
|
+
readonly maximum: 90;
|
|
915
|
+
}, {
|
|
916
|
+
readonly type: "null";
|
|
917
|
+
}];
|
|
918
|
+
};
|
|
919
|
+
readonly longitude: {
|
|
920
|
+
readonly anyOf: readonly [{
|
|
921
|
+
readonly type: "number";
|
|
922
|
+
readonly minimum: -180;
|
|
923
|
+
readonly maximum: 180;
|
|
924
|
+
}, {
|
|
925
|
+
readonly type: "null";
|
|
926
|
+
}];
|
|
927
|
+
};
|
|
928
|
+
};
|
|
929
|
+
}, {
|
|
930
|
+
readonly type: "null";
|
|
931
|
+
}];
|
|
932
|
+
};
|
|
933
|
+
readonly summary: {
|
|
934
|
+
readonly anyOf: readonly [{
|
|
935
|
+
readonly type: "object";
|
|
936
|
+
readonly additionalProperties: false;
|
|
937
|
+
readonly required: readonly ["min", "q02", "q25", "median", "q75", "q98", "max", "average", "standardDeviation"];
|
|
938
|
+
readonly properties: {
|
|
939
|
+
readonly min: {
|
|
940
|
+
readonly anyOf: readonly [{
|
|
941
|
+
readonly type: "number";
|
|
942
|
+
}, {
|
|
943
|
+
readonly type: "null";
|
|
944
|
+
}];
|
|
945
|
+
};
|
|
946
|
+
readonly q02: {
|
|
947
|
+
readonly anyOf: readonly [{
|
|
948
|
+
readonly type: "number";
|
|
949
|
+
}, {
|
|
950
|
+
readonly type: "null";
|
|
951
|
+
}];
|
|
952
|
+
};
|
|
953
|
+
readonly q25: {
|
|
954
|
+
readonly anyOf: readonly [{
|
|
955
|
+
readonly type: "number";
|
|
956
|
+
}, {
|
|
957
|
+
readonly type: "null";
|
|
958
|
+
}];
|
|
959
|
+
};
|
|
960
|
+
readonly median: {
|
|
961
|
+
readonly anyOf: readonly [{
|
|
962
|
+
readonly type: "number";
|
|
963
|
+
}, {
|
|
964
|
+
readonly type: "null";
|
|
965
|
+
}];
|
|
966
|
+
};
|
|
967
|
+
readonly q75: {
|
|
968
|
+
readonly anyOf: readonly [{
|
|
969
|
+
readonly type: "number";
|
|
970
|
+
}, {
|
|
971
|
+
readonly type: "null";
|
|
972
|
+
}];
|
|
973
|
+
};
|
|
974
|
+
readonly q98: {
|
|
975
|
+
readonly anyOf: readonly [{
|
|
976
|
+
readonly type: "number";
|
|
977
|
+
}, {
|
|
978
|
+
readonly type: "null";
|
|
979
|
+
}];
|
|
980
|
+
};
|
|
981
|
+
readonly max: {
|
|
982
|
+
readonly anyOf: readonly [{
|
|
983
|
+
readonly type: "number";
|
|
984
|
+
}, {
|
|
985
|
+
readonly type: "null";
|
|
986
|
+
}];
|
|
987
|
+
};
|
|
988
|
+
readonly average: {
|
|
989
|
+
readonly anyOf: readonly [{
|
|
990
|
+
readonly type: "number";
|
|
991
|
+
}, {
|
|
992
|
+
readonly type: "null";
|
|
993
|
+
}];
|
|
994
|
+
};
|
|
995
|
+
readonly standardDeviation: {
|
|
996
|
+
readonly anyOf: readonly [{
|
|
997
|
+
readonly type: "number";
|
|
998
|
+
}, {
|
|
999
|
+
readonly type: "null";
|
|
1000
|
+
}];
|
|
1001
|
+
};
|
|
1002
|
+
};
|
|
1003
|
+
}, {
|
|
1004
|
+
readonly type: "null";
|
|
1005
|
+
}];
|
|
1006
|
+
};
|
|
1007
|
+
readonly coverage: {
|
|
1008
|
+
readonly anyOf: readonly [{
|
|
1009
|
+
readonly type: "object";
|
|
1010
|
+
readonly additionalProperties: false;
|
|
1011
|
+
readonly required: readonly ["expectedCount", "expectedInterval", "observedCount", "observedInterval", "percentComplete", "percentCoverage", "datetimeFromUtc", "datetimeToUtc"];
|
|
1012
|
+
readonly properties: {
|
|
1013
|
+
readonly expectedCount: {
|
|
1014
|
+
readonly type: "integer";
|
|
1015
|
+
readonly minimum: 0;
|
|
1016
|
+
};
|
|
1017
|
+
readonly expectedInterval: {
|
|
1018
|
+
readonly type: "string";
|
|
1019
|
+
readonly minLength: 1;
|
|
1020
|
+
};
|
|
1021
|
+
readonly observedCount: {
|
|
1022
|
+
readonly type: "integer";
|
|
1023
|
+
readonly minimum: 0;
|
|
1024
|
+
};
|
|
1025
|
+
readonly observedInterval: {
|
|
1026
|
+
readonly type: "string";
|
|
1027
|
+
readonly minLength: 1;
|
|
1028
|
+
};
|
|
1029
|
+
readonly percentComplete: {
|
|
1030
|
+
readonly type: "number";
|
|
1031
|
+
readonly minimum: 0;
|
|
1032
|
+
readonly maximum: 100;
|
|
1033
|
+
};
|
|
1034
|
+
readonly percentCoverage: {
|
|
1035
|
+
readonly type: "number";
|
|
1036
|
+
readonly minimum: 0;
|
|
1037
|
+
readonly maximum: 100;
|
|
1038
|
+
};
|
|
1039
|
+
readonly datetimeFromUtc: {
|
|
1040
|
+
readonly anyOf: readonly [{
|
|
1041
|
+
readonly type: "string";
|
|
1042
|
+
readonly pattern: "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[+-]\\d{2}:\\d{2})$";
|
|
1043
|
+
}, {
|
|
1044
|
+
readonly type: "null";
|
|
1045
|
+
}];
|
|
1046
|
+
};
|
|
1047
|
+
readonly datetimeToUtc: {
|
|
1048
|
+
readonly anyOf: readonly [{
|
|
1049
|
+
readonly type: "string";
|
|
1050
|
+
readonly pattern: "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[+-]\\d{2}:\\d{2})$";
|
|
1051
|
+
}, {
|
|
1052
|
+
readonly type: "null";
|
|
1053
|
+
}];
|
|
1054
|
+
};
|
|
1055
|
+
};
|
|
1056
|
+
}, {
|
|
1057
|
+
readonly type: "null";
|
|
1058
|
+
}];
|
|
1059
|
+
};
|
|
1060
|
+
};
|
|
1061
|
+
};
|
|
1062
|
+
};
|
|
1063
|
+
readonly stopReason: {
|
|
1064
|
+
readonly enum: readonly ["completed", "no-results", "max-pages", "max-records", "partial"];
|
|
1065
|
+
};
|
|
1066
|
+
};
|
|
1067
|
+
};
|