import { Message } from "./Message";
import { ModificationType, ModificationsState, SharedAccessMode, StructureChanges } from "../../SharedDocuments/types";
import { AnnotationBase } from "../../Annotations/AnnotationTypes";
/**
 * Client transport message.
 * */
export type ClientMessage = Message & {
    /**
     * Unique client identifier.
     * */
    clientId: string;
    /**
    * Message type.
    * */
    type: ClientMessageType | ClientRequestType;
    /**
    *  Message data if any.
    **/
    data?: ClientMessageParameters;
};
/**
 * Client message type.
 * */
export declare enum ClientMessageType {
    Start = 1,
    Stop = 2,
    ShareDocument = 10,
    UnshareDocument = 11,
    Modification = 20,
    Reconnect = 30
}
export declare enum ClientRequestType {
    UserAccessList = 100,
    SharedDocumentsList = 101,
    AllUsersList = 102,
    OpenSharedDocument = 103,
    StartSharedMode = 104,
    StopSharedMode = 105
}
export type ClientMessageParameters = StartParameters | StopParameters | ShareDocumentParameters | ModificationParameters | UnshareDocumentParameters | UserAccessListParameters | SharedDocumentsListParameters | OpenSharedDocumentParameters;
/**
 * ClientMessageType.Start connection message arguments.
 * */
export type StartParameters = {
    clientId: string;
    userName: string;
};
/**
 * ClientMessageType.Stop connection message arguments.
 * */
export type StopParameters = {
    clientId: string;
};
/**
 * ClientMessageType.ShareDocument connection message arguments.
 * */
export type ShareDocumentParameters = {
    documentId: string;
    userName: string;
    accessMode: SharedAccessMode;
    modificationsState: ModificationsState;
};
/**
 * ClientMessageType.UnshareDocument connection message arguments.
 * */
export type UnshareDocumentParameters = {
    documentId: string;
    userName: string;
};
/**
 * ClientMessageType.Modification connection message arguments.
 * */
export type ModificationParameters = {
    type: ModificationType;
    data?: {
        pageIndex: number;
        annotation: AnnotationBase;
    } | {
        pageIndex: number;
        annotationId: string;
    } | StructureChanges;
};
export type UserAccessListParameters = {
    documentId: string;
};
export type SharedDocumentsListParameters = {
    userName: string;
};
export type OpenSharedDocumentParameters = {
    documentId: string;
};
