/* * 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 AuthStartRequestSubjectMobileClaim = { /** * MobileNumber will be used when performing OTP fallback and will not use the optional value provided by the SDK. * * @remarks * Mobile number may be prefixed with a plus sign, but does not need to be for US. A plus sign is required for * international. */ mobileNumber?: string | undefined; }; /** @internal */ export const AuthStartRequestSubjectMobileClaim$inboundSchema: z.ZodType< AuthStartRequestSubjectMobileClaim, z.ZodTypeDef, unknown > = z.object({ mobileNumber: z.string().optional(), }); /** @internal */ export type AuthStartRequestSubjectMobileClaim$Outbound = { mobileNumber?: string | undefined; }; /** @internal */ export const AuthStartRequestSubjectMobileClaim$outboundSchema: z.ZodType< AuthStartRequestSubjectMobileClaim$Outbound, z.ZodTypeDef, AuthStartRequestSubjectMobileClaim > = z.object({ mobileNumber: 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 AuthStartRequestSubjectMobileClaim$ { /** @deprecated use `AuthStartRequestSubjectMobileClaim$inboundSchema` instead. */ export const inboundSchema = AuthStartRequestSubjectMobileClaim$inboundSchema; /** @deprecated use `AuthStartRequestSubjectMobileClaim$outboundSchema` instead. */ export const outboundSchema = AuthStartRequestSubjectMobileClaim$outboundSchema; /** @deprecated use `AuthStartRequestSubjectMobileClaim$Outbound` instead. */ export type Outbound = AuthStartRequestSubjectMobileClaim$Outbound; } export function authStartRequestSubjectMobileClaimToJSON( authStartRequestSubjectMobileClaim: AuthStartRequestSubjectMobileClaim, ): string { return JSON.stringify( AuthStartRequestSubjectMobileClaim$outboundSchema.parse( authStartRequestSubjectMobileClaim, ), ); } export function authStartRequestSubjectMobileClaimFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => AuthStartRequestSubjectMobileClaim$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AuthStartRequestSubjectMobileClaim' from JSON`, ); }