/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */

import * as z from "zod/v3";
import { remap as remap$ } from "../../lib/primitives.js";

export type AgentsApiV1AgentsListVersionsRequest = {
  agentId: string;
  /**
   * Page number (0-indexed)
   */
  page?: number | undefined;
  /**
   * Number of versions per page
   */
  pageSize?: number | undefined;
};

/** @internal */
export type AgentsApiV1AgentsListVersionsRequest$Outbound = {
  agent_id: string;
  page: number;
  page_size: number;
};

/** @internal */
export const AgentsApiV1AgentsListVersionsRequest$outboundSchema: z.ZodType<
  AgentsApiV1AgentsListVersionsRequest$Outbound,
  z.ZodTypeDef,
  AgentsApiV1AgentsListVersionsRequest
> = z.object({
  agentId: z.string(),
  page: z.number().int().default(0),
  pageSize: z.number().int().default(20),
}).transform((v) => {
  return remap$(v, {
    agentId: "agent_id",
    pageSize: "page_size",
  });
});

export function agentsApiV1AgentsListVersionsRequestToJSON(
  agentsApiV1AgentsListVersionsRequest: AgentsApiV1AgentsListVersionsRequest,
): string {
  return JSON.stringify(
    AgentsApiV1AgentsListVersionsRequest$outboundSchema.parse(
      agentsApiV1AgentsListVersionsRequest,
    ),
  );
}
