@lightdash/common 0.1383.0 → 0.1385.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -62,9 +62,10 @@ export type ApiMetricsCatalog = {
62
62
  status: 'ok';
63
63
  results: KnexPaginatedData<ApiMetricsCatalogResults>;
64
64
  };
65
+ export type MetricWithAssociatedTimeDimension = CompiledMetric & Pick<CompiledTable, 'defaultTimeDimension'>;
65
66
  export type ApiGetMetricPeek = {
66
67
  status: 'ok';
67
- results: CompiledMetric & Pick<CompiledTable, 'defaultTimeDimension'>;
68
+ results: MetricWithAssociatedTimeDimension;
68
69
  };
69
70
  export type CatalogMetadata = {
70
71
  name: string;
@@ -23,5 +23,9 @@ export declare enum FeatureFlags {
23
23
  /**
24
24
  * Enable dashboard comments
25
25
  */
26
- DashboardComments = "dashboard-comments-enabled"
26
+ DashboardComments = "dashboard-comments-enabled",
27
+ /**
28
+ * Enable metric trees
29
+ */
30
+ MetricTrees = "metric-trees"
27
31
  }
@@ -33,4 +33,8 @@ var FeatureFlags;
33
33
  * Enable dashboard comments
34
34
  */
35
35
  FeatureFlags["DashboardComments"] = "dashboard-comments-enabled";
36
+ /**
37
+ * Enable metric trees
38
+ */
39
+ FeatureFlags["MetricTrees"] = "metric-trees";
36
40
  })(FeatureFlags = exports.FeatureFlags || (exports.FeatureFlags = {}));
@@ -1,9 +1,13 @@
1
+ import type { ItemsMap } from './field';
1
2
  import type { ResultRow } from './results';
2
3
  export declare enum MetricExplorerComparison {
4
+ NONE = "none",
3
5
  PREVIOUS_PERIOD = "previous_period",
4
6
  DIFFERENT_METRIC = "different_metric"
5
7
  }
6
8
  export type MetricExplorerComparisonType = {
9
+ type: MetricExplorerComparison.NONE;
10
+ } | {
7
11
  type: MetricExplorerComparison.PREVIOUS_PERIOD;
8
12
  } | {
9
13
  type: MetricExplorerComparison.DIFFERENT_METRIC;
@@ -12,6 +16,7 @@ export type MetricExplorerComparisonType = {
12
16
  export type MetricsExplorerQueryResults = {
13
17
  rows: ResultRow[];
14
18
  comparisonRows: ResultRow[] | undefined;
19
+ fields: ItemsMap;
15
20
  };
16
21
  export type ApiMetricsExplorerQueryResults = {
17
22
  status: 'ok';
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MetricExplorerComparison = void 0;
4
4
  var MetricExplorerComparison;
5
5
  (function (MetricExplorerComparison) {
6
+ MetricExplorerComparison["NONE"] = "none";
6
7
  MetricExplorerComparison["PREVIOUS_PERIOD"] = "previous_period";
7
8
  MetricExplorerComparison["DIFFERENT_METRIC"] = "different_metric";
8
9
  })(MetricExplorerComparison = exports.MetricExplorerComparison || (exports.MetricExplorerComparison = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightdash/common",
3
- "version": "0.1383.0",
3
+ "version": "0.1385.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [