@twin.org/telemetry-service 0.0.2-next.3 → 0.0.3-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.
@@ -56,71 +56,21 @@
56
56
  }
57
57
  },
58
58
  "responses": {
59
- "201": {
59
+ "200": {
60
60
  "description": "The rest request ended in created response.",
61
- "headers": {
62
- "location": {
63
- "schema": {
64
- "type": "string"
65
- },
66
- "description": "e.g. my-counter"
67
- }
68
- }
69
- },
70
- "400": {
71
- "description": "The server cannot process the request, see the content for more details.",
72
61
  "content": {
73
- "application/json": {
62
+ "text/plain": {
74
63
  "schema": {
75
- "$ref": "#/components/schemas/Error"
76
- },
77
- "examples": {
78
- "exampleResponse": {
79
- "value": {
80
- "name": "GeneralError",
81
- "message": "errorMessage",
82
- "properties": {
83
- "foo": "bar"
84
- }
85
- }
86
- }
64
+ "$ref": "#/components/schemas/CreatedResponse"
87
65
  }
88
66
  }
89
- }
90
- },
91
- "401": {
92
- "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
93
- "content": {
94
- "application/json": {
95
- "schema": {
96
- "$ref": "#/components/schemas/Error"
97
- },
98
- "examples": {
99
- "exampleResponse": {
100
- "value": {
101
- "name": "UnauthorizedError",
102
- "message": "errorMessage"
103
- }
104
- }
105
- }
106
- }
107
- }
108
- },
109
- "500": {
110
- "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
111
- "content": {
112
- "application/json": {
67
+ },
68
+ "headers": {
69
+ "location": {
113
70
  "schema": {
114
- "$ref": "#/components/schemas/Error"
71
+ "type": "string"
115
72
  },
116
- "examples": {
117
- "exampleResponse": {
118
- "value": {
119
- "name": "InternalServerError",
120
- "message": "errorMessage"
121
- }
122
- }
123
- }
73
+ "description": "e.g. my-counter"
124
74
  }
125
75
  }
126
76
  }
@@ -197,63 +147,6 @@
197
147
  }
198
148
  }
199
149
  }
200
- },
201
- "400": {
202
- "description": "The server cannot process the request, see the content for more details.",
203
- "content": {
204
- "application/json": {
205
- "schema": {
206
- "$ref": "#/components/schemas/Error"
207
- },
208
- "examples": {
209
- "exampleResponse": {
210
- "value": {
211
- "name": "GeneralError",
212
- "message": "errorMessage",
213
- "properties": {
214
- "foo": "bar"
215
- }
216
- }
217
- }
218
- }
219
- }
220
- }
221
- },
222
- "401": {
223
- "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
224
- "content": {
225
- "application/json": {
226
- "schema": {
227
- "$ref": "#/components/schemas/Error"
228
- },
229
- "examples": {
230
- "exampleResponse": {
231
- "value": {
232
- "name": "UnauthorizedError",
233
- "message": "errorMessage"
234
- }
235
- }
236
- }
237
- }
238
- }
239
- },
240
- "500": {
241
- "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
242
- "content": {
243
- "application/json": {
244
- "schema": {
245
- "$ref": "#/components/schemas/Error"
246
- },
247
- "examples": {
248
- "exampleResponse": {
249
- "value": {
250
- "name": "InternalServerError",
251
- "message": "errorMessage"
252
- }
253
- }
254
- }
255
- }
256
- }
257
150
  }
258
151
  }
259
152
  }
@@ -311,63 +204,6 @@
311
204
  }
312
205
  }
313
206
  }
