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