@twin.org/api-models 0.0.3-next.8 → 0.0.3-next.9

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 (29) hide show
  1. package/dist/es/index.js +2 -0
  2. package/dist/es/index.js.map +1 -1
  3. package/dist/es/models/api/IServerLivezResponse.js +2 -0
  4. package/dist/es/models/api/IServerLivezResponse.js.map +1 -0
  5. package/dist/es/models/api/IServerRootResponse.js +0 -2
  6. package/dist/es/models/api/IServerRootResponse.js.map +1 -1
  7. package/dist/es/models/routes/IBaseRoute.js.map +1 -1
  8. package/dist/es/models/services/IHealthComponentInfo.js +2 -0
  9. package/dist/es/models/services/IHealthComponentInfo.js.map +1 -0
  10. package/dist/es/models/services/IHealthInfo.js.map +1 -1
  11. package/dist/es/models/services/IInformationComponent.js.map +1 -1
  12. package/dist/types/index.d.ts +2 -0
  13. package/dist/types/models/api/IServerLivezResponse.d.ts +16 -0
  14. package/dist/types/models/api/IServerRootResponse.d.ts +7 -0
  15. package/dist/types/models/routes/IBaseRoute.d.ts +5 -1
  16. package/dist/types/models/services/IHealthComponentInfo.d.ts +18 -0
  17. package/dist/types/models/services/IHealthInfo.d.ts +2 -14
  18. package/dist/types/models/services/IInformationComponent.d.ts +9 -2
  19. package/docs/changelog.md +26 -0
  20. package/docs/reference/index.md +2 -0
  21. package/docs/reference/interfaces/IBaseRoute.md +9 -1
  22. package/docs/reference/interfaces/IHealthComponentInfo.md +27 -0
  23. package/docs/reference/interfaces/IHealthInfo.md +1 -19
  24. package/docs/reference/interfaces/IInformationComponent.md +28 -2
  25. package/docs/reference/interfaces/IRestRoute.md +13 -1
  26. package/docs/reference/interfaces/IServerLivezResponse.md +23 -0
  27. package/docs/reference/interfaces/IServerRootResponse.md +12 -0
  28. package/docs/reference/interfaces/ISocketRoute.md +13 -1
  29. package/package.json +1 -1
package/dist/es/index.js CHANGED
@@ -9,6 +9,7 @@ export * from "./helpers/httpParameterHelper.js";
9
9
  export * from "./models/api/IServerFavIconResponse.js";
10
10
  export * from "./models/api/IServerHealthResponse.js";
11
11
  export * from "./models/api/IServerInfoResponse.js";
12
+ export * from "./models/api/IServerLivezResponse.js";
12
13
  export * from "./models/api/IServerRootResponse.js";
13
14
  export * from "./models/api/IServerSpecResponse.js";
14
15
  export * from "./models/client/IAuthenticationGenerator.js";
@@ -53,6 +54,7 @@ export * from "./models/server/ISocketRouteProcessor.js";
53
54
  export * from "./models/server/IWebServer.js";
54
55
  export * from "./models/server/IWebServerOptions.js";
55
56
  export * from "./models/services/healthStatus.js";
57
+ export * from "./models/services/IHealthComponentInfo.js";
56
58
  export * from "./models/services/IHealthInfo.js";
57
59
  export * from "./models/services/IInformationComponent.js";
