@gtsc/api-core
Advanced tools
Comparing version 0.0.3-next.14 to 0.0.3-next.15
export * from "./clients/baseRestClient"; | ||
export * from "./clients/baseSocketClient"; | ||
export * from "./models/IServerHealth"; | ||
export * from "./models/IServerHealthResponse"; | ||
export * from "./models/IServerInfo"; | ||
export * from "./models/IServerInfoResponse"; | ||
export * from "./models/serverHealthStatus"; | ||
export * from "./processors/localProcessor"; | ||
@@ -6,0 +9,0 @@ export * from "./processors/requestLoggingProcessor"; |
import type { IRestRoute, ITag } from "@gtsc/api-models"; | ||
import { type IRequestContext } from "@gtsc/services"; | ||
import type { IServerHealthResponse } from "../models/IServerHealthResponse"; | ||
import type { IServerInfoResponse } from "../models/IServerInfoResponse"; | ||
@@ -23,1 +24,9 @@ /** | ||
export declare function serverInformation(requestContext: IRequestContext, factoryServiceName: string, request: unknown): Promise<IServerInfoResponse>; | ||
/** | ||
* Get the health for the server. | ||
* @param requestContext The request context for the API. | ||
* @param factoryServiceName The name of the service to use in the routes. | ||
* @param request The request. | ||
* @returns The response object with additional http response properties. | ||
*/ | ||
export declare function serverHealth(requestContext: IRequestContext, factoryServiceName: string, request: unknown): Promise<IServerHealthResponse>; |
import type { IRequestContext, IService } from "@gtsc/services"; | ||
import type { IServerHealth } from "../models/IServerHealth"; | ||
import type { IServerInfo } from "../models/IServerInfo"; | ||
import type { ServerHealthStatus } from "../models/serverHealthStatus"; | ||
/** | ||
@@ -20,5 +22,22 @@ * The information service for the server. | ||
* Get the server information. | ||
* @returns the service information. | ||
* @returns The service information. | ||
*/ | ||
serverInformation(): Promise<IServerInfo>; | ||
/** | ||
* Get the server health. | ||
* @returns The service health. | ||
*/ | ||
serverHealth(): Promise<IServerHealth>; | ||
/** | ||
* Set the status of a component. | ||
* @param name The component name. | ||
* @param status The status of the component. | ||
* @param details The details for the status. | ||
*/ | ||
setComponentHealth(name: string, status: ServerHealthStatus, details?: string): Promise<void>; | ||
/** | ||
* Remove the status of a component. | ||
* @param name The component name. | ||
*/ | ||
removeComponentHealth(name: string): Promise<void>; | ||
} |
@@ -67,2 +67,60 @@ [**@gtsc/api-core**](../overview.md) • **Docs** | ||
the service information. | ||
The service information. | ||
*** | ||
### serverHealth() | ||
> **serverHealth**(): `Promise`\<[`IServerHealth`](../interfaces/IServerHealth.md)\> | ||
Get the server health. | ||
#### Returns | ||
`Promise`\<[`IServerHealth`](../interfaces/IServerHealth.md)\> | ||
The service health. | ||
*** | ||
### setComponentHealth() | ||
> **setComponentHealth**(`name`, `status`, `details`?): `Promise`\<`void`\> | ||
Set the status of a component. | ||
#### Parameters | ||
• **name**: `string` | ||
The component name. | ||
• **status**: [`ServerHealthStatus`](../type-aliases/ServerHealthStatus.md) | ||
The status of the component. | ||
• **details?**: `string` | ||
The details for the status. | ||
#### Returns | ||
`Promise`\<`void`\> | ||
*** | ||
### removeComponentHealth() | ||
> **removeComponentHealth**(`name`): `Promise`\<`void`\> | ||
Remove the status of a component. | ||
#### Parameters | ||
• **name**: `string` | ||
The component name. | ||
#### Returns | ||
`Promise`\<`void`\> |
@@ -11,5 +11,11 @@ # @gtsc/api-core | ||
- [IServerHealth](interfaces/IServerHealth.md) | ||
- [IServerHealthResponse](interfaces/IServerHealthResponse.md) | ||
- [IServerInfo](interfaces/IServerInfo.md) | ||
- [IServerInfoResponse](interfaces/IServerInfoResponse.md) | ||
## Type Aliases | ||
- [ServerHealthStatus](type-aliases/ServerHealthStatus.md) | ||
## Variables | ||
@@ -28,1 +34,2 @@ | ||
- [serverInformation](functions/serverInformation.md) | ||
- [serverHealth](functions/serverHealth.md) |
{ | ||
"name": "@gtsc/api-core", | ||
"version": "0.0.3-next.14", | ||
"version": "0.0.3-next.15", | ||
"description": "Core classes for use with APIs", | ||
@@ -17,3 +17,3 @@ "repository": { | ||
"dependencies": { | ||
"@gtsc/api-models": "0.0.3-next.14", | ||
"@gtsc/api-models": "0.0.3-next.15", | ||
"@gtsc/core": "next", | ||
@@ -20,0 +20,0 @@ "@gtsc/logging-models": "next", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
96527
41
1833
+ Added@gtsc/api-models@0.0.3-next.15(transitive)
- Removed@gtsc/api-models@0.0.3-next.14(transitive)