/* * 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 AuthContinueResponseSubjectMobileResult = { error?: AuthContinueResponseError | undefined; /** * Success will be true if the bind was successful. */ success: boolean; }; /** @internal */ export const AuthContinueResponseSubjectMobileResult$inboundSchema: z.ZodType< AuthContinueResponseSubjectMobileResult, z.ZodTypeDef, unknown > = z.object({ error: AuthContinueResponseError$inboundSchema.optional(), success: z.boolean(), }); /** @internal */ export type AuthContinueResponseSubjectMobileResult$Outbound = { error?: AuthContinueResponseError$Outbound | undefined; success: boolean; }; /** @internal */ export const AuthContinueResponseSubjectMobileResult$outboundSchema: z.ZodType< AuthContinueResponseSubjectMobileResult$Outbound, z.ZodTypeDef, AuthContinueResponseSubjectMobileResult > = z.object({ error: AuthContinueResponseError$outboundSchema.optional(), success: z.boolean(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AuthContinueResponseSubjectMobileResult$ { /** @deprecated use `AuthContinueResponseSubjectMobileResult$inboundSchema` instead. */ export const inboundSchema = AuthContinueResponseSubjectMobileResult$inboundSchema; /** @deprecated use `AuthContinueResponseSubjectMobileResult$outboundSchema` instead. */ export const outboundSchema = AuthContinueResponseSubjectMobileResult$outboundSchema; /** @deprecated use `AuthContinueResponseSubjectMobileResult$Outbound` instead. */ export type Outbound = AuthContinueResponseSubjectMobileResult$Outbound; } export function authContinueResponseSubjectMobileResultToJSON( authContinueResponseSubjectMobileResult: AuthContinueResponseSubjectMobileResult, ): string { return JSON.stringify( AuthContinueResponseSubjectMobileResult$outboundSchema.parse( authContinueResponseSubjectMobileResult, ), ); } export function authContinueResponseSubjectMobileResultFromJSON( jsonString: string, ): SafeParseResult< AuthContinueResponseSubjectMobileResult, SDKValidationError > { return safeParse( jsonString, (x) => AuthContinueResponseSubjectMobileResult$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'AuthContinueResponseSubjectMobileResult' from JSON`, ); }