/* * 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 IdentityItem = { /** * The name of the client associated with the identity. */ clientName: string; /** * The Prove-generated unique ID for the specific identity. */ identityId: string; /** * The Prove Customer ID (PCID) associated with the identity. */ pcid: string; }; /** @internal */ export const IdentityItem$inboundSchema: z.ZodType< IdentityItem, z.ZodTypeDef, unknown > = z.object({ clientName: z.string(), identityId: z.string(), pcid: z.string(), }); /** @internal */ export type IdentityItem$Outbound = { clientName: string; identityId: string; pcid: string; }; /** @internal */ export const IdentityItem$outboundSchema: z.ZodType< IdentityItem$Outbound, z.ZodTypeDef, IdentityItem > = z.object({ clientName: z.string(), identityId: z.string(), pcid: 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 IdentityItem$ { /** @deprecated use `IdentityItem$inboundSchema` instead. */ export const inboundSchema = IdentityItem$inboundSchema; /** @deprecated use `IdentityItem$outboundSchema` instead. */ export const outboundSchema = IdentityItem$outboundSchema; /** @deprecated use `IdentityItem$Outbound` instead. */ export type Outbound = IdentityItem$Outbound; } export function identityItemToJSON(identityItem: IdentityItem): string { return JSON.stringify(IdentityItem$outboundSchema.parse(identityItem)); } export function identityItemFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => IdentityItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'IdentityItem' from JSON`, ); }