@twin.org/api-models 0.0.3-next.29 → 0.0.3-next.30

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.
Files changed (46) hide show
  1. package/dist/es/index.js +3 -3
  2. package/dist/es/index.js.map +1 -1
  3. package/dist/es/models/api/IServerHealthResponse.js.map +1 -1
  4. package/dist/es/models/api/IServerLivezResponse.js.map +1 -1
  5. package/dist/es/models/api/IServerReadyzResponse.js +2 -0
  6. package/dist/es/models/api/IServerReadyzResponse.js.map +1 -0
  7. package/dist/es/models/server/IWebServer.js.map +1 -1
  8. package/dist/es/models/services/IHealthComponent.js +2 -0
  9. package/dist/es/models/services/IHealthComponent.js.map +1 -0
  10. package/dist/es/models/services/IHostingComponent.js.map +1 -1
  11. package/dist/es/models/services/IInformationComponent.js.map +1 -1
  12. package/dist/es/models/services/IUrlTransformerComponent.js +2 -0
  13. package/dist/es/models/services/IUrlTransformerComponent.js.map +1 -0
  14. package/dist/types/index.d.ts +3 -3
  15. package/dist/types/models/api/IServerHealthResponse.d.ts +6 -3
  16. package/dist/types/models/api/IServerLivezResponse.d.ts +1 -1
  17. package/dist/types/models/api/IServerReadyzResponse.d.ts +16 -0
  18. package/dist/types/models/server/IWebServer.d.ts +7 -1
  19. package/dist/types/models/services/IHealthComponent.d.ts +14 -0
  20. package/dist/types/models/services/IHostingComponent.d.ts +0 -56
  21. package/dist/types/models/services/IInformationComponent.d.ts +9 -23
  22. package/dist/types/models/services/IUrlTransformerComponent.d.ts +66 -0
  23. package/docs/changelog.md +7 -0
  24. package/docs/reference/index.md +3 -4
  25. package/docs/reference/interfaces/IHealthComponent.md +21 -0
  26. package/docs/reference/interfaces/IHostingComponent.md +0 -208
  27. package/docs/reference/interfaces/IInformationComponent.md +8 -76
  28. package/docs/reference/interfaces/IServerHealthResponse.md +10 -2
  29. package/docs/reference/interfaces/IServerLivezResponse.md +1 -1
  30. package/docs/reference/interfaces/IServerReadyzResponse.md +23 -0
  31. package/docs/reference/interfaces/IUrlTransformerComponent.md +229 -0
  32. package/docs/reference/interfaces/IWebServer.md +30 -0
  33. package/package.json +1 -1
  34. package/dist/es/models/services/IHealthComponentInfo.js +0 -2
  35. package/dist/es/models/services/IHealthComponentInfo.js.map +0 -1
  36. package/dist/es/models/services/IHealthInfo.js +0 -2
  37. package/dist/es/models/services/IHealthInfo.js.map +0 -1
  38. package/dist/es/models/services/healthStatus.js +0 -21
  39. package/dist/es/models/services/healthStatus.js.map +0 -1
  40. package/dist/types/models/services/IHealthComponentInfo.d.ts +0 -18
  41. package/dist/types/models/services/IHealthInfo.d.ts +0 -15
  42. package/dist/types/models/services/healthStatus.d.ts +0 -21
  43. package/docs/reference/interfaces/IHealthComponentInfo.md +0 -27
  44. package/docs/reference/interfaces/IHealthInfo.md +0 -19
  45. package/docs/reference/type-aliases/HealthStatus.md +0 -5
  46. package/docs/reference/variables/HealthStatus.md +0 -25
package/dist/es/index.js CHANGED
@@ -12,6 +12,7 @@ export * from "./models/api/IServerFavIconResponse.js";
12
12
  export * from "./models/api/IServerHealthResponse.js";
13
13
  export * from "./models/api/IServerInfoResponse.js";
14
14
  export * from "./models/api/IServerLivezResponse.js";
15
+ export * from "./models/api/IServerReadyzResponse.js";
15
16
  export * from "./models/api/IServerRootResponse.js";
16
17
  export * from "./models/api/IServerSpecResponse.js";
17
18
  export * from "./models/config/IBaseRestClientConfig.js";
@@ -57,11 +58,10 @@ export * from "./models/server/IRestRouteProcessor.js";
57
58
  export * from "./models/server/ISocketRouteProcessor.js";
58
59
  export * from "./models/server/IWebServer.js";
59
60
  export * from "./models/server/IWebServerOptions.js";
60
- export * from "./models/services/healthStatus.js";
61
- export * from "./models/services/IHealthComponentInfo.js";
62
- export * from "./models/services/IHealthInfo.js";
61
+ export * from "./models/services/IHealthComponent.js";
63
62
  export * from "./models/services/IHostingComponent.js";
64
63
  export * from "./models/services/IInformationComponent.js";
64
+ export * from "./models/services/IUrlTransformerComponent.js";
65
65
  export * from "./models/services/IServerInfo.js";
66
66
  export * from "./models/services/ITenant.js";
