@twin.org/telemetry-service 0.0.2-next.2 → 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
- "content": {
73
- "application/json": {
74
- "schema": {
75
- "$ref": "#/components/schemas/Error"
76
- },
77
- "examples": {
78
- "exampleResponse": {
79
- "value": {
80
- "name": "GeneralError",
81
- "message": "component.error",
82
- "properties": {
83
- "foo": "bar"
84
- }
85
- }
86
- }
87
- }
88
- }
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
61
  "content": {
94
- "application/json": {
62
+ "text/plain": {
95
63
  "schema": {
96
- "$ref": "#/components/schemas/Error"
97
- },
98
- "examples": {
99
- "exampleResponse": {
100
- "value": {
101
- "name": "UnauthorizedError",
102
- "message": "component.error"
103
- }
104
- }
64
+ "$ref": "#/components/schemas/CreatedResponse"
105
65
  }
106
66
  }
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": "component.error"
121
- }
122
- }
123
- }
73
+ "description": "e.g. my-counter"
124
74
  }
125
75
  }
126
76
  }
@@ -152,15 +102,12 @@
152
102
  }
153
103
  },
154
104
  {
155
- "name": "pageSize",
156
- "description": "The maximum number of entities in a page.",
105
+ "name": "limit",
106
+ "description": "Limit the number of entities to return.",
157
107
  "in": "query",
158
108
  "required": false,
159
109
  "schema": {
160
- "type": [
161
- "number",
162
- "string"
163
- ]
110
+ "type": "string"
164
111
  }
165
112
  }
166
113
  ],
@@ -200,63 +147,6 @@
200
147
  }
201
148
  }
202
149
  }
203
- },
204
- "400": {
205
- "description": "The server cannot process the request, see the content for more details.",
206
- "content": {
207
- "application/json": {
208
- "schema": {
209
- "$ref": "#/components/schemas/Error"
210
- },
211
- "examples": {
212
- "exampleResponse": {
213
- "value": {
214
- "name": "GeneralError",
215
- "message": "component.error",
216
- "properties": {
217
- "foo": "bar"
218
- }
219
- }
220
- }
221
- }
222
- }
223
- }
224
- },
225
- "401": {
226
- "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
227
- "content": {
228
- "application/json": {
229
- "schema": {
230
- "$ref": "#/components/schemas/Error"
231
- },
232
- "examples": {
233
- "exampleResponse": {
234
- "value": {
235
- "name": "UnauthorizedError",
236
- "message": "component.error"
237
- }
238
- }
239
- }
240
- }
241
- }
242
- },
243
- "500": {
244
- "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
245
- "content": {
246
- "application/json": {
247
- "schema": {
248
- "$ref": "#/components/schemas/Error"
249
- },
250
- "examples": {
251
- "exampleResponse": {
252
- "value": {
253
- "name": "InternalServerError",
254
- "message": "component.error"
255
- }
256
- }
257
- }
258
- }
259
- }
260
150
  }
261
151
  }
262
152
  }
@@ -314,63 +204,6 @@
314
204
  }
315
205
  }
316
206
  }
317
- },
318
- "400": {
319
- "description": "The server cannot process the request, see the content for more details.",
320
- "content": {
321
- "application/json": {
322
- "schema": {
323
- "$ref": "#/components/schemas/Error"
324
- },
325
- "examples": {
326
- "exampleResponse": {
327
- "value": {
328
- "name": "GeneralError",
329
- "message": "component.error",
330
- "properties": {
331
- "foo": "bar"
332
- }
333
- }
334
- }
335
- }
336
- }
337
- }
338
- },
339
- "401": {
340
- "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
341
- "content": {
342
- "application/json": {
343
- "schema": {
344
- "$ref": "#/components/schemas/Error"
345
- },
346
- "examples": {
347
- "exampleResponse": {
348
- "value": {
349
- "name": "UnauthorizedError",
350
- "message": "component.error"
351
- }
352
- }
353
- }
354
- }
355
- }
356
- },
357
- "500": {
358
- "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
359
- "content": {
360
- "application/json": {
361
- "schema": {
362
- "$ref": "#/components/schemas/Error"
363
- },
364
- "examples": {
365
- "exampleResponse": {
366
- "value": {
367
- "name": "InternalServerError",
368
- "message": "component.error"
369
- }
370
- }
371
- }
372
- }
373
- }
374
207
  }
