import { z } from 'zod/v4';
export declare const CoderErrorCodeSchema: z.ZodEnum<{
    CODER_SESSION_NOT_FOUND: "CODER_SESSION_NOT_FOUND";
    CODER_SESSION_ARCHIVED: "CODER_SESSION_ARCHIVED";
    CODER_SESSION_CONFLICT: "CODER_SESSION_CONFLICT";
    CODER_INVALID_REQUEST: "CODER_INVALID_REQUEST";
}>;
export type CoderErrorCode = z.infer<typeof CoderErrorCodeSchema>;
export declare const CoderResponseError: {
    new (args?: ({
        /** Coder session id involved in the failed operation */
        coderSessionId?: string;
        /** x-session-id header value used for trace correlation */
        requestSessionId?: string | null;
        /** Backend machine-readable error code, if provided */
        code?: CoderErrorCode;
    } & {
        message?: string;
        cause?: unknown;
    }) | undefined): import("../../error.ts").RichError & {
        readonly _tag: "CoderResponseError";
    } & Readonly<{
        /** Coder session id involved in the failed operation */
        coderSessionId?: string;
        /** x-session-id header value used for trace correlation */
        requestSessionId?: string | null;
        /** Backend machine-readable error code, if provided */
        code?: CoderErrorCode;
    }>;
    readonly defaultMessage?: string;
};
export declare const CoderSessionNotFoundError: {
    new (args?: ({
        coderSessionId: string;
    } & {
        message?: string;
        cause?: unknown;
    }) | undefined): import("../../error.ts").RichError & {
        readonly _tag: "CoderSessionNotFoundError";
    } & Readonly<{
        coderSessionId: string;
    }>;
    readonly defaultMessage?: string;
};
export declare const CoderSessionArchivedError: {
    new (args?: ({
        coderSessionId?: string;
    } & {
        message?: string;
        cause?: unknown;
    }) | undefined): import("../../error.ts").RichError & {
        readonly _tag: "CoderSessionArchivedError";
    } & Readonly<{
        coderSessionId?: string;
    }>;
    readonly defaultMessage?: string;
};
export declare const CoderSessionConflictError: {
    new (args?: ({
        coderSessionId?: string;
    } & {
        message?: string;
        cause?: unknown;
    }) | undefined): import("../../error.ts").RichError & {
        readonly _tag: "CoderSessionConflictError";
    } & Readonly<{
        coderSessionId?: string;
    }>;
    readonly defaultMessage?: string;
};
export declare const CoderErrorContextSchema: z.ZodObject<{
    sessionId: z.ZodOptional<z.ZodString>;
    requestSessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, z.core.$strip>;
export type CoderErrorContext = z.infer<typeof CoderErrorContextSchema>;
export declare function throwCoderError(resp: {
    message?: string;
    code?: string;
}, context: CoderErrorContext): never;
export declare function normalizeCoderUrl(url: string): string;
export declare function withOrgId(params: URLSearchParams, orgId?: string): URLSearchParams;
//# sourceMappingURL=util.d.ts.map