"use strict";
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.ToolExecutionStartedStreamingEvent$inboundSchema = exports.ToolExecutionStartedStreamingEventData$inboundSchema = exports.ToolExecutionContext$inboundSchema = exports.Memory$inboundSchema = exports.Product$inboundSchema = exports.Product = void 0;
exports.memoryFromJSON = memoryFromJSON;
exports.toolExecutionContextFromJSON = toolExecutionContextFromJSON;
exports.toolExecutionStartedStreamingEventDataFromJSON = toolExecutionStartedStreamingEventDataFromJSON;
exports.toolExecutionStartedStreamingEventFromJSON = toolExecutionStartedStreamingEventFromJSON;
const z = __importStar(require("zod/v3"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
/**
 * Orquesta product
 */
exports.Product = {
    Remoteconfigs: "remoteconfigs",
    Deployments: "deployments",
    Experiments: "experiments",
    Playgrounds: "playgrounds",
    Spreadsheets: "spreadsheets",
    SpreadsheetRun: "spreadsheet_run",
    LlmEvaluator: "llm_evaluator",
    Knowledge: "knowledge",
    Router: "router",
    Workflows: "workflows",
    ExternalEvents: "external_events",
    Agents: "agents",
    MemoryStores: "memory-stores",
    Generic: "generic",
    Evaluators: "evaluators",
    Otel: "otel",
    AiChat: "ai-chat",
};
/** @internal */
exports.Product$inboundSchema = z
    .nativeEnum(exports.Product);
/** @internal */
exports.Memory$inboundSchema = z
    .object({
    entity_id: z.string(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "entity_id": "entityId",
    });
});
function memoryFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Memory$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Memory' from JSON`);
}
/** @internal */
exports.ToolExecutionContext$inboundSchema = z.object({
    action_id: z.string(),
    agent_tool_call_id: z.string(),
    workspace_id: z.string(),
    agent_manifest_id: z.string(),
    agent_execution_id: z.string(),
    product: exports.Product$inboundSchema,
    memory: z.lazy(() => exports.Memory$inboundSchema).optional(),
    parent_id: z.string().optional(),
    variables: z.record(z.any()).optional(),
    secret_keys: z.array(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "action_id": "actionId",
        "agent_tool_call_id": "agentToolCallId",
        "workspace_id": "workspaceId",
        "agent_manifest_id": "agentManifestId",
        "agent_execution_id": "agentExecutionId",
        "parent_id": "parentId",
        "secret_keys": "secretKeys",
    });
});
function toolExecutionContextFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ToolExecutionContext$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ToolExecutionContext' from JSON`);
}
/** @internal */
exports.ToolExecutionStartedStreamingEventData$inboundSchema = z.object({
    tool_id: z.string(),
    tool_key: z.string().optional(),
    tool_display_name: z.string().optional(),
    tool_description: z.nullable(z.string()).optional(),
    action_type: z.string(),
    tool_arguments: z.record(z.any()),
    tool_execution_context: z.lazy(() => exports.ToolExecutionContext$inboundSchema),
    responseId: z.string().optional(),
    workflowRunId: z.string(),
    stream: z.boolean().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "tool_id": "toolId",
        "tool_key": "toolKey",
        "tool_display_name": "toolDisplayName",
        "tool_description": "toolDescription",
        "action_type": "actionType",
        "tool_arguments": "toolArguments",
        "tool_execution_context": "toolExecutionContext",
    });
});
function toolExecutionStartedStreamingEventDataFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ToolExecutionStartedStreamingEventData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ToolExecutionStartedStreamingEventData' from JSON`);
}
/** @internal */
exports.ToolExecutionStartedStreamingEvent$inboundSchema = z.object({
    type: z.literal("event.workflow_events.tool_execution_started"),
    timestamp: z.string(),
    data: z.lazy(() => exports.ToolExecutionStartedStreamingEventData$inboundSchema),
});
function toolExecutionStartedStreamingEventFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ToolExecutionStartedStreamingEvent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ToolExecutionStartedStreamingEvent' from JSON`);
}
//# sourceMappingURL=toolexecutionstartedstreamingevent.js.map