"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.ListActionsResponseBody$outboundSchema = exports.ListActionsResponseBody$inboundSchema = exports.ListActionsData$outboundSchema = exports.ListActionsData$inboundSchema = exports.ListActionsState$outboundSchema = exports.ListActionsState$inboundSchema = exports.ListActionsReview$outboundSchema = exports.ListActionsReview$inboundSchema = exports.ListActionsTool$outboundSchema = exports.ListActionsTool$inboundSchema = exports.ListActionsObject$outboundSchema = exports.ListActionsObject$inboundSchema = exports.ListActionsRequest$outboundSchema = exports.ListActionsRequest$inboundSchema = exports.ListActionsReview = exports.ListActionsObject = void 0;
exports.listActionsRequestToJSON = listActionsRequestToJSON;
exports.listActionsRequestFromJSON = listActionsRequestFromJSON;
exports.listActionsToolToJSON = listActionsToolToJSON;
exports.listActionsToolFromJSON = listActionsToolFromJSON;
exports.listActionsStateToJSON = listActionsStateToJSON;
exports.listActionsStateFromJSON = listActionsStateFromJSON;
exports.listActionsDataToJSON = listActionsDataToJSON;
exports.listActionsDataFromJSON = listActionsDataFromJSON;
exports.listActionsResponseBodyToJSON = listActionsResponseBodyToJSON;
exports.listActionsResponseBodyFromJSON = listActionsResponseBodyFromJSON;
const z = __importStar(require("zod/v3"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
exports.ListActionsObject = {
    List: "list",
};
/**
 * Review status of the tool call
 */
exports.ListActionsReview = {
    Approved: "approved",
    Rejected: "rejected",
};
/** @internal */
exports.ListActionsRequest$inboundSchema = z.object({
    agent_key: z.string(),
    task_id: z.string(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "agent_key": "agentKey",
        "task_id": "taskId",
    });
});
/** @internal */
exports.ListActionsRequest$outboundSchema = z.object({
    agentKey: z.string(),
    taskId: z.string(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        agentKey: "agent_key",
        taskId: "task_id",
    });
});
function listActionsRequestToJSON(listActionsRequest) {
    return JSON.stringify(exports.ListActionsRequest$outboundSchema.parse(listActionsRequest));
}
function listActionsRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListActionsRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListActionsRequest' from JSON`);
}
/** @internal */
exports.ListActionsObject$inboundSchema = z.nativeEnum(exports.ListActionsObject);
/** @internal */
exports.ListActionsObject$outboundSchema = exports.ListActionsObject$inboundSchema;
/** @internal */
exports.ListActionsTool$inboundSchema = z.object({
    id: z.string(),
    display_name: z.string(),
    requires_approval: z.boolean().default(false),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "display_name": "displayName",
        "requires_approval": "requiresApproval",
    });
});
/** @internal */
exports.ListActionsTool$outboundSchema = z.object({
    id: z.string(),
    displayName: z.string(),
    requiresApproval: z.boolean().default(false),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        displayName: "display_name",
        requiresApproval: "requires_approval",
    });
});
function listActionsToolToJSON(listActionsTool) {
    return JSON.stringify(exports.ListActionsTool$outboundSchema.parse(listActionsTool));
}
function listActionsToolFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListActionsTool$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListActionsTool' from JSON`);
}
/** @internal */
exports.ListActionsReview$inboundSchema = z.nativeEnum(exports.ListActionsReview);
/** @internal */
exports.ListActionsReview$outboundSchema = exports.ListActionsReview$inboundSchema;
/** @internal */
exports.ListActionsState$inboundSchema = z.object({
    review: z.nullable(exports.ListActionsReview$inboundSchema).default(null),
    review_source: z.string().optional(),
    reviewed_by_id: z.string().optional(),
    executed: z.boolean().default(false),
    error: z.string().optional(),
    input: z.record(z.any()),
    output: z.record(z.any()),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "review_source": "reviewSource",
        "reviewed_by_id": "reviewedById",
    });
});
/** @internal */
exports.ListActionsState$outboundSchema = z.object({
    review: z.nullable(exports.ListActionsReview$outboundSchema).default(null),
    reviewSource: z.string().optional(),
    reviewedById: z.string().optional(),
    executed: z.boolean().default(false),
    error: z.string().optional(),
    input: z.record(z.any()),
    output: z.record(z.any()),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        reviewSource: "review_source",
        reviewedById: "reviewed_by_id",
    });
});
function listActionsStateToJSON(listActionsState) {
    return JSON.stringify(exports.ListActionsState$outboundSchema.parse(listActionsState));
}
function listActionsStateFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListActionsState$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListActionsState' from JSON`);
}
/** @internal */
exports.ListActionsData$inboundSchema = z.object({
    _id: z.string(),
    agent_tool_call_id: z.string(),
    tool: z.lazy(() => exports.ListActionsTool$inboundSchema),
    created: z.string(),
    updated: z.string(),
    started: z.string().optional(),
    finished: z.string().optional(),
    agent_id: z.string(),
    action_type: z.string(),
    agent_execution_id: z.string(),
    workspace_id: z.string(),
    state: z.lazy(() => exports.ListActionsState$inboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "_id": "id",
        "agent_tool_call_id": "agentToolCallId",
        "agent_id": "agentId",
        "action_type": "actionType",
        "agent_execution_id": "agentExecutionId",
        "workspace_id": "workspaceId",
    });
});
/** @internal */
exports.ListActionsData$outboundSchema = z.object({
    id: z.string(),
    agentToolCallId: z.string(),
    tool: z.lazy(() => exports.ListActionsTool$outboundSchema),
    created: z.string(),
    updated: z.string(),
    started: z.string().optional(),
    finished: z.string().optional(),
    agentId: z.string(),
    actionType: z.string(),
    agentExecutionId: z.string(),
    workspaceId: z.string(),
    state: z.lazy(() => exports.ListActionsState$outboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        id: "_id",
        agentToolCallId: "agent_tool_call_id",
        agentId: "agent_id",
        actionType: "action_type",
        agentExecutionId: "agent_execution_id",
        workspaceId: "workspace_id",
    });
});
function listActionsDataToJSON(listActionsData) {
    return JSON.stringify(exports.ListActionsData$outboundSchema.parse(listActionsData));
}
function listActionsDataFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListActionsData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListActionsData' from JSON`);
}
/** @internal */
exports.ListActionsResponseBody$inboundSchema = z.object({
    object: exports.ListActionsObject$inboundSchema,
    data: z.array(z.lazy(() => exports.ListActionsData$inboundSchema)),
    has_more: z.boolean(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "has_more": "hasMore",
    });
});
/** @internal */
exports.ListActionsResponseBody$outboundSchema = z.object({
    object: exports.ListActionsObject$outboundSchema,
    data: z.array(z.lazy(() => exports.ListActionsData$outboundSchema)),
    hasMore: z.boolean(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        hasMore: "has_more",
    });
});
function listActionsResponseBodyToJSON(listActionsResponseBody) {
    return JSON.stringify(exports.ListActionsResponseBody$outboundSchema.parse(listActionsResponseBody));
}
function listActionsResponseBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListActionsResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListActionsResponseBody' from JSON`);
}
//# sourceMappingURL=listactions.js.map