@blueid/access-capacitor 1.9.0 → 1.18.0
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/android/build.gradle +3 -5
- package/android/repo/net/blueid/access/5.0/access-5.0-sources.jar +0 -0
- package/android/repo/net/blueid/access/5.0/access-5.0-sources.jar.md5 +1 -1
- package/android/repo/net/blueid/access/5.0/access-5.0-sources.jar.sha1 +1 -1
- package/android/repo/net/blueid/access/5.0/access-5.0-sources.jar.sha256 +1 -1
- package/android/repo/net/blueid/access/5.0/access-5.0-sources.jar.sha512 +1 -1
- package/android/repo/net/blueid/access/5.0/access-5.0.aar +0 -0
- package/android/repo/net/blueid/access/5.0/access-5.0.aar.md5 +1 -1
- package/android/repo/net/blueid/access/5.0/access-5.0.aar.sha1 +1 -1
- package/android/repo/net/blueid/access/5.0/access-5.0.aar.sha256 +1 -1
- package/android/repo/net/blueid/access/5.0/access-5.0.aar.sha512 +1 -1
- package/android/repo/net/blueid/access/5.0/access-5.0.module +29 -15
- package/android/repo/net/blueid/access/5.0/access-5.0.module.md5 +1 -1
- package/android/repo/net/blueid/access/5.0/access-5.0.module.sha1 +1 -1
- package/android/repo/net/blueid/access/5.0/access-5.0.module.sha256 +1 -1
- package/android/repo/net/blueid/access/5.0/access-5.0.module.sha512 +1 -1
- package/android/repo/net/blueid/access/5.0/access-5.0.pom +12 -0
- package/android/repo/net/blueid/access/5.0/access-5.0.pom.md5 +1 -1
- package/android/repo/net/blueid/access/5.0/access-5.0.pom.sha1 +1 -1
- package/android/repo/net/blueid/access/5.0/access-5.0.pom.sha256 +1 -1
- package/android/repo/net/blueid/access/5.0/access-5.0.pom.sha512 +1 -1
- package/android/repo/net/blueid/access/maven-metadata.xml +1 -1
- package/android/repo/net/blueid/access/maven-metadata.xml.md5 +1 -1
- package/android/repo/net/blueid/access/maven-metadata.xml.sha1 +1 -1
- package/android/repo/net/blueid/access/maven-metadata.xml.sha256 +1 -1
- package/android/repo/net/blueid/access/maven-metadata.xml.sha512 +1 -1
- package/android/src/main/java/com/blueid/access/plugins/capacitor/BlueIDAccess.java +1 -43
- package/android/src/main/java/com/blueid/access/plugins/capacitor/BlueIDAccessPlugin.java +1 -87
- package/dist/esm/BlueSystem_pb.d.ts +41 -0
- package/dist/esm/BlueSystem_pb.js +32 -0
- package/dist/esm/BlueSystem_pb.js.map +1 -1
- package/dist/esm/interop.js +0 -3
- package/dist/esm/interop.js.map +1 -1
- package/dist/plugin.cjs.js +34 -3
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +34 -3
- package/dist/plugin.js.map +1 -1
- package/ios/CBlueIDAccess.xcframework/Info.plist +6 -6
- package/ios/CBlueIDAccess.xcframework/ios-arm64/Headers/core/BlueCore.h +1 -1
- package/ios/CBlueIDAccess.xcframework/ios-arm64/libCBlueIDAccess.a +0 -0
- package/ios/CBlueIDAccess.xcframework/ios-arm64_x86_64-simulator/Headers/core/BlueCore.h +1 -1
- package/ios/CBlueIDAccess.xcframework/ios-arm64_x86_64-simulator/libCBlueIDAccess.a +0 -0
- package/ios/CBlueIDAccess.xcframework/macos-arm64_x86_64/Headers/core/BlueCore.h +1 -1
- package/ios/CBlueIDAccess.xcframework/macos-arm64_x86_64/libCBlueIDAccess.a +0 -0
- package/ios/Plugin/BlueIDAccessPlugin.swift +1 -1
- package/ios/Plugin/BlueIDAccessSDK/BlueAPI.swift +7 -0
- package/ios/Plugin/BlueIDAccessSDK/BlueAPIProtocol.swift +22 -0
- package/ios/Plugin/BlueIDAccessSDK/BlueCore.pb.swift +9 -1
- package/ios/Plugin/BlueIDAccessSDK/BlueDevices.swift +11 -25
- package/ios/Plugin/BlueIDAccessSDK/BlueDevicesList.swift +89 -0
- package/ios/Plugin/BlueIDAccessSDK/BlueSDK.pb.swift +18 -2
- package/ios/Plugin/BlueIDAccessSDK/BlueSPTransponder.swift +1 -3
- package/ios/Plugin/BlueIDAccessSDK/BlueSystem.pb.swift +185 -3
- package/ios/Plugin/BlueIDAccessSDK/BlueSystem.swift +43 -17
- package/package.json +2 -4
- package/android/settings.gradle +0 -4
|
@@ -37,6 +37,12 @@ public class BlueGetSystemStatusCommand: BlueSdkAsyncCommand {
|
|
|
37
37
|
public func runAsync(deviceID: String) async throws -> BlueSystemStatus {
|
|
38
38
|
var status: BlueSystemStatus = try await blueTerminalRun(deviceID: deviceID, timeoutSeconds: 30.0, action: "STATUS")
|
|
39
39
|
|
|
40
|
+
await self.tryUpdateWithOnlineInformation(deviceID, &status)
|
|
41
|
+
|
|
42
|
+
return status
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
private func tryUpdateWithOnlineInformation(_ deviceID: String, _ status: inout BlueSystemStatus) async {
|
|
40
46
|
do {
|
|
41
47
|
let credentials = try BlueGetAccessCredentialsCommand().run(credentialType: .maintenance, for: deviceID, includePrivateKey: true)
|
|
42
48
|
|
|
@@ -44,32 +50,52 @@ public class BlueGetSystemStatusCommand: BlueSdkAsyncCommand {
|
|
|
44
50
|
let tokenAuthentication = try await sdkService.authenticationTokenService
|
|
45
51
|
.getTokenAuthentication(credential: credential)
|
|
46
52
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
self.updateFirmwareFlags(&status, latestFW)
|
|
53
|
+
await self.tryUpdateFirmwareFlags(deviceID, &status, tokenAuthentication)
|
|
54
|
+
await self.tryUpdateHardwareInformation(deviceID, &status, tokenAuthentication)
|
|
50
55
|
}
|
|
51
56
|
} catch {
|
|
52
57
|
blueLogError(error.localizedDescription)
|
|
53
58
|
}
|
|
54
|
-
|
|
55
|
-
return status
|
|
56
59
|
}
|
|
57
60
|
|
|
58
|
-
internal func
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
61
|
+
internal func tryUpdateFirmwareFlags(_ deviceID: String, _ status: inout BlueSystemStatus, _ tokenAuthentication: BlueTokenAuthentication) async {
|
|
62
|
+
do {
|
|
63
|
+
let latestFW = try await self.sdkService.apiService.getLatestFirmware(deviceID: deviceID, with: tokenAuthentication).getData()
|
|
64
|
+
|
|
65
|
+
if let testFW = latestFW.test {
|
|
66
|
+
if let testVersion = testFW.testVersion {
|
|
67
|
+
status.newTestFirmwareVersionAvailable = testVersion != status.applicationVersionTest || testFW.version != status.applicationVersion
|
|
68
|
+
}
|
|
62
69
|
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
if let productionFW = latestFW.production {
|
|
66
|
-
let isTestVersion = status.hasApplicationVersionTest && status.applicationVersionTest != 0
|
|
67
70
|
|
|
68
|
-
if
|
|
69
|
-
status.
|
|
70
|
-
|
|
71
|
-
|
|
71
|
+
if let productionFW = latestFW.production {
|
|
72
|
+
let isTestVersion = status.hasApplicationVersionTest && status.applicationVersionTest != 0
|
|
73
|
+
|
|
74
|
+
if isTestVersion {
|
|
75
|
+
status.newFirmwareVersionAvailable = true
|
|
76
|
+
} else {
|
|
77
|
+
status.newFirmwareVersionAvailable = productionFW.version != status.applicationVersion
|
|
78
|
+
}
|
|
72
79
|
}
|
|
80
|
+
} catch {
|
|
81
|
+
blueLogError(error.localizedDescription)
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
internal func tryUpdateHardwareInformation(_ deviceID: String, _ status: inout BlueSystemStatus, _ tokenAuthentication: BlueTokenAuthentication) async {
|
|
86
|
+
do {
|
|
87
|
+
let device = try await self.sdkService.apiService.getDevice(deviceID: deviceID, with: tokenAuthentication).getData()
|
|
88
|
+
|
|
89
|
+
status.hardwareInfo = BlueHardwareInfo()
|
|
90
|
+
status.hardwareInfo.name = device.hardware.name
|
|
91
|
+
status.hardwareInfo.vendor = device.hardware.vendor
|
|
92
|
+
status.hardwareInfo.vendorName = device.hardware.vendorName
|
|
93
|
+
status.hardwareInfo.version = UInt32(device.hardware.version)
|
|
94
|
+
status.hardwareInfo.type = BlueHardwareType(rawValue: device.hardware.type) ?? status.hardwareType
|
|
95
|
+
|
|
96
|
+
status.newConfigurationAvailable = status.configID != device.configId
|
|
97
|
+
} catch {
|
|
98
|
+
blueLogError(error.localizedDescription)
|
|
73
99
|
}
|
|
74
100
|
}
|
|
75
101
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blueid/access-capacitor",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.18.0",
|
|
4
4
|
"description": "Capacitor JS plugin for the BlueID Access SDK",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -8,10 +8,8 @@
|
|
|
8
8
|
"unpkg": "dist/plugin.js",
|
|
9
9
|
"files": [
|
|
10
10
|
"android/src/main/",
|
|
11
|
-
"android/sdk/",
|
|
12
|
-
"android/repo/",
|
|
13
11
|
"android/build.gradle",
|
|
14
|
-
"android/
|
|
12
|
+
"android/repo/",
|
|
15
13
|
"dist/",
|
|
16
14
|
"ios/Plugin/",
|
|
17
15
|
"ios/CBlueIDAccess.xcframework/",
|
package/android/settings.gradle
DELETED