/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; 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"; export type OpenDirectoryFile = { extension?: string | undefined; lastModified?: string | undefined; name?: string | undefined; path?: string | undefined; size?: number | undefined; suspiciousScore?: number | undefined; type?: string | undefined; }; /** @internal */ export const OpenDirectoryFile$inboundSchema: z.ZodType< OpenDirectoryFile, z.ZodTypeDef, unknown > = z.object({ extension: z.string().optional(), last_modified: z.string().optional(), name: z.string().optional(), path: z.string().optional(), size: z.number().int().optional(), suspicious_score: z.number().optional(), type: z.string().optional(), }).transform((v) => { return remap$(v, { "last_modified": "lastModified", "suspicious_score": "suspiciousScore", }); }); export function openDirectoryFileFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => OpenDirectoryFile$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OpenDirectoryFile' from JSON`, ); }