import { GNHashtable } from "./../common/GNData"; /** * Low-level container for a server-pushed event delivered over the * socket transport. * * The SDK builds one of these in {@link SocketPeer.onEventHandler} * for every decoded event frame, then dispatches it to: * - the single-slot raw observer registered through * {@link GNNetwork.setOnEventHandler}; and * - every typed {@link IServerEventHandler} whose `getEventCode()` * matches the event's code. * * Events are different from responses in two ways: they carry no * `responseId` (server-initiated, no correlation needed), and they * have no return code (events are not requests so there is nothing * to fail). */ export declare class OperationEvent { private eventCode; private parameters; /** * @param eventCode Event code carried by the frame; usually a * constant from {@link EventCode}. * @param parameters Optional parameter bag. Defaults to `null` * for events with no payload. */ constructor(eventCode: string, parameters?: GNHashtable); /** * Returns the event code that the SDK uses to look up * registered handlers. */ getEventCode(): string; /** * Returns the event parameter bag, or `null` for parameter-less * events. * * Typed handlers usually feed this through * {@link ConverterService.deserializeObject} to obtain a * strongly typed payload. */ getParameters(): GNHashtable; /** * Adds or replaces a single parameter on the existing parameter * bag. * * Note that this method assumes the parameter bag is non-null — * if the event was constructed without one, call * {@link setParameters} first. */ setParameter(k: string, value: any): OperationEvent; /** * Replaces the entire parameter bag. */ setParameters(parameters: GNHashtable): OperationEvent; /** * Returns a debug-friendly summary used by the * `[GN Socket EVENT]` log line. */ toString(): string; }