import { CommandType } from './command.types'; /** * TCP Request structure * Sent from client to server */ export interface TCPRequest { id: string; command: CommandType; params: { username?: string; password?: string; dbName?: string; collectionName?: string; crypto?: boolean; key?: string; data?: any; documents?: any[]; query?: object; id?: string; updateData?: object; updateOne?: boolean; deleteOne?: boolean; limit?: number; skip?: number; sort?: object; findOne?: boolean; pipeline?: object[]; fieldNames?: string[]; indexName?: string; transactionId?: string; }; } /** * TCP Response structure * Sent from server to client */ export interface TCPResponse { id: string; statusCode: number; message: string; data?: any; error?: string; } /** * Connection state */ export declare enum ConnectionState { DISCONNECTED = "DISCONNECTED", CONNECTING = "CONNECTING", CONNECTED = "CONNECTED", RECONNECTING = "RECONNECTING", FAILED = "FAILED" } /** * Pending request tracking */ export interface PendingRequest { resolve: (value: any) => void; reject: (error: Error) => void; timeout: NodeJS.Timeout; timestamp: number; } /** * Connection options */ export interface ConnectionOptions { host: string; port: number; timeout?: number; reconnectAttempts?: number; reconnectDelay?: number; heartbeatInterval?: number; }