@ts-rest/core
Advanced tools
Comparing version 3.22.1-pre.0 to 3.23.0-beta.0
# @ts-rest/core | ||
## 3.22.1-pre.0 | ||
## 3.23.0-beta.0 | ||
### Patch Changes | ||
### Minor Changes | ||
- Test prerelease | ||
- b84b0df: Add 'metadata' property to routes | ||
@@ -9,0 +9,0 @@ ## 3.22.0 |
{ | ||
"name": "@ts-rest/core", | ||
"version": "3.22.1-pre.0", | ||
"version": "3.23.0-beta.0", | ||
"description": "RPC-like experience over a regular REST API, with type safe server implementations 🪄", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -12,7 +12,3 @@ import { Merge, Opaque, Prettify, WithoutUnknown } from './type-utils'; | ||
type Path = string; | ||
/** | ||
* A query endpoint. In REST terms, one using GET. | ||
*/ | ||
export type AppRouteQuery = { | ||
method: 'GET'; | ||
type AppRouteCommon = { | ||
path: Path; | ||
@@ -26,19 +22,18 @@ pathParams?: unknown; | ||
responses: Record<number, unknown>; | ||
metadata?: unknown; | ||
}; | ||
/** | ||
* A query endpoint. In REST terms, one using GET. | ||
*/ | ||
export type AppRouteQuery = AppRouteCommon & { | ||
method: 'GET'; | ||
}; | ||
/** | ||
* A mutation endpoint. In REST terms, one using POST, PUT, | ||
* PATCH, or DELETE. | ||
*/ | ||
export type AppRouteMutation = { | ||
export type AppRouteMutation = AppRouteCommon & { | ||
method: 'POST' | 'DELETE' | 'PUT' | 'PATCH'; | ||
path: Path; | ||
pathParams?: unknown; | ||
contentType?: 'application/json' | 'multipart/form-data'; | ||
body: unknown; | ||
query?: unknown; | ||
headers?: unknown; | ||
summary?: string; | ||
description?: string; | ||
deprecated?: boolean; | ||
responses: Record<number, unknown>; | ||
}; | ||
@@ -45,0 +40,0 @@ type ValidatedHeaders<T extends AppRoute, TOptions extends RouterOptions, TOptionsApplied = ApplyOptions<T, TOptions>> = 'headers' extends keyof TOptionsApplied ? TOptionsApplied['headers'] extends MixedZodError<infer A, infer B> ? { |
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
59092
1136