@twin.org/entity-storage-service 0.0.3-next.1 → 0.0.3-next.10
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.
- package/README.md +2 -2
- package/dist/es/entityStorageRoutes.js +173 -1
- package/dist/es/entityStorageRoutes.js.map +1 -1
- package/dist/es/entityStorageService.js +35 -44
- package/dist/es/entityStorageService.js.map +1 -1
- package/dist/es/models/IEntityStorageRoutesExamples.js.map +1 -1
- package/dist/types/entityStorageRoutes.d.ts +33 -1
- package/dist/types/entityStorageService.d.ts +22 -0
- package/dist/types/models/IEntityStorageRoutesExamples.d.ts +8 -1
- package/docs/changelog.md +188 -44
- package/docs/examples.md +77 -1
- package/docs/open-api/spec.json +690 -46
- package/docs/reference/classes/EntityStorageService.md +94 -6
- package/docs/reference/functions/entityStorageCount.md +31 -0
- package/docs/reference/functions/entityStorageEmpty.md +31 -0
- package/docs/reference/functions/entityStorageRemoveBatch.md +31 -0
- package/docs/reference/functions/entityStorageSetBatch.md +31 -0
- package/docs/reference/index.md +4 -0
- package/docs/reference/interfaces/IEntityStorageRoutesExamples.md +24 -8
- package/docs/reference/interfaces/IEntityStorageServiceConstructorOptions.md +3 -3
- package/locales/en.json +1 -7
- package/package.json +5 -5
package/docs/open-api/spec.json
CHANGED
|
@@ -53,12 +53,147 @@
|
|
|
53
53
|
}
|
|
54
54
|
},
|
|
55
55
|
"responses": {
|
|
56
|
-
"
|
|
57
|
-
"description": "The rest request ended in success with no data."
|
|
56
|
+
"204": {
|
|
57
|
+
"description": "The rest request ended in success with no data."
|
|
58
|
+
},
|
|
59
|
+
"400": {
|
|
60
|
+
"description": "The server cannot process the request, see the content for more details.",
|
|
58
61
|
"content": {
|
|
59
|
-
"
|
|
62
|
+
"application/json": {
|
|
63
|
+
"schema": {
|
|
64
|
+
"$ref": "#/components/schemas/Error"
|
|
65
|
+
},
|
|
66
|
+
"examples": {
|
|
67
|
+
"exampleResponse": {
|
|
68
|
+
"value": {
|
|
69
|
+
"name": "GeneralError",
|
|
70
|
+
"message": "errorMessage",
|
|
71
|
+
"properties": {
|
|
72
|
+
"foo": "bar"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"401": {
|
|
81
|
+
"description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
|
|
82
|
+
"content": {
|
|
83
|
+
"application/json": {
|
|
60
84
|
"schema": {
|
|
61
|
-
"$ref": "#/components/schemas/
|
|
85
|
+
"$ref": "#/components/schemas/Error"
|
|
86
|
+
},
|
|
87
|
+
"examples": {
|
|
88
|
+
"exampleResponse": {
|
|
89
|
+
"value": {
|
|
90
|
+
"name": "UnauthorizedError",
|
|
91
|
+
"message": "errorMessage"
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"500": {
|
|
99
|
+
"description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
|
|
100
|
+
"content": {
|
|
101
|
+
"application/json": {
|
|
102
|
+
"schema": {
|
|
103
|
+
"$ref": "#/components/schemas/Error"
|
|
104
|
+
},
|
|
105
|
+
"examples": {
|
|
106
|
+
"exampleResponse": {
|
|
107
|
+
"value": {
|
|
108
|
+
"name": "InternalServerError",
|
|
109
|
+
"message": "errorMessage"
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"delete": {
|
|
119
|
+
"operationId": "entityStorageEmpty",
|
|
120
|
+
"summary": "Remove all entries from entity storage.",
|
|
121
|
+
"tags": [
|
|
122
|
+
"EntityStorage"
|
|
123
|
+
],
|
|
124
|
+
"security": [
|
|
125
|
+
{
|
|
126
|
+
"jwtBearerAuthScheme": []
|
|
127
|
+
}
|
|
128
|
+
],
|
|
129
|
+
"requestBody": {
|
|
130
|
+
"description": "Remove all entries from entity storage.",
|
|
131
|
+
"required": true,
|
|
132
|
+
"content": {
|
|
133
|
+
"text/plain": {
|
|
134
|
+
"schema": {
|
|
135
|
+
"$ref": "#/components/schemas/EntityStorageEmptyRequest"
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"responses": {
|
|
141
|
+
"204": {
|
|
142
|
+
"description": "The rest request ended in success with no data."
|
|
143
|
+
},
|
|
144
|
+
"400": {
|
|
145
|
+
"description": "The server cannot process the request, see the content for more details.",
|
|
146
|
+
"content": {
|
|
147
|
+
"application/json": {
|
|
148
|
+
"schema": {
|
|
149
|
+
"$ref": "#/components/schemas/Error"
|
|
150
|
+
},
|
|
151
|
+
"examples": {
|
|
152
|
+
"exampleResponse": {
|
|
153
|
+
"value": {
|
|
154
|
+
"name": "GeneralError",
|
|
155
|
+
"message": "errorMessage",
|
|
156
|
+
"properties": {
|
|
157
|
+
"foo": "bar"
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
"401": {
|
|
166
|
+
"description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
|
|
167
|
+
"content": {
|
|
168
|
+
"application/json": {
|
|
169
|
+
"schema": {
|
|
170
|
+
"$ref": "#/components/schemas/Error"
|
|
171
|
+
},
|
|
172
|
+
"examples": {
|
|
173
|
+
"exampleResponse": {
|
|
174
|
+
"value": {
|
|
175
|
+
"name": "UnauthorizedError",
|
|
176
|
+
"message": "errorMessage"
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
"500": {
|
|
184
|
+
"description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
|
|
185
|
+
"content": {
|
|
186
|
+
"application/json": {
|
|
187
|
+
"schema": {
|
|
188
|
+
"$ref": "#/components/schemas/Error"
|
|
189
|
+
},
|
|
190
|
+
"examples": {
|
|
191
|
+
"exampleResponse": {
|
|
192
|
+
"value": {
|
|
193
|
+
"name": "InternalServerError",
|
|
194
|
+
"message": "errorMessage"
|
|
195
|
+
}
|
|
196
|
+
}
|
|
62
197
|
}
|
|
63
198
|
}
|
|
64
199
|
}
|
|
@@ -154,6 +289,257 @@
|
|
|
154
289
|
}
|
|
155
290
|
}
|
|
156
291
|
}
|
|
292
|
+
},
|
|
293
|
+
"400": {
|
|
294
|
+
"description": "The server cannot process the request, see the content for more details.",
|
|
295
|
+
"content": {
|
|
296
|
+
"application/json": {
|
|
297
|
+
"schema": {
|
|
298
|
+
"$ref": "#/components/schemas/Error"
|
|
299
|
+
},
|
|
300
|
+
"examples": {
|
|
301
|
+
"exampleResponse": {
|
|
302
|
+
"value": {
|
|
303
|
+
"name": "GeneralError",
|
|
304
|
+
"message": "errorMessage",
|
|
305
|
+
"properties": {
|
|
306
|
+
"foo": "bar"
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
},
|
|
314
|
+
"401": {
|
|
315
|
+
"description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
|
|
316
|
+
"content": {
|
|
317
|
+
"application/json": {
|
|
318
|
+
"schema": {
|
|
319
|
+
"$ref": "#/components/schemas/Error"
|
|
320
|
+
},
|
|
321
|
+
"examples": {
|
|
322
|
+
"exampleResponse": {
|
|
323
|
+
"value": {
|
|
324
|
+
"name": "UnauthorizedError",
|
|
325
|
+
"message": "errorMessage"
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
"500": {
|
|
333
|
+
"description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
|
|
334
|
+
"content": {
|
|
335
|
+
"application/json": {
|
|
336
|
+
"schema": {
|
|
337
|
+
"$ref": "#/components/schemas/Error"
|
|
338
|
+
},
|
|
339
|
+
"examples": {
|
|
340
|
+
"exampleResponse": {
|
|
341
|
+
"value": {
|
|
342
|
+
"name": "InternalServerError",
|
|
343
|
+
"message": "errorMessage"
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
},
|
|
353
|
+
"/entity-storage/batch": {
|
|
354
|
+
"post": {
|
|
355
|
+
"operationId": "entityStorageSetBatch",
|
|
356
|
+
"summary": "Set multiple entries in entity storage.",
|
|
357
|
+
"tags": [
|
|
358
|
+
"EntityStorage"
|
|
359
|
+
],
|
|
360
|
+
"security": [
|
|
361
|
+
{
|
|
362
|
+
"jwtBearerAuthScheme": []
|
|
363
|
+
}
|
|
364
|
+
],
|
|
365
|
+
"requestBody": {
|
|
366
|
+
"description": "Set multiple entries in entity storage.",
|
|
367
|
+
"required": true,
|
|
368
|
+
"content": {
|
|
369
|
+
"application/json": {
|
|
370
|
+
"schema": {
|
|
371
|
+
"$ref": "#/components/schemas/EntityStorageSetBatchRequest"
|
|
372
|
+
},
|
|
373
|
+
"examples": {
|
|
374
|
+
"entityStorageSetBatchRequestExample": {
|
|
375
|
+
"value": [
|
|
376
|
+
{
|
|
377
|
+
"id": "12345",
|
|
378
|
+
"name": "My Item"
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
"id": "67890",
|
|
382
|
+
"name": "My Other Item"
|
|
383
|
+
}
|
|
384
|
+
]
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
},
|
|
390
|
+
"responses": {
|
|
391
|
+
"204": {
|
|
392
|
+
"description": "The rest request ended in success with no data."
|
|
393
|
+
},
|
|
394
|
+
"400": {
|
|
395
|
+
"description": "The server cannot process the request, see the content for more details.",
|
|
396
|
+
"content": {
|
|
397
|
+
"application/json": {
|
|
398
|
+
"schema": {
|
|
399
|
+
"$ref": "#/components/schemas/Error"
|
|
400
|
+
},
|
|
401
|
+
"examples": {
|
|
402
|
+
"exampleResponse": {
|
|
403
|
+
"value": {
|
|
404
|
+
"name": "GeneralError",
|
|
405
|
+
"message": "errorMessage",
|
|
406
|
+
"properties": {
|
|
407
|
+
"foo": "bar"
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
},
|
|
415
|
+
"401": {
|
|
416
|
+
"description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
|
|
417
|
+
"content": {
|
|
418
|
+
"application/json": {
|
|
419
|
+
"schema": {
|
|
420
|
+
"$ref": "#/components/schemas/Error"
|
|
421
|
+
},
|
|
422
|
+
"examples": {
|
|
423
|
+
"exampleResponse": {
|
|
424
|
+
"value": {
|
|
425
|
+
"name": "UnauthorizedError",
|
|
426
|
+
"message": "errorMessage"
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
},
|
|
433
|
+
"500": {
|
|
434
|
+
"description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
|
|
435
|
+
"content": {
|
|
436
|
+
"application/json": {
|
|
437
|
+
"schema": {
|
|
438
|
+
"$ref": "#/components/schemas/Error"
|
|
439
|
+
},
|
|
440
|
+
"examples": {
|
|
441
|
+
"exampleResponse": {
|
|
442
|
+
"value": {
|
|
443
|
+
"name": "InternalServerError",
|
|
444
|
+
"message": "errorMessage"
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
},
|
|
453
|
+
"delete": {
|
|
454
|
+
"operationId": "entityStorageRemoveBatch",
|
|
455
|
+
"summary": "Remove multiple entries from entity storage by id.",
|
|
456
|
+
"tags": [
|
|
457
|
+
"EntityStorage"
|
|
458
|
+
],
|
|
459
|
+
"security": [
|
|
460
|
+
{
|
|
461
|
+
"jwtBearerAuthScheme": []
|
|
462
|
+
}
|
|
463
|
+
],
|
|
464
|
+
"requestBody": {
|
|
465
|
+
"description": "Remove multiple entries from entity storage by id.",
|
|
466
|
+
"required": true,
|
|
467
|
+
"content": {
|
|
468
|
+
"application/json": {
|
|
469
|
+
"schema": {
|
|
470
|
+
"$ref": "#/components/schemas/EntityStorageRemoveBatchRequest"
|
|
471
|
+
},
|
|
472
|
+
"examples": {
|
|
473
|
+
"entityStorageRemoveBatchRequestExample": {
|
|
474
|
+
"value": [
|
|
475
|
+
"12345",
|
|
476
|
+
"67890"
|
|
477
|
+
]
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
},
|
|
483
|
+
"responses": {
|
|
484
|
+
"204": {
|
|
485
|
+
"description": "The rest request ended in success with no data."
|
|
486
|
+
},
|
|
487
|
+
"400": {
|
|
488
|
+
"description": "The server cannot process the request, see the content for more details.",
|
|
489
|
+
"content": {
|
|
490
|
+
"application/json": {
|
|
491
|
+
"schema": {
|
|
492
|
+
"$ref": "#/components/schemas/Error"
|
|
493
|
+
},
|
|
494
|
+
"examples": {
|
|
495
|
+
"exampleResponse": {
|
|
496
|
+
"value": {
|
|
497
|
+
"name": "GeneralError",
|
|
498
|
+
"message": "errorMessage",
|
|
499
|
+
"properties": {
|
|
500
|
+
"foo": "bar"
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
},
|
|
508
|
+
"401": {
|
|
509
|
+
"description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
|
|
510
|
+
"content": {
|
|
511
|
+
"application/json": {
|
|
512
|
+
"schema": {
|
|
513
|
+
"$ref": "#/components/schemas/Error"
|
|
514
|
+
},
|
|
515
|
+
"examples": {
|
|
516
|
+
"exampleResponse": {
|
|
517
|
+
"value": {
|
|
518
|
+
"name": "UnauthorizedError",
|
|
519
|
+
"message": "errorMessage"
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
},
|
|
526
|
+
"500": {
|
|
527
|
+
"description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
|
|
528
|
+
"content": {
|
|
529
|
+
"application/json": {
|
|
530
|
+
"schema": {
|
|
531
|
+
"$ref": "#/components/schemas/Error"
|
|
532
|
+
},
|
|
533
|
+
"examples": {
|
|
534
|
+
"exampleResponse": {
|
|
535
|
+
"value": {
|
|
536
|
+
"name": "InternalServerError",
|
|
537
|
+
"message": "errorMessage"
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
}
|
|
157
543
|
}
|
|
158
544
|
}
|
|
159
545
|
}
|
|
@@ -194,11 +580,97 @@
|
|
|
194
580
|
],
|
|
195
581
|
"responses": {
|
|
196
582
|
"200": {
|
|
583
|
+
"description": "Get an entry from entity storage.",
|
|
584
|
+
"content": {
|
|
585
|
+
"application/json": {
|
|
586
|
+
"schema": {
|
|
587
|
+
"$ref": "#/components/schemas/EntityStorageGetResponse"
|
|
588
|
+
},
|
|
589
|
+
"examples": {
|
|
590
|
+
"entityStorageGetResponseExample": {
|
|
591
|
+
"value": {
|
|
592
|
+
"id": "12345",
|
|
593
|
+
"name": "My Item"
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
},
|
|
600
|
+
"400": {
|
|
601
|
+
"description": "The server cannot process the request, see the content for more details.",
|
|
602
|
+
"content": {
|
|
603
|
+
"application/json": {
|
|
604
|
+
"schema": {
|
|
605
|
+
"$ref": "#/components/schemas/Error"
|
|
606
|
+
},
|
|
607
|
+
"examples": {
|
|
608
|
+
"exampleResponse": {
|
|
609
|
+
"value": {
|
|
610
|
+
"name": "GeneralError",
|
|
611
|
+
"message": "errorMessage",
|
|
612
|
+
"properties": {
|
|
613
|
+
"foo": "bar"
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
},
|
|
621
|
+
"401": {
|
|
622
|
+
"description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
|
|
623
|
+
"content": {
|
|
624
|
+
"application/json": {
|
|
625
|
+
"schema": {
|
|
626
|
+
"$ref": "#/components/schemas/Error"
|
|
627
|
+
},
|
|
628
|
+
"examples": {
|
|
629
|
+
"exampleResponse": {
|
|
630
|
+
"value": {
|
|
631
|
+
"name": "UnauthorizedError",
|
|
632
|
+
"message": "errorMessage"
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
},
|
|
639
|
+
"404": {
|
|
197
640
|
"description": "The resource you tried to access does not exist, see the content for more details.",
|
|
198
641
|
"content": {
|
|
199
642
|
"application/json": {
|
|
200
643
|
"schema": {
|
|
201
644
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
645
|
+
},
|
|
646
|
+
"examples": {
|
|
647
|
+
"exampleResponse": {
|
|
648
|
+
"value": {
|
|
649
|
+
"name": "NotFoundError",
|
|
650
|
+
"message": "errorMessage",
|
|
651
|
+
"properties": {
|
|
652
|
+
"notFoundId": "1"
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
},
|
|
660
|
+
"500": {
|
|
661
|
+
"description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
|
|
662
|
+
"content": {
|
|
663
|
+
"application/json": {
|
|
664
|
+
"schema": {
|
|
665
|
+
"$ref": "#/components/schemas/Error"
|
|
666
|
+
},
|
|
667
|
+
"examples": {
|
|
668
|
+
"exampleResponse": {
|
|
669
|
+
"value": {
|
|
670
|
+
"name": "InternalServerError",
|
|
671
|
+
"message": "errorMessage"
|
|
672
|
+
}
|
|
673
|
+
}
|
|
202
674
|
}
|
|
203
675
|
}
|
|
204
676
|
}
|
|
@@ -230,17 +702,184 @@
|
|
|
230
702
|
}
|
|
231
703
|
],
|
|
232
704
|
"responses": {
|
|
233
|
-
"
|
|
234
|
-
"description": "The
|
|
705
|
+
"204": {
|
|
706
|
+
"description": "The rest request ended in success with no data."
|
|
707
|
+
},
|
|
708
|
+
"400": {
|
|
709
|
+
"description": "The server cannot process the request, see the content for more details.",
|
|
235
710
|
"content": {
|
|
236
|
-
"
|
|
711
|
+
"application/json": {
|
|
237
712
|
"schema": {
|
|
238
|
-
"$ref": "#/components/schemas/
|
|
713
|
+
"$ref": "#/components/schemas/Error"
|
|
714
|
+
},
|
|
715
|
+
"examples": {
|
|
716
|
+
"exampleResponse": {
|
|
717
|
+
"value": {
|
|
718
|
+
"name": "GeneralError",
|
|
719
|
+
"message": "errorMessage",
|
|
720
|
+
"properties": {
|
|
721
|
+
"foo": "bar"
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
}
|
|
239
725
|
}
|
|
240
|
-
}
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
},
|
|
729
|
+
"401": {
|
|
730
|
+
"description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
|
|
731
|
+
"content": {
|
|
732
|
+
"application/json": {
|
|
733
|
+
"schema": {
|
|
734
|
+
"$ref": "#/components/schemas/Error"
|
|
735
|
+
},
|
|
736
|
+
"examples": {
|
|
737
|
+
"exampleResponse": {
|
|
738
|
+
"value": {
|
|
739
|
+
"name": "UnauthorizedError",
|
|
740
|
+
"message": "errorMessage"
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
},
|
|
747
|
+
"404": {
|
|
748
|
+
"description": "The resource you tried to access does not exist, see the content for more details.",
|
|
749
|
+
"content": {
|
|
241
750
|
"application/json": {
|
|
242
751
|
"schema": {
|
|
243
752
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
753
|
+
},
|
|
754
|
+
"examples": {
|
|
755
|
+
"exampleResponse": {
|
|
756
|
+
"value": {
|
|
757
|
+
"name": "NotFoundError",
|
|
758
|
+
"message": "errorMessage",
|
|
759
|
+
"properties": {
|
|
760
|
+
"notFoundId": "1"
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
},
|
|
768
|
+
"500": {
|
|
769
|
+
"description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
|
|
770
|
+
"content": {
|
|
771
|
+
"application/json": {
|
|
772
|
+
"schema": {
|
|
773
|
+
"$ref": "#/components/schemas/Error"
|
|
774
|
+
},
|
|
775
|
+
"examples": {
|
|
776
|
+
"exampleResponse": {
|
|
777
|
+
"value": {
|
|
778
|
+
"name": "InternalServerError",
|
|
779
|
+
"message": "errorMessage"
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
}
|
|
786
|
+
}
|
|
787
|
+
}
|
|
788
|
+
},
|
|
789
|
+
"/entity-storage/count": {
|
|
790
|
+
"get": {
|
|
791
|
+
"operationId": "entityStorageCount",
|
|
792
|
+
"summary": "Count entries in entity storage.",
|
|
793
|
+
"tags": [
|
|
794
|
+
"EntityStorage"
|
|
795
|
+
],
|
|
796
|
+
"security": [
|
|
797
|
+
{
|
|
798
|
+
"jwtBearerAuthScheme": []
|
|
799
|
+
}
|
|
800
|
+
],
|
|
801
|
+
"requestBody": {
|
|
802
|
+
"description": "Count the entries in entity storage.",
|
|
803
|
+
"required": true,
|
|
804
|
+
"content": {
|
|
805
|
+
"text/plain": {
|
|
806
|
+
"schema": {
|
|
807
|
+
"$ref": "#/components/schemas/EntityStorageCountRequest"
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
},
|
|
812
|
+
"responses": {
|
|
813
|
+
"200": {
|
|
814
|
+
"description": "The response for counting entries in entity storage.",
|
|
815
|
+
"content": {
|
|
816
|
+
"application/json": {
|
|
817
|
+
"schema": {
|
|
818
|
+
"$ref": "#/components/schemas/EntityStorageCountResponse"
|
|
819
|
+
},
|
|
820
|
+
"examples": {
|
|
821
|
+
"entityStorageCountResponseExample": {
|
|
822
|
+
"value": {
|
|
823
|
+
"count": 1
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
},
|
|
830
|
+
"400": {
|
|
831
|
+
"description": "The server cannot process the request, see the content for more details.",
|
|
832
|
+
"content": {
|
|
833
|
+
"application/json": {
|
|
834
|
+
"schema": {
|
|
835
|
+
"$ref": "#/components/schemas/Error"
|
|
836
|
+
},
|
|
837
|
+
"examples": {
|
|
838
|
+
"exampleResponse": {
|
|
839
|
+
"value": {
|
|
840
|
+
"name": "GeneralError",
|
|
841
|
+
"message": "errorMessage",
|
|
842
|
+
"properties": {
|
|
843
|
+
"foo": "bar"
|
|
844
|
+
}
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
},
|
|
851
|
+
"401": {
|
|
852
|
+
"description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
|
|
853
|
+
"content": {
|
|
854
|
+
"application/json": {
|
|
855
|
+
"schema": {
|
|
856
|
+
"$ref": "#/components/schemas/Error"
|
|
857
|
+
},
|
|
858
|
+
"examples": {
|
|
859
|
+
"exampleResponse": {
|
|
860
|
+
"value": {
|
|
861
|
+
"name": "UnauthorizedError",
|
|
862
|
+
"message": "errorMessage"
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
}
|
|
868
|
+
},
|
|
869
|
+
"500": {
|
|
870
|
+
"description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
|
|
871
|
+
"content": {
|
|
872
|
+
"application/json": {
|
|
873
|
+
"schema": {
|
|
874
|
+
"$ref": "#/components/schemas/Error"
|
|
875
|
+
},
|
|
876
|
+
"examples": {
|
|
877
|
+
"exampleResponse": {
|
|
878
|
+
"value": {
|
|
879
|
+
"name": "InternalServerError",
|
|
880
|
+
"message": "errorMessage"
|
|
881
|
+
}
|
|
882
|
+
}
|
|
244
883
|
}
|
|
245
884
|
}
|
|
246
885
|
}
|
|
@@ -251,6 +890,27 @@
|
|
|
251
890
|
},
|
|
252
891
|
"components": {
|
|
253
892
|
"schemas": {
|
|
893
|
+
"EntityStorageCountRequest": {
|
|
894
|
+
"description": "Count the entries in entity storage.",
|
|
895
|
+
"type": "object"
|
|
896
|
+
},
|
|
897
|
+
"EntityStorageCountResponse": {
|
|
898
|
+
"type": "object",
|
|
899
|
+
"properties": {
|
|
900
|
+
"count": {
|
|
901
|
+
"type": "number",
|
|
902
|
+
"description": "The total count of entities."
|
|
903
|
+
}
|
|
904
|
+
},
|
|
905
|
+
"required": [
|
|
906
|
+
"count"
|
|
907
|
+
],
|
|
908
|
+
"description": "The body of the response."
|
|
909
|
+
},
|
|
910
|
+
"EntityStorageEmptyRequest": {
|
|
911
|
+
"description": "Remove all entries from entity storage.",
|
|
912
|
+
"type": "object"
|
|
913
|
+
},
|
|
254
914
|
"EntityStorageGetResponse": {
|
|
255
915
|
"description": "The data for the requested entity."
|
|
256
916
|
},
|
|
@@ -270,13 +930,25 @@
|
|
|
270
930
|
"required": [
|
|
271
931
|
"entities"
|
|
272
932
|
],
|
|
273
|
-
"additionalProperties": false,
|
|
274
933
|
"description": "The list of entries from the query."
|
|
275
934
|
},
|
|
935
|
+
"EntityStorageRemoveBatchRequest": {
|
|
936
|
+
"type": "array",
|
|
937
|
+
"items": {
|
|
938
|
+
"type": "string"
|
|
939
|
+
},
|
|
940
|
+
"description": "The ids of the entities to remove."
|
|
941
|
+
},
|
|
942
|
+
"EntityStorageSetBatchRequest": {
|
|
943
|
+
"type": "array",
|
|
944
|
+
"items": {},
|
|
945
|
+
"description": "The entities to set."
|
|
946
|
+
},
|
|
276
947
|
"EntityStorageSetRequest": {
|
|
277
948
|
"description": "The data to be used in the entity."
|
|
278
949
|
},
|
|
279
950
|
"Error": {
|
|
951
|
+
"description": "Model to describe serialized error.",
|
|
280
952
|
"type": "object",
|
|
281
953
|
"properties": {
|
|
282
954
|
"name": {
|
|
@@ -285,7 +957,7 @@
|
|
|
285
957
|
},
|
|
286
958
|
"message": {
|
|
287
959
|
"type": "string",
|
|
288
|
-
"description": "The message for the error."
|
|
960
|
+
"description": "The message for the error as an i18n key."
|
|
289
961
|
},
|
|
290
962
|
"source": {
|
|
291
963
|
"type": "string",
|
|
@@ -307,63 +979,35 @@
|
|
|
307
979
|
"required": [
|
|
308
980
|
"name",
|
|
309
981
|
"message"
|
|
310
|
-
]
|
|
311
|
-
"additionalProperties": false,
|
|
312
|
-
"description": "Model to describe serialized error."
|
|
982
|
+
]
|
|
313
983
|
},
|
|
314
984
|
"NotFoundResponse": {
|
|
315
985
|
"type": "object",
|
|
316
|
-
"additionalProperties": false,
|
|
317
986
|
"properties": {
|
|
318
987
|
"notFoundId": {
|
|
319
988
|
"type": "string",
|
|
320
989
|
"description": "The id if the item that was not found."
|
|
321
|
-
},
|
|
322
|
-
"name": {
|
|
323
|
-
"type": "string",
|
|
324
|
-
"description": "The name for the error."
|
|
325
|
-
},
|
|
326
|
-
"message": {
|
|
327
|
-
"type": "string",
|
|
328
|
-
"description": "The message for the error."
|
|
329
|
-
},
|
|
330
|
-
"source": {
|
|
331
|
-
"type": "string",
|
|
332
|
-
"description": "The source of the error."
|
|
333
|
-
},
|
|
334
|
-
"properties": {
|
|
335
|
-
"type": "object",
|
|
336
|
-
"additionalProperties": {},
|
|
337
|
-
"description": "Any additional information for the error."
|
|
338
|
-
},
|
|
339
|
-
"stack": {
|
|
340
|
-
"type": "string",
|
|
341
|
-
"description": "The stack trace for the error."
|
|
342
|
-
},
|
|
343
|
-
"cause": {
|
|
344
|
-
"$ref": "#/components/schemas/Error"
|
|
345
990
|
}
|
|
346
991
|
},
|
|
347
|
-
"
|
|
348
|
-
|
|
349
|
-
|
|
992
|
+
"allOf": [
|
|
993
|
+
{
|
|
994
|
+
"$ref": "#/components/schemas/Error"
|
|
995
|
+
}
|
|
350
996
|
],
|
|
351
997
|
"description": "The body which contains the error."
|
|
352
998
|
},
|
|
353
999
|
"SortDirection": {
|
|
1000
|
+
"description": "The sort directions.",
|
|
354
1001
|
"anyOf": [
|
|
355
1002
|
{
|
|
356
|
-
"type": "string",
|
|
357
1003
|
"const": "asc",
|
|
358
1004
|
"description": "Ascending."
|
|
359
1005
|
},
|
|
360
1006
|
{
|
|
361
|
-
"type": "string",
|
|
362
1007
|
"const": "desc",
|
|
363
1008
|
"description": "Descending."
|
|
364
1009
|
}
|
|
365
|
-
]
|
|
366
|
-
"description": "The sort directions."
|
|
1010
|
+
]
|
|
367
1011
|
}
|
|
368
1012
|
},
|
|
369
1013
|
"securitySchemes": {
|