/* * 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"; import { Links, Links$inboundSchema } from "./links.js"; import { PushOperation, PushOperation$inboundSchema } from "./pushoperation.js"; export type PushOperations = { results?: Array | undefined; /** * Current page number. */ pageNumber: number; /** * Number of items to return in results array. */ pageSize: number; /** * Total number of items. */ totalResults: number; links: Links; }; /** @internal */ export const PushOperations$inboundSchema: z.ZodType< PushOperations, z.ZodTypeDef, unknown > = z.object({ results: z.array(PushOperation$inboundSchema).optional(), pageNumber: z.number().int(), pageSize: z.number().int(), totalResults: z.number().int(), _links: Links$inboundSchema, }).transform((v) => { return remap$(v, { "_links": "links", }); }); export function pushOperationsFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PushOperations$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PushOperations' from JSON`, ); }