@3e/sqa-common 6.0.8-9 → 6.0.9-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.
- package/index.d.ts +69 -23
- package/package.json +1 -1
- package/sqa_common.js +1398 -983
package/index.d.ts
CHANGED
|
@@ -744,26 +744,29 @@ declare module '@3e/sqa-common' {
|
|
|
744
744
|
| '1 year'
|
|
745
745
|
|
|
746
746
|
export type Period =
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
747
|
+
| 'last-15-minutes'
|
|
748
|
+
| 'last-30-minutes'
|
|
749
|
+
| 'last-60-minutes'
|
|
750
|
+
| 'last-120-minutes'
|
|
751
|
+
| 'last-24-hours'
|
|
752
|
+
| 'today'
|
|
753
|
+
| 'yesterday'
|
|
754
|
+
| 'tomorrow'
|
|
755
|
+
| 'last-3-days'
|
|
756
|
+
| 'last-7-days'
|
|
757
|
+
| 'last-7x24-hours'
|
|
758
|
+
| 'last-3x24-hours'
|
|
759
|
+
| 'forecast-4-days'
|
|
760
|
+
| 'forecast-10-days'
|
|
761
|
+
| 'last-week'
|
|
762
|
+
| 'current-month'
|
|
763
|
+
| 'last-month'
|
|
764
|
+
| 'last-30-days'
|
|
765
|
+
| 'year-to-date'
|
|
766
|
+
| 'last-12-months'
|
|
767
|
+
| 'last-year'
|
|
768
|
+
| 'since-beginning'
|
|
769
|
+
| 'custom'
|
|
767
770
|
|
|
768
771
|
export type LevelValue =
|
|
769
772
|
| 'site-group'
|
|
@@ -898,6 +901,34 @@ declare module '@3e/sqa-common' {
|
|
|
898
901
|
}
|
|
899
902
|
}
|
|
900
903
|
|
|
904
|
+
/**
|
|
905
|
+
* Since in a table row the data is represented as: `[object-name, indicator1-value, indicator2-value, ...]`
|
|
906
|
+
* while the indicators in the meta are: `[indicator1, indicator2, ...]`
|
|
907
|
+
* In order to access the correct indicator in the meta, be sure to go for the `columnIndex - 1` indicator in the `indicators` array from the meta.
|
|
908
|
+
*
|
|
909
|
+
*
|
|
910
|
+
* For objects, the correct object index is the index of the full row
|
|
911
|
+
*/
|
|
912
|
+
export type ObjectsTableRowInfo = {
|
|
913
|
+
indicators: {
|
|
914
|
+
label: string
|
|
915
|
+
indicator_label: string
|
|
916
|
+
reference_label: string
|
|
917
|
+
unit?: string
|
|
918
|
+
unit_key: string
|
|
919
|
+
description: string
|
|
920
|
+
key: string
|
|
921
|
+
default_graphical_representation: string
|
|
922
|
+
level: LevelValue
|
|
923
|
+
}[]
|
|
924
|
+
objects: {
|
|
925
|
+
name: string
|
|
926
|
+
level: LevelValue
|
|
927
|
+
ref: string
|
|
928
|
+
label: string
|
|
929
|
+
}
|
|
930
|
+
}
|
|
931
|
+
|
|
901
932
|
export type MeasurementsTable = {
|
|
902
933
|
meta: {
|
|
903
934
|
rows: MeasurementsRowExtraInfo[]
|
|
@@ -945,6 +976,8 @@ declare module '@3e/sqa-common' {
|
|
|
945
976
|
|
|
946
977
|
export type TableSpec = {
|
|
947
978
|
display: 'table'
|
|
979
|
+
meta?: {rows: ObjectsTableRowInfo}
|
|
980
|
+
title?: string
|
|
948
981
|
header: string[]
|
|
949
982
|
rows: (number | string)[][]
|
|
950
983
|
}
|
|
@@ -1104,12 +1137,12 @@ declare module '@3e/sqa-common' {
|
|
|
1104
1137
|
* for the `createSaveDataJob` function
|
|
1105
1138
|
*/
|
|
1106
1139
|
arguments: {
|
|
1107
|
-
object: string[]
|
|
1108
1140
|
toDate: ISODateString
|
|
1109
1141
|
filename: string
|
|
1110
1142
|
replyTz: string
|
|
1111
1143
|
fromDate: string
|
|
1112
|
-
|
|
1144
|
+
objectIndicatorSets: {object: string[]
|
|
1145
|
+
indicator: string[]}[]
|
|
1113
1146
|
granularity: Granularity[] // must be a single value
|
|
1114
1147
|
}
|
|
1115
1148
|
/**
|
|
@@ -1122,7 +1155,7 @@ declare module '@3e/sqa-common' {
|
|
|
1122
1155
|
/**
|
|
1123
1156
|
* currently can be just save_data
|
|
1124
1157
|
*/
|
|
1125
|
-
typeSqid:
|
|
1158
|
+
typeSqid: string
|
|
1126
1159
|
}
|
|
1127
1160
|
|
|
1128
1161
|
type Parameter = {
|
|
@@ -1602,6 +1635,19 @@ declare module '@3e/sqa-common' {
|
|
|
1602
1635
|
* @param view
|
|
1603
1636
|
*/
|
|
1604
1637
|
getViewParameters(view: SQView): Parameter[]
|
|
1638
|
+
|
|
1639
|
+
/**
|
|
1640
|
+
* Generate a new password for the user
|
|
1641
|
+
*
|
|
1642
|
+
* Password will
|
|
1643
|
+
* - be between 12 and 100 characters
|
|
1644
|
+
* - contain at least one lower-case character
|
|
1645
|
+
* - contain at least one upper-case character
|
|
1646
|
+
* - contain at least one digit
|
|
1647
|
+
* - contain at least one special character ("!%&@#$^*?_~-")
|
|
1648
|
+
*
|
|
1649
|
+
*/
|
|
1650
|
+
generatePassword(): string
|
|
1605
1651
|
}
|
|
1606
1652
|
|
|
1607
1653
|
export const sqa: {
|