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