58
60
  export * from "./models/services/IServerInfo.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,cAAc,+CAA+C,CAAC;AAC9D,cAAc,yCAAyC,CAAC;AACxD,cAAc,0CAA0C,CAAC;AACzD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC;AACjD,cAAc,wCAAwC,CAAC;AACvD,cAAc,uCAAuC,CAAC;AACtD,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,0CAA0C,CAAC;AACzD,cAAc,4CAA4C,CAAC;AAC3D,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,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,kCAAkC,CAAC;AACjD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,kCAAkC,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nexport * from \"./factories/authenticationGeneratorFactory.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 \"./models/api/IServerFavIconResponse.js\";\nexport * from \"./models/api/IServerHealthResponse.js\";\nexport * from \"./models/api/IServerInfoResponse.js\";\nexport * from \"./models/api/IServerRootResponse.js\";\nexport * from \"./models/api/IServerSpecResponse.js\";\nexport * from \"./models/client/IAuthenticationGenerator.js\";\nexport * from \"./models/config/IBaseRestClientConfig.js\";\nexport * from \"./models/config/IBaseSocketClientConfig.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/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/IHealthInfo.js\";\nexport * from \"./models/services/IInformationComponent.js\";\nexport * from \"./models/services/IServerInfo.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,cAAc,+CAA+C,CAAC;AAC9D,cAAc,yCAAyC,CAAC;AACxD,cAAc,0CAA0C,CAAC;AACzD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC;AACjD,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,6CAA6C,CAAC;AAC5D,cAAc,0CAA0C,CAAC;AACzD,cAAc,4CAA4C,CAAC;AAC3D,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,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,4CAA4C,CAAC;AAC3D,cAAc,kCAAkC,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nexport * from \"./factories/authenticationGeneratorFactory.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 \"./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/client/IAuthenticationGenerator.js\";\nexport * from \"./models/config/IBaseRestClientConfig.js\";\nexport * from \"./models/config/IBaseSocketClientConfig.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/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/IInformationComponent.js\";\nexport * from \"./models/services/IServerInfo.js\";\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=IServerLivezResponse.js.map
@@ -0,0 +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,4 +1,2 @@
1
- // Copyright 2024 IOTA Stiftung.
2
- // SPDX-License-Identifier: Apache-2.0.
3
1
  export {};
4
2
  //# sourceMappingURL=IServerRootResponse.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IServerRootResponse.js","sourceRoot":"","sources":["../../../../src/models/api/IServerRootResponse.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * The root text for the server.\n */\nexport interface IServerRootResponse {\n\t/**\n\t * The root text for the server.\n\t */\n\tbody: string;\n}\n"]}
