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