import type { WssActionName } from '@nicepkg/gpt-runner-shared/common'; import type { NextFunction, Request, Response } from 'express'; export interface MyRequest extends Request, any, any, Record> { isSafe: boolean; } export interface Controller { url: string; requireSafe?: boolean; method: 'all' | 'get' | 'post' | 'put' | 'delete' | 'patch' | 'options' | 'head'; handler: (req: MyRequest, res: Response, next: NextFunction) => Promise; } export interface ControllerConfig { namespacePath: string; controllers: Controller[]; } export interface WssController { actionName: WssActionName; handler: (params: any) => Promise; } export interface WssControllerConfig { controllers: WssController[]; }