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