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