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

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

export type AgentsApiV1ConversationsAppendRequest = {
  /**
   * ID of the conversation to which we append entries.
   */
  conversationId: string;
  conversationAppendRequest: components.ConversationAppendRequest;
};

/** @internal */
export type AgentsApiV1ConversationsAppendRequest$Outbound = {
  conversation_id: string;
  ConversationAppendRequest: components.ConversationAppendRequest$Outbound;
};

/** @internal */
export const AgentsApiV1ConversationsAppendRequest$outboundSchema: z.ZodType<
  AgentsApiV1ConversationsAppendRequest$Outbound,
  AgentsApiV1ConversationsAppendRequest
> = z.object({
  conversationId: z.string(),
  conversationAppendRequest:
    components.ConversationAppendRequest$outboundSchema,
}).transform((v) => {
  return remap$(v, {
    conversationId: "conversation_id",
    conversationAppendRequest: "ConversationAppendRequest",
  });
});

export function agentsApiV1ConversationsAppendRequestToJSON(
  agentsApiV1ConversationsAppendRequest: AgentsApiV1ConversationsAppendRequest,
): string {
  return JSON.stringify(
    AgentsApiV1ConversationsAppendRequest$outboundSchema.parse(
      agentsApiV1ConversationsAppendRequest,
    ),
  );
}
