/* * 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 { AuthStartRequestSubjectMobileAuthenticatorInstant, AuthStartRequestSubjectMobileAuthenticatorInstant$inboundSchema, AuthStartRequestSubjectMobileAuthenticatorInstant$Outbound, AuthStartRequestSubjectMobileAuthenticatorInstant$outboundSchema, } from "./authstartrequestsubjectmobileauthenticatorinstant.js"; import { AuthStartRequestSubjectMobileAuthenticatorInstantLink, AuthStartRequestSubjectMobileAuthenticatorInstantLink$inboundSchema, AuthStartRequestSubjectMobileAuthenticatorInstantLink$Outbound, AuthStartRequestSubjectMobileAuthenticatorInstantLink$outboundSchema, } from "./authstartrequestsubjectmobileauthenticatorinstantlink.js"; import { AuthStartRequestSubjectMobileAuthenticatorOTP, AuthStartRequestSubjectMobileAuthenticatorOTP$inboundSchema, AuthStartRequestSubjectMobileAuthenticatorOTP$Outbound, AuthStartRequestSubjectMobileAuthenticatorOTP$outboundSchema, } from "./authstartrequestsubjectmobileauthenticatorotp.js"; import { AuthStartRequestSubjectMobileAuthenticatorPassive, AuthStartRequestSubjectMobileAuthenticatorPassive$inboundSchema, AuthStartRequestSubjectMobileAuthenticatorPassive$Outbound, AuthStartRequestSubjectMobileAuthenticatorPassive$outboundSchema, } from "./authstartrequestsubjectmobileauthenticatorpassive.js"; import { AuthStartRequestSubjectMobileAuthenticatorUniversal, AuthStartRequestSubjectMobileAuthenticatorUniversal$inboundSchema, AuthStartRequestSubjectMobileAuthenticatorUniversal$Outbound, AuthStartRequestSubjectMobileAuthenticatorUniversal$outboundSchema, } from "./authstartrequestsubjectmobileauthenticatoruniversal.js"; export type AuthStartRequestSubjectMobileAuthenticators = { instant?: AuthStartRequestSubjectMobileAuthenticatorInstant | undefined; instantlink?: | AuthStartRequestSubjectMobileAuthenticatorInstantLink | undefined; otp?: AuthStartRequestSubjectMobileAuthenticatorOTP | undefined; passive?: AuthStartRequestSubjectMobileAuthenticatorPassive | undefined; universal?: AuthStartRequestSubjectMobileAuthenticatorUniversal | undefined; }; /** @internal */ export const AuthStartRequestSubjectMobileAuthenticators$inboundSchema: z.ZodType< AuthStartRequestSubjectMobileAuthenticators, z.ZodTypeDef, unknown > = z.object({ instant: AuthStartRequestSubjectMobileAuthenticatorInstant$inboundSchema .optional(), instantlink: AuthStartRequestSubjectMobileAuthenticatorInstantLink$inboundSchema .optional(), otp: AuthStartRequestSubjectMobileAuthenticatorOTP$inboundSchema.optional(), passive: AuthStartRequestSubjectMobileAuthenticatorPassive$inboundSchema .optional(), universal: AuthStartRequestSubjectMobileAuthenticatorUniversal$inboundSchema .optional(), }); /** @internal */ export type AuthStartRequestSubjectMobileAuthenticators$Outbound = { instant?: | AuthStartRequestSubjectMobileAuthenticatorInstant$Outbound | undefined; instantlink?: | AuthStartRequestSubjectMobileAuthenticatorInstantLink$Outbound | undefined; otp?: AuthStartRequestSubjectMobileAuthenticatorOTP$Outbound | undefined; passive?: | AuthStartRequestSubjectMobileAuthenticatorPassive$Outbound | undefined; universal?: | AuthStartRequestSubjectMobileAuthenticatorUniversal$Outbound | undefined; }; /** @internal */ export const AuthStartRequestSubjectMobileAuthenticators$outboundSchema: z.ZodType< AuthStartRequestSubjectMobileAuthenticators$Outbound, z.ZodTypeDef, AuthStartRequestSubjectMobileAuthenticators > = z.object({ instant: AuthStartRequestSubjectMobileAuthenticatorInstant$outboundSchema .optional(), instantlink: AuthStartRequestSubjectMobileAuthenticatorInstantLink$outboundSchema .optional(), otp: AuthStartRequestSubjectMobileAuthenticatorOTP$outboundSchema .optional(), passive: AuthStartRequestSubjectMobileAuthenticatorPassive$outboundSchema .optional(), universal: AuthStartRequestSubjectMobileAuthenticatorUniversal$outboundSchema .optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AuthStartRequestSubjectMobileAuthenticators$ { /** @deprecated use `AuthStartRequestSubjectMobileAuthenticators$inboundSchema` instead. */ export const inboundSchema = AuthStartRequestSubjectMobileAuthenticators$inboundSchema; /** @deprecated use `AuthStartRequestSubjectMobileAuthenticators$outboundSchema` instead. */ export const outboundSchema = AuthStartRequestSubjectMobileAuthenticators$outboundSchema; /** @deprecated use `AuthStartRequestSubjectMobileAuthenticators$Outbound` instead. */ export type Outbound = AuthStartRequestSubjectMobileAuthenticators$Outbound; } export function authStartRequestSubjectMobileAuthenticatorsToJSON( authStartRequestSubjectMobileAuthenticators: AuthStartRequestSubjectMobileAuthenticators, ): string { return JSON.stringify( AuthStartRequestSubjectMobileAuthenticators$outboundSchema.parse( authStartRequestSubjectMobileAuthenticators, ), ); } export function authStartRequestSubjectMobileAuthenticatorsFromJSON( jsonString: string, ): SafeParseResult< AuthStartRequestSubjectMobileAuthenticators, SDKValidationError > { return safeParse( jsonString, (x) => AuthStartRequestSubjectMobileAuthenticators$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'AuthStartRequestSubjectMobileAuthenticators' from JSON`, ); }