UNPKG

@odoo/o-spreadsheet

Version:
27 lines (26 loc) 1.28 kB
import { RevisionData } from "../types/collaborative/revisions"; import { ClientId } from "../types/collaborative/session"; import { Command, CoreCommand } from "../types/commands"; import { HistoryChange } from "../types/history"; import { UID } from "../types/misc"; export declare class Revision implements RevisionData { readonly rootCommand?: Command | undefined; readonly timestamp?: number | undefined; readonly id: UID; readonly clientId: ClientId; private _commands; private _changes; /** * A revision represents a whole client action (Create a sheet, merge a Zone, Undo, ...). * A revision contains the following information: * - id: ID of the revision * - commands: CoreCommands that are linked to the action, and should be * dispatched in other clients * - clientId: Client who initiated the action * - changes: List of changes applied on the state. */ constructor(id: UID, clientId: ClientId, commands: readonly CoreCommand[], rootCommand?: Command | undefined, changes?: readonly HistoryChange[], timestamp?: number | undefined); setChanges(changes: readonly HistoryChange[]): void; get commands(): readonly CoreCommand[]; get changes(): readonly HistoryChange[]; }