/* * 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 { lazySchema as lazySchema$, safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as types from "../../types/primitives.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type SupportedProperty = { /** * Name of the property in our Unified API. */ unifiedProperty?: string | undefined; /** * List of child properties of the unified property. */ childProperties?: Array | undefined; }; /** @internal */ export const SupportedProperty$inboundSchema: z.ZodType< SupportedProperty, z.ZodTypeDef, unknown > = /* @__PURE__ */ lazySchema$(() => z.object({ unified_property: types.optional(types.string()), child_properties: types.optional( z.array(z.lazy(() => SupportedProperty$inboundSchema)), ), }).transform((v) => { return remap$(v, { "unified_property": "unifiedProperty", "child_properties": "childProperties", }); }) ); export function supportedPropertyFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => SupportedProperty$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SupportedProperty' from JSON`, ); }