@skypath-io/web-sdk 0.4.7 → 0.4.13

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.
Files changed (60) hide show
  1. package/CHANGELOG.md +285 -0
  2. package/LICENSE.txt +7 -0
  3. package/README.md +4 -4
  4. package/dist/bundle.cjs.js +6 -0
  5. package/dist/bundle.es.js +6 -0
  6. package/dist/bundle.iife.js +6 -0
  7. package/dist/types/src/core/auth/auth.d.ts +27 -0
  8. package/dist/types/src/core/auth/consts.d.ts +30 -0
  9. package/dist/types/src/core/auth/index.d.ts +1 -0
  10. package/dist/types/src/core/auth/utils.d.ts +3 -0
  11. package/dist/types/src/core/emitter/emitter.d.ts +8 -0
  12. package/dist/types/src/core/emitter/index.d.ts +1 -0
  13. package/dist/types/src/core/flow/consts.d.ts +18 -0
  14. package/dist/types/src/core/flow/flow.d.ts +11 -0
  15. package/dist/types/src/core/flow/index.d.ts +1 -0
  16. package/dist/types/src/core/geo/geo.d.ts +213 -0
  17. package/dist/types/src/core/geo/index.d.ts +1 -0
  18. package/dist/types/src/core/index.d.ts +2 -0
  19. package/dist/types/src/core/monitoring/consts.d.ts +9 -0
  20. package/dist/types/src/core/monitoring/datadog.d.ts +10 -0
  21. package/dist/types/src/core/monitoring/errors.d.ts +29 -0
  22. package/dist/types/src/core/utils/index.d.ts +1 -0
  23. package/dist/types/src/core/utils/utils.d.ts +71 -0
  24. package/dist/types/src/features/adsb/consts.d.ts +26 -0
  25. package/dist/types/src/features/adsb/flow.d.ts +17 -0
  26. package/dist/types/src/features/adsb/index.d.ts +2 -0
  27. package/dist/types/src/features/adsb/service.d.ts +12 -0
  28. package/dist/types/src/features/adsb/utils.d.ts +14 -0
  29. package/dist/types/src/features/aircraft/consts.d.ts +3 -0
  30. package/dist/types/src/features/aircraft/index.d.ts +1 -0
  31. package/dist/types/src/features/aircraft/service.d.ts +31 -0
  32. package/dist/types/src/features/cacheToken/consts.d.ts +3 -0
  33. package/dist/types/src/features/cacheToken/index.d.ts +2 -0
  34. package/dist/types/src/features/cacheToken/service.d.ts +11 -0
  35. package/dist/types/src/features/cacheToken/utils.d.ts +10 -0
  36. package/dist/types/src/features/gtg/consts.d.ts +4 -0
  37. package/dist/types/src/features/gtg/index.d.ts +1 -0
  38. package/dist/types/src/features/gtg/service.d.ts +13 -0
  39. package/dist/types/src/features/gtg/utils.d.ts +3 -0
  40. package/dist/types/src/features/nowcasting/consts.d.ts +20 -0
  41. package/dist/types/src/features/nowcasting/flow.d.ts +55 -0
  42. package/dist/types/src/features/nowcasting/index.d.ts +2 -0
  43. package/dist/types/src/features/nowcasting/service.d.ts +13 -0
  44. package/dist/types/src/features/nowcasting/utils.d.ts +82 -0
  45. package/dist/types/src/features/observations/consts.d.ts +73 -0
  46. package/dist/types/src/features/observations/flow.d.ts +18 -0
  47. package/dist/types/src/features/observations/index.d.ts +2 -0
  48. package/dist/types/src/features/observations/service.d.ts +13 -0
  49. package/dist/types/src/features/observations/utils.d.ts +15 -0
  50. package/dist/types/src/features/oneLayer/consts.d.ts +76 -0
  51. package/dist/types/src/features/oneLayer/flow.d.ts +21 -0
  52. package/dist/types/src/features/oneLayer/index.d.ts +2 -0
  53. package/dist/types/src/features/oneLayer/service.d.ts +19 -0
  54. package/dist/types/src/features/oneLayer/utils.d.ts +79 -0
  55. package/dist/types/src/index.d.ts +123 -0
  56. package/dist/types/src/publicApi.d.ts +25 -0
  57. package/package.json +56 -7
  58. package/bundle.cjs.js +0 -6
  59. package/bundle.es.js +0 -6
  60. package/bundle.iife.js +0 -6
