/* * 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 NotesFilter = { /** * Title of the note to filter on */ title?: string | undefined; /** * Owner ID to filter on */ ownerId?: string | undefined; /** * Unique identifier of the contact to filter notes on */ contactId?: string | undefined; /** * Unique identifier of the company to filter notes on */ companyId?: string | undefined; /** * Unique identifier of the opportunity to filter notes on */ opportunityId?: string | undefined; updatedSince?: Date | undefined; createdSince?: Date | undefined; }; /** @internal */ export type NotesFilter$Outbound = { title?: string | undefined; owner_id?: string | undefined; contact_id?: string | undefined; company_id?: string | undefined; opportunity_id?: string | undefined; updated_since?: string | undefined; created_since?: string | undefined; }; /** @internal */ export const NotesFilter$outboundSchema: z.ZodType< NotesFilter$Outbound, z.ZodTypeDef, NotesFilter > = /* @__PURE__ */ lazySchema$(() => z.object({ title: z.string().optional(), ownerId: z.string().optional(), contactId: z.string().optional(), companyId: z.string().optional(), opportunityId: z.string().optional(), updatedSince: z.date().transform(v => v.toISOString()).optional(), createdSince: z.date().transform(v => v.toISOString()).optional(), }).transform((v) => { return remap$(v, { ownerId: "owner_id", contactId: "contact_id", companyId: "company_id", opportunityId: "opportunity_id", updatedSince: "updated_since", createdSince: "created_since", }); }) ); export function notesFilterToJSON(notesFilter: NotesFilter): string { return JSON.stringify(NotesFilter$outboundSchema.parse(notesFilter)); }