/**
 * Reference to an operation to be tested.
 * Version is optional; when omitted, refers to the latest version.
 */
import type { DocBlock } from '../docs/types';
import type { OwnerShipMeta } from '../ownership';
import type { OptionalVersionedSpecRef } from '../versioning';
export type OperationTargetRef = OptionalVersionedSpecRef;
/**
 * Reference to a workflow to be tested.
 * Version is optional; when omitted, refers to the latest version.
 */
export type WorkflowTargetRef = OptionalVersionedSpecRef;
export type TestTarget = {
    type: 'operation';
    operation: OperationTargetRef;
} | {
    type: 'workflow';
    workflow: WorkflowTargetRef;
};
export interface Fixture {
    description?: string;
    operation: OperationTargetRef;
    input?: unknown;
}
export interface Action {
    operation: OperationTargetRef;
    input?: unknown;
}
export interface ExpectOutputAssertion {
    type: 'expectOutput';
    match: unknown;
}
export interface ExpectErrorAssertion {
    type: 'expectError';
    messageIncludes?: string;
}
export interface ExpectedEvent {
    key: string;
    version: string;
    min?: number;
    max?: number;
}
export interface ExpectEventsAssertion {
    type: 'expectEvents';
    events: ExpectedEvent[];
}
export type Assertion = ExpectOutputAssertion | ExpectErrorAssertion | ExpectEventsAssertion;
export interface TestScenario {
    key: string;
    description?: string;
    given?: Fixture[];
    when: Action;
    then?: Assertion[];
}
export interface CoverageRequirement {
    statements?: number;
    branches?: number;
    functions?: number;
    lines?: number;
    mutations?: number;
}
export type TestSpecMeta = OwnerShipMeta;
export interface TestSpec {
    meta: TestSpecMeta;
    target: TestTarget;
    fixtures?: Fixture[];
    scenarios: TestScenario[];
    coverage?: CoverageRequirement;
}
/**
 * Reference to a test spec.
 * Version is optional; when omitted, refers to the latest version.
 */
export type TestSpecRef = OptionalVersionedSpecRef;
export declare class TestRegistry {
    private readonly items;
    register(spec: TestSpec): this;
    list(): TestSpec[];
    get(name: string, version?: string): TestSpec | undefined;
}
export declare function makeTestKey(meta: TestSpecMeta): string;
export declare function defineTestSpec(spec: TestSpec): TestSpec;
export declare const tech_contracts_tests_DocBlocks: DocBlock[];
