import type { DescMessage, MessageShape } from "@bufbuild/protobuf";
import type { StatusNotOK } from "../types/external.js";
import { NotOK } from "./external.js";
import type { ErrorRegistry } from "./registry.js";
/** @internal */
export interface ErrorDetails<T> {
    typeUrl: string;
    value: T;
}
/** @internal */
export declare abstract class AbstractErrorResponse<Details> extends Error {
    readonly code: StatusNotOK;
    constructor(code: number, message: string);
    toNotOK(registry: ErrorRegistry | undefined): NotOK;
    protected abstract details(): Generator<ErrorDetails<Details>, void, undefined>;
    protected abstract parseDetails<T extends DescMessage>(schema: T, details: Details): MessageShape<T>;
}
//# sourceMappingURL=response.d.ts.map