kuzzle-device-manager-types 2.2.3 → 2.2.5

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.
@@ -20,25 +20,56 @@ export type AskMeasureIngest = {
20
20
  * Event before starting to process new measures.
21
21
  *
22
22
  * Useful to enrich measures before they are saved.
23
- *
24
- * Only measures documents can be modified
25
23
  */
26
24
  export type EventMeasureProcessBefore = {
27
25
  name: "device-manager:measures:process:before";
28
26
  args: [
29
27
  {
30
- readonly asset: KDocument<AssetContent>;
31
- readonly device: KDocument<DeviceContent>;
28
+ asset: KDocument<AssetContent>;
29
+ device: KDocument<DeviceContent>;
32
30
  measures: MeasureContent[];
33
31
  }
34
32
  ];
35
33
  };
34
+ /**
35
+ * Tenant event before starting to process new measures.
36
+ *
37
+ * Useful to enrich measures before they are saved.
38
+ */
36
39
  export type TenantEventMeasureProcessBefore = {
37
40
  name: `engine:${string}:device-manager:measures:process:before`;
38
41
  args: [
39
42
  {
40
- readonly asset: KDocument<AssetContent>;
41
- readonly device: KDocument<DeviceContent>;
43
+ asset: KDocument<AssetContent>;
44
+ device: KDocument<DeviceContent>;
45
+ measures: MeasureContent[];
46
+ }
47
+ ];
48
+ };
49
+ /**
50
+ * Event triggered after updating device and asset with new measures but
51
+ * before persistence in database.
52
+ */
53
+ export type EventMeasurePersistBefore = {
54
+ name: "device-manager:measures:persist:before";
55
+ args: [
56
+ {
57
+ asset: KDocument<AssetContent>;
58
+ device: KDocument<DeviceContent>;
59
+ measures: MeasureContent[];
60
+ }
61
+ ];
62
+ };
63
+ /**
64
+ * Tenant event triggered after updating device and asset with new measures but
65
+ * before persistence in database.
66
+ */
67
+ export type TenantEventMeasurePersistBefore = {
68
+ name: `engine:${string}:device-manager:measures:persist:before`;
69
+ args: [
70
+ {
71
+ asset: KDocument<AssetContent>;
72
+ device: KDocument<DeviceContent>;
42
73
  measures: MeasureContent[];
43
74
  }
44
75
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kuzzle-device-manager-types",
3
- "version": "2.2.3",
3
+ "version": "2.2.5",
4
4
  "description": "Shared types for Kuzzle Device Manager",
5
5
  "author": "The Kuzzle Team (support@kuzzle.io)",
6
6
  "types": "dist/index.d.ts",