/* * 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 AuthStartRequestSubjectDeviceAuthenticatorPassive = { /** * AllowPasscodeFallback specifies whether passcode is allowed as a fallback protection for device in-app step-up keys. */ allowPasscodeFallback?: boolean | undefined; /** * UserVerificationLevel accepts 'required', 'preferred' or 'discouraged' as a value to specify biometric verification with FIDO. */ userVerificationLevel?: string | undefined; }; /** @internal */ export const AuthStartRequestSubjectDeviceAuthenticatorPassive$inboundSchema: z.ZodType< AuthStartRequestSubjectDeviceAuthenticatorPassive, z.ZodTypeDef, unknown > = z.object({ allowPasscodeFallback: z.boolean().optional(), userVerificationLevel: z.string().optional(), }); /** @internal */ export type AuthStartRequestSubjectDeviceAuthenticatorPassive$Outbound = { allowPasscodeFallback?: boolean | undefined; userVerificationLevel?: string | undefined; }; /** @internal */ export const AuthStartRequestSubjectDeviceAuthenticatorPassive$outboundSchema: z.ZodType< AuthStartRequestSubjectDeviceAuthenticatorPassive$Outbound, z.ZodTypeDef, AuthStartRequestSubjectDeviceAuthenticatorPassive > = z.object({ allowPasscodeFallback: z.boolean().optional(), 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 AuthStartRequestSubjectDeviceAuthenticatorPassive$ { /** @deprecated use `AuthStartRequestSubjectDeviceAuthenticatorPassive$inboundSchema` instead. */ export const inboundSchema = AuthStartRequestSubjectDeviceAuthenticatorPassive$inboundSchema; /** @deprecated use `AuthStartRequestSubjectDeviceAuthenticatorPassive$outboundSchema` instead. */ export const outboundSchema = AuthStartRequestSubjectDeviceAuthenticatorPassive$outboundSchema; /** @deprecated use `AuthStartRequestSubjectDeviceAuthenticatorPassive$Outbound` instead. */ export type Outbound = AuthStartRequestSubjectDeviceAuthenticatorPassive$Outbound; } export function authStartRequestSubjectDeviceAuthenticatorPassiveToJSON( authStartRequestSubjectDeviceAuthenticatorPassive: AuthStartRequestSubjectDeviceAuthenticatorPassive, ): string { return JSON.stringify( AuthStartRequestSubjectDeviceAuthenticatorPassive$outboundSchema.parse( authStartRequestSubjectDeviceAuthenticatorPassive, ), ); } export function authStartRequestSubjectDeviceAuthenticatorPassiveFromJSON( jsonString: string, ): SafeParseResult< AuthStartRequestSubjectDeviceAuthenticatorPassive, SDKValidationError > { return safeParse( jsonString, (x) => AuthStartRequestSubjectDeviceAuthenticatorPassive$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'AuthStartRequestSubjectDeviceAuthenticatorPassive' from JSON`, ); }