/* * 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 EcommerceCustomersFilter = { /** * Customer email address to filter on */ email?: string | undefined; /** * Customer phone number to filter on */ phoneNumber?: string | undefined; /** * Filter by customer IDs. Specify multiple IDs as a comma-separated string. */ customerIds?: string | undefined; /** * Minimum date the customer was last modified */ updatedSince?: string | undefined; /** * Minimum date the customer was created */ createdSince?: string | undefined; }; /** @internal */ export type EcommerceCustomersFilter$Outbound = { email?: string | undefined; phone_number?: string | undefined; customer_ids?: string | undefined; updated_since?: string | undefined; created_since?: string | undefined; }; /** @internal */ export const EcommerceCustomersFilter$outboundSchema: z.ZodType< EcommerceCustomersFilter$Outbound, z.ZodTypeDef, EcommerceCustomersFilter > = /* @__PURE__ */ lazySchema$(() => z.object({ email: z.string().optional(), phoneNumber: z.string().optional(), customerIds: z.string().optional(), updatedSince: z.string().optional(), createdSince: z.string().optional(), }).transform((v) => { return remap$(v, { phoneNumber: "phone_number", customerIds: "customer_ids", updatedSince: "updated_since", createdSince: "created_since", }); }) ); export function ecommerceCustomersFilterToJSON( ecommerceCustomersFilter: EcommerceCustomersFilter, ): string { return JSON.stringify( EcommerceCustomersFilter$outboundSchema.parse(ecommerceCustomersFilter), ); }