fk-platform-sdk 1.0.46-beta2 → 1.0.46

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: Record<string, any>) => void;
6
- logPageError: (errorInfo: Record<string, any>) => void;
17
+ logPerformanceMetrics: (eventInfo: EventInfo) => void;
18
+ logPageError: (errorInfo: ErrorInfo) => void;
7
19
  }
@@ -2,6 +2,7 @@ export interface ErrorInfoRequest {
2
2
  errorTitle: string;
3
3
  errorDescription: string;
4
4
  errorMessage: string;
5
+ pageUrl: string;
5
6
  callbackMethod?: string;
6
7
  ctaText?: string;
7
8
  }
@@ -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: Record<string, any>): void;
10
- logPageError(errorInfo: Record<string, any>): void;
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
  };
@@ -41,7 +41,7 @@ var PermissionsModuleImpl = /** @class */ (function (_super) {
41
41
  var _this = this;
42
42
  return this.nativeModuleCallbackManager.executeOnBridge(function (requestId) {
43
43
  _this.postMessage({
44
- methodName: "getUltraPlusGrantToken",
44
+ methodName: "getUltraPlusToken",
45
45
  requestId: requestId
46
46
  });
47
47
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fk-platform-sdk",
3
- "version": "1.0.46-beta2",
3
+ "version": "1.0.46",
4
4
  "description": "SDK to enable external experience integration within flipkart app.",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",