@twin.org/telemetry-service 0.0.1-next.9 → 0.0.2-next.1

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.
@@ -466,10 +466,6 @@ async function telemetryMetricValueList(httpRequestContext, componentName, reque
466
466
  * Service for performing telemetry operations to a connector.
467
467
  */
468
468
  class TelemetryService {
469
- /**
470
- * The namespace supported by the telemetry service.
471
- */
472
- static NAMESPACE = "telemetry";
473
469
  /**
474
470
  * Runtime name for the class.
475
471
  */
@@ -464,10 +464,6 @@ async function telemetryMetricValueList(httpRequestContext, componentName, reque
464
464
  * Service for performing telemetry operations to a connector.
465
465
  */
466
466
  class TelemetryService {
467
- /**
468
- * The namespace supported by the telemetry service.
469
- */
470
- static NAMESPACE = "telemetry";
471
467
  /**
472
468
  * Runtime name for the class.
473
469
  */
@@ -4,10 +4,6 @@ import type { ITelemetryServiceConstructorOptions } from "./models/ITelemetrySer
4
4
  * Service for performing telemetry operations to a connector.
5
5
  */
6
6
  export declare class TelemetryService implements ITelemetryComponent {
7
- /**
8
- * The namespace supported by the telemetry service.
9
- */
10
- static readonly NAMESPACE: string;
11
7
  /**
12
8
  * Runtime name for the class.
13
9
  */
package/docs/changelog.md CHANGED
@@ -1,5 +1,99 @@
1
1
  # @twin.org/telemetry-service - Changelog
2
2
 
3
- ## v0.0.1-next.9
3
+ ## [0.0.2-next.1](https://github.com/twinfoundation/telemetry/compare/telemetry-service-v0.0.2-next.0...telemetry-service-v0.0.2-next.1) (2025-08-20)
4
+
5
+
6
+ ### Features
7
+
8
+ * remove unused namespace ([54939fa](https://github.com/twinfoundation/telemetry/commit/54939faac3790dc1b51aa96a54005a03c99f98da))
9
+ * remove unused namespace ([02dcabb](https://github.com/twinfoundation/telemetry/commit/02dcabbe00f5b03d5e4b2c12e655efac50409acf))
10
+ * update dependencies ([0e55c48](https://github.com/twinfoundation/telemetry/commit/0e55c48de4139c6fe66b823101ca17973e60847c))
11
+ * update framework core ([4b10bcd](https://github.com/twinfoundation/telemetry/commit/4b10bcd4d3101151671bdcf9aef7c54f5937fc2a))
12
+ * use shared store mechanism ([#7](https://github.com/twinfoundation/telemetry/issues/7)) ([806fe2c](https://github.com/twinfoundation/telemetry/commit/806fe2c2b7653d6b949c27ebf57bd13c3e040242))
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * query params force coercion ([ec7999e](https://github.com/twinfoundation/telemetry/commit/ec7999eadb66c65585efa19f3ce4cabb50eed761))
18
+ * Update metric endpoint paths by removing trailing slashes and query type as string ([#3](https://github.com/twinfoundation/telemetry/issues/3)) ([b386ca5](https://github.com/twinfoundation/telemetry/commit/b386ca55404aa933ad8917f82a7f0e588593fcc8))
19
+
20
+
21
+ ### Dependencies
22
+
23
+ * The following workspace dependencies were updated
24
+ * dependencies
25
+ * @twin.org/telemetry-models bumped from 0.0.2-next.0 to 0.0.2-next.1
26
+
27
+ ## 0.0.1 (2025-07-04)
28
+
29
+
30
+ ### Features
31
+
32
+ * release to production ([df2151d](https://github.com/twinfoundation/telemetry/commit/df2151d24844fd2c3e6092ce3a6f888ac16219a0))
33
+
34
+
35
+ ### Dependencies
36
+
37
+ * The following workspace dependencies were updated
38
+ * dependencies
39
+ * @twin.org/telemetry-models bumped from ^0.0.0 to ^0.0.1
40
+
41
+ ## [0.0.1-next.18](https://github.com/twinfoundation/telemetry/compare/telemetry-service-v0.0.1-next.17...telemetry-service-v0.0.1-next.18) (2025-06-20)
42
+
43
+
44
+ ### Bug Fixes
45
+
46
+ * query params force coercion ([ec7999e](https://github.com/twinfoundation/telemetry/commit/ec7999eadb66c65585efa19f3ce4cabb50eed761))
47
+
48
+
49
+ ### Dependencies
50
+
51
+ * The following workspace dependencies were updated
52
+ * dependencies
53
+ * @twin.org/telemetry-models bumped from 0.0.1-next.17 to 0.0.1-next.18
54
+
55
+ ## [0.0.1-next.17](https://github.com/twinfoundation/telemetry/compare/telemetry-service-v0.0.1-next.16...telemetry-service-v0.0.1-next.17) (2025-06-12)
56
+
57
+
58
+ ### Features
59
+
60
+ * update dependencies ([0e55c48](https://github.com/twinfoundation/telemetry/commit/0e55c48de4139c6fe66b823101ca17973e60847c))
61
+
62
+
63
+ ### Dependencies
64
+
65
+ * The following workspace dependencies were updated
66
+ * dependencies
67
+ * @twin.org/telemetry-models bumped from 0.0.1-next.16 to 0.0.1-next.17
68
+
69
+ ## [0.0.1-next.16](https://github.com/twinfoundation/telemetry/compare/telemetry-service-v0.0.1-next.15...telemetry-service-v0.0.1-next.16) (2025-04-17)
70
+
71
+
72
+ ### Features
73
+
74
+ * use shared store mechanism ([#7](https://github.com/twinfoundation/telemetry/issues/7)) ([806fe2c](https://github.com/twinfoundation/telemetry/commit/806fe2c2b7653d6b949c27ebf57bd13c3e040242))
75
+
76
+
77
+ ### Dependencies
78
+
79
+ * The following workspace dependencies were updated
80
+ * dependencies
81
+ * @twin.org/telemetry-models bumped from 0.0.1-next.15 to 0.0.1-next.16
82
+
83
+ ## [0.0.1-next.15](https://github.com/twinfoundation/telemetry/compare/telemetry-service-v0.0.1-next.14...telemetry-service-v0.0.1-next.15) (2025-03-28)
84
+
85
+
86
+ ### Bug Fixes
87
+
88
+ * Update metric endpoint paths by removing trailing slashes and query type as string ([#3](https://github.com/twinfoundation/telemetry/issues/3)) ([b386ca5](https://github.com/twinfoundation/telemetry/commit/b386ca55404aa933ad8917f82a7f0e588593fcc8))
89
+
90
+
91
+ ### Dependencies
92
+
93
+ * The following workspace dependencies were updated
94
+ * dependencies
95
+ * @twin.org/telemetry-models bumped from 0.0.1-next.14 to 0.0.1-next.15
96
+
97
+ ## v0.0.1-next.14
4
98
 
5
99
  - Initial Release
@@ -1,5 +1,5 @@
1
1
  {
2
- "openapi": "3.1.0",
2
+ "openapi": "3.1.1",
3
3
  "info": {
4
4
  "title": "TWIN - Test Endpoints",
5
5
  "description": "REST API for TWIN - Test Endpoints.",
@@ -157,7 +157,10 @@
157
157
  "in": "query",
158
158
  "required": false,
159
159
  "schema": {
160
- "type": "number"
160
+ "type": [
161
+ "number",
162
+ "string"
163
+ ]
161
164
  }
162
165
  }
163
166
  ],
@@ -707,7 +710,10 @@
707
710
  "in": "query",
708
711
  "required": false,
709
712
  "schema": {
710
- "type": "number"
713
+ "type": [
714
+ "number",
715
+ "string"
716
+ ]
711
717
  }
712
718
  },
713
719
  {
@@ -716,7 +722,10 @@
716
722
  "in": "query",
717
723
  "required": false,
718
724
  "schema": {
719
- "type": "number"
725
+ "type": [
726
+ "number",
727
+ "string"
728
+ ]
720
729
  }
721
730
  },
722
731
  {
@@ -734,7 +743,10 @@
734
743
  "in": "query",
735
744
  "required": false,
736
745
  "schema": {
737
- "type": "number"
746
+ "type": [
747
+ "number",
748
+ "string"
749
+ ]
738
750
  }
739
751
  }
740
752
  ],
@@ -866,7 +878,7 @@
866
878
  "type": "string",
867
879
  "description": "The stack trace for the error."
868
880
  },
869
- "inner": {
881
+ "cause": {
870
882
  "$ref": "#/components/schemas/Error"
871
883
  }
872
884
  },
@@ -950,10 +962,13 @@
950
962
  "properties": {
951
963
  "entities": {
952
964
  "type": "array",
953
- "items": {
954
- "$ref": "#/components/schemas/TelemetryMetric"
955
- },
956
- "description": "The metrics."
965
+ "items": false,
966
+ "description": "The metrics.",
967
+ "prefixItems": [
968
+ {
969
+ "$ref": "#/components/schemas/TelemetryMetric"
970
+ }
971
+ ]
957
972
  },
958
973
  "cursor": {
959
974
  "type": "string",
@@ -1056,10 +1071,13 @@
1056
1071
  },
1057
1072
  "entities": {
1058
1073
  "type": "array",
1059
- "items": {
1060
- "$ref": "#/components/schemas/TelemetryMetricValue"
1061
- },
1062
- "description": "The metric values."
1074
+ "items": false,
1075
+ "description": "The metric values.",
1076
+ "prefixItems": [
1077
+ {
1078
+ "$ref": "#/components/schemas/TelemetryMetricValue"
1079
+ }
1080
+ ]
1063
1081
  },
1064
1082
  "cursor": {
1065
1083
  "type": "string",
@@ -8,9 +8,9 @@ Service for performing telemetry operations to a connector.
8
8
 
9
9
  ## Constructors
10
10
 
11
- ### new TelemetryService()
11
+ ### Constructor
12
12
 
13
- > **new TelemetryService**(`options`?): [`TelemetryService`](TelemetryService.md)
13
+ > **new TelemetryService**(`options?`): `TelemetryService`
14
14
 
15
15
  Create a new instance of TelemetryService.
16
16
 
@@ -24,18 +24,10 @@ The options for the connector.
24
24
 
25
25
  #### Returns
26
26
 
27
- [`TelemetryService`](TelemetryService.md)
27
+ `TelemetryService`
28
28
 
29
29
  ## Properties
30
30
 
31
- ### NAMESPACE
32
-
33
- > `readonly` `static` **NAMESPACE**: `string` = `"telemetry"`
34
-
35
- The namespace supported by the telemetry service.
36
-
37
- ***
38
-
39
31
  ### CLASS\_NAME
40
32
 
41
33
  > `readonly` **CLASS\_NAME**: `string`
@@ -128,7 +120,7 @@ Nothing.
128
120
 
129
121
  ### addMetricValue()
130
122
 
131
- > **addMetricValue**(`id`, `value`, `customData`?): `Promise`\<`string`\>
123
+ > **addMetricValue**(`id`, `value`, `customData?`): `Promise`\<`string`\>
132
124
 
133
125
  Add a metric value.
134
126
 
@@ -190,7 +182,7 @@ Nothing.
190
182
 
191
183
  ### query()
192
184
 
193
- > **query**(`type`?, `cursor`?, `pageSize`?): `Promise`\<\{ `entities`: `ITelemetryMetric`[]; `cursor`: `string`; \}\>
185
+ > **query**(`type?`, `cursor?`, `pageSize?`): `Promise`\<\{ `entities`: `ITelemetryMetric`[]; `cursor?`: `string`; \}\>
194
186
 
195
187
  Query the metrics.
196
188
 
@@ -216,7 +208,7 @@ The maximum number of entities in a page.
216
208
 
217
209
  #### Returns
218
210
 
219
- `Promise`\<\{ `entities`: `ITelemetryMetric`[]; `cursor`: `string`; \}\>
211
+ `Promise`\<\{ `entities`: `ITelemetryMetric`[]; `cursor?`: `string`; \}\>
220
212
 
221
213
  All the entities for the storage matching the conditions,
222
214
  and a cursor which can be used to request more entities.
@@ -233,7 +225,7 @@ NotImplementedError if the implementation does not support retrieval.
233
225
 
234
226
  ### queryValues()
235
227
 
236
- > **queryValues**(`id`, `timeStart`?, `timeEnd`?, `cursor`?, `pageSize`?): `Promise`\<\{ `metric`: `ITelemetryMetric`; `entities`: `ITelemetryMetricValue`[]; `cursor`: `string`; \}\>
228
+ > **queryValues**(`id`, `timeStart?`, `timeEnd?`, `cursor?`, `pageSize?`): `Promise`\<\{ `metric`: `ITelemetryMetric`; `entities`: `ITelemetryMetricValue`[]; `cursor?`: `string`; \}\>
237
229
 
238
230
  Query the metric values.
239
231
 
@@ -271,7 +263,7 @@ The maximum number of entities in a page.
271
263
 
272
264
  #### Returns
273
265
 
274
- `Promise`\<\{ `metric`: `ITelemetryMetric`; `entities`: `ITelemetryMetricValue`[]; `cursor`: `string`; \}\>
266
+ `Promise`\<\{ `metric`: `ITelemetryMetric`; `entities`: `ITelemetryMetricValue`[]; `cursor?`: `string`; \}\>
275
267
 
276
268
  All the entities for the storage matching the conditions,
277
269
  and a cursor which can be used to request more entities.
@@ -1,6 +1,6 @@
1
1
  # Function: generateRestRoutesTelemetry()
2
2
 
3
- > **generateRestRoutesTelemetry**(`baseRouteName`, `componentName`): `IRestRoute`[]
3
+ > **generateRestRoutesTelemetry**(`baseRouteName`, `componentName`): `IRestRoute`\<`any`, `any`\>[]
4
4
 
5
5
  The REST routes for telemetry.
6
6
 
@@ -20,6 +20,6 @@ The name of the component to use in the routes stored in the ComponentFactory.
20
20
 
21
21
  ## Returns
22
22
 
23
- `IRestRoute`[]
23
+ `IRestRoute`\<`any`, `any`\>[]
24
24
 
25
25
  The generated routes.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/telemetry-service",
3
- "version": "0.0.1-next.9",
3
+ "version": "0.0.2-next.1",
4
4
  "description": "Telemetry contract implementation and REST endpoint definitions",
5
5
  "repository": {
6
6
  "type": "git",
@@ -18,7 +18,7 @@
18
18
  "@twin.org/core": "next",
19
19
  "@twin.org/entity": "next",
20
20
  "@twin.org/nameof": "next",
21
- "@twin.org/telemetry-models": "0.0.1-next.9",
21
+ "@twin.org/telemetry-models": "0.0.2-next.1",
22
22
  "@twin.org/web": "next"
23
23
  },
24
24
  "main": "./dist/cjs/index.cjs",