@@ -0,0 +1,27 @@
1
+ export class AuthService {
2
+ constructor({ environment, proxyUrl }: {
3
+ environment: any;
4
+ proxyUrl: any;
5
+ });
6
+ authenticate: ({ apiKey, userId, companyName, authCallback }: {
7
+ apiKey: any;
8
+ userId: any;
9
+ companyName: any;
10
+ authCallback: any;
11
+ }) => Promise<{
12
+ fetcher: ({ path, method, params, headers, body, signal, retry, }: {
13
+ path?: string;
14
+ method?: string;
15
+ params: any;
16
+ headers?: {};
17
+ body?: any;
18
+ signal?: any;
19
+ retry?: number;
20
+ }) => Promise<any>;
21
+ me: {
22
+ companyId: any;
23
+ userId: any;
24
+ };
25
+ }>;
26
+ #private;
27
+ }
@@ -0,0 +1,30 @@
1
+ export const DEFAULT_API_BASE_URL: "https://api.skypath.io";
2
+ export namespace ALLOWED_PROTOCOLS {
3
+ let HTTP: string;
4
+ let HTTPS: string;
5
+ }
6
+ export namespace ALLOWED_HEADERS {
7
+ let AUTH_API_KEY: string;
8
+ let AUTH_TOKEN: string;
9
+ let CONTENT_TYPE: string;
10
+ }
11
+ export namespace ALLOWED_METHODS {
12
+ let GET: string;
13
+ let POST: string;
14
+ }
15
+ export namespace PATHS {
16
+ let PARTNER_LOGIN: string;
17
+ let PARTNER_LOGIN_SIGNED: string;
18
+ let PARTNER_REFRESH_TOKEN: string;
19
+ let ME: string;
20
+ }
21
+ export const REQUEST_ABORTED_MESSAGE: "[SkyPath SDK]: Old fetch request aborted";
22
+ export namespace ENVIRONMENTS {
23
+ let LOCAL: string;
24
+ let DEVELOPMENT: string;
25
+ let STAGING: string;
26
+ let PRODUCTION: string;
27
+ }
28
+ export const API_BASE_URLS: {
29
+ [x: string]: string;
30
+ };
@@ -0,0 +1 @@
1
+ export * from "./auth.js";
@@ -0,0 +1,3 @@
1
+ export function getErrorMessage({ response }: {
2
+ response: any;
3
+ }): Promise<string>;
@@ -0,0 +1,8 @@
1
+ export class EventEmitter {
2
+ on(event: any, listener: any): void;
3
+ off(event: any, listener: any): void;
4
+ emit(event: any, ...args: any[]): void;
5
+ once(event: any, listener: any): void;
6
+ clear(): void;
7
+ #private;
8
+ }
@@ -0,0 +1 @@
1
+ export * from "./emitter";
@@ -0,0 +1,18 @@
1
+ export namespace ERROR_MESSAGES {
2
+ let NOT_RUNNING: string;
3
+ let NOT_STOPPED: string;
4
+ let ALREADY_STARTED: string;
5
+ let ALREADY_TERMINATED: string;
6
+ }
7
+ export namespace STATES {
8
+ let INITIALIZED: string;
9
+ let RUNNING: string;
10
+ let STOPPED: string;
11
+ let TERMINATED: string;
12
+ }
13
+ export namespace DEFAULT_FILTER_VALUES {
14
+ let HOURS_AGO: number;
15
+ let SEVERITY: number;
16
+ let ALT_FROM: number;
17
+ let ALT_TO: number;
18
+ }
@@ -0,0 +1,11 @@
1
+ export class Flow {
2
+ start(): void;
3
+ stop(): void;
4
+ terminate(): void;
5
+ get isInitialRun(): boolean;
6
+ get state(): string;
7
+ get isRunning(): boolean;
8
+ get isStopped(): boolean;
9
+ get isTerminated(): boolean;
10
+ #private;
11
+ }
@@ -0,0 +1 @@
1
+ export * from "./flow";
@@ -0,0 +1,213 @@
1
+ export const HEX_RESOLUTION_BUFFERS: {
2
+ 0: number;
3
+ 1: number;
4
+ };
5
+ export namespace POLYGON_TYPE {
6
+ let SMALL: string;
7
+ let MEDIUM: string;
8
+ let LARGE: string;
9
+ let CORRIDOR: string;
10
+ }
11
+ /**
12
+ * Generates a GeoJSON FeatureCollection from H3 hexagon IDs, adjusting coordinates for antimeridian crossing
13
+ * and ensuring valid longitude and latitude ranges, without mutating the original data.
14
+ *
15
+ * @param {Array<{hexId: string}>} hexagons - Array of objects containing 'hexId' for H3 hexagons.
16
+ * @param {number} [scale=1] - Optional. The scale factor to apply to the hexagons.
17
+ * @returns {Object} A GeoJSON FeatureCollection representing the hexagons.
18
+ */
19
+ export function getHexagonsFeatureCollection(hexagons?: Array<{
20
+ hexId: string;
21
+ }>, scale?: number): any;
22
+ /**
23
+ * Gets H3 hexagon IDs that intersect with the given map bounds at a specified resolution.
24
+ *
25
+ * @param {Array<number>} mapBounds - The bounding box of the map.
26
+ * @param {number} resolution - The H3 resolution to use.
27
+ * @returns {Array<string>} An array of H3 hexagon IDs.
28
+ */
29
+ export function getHexIdsByMapBoundsAndResolution(mapBounds: Array<number>, resolution?: number): Array<string>;
30
+ /**
31
+ * Gets viewport H3 hexagon IDs from a Mapbox map instance.
32
+ *
33
+ * @param {object} map - The Mapbox map instance.
34
+ * @param {number} [resolution] - Optional. The H3 resolution to use.
35
+ * @returns {Array<string>} An array of H3 hexagon IDs.
36
+ */
37
+ export function getHexIdsFromMapboxMap(map: object, resolution?: number): Array<string>;
38
+ /**
39
+ * Gets H3 hexagon IDs that intersect with the given polygon at a specified resolution.
40
+ *
41
+ * @param {Array<Array<number>>} polygon
42
+ * @param {number} resolution
43
+ * @param {boolean} shouldInvertLatLng
44
+ * @returns {Array<string>} An array of H3 hexagon IDs.
45
+ */
46
+ export function getHexIdsByPolygonAndResolution(polygon: Array<Array<number>>, resolution?: number, shouldInvertLatLng?: boolean): Array<string>;
47
+ /**
48
+ * Gets viewport polygon from a Mapbox map instance.
49
+ *
50
+ * @param {object} map - The Mapbox map instance.
51
+ * @returns {number[][]} lat lng polygon.
52
+ */
53
+ export function getMapPolygon(map: object): number[][];
54
+ /**
55
+ * Inverts the order of longitude and latitude in a coordinate pair.
56
+ *
57
+ * @param {Array<number>} coordinate - The coordinate pair to invert.
58
+ * @returns {Array<number>} The inverted coordinate pair.
59
+ */
60
+ export function invertLatLng([lng, lat]: Array<number>): Array<number>;
61
+ /**
62
+ * Adjusts the longitude of geographical coordinates in an array to account for antimeridian crossing.
63
+ * The antimeridian is a meridian at 180 degrees longitude, crossing which requires adjusting coordinates
64
+ * for continuity in geographical data representation.
65
+ *
66
+ * @param {Array<Array<number>>} coordinates - An array of coordinates, where each coordinate is a cortege of 2 numbers. The first element in each coordinate array is expected to be the longitude.
67
+ * @returns {Array<Array<number>>} A new array with adjusted coordinates `Array<[number, number]>`.
68
+ */
69
+ export function adjustAntiMeridianCrossing(coordinates: Array<Array<number>>): Array<Array<number>>;
70
+ /**
71
+ * Adjusts the coordinates of a feature to handle antimeridian crossing and ensures
72
+ * that longitude and latitude values are within their valid ranges.
73
+ *
74
+ * @param {Array<Array<number>>} coordinates - The array of coordinates to adjust.
75
+ * @returns {Array<Array<number>>} The adjusted array of coordinates.
76
+ */
77
+ export function adjustFeatureCoordinates(coordinates: Array<Array<number>>): Array<Array<number>>;
78
+ /**
79
+ * Convert a single H3 hexagon to a `Polygon` GEOJson feature
80
+ *
81
+ * @param {string} h3Index Hexagon index
82
+ * @param {object} [properties] Optional feature properties
83
+ * @return {object} GeoJSON Feature object
84
+ */
85
+ export function h3ToFeature(h3Index: string, properties?: object): object;
86
+ /**
87
+ * Convert a set of H3 hexagons to a GeoJSON `FeatureCollection` with each hexagon
88
+ * in a separate `Polygon` feature with optional properties.
89
+ *
90
+ * @param {Array<string>} hexagons Hexagon addresses
91
+ * @param {Function} [getProperties] Optional function returning properties for a hexagon: f(h3Index) => Object
92
+ * @return {Object} GeoJSON FeatureCollection object
93
+ */
94
+ export function h3SetToFeatureCollection(hexagons: Array<string>, getProperties?: Function): any;
95
+ /**
96
+ * Normalizes the coordinates of a polygon or line string to account for antimeridian crossing.
97
+ *
98
+ * @param {Array<Array<number>>} array - The array of coordinates to normalize.
99
+ * @returns {Array<Array<number>>} The normalized array of coordinates.
100
+ */
101
+ export function normalizeAntiMeridian(array: Array<Array<number>>): Array<Array<number>>;
102
+ /**
103
+ * Ensures longitude and latitude values are within their valid ranges.
104
+ *
105
+ * @param {Array<number>} coordinate - The [longitude, latitude] pair to adjust.
106
+ * @returns {Array<number>} The adjusted [longitude, latitude] pair.
107
+ */
108
+ export function clampCoordinates([lng, lat]: Array<number>): Array<number>;
109
+ /**
110
+ * Filters hexagons (observations, ADS-B) data based on provided filters.
111
+ *
112
+ * @param {Object} params - The parameters.
113
+ * @param {Object} params.data - The hexagons data.
114
+ * @param {Object} params.filters - The filters to apply.
115
+ * @param {number} [params.filters.hoursAgo] - The number of hours ago to filter data.
116
+ * @param {number} [params.filters.altitudeFrom] - The minimum altitude to filter data.
117
+ * @param {number} [params.filters.altitudeTo] - The maximum altitude to filter data.
118
+ * @param {number} [params.filters.severity] - The minimum severity to filter data.
119
+ * @returns {Object} The filtered hexagons data.
120
+ */
121
+ export function getHexagonsDataSlice({ data, filters }: {
122
+ data: any;
123
+ filters: {
124
+ hoursAgo?: number;
125
+ altitudeFrom?: number;
126
+ altitudeTo?: number;
127
+ severity?: number;
128
+ };
129
+ }): any;
130
+ /**
131
+ * Filters hexagons (observations, ADS-B) data based on provided filters.
132
+ *
133
+ * @param {Object} params - The parameters.
134
+ * @param {Object} params.data - The hexagons data.
135
+ * @param {Object} params.filters - The filters to apply.
136
+ * @param {number} [params.filters.altitudeFrom] - The minimum altitude to filter data.
137
+ * @param {number} [params.filters.altitudeTo] - The maximum altitude to filter data.
138
+ * @param {number} [params.filters.severity] - The minimum severity to filter data.
139
+ * @returns {Object} The filtered hexagon data.
140
+ */
141
+ export function getOneLayerHexagonsDataSlice({ data, filters }: {
142
+ data: any;
143
+ filters: {
144
+ altitudeFrom?: number;
145
+ altitudeTo?: number;
146
+ severity?: number;
147
+ };
148
+ }): any;
149
+ /**
150
+ * Prepares hexagons data for map hexagons.
151
+ *
152
+ * @param {Object} params - The parameters.
153
+ * @param {Object} params.data - The hexagons data.
154
+ * @param {number} [params.resolution=DEFAULT_MAP_DISPLAY_RESOLUTION] - The resolution for the map hexagons.
155
+ * @returns {Array} The prepared hexagons data for map hexagons.
156
+ */
157
+ export function prepareHexagonsDataForMapHexagons({ data, resolution, }: {
158
+ data: any;
159
+ resolution?: number;
160
+ }): any[];
161
+ /**
162
+ * Prepares hexagons data for map hexagons.
163
+ *
164
+ * @param {Object} params - The parameters.
165
+ * @param {Object} params.data - The hexagons data.
166
+ * @param {number} [params.resolution=DEFAULT_MAP_DISPLAY_RESOLUTION] - The resolution for the map hexagons.
167
+ * @returns {Array} The prepared hexagons data for map hexagons.
168
+ */
169
+ export function prepareOneLayerHexagonsDataForMapHexagons({ data, resolution, }: {
170
+ data: any;
171
+ resolution?: number;
172
+ }): any[];
173
+ /**
174
+ * Extends a polygon by a resolution-dependent buffer size.
175
+ *
176
+ * @param {Object} params - The parameters.
177
+ * @param {Array<Array<number>>} params.polygon - The polygon to extend.
178
+ * @param {number} params.resolution - The resolution to use.
179
+ * @param {number} [params.extensionFactor=1] - The factor by which to extend the polygon.
180
+ * @returns {Array<Array<number>>} The extended polygon.
181
+ */
182
+ export function extendPolygonByResolution({ polygon, resolution, extensionFactor, }: {
183
+ polygon: Array<Array<number>>;
184
+ resolution: number;
185
+ extensionFactor?: number;
186
+ }): Array<Array<number>>;
187
+ /**
188
+ * Gets the zoom level of a polygon.
189
+ *
190
+ * @param {Object} params - The parameters.
191
+ * @param {Array<Array<number>>} params.polygon - The polygon.
192
+ * @param {number} [params.precision=1] - The precision.
193
+ * @returns {number} The zoom level.
194
+ */
195
+ export function getZoomLevel({ polygon, precision }: {
196
+ polygon: Array<Array<number>>;
197
+ precision?: number;
198
+ }): number;
199
+ export function getPolygonSize(polygon: any, mapping?: {
200
+ [x: string]: number;
201
+ }): string;
202
+ /**
203
+ * Get mercator center from bbox
204
+ *
205
+ * @param {number[]} bbox - [minLon, minLat, maxLon, maxLat]
206
+ * @returns {number[]} [lat, lon]
207
+ */
208
+ export function getMercatorCenterFromBbox(bbox: number[]): number[];
209
+ export function getMiddleArea({ polygon, resolution, extensionFactor }: {
210
+ polygon: any;
211
+ resolution: any;
212
+ extensionFactor: any;
213
+ }): number[][];
@@ -0,0 +1 @@
1
+ export * from "./geo";
@@ -0,0 +1,2 @@
1
+ export * from "./utils";
2
+ export * from "./geo";
@@ -0,0 +1,9 @@
1
+ export namespace PREFIXES {
2
+ let SDK: string;
3
+ let NETWORK: string;
4
+ }
5
+ export const CLIENT_TOKEN: "pub0b945dd1505a74367a4f900219c56210";
6
+ export const SERVICE_NAME: "skypath-web-sdk";
7
+ export const DATADOG_SITE: "datadoghq.com";
8
+ export const SDK_LOGGER_NAME: "SDKLogger";
9
+ export const SDK_VERSION: string;
@@ -0,0 +1,10 @@
1
+ export function initDatadog({ isEnabled, collectConsole, collectErrors, applicationId, environment, companyId, userId, }: {
2
+ isEnabled: any;
3
+ collectConsole: any;
4
+ collectErrors: any;
5
+ applicationId: any;
6
+ environment: any;
7
+ companyId: any;
8
+ userId: any;
9
+ }): void;
10
+ export function getLogger(): import("@datadog/browser-logs").Logger;
@@ -0,0 +1,29 @@
1
+ export namespace ERROR_MESSAGES {
2
+ let INVALID_LISTENER: string;
3
+ let MISSING_AUTH_PARAMS: string;
4
+ let FAILED_TO_AUTHENTICATE_WITH_AUTH_CALLBACK: string;
5
+ let FAILED_TO_AUTHENTICATE_WITH_API_KEY: string;
6
+ let FAILED_TO_GET_AUTH_TOKEN: string;
7
+ }
8
+ export class SkyPathError extends Error {
9
+ constructor({ error, context }: {
10
+ error: any;
11
+ context?: {};
12
+ });
13
+ context: {};
14
+ }
15
+ export class ValidationError extends SkyPathError {
16
+ constructor(message: any, context?: {});
17
+ }
18
+ export class NetworkError extends SkyPathError {
19
+ constructor(message: any, context?: {});
20
+ }
21
+ export class InitializationError extends SkyPathError {
22
+ constructor(message: any, context?: {});
23
+ }
24
+ export class AuthenticationError extends SkyPathError {
25
+ constructor(message: any, context?: {});
26
+ }
27
+ export class FlowError extends SkyPathError {
28
+ constructor(message: any, context?: {});
29
+ }
@@ -0,0 +1 @@
1
+ export * from "./utils";
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Debounces a function to prevent it from being called multiple times within a specified delay.
3
+ *
4
+ * @param {Function} fn - The function to debounce.
5
+ * @param {number} delay - The delay in milliseconds.
6
+ * @returns {Function} - The debounced function.
7
+ */
8
+ export function debounce(fn: Function, delay: number): Function;
9
+ /**
10
+ * Throttles a function to prevent it from being called multiple times within a specified delay.
11
+ *
12
+ * @param {Function} fn - The function to throttle.
13
+ * @param {number} delay - The delay in milliseconds.
14
+ * @returns {Function} - The throttled function.
15
+ */
16
+ export function throttle(fn: Function, delay: number): Function;
17
+ /**
18
+ * Merges two arrays of objects by a specified property.
19
+ *
20
+ * @param {object[]} target - target array of objects
21
+ * @param {object[]} source - source array of objects
22
+ * @param {string} propName - the prop name of the object to marge by
23
+ * @returns {object[]}
24
+ */
25
+ export function mergeByProperty(target: object[], source: object[], propName: string): object[];
26
+ /**
27
+ * Builds a data key from components.
28
+ * @param {object} options
29
+ * @param {string[]} options.components - The components to build the data key from.
30
+ * @param {string} [options.separator] - The separator to use.
31
+ * @returns {string} - The data key.
32
+ */
33
+ export function buildDataKeyFromComponents({ components, separator, }: {
34
+ components: string[];
35
+ separator?: string;
36
+ }): string;
37
+ /**
38
+ * Parses a data key into components.
39
+ * @param {object} options
40
+ * @param {string} options.dataKey - The data key to parse.
41
+ * @param {string} [options.separator] - The separator to use.
42
+ * @returns {string[]} - The components.
43
+ */
44
+ export function parseDataKeyToComponents({ dataKey, separator, }: {
45
+ dataKey: string;
46
+ separator?: string;
47
+ }): string[];
48
+ /**
49
+ * Maps an aircraft ICAO code to an aircraft type.
50
+ * @param {object} options
51
+ * @param {string} options.icao - The aircraft ICAO code.
52
+ * @param {object[]} options.mapping - The aircraft mapping.
53
+ * @returns {string} - The aircraft type.
54
+ * @throws {Error} - Throws an error if the aircraft type is not found.
55
+ */
56
+ export function mapAircraftIcaoToAircraftType({ icao, mapping }: {
57
+ icao: string;
58
+ mapping: object[];
59
+ }): string;
60
+ export function isUndefined(value: any): boolean;
61
+ export function isFunction(fn: any): boolean;
62
+ export function isObject(value: any): boolean;
63
+ export function isChanged(current: any, next: any): any;
64
+ export function getTimer(time: any): {
65
+ run: (callback: any) => void;
66
+ cancel: () => void;
67
+ };
68
+ export function getChangedFields({ current, next }: {
69
+ current: any;
70
+ next: any;
71
+ }): Set<any>;
@@ -0,0 +1,26 @@
1
+ export namespace PATHS {
2
+ let DATA: string;
3
+ }
4
+ export namespace DEFAULT_FILTER_VALUES {
5
+ let HOURS_AGO: number;
6
+ let SEVERITY: number;
7
+ let ALT_FROM: number;
8
+ let ALT_TO: number;
9
+ }
10
+ export const SIZE_TO_RESOLUTION_MAP: {
11
+ [x: string]: number;
12
+ };
13
+ export const SIZE_TO_MIN_SEVERITY_MAP: {
14
+ [x: string]: number;
15
+ };
16
+ export const SIZE_TO_EXTENSION_FACTOR_MAP: {
17
+ [x: string]: number;
18
+ };
19
+ export const DEBOUNCE_TIME_SEC: number;
20
+ export const REFRESH_TIME_SEC: number;
21
+ export namespace CONFIG_KEYS {
22
+ let POLYGON: string;
23
+ let IS_CORRIDOR_MODE: string;
24
+ }
25
+ export const DEFAULT_RESOLUTION: 1;
26
+ export const MAP_RESOLUTION: 5;
@@ -0,0 +1,17 @@
1
+ export class ADSBFlow {
2
+ constructor({ fetcher }: {
3
+ fetcher: any;
4
+ });
5
+ onData: (callback: any) => void;
6
+ onError: (callback: any) => void;
7
+ onIsProcessingChange: (callback: any) => void;
8
+ start: () => void;
9
+ stop: () => void;
10
+ terminate: () => void;
11
+ get isRunning(): any;
12
+ updateConfig: ({ polygon, isCorridorMode }: {
13
+ polygon: any;
14
+ isCorridorMode: any;
15
+ }) => void;
16
+ #private;
17
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./flow";
2
+ export * from "./service";
@@ -0,0 +1,12 @@
1
+ export class ADSBService {
2
+ constructor({ fetcher }: {
3
+ fetcher: any;
4
+ });
5
+ fetch: ({ polygon, polygonSize }: {
6
+ polygon: any;
7
+ polygonSize: any;
8
+ }, signal: any) => Promise<any>;
9
+ expire: () => void;
10
+ dispose: () => void;
11
+ #private;
12
+ }
@@ -0,0 +1,14 @@
1
+ export function validateInput({ polygon, isCorridorMode }: {
2
+ polygon: any;
3
+ isCorridorMode: any;
4
+ }): void;
5
+ export function mapPolygonToHexIds({ polygon, polygonSize }: {
6
+ polygon: any;
7
+ polygonSize: any;
8
+ }): {
9
+ hexIds: string[];
10
+ childCells: string[];
11
+ };
12
+ export function mapReportsArrayToReportsObject(reports: any): any;
13
+ export function storeToResult(store: any, selector: any, options?: {}): any;
14
+ export function mapResponseToReportsArray(response: any): any;
@@ -0,0 +1,3 @@
1
+ export namespace PATHS {
2
+ let MAPPING: string;
3
+ }
@@ -0,0 +1 @@
1
+ export * from "./service";
@@ -0,0 +1,31 @@
1
+ export class AircraftService {
2
+ constructor({ fetcher }: {
3
+ fetcher: any;
4
+ });
5
+ /**
6
+ * Fetches the aircraft mapping.
7
+ * @returns {Promise<Array<{
8
+ * id: string,
9
+ * icao: string,
10
+ * iata: string,
11
+ * group: string,
12
+ * title: string,
13
+ * size: string,
14
+ * family: string,
15
+ * created_at: string,
16
+ * updated_at: string
17
+ * }>>} - The aircraft mapping.
18
+ */
19
+ getMapping(): Promise<Array<{
20
+ id: string;
21
+ icao: string;
22
+ iata: string;
23
+ group: string;
24
+ title: string;
25
+ size: string;
26
+ family: string;
27
+ created_at: string;
28
+ updated_at: string;
29
+ }>>;
30
+ #private;
31
+ }
@@ -0,0 +1,3 @@
1
+ export namespace PATHS {
2
+ let TOKEN: string;
3
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./service";
2
+ export * from "./utils";
@@ -0,0 +1,11 @@
1
+ export class CacheTokenService {
2
+ constructor({ fetcher }: {
3
+ fetcher: any;
4
+ });
5
+ getToken: () => Promise<any>;
6
+ checkToken: (token: {
7
+ expireAt: string;
8
+ token: string;
9
+ }) => boolean;
10
+ #private;
11
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Check if the token is valid
3
+ *
4
+ * @param {{ expireAt: string, token: string }} token
5
+ * @returns {boolean}
6
+ */
7
+ export function checkTokenIsValid(token: {
8
+ expireAt: string;
9
+ token: string;
10
+ }): boolean;
@@ -0,0 +1,4 @@
1
+ export namespace PATHS {
2
+ let INFO: string;
3
+ let DATA: string;
4
+ }
@@ -0,0 +1 @@
1
+ export * from "./service";
@@ -0,0 +1,13 @@
1
+ export class GtgService {
2
+ constructor({ fetcher }: {
3
+ fetcher: any;
4
+ });
5
+ getInfo(): Promise<any>;
6
+ getData({ resolution, hexId, lastUpdatedAt, token }: {
7
+ resolution: any;
8
+ hexId: any;
9
+ lastUpdatedAt: any;
10
+ token: any;
11
+ }): Promise<any>;
12
+ #private;
13
+ }
@@ -0,0 +1,3 @@
1
+ export function getSeverityValueByEdrValue({ edrValue }: {
2
+ edrValue: any;
3
+ }): 0 | 1 | 2 | 3 | 4;
@@ -0,0 +1,20 @@
1
+ export const DEFAULT_INTERVAL_TIME_MS: number;
2
+ export const DEFAULT_RESOLUTION: 0;
3
+ export const DEFAULT_MAP_DISPLAY_RESOLUTION: 5;
4
+ export namespace PATHS {
5
+ let INFO: string;
6
+ let DATA: string;
7
+ }
8
+ export namespace INTERNAL_EVENTS {
9
+ let DATA_1: string;
10
+ export { DATA_1 as DATA };
11
+ export let UPDATE_CONFIG: string;
12
+ export let UPDATE_INTERVAL: string;
13
+ export let LOAD_NOWCASTING_DATA: string;
14
+ export let IS_PENDING_CHANGE: string;
15
+ }
16
+ export namespace DEFAULT_FILTER_VALUES {
17
+ let FORECAST: number;
18
+ let SEVERITY: number;
19
+ let ALTITUDE: number;
20
+ }