@dative-gpi/foundation-core-domain 1.0.145 → 1.0.147

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.
@@ -31,10 +31,12 @@ export class AlertInfos {
31
31
  triggerSourceTimestamp: number | null;
32
32
  triggerEnqueuedTimestamp: number | null;
33
33
  triggerProcessedTimestamp: number | null;
34
+ triggerActualTimestamp: number | null;
34
35
  lastState: AlertState;
35
36
  currentSourceTimestamp: number | null;
36
37
  currentEnqueuedTimestamp: number | null;
37
38
  currentProcessedTimestamp: number | null;
39
+ currentActualTimestamp: number | null;
38
40
  currentStatus: AlertStatus;
39
41
  tags: string[];
40
42
  history: AlertState[];
@@ -69,6 +71,8 @@ export class AlertInfos {
69
71
  isoToEpoch(params.triggerEnqueuedTimestamp) : null;
70
72
  this.triggerProcessedTimestamp = params.triggerProcessedTimestamp ?
71
73
  isoToEpoch(params.triggerProcessedTimestamp) : null;
74
+ this.triggerActualTimestamp = params.triggerActualTimestamp ?
75
+ isoToEpoch(params.triggerActualTimestamp) : null;
72
76
  this.lastState = new AlertState(params.lastState);
73
77
  this.currentSourceTimestamp = params.currentSourceTimestamp ?
74
78
  isoToEpoch(params.currentSourceTimestamp) : null;
@@ -76,6 +80,8 @@ export class AlertInfos {
76
80
  isoToEpoch(params.currentEnqueuedTimestamp) : null;
77
81
  this.currentProcessedTimestamp = params.currentProcessedTimestamp ?
78
82
  isoToEpoch(params.currentProcessedTimestamp) : null;
83
+ this.currentActualTimestamp = params.currentActualTimestamp ?
84
+ isoToEpoch(params.currentActualTimestamp) : null;
79
85
  this.currentStatus = params.currentStatus;
80
86
  this.tags = params.tags;
81
87
  this.history = params.history.map(dto => new AlertState(dto));
@@ -108,10 +114,12 @@ export interface AlertInfosDTO {
108
114
  triggerSourceTimestamp: string | null;
109
115
  triggerEnqueuedTimestamp: string | null;
110
116
  triggerProcessedTimestamp: string | null;
117
+ triggerActualTimestamp: string | null;
111
118
  lastState: AlertStateDTO;
112
119
  currentSourceTimestamp: string | null;
113
120
  currentEnqueuedTimestamp: string | null;
114
121
  currentProcessedTimestamp: string | null;
122
+ currentActualTimestamp: string | null;
115
123
  currentStatus: AlertStatus;
116
124
  tags: string[];
117
125
  history: AlertStateDTO[];
@@ -6,17 +6,19 @@ import { AlertDataDefinition, type AlertDataDefinitionDTO } from "./alertDataDef
6
6
  export class AlertState {
7
7
  id: string;
8
8
  status: AlertStatus;
9
- sourceTimestamp: number;
10
- enqueuedTimestamp: number;
9
+ sourceTimestamp: number | null;
10
+ enqueuedTimestamp: number | null;
11
11
  processedTimestamp: number;
12
+ actualTimestamp: number;
12
13
  metadataValues?: AlertDataDefinition[];
13
14
 
14
15
  constructor(params: AlertStateDTO) {
15
16
  this.id = params.id;
16
17
  this.status = params.status;
17
- this.sourceTimestamp = isoToEpoch(params.sourceTimestamp);
18
- this.enqueuedTimestamp = isoToEpoch(params.enqueuedTimestamp);
18
+ this.sourceTimestamp = params.sourceTimestamp ? isoToEpoch(params.sourceTimestamp) : null;
19
+ this.enqueuedTimestamp = params.enqueuedTimestamp ? isoToEpoch(params.enqueuedTimestamp) : null;
19
20
  this.processedTimestamp = isoToEpoch(params.processedTimestamp);
21
+ this.actualTimestamp = isoToEpoch(params.actualTimestamp);
20
22
  this.metadataValues = params.metadataValues?.map(dto => new AlertDataDefinition(dto));
21
23
  }
22
24
  }
@@ -24,8 +26,9 @@ export class AlertState {
24
26
  export interface AlertStateDTO {
25
27
  id: string;
26
28
  status: AlertStatus;
27
- sourceTimestamp: string;
28
- enqueuedTimestamp: string;
29
+ sourceTimestamp: string | null;
30
+ enqueuedTimestamp: string | null;
29
31
  processedTimestamp: string;
32
+ actualTimestamp: string;
30
33
  metadataValues?: AlertDataDefinitionDTO[];
31
34
  }
@@ -8,6 +8,7 @@ export class DeviceOrganisationAlert {
8
8
  criticity: Criticity;
9
9
  sourceTimestamp?: number;
10
10
  enqueuedTimestamp?: number;
11
+ actualTimestamp: number;
11
12
 
12
13
  constructor(params: DeviceOrganisationAlertDTO) {
13
14
  this.id = params.id;
@@ -16,6 +17,7 @@ export class DeviceOrganisationAlert {
16
17
  this.criticity = params.criticity;
17
18
  this.sourceTimestamp = params.sourceTimestamp ? isoToEpoch(params.sourceTimestamp) : undefined;
18
19
  this.enqueuedTimestamp = params.enqueuedTimestamp ? isoToEpoch(params.enqueuedTimestamp) : undefined;
20
+ this.actualTimestamp = isoToEpoch(params.actualTimestamp);
19
21
  }
20
22
  }
21
23
 
@@ -26,4 +28,5 @@ export interface DeviceOrganisationAlertDTO {
26
28
  criticity: Criticity;
27
29
  sourceTimestamp?: string;
28
30
  enqueuedTimestamp?: string;
31
+ actualTimestamp: string;
29
32
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dative-gpi/foundation-core-domain",
3
3
  "sideEffects": false,
4
- "version": "1.0.145",
4
+ "version": "1.0.147",
5
5
  "description": "",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -10,8 +10,8 @@
10
10
  "author": "",
11
11
  "license": "ISC",
12
12
  "dependencies": {
13
- "@dative-gpi/foundation-shared-domain": "1.0.145",
14
- "@dative-gpi/foundation-shared-services": "1.0.145"
13
+ "@dative-gpi/foundation-shared-domain": "1.0.147",
14
+ "@dative-gpi/foundation-shared-services": "1.0.147"
15
15
  },
16
- "gitHead": "6c88c1ce189ab312cb04f5956ca391e94b1a0dbe"
16
+ "gitHead": "c31ebe53c7cfd0d156e067fcb57a10f8e48a6ca3"
17
17
  }