/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { StableId } from "@fluidframework/runtime-definitions";
import { ReadonlyRepairDataStore } from "../repair";
/**
 * The identifier for a particular session/user/client that can generate `GraphCommit`s
 */
export declare type SessionId = string;
export declare const SessionIdSchema: import("@sinclair/typebox").TUnsafe<string>;
/**
 * A unique identifier for a commit. Commits that have been rebased, but are semantically
 * the same, will share the same revision tag.
 * @alpha
 */
export declare type RevisionTag = StableId;
export declare const RevisionTagSchema: import("@sinclair/typebox").TUnsafe<StableId>;
/**
 * @returns a `RevisionTag` from the given string, or fails if the string is not a valid `RevisionTag`
 */
export declare function assertIsRevisionTag(revision: string): RevisionTag;
/**
 * @returns true iff the given string is a valid `RevisionTag`
 */
export declare function isRevisionTag(revision: string): revision is RevisionTag;
/**
 * @returns a random, universally unique `RevisionTag`
 */
export declare function mintRevisionTag(): RevisionTag;
/**
 * A node in a graph of commits. A commit's parent is the commit on which it was based.
 */
export interface GraphCommit<TChange> {
    /** The tag for this commit. If this commit is rebased, the corresponding rebased commit will retain this tag. */
    readonly revision: RevisionTag;
    /** The change that will result from applying this commit */
    readonly change: TChange;
    readonly repairData?: ReadonlyRepairDataStore;
    /** The parent of this commit, on whose change this commit's change is based */
    readonly parent?: GraphCommit<TChange>;
    /** The inverse of this commit */
    inverse?: TChange;
}
/**
 * Creates a new graph commit object. This is useful for creating copies of commits with different parentage.
 * @param parent - the parent of the new commit
 * @param commit - the contents of the new commit object
 * @returns the new commit object
 */
export declare function mintCommit<TChange>(parent: GraphCommit<TChange>, commit: Omit<GraphCommit<TChange>, "parent">): GraphCommit<TChange>;
//# sourceMappingURL=types.d.ts.map