fk-platform-sdk 1.0.35 → 1.0.36-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.
- package/dist/analytics/Nft.d.ts +21 -0
- package/dist/analytics/Nft.js +58 -0
- package/dist/analytics/index.d.ts +2 -1
- package/dist/analytics/index.js +2 -0
- package/dist/analytics/interfaces/AnalyticsHelper.d.ts +6 -1
- package/dist/setup/SetupHelper.d.ts +2 -1
- package/dist/setup/SetupHelper.js +13 -0
- package/package.json +1 -1
|
@@ -0,0 +1,21 @@
|
|
|
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 stage;
|
|
19
|
+
constructor(stage: string);
|
|
20
|
+
getValidator(): EventValidator;
|
|
21
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
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(stage) {
|
|
46
|
+
this.type = "Nft.KycProcess";
|
|
47
|
+
this.stage = stage;
|
|
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, "stage", void 0);
|
|
56
|
+
return KycProcess;
|
|
57
|
+
}());
|
|
58
|
+
exports.KycProcess = KycProcess;
|
|
@@ -5,4 +5,5 @@ 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
|
-
|
|
8
|
+
import * as Nft from "./Nft";
|
|
9
|
+
export { Bill, Cab, FoodDelivery, Recharge, Ticket, Travel, Healthcare, Nft };
|
package/dist/analytics/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Bill, Cab, FoodDelivery, Recharge, Ticket, Travel, Healthcare } from "../";
|
|
1
|
+
import { Bill, Cab, FoodDelivery, Recharge, Ticket, Travel, Healthcare, Nft } from "../";
|
|
2
2
|
import { FoodDish } from "../FoodDish";
|
|
3
3
|
import { Person } from "../Person";
|
|
4
4
|
export interface AnalyticsHelper {
|
|
@@ -47,6 +47,11 @@ 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
|
+
}
|
|
50
55
|
export interface HealthcareAnalyticsHelper {
|
|
51
56
|
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
57
|
proceedToPay: (fk_accountid: string, fkh_userid: string, token_id: string, pincode: string, order_amount: number, offer_amount: number, payment_method: string) => Healthcare.ProceedToPay;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import EventManager from "../interfaces/EventManager";
|
|
2
|
-
import { BillAnalyticsHelper, CabAnalyticsHelper, FoodDeliveryAnalyticsHelper } from "../analytics/interfaces/AnalyticsHelper";
|
|
2
|
+
import { BillAnalyticsHelper, CabAnalyticsHelper, FoodDeliveryAnalyticsHelper, NFTAnalyticsHelper } from "../analytics/interfaces/AnalyticsHelper";
|
|
3
3
|
import { RechargeAnalyticsHelper, TicketAnalyticsHelper, TravelAnalyticsHelper } from "../analytics/interfaces/AnalyticsHelper";
|
|
4
4
|
import { HealthcareAnalyticsHelper } from "../analytics/interfaces/AnalyticsHelper";
|
|
5
5
|
export declare class SetupHelper {
|
|
@@ -17,5 +17,6 @@ export declare class SetupHelper {
|
|
|
17
17
|
static getFoodDeliveryObject(): FoodDeliveryAnalyticsHelper;
|
|
18
18
|
static getRechargeObject(): RechargeAnalyticsHelper;
|
|
19
19
|
static getTicketObject(): TicketAnalyticsHelper;
|
|
20
|
+
static getNftObject(): NFTAnalyticsHelper;
|
|
20
21
|
static getHealthcareObject(): HealthcareAnalyticsHelper;
|
|
21
22
|
}
|
|
@@ -228,6 +228,19 @@ 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
|
+
};
|
|
243
|
+
};
|
|
231
244
|
SetupHelper.getHealthcareObject = function () {
|
|
232
245
|
return {
|
|
233
246
|
orderConfirmation: function (fk_accountid, fkh_userid, token_id, pincode, order_amount, offer_amount, payment_method, fkh_order_id, fkh_order_status) {
|