@api-ts/io-ts-http
Advanced tools
Comparing version 2.3.0 to 2.4.0
@@ -9,2 +9,3 @@ import * as t from 'io-ts'; | ||
delete: number; | ||
patch: number; | ||
}>; | ||
@@ -32,8 +33,8 @@ export declare type Method = t.TypeOf<typeof Method>; | ||
[ApiAction in keyof Spec]: { | ||
[M in keyof Spec[ApiAction]]: M extends Method ? Spec[ApiAction][M] : `Unsupported HTTP Method. Use "get" | "post" | "put" | "delete"`; | ||
[M in keyof Spec[ApiAction]]: M extends Method ? Spec[ApiAction][M] : `Unsupported HTTP Method. Use "get" | "post" | "put" | "delete" | "patch"`; | ||
}; | ||
}; | ||
export declare const apiSpec: <Spec extends ApiSpec>(spec: UnknownKeysToError<Spec>) => Spec; | ||
export declare const httpRoute: <Props extends HttpRoute<"get" | "post" | "put" | "delete">>(spec: Props) => Props; | ||
export declare const httpRoute: <Props extends HttpRoute<"get" | "post" | "put" | "delete" | "patch">>(spec: Props) => Props; | ||
export {}; | ||
//# sourceMappingURL=httpRoute.d.ts.map |
@@ -33,2 +33,3 @@ "use strict"; | ||
delete: 1, | ||
patch: 1, | ||
}); | ||
@@ -35,0 +36,0 @@ const apiSpec = (spec) => spec; |
{ | ||
"name": "@api-ts/io-ts-http", | ||
"version": "2.3.0", | ||
"version": "2.4.0", | ||
"description": "Types for (de)serializing HTTP requests from both the client and server side", | ||
@@ -28,3 +28,3 @@ "author": "Patrick McLaughlin <patrickmclaughlin@bitgo.com>", | ||
"devDependencies": { | ||
"@types/chai": "4.3.4", | ||
"@types/chai": "4.3.5", | ||
"@types/mocha": "10.0.1", | ||
@@ -31,0 +31,0 @@ "c8": "7.13.0", |
@@ -134,3 +134,3 @@ # @api-ts/io-ts-http | ||
import { GetMessage, CreateMessage } from './routes/message'; | ||
import { GetUser, CreateUser, UpdateUser, DeleteUser } from './routes/user'; | ||
import { GetUser, CreateUser, PatchUser, UpdateUser, DeleteUser } from './routes/user'; | ||
@@ -152,2 +152,3 @@ /** | ||
delete: DeleteUser, | ||
patch: PatchUser, | ||
}, | ||
@@ -154,0 +155,0 @@ }); |
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
62313
903
383