/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { safeParse } from "../lib/schemas.js"; import { Result as SafeParseResult } from "../types/fp.js"; import * as types from "../types/primitives.js"; import { SDKValidationError } from "./errors/sdk-validation-error.js"; export type Resource = { url: string; description?: string | undefined; mimeType?: string | undefined; }; /** @internal */ export const Resource$inboundSchema: z.ZodMiniType = z .object({ url: types.string(), description: types.optional(types.string()), mimeType: types.optional(types.string()), }); export function resourceFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => Resource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Resource' from JSON`, ); }