/* * 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 { AuthStartRequestInstantAuthConsent, AuthStartRequestInstantAuthConsent$inboundSchema, AuthStartRequestInstantAuthConsent$Outbound, AuthStartRequestInstantAuthConsent$outboundSchema, } from "./authstartrequestinstantauthconsent.js"; export type AuthStartRequestSubjectMobileAuthenticatorInstant = { consent?: AuthStartRequestInstantAuthConsent | undefined; testMode?: string | undefined; }; /** @internal */ export const AuthStartRequestSubjectMobileAuthenticatorInstant$inboundSchema: z.ZodType< AuthStartRequestSubjectMobileAuthenticatorInstant, z.ZodTypeDef, unknown > = z.object({ consent: AuthStartRequestInstantAuthConsent$inboundSchema.optional(), testMode: z.string().optional(), }); /** @internal */ export type AuthStartRequestSubjectMobileAuthenticatorInstant$Outbound = { consent?: AuthStartRequestInstantAuthConsent$Outbound | undefined; testMode?: string | undefined; }; /** @internal */ export const AuthStartRequestSubjectMobileAuthenticatorInstant$outboundSchema: z.ZodType< AuthStartRequestSubjectMobileAuthenticatorInstant$Outbound, z.ZodTypeDef, AuthStartRequestSubjectMobileAuthenticatorInstant > = z.object({ consent: AuthStartRequestInstantAuthConsent$outboundSchema.optional(), testMode: z.string().optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AuthStartRequestSubjectMobileAuthenticatorInstant$ { /** @deprecated use `AuthStartRequestSubjectMobileAuthenticatorInstant$inboundSchema` instead. */ export const inboundSchema = AuthStartRequestSubjectMobileAuthenticatorInstant$inboundSchema; /** @deprecated use `AuthStartRequestSubjectMobileAuthenticatorInstant$outboundSchema` instead. */ export const outboundSchema = AuthStartRequestSubjectMobileAuthenticatorInstant$outboundSchema; /** @deprecated use `AuthStartRequestSubjectMobileAuthenticatorInstant$Outbound` instead. */ export type Outbound = AuthStartRequestSubjectMobileAuthenticatorInstant$Outbound; } export function authStartRequestSubjectMobileAuthenticatorInstantToJSON( authStartRequestSubjectMobileAuthenticatorInstant: AuthStartRequestSubjectMobileAuthenticatorInstant, ): string { return JSON.stringify( AuthStartRequestSubjectMobileAuthenticatorInstant$outboundSchema.parse( authStartRequestSubjectMobileAuthenticatorInstant, ), ); } export function authStartRequestSubjectMobileAuthenticatorInstantFromJSON( jsonString: string, ): SafeParseResult< AuthStartRequestSubjectMobileAuthenticatorInstant, SDKValidationError > { return safeParse( jsonString, (x) => AuthStartRequestSubjectMobileAuthenticatorInstant$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'AuthStartRequestSubjectMobileAuthenticatorInstant' from JSON`, ); }