UNPKG

denwa-nest-shared

Version:

Shared NestJS module for DTO validation, RBAC, TypeORM query building, and OpenAPI client

6 lines (5 loc) • 589 B
import type { AxiosResponse } from 'axios'; import type { MethodType } from '../../const/methods.js'; import type { GetApiResponse } from '../../types/response.js'; import type { RouteResponsesByStatusCode, RoutesForMethod, SchemaType } from '../../types/schemeTypes.js'; export declare function convertToFetch<Schema extends SchemaType, Method extends MethodType, Route extends RoutesForMethod<Schema, Method>, DataByCode extends Record<number, unknown> = RouteResponsesByStatusCode<Schema, Method, Route>>(response: Promise<AxiosResponse>): Promise<GetApiResponse<'fetch', DataByCode>>;