/* * 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 { AuthStartRequestSubjectDeviceAuthenticatorPassive, AuthStartRequestSubjectDeviceAuthenticatorPassive$inboundSchema, AuthStartRequestSubjectDeviceAuthenticatorPassive$Outbound, AuthStartRequestSubjectDeviceAuthenticatorPassive$outboundSchema, } from "./authstartrequestsubjectdeviceauthenticatorpassive.js"; export type AuthStartRequestSubjectDeviceAuthenticators = { passive?: AuthStartRequestSubjectDeviceAuthenticatorPassive | undefined; }; /** @internal */ export const AuthStartRequestSubjectDeviceAuthenticators$inboundSchema: z.ZodType< AuthStartRequestSubjectDeviceAuthenticators, z.ZodTypeDef, unknown > = z.object({ passive: AuthStartRequestSubjectDeviceAuthenticatorPassive$inboundSchema .optional(), }); /** @internal */ export type AuthStartRequestSubjectDeviceAuthenticators$Outbound = { passive?: | AuthStartRequestSubjectDeviceAuthenticatorPassive$Outbound | undefined; }; /** @internal */ export const AuthStartRequestSubjectDeviceAuthenticators$outboundSchema: z.ZodType< AuthStartRequestSubjectDeviceAuthenticators$Outbound, z.ZodTypeDef, AuthStartRequestSubjectDeviceAuthenticators > = z.object({ passive: AuthStartRequestSubjectDeviceAuthenticatorPassive$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 AuthStartRequestSubjectDeviceAuthenticators$ { /** @deprecated use `AuthStartRequestSubjectDeviceAuthenticators$inboundSchema` instead. */ export const inboundSchema = AuthStartRequestSubjectDeviceAuthenticators$inboundSchema; /** @deprecated use `AuthStartRequestSubjectDeviceAuthenticators$outboundSchema` instead. */ export const outboundSchema = AuthStartRequestSubjectDeviceAuthenticators$outboundSchema; /** @deprecated use `AuthStartRequestSubjectDeviceAuthenticators$Outbound` instead. */ export type Outbound = AuthStartRequestSubjectDeviceAuthenticators$Outbound; } export function authStartRequestSubjectDeviceAuthenticatorsToJSON( authStartRequestSubjectDeviceAuthenticators: AuthStartRequestSubjectDeviceAuthenticators, ): string { return JSON.stringify( AuthStartRequestSubjectDeviceAuthenticators$outboundSchema.parse( authStartRequestSubjectDeviceAuthenticators, ), ); } export function authStartRequestSubjectDeviceAuthenticatorsFromJSON( jsonString: string, ): SafeParseResult< AuthStartRequestSubjectDeviceAuthenticators, SDKValidationError > { return safeParse( jsonString, (x) => AuthStartRequestSubjectDeviceAuthenticators$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'AuthStartRequestSubjectDeviceAuthenticators' from JSON`, ); }