fk-platform-sdk 1.0.47 → 1.1.0-beta.1

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 (151) hide show
  1. package/package.json +1 -1
  2. package/dist/FKPlatform.d.ts +0 -27
  3. package/dist/FKPlatform.js +0 -53
  4. package/dist/analytics/Bill.d.ts +0 -31
  5. package/dist/analytics/Bill.js +0 -103
  6. package/dist/analytics/Cab.d.ts +0 -26
  7. package/dist/analytics/Cab.js +0 -66
  8. package/dist/analytics/EventValidator.d.ts +0 -6
  9. package/dist/analytics/EventValidator.js +0 -15
  10. package/dist/analytics/FoodDelivery.d.ts +0 -45
  11. package/dist/analytics/FoodDelivery.js +0 -131
  12. package/dist/analytics/FoodDish.d.ts +0 -7
  13. package/dist/analytics/FoodDish.js +0 -12
  14. package/dist/analytics/Healthcare.d.ts +0 -131
  15. package/dist/analytics/Healthcare.js +0 -231
  16. package/dist/analytics/Nft.d.ts +0 -37
  17. package/dist/analytics/Nft.js +0 -83
  18. package/dist/analytics/Person.d.ts +0 -6
  19. package/dist/analytics/Person.js +0 -11
  20. package/dist/analytics/Recharge.d.ts +0 -27
  21. package/dist/analytics/Recharge.js +0 -82
  22. package/dist/analytics/ShowTicket.d.ts +0 -36
  23. package/dist/analytics/ShowTicket.js +0 -97
  24. package/dist/analytics/Travel.d.ts +0 -45
  25. package/dist/analytics/Travel.js +0 -126
  26. package/dist/analytics/index.d.ts +0 -9
  27. package/dist/analytics/index.js +0 -18
  28. package/dist/analytics/interfaces/AnalyticsEvent.d.ts +0 -5
  29. package/dist/analytics/interfaces/AnalyticsEvent.js +0 -13
  30. package/dist/analytics/interfaces/AnalyticsHelper.d.ts +0 -67
  31. package/dist/analytics/interfaces/AnalyticsHelper.js +0 -2
  32. package/dist/analytics/interfaces/AnalyticsModule.d.ts +0 -19
  33. package/dist/analytics/interfaces/AnalyticsModule.js +0 -2
  34. package/dist/analytics/validation/ValidationMetadata.d.ts +0 -10
  35. package/dist/analytics/validation/ValidationMetadata.js +0 -2
  36. package/dist/analytics/validation/ValidationTypes.d.ts +0 -6
  37. package/dist/analytics/validation/ValidationTypes.js +0 -12
  38. package/dist/analytics/validation/Validator.d.ts +0 -3
  39. package/dist/analytics/validation/Validator.js +0 -38
  40. package/dist/analytics/validation/decorators.d.ts +0 -16
  41. package/dist/analytics/validation/decorators.js +0 -67
  42. package/dist/analytics/web/bill-index.d.ts +0 -1
  43. package/dist/analytics/web/bill-index.js +0 -4
  44. package/dist/analytics/web/cab-index.d.ts +0 -1
  45. package/dist/analytics/web/cab-index.js +0 -4
  46. package/dist/analytics/web/food-delivery-index.d.ts +0 -1
  47. package/dist/analytics/web/food-delivery-index.js +0 -4
  48. package/dist/analytics/web/recharge-index.d.ts +0 -1
  49. package/dist/analytics/web/recharge-index.js +0 -4
  50. package/dist/analytics/web/ticket-index.d.ts +0 -1
  51. package/dist/analytics/web/ticket-index.js +0 -4
  52. package/dist/analytics/web/travel-index.d.ts +0 -1
  53. package/dist/analytics/web/travel-index.js +0 -4
  54. package/dist/browser-index.d.ts +0 -1
  55. package/dist/browser-index.js +0 -8
  56. package/dist/constants/Errors.d.ts +0 -6
  57. package/dist/constants/Errors.js +0 -13
  58. package/dist/errors/FKPlatformError.d.ts +0 -3
  59. package/dist/errors/FKPlatformError.js +0 -20
  60. package/dist/errors/NativeModuleError.d.ts +0 -5
  61. package/dist/errors/NativeModuleError.js +0 -2
  62. package/dist/index.d.ts +0 -5
  63. package/dist/index.js +0 -21
  64. package/dist/interfaces/AuthenticationTokens.d.ts +0 -4
  65. package/dist/interfaces/AuthenticationTokens.js +0 -2
  66. package/dist/interfaces/EventManager.d.ts +0 -3
  67. package/dist/interfaces/EventManager.js +0 -2
  68. package/dist/interfaces/FKExtension.d.ts +0 -11
  69. package/dist/interfaces/FKExtension.js +0 -2
  70. package/dist/interfaces/FKWindow.d.ts +0 -11
  71. package/dist/interfaces/FKWindow.js +0 -2
  72. package/dist/interfaces/NativeModuleManagerProvider.d.ts +0 -15
  73. package/dist/interfaces/NativeModuleManagerProvider.js +0 -2
  74. package/dist/interfaces/NativeModuleResponse.d.ts +0 -10
  75. package/dist/interfaces/NativeModuleResponse.js +0 -2
  76. package/dist/interfaces/modules/AppVersionModule.d.ts +0 -5
  77. package/dist/interfaces/modules/AppVersionModule.js +0 -2
  78. package/dist/interfaces/modules/ContactsModule.d.ts +0 -11
  79. package/dist/interfaces/modules/ContactsModule.js +0 -2
  80. package/dist/interfaces/modules/DownloaderModule.d.ts +0 -5
  81. package/dist/interfaces/modules/DownloaderModule.js +0 -2
  82. package/dist/interfaces/modules/ErrorHandlerModule.d.ts +0 -11
  83. package/dist/interfaces/modules/ErrorHandlerModule.js +0 -2
  84. package/dist/interfaces/modules/FontModule.d.ts +0 -5
  85. package/dist/interfaces/modules/FontModule.js +0 -2
  86. package/dist/interfaces/modules/GenericUltraShareModule.d.ts +0 -5
  87. package/dist/interfaces/modules/GenericUltraShareModule.js +0 -2
  88. package/dist/interfaces/modules/LocationModule.d.ts +0 -8
  89. package/dist/interfaces/modules/LocationModule.js +0 -2
  90. package/dist/interfaces/modules/NavigationModule.d.ts +0 -12
  91. package/dist/interfaces/modules/NavigationModule.js +0 -2
  92. package/dist/interfaces/modules/PermissionsModule.d.ts +0 -19
  93. package/dist/interfaces/modules/PermissionsModule.js +0 -8
  94. package/dist/interfaces/modules/SMSModule.d.ts +0 -5
  95. package/dist/interfaces/modules/SMSModule.js +0 -2
  96. package/dist/managers/ModuleManager.d.ts +0 -29
  97. package/dist/managers/ModuleManager.js +0 -84
  98. package/dist/managers/NativeModuleCallbackManager.d.ts +0 -12
  99. package/dist/managers/NativeModuleCallbackManager.js +0 -65
  100. package/dist/managers/NativeModuleHelper.d.ts +0 -17
  101. package/dist/managers/NativeModuleHelper.js +0 -65
  102. package/dist/managers/WindowManager.d.ts +0 -5
  103. package/dist/managers/WindowManager.js +0 -20
  104. package/dist/modules/AnalyticsModuleImpl.d.ts +0 -11
  105. package/dist/modules/AnalyticsModuleImpl.js +0 -74
  106. package/dist/modules/AppVersionModuleImpl.d.ts +0 -9
  107. package/dist/modules/AppVersionModuleImpl.js +0 -30
  108. package/dist/modules/AuthModuleImpl.d.ts +0 -6
  109. package/dist/modules/AuthModuleImpl.js +0 -27
  110. package/dist/modules/ContactsModuleImpl.d.ts +0 -11
  111. package/dist/modules/ContactsModuleImpl.js +0 -40
  112. package/dist/modules/DownloaderModuleImpl.d.ts +0 -9
  113. package/dist/modules/DownloaderModuleImpl.js +0 -32
  114. package/dist/modules/ErrorHandlerModuleImpl.d.ts +0 -8
  115. package/dist/modules/ErrorHandlerModuleImpl.js +0 -31
  116. package/dist/modules/FontModuleImpl.d.ts +0 -9
  117. package/dist/modules/FontModuleImpl.js +0 -32
  118. package/dist/modules/LocationModuleImpl.d.ts +0 -12
  119. package/dist/modules/LocationModuleImpl.js +0 -49
  120. package/dist/modules/NavigationModuleImpl.d.ts +0 -15
  121. package/dist/modules/NavigationModuleImpl.js +0 -72
  122. package/dist/modules/PermissionsModuleImpl.d.ts +0 -14
  123. package/dist/modules/PermissionsModuleImpl.js +0 -51
  124. package/dist/modules/SMSModuleImpl.d.ts +0 -9
  125. package/dist/modules/SMSModuleImpl.js +0 -30
  126. package/dist/modules/ShareModuleImpl.d.ts +0 -9
  127. package/dist/modules/ShareModuleImpl.js +0 -35
  128. package/dist/private/tracking-setup-index.d.ts +0 -1
  129. package/dist/private/tracking-setup-index.js +0 -49
  130. package/dist/setup/SetupHelper.d.ts +0 -22
  131. package/dist/setup/SetupHelper.js +0 -283
  132. package/dist/types/AppVersionManagerResponse.d.ts +0 -3
  133. package/dist/types/AppVersionManagerResponse.js +0 -2
  134. package/dist/types/DeviceInfoResponse.d.ts +0 -3
  135. package/dist/types/DeviceInfoResponse.js +0 -2
  136. package/dist/types/DownloadManagerResponse.d.ts +0 -3
  137. package/dist/types/DownloadManagerResponse.js +0 -2
  138. package/dist/types/FontsManagerResponse.d.ts +0 -3
  139. package/dist/types/FontsManagerResponse.js +0 -2
  140. package/dist/types/GenericShareManagerResponse.d.ts +0 -3
  141. package/dist/types/GenericShareManagerResponse.js +0 -2
  142. package/dist/types/LocationManagerResponse.d.ts +0 -7
  143. package/dist/types/LocationManagerResponse.js +0 -2
  144. package/dist/types/NativeModuleResponseType.d.ts +0 -1
  145. package/dist/types/NativeModuleResponseType.js +0 -2
  146. package/dist/types/PermissionsManagerResponse.d.ts +0 -3
  147. package/dist/types/PermissionsManagerResponse.js +0 -2
  148. package/dist/types/SMSManagerResponse.d.ts +0 -3
  149. package/dist/types/SMSManagerResponse.js +0 -2
  150. package/dist/web/index.d.ts +0 -5
  151. package/dist/web/index.js +0 -19
