/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { safeParse } from "../lib/schemas.js"; import { Result as SafeParseResult } from "../types/fp.js"; import * as types from "../types/primitives.js"; import { SDKValidationError } from "./errors/sdk-validation-error.js"; /** * Where this page is in the full list. */ export type Pagination = { /** * The current page, starting at 1. */ page: number; /** * Number of items per page. */ pageSize: number; /** * Total number of items. */ total: number; /** * Total number of pages. */ totalPages: number; /** * Whether there is a next page. */ hasMore: boolean; }; /** @internal */ export const Pagination$inboundSchema: z.ZodMiniType = z .object({ page: types.number(), pageSize: types.number(), total: types.number(), totalPages: types.number(), hasMore: types.boolean(), }); export function paginationFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => Pagination$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Pagination' from JSON`, ); }