fk-platform-sdk 1.0.32-beta → 1.0.33
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 +2 -1
- package/dist/interfaces/modules/AppVersionModule.d.ts +5 -0
- package/dist/interfaces/modules/{ContactsSaveModule.js → AppVersionModule.js} +0 -0
- package/dist/interfaces/modules/DownloaderModule.d.ts +5 -0
- package/dist/{types/ContactSaveResponse.js → interfaces/modules/DownloaderModule.js} +0 -0
- package/dist/managers/ModuleManager.d.ts +4 -2
- package/dist/managers/ModuleManager.js +12 -6
- package/dist/modules/AppVersionModuleImpl.d.ts +9 -0
- package/dist/modules/AppVersionModuleImpl.js +30 -0
- package/dist/modules/DownloaderModuleImpl.d.ts +9 -0
- package/dist/modules/{ContactsSaveModuleImpl.js → DownloaderModuleImpl.js} +10 -10
- package/dist/types/AppVersionManagerResponse.d.ts +3 -0
- package/dist/types/AppVersionManagerResponse.js +2 -0
- package/dist/types/DownloadManagerResponse.d.ts +3 -0
- package/dist/types/DownloadManagerResponse.js +2 -0
- package/package.json +1 -1
- package/dist/interfaces/modules/ContactsSaveModule.d.ts +0 -5
- package/dist/modules/ContactsSaveModuleImpl.d.ts +0 -9
- package/dist/types/ContactSaveResponse.d.ts +0 -3
|
@@ -7,5 +7,6 @@ export interface NativeModuleManagerProvider {
|
|
|
7
7
|
AnalyticsModule: NativeModuleManager;
|
|
8
8
|
SMSModule: NativeModuleManager;
|
|
9
9
|
LocationModule: NativeModuleManager;
|
|
10
|
-
|
|
10
|
+
AppVersionModule: NativeModuleManager;
|
|
11
|
+
DownloaderModule: NativeModuleManager;
|
|
11
12
|
}
|
|
File without changes
|
|
@@ -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,17 +5,19 @@ 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 {
|
|
8
|
+
import { AppVersionModule } from "../interfaces/modules/AppVersionModule";
|
|
9
|
+
import { DownloaderModule } from "../interfaces/modules/DownloaderModule";
|
|
9
10
|
export declare class ModuleManager {
|
|
10
11
|
private moduleMap;
|
|
11
12
|
constructor(nativeModuleCallbackManager: NativeModuleCallbackManager);
|
|
12
13
|
getNavigationModule(): NavigationModule;
|
|
13
14
|
getPermissionsModule(): PermissionsModule;
|
|
14
15
|
getContactsModule(): ContactsModule;
|
|
15
|
-
getContactsSaveModule(): ContactsSaveModule;
|
|
16
16
|
getAnalyticsModule(): AnalyticsModule;
|
|
17
17
|
getSMSModule(): SMSModule;
|
|
18
18
|
getLocationModule(): LocationModule;
|
|
19
|
+
getAppVersionModule(): AppVersionModule;
|
|
20
|
+
getDownloaderModule(): DownloaderModule;
|
|
19
21
|
private addModule;
|
|
20
22
|
private getModule;
|
|
21
23
|
}
|
|
@@ -6,7 +6,8 @@ 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
|
|
9
|
+
var AppVersionModuleImpl_1 = require("../modules/AppVersionModuleImpl");
|
|
10
|
+
var DownloaderModuleImpl_1 = require("../modules/DownloaderModuleImpl");
|
|
10
11
|
var MODULE_NAME;
|
|
11
12
|
(function (MODULE_NAME) {
|
|
12
13
|
MODULE_NAME[MODULE_NAME["PERMISSION_MODULE"] = 0] = "PERMISSION_MODULE";
|
|
@@ -15,7 +16,8 @@ var MODULE_NAME;
|
|
|
15
16
|
MODULE_NAME[MODULE_NAME["ANALYTICS_MODULE"] = 3] = "ANALYTICS_MODULE";
|
|
16
17
|
MODULE_NAME[MODULE_NAME["SMS_MODULE"] = 4] = "SMS_MODULE";
|
|
17
18
|
MODULE_NAME[MODULE_NAME["LOCATION_MODULE"] = 5] = "LOCATION_MODULE";
|
|
18
|
-
MODULE_NAME[MODULE_NAME["
|
|
19
|
+
MODULE_NAME[MODULE_NAME["APP_VERSION_MODULE"] = 6] = "APP_VERSION_MODULE";
|
|
20
|
+
MODULE_NAME[MODULE_NAME["DOWNLOADER_MODULE"] = 7] = "DOWNLOADER_MODULE";
|
|
19
21
|
})(MODULE_NAME || (MODULE_NAME = {}));
|
|
20
22
|
var ModuleManager = /** @class */ (function () {
|
|
21
23
|
function ModuleManager(nativeModuleCallbackManager) {
|
|
@@ -26,7 +28,8 @@ var ModuleManager = /** @class */ (function () {
|
|
|
26
28
|
this.addModule(MODULE_NAME.ANALYTICS_MODULE, new AnalyticsModuleImpl_1.AnalyticsModuleImpl(nativeModuleCallbackManager));
|
|
27
29
|
this.addModule(MODULE_NAME.SMS_MODULE, new SMSModuleImpl_1.SMSModuleImpl(nativeModuleCallbackManager));
|
|
28
30
|
this.addModule(MODULE_NAME.LOCATION_MODULE, new LocationModuleImpl_1.LocationModuleImpl(nativeModuleCallbackManager));
|
|
29
|
-
this.addModule(MODULE_NAME.
|
|
31
|
+
this.addModule(MODULE_NAME.APP_VERSION_MODULE, new AppVersionModuleImpl_1.AppVersionModuleImpl(nativeModuleCallbackManager));
|
|
32
|
+
this.addModule(MODULE_NAME.DOWNLOADER_MODULE, new DownloaderModuleImpl_1.DownloaderModuleImpl(nativeModuleCallbackManager));
|
|
30
33
|
}
|
|
31
34
|
ModuleManager.prototype.getNavigationModule = function () {
|
|
32
35
|
return this.getModule(MODULE_NAME.NAVIGATION_MODULE);
|
|
@@ -37,9 +40,6 @@ var ModuleManager = /** @class */ (function () {
|
|
|
37
40
|
ModuleManager.prototype.getContactsModule = function () {
|
|
38
41
|
return this.getModule(MODULE_NAME.CONTACTS_MODULE);
|
|
39
42
|
};
|
|
40
|
-
ModuleManager.prototype.getContactsSaveModule = function () {
|
|
41
|
-
return this.getModule(MODULE_NAME.CONTACTS_SAVE_MODULE);
|
|
42
|
-
};
|
|
43
43
|
ModuleManager.prototype.getAnalyticsModule = function () {
|
|
44
44
|
return this.getModule(MODULE_NAME.ANALYTICS_MODULE);
|
|
45
45
|
};
|
|
@@ -49,6 +49,12 @@ var ModuleManager = /** @class */ (function () {
|
|
|
49
49
|
ModuleManager.prototype.getLocationModule = function () {
|
|
50
50
|
return this.getModule(MODULE_NAME.LOCATION_MODULE);
|
|
51
51
|
};
|
|
52
|
+
ModuleManager.prototype.getAppVersionModule = function () {
|
|
53
|
+
return this.getModule(MODULE_NAME.APP_VERSION_MODULE);
|
|
54
|
+
};
|
|
55
|
+
ModuleManager.prototype.getDownloaderModule = function () {
|
|
56
|
+
return this.getModule(MODULE_NAME.DOWNLOADER_MODULE);
|
|
57
|
+
};
|
|
52
58
|
ModuleManager.prototype.addModule = function (moduleName, nativeModule) {
|
|
53
59
|
this.moduleMap[moduleName] = nativeModule;
|
|
54
60
|
};
|
|
@@ -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 { 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
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
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 AppVersionModuleImpl = /** @class */ (function (_super) {
|
|
15
|
+
__extends(AppVersionModuleImpl, _super);
|
|
16
|
+
function AppVersionModuleImpl(nativeModuleCallbackManager) {
|
|
17
|
+
return _super.call(this, NativeModuleHelper_1.NativeModuleHelper.getCurrentNativeModuleProvider().AppVersionModule, nativeModuleCallbackManager) || this;
|
|
18
|
+
}
|
|
19
|
+
AppVersionModuleImpl.prototype.getApkVersion = function () {
|
|
20
|
+
var _this = this;
|
|
21
|
+
return this.nativeModuleCallbackManager.executeOnBridge(function (requestId) {
|
|
22
|
+
_this.postMessage({
|
|
23
|
+
methodName: "getApkVersion",
|
|
24
|
+
requestId: requestId
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
return AppVersionModuleImpl;
|
|
29
|
+
}(NativeModuleHelper_1.NativeModule));
|
|
30
|
+
exports.AppVersionModuleImpl = AppVersionModuleImpl;
|
|
@@ -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,22 +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: "
|
|
23
|
+
methodName: "fileDownload",
|
|
24
24
|
requestId: requestId,
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
url: url,
|
|
26
|
+
mimeType: mimeType
|
|
27
27
|
});
|
|
28
28
|
});
|
|
29
29
|
};
|
|
30
|
-
return
|
|
30
|
+
return DownloaderModuleImpl;
|
|
31
31
|
}(NativeModuleHelper_1.NativeModule));
|
|
32
|
-
exports.
|
|
32
|
+
exports.DownloaderModuleImpl = DownloaderModuleImpl;
|
package/package.json
CHANGED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { ContactSaveResponse } from "../../types/ContactSaveResponse";
|
|
2
|
-
import { NativeModuleResponse } from "../NativeModuleResponse";
|
|
3
|
-
export interface ContactsSaveModule {
|
|
4
|
-
saveContact: (contactName: string, contactPhone: string) => Promise<NativeModuleResponse<ContactSaveResponse>>;
|
|
5
|
-
}
|
|
@@ -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 { ContactsSaveModule } from "../interfaces/modules/ContactsSaveModule";
|
|
5
|
-
import { ContactSaveResponse } from "../types/ContactSaveResponse";
|
|
6
|
-
export declare class ContactsSaveModuleImpl extends NativeModule<NativeModuleManager> implements ContactsSaveModule {
|
|
7
|
-
constructor(nativeModuleCallbackManager: NativeModuleCallbackManager);
|
|
8
|
-
saveContact(contactName: string, contactPhone: string): Promise<NativeModuleResponse<ContactSaveResponse>>;
|
|
9
|
-
}
|