/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ 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 { OpenDirectoryFile, OpenDirectoryFile$inboundSchema, } from "./opendirectoryfile.js"; export type OpenDirectory = { files?: Array | null | undefined; recursive?: boolean | undefined; }; /** @internal */ export const OpenDirectory$inboundSchema: z.ZodType< OpenDirectory, z.ZodTypeDef, unknown > = z.object({ files: z.nullable(z.array(OpenDirectoryFile$inboundSchema)).optional(), recursive: z.boolean().optional(), }); export function openDirectoryFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => OpenDirectory$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OpenDirectory' from JSON`, ); }