/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 8b10aa22c48a
 */
import * as z from "zod/v4";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
import * as openEnums from "../../types/enums.js";
export const FunctionCallEventConfirmationStatus = {
    Pending: "pending",
    Allowed: "allowed",
    Denied: "denied",
};
/** @internal */
export const FunctionCallEventConfirmationStatus$inboundSchema = openEnums.inboundSchema(FunctionCallEventConfirmationStatus);
/** @internal */
export const FunctionCallEvent$inboundSchema = z.object({
    type: z.literal("function.call.delta"),
    created_at: z.iso.datetime({ offset: true }).transform(v => new Date(v))
        .optional(),
    output_index: z.int().default(0),
    id: z.string(),
    model: z.nullable(z.string()).optional(),
    agent_id: z.nullable(z.string()).optional(),
    name: z.string(),
    tool_call_id: z.string(),
    arguments: z.string(),
    confirmation_status: z.nullable(FunctionCallEventConfirmationStatus$inboundSchema).optional(),
}).transform((v) => {
    return remap$(v, {
        "created_at": "createdAt",
        "output_index": "outputIndex",
        "agent_id": "agentId",
        "tool_call_id": "toolCallId",
        "confirmation_status": "confirmationStatus",
    });
});
export function functionCallEventFromJSON(jsonString) {
    return safeParse(jsonString, (x) => FunctionCallEvent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FunctionCallEvent' from JSON`);
}
//# sourceMappingURL=functioncallevent.js.map