@new-project-media/client-frontends-shared-types 1.4.2 → 1.4.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@new-project-media/client-frontends-shared-types",
3
- "version": "1.4.2",
3
+ "version": "1.4.3",
4
4
  "scripts": {
5
5
  "build": "tsc -p tsconfig.json",
6
6
  "postbuild": "mkdir -p ../../dist/packages/client-frontends-shared-types/ && cp package.json ../../dist/packages/client-frontends-shared-types/",
@@ -59,7 +59,7 @@ export interface ChartAggregationBucket extends Omit<AggregationBucket, 'id'> {
59
59
  id?: string;
60
60
  [key: string]: number | string | undefined;
61
61
  }
62
- export declare const isAggregationItem: (item: AggregationItem | FilteredAggregation | CentroidAggregation | undefined) => item is AggregationItem;
62
+ export declare const isAggregationItem: (item: AggregationItem | FilteredAggregation | CentroidAggregation | BoundsAggregation | undefined) => item is AggregationItem;
63
63
  export type CentroidAggregation = {
64
64
  count: number;
65
65
  location: {
@@ -67,7 +67,20 @@ export type CentroidAggregation = {
67
67
  lon: number;
68
68
  };
69
69
  };
70
- export declare const isCentroidAggregation: (item: AggregationItem | FilteredAggregation | CentroidAggregation | undefined) => item is CentroidAggregation;
70
+ export declare const isCentroidAggregation: (item: AggregationItem | FilteredAggregation | CentroidAggregation | BoundsAggregation | undefined) => item is CentroidAggregation;
71
+ export type BoundsAggregation = {
72
+ bounds: {
73
+ bottom_right: {
74
+ lat: number;
75
+ lon: number;
76
+ };
77
+ top_left: {
78
+ lat: number;
79
+ lon: number;
80
+ };
81
+ };
82
+ };
83
+ export declare const isBoundsAggregation: (item: AggregationItem | FilteredAggregation | CentroidAggregation | BoundsAggregation | undefined) => item is BoundsAggregation;
71
84
  type AggregationParam = {
72
85
  primary: string;
73
86
  secondary?: string;
@@ -116,7 +129,7 @@ export type ClientApiListResponse<T> = {
116
129
  total: number;
117
130
  };
118
131
  data: T[];
119
- aggregations?: Record<string, AggregationItem | FilteredAggregation | CentroidAggregation>;
132
+ aggregations?: Record<string, AggregationItem | FilteredAggregation | CentroidAggregation | BoundsAggregation>;
120
133
  };
121
134
  export type ClientApiSingleItemResponse<T> = {
122
135
  paging: {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FilterOperator = exports.isCentroidAggregation = exports.isAggregationItem = void 0;
3
+ exports.FilterOperator = exports.isBoundsAggregation = exports.isCentroidAggregation = exports.isAggregationItem = void 0;
4
4
  const isAggregationItem = (item) => {
5
5
  return !!item && 'buckets' in item;
6
6
  };
@@ -9,6 +9,10 @@ const isCentroidAggregation = (item) => {
9
9
  return !!item && 'location' in item;
10
10
  };
11
11
  exports.isCentroidAggregation = isCentroidAggregation;
12
+ const isBoundsAggregation = (item) => {
13
+ return !!item && 'bounds' in item;
14
+ };
15
+ exports.isBoundsAggregation = isBoundsAggregation;
12
16
  var FilterOperator;
13
17
  (function (FilterOperator) {
14
18
  FilterOperator["equals"] = "eq";
@@ -1 +1 @@
1
- {"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../../../../packages/client-frontends-shared-types/src/lib/dataGrid/api/common.ts"],"names":[],"mappings":";;;AA+EO,MAAM,iBAAiB,GAAG,CAC/B,IAA6E,EACpD,EAAE;IAC3B,OAAO,CAAC,CAAC,IAAI,IAAI,SAAS,IAAI,IAAI,CAAA;AACpC,CAAC,CAAA;AAJY,QAAA,iBAAiB,qBAI7B;AAUM,MAAM,qBAAqB,GAAG,CACnC,IAA6E,EAChD,EAAE;IAC/B,OAAO,CAAC,CAAC,IAAI,IAAI,UAAU,IAAI,IAAI,CAAA;AACrC,CAAC,CAAA;AAJY,QAAA,qBAAqB,yBAIjC;AAYD,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,+BAAa,CAAA;IACb,kCAAgB,CAAA;AAClB,CAAC,EAHW,cAAc,8BAAd,cAAc,QAGzB"}
1
+ {"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../../../../packages/client-frontends-shared-types/src/lib/dataGrid/api/common.ts"],"names":[],"mappings":";;;AA+EO,MAAM,iBAAiB,GAAG,CAC/B,IAKa,EACY,EAAE;IAC3B,OAAO,CAAC,CAAC,IAAI,IAAI,SAAS,IAAI,IAAI,CAAA;AACpC,CAAC,CAAA;AATY,QAAA,iBAAiB,qBAS7B;AAUM,MAAM,qBAAqB,GAAG,CACnC,IAKa,EACgB,EAAE;IAC/B,OAAO,CAAC,CAAC,IAAI,IAAI,UAAU,IAAI,IAAI,CAAA;AACrC,CAAC,CAAA;AATY,QAAA,qBAAqB,yBASjC;AASM,MAAM,mBAAmB,GAAG,CACjC,IAKa,EACc,EAAE;IAC7B,OAAO,CAAC,CAAC,IAAI,IAAI,QAAQ,IAAI,IAAI,CAAA;AACnC,CAAC,CAAA;AATY,QAAA,mBAAmB,uBAS/B;AAYD,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,+BAAa,CAAA;IACb,kCAAgB,CAAA;AAClB,CAAC,EAHW,cAAc,8BAAd,cAAc,QAGzB"}