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