/** The one API surface a notification needs — satisfied by any gramio `Bot`. */ export type NotifyBot = { api: { sendMessage: (params: { chat_id: number; text: string; }) => Promise; }; }; /** * DM `text` to every admin id, best-effort: each failure is logged and * swallowed (one unreachable admin must not block the rest, and a * notification must never throw into the calling flow). `extra` merges * into the sendMessage params (reply_markup, link_preview_options, …). */ export declare function notifyAdmins(bot: NotifyBot, adminIds: readonly number[], text: string, extra?: Record): Promise; /** * Rate-limit state for {@link alertAdminError}, owned by the CALLER so * scope is explicit (per-process on Node, per-isolate on a Worker) and * independent subsystems can hold independent budgets. */ export type AlertThrottle = { ms: number; lastAt: number; }; /** A fresh throttle: at most one alert per `ms` (default 60s). */ export declare const alertThrottle: (ms?: number) => AlertThrottle; /** * DM the admins a truncated error (`🚨 label\nName: message`), gated by * `throttle` so a failure storm sends one alert per window, not one per * failure. No throttle = every call sends. */ export declare function alertAdminError(bot: NotifyBot, adminIds: readonly number[], label: string, error: unknown, throttle?: AlertThrottle): Promise; //# sourceMappingURL=notify.d.ts.map