import type { FileUploadLimits } from './limits'; import type { Logger } from './types'; export declare const UNKNOWN_METHOD_LRU_CAPACITY = 32; export interface PushEventContext { readonly limits: FileUploadLimits; readonly invalidateChatState: (chatId: string) => void; readonly logger: Logger; readonly seenUnknownMethods: BoundedSeen; } /** * Bounded LRU set for de-duplicating "unknown push method" log entries. * * Prevents log flooding when an unrecognized server-pushed method arrives * repeatedly. FIFO eviction once `capacity` is reached — re-adding an evicted * entry treats it as new and re-logs once. */ export declare class BoundedSeen { private readonly capacity; private readonly set; private readonly fifo; constructor(capacity?: number); /** true if `key` was already present, false if it was just added. */ hasOrAdd(key: string): boolean; } /** * Routes a server-pushed type=1 event to the correct handler. * * Returns `true` if the method was recognized and handled (even if validation * failed — a recognized but malformed payload still consumes the event), and * `false` if the method is unknown to this SDK. * * NOTE: `sendMessage` and `uploadFileProgress` are NOT handled here — * `inbound.ts` and `ws-client.ts` (progress handlers) own those respectively. */ export declare function handleSdkPushEvent(method: string, payload: unknown, ctx: PushEventContext): boolean; //# sourceMappingURL=push-events.d.ts.map