375
208
  }
376
209
  },
@@ -417,62 +250,12 @@
417
250
  }
418
251
  },
419
252
  "responses": {
420
- "204": {
421
- "description": "The rest request ended in success with no data."
422
- },
423
- "400": {
424
- "description": "The server cannot process the request, see the content for more details.",
425
- "content": {
426
- "application/json": {
427
- "schema": {
428
- "$ref": "#/components/schemas/Error"
429
- },
430
- "examples": {
431
- "exampleResponse": {
432
- "value": {
433
- "name": "GeneralError",
434
- "message": "component.error",
435
- "properties": {
436
- "foo": "bar"
437
- }
438
- }
439
- }
440
- }
441
- }
442
- }
443
- },
444
- "401": {
445
- "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.",
446
255
  "content": {
447
- "application/json": {
256
+ "text/plain": {
448
257
  "schema": {
449
- "$ref": "#/components/schemas/Error"
450
- },
451
- "examples": {
452
- "exampleResponse": {
453
- "value": {
454
- "name": "UnauthorizedError",
455
- "message": "component.error"
456
- }
457
- }
458
- }
459
- }
460
- }
461
- },
462
- "500": {
463
- "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
464
- "content": {
465
- "application/json": {
466
- "schema": {
467
- "$ref": "#/components/schemas/Error"
468
- },
469
- "examples": {
470
- "exampleResponse": {
471
- "value": {
472
- "name": "InternalServerError",
473
- "message": "component.error"
474
- }
475
- }
258
+ "$ref": "#/components/schemas/NoContentResponse"
476
259
  }
477
260
  }
478
261
  }
@@ -504,62 +287,12 @@
504
287
  }
505
288
  ],
506
289
  "responses": {
507
- "204": {
508
- "description": "The rest request ended in success with no data."
509
- },
510
- "400": {
511
- "description": "The server cannot process the request, see the content for more details.",
512
- "content": {
513
- "application/json": {
514
- "schema": {
515
- "$ref": "#/components/schemas/Error"
516
- },
517
- "examples": {
518
- "exampleResponse": {
519
- "value": {
520
- "name": "GeneralError",
521
- "message": "component.error",
522
- "properties": {
523
- "foo": "bar"
524
- }
525
- }
526
- }
527
- }
528
- }
529
- }
530
- },
531
- "401": {
532
- "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
533
- "content": {
534
- "application/json": {
535
- "schema": {
536
- "$ref": "#/components/schemas/Error"
537
- },
538
- "examples": {
539
- "exampleResponse": {
540
- "value": {
541
- "name": "UnauthorizedError",
542
- "message": "component.error"
543
- }
544
- }
545
- }
546
- }
547
- }
548
- },
549
- "500": {
550
- "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.",
551
292
  "content": {
552
- "application/json": {
293
+ "text/plain": {
553
294
  "schema": {
554
- "$ref": "#/components/schemas/Error"
555
- },
556
- "examples": {
557
- "exampleResponse": {
558
- "value": {
559
- "name": "InternalServerError",
560
- "message": "component.error"
561
- }
562
- }
295
+ "$ref": "#/components/schemas/NoContentResponse"
563
296
  }
564
297
  }
565
298
  }
@@ -616,71 +349,21 @@
616
349
  }
617
350
  },
618
351
  "responses": {
619
- "201": {
352
+ "200": {
620
353
  "description": "The rest request ended in created response.",
621
- "headers": {
622
- "location": {
623
- "schema": {
624
- "type": "string"
625
- },
626
- "description": "e.g. aabbccdd11223445566"
627
- }
628
- }
629
- },
630
- "400": {
631
- "description": "The server cannot process the request, see the content for more details.",
632
354
  "content": {
633
- "application/json": {
355
+ "text/plain": {
634
356
  "schema": {
635
- "$ref": "#/components/schemas/Error"
636
- },
637
- "examples": {
638
- "exampleResponse": {
639
- "value": {
640
- "name": "GeneralError",
641
- "message": "component.error",
642
- "properties": {
643
- "foo": "bar"
644
- }
645
- }
646
- }
357
+ "$ref": "#/components/schemas/CreatedResponse"
647
358
  }
648
359
  }
649
- }
650
- },
651
- "401": {
652
- "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
653
- "content": {
654
- "application/json": {
655
- "schema": {
656
- "$ref": "#/components/schemas/Error"
657
- },
658
- "examples": {
659
- "exampleResponse": {
660
- "value": {
661
- "name": "UnauthorizedError",
662
- "message": "component.error"
663
- }
664
- }
665
- }
666
- }
667
- }
668
- },
669
- "500": {
670
- "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
671
- "content": {
672
- "application/json": {
360
+ },
361
+ "headers": {
362
+ "location": {
673
363
  "schema": {
674
- "$ref": "#/components/schemas/Error"
364
+ "type": "string"
675
365
  },
676
- "examples": {
677
- "exampleResponse": {
678
- "value": {
679
- "name": "InternalServerError",
680
- "message": "component.error"
681
- }
682
- }
683
- }
366
+ "description": "e.g. aabbccdd11223445566"
684
367
  }
685
368
  }
686
369
  }
@@ -738,15 +421,12 @@
738
421
  }
739
422
  },
740
423
  {
741
- "name": "pageSize",
742
- "description": "The maximum number of entities in a page.",
424
+ "name": "limit",
425
+ "description": "Limit the number of entities to return.",
743
426
  "in": "query",
744
427
  "required": false,
745
428
  "schema": {
746
- "type": [
747
- "number",
748
- "string"
749
- ]
429
+ "type": "string"
750
430
  }
751
431
  }
752
432
  ],
@@ -790,63 +470,6 @@
790
470
  }
791
471
  }
792
472
  }
