@3e/sqa-common 6.14.0-8 → 6.15.0-2

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.
Files changed (3) hide show
  1. package/index.d.ts +28 -8
  2. package/package.json +1 -1
  3. package/sqa_common.js +1417 -1414
package/index.d.ts CHANGED
@@ -999,12 +999,24 @@ declare module '@3e/sqa-common' {
999
999
  display: 'message'
1000
1000
  label: string
1001
1001
  }
1002
+ export type KPI = {
1003
+ kpi: string
1004
+ value: string | number
1005
+ }
1006
+
1007
+ export type KPISpec = {
1008
+ display: 'kpis'
1009
+ title: {text: string}
1010
+ object: Object
1011
+ kpis: KPI[]
1012
+ }
1013
+
1014
+ export type VisualizationSpec = TableSpec | MessageSpec | HighChartsSpec | KPISpec
1002
1015
 
1003
- export type VisualizationSpec = TableSpec | MessageSpec | HighChartsSpec
1004
1016
 
1005
1017
  export interface Visualization {
1006
1018
  data: {
1007
- datasets: []
1019
+ datasets: Dataset[]
1008
1020
  date_from: ISODateString
1009
1021
  date_to: ISODateString
1010
1022
  period_time_mode: string
@@ -1049,7 +1061,7 @@ declare module '@3e/sqa-common' {
1049
1061
  }
1050
1062
 
1051
1063
  export interface Indicator {
1052
- default_graphical_representation: string
1064
+ default_graphical_representation: RepresentationValue
1053
1065
  description: string
1054
1066
  key: string
1055
1067
  label: string
@@ -1111,24 +1123,24 @@ declare module '@3e/sqa-common' {
1111
1123
  export type Scaling = Record<string, UnitScale>
1112
1124
 
1113
1125
  export interface Dataset {
1114
- objects?: any
1126
+ objects?: Object[]
1115
1127
  colorSetting?: ColorSettings
1116
1128
  indicators: Indicator[]
1117
1129
  objectSet: ObjectSet
1118
1130
  stacking: StackingOptionValue
1119
1131
  showNullsAs?: any
1120
1132
  representation: string
1121
- label?: any
1133
+ label?: unknown
1122
1134
  id: string
1123
1135
  scaling: Scaling
1124
- stack?: any
1125
- error?: any
1136
+ stack?: unknown
1137
+ error?: unknown
1126
1138
  idx: number
1127
1139
  objectSetLabel: string
1128
1140
  }
1129
1141
 
1130
1142
  // TODO: Better types for PacoViewParameters
1131
- type PacoViewParameters = any
1143
+ type PacoViewParameters = unknown
1132
1144
 
1133
1145
  type SaveDataJobStatus =
1134
1146
  | {
@@ -1329,9 +1341,17 @@ declare module '@3e/sqa-common' {
1329
1341
  * Returns measurable levels contained in a dashboard level
1330
1342
  * @param dashboardLevel - dashboard level. See type for possible values
1331
1343
  * @throws Error - If input is not contained in the possible dashboard levels
1344
+ * @deprecated Use getMeasurableSubLevelsByLdType instead
1332
1345
  */
1333
1346
  getMeasurableSubLevels(dashboardLevel: DashboardLevel): Level[]
1334
1347
 
1348
+ /**
1349
+ * Returns measurable levels contained in a dashboard level for a given ldType
1350
+ * @param ldType - ldType of the dashboard level
1351
+ * @throws Error - If input is not contained in the possible dashboard levels
1352
+ */
1353
+ getMeasurableSubLevelsByLDType(ldType: string): Level[]
1354
+
1335
1355
  /**
1336
1356
  * Returns the granularity for the view
1337
1357
  * @param view
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@3e/sqa-common",
3
- "version": "6.14.0-8",
3
+ "version": "6.15.0-2",
4
4
  "description": "SynaptiQ utilities package",
5
5
  "main": "sqa_common.js",
6
6
  "dependencies": {