import type { TSESTree } from "@typescript-eslint/utils";
import { WORKFLOWS_SDK_SOURCE } from "../constants";
export { WORKFLOWS_SDK_SOURCE };
export declare const CREATE_WORKFLOW = "createWorkflow";
export declare const CREATE_STEP = "createStep";
export declare const TRANSFORM = "transform";
export declare const WHEN = "when";
export declare const WORKFLOW_RESPONSE = "WorkflowResponse";
export declare const STEP_RESPONSE = "StepResponse";
export type WorkflowSdkBindings = {
    createWorkflow: Set<string>;
    createStep: Set<string>;
    transform: Set<string>;
    when: Set<string>;
    workflowResponse: Set<string>;
    stepResponse: Set<string>;
};
export declare function createWorkflowSdkBindings(): WorkflowSdkBindings;
export declare function trackWorkflowSdkImports(node: TSESTree.ImportDeclaration, bindings: WorkflowSdkBindings): void;
export type FunctionLike = TSESTree.ArrowFunctionExpression | TSESTree.FunctionExpression | TSESTree.FunctionDeclaration;
export declare function getEnclosingFunction(node: TSESTree.Node): FunctionLike | null;
/**
 * Returns true when `fn` is the second argument to a `createWorkflow(...)`
 * call whose callee resolves to a tracked import binding.
 */
export declare function isWorkflowConstructorFunction(fn: FunctionLike, bindings: WorkflowSdkBindings): boolean;
/**
 * Returns true when `fn` is the first argument to a `.then(...)` call whose
 * receiver is a `when(...)` call against a tracked `when` import binding.
 *
 * The `.then(...)` callback runs at workflow-definition time, same as the
 * workflow constructor itself — anything you can't do in the constructor,
 * you also can't do here.
 */
export declare function isWhenThenCallbackFunction(fn: FunctionLike, bindings: WorkflowSdkBindings): boolean;
/**
 * Returns true when `fn` is a callback argument to a `transform(...)` call
 * whose callee resolves to a tracked `transform` import binding.
 *
 * `transform(data, ...callbacks)` accepts one or more callback arguments after
 * the data argument at index 0 — any of them counts.
 */
export declare function isTransformCallbackFunction(fn: FunctionLike, bindings: WorkflowSdkBindings): boolean;
/**
 * Returns true when `fn` is the main callback (arg index 1) of a
 * `createStep(...)` call whose callee resolves to a tracked `createStep`
 * import binding.
 *
 * `createStep(id, mainFn, compensationFn?)` — only the main fn is checked.
 * Compensation callbacks are not required to return anything, so they are
 * intentionally excluded.
 */
export declare function isStepCallbackFunction(fn: FunctionLike, bindings: WorkflowSdkBindings): boolean;
/**
 * Returns true when `node` is a `new StepResponse(...)` or
 * `new WorkflowResponse(...)` whose callee identifier resolves to a tracked
 * workflows-sdk import binding.
 */
export declare function isResponseConstructor(node: TSESTree.NewExpression, bindings: WorkflowSdkBindings): boolean;
/**
 * True when `node` lives directly inside a `transform(...)` callback — not
 * inside a further-nested function.
 */
export declare function isInTransformCallback(node: TSESTree.Node, bindings: WorkflowSdkBindings): boolean;
/**
 * True when `node` lives directly inside a workflow constructor body — not
 * inside a nested `createStep` / `transform` callback.
 *
 * Implementation: the immediately-enclosing function must itself be the
 * workflow constructor. Nested step/transform callbacks become the
 * immediately-enclosing function for code inside them, so this check
 * naturally excludes them.
 */
export declare function isInWorkflowConstructor(node: TSESTree.Node, bindings: WorkflowSdkBindings): boolean;
/**
 * True when `node` lives inside the *body* of a function that runs at
 * workflow-*definition* time — either the workflow constructor itself, or
 * a `when(...).then(callback)` callback. Both are subject to the same
 * "no conditional control flow, no value manipulation" constraints.
 *
 * Excludes nodes inside `fn.params` (default-parameter expressions) — those
 * are arguably def-time too, but they're rarely the source of the bugs
 * these rules target and treating them as in-scope produces noisy
 * false-positives on legitimate defaults. Carve out if a rule emerges
 * that genuinely cares.
 *
 * Nested `createStep` / `transform` callbacks are *execution-time*; they
 * naturally fall out because they become the immediately-enclosing function.
 */
export declare function isInWorkflowDefinitionScope(node: TSESTree.Node, bindings: WorkflowSdkBindings): boolean;
//# sourceMappingURL=workflow-scope.d.ts.map