import * as z from "zod"; import { Result as SafeParseResult } from "../../../types/fp.js"; import { SDKValidationError } from "./sdkvalidationerror.js"; export type ServerErrorLocation = { file: string; row: number; col: number; }; export type ServerErrorErrors = { code: string; message: string; location?: ServerErrorLocation | undefined; }; /** * Server Error */ export type ServerErrorData = { code: string; message: string; errors?: Array | undefined; decisionId?: string | undefined; }; /** * Server Error */ export declare class ServerError extends Error { code: string; errors?: Array | undefined; decisionId?: string | undefined; /** The original data that was passed to this error instance. */ data$: ServerErrorData; constructor(err: ServerErrorData); } /** @internal */ export declare const ServerErrorLocation$inboundSchema: z.ZodType; /** @internal */ export type ServerErrorLocation$Outbound = { file: string; row: number; col: number; }; /** @internal */ export declare const ServerErrorLocation$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace ServerErrorLocation$ { /** @deprecated use `ServerErrorLocation$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `ServerErrorLocation$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `ServerErrorLocation$Outbound` instead. */ type Outbound = ServerErrorLocation$Outbound; } export declare function serverErrorLocationToJSON(serverErrorLocation: ServerErrorLocation): string; export declare function serverErrorLocationFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const ServerErrorErrors$inboundSchema: z.ZodType; /** @internal */ export type ServerErrorErrors$Outbound = { code: string; message: string; location?: ServerErrorLocation$Outbound | undefined; }; /** @internal */ export declare const ServerErrorErrors$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace ServerErrorErrors$ { /** @deprecated use `ServerErrorErrors$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `ServerErrorErrors$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `ServerErrorErrors$Outbound` instead. */ type Outbound = ServerErrorErrors$Outbound; } export declare function serverErrorErrorsToJSON(serverErrorErrors: ServerErrorErrors): string; export declare function serverErrorErrorsFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const ServerError$inboundSchema: z.ZodType; /** @internal */ export type ServerError$Outbound = { code: string; message: string; errors?: Array | undefined; decision_id?: string | undefined; }; /** @internal */ export declare const ServerError$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace ServerError$ { /** @deprecated use `ServerError$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `ServerError$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `ServerError$Outbound` instead. */ type Outbound = ServerError$Outbound; } //# sourceMappingURL=servererror.d.ts.map