fk-platform-sdk 1.0.36 → 1.0.37-beta2

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.
Files changed (41) hide show
  1. package/dist/analytics/Bill.js +22 -19
  2. package/dist/analytics/Cab.js +11 -13
  3. package/dist/analytics/EventValidator.js +1 -0
  4. package/dist/analytics/FoodDelivery.js +27 -26
  5. package/dist/analytics/FoodDish.js +1 -0
  6. package/dist/analytics/Healthcare.js +31 -40
  7. package/dist/analytics/Person.js +1 -0
  8. package/dist/analytics/Recharge.js +16 -18
  9. package/dist/analytics/ShowTicket.js +18 -21
  10. package/dist/analytics/Travel.js +23 -27
  11. package/dist/analytics/index.js +1 -0
  12. package/dist/analytics/interfaces/AnalyticsEvent.js +1 -0
  13. package/dist/analytics/validation/ValidationTypes.js +2 -2
  14. package/dist/analytics/validation/Validator.js +1 -0
  15. package/dist/analytics/validation/decorators.js +1 -0
  16. package/dist/constants/Errors.js +2 -2
  17. package/dist/errors/FKPlatformError.js +9 -3
  18. package/dist/index.js +3 -2
  19. package/dist/interfaces/modules/LocationModule.d.ts +2 -1
  20. package/dist/interfaces/modules/PermissionsModule.js +1 -0
  21. package/dist/managers/ModuleManager.js +1 -0
  22. package/dist/managers/NativeModuleCallbackManager.js +2 -2
  23. package/dist/managers/NativeModuleHelper.js +1 -0
  24. package/dist/managers/WindowManager.js +1 -0
  25. package/dist/modules/AnalyticsModuleImpl.js +9 -3
  26. package/dist/modules/AppVersionModuleImpl.js +9 -3
  27. package/dist/modules/AuthModuleImpl.js +9 -3
  28. package/dist/modules/ContactsModuleImpl.js +9 -3
  29. package/dist/modules/DownloaderModuleImpl.js +9 -3
  30. package/dist/modules/FontModuleImpl.js +9 -3
  31. package/dist/modules/LocationModuleImpl.d.ts +2 -1
  32. package/dist/modules/LocationModuleImpl.js +18 -3
  33. package/dist/modules/NavigationModuleImpl.js +9 -3
  34. package/dist/modules/PermissionsModuleImpl.js +9 -3
  35. package/dist/modules/SMSModuleImpl.js +9 -3
  36. package/dist/private/tracking-setup-index.js +11 -2
  37. package/dist/setup/SetupHelper.js +1 -0
  38. package/dist/types/LocationManagerResponse.d.ts +4 -0
  39. package/dist/types/NativeModuleResponseType.d.ts +1 -1
  40. package/dist/web/index.js +3 -2
  41. package/package.json +1 -1
@@ -1,15 +1,21 @@
1
1
  "use strict";
2
2
  var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = Object.setPrototypeOf ||
4
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
6
9
  return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
7
12
  extendStatics(d, b);
8
13
  function __() { this.constructor = d; }
9
14
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
10
15
  };
11
16
  })();
12
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.NavigationModuleImpl = void 0;
13
19
  var NativeModuleHelper_1 = require("../managers/NativeModuleHelper");
14
20
  var NavigationModuleImpl = /** @class */ (function (_super) {
15
21
  __extends(NavigationModuleImpl, _super);
@@ -1,15 +1,21 @@
1
1
  "use strict";
2
2
  var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = Object.setPrototypeOf ||
4
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
6
9
  return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
7
12
  extendStatics(d, b);
8
13
  function __() { this.constructor = d; }
9
14
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
10
15
  };
11
16
  })();
12
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.PermissionsModuleImpl = void 0;
13
19
  var NativeModuleHelper_1 = require("../managers/NativeModuleHelper");
14
20
  var PermissionsModule_1 = require("../interfaces/modules/PermissionsModule");