67
67
  export * from "./models/services/ITenantAdminComponent.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kCAAkC,CAAC;AACjD,cAAc,yCAAyC,CAAC;AACxD,cAAc,0CAA0C,CAAC;AACzD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC;AACjD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wCAAwC,CAAC;AACvD,cAAc,uCAAuC,CAAC;AACtD,cAAc,qCAAqC,CAAC;AACpD,cAAc,sCAAsC,CAAC;AACrD,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,0CAA0C,CAAC;AACzD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,0CAA0C,CAAC;AACzD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,wCAAwC,CAAC;AACvD,cAAc,oCAAoC,CAAC;AACnD,cAAc,yCAAyC,CAAC;AACxD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,wCAAwC,CAAC;AACvD,cAAc,kDAAkD,CAAC;AACjE,cAAc,gDAAgD,CAAC;AAC/D,cAAc,iDAAiD,CAAC;AAChE,cAAc,2DAA2D,CAAC;AAC1E,cAAc,gDAAgD,CAAC;AAC/D,cAAc,sDAAsD,CAAC;AACrE,cAAc,uDAAuD,CAAC;AACtE,cAAc,oDAAoD,CAAC;AACnE,cAAc,2DAA2D,CAAC;AAC1E,cAAc,iDAAiD,CAAC;AAChE,cAAc,gDAAgD,CAAC;AAC/D,cAAc,kDAAkD,CAAC;AACjE,cAAc,2CAA2C,CAAC;AAC1D,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yCAAyC,CAAC;AACxD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yCAAyC,CAAC;AACxD,cAAc,sCAAsC,CAAC;AACrD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,wDAAwD,CAAC;AACvE,cAAc,8CAA8C,CAAC;AAC7D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,iCAAiC,CAAC;AAChD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,yBAAyB,CAAC;AACxC,cAAc,wCAAwC,CAAC;AACvD,cAAc,uCAAuC,CAAC;AACtD,cAAc,wCAAwC,CAAC;AACvD,cAAc,0CAA0C,CAAC;AACzD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sCAAsC,CAAC;AACrD,cAAc,mCAAmC,CAAC;AAClD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,kCAAkC,CAAC;AACjD,cAAc,wCAAwC,CAAC;AACvD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,kCAAkC,CAAC;AACjD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4CAA4C,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nexport * from \"./errors/forbiddenError.js\";\nexport * from \"./errors/tooManyRequestsError.js\";\nexport * from \"./factories/mimeTypeProcessorFactory.js\";\nexport * from \"./factories/restRouteProcessorFactory.js\";\nexport * from \"./factories/socketRouteProcessorFactory.js\";\nexport * from \"./helpers/httpErrorHelper.js\";\nexport * from \"./helpers/httpParameterHelper.js\";\nexport * from \"./helpers/httpUrlHelper.js\";\nexport * from \"./models/api/IServerFavIconResponse.js\";\nexport * from \"./models/api/IServerHealthResponse.js\";\nexport * from \"./models/api/IServerInfoResponse.js\";\nexport * from \"./models/api/IServerLivezResponse.js\";\nexport * from \"./models/api/IServerRootResponse.js\";\nexport * from \"./models/api/IServerSpecResponse.js\";\nexport * from \"./models/config/IBaseRestClientConfig.js\";\nexport * from \"./models/config/IBaseSocketClientConfig.js\";\nexport * from \"./models/httpContextIdKeys.js\";\nexport * from \"./models/protocol/IHttpRequest.js\";\nexport * from \"./models/protocol/IHttpRequestContext.js\";\nexport * from \"./models/protocol/IHttpRequestPathParams.js\";\nexport * from \"./models/protocol/IHttpRequestQuery.js\";\nexport * from \"./models/protocol/IHttpResponse.js\";\nexport * from \"./models/protocol/IHttpServerRequest.js\";\nexport * from \"./models/protocol/ISocketRequestContext.js\";\nexport * from \"./models/protocol/ISocketServerRequest.js\";\nexport * from \"./models/requests/INoContentRequest.js\";\nexport * from \"./models/responses/errors/IBadRequestResponse.js\";\nexport * from \"./models/responses/errors/IConflictResponse.js\";\nexport * from \"./models/responses/errors/IForbiddenResponse.js\";\nexport * from \"./models/responses/errors/IInternalServerErrorResponse.js\";\nexport * from \"./models/responses/errors/INotFoundResponse.js\";\nexport * from \"./models/responses/errors/INotImplementedResponse.js\";\nexport * from \"./models/responses/errors/ITooManyRequestsResponse.js\";\nexport * from \"./models/responses/errors/IUnauthorizedResponse.js\";\nexport * from \"./models/responses/errors/IUnprocessableEntityResponse.js\";\nexport * from \"./models/responses/success/IAcceptedResponse.js\";\nexport * from \"./models/responses/success/ICreatedResponse.js\";\nexport * from \"./models/responses/success/INoContentResponse.js\";\nexport * from \"./models/responses/success/IOkResponse.js\";\nexport * from \"./models/routes/IBaseRoute.js\";\nexport * from \"./models/routes/IBaseRouteEntryPoint.js\";\nexport * from \"./models/routes/IRestRoute.js\";\nexport * from \"./models/routes/IRestRouteEntryPoint.js\";\nexport * from \"./models/routes/IRestRouteExample.js\";\nexport * from \"./models/routes/IRestRouteRequestExample.js\";\nexport * from \"./models/routes/IRestRouteResponseAttachmentOptions.js\";\nexport * from \"./models/routes/IRestRouteResponseExample.js\";\nexport * from \"./models/routes/IRestRouteResponseOptions.js\";\nexport * from \"./models/routes/ISocketRoute.js\";\nexport * from \"./models/routes/ISocketRouteEntryPoint.js\";\nexport * from \"./models/routes/ITag.js\";\nexport * from \"./models/server/IBaseRouteProcessor.js\";\nexport * from \"./models/server/IMimeTypeProcessor.js\";\nexport * from \"./models/server/IRestRouteProcessor.js\";\nexport * from \"./models/server/ISocketRouteProcessor.js\";\nexport * from \"./models/server/IWebServer.js\";\nexport * from \"./models/server/IWebServerOptions.js\";\nexport * from \"./models/services/healthStatus.js\";\nexport * from \"./models/services/IHealthComponentInfo.js\";\nexport * from \"./models/services/IHealthInfo.js\";\nexport * from \"./models/services/IHostingComponent.js\";\nexport * from \"./models/services/IInformationComponent.js\";\nexport * from \"./models/services/IServerInfo.js\";\nexport * from \"./models/services/ITenant.js\";\nexport * from \"./models/services/ITenantAdminComponent.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kCAAkC,CAAC;AACjD,cAAc,yCAAyC,CAAC;AACxD,cAAc,0CAA0C,CAAC;AACzD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC;AACjD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wCAAwC,CAAC;AACvD,cAAc,uCAAuC,CAAC;AACtD,cAAc,qCAAqC,CAAC;AACpD,cAAc,sCAAsC,CAAC;AACrD,cAAc,uCAAuC,CAAC;AACtD,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,0CAA0C,CAAC;AACzD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,0CAA0C,CAAC;AACzD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,wCAAwC,CAAC;AACvD,cAAc,oCAAoC,CAAC;AACnD,cAAc,yCAAyC,CAAC;AACxD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,wCAAwC,CAAC;AACvD,cAAc,kDAAkD,CAAC;AACjE,cAAc,gDAAgD,CAAC;AAC/D,cAAc,iDAAiD,CAAC;AAChE,cAAc,2DAA2D,CAAC;AAC1E,cAAc,gDAAgD,CAAC;AAC/D,cAAc,sDAAsD,CAAC;AACrE,cAAc,uDAAuD,CAAC;AACtE,cAAc,oDAAoD,CAAC;AACnE,cAAc,2DAA2D,CAAC;AAC1E,cAAc,iDAAiD,CAAC;AAChE,cAAc,gDAAgD,CAAC;AAC/D,cAAc,kDAAkD,CAAC;AACjE,cAAc,2CAA2C,CAAC;AAC1D,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yCAAyC,CAAC;AACxD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yCAAyC,CAAC;AACxD,cAAc,sCAAsC,CAAC;AACrD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,wDAAwD,CAAC;AACvE,cAAc,8CAA8C,CAAC;AAC7D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,iCAAiC,CAAC;AAChD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,yBAAyB,CAAC;AACxC,cAAc,wCAAwC,CAAC;AACvD,cAAc,uCAAuC,CAAC;AACtD,cAAc,wCAAwC,CAAC;AACvD,cAAc,0CAA0C,CAAC;AACzD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sCAAsC,CAAC;AACrD,cAAc,uCAAuC,CAAC;AACtD,cAAc,wCAAwC,CAAC;AACvD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,kCAAkC,CAAC;AACjD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4CAA4C,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nexport * from \"./errors/forbiddenError.js\";\nexport * from \"./errors/tooManyRequestsError.js\";\nexport * from \"./factories/mimeTypeProcessorFactory.js\";\nexport * from \"./factories/restRouteProcessorFactory.js\";\nexport * from \"./factories/socketRouteProcessorFactory.js\";\nexport * from \"./helpers/httpErrorHelper.js\";\nexport * from \"./helpers/httpParameterHelper.js\";\nexport * from \"./helpers/httpUrlHelper.js\";\nexport * from \"./models/api/IServerFavIconResponse.js\";\nexport * from \"./models/api/IServerHealthResponse.js\";\nexport * from \"./models/api/IServerInfoResponse.js\";\nexport * from \"./models/api/IServerLivezResponse.js\";\nexport * from \"./models/api/IServerReadyzResponse.js\";\nexport * from \"./models/api/IServerRootResponse.js\";\nexport * from \"./models/api/IServerSpecResponse.js\";\nexport * from \"./models/config/IBaseRestClientConfig.js\";\nexport * from \"./models/config/IBaseSocketClientConfig.js\";\nexport * from \"./models/httpContextIdKeys.js\";\nexport * from \"./models/protocol/IHttpRequest.js\";\nexport * from \"./models/protocol/IHttpRequestContext.js\";\nexport * from \"./models/protocol/IHttpRequestPathParams.js\";\nexport * from \"./models/protocol/IHttpRequestQuery.js\";\nexport * from \"./models/protocol/IHttpResponse.js\";\nexport * from \"./models/protocol/IHttpServerRequest.js\";\nexport * from \"./models/protocol/ISocketRequestContext.js\";\nexport * from \"./models/protocol/ISocketServerRequest.js\";\nexport * from \"./models/requests/INoContentRequest.js\";\nexport * from \"./models/responses/errors/IBadRequestResponse.js\";\nexport * from \"./models/responses/errors/IConflictResponse.js\";\nexport * from \"./models/responses/errors/IForbiddenResponse.js\";\nexport * from \"./models/responses/errors/IInternalServerErrorResponse.js\";\nexport * from \"./models/responses/errors/INotFoundResponse.js\";\nexport * from \"./models/responses/errors/INotImplementedResponse.js\";\nexport * from \"./models/responses/errors/ITooManyRequestsResponse.js\";\nexport * from \"./models/responses/errors/IUnauthorizedResponse.js\";\nexport * from \"./models/responses/errors/IUnprocessableEntityResponse.js\";\nexport * from \"./models/responses/success/IAcceptedResponse.js\";\nexport * from \"./models/responses/success/ICreatedResponse.js\";\nexport * from \"./models/responses/success/INoContentResponse.js\";\nexport * from \"./models/responses/success/IOkResponse.js\";\nexport * from \"./models/routes/IBaseRoute.js\";\nexport * from \"./models/routes/IBaseRouteEntryPoint.js\";\nexport * from \"./models/routes/IRestRoute.js\";\nexport * from \"./models/routes/IRestRouteEntryPoint.js\";\nexport * from \"./models/routes/IRestRouteExample.js\";\nexport * from \"./models/routes/IRestRouteRequestExample.js\";\nexport * from \"./models/routes/IRestRouteResponseAttachmentOptions.js\";\nexport * from \"./models/routes/IRestRouteResponseExample.js\";\nexport * from \"./models/routes/IRestRouteResponseOptions.js\";\nexport * from \"./models/routes/ISocketRoute.js\";\nexport * from \"./models/routes/ISocketRouteEntryPoint.js\";\nexport * from \"./models/routes/ITag.js\";\nexport * from \"./models/server/IBaseRouteProcessor.js\";\nexport * from \"./models/server/IMimeTypeProcessor.js\";\nexport * from \"./models/server/IRestRouteProcessor.js\";\nexport * from \"./models/server/ISocketRouteProcessor.js\";\nexport * from \"./models/server/IWebServer.js\";\nexport * from \"./models/server/IWebServerOptions.js\";\nexport * from \"./models/services/IHealthComponent.js\";\nexport * from \"./models/services/IHostingComponent.js\";\nexport * from \"./models/services/IInformationComponent.js\";\nexport * from \"./models/services/IUrlTransformerComponent.js\";\nexport * from \"./models/services/IServerInfo.js\";\nexport * from \"./models/services/ITenant.js\";\nexport * from \"./models/services/ITenantAdminComponent.js\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IServerHealthResponse.js","sourceRoot":"","sources":["../../../../src/models/api/IServerHealthResponse.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IHealthInfo } from \"../services/IHealthInfo.js\";\n\n/**\n * The health of the server.\n */\nexport interface IServerHealthResponse {\n\t/**\n\t * The information for the server.\n\t */\n\tbody: IHealthInfo;\n}\n"]}
