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