fk-platform-sdk 1.0.46-beta1 → 1.0.46-beta3
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.
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
import { AnalyticsEvent } from "./AnalyticsEvent";
|
|
2
|
+
export interface EventInfo {
|
|
3
|
+
clientId: string;
|
|
4
|
+
pageUrl: string;
|
|
5
|
+
metricName: string;
|
|
6
|
+
metricValue: number;
|
|
7
|
+
}
|
|
8
|
+
export interface ErrorInfo {
|
|
9
|
+
clientId: string;
|
|
10
|
+
pageUrl: string;
|
|
11
|
+
stackTrace: string;
|
|
12
|
+
statusCode: number;
|
|
13
|
+
}
|
|
2
14
|
export interface AnalyticsModule {
|
|
3
15
|
pushEvent: (event: AnalyticsEvent) => void;
|
|
4
16
|
forceFlushEvents: () => void;
|
|
5
|
-
logPerformanceMetrics: (eventInfo:
|
|
6
|
-
logPageError: (errorInfo:
|
|
17
|
+
logPerformanceMetrics: (eventInfo: EventInfo) => void;
|
|
18
|
+
logPageError: (errorInfo: ErrorInfo) => void;
|
|
7
19
|
}
|
|
@@ -10,6 +10,7 @@ var AppVersionModuleImpl_1 = require("../modules/AppVersionModuleImpl");
|
|
|
10
10
|
var DownloaderModuleImpl_1 = require("../modules/DownloaderModuleImpl");
|
|
11
11
|
var FontModuleImpl_1 = require("../modules/FontModuleImpl");
|
|
12
12
|
var ShareModuleImpl_1 = require("../modules/ShareModuleImpl");
|
|
13
|
+
var ErrorHandlerModuleImpl_1 = require("../modules/ErrorHandlerModuleImpl");
|
|
13
14
|
var MODULE_NAME;
|
|
14
15
|
(function (MODULE_NAME) {
|
|
15
16
|
MODULE_NAME[MODULE_NAME["PERMISSION_MODULE"] = 0] = "PERMISSION_MODULE";
|
|
@@ -37,7 +38,7 @@ var ModuleManager = /** @class */ (function () {
|
|
|
37
38
|
this.addModule(MODULE_NAME.DOWNLOADER_MODULE, new DownloaderModuleImpl_1.DownloaderModuleImpl(nativeModuleCallbackManager));
|
|
38
39
|
this.addModule(MODULE_NAME.FONT_MODULE, new FontModuleImpl_1.FontModuleImpl(nativeModuleCallbackManager));
|
|
39
40
|
this.addModule(MODULE_NAME.SHARE_MODULE, new ShareModuleImpl_1.ShareModuleImpl(nativeModuleCallbackManager));
|
|
40
|
-
this.addModule(MODULE_NAME.ERROR_HANDLER_MODULE, new
|
|
41
|
+
this.addModule(MODULE_NAME.ERROR_HANDLER_MODULE, new ErrorHandlerModuleImpl_1.ErrorHandlerModuleImpl(nativeModuleCallbackManager));
|
|
41
42
|
}
|
|
42
43
|
ModuleManager.prototype.getNavigationModule = function () {
|
|
43
44
|
return this.getModule(MODULE_NAME.NAVIGATION_MODULE);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { NativeModule, NativeModuleManager } from "../managers/NativeModuleHelper";
|
|
2
2
|
import { NativeModuleCallbackManager } from "../managers/NativeModuleCallbackManager";
|
|
3
3
|
import { AnalyticsEvent } from "../analytics/interfaces/AnalyticsEvent";
|
|
4
|
-
import { AnalyticsModule } from "../analytics/interfaces/AnalyticsModule";
|
|
4
|
+
import { AnalyticsModule, EventInfo, ErrorInfo } from "../analytics/interfaces/AnalyticsModule";
|
|
5
5
|
export declare class AnalyticsModuleImpl extends NativeModule<NativeModuleManager> implements AnalyticsModule {
|
|
6
6
|
constructor(nativeModuleCallbackManager: NativeModuleCallbackManager);
|
|
7
7
|
pushEvent(event: AnalyticsEvent): void;
|
|
8
8
|
forceFlushEvents(): void;
|
|
9
|
-
logPerformanceMetrics(eventInfo:
|
|
10
|
-
logPageError(errorInfo:
|
|
9
|
+
logPerformanceMetrics(eventInfo: EventInfo): void;
|
|
10
|
+
logPageError(errorInfo: ErrorInfo): void;
|
|
11
11
|
}
|
|
@@ -55,7 +55,7 @@ var AnalyticsModuleImpl = /** @class */ (function (_super) {
|
|
|
55
55
|
_this.postMessage({
|
|
56
56
|
methodName: "logPerformanceMetrics",
|
|
57
57
|
requestId: requestId,
|
|
58
|
-
eventInfo: eventInfo
|
|
58
|
+
eventInfo: JSON.stringify(eventInfo)
|
|
59
59
|
});
|
|
60
60
|
});
|
|
61
61
|
};
|
|
@@ -65,7 +65,7 @@ var AnalyticsModuleImpl = /** @class */ (function (_super) {
|
|
|
65
65
|
_this.postMessage({
|
|
66
66
|
methodName: "logPageError",
|
|
67
67
|
requestId: requestId,
|
|
68
|
-
errorInfo: errorInfo
|
|
68
|
+
errorInfo: JSON.stringify(errorInfo)
|
|
69
69
|
});
|
|
70
70
|
});
|
|
71
71
|
};
|