@ibicash/geolayers-sdk 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1002 @@
1
+ import { AxiosInstance } from 'axios';
2
+ import { z } from 'zod';
3
+ import { EventEmitter } from 'events';
4
+
5
+ interface GeoLayersConfig {
6
+ baseUrl: string;
7
+ apiKey: string;
8
+ timeout?: number;
9
+ retries?: number;
10
+ }
11
+ declare const DEFAULT_CONFIG: Partial<GeoLayersConfig>;
12
+
13
+ declare enum LayerProvider {
14
+ VOLCANOES = "volcanoes",
15
+ ACTIVE_VOLCANOES = "active-volcanoes",
16
+ WILDFIRES = "wildfires",
17
+ ACTIVE_STORMS = "active-storms",
18
+ RECENT_STORMS = "recent-storms",
19
+ EARTHQUAKES = "earthquakes",
20
+ BUOYS_RECENT = "buoys-recent",
21
+ BUOYS_LATEST = "buoys-latest",
22
+ NWS_STATIONS = "nws-weather-stations",
23
+ AZOS_NETWORK = "azos-weather-network",
24
+ WIS2_STATIONS = "wis2-stations",
25
+ GLOBAL_FLIGHTS = "global-flights",
26
+ LIVE_FLIGHTS = "live-flights",
27
+ FLIGHT_SCHEDULE = "flight-schedule"
28
+ }
29
+ declare const LayerMetadataSchema: z.ZodObject<{
30
+ source: z.ZodString;
31
+ cacheTTL: z.ZodNumber;
32
+ cached: z.ZodBoolean;
33
+ snapshotId: z.ZodOptional<z.ZodString>;
34
+ }, z.core.$strip>;
35
+ type LayerMetadata = z.infer<typeof LayerMetadataSchema>;
36
+ /**
37
+ * Standard API response envelope for all geospatial data.
38
+ * @template T The type of data being returned (usually a FeatureCollection).
39
+ */
40
+ interface LayerResponse<T> {
41
+ provider: LayerProvider | string;
42
+ data: T;
43
+ timestamp: string;
44
+ count?: number;
45
+ metadata?: LayerMetadata;
46
+ }
47
+ /**
48
+ * Schema for validating the LayerResponse envelope.
49
+ * Does not validate the 'data' field strictly as it varies by provider.
50
+ */
51
+ declare const createLayerResponseSchema: <T extends z.ZodTypeAny>(dataSchema: T) => z.ZodObject<{
52
+ provider: z.ZodString;
53
+ data: T;
54
+ timestamp: z.ZodString;
55
+ count: z.ZodOptional<z.ZodNumber>;
56
+ metadata: z.ZodOptional<z.ZodObject<{
57
+ source: z.ZodString;
58
+ cacheTTL: z.ZodNumber;
59
+ cached: z.ZodBoolean;
60
+ snapshotId: z.ZodOptional<z.ZodString>;
61
+ }, z.core.$strip>>;
62
+ }, z.core.$strip>;
63
+
64
+ declare const GeometrySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
65
+ type: z.ZodLiteral<"Point">;
66
+ coordinates: z.ZodTuple<[z.ZodNumber, z.ZodNumber], z.ZodNumber>;
67
+ }, z.core.$strip>, z.ZodObject<{
68
+ type: z.ZodLiteral<"LineString">;
69
+ coordinates: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], z.ZodNumber>>;
70
+ }, z.core.$strip>, z.ZodObject<{
71
+ type: z.ZodLiteral<"Polygon">;
72
+ coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], z.ZodNumber>>>;
73
+ }, z.core.$strip>, z.ZodObject<{
74
+ type: z.ZodLiteral<"MultiPoint">;
75
+ coordinates: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], z.ZodNumber>>;
76
+ }, z.core.$strip>, z.ZodObject<{
77
+ type: z.ZodLiteral<"MultiLineString">;
78
+ coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], z.ZodNumber>>>;
79
+ }, z.core.$strip>, z.ZodObject<{
80
+ type: z.ZodLiteral<"MultiPolygon">;
81
+ coordinates: z.ZodArray<z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], z.ZodNumber>>>>;
82
+ }, z.core.$strip>], "type">;
83
+ type Geometry = z.infer<typeof GeometrySchema>;
84
+ /**
85
+ * A GeoJSON Feature with type-safe properties.
86
+ * @template P Shape of the properties object.
87
+ */
88
+ interface Feature<P = Record<string, unknown>> {
89
+ type: 'Feature';
90
+ geometry: Geometry;
91
+ properties: P;
92
+ id?: string | number;
93
+ }
94
+ /**
95
+ * A GeoJSON FeatureCollection with type-safe features.
96
+ * @template P Shape of the properties object for each feature.
97
+ */
98
+ interface FeatureCollection<P = Record<string, unknown>> {
99
+ type: 'FeatureCollection';
100
+ features: Feature<P>[];
101
+ bbox?: number[];
102
+ }
103
+ /**
104
+ * Creates a Zod schema for a Feature with specific property validation.
105
+ */
106
+ declare const createFeatureSchema: <P extends z.ZodTypeAny>(propsSchema: P) => z.ZodObject<{
107
+ type: z.ZodLiteral<"Feature">;
108
+ geometry: z.ZodDiscriminatedUnion<[z.ZodObject<{
109
+ type: z.ZodLiteral<"Point">;
110
+ coordinates: z.ZodTuple<[z.ZodNumber, z.ZodNumber], z.ZodNumber>;
111
+ }, z.core.$strip>, z.ZodObject<{
112
+ type: z.ZodLiteral<"LineString">;
113
+ coordinates: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], z.ZodNumber>>;
114
+ }, z.core.$strip>, z.ZodObject<{
115
+ type: z.ZodLiteral<"Polygon">;
116
+ coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], z.ZodNumber>>>;
117
+ }, z.core.$strip>, z.ZodObject<{
118
+ type: z.ZodLiteral<"MultiPoint">;
119
+ coordinates: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], z.ZodNumber>>;
120
+ }, z.core.$strip>, z.ZodObject<{
121
+ type: z.ZodLiteral<"MultiLineString">;
122
+ coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], z.ZodNumber>>>;
123
+ }, z.core.$strip>, z.ZodObject<{
124
+ type: z.ZodLiteral<"MultiPolygon">;
125
+ coordinates: z.ZodArray<z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], z.ZodNumber>>>>;
126
+ }, z.core.$strip>], "type">;
127
+ properties: P;
128
+ id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
129
+ }, z.core.$strip>;
130
+ /**
131
+ * Creates a Zod schema for a FeatureCollection with specific property validation.
132
+ */
133
+ declare const createFeatureCollectionSchema: <P extends z.ZodTypeAny>(propsSchema: P) => z.ZodObject<{
134
+ type: z.ZodLiteral<"FeatureCollection">;
135
+ features: z.ZodArray<z.ZodObject<{
136
+ type: z.ZodLiteral<"Feature">;
137
+ geometry: z.ZodDiscriminatedUnion<[z.ZodObject<{
138
+ type: z.ZodLiteral<"Point">;
139
+ coordinates: z.ZodTuple<[z.ZodNumber, z.ZodNumber], z.ZodNumber>;
140
+ }, z.core.$strip>, z.ZodObject<{
141
+ type: z.ZodLiteral<"LineString">;
142
+ coordinates: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], z.ZodNumber>>;
143
+ }, z.core.$strip>, z.ZodObject<{
144
+ type: z.ZodLiteral<"Polygon">;
145
+ coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], z.ZodNumber>>>;
146
+ }, z.core.$strip>, z.ZodObject<{
147
+ type: z.ZodLiteral<"MultiPoint">;
148
+ coordinates: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], z.ZodNumber>>;
149
+ }, z.core.$strip>, z.ZodObject<{
150
+ type: z.ZodLiteral<"MultiLineString">;
151
+ coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], z.ZodNumber>>>;
152
+ }, z.core.$strip>, z.ZodObject<{
153
+ type: z.ZodLiteral<"MultiPolygon">;
154
+ coordinates: z.ZodArray<z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], z.ZodNumber>>>>;
155
+ }, z.core.$strip>], "type">;
156
+ properties: P;
157
+ id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
158
+ }, z.core.$strip>>;
159
+ bbox: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
160
+ }, z.core.$strip>;
161
+ declare const EarthquakePropsSchema: z.ZodObject<{
162
+ mag: z.ZodNumber;
163
+ place: z.ZodString;
164
+ time: z.ZodNumber;
165
+ updated: z.ZodNumber;
166
+ tz: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
167
+ url: z.ZodString;
168
+ detail: z.ZodString;
169
+ felt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
170
+ cdi: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
171
+ mmi: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
172
+ alert: z.ZodOptional<z.ZodNullable<z.ZodString>>;
173
+ status: z.ZodString;
174
+ tsunami: z.ZodNumber;
175
+ sig: z.ZodNumber;
176
+ net: z.ZodString;
177
+ code: z.ZodString;
178
+ ids: z.ZodString;
179
+ sources: z.ZodString;
180
+ types: z.ZodString;
181
+ nst: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
182
+ dmin: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
183
+ rms: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
184
+ gap: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
185
+ magType: z.ZodString;
186
+ type: z.ZodString;
187
+ title: z.ZodString;
188
+ }, z.core.$strip>;
189
+ type EarthquakeProps = z.infer<typeof EarthquakePropsSchema>;
190
+ declare const VolcanoPropsSchema: z.ZodObject<{
191
+ volcanoNumber: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
192
+ volcanoName: z.ZodString;
193
+ volcanicLandform: z.ZodOptional<z.ZodNullable<z.ZodString>>;
194
+ primaryVolcanoType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
195
+ lastEruptionYear: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
196
+ country: z.ZodString;
197
+ region: z.ZodOptional<z.ZodNullable<z.ZodString>>;
198
+ subregion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
199
+ geologicalSummary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
200
+ latitude: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
201
+ longitude: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
202
+ elevation: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
203
+ tectonicSetting: z.ZodOptional<z.ZodNullable<z.ZodString>>;
204
+ geologicEpoch: z.ZodOptional<z.ZodNullable<z.ZodString>>;
205
+ evidenceCategory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
206
+ primaryPhotoLink: z.ZodOptional<z.ZodNullable<z.ZodString>>;
207
+ primaryPhotoCaption: z.ZodOptional<z.ZodNullable<z.ZodString>>;
208
+ primaryPhotoCredit: z.ZodOptional<z.ZodNullable<z.ZodString>>;
209
+ majorRockType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
210
+ }, z.core.$strip>;
211
+ type VolcanoProps = z.infer<typeof VolcanoPropsSchema>;
212
+ declare const ActiveVolcanoPropsSchema: z.ZodObject<{
213
+ name: z.ZodString;
214
+ eventtype: z.ZodOptional<z.ZodString>;
215
+ eventid: z.ZodOptional<z.ZodNumber>;
216
+ episodeid: z.ZodOptional<z.ZodNumber>;
217
+ eventname: z.ZodOptional<z.ZodString>;
218
+ glide: z.ZodOptional<z.ZodString>;
219
+ description: z.ZodOptional<z.ZodString>;
220
+ htmldescription: z.ZodOptional<z.ZodString>;
221
+ icon: z.ZodOptional<z.ZodString>;
222
+ iconoverall: z.ZodOptional<z.ZodString>;
223
+ url: z.ZodOptional<z.ZodObject<{
224
+ geometry: z.ZodOptional<z.ZodString>;
225
+ report: z.ZodOptional<z.ZodString>;
226
+ details: z.ZodOptional<z.ZodString>;
227
+ }, z.core.$strip>>;
228
+ alertlevel: z.ZodOptional<z.ZodString>;
229
+ alertscore: z.ZodOptional<z.ZodNumber>;
230
+ episodealertlevel: z.ZodOptional<z.ZodString>;
231
+ episodealertscore: z.ZodOptional<z.ZodNumber>;
232
+ istemporary: z.ZodOptional<z.ZodString>;
233
+ iscurrent: z.ZodOptional<z.ZodString>;
234
+ country: z.ZodOptional<z.ZodString>;
235
+ fromdate: z.ZodOptional<z.ZodString>;
236
+ todate: z.ZodOptional<z.ZodString>;
237
+ datemodified: z.ZodOptional<z.ZodString>;
238
+ iso3: z.ZodOptional<z.ZodString>;
239
+ source: z.ZodOptional<z.ZodString>;
240
+ sourceid: z.ZodOptional<z.ZodString>;
241
+ polygonlabel: z.ZodOptional<z.ZodString>;
242
+ class: z.ZodOptional<z.ZodString>;
243
+ affectedcountries: z.ZodOptional<z.ZodArray<z.ZodObject<{
244
+ iso2: z.ZodOptional<z.ZodString>;
245
+ iso3: z.ZodOptional<z.ZodString>;
246
+ countryname: z.ZodOptional<z.ZodString>;
247
+ }, z.core.$strip>>>;
248
+ severitydata: z.ZodOptional<z.ZodObject<{
249
+ severity: z.ZodOptional<z.ZodNumber>;
250
+ severitytext: z.ZodOptional<z.ZodString>;
251
+ severityunit: z.ZodOptional<z.ZodString>;
252
+ }, z.core.$strip>>;
253
+ marketType: z.ZodOptional<z.ZodLiteral<"volcano">>;
254
+ volcname: z.ZodOptional<z.ZodString>;
255
+ }, z.core.$strip>;
256
+ type ActiveVolcanoProps = z.infer<typeof ActiveVolcanoPropsSchema>;
257
+ declare const WeatherStationPropsSchema: z.ZodObject<{
258
+ id: z.ZodOptional<z.ZodString>;
259
+ wigos_station_identifier: z.ZodOptional<z.ZodString>;
260
+ station_identifier: z.ZodOptional<z.ZodString>;
261
+ name: z.ZodOptional<z.ZodString>;
262
+ station_name: z.ZodOptional<z.ZodString>;
263
+ provider: z.ZodOptional<z.ZodString>;
264
+ country: z.ZodOptional<z.ZodString>;
265
+ baseUrl: z.ZodOptional<z.ZodString>;
266
+ wis2CollectionId: z.ZodOptional<z.ZodString>;
267
+ marketType: z.ZodOptional<z.ZodString>;
268
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
269
+ measurements: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
270
+ value: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
271
+ unit: z.ZodOptional<z.ZodString>;
272
+ }, z.core.$strip>>>;
273
+ }, z.core.$strip>;
274
+ type WeatherStationProps = z.infer<typeof WeatherStationPropsSchema>;
275
+ declare const StormPropsSchema: z.ZodObject<{
276
+ objectid: z.ZodOptional<z.ZodNumber>;
277
+ stormname: z.ZodOptional<z.ZodString>;
278
+ stormid: z.ZodOptional<z.ZodString>;
279
+ stormnum: z.ZodOptional<z.ZodNumber>;
280
+ stormtype: z.ZodOptional<z.ZodString>;
281
+ dtg: z.ZodOptional<z.ZodNumber>;
282
+ year: z.ZodOptional<z.ZodNumber>;
283
+ month: z.ZodOptional<z.ZodString>;
284
+ day: z.ZodOptional<z.ZodNumber>;
285
+ hhmm: z.ZodOptional<z.ZodString>;
286
+ tau: z.ZodOptional<z.ZodNumber>;
287
+ mslp: z.ZodOptional<z.ZodNumber>;
288
+ basin: z.ZodOptional<z.ZodString>;
289
+ intensity: z.ZodOptional<z.ZodNumber>;
290
+ ss: z.ZodOptional<z.ZodNumber>;
291
+ lat: z.ZodOptional<z.ZodNumber>;
292
+ lon: z.ZodOptional<z.ZodNumber>;
293
+ category: z.ZodOptional<z.ZodNumber>;
294
+ windSpeed: z.ZodOptional<z.ZodNumber>;
295
+ pressure: z.ZodOptional<z.ZodNumber>;
296
+ status: z.ZodOptional<z.ZodString>;
297
+ }, z.core.$strip>;
298
+ type StormProps = z.infer<typeof StormPropsSchema>;
299
+ declare const WildfirePropsSchema: z.ZodObject<{
300
+ brightness: z.ZodNumber;
301
+ bright_ti4: z.ZodOptional<z.ZodNumber>;
302
+ bright_ti5: z.ZodOptional<z.ZodNumber>;
303
+ scan: z.ZodOptional<z.ZodNumber>;
304
+ track: z.ZodOptional<z.ZodNumber>;
305
+ acq_date: z.ZodString;
306
+ acq_time: z.ZodString;
307
+ satellite: z.ZodOptional<z.ZodString>;
308
+ instrument: z.ZodOptional<z.ZodString>;
309
+ confidence: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
310
+ version: z.ZodOptional<z.ZodString>;
311
+ frp: z.ZodOptional<z.ZodNumber>;
312
+ daynight: z.ZodOptional<z.ZodString>;
313
+ }, z.core.$strip>;
314
+ type WildfireProps = z.infer<typeof WildfirePropsSchema>;
315
+ declare const MeasurementValueSchema: z.ZodObject<{
316
+ value: z.ZodNumber;
317
+ unit: z.ZodString;
318
+ quality: z.ZodOptional<z.ZodEnum<{
319
+ good: "good";
320
+ suspect: "suspect";
321
+ estimated: "estimated";
322
+ missing: "missing";
323
+ }>>;
324
+ }, z.core.$strip>;
325
+ type MeasurementValue = z.infer<typeof MeasurementValueSchema>;
326
+ declare const StandardMeasurementsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
327
+ value: z.ZodNumber;
328
+ unit: z.ZodString;
329
+ quality: z.ZodOptional<z.ZodEnum<{
330
+ good: "good";
331
+ suspect: "suspect";
332
+ estimated: "estimated";
333
+ missing: "missing";
334
+ }>>;
335
+ }, z.core.$strip>>;
336
+ type StandardMeasurements = z.infer<typeof StandardMeasurementsSchema>;
337
+ declare const StandardObservationSchema: z.ZodObject<{
338
+ timestamp: z.ZodUnion<[z.ZodString, z.ZodDate]>;
339
+ stationId: z.ZodString;
340
+ latitude: z.ZodOptional<z.ZodNumber>;
341
+ longitude: z.ZodOptional<z.ZodNumber>;
342
+ measurements: z.ZodRecord<z.ZodString, z.ZodObject<{
343
+ value: z.ZodNumber;
344
+ unit: z.ZodString;
345
+ quality: z.ZodOptional<z.ZodEnum<{
346
+ good: "good";
347
+ suspect: "suspect";
348
+ estimated: "estimated";
349
+ missing: "missing";
350
+ }>>;
351
+ }, z.core.$strip>>;
352
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
353
+ imageUrl: z.ZodOptional<z.ZodString>;
354
+ }, z.core.$strip>;
355
+ type StandardObservation = z.infer<typeof StandardObservationSchema>;
356
+ declare const ObservationQueryResultSchema: z.ZodObject<{
357
+ stationId: z.ZodString;
358
+ observations: z.ZodArray<z.ZodObject<{
359
+ timestamp: z.ZodUnion<[z.ZodString, z.ZodDate]>;
360
+ stationId: z.ZodString;
361
+ latitude: z.ZodOptional<z.ZodNumber>;
362
+ longitude: z.ZodOptional<z.ZodNumber>;
363
+ measurements: z.ZodRecord<z.ZodString, z.ZodObject<{
364
+ value: z.ZodNumber;
365
+ unit: z.ZodString;
366
+ quality: z.ZodOptional<z.ZodEnum<{
367
+ good: "good";
368
+ suspect: "suspect";
369
+ estimated: "estimated";
370
+ missing: "missing";
371
+ }>>;
372
+ }, z.core.$strip>>;
373
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
374
+ imageUrl: z.ZodOptional<z.ZodString>;
375
+ }, z.core.$strip>>;
376
+ count: z.ZodNumber;
377
+ timeRange: z.ZodObject<{
378
+ start: z.ZodUnion<[z.ZodString, z.ZodDate]>;
379
+ end: z.ZodUnion<[z.ZodString, z.ZodDate]>;
380
+ }, z.core.$strip>;
381
+ provider: z.ZodString;
382
+ cached: z.ZodBoolean;
383
+ }, z.core.$strip>;
384
+ type ObservationQueryResult = z.infer<typeof ObservationQueryResultSchema>;
385
+ declare const FlightPropsSchema: z.ZodObject<{
386
+ icao24: z.ZodOptional<z.ZodString>;
387
+ callsign: z.ZodOptional<z.ZodString>;
388
+ originCountry: z.ZodOptional<z.ZodString>;
389
+ hex: z.ZodOptional<z.ZodString>;
390
+ flight: z.ZodOptional<z.ZodString>;
391
+ registration: z.ZodOptional<z.ZodString>;
392
+ type: z.ZodOptional<z.ZodString>;
393
+ velocity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
394
+ geoAltitude: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
395
+ onGround: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
396
+ verticalRate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
397
+ baroAltitude: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
398
+ squawk: z.ZodOptional<z.ZodNullable<z.ZodString>>;
399
+ spi: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
400
+ positionSource: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
401
+ groundSpeed: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
402
+ track: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
403
+ trueTrack: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
404
+ emergency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
405
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
406
+ timePosition: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
407
+ lastContact: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
408
+ sensors: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber>>>;
409
+ }, z.core.$strip>;
410
+ type FlightProps = z.infer<typeof FlightPropsSchema>;
411
+ declare const EventPayloadSchema: z.ZodObject<{
412
+ provider: z.ZodString;
413
+ type: z.ZodEnum<{
414
+ Feature: "Feature";
415
+ FeatureCollection: "FeatureCollection";
416
+ }>;
417
+ data: z.ZodUnknown;
418
+ timestamp: z.ZodString;
419
+ action: z.ZodOptional<z.ZodEnum<{
420
+ updated: "updated";
421
+ created: "created";
422
+ deleted: "deleted";
423
+ }>>;
424
+ }, z.core.$strip>;
425
+ type EventPayload = z.infer<typeof EventPayloadSchema>;
426
+ /**
427
+ * Response schema for flight schedule endpoint.
428
+ * Uses passthrough for flexible AeroDataBox response handling.
429
+ */
430
+ declare const FlightScheduleResponseSchema: z.ZodObject<{
431
+ provider: z.ZodString;
432
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
433
+ timestamp: z.ZodString;
434
+ count: z.ZodOptional<z.ZodNumber>;
435
+ metadata: z.ZodOptional<z.ZodObject<{
436
+ source: z.ZodString;
437
+ cacheTTL: z.ZodNumber;
438
+ cached: z.ZodBoolean;
439
+ }, z.core.$strip>>;
440
+ }, z.core.$strip>;
441
+ type FlightScheduleResponse = z.infer<typeof FlightScheduleResponseSchema>;
442
+ /**
443
+ * Valid observation providers for data warehouse queries.
444
+ */
445
+ declare const ObservationProviderSchema: z.ZodEnum<{
446
+ wis2: "wis2";
447
+ iem: "iem";
448
+ buoy: "buoy";
449
+ openmeteo: "openmeteo";
450
+ nws: "nws";
451
+ }>;
452
+ type ObservationProvider = z.infer<typeof ObservationProviderSchema>;
453
+ /**
454
+ * Response from GET /observations/station/:stationId
455
+ */
456
+ declare const StationObservationsResultSchema: z.ZodObject<{
457
+ stationId: z.ZodString;
458
+ provider: z.ZodEnum<{
459
+ wis2: "wis2";
460
+ iem: "iem";
461
+ buoy: "buoy";
462
+ openmeteo: "openmeteo";
463
+ nws: "nws";
464
+ }>;
465
+ observations: z.ZodArray<z.ZodObject<{
466
+ timestamp: z.ZodUnion<[z.ZodString, z.ZodDate]>;
467
+ stationId: z.ZodString;
468
+ latitude: z.ZodOptional<z.ZodNumber>;
469
+ longitude: z.ZodOptional<z.ZodNumber>;
470
+ measurements: z.ZodRecord<z.ZodString, z.ZodObject<{
471
+ value: z.ZodNumber;
472
+ unit: z.ZodString;
473
+ quality: z.ZodOptional<z.ZodEnum<{
474
+ good: "good";
475
+ suspect: "suspect";
476
+ estimated: "estimated";
477
+ missing: "missing";
478
+ }>>;
479
+ }, z.core.$strip>>;
480
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
481
+ imageUrl: z.ZodOptional<z.ZodString>;
482
+ }, z.core.$strip>>;
483
+ count: z.ZodNumber;
484
+ timeRange: z.ZodObject<{
485
+ start: z.ZodUnion<[z.ZodString, z.ZodDate]>;
486
+ end: z.ZodUnion<[z.ZodString, z.ZodDate]>;
487
+ }, z.core.$strip>;
488
+ source: z.ZodLiteral<"data-warehouse">;
489
+ }, z.core.$strip>;
490
+ type StationObservationsResult = z.infer<typeof StationObservationsResultSchema>;
491
+ /**
492
+ * Response from GET /observations/station/:stationId/latest
493
+ */
494
+ declare const LatestObservationResultSchema: z.ZodObject<{
495
+ stationId: z.ZodString;
496
+ provider: z.ZodEnum<{
497
+ wis2: "wis2";
498
+ iem: "iem";
499
+ buoy: "buoy";
500
+ openmeteo: "openmeteo";
501
+ nws: "nws";
502
+ }>;
503
+ observation: z.ZodNullable<z.ZodObject<{
504
+ timestamp: z.ZodUnion<[z.ZodString, z.ZodDate]>;
505
+ stationId: z.ZodString;
506
+ latitude: z.ZodOptional<z.ZodNumber>;
507
+ longitude: z.ZodOptional<z.ZodNumber>;
508
+ measurements: z.ZodRecord<z.ZodString, z.ZodObject<{
509
+ value: z.ZodNumber;
510
+ unit: z.ZodString;
511
+ quality: z.ZodOptional<z.ZodEnum<{
512
+ good: "good";
513
+ suspect: "suspect";
514
+ estimated: "estimated";
515
+ missing: "missing";
516
+ }>>;
517
+ }, z.core.$strip>>;
518
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
519
+ imageUrl: z.ZodOptional<z.ZodString>;
520
+ }, z.core.$strip>>;
521
+ source: z.ZodLiteral<"data-warehouse">;
522
+ }, z.core.$strip>;
523
+ type LatestObservationResult = z.infer<typeof LatestObservationResultSchema>;
524
+ /**
525
+ * Response from GET /observations/bbox
526
+ */
527
+ declare const BboxObservationsResultSchema: z.ZodObject<{
528
+ bbox: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
529
+ provider: z.ZodEnum<{
530
+ wis2: "wis2";
531
+ iem: "iem";
532
+ buoy: "buoy";
533
+ openmeteo: "openmeteo";
534
+ nws: "nws";
535
+ }>;
536
+ observations: z.ZodArray<z.ZodObject<{
537
+ timestamp: z.ZodUnion<[z.ZodString, z.ZodDate]>;
538
+ stationId: z.ZodString;
539
+ latitude: z.ZodOptional<z.ZodNumber>;
540
+ longitude: z.ZodOptional<z.ZodNumber>;
541
+ measurements: z.ZodRecord<z.ZodString, z.ZodObject<{
542
+ value: z.ZodNumber;
543
+ unit: z.ZodString;
544
+ quality: z.ZodOptional<z.ZodEnum<{
545
+ good: "good";
546
+ suspect: "suspect";
547
+ estimated: "estimated";
548
+ missing: "missing";
549
+ }>>;
550
+ }, z.core.$strip>>;
551
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
552
+ imageUrl: z.ZodOptional<z.ZodString>;
553
+ }, z.core.$strip>>;
554
+ count: z.ZodNumber;
555
+ timeRange: z.ZodObject<{
556
+ start: z.ZodUnion<[z.ZodString, z.ZodDate]>;
557
+ end: z.ZodUnion<[z.ZodString, z.ZodDate]>;
558
+ }, z.core.$strip>;
559
+ source: z.ZodLiteral<"data-warehouse">;
560
+ }, z.core.$strip>;
561
+ type BboxObservationsResult = z.infer<typeof BboxObservationsResultSchema>;
562
+ /**
563
+ * Response from GET /observations/stats
564
+ */
565
+ declare const ObservationStatsResultSchema: z.ZodObject<{
566
+ provider: z.ZodString;
567
+ totalObservations: z.ZodNumber;
568
+ source: z.ZodLiteral<"data-warehouse">;
569
+ }, z.core.$strip>;
570
+ type ObservationStatsResult = z.infer<typeof ObservationStatsResultSchema>;
571
+
572
+ declare abstract class BaseClient {
573
+ protected readonly http: AxiosInstance;
574
+ protected readonly config: GeoLayersConfig;
575
+ constructor(config: GeoLayersConfig);
576
+ private setupInterceptors;
577
+ private isRetryableError;
578
+ private delay;
579
+ private executeWithRetry;
580
+ protected get<T, P extends object = object>(url: string, params?: P): Promise<T>;
581
+ protected post<T, B extends object = object>(url: string, body?: B): Promise<T>;
582
+ /**
583
+ * Helper to parse GeoJSON responses with Zod validation.
584
+ * Eliminates repetitive schema creation across domains.
585
+ */
586
+ protected parseGeoJSON<T extends z.ZodTypeAny>(data: unknown, propsSchema: T): LayerResponse<FeatureCollection<z.infer<T>>>;
587
+ }
588
+
589
+ /**
590
+ * Bounding box filters for global flight queries.
591
+ */
592
+ interface FlightFilters {
593
+ /** Minimum latitude (-90 to 90). Default: -90 */
594
+ lamin?: number;
595
+ /** Minimum longitude (-180 to 180). Default: -180 */
596
+ lomin?: number;
597
+ /** Maximum latitude (-90 to 90). Default: 90 */
598
+ lamax?: number;
599
+ /** Maximum longitude (-180 to 180). Default: 180 */
600
+ lomax?: number;
601
+ }
602
+ /**
603
+ * Filters for live flight queries (radius around a point).
604
+ */
605
+ interface LiveFlightFilters {
606
+ /** Center latitude (-90 to 90) */
607
+ lat: number;
608
+ /** Center longitude (-180 to 180) */
609
+ lng: number;
610
+ /** Radius in nautical miles (1-1000). Default: 250 */
611
+ radius?: number;
612
+ }
613
+ declare class AviationDomain extends BaseClient {
614
+ /**
615
+ * Get all currently tracked flights globally (OpenSky).
616
+ * @param filters Optional bounding box filters. Defaults to whole world.
617
+ */
618
+ getGlobalFlights(filters?: FlightFilters): Promise<LayerResponse<FeatureCollection<FlightProps>>>;
619
+ /**
620
+ * Get live flights (subset of global flights).
621
+ * @param filters Center point and radius filters. Defaults to New York if not provided.
622
+ */
623
+ getLiveFlights(filters?: LiveFlightFilters): Promise<LayerResponse<FeatureCollection<FlightProps>>>;
624
+ /**
625
+ * Get flight schedule/details by callsign from AeroDataBox.
626
+ * @param callsign Flight identifier (e.g., 'UAL1234', 'AA100')
627
+ * @returns Raw flight schedule data from AeroDataBox API.
628
+ *
629
+ * @example
630
+ * ```ts
631
+ * const schedule = await sdk.aviation.getFlightSchedule('UAL1234');
632
+ * console.log(schedule.data); // Flight details from AeroDataBox
633
+ * ```
634
+ */
635
+ getFlightSchedule(callsign: string): Promise<FlightScheduleResponse>;
636
+ }
637
+
638
+ /**
639
+ * Response from /events/types endpoint.
640
+ */
641
+ declare const EventTypesResponseSchema: z.ZodObject<{
642
+ types: z.ZodArray<z.ZodEnum<{
643
+ "earthquake.new": "earthquake.new";
644
+ "earthquake.updated": "earthquake.updated";
645
+ "storm.new": "storm.new";
646
+ "storm.updated": "storm.updated";
647
+ "wildfire.new": "wildfire.new";
648
+ "wildfire.updated": "wildfire.updated";
649
+ "volcano.alert": "volcano.alert";
650
+ "snapshot.completed": "snapshot.completed";
651
+ "snapshot.failed": "snapshot.failed";
652
+ "observation.batch": "observation.batch";
653
+ }>>;
654
+ descriptions: z.ZodRecord<z.ZodString, z.ZodString>;
655
+ }, z.core.$strip>;
656
+ type EventTypesResponse = z.infer<typeof EventTypesResponseSchema>;
657
+ declare class EventsDomain extends BaseClient {
658
+ /**
659
+ * Get list of available event types for the event stream.
660
+ * @returns Object with event types array and their descriptions.
661
+ *
662
+ * @example
663
+ * ```ts
664
+ * const { types, descriptions } = await sdk.eventsMeta.getEventTypes();
665
+ * console.log(types); // ['earthquake.new', 'storm.new', ...]
666
+ * console.log(descriptions['earthquake.new']); // 'New earthquake detected'
667
+ * ```
668
+ */
669
+ getEventTypes(): Promise<EventTypesResponse>;
670
+ }
671
+
672
+ /**
673
+ * Filters for wildfire queries.
674
+ */
675
+ interface WildfireFilters {
676
+ /** Number of days of wildfire data to retrieve (1-30). Default: 1 */
677
+ days?: number;
678
+ }
679
+ declare class FireDomain extends BaseClient {
680
+ /**
681
+ * Get list of active wildfires/heat anomalies.
682
+ * @param filters Optional filters. Default: last 1 day.
683
+ */
684
+ getWildfires(filters?: WildfireFilters): Promise<LayerResponse<FeatureCollection<WildfireProps>>>;
685
+ }
686
+
687
+ /**
688
+ * Base filters for observation queries.
689
+ */
690
+ interface ObservationFilters {
691
+ /** Start date in ISO 8601 format */
692
+ start: string;
693
+ /** End date in ISO 8601 format */
694
+ end: string;
695
+ /** Force refresh from source (bypass cache). Default: false */
696
+ forceRefresh?: boolean;
697
+ }
698
+ /**
699
+ * Filters for WIS2 station queries.
700
+ */
701
+ interface Wis2StationFilters {
702
+ /** Maximum number of stations to return. Default: 100 */
703
+ limit?: number;
704
+ /** Number of stations to skip. Default: 0 */
705
+ offset?: number;
706
+ }
707
+ /**
708
+ * Extended filters for WIS2 observation queries.
709
+ */
710
+ interface Wis2ObservationFilters extends ObservationFilters {
711
+ /** WIS2 node base URL */
712
+ baseUrl?: string;
713
+ /** WIS2 collection ID */
714
+ collectionId?: string;
715
+ }
716
+ declare class WeatherDomain extends BaseClient {
717
+ /**
718
+ * Get weather stations from WIS2 network.
719
+ * @param filters Optional pagination filters.
720
+ */
721
+ getWis2Stations(filters?: Wis2StationFilters): Promise<LayerResponse<FeatureCollection<WeatherStationProps>>>;
722
+ /**
723
+ * Get historical observations for a WIS2 station.
724
+ * @param stationId The station identifier.
725
+ * @param filters Date range and optional WIS2-specific filters.
726
+ */
727
+ getWis2Observations(stationId: string, filters: Wis2ObservationFilters): Promise<ObservationQueryResult>;
728
+ /**
729
+ * Get weather stations from IEM/AZOS network.
730
+ */
731
+ getIemStations(): Promise<LayerResponse<FeatureCollection<WeatherStationProps>>>;
732
+ /**
733
+ * Get historical observations for an IEM station.
734
+ * @param stationId The station identifier.
735
+ * @param filters Date range filters.
736
+ */
737
+ getIemObservations(stationId: string, filters: ObservationFilters): Promise<ObservationQueryResult>;
738
+ /**
739
+ * Get weather stations from NWS (National Weather Service) network.
740
+ */
741
+ getNWSWeatherStations(): Promise<LayerResponse<FeatureCollection<WeatherStationProps>>>;
742
+ /**
743
+ * Get active stations that have reported data in the last 24 hours.
744
+ * @param type The station network type ('iem' or 'wis2').
745
+ *
746
+ * Note: This endpoint returns FeatureCollection directly (not LayerResponse envelope).
747
+ */
748
+ getActiveStations(type: 'iem' | 'wis2'): Promise<LayerResponse<FeatureCollection<WeatherStationProps>>>;
749
+ }
750
+
751
+ declare class MaritimeDomain extends BaseClient {
752
+ /**
753
+ * Get NOAA buoy stations (locations).
754
+ */
755
+ getBuoyStations(): Promise<LayerResponse<FeatureCollection<WeatherStationProps>>>;
756
+ /**
757
+ * Get latest buoy observations (real-time-ish).
758
+ */
759
+ getLatestBuoyObservations(): Promise<LayerResponse<FeatureCollection<WeatherStationProps>>>;
760
+ /**
761
+ * Get historical observations for a specific buoy.
762
+ * @param buoyId The buoy identifier.
763
+ * @param filters Date range filters.
764
+ */
765
+ getBuoyObservations(buoyId: string, filters: ObservationFilters): Promise<ObservationQueryResult>;
766
+ }
767
+
768
+ /**
769
+ * Filters for data warehouse station observations.
770
+ */
771
+ interface StationObservationFilters {
772
+ /** Observation provider */
773
+ provider: ObservationProvider;
774
+ /** Start date in ISO 8601 format */
775
+ start?: string;
776
+ /** End date in ISO 8601 format */
777
+ end?: string;
778
+ /** Quick time range selection (overridden by start/end) */
779
+ timePreset?: '1h' | '24h' | '7d' | '30d';
780
+ /** Maximum number of observations to return */
781
+ limit?: number;
782
+ }
783
+ /**
784
+ * Filters for bounding box observation queries.
785
+ */
786
+ interface BboxFilters extends StationObservationFilters {
787
+ /** Minimum longitude (-180 to 180) */
788
+ minLon: number;
789
+ /** Minimum latitude (-90 to 90) */
790
+ minLat: number;
791
+ /** Maximum longitude (-180 to 180) */
792
+ maxLon: number;
793
+ /** Maximum latitude (-90 to 90) */
794
+ maxLat: number;
795
+ }
796
+ /**
797
+ * ObservationsDomain provides access to observation endpoints.
798
+ *
799
+ * This includes:
800
+ * - Active stations from WIS2 and IEM networks
801
+ * - Data warehouse queries (station, bbox, stats)
802
+ */
803
+ declare class ObservationsDomain extends BaseClient {
804
+ /**
805
+ * Get active WIS2 stations that reported data in the last 24 hours.
806
+ */
807
+ getActiveWis2Stations(): Promise<LayerResponse<FeatureCollection<WeatherStationProps>>>;
808
+ /**
809
+ * Get active IEM/AZOS stations that reported data in the last 24 hours.
810
+ */
811
+ getActiveIemStations(): Promise<LayerResponse<FeatureCollection<WeatherStationProps>>>;
812
+ /**
813
+ * Get observations for a station from the data warehouse.
814
+ * @param stationId The station identifier.
815
+ * @param filters Query filters including provider and date range.
816
+ */
817
+ getStationObservations(stationId: string, filters: StationObservationFilters): Promise<StationObservationsResult>;
818
+ /**
819
+ * Get the latest observation for a station from the data warehouse.
820
+ * @param stationId The station identifier.
821
+ * @param provider The observation provider.
822
+ */
823
+ getLatestObservation(stationId: string, provider: ObservationProvider): Promise<LatestObservationResult>;
824
+ /**
825
+ * Get observations within a geographic bounding box.
826
+ * @param filters Bounding box coordinates and query filters.
827
+ */
828
+ getObservationsByBbox(filters: BboxFilters): Promise<BboxObservationsResult>;
829
+ /**
830
+ * Get data warehouse statistics.
831
+ * @param provider Optional provider filter. If not specified, returns stats for all providers.
832
+ */
833
+ getStats(provider?: ObservationProvider): Promise<ObservationStatsResult>;
834
+ /**
835
+ * Convert time preset to absolute date range parameters.
836
+ */
837
+ private buildDateParams;
838
+ /**
839
+ * Parse active stations response.
840
+ * The endpoint may return either a FeatureCollection directly or wrapped in LayerResponse.
841
+ */
842
+ private parseActiveStationsResponse;
843
+ }
844
+
845
+ /**
846
+ * Time range presets for earthquake queries.
847
+ * - `1h`: Last 1 hour
848
+ * - `24h`: Last 24 hours (default)
849
+ * - `7d`: Last 7 days
850
+ * - `30d`: Last 30 days
851
+ */
852
+ type TimePreset = '1h' | '24h' | '7d' | '30d';
853
+ /**
854
+ * Filters for earthquake queries.
855
+ *
856
+ * @example Using a preset (recommended)
857
+ * ```ts
858
+ * sdk.seismic.getEarthquakes({ timePreset: '7d' });
859
+ * ```
860
+ *
861
+ * @example Using custom date range
862
+ * ```ts
863
+ * sdk.seismic.getEarthquakes({
864
+ * startTime: '2024-01-01T00:00:00Z',
865
+ * endTime: '2024-01-31T23:59:59Z',
866
+ * });
867
+ * ```
868
+ */
869
+ interface EarthquakeFilters {
870
+ /**
871
+ * Time preset for quick queries. Default: '24h'.
872
+ * If startTime/endTime are provided, this is ignored.
873
+ */
874
+ timePreset?: TimePreset;
875
+ /**
876
+ * Start time in ISO 8601 format (e.g., '2024-01-01T00:00:00Z').
877
+ * When provided with endTime, overrides timePreset.
878
+ */
879
+ startTime?: string;
880
+ /**
881
+ * End time in ISO 8601 format (e.g., '2024-01-31T23:59:59Z').
882
+ * When provided with startTime, overrides timePreset.
883
+ */
884
+ endTime?: string;
885
+ /**
886
+ * Minimum earthquake magnitude to filter by.
887
+ */
888
+ minMagnitude?: number;
889
+ }
890
+ declare class SeismicDomain extends BaseClient {
891
+ /**
892
+ * Get earthquakes from a specific time range and minimum magnitude.
893
+ *
894
+ * @param filters - Optional filters. Default: last 24 hours.
895
+ * @returns Promise with earthquake data as GeoJSON FeatureCollection.
896
+ *
897
+ * @example Using default (last 24 hours)
898
+ * ```ts
899
+ * const earthquakes = await sdk.seismic.getEarthquakes();
900
+ * ```
901
+ *
902
+ * @example Using a preset
903
+ * ```ts
904
+ * const earthquakes = await sdk.seismic.getEarthquakes({ timePreset: '7d', minMagnitude: 4.0 });
905
+ * ```
906
+ *
907
+ * @example Using custom date range
908
+ * ```ts
909
+ * const earthquakes = await sdk.seismic.getEarthquakes({
910
+ * startTime: '2024-01-01T00:00:00Z',
911
+ * endTime: '2024-01-31T23:59:59Z',
912
+ * minMagnitude: 5.0,
913
+ * });
914
+ * ```
915
+ */
916
+ getEarthquakes(filters?: EarthquakeFilters): Promise<LayerResponse<FeatureCollection<EarthquakeProps>>>;
917
+ }
918
+
919
+ declare class TropicalDomain extends BaseClient {
920
+ /**
921
+ * Get list of currently active tropical storms/hurricanes.
922
+ */
923
+ getActiveStorms(): Promise<LayerResponse<FeatureCollection<StormProps>>>;
924
+ /**
925
+ * Get list of recent tropical storms/hurricanes.
926
+ */
927
+ getRecentStorms(): Promise<LayerResponse<FeatureCollection<StormProps>>>;
928
+ }
929
+
930
+ declare class VolcanicDomain extends BaseClient {
931
+ /**
932
+ * Get list of Holocene volcanoes (Smithsonian Institution).
933
+ * Note: API returns array of Features, normalized to FeatureCollection here.
934
+ */
935
+ getVolcanoes(): Promise<LayerResponse<FeatureCollection<VolcanoProps>>>;
936
+ /**
937
+ * Get list of currently active volcanoes (GDACS).
938
+ */
939
+ getActiveVolcanoes(): Promise<LayerResponse<FeatureCollection<ActiveVolcanoProps>>>;
940
+ }
941
+
942
+ type EventStreamListener = (payload: EventPayload) => void;
943
+ type ErrorListener = (error: unknown) => void;
944
+ declare class EventStream extends EventEmitter {
945
+ private eventSource;
946
+ private readonly url;
947
+ constructor(config: GeoLayersConfig);
948
+ /**
949
+ * Start listening to the event stream.
950
+ */
951
+ connect(): void;
952
+ /**
953
+ * Stop listening to the event stream.
954
+ */
955
+ disconnect(): void;
956
+ /**
957
+ * Subscribe to events.
958
+ * @param event Event name ('data', 'error', or provider name like 'earthquakes')
959
+ * @param listener Callback function
960
+ */
961
+ on(event: 'data', listener: EventStreamListener): this;
962
+ on(event: 'error', listener: ErrorListener): this;
963
+ on(event: string, listener: EventStreamListener): this;
964
+ /**
965
+ * Unsubscribe from events.
966
+ */
967
+ off(event: 'data', listener: EventStreamListener): this;
968
+ off(event: 'error', listener: ErrorListener): this;
969
+ off(event: string, listener: EventStreamListener): this;
970
+ }
971
+
972
+ declare class GeoLayersError extends Error {
973
+ constructor(message: string);
974
+ }
975
+ declare class GeoLayersApiError extends GeoLayersError {
976
+ statusCode: number;
977
+ response?: unknown | undefined;
978
+ constructor(message: string, statusCode: number, response?: unknown | undefined);
979
+ }
980
+ declare class GeoLayersValidationError extends GeoLayersError {
981
+ errors: unknown;
982
+ constructor(message: string, errors: unknown);
983
+ }
984
+
985
+ declare class GeoLayersSDK {
986
+ readonly seismic: SeismicDomain;
987
+ readonly volcanic: VolcanicDomain;
988
+ readonly tropical: TropicalDomain;
989
+ readonly fire: FireDomain;
990
+ readonly weather: WeatherDomain;
991
+ readonly maritime: MaritimeDomain;
992
+ readonly aviation: AviationDomain;
993
+ /** Observation data warehouse and active stations */
994
+ readonly observations: ObservationsDomain;
995
+ /** Real-time event stream (SSE) */
996
+ readonly events: EventStream;
997
+ /** Event metadata operations (REST) */
998
+ readonly eventsMeta: EventsDomain;
999
+ constructor(config: GeoLayersConfig);
1000
+ }
1001
+
1002
+ export { type ActiveVolcanoProps, ActiveVolcanoPropsSchema, type BboxObservationsResult, BboxObservationsResultSchema, DEFAULT_CONFIG, type EarthquakeProps, EarthquakePropsSchema, type EventPayload, EventPayloadSchema, type Feature, type FeatureCollection, type FlightProps, FlightPropsSchema, type FlightScheduleResponse, FlightScheduleResponseSchema, GeoLayersApiError, type GeoLayersConfig, GeoLayersError, GeoLayersSDK, GeoLayersValidationError, type Geometry, GeometrySchema, type LatestObservationResult, LatestObservationResultSchema, type LayerMetadata, LayerMetadataSchema, LayerProvider, type LayerResponse, type MeasurementValue, MeasurementValueSchema, type ObservationProvider, ObservationProviderSchema, type ObservationQueryResult, ObservationQueryResultSchema, type ObservationStatsResult, ObservationStatsResultSchema, type StandardMeasurements, StandardMeasurementsSchema, type StandardObservation, StandardObservationSchema, type StationObservationsResult, StationObservationsResultSchema, type StormProps, StormPropsSchema, type VolcanoProps, VolcanoPropsSchema, type WeatherStationProps, WeatherStationPropsSchema, type WildfireProps, WildfirePropsSchema, createFeatureCollectionSchema, createFeatureSchema, createLayerResponseSchema, GeoLayersSDK as default };