1
+ {"version":3,"file":"IServerRootResponse.js","sourceRoot":"","sources":["../../../../src/models/api/IServerRootResponse.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 root text for the server.\n */\nexport interface IServerRootResponse {\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 root text for the server.\n\t */\n\tbody: string;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IBaseRoute.js","sourceRoot":"","sources":["../../../../src/models/routes/IBaseRoute.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Interface which defines a route.\n */\nexport interface IBaseRoute {\n\t/**\n\t * The id of the operation.\n\t */\n\toperationId: string;\n\n\t/**\n\t * The path to use for routing.\n\t */\n\tpath: string;\n\n\t/**\n\t * Skips the authentication for this route.\n\t */\n\tskipAuth?: boolean;\n\n\t/**\n\t * The features supported by additional processors to run for this route.\n\t */\n\tprocessorFeatures?: string[];\n\n\t/**\n\t * The data for additional processors to run for this route.\n\t */\n\tprocessorData?: {\n\t\t[key: string]: unknown;\n\t};\n}\n"]}
1
+ {"version":3,"file":"IBaseRoute.js","sourceRoot":"","sources":["../../../../src/models/routes/IBaseRoute.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Interface which defines a route.\n */\nexport interface IBaseRoute {\n\t/**\n\t * The id of the operation.\n\t */\n\toperationId: string;\n\n\t/**\n\t * The path to use for routing.\n\t */\n\tpath: string;\n\n\t/**\n\t * Skips the authentication requirement for this route.\n\t */\n\tskipAuth?: boolean;\n\n\t/**\n\t * Skips the tenant requirement for this route.\n\t */\n\tskipTenant?: boolean;\n\n\t/**\n\t * The features supported by additional processors to run for this route.\n\t */\n\tprocessorFeatures?: string[];\n\n\t/**\n\t * The data for additional processors to run for this route.\n\t */\n\tprocessorData?: {\n\t\t[key: string]: unknown;\n\t};\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=IHealthComponentInfo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IHealthComponentInfo.js","sourceRoot":"","sources":["../../../../src/models/services/IHealthComponentInfo.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { HealthStatus } from \"./healthStatus.js\";\n\n/**\n * The health component information.\n */\nexport interface IHealthComponentInfo {\n\t/**\n\t * The name of the component.\n\t */\n\tname: string;\n\n\t/**\n\t * The status of the component.\n\t */\n\tstatus: HealthStatus;\n\n\t/**\n\t * The details for the status.\n\t */\n\tdetails?: string;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IHealthInfo.js","sourceRoot":"","sources":["../../../../src/models/services/IHealthInfo.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { HealthStatus } from \"./healthStatus.js\";\n\n/**\n * The status of the server.\n */\nexport interface IHealthInfo {\n\t/**\n\t * The status.\n\t */\n\tstatus: HealthStatus;\n\n\t/**\n\t * The status of the components.\n\t */\n\tcomponents?: {\n\t\t/**\n\t\t * The name of the component.\n\t\t */\n\t\tname: string;\n\n\t\t/**\n\t\t * The status of the component.\n\t\t */\n\t\tstatus: HealthStatus;\n\n\t\t/**\n\t\t * The details for the status.\n\t\t */\n\t\tdetails?: string;\n\t}[];\n}\n"]}
1
+ {"version":3,"file":"IHealthInfo.js","sourceRoot":"","sources":["../../../../src/models/services/IHealthInfo.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { HealthStatus } from \"./healthStatus.js\";\nimport type { IHealthComponentInfo } from \"./IHealthComponentInfo.js\";\n\n/**\n * The status of the server.\n */\nexport interface IHealthInfo {\n\t/**\n\t * The status.\n\t */\n\tstatus: HealthStatus;\n\n\t/**\n\t * The status of the components.\n\t */\n\tcomponents?: IHealthComponentInfo[];\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 * 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 * @returns Nothing.\n\t */\n\tsetComponentHealth(name: string, status: HealthStatus, details?: string): Promise<void>;\n\n\t/**\n\t * Remove the status of a component.\n\t * @param name The component name.\n\t * @returns Nothing.\n\t */\n\tremoveComponentHealth(name: 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 { 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"]}
@@ -7,6 +7,7 @@ export * from "./helpers/httpParameterHelper.js";
7
7
  export * from "./models/api/IServerFavIconResponse.js";
8
8
  export * from "./models/api/IServerHealthResponse.js";
9
9
  export * from "./models/api/IServerInfoResponse.js";
10
+ export * from "./models/api/IServerLivezResponse.js";
10
11
  export * from "./models/api/IServerRootResponse.js";
11
12
  export * from "./models/api/IServerSpecResponse.js";
12
13
  export * from "./models/client/IAuthenticationGenerator.js";
@@ -51,6 +52,7 @@ export * from "./models/server/ISocketRouteProcessor.js";
51
52
  export * from "./models/server/IWebServer.js";
52
53
  export * from "./models/server/IWebServerOptions.js";
53
54
  export * from "./models/services/healthStatus.js";
55
+ export * from "./models/services/IHealthComponentInfo.js";
54
56
  export * from "./models/services/IHealthInfo.js";
55
57
  export * from "./models/services/IInformationComponent.js";
56
58
  export * from "./models/services/IServerInfo.js";
@@ -0,0 +1,16 @@
1
+ import type { HeaderTypes, MimeTypes } from "@twin.org/web";
2
+ /**
3
+ * The livez of the server.
4
+ */
5
+ export interface IServerLivezResponse {
6
+ /**
7
+ * The headers for the response.
8
+ */
9
+ headers: {
10
+ [HeaderTypes.ContentType]: typeof MimeTypes.PlainText;
11
+ };
12
+ /**
13
+ * The livez information for the server.
14
+ */
15
+ body: "ok" | "failed";
16
+ }
@@ -1,7 +1,14 @@
1
+ import type { HeaderTypes, MimeTypes } from "@twin.org/web";
1
2
  /**
2
3
  * The root text for the server.
3
4
  */
4
5
  export interface IServerRootResponse {
6
+ /**
7
+ * The headers for the response.
8
+ */
9
+ headers: {
10
+ [HeaderTypes.ContentType]: typeof MimeTypes.PlainText;
11
+ };
5
12
  /**
6
13
  * The root text for the server.
7
14
  */
@@ -11,9 +11,13 @@ export interface IBaseRoute {
11
11
  */
12
12
  path: string;
13
13
  /**
14
- * Skips the authentication for this route.
14
+ * Skips the authentication requirement for this route.
15
15
  */
16
16
  skipAuth?: boolean;
17
+ /**
18
+ * Skips the tenant requirement for this route.
19
+ */
20
+ skipTenant?: boolean;
17
21
  /**
18
22
  * The features supported by additional processors to run for this route.
19
23
  */
@@ -0,0 +1,18 @@
1
+ import type { HealthStatus } from "./healthStatus.js";
2
+ /**
3
+ * The health component information.
4
+ */
5
+ export interface IHealthComponentInfo {
6
+ /**
7
+ * The name of the component.
8
+ */
9
+ name: string;
10
+ /**
11
+ * The status of the component.
12
+ */
13
+ status: HealthStatus;
14
+ /**
15
+ * The details for the status.
16
+ */
17
+ details?: string;
18
+ }
@@ -1,4 +1,5 @@
1
1
  import type { HealthStatus } from "./healthStatus.js";
2
+ import type { IHealthComponentInfo } from "./IHealthComponentInfo.js";
2
3
  /**
3
4
  * The status of the server.
4
5
  */
@@ -10,18 +11,5 @@ export interface IHealthInfo {
10
11
  /**
11
12
  * The status of the components.
12
13
  */
13
- components?: {
14
- /**
15
- * The name of the component.
16
- */
17
- name: string;
18
- /**
19
- * The status of the component.
20
- */
21
- status: HealthStatus;
22
- /**
23
- * The details for the status.
24
- */
25
- details?: string;
26
- }[];
14
+ components?: IHealthComponentInfo[];
27
15
  }
@@ -26,6 +26,11 @@ export interface IInformationComponent extends IComponent {
26
26
  * @returns The OpenAPI spec.
27
27
  */
28
28
  spec(): Promise<unknown>;
29
+ /**
30
+ * Is the server live.
31
+ * @returns True if the server is live.
32
+ */
33
+ livez(): Promise<boolean>;
29
34
  /**
30
35
  * Get the server health.
31
36
  * @returns The service health.
@@ -36,13 +41,15 @@ export interface IInformationComponent extends IComponent {
36
41
  * @param name The component name.
37
42
  * @param status The status of the component.
38
43
  * @param details The details for the status.
44
+ * @param tenantId The tenant id, optional if the health status is not tenant specific.
39
45
  * @returns Nothing.
40
46
  */
41
- setComponentHealth(name: string, status: HealthStatus, details?: string): Promise<void>;
47
+ setComponentHealth(name: string, status: HealthStatus, details?: string, tenantId?: string): Promise<void>;
42
48
  /**
43
49
  * Remove the status of a component.
44
50
  * @param name The component name.
51
+ * @param tenantId The tenant id, optional if the health status is not tenant specific.
45
52
  * @returns Nothing.
46
53
  */
47
- removeComponentHealth(name: string): Promise<void>;
54
+ removeComponentHealth(name: string, tenantId?: string): Promise<void>;
48
55
  }
package/docs/changelog.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # @twin.org/api-models - Changelog
2
2
 
3
+ ## [0.0.3-next.9](https://github.com/twinfoundation/api/compare/api-models-v0.0.3-next.8...api-models-v0.0.3-next.9) (2026-01-05)
4
+
5
+
6
+ ### Features
7
+
8
+ * add authentication generators and process features option ([a67edf1](https://github.com/twinfoundation/api/commit/a67edf1df212bd8ab94a40cddf5338551155696f))
9
+ * add context id features ([#42](https://github.com/twinfoundation/api/issues/42)) ([0186055](https://github.com/twinfoundation/api/commit/0186055c48afde842a4254b4df9ac9249c40fe40))
10
+ * add livez endpoint ([#57](https://github.com/twinfoundation/api/issues/57)) ([ef007db](https://github.com/twinfoundation/api/commit/ef007db8201736dd3053211f849ffd03baaa485e))
11
+ * add logging component type to request contexts ([210de1b](https://github.com/twinfoundation/api/commit/210de1b9e1c91079b59a2b90ddd57569668d647d))
12
+ * add root, favicon routes ([71da1c3](https://github.com/twinfoundation/api/commit/71da1c3a93c349588aff7084d1d8d6a29a277da8))
13
+ * add socket id, connect and disconnect ([20b0d0e](https://github.com/twinfoundation/api/commit/20b0d0ec279cab46141fee09de2c4a7087cdce16))
14
+ * add validate-locales ([cdba610](https://github.com/twinfoundation/api/commit/cdba610a0acb5022d2e3ce729732e6646a297e5e))
15
+ * decodeURIComponent for query and path params ([ead68a2](https://github.com/twinfoundation/api/commit/ead68a257425c10dd912497f7edd473c469ca132))
16
+ * eslint migration to flat config ([0dd5820](https://github.com/twinfoundation/api/commit/0dd5820e3af97350fd08b8d226f4a6c1a9246805))
17
+ * update dependencies ([1171dc4](https://github.com/twinfoundation/api/commit/1171dc416a9481737f6a640e3cf30145768f37e9))
18
+ * update framework core ([d8eebf2](https://github.com/twinfoundation/api/commit/d8eebf267fa2a0abaa84e58590496e9d20490cfa))
19
+ * update IComponent signatures ([915ce37](https://github.com/twinfoundation/api/commit/915ce37712326ab4aa6869c350eabaa4622e8430))
20
+ * use new includeStackTrace flag for toJsonObject ([6452b15](https://github.com/twinfoundation/api/commit/6452b153af786eee14b21152420f8a2578b70593))
21
+ * use shared store mechanism ([#19](https://github.com/twinfoundation/api/issues/19)) ([32116df](https://github.com/twinfoundation/api/commit/32116df3b4380a30137f5056f242a5c99afa2df9))
22
+ * validationError mapped to http status badrequest ([adc5eb1](https://github.com/twinfoundation/api/commit/adc5eb11d987abb0ab9f7e0dc8e1fdae207e436e))
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * error handling make sure primary error takes precedence ([84b61f2](https://github.com/twinfoundation/api/commit/84b61f27fe5e4919c0c9f9a1edc8ff46dc45c1f7))
28
+
3
29
  ## [0.0.3-next.8](https://github.com/twinfoundation/api/compare/api-models-v0.0.3-next.7...api-models-v0.0.3-next.8) (2025-12-17)
4
30
 
5
31
 
@@ -10,6 +10,7 @@
10
10
  - [IServerFavIconResponse](interfaces/IServerFavIconResponse.md)
11
11
  - [IServerHealthResponse](interfaces/IServerHealthResponse.md)
12
12
  - [IServerInfoResponse](interfaces/IServerInfoResponse.md)
13
+ - [IServerLivezResponse](interfaces/IServerLivezResponse.md)
13
14
  - [IServerRootResponse](interfaces/IServerRootResponse.md)
14
15
  - [IServerSpecResponse](interfaces/IServerSpecResponse.md)
15
16
  - [IAuthenticationGenerator](interfaces/IAuthenticationGenerator.md)
@@ -51,6 +52,7 @@
51
52
  - [ISocketRouteProcessor](interfaces/ISocketRouteProcessor.md)
52
53
  - [IWebServer](interfaces/IWebServer.md)
53
54
  - [IWebServerOptions](interfaces/IWebServerOptions.md)
55
+ - [IHealthComponentInfo](interfaces/IHealthComponentInfo.md)
54
56
  - [IHealthInfo](interfaces/IHealthInfo.md)
55
57
  - [IInformationComponent](interfaces/IInformationComponent.md)
56
58
  - [IServerInfo](interfaces/IServerInfo.md)
@@ -29,7 +29,15 @@ The path to use for routing.
29
29
 
30
30
  > `optional` **skipAuth**: `boolean`
31
31
 
32
- Skips the authentication for this route.
32
+ Skips the authentication requirement for this route.
33
+
34
+ ***
35
+
36
+ ### skipTenant?
37
+
38
+ > `optional` **skipTenant**: `boolean`
39
+
40
+ Skips the tenant requirement for this route.
33
41
 
34
42
  ***
35
43
 
@@ -0,0 +1,27 @@
1
+ # Interface: IHealthComponentInfo
2
+
3
+ The health component information.
4
+
5
+ ## Properties
6
+
7
+ ### name
8
+
9
+ > **name**: `string`
10
+
11
+ The name of the component.
12
+
13
+ ***
14
+
15
+ ### status
16
+
17
+ > **status**: [`HealthStatus`](../type-aliases/HealthStatus.md)
18
+
19
+ The status of the component.
20
+
21
+ ***
22
+
23
+ ### details?
24
+
25
+ > `optional` **details**: `string`
26
+
27
+ The details for the status.
@@ -14,24 +14,6 @@ The status.
14
14
 
15
15
  ### components?
16
16
 
17
- > `optional` **components**: `object`[]
17
+ > `optional` **components**: [`IHealthComponentInfo`](IHealthComponentInfo.md)[]
18
18
 
19
19
  The status of the components.
20
-
21
- #### name
22
-
23
- > **name**: `string`
24
-
25
- The name of the component.
26
-
27
- #### status
28
-
29
- > **status**: [`HealthStatus`](../type-aliases/HealthStatus.md)
30
-
31
- The status of the component.
32
-
33
- #### details?
34
-
35
- > `optional` **details**: `string`
36
-
37
- The details for the status.
@@ -64,6 +64,20 @@ The OpenAPI spec.
64
64
 
65
65
  ***
66
66
 
67
+ ### livez()
68
+
69
+ > **livez**(): `Promise`\<`boolean`\>
70
+
71
+ Is the server live.
72
+
73
+ #### Returns
74
+
75
+ `Promise`\<`boolean`\>
76
+
77
+ True if the server is live.
78
+
79
+ ***
80
+
67
81
  ### health()
68
82
 
69
83
  > **health**(): `Promise`\<[`IHealthInfo`](IHealthInfo.md)\>
@@ -80,7 +94,7 @@ The service health.
80
94
 
81
95
  ### setComponentHealth()
82
96
 
83
- > **setComponentHealth**(`name`, `status`, `details?`): `Promise`\<`void`\>
97
+ > **setComponentHealth**(`name`, `status`, `details?`, `tenantId?`): `Promise`\<`void`\>
84
98
 
85
99
  Set the status of a component.
86
100
 
@@ -104,6 +118,12 @@ The status of the component.
104
118
 
105
119
  The details for the status.
106
120
 
121
+ ##### tenantId?
122
+
123
+ `string`
124
+
125
+ The tenant id, optional if the health status is not tenant specific.
126
+
107
127
  #### Returns
108
128
 
109
129
  `Promise`\<`void`\>
@@ -114,7 +134,7 @@ Nothing.
114
134
 
115
135
  ### removeComponentHealth()
116
136
 
117
- > **removeComponentHealth**(`name`): `Promise`\<`void`\>
137
+ > **removeComponentHealth**(`name`, `tenantId?`): `Promise`\<`void`\>
118
138
 
119
139
  Remove the status of a component.
120
140
 
@@ -126,6 +146,12 @@ Remove the status of a component.
126
146
 
127
147
  The component name.
128
148
 
149
+ ##### tenantId?
150
+
151
+ `string`
152
+
153
+ The tenant id, optional if the health status is not tenant specific.
154
+
129
155
  #### Returns
130
156
 
131
157
  `Promise`\<`void`\>
@@ -46,7 +46,7 @@ The path to use for routing.
46
46
 
47
47
  > `optional` **skipAuth**: `boolean`
48
48
 
49
- Skips the authentication for this route.
49
+ Skips the authentication requirement for this route.
50
50
 
51
51
  #### Inherited from
52
52
 
@@ -54,6 +54,18 @@ Skips the authentication for this route.
54
54
 
55
55
  ***
56
56
 
57
+ ### skipTenant?
58
+
59
+ > `optional` **skipTenant**: `boolean`
60
+
61
+ Skips the tenant requirement for this route.
62
+
63
+ #### Inherited from
64
+
65
+ [`IBaseRoute`](IBaseRoute.md).[`skipTenant`](IBaseRoute.md#skiptenant)
66
+
67
+ ***
68
+
57
69
  ### processorFeatures?
58
70
 
59
71
  > `optional` **processorFeatures**: `string`[]
@@ -0,0 +1,23 @@
1
+ # Interface: IServerLivezResponse
2
+
3
+ The livez of the server.
4
+
5
+ ## Properties
6
+
7
+ ### headers
8
+
9
+ > **headers**: `object`
10
+
11
+ The headers for the response.
12
+
13
+ #### content-type
14
+
15
+ > **content-type**: `"text/plain"`
16
+
17
+ ***
18
+
19
+ ### body
20
+
21
+ > **body**: `"ok"` \| `"failed"`
22
+
23
+ The livez information for the server.
@@ -4,6 +4,18 @@ The root text for the server.
4
4
 
5
5
  ## Properties
6
6
 
7
+ ### headers
8
+
9
+ > **headers**: `object`
10
+
11
+ The headers for the response.
12
+
13
+ #### content-type
14
+
15
+ > **content-type**: `"text/plain"`
16
+
17
+ ***
18
+
7
19
  ### body
8
20
 
9
21
  > **body**: `string`
@@ -46,7 +46,7 @@ The path to use for routing.
46
46
 
47
47
  > `optional` **skipAuth**: `boolean`
48
48
 
49
- Skips the authentication for this route.
49
+ Skips the authentication requirement for this route.
50
50
 
51
51
  #### Inherited from
52
52
 
@@ -54,6 +54,18 @@ Skips the authentication for this route.
54
54
 
55
55
  ***
56
56
 
57
+ ### skipTenant?
58
+
59
+ > `optional` **skipTenant**: `boolean`
60
+
61
+ Skips the tenant requirement for this route.
62
+
63
+ #### Inherited from
64
+
65
+ [`IBaseRoute`](IBaseRoute.md).[`skipTenant`](IBaseRoute.md#skiptenant)
66
+
67
+ ***
68
+
57
69
  ### processorFeatures?
58
70
 
59
71
  > `optional` **processorFeatures**: `string`[]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/api-models",
3
- "version": "0.0.3-next.8",
3
+ "version": "0.0.3-next.9",
4
4
  "description": "Contains models and classes for use with APIs",
5
5
  "repository": {
6
6
  "type": "git",