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.
- package/package.json +1 -1
- package/dist/FKPlatform.d.ts +0 -27
- package/dist/FKPlatform.js +0 -53
- package/dist/analytics/Bill.d.ts +0 -31
- package/dist/analytics/Bill.js +0 -103
- package/dist/analytics/Cab.d.ts +0 -26
- package/dist/analytics/Cab.js +0 -66
- package/dist/analytics/EventValidator.d.ts +0 -6
- package/dist/analytics/EventValidator.js +0 -15
- package/dist/analytics/FoodDelivery.d.ts +0 -45
- package/dist/analytics/FoodDelivery.js +0 -131
- package/dist/analytics/FoodDish.d.ts +0 -7
- package/dist/analytics/FoodDish.js +0 -12
- package/dist/analytics/Healthcare.d.ts +0 -131
- package/dist/analytics/Healthcare.js +0 -231
- package/dist/analytics/Nft.d.ts +0 -37
- package/dist/analytics/Nft.js +0 -83
- package/dist/analytics/Person.d.ts +0 -6
- package/dist/analytics/Person.js +0 -11
- package/dist/analytics/Recharge.d.ts +0 -27
- package/dist/analytics/Recharge.js +0 -82
- package/dist/analytics/ShowTicket.d.ts +0 -36
- package/dist/analytics/ShowTicket.js +0 -97
- package/dist/analytics/Travel.d.ts +0 -45
- package/dist/analytics/Travel.js +0 -126
- package/dist/analytics/index.d.ts +0 -9
- package/dist/analytics/index.js +0 -18
- package/dist/analytics/interfaces/AnalyticsEvent.d.ts +0 -5
- package/dist/analytics/interfaces/AnalyticsEvent.js +0 -13
- package/dist/analytics/interfaces/AnalyticsHelper.d.ts +0 -67
- package/dist/analytics/interfaces/AnalyticsHelper.js +0 -2
- package/dist/analytics/interfaces/AnalyticsModule.d.ts +0 -19
- package/dist/analytics/interfaces/AnalyticsModule.js +0 -2
- package/dist/analytics/validation/ValidationMetadata.d.ts +0 -10
- package/dist/analytics/validation/ValidationMetadata.js +0 -2
- package/dist/analytics/validation/ValidationTypes.d.ts +0 -6
- package/dist/analytics/validation/ValidationTypes.js +0 -12
- package/dist/analytics/validation/Validator.d.ts +0 -3
- package/dist/analytics/validation/Validator.js +0 -38
- package/dist/analytics/validation/decorators.d.ts +0 -16
- package/dist/analytics/validation/decorators.js +0 -67
- package/dist/analytics/web/bill-index.d.ts +0 -1
- package/dist/analytics/web/bill-index.js +0 -4
- package/dist/analytics/web/cab-index.d.ts +0 -1
- package/dist/analytics/web/cab-index.js +0 -4
- package/dist/analytics/web/food-delivery-index.d.ts +0 -1
- package/dist/analytics/web/food-delivery-index.js +0 -4
- package/dist/analytics/web/recharge-index.d.ts +0 -1
- package/dist/analytics/web/recharge-index.js +0 -4
- package/dist/analytics/web/ticket-index.d.ts +0 -1
- package/dist/analytics/web/ticket-index.js +0 -4
- package/dist/analytics/web/travel-index.d.ts +0 -1
- package/dist/analytics/web/travel-index.js +0 -4
- package/dist/browser-index.d.ts +0 -1
- package/dist/browser-index.js +0 -8
- package/dist/constants/Errors.d.ts +0 -6
- package/dist/constants/Errors.js +0 -13
- package/dist/errors/FKPlatformError.d.ts +0 -3
- package/dist/errors/FKPlatformError.js +0 -20
- package/dist/errors/NativeModuleError.d.ts +0 -5
- package/dist/errors/NativeModuleError.js +0 -2
- package/dist/index.d.ts +0 -5
- package/dist/index.js +0 -21
- package/dist/interfaces/AuthenticationTokens.d.ts +0 -4
- package/dist/interfaces/AuthenticationTokens.js +0 -2
- package/dist/interfaces/EventManager.d.ts +0 -3
- package/dist/interfaces/EventManager.js +0 -2
- package/dist/interfaces/FKExtension.d.ts +0 -11
- package/dist/interfaces/FKExtension.js +0 -2
- package/dist/interfaces/FKWindow.d.ts +0 -11
- package/dist/interfaces/FKWindow.js +0 -2
- package/dist/interfaces/NativeModuleManagerProvider.d.ts +0 -15
- package/dist/interfaces/NativeModuleManagerProvider.js +0 -2
- package/dist/interfaces/NativeModuleResponse.d.ts +0 -10
- package/dist/interfaces/NativeModuleResponse.js +0 -2
- package/dist/interfaces/modules/AppVersionModule.d.ts +0 -5
- package/dist/interfaces/modules/AppVersionModule.js +0 -2
- package/dist/interfaces/modules/ContactsModule.d.ts +0 -11
- package/dist/interfaces/modules/ContactsModule.js +0 -2
- package/dist/interfaces/modules/DownloaderModule.d.ts +0 -5
- package/dist/interfaces/modules/DownloaderModule.js +0 -2
- package/dist/interfaces/modules/ErrorHandlerModule.d.ts +0 -11
- package/dist/interfaces/modules/ErrorHandlerModule.js +0 -2
- package/dist/interfaces/modules/FontModule.d.ts +0 -5
- package/dist/interfaces/modules/FontModule.js +0 -2
- package/dist/interfaces/modules/GenericUltraShareModule.d.ts +0 -5
- package/dist/interfaces/modules/GenericUltraShareModule.js +0 -2
- package/dist/interfaces/modules/LocationModule.d.ts +0 -8
- package/dist/interfaces/modules/LocationModule.js +0 -2
- package/dist/interfaces/modules/NavigationModule.d.ts +0 -12
- package/dist/interfaces/modules/NavigationModule.js +0 -2
- package/dist/interfaces/modules/PermissionsModule.d.ts +0 -19
- package/dist/interfaces/modules/PermissionsModule.js +0 -8
- package/dist/interfaces/modules/SMSModule.d.ts +0 -5
- package/dist/interfaces/modules/SMSModule.js +0 -2
- package/dist/managers/ModuleManager.d.ts +0 -29
- package/dist/managers/ModuleManager.js +0 -84
- package/dist/managers/NativeModuleCallbackManager.d.ts +0 -12
- package/dist/managers/NativeModuleCallbackManager.js +0 -65
- package/dist/managers/NativeModuleHelper.d.ts +0 -17
- package/dist/managers/NativeModuleHelper.js +0 -65
- package/dist/managers/WindowManager.d.ts +0 -5
- package/dist/managers/WindowManager.js +0 -20
- package/dist/modules/AnalyticsModuleImpl.d.ts +0 -11
- package/dist/modules/AnalyticsModuleImpl.js +0 -74
- package/dist/modules/AppVersionModuleImpl.d.ts +0 -9
- package/dist/modules/AppVersionModuleImpl.js +0 -30
- package/dist/modules/AuthModuleImpl.d.ts +0 -6
- package/dist/modules/AuthModuleImpl.js +0 -27
- package/dist/modules/ContactsModuleImpl.d.ts +0 -11
- package/dist/modules/ContactsModuleImpl.js +0 -40
- package/dist/modules/DownloaderModuleImpl.d.ts +0 -9
- package/dist/modules/DownloaderModuleImpl.js +0 -32
- package/dist/modules/ErrorHandlerModuleImpl.d.ts +0 -8
- package/dist/modules/ErrorHandlerModuleImpl.js +0 -31
- package/dist/modules/FontModuleImpl.d.ts +0 -9
- package/dist/modules/FontModuleImpl.js +0 -32
- package/dist/modules/LocationModuleImpl.d.ts +0 -12
- package/dist/modules/LocationModuleImpl.js +0 -49
- package/dist/modules/NavigationModuleImpl.d.ts +0 -15
- package/dist/modules/NavigationModuleImpl.js +0 -72
- package/dist/modules/PermissionsModuleImpl.d.ts +0 -14
- package/dist/modules/PermissionsModuleImpl.js +0 -51
- package/dist/modules/SMSModuleImpl.d.ts +0 -9
- package/dist/modules/SMSModuleImpl.js +0 -30
- package/dist/modules/ShareModuleImpl.d.ts +0 -9
- package/dist/modules/ShareModuleImpl.js +0 -35
- package/dist/private/tracking-setup-index.d.ts +0 -1
- package/dist/private/tracking-setup-index.js +0 -49
- package/dist/setup/SetupHelper.d.ts +0 -22
- package/dist/setup/SetupHelper.js +0 -283
- package/dist/types/AppVersionManagerResponse.d.ts +0 -3
- package/dist/types/AppVersionManagerResponse.js +0 -2
- package/dist/types/DeviceInfoResponse.d.ts +0 -3
- package/dist/types/DeviceInfoResponse.js +0 -2
- package/dist/types/DownloadManagerResponse.d.ts +0 -3
- package/dist/types/DownloadManagerResponse.js +0 -2
- package/dist/types/FontsManagerResponse.d.ts +0 -3
- package/dist/types/FontsManagerResponse.js +0 -2
- package/dist/types/GenericShareManagerResponse.d.ts +0 -3
- package/dist/types/GenericShareManagerResponse.js +0 -2
- package/dist/types/LocationManagerResponse.d.ts +0 -7
- package/dist/types/LocationManagerResponse.js +0 -2
- package/dist/types/NativeModuleResponseType.d.ts +0 -1
- package/dist/types/NativeModuleResponseType.js +0 -2
- package/dist/types/PermissionsManagerResponse.d.ts +0 -3
- package/dist/types/PermissionsManagerResponse.js +0 -2
- package/dist/types/SMSManagerResponse.d.ts +0 -3
- package/dist/types/SMSManagerResponse.js +0 -2
- package/dist/web/index.d.ts +0 -5
- package/dist/web/index.js +0 -19
package/dist/analytics/Travel.js
DELETED
|
@@ -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 };
|
package/dist/analytics/index.js
DELETED
|
@@ -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,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,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,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,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 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/browser-index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/browser-index.js
DELETED
|
@@ -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
|
-
}
|
package/dist/constants/Errors.js
DELETED
|
@@ -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,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;
|
package/dist/index.d.ts
DELETED
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,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
|
-
}
|