/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 3d34a5ca9eed */ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { ChatFile, ChatFile$inboundSchema } from "./chatfile.js"; export type GetChatFilesResponse = { /** * A map of file IDs to ChatFile structs. */ files?: { [k: string]: ChatFile } | undefined; }; /** @internal */ export const GetChatFilesResponse$inboundSchema: z.ZodType< GetChatFilesResponse, z.ZodTypeDef, unknown > = z.object({ files: z.record(ChatFile$inboundSchema).optional(), }); export function getChatFilesResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => GetChatFilesResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetChatFilesResponse' from JSON`, ); }