import * as z from "zod";
import { ClosedEnum } from "../../types/enums.js";
import { Result as SafeParseResult } from "../../types/fp.js";
import { SDKValidationError } from "./sdkvalidationerror.js";
/**
 * A short code indicating the error code returned.
 */
export declare const Code: {
    readonly BadRequest: "bad_request";
};
/**
 * A short code indicating the error code returned.
 */
export type Code = ClosedEnum<typeof Code>;
/**
 * A short code indicating the error code returned.
 */
export declare const BadRequestCode: {
    readonly BadRequest: "bad_request";
};
/**
 * A short code indicating the error code returned.
 */
export type BadRequestCode = ClosedEnum<typeof BadRequestCode>;
/**
 * Legacy error format for backward compatibility.
 */
export type ErrorT = {
    /**
     * A short code indicating the error code returned.
     */
    code: BadRequestCode;
    /**
     * A concise error message suitable for display to end users. May be truncated if the full detail is long.
     */
    message: string;
};
export type BadRequestData = {
    /**
     * A short, human-readable summary of the problem type.
     */
    title: string;
    /**
     * The HTTP status code.
     */
    status: number;
    /**
     * A detailed explanation specific to this occurrence of the problem, providing context and specifics about what went wrong.
     */
    detail: string;
    /**
     * A URI reference that identifies the specific occurrence of the problem.
     */
    instance?: string | undefined;
    /**
     * A unique identifier for the request, useful for troubleshooting.
     */
    requestId?: string | undefined;
    /**
     * A short code indicating the error code returned.
     */
    code: Code;
    /**
     * Legacy error format for backward compatibility.
     */
    error: ErrorT;
};
export declare class BadRequest extends Error {
    /**
     * A short, human-readable summary of the problem type.
     */
    title: string;
    /**
     * The HTTP status code.
     */
    status: number;
    /**
     * A detailed explanation specific to this occurrence of the problem, providing context and specifics about what went wrong.
     */
    detail: string;
    /**
     * A URI reference that identifies the specific occurrence of the problem.
     */
    instance?: string | undefined;
    /**
     * A unique identifier for the request, useful for troubleshooting.
     */
    requestId?: string | undefined;
    /**
     * A short code indicating the error code returned.
     */
    code: Code;
    /**
     * Legacy error format for backward compatibility.
     */
    error: ErrorT;
    /** The original data that was passed to this error instance. */
    data$: BadRequestData;
    constructor(err: BadRequestData);
}
/** @internal */
export declare const Code$inboundSchema: z.ZodNativeEnum<typeof Code>;
/** @internal */
export declare const Code$outboundSchema: z.ZodNativeEnum<typeof Code>;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export declare namespace Code$ {
    /** @deprecated use `Code$inboundSchema` instead. */
    const inboundSchema: z.ZodNativeEnum<{
        readonly BadRequest: "bad_request";
    }>;
    /** @deprecated use `Code$outboundSchema` instead. */
    const outboundSchema: z.ZodNativeEnum<{
        readonly BadRequest: "bad_request";
    }>;
}
/** @internal */
export declare const BadRequestCode$inboundSchema: z.ZodNativeEnum<typeof BadRequestCode>;
/** @internal */
export declare const BadRequestCode$outboundSchema: z.ZodNativeEnum<typeof BadRequestCode>;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export declare namespace BadRequestCode$ {
    /** @deprecated use `BadRequestCode$inboundSchema` instead. */
    const inboundSchema: z.ZodNativeEnum<{
        readonly BadRequest: "bad_request";
    }>;
    /** @deprecated use `BadRequestCode$outboundSchema` instead. */
    const outboundSchema: z.ZodNativeEnum<{
        readonly BadRequest: "bad_request";
    }>;
}
/** @internal */
export declare const ErrorT$inboundSchema: z.ZodType<ErrorT, z.ZodTypeDef, unknown>;
/** @internal */
export type ErrorT$Outbound = {
    code: string;
    message: string;
};
/** @internal */
export declare const ErrorT$outboundSchema: z.ZodType<ErrorT$Outbound, z.ZodTypeDef, ErrorT>;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export declare namespace ErrorT$ {
    /** @deprecated use `ErrorT$inboundSchema` instead. */
    const inboundSchema: z.ZodType<ErrorT, z.ZodTypeDef, unknown>;
    /** @deprecated use `ErrorT$outboundSchema` instead. */
    const outboundSchema: z.ZodType<ErrorT$Outbound, z.ZodTypeDef, ErrorT>;
    /** @deprecated use `ErrorT$Outbound` instead. */
    type Outbound = ErrorT$Outbound;
}
export declare function errorToJSON(errorT: ErrorT): string;
export declare function errorFromJSON(jsonString: string): SafeParseResult<ErrorT, SDKValidationError>;
/** @internal */
export declare const BadRequest$inboundSchema: z.ZodType<BadRequest, z.ZodTypeDef, unknown>;
/** @internal */
export type BadRequest$Outbound = {
    title: string;
    status: number;
    detail: string;
    instance?: string | undefined;
    requestId?: string | undefined;
    code: string;
    error: ErrorT$Outbound;
};
/** @internal */
export declare const BadRequest$outboundSchema: z.ZodType<BadRequest$Outbound, z.ZodTypeDef, BadRequest>;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export declare namespace BadRequest$ {
    /** @deprecated use `BadRequest$inboundSchema` instead. */
    const inboundSchema: z.ZodType<BadRequest, z.ZodTypeDef, unknown>;
    /** @deprecated use `BadRequest$outboundSchema` instead. */
    const outboundSchema: z.ZodType<BadRequest$Outbound, z.ZodTypeDef, BadRequest>;
    /** @deprecated use `BadRequest$Outbound` instead. */
    type Outbound = BadRequest$Outbound;
}
//# sourceMappingURL=badrequest.d.ts.map