/**
 * src/types/server.ts — HTTP server types for Planu HTTP API (SPEC-610)
 */
import type { IncomingMessage, ServerResponse } from 'node:http';
/** Parsed request context passed to HTTP route handlers (SPEC-610). */
export interface HttpRouteContext {
    readonly method: string;
    readonly pathname: string;
    readonly searchParams: URLSearchParams;
    /** Path parameter capture groups by name. */
    readonly params: Record<string, string>;
    readonly req: IncomingMessage;
    readonly res: ServerResponse;
}
/** An HTTP route handler receives context and must return a Promise (SPEC-610). */
export type HttpRouteHandler = (ctx: HttpRouteContext) => Promise<void>;
/** Internal registered route record for the HTTP Router (SPEC-610). */
export interface HttpRegisteredRoute {
    readonly method: string;
    readonly pattern: RegExp;
    readonly paramNames: string[];
    readonly handler: HttpRouteHandler;
}
/** Standard success envelope for Planu HTTP API responses. */
export interface ApiSuccess<T> {
    data: T;
    error: null;
}
/** Standard error envelope for Planu HTTP API responses. */
export interface ApiErrorEnvelope {
    data: null;
    error: {
        message: string;
        code: string;
    };
}
//# sourceMappingURL=server.d.ts.map