/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 12fc772356d2
 */
import * as z from "zod/v4";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
import { QueryDefinition$inboundSchema, } from "./querydefinition.js";
import { SignalDefinition$inboundSchema, } from "./signaldefinition.js";
import { UpdateDefinition$inboundSchema, } from "./updatedefinition.js";
/** @internal */
export const WorkflowCodeDefinition$inboundSchema = z.object({
    input_schema: z.record(z.string(), z.any()),
    output_schema: z.nullable(z.record(z.string(), z.any())).optional(),
    signals: z.array(SignalDefinition$inboundSchema).optional(),
    queries: z.array(QueryDefinition$inboundSchema).optional(),
    updates: z.array(UpdateDefinition$inboundSchema).optional(),
    enforce_determinism: z.boolean().default(false),
    on_behalf_of: z.boolean().default(false),
    execution_timeout: z.number().optional(),
    plugin_metadata: z.nullable(z.record(z.string(), z.any())).optional(),
}).transform((v) => {
    return remap$(v, {
        "input_schema": "inputSchema",
        "output_schema": "outputSchema",
        "enforce_determinism": "enforceDeterminism",
        "on_behalf_of": "onBehalfOf",
        "execution_timeout": "executionTimeout",
        "plugin_metadata": "pluginMetadata",
    });
});
export function workflowCodeDefinitionFromJSON(jsonString) {
    return safeParse(jsonString, (x) => WorkflowCodeDefinition$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'WorkflowCodeDefinition' from JSON`);
}
//# sourceMappingURL=workflowcodedefinition.js.map