/* * 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 V3UnifyBindRequest = { /** * A client-generated unique ID for a specific session. This can be used to identify specific requests. * * @remarks * The format of this ID is defined by the client - Prove recommends using a GUID, but any format can be accepted. * Do not include Personally Identifiable Information (PII) in this field. */ clientRequestId?: string | undefined; /** * The unique ID that Prove generates for the flow. It is returned * * @remarks * from the v3/unify endpoint and cannot be reused outside of a single flow. */ correlationId: string; /** * The mobile phone number. US and Canada phone numbers can be passed in with or without a leading `+1`. * * @remarks * International phone numbers require a leading `+` followed by the country code. Use the appropriate endpoint URL * based on the region the number originates from. Acceptable characters are: alphanumeric with symbols '+'. */ phoneNumber: string; }; /** @internal */ export const V3UnifyBindRequest$inboundSchema: z.ZodType< V3UnifyBindRequest, z.ZodTypeDef, unknown > = z.object({ clientRequestId: z.string().optional(), correlationId: z.string(), phoneNumber: z.string(), }); /** @internal */ export type V3UnifyBindRequest$Outbound = { clientRequestId?: string | undefined; correlationId: string; phoneNumber: string; }; /** @internal */ export const V3UnifyBindRequest$outboundSchema: z.ZodType< V3UnifyBindRequest$Outbound, z.ZodTypeDef, V3UnifyBindRequest > = z.object({ clientRequestId: z.string().optional(), correlationId: z.string(), phoneNumber: z.string(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace V3UnifyBindRequest$ { /** @deprecated use `V3UnifyBindRequest$inboundSchema` instead. */ export const inboundSchema = V3UnifyBindRequest$inboundSchema; /** @deprecated use `V3UnifyBindRequest$outboundSchema` instead. */ export const outboundSchema = V3UnifyBindRequest$outboundSchema; /** @deprecated use `V3UnifyBindRequest$Outbound` instead. */ export type Outbound = V3UnifyBindRequest$Outbound; } export function v3UnifyBindRequestToJSON( v3UnifyBindRequest: V3UnifyBindRequest, ): string { return JSON.stringify( V3UnifyBindRequest$outboundSchema.parse(v3UnifyBindRequest), ); } export function v3UnifyBindRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => V3UnifyBindRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'V3UnifyBindRequest' from JSON`, ); }