Skip to content

AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents

470 B
Raw Blame
import * as z from "zod/mini";
import { BasePropertySchema, TPropertyValue } from "./common";
import { PropertyType } from "./property-type";

export const JsonProperty = z.object({
  ...BasePropertySchema.shape,
  ...TPropertyValue(
    z.union([z.record(z.string(), z.unknown())]),
    PropertyType.JSON,
  ).shape,
});
export type JsonProperty<R extends boolean> = BasePropertySchema &
  TPropertyValue<
    Record<string, unknown>,
    PropertyType.JSON,
    R
  >;