@new-project-media/client-frontends-shared-types 1.0.9 → 1.0.11

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.0.9",
3
+ "version": "1.0.11",
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/",
@@ -62,12 +62,18 @@ export declare const isAggregationItem: (item: AggregationItem | FilteredAggrega
62
62
  type AggregationParam = {
63
63
  primary: string;
64
64
  secondary?: string;
65
+ settings?: {
66
+ type: string;
67
+ field?: string;
68
+ size?: number;
69
+ };
65
70
  };
66
71
  export type ChartAggregationDocCountSelector = (subBucket: AggregationBucket<{
72
+ doc_count: number;
67
73
  totalMw?: {
68
74
  sum: number;
69
75
  };
70
- }>) => number | string;
76
+ }>, aggregationMode: AggregationMode) => number | string;
71
77
  export type ClientApiListRequestQueryParams = {
72
78
  page?: number;
73
79
  filters?: Array<{
@@ -101,4 +107,8 @@ export type ClientApiListResponse<T> = {
101
107
  data: T[];
102
108
  aggregations?: Record<string, AggregationItem | FilteredAggregation>;
103
109
  };
110
+ export declare enum AggregationMode {
111
+ GW = "GW",
112
+ Count = "count"
113
+ }
104
114
  export {};
@@ -1,8 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isAggregationItem = void 0;
3
+ exports.AggregationMode = exports.isAggregationItem = void 0;
4
4
  const isAggregationItem = (item) => {
5
5
  return !!item && 'buckets' in item;
6
6
  };
7
7
  exports.isAggregationItem = isAggregationItem;
8
+ var AggregationMode;
9
+ (function (AggregationMode) {
10
+ AggregationMode["GW"] = "GW";
11
+ AggregationMode["Count"] = "count";
12
+ })(AggregationMode || (exports.AggregationMode = AggregationMode = {}));
8
13
  //# sourceMappingURL=common.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../../../../packages/client-frontends-shared-types/src/lib/dataGrid/api/common.ts"],"names":[],"mappings":";;;AA8EO,MAAM,iBAAiB,GAAG,CAC/B,IAAuD,EAC9B,EAAE;IAC3B,OAAO,CAAC,CAAC,IAAI,IAAI,SAAS,IAAI,IAAI,CAAA;AACpC,CAAC,CAAA;AAJY,QAAA,iBAAiB,qBAI7B"}
1
+ {"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../../../../packages/client-frontends-shared-types/src/lib/dataGrid/api/common.ts"],"names":[],"mappings":";;;AA8EO,MAAM,iBAAiB,GAAG,CAC/B,IAAuD,EAC9B,EAAE;IAC3B,OAAO,CAAC,CAAC,IAAI,IAAI,SAAS,IAAI,IAAI,CAAA;AACpC,CAAC,CAAA;AAJY,QAAA,iBAAiB,qBAI7B;AAwDD,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,4BAAS,CAAA;IACT,kCAAe,CAAA;AACjB,CAAC,EAHW,eAAe,+BAAf,eAAe,QAG1B"}