import { EventEmitter } from 'events'; import { StrictEventEmitter } from 'strict-event-emitter-types'; import { IGraphicPackage, IStructurePatch } from '../re-export'; import { ServerError, ServerMessage, ServerResult } from '../types/ComClient'; declare type Command = 'Blob' | 'Result' | 'Endpoint' | 'Patch' | 'ErrorMessage' | 'InfoMessage'; declare type ResultFrom = 'Execute' | 'GetTree' | 'ip' | 'EndFrame' | 'BeginFrame' | string; declare type TransactionBlob = { command: 'Blob'; type: 'Binary'; data: IGraphicPackage; size: number; }; declare type TransactionResult = ServerResult & { command: 'Result'; from: ResultFrom; }; declare type TransactionResponse = { results: TransactionResult[]; patches: IStructurePatch[]; blobs: TransactionBlob[]; errors: ServerError[]; messages: ServerMessage[]; }; declare type TransactionEvents = { result: TransactionResult; patches: IStructurePatch[]; blob: TransactionBlob; error: ServerError; finished: TransactionResponse; message: ServerMessage; }; declare type TransactionEmitter = StrictEventEmitter; declare const Transaction_base: new () => TransactionEmitter; export declare class Transaction extends Transaction_base { transactionID: string; protected bytes: number; protected bytesUncompressed: number; protected time: number; results: TransactionResult[]; patches: IStructurePatch[]; blobs: TransactionBlob[]; errors: ServerError[]; messages: ServerMessage[]; constructor(transactionID?: string); handleData(data: any): void; protected handleItem(object: ServerResult & { from: ResultFrom; command: Command; type: string; transactionID: string; data?: any; ops?: any; attributes?: any; }): void; } export {};