/* * 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"; import { UploadLink, UploadLink$inboundSchema, UploadLink$Outbound, UploadLink$outboundSchema, } from "./uploadlink.js"; /** * List of signed links to upload documents. */ export type BatchCreateUploadLinksResponse = { /** * The list of signed links used to upload documents */ uploadLink?: Array | undefined; }; /** @internal */ export const BatchCreateUploadLinksResponse$inboundSchema: z.ZodType< BatchCreateUploadLinksResponse, z.ZodTypeDef, unknown > = z.object({ upload_link: z.array(UploadLink$inboundSchema).optional(), }).transform((v) => { return remap$(v, { "upload_link": "uploadLink", }); }); /** @internal */ export type BatchCreateUploadLinksResponse$Outbound = { upload_link?: Array | undefined; }; /** @internal */ export const BatchCreateUploadLinksResponse$outboundSchema: z.ZodType< BatchCreateUploadLinksResponse$Outbound, z.ZodTypeDef, BatchCreateUploadLinksResponse > = z.object({ uploadLink: z.array(UploadLink$outboundSchema).optional(), }).transform((v) => { return remap$(v, { uploadLink: "upload_link", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace BatchCreateUploadLinksResponse$ { /** @deprecated use `BatchCreateUploadLinksResponse$inboundSchema` instead. */ export const inboundSchema = BatchCreateUploadLinksResponse$inboundSchema; /** @deprecated use `BatchCreateUploadLinksResponse$outboundSchema` instead. */ export const outboundSchema = BatchCreateUploadLinksResponse$outboundSchema; /** @deprecated use `BatchCreateUploadLinksResponse$Outbound` instead. */ export type Outbound = BatchCreateUploadLinksResponse$Outbound; } export function batchCreateUploadLinksResponseToJSON( batchCreateUploadLinksResponse: BatchCreateUploadLinksResponse, ): string { return JSON.stringify( BatchCreateUploadLinksResponse$outboundSchema.parse( batchCreateUploadLinksResponse, ), ); } export function batchCreateUploadLinksResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => BatchCreateUploadLinksResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BatchCreateUploadLinksResponse' from JSON`, ); }