import * as WebSocket from "ws"; import { Message } from "./Messages/Message"; import { QueueMessageOptions, amqpqueue, amqpexchange, exchangealgorithm } from "./amqpwrapper"; import { User, QueuedMessage, TokenUser } from "@openiap/openflow-api"; import { ChangeStream } from "mongodb"; import { Span } from "@opentelemetry/api"; import { clientType } from "./Audit"; import express = require("express"); interface IHashTable { [key: string]: T; } export declare class RegisterExchangeResponse { exchangename: string; queuename: string; } export declare class clsstream { stream: ChangeStream; id: string; callback: any; aggregates: object[]; collectionname: string; } export declare class WebSocketServerClient { jwt: string; _socketObject: WebSocket; private _receiveQueue; private _sendQueue; messageQueue: IHashTable; remoteip: string; clientagent: clientType; clientversion: string; created: Date; lastheartbeat: Date; lastheartbeatstr: string; lastheartbeatsec: string; metrics: string; id: string; user: User; username: string; _queues: amqpqueue[]; _queuescounter: number; _queuescurrent: number; _queuescounterstr: string; _queuescurrentstr: string; _exchanges: amqpexchange[]; devnull: boolean; private _message; private _error; private _close; private _amqpdisconnected; private _dbdisconnected; private _dbconnected; private init_complete; static remoteip(req: express.Request): string; Initialize(socketObject: WebSocket, req: express.Request): Promise; private dbdisconnected; private dbconnected; private amqpdisconnected; private close; private error; queuecount(): number; connected(): boolean; ping(parent: Span): void; private message; CloseConsumers(parent: Span): Promise; Close(parent: Span): Promise; CloseConsumer(user: TokenUser | User, queuename: string, parent: Span): Promise; RegisterExchange(user: TokenUser | User, exchangename: string, algorithm: exchangealgorithm, routingkey: string, addqueue: boolean, parent: Span): Promise; CreateConsumer(queuename: string, parent: Span): Promise; sleep(ms: any): Promise; private ProcessQueue; Send(message: Message, parent?: Span): Promise; private _Send; private _cleanupMessageQueue; chunkString(str: string, length: number): string[] | null; Queue(data: string, queuename: string, options: QueueMessageOptions, span: Span): Promise; UnWatch(id: string, jwt: string): Promise; watches: IHashTable; Watch(aggregates: object[], collectionname: string, jwt: string, id?: string): Promise; } export declare class ClientWatch { streamid: string; aggregates: object[]; collectionname: string; } export {};