/* * 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 V3DisenrollIdentityRequest = { /** * A Prove-generated unique ID for a specific 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 V3DisenrollIdentityResponse = { httpMeta: components.HTTPMetadata; /** * V3DisenrollIdentityResponse */ v3DisenrollIdentityResponse?: | components.V3DisenrollIdentityResponse | undefined; }; /** @internal */ export const V3DisenrollIdentityRequest$inboundSchema: z.ZodType< V3DisenrollIdentityRequest, z.ZodTypeDef, unknown > = z.object({ proveId: z.string(), clientRequestId: z.string().optional(), }); /** @internal */ export type V3DisenrollIdentityRequest$Outbound = { proveId: string; clientRequestId?: string | undefined; }; /** @internal */ export const V3DisenrollIdentityRequest$outboundSchema: z.ZodType< V3DisenrollIdentityRequest$Outbound, z.ZodTypeDef, V3DisenrollIdentityRequest > = 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 V3DisenrollIdentityRequest$ { /** @deprecated use `V3DisenrollIdentityRequest$inboundSchema` instead. */ export const inboundSchema = V3DisenrollIdentityRequest$inboundSchema; /** @deprecated use `V3DisenrollIdentityRequest$outboundSchema` instead. */ export const outboundSchema = V3DisenrollIdentityRequest$outboundSchema; /** @deprecated use `V3DisenrollIdentityRequest$Outbound` instead. */ export type Outbound = V3DisenrollIdentityRequest$Outbound; } export function v3DisenrollIdentityRequestToJSON( v3DisenrollIdentityRequest: V3DisenrollIdentityRequest, ): string { return JSON.stringify( V3DisenrollIdentityRequest$outboundSchema.parse(v3DisenrollIdentityRequest), ); } export function v3DisenrollIdentityRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => V3DisenrollIdentityRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'V3DisenrollIdentityRequest' from JSON`, ); } /** @internal */ export const V3DisenrollIdentityResponse$inboundSchema: z.ZodType< V3DisenrollIdentityResponse, z.ZodTypeDef, unknown > = z.object({ HttpMeta: components.HTTPMetadata$inboundSchema, V3DisenrollIdentityResponse: components .V3DisenrollIdentityResponse$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "V3DisenrollIdentityResponse": "v3DisenrollIdentityResponse", }); }); /** @internal */ export type V3DisenrollIdentityResponse$Outbound = { HttpMeta: components.HTTPMetadata$Outbound; V3DisenrollIdentityResponse?: | components.V3DisenrollIdentityResponse$Outbound | undefined; }; /** @internal */ export const V3DisenrollIdentityResponse$outboundSchema: z.ZodType< V3DisenrollIdentityResponse$Outbound, z.ZodTypeDef, V3DisenrollIdentityResponse > = z.object({ httpMeta: components.HTTPMetadata$outboundSchema, v3DisenrollIdentityResponse: components .V3DisenrollIdentityResponse$outboundSchema.optional(), }).transform((v) => { return remap$(v, { httpMeta: "HttpMeta", v3DisenrollIdentityResponse: "V3DisenrollIdentityResponse", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace V3DisenrollIdentityResponse$ { /** @deprecated use `V3DisenrollIdentityResponse$inboundSchema` instead. */ export const inboundSchema = V3DisenrollIdentityResponse$inboundSchema; /** @deprecated use `V3DisenrollIdentityResponse$outboundSchema` instead. */ export const outboundSchema = V3DisenrollIdentityResponse$outboundSchema; /** @deprecated use `V3DisenrollIdentityResponse$Outbound` instead. */ export type Outbound = V3DisenrollIdentityResponse$Outbound; } export function v3DisenrollIdentityResponseToJSON( v3DisenrollIdentityResponse: V3DisenrollIdentityResponse, ): string { return JSON.stringify( V3DisenrollIdentityResponse$outboundSchema.parse( v3DisenrollIdentityResponse, ), ); } export function v3DisenrollIdentityResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => V3DisenrollIdentityResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'V3DisenrollIdentityResponse' from JSON`, ); }