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