sobey-monitor-sdk 1.1.10 → 1.1.12
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.
- package/dist/index.cjs.js +34 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +34 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +34 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/reporter/index.d.ts +1 -0
- package/dist/reporter/sender.d.ts +8 -1
- package/package.json +1 -1
package/dist/reporter/index.d.ts
CHANGED
|
@@ -5,12 +5,19 @@ import type { ReportData } from '../types';
|
|
|
5
5
|
declare class Sender {
|
|
6
6
|
private buffer;
|
|
7
7
|
private timer;
|
|
8
|
+
/** 上次发送时间戳 */
|
|
9
|
+
private lastSendTime;
|
|
10
|
+
/** 发送节流间隔(毫秒) */
|
|
11
|
+
private sendThrottleMs;
|
|
12
|
+
/** 是否有待发送的数据(节流期间累积) */
|
|
13
|
+
private pendingSend;
|
|
8
14
|
/**
|
|
9
15
|
* 发送单条数据
|
|
10
16
|
*/
|
|
11
17
|
send(data: ReportData): void;
|
|
12
18
|
/**
|
|
13
|
-
*
|
|
19
|
+
* 立即发送所有缓冲数据(带节流)
|
|
20
|
+
* 短时间内的多次 flush 请求会被合并为一次发送
|
|
14
21
|
*/
|
|
15
22
|
flush(): void;
|
|
16
23
|
/**
|