@ts-rest/nest
Advanced tools
Comparing version 3.4.2 to 3.5.0
# @ts-rest/nest | ||
## 3.5.0 | ||
### Minor Changes | ||
- 068822d: Add support for multipart/form-data | ||
## 3.4.2 | ||
@@ -4,0 +10,0 @@ |
{ | ||
"name": "@ts-rest/nest", | ||
"version": "3.4.2", | ||
"version": "3.5.0", | ||
"description": "Nest server integration for @ts-rest", | ||
@@ -28,3 +28,3 @@ "type": "commonjs", | ||
"@nestjs/common": "^9.0.11", | ||
"@ts-rest/core": "3.4.2", | ||
"@ts-rest/core": "3.5.0", | ||
"zod": "^3.18.0", | ||
@@ -34,2 +34,2 @@ "rxjs": "^7.0.0", | ||
} | ||
} | ||
} |
import { CallHandler, ExecutionContext, NestInterceptor } from '@nestjs/common'; | ||
import { AppRoute, AppRouteMutation, PathParams, Without } from '@ts-rest/core'; | ||
import { AppRoute, AppRouteMutation, PathParams, Without, ZodInferOrType } from '@ts-rest/core'; | ||
import { Observable } from 'rxjs'; | ||
import { z, ZodTypeAny } from 'zod'; | ||
declare type BodyWithoutFileIfMultiPart<T extends AppRouteMutation> = T['contentType'] extends 'multipart/form-data' ? Without<ZodInferOrType<T['body']>, File> : ZodInferOrType<T['body']>; | ||
export declare type ApiDecoratorShape<TRoute extends AppRoute> = Without<{ | ||
params: PathParams<TRoute>; | ||
body: TRoute extends AppRouteMutation ? TRoute['body'] extends ZodTypeAny ? z.infer<TRoute['body']> : TRoute['body'] : never; | ||
query: TRoute['query'] extends ZodTypeAny ? z.infer<TRoute['query']> : TRoute['query']; | ||
body: TRoute extends AppRouteMutation ? BodyWithoutFileIfMultiPart<TRoute> : never; | ||
query: ZodInferOrType<TRoute['query']>; | ||
}, never>; | ||
@@ -17,1 +17,2 @@ export declare const ApiDecorator: (...dataOrPipes: unknown[]) => ParameterDecorator; | ||
export declare const Api: (appRoute: AppRoute) => MethodDecorator; | ||
export {}; |
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
18264
13
143