fk-platform-sdk 1.0.39-beta1 → 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.
- package/dist/analytics/index.d.ts +1 -2
- package/dist/analytics/index.js +0 -2
- package/dist/analytics/interfaces/AnalyticsHelper.d.ts +1 -7
- package/dist/interfaces/modules/LocationModule.d.ts +2 -1
- package/dist/modules/LocationModuleImpl.d.ts +2 -1
- package/dist/modules/LocationModuleImpl.js +9 -0
- package/dist/setup/SetupHelper.d.ts +1 -2
- package/dist/setup/SetupHelper.js +0 -16
- package/dist/types/LocationManagerResponse.d.ts +4 -0
- package/package.json +1 -1
- package/dist/analytics/Nft.d.ts +0 -27
- package/dist/analytics/Nft.js +0 -73
|
@@ -5,5 +5,4 @@ import * as Bill from "./Bill";
|
|
|
5
5
|
import * as Ticket from "./ShowTicket";
|
|
6
6
|
import * as FoodDelivery from "./FoodDelivery";
|
|
7
7
|
import * as Healthcare from "./Healthcare";
|
|
8
|
-
|
|
9
|
-
export { Bill, Cab, FoodDelivery, Recharge, Ticket, Travel, Healthcare, Nft };
|
|
8
|
+
export { Bill, Cab, FoodDelivery, Recharge, Ticket, Travel, Healthcare };
|
package/dist/analytics/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Bill, Cab, FoodDelivery, Recharge, Ticket, Travel, Healthcare
|
|
1
|
+
import { Bill, Cab, FoodDelivery, Recharge, Ticket, Travel, Healthcare } from "../";
|
|
2
2
|
import { FoodDish } from "../FoodDish";
|
|
3
3
|
import { Person } from "../Person";
|
|
4
4
|
export interface AnalyticsHelper {
|
|
@@ -47,12 +47,6 @@ export interface TravelAnalyticsHelper {
|
|
|
47
47
|
customerDetails: (email: string, phoneNumber: string, travellers: Person[]) => Travel.CustomerDetails;
|
|
48
48
|
orderConfirmation: (amountToPay: number, paymentMethod: string) => Travel.OrderConfirmation;
|
|
49
49
|
}
|
|
50
|
-
export interface NFTAnalyticsHelper {
|
|
51
|
-
wallet: (stage: string) => Nft.Wallet;
|
|
52
|
-
kycProcess: (step: string) => Nft.KycProcess;
|
|
53
|
-
pageView: (load_time: number, page_name: string) => Nft.PageView;
|
|
54
|
-
clicks: (action: string) => Nft.Clicks;
|
|
55
|
-
}
|
|
56
50
|
export interface HealthcareAnalyticsHelper {
|
|
57
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, page_visit_timestamp: number) => Healthcare.OrderConfirmation;
|
|
58
52
|
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;
|
|
@@ -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,7 +1,7 @@
|
|
|
1
1
|
import EventManager from "../interfaces/EventManager";
|
|
2
2
|
import { BillAnalyticsHelper, CabAnalyticsHelper, FoodDeliveryAnalyticsHelper } from "../analytics/interfaces/AnalyticsHelper";
|
|
3
3
|
import { RechargeAnalyticsHelper, TicketAnalyticsHelper, TravelAnalyticsHelper } from "../analytics/interfaces/AnalyticsHelper";
|
|
4
|
-
import { HealthcareAnalyticsHelper
|
|
4
|
+
import { HealthcareAnalyticsHelper } from "../analytics/interfaces/AnalyticsHelper";
|
|
5
5
|
export declare class SetupHelper {
|
|
6
6
|
static setUpForBrowser(): void;
|
|
7
7
|
static setupBillAnalyticsForBrowser(): void;
|
|
@@ -17,6 +17,5 @@ export declare class SetupHelper {
|
|
|
17
17
|
static getFoodDeliveryObject(): FoodDeliveryAnalyticsHelper;
|
|
18
18
|
static getRechargeObject(): RechargeAnalyticsHelper;
|
|
19
19
|
static getTicketObject(): TicketAnalyticsHelper;
|
|
20
|
-
static getNftObject(): NFTAnalyticsHelper;
|
|
21
20
|
static getHealthcareObject(): HealthcareAnalyticsHelper;
|
|
22
21
|
}
|
|
@@ -228,22 +228,6 @@ var SetupHelper = /** @class */ (function () {
|
|
|
228
228
|
},
|
|
229
229
|
};
|
|
230
230
|
};
|
|
231
|
-
SetupHelper.getNftObject = function () {
|
|
232
|
-
return {
|
|
233
|
-
wallet: function (stage) {
|
|
234
|
-
return new analytics_1.Nft.Wallet(stage);
|
|
235
|
-
},
|
|
236
|
-
pageView: function (load_time, page_name) {
|
|
237
|
-
return new analytics_1.Nft.PageView(load_time, page_name);
|
|
238
|
-
},
|
|
239
|
-
kycProcess: function (step) {
|
|
240
|
-
return new analytics_1.Nft.KycProcess(step);
|
|
241
|
-
},
|
|
242
|
-
clicks: function (action) {
|
|
243
|
-
return new analytics_1.Nft.Clicks(action);
|
|
244
|
-
}
|
|
245
|
-
};
|
|
246
|
-
};
|
|
247
231
|
SetupHelper.getHealthcareObject = function () {
|
|
248
232
|
return {
|
|
249
233
|
orderConfirmation: function (fk_accountid, fkh_userid, token_id, pincode, order_amount, offer_amount, payment_method, fkh_order_id, fkh_order_status, page_visit_timestamp) {
|
package/package.json
CHANGED
package/dist/analytics/Nft.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { AnalyticsEvent } from "./interfaces/AnalyticsEvent";
|
|
2
|
-
import { EventValidator } from "./EventValidator";
|
|
3
|
-
export declare class PageView implements AnalyticsEvent {
|
|
4
|
-
type: string;
|
|
5
|
-
private load_time;
|
|
6
|
-
private page_name;
|
|
7
|
-
constructor(load_time: number, page_name: string);
|
|
8
|
-
getValidator(): EventValidator;
|
|
9
|
-
}
|
|
10
|
-
export declare class Wallet implements AnalyticsEvent {
|
|
11
|
-
type: string;
|
|
12
|
-
private stage;
|
|
13
|
-
constructor(stage: string);
|
|
14
|
-
getValidator(): EventValidator;
|
|
15
|
-
}
|
|
16
|
-
export declare class KycProcess implements AnalyticsEvent {
|
|
17
|
-
type: string;
|
|
18
|
-
private step;
|
|
19
|
-
constructor(step: string);
|
|
20
|
-
getValidator(): EventValidator;
|
|
21
|
-
}
|
|
22
|
-
export declare class Clicks implements AnalyticsEvent {
|
|
23
|
-
type: string;
|
|
24
|
-
private action;
|
|
25
|
-
constructor(action: string);
|
|
26
|
-
getValidator(): EventValidator;
|
|
27
|
-
}
|
package/dist/analytics/Nft.js
DELETED
|
@@ -1,73 +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 PageView = /** @class */ (function () {
|
|
14
|
-
function PageView(load_time, page_name) {
|
|
15
|
-
this.type = "Nft.PageView";
|
|
16
|
-
this.load_time = load_time;
|
|
17
|
-
this.page_name = page_name;
|
|
18
|
-
}
|
|
19
|
-
PageView.prototype.getValidator = function () {
|
|
20
|
-
var invalidValues = Validator_1.validate(metadataMap, this, "PageView");
|
|
21
|
-
return new EventValidator_1.EventValidator(invalidValues);
|
|
22
|
-
};
|
|
23
|
-
__decorate([
|
|
24
|
-
decorators_1.Positive(metadataMap, "PageView")
|
|
25
|
-
], PageView.prototype, "load_time", void 0);
|
|
26
|
-
return PageView;
|
|
27
|
-
}());
|
|
28
|
-
exports.PageView = PageView;
|
|
29
|
-
var Wallet = /** @class */ (function () {
|
|
30
|
-
function Wallet(stage) {
|
|
31
|
-
this.type = "Nft.Wallet";
|
|
32
|
-
this.stage = stage;
|
|
33
|
-
}
|
|
34
|
-
Wallet.prototype.getValidator = function () {
|
|
35
|
-
var invalidValues = Validator_1.validate(metadataMap, this, "Wallet");
|
|
36
|
-
return new EventValidator_1.EventValidator(invalidValues);
|
|
37
|
-
};
|
|
38
|
-
__decorate([
|
|
39
|
-
decorators_1.Positive(metadataMap, "Wallet")
|
|
40
|
-
], Wallet.prototype, "stage", void 0);
|
|
41
|
-
return Wallet;
|
|
42
|
-
}());
|
|
43
|
-
exports.Wallet = Wallet;
|
|
44
|
-
var KycProcess = /** @class */ (function () {
|
|
45
|
-
function KycProcess(step) {
|
|
46
|
-
this.type = "Nft.KycProcess";
|
|
47
|
-
this.step = step;
|
|
48
|
-
}
|
|
49
|
-
KycProcess.prototype.getValidator = function () {
|
|
50
|
-
var invalidValues = Validator_1.validate(metadataMap, this, "KycProcess");
|
|
51
|
-
return new EventValidator_1.EventValidator(invalidValues);
|
|
52
|
-
};
|
|
53
|
-
__decorate([
|
|
54
|
-
decorators_1.Positive(metadataMap, "KycProcess")
|
|
55
|
-
], KycProcess.prototype, "step", void 0);
|
|
56
|
-
return KycProcess;
|
|
57
|
-
}());
|
|
58
|
-
exports.KycProcess = KycProcess;
|
|
59
|
-
var Clicks = /** @class */ (function () {
|
|
60
|
-
function Clicks(action) {
|
|
61
|
-
this.type = "Nft.Clicks";
|
|
62
|
-
this.action = action;
|
|
63
|
-
}
|
|
64
|
-
Clicks.prototype.getValidator = function () {
|
|
65
|
-
var invalidValues = Validator_1.validate(metadataMap, this, "Clicks");
|
|
66
|
-
return new EventValidator_1.EventValidator(invalidValues);
|
|
67
|
-
};
|
|
68
|
-
__decorate([
|
|
69
|
-
decorators_1.Positive(metadataMap, "Clicks")
|
|
70
|
-
], Clicks.prototype, "action", void 0);
|
|
71
|
-
return Clicks;
|
|
72
|
-
}());
|
|
73
|
-
exports.Clicks = Clicks;
|