1
+ {"version":3,"file":"IServerHealthResponse.js","sourceRoot":"","sources":["../../../../src/models/api/IServerHealthResponse.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { HealthStatus, IHealth } from \"@twin.org/core\";\n\n/**\n * The health of the server.\n */\nexport interface IServerHealthResponse {\n\t/**\n\t * The health for the server.\n\t */\n\tbody: { status: HealthStatus; components: IHealth[] };\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IServerLivezResponse.js","sourceRoot":"","sources":["../../../../src/models/api/IServerLivezResponse.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { HeaderTypes, MimeTypes } from \"@twin.org/web\";\n\n/**\n * The livez of the server.\n */\nexport interface IServerLivezResponse {\n\t/**\n\t * The headers for the response.\n\t */\n\theaders: {\n\t\t[HeaderTypes.ContentType]: typeof MimeTypes.PlainText;\n\t};\n\n\t/**\n\t * The livez information for the server.\n\t */\n\tbody: \"ok\" | \"failed\";\n}\n"]}
1
+ {"version":3,"file":"IServerLivezResponse.js","sourceRoot":"","sources":["../../../../src/models/api/IServerLivezResponse.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { HeaderTypes, MimeTypes } from \"@twin.org/web\";\n\n/**\n * The livez of the server.\n */\nexport interface IServerLivezResponse {\n\t/**\n\t * The headers for the response.\n\t */\n\theaders: {\n\t\t[HeaderTypes.ContentType]: typeof MimeTypes.PlainText;\n\t};\n\n\t/**\n\t * The livez information for the server.\n\t */\n\tbody: \"alive\" | \"dead\";\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=IServerReadyzResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IServerReadyzResponse.js","sourceRoot":"","sources":["../../../../src/models/api/IServerReadyzResponse.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { HeaderTypes, MimeTypes } from \"@twin.org/web\";\n\n/**\n * The readyz of the server.\n */\nexport interface IServerReadyzResponse {\n\t/**\n\t * The headers for the response.\n\t */\n\theaders: {\n\t\t[HeaderTypes.ContentType]: typeof MimeTypes.PlainText;\n\t};\n\n\t/**\n\t * The readyz information for the server.\n\t */\n\tbody: \"ready\" | \"not ready\";\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IWebServer.js","sourceRoot":"","sources":["../../../../src/models/server/IWebServer.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IRestRouteProcessor } from \"./IRestRouteProcessor.js\";\nimport type { ISocketRouteProcessor } from \"./ISocketRouteProcessor.js\";\nimport type { IWebServerOptions } from \"./IWebServerOptions.js\";\nimport type { IRestRoute } from \"../routes/IRestRoute.js\";\nimport type { ISocketRoute } from \"../routes/ISocketRoute.js\";\n\n/**\n * Interface describing a web server.\n */\nexport interface IWebServer<T> {\n\t/**\n\t * Get the web server instance.\n\t * @returns The web server instance.\n\t */\n\tgetInstance(): T;\n\n\t/**\n\t * Build the server.\n\t * @param restRouteProcessors The processors for incoming requests over REST.\n\t * @param restRoutes The REST routes.\n\t * @param socketRouteProcessors The processors for incoming requests over Sockets.\n\t * @param socketRoutes The socket routes.\n\t * @param options Options for building the server.\n\t * @returns Nothing.\n\t */\n\tbuild(\n\t\trestRouteProcessors?: IRestRouteProcessor[],\n\t\trestRoutes?: IRestRoute[],\n\t\tsocketRouteProcessors?: ISocketRouteProcessor[],\n\t\tsocketRoutes?: ISocketRoute[],\n\t\toptions?: IWebServerOptions\n\t): Promise<void>;\n\n\t/**\n\t * Start the server.\n\t * @returns Nothing.\n\t */\n\tstart(): Promise<void>;\n\n\t/**\n\t * Stop the server.\n\t * @returns Nothing.\n\t */\n\tstop(): Promise<void>;\n}\n"]}
1
+ {"version":3,"file":"IWebServer.js","sourceRoot":"","sources":["../../../../src/models/server/IWebServer.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent, IHealth } from \"@twin.org/core\";\nimport type { IRestRouteProcessor } from \"./IRestRouteProcessor.js\";\nimport type { ISocketRouteProcessor } from \"./ISocketRouteProcessor.js\";\nimport type { IWebServerOptions } from \"./IWebServerOptions.js\";\nimport type { IRestRoute } from \"../routes/IRestRoute.js\";\nimport type { ISocketRoute } from \"../routes/ISocketRoute.js\";\n\n/**\n * Interface describing a web server.\n */\nexport interface IWebServer<T> extends IComponent {\n\t/**\n\t * Get the web server instance.\n\t * @returns The web server instance.\n\t */\n\tgetInstance(): T;\n\n\t/**\n\t * Build the server.\n\t * @param restRouteProcessors The processors for incoming requests over REST.\n\t * @param restRoutes The REST routes.\n\t * @param socketRouteProcessors The processors for incoming requests over Sockets.\n\t * @param socketRoutes The socket routes.\n\t * @param options Options for building the server.\n\t * @returns Nothing.\n\t */\n\tbuild(\n\t\trestRouteProcessors?: IRestRouteProcessor[],\n\t\trestRoutes?: IRestRoute[],\n\t\tsocketRouteProcessors?: ISocketRouteProcessor[],\n\t\tsocketRoutes?: ISocketRoute[],\n\t\toptions?: IWebServerOptions\n\t): Promise<void>;\n\n\t/**\n\t * Start the server.\n\t * @returns Nothing.\n\t */\n\tstart(): Promise<void>;\n\n\t/**\n\t * Stop the server.\n\t * @returns Nothing.\n\t */\n\tstop(): Promise<void>;\n\n\t/**\n\t * Returns the health status of the component.\n\t * @returns The health status of the component, can return multiple entries for elements within the component.\n\t */\n\thealth(): Promise<IHealth[]>;\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=IHealthComponent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IHealthComponent.js","sourceRoot":"","sources":["../../../../src/models/services/IHealthComponent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { HealthStatus, IComponent, IHealth } from \"@twin.org/core\";\n\n/**\n * The health component for the server.\n */\nexport interface IHealthComponent extends IComponent {\n\t/**\n\t * Get the server health.\n\t * @returns The service health.\n\t */\n\thealthStatus(): Promise<{ status: HealthStatus; components: IHealth[] }>;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IHostingComponent.js","sourceRoot":"","sources":["../../../../src/models/services/IHostingComponent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\nimport type { IHttpRequestQuery } from \"../protocol/IHttpRequestQuery.js\";\n\n/**\n * The information about the hosting of the API.\n */\nexport interface IHostingComponent extends IComponent {\n\t/**\n\t * Get the public origin for the hosting.\n\t * @param serverRequestUrl The url of the current server request if there is one.\n\t * @returns The public origin.\n\t */\n\tgetPublicOrigin(serverRequestUrl?: string): Promise<string>;\n\n\t/**\n\t * Get the public origin for the tenant if one exists.\n\t * @param tenantId The tenant identifier.\n\t * @returns The public origin for the tenant.\n\t */\n\tgetTenantOrigin(tenantId: string): Promise<string | undefined>;\n\n\t/**\n\t * Build a public url based on the public origin and the url provided.\n\t * @param url The url to build upon the public origin.\n\t * @returns The full url based on the public origin.\n\t */\n\tbuildPublicUrl(url: string): Promise<string>;\n\n\t/**\n\t * Add encrypted key/value pairs to a URL's query string.\n\t * Existing query parameters on the URL are preserved; the provided params are\n\t * merged in and then encrypted before being written back to the URL.\n\t * @param url The base URL to add parameters to.\n\t * @param params The key/value pairs to encrypt and append.\n\t * @returns The URL with the encrypted parameters added.\n\t */\n\taddEncryptedParamsToUrl(url: string, params: IHttpRequestQuery): Promise<string>;\n\n\t/**\n\t * Decrypt specified keys from a query parameter object and return their plain-text values.\n\t * @param queryParams The HTTP request query containing the encrypted parameters.\n\t * @param keys The keys to decrypt.\n\t * @returns A map of the decrypted key/value pairs that were present.\n\t */\n\tgetDecryptedParamsFromQueryParams(\n\t\tqueryParams: IHttpRequestQuery | undefined,\n\t\tkeys: string[]\n\t): Promise<IHttpRequestQuery>;\n\n\t/**\n\t * Encrypt the tenant id and append it as a query parameter to the given URL.\n\t * @param url The URL to append the encrypted tenant token to.\n\t * @param tenantId The tenant identifier to encrypt and add.\n\t * @returns The URL with the encrypted tenant token added as a query parameter.\n\t */\n\taddTenantTokenToUrl(url: string, tenantId: string): Promise<string>;\n\t/**\n\t * Get the tenant token from the query parameters.\n\t * @param queryParams The HTTP request query containing the parameters.\n\t * @returns The tenant token if it exists.\n\t */\n\tgetTenantTokenFromQueryParams(\n\t\tqueryParams: IHttpRequestQuery | undefined\n\t): Promise<string | undefined>;\n\n\t/**\n\t * Encrypt query parameters using the hosting component's encryption mechanism.\n\t * @param httpRequestQuery The HTTP request query containing the parameters to encrypt.\n\t * @param keys The keys of the parameters to encrypt.\n\t * @returns A promise that resolves when the query parameters have been encrypted.\n\t */\n\tencryptQueryParams(\n\t\thttpRequestQuery: IHttpRequestQuery | undefined,\n\t\tkeys: string[]\n\t): Promise<void>;\n\n\t/**\n\t * Decrypt query parameters using the hosting component's encryption mechanism.\n\t * @param httpRequestQuery The HTTP request query containing the encrypted values.\n\t * @param keys The keys of the parameters to decrypt.\n\t * @returns A promise that resolves when the query parameters have been decrypted.\n\t */\n\tdecryptQueryParams(\n\t\thttpRequestQuery: IHttpRequestQuery | undefined,\n\t\tkeys: string[]\n\t): Promise<void>;\n\n\t/**\n\t * Encrypt a parameter value using the hosting component's encryption mechanism.\n\t * @param paramValue The value of the parameter to encrypt.\n\t * @returns A promise that resolves to the encrypted value of the parameter.\n\t */\n\tencryptParam(paramValue: string): Promise<string>;\n\n\t/**\n\t * Decrypt a parameter value using the hosting component's encryption mechanism.\n\t * @param encryptedValue The encrypted value of the parameter.\n\t * @returns A promise that resolves to the decrypted value of the parameter.\n\t */\n\tdecryptParam(encryptedValue: string): Promise<string>;\n}\n"]}
1
+ {"version":3,"file":"IHostingComponent.js","sourceRoot":"","sources":["../../../../src/models/services/IHostingComponent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\n\n/**\n * The information about the hosting of the API.\n */\nexport interface IHostingComponent extends IComponent {\n\t/**\n\t * Get the public origin for the hosting.\n\t * @param serverRequestUrl The url of the current server request if there is one.\n\t * @returns The public origin.\n\t */\n\tgetPublicOrigin(serverRequestUrl?: string): Promise<string>;\n\n\t/**\n\t * Get the public origin for the tenant if one exists.\n\t * @param tenantId The tenant identifier.\n\t * @returns The public origin for the tenant.\n\t */\n\tgetTenantOrigin(tenantId: string): Promise<string | undefined>;\n\n\t/**\n\t * Build a public url based on the public origin and the url provided.\n\t * @param url The url to build upon the public origin.\n\t * @returns The full url based on the public origin.\n\t */\n\tbuildPublicUrl(url: string): Promise<string>;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IInformationComponent.js","sourceRoot":"","sources":["../../../../src/models/services/IInformationComponent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\nimport type { HealthStatus } from \"./healthStatus.js\";\nimport type { IHealthInfo } from \"./IHealthInfo.js\";\nimport type { IServerInfo } from \"./IServerInfo.js\";\n\n/**\n * The information component for the server.\n */\nexport interface IInformationComponent extends IComponent {\n\t/**\n\t * Get the root information.\n\t * @returns The root information.\n\t */\n\troot(): Promise<string>;\n\n\t/**\n\t * Get the server information.\n\t * @returns The service information.\n\t */\n\tinfo(): Promise<IServerInfo>;\n\n\t/**\n\t * Get the favicon.\n\t * @returns The favicon.\n\t */\n\tfavicon(): Promise<Uint8Array | undefined>;\n\n\t/**\n\t * Get the OpenAPI spec.\n\t * @returns The OpenAPI spec.\n\t */\n\tspec(): Promise<unknown>;\n\n\t/**\n\t * Is the server live.\n\t * @returns True if the server is live.\n\t */\n\tlivez(): Promise<boolean>;\n\n\t/**\n\t * Get the server health.\n\t * @returns The service health.\n\t */\n\thealth(): Promise<IHealthInfo>;\n\n\t/**\n\t * Set the status of a component.\n\t * @param name The component name.\n\t * @param status The status of the component.\n\t * @param details The details for the status.\n\t * @param tenantId The tenant id, optional if the health status is not tenant specific.\n\t * @returns Nothing.\n\t */\n\tsetComponentHealth(\n\t\tname: string,\n\t\tstatus: HealthStatus,\n\t\tdetails?: string,\n\t\ttenantId?: string\n\t): Promise<void>;\n\n\t/**\n\t * Remove the status of a component.\n\t * @param name The component name.\n\t * @param tenantId The tenant id, optional if the health status is not tenant specific.\n\t * @returns Nothing.\n\t */\n\tremoveComponentHealth(name: string, tenantId?: string): Promise<void>;\n}\n"]}
1
+ {"version":3,"file":"IInformationComponent.js","sourceRoot":"","sources":["../../../../src/models/services/IInformationComponent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\nimport type { IServerInfo } from \"./IServerInfo.js\";\n\n/**\n * The information component for the server.\n */\nexport interface IInformationComponent extends IComponent {\n\t/**\n\t * Get the root information.\n\t * @returns The root information.\n\t */\n\troot(): Promise<string>;\n\n\t/**\n\t * Get the server information.\n\t * @returns The service information.\n\t */\n\tinfo(): Promise<IServerInfo>;\n\n\t/**\n\t * Get the favicon.\n\t * @returns The favicon.\n\t */\n\tfavicon(): Promise<Uint8Array | undefined>;\n\n\t/**\n\t * Get the OpenAPI spec.\n\t * @returns The OpenAPI spec.\n\t */\n\tspec(): Promise<unknown>;\n\n\t/**\n\t * Is the server live.\n\t * @returns The livez status of the server.\n\t */\n\tlivez(): Promise<{ status: \"alive\" | \"dead\" }>;\n\n\t/**\n\t * Is the server ready.\n\t * @returns The readyz status of the server.\n\t */\n\treadyz(): Promise<{ status: \"ready\" | \"not ready\" }>;\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=IUrlTransformerComponent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IUrlTransformerComponent.js","sourceRoot":"","sources":["../../../../src/models/services/IUrlTransformerComponent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\nimport type { IHttpRequestQuery } from \"../protocol/IHttpRequestQuery.js\";\n\n/**\n * The URL transformer component for encrypting and decrypting URL parameters.\n */\nexport interface IUrlTransformerComponent extends IComponent {\n\t/**\n\t * Encrypt a named token value and append it as a query parameter to the given URL.\n\t * The URL param name is resolved from the configured token name dictionary using the id.\n\t * @param url The URL to append the encrypted token to.\n\t * @param id The logical token identifier (e.g. \"tenant\").\n\t * @param value The value to encrypt and add.\n\t * @returns The URL with the encrypted token added as a query parameter.\n\t */\n\taddEncryptedQueryParamToUrl(url: string, id: string, value: string): Promise<string>;\n\n\t/**\n\t * Get a named token value from the query parameters.\n\t * The URL param name is resolved from the configured token name dictionary using the id.\n\t * @param queryParams The HTTP request query containing the parameters.\n\t * @param id The logical token identifier (e.g. \"tenant\").\n\t * @returns The decrypted token value if it exists.\n\t */\n\tgetEncryptedQueryParam(\n\t\tqueryParams: IHttpRequestQuery | undefined,\n\t\tid: string\n\t): Promise<string | undefined>;\n\n\t/**\n\t * Add encrypted key/value pairs to a URL's query string.\n\t * Existing query parameters on the URL are preserved; the provided params are\n\t * merged in and then encrypted before being written back to the URL.\n\t * @param url The base URL to add parameters to.\n\t * @param params The key/value pairs to encrypt and append.\n\t * @returns The URL with the encrypted parameters added.\n\t */\n\taddEncryptedParamsToUrl(url: string, params: IHttpRequestQuery): Promise<string>;\n\n\t/**\n\t * Decrypt specified keys from a query parameter object and return their plain-text values.\n\t * @param queryParams The HTTP request query containing the encrypted parameters.\n\t * @param keys The keys to decrypt.\n\t * @returns A map of the decrypted key/value pairs that were present.\n\t */\n\tgetDecryptedParamsFromQueryParams(\n\t\tqueryParams: IHttpRequestQuery | undefined,\n\t\tkeys: string[]\n\t): Promise<IHttpRequestQuery>;\n\n\t/**\n\t * Encrypt query parameters using the URL transformer's encryption mechanism.\n\t * @param httpRequestQuery The HTTP request query containing the parameters to encrypt.\n\t * @param keys The keys of the parameters to encrypt.\n\t * @returns A promise that resolves when the query parameters have been encrypted.\n\t */\n\tencryptQueryParams(\n\t\thttpRequestQuery: IHttpRequestQuery | undefined,\n\t\tkeys: string[]\n\t): Promise<void>;\n\n\t/**\n\t * Decrypt query parameters using the URL transformer's encryption mechanism.\n\t * @param httpRequestQuery The HTTP request query containing the encrypted values.\n\t * @param keys The keys of the parameters to decrypt.\n\t * @returns A promise that resolves when the query parameters have been decrypted.\n\t */\n\tdecryptQueryParams(\n\t\thttpRequestQuery: IHttpRequestQuery | undefined,\n\t\tkeys: string[]\n\t): Promise<void>;\n\n\t/**\n\t * Encrypt a parameter value.\n\t * @param paramValue The value of the parameter to encrypt.\n\t * @returns A promise that resolves to the encrypted value of the parameter.\n\t */\n\tencryptParam(paramValue: string): Promise<string>;\n\n\t/**\n\t * Decrypt a parameter value.\n\t * @param encryptedValue The encrypted value of the parameter.\n\t * @returns A promise that resolves to the decrypted value of the parameter.\n\t */\n\tdecryptParam(encryptedValue: string): Promise<string>;\n}\n"]}
@@ -10,6 +10,7 @@ export * from "./models/api/IServerFavIconResponse.js";
10
10
  export * from "./models/api/IServerHealthResponse.js";
11
11
  export * from "./models/api/IServerInfoResponse.js";
12
12
  export * from "./models/api/IServerLivezResponse.js";
13
+ export * from "./models/api/IServerReadyzResponse.js";
13
14
  export * from "./models/api/IServerRootResponse.js";
14
15
  export * from "./models/api/IServerSpecResponse.js";
15
16
  export * from "./models/config/IBaseRestClientConfig.js";
@@ -55,11 +56,10 @@ export * from "./models/server/IRestRouteProcessor.js";
55
56
  export * from "./models/server/ISocketRouteProcessor.js";
56
57
  export * from "./models/server/IWebServer.js";
57
58
  export * from "./models/server/IWebServerOptions.js";
58
- export * from "./models/services/healthStatus.js";
59
- export * from "./models/services/IHealthComponentInfo.js";
60
- export * from "./models/services/IHealthInfo.js";
59
+ export * from "./models/services/IHealthComponent.js";
61
60
  export * from "./models/services/IHostingComponent.js";
62
61
  export * from "./models/services/IInformationComponent.js";
62
+ export * from "./models/services/IUrlTransformerComponent.js";
63
63
  export * from "./models/services/IServerInfo.js";
64
64
  export * from "./models/services/ITenant.js";
65
65
  export * from "./models/services/ITenantAdminComponent.js";
@@ -1,10 +1,13 @@
1
- import type { IHealthInfo } from "../services/IHealthInfo.js";
1
+ import type { HealthStatus, IHealth } from "@twin.org/core";
2
2
  /**
3
3
  * The health of the server.
4
4
  */
5
5
  export interface IServerHealthResponse {
6
6
  /**
7
- * The information for the server.
7
+ * The health for the server.
8
8
  */
9
- body: IHealthInfo;
9
+ body: {
10
+ status: HealthStatus;
11
+ components: IHealth[];
12
+ };
10
13
  }
@@ -12,5 +12,5 @@ export interface IServerLivezResponse {
12
12
  /**
13
13
  * The livez information for the server.
14
14
  */
15
- body: "ok" | "failed";
15
+ body: "alive" | "dead";
16
16
  }
@@ -0,0 +1,16 @@
1
+ import type { HeaderTypes, MimeTypes } from "@twin.org/web";
2
+ /**
3
+ * The readyz of the server.
4
+ */
5
+ export interface IServerReadyzResponse {
6
+ /**
7
+ * The headers for the response.
8
+ */
9
+ headers: {
10
+ [HeaderTypes.ContentType]: typeof MimeTypes.PlainText;
11
+ };
12
+ /**
13
+ * The readyz information for the server.
14
+ */
15
+ body: "ready" | "not ready";
16
+ }
@@ -1,3 +1,4 @@
1
+ import type { IComponent, IHealth } from "@twin.org/core";
1
2
  import type { IRestRouteProcessor } from "./IRestRouteProcessor.js";
2
3
  import type { ISocketRouteProcessor } from "./ISocketRouteProcessor.js";
3
4
  import type { IWebServerOptions } from "./IWebServerOptions.js";
@@ -6,7 +7,7 @@ import type { ISocketRoute } from "../routes/ISocketRoute.js";
6
7
  /**
7
8
  * Interface describing a web server.
8
9
  */
9
- export interface IWebServer<T> {
10
+ export interface IWebServer<T> extends IComponent {
10
11
  /**
11
12
  * Get the web server instance.
12
13
  * @returns The web server instance.
@@ -32,4 +33,9 @@ export interface IWebServer<T> {
32
33
  * @returns Nothing.
33
34
  */
34
35
  stop(): Promise<void>;
36
+ /**
37
+ * Returns the health status of the component.
38
+ * @returns The health status of the component, can return multiple entries for elements within the component.
39
+ */
40
+ health(): Promise<IHealth[]>;
35
41
  }
@@ -0,0 +1,14 @@
1
+ import type { HealthStatus, IComponent, IHealth } from "@twin.org/core";
2
+ /**
3
+ * The health component for the server.
4
+ */
5
+ export interface IHealthComponent extends IComponent {
6
+ /**
7
+ * Get the server health.
8
+ * @returns The service health.
9
+ */
10
+ healthStatus(): Promise<{
11
+ status: HealthStatus;
12
+ components: IHealth[];
13
+ }>;
14
+ }
@@ -1,5 +1,4 @@
1
1
  import type { IComponent } from "@twin.org/core";
2
- import type { IHttpRequestQuery } from "../protocol/IHttpRequestQuery.js";
3
2
  /**
4
3
  * The information about the hosting of the API.
5
4
  */
@@ -22,59 +21,4 @@ export interface IHostingComponent extends IComponent {
22
21
  * @returns The full url based on the public origin.
23
22
  */
24
23
  buildPublicUrl(url: string): Promise<string>;
25
- /**
26
- * Add encrypted key/value pairs to a URL's query string.
27
- * Existing query parameters on the URL are preserved; the provided params are
28
- * merged in and then encrypted before being written back to the URL.
29
- * @param url The base URL to add parameters to.
30
- * @param params The key/value pairs to encrypt and append.
31
- * @returns The URL with the encrypted parameters added.
32
- */
33
- addEncryptedParamsToUrl(url: string, params: IHttpRequestQuery): Promise<string>;
34
- /**
35
- * Decrypt specified keys from a query parameter object and return their plain-text values.
36
- * @param queryParams The HTTP request query containing the encrypted parameters.
37
- * @param keys The keys to decrypt.
38
- * @returns A map of the decrypted key/value pairs that were present.
39
- */
40
- getDecryptedParamsFromQueryParams(queryParams: IHttpRequestQuery | undefined, keys: string[]): Promise<IHttpRequestQuery>;
41
- /**
42
- * Encrypt the tenant id and append it as a query parameter to the given URL.
43
- * @param url The URL to append the encrypted tenant token to.
44
- * @param tenantId The tenant identifier to encrypt and add.
45
- * @returns The URL with the encrypted tenant token added as a query parameter.
46
- */
47
- addTenantTokenToUrl(url: string, tenantId: string): Promise<string>;
48
- /**
49
- * Get the tenant token from the query parameters.
50
- * @param queryParams The HTTP request query containing the parameters.
51
- * @returns The tenant token if it exists.
52
- */
53
- getTenantTokenFromQueryParams(queryParams: IHttpRequestQuery | undefined): Promise<string | undefined>;
54
- /**
55
- * Encrypt query parameters using the hosting component's encryption mechanism.
56
- * @param httpRequestQuery The HTTP request query containing the parameters to encrypt.
57
- * @param keys The keys of the parameters to encrypt.
58
- * @returns A promise that resolves when the query parameters have been encrypted.
59
- */
60
- encryptQueryParams(httpRequestQuery: IHttpRequestQuery | undefined, keys: string[]): Promise<void>;
61
- /**
62
- * Decrypt query parameters using the hosting component's encryption mechanism.
63
- * @param httpRequestQuery The HTTP request query containing the encrypted values.
64
- * @param keys The keys of the parameters to decrypt.
65
- * @returns A promise that resolves when the query parameters have been decrypted.
66
- */
67
- decryptQueryParams(httpRequestQuery: IHttpRequestQuery | undefined, keys: string[]): Promise<void>;
68
- /**
69
- * Encrypt a parameter value using the hosting component's encryption mechanism.
70
- * @param paramValue The value of the parameter to encrypt.
71
- * @returns A promise that resolves to the encrypted value of the parameter.
72
- */
73
- encryptParam(paramValue: string): Promise<string>;
74
- /**
75
- * Decrypt a parameter value using the hosting component's encryption mechanism.
76
- * @param encryptedValue The encrypted value of the parameter.
77
- * @returns A promise that resolves to the decrypted value of the parameter.
78
- */
79
- decryptParam(encryptedValue: string): Promise<string>;
80
24
  }
@@ -1,6 +1,4 @@
1
1
  import type { IComponent } from "@twin.org/core";
2
- import type { HealthStatus } from "./healthStatus.js";
3
- import type { IHealthInfo } from "./IHealthInfo.js";
4
2
  import type { IServerInfo } from "./IServerInfo.js";
5
3
  /**
6
4
  * The information component for the server.
@@ -28,28 +26,16 @@ export interface IInformationComponent extends IComponent {
28
26
  spec(): Promise<unknown>;
29
27
  /**
30
28
  * Is the server live.
31
- * @returns True if the server is live.
29
+ * @returns The livez status of the server.
32
30
  */
33
- livez(): Promise<boolean>;
31
+ livez(): Promise<{
32
+ status: "alive" | "dead";
33
+ }>;
34
34
  /**
35
- * Get the server health.
36
- * @returns The service health.
35
+ * Is the server ready.
36
+ * @returns The readyz status of the server.
37
37
  */
38
- health(): Promise<IHealthInfo>;
39
- /**
40
- * Set the status of a component.
41
- * @param name The component name.
42
- * @param status The status of the component.
43
- * @param details The details for the status.
44
- * @param tenantId The tenant id, optional if the health status is not tenant specific.
45
- * @returns Nothing.
46
- */
47
- setComponentHealth(name: string, status: HealthStatus, details?: string, tenantId?: string): Promise<void>;
48
- /**
49
- * Remove the status of a component.
50
- * @param name The component name.
51
- * @param tenantId The tenant id, optional if the health status is not tenant specific.
52
- * @returns Nothing.
53
- */
54
- removeComponentHealth(name: string, tenantId?: string): Promise<void>;
38
+ readyz(): Promise<{
39
+ status: "ready" | "not ready";
40
+ }>;
55
41
  }
@@ -0,0 +1,66 @@
1
+ import type { IComponent } from "@twin.org/core";
2
+ import type { IHttpRequestQuery } from "../protocol/IHttpRequestQuery.js";
3
+ /**
4
+ * The URL transformer component for encrypting and decrypting URL parameters.
5
+ */
6
+ export interface IUrlTransformerComponent extends IComponent {
7
+ /**
8
+ * Encrypt a named token value and append it as a query parameter to the given URL.
9
+ * The URL param name is resolved from the configured token name dictionary using the id.
10
+ * @param url The URL to append the encrypted token to.
11
+ * @param id The logical token identifier (e.g. "tenant").
12
+ * @param value The value to encrypt and add.
13
+ * @returns The URL with the encrypted token added as a query parameter.
14
+ */
15
+ addEncryptedQueryParamToUrl(url: string, id: string, value: string): Promise<string>;
16
+ /**
17
+ * Get a named token value from the query parameters.
18
+ * The URL param name is resolved from the configured token name dictionary using the id.
19
+ * @param queryParams The HTTP request query containing the parameters.
20
+ * @param id The logical token identifier (e.g. "tenant").
21
+ * @returns The decrypted token value if it exists.
22
+ */
23
+ getEncryptedQueryParam(queryParams: IHttpRequestQuery | undefined, id: string): Promise<string | undefined>;
24
+ /**
25
+ * Add encrypted key/value pairs to a URL's query string.
26
+ * Existing query parameters on the URL are preserved; the provided params are
27
+ * merged in and then encrypted before being written back to the URL.
28
+ * @param url The base URL to add parameters to.
29
+ * @param params The key/value pairs to encrypt and append.
30
+ * @returns The URL with the encrypted parameters added.
31
+ */
32
+ addEncryptedParamsToUrl(url: string, params: IHttpRequestQuery): Promise<string>;
33
+ /**
34
+ * Decrypt specified keys from a query parameter object and return their plain-text values.
35
+ * @param queryParams The HTTP request query containing the encrypted parameters.
36
+ * @param keys The keys to decrypt.
37
+ * @returns A map of the decrypted key/value pairs that were present.
38
+ */
39
+ getDecryptedParamsFromQueryParams(queryParams: IHttpRequestQuery | undefined, keys: string[]): Promise<IHttpRequestQuery>;
40
+ /**
41
+ * Encrypt query parameters using the URL transformer's encryption mechanism.
42
+ * @param httpRequestQuery The HTTP request query containing the parameters to encrypt.
43
+ * @param keys The keys of the parameters to encrypt.
44
+ * @returns A promise that resolves when the query parameters have been encrypted.
45
+ */
46
+ encryptQueryParams(httpRequestQuery: IHttpRequestQuery | undefined, keys: string[]): Promise<void>;
47
+ /**
48
+ * Decrypt query parameters using the URL transformer's encryption mechanism.
49
+ * @param httpRequestQuery The HTTP request query containing the encrypted values.
50
+ * @param keys The keys of the parameters to decrypt.
51
+ * @returns A promise that resolves when the query parameters have been decrypted.
52
+ */
53
+ decryptQueryParams(httpRequestQuery: IHttpRequestQuery | undefined, keys: string[]): Promise<void>;
54
+ /**
55
+ * Encrypt a parameter value.
56
+ * @param paramValue The value of the parameter to encrypt.
57
+ * @returns A promise that resolves to the encrypted value of the parameter.
58
+ */
59
+ encryptParam(paramValue: string): Promise<string>;
60
+ /**
61
+ * Decrypt a parameter value.
62
+ * @param encryptedValue The encrypted value of the parameter.
63
+ * @returns A promise that resolves to the decrypted value of the parameter.
64
+ */
65
+ decryptParam(encryptedValue: string): Promise<string>;
66
+ }
package/docs/changelog.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.0.3-next.30](https://github.com/twinfoundation/twin-api/compare/api-models-v0.0.3-next.29...api-models-v0.0.3-next.30) (2026-05-05)
4
+
5
+
6
+ ### Features
7
+
8
+ * separate service responsibilities ([#116](https://github.com/twinfoundation/twin-api/issues/116)) ([2234648](https://github.com/twinfoundation/twin-api/commit/2234648de4a2de5b7356aadde328f40470bc12e3))
9
+
3
10
  ## [0.0.3-next.29](https://github.com/twinfoundation/twin-api/compare/api-models-v0.0.3-next.28...api-models-v0.0.3-next.29) (2026-05-01)
4
11
 
5
12
 
@@ -14,6 +14,7 @@
14
14
  - [IServerHealthResponse](interfaces/IServerHealthResponse.md)
15
15
  - [IServerInfoResponse](interfaces/IServerInfoResponse.md)
16
16
  - [IServerLivezResponse](interfaces/IServerLivezResponse.md)
17
+ - [IServerReadyzResponse](interfaces/IServerReadyzResponse.md)
17
18
  - [IServerRootResponse](interfaces/IServerRootResponse.md)
18
19
  - [IServerSpecResponse](interfaces/IServerSpecResponse.md)
19
20
  - [IBaseRestClientConfig](interfaces/IBaseRestClientConfig.md)
@@ -56,20 +57,19 @@
56
57
  - [ISocketRouteProcessor](interfaces/ISocketRouteProcessor.md)
57
58
  - [IWebServer](interfaces/IWebServer.md)
58
59
  - [IWebServerOptions](interfaces/IWebServerOptions.md)
59
- - [IHealthComponentInfo](interfaces/IHealthComponentInfo.md)
60
- - [IHealthInfo](interfaces/IHealthInfo.md)
60
+ - [IHealthComponent](interfaces/IHealthComponent.md)
61
61
  - [IHostingComponent](interfaces/IHostingComponent.md)
62
62
  - [IInformationComponent](interfaces/IInformationComponent.md)
63
63
  - [IServerInfo](interfaces/IServerInfo.md)
64
64
  - [ITenant](interfaces/ITenant.md)
65
65
  - [ITenantAdminComponent](interfaces/ITenantAdminComponent.md)
66
+ - [IUrlTransformerComponent](interfaces/IUrlTransformerComponent.md)
66
67
 
67
68
  ## Type Aliases
68
69
 
69
70
  - [HttpContextIdKeys](type-aliases/HttpContextIdKeys.md)
70
71
  - [IRestRouteEntryPoint](type-aliases/IRestRouteEntryPoint.md)
71
72
  - [ISocketRouteEntryPoint](type-aliases/ISocketRouteEntryPoint.md)
72
- - [HealthStatus](type-aliases/HealthStatus.md)
73
73
 
74
74
  ## Variables
75
75
 
@@ -77,4 +77,3 @@
77
77
  - [RestRouteProcessorFactory](variables/RestRouteProcessorFactory.md)
78
78
  - [SocketRouteProcessorFactory](variables/SocketRouteProcessorFactory.md)
79
79
  - [HttpContextIdKeys](variables/HttpContextIdKeys.md)
80
- - [HealthStatus](variables/HealthStatus.md)
@@ -0,0 +1,21 @@
1
+ # Interface: IHealthComponent
2
+
3
+ The health component for the server.
4
+
5
+ ## Extends
6
+
7
+ - `IComponent`
8
+
9
+ ## Methods
10
+
11
+ ### healthStatus() {#healthstatus}
12
+
13
+ > **healthStatus**(): `Promise`\<\{ `status`: `HealthStatus`; `components`: `IHealth`[]; \}\>
14
+
15
+ Get the server health.
16
+
17
+ #### Returns
18
+
19
+ `Promise`\<\{ `status`: `HealthStatus`; `components`: `IHealth`[]; \}\>
20
+
21
+ The service health.