/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: e94063d48620
 */
import * as z from "zod/v4";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
/** @internal */
export const AgentHandoffEntry$inboundSchema = z.object({
    object: z.literal("entry").default("entry"),
    type: z.literal("agent.handoff").default("agent.handoff"),
    created_at: z.iso.datetime({ offset: true }).transform(v => new Date(v))
        .optional(),
    completed_at: z.nullable(z.iso.datetime({ offset: true }).transform(v => new Date(v))).optional(),
    id: z.string().optional(),
    previous_agent_id: z.string(),
    previous_agent_name: z.string(),
    next_agent_id: z.string(),
    next_agent_name: z.string(),
}).transform((v) => {
    return remap$(v, {
        "created_at": "createdAt",
        "completed_at": "completedAt",
        "previous_agent_id": "previousAgentId",
        "previous_agent_name": "previousAgentName",
        "next_agent_id": "nextAgentId",
        "next_agent_name": "nextAgentName",
    });
});
/** @internal */
export const AgentHandoffEntry$outboundSchema = z.object({
    object: z.literal("entry").default("entry"),
    type: z.literal("agent.handoff").default("agent.handoff"),
    createdAt: z.date().transform(v => v.toISOString()).optional(),
    completedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
    id: z.string().optional(),
    previousAgentId: z.string(),
    previousAgentName: z.string(),
    nextAgentId: z.string(),
    nextAgentName: z.string(),
}).transform((v) => {
    return remap$(v, {
        createdAt: "created_at",
        completedAt: "completed_at",
        previousAgentId: "previous_agent_id",
        previousAgentName: "previous_agent_name",
        nextAgentId: "next_agent_id",
        nextAgentName: "next_agent_name",
    });
});
export function agentHandoffEntryToJSON(agentHandoffEntry) {
    return JSON.stringify(AgentHandoffEntry$outboundSchema.parse(agentHandoffEntry));
}
export function agentHandoffEntryFromJSON(jsonString) {
    return safeParse(jsonString, (x) => AgentHandoffEntry$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AgentHandoffEntry' from JSON`);
}
//# sourceMappingURL=agenthandoffentry.js.map