/* * 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 AuthStartRequestSubjectUserAuthenticatorPassive = { /** * UserVerificationLevel accepts 'required', 'preferred' or 'discouraged' as a value to specify biometric verification with FIDO. */ userVerificationLevel?: string | undefined; }; /** @internal */ export const AuthStartRequestSubjectUserAuthenticatorPassive$inboundSchema: z.ZodType< AuthStartRequestSubjectUserAuthenticatorPassive, z.ZodTypeDef, unknown > = z.object({ userVerificationLevel: z.string().optional(), }); /** @internal */ export type AuthStartRequestSubjectUserAuthenticatorPassive$Outbound = { userVerificationLevel?: string | undefined; }; /** @internal */ export const AuthStartRequestSubjectUserAuthenticatorPassive$outboundSchema: z.ZodType< AuthStartRequestSubjectUserAuthenticatorPassive$Outbound, z.ZodTypeDef, AuthStartRequestSubjectUserAuthenticatorPassive > = z.object({ userVerificationLevel: 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 AuthStartRequestSubjectUserAuthenticatorPassive$ { /** @deprecated use `AuthStartRequestSubjectUserAuthenticatorPassive$inboundSchema` instead. */ export const inboundSchema = AuthStartRequestSubjectUserAuthenticatorPassive$inboundSchema; /** @deprecated use `AuthStartRequestSubjectUserAuthenticatorPassive$outboundSchema` instead. */ export const outboundSchema = AuthStartRequestSubjectUserAuthenticatorPassive$outboundSchema; /** @deprecated use `AuthStartRequestSubjectUserAuthenticatorPassive$Outbound` instead. */ export type Outbound = AuthStartRequestSubjectUserAuthenticatorPassive$Outbound; } export function authStartRequestSubjectUserAuthenticatorPassiveToJSON( authStartRequestSubjectUserAuthenticatorPassive: AuthStartRequestSubjectUserAuthenticatorPassive, ): string { return JSON.stringify( AuthStartRequestSubjectUserAuthenticatorPassive$outboundSchema.parse( authStartRequestSubjectUserAuthenticatorPassive, ), ); } export function authStartRequestSubjectUserAuthenticatorPassiveFromJSON( jsonString: string, ): SafeParseResult< AuthStartRequestSubjectUserAuthenticatorPassive, SDKValidationError > { return safeParse( jsonString, (x) => AuthStartRequestSubjectUserAuthenticatorPassive$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'AuthStartRequestSubjectUserAuthenticatorPassive' from JSON`, ); }