/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type AuthenticationErrorDetail = { /** * HTTP status code */ code?: number | undefined; /** * Human-readable message describing the error occurrence */ message?: string | undefined; /** * Human-readable explanation of the underlying cause of the error */ reason?: string | undefined; request?: string | undefined; /** * HTTP status message associated with the error */ status?: string | undefined; }; /** @internal */ export const AuthenticationErrorDetail$inboundSchema: z.ZodType< AuthenticationErrorDetail, z.ZodTypeDef, unknown > = z.object({ code: z.number().int().optional(), message: z.string().optional(), reason: z.string().optional(), request: z.string().optional(), status: z.string().optional(), }); export function authenticationErrorDetailFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => AuthenticationErrorDetail$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AuthenticationErrorDetail' from JSON`, ); }