@twin.org/api-service 0.9.1-next.1 → 0.9.1-next.3

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/docs/changelog.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.9.1-next.3](https://github.com/iotaledger/twin-api/compare/api-service-v0.9.1-next.2...api-service-v0.9.1-next.3) (2026-06-29)
4
+
5
+
6
+ ### Features
7
+
8
+ * enhanced rest handling ([#208](https://github.com/iotaledger/twin-api/issues/208)) ([99d5f3f](https://github.com/iotaledger/twin-api/commit/99d5f3f96d262e57828d98d3f3b1e3da8a863378))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * The following workspace dependencies were updated
14
+ * dependencies
15
+ * @twin.org/api-models bumped from 0.9.1-next.2 to 0.9.1-next.3
16
+
17
+ ## [0.9.1-next.2](https://github.com/iotaledger/twin-api/compare/api-service-v0.9.1-next.1...api-service-v0.9.1-next.2) (2026-06-26)
18
+
19
+
20
+ ### Miscellaneous Chores
21
+
22
+ * **api-service:** Synchronize repo versions
23
+
24
+
25
+ ### Dependencies
26
+
27
+ * The following workspace dependencies were updated
28
+ * dependencies
29
+ * @twin.org/api-models bumped from 0.9.1-next.1 to 0.9.1-next.2
30
+
3
31
  ## [0.9.1-next.1](https://github.com/iotaledger/twin-api/compare/api-service-v0.9.1-next.0...api-service-v0.9.1-next.1) (2026-06-26)
4
32
 
5
33
 
@@ -0,0 +1,687 @@
1
+ {
2
+ "openapi": "3.1.1",
3
+ "info": {
4
+ "title": "TWIN - Test Endpoints",
5
+ "description": "REST API for TWIN - Test Endpoints.",
6
+ "version": "1.0.0",
7
+ "license": {
8
+ "name": "Apache 2.0 License",
9
+ "url": "https://opensource.org/licenses/Apache-2.0"
10
+ }
11
+ },
12
+ "servers": [
13
+ {
14
+ "url": "https://localhost"
15
+ }
16
+ ],
17
+ "tags": [
18
+ {
19
+ "name": "Info",
20
+ "description": "Information endpoints for the REST server."
21
+ },
22
+ {
23
+ "name": "Health",
24
+ "description": "Health endpoints for the REST server."
25
+ }
26
+ ],
27
+ "paths": {
28
+ "/": {
29
+ "get": {
30
+ "operationId": "serverHealth",
31
+ "summary": "Get the health for the server",
32
+ "tags": [
33
+ "Health"
34
+ ],
35
+ "security": [
36
+ {
37
+ "jwtBearerAuthScheme": []
38
+ }
39
+ ],
40
+ "responses": {
41
+ "200": {
42
+ "description": "The health of the server.",
43
+ "content": {
44
+ "application/json": {
45
+ "schema": {
46
+ "$ref": "#/components/schemas/ServerHealthResponse"
47
+ },
48
+ "examples": {
49
+ "healthResponseOK": {
50
+ "summary": "The response for the health request.",
51
+ "value": {
52
+ "status": "ok",
53
+ "components": [
54
+ {
55
+ "source": "Database",
56
+ "status": "ok"
57
+ },
58
+ {
59
+ "source": "Storage",
60
+ "status": "ok"
61
+ }
62
+ ]
63
+ }
64
+ },
65
+ "healthResponseWarning": {
66
+ "summary": "The response for the health request with warnings.",
67
+ "value": {
68
+ "status": "warning",
69
+ "components": [
70
+ {
71
+ "source": "Database",
72
+ "status": "warning",
73
+ "description": "slowRunning"
74
+ },
75
+ {
76
+ "source": "Storage",
77
+ "status": "ok"
78
+ }
79
+ ]
80
+ }
81
+ },
82
+ "healthResponseError": {
83
+ "summary": "The response for the health request with errors.",
84
+ "value": {
85
+ "status": "error",
86
+ "components": [
87
+ {
88
+ "source": "Database",
89
+ "status": "ok"
90
+ },
91
+ {
92
+ "source": "Storage",
93
+ "status": "error",
94
+ "description": "storageFull"
95
+ }
96
+ ]
97
+ }
98
+ }
99
+ }
100
+ }
101
+ }
102
+ },
103
+ "400": {
104
+ "description": "The server cannot process the request, see the content for more details.",
105
+ "content": {
106
+ "application/json": {
107
+ "schema": {
108
+ "$ref": "#/components/schemas/Error"
109
+ },
110
+ "examples": {
111
+ "exampleResponse": {
112
+ "value": {
113
+ "name": "GeneralError",
114
+ "message": "errorMessage",
115
+ "properties": {
116
+ "foo": "bar"
117
+ }
118
+ }
119
+ }
120
+ }
121
+ }
122
+ }
123
+ },
124
+ "401": {
125
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
126
+ "content": {
127
+ "application/json": {
128
+ "schema": {
129
+ "$ref": "#/components/schemas/Error"
130
+ },
131
+ "examples": {
132
+ "exampleResponse": {
133
+ "value": {
134
+ "name": "UnauthorizedError",
135
+ "message": "errorMessage"
136
+ }
137
+ }
138
+ }
139
+ }
140
+ }
141
+ },
142
+ "500": {
143
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
144
+ "content": {
145
+ "application/json": {
146
+ "schema": {
147
+ "$ref": "#/components/schemas/Error"
148
+ },
149
+ "examples": {
150
+ "exampleResponse": {
151
+ "value": {
152
+ "name": "InternalServerError",
153
+ "message": "errorMessage"
154
+ }
155
+ }
156
+ }
157
+ }
158
+ }
159
+ }
160
+ }
161
+ }
162
+ },
163
+ "/favicon.ico": {
164
+ "get": {
165
+ "operationId": "serverFavIcon",
166
+ "summary": "Get the favicon for the server",
167
+ "tags": [
168
+ "Info"
169
+ ],
170
+ "responses": {
171
+ "200": {
172
+ "description": "The favicon for the server.",
173
+ "content": {
174
+ "image/x-icon": {
175
+ "schema": {
176
+ "$ref": "#/components/schemas/ServerFavIconResponse"
177
+ }
178
+ }
179
+ }
180
+ },
181
+ "400": {
182
+ "description": "The server cannot process the request, see the content for more details.",
183
+ "content": {
184
+ "application/json": {
185
+ "schema": {
186
+ "$ref": "#/components/schemas/Error"
187
+ },
188
+ "examples": {
189
+ "exampleResponse": {
190
+ "value": {
191
+ "name": "GeneralError",
192
+ "message": "errorMessage",
193
+ "properties": {
194
+ "foo": "bar"
195
+ }
196
+ }
197
+ }
198
+ }
199
+ }
200
+ }
201
+ },
202
+ "500": {
203
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
204
+ "content": {
205
+ "application/json": {
206
+ "schema": {
207
+ "$ref": "#/components/schemas/Error"
208
+ },
209
+ "examples": {
210
+ "exampleResponse": {
211
+ "value": {
212
+ "name": "InternalServerError",
213
+ "message": "errorMessage"
214
+ }
215
+ }
216
+ }
217
+ }
218
+ }
219
+ }
220
+ }
221
+ }
222
+ },
223
+ "/info": {
224
+ "get": {
225
+ "operationId": "serverInformation",
226
+ "summary": "Get the information for the server",
227
+ "tags": [
228
+ "Info"
229
+ ],
230
+ "responses": {
231
+ "200": {
232
+ "description": "The information about the server.",
233
+ "content": {
234
+ "application/json": {
235
+ "schema": {
236
+ "$ref": "#/components/schemas/ServerInfo"
237
+ },
238
+ "examples": {
239
+ "informationResponse": {
240
+ "summary": "The response for the information request.",
241
+ "value": {
242
+ "name": "API Server",
243
+ "version": "1.0.0"
244
+ }
245
+ }
246
+ }
247
+ }
248
+ }
249
+ },
250
+ "400": {
251
+ "description": "The server cannot process the request, see the content for more details.",
252
+ "content": {
253
+ "application/json": {
254
+ "schema": {
255
+ "$ref": "#/components/schemas/Error"
256
+ },
257
+ "examples": {
258
+ "exampleResponse": {
259
+ "value": {
260
+ "name": "GeneralError",
261
+ "message": "errorMessage",
262
+ "properties": {
263
+ "foo": "bar"
264
+ }
265
+ }
266
+ }
267
+ }
268
+ }
269
+ }
270
+ },
271
+ "500": {
272
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
273
+ "content": {
274
+ "application/json": {
275
+ "schema": {
276
+ "$ref": "#/components/schemas/Error"
277
+ },
278
+ "examples": {
279
+ "exampleResponse": {
280
+ "value": {
281
+ "name": "InternalServerError",
282
+ "message": "errorMessage"
283
+ }
284
+ }
285
+ }
286
+ }
287
+ }
288
+ }
289
+ }
290
+ }
291
+ },
292
+ "/livez": {
293
+ "get": {
294
+ "operationId": "serverLivez",
295
+ "summary": "Get the livez status for the server",
296
+ "tags": [
297
+ "Info"
298
+ ],
299
+ "responses": {
300
+ "200": {
301
+ "description": "The livez of the server.",
302
+ "content": {
303
+ "text/plain": {
304
+ "schema": {
305
+ "$ref": "#/components/schemas/ServerLivezResponse"
306
+ },
307
+ "examples": {
308
+ "livezResponseOK": {
309
+ "summary": "The response for the liveness request.",
310
+ "value": "alive"
311
+ },
312
+ "livezResponseFailure": {
313
+ "summary": "The response for the liveness request with errors.",
314
+ "value": "dead"
315
+ }
316
+ }
317
+ }
318
+ },
319
+ "headers": {
320
+ "content-type": {
321
+ "schema": {
322
+ "type": "string"
323
+ },
324
+ "description": "e.g. text/plain"
325
+ }
326
+ }
327
+ },
328
+ "400": {
329
+ "description": "The server cannot process the request, see the content for more details.",
330
+ "content": {
331
+ "application/json": {
332
+ "schema": {
333
+ "$ref": "#/components/schemas/Error"
334
+ },
335
+ "examples": {
336
+ "exampleResponse": {
337
+ "value": {
338
+ "name": "GeneralError",
339
+ "message": "errorMessage",
340
+ "properties": {
341
+ "foo": "bar"
342
+ }
343
+ }
344
+ }
345
+ }
346
+ }
347
+ }
348
+ },
349
+ "500": {
350
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
351
+ "content": {
352
+ "application/json": {
353
+ "schema": {
354
+ "$ref": "#/components/schemas/Error"
355
+ },
356
+ "examples": {
357
+ "exampleResponse": {
358
+ "value": {
359
+ "name": "InternalServerError",
360
+ "message": "errorMessage"
361
+ }
362
+ }
363
+ }
364
+ }
365
+ }
366
+ }
367
+ }
368
+ }
369
+ },
370
+ "/readyz": {
371
+ "get": {
372
+ "operationId": "serverReadyz",
373
+ "summary": "Get the readyz status for the server",
374
+ "tags": [
375
+ "Info"
376
+ ],
377
+ "responses": {
378
+ "200": {
379
+ "description": "The readyz of the server.",
380
+ "content": {
381
+ "text/plain": {
382
+ "schema": {
383
+ "$ref": "#/components/schemas/ServerReadyzResponse"
384
+ },
385
+ "examples": {
386
+ "readyzResponseOK": {
387
+ "summary": "The response for the readiness request.",
388
+ "value": "ready"
389
+ },
390
+ "readyzResponseFailure": {
391
+ "summary": "The response for the readiness request with errors.",
392
+ "value": "not ready"
393
+ }
394
+ }
395
+ }
396
+ },
397
+ "headers": {
398
+ "content-type": {
399
+ "schema": {
400
+ "type": "string"
401
+ },
402
+ "description": "e.g. text/plain"
403
+ }
404
+ }
405
+ },
406
+ "400": {
407
+ "description": "The server cannot process the request, see the content for more details.",
408
+ "content": {
409
+ "application/json": {
410
+ "schema": {
411
+ "$ref": "#/components/schemas/Error"
412
+ },
413
+ "examples": {
414
+ "exampleResponse": {
415
+ "value": {
416
+ "name": "GeneralError",
417
+ "message": "errorMessage",
418
+ "properties": {
419
+ "foo": "bar"
420
+ }
421
+ }
422
+ }
423
+ }
424
+ }
425
+ }
426
+ },
427
+ "500": {
428
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
429
+ "content": {
430
+ "application/json": {
431
+ "schema": {
432
+ "$ref": "#/components/schemas/Error"
433
+ },
434
+ "examples": {
435
+ "exampleResponse": {
436
+ "value": {
437
+ "name": "InternalServerError",
438
+ "message": "errorMessage"
439
+ }
440
+ }
441
+ }
442
+ }
443
+ }
444
+ }
445
+ }
446
+ }
447
+ },
448
+ "/spec": {
449
+ "get": {
450
+ "operationId": "serverSpec",
451
+ "summary": "Get the OpenAPI specification for the endpoints",
452
+ "tags": [
453
+ "Info"
454
+ ],
455
+ "responses": {
456
+ "200": {
457
+ "description": "The OpenAPI spec for the endpoints.",
458
+ "content": {
459
+ "application/json": {
460
+ "schema": {
461
+ "$ref": "#/components/schemas/ServerSpecResponse"
462
+ },
463
+ "examples": {
464
+ "specResponse": {
465
+ "summary": "The response for the spec request.",
466
+ "value": {
467
+ "openapi": "3.1.0",
468
+ "info": {},
469
+ "paths": {}
470
+ }
471
+ }
472
+ }
473
+ }
474
+ }
475
+ },
476
+ "400": {
477
+ "description": "The server cannot process the request, see the content for more details.",
478
+ "content": {
479
+ "application/json": {
480
+ "schema": {
481
+ "$ref": "#/components/schemas/Error"
482
+ },
483
+ "examples": {
484
+ "exampleResponse": {
485
+ "value": {
486
+ "name": "GeneralError",
487
+ "message": "errorMessage",
488
+ "properties": {
489
+ "foo": "bar"
490
+ }
491
+ }
492
+ }
493
+ }
494
+ }
495
+ }
496
+ },
497
+ "500": {
498
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
499
+ "content": {
500
+ "application/json": {
501
+ "schema": {
502
+ "$ref": "#/components/schemas/Error"
503
+ },
504
+ "examples": {
505
+ "exampleResponse": {
506
+ "value": {
507
+ "name": "InternalServerError",
508
+ "message": "errorMessage"
509
+ }
510
+ }
511
+ }
512
+ }
513
+ }
514
+ }
515
+ }
516
+ }
517
+ }
518
+ },
519
+ "components": {
520
+ "schemas": {
521
+ "Error": {
522
+ "description": "Model to describe serialized error.",
523
+ "type": "object",
524
+ "properties": {
525
+ "name": {
526
+ "type": "string",
527
+ "description": "The name for the error."
528
+ },
529
+ "message": {
530
+ "type": "string",
531
+ "description": "The message for the error as an i18n key."
532
+ },
533
+ "source": {
534
+ "type": "string",
535
+ "description": "The source of the error."
536
+ },
537
+ "properties": {
538
+ "type": "object",
539
+ "additionalProperties": {},
540
+ "description": "Any additional information for the error."
541
+ },
542
+ "stack": {
543
+ "type": "string",
544
+ "description": "The stack trace for the error."
545
+ },
546
+ "cause": {
547
+ "$ref": "#/components/schemas/Error"
548
+ }
549
+ },
550
+ "required": [
551
+ "name",
552
+ "message"
553
+ ]
554
+ },
555
+ "Health": {
556
+ "description": "Provides health information for a component.",
557
+ "type": "object",
558
+ "properties": {
559
+ "source": {
560
+ "type": "string",
561
+ "description": "The source of the health information."
562
+ },
563
+ "description": {
564
+ "type": "string",
565
+ "description": "The description of the component as an i18n key."
566
+ },
567
+ "status": {
568
+ "$ref": "#/components/schemas/HealthStatus"
569
+ },
570
+ "message": {
571
+ "type": "string",
572
+ "description": "The message for the status if there are further details to provide as an i18n key."
573
+ },
574
+ "data": {
575
+ "type": "object",
576
+ "additionalProperties": {},
577
+ "description": "Data to substitute in the i18n key for the message."
578
+ },
579
+ "grouped": {
580
+ "type": "array",
581
+ "items": {
582
+ "$ref": "#/components/schemas/Health"
583
+ },
584
+ "description": "The grouped child components, if any."
585
+ }
586
+ },
587
+ "required": [
588
+ "source",
589
+ "status"
590
+ ]
591
+ },
592
+ "HealthStatus": {
593
+ "description": "The health status of the component.",
594
+ "anyOf": [
595
+ {
596
+ "const": "ok",
597
+ "description": "OK."
598
+ },
599
+ {
600
+ "const": "warning",
601
+ "description": "Warning."
602
+ },
603
+ {
604
+ "const": "error",
605
+ "description": "Error."
606
+ }
607
+ ]
608
+ },
609
+ "ServerFavIconResponse": {
610
+ "type": "array",
611
+ "items": {
612
+ "type": "number"
613
+ },
614
+ "description": "The favicon for the server."
615
+ },
616
+ "ServerHealthResponse": {
617
+ "type": "object",
618
+ "properties": {
619
+ "status": {
620
+ "$ref": "#/components/schemas/HealthStatus"
621
+ },
622
+ "components": {
623
+ "type": "array",
624
+ "items": {
625
+ "$ref": "#/components/schemas/Health"
626
+ }
627
+ }
628
+ },
629
+ "required": [
630
+ "status",
631
+ "components"
632
+ ],
633
+ "description": "The health for the server."
634
+ },
635
+ "ServerInfo": {
636
+ "description": "The information about the server.",
637
+ "type": "object",
638
+ "properties": {
639
+ "name": {
640
+ "type": "string",
641
+ "description": "The application name."
642
+ },
643
+ "version": {
644
+ "type": "string",
645
+ "description": "The version of the server."
646
+ }
647
+ },
648
+ "required": [
649
+ "name",
650
+ "version"
651
+ ]
652
+ },
653
+ "ServerLivezResponse": {
654
+ "anyOf": [
655
+ {
656
+ "const": "alive"
657
+ },
658
+ {
659
+ "const": "dead"
660
+ }
661
+ ],
662
+ "description": "The livez information for the server."
663
+ },
664
+ "ServerReadyzResponse": {
665
+ "anyOf": [
666
+ {
667
+ "const": "ready"
668
+ },
669
+ {
670
+ "const": "not ready"
671
+ }
672
+ ],
673
+ "description": "The readyz information for the server."
674
+ },
675
+ "ServerSpecResponse": {
676
+ "description": "The spec for the server."
677
+ }
678
+ },
679
+ "securitySchemes": {
680
+ "jwtBearerAuthScheme": {
681
+ "type": "http",
682
+ "scheme": "bearer",
683
+ "bearerFormat": "JWT"
684
+ }
685
+ }
686
+ }
687
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/api-service",
3
- "version": "0.9.1-next.1",
3
+ "version": "0.9.1-next.3",
4
4
  "description": "Information and hosting service implementations with generated REST route handlers.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -14,7 +14,7 @@
14
14
  "node": ">=20.0.0"
15
15
  },
16
16
  "dependencies": {
17
- "@twin.org/api-models": "0.9.1-next.1",
17
+ "@twin.org/api-models": "0.9.1-next.3",
18
18
  "@twin.org/context": "next",
19
19
  "@twin.org/core": "next",
20
20
  "@twin.org/engine-models": "next",