/* * 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 AuthFinishResponseSubjectMobileResultSuccessExtras = { /** * IpMatch informs whether the Instant Link was clicked on the device that has the same public IP address as the web application that started the Instant Link process. * * @remarks * Possible results: success, failure */ ipMatch?: string | undefined; /** * LinkClicked informs of whether the Instant Link was clicked before it expired (5-minute limit). */ linkClicked?: boolean | undefined; /** * MobileCountryCode is the country code of the mobile number. */ mobileCountryCode?: string | undefined; /** * MobileOperatorName is the name of the mobile network operator of the mobile number. */ mobileOperatorName?: string | undefined; /** * PayfoneAlias is the Prove alias of the mobile number. */ payfoneAlias?: string | undefined; /** * PhoneMatch indicates if, the Instant Link was clicked on by the intended mobile device. * * @remarks * Possible results: success, failure, indeterminate */ phoneMatch?: string | undefined; }; /** @internal */ export const AuthFinishResponseSubjectMobileResultSuccessExtras$inboundSchema: z.ZodType< AuthFinishResponseSubjectMobileResultSuccessExtras, z.ZodTypeDef, unknown > = z.object({ ipMatch: z.string().optional(), linkClicked: z.boolean().optional(), mobileCountryCode: z.string().optional(), mobileOperatorName: z.string().optional(), payfoneAlias: z.string().optional(), phoneMatch: z.string().optional(), }); /** @internal */ export type AuthFinishResponseSubjectMobileResultSuccessExtras$Outbound = { ipMatch?: string | undefined; linkClicked?: boolean | undefined; mobileCountryCode?: string | undefined; mobileOperatorName?: string | undefined; payfoneAlias?: string | undefined; phoneMatch?: string | undefined; }; /** @internal */ export const AuthFinishResponseSubjectMobileResultSuccessExtras$outboundSchema: z.ZodType< AuthFinishResponseSubjectMobileResultSuccessExtras$Outbound, z.ZodTypeDef, AuthFinishResponseSubjectMobileResultSuccessExtras > = z.object({ ipMatch: z.string().optional(), linkClicked: z.boolean().optional(), mobileCountryCode: z.string().optional(), mobileOperatorName: z.string().optional(), payfoneAlias: z.string().optional(), phoneMatch: 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 AuthFinishResponseSubjectMobileResultSuccessExtras$ { /** @deprecated use `AuthFinishResponseSubjectMobileResultSuccessExtras$inboundSchema` instead. */ export const inboundSchema = AuthFinishResponseSubjectMobileResultSuccessExtras$inboundSchema; /** @deprecated use `AuthFinishResponseSubjectMobileResultSuccessExtras$outboundSchema` instead. */ export const outboundSchema = AuthFinishResponseSubjectMobileResultSuccessExtras$outboundSchema; /** @deprecated use `AuthFinishResponseSubjectMobileResultSuccessExtras$Outbound` instead. */ export type Outbound = AuthFinishResponseSubjectMobileResultSuccessExtras$Outbound; } export function authFinishResponseSubjectMobileResultSuccessExtrasToJSON( authFinishResponseSubjectMobileResultSuccessExtras: AuthFinishResponseSubjectMobileResultSuccessExtras, ): string { return JSON.stringify( AuthFinishResponseSubjectMobileResultSuccessExtras$outboundSchema.parse( authFinishResponseSubjectMobileResultSuccessExtras, ), ); } export function authFinishResponseSubjectMobileResultSuccessExtrasFromJSON( jsonString: string, ): SafeParseResult< AuthFinishResponseSubjectMobileResultSuccessExtras, SDKValidationError > { return safeParse( jsonString, (x) => AuthFinishResponseSubjectMobileResultSuccessExtras$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'AuthFinishResponseSubjectMobileResultSuccessExtras' from JSON`, ); }