import type { Authorize } from "./Authorize.js"; import type { OnRequestReceive } from "./OnRequestReceive.js"; import type { OnResponseSend } from "./OnResponseSend.js"; import type { ServicesRecord } from "../services/ServicesRecord.js"; export type DefineHandlerOptions, Request, Response> = { services: Services; schema?: Record; apiPath?: string; verbose?: boolean; onResponseSend?: OnResponseSend; authorize?: Authorize; allowedOrigins?: string[]; allowedHeaders?: string[]; allowedMethods?: string[]; exposedHeaders?: string[]; maxAge?: number; allowedCredentials?: boolean; } & (Context extends undefined ? { onRequestReceive?: OnRequestReceive; } : { onRequestReceive: OnRequestReceive; });