@twin.org/api-models 0.0.1-next.8 → 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/cjs/index.cjs +42 -70
  2. package/dist/esm/index.mjs +42 -73
  3. package/dist/types/factories/mimeTypeProcessorFactory.d.ts +6 -0
  4. package/dist/types/factories/restRouteProcessorFactory.d.ts +6 -0
  5. package/dist/types/factories/socketRouteProcessorFactory.d.ts +6 -0
  6. package/dist/types/helpers/httpParameterHelper.d.ts +8 -27
  7. package/dist/types/index.d.ts +9 -1
  8. package/dist/types/models/config/IBaseSocketClientConfig.d.ts +4 -0
  9. package/dist/types/models/routes/IBaseRouteEntryPoint.d.ts +22 -0
  10. package/dist/types/models/routes/IRestRouteEntryPoint.d.ts +2 -19
  11. package/dist/types/models/routes/ISocketRoute.d.ts +6 -8
  12. package/dist/types/models/routes/ISocketRouteEntryPoint.d.ts +6 -0
  13. package/dist/types/models/server/IBaseRouteProcessor.d.ts +34 -0
  14. package/dist/types/models/server/IMimeTypeProcessor.d.ts +17 -0
  15. package/dist/types/models/server/IRestRouteProcessor.d.ts +22 -0
  16. package/dist/types/models/server/{IHttpRestRouteProcessor.d.ts → ISocketRouteProcessor.d.ts} +12 -15
  17. package/dist/types/models/server/IWebServer.d.ts +7 -3
  18. package/docs/changelog.md +43 -1
  19. package/docs/reference/classes/HttpErrorHelper.md +19 -9
  20. package/docs/reference/classes/HttpParameterHelper.md +39 -63
  21. package/docs/reference/index.md +10 -2
  22. package/docs/reference/interfaces/IBaseRouteEntryPoint.md +55 -0
  23. package/docs/reference/interfaces/IBaseRouteProcessor.md +106 -0
  24. package/docs/reference/interfaces/IBaseSocketClientConfig.md +8 -0
  25. package/docs/reference/interfaces/IHealthInfo.md +18 -0
  26. package/docs/reference/interfaces/IHttpRequest.md +3 -1
  27. package/docs/reference/interfaces/IHttpRequestContext.md +2 -2
  28. package/docs/reference/interfaces/IHttpRequestPathParams.md +1 -1
  29. package/docs/reference/interfaces/IHttpRequestQuery.md +1 -1
  30. package/docs/reference/interfaces/IHttpResponse.md +3 -1
  31. package/docs/reference/interfaces/IHttpServerRequest.md +3 -1
  32. package/docs/reference/interfaces/IInformationComponent.md +13 -5
  33. package/docs/reference/interfaces/IMimeTypeProcessor.md +43 -0
  34. package/docs/reference/interfaces/IRestRoute.md +30 -4
  35. package/docs/reference/interfaces/{IHttpRestRouteProcessor.md → IRestRouteProcessor.md} +55 -23
  36. package/docs/reference/interfaces/IRestRouteRequestExample.md +3 -1
  37. package/docs/reference/interfaces/IRestRouteResponseExample.md +3 -1
  38. package/docs/reference/interfaces/ISocketRoute.md +22 -10
  39. package/docs/reference/interfaces/ISocketRouteProcessor.md +217 -0
  40. package/docs/reference/interfaces/IWebServer.md +26 -6
  41. package/docs/reference/type-aliases/HealthStatus.md +1 -1
  42. package/docs/reference/type-aliases/IRestRouteEntryPoint.md +5 -0
  43. package/docs/reference/type-aliases/ISocketRouteEntryPoint.md +5 -0
  44. package/docs/reference/variables/MimeTypeProcessorFactory.md +5 -0
  45. package/docs/reference/variables/RestRouteProcessorFactory.md +5 -0
  46. package/docs/reference/variables/SocketRouteProcessorFactory.md +5 -0
  47. package/package.json +6 -7
  48. package/docs/reference/interfaces/IRestRouteEntryPoint.md +0 -45
@@ -1,6 +1,8 @@
1
- import type { IHttpRestRouteProcessor } from "./IHttpRestRouteProcessor";
1
+ import type { IRestRouteProcessor } from "./IRestRouteProcessor";
2
+ import type { ISocketRouteProcessor } from "./ISocketRouteProcessor";
2
3
  import type { IWebServerOptions } from "./IWebServerOptions";
