@univerjs/telemetry 0.5.1 → 0.5.2
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.
|
@@ -17,15 +17,56 @@
|
|
|
17
17
|
* Univer telemetry service interface. You should implement this interface to track telemetry data.
|
|
18
18
|
*/
|
|
19
19
|
export interface ITelemetryService {
|
|
20
|
+
/**
|
|
21
|
+
* Enable the debug mode.
|
|
22
|
+
*/
|
|
23
|
+
debug: () => void;
|
|
24
|
+
/**
|
|
25
|
+
* Initialize the telemetry service.
|
|
26
|
+
* @param token
|
|
27
|
+
* @param options
|
|
28
|
+
*/
|
|
29
|
+
init: (options?: Record<string, any>) => void;
|
|
30
|
+
/**
|
|
31
|
+
* Identify the user.
|
|
32
|
+
* @param id
|
|
33
|
+
* @param params
|
|
34
|
+
* @returns
|
|
35
|
+
*/
|
|
20
36
|
identify: (id: string, params?: Record<string, any>) => void;
|
|
37
|
+
/**
|
|
38
|
+
* Reset the user.
|
|
39
|
+
*/
|
|
40
|
+
reset(): void;
|
|
41
|
+
/**
|
|
42
|
+
* Track the event.
|
|
43
|
+
* @param eventName
|
|
44
|
+
* @param params
|
|
45
|
+
*/
|
|
21
46
|
capture: (eventName: string, params?: Record<string, any>) => void;
|
|
47
|
+
/**
|
|
48
|
+
* Start the timer.
|
|
49
|
+
* @param functionName
|
|
50
|
+
*/
|
|
22
51
|
startTime: (functionName: string) => void;
|
|
52
|
+
/**
|
|
53
|
+
* End the timer.
|
|
54
|
+
* @param functionName
|
|
55
|
+
*/
|
|
23
56
|
endTime: (functionName: string) => void;
|
|
57
|
+
/**
|
|
58
|
+
* Track the performance event.
|
|
59
|
+
* @param params
|
|
60
|
+
*/
|
|
24
61
|
trackPerformance: (params: {
|
|
25
62
|
duration: number;
|
|
26
63
|
functionName: string;
|
|
27
64
|
[prop: string]: any;
|
|
28
65
|
}) => void;
|
|
66
|
+
/**
|
|
67
|
+
* Track the page view.
|
|
68
|
+
* @param url
|
|
69
|
+
*/
|
|
29
70
|
onPageView: (url: string) => void;
|
|
30
71
|
}
|
|
31
72
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs/telemetry",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -42,13 +42,13 @@
|
|
|
42
42
|
"lib"
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@univerjs/core": "0.5.
|
|
45
|
+
"@univerjs/core": "0.5.2"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"typescript": "^5.7.2",
|
|
49
|
-
"vite": "^6.0.
|
|
50
|
-
"vitest": "^2.1.
|
|
51
|
-
"@univerjs-infra/shared": "0.5.
|
|
49
|
+
"vite": "^6.0.3",
|
|
50
|
+
"vitest": "^2.1.8",
|
|
51
|
+
"@univerjs-infra/shared": "0.5.2"
|
|
52
52
|
},
|
|
53
53
|
"space": {
|
|
54
54
|
".": {
|