fk-platform-sdk 1.0.31-beta → 1.0.31-beta-3
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 -1
- package/dist/interfaces/modules/DownloaderModule.d.ts +5 -0
- package/dist/interfaces/modules/{AppVersionModule.js → DownloaderModule.js} +0 -0
- package/dist/managers/ModuleManager.d.ts +2 -0
- package/dist/managers/ModuleManager.js +6 -0
- package/dist/modules/DownloaderModuleImpl.d.ts +9 -0
- package/dist/modules/{AppVersionModuleImpl.js → DownloaderModuleImpl.js} +11 -9
- package/dist/types/DownloadManagerResponse.d.ts +3 -0
- package/dist/types/{AppVersionManagerResponse.js → DownloadManagerResponse.js} +0 -0
- package/package.json +1 -1
- package/dist/interfaces/modules/AppVersionModule.d.ts +0 -5
- package/dist/modules/AppVersionModuleImpl.d.ts +0 -9
- package/dist/types/AppVersionManagerResponse.d.ts +0 -3
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { NativeModuleResponse } from "../NativeModuleResponse";
|
|
2
|
+
import { DownloadManagerResponse } from "../../types/DownloadManagerResponse";
|
|
3
|
+
export interface DownloaderModule {
|
|
4
|
+
fileDownload: (url: string, mimeType: string) => Promise<NativeModuleResponse<DownloadManagerResponse>>;
|
|
5
|
+
}
|
|
File without changes
|
|
@@ -5,6 +5,7 @@ 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 { DownloaderModule } from "../interfaces/modules/DownloaderModule";
|
|
8
9
|
export declare class ModuleManager {
|
|
9
10
|
private moduleMap;
|
|
10
11
|
constructor(nativeModuleCallbackManager: NativeModuleCallbackManager);
|
|
@@ -14,6 +15,7 @@ export declare class ModuleManager {
|
|
|
14
15
|
getAnalyticsModule(): AnalyticsModule;
|
|
15
16
|
getSMSModule(): SMSModule;
|
|
16
17
|
getLocationModule(): LocationModule;
|
|
18
|
+
getDownloaderModule(): DownloaderModule;
|
|
17
19
|
private addModule;
|
|
18
20
|
private getModule;
|
|
19
21
|
}
|
|
@@ -6,6 +6,7 @@ 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 DownloaderModuleImpl_1 = require("../modules/DownloaderModuleImpl");
|
|
9
10
|
var MODULE_NAME;
|
|
10
11
|
(function (MODULE_NAME) {
|
|
11
12
|
MODULE_NAME[MODULE_NAME["PERMISSION_MODULE"] = 0] = "PERMISSION_MODULE";
|
|
@@ -14,6 +15,7 @@ var MODULE_NAME;
|
|
|
14
15
|
MODULE_NAME[MODULE_NAME["ANALYTICS_MODULE"] = 3] = "ANALYTICS_MODULE";
|
|
15
16
|
MODULE_NAME[MODULE_NAME["SMS_MODULE"] = 4] = "SMS_MODULE";
|
|
16
17
|
MODULE_NAME[MODULE_NAME["LOCATION_MODULE"] = 5] = "LOCATION_MODULE";
|
|
18
|
+
MODULE_NAME[MODULE_NAME["DOWNLOADER_MODULE"] = 6] = "DOWNLOADER_MODULE";
|
|
17
19
|
})(MODULE_NAME || (MODULE_NAME = {}));
|
|
18
20
|
var ModuleManager = /** @class */ (function () {
|
|
19
21
|
function ModuleManager(nativeModuleCallbackManager) {
|
|
@@ -24,6 +26,7 @@ var ModuleManager = /** @class */ (function () {
|
|
|
24
26
|
this.addModule(MODULE_NAME.ANALYTICS_MODULE, new AnalyticsModuleImpl_1.AnalyticsModuleImpl(nativeModuleCallbackManager));
|
|
25
27
|
this.addModule(MODULE_NAME.SMS_MODULE, new SMSModuleImpl_1.SMSModuleImpl(nativeModuleCallbackManager));
|
|
26
28
|
this.addModule(MODULE_NAME.LOCATION_MODULE, new LocationModuleImpl_1.LocationModuleImpl(nativeModuleCallbackManager));
|
|
29
|
+
this.addModule(MODULE_NAME.DOWNLOADER_MODULE, new DownloaderModuleImpl_1.DownloaderModuleImpl(nativeModuleCallbackManager));
|
|
27
30
|
}
|
|
28
31
|
ModuleManager.prototype.getNavigationModule = function () {
|
|
29
32
|
return this.getModule(MODULE_NAME.NAVIGATION_MODULE);
|
|
@@ -43,6 +46,9 @@ var ModuleManager = /** @class */ (function () {
|
|
|
43
46
|
ModuleManager.prototype.getLocationModule = function () {
|
|
44
47
|
return this.getModule(MODULE_NAME.LOCATION_MODULE);
|
|
45
48
|
};
|
|
49
|
+
ModuleManager.prototype.getDownloaderModule = function () {
|
|
50
|
+
return this.getModule(MODULE_NAME.DOWNLOADER_MODULE);
|
|
51
|
+
};
|
|
46
52
|
ModuleManager.prototype.addModule = function (moduleName, nativeModule) {
|
|
47
53
|
this.moduleMap[moduleName] = nativeModule;
|
|
48
54
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { NativeModuleResponse } from "../interfaces/NativeModuleResponse";
|
|
2
|
+
import { NativeModule, NativeModuleManager } from "../managers/NativeModuleHelper";
|
|
3
|
+
import { NativeModuleCallbackManager } from "../managers/NativeModuleCallbackManager";
|
|
4
|
+
import { DownloaderModule } from "../interfaces/modules/DownloaderModule";
|
|
5
|
+
import { DownloadManagerResponse } from "../types/DownloadManagerResponse";
|
|
6
|
+
export declare class DownloaderModuleImpl extends NativeModule<NativeModuleManager> implements DownloaderModule {
|
|
7
|
+
constructor(nativeModuleCallbackManager: NativeModuleCallbackManager);
|
|
8
|
+
fileDownload(url: string, mimeType: string): Promise<NativeModuleResponse<DownloadManagerResponse>>;
|
|
9
|
+
}
|
|
@@ -11,20 +11,22 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
11
11
|
})();
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
var NativeModuleHelper_1 = require("../managers/NativeModuleHelper");
|
|
14
|
-
var
|
|
15
|
-
__extends(
|
|
16
|
-
function
|
|
17
|
-
return _super.call(this, NativeModuleHelper_1.NativeModuleHelper.getCurrentNativeModuleProvider().
|
|
14
|
+
var DownloaderModuleImpl = /** @class */ (function (_super) {
|
|
15
|
+
__extends(DownloaderModuleImpl, _super);
|
|
16
|
+
function DownloaderModuleImpl(nativeModuleCallbackManager) {
|
|
17
|
+
return _super.call(this, NativeModuleHelper_1.NativeModuleHelper.getCurrentNativeModuleProvider().DownloaderModule, nativeModuleCallbackManager) || this;
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
DownloaderModuleImpl.prototype.fileDownload = function (url, mimeType) {
|
|
20
20
|
var _this = this;
|
|
21
21
|
return this.nativeModuleCallbackManager.executeOnBridge(function (requestId) {
|
|
22
22
|
_this.postMessage({
|
|
23
|
-
methodName: "
|
|
24
|
-
requestId: requestId
|
|
23
|
+
methodName: "fileDownload",
|
|
24
|
+
requestId: requestId,
|
|
25
|
+
url: url,
|
|
26
|
+
mimeType: mimeType
|
|
25
27
|
});
|
|
26
28
|
});
|
|
27
29
|
};
|
|
28
|
-
return
|
|
30
|
+
return DownloaderModuleImpl;
|
|
29
31
|
}(NativeModuleHelper_1.NativeModule));
|
|
30
|
-
exports.
|
|
32
|
+
exports.DownloaderModuleImpl = DownloaderModuleImpl;
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { NativeModuleResponse } from "../interfaces/NativeModuleResponse";
|
|
2
|
-
import { NativeModule, NativeModuleManager } from "../managers/NativeModuleHelper";
|
|
3
|
-
import { NativeModuleCallbackManager } from "../managers/NativeModuleCallbackManager";
|
|
4
|
-
import { AppVersionModule } from "../interfaces/modules/AppVersionModule";
|
|
5
|
-
import { AppVersionManagerResponse } from "../types/AppVersionManagerResponse";
|
|
6
|
-
export declare class AppVersionModuleImpl extends NativeModule<NativeModuleManager> implements AppVersionModule {
|
|
7
|
-
constructor(nativeModuleCallbackManager: NativeModuleCallbackManager);
|
|
8
|
-
getApkVersion(): Promise<NativeModuleResponse<AppVersionManagerResponse>>;
|
|
9
|
-
}
|