/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: c68813abe092
 */
import * as z from "zod/v4";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
import { smartUnion } from "../../types/smartUnion.js";
/** @internal */
export const AgentConversationAgentVersion$inboundSchema = smartUnion([z.string(), z.int()]);
export function agentConversationAgentVersionFromJSON(jsonString) {
    return safeParse(jsonString, (x) => AgentConversationAgentVersion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AgentConversationAgentVersion' from JSON`);
}
/** @internal */
export const AgentConversation$inboundSchema = z.object({
    name: z.nullable(z.string()).optional(),
    description: z.nullable(z.string()).optional(),
    metadata: z.nullable(z.record(z.string(), z.any())).optional(),
    object: z.literal("conversation").default("conversation"),
    id: z.string(),
    created_at: z.iso.datetime({ offset: true }).transform(v => new Date(v)),
    updated_at: z.iso.datetime({ offset: true }).transform(v => new Date(v)),
    agent_id: z.string(),
    agent_version: z.nullable(smartUnion([z.string(), z.int()])).optional(),
}).transform((v) => {
    return remap$(v, {
        "created_at": "createdAt",
        "updated_at": "updatedAt",
        "agent_id": "agentId",
        "agent_version": "agentVersion",
    });
});
export function agentConversationFromJSON(jsonString) {
    return safeParse(jsonString, (x) => AgentConversation$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AgentConversation' from JSON`);
}
//# sourceMappingURL=agentconversation.js.map