import type * as lark from '@larksuiteoapi/node-sdk'; /** Optional logger — pass one to see what the bot is doing. Silent by default. */ export interface Logger { info: (msg: string, ...args: unknown[]) => void; warn: (msg: string, ...args: unknown[]) => void; } /** A no-op logger. The package is silent unless you tell it otherwise. */ export declare const nullLogger: Logger; export interface FeishuBotOptions { /** Feishu App ID */ appId: string; /** Feishu App Secret */ appSecret: string; /** Callback when a message is received (after filtering and parsing) */ onMessage: (message: IncomingMessage) => void; /** Directory for downloaded attachments. Defaults to os.tmpdir() */ downloadDir?: string; /** Lark domain. Defaults to lark.Domain.Feishu */ domain?: typeof lark.Domain.Feishu | typeof lark.Domain.Lark; /** Additional event handlers for the EventDispatcher */ extraEvents?: Record) => Promise>; /** Logger for debug output. Silent by default. */ logger?: Logger; } export interface IncomingMessage { messageId: string; chatId: string; chatType: 'p2p' | 'group'; senderId: string; senderName?: string; text: string; attachments: string[]; messageType: string; mentions?: unknown[]; parsedContent?: Record; } export interface RecipientTarget { receiveIdType: 'open_id' | 'chat_id'; receiveId: string; } export interface MentionTarget { displayName: string; openId?: string; appId?: string; } export interface ParsedMentionTarget extends MentionTarget { aliases: string[]; } export interface SenderIds { openId?: string; userId?: string; unionId?: string; } export interface TokenEntry { token: string; expiresAt: number; } export interface TokenCache { tenant?: TokenEntry; app?: TokenEntry; } export declare const IMAGE_EXTS: string[]; export declare const AUDIO_EXTS: string[]; export declare const VIDEO_EXTS: string[]; export declare const MAX_FILE_SIZE_BYTES: number; export declare const RETRY_MAX_ATTEMPTS = 3; export declare const RETRY_BASE_DELAY_MS = 1000; export declare const TOKEN_REFRESH_SKEW_MS: number; export declare const CHAT_RECIPIENT_PREFIX = "chat:"; export declare const OPEN_RECIPIENT_PREFIX = "open:"; export declare const CHAT_MENTION_CACHE_TTL_MS: number; export declare const MAX_CHAT_MENTION_CACHES = 100; /** Resolve a Feishu target string to receive_id_type + receive_id. */ export declare function resolveRecipientTarget(recipient?: string): RecipientTarget | null; export declare const RETRYABLE_CODES: Set; export declare function isRetryableError(err: unknown): boolean; export declare function sanitizeError(err: unknown): { message?: string; code?: string; status?: number; }; export declare function asRecord(value: unknown): Record | null; export declare function asNonEmptyString(value: unknown): string | null; export declare function escapeRegExp(text: string): string; export declare function escapeXml(text: string): string; export declare function maskId(id: string): string; export declare function withRetry(fn: () => Promise, label: string): Promise; //# sourceMappingURL=types.d.ts.map