import type { DiagramUpdateResult } from "../diagramImplementation.js"; import type { RemoteDiagramMessage } from "./remoteDiagramMessage.js"; import type { RemoteMessagePayload } from "@hylimo/diagram-protocol"; import type { DiagramConfig } from "@hylimo/diagram-common"; /** * Message to request an update of a diagram */ export interface RequestUpdateDiagramMessage extends RemoteDiagramMessage { type: typeof RequestUpdateDiagramMessage.type; /** * The source code of the diagram */ source: string; /** * The config of the diagram */ config: DiagramConfig; } export declare namespace RequestUpdateDiagramMessage { const type = "requestUpdateDiagram"; /** * Checks if the given message is a RequestUpdateDiagramMessage * * @param message the message to check * @returns true if the message is a RequestUpdateDiagramMessage */ function is(message: RemoteMessagePayload): message is RequestUpdateDiagramMessage; } /** * Message to reply to a RequestUpdateDiagramMessage */ export interface ReplyUpdateDiagramMessage extends RemoteMessagePayload { type: typeof ReplyUpdateDiagramMessage.type; /** * The result of the update, contains the new diagram and notifications */ result: DiagramUpdateResult; } export declare namespace ReplyUpdateDiagramMessage { const type = "replyUpdateDiagram"; /** * Checks if the given message is a ReplyUpdateDiagramMessage * * @param message the message to check * @returns true if the message is a ReplyUpdateDiagramMessage */ function is(message: RemoteMessagePayload): message is ReplyUpdateDiagramMessage; } //# sourceMappingURL=updateDiagramMessage.d.ts.map