fk-platform-sdk 1.0.25-beta → 1.0.28-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/Healthcare.d.ts +5 -6
- package/dist/analytics/Healthcare.js +13 -14
- package/dist/analytics/interfaces/AnalyticsHelper.d.ts +2 -2
- package/dist/interfaces/NativeModuleManagerProvider.d.ts +0 -1
- package/dist/managers/ModuleManager.d.ts +0 -2
- package/dist/managers/ModuleManager.js +0 -6
- package/dist/setup/SetupHelper.js +4 -4
- package/package.json +1 -1
- package/.vscode/launch.json +0 -34
- package/dist/interfaces/modules/PermissionsCheckerModule.d.ts +0 -11
- package/dist/interfaces/modules/PermissionsCheckerModule.js +0 -6
- package/dist/modules/PermissionsCheckerModuleImpl.d.ts +0 -13
- package/dist/modules/PermissionsCheckerModuleImpl.js +0 -40
- package/dist/types/PermissionStatusResponse.d.ts +0 -3
- package/dist/types/PermissionStatusResponse.js +0 -2
|
@@ -9,12 +9,12 @@ export declare class OrderConfirmation implements AnalyticsEvent {
|
|
|
9
9
|
private order_amount;
|
|
10
10
|
private offer_amount;
|
|
11
11
|
private payment_method;
|
|
12
|
-
private
|
|
13
|
-
private
|
|
14
|
-
constructor(fk_accountid: string, fkh_userid: string, token_id: string, pincode: string, order_amount: number, offer_amount: number, payment_method: string,
|
|
12
|
+
private fkh_order_id;
|
|
13
|
+
private fkh_order_status;
|
|
14
|
+
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);
|
|
15
15
|
getValidator(): EventValidator;
|
|
16
16
|
}
|
|
17
|
-
export declare class
|
|
17
|
+
export declare class ProceedToPay implements AnalyticsEvent {
|
|
18
18
|
type: string;
|
|
19
19
|
private fk_accountid;
|
|
20
20
|
private fkh_userid;
|
|
@@ -23,8 +23,7 @@ export declare class ProceedToPayEvent implements AnalyticsEvent {
|
|
|
23
23
|
private order_amount;
|
|
24
24
|
private offer_amount;
|
|
25
25
|
private payment_method;
|
|
26
|
-
|
|
27
|
-
constructor(fk_accountid: string, fkh_userid: string, token_id: string, pincode: string, order_amount: number, offer_amount: number, payment_method: string, order_id: string);
|
|
26
|
+
constructor(fk_accountid: string, fkh_userid: string, token_id: string, pincode: string, order_amount: number, offer_amount: number, payment_method: string);
|
|
28
27
|
getValidator(): EventValidator;
|
|
29
28
|
}
|
|
30
29
|
export declare class UploadPrescription implements AnalyticsEvent {
|
|
@@ -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,
|
|
14
|
+
function OrderConfirmation(fk_accountid, fkh_userid, token_id, pincode, order_amount, offer_amount, payment_method, fkh_order_id, fkh_order_status) {
|
|
15
15
|
this.type = "Healthcare.OrderConfirmation";
|
|
16
16
|
this.fk_accountid = fk_accountid;
|
|
17
17
|
this.fkh_userid = fkh_userid;
|
|
@@ -20,8 +20,8 @@ var OrderConfirmation = /** @class */ (function () {
|
|
|
20
20
|
this.order_amount = order_amount;
|
|
21
21
|
this.offer_amount = offer_amount;
|
|
22
22
|
this.payment_method = payment_method;
|
|
23
|
-
this.
|
|
24
|
-
this.
|
|
23
|
+
this.fkh_order_id = fkh_order_id;
|
|
24
|
+
this.fkh_order_status = fkh_order_status;
|
|
25
25
|
}
|
|
26
26
|
OrderConfirmation.prototype.getValidator = function () {
|
|
27
27
|
var invalidValues = Validator_1.validate(metadataMap, this, "OrderConfirmation");
|
|
@@ -33,9 +33,9 @@ var OrderConfirmation = /** @class */ (function () {
|
|
|
33
33
|
return OrderConfirmation;
|
|
34
34
|
}());
|
|
35
35
|
exports.OrderConfirmation = OrderConfirmation;
|
|
36
|
-
var
|
|
37
|
-
function
|
|
38
|
-
this.type = "Healthcare.
|
|
36
|
+
var ProceedToPay = /** @class */ (function () {
|
|
37
|
+
function ProceedToPay(fk_accountid, fkh_userid, token_id, pincode, order_amount, offer_amount, payment_method) {
|
|
38
|
+
this.type = "Healthcare.ProceedToPay";
|
|
39
39
|
this.fk_accountid = fk_accountid;
|
|
40
40
|
this.fkh_userid = fkh_userid;
|
|
41
41
|
this.token_id = token_id;
|
|
@@ -43,18 +43,17 @@ var ProceedToPayEvent = /** @class */ (function () {
|
|
|
43
43
|
this.order_amount = order_amount;
|
|
44
44
|
this.offer_amount = offer_amount;
|
|
45
45
|
this.payment_method = payment_method;
|
|
46
|
-
this.order_id = order_id;
|
|
47
46
|
}
|
|
48
|
-
|
|
49
|
-
var invalidValues = Validator_1.validate(metadataMap, this, "
|
|
47
|
+
ProceedToPay.prototype.getValidator = function () {
|
|
48
|
+
var invalidValues = Validator_1.validate(metadataMap, this, "ProceedToPay");
|
|
50
49
|
return new EventValidator_1.EventValidator(invalidValues);
|
|
51
50
|
};
|
|
52
51
|
__decorate([
|
|
53
|
-
decorators_1.Positive(metadataMap, "
|
|
54
|
-
],
|
|
55
|
-
return
|
|
52
|
+
decorators_1.Positive(metadataMap, "ProceedToPay")
|
|
53
|
+
], ProceedToPay.prototype, "fk_accountid", void 0);
|
|
54
|
+
return ProceedToPay;
|
|
56
55
|
}());
|
|
57
|
-
exports.
|
|
56
|
+
exports.ProceedToPay = ProceedToPay;
|
|
58
57
|
var UploadPrescription = /** @class */ (function () {
|
|
59
58
|
function UploadPrescription(fk_accountid, fkh_userid, token_id, pincode, page_name) {
|
|
60
59
|
this.type = "Healthcare.UploadPrescription";
|
|
@@ -69,7 +68,7 @@ var UploadPrescription = /** @class */ (function () {
|
|
|
69
68
|
return new EventValidator_1.EventValidator(invalidValues);
|
|
70
69
|
};
|
|
71
70
|
__decorate([
|
|
72
|
-
decorators_1.Positive(metadataMap, "
|
|
71
|
+
decorators_1.Positive(metadataMap, "UploadPrescription")
|
|
73
72
|
], UploadPrescription.prototype, "fk_accountid", void 0);
|
|
74
73
|
return UploadPrescription;
|
|
75
74
|
}());
|
|
@@ -48,8 +48,8 @@ export interface TravelAnalyticsHelper {
|
|
|
48
48
|
orderConfirmation: (amountToPay: number, paymentMethod: string) => Travel.OrderConfirmation;
|
|
49
49
|
}
|
|
50
50
|
export interface HealthcareAnalyticsHelper {
|
|
51
|
-
orderConfirmation: (fk_accountid: string, fkh_userid: string, token_id: string, pincode: string, order_amount: number, offer_amount: number, payment_method: string,
|
|
52
|
-
|
|
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) => Healthcare.OrderConfirmation;
|
|
52
|
+
proceedToPay: (fk_accountid: string, fkh_userid: string, token_id: string, pincode: string, order_amount: number, offer_amount: number, payment_method: string) => Healthcare.ProceedToPay;
|
|
53
53
|
uploadPrescription: (fk_accountid: string, fkh_userid: string, token_id: string, pincode: string, page_name: string) => Healthcare.UploadPrescription;
|
|
54
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) => Healthcare.AddToCart;
|
|
55
55
|
search: (fk_accountid: string, fkh_userid: string, token_id: string, pincode: string, search_query: string) => Healthcare.Search;
|
|
@@ -5,7 +5,6 @@ import { NativeModuleCallbackManager } from "./NativeModuleCallbackManager";
|
|
|
5
5
|
import { AnalyticsModule } from "../analytics/interfaces/AnalyticsModule";
|
|
6
6
|
import { SMSModule } from "../interfaces/modules/SMSModule";
|
|
7
7
|
import { LocationModule } from "../interfaces/modules/LocationModule";
|
|
8
|
-
import { PermissionsCheckerModule } from "../interfaces/modules/PermissionsCheckerModule";
|
|
9
8
|
export declare class ModuleManager {
|
|
10
9
|
private moduleMap;
|
|
11
10
|
constructor(nativeModuleCallbackManager: NativeModuleCallbackManager);
|
|
@@ -15,7 +14,6 @@ export declare class ModuleManager {
|
|
|
15
14
|
getAnalyticsModule(): AnalyticsModule;
|
|
16
15
|
getSMSModule(): SMSModule;
|
|
17
16
|
getLocationModule(): LocationModule;
|
|
18
|
-
getPermissionsCheckerModule(): PermissionsCheckerModule;
|
|
19
17
|
private addModule;
|
|
20
18
|
private getModule;
|
|
21
19
|
}
|
|
@@ -6,7 +6,6 @@ var ContactsModuleImpl_1 = require("../modules/ContactsModuleImpl");
|
|
|
6
6
|
var AnalyticsModuleImpl_1 = require("../modules/AnalyticsModuleImpl");
|
|
7
7
|
var SMSModuleImpl_1 = require("../modules/SMSModuleImpl");
|
|
8
8
|
var LocationModuleImpl_1 = require("../modules/LocationModuleImpl");
|
|
9
|
-
var PermissionsCheckerModuleImpl_1 = require("../modules/PermissionsCheckerModuleImpl");
|
|
10
9
|
var MODULE_NAME;
|
|
11
10
|
(function (MODULE_NAME) {
|
|
12
11
|
MODULE_NAME[MODULE_NAME["PERMISSION_MODULE"] = 0] = "PERMISSION_MODULE";
|
|
@@ -15,7 +14,6 @@ var MODULE_NAME;
|
|
|
15
14
|
MODULE_NAME[MODULE_NAME["ANALYTICS_MODULE"] = 3] = "ANALYTICS_MODULE";
|
|
16
15
|
MODULE_NAME[MODULE_NAME["SMS_MODULE"] = 4] = "SMS_MODULE";
|
|
17
16
|
MODULE_NAME[MODULE_NAME["LOCATION_MODULE"] = 5] = "LOCATION_MODULE";
|
|
18
|
-
MODULE_NAME[MODULE_NAME["PERMISSION_CHECKER_MODULE"] = 6] = "PERMISSION_CHECKER_MODULE";
|
|
19
17
|
})(MODULE_NAME || (MODULE_NAME = {}));
|
|
20
18
|
var ModuleManager = /** @class */ (function () {
|
|
21
19
|
function ModuleManager(nativeModuleCallbackManager) {
|
|
@@ -26,7 +24,6 @@ var ModuleManager = /** @class */ (function () {
|
|
|
26
24
|
this.addModule(MODULE_NAME.ANALYTICS_MODULE, new AnalyticsModuleImpl_1.AnalyticsModuleImpl(nativeModuleCallbackManager));
|
|
27
25
|
this.addModule(MODULE_NAME.SMS_MODULE, new SMSModuleImpl_1.SMSModuleImpl(nativeModuleCallbackManager));
|
|
28
26
|
this.addModule(MODULE_NAME.LOCATION_MODULE, new LocationModuleImpl_1.LocationModuleImpl(nativeModuleCallbackManager));
|
|
29
|
-
this.addModule(MODULE_NAME.PERMISSION_CHECKER_MODULE, new PermissionsCheckerModuleImpl_1.PermissionsCheckerModuleImpl(nativeModuleCallbackManager));
|
|
30
27
|
}
|
|
31
28
|
ModuleManager.prototype.getNavigationModule = function () {
|
|
32
29
|
return this.getModule(MODULE_NAME.NAVIGATION_MODULE);
|
|
@@ -46,9 +43,6 @@ var ModuleManager = /** @class */ (function () {
|
|
|
46
43
|
ModuleManager.prototype.getLocationModule = function () {
|
|
47
44
|
return this.getModule(MODULE_NAME.LOCATION_MODULE);
|
|
48
45
|
};
|
|
49
|
-
ModuleManager.prototype.getPermissionsCheckerModule = function () {
|
|
50
|
-
return this.getModule(MODULE_NAME.PERMISSION_CHECKER_MODULE);
|
|
51
|
-
};
|
|
52
46
|
ModuleManager.prototype.addModule = function (moduleName, nativeModule) {
|
|
53
47
|
this.moduleMap[moduleName] = nativeModule;
|
|
54
48
|
};
|
|
@@ -230,11 +230,11 @@ var SetupHelper = /** @class */ (function () {
|
|
|
230
230
|
};
|
|
231
231
|
SetupHelper.getHealthcareObject = function () {
|
|
232
232
|
return {
|
|
233
|
-
orderConfirmation: function (fk_accountid, fkh_userid, token_id, pincode, order_amount, offer_amount, payment_method,
|
|
234
|
-
return new analytics_1.Healthcare.OrderConfirmation(fk_accountid, fkh_userid, token_id, pincode, order_amount, offer_amount, payment_method,
|
|
233
|
+
orderConfirmation: function (fk_accountid, fkh_userid, token_id, pincode, order_amount, offer_amount, payment_method, fkh_order_id, fkh_order_status) {
|
|
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);
|
|
235
235
|
},
|
|
236
|
-
|
|
237
|
-
return new analytics_1.Healthcare.
|
|
236
|
+
proceedToPay: function (fk_accountid, fkh_userid, token_id, pincode, order_amount, offer_amount, payment_method) {
|
|
237
|
+
return new analytics_1.Healthcare.ProceedToPay(fk_accountid, fkh_userid, token_id, pincode, order_amount, offer_amount, payment_method);
|
|
238
238
|
},
|
|
239
239
|
uploadPrescription: function (fk_accountid, fkh_userid, token_id, pincode, page_name) {
|
|
240
240
|
return new analytics_1.Healthcare.UploadPrescription(fk_accountid, fkh_userid, token_id, pincode, page_name);
|
package/package.json
CHANGED
package/.vscode/launch.json
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
// Use IntelliSense to learn about possible attributes.
|
|
3
|
-
// Hover to view descriptions of existing attributes.
|
|
4
|
-
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
5
|
-
"version": "0.2.0",
|
|
6
|
-
"configurations": [
|
|
7
|
-
|
|
8
|
-
{
|
|
9
|
-
"name": "Attach by Process ID",
|
|
10
|
-
"processId": "${command:PickProcess}",
|
|
11
|
-
"request": "attach",
|
|
12
|
-
"skipFiles": [
|
|
13
|
-
"<node_internals>/**"
|
|
14
|
-
],
|
|
15
|
-
"type": "pwa-node"
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"name": "Attach",
|
|
19
|
-
"port": 9229,
|
|
20
|
-
"request": "attach",
|
|
21
|
-
"skipFiles": [
|
|
22
|
-
"<node_internals>/**"
|
|
23
|
-
],
|
|
24
|
-
"type": "pwa-node"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"type": "pwa-chrome",
|
|
28
|
-
"request": "launch",
|
|
29
|
-
"name": "Launch Chrome against localhost",
|
|
30
|
-
"url": "http://localhost:8080",
|
|
31
|
-
"webRoot": "${workspaceFolder}"
|
|
32
|
-
}
|
|
33
|
-
]
|
|
34
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { NativeModuleResponse } from "../NativeModuleResponse";
|
|
2
|
-
import { PermissionStatusResponse } from "../../types/PermissionStatusResponse";
|
|
3
|
-
export declare enum NativeScope {
|
|
4
|
-
USER_CAMERA = "user.camera"
|
|
5
|
-
}
|
|
6
|
-
export interface PermissionsCheckerModule {
|
|
7
|
-
readNativePermission: (requestedPermission: NativeScope, showSettingsPrompt: boolean) => Promise<NativeModuleResponse<PermissionStatusResponse>>;
|
|
8
|
-
getNativeScopes: () => {
|
|
9
|
-
[key: string]: NativeScope;
|
|
10
|
-
};
|
|
11
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { NativeModule, NativeModuleManager } from "../managers/NativeModuleHelper";
|
|
2
|
-
import { PermissionsCheckerModule, NativeScope } from "../interfaces/modules/PermissionsCheckerModule";
|
|
3
|
-
import { NativeModuleCallbackManager } from "../managers/NativeModuleCallbackManager";
|
|
4
|
-
import { NativeModuleResponse } from "../interfaces/NativeModuleResponse";
|
|
5
|
-
import { PermissionStatusResponse } from "../types/PermissionStatusResponse";
|
|
6
|
-
export declare class PermissionsCheckerModuleImpl extends NativeModule<NativeModuleManager> implements PermissionsCheckerModule {
|
|
7
|
-
private allNativeScopes;
|
|
8
|
-
constructor(nativeModuleCallbackManager: NativeModuleCallbackManager);
|
|
9
|
-
readNativePermission(requestedPermission: string, showSettingsPrompt: boolean): Promise<NativeModuleResponse<PermissionStatusResponse>>;
|
|
10
|
-
getNativeScopes(): {
|
|
11
|
-
[key: string]: NativeScope;
|
|
12
|
-
};
|
|
13
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
6
|
-
return function (d, b) {
|
|
7
|
-
extendStatics(d, b);
|
|
8
|
-
function __() { this.constructor = d; }
|
|
9
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
10
|
-
};
|
|
11
|
-
})();
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
var NativeModuleHelper_1 = require("../managers/NativeModuleHelper");
|
|
14
|
-
var PermissionsCheckerModule_1 = require("../interfaces/modules/PermissionsCheckerModule");
|
|
15
|
-
var PermissionsCheckerModuleImpl = /** @class */ (function (_super) {
|
|
16
|
-
__extends(PermissionsCheckerModuleImpl, _super);
|
|
17
|
-
function PermissionsCheckerModuleImpl(nativeModuleCallbackManager) {
|
|
18
|
-
var _this = _super.call(this, NativeModuleHelper_1.NativeModuleHelper.getCurrentNativeModuleProvider().PermissionsCheckerModule, nativeModuleCallbackManager) || this;
|
|
19
|
-
_this.allNativeScopes = Object.freeze({
|
|
20
|
-
USER_CAMERA: PermissionsCheckerModule_1.NativeScope.USER_CAMERA
|
|
21
|
-
});
|
|
22
|
-
return _this;
|
|
23
|
-
}
|
|
24
|
-
PermissionsCheckerModuleImpl.prototype.readNativePermission = function (requestedPermission, showSettingsPrompt) {
|
|
25
|
-
var _this = this;
|
|
26
|
-
return this.nativeModuleCallbackManager.executeOnBridge(function (requestId) {
|
|
27
|
-
_this.postMessage({
|
|
28
|
-
methodName: "readNativePermission",
|
|
29
|
-
requestId: requestId,
|
|
30
|
-
requestedPermission: requestedPermission,
|
|
31
|
-
showSettingsPrompt: showSettingsPrompt
|
|
32
|
-
});
|
|
33
|
-
});
|
|
34
|
-
};
|
|
35
|
-
PermissionsCheckerModuleImpl.prototype.getNativeScopes = function () {
|
|
36
|
-
return this.allNativeScopes;
|
|
37
|
-
};
|
|
38
|
-
return PermissionsCheckerModuleImpl;
|
|
39
|
-
}(NativeModuleHelper_1.NativeModule));
|
|
40
|
-
exports.PermissionsCheckerModuleImpl = PermissionsCheckerModuleImpl;
|