/* * 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 LayeredSearchResponse = { query: string; layers: { [k: string]: Array }; totals: { [k: string]: number }; }; /** @internal */ export const LayeredSearchResponse$inboundSchema: z.ZodMiniType< LayeredSearchResponse, unknown > = z.object({ query: types.string(), layers: z.record(z.string(), z.array(z.any())), totals: z.record(z.string(), types.number()), }); export function layeredSearchResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => LayeredSearchResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LayeredSearchResponse' from JSON`, ); }