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