export type FeishuAlarmLevel = "warning" | "alarm"; export type FeishuAlarmSource = "http" | "proxy"; export interface FeishuAlarmReport { /** alarm 会额外 @所有人,warning 只发消息 */ level: FeishuAlarmLevel; /** 业务标识:xiaohongshu / douyin / weixin ... */ platform: string; /** 告警来源模块 */ source: FeishuAlarmSource; /** 出错阶段,如 "POST /api/sns/web/v1/feed" */ stage: string; /** 错误类型,如 HTTP_403 / ECONNRESET / PROXY_UNAVAILABLE */ errorType: string; /** 接口错误码 */ code?: string | number; /** 错误信息 */ msg?: string; /** 请求地址 */ url?: string; /** 消息标题,默认「RPA异常」 */ title?: string; } /** * 上报错误到飞书群,失败静默:告警链路不能影响主流程。 * 同一 platform + source + stage + errorType + code 组合在 60s 内只发一条。 * * 节流 key 里必须带 stage:不同接口的同类错误(例如 unread_count 与 personal_info * 同时 ECONNABORTED)是两个独立问题,混成一个 key 会让后来的那个被静默吞掉。 */ export declare const reportFeishuAlarm: (report: FeishuAlarmReport) => void;