15
21
  var PermissionsModuleImpl = /** @class */ (function (_super) {
@@ -1,15 +1,21 @@
1
1
  "use strict";
2
2
  var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = Object.setPrototypeOf ||
4
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
6
9
  return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
7
12
  extendStatics(d, b);
8
13
  function __() { this.constructor = d; }
9
14
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
10
15
  };
11
16
  })();
12
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.SMSModuleImpl = void 0;
13
19
  var NativeModuleHelper_1 = require("../managers/NativeModuleHelper");
14
20
  var SMSModuleImpl = /** @class */ (function (_super) {
15
21
  __extends(SMSModuleImpl, _super);
@@ -1,4 +1,13 @@
1
1
  "use strict";
2
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
3
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
4
+ if (ar || !(i in from)) {
5
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
6
+ ar[i] = from[i];
7
+ }
8
+ }
9
+ return to.concat(ar || Array.prototype.slice.call(from));
10
+ };
2
11
  Object.defineProperty(exports, "__esModule", { value: true });
3
12
  var NativeModuleCallbackManager_1 = require("../managers/NativeModuleCallbackManager");
4
13
  var NavigationModuleImpl_1 = require("../modules/NavigationModuleImpl");
@@ -14,7 +23,7 @@ function trySettingUpLocationChangeEvents() {
14
23
  args[_i - 3] = arguments[_i];
15
24
  }
16
25
  notfiyLocationChange(url, false);
17
- pushStateOriginal.call.apply(pushStateOriginal, [history, data, title, url].concat(args));
26
+ pushStateOriginal.call.apply(pushStateOriginal, __spreadArray([history, data, title, url], args, false));
18
27
  };
19
28
  history.replaceState = function (data, title, url) {
20
29
  var args = [];
@@ -22,7 +31,7 @@ function trySettingUpLocationChangeEvents() {
22
31
  args[_i - 3] = arguments[_i];
23
32
  }
24
33
  notfiyLocationChange(url, false);
25
- replaceStateOriginal.call.apply(replaceStateOriginal, [history, data, title, url].concat(args));
34
+ replaceStateOriginal.call.apply(replaceStateOriginal, __spreadArray([history, data, title, url], args, false));
26
35
  };
27
36
  window.addEventListener("popstate", function (event) {
28
37
  if (event.state) {
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SetupHelper = void 0;
3
4
  var FKPlatform_1 = require("../FKPlatform");
4
5
  var WindowManager_1 = require("../managers/WindowManager");
5
6
  var analytics_1 = require("../analytics");
@@ -1,3 +1,7 @@
1
1
  export interface LocationManagerResponse {
2
2
  pincode: string;
3
3
  }
4
+ export interface PreciseLocationResponse {
5
+ lat: string;
6
+ long: string;
7
+ }
@@ -1 +1 @@
1
- export declare type NativeModuleResponseType = any;
1
+ export type NativeModuleResponseType = any;
package/dist/web/index.js CHANGED
@@ -1,12 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FKPlatformError = exports.Scope = void 0;
3
4
  var FKPlatformError_1 = require("../errors/FKPlatformError");
4
- exports.FKPlatformError = FKPlatformError_1.FKPlatformError;
5
+ Object.defineProperty(exports, "FKPlatformError", { enumerable: true, get: function () { return FKPlatformError_1.FKPlatformError; } });
5
6
  var FKPlatform_1 = require("../FKPlatform");
6
7
  var SetupHelper_1 = require("../setup/SetupHelper");
7
8
  var WindowManager_1 = require("../managers/WindowManager");
8
9
  var PermissionsModule_1 = require("../interfaces/modules/PermissionsModule");
9
- exports.Scope = PermissionsModule_1.Scope;
10
+ Object.defineProperty(exports, "Scope", { enumerable: true, get: function () { return PermissionsModule_1.Scope; } });
10
11
  if (WindowManager_1.WindowManager.isBrowser()) {
11
12
  SetupHelper_1.SetupHelper.setUpForBrowser();
12
13
  if (navigator && navigator.userAgent) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fk-platform-sdk",
3
- "version": "1.0.36",
3
+ "version": "1.0.37-beta2",
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",