/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type PaginationInfo = { /** * The token to use to retrieve the next page of results. */ nextPageToken?: string | undefined; /** * The number of results requested per page. */ pageSize: number; }; /** @internal */ export const PaginationInfo$inboundSchema: z.ZodType< PaginationInfo, z.ZodTypeDef, unknown > = z.object({ next_page_token: z.string().optional(), page_size: z.number().int(), }).transform((v) => { return remap$(v, { "next_page_token": "nextPageToken", "page_size": "pageSize", }); }); export function paginationInfoFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PaginationInfo$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PaginationInfo' from JSON`, ); }