/* * 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 SalesOrdersFilter = { updatedSince?: Date | undefined; createdSince?: Date | undefined; /** * Sales order number to search for */ number?: string | undefined; /** * Filter by customer id */ customerId?: 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; }; /** @internal */ export type SalesOrdersFilter$Outbound = { updated_since?: string | undefined; created_since?: string | undefined; number?: string | undefined; customer_id?: string | undefined; subsidiary_id?: string | undefined; }; /** @internal */ export const SalesOrdersFilter$outboundSchema: z.ZodType< SalesOrdersFilter$Outbound, z.ZodTypeDef, SalesOrdersFilter > = /* @__PURE__ */ lazySchema$(() => z.object({ updatedSince: z.date().transform(v => v.toISOString()).optional(), createdSince: z.date().transform(v => v.toISOString()).optional(), number: z.string().optional(), customerId: z.string().optional(), subsidiaryId: z.string().optional(), }).transform((v) => { return remap$(v, { updatedSince: "updated_since", createdSince: "created_since", customerId: "customer_id", subsidiaryId: "subsidiary_id", }); }) ); export function salesOrdersFilterToJSON( salesOrdersFilter: SalesOrdersFilter, ): string { return JSON.stringify( SalesOrdersFilter$outboundSchema.parse(salesOrdersFilter), ); }