314
- },
315
- "400": {
316
- "description": "The server cannot process the request, see the content for more details.",
317
- "content": {
318
- "application/json": {
319
- "schema": {
320
- "$ref": "#/components/schemas/Error"
321
- },
322
- "examples": {
323
- "exampleResponse": {
324
- "value": {
325
- "name": "GeneralError",
326
- "message": "errorMessage",
327
- "properties": {
328
- "foo": "bar"
329
- }
330
- }
331
- }
332
- }
333
- }
334
- }
335
- },
336
- "401": {
337
- "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
338
- "content": {
339
- "application/json": {
340
- "schema": {
341
- "$ref": "#/components/schemas/Error"
342
- },
343
- "examples": {
344
- "exampleResponse": {
345
- "value": {
346
- "name": "UnauthorizedError",
347
- "message": "errorMessage"
348
- }
349
- }
350
- }
351
- }
352
- }
353
- },
354
- "500": {
355
- "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
356
- "content": {
357
- "application/json": {
358
- "schema": {
359
- "$ref": "#/components/schemas/Error"
360
- },
361
- "examples": {
362
- "exampleResponse": {
363
- "value": {
364
- "name": "InternalServerError",
365
- "message": "errorMessage"
366
- }
367
- }
368
- }
369
- }
370
- }
371
207
  }
372
208
  }
373
209
  },
@@ -414,62 +250,12 @@
414
250
  }
415
251
  },
