@trackunit/filters-asset-filter-definitions 2.1.79 → 2.1.83

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,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=entry.js.map
@@ -0,0 +1,3 @@
1
+ {
2
+ "generators": {}
3
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/filters-asset-filter-definitions",
3
- "version": "2.1.79",
3
+ "version": "2.1.83",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -12,24 +12,24 @@
12
12
  "zod": "^3.25.76",
13
13
  "string-ts": "^2.0.0",
14
14
  "tailwind-merge": "^2.0.0",
15
- "@trackunit/iris-app-build-utilities": "2.0.47",
16
- "@trackunit/filters-filter-bar": "2.1.55",
17
- "@trackunit/react-core-hooks": "1.17.63",
18
- "@trackunit/react-filter-components": "2.1.55",
19
- "@trackunit/react-form-components": "2.1.54",
20
- "@trackunit/filters-graphql-hook": "2.1.71",
21
- "@trackunit/utilization-indicator": "2.1.52",
22
- "@trackunit/geo-json-utils": "1.14.55",
23
- "@trackunit/react-components": "2.1.52",
24
- "@trackunit/shared-utils": "1.15.52",
25
- "@trackunit/translations-machine-type": "2.0.56",
26
- "@trackunit/criticality-indicator": "2.1.52",
27
- "@trackunit/iris-app-api": "2.0.44",
28
- "@trackunit/react-core-contexts-test": "1.17.57",
29
- "@trackunit/i18n-library-translation": "2.0.52",
30
- "@trackunit/iris-app-runtime-core-api": "1.16.57",
31
- "@trackunit/react-graphql-hooks": "2.1.52",
32
- "@trackunit/translations-device": "1.1.32"
15
+ "@trackunit/iris-app-build-utilities": "2.0.50",
16
+ "@trackunit/filters-filter-bar": "2.1.58",
17
+ "@trackunit/react-core-hooks": "1.17.66",
18
+ "@trackunit/react-filter-components": "2.1.58",
19
+ "@trackunit/react-form-components": "2.1.57",
20
+ "@trackunit/filters-graphql-hook": "2.1.75",
21
+ "@trackunit/utilization-indicator": "2.1.55",
22
+ "@trackunit/geo-json-utils": "1.14.57",
23
+ "@trackunit/react-components": "2.1.55",
24
+ "@trackunit/shared-utils": "1.15.55",
25
+ "@trackunit/translations-machine-type": "2.0.59",
26
+ "@trackunit/criticality-indicator": "2.1.55",
27
+ "@trackunit/iris-app-api": "2.0.46",
28
+ "@trackunit/react-core-contexts-test": "1.17.60",
29
+ "@trackunit/i18n-library-translation": "2.0.55",
30
+ "@trackunit/iris-app-runtime-core-api": "1.16.60",
31
+ "@trackunit/react-graphql-hooks": "2.1.55",
32
+ "@trackunit/translations-device": "1.1.36"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "@apollo/client": "^3.13.8",
@@ -38,6 +38,7 @@
38
38
  "react": "^19.0.0",
39
39
  "react-hook-form": "^7.62.0"
40
40
  },
41
+ "migrations": "./migrations.json",
41
42
  "module": "./index.esm.js",
42
43
  "main": "./index.cjs.js",
43
44
  "types": "./index.d.ts"
@@ -397,6 +397,18 @@ export declare const fleetDataHealthIssueType: {
397
397
  readonly UNUSUAL_OPERATING_HOURS: "UNUSUAL_OPERATING_HOURS";
398
398
  };
399
399
  export type FleetDataHealthIssueType = (typeof fleetDataHealthIssueType)[keyof typeof fleetDataHealthIssueType];
