fk-platform-sdk 1.0.36-beta → 1.0.37-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/Healthcare.d.ts +34 -9
- package/dist/analytics/Healthcare.js +43 -9
- package/dist/analytics/index.d.ts +1 -2
- package/dist/analytics/index.js +0 -2
- package/dist/analytics/interfaces/AnalyticsHelper.d.ts +11 -15
- package/dist/analytics/interfaces/AnalyticsModule.d.ts +1 -0
- package/dist/interfaces/modules/LocationModule.d.ts +2 -1
- package/dist/modules/AnalyticsModuleImpl.d.ts +1 -0
- package/dist/modules/AnalyticsModuleImpl.js +12 -3
- 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 +21 -31
- package/dist/types/LocationManagerResponse.d.ts +4 -0
- package/package.json +1 -1
- package/dist/analytics/Nft.d.ts +0 -21
- package/dist/analytics/Nft.js +0 -58
|
@@ -11,7 +11,8 @@ export declare class OrderConfirmation implements AnalyticsEvent {
|
|
|
11
11
|
private payment_method;
|
|
12
12
|
private fkh_order_id;
|
|
13
13
|
private fkh_order_status;
|
|
14
|
-
|
|
14
|
+
private page_visit_timestamp;
|
|
15
|
+
constructor(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);
|
|
15
16
|
getValidator(): EventValidator;
|
|
16
17
|
}
|
|
17
18
|
export declare class ProceedToPay implements AnalyticsEvent {
|
|
@@ -23,7 +24,9 @@ export declare class ProceedToPay implements AnalyticsEvent {
|
|
|
23
24
|
private order_amount;
|
|
24
25
|
private offer_amount;
|
|
25
26
|
private payment_method;
|
|
26
|
-
|
|
27
|
+
private order_id;
|
|
28
|
+
private page_visit_timestamp;
|
|
29
|
+
constructor(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);
|
|
27
30
|
getValidator(): EventValidator;
|
|
28
31
|
}
|
|
29
32
|
export declare class UploadPrescription implements AnalyticsEvent {
|
|
@@ -33,7 +36,8 @@ export declare class UploadPrescription implements AnalyticsEvent {
|
|
|
33
36
|
private token_id;
|
|
34
37
|
private pincode;
|
|
35
38
|
private page_name;
|
|
36
|
-
|
|
39
|
+
private page_visit_timestamp;
|
|
40
|
+
constructor(fk_accountid: string, fkh_userid: string, token_id: string, pincode: string, page_name: string, page_visit_timestamp: number);
|
|
37
41
|
getValidator(): EventValidator;
|
|
38
42
|
}
|
|
39
43
|
export declare class AddToCart implements AnalyticsEvent {
|
|
@@ -47,7 +51,8 @@ export declare class AddToCart implements AnalyticsEvent {
|
|
|
47
51
|
private price;
|
|
48
52
|
private quantity;
|
|
49
53
|
private source;
|
|
50
|
-
|
|
54
|
+
private page_visit_timestamp;
|
|
55
|
+
constructor(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);
|
|
51
56
|
getValidator(): EventValidator;
|
|
52
57
|
}
|
|
53
58
|
export declare class Search implements AnalyticsEvent {
|
|
@@ -57,7 +62,8 @@ export declare class Search implements AnalyticsEvent {
|
|
|
57
62
|
private token_id;
|
|
58
63
|
private pincode;
|
|
59
64
|
private search_query;
|
|
60
|
-
|
|
65
|
+
private page_visit_timestamp;
|
|
66
|
+
constructor(fk_accountid: string, fkh_userid: string, token_id: string, pincode: string, search_query: string, page_visit_timestamp: number);
|
|
61
67
|
getValidator(): EventValidator;
|
|
62
68
|
}
|
|
63
69
|
export declare class LocationPincodeEnter implements AnalyticsEvent {
|
|
@@ -68,7 +74,8 @@ export declare class LocationPincodeEnter implements AnalyticsEvent {
|
|
|
68
74
|
private pincode;
|
|
69
75
|
private city;
|
|
70
76
|
private state;
|
|
71
|
-
|
|
77
|
+
private page_visit_timestamp;
|
|
78
|
+
constructor(fk_accountid: string, fkh_userid: string, token_id: string, pincode: string, city: string, state: string, page_visit_timestamp: number);
|
|
72
79
|
getValidator(): EventValidator;
|
|
73
80
|
}
|
|
74
81
|
export declare class PageView implements AnalyticsEvent {
|
|
@@ -78,7 +85,8 @@ export declare class PageView implements AnalyticsEvent {
|
|
|
78
85
|
private token_id;
|
|
79
86
|
private pincode;
|
|
80
87
|
private page_name;
|
|
81
|
-
|
|
88
|
+
private page_visit_timestamp;
|
|
89
|
+
constructor(fk_accountid: string, fkh_userid: string, token_id: string, pincode: string, page_name: string, page_visit_timestamp: number);
|
|
82
90
|
getValidator(): EventValidator;
|
|
83
91
|
}
|
|
84
92
|
export declare class AddAddress implements AnalyticsEvent {
|
|
@@ -89,7 +97,8 @@ export declare class AddAddress implements AnalyticsEvent {
|
|
|
89
97
|
private pincode;
|
|
90
98
|
private address_tag;
|
|
91
99
|
private subarea;
|
|
92
|
-
|
|
100
|
+
private page_visit_timestamp;
|
|
101
|
+
constructor(fk_accountid: string, fkh_userid: string, token_id: string, pincode: string, address_tag: string, subarea: string, page_visit_timestamp: number);
|
|
93
102
|
getValidator(): EventValidator;
|
|
94
103
|
}
|
|
95
104
|
export declare class ObpUploadPrescription implements AnalyticsEvent {
|
|
@@ -101,6 +110,22 @@ export declare class ObpUploadPrescription implements AnalyticsEvent {
|
|
|
101
110
|
private rx_file_size;
|
|
102
111
|
private no_of_rx_uploaded;
|
|
103
112
|
private rx_source;
|
|
104
|
-
|
|
113
|
+
private page_visit_timestamp;
|
|
114
|
+
constructor(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);
|
|
115
|
+
getValidator(): EventValidator;
|
|
116
|
+
}
|
|
117
|
+
export declare class CartContinueButton implements AnalyticsEvent {
|
|
118
|
+
type: string;
|
|
119
|
+
private fk_accountid;
|
|
120
|
+
private fkh_userid;
|
|
121
|
+
private token_id;
|
|
122
|
+
private pincode;
|
|
123
|
+
private coupon_code;
|
|
124
|
+
private cart_value;
|
|
125
|
+
private cart_unit_count;
|
|
126
|
+
private cart_savings_value;
|
|
127
|
+
private cart_item_count;
|
|
128
|
+
private page_visit_timestamp;
|
|
129
|
+
constructor(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);
|
|
105
130
|
getValidator(): EventValidator;
|
|
106
131
|
}
|
|
@@ -11,7 +11,7 @@ var decorators_1 = require("./validation/decorators");
|
|
|
11
11
|
var Validator_1 = require("./validation/Validator");
|
|
12
12
|
var metadataMap = {};
|
|
13
13
|
var OrderConfirmation = /** @class */ (function () {
|
|
14
|
-
function OrderConfirmation(fk_accountid, fkh_userid, token_id, pincode, order_amount, offer_amount, payment_method, fkh_order_id, fkh_order_status) {
|
|
14
|
+
function OrderConfirmation(fk_accountid, fkh_userid, token_id, pincode, order_amount, offer_amount, payment_method, fkh_order_id, fkh_order_status, page_visit_timestamp) {
|
|
15
15
|
this.type = "Healthcare.OrderConfirmation";
|
|
16
16
|
this.fk_accountid = fk_accountid;
|
|
17
17
|
this.fkh_userid = fkh_userid;
|
|
@@ -22,6 +22,7 @@ var OrderConfirmation = /** @class */ (function () {
|
|
|
22
22
|
this.payment_method = payment_method;
|
|
23
23
|
this.fkh_order_id = fkh_order_id;
|
|
24
24
|
this.fkh_order_status = fkh_order_status;
|
|
25
|
+
this.page_visit_timestamp = page_visit_timestamp;
|
|
25
26
|
}
|
|
26
27
|
OrderConfirmation.prototype.getValidator = function () {
|
|
27
28
|
var invalidValues = Validator_1.validate(metadataMap, this, "OrderConfirmation");
|
|
@@ -34,7 +35,7 @@ var OrderConfirmation = /** @class */ (function () {
|
|
|
34
35
|
}());
|
|
35
36
|
exports.OrderConfirmation = OrderConfirmation;
|
|
36
37
|
var ProceedToPay = /** @class */ (function () {
|
|
37
|
-
function ProceedToPay(fk_accountid, fkh_userid, token_id, pincode, order_amount, offer_amount, payment_method) {
|
|
38
|
+
function ProceedToPay(fk_accountid, fkh_userid, token_id, pincode, order_amount, offer_amount, payment_method, order_id, page_visit_timestamp) {
|
|
38
39
|
this.type = "Healthcare.ProceedToPay";
|
|
39
40
|
this.fk_accountid = fk_accountid;
|
|
40
41
|
this.fkh_userid = fkh_userid;
|
|
@@ -43,6 +44,8 @@ var ProceedToPay = /** @class */ (function () {
|
|
|
43
44
|
this.order_amount = order_amount;
|
|
44
45
|
this.offer_amount = offer_amount;
|
|
45
46
|
this.payment_method = payment_method;
|
|
47
|
+
this.order_id = order_id;
|
|
48
|
+
this.page_visit_timestamp = page_visit_timestamp;
|
|
46
49
|
}
|
|
47
50
|
ProceedToPay.prototype.getValidator = function () {
|
|
48
51
|
var invalidValues = Validator_1.validate(metadataMap, this, "ProceedToPay");
|
|
@@ -55,13 +58,14 @@ var ProceedToPay = /** @class */ (function () {
|
|
|
55
58
|
}());
|
|
56
59
|
exports.ProceedToPay = ProceedToPay;
|
|
57
60
|
var UploadPrescription = /** @class */ (function () {
|
|
58
|
-
function UploadPrescription(fk_accountid, fkh_userid, token_id, pincode, page_name) {
|
|
61
|
+
function UploadPrescription(fk_accountid, fkh_userid, token_id, pincode, page_name, page_visit_timestamp) {
|
|
59
62
|
this.type = "Healthcare.UploadPrescription";
|
|
60
63
|
this.fk_accountid = fk_accountid;
|
|
61
64
|
this.fkh_userid = fkh_userid;
|
|
62
65
|
this.token_id = token_id;
|
|
63
66
|
this.pincode = pincode;
|
|
64
67
|
this.page_name = page_name;
|
|
68
|
+
this.page_visit_timestamp = page_visit_timestamp;
|
|
65
69
|
}
|
|
66
70
|
UploadPrescription.prototype.getValidator = function () {
|
|
67
71
|
var invalidValues = Validator_1.validate(metadataMap, this, "UploadPrescription");
|
|
@@ -74,7 +78,7 @@ var UploadPrescription = /** @class */ (function () {
|
|
|
74
78
|
}());
|
|
75
79
|
exports.UploadPrescription = UploadPrescription;
|
|
76
80
|
var AddToCart = /** @class */ (function () {
|
|
77
|
-
function AddToCart(fk_accountid, fkh_userid, token_id, pincode, product_name, product_id, price, quantity, source) {
|
|
81
|
+
function AddToCart(fk_accountid, fkh_userid, token_id, pincode, product_name, product_id, price, quantity, source, page_visit_timestamp) {
|
|
78
82
|
this.type = "Healthcare.AddToCart";
|
|
79
83
|
this.fk_accountid = fk_accountid;
|
|
80
84
|
this.fkh_userid = fkh_userid;
|
|
@@ -85,6 +89,7 @@ var AddToCart = /** @class */ (function () {
|
|
|
85
89
|
this.price = price;
|
|
86
90
|
this.quantity = quantity;
|
|
87
91
|
this.source = source;
|
|
92
|
+
this.page_visit_timestamp = page_visit_timestamp;
|
|
88
93
|
}
|
|
89
94
|
AddToCart.prototype.getValidator = function () {
|
|
90
95
|
var invalidValues = Validator_1.validate(metadataMap, this, "AddToCart");
|
|
@@ -97,13 +102,14 @@ var AddToCart = /** @class */ (function () {
|
|
|
97
102
|
}());
|
|
98
103
|
exports.AddToCart = AddToCart;
|
|
99
104
|
var Search = /** @class */ (function () {
|
|
100
|
-
function Search(fk_accountid, fkh_userid, token_id, pincode, search_query) {
|
|
105
|
+
function Search(fk_accountid, fkh_userid, token_id, pincode, search_query, page_visit_timestamp) {
|
|
101
106
|
this.type = "Healthcare.Search";
|
|
102
107
|
this.fk_accountid = fk_accountid;
|
|
103
108
|
this.fkh_userid = fkh_userid;
|
|
104
109
|
this.token_id = token_id;
|
|
105
110
|
this.pincode = pincode;
|
|
106
111
|
this.search_query = search_query;
|
|
112
|
+
this.page_visit_timestamp = page_visit_timestamp;
|
|
107
113
|
}
|
|
108
114
|
Search.prototype.getValidator = function () {
|
|
109
115
|
var invalidValues = Validator_1.validate(metadataMap, this, "Search");
|
|
@@ -116,7 +122,7 @@ var Search = /** @class */ (function () {
|
|
|
116
122
|
}());
|
|
117
123
|
exports.Search = Search;
|
|
118
124
|
var LocationPincodeEnter = /** @class */ (function () {
|
|
119
|
-
function LocationPincodeEnter(fk_accountid, fkh_userid, token_id, pincode, city, state) {
|
|
125
|
+
function LocationPincodeEnter(fk_accountid, fkh_userid, token_id, pincode, city, state, page_visit_timestamp) {
|
|
120
126
|
this.type = "Healthcare.LocationPincodeEnter";
|
|
121
127
|
this.fk_accountid = fk_accountid;
|
|
122
128
|
this.fkh_userid = fkh_userid;
|
|
@@ -124,6 +130,7 @@ var LocationPincodeEnter = /** @class */ (function () {
|
|
|
124
130
|
this.pincode = pincode;
|
|
125
131
|
this.city = city;
|
|
126
132
|
this.state = state;
|
|
133
|
+
this.page_visit_timestamp = page_visit_timestamp;
|
|
127
134
|
}
|
|
128
135
|
LocationPincodeEnter.prototype.getValidator = function () {
|
|
129
136
|
var invalidValues = Validator_1.validate(metadataMap, this, "LocationPincodeEnter");
|
|
@@ -136,13 +143,14 @@ var LocationPincodeEnter = /** @class */ (function () {
|
|
|
136
143
|
}());
|
|
137
144
|
exports.LocationPincodeEnter = LocationPincodeEnter;
|
|
138
145
|
var PageView = /** @class */ (function () {
|
|
139
|
-
function PageView(fk_accountid, fkh_userid, token_id, pincode, page_name) {
|
|
146
|
+
function PageView(fk_accountid, fkh_userid, token_id, pincode, page_name, page_visit_timestamp) {
|
|
140
147
|
this.type = "Healthcare.PageView";
|
|
141
148
|
this.fk_accountid = fk_accountid;
|
|
142
149
|
this.fkh_userid = fkh_userid;
|
|
143
150
|
this.token_id = token_id;
|
|
144
151
|
this.pincode = pincode;
|
|
145
152
|
this.page_name = page_name;
|
|
153
|
+
this.page_visit_timestamp = page_visit_timestamp;
|
|
146
154
|
}
|
|
147
155
|
PageView.prototype.getValidator = function () {
|
|
148
156
|
var invalidValues = Validator_1.validate(metadataMap, this, "PageView");
|
|
@@ -155,7 +163,7 @@ var PageView = /** @class */ (function () {
|
|
|
155
163
|
}());
|
|
156
164
|
exports.PageView = PageView;
|
|
157
165
|
var AddAddress = /** @class */ (function () {
|
|
158
|
-
function AddAddress(fk_accountid, fkh_userid, token_id, pincode, address_tag, subarea) {
|
|
166
|
+
function AddAddress(fk_accountid, fkh_userid, token_id, pincode, address_tag, subarea, page_visit_timestamp) {
|
|
159
167
|
this.type = "Healthcare.AddAddress";
|
|
160
168
|
this.fk_accountid = fk_accountid;
|
|
161
169
|
this.fkh_userid = fkh_userid;
|
|
@@ -163,6 +171,7 @@ var AddAddress = /** @class */ (function () {
|
|
|
163
171
|
this.pincode = pincode;
|
|
164
172
|
this.address_tag = address_tag;
|
|
165
173
|
this.subarea = subarea;
|
|
174
|
+
this.page_visit_timestamp = page_visit_timestamp;
|
|
166
175
|
}
|
|
167
176
|
AddAddress.prototype.getValidator = function () {
|
|
168
177
|
var invalidValues = Validator_1.validate(metadataMap, this, "AddAddress");
|
|
@@ -175,7 +184,7 @@ var AddAddress = /** @class */ (function () {
|
|
|
175
184
|
}());
|
|
176
185
|
exports.AddAddress = AddAddress;
|
|
177
186
|
var ObpUploadPrescription = /** @class */ (function () {
|
|
178
|
-
function ObpUploadPrescription(fk_accountid, fkh_userid, token_id, pincode, rx_file_size, no_of_rx_uploaded, rx_source) {
|
|
187
|
+
function ObpUploadPrescription(fk_accountid, fkh_userid, token_id, pincode, rx_file_size, no_of_rx_uploaded, rx_source, page_visit_timestamp) {
|
|
179
188
|
this.type = "Healthcare.ObpUploadPrescription";
|
|
180
189
|
this.fk_accountid = fk_accountid;
|
|
181
190
|
this.fkh_userid = fkh_userid;
|
|
@@ -184,6 +193,7 @@ var ObpUploadPrescription = /** @class */ (function () {
|
|
|
184
193
|
this.rx_file_size = rx_file_size;
|
|
185
194
|
this.no_of_rx_uploaded = no_of_rx_uploaded;
|
|
186
195
|
this.rx_source = rx_source;
|
|
196
|
+
this.page_visit_timestamp = page_visit_timestamp;
|
|
187
197
|
}
|
|
188
198
|
ObpUploadPrescription.prototype.getValidator = function () {
|
|
189
199
|
var invalidValues = Validator_1.validate(metadataMap, this, "ObpUploadPrescription");
|
|
@@ -195,3 +205,27 @@ var ObpUploadPrescription = /** @class */ (function () {
|
|
|
195
205
|
return ObpUploadPrescription;
|
|
196
206
|
}());
|
|
197
207
|
exports.ObpUploadPrescription = ObpUploadPrescription;
|
|
208
|
+
var CartContinueButton = /** @class */ (function () {
|
|
209
|
+
function CartContinueButton(fk_accountid, fkh_userid, token_id, pincode, coupon_code, cart_value, cart_unit_count, cart_savings_value, cart_item_count, page_visit_timestamp) {
|
|
210
|
+
this.type = "Healthcare.CartContinueButton";
|
|
211
|
+
this.fk_accountid = fk_accountid;
|
|
212
|
+
this.fkh_userid = fkh_userid;
|
|
213
|
+
this.token_id = token_id;
|
|
214
|
+
this.pincode = pincode;
|
|
215
|
+
this.coupon_code = coupon_code;
|
|
216
|
+
this.cart_value = cart_value;
|
|
217
|
+
this.cart_unit_count = cart_unit_count;
|
|
218
|
+
this.cart_savings_value = cart_savings_value;
|
|
219
|
+
this.cart_item_count = cart_item_count;
|
|
220
|
+
this.page_visit_timestamp = page_visit_timestamp;
|
|
221
|
+
}
|
|
222
|
+
CartContinueButton.prototype.getValidator = function () {
|
|
223
|
+
var invalidValues = Validator_1.validate(metadataMap, this, "CartContinueButton");
|
|
224
|
+
return new EventValidator_1.EventValidator(invalidValues);
|
|
225
|
+
};
|
|
226
|
+
__decorate([
|
|
227
|
+
decorators_1.Positive(metadataMap, "CartContinueButton")
|
|
228
|
+
], CartContinueButton.prototype, "fk_accountid", void 0);
|
|
229
|
+
return CartContinueButton;
|
|
230
|
+
}());
|
|
231
|
+
exports.CartContinueButton = CartContinueButton;
|
|
@@ -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,19 +47,15 @@ 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
|
-
}
|
|
55
50
|
export interface HealthcareAnalyticsHelper {
|
|
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;
|
|
57
|
-
proceedToPay: (fk_accountid: string, fkh_userid: string, token_id: string, pincode: string, order_amount: number, offer_amount: number, payment_method: string) => Healthcare.ProceedToPay;
|
|
58
|
-
uploadPrescription: (fk_accountid: string, fkh_userid: string, token_id: string, pincode: string, page_name: string) => Healthcare.UploadPrescription;
|
|
59
|
-
addToCart: (fk_accountid: string, fkh_userid: string, token_id: string, pincode: string, product_name: string, product_id: string, price: number, quantity: number, source: string) => Healthcare.AddToCart;
|
|
60
|
-
search: (fk_accountid: string, fkh_userid: string, token_id: string, pincode: string, search_query: string) => Healthcare.Search;
|
|
61
|
-
locationPincodeEnter: (fk_accountid: string, fkh_userid: string, token_id: string, pincode: string, city: string, state: string) => Healthcare.LocationPincodeEnter;
|
|
62
|
-
pageView: (fk_accountid: string, fkh_userid: string, token_id: string, pincode: string, page_name: string) => Healthcare.PageView;
|
|
63
|
-
addAddress: (fk_accountid: string, fkh_userid: string, token_id: string, pincode: string, address_tag: string, subarea: string) => Healthcare.AddAddress;
|
|
64
|
-
obpUploadPrescription: (fk_accountid: string, fkh_userid: string, token_id: string, pincode: string, rx_file_size: number, no_of_rx_uploaded: number, rx_source: string) => Healthcare.ObpUploadPrescription;
|
|
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;
|
|
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;
|
|
53
|
+
uploadPrescription: (fk_accountid: string, fkh_userid: string, token_id: string, pincode: string, page_name: string, page_visit_timestamp: number) => Healthcare.UploadPrescription;
|
|
54
|
+
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;
|
|
55
|
+
search: (fk_accountid: string, fkh_userid: string, token_id: string, pincode: string, search_query: string, page_visit_timestamp: number) => Healthcare.Search;
|
|
56
|
+
locationPincodeEnter: (fk_accountid: string, fkh_userid: string, token_id: string, pincode: string, city: string, state: string, page_visit_timestamp: number) => Healthcare.LocationPincodeEnter;
|
|
57
|
+
pageView: (fk_accountid: string, fkh_userid: string, token_id: string, pincode: string, page_name: string, page_visit_timestamp: number) => Healthcare.PageView;
|
|
58
|
+
addAddress: (fk_accountid: string, fkh_userid: string, token_id: string, pincode: string, address_tag: string, subarea: string, page_visit_timestamp: number) => Healthcare.AddAddress;
|
|
59
|
+
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;
|
|
60
|
+
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;
|
|
65
61
|
}
|
|
@@ -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
|
}
|
|
@@ -5,4 +5,5 @@ import { AnalyticsModule } from "../analytics/interfaces/AnalyticsModule";
|
|
|
5
5
|
export declare class AnalyticsModuleImpl extends NativeModule<NativeModuleManager> implements AnalyticsModule {
|
|
6
6
|
constructor(nativeModuleCallbackManager: NativeModuleCallbackManager);
|
|
7
7
|
pushEvent(event: AnalyticsEvent): void;
|
|
8
|
+
forceFlushEvents(): void;
|
|
8
9
|
}
|
|
@@ -21,8 +21,8 @@ var AnalyticsModuleImpl = /** @class */ (function (_super) {
|
|
|
21
21
|
this.nativeModuleCallbackManager.executeOnBridge(function (requestId) {
|
|
22
22
|
var type = event.type;
|
|
23
23
|
delete event.type;
|
|
24
|
-
var
|
|
25
|
-
if (
|
|
24
|
+
var eventValidator = event.getValidator();
|
|
25
|
+
if (eventValidator.isValid()) {
|
|
26
26
|
_this.postMessage({
|
|
27
27
|
methodName: "pushEvent",
|
|
28
28
|
requestId: requestId,
|
|
@@ -35,11 +35,20 @@ var AnalyticsModuleImpl = /** @class */ (function (_super) {
|
|
|
35
35
|
methodName: "onEventValidationError",
|
|
36
36
|
requestId: requestId,
|
|
37
37
|
type: type,
|
|
38
|
-
error:
|
|
38
|
+
error: eventValidator.getErrorMessage(),
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
42
|
};
|
|
43
|
+
AnalyticsModuleImpl.prototype.forceFlushEvents = function () {
|
|
44
|
+
var _this = this;
|
|
45
|
+
this.nativeModuleCallbackManager.executeOnBridge(function (requestId) {
|
|
46
|
+
_this.postMessage({
|
|
47
|
+
methodName: "forceFlushEvents",
|
|
48
|
+
requestId: requestId
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
};
|
|
43
52
|
return AnalyticsModuleImpl;
|
|
44
53
|
}(NativeModuleHelper_1.NativeModule));
|
|
45
54
|
exports.AnalyticsModuleImpl = AnalyticsModuleImpl;
|
|
@@ -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,5 +1,5 @@
|
|
|
1
1
|
import EventManager from "../interfaces/EventManager";
|
|
2
|
-
import { BillAnalyticsHelper, CabAnalyticsHelper, FoodDeliveryAnalyticsHelper
|
|
2
|
+
import { BillAnalyticsHelper, CabAnalyticsHelper, FoodDeliveryAnalyticsHelper } 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,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,47 +228,37 @@ 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
|
-
};
|
|
244
231
|
SetupHelper.getHealthcareObject = function () {
|
|
245
232
|
return {
|
|
246
|
-
orderConfirmation: function (fk_accountid, fkh_userid, token_id, pincode, order_amount, offer_amount, payment_method, fkh_order_id, fkh_order_status) {
|
|
247
|
-
return new analytics_1.Healthcare.OrderConfirmation(fk_accountid, fkh_userid, token_id, pincode, order_amount, offer_amount, payment_method, fkh_order_id, fkh_order_status);
|
|
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) {
|
|
234
|
+
return new analytics_1.Healthcare.OrderConfirmation(fk_accountid, fkh_userid, token_id, pincode, order_amount, offer_amount, payment_method, fkh_order_id, fkh_order_status, page_visit_timestamp);
|
|
235
|
+
},
|
|
236
|
+
proceedToPay: function (fk_accountid, fkh_userid, token_id, pincode, order_amount, offer_amount, payment_method, order_id, page_visit_timestamp) {
|
|
237
|
+
return new analytics_1.Healthcare.ProceedToPay(fk_accountid, fkh_userid, token_id, pincode, order_amount, offer_amount, payment_method, order_id, page_visit_timestamp);
|
|
248
238
|
},
|
|
249
|
-
|
|
250
|
-
return new analytics_1.Healthcare.
|
|
239
|
+
uploadPrescription: function (fk_accountid, fkh_userid, token_id, pincode, page_name, page_visit_timestamp) {
|
|
240
|
+
return new analytics_1.Healthcare.UploadPrescription(fk_accountid, fkh_userid, token_id, pincode, page_name, page_visit_timestamp);
|
|
251
241
|
},
|
|
252
|
-
|
|
253
|
-
return new analytics_1.Healthcare.
|
|
242
|
+
addToCart: function (fk_accountid, fkh_userid, token_id, pincode, product_name, product_id, price, quantity, source, page_visit_timestamp) {
|
|
243
|
+
return new analytics_1.Healthcare.AddToCart(fk_accountid, fkh_userid, token_id, pincode, product_name, product_id, price, quantity, source, page_visit_timestamp);
|
|
254
244
|
},
|
|
255
|
-
|
|
256
|
-
return new analytics_1.Healthcare.
|
|
245
|
+
search: function (fk_accountid, fkh_userid, token_id, pincode, search_query, page_visit_timestamp) {
|
|
246
|
+
return new analytics_1.Healthcare.Search(fk_accountid, fkh_userid, token_id, pincode, search_query, page_visit_timestamp);
|
|
257
247
|
},
|
|
258
|
-
|
|
259
|
-
return new analytics_1.Healthcare.
|
|
248
|
+
locationPincodeEnter: function (fk_accountid, fkh_userid, token_id, pincode, city, state, page_visit_timestamp) {
|
|
249
|
+
return new analytics_1.Healthcare.LocationPincodeEnter(fk_accountid, fkh_userid, token_id, pincode, city, state, page_visit_timestamp);
|
|
260
250
|
},
|
|
261
|
-
|
|
262
|
-
return new analytics_1.Healthcare.
|
|
251
|
+
pageView: function (fk_accountid, fkh_userid, token_id, pincode, page_name, page_visit_timestamp) {
|
|
252
|
+
return new analytics_1.Healthcare.PageView(fk_accountid, fkh_userid, token_id, pincode, page_name, page_visit_timestamp);
|
|
263
253
|
},
|
|
264
|
-
|
|
265
|
-
return new analytics_1.Healthcare.
|
|
254
|
+
addAddress: function (fk_accountid, fkh_userid, token_id, pincode, address_tag, subarea, page_visit_timestamp) {
|
|
255
|
+
return new analytics_1.Healthcare.AddAddress(fk_accountid, fkh_userid, token_id, pincode, address_tag, subarea, page_visit_timestamp);
|
|
266
256
|
},
|
|
267
|
-
|
|
268
|
-
return new analytics_1.Healthcare.
|
|
257
|
+
obpUploadPrescription: function (fk_accountid, fkh_userid, token_id, pincode, rx_file_size, no_of_rx_uploaded, rx_source, page_visit_timestamp) {
|
|
258
|
+
return new analytics_1.Healthcare.ObpUploadPrescription(fk_accountid, fkh_userid, token_id, pincode, rx_file_size, no_of_rx_uploaded, rx_source, page_visit_timestamp);
|
|
269
259
|
},
|
|
270
|
-
|
|
271
|
-
return new analytics_1.Healthcare.
|
|
260
|
+
cartContinueButton: function (fk_accountid, fkh_userid, token_id, pincode, coupon_code, cart_value, cart_unit_count, cart_savings_value, cart_item_count, page_visit_timestamp) {
|
|
261
|
+
return new analytics_1.Healthcare.CartContinueButton(fk_accountid, fkh_userid, token_id, pincode, coupon_code, cart_value, cart_unit_count, cart_savings_value, cart_item_count, page_visit_timestamp);
|
|
272
262
|
}
|
|
273
263
|
};
|
|
274
264
|
};
|
package/package.json
CHANGED
package/dist/analytics/Nft.d.ts
DELETED
|
@@ -1,21 +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 stage;
|
|
19
|
-
constructor(stage: string);
|
|
20
|
-
getValidator(): EventValidator;
|
|
21
|
-
}
|
package/dist/analytics/Nft.js
DELETED
|
@@ -1,58 +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(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;
|