import type { MessageBus } from '@xopcai/xopc/infra/bus/index.js';
import type { InboundMessage } from '@xopcai/xopc/channels/transport-types.js';
export type FeishuInboundWorkKind = 'text' | 'card_action' | 'reaction' | 'recall';
export interface FeishuInboundWork {
    kind: FeishuInboundWorkKind;
    accountId: string;
    chatId: string;
    /** Effective debounce for this work item (0 = no coalescing). */
    debounceMs: number;
    inbound: InboundMessage;
}
export interface FeishuInboundPipelineOptions {
    bus: MessageBus;
    /** Fallback when work.debounceMs is unset (should not happen if callers set it). */
    defaultDebounceMs: number;
    onError?: (err: unknown, items: FeishuInboundWork[]) => void;
}
export declare function createFeishuInboundPipeline(options: FeishuInboundPipelineOptions): {
    enqueue(work: FeishuInboundWork): Promise<void>;
    flushAll: () => Promise<void>;
    flushKey: (accountId: string, chatId: string) => Promise<void>;
};