793
- },
794
- "400": {
795
- "description": "The server cannot process the request, see the content for more details.",
796
- "content": {
797
- "application/json": {
798
- "schema": {
799
- "$ref": "#/components/schemas/Error"
800
- },
801
- "examples": {
802
- "exampleResponse": {
803
- "value": {
804
- "name": "GeneralError",
805
- "message": "component.error",
806
- "properties": {
807
- "foo": "bar"
808
- }
809
- }
810
- }
811
- }
812
- }
813
- }
814
- },
815
- "401": {
816
- "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
817
- "content": {
818
- "application/json": {
819
- "schema": {
820
- "$ref": "#/components/schemas/Error"
821
- },
822
- "examples": {
823
- "exampleResponse": {
824
- "value": {
825
- "name": "UnauthorizedError",
826
- "message": "component.error"
827
- }
828
- }
829
- }
830
- }
831
- }
832
- },
833
- "500": {
834
- "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
835
- "content": {
836
- "application/json": {
837
- "schema": {
838
- "$ref": "#/components/schemas/Error"
839
- },
840
- "examples": {
841
- "exampleResponse": {
842
- "value": {
843
- "name": "InternalServerError",
844
- "message": "component.error"
845
- }
846
- }
847
- }
848
- }
849
- }
850
473
  }
851
474
  }
852
475
  }
@@ -854,41 +477,6 @@
854
477
  },
