/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import * as z from "zod/v4-mini";
import { remap as remap$ } from "../../lib/primitives.js";
import * as components from "../components/index.js";
export type AddShipmentsToBatchGlobals = {
/**
* Optional string used to pick a non-default API version to use. See our API version guide.
*/
shippoApiVersion?: string | undefined;
};
export type AddShipmentsToBatchRequest = {
/**
* Object ID of the batch
*/
batchId: string;
/**
* Array of shipments to add to the batch
*/
requestBody: Array;
};
/** @internal */
export type AddShipmentsToBatchRequest$Outbound = {
BatchId: string;
RequestBody: Array;
};
/** @internal */
export const AddShipmentsToBatchRequest$outboundSchema: z.ZodMiniType<
AddShipmentsToBatchRequest$Outbound,
AddShipmentsToBatchRequest
> = z.pipe(
z.object({
batchId: z.string(),
requestBody: z.array(components.BatchShipmentCreateRequest$outboundSchema),
}),
z.transform((v) => {
return remap$(v, {
batchId: "BatchId",
requestBody: "RequestBody",
});
}),
);
export function addShipmentsToBatchRequestToJSON(
addShipmentsToBatchRequest: AddShipmentsToBatchRequest,
): string {
return JSON.stringify(
AddShipmentsToBatchRequest$outboundSchema.parse(addShipmentsToBatchRequest),
);
}