/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { HalRef, HalRef$inboundSchema } from "./halref.js"; export type Links = { self: HalRef; current: HalRef; next?: HalRef | undefined; previous?: HalRef | undefined; }; /** @internal */ export const Links$inboundSchema: z.ZodType = z .object({ self: HalRef$inboundSchema, current: HalRef$inboundSchema, next: HalRef$inboundSchema.optional(), previous: HalRef$inboundSchema.optional(), }); export function linksFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => Links$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Links' from JSON`, ); }