fk-platform-sdk 1.0.38 → 1.0.39

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,8 @@
1
1
  import { DeviceInfoResponse } from "../../types/DeviceInfoResponse";
2
- import { LocationManagerResponse } from "../../types/LocationManagerResponse";
2
+ import { LocationManagerResponse, PreciseLocationResponse } from "../../types/LocationManagerResponse";
3
3
  import { NativeModuleResponse } from "../NativeModuleResponse";
4
4
  export interface LocationModule {
5
5
  getUserPinCode: (clientID: string) => Promise<NativeModuleResponse<LocationManagerResponse>>;
6
6
  getUserDeviceId: () => Promise<NativeModuleResponse<DeviceInfoResponse>>;
7
+ getUserLocation: () => Promise<NativeModuleResponse<PreciseLocationResponse>>;
7
8
  }
@@ -2,10 +2,11 @@ import { NativeModuleResponse } from "../interfaces/NativeModuleResponse";
2
2
  import { NativeModule, NativeModuleManager } from "../managers/NativeModuleHelper";
3
3
  import { NativeModuleCallbackManager } from "../managers/NativeModuleCallbackManager";
4
4
  import { LocationModule } from "../interfaces/modules/LocationModule";
5
- import { LocationManagerResponse } from "../types/LocationManagerResponse";
5
+ import { LocationManagerResponse, PreciseLocationResponse } from "../types/LocationManagerResponse";
6
6
  import { DeviceInfoResponse } from "../types/DeviceInfoResponse";
7
7
  export declare class LocationModuleImpl extends NativeModule<NativeModuleManager> implements LocationModule {
8
8
  constructor(nativeModuleCallbackManager: NativeModuleCallbackManager);
9
9
  getUserPinCode(clientID: string): Promise<NativeModuleResponse<LocationManagerResponse>>;
10
10
  getUserDeviceId(): Promise<NativeModuleResponse<DeviceInfoResponse>>;
11
+ getUserLocation(): Promise<NativeModuleResponse<PreciseLocationResponse>>;
11
12
  }
@@ -35,6 +35,15 @@ var LocationModuleImpl = /** @class */ (function (_super) {
35
35
  });
36
36
  });
37
37
  };
38
+ LocationModuleImpl.prototype.getUserLocation = function () {
39
+ var _this = this;
40
+ return this.nativeModuleCallbackManager.executeOnBridge(function (requestId) {
41
+ _this.postMessage({
42
+ methodName: "getUserLocation",
43
+ requestId: requestId
44
+ });
45
+ });
46
+ };
38
47
  return LocationModuleImpl;
39
48
  }(NativeModuleHelper_1.NativeModule));
40
49
  exports.LocationModuleImpl = LocationModuleImpl;
@@ -1,3 +1,7 @@
1
1
  export interface LocationManagerResponse {
2
2
  pincode: string;
3
3
  }
4
+ export interface PreciseLocationResponse {
5
+ latitude: string;
6
+ longitude: string;
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fk-platform-sdk",
3
- "version": "1.0.38",
3
+ "version": "1.0.39",
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",