@iflyrpa/actions 4.0.8 → 4.0.9-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,27 @@
1
+ export type FeishuAlarmLevel = "warning" | "alarm";
2
+ export type FeishuAlarmSource = "http" | "proxy";
3
+ export interface FeishuAlarmReport {
4
+ /** alarm 会额外 @所有人,warning 只发消息 */
5
+ level: FeishuAlarmLevel;
6
+ /** 业务标识:xiaohongshu / douyin / weixin ... */
7
+ platform: string;
8
+ /** 告警来源模块 */
9
+ source: FeishuAlarmSource;
10
+ /** 出错阶段,如 "POST /api/sns/web/v1/feed" */
11
+ stage: string;
12
+ /** 错误类型,如 HTTP_403 / ECONNRESET / PROXY_UNAVAILABLE */
13
+ errorType: string;
14
+ /** 接口错误码 */
15
+ code?: string | number;
16
+ /** 错误信息 */
17
+ msg?: string;
18
+ /** 请求地址 */
19
+ url?: string;
20
+ /** 消息标题,默认「RPA异常」 */
21
+ title?: string;
22
+ }
23
+ /**
24
+ * 上报错误到飞书群,失败静默:告警链路不能影响主流程。
25
+ * 同一 platform + source + errorType + code 组合在 60s 内只发一条。
26
+ */
27
+ export declare const reportFeishuAlarm: (report: FeishuAlarmReport) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iflyrpa/actions",
3
- "version": "4.0.8",
3
+ "version": "4.0.9-beta.0",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",