/* * 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 { FieldValuePair, FieldValuePair$Outbound, FieldValuePair$outboundSchema, } from "./fieldvaluepair.js"; export type CountCondition = { /** * Field-value pairs to count matches for. Must target fields from the same nested object and may contain at most 5 pairs per group. */ fieldValuePairs: Array | null; }; /** @internal */ export type CountCondition$Outbound = { field_value_pairs: Array | null; }; /** @internal */ export const CountCondition$outboundSchema: z.ZodType< CountCondition$Outbound, z.ZodTypeDef, CountCondition > = z.object({ fieldValuePairs: z.nullable(z.array(FieldValuePair$outboundSchema)), }).transform((v) => { return remap$(v, { fieldValuePairs: "field_value_pairs", }); }); export function countConditionToJSON(countCondition: CountCondition): string { return JSON.stringify(CountCondition$outboundSchema.parse(countCondition)); }