/**
 * ScenarioCase — declarative description of a behavioral use-case test.
 *
 * Rules (pure functions) produce ScenarioCase[]. A translator renders
 * each case into an executable test that drives the realized backend's
 * CURVED REST endpoints via `@specverse/engines/scenario-harness`. Cases
 * speak only spec language (CURVED ops + lifecycle states); they know
 * nothing about HTTP, Fastify, Prisma, or any implementation detail.
 *
 * Design: docs/proposals/in-progress/2026-05-21-USE-CASE-SCENARIO-CONTRACTS.md
 */
import type { NormalizedSpec } from '../ui-contracts/test-case-types.js';
export type { NormalizedSpec };
/** What a step asserts about its result. */
export type ScenarioExpect = 
/** The operation succeeds (2xx); result not otherwise inspected. */
{
    kind: 'ok';
}
/** The operation is rejected (non-2xx / thrown). */
 | {
    kind: 'rejected';
}
/** The operation succeeds and the result entity has field === value. */
 | {
    kind: 'state';
    field: string;
    value: string;
};
/** A single CURVED operation in a scenario. */
export interface ScenarioStep {
    op: 'create' | 'update' | 'retrieve' | 'validate' | 'evolve' | 'delete';
    model: string;
    /** create/update: entity data. evolve: { toState }. */
    payload?: Record<string, unknown>;
    /** Bind the result entity to a local variable for later steps to reference. */
    bindAs?: string;
    /** Raw JS expression for the target id (e.g. 'e.id') on ops over an existing entity. */
    idExpr?: string;
    expect: ScenarioExpect;
}
export interface ScenarioCase {
    /** The rule that produced this case. */
    ruleId: string;
    /** The spec element it applies to (e.g. 'Poll.status'). */
    specElement: string;
    /** Full test name. */
    name: string;
    /** Ordered CURVED operations. */
    steps: ScenarioStep[];
}
/** A scenario rule is a pure function from a normalized spec to cases. */
export type ScenarioRule = (spec: NormalizedSpec) => ScenarioCase[];
//# sourceMappingURL=scenario-types.d.ts.map