@twin.org/api-service 0.0.1-next.25 → 0.0.1-next.26

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.
@@ -248,7 +248,6 @@ class InformationService {
248
248
  /**
249
249
  * Create a new instance of InformationService.
250
250
  * @param options The options to create the service.
251
- * @param options.config The configuration for the service.
252
251
  */
253
252
  constructor(options) {
254
253
  core.Guards.object(this.CLASS_NAME, "options", options);
@@ -246,7 +246,6 @@ class InformationService {
246
246
  /**
247
247
  * Create a new instance of InformationService.
248
248
  * @param options The options to create the service.
249
- * @param options.config The configuration for the service.
250
249
  */
251
250
  constructor(options) {
252
251
  Guards.object(this.CLASS_NAME, "options", options);
@@ -1,4 +1,5 @@
1
1
  export * from "./informationRoutes";
2
2
  export * from "./informationService";
3
3
  export * from "./models/IInformationServiceConfig";
4
+ export * from "./models/IInformationServiceConstructorOptions";
4
5
  export * from "./restEntryPoints";
@@ -1,5 +1,5 @@
1
1
  import type { HealthStatus, IHealthInfo, IInformationComponent, IServerInfo } from "@twin.org/api-models";
2
- import type { IInformationServiceConfig } from "./models/IInformationServiceConfig";
2
+ import type { IInformationServiceConstructorOptions } from "./models/IInformationServiceConstructorOptions";
3
3
  /**
4
4
  * The information service for the server.
5
5
  */
@@ -15,11 +15,8 @@ export declare class InformationService implements IInformationComponent {
15
15
  /**
16
16
  * Create a new instance of InformationService.
17
17
  * @param options The options to create the service.
18
- * @param options.config The configuration for the service.
19
18
  */
20
- constructor(options: {
21
- config: IInformationServiceConfig;
22
- });
19
+ constructor(options: IInformationServiceConstructorOptions);
23
20
  /**
24
21
  * The service needs to be started when the application is initialized.
25
22
  * @returns Nothing.
@@ -0,0 +1,10 @@
1
+ import type { IInformationServiceConfig } from "./IInformationServiceConfig";
2
+ /**
3
+ * Options for the InformationService constructor.
4
+ */
5
+ export interface IInformationServiceConstructorOptions {
6
+ /**
7
+ * The configuration for the service.
8
+ */
9
+ config: IInformationServiceConfig;
10
+ }
package/docs/changelog.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # @twin.org/api-service - Changelog
2
2
 
3
- ## v0.0.1-next.25
3
+ ## v0.0.1-next.26
4
4
 
5
5
  - Initial Release
@@ -16,13 +16,11 @@ Create a new instance of InformationService.
16
16
 
17
17
  #### Parameters
18
18
 
19
- **options**
19
+ ##### options
20
20
 
21
- The options to create the service.
22
-
23
- • **options.config**: [`IInformationServiceConfig`](../interfaces/IInformationServiceConfig.md)
21
+ [`IInformationServiceConstructorOptions`](../interfaces/IInformationServiceConstructorOptions.md)
24
22
 
25
- The configuration for the service.
23
+ The options to create the service.
26
24
 
27
25
  #### Returns
28
26
 
@@ -130,15 +128,21 @@ Set the status of a component.
130
128
 
131
129
  #### Parameters
132
130
 
133
- **name**: `string`
131
+ ##### name
132
+
133
+ `string`
134
134
 
135
135
  The component name.
136
136
 
137
- **status**: `HealthStatus`
137
+ ##### status
138
+
139
+ `HealthStatus`
138
140
 
139
141
  The status of the component.
140
142
 
141
- **details?**: `string`
143
+ ##### details?
144
+
145
+ `string`
142
146
 
143
147
  The details for the status.
144
148
 
@@ -162,7 +166,9 @@ Remove the status of a component.
162
166
 
163
167
  #### Parameters
164
168
 
165
- **name**: `string`
169
+ ##### name
170
+
171
+ `string`
166
172
 
167
173
  The component name.
168
174
 
@@ -6,11 +6,15 @@ The REST routes for server information.
6
6
 
7
7
  ## Parameters
8
8
 
9
- **baseRouteName**: `string`
9
+ ### baseRouteName
10
+
11
+ `string`
10
12
 
11
13
  Prefix to prepend to the paths.
12
14
 
13
- **componentName**: `string`
15
+ ### componentName
16
+
17
+ `string`
14
18
 
15
19
  The name of the component to use in the routes stored in the ComponentFactory.
16
20
 
@@ -6,15 +6,21 @@ Get the health for the server.
6
6
 
7
7
  ## Parameters
8
8
 
9
- **httpRequestContext**: `IHttpRequestContext`
9
+ ### httpRequestContext
10
+
11
+ `IHttpRequestContext`
10
12
 
11
13
  The request context for the API.
12
14
 
13
- **componentName**: `string`
15
+ ### componentName
16
+
17
+ `string`
14
18
 
15
19
  The name of the component to use in the routes.
16
20
 
17
- **request**: `INoContentRequest`
21
+ ### request
22
+
23
+ `INoContentRequest`
18
24
 
19
25
  The request.
20
26
 
@@ -6,15 +6,21 @@ Get the information for the server.
6
6
 
7
7
  ## Parameters
8
8
 
9
- **httpRequestContext**: `IHttpRequestContext`
9
+ ### httpRequestContext
10
+
11
+ `IHttpRequestContext`
10
12
 
11
13
  The request context for the API.
12
14
 
13
- **componentName**: `string`
15
+ ### componentName
16
+
17
+ `string`
14
18
 
15
19
  The name of the component to use in the routes.
16
20
 
17
- **request**: `INoContentRequest`
21
+ ### request
22
+
23
+ `INoContentRequest`
18
24
 
19
25
  The request.
20
26
 
@@ -6,15 +6,21 @@ Get the spec for the server.
6
6
 
7
7
  ## Parameters
8
8
 
9
- **httpRequestContext**: `IHttpRequestContext`
9
+ ### httpRequestContext
10
+
11
+ `IHttpRequestContext`
10
12
 
11
13
  The request context for the API.
12
14
 
13
- **componentName**: `string`
15
+ ### componentName
16
+
17
+ `string`
14
18
 
15
19
  The name of the component to use in the routes.
16
20
 
17
- **request**: `INoContentRequest`
21
+ ### request
22
+
23
+ `INoContentRequest`
18
24
 
19
25
  The request.
20
26
 
@@ -7,6 +7,7 @@
7
7
  ## Interfaces
8
8
 
9
9
  - [IInformationServiceConfig](interfaces/IInformationServiceConfig.md)
10
+ - [IInformationServiceConstructorOptions](interfaces/IInformationServiceConstructorOptions.md)
10
11
 
11
12
  ## Variables
12
13
 
@@ -0,0 +1,11 @@
1
+ # Interface: IInformationServiceConstructorOptions
2
+
3
+ Options for the InformationService constructor.
4
+
5
+ ## Properties
6
+
7
+ ### config
8
+
9
+ > **config**: [`IInformationServiceConfig`](IInformationServiceConfig.md)
10
+
11
+ The configuration for the service.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/api-service",
3
- "version": "0.0.1-next.25",
3
+ "version": "0.0.1-next.26",
4
4
  "description": "Information contract implementation and REST endpoint definitions",
5
5
  "repository": {
6
6
  "type": "git",
@@ -14,7 +14,7 @@
14
14
  "node": ">=20.0.0"
15
15
  },
16
16
  "dependencies": {
17
- "@twin.org/api-models": "0.0.1-next.25",
17
+ "@twin.org/api-models": "0.0.1-next.26",
18
18
  "@twin.org/core": "next",
19
19
  "@twin.org/nameof": "next",
20
20
  "@twin.org/web": "next"