/* * 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 BillCreditNotesFilter = { /** * Comma-separated list of bill credit note IDs to filter by (e.g. `12345,67890`). */ ids?: string | undefined; /** * Return records with a row ID greater than or equal to the given value */ idSince?: string | undefined; updatedSince?: Date | undefined; createdSince?: Date | undefined; /** * Bill credit note number to search for */ number?: string | undefined; /** * Filter by the subsidiary (legal entity) the record belongs to. Only honored on connectors that support multi-entity scoping (e.g. NetSuite OneWorld); ignored elsewhere. */ subsidiaryId?: string | undefined; /** * Filter by supplier id */ supplierId?: string | undefined; }; /** @internal */ export type BillCreditNotesFilter$Outbound = { ids?: string | undefined; id_since?: string | undefined; updated_since?: string | undefined; created_since?: string | undefined; number?: string | undefined; subsidiary_id?: string | undefined; supplier_id?: string | undefined; }; /** @internal */ export const BillCreditNotesFilter$outboundSchema: z.ZodType< BillCreditNotesFilter$Outbound, z.ZodTypeDef, BillCreditNotesFilter > = /* @__PURE__ */ lazySchema$(() => z.object({ ids: z.string().optional(), idSince: z.string().optional(), updatedSince: z.date().transform(v => v.toISOString()).optional(), createdSince: z.date().transform(v => v.toISOString()).optional(), number: z.string().optional(), subsidiaryId: z.string().optional(), supplierId: z.string().optional(), }).transform((v) => { return remap$(v, { idSince: "id_since", updatedSince: "updated_since", createdSince: "created_since", subsidiaryId: "subsidiary_id", supplierId: "supplier_id", }); }) ); export function billCreditNotesFilterToJSON( billCreditNotesFilter: BillCreditNotesFilter, ): string { return JSON.stringify( BillCreditNotesFilter$outboundSchema.parse(billCreditNotesFilter), ); }