/* * 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$ } from "../../lib/schemas.js"; export type OpportunitiesFilter = { /** * Title of the opportunity to filter on */ title?: string | undefined; /** * Status to filter on */ status?: string | undefined; /** * Status ID to filter on */ statusId?: string | undefined; /** * Monetary amount to filter on */ monetaryAmount?: number | undefined; /** * Win probability to filter on */ winProbability?: number | undefined; /** * Company ID to filter on */ companyId?: string | undefined; /** * Owner ID to filter on */ ownerId?: string | undefined; /** * Primary contact ID to filter on */ primaryContactId?: string | undefined; }; /** @internal */ export type OpportunitiesFilter$Outbound = { title?: string | undefined; status?: string | undefined; status_id?: string | undefined; monetary_amount?: number | undefined; win_probability?: number | undefined; company_id?: string | undefined; owner_id?: string | undefined; primary_contact_id?: string | undefined; }; /** @internal */ export const OpportunitiesFilter$outboundSchema: z.ZodType< OpportunitiesFilter$Outbound, z.ZodTypeDef, OpportunitiesFilter > = /* @__PURE__ */ lazySchema$(() => z.object({ title: z.string().optional(), status: z.string().optional(), statusId: z.string().optional(), monetaryAmount: z.number().optional(), winProbability: z.number().optional(), companyId: z.string().optional(), ownerId: z.string().optional(), primaryContactId: z.string().optional(), }).transform((v) => { return remap$(v, { statusId: "status_id", monetaryAmount: "monetary_amount", winProbability: "win_probability", companyId: "company_id", ownerId: "owner_id", primaryContactId: "primary_contact_id", }); }) ); export function opportunitiesFilterToJSON( opportunitiesFilter: OpportunitiesFilter, ): string { return JSON.stringify( OpportunitiesFilter$outboundSchema.parse(opportunitiesFilter), ); }