@@ -1,126 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- var EventValidator_1 = require("./EventValidator");
10
- var decorators_1 = require("./validation/decorators");
11
- var Validator_1 = require("./validation/Validator");
12
- var metadataMap = {};
13
- var Search = /** @class */ (function () {
14
- function Search(fromLocation, toLocation, date, roundTrip, travellerCount) {
15
- this.type = "Travel.Search";
16
- this.fromLocation = fromLocation;
17
- this.toLocation = toLocation;
18
- this.date = date;
19
- this.roundTrip = roundTrip;
20
- this.travellerCount = travellerCount;
21
- }
22
- Search.prototype.getValidator = function () {
23
- var invalidValues = Validator_1.validate(metadataMap, this, "Search");
24
- if (!this.date || this.date.length === 0) {
25
- invalidValues.push("date array should have atleast 1 value");
26
- }
27
- return new EventValidator_1.EventValidator(invalidValues);
28
- };
29
- __decorate([
30
- decorators_1.NonEmpty(metadataMap, "Search")
31
- ], Search.prototype, "fromLocation", void 0);
32
- __decorate([
33
- decorators_1.NonNegative(metadataMap, "Search")
34
- ], Search.prototype, "travellerCount", void 0);
35
- return Search;
36
- }());
37
- exports.Search = Search;
38
- var Select = /** @class */ (function () {
39
- function Select(name, category, price) {
40
- this.type = "Travel.Select";
41
- this.name = name;
42
- this.category = category;
43
- this.price = price;
44
- }
45
- Select.prototype.getValidator = function () {
46
- var invalidValues = Validator_1.validate(metadataMap, this, "Select");
47
- return new EventValidator_1.EventValidator(invalidValues);
48
- };
49
- __decorate([
50
- decorators_1.NonEmpty(metadataMap, "Select")
51
- ], Select.prototype, "name", void 0);
52
- __decorate([
53
- decorators_1.NonEmpty(metadataMap, "Select")
54
- ], Select.prototype, "category", void 0);
55
- __decorate([
56
- decorators_1.Positive(metadataMap, "Select")
57
- ], Select.prototype, "price", void 0);
58
- return Select;
59
- }());
60
- exports.Select = Select;
61
- var ProceedToPay = /** @class */ (function () {
62
- function ProceedToPay(amountToPay, offerAmount, bookingCharge, vasCharge) {
63
- this.type = "Travel.ProceedToPay";
64
- this.amountToPay = amountToPay;
65
- this.offerAmount = offerAmount;
66
- this.bookingCharge = bookingCharge;
67
- this.vasCharge = vasCharge;
68
- }
69
- ProceedToPay.prototype.getValidator = function () {
70
- var invalidValues = Validator_1.validate(metadataMap, this, "ProceedToPay");
71
- return new EventValidator_1.EventValidator(invalidValues);
72
- };
73
- __decorate([
74
- decorators_1.Positive(metadataMap, "ProceedToPay")
75
- ], ProceedToPay.prototype, "amountToPay", void 0);
76
- __decorate([
77
- decorators_1.NonNegative(metadataMap, "ProceedToPay")
78
- ], ProceedToPay.prototype, "offerAmount", void 0);
79
- __decorate([
80
- decorators_1.NonNegative(metadataMap, "ProceedToPay")
81
- ], ProceedToPay.prototype, "bookingCharge", void 0);
82
- __decorate([
83
- decorators_1.NonNegative(metadataMap, "ProceedToPay")
84
- ], ProceedToPay.prototype, "vasCharge", void 0);
85
- return ProceedToPay;
86
- }());
87
- exports.ProceedToPay = ProceedToPay;
88
- var CustomerDetails = /** @class */ (function () {
89
- function CustomerDetails(email, phoneNumber, travellers) {
90
- this.type = "Travel.CustomerDetails";
91
- this.email = email;
92
- this.phoneNumber = phoneNumber;
93
- this.traveller = travellers;
94
- }
95
- CustomerDetails.prototype.getValidator = function () {
96
- var invalidValues = Validator_1.validate(metadataMap, this, "CustomerDetails");
97
- if (!this.traveller || this.traveller.length === 0) {
98
- invalidValues.push("traveller list should not be empty");
99
- }
100
- return new EventValidator_1.EventValidator(invalidValues);
101
- };
102
- __decorate([
103
- decorators_1.NonEmpty(metadataMap, "CustomerDetails")
104
- ], CustomerDetails.prototype, "email", void 0);
105
- __decorate([
106
- decorators_1.NonEmpty(metadataMap, "CustomerDetails")
107
- ], CustomerDetails.prototype, "phoneNumber", void 0);
108
- return CustomerDetails;
109
- }());
110
- exports.CustomerDetails = CustomerDetails;
111
- var OrderConfirmation = /** @class */ (function () {
112
- function OrderConfirmation(orderAmount, paymentMethod) {
113
- this.type = "Travel.OrderConfirmation";
114
- this.orderAmount = orderAmount;
115
- this.paymentMethod = paymentMethod;
116
- }
117
- OrderConfirmation.prototype.getValidator = function () {
118
- var invalidValues = Validator_1.validate(metadataMap, this, "OrderConfirmation");
119
- return new EventValidator_1.EventValidator(invalidValues);
120
- };
121
- __decorate([
122
- decorators_1.Positive(metadataMap, "OrderConfirmation")
123
- ], OrderConfirmation.prototype, "orderAmount", void 0);
124
- return OrderConfirmation;
125
- }());
126
- exports.OrderConfirmation = OrderConfirmation;
@@ -1,9 +0,0 @@
1
- import * as Travel from "./Travel";
2
- import * as Cab from "./Cab";
3
- import * as Recharge from "./Recharge";
4
- import * as Bill from "./Bill";
5
- import * as Ticket from "./ShowTicket";
6
- import * as FoodDelivery from "./FoodDelivery";
7
- import * as Healthcare from "./Healthcare";
8
- import * as Nft from "./Nft";
9
- export { Bill, Cab, FoodDelivery, Recharge, Ticket, Travel, Healthcare, Nft };
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var Travel = require("./Travel");
4
- exports.Travel = Travel;
5
- var Cab = require("./Cab");
6
- exports.Cab = Cab;
7
- var Recharge = require("./Recharge");
8
- exports.Recharge = Recharge;
9
- var Bill = require("./Bill");
10
- exports.Bill = Bill;
11
- var Ticket = require("./ShowTicket");
12
- exports.Ticket = Ticket;
13
- var FoodDelivery = require("./FoodDelivery");
14
- exports.FoodDelivery = FoodDelivery;
15
- var Healthcare = require("./Healthcare");
16
- exports.Healthcare = Healthcare;
17
- var Nft = require("./Nft");
18
- exports.Nft = Nft;
@@ -1,5 +0,0 @@
1
- import { EventValidator } from "../EventValidator";
2
- export declare abstract class AnalyticsEvent {
3
- type: string;
4
- getValidator(): EventValidator;
5
- }
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var EventValidator_1 = require("../EventValidator");
4
- var AnalyticsEvent = /** @class */ (function () {
5
- function AnalyticsEvent() {
6
- this.type = "";
7
- }
8
- AnalyticsEvent.prototype.getValidator = function () {
9
- return new EventValidator_1.EventValidator(new Array());
10
- };
11
- return AnalyticsEvent;
12
- }());
13
- exports.AnalyticsEvent = AnalyticsEvent;
@@ -1,67 +0,0 @@
1
- import { Bill, Cab, FoodDelivery, Recharge, Ticket, Travel, Healthcare, Nft } from "../";
2
- import { FoodDish } from "../FoodDish";
3
- import { Person } from "../Person";
4
- export interface AnalyticsHelper {
5
- bill?: BillAnalyticsHelper;
6
- cab?: CabAnalyticsHelper;
7
- foodDelivery?: FoodDeliveryAnalyticsHelper;
8
- recharge?: RechargeAnalyticsHelper;
9
- ticket?: TicketAnalyticsHelper;
10
- travel?: TravelAnalyticsHelper;
11
- healthcare?: HealthcareAnalyticsHelper;
12
- }
13
- export interface BillAnalyticsHelper {
14
- select: (productName: string, connectionNumber: string, category: string, price: number) => Bill.Select;
15
- proceedToPay: (amountToPay: number, offerAmount: number) => Bill.ProceedToPay;
16
- customerDetails: (phoneNumber: string, billingAddress: string) => Bill.CustomerDetails;
17
- orderConfirmation: (orderAmount: number, paymentMethod: string) => Bill.OrderConfirmation;
18
- }
19
- export interface CabAnalyticsHelper {
20
- select: (source: string, destination: string[], cab_type: string, rideNow: boolean, rideLaterTime: Date) => Cab.Select;
21
- orderConfirmation: (amount: number, paymentMethod: string, couponCode: string) => Cab.OrderConfirmation;
22
- orderCancellation: (cancellationReason: string) => Cab.OrderCancellation;
23
- }
24
- export interface FoodDeliveryAnalyticsHelper {
25
- search: (searchQuery: string, searchCategory: string) => FoodDelivery.Search;
26
- select: (restaurant: string) => FoodDelivery.Select;
27
- checkOut: (products: FoodDish[]) => FoodDelivery.CheckOut;
28
- proceedToPay: (amountToPay: number, offerAmount: number, deliveryCharge: number, packingCharge: number) => FoodDelivery.ProceedToPay;
29
- customerDetails: (deliveryAddress: string, addressType: string) => FoodDelivery.CustomerDetails;
30
- orderConfirmation: (amountToPay: number, paymentMethod: string) => FoodDelivery.OrderConfirmation;
31
- }
32
- export interface RechargeAnalyticsHelper {
33
- select: (phoneNumber: string, operator: string, circle: string, category: string, expiry: Date, amount: number) => Recharge.Select;
34
- proceedToPay: (amountToPay: number, offerAmount: number) => Recharge.ProceedToPay;
35
- orderConfirmation: (orderAmount: number, paymentMethod: string) => Recharge.OrderConfirmation;
36
- }
37
- export interface TicketAnalyticsHelper {
38
- select: (name: string, category: string, time: Date, eventLocation: string, noOfPeople: number) => Ticket.Select;
39
- addToCart: (ticketClass: string, price: number, eventTime: Date) => Ticket.AddToCart;
40
- proceedToPay: (amountToPay: number, offerAmount: number, noOfTickets: number, bookingCharge: number) => Ticket.ProceedToPay;
41
- orderConfirmation: (amountToPay: number, paymentMethod: string) => Ticket.OrderConfirmation;
42
- }
43
- export interface TravelAnalyticsHelper {
44
- search: (fromLocation: string, toLocation: string[], date: Date[], roundTrip: boolean, travellerCount: number) => Travel.Search;
45
- select: (name: string, category: string, price: number) => Travel.Select;
46
- proceedToPayEvent: (amountToPay: number, offerAmount: number, bookingCharge: number, vasCharge: number) => Travel.ProceedToPay;
47
- customerDetails: (email: string, phoneNumber: string, travellers: Person[]) => Travel.CustomerDetails;
48
- orderConfirmation: (amountToPay: number, paymentMethod: string) => Travel.OrderConfirmation;
49
- }
50
- export interface NFTAnalyticsHelper {
51
- wallet: (stage: string, session_id: string) => Nft.Wallet;
52
- kycProcess: (step: string, session_id: string) => Nft.KycProcess;
53
- pageView: (load_time: number, page_name: string, category: string, value: string, label: string, session_id: string) => Nft.PageView;
54
- clicks: (action: string, category: string, value: string, label: string, session_id: string) => Nft.Clicks;
55
- }
56
- export interface HealthcareAnalyticsHelper {
57
- 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, page_visit_timestamp: number) => Healthcare.OrderConfirmation;
58
- proceedToPay: (fk_accountid: string, fkh_userid: string, token_id: string, pincode: string, order_amount: number, offer_amount: number, payment_method: string, order_id: string, page_visit_timestamp: number) => Healthcare.ProceedToPay;
59
- uploadPrescription: (fk_accountid: string, fkh_userid: string, token_id: string, pincode: string, page_name: string, page_visit_timestamp: number) => Healthcare.UploadPrescription;
60
- addToCart: (fk_accountid: string, fkh_userid: string, token_id: string, pincode: string, product_name: string, product_id: string, price: number, quantity: number, source: string, page_visit_timestamp: number) => Healthcare.AddToCart;
61
- search: (fk_accountid: string, fkh_userid: string, token_id: string, pincode: string, search_query: string, page_visit_timestamp: number) => Healthcare.Search;
62
- locationPincodeEnter: (fk_accountid: string, fkh_userid: string, token_id: string, pincode: string, city: string, state: string, page_visit_timestamp: number) => Healthcare.LocationPincodeEnter;
63
- pageView: (fk_accountid: string, fkh_userid: string, token_id: string, pincode: string, page_name: string, page_visit_timestamp: number) => Healthcare.PageView;
64
- addAddress: (fk_accountid: string, fkh_userid: string, token_id: string, pincode: string, address_tag: string, subarea: string, page_visit_timestamp: number) => Healthcare.AddAddress;
65
- obpUploadPrescription: (fk_accountid: string, fkh_userid: string, token_id: string, pincode: string, rx_file_size: number, no_of_rx_uploaded: number, rx_source: string, page_visit_timestamp: number) => Healthcare.ObpUploadPrescription;
66
- cartContinueButton: (fk_accountid: string, fkh_userid: string, token_id: string, pincode: string, coupon_code: string, cart_value: number, cart_unit_count: number, cart_savings_value: number, cart_item_count: number, page_visit_timestamp: number) => Healthcare.CartContinueButton;
67
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,19 +0,0 @@
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
- }
14
- export interface AnalyticsModule {
15
- pushEvent: (event: AnalyticsEvent) => void;
16
- forceFlushEvents: () => void;
17
- logPerformanceMetrics: (eventInfo: EventInfo) => void;
18
- logPageError: (errorInfo: ErrorInfo) => void;
19
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,10 +0,0 @@
1
- export interface ValidationMetadata {
2
- /**
3
- * Validation type.
4
- */
5
- type: string;
6
- /**
7
- * Property of the object to be validated.
8
- */
9
- propertyName: string;
10
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +0,0 @@
1
- export declare class ValidationTypes {
2
- static POSITIVE: string;
3
- static NON_EMPTY: string;
4
- static NON_NEGATIVE: string;
5
- static NON_NULL: string;
6
- }
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var ValidationTypes = /** @class */ (function () {
4
- function ValidationTypes() {
5
- }
6
- ValidationTypes.POSITIVE = "Positive";
7
- ValidationTypes.NON_EMPTY = "NonEmpty";
8
- ValidationTypes.NON_NEGATIVE = "NonNegative";
9
- ValidationTypes.NON_NULL = "NonNull";
10
- return ValidationTypes;
11
- }());
12
- exports.ValidationTypes = ValidationTypes;
@@ -1,3 +0,0 @@
1
- export declare function validate(metadataMap: any, obj: {
2
- [index: string]: any;
3
- }, className: string): string[];
@@ -1,38 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var ValidationTypes_1 = require("./ValidationTypes");
4
- function validate(metadataMap, obj, className) {
5
- var invalidValues = new Array();
6
- var metadata = metadataMap[className];
7
- metadata.forEach(function (element) {
8
- if (element.type === ValidationTypes_1.ValidationTypes.POSITIVE) {
9
- var num = obj[element.propertyName];
10
- if (!num) {
11
- invalidValues.push(element.propertyName + " should not be empty");
12
- }
13
- else if (num < 0) {
14
- invalidValues.push(element.propertyName + " should not be negative");
15
- }
16
- }
17
- else if (element.type === ValidationTypes_1.ValidationTypes.NON_EMPTY) {
18
- var str = obj[element.propertyName];
19
- if (!str || str === "") {
20
- invalidValues.push(element.propertyName + " should not be empty");
21
- }
22
- }
23
- else if (element.type === ValidationTypes_1.ValidationTypes.NON_NEGATIVE) {
24
- var num = obj[element.propertyName];
25
- if (num && num < 0) {
26
- invalidValues.push(element.propertyName + " should not be negative");
27
- }
28
- }
29
- else if (element.type === ValidationTypes_1.ValidationTypes.NON_NULL) {
30
- var value = obj[element.propertyName];
31
- if (value === null) {
32
- invalidValues.push(element.propertyName + " should not be null");
33
- }
34
- }
35
- });
36
- return invalidValues;
37
- }
38
- exports.validate = validate;
@@ -1,16 +0,0 @@
1
- /**
2
- * Checks that the string should not be empty
3
- */
4
- export declare function NonEmpty(metadataMap: any, className: string): any;
5
- /**
6
- * Checks that the number should be positive
7
- */
8
- export declare function Positive(metadataMap: any, className: string): any;
9
- /**
10
- * Checks that the number should not be negative, null is fine
11
- */
12
- export declare function NonNegative(metadataMap: any, className: string): any;
13
- /**
14
- * Checks that the value should not be null
15
- */
16
- export declare function NonNull(metadataMap: any, className: string): any;
@@ -1,67 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var ValidationTypes_1 = require("./ValidationTypes");
4
- /**
5
- * Checks that the string should not be empty
6
- */
7
- function NonEmpty(metadataMap, className) {
8
- return function (object, name) {
9
- var args = {
10
- type: ValidationTypes_1.ValidationTypes.NON_EMPTY,
11
- propertyName: name,
12
- };
13
- if (!metadataMap[className]) {
14
- metadataMap[className] = new Array();
15
- }
16
- metadataMap[className].push(args);
17
- };
18
- }
19
- exports.NonEmpty = NonEmpty;
20
- /**
21
- * Checks that the number should be positive
22
- */
23
- function Positive(metadataMap, className) {
24
- return function (object, name) {
25
- var args = {
26
- type: ValidationTypes_1.ValidationTypes.POSITIVE,
27
- propertyName: name,
28
- };
29
- if (!metadataMap[className]) {
30
- metadataMap[className] = new Array();
31
- }
32
- metadataMap[className].push(args);
33
- };
34
- }
35
- exports.Positive = Positive;
36
- /**
37
- * Checks that the number should not be negative, null is fine
38
- */
39
- function NonNegative(metadataMap, className) {
40
- return function (object, name) {
41
- var args = {
42
- type: ValidationTypes_1.ValidationTypes.NON_NEGATIVE,
43
- propertyName: name,
44
- };
45
- if (!metadataMap[className]) {
46
- metadataMap[className] = new Array();
47
- }
48
- metadataMap[className].push(args);
49
- };
50
- }
51
- exports.NonNegative = NonNegative;
52
- /**
53
- * Checks that the value should not be null
54
- */
55
- function NonNull(metadataMap, className) {
56
- return function (object, name) {
57
- var args = {
58
- type: ValidationTypes_1.ValidationTypes.NON_NULL,
59
- propertyName: name,
60
- };
61
- if (!metadataMap[className]) {
62
- metadataMap[className] = new Array();
63
- }
64
- metadataMap[className].push(args);
65
- };
66
- }
67
- exports.NonNull = NonNull;
@@ -1 +0,0 @@
1
- export {};
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var SetupHelper_1 = require("../../setup/SetupHelper");
4
- SetupHelper_1.SetupHelper.setupBillAnalyticsForBrowser();
@@ -1 +0,0 @@
1
- export {};
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var SetupHelper_1 = require("../../setup/SetupHelper");
4
- SetupHelper_1.SetupHelper.setupCabAnalyticsForBrowser();
@@ -1 +0,0 @@
1
- export {};
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var SetupHelper_1 = require("../../setup/SetupHelper");
4
- SetupHelper_1.SetupHelper.setupFoodDeliveryAnalyticsForBrowser();
@@ -1 +0,0 @@
1
- export {};
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var SetupHelper_1 = require("../../setup/SetupHelper");
4
- SetupHelper_1.SetupHelper.setupRechargeAnalyticsForBrowser();
@@ -1 +0,0 @@
1
- export {};
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var SetupHelper_1 = require("../../setup/SetupHelper");
4
- SetupHelper_1.SetupHelper.setupTicketAnalyticsForBrowser();
@@ -1 +0,0 @@
1
- export {};
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var SetupHelper_1 = require("../../setup/SetupHelper");
4
- SetupHelper_1.SetupHelper.setupTravelAnalyticsForBrowser();
@@ -1 +0,0 @@
1
- export {};
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var SetupHelper_1 = require("./setup/SetupHelper");
4
- var FKPlatform_1 = require("./FKPlatform");
5
- SetupHelper_1.SetupHelper.setUpForBrowser();
6
- if (navigator && navigator.userAgent) {
7
- FKPlatform_1.default.setUserAgent(navigator.userAgent);
8
- }
@@ -1,6 +0,0 @@
1
- export declare class Errors {
2
- static MESSAGE_AUTH_ERROR: string;
3
- static MESSAGE_PLATFORM_UNAVAILABLE: string;
4
- static MESSAGE_CLIENT_ID_ABSENT: string;
5
- static NATIVE_MODULES_MISSING: string;
6
- }
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var Errors = /** @class */ (function () {
4
- function Errors() {
5
- }
6
- Errors.MESSAGE_AUTH_ERROR = "Method called before authorization, make sure platform is available and" +
7
- " authorization is complete before calling this";
8
- Errors.MESSAGE_PLATFORM_UNAVAILABLE = "Flipkart platform is unavailable, make sure your code is running inside Flipkart app";
9
- Errors.MESSAGE_CLIENT_ID_ABSENT = "Null or empty client id, cannot proceed without it";
10
- Errors.NATIVE_MODULES_MISSING = "Native modules are missing, make sure you are inside Flipkart app and platform is available";
11
- return Errors;
12
- }());
13
- exports.Errors = Errors;
@@ -1,3 +0,0 @@
1
- export declare class FKPlatformError extends Error {
2
- constructor(message: string);
3
- }
@@ -1,20 +0,0 @@
1
- "use strict";
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]; };
6
- return function (d, b) {
7
- extendStatics(d, b);
8
- function __() { this.constructor = d; }
9
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
10
- };
11
- })();
12
- Object.defineProperty(exports, "__esModule", { value: true });
13
- var FKPlatformError = /** @class */ (function (_super) {
14
- __extends(FKPlatformError, _super);
15
- function FKPlatformError(message) {
16
- return _super.call(this, message) || this;
17
- }
18
- return FKPlatformError;
19
- }(Error));
20
- exports.FKPlatformError = FKPlatformError;
@@ -1,5 +0,0 @@
1
- export interface NativeModuleError {
2
- requestId: string;
3
- message: string;
4
- code: number;
5
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
package/dist/index.d.ts DELETED
@@ -1,5 +0,0 @@
1
- import { FKPlatformError } from "./errors/FKPlatformError";
2
- import FKPlatform from "./FKPlatform";
3
- import { Scope } from "./interfaces/modules/PermissionsModule";
4
- export default FKPlatform;
5
- export { Scope, FKPlatformError, };
package/dist/index.js DELETED
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var FKPlatformError_1 = require("./errors/FKPlatformError");
4
- exports.FKPlatformError = FKPlatformError_1.FKPlatformError;
5
- var FKPlatform_1 = require("./FKPlatform");
6
- var SetupHelper_1 = require("./setup/SetupHelper");
7
- var WindowManager_1 = require("./managers/WindowManager");
8
- var react_native_1 = require("react-native");
9
- var PermissionsModule_1 = require("./interfaces/modules/PermissionsModule");
10
- exports.Scope = PermissionsModule_1.Scope;
11
- if (WindowManager_1.WindowManager.isBrowser()) {
12
- throw new FKPlatformError_1.FKPlatformError("React Native Environment not detected. Incase of browser, import from fk-platform-sdk/web");
13
- }
14
- else {
15
- SetupHelper_1.SetupHelper.setUpForReactNative(react_native_1.DeviceEventEmitter, react_native_1.NativeModules);
16
- if (react_native_1.NativeModules && react_native_1.NativeModules.AuthModule) {
17
- var userAgent = react_native_1.NativeModules.AuthModule.userAgent;
18
- FKPlatform_1.default.setUserAgent(userAgent);
19
- }
20
- }
21
- exports.default = FKPlatform_1.default;
@@ -1,4 +0,0 @@
1
- export interface AuthenticationTokens {
2
- identificationToken: string;
3
- accessToken: string;
4
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +0,0 @@
1
- export default interface EventManager {
2
- addListener: (type: string, listener: (data: any) => void) => void;
3
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,11 +0,0 @@
1
- import { NativeModuleError } from "../errors/NativeModuleError";
2
- import FKPlatform from "../FKPlatform";
3
- import { NativeModuleResponseInternal } from "./NativeModuleResponse";
4
- import { AnalyticsHelper } from "../analytics/interfaces/AnalyticsHelper";
5
- export interface FKExtension {
6
- isPlatformAvailable: () => boolean;
7
- newPlatformInstance: (clientId: string) => FKPlatform;
8
- nativeModuleResolve?: (response: NativeModuleResponseInternal) => void;
9
- nativeModuleReject?: (error: NativeModuleError) => void;
10
- analyticsHelper?: AnalyticsHelper;
11
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });