/**
 * handlers.ts — framework-agnostic dispatch (guidance-out) request handlers.
 *
 * Faithful port of handleList + handleCreate from the reference dispatch endpoint
 * (the-portal/pages/api/instar/dispatches/index.ts), lifted out of Next.js into
 * pure request→response functions over the FeedbackStore + the ported dispatch
 * logic (dispatch.ts). The canonical front binds these; the operated deploy
 * supplies the real store + the internal key. Reproduces the reference's exact
 * status codes, auth, validation messages, and the version-compat filter.
 *
 * Note: unlike the public feedback receiver (which DEFAULTS an invalid type),
 * dispatch create REJECTS an invalid type — it's an internal, authed endpoint.
 */
import type { FeedbackStore } from '../store/FeedbackStore.js';
export interface DispatchListRequest {
    headers: Record<string, string | string[] | undefined>;
    query: {
        since?: string;
        type?: string;
    };
}
export interface DispatchCreateRequest {
    headers: Record<string, string | string[] | undefined>;
    body: unknown;
}
export interface DispatchResponse {
    status: number;
    json: unknown;
}
/** Port of handleList: fingerprint-gate, since/type filter, version-compat filter, mapped output. */
export declare function handleDispatchList(req: DispatchListRequest, deps: {
    store: FeedbackStore;
    now: number;
}): DispatchResponse;
export interface DispatchCreateDeps {
    store: FeedbackStore;
    /** The internal API key the caller must present (x-internal-key or Bearer). */
    internalKey: string;
    now: number;
    generateDispatchId?: () => string;
}
/** Port of handleCreate: internal-auth, validation (type REJECTED, priority defaulted), dedup-by-title, create. */
export declare function handleDispatchCreate(req: DispatchCreateRequest, deps: DispatchCreateDeps): DispatchResponse;
//# sourceMappingURL=handlers.d.ts.map