/* * 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 AuthStartRequestSubjectMobileAuthenticatorUniversal = { /** * FinalTargetURL is the customer server URL that will be called back by Prove's Web page * * @remarks * after UPK registration/verification ceremony is done. */ finalTargetUrl: string; testMode?: string | undefined; }; /** @internal */ export const AuthStartRequestSubjectMobileAuthenticatorUniversal$inboundSchema: z.ZodType< AuthStartRequestSubjectMobileAuthenticatorUniversal, z.ZodTypeDef, unknown > = z.object({ finalTargetUrl: z.string(), testMode: z.string().optional(), }); /** @internal */ export type AuthStartRequestSubjectMobileAuthenticatorUniversal$Outbound = { finalTargetUrl: string; testMode?: string | undefined; }; /** @internal */ export const AuthStartRequestSubjectMobileAuthenticatorUniversal$outboundSchema: z.ZodType< AuthStartRequestSubjectMobileAuthenticatorUniversal$Outbound, z.ZodTypeDef, AuthStartRequestSubjectMobileAuthenticatorUniversal > = z.object({ finalTargetUrl: z.string(), 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 AuthStartRequestSubjectMobileAuthenticatorUniversal$ { /** @deprecated use `AuthStartRequestSubjectMobileAuthenticatorUniversal$inboundSchema` instead. */ export const inboundSchema = AuthStartRequestSubjectMobileAuthenticatorUniversal$inboundSchema; /** @deprecated use `AuthStartRequestSubjectMobileAuthenticatorUniversal$outboundSchema` instead. */ export const outboundSchema = AuthStartRequestSubjectMobileAuthenticatorUniversal$outboundSchema; /** @deprecated use `AuthStartRequestSubjectMobileAuthenticatorUniversal$Outbound` instead. */ export type Outbound = AuthStartRequestSubjectMobileAuthenticatorUniversal$Outbound; } export function authStartRequestSubjectMobileAuthenticatorUniversalToJSON( authStartRequestSubjectMobileAuthenticatorUniversal: AuthStartRequestSubjectMobileAuthenticatorUniversal, ): string { return JSON.stringify( AuthStartRequestSubjectMobileAuthenticatorUniversal$outboundSchema.parse( authStartRequestSubjectMobileAuthenticatorUniversal, ), ); } export function authStartRequestSubjectMobileAuthenticatorUniversalFromJSON( jsonString: string, ): SafeParseResult< AuthStartRequestSubjectMobileAuthenticatorUniversal, SDKValidationError > { return safeParse( jsonString, (x) => AuthStartRequestSubjectMobileAuthenticatorUniversal$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'AuthStartRequestSubjectMobileAuthenticatorUniversal' from JSON`, ); }