import type { WorkflowBlockConfigFriendlyStruct } from "../../shared/workflow/config-schema/index.js"; import type { WorkflowOutcomeDataNode, WorkflowOutcomeDataRuntimeValueOf } from "../../shared/workflow/outcome-data-schema/index.js"; import type { WorkflowOutcomeIdentifier } from "../../shared/workflow/outcome-identifier.js"; import type { WorkflowBlockActivatorConfig, WorkflowBlockActivatorMetadata } from "./activate.js"; export type WorkflowBlockTriggererReturn = ({ /** Trigger a workflow run with the given outcome. */ type: "outcome"; data: WorkflowOutcomeDataRuntimeValueOf | null; } & WorkflowOutcomeIdentifier) | { /** Return without triggering a workflow run. */ type: "no-op"; }; /** Context passed into a trigger block's `trigger` handler, alongside the request. */ export type WorkflowBlockTriggererContext = { config: WorkflowBlockActivatorConfig; metadata: WorkflowBlockActivatorMetadata; }; export type WorkflowBlockTriggerer = (req: Request, ctx: WorkflowBlockTriggererContext) => Promise | WorkflowBlockTriggererReturn; //# sourceMappingURL=trigger.d.ts.map