Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@gtsc/api-core

Package Overview
Dependencies
Maintainers
0
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gtsc/api-core - npm Package Compare versions

Comparing version 0.0.3-next.15 to 0.0.3-next.16

dist/types/models/IServerSpecResponse.d.ts

1

dist/types/index.d.ts

@@ -7,2 +7,3 @@ export * from "./clients/baseRestClient";

export * from "./models/IServerInfoResponse";
export * from "./models/IServerSpecResponse";
export * from "./models/serverHealthStatus";

@@ -9,0 +10,0 @@ export * from "./processors/localProcessor";

@@ -5,2 +5,3 @@ import type { IRestRoute, ITag } from "@gtsc/api-models";

import type { IServerInfoResponse } from "../models/IServerInfoResponse";
import type { IServerSpecResponse } from "../models/IServerSpecResponse";
/**

@@ -33,1 +34,9 @@ * The tag to associate with the routes.

export declare function serverHealth(requestContext: IRequestContext, factoryServiceName: string, request: unknown): Promise<IServerHealthResponse>;
/**
* Get the spec 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 serverSpec(requestContext: IRequestContext, factoryServiceName: string, request: unknown): Promise<IServerSpecResponse>;

16

dist/types/services/informationService.d.ts

@@ -12,4 +12,5 @@ import type { IRequestContext, IService } from "@gtsc/services";

* @param serverInfo The server information.
* @param openApiSpecPath The path to the spec file.
*/
constructor(serverInfo: IServerInfo);
constructor(serverInfo: IServerInfo, openApiSpecPath?: string);
/**

@@ -25,8 +26,13 @@ * Bootstrap the service by creating and initializing any resources it needs.

*/
serverInformation(): Promise<IServerInfo>;
serverInformation(): IServerInfo;
/**
* Get the path to the OpenAPI spec.
* @returns The OpenAPI spec path.
*/
openApiSpecPath(): string | undefined;
/**
* Get the server health.
* @returns The service health.
*/
serverHealth(): Promise<IServerHealth>;
serverHealth(): IServerHealth;
/**

@@ -38,3 +44,3 @@ * Set the status of a component.

*/
setComponentHealth(name: string, status: ServerHealthStatus, details?: string): Promise<void>;
setComponentHealth(name: string, status: ServerHealthStatus, details?: string): void;
/**

@@ -44,3 +50,3 @@ * Remove the status of a component.

*/
removeComponentHealth(name: string): Promise<void>;
removeComponentHealth(name: string): void;
}

@@ -17,3 +17,3 @@ [**@gtsc/api-core**](../overview.md) • **Docs**

> **new InformationService**(`serverInfo`): [`InformationService`](InformationService.md)
> **new InformationService**(`serverInfo`, `openApiSpecPath`?): [`InformationService`](InformationService.md)

@@ -28,2 +28,6 @@ Create a new instance of InformationService.

• **openApiSpecPath?**: `string`
The path to the spec file.
#### Returns

@@ -61,3 +65,3 @@

> **serverInformation**(): `Promise`\<[`IServerInfo`](../interfaces/IServerInfo.md)\>
> **serverInformation**(): [`IServerInfo`](../interfaces/IServerInfo.md)

@@ -68,3 +72,3 @@ Get the server information.

`Promise`\<[`IServerInfo`](../interfaces/IServerInfo.md)\>
[`IServerInfo`](../interfaces/IServerInfo.md)

@@ -75,5 +79,19 @@ The service information.

### openApiSpecPath()
> **openApiSpecPath**(): `undefined` \| `string`
Get the path to the OpenAPI spec.
#### Returns
`undefined` \| `string`
The OpenAPI spec path.
***
### serverHealth()
> **serverHealth**(): `Promise`\<[`IServerHealth`](../interfaces/IServerHealth.md)\>
> **serverHealth**(): [`IServerHealth`](../interfaces/IServerHealth.md)

@@ -84,3 +102,3 @@ Get the server health.

`Promise`\<[`IServerHealth`](../interfaces/IServerHealth.md)\>
[`IServerHealth`](../interfaces/IServerHealth.md)

@@ -93,3 +111,3 @@ The service health.

> **setComponentHealth**(`name`, `status`, `details`?): `Promise`\<`void`\>
> **setComponentHealth**(`name`, `status`, `details`?): `void`

@@ -114,3 +132,3 @@ Set the status of a component.

`Promise`\<`void`\>
`void`

@@ -121,3 +139,3 @@ ***

> **removeComponentHealth**(`name`): `Promise`\<`void`\>
> **removeComponentHealth**(`name`): `void`

@@ -134,2 +152,2 @@ Remove the status of a component.

`Promise`\<`void`\>
`void`

@@ -15,2 +15,3 @@ # @gtsc/api-core

- [IServerInfoResponse](interfaces/IServerInfoResponse.md)
- [IServerSpecResponse](interfaces/IServerSpecResponse.md)

@@ -35,1 +36,2 @@ ## Type Aliases

- [serverHealth](functions/serverHealth.md)
- [serverSpec](functions/serverSpec.md)
{
"name": "@gtsc/api-core",
"version": "0.0.3-next.15",
"version": "0.0.3-next.16",
"description": "Core classes for use with APIs",

@@ -17,3 +17,3 @@ "repository": {

"dependencies": {
"@gtsc/api-models": "0.0.3-next.15",
"@gtsc/api-models": "0.0.3-next.16",
"@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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc