/** * TCP Server Configuration Constants */ export declare const DEFAULT_TCP_PORT = 27019; export declare const MAX_MESSAGE_SIZE: number; export declare const MAX_CONNECTIONS = 1000; export declare const MAX_CONNECTIONS_PER_IP = 100; export declare const CONNECTION_TIMEOUT = 60000; /** * Per-IP connection-*attempt* rate limiting - complements MAX_CONNECTIONS_PER_IP, which only * bounds concurrent connections and does nothing to stop an attacker who stays under that cap * while hammering the server with rapid connect-then-drop churn (each attempt still costs a * TCP handshake + accept/reject cycle). Same sliding-window + cooldown shape as the login rate * limiter (LOGIN_RATE_LIMIT_* in config/Keys/Permissions.ts), applied to raw connection * attempts instead of failed logins. See ConnectionRateLimiter.ts. */ export declare const CONNECTION_RATE_LIMIT_MAX_ATTEMPTS = 300; export declare const CONNECTION_RATE_LIMIT_WINDOW_MS = 10000; export declare const CONNECTION_RATE_LIMIT_COOLDOWN_MS = 30000; export declare const CONNECTION_RATE_LIMIT_SWEEP_INTERVAL_MS = 60000; export declare const DEFAULT_REQUEST_TIMEOUT = 30000; export declare const HEARTBEAT_INTERVAL = 30000; export declare const HEARTBEAT_TIMEOUT = 5000; export declare const MAX_RECONNECT_ATTEMPTS = 10; export declare const INITIAL_RECONNECT_DELAY = 1000; export declare const MAX_RECONNECT_DELAY = 30000; export declare const MESSAGE_LENGTH_BYTES = 4; export declare const ENCODING = "utf8"; export declare const INITIAL_BUFFER_SIZE = 4096; export declare const MAX_BUFFER_SIZE: number; export declare const StatusCode: { readonly OK: 200; readonly CREATED: 201; readonly NO_CONTENT: 204; readonly BAD_REQUEST: 400; readonly UNAUTHORIZED: 401; readonly FORBIDDEN: 403; readonly NOT_FOUND: 404; readonly CONFLICT: 409; readonly PAYLOAD_TOO_LARGE: 413; readonly UNPROCESSABLE_ENTITY: 422; readonly TOO_MANY_REQUESTS: 429; readonly INTERNAL_SERVER_ERROR: 500; readonly NOT_IMPLEMENTED: 501; readonly SERVICE_UNAVAILABLE: 503; }; export declare const ErrorMessage: { readonly INVALID_MESSAGE_FORMAT: 'Invalid message format'; readonly MESSAGE_TOO_LARGE: 'Message exceeds maximum size'; readonly UNKNOWN_COMMAND: 'Unknown command'; readonly MISSING_REQUIRED_PARAMS: 'Missing required parameters'; readonly INVALID_CORRELATION_ID: 'Invalid correlation ID'; readonly CONNECTION_TIMEOUT: 'Connection timeout'; readonly REQUEST_TIMEOUT: 'Request timeout'; readonly SERVER_OVERLOAD: 'Server is overloaded'; readonly TOO_MANY_CONNECTIONS_FROM_IP: 'Too many concurrent connections from this IP address'; readonly TOO_MANY_CONNECTION_ATTEMPTS: 'Too many connection attempts from this IP address. Try again later.'; readonly INTERNAL_ERROR: 'Internal server error'; readonly AUTH_REQUIRED: 'Authentication required. Send an AUTHENTICATE command with username and password.'; readonly INVALID_CREDENTIALS: 'Invalid username or password'; readonly INSUFFICIENT_PERMISSIONS: 'Insufficient permissions for this operation'; readonly RESERVED_DATABASE: 'This is a reserved system database'; readonly TOO_MANY_LOGIN_ATTEMPTS: 'Too many failed login attempts. Try again later.'; readonly PASSWORD_CHANGE_REQUIRED: 'This account must change its password before it can be used over TCP. Log into the Control Server GUI to change the password, or authenticate with a different account that has already completed its password change.'; }; export declare const SuccessMessage: { readonly PING_PONG: 'PONG'; readonly DISCONNECTED: 'Successfully disconnected'; readonly DB_CREATED: 'Database created successfully'; readonly DB_DELETED: 'Database deleted successfully'; readonly COLLECTION_CREATED: 'Collection created successfully'; readonly COLLECTION_DELETED: 'Collection deleted successfully'; readonly DOCUMENT_INSERTED: 'Document inserted successfully'; readonly DOCUMENTS_INSERTED: 'Documents inserted successfully'; readonly DOCUMENT_UPDATED: 'Document updated successfully'; readonly DOCUMENTS_UPDATED: 'Documents updated successfully'; readonly DOCUMENT_DELETED: 'Document deleted successfully'; readonly DOCUMENTS_DELETED: 'Documents deleted successfully'; readonly INDEX_CREATED: 'Index created successfully'; readonly INDEX_DROPPED: 'Index dropped successfully'; readonly AUTHENTICATED: 'Authenticated successfully'; };