import { CommandSocketIdentity } from "../command-socket-identity"; import { CommandStructure, CommandStructureParameterType, CommandStructureReturnType } from "../command/command-structure"; export declare const CORRESPONDENCE_ID_LENGTH: number; export interface CommandSocketMessage { readonly command: string; readonly meta: { readonly request: CommandSocketIdentity; readonly response: CommandSocketIdentity | null; readonly timeline: { requestSent: number; requestReceived: number | null; responseSent: number | null; responseReceived: number | null; }; readonly mode: "request" | "response"; readonly correspondenceID: string; readonly didError: boolean; }; readonly parameters: CommandStructureParameterType | null; readonly return: CommandStructureReturnType | CommandSocketSerializedError | null; } export interface CommandSocketSerializedError { readonly name: string; readonly message: string; } export interface CommandSocketRequestMessage extends CommandSocketMessage { readonly command: string; readonly meta: { readonly request: CommandSocketIdentity; readonly response: null; readonly timeline: { requestSent: number; requestReceived: number | null; responseSent: number | null; responseReceived: number | null; }; readonly mode: "request"; readonly correspondenceID: string; readonly didError: false; }; readonly parameters: CommandStructureParameterType; readonly return: null; } export interface CommandSocketResponseMessage extends CommandSocketMessage { readonly command: string; readonly meta: { readonly request: CommandSocketIdentity; readonly response: CommandSocketIdentity; readonly timeline: { requestSent: number; requestReceived: number; responseSent: number; responseReceived: number | null; }; readonly mode: "response"; readonly correspondenceID: string; readonly didError: boolean; }; readonly parameters: CommandStructureParameterType | null; readonly return: CommandStructureReturnType | CommandSocketSerializedError; }