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