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