/* * 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 V3UnifyStatusRequest = { /** * 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; }; /** @internal */ export const V3UnifyStatusRequest$inboundSchema: z.ZodType< V3UnifyStatusRequest, z.ZodTypeDef, unknown > = z.object({ clientRequestId: z.string().optional(), correlationId: z.string(), }); /** @internal */ export type V3UnifyStatusRequest$Outbound = { clientRequestId?: string | undefined; correlationId: string; }; /** @internal */ export const V3UnifyStatusRequest$outboundSchema: z.ZodType< V3UnifyStatusRequest$Outbound, z.ZodTypeDef, V3UnifyStatusRequest > = z.object({ clientRequestId: z.string().optional(), correlationId: 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 V3UnifyStatusRequest$ { /** @deprecated use `V3UnifyStatusRequest$inboundSchema` instead. */ export const inboundSchema = V3UnifyStatusRequest$inboundSchema; /** @deprecated use `V3UnifyStatusRequest$outboundSchema` instead. */ export const outboundSchema = V3UnifyStatusRequest$outboundSchema; /** @deprecated use `V3UnifyStatusRequest$Outbound` instead. */ export type Outbound = V3UnifyStatusRequest$Outbound; } export function v3UnifyStatusRequestToJSON( v3UnifyStatusRequest: V3UnifyStatusRequest, ): string { return JSON.stringify( V3UnifyStatusRequest$outboundSchema.parse(v3UnifyStatusRequest), ); } export function v3UnifyStatusRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => V3UnifyStatusRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'V3UnifyStatusRequest' from JSON`, ); }