/* * 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 Bill Credit Notes */ export const BillCreditNotesSortBy = { CreatedAt: "created_at", UpdatedAt: "updated_at", Id: "id", } as const; /** * The field on which to sort the Bill Credit Notes */ export type BillCreditNotesSortBy = OpenEnum; export type BillCreditNotesSort = { /** * The field on which to sort the Bill Credit Notes */ by?: BillCreditNotesSortBy | undefined; /** * The direction in which to sort the results */ direction?: SortDirection | undefined; }; /** @internal */ export const BillCreditNotesSortBy$outboundSchema: z.ZodType< string, z.ZodTypeDef, BillCreditNotesSortBy > = /* @__PURE__ */ lazySchema$(() => openEnums.outboundSchema(BillCreditNotesSortBy) ); /** @internal */ export type BillCreditNotesSort$Outbound = { by?: string | undefined; direction: string; }; /** @internal */ export const BillCreditNotesSort$outboundSchema: z.ZodType< BillCreditNotesSort$Outbound, z.ZodTypeDef, BillCreditNotesSort > = /* @__PURE__ */ lazySchema$(() => z.object({ by: BillCreditNotesSortBy$outboundSchema.optional(), direction: SortDirection$outboundSchema.default("asc"), }) ); export function billCreditNotesSortToJSON( billCreditNotesSort: BillCreditNotesSort, ): string { return JSON.stringify( BillCreditNotesSort$outboundSchema.parse(billCreditNotesSort), ); }