/* * 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 CompaniesFilter = { /** * Name of the company to filter on */ name?: string | undefined; updatedSince?: Date | undefined; createdSince?: Date | undefined; }; /** @internal */ export type CompaniesFilter$Outbound = { name?: string | undefined; updated_since?: string | undefined; created_since?: string | undefined; }; /** @internal */ export const CompaniesFilter$outboundSchema: z.ZodType< CompaniesFilter$Outbound, z.ZodTypeDef, CompaniesFilter > = /* @__PURE__ */ lazySchema$(() => z.object({ name: z.string().optional(), updatedSince: z.date().transform(v => v.toISOString()).optional(), createdSince: z.date().transform(v => v.toISOString()).optional(), }).transform((v) => { return remap$(v, { updatedSince: "updated_since", createdSince: "created_since", }); }) ); export function companiesFilterToJSON( companiesFilter: CompaniesFilter, ): string { return JSON.stringify(CompaniesFilter$outboundSchema.parse(companiesFilter)); }