fk-platform-sdk 1.0.38-beta1 → 1.0.39-beta1
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 +27 -0
- package/dist/analytics/Nft.js +73 -0
- package/dist/analytics/index.d.ts +2 -1
- package/dist/analytics/index.js +2 -0
- package/dist/analytics/interfaces/AnalyticsHelper.d.ts +7 -1
- package/dist/interfaces/modules/GenericUltraShareModule.d.ts +1 -1
- package/dist/modules/ShareModuleImpl.d.ts +1 -1
- package/dist/modules/ShareModuleImpl.js +2 -1
- package/dist/setup/SetupHelper.d.ts +2 -1
- package/dist/setup/SetupHelper.js +16 -0
- package/package.json +1 -1
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
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;
|
|
@@ -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,12 @@ 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
|
+
}
|
|
50
56
|
export interface HealthcareAnalyticsHelper {
|
|
51
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;
|
|
52
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;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { NativeModuleResponse } from "../NativeModuleResponse";
|
|
2
2
|
import { GenericShareManagerResponse } from "../../types/GenericShareManagerResponse";
|
|
3
3
|
export interface GenericUltraShareModule {
|
|
4
|
-
share: (title: string, text: string, url: string) => Promise<NativeModuleResponse<GenericShareManagerResponse>>;
|
|
4
|
+
share: (title: string, text: string, url: string, fileContentUri: string) => Promise<NativeModuleResponse<GenericShareManagerResponse>>;
|
|
5
5
|
}
|
|
@@ -5,5 +5,5 @@ import { GenericUltraShareModule } from "../interfaces/modules/GenericUltraShare
|
|
|
5
5
|
import { GenericShareManagerResponse } from "../types/GenericShareManagerResponse";
|
|
6
6
|
export declare class ShareModuleImpl extends NativeModule<NativeModuleManager> implements GenericUltraShareModule {
|
|
7
7
|
constructor(nativeModuleCallbackManager: NativeModuleCallbackManager);
|
|
8
|
-
share(title: string, text: string, url: string): Promise<NativeModuleResponse<GenericShareManagerResponse>>;
|
|
8
|
+
share(title: string, text: string, url: string, fileContentUri: string): Promise<NativeModuleResponse<GenericShareManagerResponse>>;
|
|
9
9
|
}
|
|
@@ -17,7 +17,7 @@ var ShareModuleImpl = /** @class */ (function (_super) {
|
|
|
17
17
|
return _super.call(this, NativeModuleHelper_1.NativeModuleHelper.getCurrentNativeModuleProvider()
|
|
18
18
|
.GenericUltraShareModule, nativeModuleCallbackManager) || this;
|
|
19
19
|
}
|
|
20
|
-
ShareModuleImpl.prototype.share = function (title, text, url) {
|
|
20
|
+
ShareModuleImpl.prototype.share = function (title, text, url, fileContentUri) {
|
|
21
21
|
var _this = this;
|
|
22
22
|
return this.nativeModuleCallbackManager.executeOnBridge(function (requestId) {
|
|
23
23
|
_this.postMessage({
|
|
@@ -26,6 +26,7 @@ var ShareModuleImpl = /** @class */ (function (_super) {
|
|
|
26
26
|
title: title,
|
|
27
27
|
text: text,
|
|
28
28
|
url: url,
|
|
29
|
+
fileContentUri: fileContentUri
|
|
29
30
|
});
|
|
30
31
|
});
|
|
31
32
|
};
|
|
@@ -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 } from "../analytics/interfaces/AnalyticsHelper";
|
|
4
|
+
import { HealthcareAnalyticsHelper, NFTAnalyticsHelper } from "../analytics/interfaces/AnalyticsHelper";
|
|
5
5
|
export declare class SetupHelper {
|
|
6
6
|
static setUpForBrowser(): void;
|
|
7
7
|
static setupBillAnalyticsForBrowser(): void;
|
|
@@ -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,22 @@ 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
|
+
};
|
|
231
247
|
SetupHelper.getHealthcareObject = function () {
|
|
232
248
|
return {
|
|
233
249
|
orderConfirmation: function (fk_accountid, fkh_userid, token_id, pincode, order_amount, offer_amount, payment_method, fkh_order_id, fkh_order_status, page_visit_timestamp) {
|