@ts-rest/nest
Advanced tools
Comparing version 3.10.2 to 3.11.0
{ | ||
"name": "@ts-rest/nest", | ||
"version": "3.10.2", | ||
"version": "3.11.0", | ||
"description": "Nest server integration for @ts-rest", | ||
@@ -34,3 +34,3 @@ "license": "MIT", | ||
"zod": "3.x.x", | ||
"@ts-rest/core": "3.10.2" | ||
"@ts-rest/core": "3.11.0" | ||
}, | ||
@@ -37,0 +37,0 @@ "devDependencies": { |
import { CallHandler, ExecutionContext, NestInterceptor } from '@nestjs/common'; | ||
import { AppRoute, AppRouteMutation, PathParamsWithCustomValidators, Without, ZodInferOrType } from '@ts-rest/core'; | ||
import { Observable } from 'rxjs'; | ||
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<{ | ||
type BodyWithoutFileIfMultiPart<T extends AppRouteMutation> = T['contentType'] extends 'multipart/form-data' ? Without<ZodInferOrType<T['body']>, File> : ZodInferOrType<T['body']>; | ||
export type ApiDecoratorShape<TRoute extends AppRoute> = Without<{ | ||
params: PathParamsWithCustomValidators<TRoute>; | ||
@@ -7,0 +7,0 @@ body: TRoute extends AppRouteMutation ? BodyWithoutFileIfMultiPart<TRoute> : never; |
import { AppRoute, AppRouter, ApiRouteResponse, Without } from '@ts-rest/core'; | ||
import { ApiDecoratorShape } from './api.decorator'; | ||
declare type AppRouterMethodShape<T extends AppRoute> = (...args: any[]) => Promise<ApiRouteResponse<T['responses']>>; | ||
declare type AppRouterControllerShape<T extends AppRouter> = { | ||
type AppRouterMethodShape<T extends AppRoute> = (...args: any[]) => Promise<ApiRouteResponse<T['responses']>>; | ||
type AppRouterControllerShape<T extends AppRouter> = { | ||
[K in keyof T]: T[K] extends AppRouter ? undefined : T[K] extends AppRoute ? AppRouterMethodShape<T[K]> : never; | ||
}; | ||
declare type AppRouteShape<T extends AppRouter> = { | ||
type AppRouteShape<T extends AppRouter> = { | ||
[K in keyof T]: T[K] extends AppRouter ? AppRouteShape<T[K]> : T[K] extends AppRoute ? ApiDecoratorShape<T[K]> : never; | ||
}; | ||
export declare type NestControllerShapeFromAppRouter<T extends AppRouter> = Without<AppRouterControllerShape<T>, AppRouter>; | ||
export declare type NestAppRouteShape<T extends AppRouter> = AppRouteShape<T>; | ||
export type NestControllerShapeFromAppRouter<T extends AppRouter> = Without<AppRouterControllerShape<T>, AppRouter>; | ||
export type NestAppRouteShape<T extends AppRouter> = AppRouteShape<T>; | ||
export declare const initNestServer: <T extends AppRouter>(router: T) => { | ||
@@ -13,0 +13,0 @@ controllerShape: NestControllerShapeFromAppRouter<T>; |
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
12545