fk-platform-sdk 1.0.36 → 1.0.37-beta2
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/Bill.js +22 -19
- package/dist/analytics/Cab.js +11 -13
- package/dist/analytics/EventValidator.js +1 -0
- package/dist/analytics/FoodDelivery.js +27 -26
- package/dist/analytics/FoodDish.js +1 -0
- package/dist/analytics/Healthcare.js +31 -40
- package/dist/analytics/Person.js +1 -0
- package/dist/analytics/Recharge.js +16 -18
- package/dist/analytics/ShowTicket.js +18 -21
- package/dist/analytics/Travel.js +23 -27
- package/dist/analytics/index.js +1 -0
- package/dist/analytics/interfaces/AnalyticsEvent.js +1 -0
- package/dist/analytics/validation/ValidationTypes.js +2 -2
- package/dist/analytics/validation/Validator.js +1 -0
- package/dist/analytics/validation/decorators.js +1 -0
- package/dist/constants/Errors.js +2 -2
- package/dist/errors/FKPlatformError.js +9 -3
- package/dist/index.js +3 -2
- package/dist/interfaces/modules/LocationModule.d.ts +2 -1
- package/dist/interfaces/modules/PermissionsModule.js +1 -0
- package/dist/managers/ModuleManager.js +1 -0
- package/dist/managers/NativeModuleCallbackManager.js +2 -2
- package/dist/managers/NativeModuleHelper.js +1 -0
- package/dist/managers/WindowManager.js +1 -0
- package/dist/modules/AnalyticsModuleImpl.js +9 -3
- package/dist/modules/AppVersionModuleImpl.js +9 -3
- package/dist/modules/AuthModuleImpl.js +9 -3
- package/dist/modules/ContactsModuleImpl.js +9 -3
- package/dist/modules/DownloaderModuleImpl.js +9 -3
- package/dist/modules/FontModuleImpl.js +9 -3
- package/dist/modules/LocationModuleImpl.d.ts +2 -1
- package/dist/modules/LocationModuleImpl.js +18 -3
- package/dist/modules/NavigationModuleImpl.js +9 -3
- package/dist/modules/PermissionsModuleImpl.js +9 -3
- package/dist/modules/SMSModuleImpl.js +9 -3
- package/dist/private/tracking-setup-index.js +11 -2
- package/dist/setup/SetupHelper.js +1 -0
- package/dist/types/LocationManagerResponse.d.ts +4 -0
- package/dist/types/NativeModuleResponseType.d.ts +1 -1
- package/dist/web/index.js +3 -2
- package/package.json +1 -1
|
@@ -6,11 +6,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
7
|
};
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.OrderConfirmation = exports.ProceedToPay = exports.AddToCart = exports.Select = void 0;
|
|
9
10
|
var EventValidator_1 = require("./EventValidator");
|
|
10
11
|
var Validator_1 = require("./validation/Validator");
|
|
11
12
|
var decorators_1 = require("./validation/decorators");
|
|
12
13
|
var metadataMap = {};
|
|
13
|
-
var Select = /** @class */ (function () {
|
|
14
|
+
var Select = exports.Select = /** @class */ (function () {
|
|
14
15
|
function Select(name, category, time, eventLocation, noOfPeople) {
|
|
15
16
|
this.type = "ShowTicket.Select";
|
|
16
17
|
this.name = name;
|
|
@@ -20,19 +21,18 @@ var Select = /** @class */ (function () {
|
|
|
20
21
|
this.noOfPeople = noOfPeople;
|
|
21
22
|
}
|
|
22
23
|
Select.prototype.getValidator = function () {
|
|
23
|
-
var invalidValues = Validator_1.validate(metadataMap, this, "Select");
|
|
24
|
+
var invalidValues = (0, Validator_1.validate)(metadataMap, this, "Select");
|
|
24
25
|
return new EventValidator_1.EventValidator(invalidValues);
|
|
25
26
|
};
|
|
26
27
|
__decorate([
|
|
27
|
-
decorators_1.NonEmpty(metadataMap, "Select")
|
|
28
|
+
(0, decorators_1.NonEmpty)(metadataMap, "Select")
|
|
28
29
|
], Select.prototype, "name", void 0);
|
|
29
30
|
__decorate([
|
|
30
|
-
decorators_1.NonEmpty(metadataMap, "Select")
|
|
31
|
+
(0, decorators_1.NonEmpty)(metadataMap, "Select")
|
|
31
32
|
], Select.prototype, "category", void 0);
|
|
32
33
|
return Select;
|
|
33
34
|
}());
|
|
34
|
-
exports.
|
|
35
|
-
var AddToCart = /** @class */ (function () {
|
|
35
|
+
var AddToCart = exports.AddToCart = /** @class */ (function () {
|
|
36
36
|
function AddToCart(ticketClass, price, eventTime) {
|
|
37
37
|
this.type = "ShowTicket.AddToCart";
|
|
38
38
|
this.ticketClass = ticketClass;
|
|
@@ -40,19 +40,18 @@ var AddToCart = /** @class */ (function () {
|
|
|
40
40
|
this.eventTime = eventTime;
|
|
41
41
|
}
|
|
42
42
|
AddToCart.prototype.getValidator = function () {
|
|
43
|
-
var invalidValues = Validator_1.validate(metadataMap, this, "AddToCart");
|
|
43
|
+
var invalidValues = (0, Validator_1.validate)(metadataMap, this, "AddToCart");
|
|
44
44
|
return new EventValidator_1.EventValidator(invalidValues);
|
|
45
45
|
};
|
|
46
46
|
__decorate([
|
|
47
|
-
decorators_1.NonEmpty(metadataMap, "AddToCart")
|
|
47
|
+
(0, decorators_1.NonEmpty)(metadataMap, "AddToCart")
|
|
48
48
|
], AddToCart.prototype, "ticketClass", void 0);
|
|
49
49
|
__decorate([
|
|
50
|
-
decorators_1.Positive(metadataMap, "AddToCart")
|
|
50
|
+
(0, decorators_1.Positive)(metadataMap, "AddToCart")
|
|
51
51
|
], AddToCart.prototype, "price", void 0);
|
|
52
52
|
return AddToCart;
|
|
53
53
|
}());
|
|
54
|
-
exports.
|
|
55
|
-
var ProceedToPay = /** @class */ (function () {
|
|
54
|
+
var ProceedToPay = exports.ProceedToPay = /** @class */ (function () {
|
|
56
55
|
function ProceedToPay(amountToPay, offerAmount, noOfTickets, bookingCharge) {
|
|
57
56
|
this.type = "ShowTicket.ProceedToPay";
|
|
58
57
|
this.amountToPay = amountToPay;
|
|
@@ -61,37 +60,35 @@ var ProceedToPay = /** @class */ (function () {
|
|
|
61
60
|
this.bookingCharge = bookingCharge;
|
|
62
61
|
}
|
|
63
62
|
ProceedToPay.prototype.getValidator = function () {
|
|
64
|
-
var invalidValues = Validator_1.validate(metadataMap, this, "ProceedToPay");
|
|
63
|
+
var invalidValues = (0, Validator_1.validate)(metadataMap, this, "ProceedToPay");
|
|
65
64
|
return new EventValidator_1.EventValidator(invalidValues);
|
|
66
65
|
};
|
|
67
66
|
__decorate([
|
|
68
|
-
decorators_1.Positive(metadataMap, "ProceedToPay")
|
|
67
|
+
(0, decorators_1.Positive)(metadataMap, "ProceedToPay")
|
|
69
68
|
], ProceedToPay.prototype, "amountToPay", void 0);
|
|
70
69
|
__decorate([
|
|
71
|
-
decorators_1.NonNegative(metadataMap, "ProceedToPay")
|
|
70
|
+
(0, decorators_1.NonNegative)(metadataMap, "ProceedToPay")
|
|
72
71
|
], ProceedToPay.prototype, "offerAmount", void 0);
|
|
73
72
|
__decorate([
|
|
74
|
-
decorators_1.NonNegative(metadataMap, "ProceedToPay")
|
|
73
|
+
(0, decorators_1.NonNegative)(metadataMap, "ProceedToPay")
|
|
75
74
|
], ProceedToPay.prototype, "noOfTickets", void 0);
|
|
76
75
|
__decorate([
|
|
77
|
-
decorators_1.NonNegative(metadataMap, "ProceedToPay")
|
|
76
|
+
(0, decorators_1.NonNegative)(metadataMap, "ProceedToPay")
|
|
78
77
|
], ProceedToPay.prototype, "bookingCharge", void 0);
|
|
79
78
|
return ProceedToPay;
|
|
80
79
|
}());
|
|
81
|
-
exports.
|
|
82
|
-
var OrderConfirmation = /** @class */ (function () {
|
|
80
|
+
var OrderConfirmation = exports.OrderConfirmation = /** @class */ (function () {
|
|
83
81
|
function OrderConfirmation(amountToPay, paymentMethod) {
|
|
84
82
|
this.type = "ShowTicket.OrderConfirmation";
|
|
85
83
|
this.amountToPay = amountToPay;
|
|
86
84
|
this.paymentMethod = paymentMethod;
|
|
87
85
|
}
|
|
88
86
|
OrderConfirmation.prototype.getValidator = function () {
|
|
89
|
-
var invalidValues = Validator_1.validate(metadataMap, this, "OrderConfirmation");
|
|
87
|
+
var invalidValues = (0, Validator_1.validate)(metadataMap, this, "OrderConfirmation");
|
|
90
88
|
return new EventValidator_1.EventValidator(invalidValues);
|
|
91
89
|
};
|
|
92
90
|
__decorate([
|
|
93
|
-
decorators_1.Positive(metadataMap, "OrderConfirmation")
|
|
91
|
+
(0, decorators_1.Positive)(metadataMap, "OrderConfirmation")
|
|
94
92
|
], OrderConfirmation.prototype, "amountToPay", void 0);
|
|
95
93
|
return OrderConfirmation;
|
|
96
94
|
}());
|
|
97
|
-
exports.OrderConfirmation = OrderConfirmation;
|
package/dist/analytics/Travel.js
CHANGED
|
@@ -6,11 +6,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
7
|
};
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.OrderConfirmation = exports.CustomerDetails = exports.ProceedToPay = exports.Select = exports.Search = void 0;
|
|
9
10
|
var EventValidator_1 = require("./EventValidator");
|
|
10
11
|
var decorators_1 = require("./validation/decorators");
|
|
11
12
|
var Validator_1 = require("./validation/Validator");
|
|
12
13
|
var metadataMap = {};
|
|
13
|
-
var Search = /** @class */ (function () {
|
|
14
|
+
var Search = exports.Search = /** @class */ (function () {
|
|
14
15
|
function Search(fromLocation, toLocation, date, roundTrip, travellerCount) {
|
|
15
16
|
this.type = "Travel.Search";
|
|
16
17
|
this.fromLocation = fromLocation;
|
|
@@ -20,22 +21,21 @@ var Search = /** @class */ (function () {
|
|
|
20
21
|
this.travellerCount = travellerCount;
|
|
21
22
|
}
|
|
22
23
|
Search.prototype.getValidator = function () {
|
|
23
|
-
var invalidValues = Validator_1.validate(metadataMap, this, "Search");
|
|
24
|
+
var invalidValues = (0, Validator_1.validate)(metadataMap, this, "Search");
|
|
24
25
|
if (!this.date || this.date.length === 0) {
|
|
25
26
|
invalidValues.push("date array should have atleast 1 value");
|
|
26
27
|
}
|
|
27
28
|
return new EventValidator_1.EventValidator(invalidValues);
|
|
28
29
|
};
|
|
29
30
|
__decorate([
|
|
30
|
-
decorators_1.NonEmpty(metadataMap, "Search")
|
|
31
|
+
(0, decorators_1.NonEmpty)(metadataMap, "Search")
|
|
31
32
|
], Search.prototype, "fromLocation", void 0);
|
|
32
33
|
__decorate([
|
|
33
|
-
decorators_1.NonNegative(metadataMap, "Search")
|
|
34
|
+
(0, decorators_1.NonNegative)(metadataMap, "Search")
|
|
34
35
|
], Search.prototype, "travellerCount", void 0);
|
|
35
36
|
return Search;
|
|
36
37
|
}());
|
|
37
|
-
exports.
|
|
38
|
-
var Select = /** @class */ (function () {
|
|
38
|
+
var Select = exports.Select = /** @class */ (function () {
|
|
39
39
|
function Select(name, category, price) {
|
|
40
40
|
this.type = "Travel.Select";
|
|
41
41
|
this.name = name;
|
|
@@ -43,22 +43,21 @@ var Select = /** @class */ (function () {
|
|
|
43
43
|
this.price = price;
|
|
44
44
|
}
|
|
45
45
|
Select.prototype.getValidator = function () {
|
|
46
|
-
var invalidValues = Validator_1.validate(metadataMap, this, "Select");
|
|
46
|
+
var invalidValues = (0, Validator_1.validate)(metadataMap, this, "Select");
|
|
47
47
|
return new EventValidator_1.EventValidator(invalidValues);
|
|
48
48
|
};
|
|
49
49
|
__decorate([
|
|
50
|
-
decorators_1.NonEmpty(metadataMap, "Select")
|
|
50
|
+
(0, decorators_1.NonEmpty)(metadataMap, "Select")
|
|
51
51
|
], Select.prototype, "name", void 0);
|
|
52
52
|
__decorate([
|
|
53
|
-
decorators_1.NonEmpty(metadataMap, "Select")
|
|
53
|
+
(0, decorators_1.NonEmpty)(metadataMap, "Select")
|
|
54
54
|
], Select.prototype, "category", void 0);
|
|
55
55
|
__decorate([
|
|
56
|
-
decorators_1.Positive(metadataMap, "Select")
|
|
56
|
+
(0, decorators_1.Positive)(metadataMap, "Select")
|
|
57
57
|
], Select.prototype, "price", void 0);
|
|
58
58
|
return Select;
|
|
59
59
|
}());
|
|
60
|
-
exports.
|
|
61
|
-
var ProceedToPay = /** @class */ (function () {
|
|
60
|
+
var ProceedToPay = exports.ProceedToPay = /** @class */ (function () {
|
|
62
61
|
function ProceedToPay(amountToPay, offerAmount, bookingCharge, vasCharge) {
|
|
63
62
|
this.type = "Travel.ProceedToPay";
|
|
64
63
|
this.amountToPay = amountToPay;
|
|
@@ -67,25 +66,24 @@ var ProceedToPay = /** @class */ (function () {
|
|
|
67
66
|
this.vasCharge = vasCharge;
|
|
68
67
|
}
|
|
69
68
|
ProceedToPay.prototype.getValidator = function () {
|
|
70
|
-
var invalidValues = Validator_1.validate(metadataMap, this, "ProceedToPay");
|
|
69
|
+
var invalidValues = (0, Validator_1.validate)(metadataMap, this, "ProceedToPay");
|
|
71
70
|
return new EventValidator_1.EventValidator(invalidValues);
|
|
72
71
|
};
|
|
73
72
|
__decorate([
|
|
74
|
-
decorators_1.Positive(metadataMap, "ProceedToPay")
|
|
73
|
+
(0, decorators_1.Positive)(metadataMap, "ProceedToPay")
|
|
75
74
|
], ProceedToPay.prototype, "amountToPay", void 0);
|
|
76
75
|
__decorate([
|
|
77
|
-
decorators_1.NonNegative(metadataMap, "ProceedToPay")
|
|
76
|
+
(0, decorators_1.NonNegative)(metadataMap, "ProceedToPay")
|
|
78
77
|
], ProceedToPay.prototype, "offerAmount", void 0);
|
|
79
78
|
__decorate([
|
|
80
|
-
decorators_1.NonNegative(metadataMap, "ProceedToPay")
|
|
79
|
+
(0, decorators_1.NonNegative)(metadataMap, "ProceedToPay")
|
|
81
80
|
], ProceedToPay.prototype, "bookingCharge", void 0);
|
|
82
81
|
__decorate([
|
|
83
|
-
decorators_1.NonNegative(metadataMap, "ProceedToPay")
|
|
82
|
+
(0, decorators_1.NonNegative)(metadataMap, "ProceedToPay")
|
|
84
83
|
], ProceedToPay.prototype, "vasCharge", void 0);
|
|
85
84
|
return ProceedToPay;
|
|
86
85
|
}());
|
|
87
|
-
exports.
|
|
88
|
-
var CustomerDetails = /** @class */ (function () {
|
|
86
|
+
var CustomerDetails = exports.CustomerDetails = /** @class */ (function () {
|
|
89
87
|
function CustomerDetails(email, phoneNumber, travellers) {
|
|
90
88
|
this.type = "Travel.CustomerDetails";
|
|
91
89
|
this.email = email;
|
|
@@ -93,34 +91,32 @@ var CustomerDetails = /** @class */ (function () {
|
|
|
93
91
|
this.traveller = travellers;
|
|
94
92
|
}
|
|
95
93
|
CustomerDetails.prototype.getValidator = function () {
|
|
96
|
-
var invalidValues = Validator_1.validate(metadataMap, this, "CustomerDetails");
|
|
94
|
+
var invalidValues = (0, Validator_1.validate)(metadataMap, this, "CustomerDetails");
|
|
97
95
|
if (!this.traveller || this.traveller.length === 0) {
|
|
98
96
|
invalidValues.push("traveller list should not be empty");
|
|
99
97
|
}
|
|
100
98
|
return new EventValidator_1.EventValidator(invalidValues);
|
|
101
99
|
};
|
|
102
100
|
__decorate([
|
|
103
|
-
decorators_1.NonEmpty(metadataMap, "CustomerDetails")
|
|
101
|
+
(0, decorators_1.NonEmpty)(metadataMap, "CustomerDetails")
|
|
104
102
|
], CustomerDetails.prototype, "email", void 0);
|
|
105
103
|
__decorate([
|
|
106
|
-
decorators_1.NonEmpty(metadataMap, "CustomerDetails")
|
|
104
|
+
(0, decorators_1.NonEmpty)(metadataMap, "CustomerDetails")
|
|
107
105
|
], CustomerDetails.prototype, "phoneNumber", void 0);
|
|
108
106
|
return CustomerDetails;
|
|
109
107
|
}());
|
|
110
|
-
exports.
|
|
111
|
-
var OrderConfirmation = /** @class */ (function () {
|
|
108
|
+
var OrderConfirmation = exports.OrderConfirmation = /** @class */ (function () {
|
|
112
109
|
function OrderConfirmation(orderAmount, paymentMethod) {
|
|
113
110
|
this.type = "Travel.OrderConfirmation";
|
|
114
111
|
this.orderAmount = orderAmount;
|
|
115
112
|
this.paymentMethod = paymentMethod;
|
|
116
113
|
}
|
|
117
114
|
OrderConfirmation.prototype.getValidator = function () {
|
|
118
|
-
var invalidValues = Validator_1.validate(metadataMap, this, "OrderConfirmation");
|
|
115
|
+
var invalidValues = (0, Validator_1.validate)(metadataMap, this, "OrderConfirmation");
|
|
119
116
|
return new EventValidator_1.EventValidator(invalidValues);
|
|
120
117
|
};
|
|
121
118
|
__decorate([
|
|
122
|
-
decorators_1.Positive(metadataMap, "OrderConfirmation")
|
|
119
|
+
(0, decorators_1.Positive)(metadataMap, "OrderConfirmation")
|
|
123
120
|
], OrderConfirmation.prototype, "orderAmount", void 0);
|
|
124
121
|
return OrderConfirmation;
|
|
125
122
|
}());
|
|
126
|
-
exports.OrderConfirmation = OrderConfirmation;
|
package/dist/analytics/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Healthcare = exports.Travel = exports.Ticket = exports.Recharge = exports.FoodDelivery = exports.Cab = exports.Bill = void 0;
|
|
3
4
|
var Travel = require("./Travel");
|
|
4
5
|
exports.Travel = Travel;
|
|
5
6
|
var Cab = require("./Cab");
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
3
|
+
exports.ValidationTypes = void 0;
|
|
4
|
+
var ValidationTypes = exports.ValidationTypes = /** @class */ (function () {
|
|
4
5
|
function ValidationTypes() {
|
|
5
6
|
}
|
|
6
7
|
ValidationTypes.POSITIVE = "Positive";
|
|
@@ -9,4 +10,3 @@ var ValidationTypes = /** @class */ (function () {
|
|
|
9
10
|
ValidationTypes.NON_NULL = "NonNull";
|
|
10
11
|
return ValidationTypes;
|
|
11
12
|
}());
|
|
12
|
-
exports.ValidationTypes = ValidationTypes;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NonNull = exports.NonNegative = exports.Positive = exports.NonEmpty = void 0;
|
|
3
4
|
var ValidationTypes_1 = require("./ValidationTypes");
|
|
4
5
|
/**
|
|
5
6
|
* Checks that the string should not be empty
|
package/dist/constants/Errors.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
3
|
+
exports.Errors = void 0;
|
|
4
|
+
var Errors = exports.Errors = /** @class */ (function () {
|
|
4
5
|
function Errors() {
|
|
5
6
|
}
|
|
6
7
|
Errors.MESSAGE_AUTH_ERROR = "Method called before authorization, make sure platform is available and" +
|
|
@@ -10,4 +11,3 @@ var Errors = /** @class */ (function () {
|
|
|
10
11
|
Errors.NATIVE_MODULES_MISSING = "Native modules are missing, make sure you are inside Flipkart app and platform is available";
|
|
11
12
|
return Errors;
|
|
12
13
|
}());
|
|
13
|
-
exports.Errors = Errors;
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics =
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
6
9
|
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
7
12
|
extendStatics(d, b);
|
|
8
13
|
function __() { this.constructor = d; }
|
|
9
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
10
15
|
};
|
|
11
16
|
})();
|
|
12
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.FKPlatformError = void 0;
|
|
13
19
|
var FKPlatformError = /** @class */ (function (_super) {
|
|
14
20
|
__extends(FKPlatformError, _super);
|
|
15
21
|
function FKPlatformError(message) {
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FKPlatformError = exports.Scope = void 0;
|
|
3
4
|
var FKPlatformError_1 = require("./errors/FKPlatformError");
|
|
4
|
-
exports
|
|
5
|
+
Object.defineProperty(exports, "FKPlatformError", { enumerable: true, get: function () { return FKPlatformError_1.FKPlatformError; } });
|
|
5
6
|
var FKPlatform_1 = require("./FKPlatform");
|
|
6
7
|
var SetupHelper_1 = require("./setup/SetupHelper");
|
|
7
8
|
var WindowManager_1 = require("./managers/WindowManager");
|
|
8
9
|
var react_native_1 = require("react-native");
|
|
9
10
|
var PermissionsModule_1 = require("./interfaces/modules/PermissionsModule");
|
|
10
|
-
exports
|
|
11
|
+
Object.defineProperty(exports, "Scope", { enumerable: true, get: function () { return PermissionsModule_1.Scope; } });
|
|
11
12
|
if (WindowManager_1.WindowManager.isBrowser()) {
|
|
12
13
|
throw new FKPlatformError_1.FKPlatformError("React Native Environment not detected. Incase of browser, import from fk-platform-sdk/web");
|
|
13
14
|
}
|
|
@@ -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
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ModuleManager = void 0;
|
|
3
4
|
var NavigationModuleImpl_1 = require("../modules/NavigationModuleImpl");
|
|
4
5
|
var PermissionsModuleImpl_1 = require("../modules/PermissionsModuleImpl");
|
|
5
6
|
var ContactsModuleImpl_1 = require("../modules/ContactsModuleImpl");
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NativeModuleCallbackManager = void 0;
|
|
3
4
|
var WindowManager_1 = require("./WindowManager");
|
|
4
5
|
var tcs_instanceqm_1 = require("tcs-instanceqm");
|
|
5
|
-
var NativeModuleCallbackManager = /** @class */ (function () {
|
|
6
|
+
var NativeModuleCallbackManager = exports.NativeModuleCallbackManager = /** @class */ (function () {
|
|
6
7
|
function NativeModuleCallbackManager() {
|
|
7
8
|
var _this = this;
|
|
8
9
|
this.nativeModuleResolve = function (response) {
|
|
@@ -62,4 +63,3 @@ var NativeModuleCallbackManager = /** @class */ (function () {
|
|
|
62
63
|
NativeModuleCallbackManager.callbackId = 1;
|
|
63
64
|
return NativeModuleCallbackManager;
|
|
64
65
|
}());
|
|
65
|
-
exports.NativeModuleCallbackManager = NativeModuleCallbackManager;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NativeModule = exports.NativeModuleHelper = void 0;
|
|
3
4
|
var WindowManager_1 = require("./WindowManager");
|
|
4
5
|
var Errors_1 = require("../constants/Errors");
|
|
5
6
|
var FKPlatformError_1 = require("../errors/FKPlatformError");
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics =
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
6
9
|
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
7
12
|
extendStatics(d, b);
|
|
8
13
|
function __() { this.constructor = d; }
|
|
9
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
10
15
|
};
|
|
11
16
|
})();
|
|
12
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.AnalyticsModuleImpl = void 0;
|
|
13
19
|
var NativeModuleHelper_1 = require("../managers/NativeModuleHelper");
|
|
14
20
|
var AnalyticsModuleImpl = /** @class */ (function (_super) {
|
|
15
21
|
__extends(AnalyticsModuleImpl, _super);
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics =
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
6
9
|
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
7
12
|
extendStatics(d, b);
|
|
8
13
|
function __() { this.constructor = d; }
|
|
9
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
10
15
|
};
|
|
11
16
|
})();
|
|
12
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.AppVersionModuleImpl = void 0;
|
|
13
19
|
var NativeModuleHelper_1 = require("../managers/NativeModuleHelper");
|
|
14
20
|
var AppVersionModuleImpl = /** @class */ (function (_super) {
|
|
15
21
|
__extends(AppVersionModuleImpl, _super);
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics =
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
6
9
|
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
7
12
|
extendStatics(d, b);
|
|
8
13
|
function __() { this.constructor = d; }
|
|
9
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
10
15
|
};
|
|
11
16
|
})();
|
|
12
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.AuthModuleImpl = void 0;
|
|
13
19
|
var NativeModuleHelper_1 = require("../managers/NativeModuleHelper");
|
|
14
20
|
var AuthModuleImpl = /** @class */ (function (_super) {
|
|
15
21
|
__extends(AuthModuleImpl, _super);
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics =
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
6
9
|
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
7
12
|
extendStatics(d, b);
|
|
8
13
|
function __() { this.constructor = d; }
|
|
9
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
10
15
|
};
|
|
11
16
|
})();
|
|
12
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.ContactsModuleImpl = void 0;
|
|
13
19
|
var NativeModuleHelper_1 = require("../managers/NativeModuleHelper");
|
|
14
20
|
var ContactsModuleImpl = /** @class */ (function (_super) {
|
|
15
21
|
__extends(ContactsModuleImpl, _super);
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics =
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
6
9
|
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
7
12
|
extendStatics(d, b);
|
|
8
13
|
function __() { this.constructor = d; }
|
|
9
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
10
15
|
};
|
|
11
16
|
})();
|
|
12
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.DownloaderModuleImpl = void 0;
|
|
13
19
|
var NativeModuleHelper_1 = require("../managers/NativeModuleHelper");
|
|
14
20
|
var DownloaderModuleImpl = /** @class */ (function (_super) {
|
|
15
21
|
__extends(DownloaderModuleImpl, _super);
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics =
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
6
9
|
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
7
12
|
extendStatics(d, b);
|
|
8
13
|
function __() { this.constructor = d; }
|
|
9
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
10
15
|
};
|
|
11
16
|
})();
|
|
12
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.FontModuleImpl = void 0;
|
|
13
19
|
var NativeModuleHelper_1 = require("../managers/NativeModuleHelper");
|
|
14
20
|
var FontModuleImpl = /** @class */ (function (_super) {
|
|
15
21
|
__extends(FontModuleImpl, _super);
|
|
@@ -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
|
}
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics =
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
6
9
|
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
7
12
|
extendStatics(d, b);
|
|
8
13
|
function __() { this.constructor = d; }
|
|
9
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
10
15
|
};
|
|
11
16
|
})();
|
|
12
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.LocationModuleImpl = void 0;
|
|
13
19
|
var NativeModuleHelper_1 = require("../managers/NativeModuleHelper");
|
|
14
20
|
var LocationModuleImpl = /** @class */ (function (_super) {
|
|
15
21
|
__extends(LocationModuleImpl, _super);
|
|
@@ -35,6 +41,15 @@ var LocationModuleImpl = /** @class */ (function (_super) {
|
|
|
35
41
|
});
|
|
36
42
|
});
|
|
37
43
|
};
|
|
44
|
+
LocationModuleImpl.prototype.getUserLocation = function () {
|
|
45
|
+
var _this = this;
|
|
46
|
+
return this.nativeModuleCallbackManager.executeOnBridge(function (requestId) {
|
|
47
|
+
_this.postMessage({
|
|
48
|
+
methodName: "getUserLocation",
|
|
49
|
+
requestId: requestId
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
};
|
|
38
53
|
return LocationModuleImpl;
|
|
39
54
|
}(NativeModuleHelper_1.NativeModule));
|
|
40
55
|
exports.LocationModuleImpl = LocationModuleImpl;
|