855
478
  "components": {
856
479
  "schemas": {
857
- "Error": {
858
- "type": "object",
859
- "properties": {
860
- "name": {
861
- "type": "string",
862
- "description": "The name for the error."
863
- },
864
- "message": {
865
- "type": "string",
866
- "description": "The message for the error."
867
- },
868
- "source": {
869
- "type": "string",
870
- "description": "The source of the error."
871
- },
872
- "properties": {
873
- "type": "object",
874
- "additionalProperties": {},
875
- "description": "Any additional information for the error."
876
- },
877
- "stack": {
878
- "type": "string",
879
- "description": "The stack trace for the error."
880
- },
881
- "cause": {
882
- "$ref": "#/components/schemas/Error"
883
- }
884
- },
885
- "required": [
886
- "name",
887
- "message"
888
- ],
889
- "additionalProperties": false,
890
- "description": "Model to describe serialized error."
891
- },
892
480
  "MetricType": {
893
481
  "anyOf": [
894
482
  {
@@ -962,13 +550,10 @@
962
550
  "properties": {
963
551
  "entities": {
964
552
  "type": "array",
965
- "items": false,
966
- "description": "The metrics.",
967
- "prefixItems": [
968
- {
969
- "$ref": "#/components/schemas/TelemetryMetric"
970
- }
971
- ]
553
+ "items": {
554
+ "$ref": "#/components/schemas/TelemetryMetric"
555
+ },
556
+ "description": "The metrics."
972
557
  },
973
558
  "cursor": {
974
559
  "type": "string",
@@ -1071,13 +656,10 @@
1071
656
  },
1072
657
  "entities": {
1073
658
  "type": "array",
1074
- "items": false,
1075
- "description": "The metric values.",
1076
- "prefixItems": [
1077
- {
1078
- "$ref": "#/components/schemas/TelemetryMetricValue"
1079
- }
1080
- ]
659
+ "items": {
660
+ "$ref": "#/components/schemas/TelemetryMetricValue"
661
+ },
662
+ "description": "The metric values."
1081
663
  },
1082
664
  "cursor": {
1083
665
  "type": "string",
@@ -30,15 +30,29 @@ The options for the connector.
30
30
 
31
31
  ### CLASS\_NAME
32
32
 
33
- > `readonly` **CLASS\_NAME**: `string`
33
+ > `readonly` `static` **CLASS\_NAME**: `string`
34
34
 
35
35
  Runtime name for the class.
36
36
 
37
+ ## Methods
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
+
37
51
  #### Implementation of
38
52
 
39
- `ITelemetryComponent.CLASS_NAME`
53
+ `ITelemetryComponent.className`
40
54
 
41
- ## Methods
55
+ ***
42
56
 
43
57
  ### createMetric()
44
58
 
@@ -182,7 +196,7 @@ Nothing.
182
196
 
183
197
  ### query()
184
198
 
185
- > **query**(`type?`, `cursor?`, `pageSize?`): `Promise`\<\{ `entities`: `ITelemetryMetric`[]; `cursor?`: `string`; \}\>
199
+ > **query**(`type?`, `cursor?`, `limit?`): `Promise`\<\{ `entities`: `ITelemetryMetric`[]; `cursor?`: `string`; \}\>
186
200
 
187
201
  Query the metrics.
188
202
 
@@ -198,13 +212,13 @@ The type of the metric.
198
212
 
199
213
  `string`
200
214
 
201
- The cursor to request the next page of entities.
215
+ The cursor to request the next chunk of entities.
202
216
 
203
- ##### pageSize?
217
+ ##### limit?
204
218
 
205
219
  `number`
206
220
 
207
- The maximum number of entities in a page.
221
+ Limit the number of entities to return.
208
222
 
209
223
  #### Returns
210
224
 
@@ -225,7 +239,7 @@ NotImplementedError if the implementation does not support retrieval.
225
239
 
226
240
  ### queryValues()
227
241
 
228
- > **queryValues**(`id`, `timeStart?`, `timeEnd?`, `cursor?`, `pageSize?`): `Promise`\<\{ `metric`: `ITelemetryMetric`; `entities`: `ITelemetryMetricValue`[]; `cursor?`: `string`; \}\>
242
+ > **queryValues**(`id`, `timeStart?`, `timeEnd?`, `cursor?`, `limit?`): `Promise`\<\{ `metric`: `ITelemetryMetric`; `entities`: `ITelemetryMetricValue`[]; `cursor?`: `string`; \}\>
229
243
 
230
244
  Query the metric values.
231
245
 
@@ -253,13 +267,13 @@ The inclusive time as the end of the metric entries.
253
267
 
254
268
  `string`
255
269
 
256
- The cursor to request the next page of entities.
270
+ The cursor to request the next chunk of entities.
257
271
 
258
- ##### pageSize?
272
+ ##### limit?
259
273
 
260
274
  `number`
261
275
 
262
- The maximum number of entities in a page.
276
+ Limit the number of entities to return.
263
277
 
264
278
  #### Returns
265
279