@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.
Files changed (56) hide show
  1. package/android/build.gradle +3 -5
  2. package/android/repo/net/blueid/access/5.0/access-5.0-sources.jar +0 -0
  3. package/android/repo/net/blueid/access/5.0/access-5.0-sources.jar.md5 +1 -1
  4. package/android/repo/net/blueid/access/5.0/access-5.0-sources.jar.sha1 +1 -1
  5. package/android/repo/net/blueid/access/5.0/access-5.0-sources.jar.sha256 +1 -1
  6. package/android/repo/net/blueid/access/5.0/access-5.0-sources.jar.sha512 +1 -1
  7. package/android/repo/net/blueid/access/5.0/access-5.0.aar +0 -0
  8. package/android/repo/net/blueid/access/5.0/access-5.0.aar.md5 +1 -1
  9. package/android/repo/net/blueid/access/5.0/access-5.0.aar.sha1 +1 -1
  10. package/android/repo/net/blueid/access/5.0/access-5.0.aar.sha256 +1 -1
  11. package/android/repo/net/blueid/access/5.0/access-5.0.aar.sha512 +1 -1
  12. package/android/repo/net/blueid/access/5.0/access-5.0.module +29 -15
  13. package/android/repo/net/blueid/access/5.0/access-5.0.module.md5 +1 -1
  14. package/android/repo/net/blueid/access/5.0/access-5.0.module.sha1 +1 -1
  15. package/android/repo/net/blueid/access/5.0/access-5.0.module.sha256 +1 -1
  16. package/android/repo/net/blueid/access/5.0/access-5.0.module.sha512 +1 -1
  17. package/android/repo/net/blueid/access/5.0/access-5.0.pom +12 -0
  18. package/android/repo/net/blueid/access/5.0/access-5.0.pom.md5 +1 -1
  19. package/android/repo/net/blueid/access/5.0/access-5.0.pom.sha1 +1 -1
  20. package/android/repo/net/blueid/access/5.0/access-5.0.pom.sha256 +1 -1
  21. package/android/repo/net/blueid/access/5.0/access-5.0.pom.sha512 +1 -1
  22. package/android/repo/net/blueid/access/maven-metadata.xml +1 -1
  23. package/android/repo/net/blueid/access/maven-metadata.xml.md5 +1 -1
  24. package/android/repo/net/blueid/access/maven-metadata.xml.sha1 +1 -1
  25. package/android/repo/net/blueid/access/maven-metadata.xml.sha256 +1 -1
  26. package/android/repo/net/blueid/access/maven-metadata.xml.sha512 +1 -1
  27. package/android/src/main/java/com/blueid/access/plugins/capacitor/BlueIDAccess.java +1 -43
  28. package/android/src/main/java/com/blueid/access/plugins/capacitor/BlueIDAccessPlugin.java +1 -87
  29. package/dist/esm/BlueSystem_pb.d.ts +41 -0
  30. package/dist/esm/BlueSystem_pb.js +32 -0
  31. package/dist/esm/BlueSystem_pb.js.map +1 -1
  32. package/dist/esm/interop.js +0 -3
  33. package/dist/esm/interop.js.map +1 -1
  34. package/dist/plugin.cjs.js +34 -3
  35. package/dist/plugin.cjs.js.map +1 -1
  36. package/dist/plugin.js +34 -3
  37. package/dist/plugin.js.map +1 -1
  38. package/ios/CBlueIDAccess.xcframework/Info.plist +6 -6
  39. package/ios/CBlueIDAccess.xcframework/ios-arm64/Headers/core/BlueCore.h +1 -1
  40. package/ios/CBlueIDAccess.xcframework/ios-arm64/libCBlueIDAccess.a +0 -0
  41. package/ios/CBlueIDAccess.xcframework/ios-arm64_x86_64-simulator/Headers/core/BlueCore.h +1 -1
  42. package/ios/CBlueIDAccess.xcframework/ios-arm64_x86_64-simulator/libCBlueIDAccess.a +0 -0
  43. package/ios/CBlueIDAccess.xcframework/macos-arm64_x86_64/Headers/core/BlueCore.h +1 -1
  44. package/ios/CBlueIDAccess.xcframework/macos-arm64_x86_64/libCBlueIDAccess.a +0 -0
  45. package/ios/Plugin/BlueIDAccessPlugin.swift +1 -1
  46. package/ios/Plugin/BlueIDAccessSDK/BlueAPI.swift +7 -0
  47. package/ios/Plugin/BlueIDAccessSDK/BlueAPIProtocol.swift +22 -0
  48. package/ios/Plugin/BlueIDAccessSDK/BlueCore.pb.swift +9 -1
  49. package/ios/Plugin/BlueIDAccessSDK/BlueDevices.swift +11 -25
  50. package/ios/Plugin/BlueIDAccessSDK/BlueDevicesList.swift +89 -0
  51. package/ios/Plugin/BlueIDAccessSDK/BlueSDK.pb.swift +18 -2
  52. package/ios/Plugin/BlueIDAccessSDK/BlueSPTransponder.swift +1 -3
  53. package/ios/Plugin/BlueIDAccessSDK/BlueSystem.pb.swift +185 -3
  54. package/ios/Plugin/BlueIDAccessSDK/BlueSystem.swift +43 -17
  55. package/package.json +2 -4
  56. 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
- let latestFW = try await self.sdkService.apiService.getLatestFirmware(deviceID: deviceID, with: tokenAuthentication).getData()
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 updateFirmwareFlags(_ status: inout BlueSystemStatus, _ latestFW: BlueGetLatestFirmwareResult) {
59
- if let testFW = latestFW.test {
60
- if let testVersion = testFW.testVersion {
61
- status.newTestFirmwareVersionAvailable = testVersion != status.applicationVersionTest || testFW.version != status.applicationVersion
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 isTestVersion {
69
- status.newFirmwareVersionAvailable = true
70
- } else {
71
- status.newFirmwareVersionAvailable = productionFW.version != status.applicationVersion
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.9.0",
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/settings.gradle",
12
+ "android/repo/",
15
13
  "dist/",
16
14
  "ios/Plugin/",
17
15
  "ios/CBlueIDAccess.xcframework/",
@@ -1,4 +0,0 @@
1
- rootProject.name = "AndroidCapacitorPlugin"
2
- include ':capacitor-android'
3
- project(':capacitor-android').projectDir = new File('../node_modules/@capacitor/android/capacitor')
4
- //include ':sdk'