/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as types from "../../types/primitives.js"; import { DebugTrackerStatus, DebugTrackerStatus$inboundSchema, } from "./debug-tracker-status.js"; import { ErrorResponse, ErrorResponse$inboundSchema, } from "./error-response.js"; import { MatchedPrice, MatchedPrice$inboundSchema } from "./matched-price.js"; import { SDKValidationError } from "./sdk-validation-error.js"; export type PriceLookupResult = { error?: ErrorResponse | undefined; matchedPrices?: Array | undefined; status?: DebugTrackerStatus | undefined; }; /** @internal */ export const PriceLookupResult$inboundSchema: z.ZodMiniType< PriceLookupResult, unknown > = z.pipe( z.object({ error: types.optional(ErrorResponse$inboundSchema), matched_prices: types.optional(z.array(MatchedPrice$inboundSchema)), status: types.optional(DebugTrackerStatus$inboundSchema), }), z.transform((v) => { return remap$(v, { "matched_prices": "matchedPrices", }); }), ); export function priceLookupResultFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PriceLookupResult$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PriceLookupResult' from JSON`, ); }