/* * 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 General Ledger Transactions. */ export const GeneralLedgerTransactionsSortBy = { PostedAt: "posted_at", UpdatedAt: "updated_at", CreatedAt: "created_at", } as const; /** * The field on which to sort the General Ledger Transactions. */ export type GeneralLedgerTransactionsSortBy = OpenEnum< typeof GeneralLedgerTransactionsSortBy >; export type GeneralLedgerTransactionsSort = { /** * The field on which to sort the General Ledger Transactions. */ by?: GeneralLedgerTransactionsSortBy | undefined; /** * The direction in which to sort the results */ direction?: SortDirection | undefined; }; /** @internal */ export const GeneralLedgerTransactionsSortBy$outboundSchema: z.ZodType< string, z.ZodTypeDef, GeneralLedgerTransactionsSortBy > = /* @__PURE__ */ lazySchema$(() => openEnums.outboundSchema(GeneralLedgerTransactionsSortBy) ); /** @internal */ export type GeneralLedgerTransactionsSort$Outbound = { by?: string | undefined; direction: string; }; /** @internal */ export const GeneralLedgerTransactionsSort$outboundSchema: z.ZodType< GeneralLedgerTransactionsSort$Outbound, z.ZodTypeDef, GeneralLedgerTransactionsSort > = /* @__PURE__ */ lazySchema$(() => z.object({ by: GeneralLedgerTransactionsSortBy$outboundSchema.optional(), direction: SortDirection$outboundSchema.default("asc"), }) ); export function generalLedgerTransactionsSortToJSON( generalLedgerTransactionsSort: GeneralLedgerTransactionsSort, ): string { return JSON.stringify( GeneralLedgerTransactionsSort$outboundSchema.parse( generalLedgerTransactionsSort, ), ); }