/* * 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 AuthenticationResults = { /** * An indication of which mobile authentication method was used. */ mobile?: string | undefined; }; /** @internal */ export const AuthenticationResults$inboundSchema: z.ZodType< AuthenticationResults, z.ZodTypeDef, unknown > = z.object({ mobile: z.string().optional(), }); /** @internal */ export type AuthenticationResults$Outbound = { mobile?: string | undefined; }; /** @internal */ export const AuthenticationResults$outboundSchema: z.ZodType< AuthenticationResults$Outbound, z.ZodTypeDef, AuthenticationResults > = z.object({ mobile: 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 AuthenticationResults$ { /** @deprecated use `AuthenticationResults$inboundSchema` instead. */ export const inboundSchema = AuthenticationResults$inboundSchema; /** @deprecated use `AuthenticationResults$outboundSchema` instead. */ export const outboundSchema = AuthenticationResults$outboundSchema; /** @deprecated use `AuthenticationResults$Outbound` instead. */ export type Outbound = AuthenticationResults$Outbound; } export function authenticationResultsToJSON( authenticationResults: AuthenticationResults, ): string { return JSON.stringify( AuthenticationResults$outboundSchema.parse(authenticationResults), ); } export function authenticationResultsFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => AuthenticationResults$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AuthenticationResults' from JSON`, ); }