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

@gtsc/api-models

Package Overview
Dependencies
Maintainers
0
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gtsc/api-models - npm Package Compare versions

Comparing version 0.0.3-next.20 to 0.0.3-next.21

dist/types/models/routes/IRestRouteResponseOptions.d.ts

5

dist/types/index.d.ts

@@ -21,8 +21,7 @@ export * from "./models/config/IBaseRestClientConfig";

export * from "./models/routes/IRestRoute";
export * from "./models/routes/IRestRouteRequest";
export * from "./models/routes/IRestRouteResponse";
export * from "./models/routes/IRestRouteResponseOptions";
export * from "./models/routes/ISocketRoute";
export * from "./models/routes/ITag";
export * from "./models/server/httpRestRouteProcessor";
export * from "./models/server/IWebServer";
export * from "./models/server/IWebServerOptions";
export * from "./models/server/httpRestRouteProcessor";

2

dist/types/models/protocol/IHttpRequest.d.ts

@@ -7,3 +7,3 @@ import type { HttpMethods, IHttpRequestHeaders } from "@gtsc/web";

*/
export interface IHttpRequest<T = unknown> {
export interface IHttpRequest<T = any> {
/**

@@ -10,0 +10,0 @@ * The request method.

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

/**
* The full HTTP request.
* The raw HTTP request.
*/
request: IHttpRequest;
rawRequest: IHttpRequest;
}

@@ -5,3 +5,3 @@ import type { HttpStatusCodes, IHttpRequestHeaders } from "@gtsc/web";

*/
export interface IHttpResponse<T = unknown> {
export interface IHttpResponse<T = any> {
/**

@@ -8,0 +8,0 @@ * Response status code.

import type { HttpMethods } from "@gtsc/web";
import type { IBaseRoute } from "./IBaseRoute";
import type { IRestRouteResponseOptions } from "./IRestRouteResponseOptions";
import type { IHttpRequest } from "../protocol/IHttpRequest";
import type { IHttpRequestContext } from "../protocol/IHttpRequestContext";
import type { IHttpResponse } from "../protocol/IHttpResponse";
/**
* Interface which defines a REST route.
*/
export interface IRestRoute<T = any, U = any> extends IBaseRoute {
export interface IRestRoute<T extends IHttpRequest = IHttpRequest, U extends IHttpResponse & IRestRouteResponseOptions = IHttpResponse & IRestRouteResponseOptions> extends IBaseRoute {
/**

@@ -9,0 +12,0 @@ * Summary of what task the operation performs.

@@ -21,4 +21,3 @@ # @gtsc/api-models

- [IRestRoute](interfaces/IRestRoute.md)
- [IRestRouteRequest](interfaces/IRestRouteRequest.md)
- [IRestRouteResponse](interfaces/IRestRouteResponse.md)
- [IRestRouteResponseOptions](interfaces/IRestRouteResponseOptions.md)
- [ISocketRoute](interfaces/ISocketRoute.md)

@@ -25,0 +24,0 @@ - [ITag](interfaces/ITag.md)

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

• **T** = `unknown`
• **T** = `any`

@@ -14,0 +14,0 @@ ## Properties

@@ -51,6 +51,6 @@ [**@gtsc/api-models**](../overview.md) • **Docs**

### request
### rawRequest
> **request**: [`IHttpRequest`](IHttpRequest.md)\<`unknown`\>
> **rawRequest**: [`IHttpRequest`](IHttpRequest.md)\<`any`\>
The full HTTP request.
The raw HTTP request.

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

• **T** = `unknown`
• **T** = `any`

@@ -14,0 +14,0 @@ ## Properties

@@ -15,5 +15,5 @@ [**@gtsc/api-models**](../overview.md) • **Docs**

• **T** = `any`
• **T** *extends* [`IHttpRequest`](IHttpRequest.md) = [`IHttpRequest`](IHttpRequest.md)
• **U** = `any`
• **U** *extends* [`IHttpResponse`](IHttpResponse.md) & [`IRestRouteResponseOptions`](IRestRouteResponseOptions.md) = [`IHttpResponse`](IHttpResponse.md) & [`IRestRouteResponseOptions`](IRestRouteResponseOptions.md)

@@ -20,0 +20,0 @@ ## Properties

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

• **restRoutes**: [`IRestRoute`](IRestRoute.md)\<`any`, `any`\>[]
• **restRoutes**: [`IRestRoute`](IRestRoute.md)\<[`IHttpRequest`](IHttpRequest.md)\<`any`\>, [`IHttpResponse`](IHttpResponse.md)\<`any`\> & [`IRestRouteResponseOptions`](IRestRouteResponseOptions.md)\>[]

@@ -26,0 +26,0 @@ The REST routes.

{
"name": "@gtsc/api-models",
"version": "0.0.3-next.20",
"version": "0.0.3-next.21",
"description": "Contains models and classes for use with APIs",

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

"@gtsc/logging-models": "next",
"@gtsc/nameof": "^0.0.4",
"@gtsc/nameof": "0.0.4",
"@gtsc/services": "next",

@@ -22,0 +22,0 @@ "@gtsc/web": "next"

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