@dative-gpi/foundation-shared-domain 1.0.45 → 1.0.47

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.
@@ -0,0 +1,6 @@
1
+ export enum ActionType {
2
+ None = 0,
3
+ OpenDrawer = 1,
4
+ OpenTabs = 2,
5
+ NavigateTo = 3
6
+ }
@@ -0,0 +1,16 @@
1
+ export enum ApplicationScope {
2
+ None = 0,
3
+ OrganisationType = 1,
4
+ Organisation = 2
5
+ }
6
+
7
+ export enum EntityType {
8
+ None = 0,
9
+ Model = 1,
10
+ Group = 2,
11
+ Location = 3,
12
+ Device = 5,
13
+ User = 6,
14
+ Dashboard = 7,
15
+ Folder = 8
16
+ }
@@ -0,0 +1,115 @@
1
+ export enum ChartOrigin {
2
+ None = 0,
3
+ Organisation = 1,
4
+ OrganisationType = 2
5
+ }
6
+
7
+ export enum ChartType {
8
+ None = 0,
9
+ XY = 1,
10
+ Pie = 2,
11
+ Heatmap = 3,
12
+ Slider = 4,
13
+ Gauge = 5,
14
+ ScoreCard = 6,
15
+ Table = 7
16
+ }
17
+
18
+ export enum ColorSets {
19
+ Default = 0,
20
+ Grafana = 1,
21
+ Kelly = 2,
22
+ Armytage = 3,
23
+ ZeileisHornikMurrell = 4,
24
+ Hash = 5
25
+ }
26
+
27
+ export enum AxisType {
28
+ None = 0,
29
+ Date = 1,
30
+ Value = 2,
31
+ Category = 3
32
+ }
33
+
34
+ export enum SerieType {
35
+ None = 0,
36
+ Lines = 1,
37
+ Area = 2,
38
+ Range = 3,
39
+ Histogram = 4,
40
+ Operation = 5,
41
+ Planning = 6,
42
+ ScatterPlot = 7,
43
+ Top = 8,
44
+ Bars = 9,
45
+ StackedBars = 10,
46
+ Pie = 11,
47
+ Heatmap = 12,
48
+ Slider = 13,
49
+ Gauge = 14,
50
+ ScoreCard = 15,
51
+ Table = 16
52
+ }
53
+
54
+ export enum PlotPer {
55
+ None = 0,
56
+ SinglePlot = 1,
57
+ Model = 2,
58
+ Group = 3,
59
+ Location = 4,
60
+ Device = 5
61
+ }
62
+
63
+ export enum AggregationType {
64
+ None = 0,
65
+ Sum = 1,
66
+ Cardinal = 2,
67
+ Mean = 3,
68
+ Median = 4,
69
+ First = 5,
70
+ Last = 6,
71
+ Difference = 7,
72
+ Minimum = 8,
73
+ Maximum = 9,
74
+ Range = 10
75
+ }
76
+
77
+ export enum PlanningType {
78
+ None = 0,
79
+ UntilNext = 1,
80
+ ElapsedTime = 2,
81
+ SinglePoint = 3
82
+ }
83
+
84
+ export enum DisplayAs {
85
+ None = 0,
86
+ Bars = 1,
87
+ Lines = 2,
88
+ Points = 3
89
+ }
90
+
91
+ export enum OperationOn {
92
+ None = 0,
93
+ SameGroup = 1,
94
+ SameEntity = 2,
95
+ SameGroupAndEntity = 3
96
+ }
97
+
98
+ export enum HeatmapRule {
99
+ None = 0,
100
+ Gradient = 1,
101
+ Ranges = 2,
102
+ Fixed = 3
103
+ }
104
+
105
+ export enum PieBreakdown {
106
+ Entity = 0,
107
+ Serie = 1,
108
+ Group = 2
109
+ }
110
+
111
+ export enum Position {
112
+ None = 0,
113
+ Abscissa = 1,
114
+ Ordinate = 2
115
+ }
@@ -0,0 +1,12 @@
1
+ export enum PropertyEntity {
2
+ Device = 0,
3
+ DeviceOrganisation = 1
4
+ }
5
+
6
+ export enum PropertyDataType {
7
+ Number = 0,
8
+ Boolean = 1,
9
+ String = 2,
10
+ DateTime = 3,
11
+ Icon = 4
12
+ }
package/enums/datas.ts ADDED
@@ -0,0 +1,7 @@
1
+
2
+ export enum DataTable {
3
+ None = 0,
4
+ Number = 1,
5
+ String = 2,
6
+ DateTime = 3
7
+ }
@@ -0,0 +1,12 @@
1
+ export enum FilterType {
2
+ None = 0,
3
+ Equal = 1,
4
+ More = 2,
5
+ Less = 3,
6
+ MoreOrEqual = 4,
7
+ LessOrEqual = 5,
8
+ Different = 6,
9
+ Contains = 7,
10
+ StartsWith = 8,
11
+ EndsWith = 9
12
+ }
package/enums/index.ts ADDED
@@ -0,0 +1,16 @@
1
+ export * from "./actions";
2
+ export * from "./alerts";
3
+ export * from "./applications";
4
+ export * from "./charts";
5
+ export * from "./connectivities";
6
+ export * from "./customProperties";
7
+ export * from "./dashboards";
8
+ export * from "./datas";
9
+ export * from "./dates";
10
+ export * from "./filters";
11
+ export * from "./index";
12
+ export * from "./lists";
13
+ export * from "./notifications";
14
+ export * from "./roles";
15
+ export * from "./times";
16
+ export * from "./users";
@@ -0,0 +1,6 @@
1
+ export enum NotificationType {
2
+ None = 0,
3
+ CreateAlert = 1,
4
+ CreateConnectivityAlert = 2,
5
+ ResolveConnectivityAlert = 3
6
+ }
package/enums/roles.ts ADDED
@@ -0,0 +1,7 @@
1
+ // TODO : remove pour utiliser ApplicationScope et faire migration
2
+
3
+ export enum RoleType {
4
+ None = 0,
5
+ Organisation = 1,
6
+ OrganisationType = 2
7
+ }
package/enums/users.ts ADDED
@@ -0,0 +1,12 @@
1
+ export enum UserType {
2
+ User = 0,
3
+ ServiceAccount = 1,
4
+ Extension = 2
5
+ }
6
+
7
+ export enum UserValidityState {
8
+ InvitationNotSent = 0x000,
9
+ InvitationSent = 0x001,
10
+ AccountCreated = 0x011,
11
+ AccountValidated = 0x111
12
+ }
@@ -1,4 +1,4 @@
1
- import { utcToEpoch } from "../../tools";
1
+ import { isoToEpoch } from "../../tools";
2
2
 
