import { IClient , IDocumentMessage } from "@fluidframework/protocol-definitions" ; import { IServiceConfiguration } from "./configuration" ; import { IWebSocket } from "./http" ; /**
 * Identifier for an ordering node in the system
 */ export interface INode { _id : string ; address : string ; expiration : number ; } export interface IOrdererSocket { send ( topic , op , id , data ) ; } export interface IOrdererConnection { readonly clientId : string ; readonly tenantId : string ; readonly documentId : string ; readonly maxMessageSize : number ; readonly serviceConfiguration : IServiceConfiguration ; /**
     * Sends the client join op for this connection
     */ connect ( clientJoinMessageServerMetadata ? ) : Promise < void > ; /**
     * Orders the provided list of messages. The messages in the array are guaranteed to be ordered sequentially
     * so long as their total size fits under the maxMessageSize.
     */ order ( message ) : Promise < void > ; /**
     * Error event Handler.
     */ once ( event , listener ) : void ; /**
     * Sends the client leave op for this connection
     */ disconnect ( clientLeaveMessageServerMetadata ? ) : Promise < void > ; } export interface IOrderer { connect ( socket , clientId , client ) : Promise < IOrdererConnection > ; close ( ) : Promise < void > ; } export interface IOrdererManager { getOrderer ( tenantId , documentId ) : Promise < IOrderer > ; }