fk-platform-sdk 1.0.28-beta → 1.0.29-beta

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.
@@ -9,12 +9,12 @@ export declare class OrderConfirmation implements AnalyticsEvent {
9
9
  private order_amount;
10
10
  private offer_amount;
11
11
  private payment_method;
12
- private fkh_order_id;
13
- private fkh_order_status;
14
- constructor(fk_accountid: string, fkh_userid: string, token_id: string, pincode: string, order_amount: number, offer_amount: number, payment_method: string, fkh_order_id: string, fkh_order_status: string);
12
+ private order_id;
13
+ private order_status;
14
+ constructor(fk_accountid: string, fkh_userid: string, token_id: string, pincode: string, order_amount: number, offer_amount: number, payment_method: string, order_id: string, order_status: string);
15
15
  getValidator(): EventValidator;
16
16
  }
17
- export declare class ProceedToPay implements AnalyticsEvent {
17
+ export declare class ProceedToPayEvent implements AnalyticsEvent {
18
18
  type: string;
19
19
  private fk_accountid;
20
20
  private fkh_userid;
@@ -23,7 +23,8 @@ export declare class ProceedToPay implements AnalyticsEvent {
23
23
  private order_amount;
24
24
  private offer_amount;
25
25
  private payment_method;
26
- constructor(fk_accountid: string, fkh_userid: string, token_id: string, pincode: string, order_amount: number, offer_amount: number, payment_method: string);
26
+ private order_id;
27
+ constructor(fk_accountid: string, fkh_userid: string, token_id: string, pincode: string, order_amount: number, offer_amount: number, payment_method: string, order_id: string);
27
28
  getValidator(): EventValidator;
28
29
  }
29
30
  export declare class UploadPrescription implements AnalyticsEvent {
@@ -11,7 +11,7 @@ var decorators_1 = require("./validation/decorators");
11
11
  var Validator_1 = require("./validation/Validator");
12
12
  var metadataMap = {};
13
13
  var OrderConfirmation = /** @class */ (function () {
14
- function OrderConfirmation(fk_accountid, fkh_userid, token_id, pincode, order_amount, offer_amount, payment_method, fkh_order_id, fkh_order_status) {
14
+ function OrderConfirmation(fk_accountid, fkh_userid, token_id, pincode, order_amount, offer_amount, payment_method, order_id, order_status) {
15
15
  this.type = "Healthcare.OrderConfirmation";
16
16
  this.fk_accountid = fk_accountid;
17
17
  this.fkh_userid = fkh_userid;
@@ -20,8 +20,8 @@ var OrderConfirmation = /** @class */ (function () {
20
20
  this.order_amount = order_amount;
21
21
  this.offer_amount = offer_amount;
22
22
  this.payment_method = payment_method;
23
- this.fkh_order_id = fkh_order_id;
24
- this.fkh_order_status = fkh_order_status;
23
+ this.order_id = order_id;
24
+ this.order_status = order_status;
25
25
  }
26
26
  OrderConfirmation.prototype.getValidator = function () {
27
27
  var invalidValues = Validator_1.validate(metadataMap, this, "OrderConfirmation");
@@ -33,9 +33,9 @@ var OrderConfirmation = /** @class */ (function () {
33
33
  return OrderConfirmation;
34
34
  }());
35
35
  exports.OrderConfirmation = OrderConfirmation;
36
- var ProceedToPay = /** @class */ (function () {
37
- function ProceedToPay(fk_accountid, fkh_userid, token_id, pincode, order_amount, offer_amount, payment_method) {
38
- this.type = "Healthcare.ProceedToPay";
36
+ var ProceedToPayEvent = /** @class */ (function () {
37
+ function ProceedToPayEvent(fk_accountid, fkh_userid, token_id, pincode, order_amount, offer_amount, payment_method, order_id) {
38
+ this.type = "Healthcare.ProceedToPayEvent";
39
39
  this.fk_accountid = fk_accountid;
40
40
  this.fkh_userid = fkh_userid;
41
41
  this.token_id = token_id;
@@ -43,17 +43,18 @@ var ProceedToPay = /** @class */ (function () {
43
43
  this.order_amount = order_amount;
44
44
  this.offer_amount = offer_amount;
45
45
  this.payment_method = payment_method;
46
+ this.order_id = order_id;
46
47
  }
47
- ProceedToPay.prototype.getValidator = function () {
48
- var invalidValues = Validator_1.validate(metadataMap, this, "ProceedToPay");
48
+ ProceedToPayEvent.prototype.getValidator = function () {
49
+ var invalidValues = Validator_1.validate(metadataMap, this, "ProceedToPayEvent");
49
50
  return new EventValidator_1.EventValidator(invalidValues);
50
51
  };
51
52
  __decorate([
52
- decorators_1.Positive(metadataMap, "ProceedToPay")
53
- ], ProceedToPay.prototype, "fk_accountid", void 0);
54
- return ProceedToPay;
53
+ decorators_1.Positive(metadataMap, "ProceedToPayEvent")
54
+ ], ProceedToPayEvent.prototype, "fk_accountid", void 0);
55
+ return ProceedToPayEvent;
55
56
  }());
56
- exports.ProceedToPay = ProceedToPay;
57
+ exports.ProceedToPayEvent = ProceedToPayEvent;
57
58
  var UploadPrescription = /** @class */ (function () {
58
59
  function UploadPrescription(fk_accountid, fkh_userid, token_id, pincode, page_name) {
59
60
  this.type = "Healthcare.UploadPrescription";
@@ -68,7 +69,7 @@ var UploadPrescription = /** @class */ (function () {
68
69
  return new EventValidator_1.EventValidator(invalidValues);
69
70
  };
70
71
  __decorate([
71
- decorators_1.Positive(metadataMap, "UploadPrescription")
72
+ decorators_1.Positive(metadataMap, "UploadPrescriprion")
72
73
  ], UploadPrescription.prototype, "fk_accountid", void 0);
73
74
  return UploadPrescription;
74
75
  }());
@@ -48,8 +48,8 @@ export interface TravelAnalyticsHelper {
48
48
  orderConfirmation: (amountToPay: number, paymentMethod: string) => Travel.OrderConfirmation;
49
49
  }
50
50
  export interface HealthcareAnalyticsHelper {
51
- orderConfirmation: (fk_accountid: string, fkh_userid: string, token_id: string, pincode: string, order_amount: number, offer_amount: number, payment_method: string, fkh_order_id: string, fkh_order_status: string) => Healthcare.OrderConfirmation;
52
- proceedToPay: (fk_accountid: string, fkh_userid: string, token_id: string, pincode: string, order_amount: number, offer_amount: number, payment_method: string) => Healthcare.ProceedToPay;
51
+ orderConfirmation: (fk_accountid: string, fkh_userid: string, token_id: string, pincode: string, order_amount: number, offer_amount: number, payment_method: string, order_id: string, order_status: string) => Healthcare.OrderConfirmation;
52
+ proceedToPayEvent: (fk_accountid: string, fkh_userid: string, token_id: string, pincode: string, order_amount: number, offer_amount: number, payment_method: string, order_id: string) => Healthcare.ProceedToPayEvent;
53
53
  uploadPrescription: (fk_accountid: string, fkh_userid: string, token_id: string, pincode: string, page_name: string) => Healthcare.UploadPrescription;
54
54
  addToCart: (fk_accountid: string, fkh_userid: string, token_id: string, pincode: string, product_name: string, product_id: string, price: number, quantity: number, source: string) => Healthcare.AddToCart;
55
55
  search: (fk_accountid: string, fkh_userid: string, token_id: string, pincode: string, search_query: string) => Healthcare.Search;
@@ -1,5 +1,7 @@
1
+ import { DeviceInfoResponse } from "../../types/DeviceInfoResponse";
1
2
  import { LocationManagerResponse } from "../../types/LocationManagerResponse";
2
3
  import { NativeModuleResponse } from "../NativeModuleResponse";
3
4
  export interface LocationModule {
4
5
  getUserPinCode: (clientID: string) => Promise<NativeModuleResponse<LocationManagerResponse>>;
6
+ getUserDeviceId: () => Promise<NativeModuleResponse<DeviceInfoResponse>>;
5
7
  }
@@ -3,7 +3,9 @@ import { NativeModule, NativeModuleManager } from "../managers/NativeModuleHelpe
3
3
  import { NativeModuleCallbackManager } from "../managers/NativeModuleCallbackManager";
4
4
  import { LocationModule } from "../interfaces/modules/LocationModule";
5
5
  import { LocationManagerResponse } from "../types/LocationManagerResponse";
6
+ import { DeviceInfoResponse } from "../types/DeviceInfoResponse";
6
7
  export declare class LocationModuleImpl extends NativeModule<NativeModuleManager> implements LocationModule {
7
8
  constructor(nativeModuleCallbackManager: NativeModuleCallbackManager);
8
9
  getUserPinCode(clientID: string): Promise<NativeModuleResponse<LocationManagerResponse>>;
10
+ getUserDeviceId(): Promise<NativeModuleResponse<DeviceInfoResponse>>;
9
11
  }
@@ -26,6 +26,15 @@ var LocationModuleImpl = /** @class */ (function (_super) {
26
26
  });
27
27
  });
28
28
  };
29
+ LocationModuleImpl.prototype.getUserDeviceId = function () {
30
+ var _this = this;
31
+ return this.nativeModuleCallbackManager.executeOnBridge(function (requestId) {
32
+ _this.postMessage({
33
+ methodName: "getUserDeviceID",
34
+ requestId: requestId
35
+ });
36
+ });
37
+ };
29
38
  return LocationModuleImpl;
30
39
  }(NativeModuleHelper_1.NativeModule));
31
40
  exports.LocationModuleImpl = LocationModuleImpl;
@@ -230,11 +230,11 @@ var SetupHelper = /** @class */ (function () {
230
230
  };
231
231
  SetupHelper.getHealthcareObject = function () {
232
232
  return {
233
- orderConfirmation: function (fk_accountid, fkh_userid, token_id, pincode, order_amount, offer_amount, payment_method, fkh_order_id, fkh_order_status) {
234
- return new analytics_1.Healthcare.OrderConfirmation(fk_accountid, fkh_userid, token_id, pincode, order_amount, offer_amount, payment_method, fkh_order_id, fkh_order_status);
233
+ orderConfirmation: function (fk_accountid, fkh_userid, token_id, pincode, order_amount, offer_amount, payment_method, order_id, order_status) {
234
+ return new analytics_1.Healthcare.OrderConfirmation(fk_accountid, fkh_userid, token_id, pincode, order_amount, offer_amount, payment_method, order_id, order_status);
235
235
  },
236
- proceedToPay: function (fk_accountid, fkh_userid, token_id, pincode, order_amount, offer_amount, payment_method) {
237
- return new analytics_1.Healthcare.ProceedToPay(fk_accountid, fkh_userid, token_id, pincode, order_amount, offer_amount, payment_method);
236
+ proceedToPayEvent: function (fk_accountid, fkh_userid, token_id, pincode, order_amount, offer_amount, payment_method, order_id) {
237
+ return new analytics_1.Healthcare.ProceedToPayEvent(fk_accountid, fkh_userid, token_id, pincode, order_amount, offer_amount, payment_method, order_id);
238
238
  },
239
239
  uploadPrescription: function (fk_accountid, fkh_userid, token_id, pincode, page_name) {
240
240
  return new analytics_1.Healthcare.UploadPrescription(fk_accountid, fkh_userid, token_id, pincode, page_name);
@@ -0,0 +1,3 @@
1
+ export interface DeviceInfoResponse {
2
+ deviceID: string;
3
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fk-platform-sdk",
3
- "version": "1.0.28-beta",
3
+ "version": "1.0.29-beta",
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",