3
4
  import type { IRestRoute } from "../routes/IRestRoute";
5
+ import type { ISocketRoute } from "../routes/ISocketRoute";
4
6
  /**
5
7
  * Interface describing a web server.
6
8
  */
@@ -12,12 +14,14 @@ export interface IWebServer<T> {
12
14
  getInstance(): T;
13
15
  /**
14
16
  * Build the server.
15
- * @param restRouteProcessors The hooks to process the incoming requests.
17
+ * @param restRouteProcessors The processors for incoming requests over REST.
16
18
  * @param restRoutes The REST routes.
19
+ * @param socketRouteProcessors The processors for incoming requests over Sockets.
20
+ * @param socketRoutes The socket routes.
17
21
  * @param options Options for building the server.
18
22
  * @returns Nothing.
19
23
  */
20
- build(restRouteProcessors: IHttpRestRouteProcessor[], restRoutes: IRestRoute[], options?: IWebServerOptions): Promise<void>;
24
+ build(restRouteProcessors?: IRestRouteProcessor[], restRoutes?: IRestRoute[], socketRouteProcessors?: ISocketRouteProcessor[], socketRoutes?: ISocketRoute[], options?: IWebServerOptions): Promise<void>;
21
25
  /**
22
26
  * Start the server.
23
27
  * @returns Nothing.
package/docs/changelog.md CHANGED
@@ -1,5 +1,47 @@
1
1
  # @twin.org/api-models - Changelog
2
2
 
3
- ## v0.0.1-next.8
3
+ ## 0.0.1 (2025-07-03)
4
+
5
+
6
+ ### Features
7
+
8
+ * release to production ([70ee2d5](https://github.com/twinfoundation/api/commit/70ee2d56a1dc9537d7c9c154d4cb78a235678a3a))
9
+
10
+ ## [0.0.1-next.36](https://github.com/twinfoundation/api/compare/api-models-v0.0.1-next.35...api-models-v0.0.1-next.36) (2025-06-17)
11
+
12
+
13
+ ### Features
14
+
15
+ * use new includeStackTrace flag for toJsonObject ([6452b15](https://github.com/twinfoundation/api/commit/6452b153af786eee14b21152420f8a2578b70593))
16
+
17
+ ## [0.0.1-next.35](https://github.com/twinfoundation/api/compare/api-models-v0.0.1-next.34...api-models-v0.0.1-next.35) (2025-06-11)
18
+
19
+
20
+ ### Features
21
+
22
+ * update dependencies ([1171dc4](https://github.com/twinfoundation/api/commit/1171dc416a9481737f6a640e3cf30145768f37e9))
23
+
24
+ ## [0.0.1-next.34](https://github.com/twinfoundation/api/compare/api-models-v0.0.1-next.33...api-models-v0.0.1-next.34) (2025-05-27)
25
+
26
+
27
+ ### Features
28
+
29
+ * validationError mapped to http status badrequest ([adc5eb1](https://github.com/twinfoundation/api/commit/adc5eb11d987abb0ab9f7e0dc8e1fdae207e436e))
30
+
31
+ ## [0.0.1-next.33](https://github.com/twinfoundation/api/compare/api-models-v0.0.1-next.32...api-models-v0.0.1-next.33) (2025-04-17)
32
+
33
+
34
+ ### Features
35
+
36
+ * use shared store mechanism ([#19](https://github.com/twinfoundation/api/issues/19)) ([32116df](https://github.com/twinfoundation/api/commit/32116df3b4380a30137f5056f242a5c99afa2df9))
37
+
38
+ ## [0.0.1-next.32](https://github.com/twinfoundation/api/compare/api-models-v0.0.1-next.31...api-models-v0.0.1-next.32) (2025-03-28)
39
+
40
+
41
+ ### Miscellaneous Chores
42
+
43
+ * **api-models:** Synchronize repo versions
44
+
45
+ ## v0.0.1-next.31
4
46
 
5
47
  - Initial Release
@@ -4,29 +4,33 @@ Class to help with processing http errors.
4
4
 
5
5
  ## Constructors
6
6
 
7
- ### new HttpErrorHelper()
7
+ ### Constructor
8
8
 
9
- > **new HttpErrorHelper**(): [`HttpErrorHelper`](HttpErrorHelper.md)
9
+ > **new HttpErrorHelper**(): `HttpErrorHelper`
10
10
 
11
11
  #### Returns
12
12
 
13
- [`HttpErrorHelper`](HttpErrorHelper.md)
13
+ `HttpErrorHelper`
14
14
 
15
15
  ## Methods
16
16
 
17
17
  ### processError()
18
18
 
19
- > `static` **processError**(`err`, `includeStack`?): `object`
19
+ > `static` **processError**(`err`, `includeStack?`): `object`
20
20
 
21
21
  Process the errors from the routes.
22
22
 
23
23
  #### Parameters
24
24
 
25
- **err**: `unknown`
25
+ ##### err
26
+
27
+ `unknown`
26
28
 
27
29
  The error to process.
28
30
 
29
- **includeStack?**: `boolean`
31
+ ##### includeStack?
32
+
33
+ `boolean`
30
34
 
31
35
  Should the stack be included in the error.
32
36
 
@@ -54,15 +58,21 @@ Build an error response.
54
58
 
55
59
  #### Parameters
56
60
 
57
- **response**: [`IHttpResponse`](../interfaces/IHttpResponse.md)\<`any`\>
61
+ ##### response
62
+
63
+ [`IHttpResponse`](../interfaces/IHttpResponse.md)
58
64
 
59
65
  The response to build the error into.
60
66
 
61
- **error**: `IError`
67
+ ##### error
68
+
69
+ `IError`
62
70
 
63
71
  The error to build the response for.
64
72
 
65
- **statusCode**: `HttpStatusCode`
73
+ ##### statusCode
74
+
75
+ `HttpStatusCode`
66
76
 
67
77
  The status code to use for the error.
68
78
 
@@ -4,29 +4,33 @@ Class to help with handling http parameters.
4
4
 
5
5
  ## Constructors
6
6
 
7
- ### new HttpParameterHelper()
7
+ ### Constructor
8
8
 
9
- > **new HttpParameterHelper**(): [`HttpParameterHelper`](HttpParameterHelper.md)
9
+ > **new HttpParameterHelper**(): `HttpParameterHelper`
10
10
 
11
11
  #### Returns
12
12
 
13
- [`HttpParameterHelper`](HttpParameterHelper.md)
13
+ `HttpParameterHelper`
14
14
 
15
15
  ## Methods
16
16
 
17
17
  ### arrayFromString()
18
18
 
19
- > `static` **arrayFromString**\<`T`\>(`values`?): `undefined` \| `T`[]
19
+ > `static` **arrayFromString**\<`T`\>(`values?`): `undefined` \| `T`[]
20
20
 
21
21
  Convert list query to array.
22
22
 
23
23
  #### Type Parameters
24
24
 
25
- **T** = `string`
25
+ ##### T
26
+
27
+ `T` = `string`
26
28
 
27
29
  #### Parameters
28
30
 
29
- **values?**: `string`
31
+ ##### values?
32
+
33
+ `string`
30
34
 
31
35
  The values query string.
32
36
 
@@ -40,17 +44,21 @@ The array of values.
40
44
 
41
45
  ### arrayToString()
42
46
 
43
- > `static` **arrayToString**\<`T`\>(`values`?): `undefined` \| `string`
47
+ > `static` **arrayToString**\<`T`\>(`values?`): `undefined` \| `string`
44
48
 
45
49
  Convert array of values to query string.
46
50
 
47
51
  #### Type Parameters
48
52
 
49
- **T** = `string`
53
+ ##### T
54
+
55
+ `T` = `string`
50
56
 
51
57
  #### Parameters
52
58
 
53
- **values?**: `T`[]
59
+ ##### values?
60
+
61
+ `T`[]
54
62
 
55
63
  The values to combine string.
56
64
 
@@ -62,88 +70,56 @@ The combined.
62
70
 
63
71
  ***
64
72
 
65
- ### conditionsFromString()
73
+ ### objectFromString()
66
74
 
67
- > `static` **conditionsFromString**(`conditions`?): `undefined` \| `IComparator`[]
75
+ > `static` **objectFromString**\<`T`\>(`value?`): `undefined` \| `T`
68
76
 
69
- Convert the conditions string to a list of comparators.
77
+ Convert object string to object.
70
78
 
71
- #### Parameters
72
-
73
- • **conditions?**: `string`
74
-
75
- The conditions query string.
76
-
77
- #### Returns
78
-
79
- `undefined` \| `IComparator`[]
80
-
81
- The list of comparators.
82
-
83
- ***
84
-
85
- ### conditionsToString()
79
+ #### Type Parameters
86
80
 
87
- > `static` **conditionsToString**(`conditions`?): `undefined` \| `string`
81
+ ##### T
88
82
 
89
- Convert the conditions to a string parameter.
83
+ `T` = `unknown`
90
84
 
91
85
  #### Parameters
92
86
 
93
- **conditions?**: `IComparator`[]
87
+ ##### value?
94
88
 
95
- The conditions to convert.
89
+ `string`
96
90
 
97
- #### Returns
98
-
99
- `undefined` \| `string`
100
-
101
- The string version of the comparators.
102
-
103
- ***
104
-
105
- ### sortPropertiesFromString()
106
-
107
- > `static` **sortPropertiesFromString**\<`T`\>(`sortProperties`?): `undefined` \| `object`[]
108
-
109
- Convert the sort string to a list of sort properties.
110
-
111
- #### Type Parameters
112
-
113
- • **T** = `unknown`
114
-
115
- #### Parameters
116
-
117
- • **sortProperties?**: `string`
118
-
119
- The sort properties query string.
91
+ The value query string.
120
92
 
121
93
  #### Returns
122
94
 
123
- `undefined` \| `object`[]
95
+ `undefined` \| `T`
124
96
 
125
- The list of sort properties.
97
+ The object.
126
98
 
127
99
  ***
128
100
 
129
- ### sortPropertiesToString()
101
+ ### objectToString()
130
102
 
131
- > `static` **sortPropertiesToString**\<`T`\>(`sortProperties`?): `undefined` \| `string`
103
+ > `static` **objectToString**\<`T`\>(`value?`): `undefined` \| `string`
132
104
 
133
- Convert the sort properties to a string parameter.
105
+ Convert object to query string.
134
106
 
135
107
  #### Type Parameters
136
108
 
137
- **T** = `unknown`
109
+ ##### T
110
+
111
+ `T` = `unknown`
138
112
 
139
113
  #### Parameters
140
114
 
141
- **sortProperties?**: `object`[]
115
+ ##### value?
116
+
117
+ `T`
142
118
 
143
- The sort properties to convert.
119
+ The value to convert to a string.
144
120
 
145
121
  #### Returns
146
122
 
147
123
  `undefined` \| `string`
148
124
 
149
- The string version of the sort properties.
125
+ The converted object.
@@ -32,8 +32,8 @@
32
32
  - [INoContentResponse](interfaces/INoContentResponse.md)
33
33
  - [IOkResponse](interfaces/IOkResponse.md)
34
34
  - [IBaseRoute](interfaces/IBaseRoute.md)
35
+ - [IBaseRouteEntryPoint](interfaces/IBaseRouteEntryPoint.md)
35
36
  - [IRestRoute](interfaces/IRestRoute.md)
36
- - [IRestRouteEntryPoint](interfaces/IRestRouteEntryPoint.md)
37
37
  - [IRestRouteExample](interfaces/IRestRouteExample.md)
38
38
  - [IRestRouteRequestExample](interfaces/IRestRouteRequestExample.md)
39
39
  - [IRestRouteResponseAttachmentOptions](interfaces/IRestRouteResponseAttachmentOptions.md)
@@ -41,7 +41,10 @@
41
41
  - [IRestRouteResponseOptions](interfaces/IRestRouteResponseOptions.md)
42
42
  - [ISocketRoute](interfaces/ISocketRoute.md)
43
43
  - [ITag](interfaces/ITag.md)
44
- - [IHttpRestRouteProcessor](interfaces/IHttpRestRouteProcessor.md)
44
+ - [IBaseRouteProcessor](interfaces/IBaseRouteProcessor.md)
45
+ - [IMimeTypeProcessor](interfaces/IMimeTypeProcessor.md)
46
+ - [IRestRouteProcessor](interfaces/IRestRouteProcessor.md)
47
+ - [ISocketRouteProcessor](interfaces/ISocketRouteProcessor.md)
45
48
  - [IWebServer](interfaces/IWebServer.md)
46
49
  - [IWebServerOptions](interfaces/IWebServerOptions.md)
47
50
  - [IHealthInfo](interfaces/IHealthInfo.md)
@@ -50,8 +53,13 @@
50
53
 
51
54
  ## Type Aliases
52
55
 
56
+ - [IRestRouteEntryPoint](type-aliases/IRestRouteEntryPoint.md)
57
+ - [ISocketRouteEntryPoint](type-aliases/ISocketRouteEntryPoint.md)
53
58
  - [HealthStatus](type-aliases/HealthStatus.md)
54
59
 
55
60
  ## Variables
56
61
 
62
+ - [MimeTypeProcessorFactory](variables/MimeTypeProcessorFactory.md)
63
+ - [RestRouteProcessorFactory](variables/RestRouteProcessorFactory.md)
64
+ - [SocketRouteProcessorFactory](variables/SocketRouteProcessorFactory.md)
57
65
  - [HealthStatus](variables/HealthStatus.md)
@@ -0,0 +1,55 @@
1
+ # Interface: IBaseRouteEntryPoint\<T\>
2
+
3
+ Route entry points are used for exposing the routes from a package.
4
+
5
+ ## Type Parameters
6
+
7
+ ### T
8
+
9
+ `T`
10
+
11
+ ## Properties
12
+
13
+ ### name
14
+
15
+ > **name**: `string`
16
+
17
+ The name of the routes.
18
+
19
+ ***
20
+
21
+ ### defaultBaseRoute
22
+
23
+ > **defaultBaseRoute**: `string`
24
+
25
+ The default base route name for the routes.
26
+
27
+ ***
28
+
29
+ ### tags
30
+
31
+ > **tags**: [`ITag`](ITag.md)[]
32
+
33
+ The tags for the routes.
34
+
35
+ ***
36
+
37
+ ### generateRoutes()
38
+
39
+ > **generateRoutes**: (`baseRouteName`, `componentName`) => `T`[]
40
+
41
+ The method to generate the routes.
42
+
43
+ #### Parameters
44
+
45
+ ##### baseRouteName
46
+
47
+ `string`
48
+
49
+ ##### componentName
50
+
51
+ `string`
52
+
53
+ #### Returns
54
+
55
+ `T`[]
@@ -0,0 +1,106 @@
1
+ # Interface: IBaseRouteProcessor\<T\>
2
+
3
+ The definition for a base processor for handling REST routes.
4
+
5
+ ## Extends
6
+
7
+ - `IComponent`
8
+
9
+ ## Extended by
10
+
11
+ - [`IRestRouteProcessor`](IRestRouteProcessor.md)
12
+ - [`ISocketRouteProcessor`](ISocketRouteProcessor.md)
13
+
14
+ ## Type Parameters
15
+
16
+ ### T
17
+
18
+ `T` = [`IBaseRoute`](IBaseRoute.md)
19
+
20
+ ## Methods
21
+
22
+ ### pre()?
23
+
24
+ > `optional` **pre**(`request`, `response`, `route`, `requestIdentity`, `processorState`): `Promise`\<`void`\>
25
+
26
+ Pre process the REST request for the specified route.
27
+
28
+ #### Parameters
29
+
30
+ ##### request
31
+
32
+ [`IHttpServerRequest`](IHttpServerRequest.md)
33
+
34
+ The request to handle.
35
+
36
+ ##### response
37
+
38
+ [`IHttpResponse`](IHttpResponse.md)
39
+
40
+ The response data to send if any.
41
+
42
+ ##### route
43
+
44
+ The route being requested, if a matching one was found.
45
+
46
+ `undefined` | `T`
47
+
48
+ ##### requestIdentity
49
+
50
+ [`IHttpRequestIdentity`](IHttpRequestIdentity.md)
51
+
52
+ The identity context for the request.
53
+
54
+ ##### processorState
55
+
56
+ The state handed through the processors.
57
+
58
+ #### Returns
59
+
60
+ `Promise`\<`void`\>
61
+
62
+ Promise that resolves when the request is processed.
63
+
64
+ ***
65
+
66
+ ### post()?
67
+
68
+ > `optional` **post**(`request`, `response`, `route`, `requestIdentity`, `processorState`): `Promise`\<`void`\>
69
+
70
+ Post process the REST request for the specified route.
71
+
72
+ #### Parameters
73
+
74
+ ##### request
75
+
76
+ [`IHttpServerRequest`](IHttpServerRequest.md)
77
+
78
+ The request to handle.
79
+
80
+ ##### response
81
+
82
+ [`IHttpResponse`](IHttpResponse.md)
83
+
84
+ The response data to send if any.
85
+
86
+ ##### route
87
+
88
+ The route being requested, if a matching one was found.
89
+
90
+ `undefined` | `T`
91
+
92
+ ##### requestIdentity
93
+
94
+ [`IHttpRequestIdentity`](IHttpRequestIdentity.md)
95
+
96
+ The identity context for the request.
97
+
98
+ ##### processorState
99
+
100
+ The state handed through the processors.
101
+
102
+ #### Returns
103
+
104
+ `Promise`\<`void`\>
105
+
106
+ Promise that resolves when the request is processed.
@@ -4,6 +4,14 @@ Definition for the configuration of a socket service.
4
4
 
5
5
  ## Properties
6
6
 
7
+ ### basePath?
8
+
9
+ > `optional` **basePath**: `string`
10
+
11
+ Base path for the socket service, defaults to /socket.
12
+
13
+ ***
14
+
7
15
  ### endpoint
8
16
 
9
17
  > **endpoint**: `string`
@@ -17,3 +17,21 @@ The status.
17
17
  > `optional` **components**: `object`[]
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.
@@ -9,7 +9,9 @@ Model for the standard parameters for an http request.
9
9
 
10
10
  ## Type Parameters
11
11
 
12
- **T** = `any`
12
+ ### T
13
+
14
+ `T` = `any`
13
15
 
14
16
  ## Properties
15
17
 
@@ -10,7 +10,7 @@ Context data from the HTTP request.
10
10
 
11
11
  ### serverRequest
12
12
 
13
- > **serverRequest**: [`IHttpServerRequest`](IHttpServerRequest.md)\<`any`\>
13
+ > **serverRequest**: [`IHttpServerRequest`](IHttpServerRequest.md)
14
14
 
15
15
  The raw HTTP request.
16
16
 
@@ -24,7 +24,7 @@ The state handed through the processors.
24
24
 
25
25
  #### Index Signature
26
26
 
27
- \[`id`: `string`\]: `unknown`
27
+ \[`id`: `string`\]: `unknown`
28
28
 
29
29
  ***
30
30
 
@@ -4,4 +4,4 @@ Model for the standard parameters for an http request.
4
4
 
5
5
  ## Indexable
6
6
 
7
- \[`id`: `string`\]: `string` \| `number` \| `boolean`
7
+ \[`id`: `string`\]: `string` \| `number` \| `boolean`
@@ -4,4 +4,4 @@ Model used for Http request query parameters.
4
4
 
5
5
  ## Indexable
6
6
 
7
- \[`id`: `string`\]: `string` \| `number` \| `boolean`
7
+ \[`id`: `string`\]: `string` \| `number` \| `boolean`
@@ -4,7 +4,9 @@ Model for the standard parameters for an http response.
4
4
 
5
5
  ## Type Parameters
6
6
 
7
- **T** = `any`
7
+ ### T
8
+
9
+ `T` = `any`
8
10
 
9
11
  ## Properties
10
12
 
@@ -8,7 +8,9 @@ Model for the standard parameters for an http request.
8
8
 
9
9
  ## Type Parameters
10
10
 
11
- **T** = `any`
11
+ ### T
12
+
13
+ `T` = `any`
12
14
 
13
15
  ## Properties
14
16
 
@@ -52,21 +52,27 @@ The service health.
52
52
 
53
53
  ### setComponentHealth()
54
54
 
55
- > **setComponentHealth**(`name`, `status`, `details`?): `Promise`\<`void`\>
55
+ > **setComponentHealth**(`name`, `status`, `details?`): `Promise`\<`void`\>
56
56
 
57
57
  Set the status of a component.
58
58
 
59
59
  #### Parameters
60
60
 
61
- **name**: `string`
61
+ ##### name
62
+
63
+ `string`
62
64
 
63
65
  The component name.
64
66
 
65
- **status**: [`HealthStatus`](../type-aliases/HealthStatus.md)
67
+ ##### status
68
+
69
+ [`HealthStatus`](../type-aliases/HealthStatus.md)
66
70
 
67
71
  The status of the component.
68
72
 
69
- **details?**: `string`
73
+ ##### details?
74
+
75
+ `string`
70
76
 
71
77
  The details for the status.
72
78
 
@@ -86,7 +92,9 @@ Remove the status of a component.
86
92
 
87
93
  #### Parameters
88
94
 
89
- **name**: `string`
95
+ ##### name
96
+
97
+ `string`
90
98
 
91
99
  The component name.
92
100