/* * 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 { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * Custom response - returns identity verification documentIds added to investigation request */ export type LinkDocumentsResponse = { /** * Document IDs from identity verification result object */ identityVerificationDocumentIds?: Array | undefined; /** * Required: The ID of the investigation The format is "investigations/{investigation}" */ name?: string | undefined; }; /** @internal */ export const LinkDocumentsResponse$inboundSchema: z.ZodType< LinkDocumentsResponse, z.ZodTypeDef, unknown > = z.object({ identity_verification_document_ids: z.array(z.string()).optional(), name: z.string().optional(), }).transform((v) => { return remap$(v, { "identity_verification_document_ids": "identityVerificationDocumentIds", }); }); /** @internal */ export type LinkDocumentsResponse$Outbound = { identity_verification_document_ids?: Array | undefined; name?: string | undefined; }; /** @internal */ export const LinkDocumentsResponse$outboundSchema: z.ZodType< LinkDocumentsResponse$Outbound, z.ZodTypeDef, LinkDocumentsResponse > = z.object({ identityVerificationDocumentIds: z.array(z.string()).optional(), name: z.string().optional(), }).transform((v) => { return remap$(v, { identityVerificationDocumentIds: "identity_verification_document_ids", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace LinkDocumentsResponse$ { /** @deprecated use `LinkDocumentsResponse$inboundSchema` instead. */ export const inboundSchema = LinkDocumentsResponse$inboundSchema; /** @deprecated use `LinkDocumentsResponse$outboundSchema` instead. */ export const outboundSchema = LinkDocumentsResponse$outboundSchema; /** @deprecated use `LinkDocumentsResponse$Outbound` instead. */ export type Outbound = LinkDocumentsResponse$Outbound; } export function linkDocumentsResponseToJSON( linkDocumentsResponse: LinkDocumentsResponse, ): string { return JSON.stringify( LinkDocumentsResponse$outboundSchema.parse(linkDocumentsResponse), ); } export function linkDocumentsResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => LinkDocumentsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LinkDocumentsResponse' from JSON`, ); }