@luzmo/dashboard-contents-types 1.0.11 → 1.0.12
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/CHANGELOG.md +7 -1
- package/README.md +132 -71
- package/package.json +3 -2
- package/src/lib/shared/common.d.ts +24 -0
- package/src/lib/shared/common.d.ts.map +1 -1
- package/src/lib/shared/query.d.ts +153 -0
- package/src/lib/shared/query.d.ts.map +1 -1
- package/LICENSE +0 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
All notable changes to this project will be documented in this file.
|
|
2
2
|
|
|
3
|
+
## [1.0.12] - 2025-02-06
|
|
4
|
+
|
|
5
|
+
### Updates
|
|
6
|
+
|
|
7
|
+
- Added additional types for making building queries easier.
|
|
8
|
+
|
|
3
9
|
## [1.0.11] - 2025-01-31
|
|
4
10
|
|
|
5
11
|
### Updates
|
|
6
12
|
|
|
7
|
-
- Updated ExportType to
|
|
13
|
+
- Updated ExportType to be support more values
|
|
8
14
|
|
|
9
15
|
## [1.0.10] - 2025-01-13
|
|
10
16
|
|
package/README.md
CHANGED
|
@@ -1,71 +1,132 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
1
|
+
# Types for Luzmo dashboard contents
|
|
2
|
+
|
|
3
|
+
This packages contains different TypeScript types and JSON schemas for Luzmo dashboard contents.
|
|
4
|
+
|
|
5
|
+
## Content Item Types
|
|
6
|
+
|
|
7
|
+
Here is a list of some content item TypeScript types. Additional types are also available in the package.
|
|
8
|
+
|
|
9
|
+
| Type | Description |
|
|
10
|
+
|--------------------------------|-------------------------------------------------------|
|
|
11
|
+
| `AreaChart` | An Area Chart type. |
|
|
12
|
+
| `AreaChartViewOptions` | An Area Chart options type. |
|
|
13
|
+
| `AreaChartSlots` | An Area Chart slots type. |
|
|
14
|
+
| `BarChart` | A Bar Chart type. |
|
|
15
|
+
| `BarChartViewOptions` | A Bar Chart options type. |
|
|
16
|
+
| `BarChartSlots` | A Bar Chart slots type. |
|
|
17
|
+
| `BoxPlot` | A Box Plot type. |
|
|
18
|
+
| `BoxPlotViewOptions` | A Box Plot options type. |
|
|
19
|
+
| `BoxPlotSlots` | A Box Plot slots type. |
|
|
20
|
+
| `BubbleChart` | A Bubble Chart type. |
|
|
21
|
+
| `BubbleChartViewOptions` | A Bubble Chart options type. |
|
|
22
|
+
| `BubbleChartSlots` | A Bubble Chart slots type. |
|
|
23
|
+
| `BulletChart` | A Bullet Chart type. |
|
|
24
|
+
| `BulletChartViewOptions` | A Bullet Chart options type. |
|
|
25
|
+
| `BulletChartSlots` | A Bullet Chart slots type. |
|
|
26
|
+
| `ChoroplethMap` | A Choropleth Map type. |
|
|
27
|
+
| `ChoroplethMapViewOptions` | A Choropleth Map options type. |
|
|
28
|
+
| `ChoroplethMapSlots` | A Choropleth Map slots type. |
|
|
29
|
+
| `CircularGauge` | A Circular Gauge type. |
|
|
30
|
+
| `CircularGaugeViewOptions` | A Circular Gauge options type. |
|
|
31
|
+
| `CircularGaugeSlots` | A Circular Gauge slots type. |
|
|
32
|
+
| `ColumnChart` | A Column Chart type. |
|
|
33
|
+
| `ColumnChartViewOptions` | A Column Chart options type. |
|
|
34
|
+
| `ColumnChartSlots` | A Column Chart slots type. |
|
|
35
|
+
| `CombinationChart` | A Combination Chart type. |
|
|
36
|
+
| `CombinationChartViewOptions` | A Combination Chart options type. |
|
|
37
|
+
| `CombinationChartSlots` | A Combination Chart slots type. |
|
|
38
|
+
| `ConditionalNumber` | A Conditional Number type. |
|
|
39
|
+
| `ConditionalNumberViewOptions` | A Conditional Number options type. |
|
|
40
|
+
| `ConditionalNumberSlots` | A Conditional Number slots type. |
|
|
41
|
+
| `DateFilter` | A Date Filter type. |
|
|
42
|
+
| `DateFilterViewOptions` | A Date Filter options type. |
|
|
43
|
+
| `DateFilterSlots` | A Date Filter slots type. |
|
|
44
|
+
| `DonutChart` | A Donut Chart type. |
|
|
45
|
+
| `DonutChartViewOptions` | A Donut Chart options type. |
|
|
46
|
+
| `DonutChartSlots` | A Donut Chart slots type. |
|
|
47
|
+
| `DropdownFilter` | A Dropdown Filter type. |
|
|
48
|
+
| `DropdownFilterViewOptions` | A Dropdown Filter options type. |
|
|
49
|
+
| `DropdownFilterSlots` | A Dropdown Filter slots type. |
|
|
50
|
+
| `EvolutionNumber` | An Evolution Number type. |
|
|
51
|
+
| `EvolutionNumberViewOptions` | An Evolution Number options type. |
|
|
52
|
+
| `EvolutionNumberSlots` | An Evolution Number slots type. |
|
|
53
|
+
| `FunnelChart` | A Funnel Chart type. |
|
|
54
|
+
| `FunnelChartViewOptions` | A Funnel Chart options type. |
|
|
55
|
+
| `FunnelChartSlots` | A Funnel Chart slots type. |
|
|
56
|
+
| `HeatMap` | A Heat Map type. |
|
|
57
|
+
| `HeatMapViewOptions` | A Heat Map options type. |
|
|
58
|
+
| `HeatMapSlots` | A Heat Map slots type. |
|
|
59
|
+
| `HexbinMap` | A Hexbin Map type. |
|
|
60
|
+
| `HexbinMapViewOptions` | A Hexbin Map options type. |
|
|
61
|
+
| `HexbinMapSlots` | A Hexbin Map slots type. |
|
|
62
|
+
| `Image` | An Image type. |
|
|
63
|
+
| `ImageViewOptions` | An Image options type. |
|
|
64
|
+
| `LineChart` | A Line Chart type. |
|
|
65
|
+
| `LineChartViewOptions` | A Line Chart options type. |
|
|
66
|
+
| `LineChartSlots` | A Line Chart slots type. |
|
|
67
|
+
| `MarkerMap` | A Marker Map type. |
|
|
68
|
+
| `MarkerMapViewOptions` | A Marker Map options type. |
|
|
69
|
+
| `MarkerMapSlots` | A Marker Map slots type. |
|
|
70
|
+
| `PivotTable` | A Pivot Table type. |
|
|
71
|
+
| `PivotTableViewOptions` | A Pivot Table options type. |
|
|
72
|
+
| `PivotTableSlots` | A Pivot Table slots type. |
|
|
73
|
+
| `RegularTable` | A Regular Table type. |
|
|
74
|
+
| `RegularTableViewOptions` | A Regular Table options type. |
|
|
75
|
+
| `RegularTableSlots` | A Regular Table slots type. |
|
|
76
|
+
| `RouteMap` | A Route Map type. |
|
|
77
|
+
| `RouteMapViewOptions` | A Route Map options type. |
|
|
78
|
+
| `RouteMapSlots` | A Route Map slots type. |
|
|
79
|
+
| `SankeyDiagram` | A ScatterPlot type. |
|
|
80
|
+
| `SankeyDiagramViewOptions` | A Sankey Diagram options type. |
|
|
81
|
+
| `SankeyDiagramSlots` | A Sankey Diagram slots type. |
|
|
82
|
+
| `ScatterPlot` | A Scatter Plot type. |
|
|
83
|
+
| `ScatterPlotViewOptions` | A Scatter Plot options type. |
|
|
84
|
+
| `ScatterPlotSlots` | A Scatter Plot slots type. |
|
|
85
|
+
| `SearchFilter` | A Search Filter type. |
|
|
86
|
+
| `SearchFilterViewOptions` | A Search Filter options type. |
|
|
87
|
+
| `SearchFilterSlots` | A Search Filter slots type. |
|
|
88
|
+
| `SlicerFilter` | A Slicer Filter type. |
|
|
89
|
+
| `SlicerFilterViewOptions` | A Slicer Filter options type. |
|
|
90
|
+
| `SlicerFilterSlots` | A Slicer Filter slots type. |
|
|
91
|
+
| `SliderFilter` | A Slider Filter type. |
|
|
92
|
+
| `SliderFilterViewOptions` | A Slider Filter options type. |
|
|
93
|
+
| `SliderFilterSlots` | A Slider Filter slots type. |
|
|
94
|
+
| `SpikeMap` | A Spike Map type. |
|
|
95
|
+
| `SpikeMapViewOptions` | A Spike Map options type. |
|
|
96
|
+
| `SpikeMapSlots` | A Spike Map slots type. |
|
|
97
|
+
| `SymbolMap` | A Symbol Map type. |
|
|
98
|
+
| `SymbolMapViewOptions` | A Symbol Map options type. |
|
|
99
|
+
| `SymbolMapSlots` | A Symbol Map slots type. |
|
|
100
|
+
| `WordcloudChart` | A Wordcloud Chart type. |
|
|
101
|
+
| `WordcloudChartViewOptions` | A Wordcloud Chart options type. |
|
|
102
|
+
| `WordcloudChartSlots` | A Wordcloud Chart slots type. |
|
|
103
|
+
| `Text` | A Text type. |
|
|
104
|
+
| `TextViewOptions` | A Text options type. |
|
|
105
|
+
| `Video` | A Video type. |
|
|
106
|
+
| `VideoViewOptions` | A Video options type. |
|
|
107
|
+
| `VizItemType` | A union type for content item types. |
|
|
108
|
+
| `Options` | A union type for all the options from all the charts. |
|
|
109
|
+
| `Slots` | A union type for all the slots from all the charts. |
|
|
110
|
+
|
|
111
|
+
## JSON Schemas
|
|
112
|
+
|
|
113
|
+
Each content item above has a corresponding JSON schema. Here’s an example of importing the JSON schema for the Bar Chart:
|
|
114
|
+
|
|
115
|
+
```typescript
|
|
116
|
+
import { BarChartJSONSchema, BarChartOptionsJSONSchema, BarChartSlotsJSONSchema } from '@luzmo/dashboard-contents-types';
|
|
117
|
+
|
|
118
|
+
console.log(BarChartJSONSchema);
|
|
119
|
+
console.log(BarChartOptionsJSONSchema);
|
|
120
|
+
console.log(BarChartSlotsJSONSchema);
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
There is also an object that contains all the JSON schemas for the content items. In this object, each schema name serves as a key, with the corresponding schema as its value. Here’s an example:
|
|
124
|
+
|
|
125
|
+
```typescript
|
|
126
|
+
import { JSON_SCHEMAS } from '@luzmo/dashboard-contents-types';
|
|
127
|
+
|
|
128
|
+
console.log(JSON_SCHEMAS);
|
|
129
|
+
console.log(JSON_SCHEMAS['text-options.schema.json']);
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Using the `JSON_SCHEMAS` object will significantly increase the bundle size, so whenever possible import only the needed schemas, as demonstrated in the Bar Chart example above.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luzmo/dashboard-contents-types",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.12",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"tslib": "^2.3.0",
|
|
6
6
|
"leaflet": "1.9.4"
|
|
@@ -8,5 +8,6 @@
|
|
|
8
8
|
"main": "./index.js",
|
|
9
9
|
"module": "./index.mjs",
|
|
10
10
|
"typings": "./index.d.ts",
|
|
11
|
-
"license": "SEE LICENSE IN LICENSE"
|
|
11
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
12
|
+
"sideEffects": false
|
|
12
13
|
}
|
|
@@ -101,3 +101,27 @@ export type VizItemType = 'area-chart' | 'bar-chart' | 'bubble-chart' | 'box-plo
|
|
|
101
101
|
export type ItemType = VizItemType;
|
|
102
102
|
export type DatetimeDisplayMode = 'default' | 'weekday_number' | 'weekday_name' | 'day_in_month' | 'day_in_year' | 'month_name' | 'month_number' | 'week_number' | 'second_in_minute' | 'minute_in_hour' | 'hour_in_day' | 'quarter_number';
|
|
103
103
|
export type ScreenMode = 'desktop' | 'tablet' | 'mobile' | 'largeScreen' | 'fixed';
|
|
104
|
+
export type PopupMessageClassMap = {
|
|
105
|
+
empty: 'fill';
|
|
106
|
+
noData: 'no-data';
|
|
107
|
+
queryFailed: 'query-failed';
|
|
108
|
+
noAccess: 'no-access';
|
|
109
|
+
noColumnAccess: 'no-column-access';
|
|
110
|
+
datasetNotFound: 'dataset-not-found';
|
|
111
|
+
rateLimitExceeded: 'rate-limit-exceeded';
|
|
112
|
+
tooMany: 'too-many';
|
|
113
|
+
qeVersionNotSupport: 'qe-version-not-support';
|
|
114
|
+
};
|
|
115
|
+
export type PopupMessageClass = PopupMessageClassMap[keyof PopupMessageClassMap];
|
|
116
|
+
export interface ItemQueryPerformance {
|
|
117
|
+
validating: number;
|
|
118
|
+
preparing: number;
|
|
119
|
+
queuing: number;
|
|
120
|
+
querying: number;
|
|
121
|
+
processing: number;
|
|
122
|
+
rows: number;
|
|
123
|
+
rendering: number;
|
|
124
|
+
totalTime: number;
|
|
125
|
+
outRows: number;
|
|
126
|
+
queries?: number;
|
|
127
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../../../libs/dashboard-contents-types/src/lib/shared/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAIxC,MAAM,MAAM,cAAc,GACxB,SAAS,GACP,KAAK,GACL,UAAU,GACV,MAAM,GACN,QAAQ,GACR,OAAO,GACP,YAAY,GACZ,QAAQ,GACR,aAAa,CAAC;AAQlB;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,OAAO,GAAG,WAAW,CAAC;AAE3D;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,aAAa,CAAC;AAIpD;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,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a,GACb,aAAa,GACb,iBAAiB,GACjB,qBAAqB,GACrB,kBAAkB,GAClB,cAAc,GACd,UAAU,GACV,YAAY,GACZ,YAAY,GACZ,cAAc,GACd,OAAO,GACP,YAAY,GACZ,qBAAqB,GACrB,YAAY,GACZ,oBAAoB,GACpB,YAAY,GACZ,2BAA2B,GAC3B,aAAa,GACb,eAAe,GACf,aAAa,GACb,eAAe,GACf,WAAW,GACX,gBAAgB,GAChB,cAAc,GACd,eAAe,GACf,eAAe,GACf,eAAe,GACf,QAAQ,GACR,mBAAmB,GACnB,WAAW,GACX,YAAY,GACZ,gBAAgB,GAChB,YAAY,GACZ,MAAM,GACN,eAAe,GACf,cAAc,GACd,OAAO,GACP,iBAAiB,CAAC;AAMtB,MAAM,MAAM,QAAQ,GAAG,WAAW,CAAC;AAEnC,MAAM,MAAM,mBAAmB,GAC7B,SAAS,GACP,gBAAgB,GAChB,cAAc,GACd,cAAc,GACd,aAAa,GACb,YAAY,GACZ,cAAc,GACd,aAAa,GACb,kBAAkB,GAClB,gBAAgB,GAChB,aAAa,GACb,gBAAgB,CAAC;AAErB,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,aAAa,GAAG,OAAO,CAAC"}
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../../../libs/dashboard-contents-types/src/lib/shared/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAIxC,MAAM,MAAM,cAAc,GACxB,SAAS,GACP,KAAK,GACL,UAAU,GACV,MAAM,GACN,QAAQ,GACR,OAAO,GACP,YAAY,GACZ,QAAQ,GACR,aAAa,CAAC;AAQlB;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,OAAO,GAAG,WAAW,CAAC;AAE3D;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG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M,MAAM,iBAAiB,GAAG,oBAAoB,CAAC,MAAM,oBAAoB,CAAC,CAAC;AAEjF,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAEhB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import type { Arc, GeometryCollection } from 'topojson-specification';
|
|
2
|
+
import { Subject } from 'rxjs';
|
|
3
|
+
import type { OrderDirection } from './sort';
|
|
4
|
+
import type { ItemFilter, ItemQueryDimension, ItemQueryDiscretization } from './item-filter-group';
|
|
5
|
+
import { ItemQueryPerformance, PopupMessageClassMap } from './common';
|
|
1
6
|
/**
|
|
2
7
|
* Basic aggregation query type
|
|
3
8
|
*/
|
|
@@ -23,3 +28,151 @@ export interface ItemQueryRanking {
|
|
|
23
28
|
*/
|
|
24
29
|
number: number;
|
|
25
30
|
}
|
|
31
|
+
export type ItemData = {
|
|
32
|
+
cached?: boolean;
|
|
33
|
+
data?: any[];
|
|
34
|
+
join?: {
|
|
35
|
+
criteria: {
|
|
36
|
+
/**
|
|
37
|
+
* @format uuid
|
|
38
|
+
*/
|
|
39
|
+
dataset_id: string;
|
|
40
|
+
/**
|
|
41
|
+
* @format uuid
|
|
42
|
+
*/
|
|
43
|
+
column_id: string;
|
|
44
|
+
}[];
|
|
45
|
+
type: 'lookup' | 'temporal' | 'fuzzy';
|
|
46
|
+
}[];
|
|
47
|
+
bins?: any;
|
|
48
|
+
performance?: ItemQueryPerformance;
|
|
49
|
+
status?: {
|
|
50
|
+
cancelled?: boolean;
|
|
51
|
+
demo?: boolean;
|
|
52
|
+
error?: keyof PopupMessageClassMap;
|
|
53
|
+
errorFullMsg?: string;
|
|
54
|
+
errorMsg?: string;
|
|
55
|
+
noQuery?: boolean;
|
|
56
|
+
timestamp?: string;
|
|
57
|
+
/**
|
|
58
|
+
* @format uuid
|
|
59
|
+
*/
|
|
60
|
+
queryId?: string;
|
|
61
|
+
/**
|
|
62
|
+
* @format uuid
|
|
63
|
+
*/
|
|
64
|
+
traceId?: string;
|
|
65
|
+
};
|
|
66
|
+
topojson?: {
|
|
67
|
+
type: 'Topology';
|
|
68
|
+
arcs: Arc[];
|
|
69
|
+
objects: {
|
|
70
|
+
topography: GeometryCollection<{
|
|
71
|
+
[key: string]: any;
|
|
72
|
+
}>;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
_pid?: string;
|
|
76
|
+
observable?: Subject<unknown>;
|
|
77
|
+
};
|
|
78
|
+
export type QueryAndFilterGroup = (ItemFilter | QueryOrFilterGroup)[];
|
|
79
|
+
export interface QueryOrFilterGroup {
|
|
80
|
+
or: (ItemFilter | QueryAndFilterGroup | QueryOrFilterGroup)[];
|
|
81
|
+
}
|
|
82
|
+
export interface ItemQuery {
|
|
83
|
+
dimensions?: ItemQueryDimension[];
|
|
84
|
+
measures?: ItemQueryMeasure[];
|
|
85
|
+
where?: QueryAndFilterGroup;
|
|
86
|
+
having?: ItemFilter[];
|
|
87
|
+
limit?: {
|
|
88
|
+
by: number;
|
|
89
|
+
offset?: number;
|
|
90
|
+
};
|
|
91
|
+
options?: {
|
|
92
|
+
locale_id?: string;
|
|
93
|
+
timezone_id?: string;
|
|
94
|
+
synchronized?: boolean;
|
|
95
|
+
rollup_data?: boolean;
|
|
96
|
+
paging?: {
|
|
97
|
+
by: number;
|
|
98
|
+
offset: number;
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
order?: ItemQuerySort[];
|
|
102
|
+
context?: {
|
|
103
|
+
/**
|
|
104
|
+
* @format uuid
|
|
105
|
+
*/
|
|
106
|
+
chart_id: string;
|
|
107
|
+
/**
|
|
108
|
+
* @format uuid
|
|
109
|
+
*/
|
|
110
|
+
dashboard_id: string;
|
|
111
|
+
/**
|
|
112
|
+
* @format uuid
|
|
113
|
+
*/
|
|
114
|
+
share_id?: string;
|
|
115
|
+
flex?: boolean;
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
export interface ItemQueryMeasure {
|
|
119
|
+
/**
|
|
120
|
+
* @format uuid
|
|
121
|
+
*/
|
|
122
|
+
column_id?: string;
|
|
123
|
+
/**
|
|
124
|
+
* Ad-hoc formula
|
|
125
|
+
*/
|
|
126
|
+
formula?: string;
|
|
127
|
+
/**
|
|
128
|
+
* Formula id
|
|
129
|
+
* @format uuid
|
|
130
|
+
*/
|
|
131
|
+
formula_id?: string;
|
|
132
|
+
/**
|
|
133
|
+
* @format uuid
|
|
134
|
+
*/
|
|
135
|
+
dataset_id?: string;
|
|
136
|
+
level?: number;
|
|
137
|
+
expression?: string;
|
|
138
|
+
aggregation?: {
|
|
139
|
+
type: ItemQueryAggregation;
|
|
140
|
+
/**
|
|
141
|
+
* @format uuid
|
|
142
|
+
*/
|
|
143
|
+
dataset_id?: string;
|
|
144
|
+
/**
|
|
145
|
+
* @format uuid
|
|
146
|
+
*/
|
|
147
|
+
column_id?: string;
|
|
148
|
+
level?: number;
|
|
149
|
+
discretization?: ItemQueryDiscretization;
|
|
150
|
+
expression?: string;
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
export interface ItemQuerySort {
|
|
154
|
+
aggregation?: {
|
|
155
|
+
type: ItemQueryAggregation;
|
|
156
|
+
/**
|
|
157
|
+
* @format uuid
|
|
158
|
+
*/
|
|
159
|
+
dataset_id?: string;
|
|
160
|
+
/**
|
|
161
|
+
* @format uuid
|
|
162
|
+
*/
|
|
163
|
+
column_id?: string;
|
|
164
|
+
level?: number;
|
|
165
|
+
};
|
|
166
|
+
/**
|
|
167
|
+
* @format uuid
|
|
168
|
+
*/
|
|
169
|
+
column_id?: string;
|
|
170
|
+
/**
|
|
171
|
+
* @format uuid
|
|
172
|
+
*/
|
|
173
|
+
dataset_id?: string;
|
|
174
|
+
discretization?: ItemQueryDiscretization;
|
|
175
|
+
expression?: string;
|
|
176
|
+
level?: number;
|
|
177
|
+
order?: OrderDirection;
|
|
178
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../../../../libs/dashboard-contents-types/src/lib/shared/query.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,OAAO,GAAG,eAAe,CAAC;AAElE;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,yBAAyB,GAC1D,KAAK,GACL,eAAe,GACf,SAAS,GACT,QAAQ,GACR,KAAK,GACL,KAAK,GACL,QAAQ,GACR,iBAAiB,GACjB,MAAM,GACN,WAAW,CAAC;AAEd;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,SAAS,EAAE,KAAK,GAAG,QAAQ,CAAC;IAC5B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB"}
|
|
1
|
+
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../../../../libs/dashboard-contents-types/src/lib/shared/query.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AACnG,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEtE;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG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(@luzmo/dashboard-content-types) must be used according to the Luzmo Terms of Service.
|
|
5
|
-
|
|
6
|
-
This license allows users with a current active Luzmo account to use the Luzmo Types library.
|
|
7
|
-
This license terminates automatically if a user no longer has an active Luzmo account.
|
|
8
|
-
|
|
9
|
-
Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use
|
|
10
|
-
|
|
11
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
12
|
-
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
13
|
-
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
14
|
-
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
15
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|