/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as components from "../components/index.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type V3GetIdentityRequest = { /** * A unique Prove-generated identifier for the enrolled identity. */ proveId: string; /** * A client-generated unique ID for a specific session. This can be used to identify specific requests. 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; }; export type V3GetIdentityResponse = { httpMeta: components.HTTPMetadata; /** * V3GetIdentityResponse */ v3GetIdentityResponse?: components.V3GetIdentityResponse | undefined; }; /** @internal */ export const V3GetIdentityRequest$inboundSchema: z.ZodType< V3GetIdentityRequest, z.ZodTypeDef, unknown > = z.object({ proveId: z.string(), clientRequestId: z.string().optional(), }); /** @internal */ export type V3GetIdentityRequest$Outbound = { proveId: string; clientRequestId?: string | undefined; }; /** @internal */ export const V3GetIdentityRequest$outboundSchema: z.ZodType< V3GetIdentityRequest$Outbound, z.ZodTypeDef, V3GetIdentityRequest > = z.object({ proveId: z.string(), clientRequestId: 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 V3GetIdentityRequest$ { /** @deprecated use `V3GetIdentityRequest$inboundSchema` instead. */ export const inboundSchema = V3GetIdentityRequest$inboundSchema; /** @deprecated use `V3GetIdentityRequest$outboundSchema` instead. */ export const outboundSchema = V3GetIdentityRequest$outboundSchema; /** @deprecated use `V3GetIdentityRequest$Outbound` instead. */ export type Outbound = V3GetIdentityRequest$Outbound; } export function v3GetIdentityRequestToJSON( v3GetIdentityRequest: V3GetIdentityRequest, ): string { return JSON.stringify( V3GetIdentityRequest$outboundSchema.parse(v3GetIdentityRequest), ); } export function v3GetIdentityRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => V3GetIdentityRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'V3GetIdentityRequest' from JSON`, ); } /** @internal */ export const V3GetIdentityResponse$inboundSchema: z.ZodType< V3GetIdentityResponse, z.ZodTypeDef, unknown > = z.object({ HttpMeta: components.HTTPMetadata$inboundSchema, V3GetIdentityResponse: components.V3GetIdentityResponse$inboundSchema .optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "V3GetIdentityResponse": "v3GetIdentityResponse", }); }); /** @internal */ export type V3GetIdentityResponse$Outbound = { HttpMeta: components.HTTPMetadata$Outbound; V3GetIdentityResponse?: components.V3GetIdentityResponse$Outbound | undefined; }; /** @internal */ export const V3GetIdentityResponse$outboundSchema: z.ZodType< V3GetIdentityResponse$Outbound, z.ZodTypeDef, V3GetIdentityResponse > = z.object({ httpMeta: components.HTTPMetadata$outboundSchema, v3GetIdentityResponse: components.V3GetIdentityResponse$outboundSchema .optional(), }).transform((v) => { return remap$(v, { httpMeta: "HttpMeta", v3GetIdentityResponse: "V3GetIdentityResponse", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace V3GetIdentityResponse$ { /** @deprecated use `V3GetIdentityResponse$inboundSchema` instead. */ export const inboundSchema = V3GetIdentityResponse$inboundSchema; /** @deprecated use `V3GetIdentityResponse$outboundSchema` instead. */ export const outboundSchema = V3GetIdentityResponse$outboundSchema; /** @deprecated use `V3GetIdentityResponse$Outbound` instead. */ export type Outbound = V3GetIdentityResponse$Outbound; } export function v3GetIdentityResponseToJSON( v3GetIdentityResponse: V3GetIdentityResponse, ): string { return JSON.stringify( V3GetIdentityResponse$outboundSchema.parse(v3GetIdentityResponse), ); } export function v3GetIdentityResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => V3GetIdentityResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'V3GetIdentityResponse' from JSON`, ); }