/* * 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 ContactsFilter = { /** * Name of the contact to filter on */ name?: string | undefined; /** * First name of the contact to filter on */ firstName?: string | undefined; /** * Last name of the contact to filter on */ lastName?: string | undefined; /** * Email of the contact to filter on */ email?: string | undefined; /** * Phone number of the contact to filter on */ phoneNumber?: string | undefined; /** * Unique identifier for the associated company of the contact to filter on */ companyId?: string | undefined; /** * Unique identifier for the owner of the contact to filter on */ ownerId?: string | undefined; updatedSince?: Date | undefined; createdSince?: Date | undefined; }; /** @internal */ export type ContactsFilter$Outbound = { name?: string | undefined; first_name?: string | undefined; last_name?: string | undefined; email?: string | undefined; phone_number?: string | undefined; company_id?: string | undefined; owner_id?: string | undefined; updated_since?: string | undefined; created_since?: string | undefined; }; /** @internal */ export const ContactsFilter$outboundSchema: z.ZodType< ContactsFilter$Outbound, z.ZodTypeDef, ContactsFilter > = /* @__PURE__ */ lazySchema$(() => z.object({ name: z.string().optional(), firstName: z.string().optional(), lastName: z.string().optional(), email: z.string().optional(), phoneNumber: z.string().optional(), companyId: z.string().optional(), ownerId: z.string().optional(), updatedSince: z.date().transform(v => v.toISOString()).optional(), createdSince: z.date().transform(v => v.toISOString()).optional(), }).transform((v) => { return remap$(v, { firstName: "first_name", lastName: "last_name", phoneNumber: "phone_number", companyId: "company_id", ownerId: "owner_id", updatedSince: "updated_since", createdSince: "created_since", }); }) ); export function contactsFilterToJSON(contactsFilter: ContactsFilter): string { return JSON.stringify(ContactsFilter$outboundSchema.parse(contactsFilter)); }