3
3
  export class AuthTokenInfos {
4
4
  id: string;
@@ -9,8 +9,8 @@ export class AuthTokenInfos {
9
9
  constructor(params: AuthTokenInfosDTO) {
10
10
  this.id = params.id;
11
11
  this.label = params.label;
12
- this.creationDate = utcToEpoch(params.creationDate);
13
- this.dateMax = utcToEpoch(params.dateMax);
12
+ this.creationDate = isoToEpoch(params.creationDate);
13
+ this.dateMax = isoToEpoch(params.dateMax);
14
14
  }
15
15
  }
16
16
 
package/models/index.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  export * from "./applications";
2
2
  export * from "./authTokens";
3
- export * from "./enums"; // No service
4
3
  export * from "./images";
5
4
  export * from "./languages"; // No service
6
5
  export * from "./locations";
@@ -1,6 +1,6 @@
1
1
  import type { OrganisationTypeInfosDTO } from "./organisationTypeInfos";
2
2
  import { OrganisationTypeInfos } from "./organisationTypeInfos";
3
- import type { DashboardType } from "../enums/dashboardEnums";
3
+ import type { DashboardType } from "../../enums/dashboards";
4
4
 
5
5
  export class OrganisationTypeDetails extends OrganisationTypeInfos {
6
6
  description: string;
@@ -1,4 +1,4 @@
1
- import type { DashboardType } from "../enums/dashboardEnums";
1
+ import type { DashboardType } from "../../enums/dashboards";
2
2
 
3
3
  export class OrganisationTypeInfos {
4
4
  id: string;
@@ -2,7 +2,7 @@ import type { PermissionInfosDTO } from "../permissions/permissionInfos";
2
2
  import { PermissionInfos } from "../permissions/permissionInfos";
3
3
  import type { OrganisationInfosDTO } from "./organisationInfos";
4
4
  import { OrganisationInfos } from "./organisationInfos";
5
- import type { DashboardType } from "../enums/dashboardEnums";
5
+ import type { DashboardType } from "../../enums/dashboards";
6
6
 
7
7
  export class OrganisationDetails extends OrganisationInfos {
8
8
  code: string;
@@ -1,4 +1,4 @@
1
- import { utcToEpoch } from "../../tools";
1
+ import { isoToEpoch } from "../../tools";
2
2
 
3
3
  export class TerminalInfos {
4
4
  id: string;
@@ -17,7 +17,7 @@ export class TerminalInfos {
17
17
  this.icon = params.icon;
18
18
  this.key = params.key;
19
19
  this.location = params.location;
20
- this.lastConnection = utcToEpoch(params.lastConnection);
20
+ this.lastConnection = isoToEpoch(params.lastConnection);
21
21
  this.token = params.token;
22
22
  }
23
23
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dative-gpi/foundation-shared-domain",
3
3
  "sideEffects": false,
4
- "version": "1.0.45",
4
+ "version": "1.0.47",
5
5
  "description": "",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -12,5 +12,5 @@
12
12
  "peerDependencies": {
13
13
  "date-fns": "^3.6.0"
14
14
  },
15
- "gitHead": "8e1ac12c45e7a7a18f010d4f616af04008e815d6"
15
+ "gitHead": "6a6b6c8bbe0727f403dacdb5813c199a4e0cc104"
16
16
  }
@@ -1,4 +1,4 @@
1
- import { AutoRefresh } from '../models';
1
+ import { AutoRefresh } from '../enums';
2
2
 
3
3
  export const autoRefreshToSeconds = (autoRefresh: AutoRefresh): number => {
4
4
  switch (autoRefresh) {
@@ -38,7 +38,7 @@ export const OPTIONS: { [key: string]: Intl.DateTimeFormatOptions } = {
38
38
  }
39
39
  };
40
40
 
41
- export const utcToEpoch = (value: string): number => {
41
+ export const isoToEpoch = (value: string): number => {
42
42
  return parse(value.substring(0, 19) + "Z", ISO_FORMAT + "X", new Date()).getTime();
43
43
  };
44
44
 
@@ -1,5 +0,0 @@
1
- export enum Position {
2
- None = 0,
3
- Abscissa = 1,
4
- Ordinate = 2
5
- }
@@ -1,7 +0,0 @@
1
- export * from "./alertEnums";
2
- export * from "./applicationEnums";
3
- export * from "./dashboardEnums";
4
- export * from "./dateEnums";
5
- export * from "./deviceEnums";
6
- export * from "./timeUnit";
7
- export * from "./listEnums";
File without changes
File without changes
File without changes
File without changes