/* * 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"; export type ItemListNextPage = { /** * The cursor value to use for the next page of items. */ cursor: string; }; /** @internal */ export const ItemListNextPage$inboundSchema: z.ZodType< ItemListNextPage, z.ZodTypeDef, unknown > = z.object({ cursor: z.string(), }); /** @internal */ export type ItemListNextPage$Outbound = { cursor: string; }; /** @internal */ export const ItemListNextPage$outboundSchema: z.ZodType< ItemListNextPage$Outbound, z.ZodTypeDef, ItemListNextPage > = z.object({ cursor: z.string(), }); export function itemListNextPageToJSON( itemListNextPage: ItemListNextPage, ): string { return JSON.stringify( ItemListNextPage$outboundSchema.parse(itemListNextPage), ); } export function itemListNextPageFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ItemListNextPage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ItemListNextPage' from JSON`, ); }