api 설계 변경

This commit is contained in:
2023-08-18 13:02:40 +00:00
parent 7716c6936b
commit bfe0b99d44
7 changed files with 168 additions and 179 deletions
+3 -8
View File
@@ -1,13 +1,8 @@
import type { Request, Response } from 'express';
import type { Callable, DefAPINamespace, DeleteAPICallT, GetAPICallT, HeadAPICallT, HttpMethod, InvalidResponse, PatchAPICallT, PostAPICallT, PutAPICallT, RawArgType, ValidResponse, recoveryMethod } from '../apiStructure/defs.js';
import {
validate,
type ValidatorOptions,
} from "class-validator";
import { type ClassTransformOptions, plainToInstance } from "class-transformer";
import type { Empty, ParseOutType, PostProcDecoratorRunner, ProcDecorator, ProcDecoratorChain, ProcDecoratorRunner, ResolveChain } from './ProcDecorator/base.js';
import { clamp } from 'lodash-es';
import type { Empty, PostProcDecoratorRunner, ProcDecoratorRunner } from './ProcDecorator/base.js';
import type { ZodType } from 'zod';
export type APINamespace = {
[key: string]: APINamespace
@@ -26,7 +21,7 @@ export type APINamespace = {
;
}
type ValidatorType<T> = T extends undefined ? undefined : ClassType<T>;
type ValidatorType<T> = T extends undefined ? undefined : ZodType<T>;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export type AnyAPIExecuter = APIExecuter<any, any, any, any>;