/* * 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 AgedReportFilter = { /** * Filter by customer id */ customerId?: string | undefined; /** * Filter by supplier id */ supplierId?: string | undefined; /** * The cutoff date for considering transactions */ reportAsOfDate?: string | undefined; /** * Number of periods to split the aged creditors report into */ periodCount?: number | undefined; /** * Length of each period in days */ periodLength?: number | undefined; }; /** @internal */ export type AgedReportFilter$Outbound = { customer_id?: string | undefined; supplier_id?: string | undefined; report_as_of_date?: string | undefined; period_count?: number | undefined; period_length?: number | undefined; }; /** @internal */ export const AgedReportFilter$outboundSchema: z.ZodType< AgedReportFilter$Outbound, z.ZodTypeDef, AgedReportFilter > = /* @__PURE__ */ lazySchema$(() => z.object({ customerId: z.string().optional(), supplierId: z.string().optional(), reportAsOfDate: z.string().optional(), periodCount: z.number().int().optional(), periodLength: z.number().int().optional(), }).transform((v) => { return remap$(v, { customerId: "customer_id", supplierId: "supplier_id", reportAsOfDate: "report_as_of_date", periodCount: "period_count", periodLength: "period_length", }); }) ); export function agedReportFilterToJSON( agedReportFilter: AgedReportFilter, ): string { return JSON.stringify( AgedReportFilter$outboundSchema.parse(agedReportFilter), ); }