@skypath-io/web-sdk 0.4.13 → 0.4.15

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.
@@ -211,3 +211,13 @@ export function getMiddleArea({ polygon, resolution, extensionFactor }: {
211
211
  resolution: any;
212
212
  extensionFactor: any;
213
213
  }): number[][];
214
+ /**
215
+ * Groups hexagons by `hexId` and selects the most severe (highest `sev`) for each group.
216
+ *
217
+ * @param {Object} options - The function parameter object.
218
+ * @param {Array} options.hexagons - An array of hexagon objects.
219
+ * @returns {Object} - An object where keys are `hexId` values and values are the most severe hexagon in each group.
220
+ */
221
+ export function groupByHexIdAndSelectMostSevere({ hexagons }: {
222
+ hexagons: any[];
223
+ }): any;
@@ -22,6 +22,10 @@ export namespace CONFIG_KEYS {
22
22
  let POLYGON: string;
23
23
  let IS_CORRIDOR_MODE: string;
24
24
  let AIRCRAFT_CATEGORY: string;
25
+ let HISTORY_HOURS: string;
26
+ let MAX_ALTITUDE: string;
27
+ let MIN_ALTITUDE: string;
28
+ let MIN_SEVERITY: string;
25
29
  }
26
30
  export namespace AIRCRAFT_CATEGORY {
27
31
  let C10: string;
@@ -9,10 +9,14 @@ export class ObservationsFlow {
9
9
  stop: () => void;
10
10
  terminate: () => void;
11
11
  get isRunning(): any;
12
- updateConfig: ({ polygon, isCorridorMode, aircraftCategory }: {
12
+ updateConfig: ({ polygon, isCorridorMode, aircraftCategory, historyHours, maxAltitude, minAltitude, minSeverity, }: {
13
13
  polygon: any;
14
14
  isCorridorMode: any;
15
15
  aircraftCategory: any;
16
+ historyHours: any;
17
+ maxAltitude: any;
18
+ minAltitude: any;
19
+ minSeverity: any;
16
20
  }) => void;
17
21
  #private;
18
22
  }
@@ -2,11 +2,19 @@ export class ObservationsService {
2
2
  constructor({ fetcher }: {
3
3
  fetcher: any;
4
4
  });
5
- fetch: ({ polygon, polygonSize, aircraftCategory }: {
5
+ fetch: ({ polygon, polygonSize, aircraftCategory, historyHours, maxAltitude, minAltitude, minSeverity, }: {
6
6
  polygon: any;
7
7
  polygonSize: any;
8
8
  aircraftCategory: any;
9
- }, signal: any) => Promise<any>;
9
+ historyHours: any;
10
+ maxAltitude: any;
11
+ minAltitude: any;
12
+ minSeverity: any;
13
+ }, signal: any) => Promise<{
14
+ toRawObject: () => any;
15
+ toHexagonsArray: () => any[];
16
+ toFeatureCollection: () => any;
17
+ }>;
10
18
  expire: () => void;
11
19
  dispose: () => void;
12
20
  #private;
@@ -1,7 +1,11 @@
1
- export function validateInput({ polygon, isCorridorMode, aircraftCategory }: {
1
+ export function validateInput({ polygon, isCorridorMode, aircraftCategory, historyHours, maxAltitude, minAltitude, minSeverity, }: {
2
2
  polygon: any;
3
3
  isCorridorMode: any;
4
4
  aircraftCategory: any;
5
+ historyHours: any;
6
+ maxAltitude: any;
7
+ minAltitude: any;
8
+ minSeverity: any;
5
9
  }): void;
6
10
  export function mapPolygonToHexIds({ polygon, polygonSize }: {
7
11
  polygon: any;
@@ -11,5 +15,9 @@ export function mapPolygonToHexIds({ polygon, polygonSize }: {
11
15
  childCells: string[];
12
16
  };
13
17
  export function mapReportsArrayToReportsObject(reports: any): any;
14
- export function storeToResult(store: any, selector: any, options?: {}): any;
18
+ export function storeToResult(store: any, selector: any, options: {}, clientFilters: any): {
19
+ toRawObject: () => any;
20
+ toHexagonsArray: () => any[];
21
+ toFeatureCollection: () => any;
22
+ };
15
23
  export function mapResponseToReportsArray(response: any): any;
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@skypath-io/web-sdk",
3
- "version": "0.4.13",
3
+ "version": "0.4.15",
4
4
  "type": "module",
5
5
  "main": "dist/bundle.cjs.js",
6
6
  "module": "dist/bundle.es.js",
7
7
  "unpkg": "dist/bundle.iife.js",
8
8
  "types": "dist/types/index.d.ts",
9
- "description": "Skypath JavaScrip SDK for Web",
9
+ "description": "SkyPath JavaScript SDK for Web",
10
10
  "author": "SkyPath LTD",
11
11
  "files": [
12
12
  "dist",