400
+ export declare const geometryFilterType: {
401
+ readonly MultiPolygon: "MultiPolygon";
402
+ readonly Polygon: "Polygon";
403
+ };
404
+ export type GeometryFilterType = (typeof geometryFilterType)[keyof typeof geometryFilterType];
405
+ export declare const geometryRelation: {
406
+ readonly CONTAINS: "CONTAINS";
407
+ readonly DISJOINT: "DISJOINT";
408
+ readonly INTERSECTS: "INTERSECTS";
409
+ readonly WITHIN: "WITHIN";
410
+ };
411
+ export type GeometryRelation = (typeof geometryRelation)[keyof typeof geometryRelation];
400
412
  export declare const metadataCompleteness: {
401
413
  readonly COMPLETE: "COMPLETE";
402
414
  readonly PARTIAL: "PARTIAL";
@@ -451,9 +463,9 @@ export type AggregatedNumberRange = {
451
463
  range: NumberRange;
452
464
  };
453
465
  export type AreaInput = {
454
- /** The coordinates of the GeoJSON geometry see [the GeoJSON RFC](https://www.rfc-editor.org/rfc/rfc7946.html#section-3.1) for details. */
466
+ /** Coordinates per RFC 7946 ring structure. Rings must be closed; longitude [-180, 180], latitude [-90, 90]. */
455
467
  coordinates: Array<Scalars["GeoJSONCoordinates"]["input"]>;
456
- /** The type of the GeoJSON object. */
468
+ /** The geometry type: Polygon or MultiPolygon. */
457
469
  type: AreaFilterGeoJsonGeometryType;
458
470
  };
459
471
  export type AssetFiltersInput = {
@@ -463,7 +475,10 @@ export type AssetFiltersInput = {
463
475
  activeFilter?: InputMaybe<Scalars["Boolean"]["input"]>;
464
476
  /** List of activities */
465
477
  activities?: InputMaybe<Array<AssetActivityState>>;
466
- /** Filter by area */
478
+ /**
479
+ * Filter by area
480
+ * @deprecated Use geometry instead
481
+ */
467
482
  area?: InputMaybe<AreaInput>;
468
483
  /** A list of asset ID's to do a bulk lookup for. */
469
484
  assetIds?: InputMaybe<Array<Scalars["ID"]["input"]>>;
@@ -471,12 +486,12 @@ export type AssetFiltersInput = {
471
486
  assetTypes?: InputMaybe<Array<AssetType>>;
472
487
  /**
473
488
  * Filter by bounding box
474
- * @deprecated Use area filter instead
489
+ * @deprecated Use geometry filter instead
475
490
  */
476
491
  boundingBox?: InputMaybe<BoundingBoxInput>;
477
492
  /**
478
493
  * Filter by bounding shape
479
- * @deprecated Use area filter instead
494
+ * @deprecated Use geometry filter instead
480
495
  */
481
496
  boundingShape?: InputMaybe<BoundingShapeInput>;
482
497
  /** Filter to only include this list of brands */
@@ -519,6 +534,15 @@ export type AssetFiltersInput = {
519
534
  fleetHealthTypes?: InputMaybe<Array<FleetDataHealthIssueType>>;
520
535
  /** Filter by if the asset is followed */
521
536
  followed?: InputMaybe<Scalars["Boolean"]["input"]>;
537
+ /**
538
+ * Filter assets by geographic area using a Polygon or MultiPolygon (RFC 7946).
539
+ * Holes (interior rings) are supported. Axis-aligned polygons that cross the antimeridian (±180°)
540
+ * are auto-split — no need to pre-split into a MultiPolygon for rectangular viewport queries.
541
+ * For irregular dateline crossings, pre-split manually into a MultiPolygon.
542
+ * Optional relation controls the spatial match (defaults to INTERSECTS).
543
+ * See GeometryFilterInput for the full coordinate contract and unsupported geometry types.
544
+ */
545
+ geometry?: InputMaybe<GeometryFilterInput>;
522
546
  /** Filter by groups */
523
547
  groups?: InputMaybe<Array<Scalars["String"]["input"]>>;
524
548
  /** Filter by insights on the asset. */
@@ -662,6 +686,22 @@ export type DateTimeRange = {
662
686
  /** End date */
663
687
  to?: InputMaybe<Scalars["DateTime"]["input"]>;
664
688
  };
689
+ export type GeometryFilterInput = {
690
+ /**
691
+ * Coordinates following RFC 7946:
692
+ * - Polygon: [ outerRing, holeRing* ] where each ring = [ [lng, lat], ... ]
693
+ * - MultiPolygon: [ [outerRing, holeRing*], [outerRing, holeRing*], ... ]
694
+ */
695
+ coordinates: Array<Scalars["GeoJSONCoordinates"]["input"]>;
696
+ /**
697
+ * Spatial relation between asset location and filter geometry. Defaults to INTERSECTS.
698
+ * Wired through to Elasticsearch geo_shape queries (INTERSECTS, DISJOINT, WITHIN, CONTAINS).
699
+ * Legacy area / boundingShape paths keep INTERSECTS behaviour.
700
+ */
701
+ relation?: InputMaybe<GeometryRelation>;
702
+ /** The geometry type: Polygon or MultiPolygon. */
703
+ type: GeometryFilterType;
704
+ };
665
705
  export type InsightsFilters = {
666
706
  /** The asset's after treatment diesel exhaust fluid tank level */
667
707
  afterTreatmentDieselExhaustFluidTankLevel?: InputMaybe<NumberRange>;