import type { ParameterizedContext } from "koa"; import type { Stats } from "node:fs"; export interface KoaErrors { message: string; code?: string; description?: string; } export interface BodyParserOptions { patchNode?: boolean; patchKoa?: boolean; jsonLimit?: string | number; formLimit?: string | number; textLimit?: string | number; encoding?: string; multipart?: boolean; urlencoded?: boolean; text?: boolean; json?: boolean; jsonStrict?: boolean; includeUnparsed?: boolean; formidable?: any; } export type ApiDocMetaValue = string | { description?: string; paramsExample?: string; successExample?: string; error?: string; errorExample?: string; }; export interface ApiDocsMeta { group?: string; [exportName: string]: ApiDocMetaValue | undefined; } export interface FallbackOptions { index?: string; ignore?: string | string[]; } type SetHeaders = (res: ParameterizedContext["res"], path: string, stats: Stats) => any; export interface StaticServeOptions { maxAge?: number | undefined; immutable?: boolean | undefined; hidden?: boolean | undefined; root?: string | undefined; mountPoint?: string | undefined; index?: string | false | undefined; gzip?: boolean | undefined; brotli?: boolean | undefined; format?: boolean | undefined; setHeaders?: SetHeaders | undefined; extensions?: string[] | false | undefined; } export {};