/*
* 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 { SDKValidationError } from "../errors/sdkvalidationerror.js";
import { BatchShipment, BatchShipment$inboundSchema } from "./batchshipment.js";
/**
* Array of BatchShipment objects.
*
* @remarks
* The response keeps the same order as in the request array.
*/
export type BatchShipmentPaginatedList = {
next?: string | undefined;
previous?: string | undefined;
results?: Array | undefined;
};
/** @internal */
export const BatchShipmentPaginatedList$inboundSchema: z.ZodMiniType<
BatchShipmentPaginatedList,
unknown
> = z.object({
next: z.optional(z.string()),
previous: z.optional(z.string()),
results: z.optional(z.array(BatchShipment$inboundSchema)),
});
export function batchShipmentPaginatedListFromJSON(
jsonString: string,
): SafeParseResult {
return safeParse(
jsonString,
(x) => BatchShipmentPaginatedList$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'BatchShipmentPaginatedList' from JSON`,
);
}