/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { lazySchema as lazySchema$ } from "../../lib/schemas.js"; import * as openEnums from "../../types/enums.js"; import { OpenEnum } from "../../types/enums.js"; import { SortDirection, SortDirection$outboundSchema, } from "./sortdirection.js"; /** * The field on which to sort the Bills */ export const By = { UpdatedAt: "updated_at", CreatedAt: "created_at", Id: "id", } as const; /** * The field on which to sort the Bills */ export type By = OpenEnum; export type BillsSort = { /** * The field on which to sort the Bills */ by?: By | undefined; /** * The direction in which to sort the results */ direction?: SortDirection | undefined; }; /** @internal */ export const By$outboundSchema: z.ZodType = /* @__PURE__ */ lazySchema$(() => openEnums.outboundSchema(By)); /** @internal */ export type BillsSort$Outbound = { by?: string | undefined; direction: string; }; /** @internal */ export const BillsSort$outboundSchema: z.ZodType< BillsSort$Outbound, z.ZodTypeDef, BillsSort > = /* @__PURE__ */ lazySchema$(() => z.object({ by: By$outboundSchema.optional(), direction: SortDirection$outboundSchema.default("asc"), }) ); export function billsSortToJSON(billsSort: BillsSort): string { return JSON.stringify(BillsSort$outboundSchema.parse(billsSort)); }