/* * 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"; import { IdentityItem, IdentityItem$inboundSchema, IdentityItem$Outbound, IdentityItem$outboundSchema, } from "./identityitem.js"; /** * Request body for the V3 Batch Enroll Identities API. */ export type V3BatchEnrollIdentitiesRequest = { /** * 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; items?: Array | undefined; }; /** @internal */ export const V3BatchEnrollIdentitiesRequest$inboundSchema: z.ZodType< V3BatchEnrollIdentitiesRequest, z.ZodTypeDef, unknown > = z.object({ clientRequestId: z.string().optional(), items: z.array(IdentityItem$inboundSchema).optional(), }); /** @internal */ export type V3BatchEnrollIdentitiesRequest$Outbound = { clientRequestId?: string | undefined; items?: Array | undefined; }; /** @internal */ export const V3BatchEnrollIdentitiesRequest$outboundSchema: z.ZodType< V3BatchEnrollIdentitiesRequest$Outbound, z.ZodTypeDef, V3BatchEnrollIdentitiesRequest > = z.object({ clientRequestId: z.string().optional(), items: z.array(IdentityItem$outboundSchema).optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace V3BatchEnrollIdentitiesRequest$ { /** @deprecated use `V3BatchEnrollIdentitiesRequest$inboundSchema` instead. */ export const inboundSchema = V3BatchEnrollIdentitiesRequest$inboundSchema; /** @deprecated use `V3BatchEnrollIdentitiesRequest$outboundSchema` instead. */ export const outboundSchema = V3BatchEnrollIdentitiesRequest$outboundSchema; /** @deprecated use `V3BatchEnrollIdentitiesRequest$Outbound` instead. */ export type Outbound = V3BatchEnrollIdentitiesRequest$Outbound; } export function v3BatchEnrollIdentitiesRequestToJSON( v3BatchEnrollIdentitiesRequest: V3BatchEnrollIdentitiesRequest, ): string { return JSON.stringify( V3BatchEnrollIdentitiesRequest$outboundSchema.parse( v3BatchEnrollIdentitiesRequest, ), ); } export function v3BatchEnrollIdentitiesRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => V3BatchEnrollIdentitiesRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'V3BatchEnrollIdentitiesRequest' from JSON`, ); }