/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type AuthContinueResponseError = { /** * Code is an internal error code that describes the problem category of the request. */ code?: number | undefined; /** * Message is an error message describing the problem with the request. */ message: string; }; /** @internal */ export const AuthContinueResponseError$inboundSchema: z.ZodType< AuthContinueResponseError, z.ZodTypeDef, unknown > = z.object({ code: z.number().int().optional(), message: z.string(), }); /** @internal */ export type AuthContinueResponseError$Outbound = { code?: number | undefined; message: string; }; /** @internal */ export const AuthContinueResponseError$outboundSchema: z.ZodType< AuthContinueResponseError$Outbound, z.ZodTypeDef, AuthContinueResponseError > = z.object({ code: z.number().int().optional(), message: z.string(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AuthContinueResponseError$ { /** @deprecated use `AuthContinueResponseError$inboundSchema` instead. */ export const inboundSchema = AuthContinueResponseError$inboundSchema; /** @deprecated use `AuthContinueResponseError$outboundSchema` instead. */ export const outboundSchema = AuthContinueResponseError$outboundSchema; /** @deprecated use `AuthContinueResponseError$Outbound` instead. */ export type Outbound = AuthContinueResponseError$Outbound; } export function authContinueResponseErrorToJSON( authContinueResponseError: AuthContinueResponseError, ): string { return JSON.stringify( AuthContinueResponseError$outboundSchema.parse(authContinueResponseError), ); } export function authContinueResponseErrorFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => AuthContinueResponseError$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AuthContinueResponseError' from JSON`, ); }