/* * 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"; import { AuthContinueResponseError, AuthContinueResponseError$inboundSchema, AuthContinueResponseError$Outbound, AuthContinueResponseError$outboundSchema, } from "./authcontinueresponseerror.js"; export type AuthContinueResponseSubjectCardResult = { error?: AuthContinueResponseError | undefined; success?: boolean | undefined; }; /** @internal */ export const AuthContinueResponseSubjectCardResult$inboundSchema: z.ZodType< AuthContinueResponseSubjectCardResult, z.ZodTypeDef, unknown > = z.object({ error: AuthContinueResponseError$inboundSchema.optional(), success: z.boolean().optional(), }); /** @internal */ export type AuthContinueResponseSubjectCardResult$Outbound = { error?: AuthContinueResponseError$Outbound | undefined; success?: boolean | undefined; }; /** @internal */ export const AuthContinueResponseSubjectCardResult$outboundSchema: z.ZodType< AuthContinueResponseSubjectCardResult$Outbound, z.ZodTypeDef, AuthContinueResponseSubjectCardResult > = z.object({ error: AuthContinueResponseError$outboundSchema.optional(), success: z.boolean().optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AuthContinueResponseSubjectCardResult$ { /** @deprecated use `AuthContinueResponseSubjectCardResult$inboundSchema` instead. */ export const inboundSchema = AuthContinueResponseSubjectCardResult$inboundSchema; /** @deprecated use `AuthContinueResponseSubjectCardResult$outboundSchema` instead. */ export const outboundSchema = AuthContinueResponseSubjectCardResult$outboundSchema; /** @deprecated use `AuthContinueResponseSubjectCardResult$Outbound` instead. */ export type Outbound = AuthContinueResponseSubjectCardResult$Outbound; } export function authContinueResponseSubjectCardResultToJSON( authContinueResponseSubjectCardResult: AuthContinueResponseSubjectCardResult, ): string { return JSON.stringify( AuthContinueResponseSubjectCardResult$outboundSchema.parse( authContinueResponseSubjectCardResult, ), ); } export function authContinueResponseSubjectCardResultFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => AuthContinueResponseSubjectCardResult$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AuthContinueResponseSubjectCardResult' from JSON`, ); }