fk-platform-sdk 1.0.46-beta → 1.0.46-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/interfaces/NativeModuleManagerProvider.d.ts +1 -0
- package/dist/interfaces/modules/ErrorHandlerModule.d.ts +10 -0
- package/dist/interfaces/modules/ErrorHandlerModule.js +2 -0
- package/dist/interfaces/modules/PermissionsModule.d.ts +1 -0
- package/dist/managers/ModuleManager.d.ts +2 -0
- package/dist/managers/ModuleManager.js +6 -0
- package/dist/modules/ErrorHandlerModuleImpl.d.ts +8 -0
- package/dist/modules/ErrorHandlerModuleImpl.js +31 -0
- package/dist/modules/PermissionsModuleImpl.d.ts +1 -0
- package/dist/modules/PermissionsModuleImpl.js +10 -0
- package/package.json +1 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface ErrorInfoRequest {
|
|
2
|
+
errorTitle: string;
|
|
3
|
+
errorDescription: string;
|
|
4
|
+
errorMessage: string;
|
|
5
|
+
callbackMethod?: string;
|
|
6
|
+
ctaText?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ErrorHandlerModule {
|
|
9
|
+
openErrorHandlingFlow: (errorInfo: ErrorInfoRequest) => void;
|
|
10
|
+
}
|
|
@@ -9,6 +9,7 @@ import { AppVersionModule } from "../interfaces/modules/AppVersionModule";
|
|
|
9
9
|
import { DownloaderModule } from "../interfaces/modules/DownloaderModule";
|
|
10
10
|
import { FontModule } from "../interfaces/modules/FontModule";
|
|
11
11
|
import { GenericUltraShareModule } from "../interfaces/modules/GenericUltraShareModule";
|
|
12
|
+
import { ErrorHandlerModule } from "../interfaces/modules/ErrorHandlerModule";
|
|
12
13
|
export declare class ModuleManager {
|
|
13
14
|
private moduleMap;
|
|
14
15
|
constructor(nativeModuleCallbackManager: NativeModuleCallbackManager);
|
|
@@ -22,6 +23,7 @@ export declare class ModuleManager {
|
|
|
22
23
|
getDownloaderModule(): DownloaderModule;
|
|
23
24
|
getFontModule(): FontModule;
|
|
24
25
|
getShareModule(): GenericUltraShareModule;
|
|
26
|
+
getErrorHandlerModule(): ErrorHandlerModule;
|
|
25
27
|
private addModule;
|
|
26
28
|
private getModule;
|
|
27
29
|
}
|
|
@@ -10,6 +10,7 @@ var AppVersionModuleImpl_1 = require("../modules/AppVersionModuleImpl");
|
|
|
10
10
|
var DownloaderModuleImpl_1 = require("../modules/DownloaderModuleImpl");
|
|
11
11
|
var FontModuleImpl_1 = require("../modules/FontModuleImpl");
|
|
12
12
|
var ShareModuleImpl_1 = require("../modules/ShareModuleImpl");
|
|
13
|
+
var ErrorHandlerModuleImpl_1 = require("../modules/ErrorHandlerModuleImpl");
|
|
13
14
|
var MODULE_NAME;
|
|
14
15
|
(function (MODULE_NAME) {
|
|
15
16
|
MODULE_NAME[MODULE_NAME["PERMISSION_MODULE"] = 0] = "PERMISSION_MODULE";
|
|
@@ -22,6 +23,7 @@ var MODULE_NAME;
|
|
|
22
23
|
MODULE_NAME[MODULE_NAME["DOWNLOADER_MODULE"] = 7] = "DOWNLOADER_MODULE";
|
|
23
24
|
MODULE_NAME[MODULE_NAME["FONT_MODULE"] = 8] = "FONT_MODULE";
|
|
24
25
|
MODULE_NAME[MODULE_NAME["SHARE_MODULE"] = 9] = "SHARE_MODULE";
|
|
26
|
+
MODULE_NAME[MODULE_NAME["ERROR_HANDLER_MODULE"] = 10] = "ERROR_HANDLER_MODULE";
|
|
25
27
|
})(MODULE_NAME || (MODULE_NAME = {}));
|
|
26
28
|
var ModuleManager = /** @class */ (function () {
|
|
27
29
|
function ModuleManager(nativeModuleCallbackManager) {
|
|
@@ -36,6 +38,7 @@ var ModuleManager = /** @class */ (function () {
|
|
|
36
38
|
this.addModule(MODULE_NAME.DOWNLOADER_MODULE, new DownloaderModuleImpl_1.DownloaderModuleImpl(nativeModuleCallbackManager));
|
|
37
39
|
this.addModule(MODULE_NAME.FONT_MODULE, new FontModuleImpl_1.FontModuleImpl(nativeModuleCallbackManager));
|
|
38
40
|
this.addModule(MODULE_NAME.SHARE_MODULE, new ShareModuleImpl_1.ShareModuleImpl(nativeModuleCallbackManager));
|
|
41
|
+
this.addModule(MODULE_NAME.ERROR_HANDLER_MODULE, new ErrorHandlerModuleImpl_1.ErrorHandlerModuleImpl(nativeModuleCallbackManager));
|
|
39
42
|
}
|
|
40
43
|
ModuleManager.prototype.getNavigationModule = function () {
|
|
41
44
|
return this.getModule(MODULE_NAME.NAVIGATION_MODULE);
|
|
@@ -67,6 +70,9 @@ var ModuleManager = /** @class */ (function () {
|
|
|
67
70
|
ModuleManager.prototype.getShareModule = function () {
|
|
68
71
|
return this.getModule(MODULE_NAME.SHARE_MODULE);
|
|
69
72
|
};
|
|
73
|
+
ModuleManager.prototype.getErrorHandlerModule = function () {
|
|
74
|
+
return this.getModule(MODULE_NAME.ERROR_HANDLER_MODULE);
|
|
75
|
+
};
|
|
70
76
|
ModuleManager.prototype.addModule = function (moduleName, nativeModule) {
|
|
71
77
|
this.moduleMap[moduleName] = nativeModule;
|
|
72
78
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { NativeModule, NativeModuleManager } from "../managers/NativeModuleHelper";
|
|
2
|
+
import { NativeModuleCallbackManager } from "../managers/NativeModuleCallbackManager";
|
|
3
|
+
import { ErrorHandlerModule } from "../interfaces/modules/ErrorHandlerModule";
|
|
4
|
+
import { ErrorInfoRequest } from "../interfaces/modules/ErrorHandlerModule";
|
|
5
|
+
export declare class ErrorHandlerModuleImpl extends NativeModule<NativeModuleManager> implements ErrorHandlerModule {
|
|
6
|
+
constructor(nativeModuleCallbackManager: NativeModuleCallbackManager);
|
|
7
|
+
openErrorHandlingFlow(errorInfo: ErrorInfoRequest): void;
|
|
8
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
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 ErrorHandlerModuleImpl = /** @class */ (function (_super) {
|
|
15
|
+
__extends(ErrorHandlerModuleImpl, _super);
|
|
16
|
+
function ErrorHandlerModuleImpl(nativeModuleCallbackManager) {
|
|
17
|
+
return _super.call(this, NativeModuleHelper_1.NativeModuleHelper.getCurrentNativeModuleProvider().ErrorHandlerModule, nativeModuleCallbackManager) || this;
|
|
18
|
+
}
|
|
19
|
+
ErrorHandlerModuleImpl.prototype.openErrorHandlingFlow = function (errorInfo) {
|
|
20
|
+
var _this = this;
|
|
21
|
+
this.nativeModuleCallbackManager.executeOnBridge(function (requestId) {
|
|
22
|
+
_this.postMessage({
|
|
23
|
+
methodName: "openErrorHandlingFlow",
|
|
24
|
+
requestId: requestId,
|
|
25
|
+
errorInfo: JSON.stringify(errorInfo)
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
return ErrorHandlerModuleImpl;
|
|
30
|
+
}(NativeModuleHelper_1.NativeModule));
|
|
31
|
+
exports.ErrorHandlerModuleImpl = ErrorHandlerModuleImpl;
|
|
@@ -36,6 +36,16 @@ var PermissionsModuleImpl = /** @class */ (function (_super) {
|
|
|
36
36
|
PermissionsModuleImpl.prototype.getScopes = function () {
|
|
37
37
|
return this.allScopes;
|
|
38
38
|
};
|
|
39
|
+
// This is for ultraPlus where only token will be provided to clients
|
|
40
|
+
PermissionsModuleImpl.prototype.getUltraPlusToken = function () {
|
|
41
|
+
var _this = this;
|
|
42
|
+
return this.nativeModuleCallbackManager.executeOnBridge(function (requestId) {
|
|
43
|
+
_this.postMessage({
|
|
44
|
+
methodName: "getUltraPlusGrantToken",
|
|
45
|
+
requestId: requestId
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
};
|
|
39
49
|
return PermissionsModuleImpl;
|
|
40
50
|
}(NativeModuleHelper_1.NativeModule));
|
|
41
51
|
exports.PermissionsModuleImpl = PermissionsModuleImpl;
|