416
252
  "responses": {
417
- "204": {
418
- "description": "The rest request ended in success with no data."
419
- },
420
- "400": {
421
- "description": "The server cannot process the request, see the content for more details.",
422
- "content": {
423
- "application/json": {
424
- "schema": {
425
- "$ref": "#/components/schemas/Error"
426
- },
427
- "examples": {
428
- "exampleResponse": {
429
- "value": {
430
- "name": "GeneralError",
431
- "message": "errorMessage",
432
- "properties": {
433
- "foo": "bar"
434
- }
435
- }
436
- }
437
- }
438
- }
439
- }
440
- },
441
- "401": {
442
- "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
253
+ "200": {
254
+ "description": "The rest request ended in success with no data.",
443
255
  "content": {
444
- "application/json": {
256
+ "text/plain": {
445
257
  "schema": {
446
- "$ref": "#/components/schemas/Error"
447
- },
448
- "examples": {
449
- "exampleResponse": {
450
- "value": {
451
- "name": "UnauthorizedError",
452
- "message": "errorMessage"
453
- }
454
- }
455
- }
456
- }
457
- }
458
- },
459
- "500": {
460
- "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
461
- "content": {
462
- "application/json": {
463
- "schema": {
464
- "$ref": "#/components/schemas/Error"
465
- },
466
- "examples": {
467
- "exampleResponse": {
468
- "value": {
469
- "name": "InternalServerError",
470
- "message": "errorMessage"
471
- }
472
- }
258
+ "$ref": "#/components/schemas/NoContentResponse"
473
259
  }
474
260
  }
475
261
  }
@@ -501,62 +287,12 @@
501
287
  }
502
288
  ],
503
289
  "responses": {
504
- "204": {
505
- "description": "The rest request ended in success with no data."
506
- },
507
- "400": {
508
- "description": "The server cannot process the request, see the content for more details.",
509
- "content": {
510
- "application/json": {
511
- "schema": {
512
- "$ref": "#/components/schemas/Error"
513
- },
514
- "examples": {
515
- "exampleResponse": {
516
- "value": {
517
- "name": "GeneralError",
518
- "message": "errorMessage",
519
- "properties": {
520
- "foo": "bar"
521
- }
522
- }
523
- }
524
- }
525
- }
526
- }
527
- },
528
- "401": {
529
- "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
530
- "content": {
531
- "application/json": {
532
- "schema": {
533
- "$ref": "#/components/schemas/Error"
534
- },
535
- "examples": {
536
- "exampleResponse": {
537
- "value": {
538
- "name": "UnauthorizedError",
539
- "message": "errorMessage"
540
- }
541
- }
542
- }
543
- }
544
- }
545
- },
546
- "500": {
547
- "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
290
+ "200": {
291
+ "description": "The rest request ended in success with no data.",
548
292
  "content": {
549
- "application/json": {
293
+ "text/plain": {
550
294
  "schema": {
551
- "$ref": "#/components/schemas/Error"
552
- },
553
- "examples": {
554
- "exampleResponse": {
555
- "value": {
556
- "name": "InternalServerError",
557
- "message": "errorMessage"
558
- }
559
- }
295
+ "$ref": "#/components/schemas/NoContentResponse"
560
296
  }
561
297
  }
562
298
  }
@@ -613,71 +349,21 @@
613
349
  }
614
350
  },
615
351
  "responses": {
616
- "201": {
352
+ "200": {
617
353
  "description": "The rest request ended in created response.",
618
- "headers": {
619
- "location": {
620
- "schema": {
621
- "type": "string"
622
- },
623
- "description": "e.g. aabbccdd11223445566"
624
- }
625
- }
626
- },
627
- "400": {
628
- "description": "The server cannot process the request, see the content for more details.",
629
- "content": {
630
- "application/json": {
631
- "schema": {
632
- "$ref": "#/components/schemas/Error"
633
- },
634
- "examples": {
635
- "exampleResponse": {
636
- "value": {
637
- "name": "GeneralError",
638
- "message": "errorMessage",
639
- "properties": {
640
- "foo": "bar"
641
- }
642
- }
643
- }
644
- }
645
- }
646
- }
647
- },
648
- "401": {
649
- "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
650
354
  "content": {
651
- "application/json": {
355
+ "text/plain": {
652
356
  "schema": {
653
- "$ref": "#/components/schemas/Error"
654
- },
655
- "examples": {
656
- "exampleResponse": {
657
- "value": {
658
- "name": "UnauthorizedError",
659
- "message": "errorMessage"
660
- }
661
- }
357
+ "$ref": "#/components/schemas/CreatedResponse"
662
358
  }
663
359
  }
664
- }
665
- },
666
- "500": {
667
- "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
668
- "content": {
669
- "application/json": {
360
+ },
361
+ "headers": {
362
+ "location": {
670
363
  "schema": {
671
- "$ref": "#/components/schemas/Error"
364
+ "type": "string"
672
365
  },
673
- "examples": {
674
- "exampleResponse": {
675
- "value": {
676
- "name": "InternalServerError",
677
- "message": "errorMessage"
678
- }
679
- }
680
- }
366
+ "description": "e.g. aabbccdd11223445566"
681
367
  }
682
368
  }
683
369
  }
@@ -784,63 +470,6 @@
784
470
  }
785
471
  }
786
472
  }
787
- },
788
- "400": {
789
- "description": "The server cannot process the request, see the content for more details.",
790
- "content": {
791
- "application/json": {
792
- "schema": {
793
- "$ref": "#/components/schemas/Error"
794
- },
795
- "examples": {
796
- "exampleResponse": {
797
- "value": {
798
- "name": "GeneralError",
799
- "message": "errorMessage",
800
- "properties": {
801
- "foo": "bar"
802
- }
803
- }
804
- }
805
- }
806
- }
807
- }
808
- },
809
- "401": {
810
- "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
811
- "content": {
812
- "application/json": {
813
- "schema": {
814
- "$ref": "#/components/schemas/Error"
815
- },
816
- "examples": {
817
- "exampleResponse": {
818
- "value": {
819
- "name": "UnauthorizedError",
820
- "message": "errorMessage"
821
- }
822
- }
823
- }
824
- }
825
- }
826
- },
827
- "500": {
828
- "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
829
- "content": {
830
- "application/json": {
831
- "schema": {
832
- "$ref": "#/components/schemas/Error"
833
- },
834
- "examples": {
835
- "exampleResponse": {
836
- "value": {
837
- "name": "InternalServerError",
838
- "message": "errorMessage"
839
- }
840
- }
841
- }
842
- }
843
- }
844
473
  }
845
474
  }
846
475
  }
@@ -848,41 +477,6 @@
848
477
  },
849
478
  "components": {
850
479
  "schemas": {
851
- "Error": {
852
- "type": "object",
853
- "properties": {
854
- "name": {
855
- "type": "string",
856
- "description": "The name for the error."
857
- },
858
- "message": {
859
- "type": "string",
860
- "description": "The message for the error."
861
- },
862
- "source": {
863
- "type": "string",
864
- "description": "The source of the error."
865
- },
866
- "properties": {
867
- "type": "object",
868
- "additionalProperties": {},
869
- "description": "Any additional information for the error."
870
- },
871
- "stack": {
872
- "type": "string",
873
- "description": "The stack trace for the error."
874
- },
875
- "cause": {
876
- "$ref": "#/components/schemas/Error"
877
- }
878
- },
879
- "required": [
880
- "name",
881
- "message"
882
- ],
883
- "additionalProperties": false,
884
- "description": "Model to describe serialized error."
885
- },
886
480
  "MetricType": {
887
481
  "anyOf": [
888
482
  {
@@ -956,13 +550,10 @@
956
550
  "properties": {
957
551
  "entities": {
958
552
  "type": "array",
959
- "items": false,
960
- "description": "The metrics.",
961
- "prefixItems": [
962
- {
963
- "$ref": "#/components/schemas/TelemetryMetric"
964
- }
965
- ]
553
+ "items": {
554
+ "$ref": "#/components/schemas/TelemetryMetric"
555
+ },
556
+ "description": "The metrics."
966
557
  },
967
558
  "cursor": {
968
559
  "type": "string",
@@ -1065,13 +656,10 @@
1065
656
  },
1066
657
  "entities": {
1067
658
  "type": "array",
1068
- "items": false,
1069
- "description": "The metric values.",
1070
- "prefixItems": [
1071
- {
1072
- "$ref": "#/components/schemas/TelemetryMetricValue"
1073
- }
1074
- ]
659
+ "items": {
660
+ "$ref": "#/components/schemas/TelemetryMetricValue"
661
+ },
662
+ "description": "The metric values."
1075
663
  },
1076
664
  "cursor": {
1077
665
  "type": "string",
@@ -36,6 +36,24 @@ Runtime name for the class.
36
36
 
37
37
  ## Methods
38
38
 
39
+ ### className()
40
+
41
+ > **className**(): `string`
42
+
43
+ Returns the class name of the component.
44
+
45
+ #### Returns
46
+
47
+ `string`
48
+
49
+ The class name of the component.
50
+
51
+ #### Implementation of
52
+
53
+ `ITelemetryComponent.className`
54
+
55
+ ***
56
+
39
57
  ### createMetric()
40
58
 
41
59
  > **createMetric**(`metric`): `Promise`\<`void`\>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/telemetry-service",
3
- "version": "0.0.2-next.3",
3
+ "version": "0.0.3-next.1",
4
4
  "description": "Telemetry contract implementation and REST endpoint definitions",
5
5
  "repository": {
6
6
  "type": "git",
@@ -18,23 +18,21 @@
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.2-next.3",
21
+ "@twin.org/telemetry-models": "0.0.3-next.1",
22
22
  "@twin.org/web": "next"
23
23
  },
24
- "main": "./dist/cjs/index.cjs",
25
- "module": "./dist/esm/index.mjs",
24
+ "main": "./dist/es/index.js",
26
25
  "types": "./dist/types/index.d.ts",
27
26
  "exports": {
28
27
  ".": {
29
28
  "types": "./dist/types/index.d.ts",
30
- "require": "./dist/cjs/index.cjs",
31
- "import": "./dist/esm/index.mjs"
29
+ "import": "./dist/es/index.js",
30
+ "default": "./dist/es/index.js"
32
31
  },
33
32
  "./locales/*.json": "./locales/*.json"
34
33
  },
35
34
  "files": [
36
- "dist/cjs",
37
- "dist/esm",
35
+ "dist/es",
38
36
  "dist/types",
39
37
  "locales",
40
38
  "docs"