/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { SessionId } from "@fluidframework/id-compressor";
import { ChangeRebaser, ChangeFamilyEditor } from "../../../core/index.js";
import { TestChangeFamily, TestChange } from "../../testChange.js";
import { EditManager } from "../../../shared-tree-core/index.js";
export type TestEditManager = EditManager<ChangeFamilyEditor, TestChange, TestChangeFamily>;
/**
 * Represents the minting and sending of a new local change.
 */
interface UnitTestPushStep {
    type: "Push";
    /**
     * The future sequence number of the change being pushed.
     * This information is derived by the `runUnitTestScenario` function, but can be explicitly
     * provided to make tests easier to read and debug.
     */
    seq?: number;
}
/**
 * Represents the sequencing of a local change.
 */
interface UnitTestAckStep {
    type: "Ack";
    /**
     * The sequence number for this change.
     * Should match the sequence number of the oldest `UnitTestPushStep`
     * for which there is no `UnitTestAckStep` step.
     */
    seq: number;
}
/**
 * Represents the reception of a (sequenced) peer change
 */
interface UnitTestPullStep {
    type: "Pull";
    /**
     * The sequence number for this change.
     */
    seq: number;
    /**
     * The sequence number of the latest change that the issuer of this change knew about
     * at the time they issued this change.
     */
    ref: number;
    /**
     * The ID of the peer that issued the change.
     */
    from: SessionId;
    /**
     * The delta which should be produced by the `EditManager` when it receives this change.
     * This information is derived by the `runUnitTestScenario` function, but can be explicitly
     * provided to make tests easier to read and debug.
     */
    expectedDelta?: number[];
}
type UnitTestScenarioStep = UnitTestPushStep | UnitTestAckStep | UnitTestPullStep;
/**
 * State needed by the scenario builder.
 */
interface ScenarioBuilderState {
    /**
     * The ref number of the last commit made by each peer (0 for peers that have made no commits).
     */
    peerRefs: number[];
    /**
     * The ref number of the last commit made by each peer (0 for peers that have made no commits).
     */
    seq: number;
    /**
     * The number of local changes that have yet to be acked.
     */
    inFlight: number;
}
export declare function buildScenario(scenario: UnitTestScenarioStep[], meta: ScenarioBuilderState, peers: readonly SessionId[], stepCount: number): Generator<readonly UnitTestScenarioStep[]>;
export declare function runUnitTestScenario(title: string | undefined, steps: readonly UnitTestScenarioStep[], rebaser?: ChangeRebaser<TestChange>): void;
export {};
//# sourceMappingURL=editManagerScenario.d.ts.map