@ledgerhq/device-management-kit 0.0.0-signer-eth-20250122093657 → 0.0.0-try-to-fix-20250429171448

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 (900) hide show
  1. package/README.md +85 -36
  2. package/lib/cjs/index.js.map +1 -1
  3. package/lib/cjs/package.json +12 -11
  4. package/lib/cjs/src/api/DeviceManagementKit.js +1 -1
  5. package/lib/cjs/src/api/DeviceManagementKit.js.map +3 -3
  6. package/lib/cjs/src/api/DeviceManagementKit.test.js +1 -1
  7. package/lib/cjs/src/api/DeviceManagementKit.test.js.map +3 -3
  8. package/lib/cjs/src/api/DeviceManagementKitBuilder.js +1 -1
  9. package/lib/cjs/src/api/DeviceManagementKitBuilder.js.map +2 -2
  10. package/lib/cjs/src/api/DeviceManagementKitBuilder.test.js +1 -1
  11. package/lib/cjs/src/api/DeviceManagementKitBuilder.test.js.map +2 -2
  12. package/lib/cjs/src/api/DmkConfig.js +1 -1
  13. package/lib/cjs/src/api/DmkConfig.js.map +1 -1
  14. package/lib/cjs/src/api/apdu/utils/ByteArrayParser.test.js +1 -1
  15. package/lib/cjs/src/api/apdu/utils/ByteArrayParser.test.js.map +2 -2
  16. package/lib/cjs/src/api/command/os/GetOsVersionCommand.js +1 -1
  17. package/lib/cjs/src/api/command/os/GetOsVersionCommand.js.map +3 -3
  18. package/lib/cjs/src/api/command/os/LoadCertificateCommand.js +2 -0
  19. package/lib/cjs/src/api/command/os/LoadCertificateCommand.js.map +7 -0
  20. package/lib/cjs/src/api/command/os/LoadCertificateCommand.test.js +2 -0
  21. package/lib/cjs/src/api/command/os/LoadCertificateCommand.test.js.map +7 -0
  22. package/lib/cjs/src/api/command/os/SecureElementFlagsParser.js +2 -0
  23. package/lib/cjs/src/api/command/os/SecureElementFlagsParser.js.map +7 -0
  24. package/lib/cjs/src/api/command/os/SecureElementFlagsParser.test.js +2 -0
  25. package/lib/cjs/src/api/command/os/SecureElementFlagsParser.test.js.map +7 -0
  26. package/lib/cjs/src/api/command/os/__mocks__/GetOsVersionCommand.js +1 -1
  27. package/lib/cjs/src/api/command/os/__mocks__/GetOsVersionCommand.js.map +2 -2
  28. package/lib/cjs/src/api/command/use-case/SendCommandUseCase.js +1 -1
  29. package/lib/cjs/src/api/command/use-case/SendCommandUseCase.js.map +3 -3
  30. package/lib/cjs/src/api/command/use-case/SendCommandUseCase.test.js +1 -1
  31. package/lib/cjs/src/api/command/use-case/SendCommandUseCase.test.js.map +3 -3
  32. package/lib/cjs/src/api/command/utils/CommandUtils.js +1 -1
  33. package/lib/cjs/src/api/command/utils/CommandUtils.js.map +3 -3
  34. package/lib/cjs/src/api/command/utils/CommandUtils.test.js +1 -1
  35. package/lib/cjs/src/api/command/utils/CommandUtils.test.js.map +3 -3
  36. package/lib/cjs/src/api/device/SecureElementFlags.js +2 -0
  37. package/lib/cjs/src/api/device/SecureElementFlags.js.map +7 -0
  38. package/lib/cjs/src/api/device-action/DeviceAction.js +1 -1
  39. package/lib/cjs/src/api/device-action/DeviceAction.js.map +1 -1
  40. package/lib/cjs/src/api/device-action/__test-utils__/makeInternalApi.js +1 -1
  41. package/lib/cjs/src/api/device-action/__test-utils__/makeInternalApi.js.map +3 -3
  42. package/lib/cjs/src/api/device-action/__test-utils__/setupTestMachine.js +1 -1
  43. package/lib/cjs/src/api/device-action/__test-utils__/setupTestMachine.js.map +3 -3
  44. package/lib/cjs/src/api/device-action/__test-utils__/testDeviceActionStates.js +1 -1
  45. package/lib/cjs/src/api/device-action/__test-utils__/testDeviceActionStates.js.map +3 -3
  46. package/lib/cjs/src/api/device-action/model/UserInteractionRequired.js +1 -1
  47. package/lib/cjs/src/api/device-action/model/UserInteractionRequired.js.map +2 -2
  48. package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.js +2 -0
  49. package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.js.map +7 -0
  50. package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.test.js +2 -0
  51. package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.test.js.map +7 -0
  52. package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceActionTypes.js +2 -0
  53. package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceActionTypes.js.map +7 -0
  54. package/lib/cjs/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.js +1 -1
  55. package/lib/cjs/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.js.map +2 -2
  56. package/lib/cjs/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.test.js +1 -1
  57. package/lib/cjs/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.test.js.map +3 -3
  58. package/lib/cjs/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.test.js +1 -1
  59. package/lib/cjs/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.test.js.map +3 -3
  60. package/lib/cjs/src/api/device-action/os/ListApps/ListAppsDeviceAction.test.js +1 -1
  61. package/lib/cjs/src/api/device-action/os/ListApps/ListAppsDeviceAction.test.js.map +3 -3
  62. package/lib/cjs/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.js +1 -1
  63. package/lib/cjs/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.js.map +3 -3
  64. package/lib/cjs/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.test.js +1 -1
  65. package/lib/cjs/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.test.js.map +3 -3
  66. package/lib/cjs/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.test.js +1 -1
  67. package/lib/cjs/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.test.js.map +3 -3
  68. package/lib/cjs/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.test.js +1 -1
  69. package/lib/cjs/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.test.js.map +3 -3
  70. package/lib/cjs/src/api/device-action/xstate-utils/XStateDeviceAction.js +1 -1
  71. package/lib/cjs/src/api/device-action/xstate-utils/XStateDeviceAction.js.map +3 -3
  72. package/lib/cjs/src/api/device-model/data/StaticDeviceModelDataSource.js.map +1 -1
  73. package/lib/cjs/src/api/device-session/DeviceSessionState.js +1 -1
  74. package/lib/cjs/src/api/device-session/DeviceSessionState.js.map +1 -1
  75. package/lib/cjs/src/api/device-session/use-case/DisableDeviceSessionRefresher.js +2 -0
  76. package/lib/cjs/src/api/device-session/use-case/DisableDeviceSessionRefresher.js.map +7 -0
  77. package/lib/cjs/src/api/device-session/use-case/DisableDeviceSessionRefresher.test.js +2 -0
  78. package/lib/cjs/src/api/device-session/use-case/DisableDeviceSessionRefresher.test.js.map +7 -0
  79. package/lib/cjs/src/api/index.js +1 -1
  80. package/lib/cjs/src/api/index.js.map +3 -3
  81. package/lib/cjs/src/api/logger-subscriber/service/ConsoleLogger.test.js +1 -1
  82. package/lib/cjs/src/api/logger-subscriber/service/ConsoleLogger.test.js.map +2 -2
  83. package/lib/cjs/src/api/logger-subscriber/service/WebLogsExporterLogger.test.js +1 -1
  84. package/lib/cjs/src/api/logger-subscriber/service/WebLogsExporterLogger.test.js.map +3 -3
  85. package/lib/cjs/src/api/logger-subscriber/service/__mocks__/ConsoleLogger.js +1 -1
  86. package/lib/cjs/src/api/logger-subscriber/service/__mocks__/ConsoleLogger.js.map +2 -2
  87. package/lib/cjs/src/api/secure-channel/constants.js +2 -0
  88. package/lib/cjs/src/api/secure-channel/constants.js.map +7 -0
  89. package/lib/cjs/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.js +2 -0
  90. package/lib/cjs/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.js.map +7 -0
  91. package/lib/cjs/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.test.js +2 -0
  92. package/lib/cjs/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.test.js.map +7 -0
  93. package/lib/cjs/src/api/secure-channel/device-action/GenuineCheck/types.js +2 -0
  94. package/lib/cjs/src/api/secure-channel/device-action/GenuineCheck/types.js.map +7 -0
  95. package/lib/cjs/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.js +2 -0
  96. package/lib/cjs/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.js.map +7 -0
  97. package/lib/cjs/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.test.js +2 -0
  98. package/lib/cjs/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.test.js.map +7 -0
  99. package/lib/cjs/src/api/secure-channel/device-action/InstallApp/types.js +2 -0
  100. package/lib/cjs/src/api/secure-channel/device-action/InstallApp/types.js.map +7 -0
  101. package/lib/cjs/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.js +2 -0
  102. package/lib/cjs/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.js.map +7 -0
  103. package/lib/cjs/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.test.js +2 -0
  104. package/lib/cjs/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.test.js.map +7 -0
  105. package/lib/cjs/src/api/secure-channel/device-action/ListInstalledApps/types.js +2 -0
  106. package/lib/cjs/src/api/secure-channel/device-action/ListInstalledApps/types.js.map +7 -0
  107. package/lib/cjs/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.js +2 -0
  108. package/lib/cjs/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.js.map +7 -0
  109. package/lib/cjs/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.test.js +2 -0
  110. package/lib/cjs/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.test.js.map +7 -0
  111. package/lib/cjs/src/api/secure-channel/device-action/UninstallApp/types.js +2 -0
  112. package/lib/cjs/src/api/secure-channel/device-action/UninstallApp/types.js.map +7 -0
  113. package/lib/cjs/src/api/secure-channel/task/ConnectToSecureChannelTask.js +2 -0
  114. package/lib/cjs/src/api/secure-channel/task/ConnectToSecureChannelTask.js.map +7 -0
  115. package/lib/cjs/src/api/secure-channel/task/ConnectToSecureChannelTask.test.js +2 -0
  116. package/lib/cjs/src/api/secure-channel/task/ConnectToSecureChannelTask.test.js.map +7 -0
  117. package/lib/cjs/src/api/secure-channel/task/types.js +2 -0
  118. package/lib/cjs/src/api/secure-channel/task/types.js.map +7 -0
  119. package/lib/cjs/src/api/secure-channel/types.js +2 -0
  120. package/lib/cjs/src/api/secure-channel/types.js.map +7 -0
  121. package/lib/cjs/src/api/secure-channel/utils.js +2 -0
  122. package/lib/cjs/src/api/secure-channel/utils.js.map +7 -0
  123. package/lib/cjs/src/api/secure-channel/utils.test.js +2 -0
  124. package/lib/cjs/src/api/secure-channel/utils.test.js.map +7 -0
  125. package/lib/cjs/src/api/transport/model/DeviceApduSender.js +2 -0
  126. package/lib/cjs/src/api/transport/model/DeviceApduSender.js.map +7 -0
  127. package/lib/cjs/src/api/transport/model/DeviceConnection.js +1 -1
  128. package/lib/cjs/src/api/transport/model/DeviceConnection.js.map +1 -1
  129. package/lib/cjs/src/api/transport/model/DeviceConnectionFactory.stub.js +1 -1
  130. package/lib/cjs/src/api/transport/model/DeviceConnectionFactory.stub.js.map +2 -2
  131. package/lib/cjs/src/api/transport/model/DeviceConnectionStateMachine.js +2 -0
  132. package/lib/cjs/src/api/transport/model/DeviceConnectionStateMachine.js.map +7 -0
  133. package/lib/cjs/src/api/transport/model/DiscoveredDevice.js +1 -1
  134. package/lib/cjs/src/api/transport/model/DiscoveredDevice.js.map +1 -1
  135. package/lib/cjs/src/api/transport/model/Errors.js +1 -1
  136. package/lib/cjs/src/api/transport/model/Errors.js.map +3 -3
  137. package/lib/cjs/src/api/transport/model/Transport.js.map +1 -1
  138. package/lib/cjs/src/api/transport/model/TransportConnectedDevice.stub.js +1 -1
  139. package/lib/cjs/src/api/transport/model/TransportConnectedDevice.stub.js.map +2 -2
  140. package/lib/cjs/src/api/transport/model/TransportConnectedDevice.test.js +1 -1
  141. package/lib/cjs/src/api/transport/model/TransportConnectedDevice.test.js.map +3 -3
  142. package/lib/cjs/src/api/transport/model/TransportDiscoveredDevice.js +1 -1
  143. package/lib/cjs/src/api/transport/model/TransportDiscoveredDevice.js.map +1 -1
  144. package/lib/cjs/src/api/transport/model/__mocks__/TransportMock.js +1 -1
  145. package/lib/cjs/src/api/transport/model/__mocks__/TransportMock.js.map +2 -2
  146. package/lib/cjs/src/api/types.js +1 -1
  147. package/lib/cjs/src/api/types.js.map +1 -1
  148. package/lib/cjs/src/api/utils/Base64String.test.js +1 -1
  149. package/lib/cjs/src/api/utils/Base64String.test.js.map +2 -2
  150. package/lib/cjs/src/api/utils/HexaString.js +1 -1
  151. package/lib/cjs/src/api/utils/HexaString.js.map +2 -2
  152. package/lib/cjs/src/api/utils/HexaString.test.js +1 -1
  153. package/lib/cjs/src/api/utils/HexaString.test.js.map +2 -2
  154. package/lib/cjs/src/di.js +1 -1
  155. package/lib/cjs/src/di.js.map +3 -3
  156. package/lib/cjs/src/di.stub.js +1 -1
  157. package/lib/cjs/src/di.stub.js.map +2 -2
  158. package/lib/cjs/src/internal/config/data/LocalConfigDataSource.test.js +1 -1
  159. package/lib/cjs/src/internal/config/data/LocalConfigDataSource.test.js.map +3 -3
  160. package/lib/cjs/src/internal/config/data/RemoteConfigDataSource.test.js +1 -1
  161. package/lib/cjs/src/internal/config/data/RemoteConfigDataSource.test.js.map +2 -2
  162. package/lib/cjs/src/internal/config/data/__mocks__/LocalConfigDataSource.js +1 -1
  163. package/lib/cjs/src/internal/config/data/__mocks__/LocalConfigDataSource.js.map +2 -2
  164. package/lib/cjs/src/internal/config/data/__mocks__/RemoteConfigDataSource.js +1 -1
  165. package/lib/cjs/src/internal/config/data/__mocks__/RemoteConfigDataSource.js.map +2 -2
  166. package/lib/cjs/src/internal/config/service/DefaultConfigService.test.js +1 -1
  167. package/lib/cjs/src/internal/config/service/DefaultConfigService.test.js.map +2 -2
  168. package/lib/cjs/src/internal/config/use-case/GetDmkVersionUseCase.test.js +1 -1
  169. package/lib/cjs/src/internal/config/use-case/GetDmkVersionUseCase.test.js.map +2 -2
  170. package/lib/cjs/src/internal/device-session/data/ApduResponseConst.js +1 -1
  171. package/lib/cjs/src/internal/device-session/data/ApduResponseConst.js.map +3 -3
  172. package/lib/cjs/src/internal/device-session/data/DeviceSessionRefresherConst.js +1 -1
  173. package/lib/cjs/src/internal/device-session/data/DeviceSessionRefresherConst.js.map +3 -3
  174. package/lib/cjs/src/internal/device-session/di/deviceSessionModule.js +1 -1
  175. package/lib/cjs/src/internal/device-session/di/deviceSessionModule.js.map +3 -3
  176. package/lib/cjs/src/internal/device-session/di/deviceSessionTypes.js +1 -1
  177. package/lib/cjs/src/internal/device-session/di/deviceSessionTypes.js.map +2 -2
  178. package/lib/cjs/src/internal/device-session/model/DevicePinger.js +2 -0
  179. package/lib/cjs/src/internal/device-session/model/DevicePinger.js.map +7 -0
  180. package/lib/cjs/src/internal/device-session/model/DevicePinger.test.js +2 -0
  181. package/lib/cjs/src/internal/device-session/model/DevicePinger.test.js.map +7 -0
  182. package/lib/cjs/src/internal/device-session/model/DeviceSession.js +1 -1
  183. package/lib/cjs/src/internal/device-session/model/DeviceSession.js.map +3 -3
  184. package/lib/cjs/src/internal/device-session/model/DeviceSession.stub.js +1 -1
  185. package/lib/cjs/src/internal/device-session/model/DeviceSession.stub.js.map +3 -3
  186. package/lib/cjs/src/internal/device-session/model/DeviceSessionEventDispatcher.js +2 -0
  187. package/lib/cjs/src/internal/device-session/model/DeviceSessionEventDispatcher.js.map +7 -0
  188. package/lib/cjs/src/internal/device-session/model/DeviceSessionEventDispatcher.test.js +2 -0
  189. package/lib/cjs/src/internal/device-session/model/DeviceSessionEventDispatcher.test.js.map +7 -0
  190. package/lib/cjs/src/internal/device-session/model/DeviceSessionRefresher.js +1 -1
  191. package/lib/cjs/src/internal/device-session/model/DeviceSessionRefresher.js.map +3 -3
  192. package/lib/cjs/src/internal/device-session/model/DeviceSessionRefresher.test.js +1 -1
  193. package/lib/cjs/src/internal/device-session/model/DeviceSessionRefresher.test.js.map +3 -3
  194. package/lib/cjs/src/internal/device-session/model/DeviceSessionStateHandler.js +2 -0
  195. package/lib/cjs/src/internal/device-session/model/DeviceSessionStateHandler.js.map +7 -0
  196. package/lib/cjs/src/internal/device-session/model/DeviceSessionStateHandler.test.js +2 -0
  197. package/lib/cjs/src/internal/device-session/model/DeviceSessionStateHandler.test.js.map +7 -0
  198. package/lib/cjs/src/internal/device-session/model/Frame.js +1 -1
  199. package/lib/cjs/src/internal/device-session/model/Frame.js.map +3 -3
  200. package/lib/cjs/src/internal/device-session/service/DefaultApduReceiverService.test.js +1 -1
  201. package/lib/cjs/src/internal/device-session/service/DefaultApduReceiverService.test.js.map +2 -2
  202. package/lib/cjs/src/internal/device-session/service/DefaultApduSenderService.js +1 -1
  203. package/lib/cjs/src/internal/device-session/service/DefaultApduSenderService.js.map +2 -2
  204. package/lib/cjs/src/internal/device-session/service/DefaultApduSenderService.test.js +1 -1
  205. package/lib/cjs/src/internal/device-session/service/DefaultApduSenderService.test.js.map +2 -2
  206. package/lib/cjs/src/internal/device-session/service/DefaultDeviceSessionService.test.js +1 -1
  207. package/lib/cjs/src/internal/device-session/service/DefaultDeviceSessionService.test.js.map +3 -3
  208. package/lib/cjs/src/internal/device-session/service/MutexService.js +2 -0
  209. package/lib/cjs/src/internal/device-session/service/MutexService.js.map +7 -0
  210. package/lib/cjs/src/internal/device-session/service/MutexService.test.js +2 -0
  211. package/lib/cjs/src/internal/device-session/service/MutexService.test.js.map +7 -0
  212. package/lib/cjs/src/internal/device-session/service/RefresherService.js +2 -0
  213. package/lib/cjs/src/internal/device-session/service/RefresherService.js.map +7 -0
  214. package/lib/cjs/src/internal/device-session/service/RefresherService.test.js +2 -0
  215. package/lib/cjs/src/internal/device-session/service/RefresherService.test.js.map +7 -0
  216. package/lib/cjs/src/internal/device-session/use-case/CloseSessionsUseCase.js +1 -1
  217. package/lib/cjs/src/internal/device-session/use-case/CloseSessionsUseCase.js.map +3 -3
  218. package/lib/cjs/src/internal/device-session/use-case/CloseSessionsUseCase.test.js +1 -1
  219. package/lib/cjs/src/internal/device-session/use-case/CloseSessionsUseCase.test.js.map +3 -3
  220. package/lib/cjs/src/internal/device-session/use-case/GetDeviceSessionStateUseCase.test.js +1 -1
  221. package/lib/cjs/src/internal/device-session/use-case/GetDeviceSessionStateUseCase.test.js.map +3 -3
  222. package/lib/cjs/src/internal/device-session/utils/deviceSessionUtils.js +2 -0
  223. package/lib/cjs/src/internal/device-session/utils/deviceSessionUtils.js.map +7 -0
  224. package/lib/cjs/src/internal/discovery/di/discoveryModule.js +1 -1
  225. package/lib/cjs/src/internal/discovery/di/discoveryModule.js.map +3 -3
  226. package/lib/cjs/src/internal/discovery/di/discoveryModule.test.js +1 -1
  227. package/lib/cjs/src/internal/discovery/di/discoveryModule.test.js.map +3 -3
  228. package/lib/cjs/src/internal/discovery/di/discoveryTypes.js +1 -1
  229. package/lib/cjs/src/internal/discovery/di/discoveryTypes.js.map +2 -2
  230. package/lib/cjs/src/internal/discovery/use-case/ConnectUseCase.js +1 -1
  231. package/lib/cjs/src/internal/discovery/use-case/ConnectUseCase.js.map +3 -3
  232. package/lib/cjs/src/internal/discovery/use-case/ConnectUseCase.test.js +1 -1
  233. package/lib/cjs/src/internal/discovery/use-case/ConnectUseCase.test.js.map +3 -3
  234. package/lib/cjs/src/internal/discovery/use-case/DisconnectUseCase.test.js +1 -1
  235. package/lib/cjs/src/internal/discovery/use-case/DisconnectUseCase.test.js.map +3 -3
  236. package/lib/cjs/src/internal/discovery/use-case/GetConnectedDeviceUseCase.test.js +1 -1
  237. package/lib/cjs/src/internal/discovery/use-case/GetConnectedDeviceUseCase.test.js.map +3 -3
  238. package/lib/cjs/src/internal/discovery/use-case/ListConnectedDevicesUseCase.test.js +1 -1
  239. package/lib/cjs/src/internal/discovery/use-case/ListConnectedDevicesUseCase.test.js.map +3 -3
  240. package/lib/cjs/src/internal/discovery/use-case/ListenToAvailableDevicesUseCase.js +2 -0
  241. package/lib/cjs/src/internal/discovery/use-case/ListenToAvailableDevicesUseCase.js.map +7 -0
  242. package/lib/cjs/src/internal/discovery/use-case/ListenToAvailableDevicesUseCase.test.js +2 -0
  243. package/lib/cjs/src/internal/discovery/use-case/ListenToAvailableDevicesUseCase.test.js.map +7 -0
  244. package/lib/cjs/src/internal/discovery/use-case/ListenToConnectedDeviceUseCase.js +1 -1
  245. package/lib/cjs/src/internal/discovery/use-case/ListenToConnectedDeviceUseCase.js.map +3 -3
  246. package/lib/cjs/src/internal/discovery/use-case/ListenToConnectedDeviceUseCase.test.js +1 -1
  247. package/lib/cjs/src/internal/discovery/use-case/ListenToConnectedDeviceUseCase.test.js.map +3 -3
  248. package/lib/cjs/src/internal/discovery/use-case/StartDiscoveringUseCase.js +1 -1
  249. package/lib/cjs/src/internal/discovery/use-case/StartDiscoveringUseCase.js.map +2 -2
  250. package/lib/cjs/src/internal/discovery/use-case/StartDiscoveringUseCase.test.js +1 -1
  251. package/lib/cjs/src/internal/discovery/use-case/StartDiscoveringUseCase.test.js.map +3 -3
  252. package/lib/cjs/src/internal/discovery/use-case/StopDiscoveringUseCase.js +1 -1
  253. package/lib/cjs/src/internal/discovery/use-case/StopDiscoveringUseCase.js.map +2 -2
  254. package/lib/cjs/src/internal/discovery/use-case/StopDiscoveringUseCase.test.js +1 -1
  255. package/lib/cjs/src/internal/discovery/use-case/StopDiscoveringUseCase.test.js.map +3 -3
  256. package/lib/cjs/src/internal/logger-publisher/service/DefaultLoggerPublisherService.stub.js +1 -1
  257. package/lib/cjs/src/internal/logger-publisher/service/DefaultLoggerPublisherService.stub.js.map +2 -2
  258. package/lib/cjs/src/internal/logger-publisher/service/DefaultLoggerPublisherService.test.js +1 -1
  259. package/lib/cjs/src/internal/logger-publisher/service/DefaultLoggerPublisherService.test.js.map +2 -2
  260. package/lib/cjs/src/internal/manager-api/data/AxiosManagerApiDataSource.js +1 -1
  261. package/lib/cjs/src/internal/manager-api/data/AxiosManagerApiDataSource.js.map +3 -3
  262. package/lib/cjs/src/internal/manager-api/data/AxiosManagerApiDataSource.test.js +1 -1
  263. package/lib/cjs/src/internal/manager-api/data/AxiosManagerApiDataSource.test.js.map +3 -3
  264. package/lib/cjs/src/internal/manager-api/data/ManagerApiDataSource.js +1 -1
  265. package/lib/cjs/src/internal/manager-api/data/ManagerApiDataSource.js.map +1 -1
  266. package/lib/cjs/src/internal/manager-api/data/ManagerApiDto.js +1 -1
  267. package/lib/cjs/src/internal/manager-api/data/ManagerApiDto.js.map +1 -1
  268. package/lib/cjs/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.js +1 -1
  269. package/lib/cjs/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.js.map +2 -2
  270. package/lib/cjs/src/internal/manager-api/di/managerApiModule.js +1 -1
  271. package/lib/cjs/src/internal/manager-api/di/managerApiModule.js.map +3 -3
  272. package/lib/cjs/src/internal/manager-api/di/managerApiModule.test.js +1 -1
  273. package/lib/cjs/src/internal/manager-api/di/managerApiModule.test.js.map +2 -2
  274. package/lib/cjs/src/internal/manager-api/di/managerApiTypes.js +1 -1
  275. package/lib/cjs/src/internal/manager-api/di/managerApiTypes.js.map +2 -2
  276. package/lib/cjs/src/internal/manager-api/model/Application.js +1 -1
  277. package/lib/cjs/src/internal/manager-api/model/Application.js.map +1 -1
  278. package/lib/cjs/src/internal/manager-api/model/Const.js +1 -1
  279. package/lib/cjs/src/internal/manager-api/model/Const.js.map +3 -3
  280. package/lib/cjs/src/internal/manager-api/model/Errors.js +1 -1
  281. package/lib/cjs/src/internal/manager-api/model/Errors.js.map +3 -3
  282. package/lib/cjs/src/internal/manager-api/model/Firmware.js +1 -1
  283. package/lib/cjs/src/internal/manager-api/model/Firmware.js.map +1 -1
  284. package/lib/cjs/src/internal/manager-api/model/Params.js +1 -1
  285. package/lib/cjs/src/internal/manager-api/model/Params.js.map +1 -1
  286. package/lib/cjs/src/internal/manager-api/service/DefaultManagerApiService.js +1 -1
  287. package/lib/cjs/src/internal/manager-api/service/DefaultManagerApiService.js.map +3 -3
  288. package/lib/cjs/src/internal/manager-api/service/DefaultManagerApiService.test.js +1 -1
  289. package/lib/cjs/src/internal/manager-api/service/DefaultManagerApiService.test.js.map +3 -3
  290. package/lib/cjs/src/internal/manager-api/service/ManagerApiService.js +1 -1
  291. package/lib/cjs/src/internal/manager-api/service/ManagerApiService.js.map +1 -1
  292. package/lib/cjs/src/internal/manager-api/use-case/SetProviderUseCase.js +2 -0
  293. package/lib/cjs/src/internal/manager-api/use-case/SetProviderUseCase.js.map +7 -0
  294. package/lib/cjs/src/internal/manager-api/use-case/SetProviderUseCase.test.js +2 -0
  295. package/lib/cjs/src/internal/manager-api/use-case/SetProviderUseCase.test.js.map +7 -0
  296. package/lib/cjs/src/internal/secure-channel/data/DefaultSecureChannelDataSource.js +2 -0
  297. package/lib/cjs/src/internal/secure-channel/data/DefaultSecureChannelDataSource.js.map +7 -0
  298. package/lib/cjs/src/internal/secure-channel/data/DefaultSecureChannelDataSource.test.js +2 -0
  299. package/lib/cjs/src/internal/secure-channel/data/DefaultSecureChannelDataSource.test.js.map +7 -0
  300. package/lib/cjs/src/internal/secure-channel/data/SecureChannelDataSource.js +2 -0
  301. package/lib/cjs/src/internal/secure-channel/data/SecureChannelDataSource.js.map +7 -0
  302. package/lib/cjs/src/internal/secure-channel/data/__mocks__/DefaultSecureChannelDataSource.js +2 -0
  303. package/lib/cjs/src/internal/secure-channel/data/__mocks__/DefaultSecureChannelDataSource.js.map +7 -0
  304. package/lib/cjs/src/internal/secure-channel/di/secureChannelModule.js +2 -0
  305. package/lib/cjs/src/internal/secure-channel/di/secureChannelModule.js.map +7 -0
  306. package/lib/cjs/src/internal/secure-channel/di/secureChannelModule.test.js +2 -0
  307. package/lib/cjs/src/internal/secure-channel/di/secureChannelModule.test.js.map +7 -0
  308. package/lib/cjs/src/internal/secure-channel/di/secureChannelTypes.js +2 -0
  309. package/lib/cjs/src/internal/secure-channel/di/secureChannelTypes.js.map +7 -0
  310. package/lib/cjs/src/internal/secure-channel/model/Const.js +2 -0
  311. package/lib/cjs/src/internal/secure-channel/model/Const.js.map +7 -0
  312. package/lib/cjs/src/internal/secure-channel/model/Errors.js +2 -0
  313. package/lib/cjs/src/internal/secure-channel/model/Errors.js.map +7 -0
  314. package/lib/cjs/src/internal/secure-channel/model/Params.js +2 -0
  315. package/lib/cjs/src/internal/secure-channel/model/Params.js.map +7 -0
  316. package/lib/cjs/src/internal/secure-channel/service/DefaultSecureChannelService.js +2 -0
  317. package/lib/cjs/src/internal/secure-channel/service/DefaultSecureChannelService.js.map +7 -0
  318. package/lib/cjs/src/internal/secure-channel/service/DefaultSecureChannelService.test.js +2 -0
  319. package/lib/cjs/src/internal/secure-channel/service/DefaultSecureChannelService.test.js.map +7 -0
  320. package/lib/cjs/src/internal/secure-channel/service/SecureChannelService.js +2 -0
  321. package/lib/cjs/src/internal/secure-channel/service/SecureChannelService.js.map +7 -0
  322. package/lib/cjs/src/internal/send/use-case/SendApduUseCase.js +1 -1
  323. package/lib/cjs/src/internal/send/use-case/SendApduUseCase.js.map +3 -3
  324. package/lib/cjs/src/internal/send/use-case/SendApduUseCase.test.js +1 -1
  325. package/lib/cjs/src/internal/send/use-case/SendApduUseCase.test.js.map +3 -3
  326. package/lib/cjs/src/internal/transport/di/transportModule.test.js +1 -1
  327. package/lib/cjs/src/internal/transport/di/transportModule.test.js.map +2 -2
  328. package/lib/cjs/src/internal/transport/service/DefaultTransportService.js +1 -1
  329. package/lib/cjs/src/internal/transport/service/DefaultTransportService.js.map +3 -3
  330. package/lib/cjs/src/internal/transport/service/DefaultTransportService.test.js +1 -1
  331. package/lib/cjs/src/internal/transport/service/DefaultTransportService.test.js.map +2 -2
  332. package/lib/cjs/src/internal/transport/service/TransportService.js +1 -1
  333. package/lib/cjs/src/internal/transport/service/TransportService.js.map +1 -1
  334. package/lib/cjs/src/internal/transport/service/__mocks__/DefaultTransportService.js +1 -1
  335. package/lib/cjs/src/internal/transport/service/__mocks__/DefaultTransportService.js.map +2 -2
  336. package/lib/esm/package.json +12 -11
  337. package/lib/esm/src/api/DeviceManagementKit.js +1 -1
  338. package/lib/esm/src/api/DeviceManagementKit.js.map +3 -3
  339. package/lib/esm/src/api/DeviceManagementKit.test.js +1 -1
  340. package/lib/esm/src/api/DeviceManagementKit.test.js.map +3 -3
  341. package/lib/esm/src/api/DeviceManagementKitBuilder.js +1 -1
  342. package/lib/esm/src/api/DeviceManagementKitBuilder.js.map +3 -3
  343. package/lib/esm/src/api/DeviceManagementKitBuilder.test.js +1 -1
  344. package/lib/esm/src/api/DeviceManagementKitBuilder.test.js.map +2 -2
  345. package/lib/esm/src/api/apdu/utils/ByteArrayParser.test.js +1 -1
  346. package/lib/esm/src/api/apdu/utils/ByteArrayParser.test.js.map +2 -2
  347. package/lib/esm/src/api/command/os/GetOsVersionCommand.js +1 -1
  348. package/lib/esm/src/api/command/os/GetOsVersionCommand.js.map +3 -3
  349. package/lib/esm/src/api/command/os/LoadCertificateCommand.js +2 -0
  350. package/lib/esm/src/api/command/os/LoadCertificateCommand.js.map +7 -0
  351. package/lib/esm/src/api/command/os/LoadCertificateCommand.test.js +2 -0
  352. package/lib/esm/src/api/command/os/LoadCertificateCommand.test.js.map +7 -0
  353. package/lib/esm/src/api/command/os/SecureElementFlagsParser.js +2 -0
  354. package/lib/esm/src/api/command/os/SecureElementFlagsParser.js.map +7 -0
  355. package/lib/esm/src/api/command/os/SecureElementFlagsParser.test.js +2 -0
  356. package/lib/esm/src/api/command/os/SecureElementFlagsParser.test.js.map +7 -0
  357. package/lib/esm/src/api/command/os/__mocks__/GetOsVersionCommand.js +1 -1
  358. package/lib/esm/src/api/command/os/__mocks__/GetOsVersionCommand.js.map +2 -2
  359. package/lib/esm/src/api/command/use-case/SendCommandUseCase.js +1 -1
  360. package/lib/esm/src/api/command/use-case/SendCommandUseCase.js.map +3 -3
  361. package/lib/esm/src/api/command/use-case/SendCommandUseCase.test.js +1 -1
  362. package/lib/esm/src/api/command/use-case/SendCommandUseCase.test.js.map +3 -3
  363. package/lib/esm/src/api/command/utils/CommandUtils.js +1 -1
  364. package/lib/esm/src/api/command/utils/CommandUtils.js.map +3 -3
  365. package/lib/esm/src/api/command/utils/CommandUtils.test.js +1 -1
  366. package/lib/esm/src/api/command/utils/CommandUtils.test.js.map +3 -3
  367. package/lib/esm/src/api/device/SecureElementFlags.js +1 -0
  368. package/lib/esm/src/api/device/SecureElementFlags.js.map +7 -0
  369. package/lib/esm/src/api/device-action/__test-utils__/makeInternalApi.js +1 -1
  370. package/lib/esm/src/api/device-action/__test-utils__/makeInternalApi.js.map +3 -3
  371. package/lib/esm/src/api/device-action/__test-utils__/setupTestMachine.js +1 -1
  372. package/lib/esm/src/api/device-action/__test-utils__/setupTestMachine.js.map +3 -3
  373. package/lib/esm/src/api/device-action/__test-utils__/testDeviceActionStates.js +1 -1
  374. package/lib/esm/src/api/device-action/__test-utils__/testDeviceActionStates.js.map +3 -3
  375. package/lib/esm/src/api/device-action/model/UserInteractionRequired.js +1 -1
  376. package/lib/esm/src/api/device-action/model/UserInteractionRequired.js.map +2 -2
  377. package/lib/esm/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.js +2 -0
  378. package/lib/esm/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.js.map +7 -0
  379. package/lib/esm/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.test.js +2 -0
  380. package/lib/esm/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.test.js.map +7 -0
  381. package/lib/esm/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceActionTypes.js +1 -0
  382. package/lib/esm/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceActionTypes.js.map +7 -0
  383. package/lib/esm/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.js +1 -1
  384. package/lib/esm/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.js.map +2 -2
  385. package/lib/esm/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.test.js +1 -1
  386. package/lib/esm/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.test.js.map +3 -3
  387. package/lib/esm/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.test.js +1 -1
  388. package/lib/esm/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.test.js.map +3 -3
  389. package/lib/esm/src/api/device-action/os/ListApps/ListAppsDeviceAction.test.js +1 -1
  390. package/lib/esm/src/api/device-action/os/ListApps/ListAppsDeviceAction.test.js.map +3 -3
  391. package/lib/esm/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.js +1 -1
  392. package/lib/esm/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.js.map +3 -3
  393. package/lib/esm/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.test.js +1 -1
  394. package/lib/esm/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.test.js.map +3 -3
  395. package/lib/esm/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.test.js +1 -1
  396. package/lib/esm/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.test.js.map +3 -3
  397. package/lib/esm/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.test.js +1 -1
  398. package/lib/esm/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.test.js.map +3 -3
  399. package/lib/esm/src/api/device-action/xstate-utils/XStateDeviceAction.js +1 -1
  400. package/lib/esm/src/api/device-action/xstate-utils/XStateDeviceAction.js.map +3 -3
  401. package/lib/esm/src/api/device-model/data/StaticDeviceModelDataSource.js.map +1 -1
  402. package/lib/esm/src/api/device-session/DeviceSessionState.js.map +1 -1
  403. package/lib/esm/src/api/device-session/use-case/DisableDeviceSessionRefresher.js +2 -0
  404. package/lib/esm/src/api/device-session/use-case/DisableDeviceSessionRefresher.js.map +7 -0
  405. package/lib/esm/src/api/device-session/use-case/DisableDeviceSessionRefresher.test.js +2 -0
  406. package/lib/esm/src/api/device-session/use-case/DisableDeviceSessionRefresher.test.js.map +7 -0
  407. package/lib/esm/src/api/index.js +1 -1
  408. package/lib/esm/src/api/index.js.map +3 -3
  409. package/lib/esm/src/api/logger-subscriber/service/ConsoleLogger.test.js +1 -1
  410. package/lib/esm/src/api/logger-subscriber/service/ConsoleLogger.test.js.map +2 -2
  411. package/lib/esm/src/api/logger-subscriber/service/WebLogsExporterLogger.test.js +1 -1
  412. package/lib/esm/src/api/logger-subscriber/service/WebLogsExporterLogger.test.js.map +3 -3
  413. package/lib/esm/src/api/logger-subscriber/service/__mocks__/ConsoleLogger.js +1 -1
  414. package/lib/esm/src/api/logger-subscriber/service/__mocks__/ConsoleLogger.js.map +2 -2
  415. package/lib/esm/src/api/secure-channel/constants.js +2 -0
  416. package/lib/esm/src/api/secure-channel/constants.js.map +7 -0
  417. package/lib/esm/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.js +2 -0
  418. package/lib/esm/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.js.map +7 -0
  419. package/lib/esm/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.test.js +2 -0
  420. package/lib/esm/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.test.js.map +7 -0
  421. package/lib/esm/src/api/secure-channel/device-action/GenuineCheck/types.js +1 -0
  422. package/lib/esm/src/api/secure-channel/device-action/GenuineCheck/types.js.map +7 -0
  423. package/lib/esm/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.js +2 -0
  424. package/lib/esm/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.js.map +7 -0
  425. package/lib/esm/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.test.js +2 -0
  426. package/lib/esm/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.test.js.map +7 -0
  427. package/lib/esm/src/api/secure-channel/device-action/InstallApp/types.js +1 -0
  428. package/lib/esm/src/api/secure-channel/device-action/InstallApp/types.js.map +7 -0
  429. package/lib/esm/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.js +2 -0
  430. package/lib/esm/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.js.map +7 -0
  431. package/lib/esm/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.test.js +2 -0
  432. package/lib/esm/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.test.js.map +7 -0
  433. package/lib/esm/src/api/secure-channel/device-action/ListInstalledApps/types.js +2 -0
  434. package/lib/esm/src/api/secure-channel/device-action/ListInstalledApps/types.js.map +7 -0
  435. package/lib/esm/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.js +2 -0
  436. package/lib/esm/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.js.map +7 -0
  437. package/lib/esm/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.test.js +2 -0
  438. package/lib/esm/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.test.js.map +7 -0
  439. package/lib/esm/src/api/secure-channel/device-action/UninstallApp/types.js +1 -0
  440. package/lib/esm/src/api/secure-channel/device-action/UninstallApp/types.js.map +7 -0
  441. package/lib/esm/src/api/secure-channel/task/ConnectToSecureChannelTask.js +2 -0
  442. package/lib/esm/src/api/secure-channel/task/ConnectToSecureChannelTask.js.map +7 -0
  443. package/lib/esm/src/api/secure-channel/task/ConnectToSecureChannelTask.test.js +2 -0
  444. package/lib/esm/src/api/secure-channel/task/ConnectToSecureChannelTask.test.js.map +7 -0
  445. package/lib/esm/src/api/secure-channel/task/types.js +2 -0
  446. package/lib/esm/src/api/secure-channel/task/types.js.map +7 -0
  447. package/lib/esm/src/api/secure-channel/types.js +1 -0
  448. package/lib/esm/src/api/secure-channel/types.js.map +7 -0
  449. package/lib/esm/src/api/secure-channel/utils.js +2 -0
  450. package/lib/esm/src/api/secure-channel/utils.js.map +7 -0
  451. package/lib/esm/src/api/secure-channel/utils.test.js +2 -0
  452. package/lib/esm/src/api/secure-channel/utils.test.js.map +7 -0
  453. package/lib/esm/src/api/transport/model/DeviceApduSender.js +1 -0
  454. package/lib/esm/src/api/transport/model/DeviceApduSender.js.map +7 -0
  455. package/lib/esm/src/api/transport/model/DeviceConnectionFactory.stub.js +1 -1
  456. package/lib/esm/src/api/transport/model/DeviceConnectionFactory.stub.js.map +2 -2
  457. package/lib/esm/src/api/transport/model/DeviceConnectionStateMachine.js +2 -0
  458. package/lib/esm/src/api/transport/model/DeviceConnectionStateMachine.js.map +7 -0
  459. package/lib/esm/src/api/transport/model/Errors.js +1 -1
  460. package/lib/esm/src/api/transport/model/Errors.js.map +3 -3
  461. package/lib/esm/src/api/transport/model/TransportConnectedDevice.stub.js +1 -1
  462. package/lib/esm/src/api/transport/model/TransportConnectedDevice.stub.js.map +2 -2
  463. package/lib/esm/src/api/transport/model/TransportConnectedDevice.test.js +1 -1
  464. package/lib/esm/src/api/transport/model/TransportConnectedDevice.test.js.map +3 -3
  465. package/lib/esm/src/api/transport/model/__mocks__/TransportMock.js +1 -1
  466. package/lib/esm/src/api/transport/model/__mocks__/TransportMock.js.map +2 -2
  467. package/lib/esm/src/api/utils/Base64String.test.js +1 -1
  468. package/lib/esm/src/api/utils/Base64String.test.js.map +2 -2
  469. package/lib/esm/src/api/utils/HexaString.js +1 -1
  470. package/lib/esm/src/api/utils/HexaString.js.map +2 -2
  471. package/lib/esm/src/api/utils/HexaString.test.js +1 -1
  472. package/lib/esm/src/api/utils/HexaString.test.js.map +2 -2
  473. package/lib/esm/src/di.js +1 -1
  474. package/lib/esm/src/di.js.map +3 -3
  475. package/lib/esm/src/di.stub.js +1 -1
  476. package/lib/esm/src/di.stub.js.map +2 -2
  477. package/lib/esm/src/internal/config/data/LocalConfigDataSource.test.js +1 -1
  478. package/lib/esm/src/internal/config/data/LocalConfigDataSource.test.js.map +3 -3
  479. package/lib/esm/src/internal/config/data/RemoteConfigDataSource.test.js +1 -1
  480. package/lib/esm/src/internal/config/data/RemoteConfigDataSource.test.js.map +2 -2
  481. package/lib/esm/src/internal/config/data/__mocks__/LocalConfigDataSource.js +1 -1
  482. package/lib/esm/src/internal/config/data/__mocks__/LocalConfigDataSource.js.map +2 -2
  483. package/lib/esm/src/internal/config/data/__mocks__/RemoteConfigDataSource.js +1 -1
  484. package/lib/esm/src/internal/config/data/__mocks__/RemoteConfigDataSource.js.map +2 -2
  485. package/lib/esm/src/internal/config/service/DefaultConfigService.test.js +1 -1
  486. package/lib/esm/src/internal/config/service/DefaultConfigService.test.js.map +2 -2
  487. package/lib/esm/src/internal/config/use-case/GetDmkVersionUseCase.test.js +1 -1
  488. package/lib/esm/src/internal/config/use-case/GetDmkVersionUseCase.test.js.map +2 -2
  489. package/lib/esm/src/internal/device-session/data/ApduResponseConst.js +1 -1
  490. package/lib/esm/src/internal/device-session/data/ApduResponseConst.js.map +3 -3
  491. package/lib/esm/src/internal/device-session/data/DeviceSessionRefresherConst.js +1 -1
  492. package/lib/esm/src/internal/device-session/data/DeviceSessionRefresherConst.js.map +3 -3
  493. package/lib/esm/src/internal/device-session/di/deviceSessionModule.js +1 -1
  494. package/lib/esm/src/internal/device-session/di/deviceSessionModule.js.map +3 -3
  495. package/lib/esm/src/internal/device-session/di/deviceSessionTypes.js +1 -1
  496. package/lib/esm/src/internal/device-session/di/deviceSessionTypes.js.map +2 -2
  497. package/lib/esm/src/internal/device-session/model/DevicePinger.js +2 -0
  498. package/lib/esm/src/internal/device-session/model/DevicePinger.js.map +7 -0
  499. package/lib/esm/src/internal/device-session/model/DevicePinger.test.js +2 -0
  500. package/lib/esm/src/internal/device-session/model/DevicePinger.test.js.map +7 -0
  501. package/lib/esm/src/internal/device-session/model/DeviceSession.js +1 -1
  502. package/lib/esm/src/internal/device-session/model/DeviceSession.js.map +3 -3
  503. package/lib/esm/src/internal/device-session/model/DeviceSession.stub.js +1 -1
  504. package/lib/esm/src/internal/device-session/model/DeviceSession.stub.js.map +3 -3
  505. package/lib/esm/src/internal/device-session/model/DeviceSessionEventDispatcher.js +2 -0
  506. package/lib/esm/src/internal/device-session/model/DeviceSessionEventDispatcher.js.map +7 -0
  507. package/lib/esm/src/internal/device-session/model/DeviceSessionEventDispatcher.test.js +2 -0
  508. package/lib/esm/src/internal/device-session/model/DeviceSessionEventDispatcher.test.js.map +7 -0
  509. package/lib/esm/src/internal/device-session/model/DeviceSessionRefresher.js +1 -1
  510. package/lib/esm/src/internal/device-session/model/DeviceSessionRefresher.js.map +3 -3
  511. package/lib/esm/src/internal/device-session/model/DeviceSessionRefresher.test.js +1 -1
  512. package/lib/esm/src/internal/device-session/model/DeviceSessionRefresher.test.js.map +3 -3
  513. package/lib/esm/src/internal/device-session/model/DeviceSessionStateHandler.js +2 -0
  514. package/lib/esm/src/internal/device-session/model/DeviceSessionStateHandler.js.map +7 -0
  515. package/lib/esm/src/internal/device-session/model/DeviceSessionStateHandler.test.js +2 -0
  516. package/lib/esm/src/internal/device-session/model/DeviceSessionStateHandler.test.js.map +7 -0
  517. package/lib/esm/src/internal/device-session/model/Frame.js +1 -1
  518. package/lib/esm/src/internal/device-session/model/Frame.js.map +3 -3
  519. package/lib/esm/src/internal/device-session/service/DefaultApduReceiverService.test.js +1 -1
  520. package/lib/esm/src/internal/device-session/service/DefaultApduReceiverService.test.js.map +2 -2
  521. package/lib/esm/src/internal/device-session/service/DefaultApduSenderService.js +1 -1
  522. package/lib/esm/src/internal/device-session/service/DefaultApduSenderService.js.map +2 -2
  523. package/lib/esm/src/internal/device-session/service/DefaultApduSenderService.test.js +1 -1
  524. package/lib/esm/src/internal/device-session/service/DefaultApduSenderService.test.js.map +2 -2
  525. package/lib/esm/src/internal/device-session/service/DefaultDeviceSessionService.test.js +1 -1
  526. package/lib/esm/src/internal/device-session/service/DefaultDeviceSessionService.test.js.map +3 -3
  527. package/lib/esm/src/internal/device-session/service/MutexService.js +2 -0
  528. package/lib/esm/src/internal/device-session/service/MutexService.js.map +7 -0
  529. package/lib/esm/src/internal/device-session/service/MutexService.test.js +2 -0
  530. package/lib/esm/src/internal/device-session/service/MutexService.test.js.map +7 -0
  531. package/lib/esm/src/internal/device-session/service/RefresherService.js +2 -0
  532. package/lib/esm/src/internal/device-session/service/RefresherService.js.map +7 -0
  533. package/lib/esm/src/internal/device-session/service/RefresherService.test.js +2 -0
  534. package/lib/esm/src/internal/device-session/service/RefresherService.test.js.map +7 -0
  535. package/lib/esm/src/internal/device-session/use-case/CloseSessionsUseCase.js +1 -1
  536. package/lib/esm/src/internal/device-session/use-case/CloseSessionsUseCase.js.map +3 -3
  537. package/lib/esm/src/internal/device-session/use-case/CloseSessionsUseCase.test.js +1 -1
  538. package/lib/esm/src/internal/device-session/use-case/CloseSessionsUseCase.test.js.map +3 -3
  539. package/lib/esm/src/internal/device-session/use-case/GetDeviceSessionStateUseCase.test.js +1 -1
  540. package/lib/esm/src/internal/device-session/use-case/GetDeviceSessionStateUseCase.test.js.map +3 -3
  541. package/lib/esm/src/internal/device-session/utils/deviceSessionUtils.js +2 -0
  542. package/lib/esm/src/internal/device-session/utils/deviceSessionUtils.js.map +7 -0
  543. package/lib/esm/src/internal/discovery/di/discoveryModule.js +1 -1
  544. package/lib/esm/src/internal/discovery/di/discoveryModule.js.map +3 -3
  545. package/lib/esm/src/internal/discovery/di/discoveryModule.test.js +1 -1
  546. package/lib/esm/src/internal/discovery/di/discoveryModule.test.js.map +3 -3
  547. package/lib/esm/src/internal/discovery/di/discoveryTypes.js +1 -1
  548. package/lib/esm/src/internal/discovery/di/discoveryTypes.js.map +2 -2
  549. package/lib/esm/src/internal/discovery/use-case/ConnectUseCase.js +1 -1
  550. package/lib/esm/src/internal/discovery/use-case/ConnectUseCase.js.map +3 -3
  551. package/lib/esm/src/internal/discovery/use-case/ConnectUseCase.test.js +1 -1
  552. package/lib/esm/src/internal/discovery/use-case/ConnectUseCase.test.js.map +3 -3
  553. package/lib/esm/src/internal/discovery/use-case/DisconnectUseCase.test.js +1 -1
  554. package/lib/esm/src/internal/discovery/use-case/DisconnectUseCase.test.js.map +3 -3
  555. package/lib/esm/src/internal/discovery/use-case/GetConnectedDeviceUseCase.test.js +1 -1
  556. package/lib/esm/src/internal/discovery/use-case/GetConnectedDeviceUseCase.test.js.map +3 -3
  557. package/lib/esm/src/internal/discovery/use-case/ListConnectedDevicesUseCase.test.js +1 -1
  558. package/lib/esm/src/internal/discovery/use-case/ListConnectedDevicesUseCase.test.js.map +3 -3
  559. package/lib/esm/src/internal/discovery/use-case/ListenToAvailableDevicesUseCase.js +2 -0
  560. package/lib/esm/src/internal/discovery/use-case/ListenToAvailableDevicesUseCase.js.map +7 -0
  561. package/lib/esm/src/internal/discovery/use-case/ListenToAvailableDevicesUseCase.test.js +2 -0
  562. package/lib/esm/src/internal/discovery/use-case/ListenToAvailableDevicesUseCase.test.js.map +7 -0
  563. package/lib/esm/src/internal/discovery/use-case/ListenToConnectedDeviceUseCase.js +1 -1
  564. package/lib/esm/src/internal/discovery/use-case/ListenToConnectedDeviceUseCase.js.map +3 -3
  565. package/lib/esm/src/internal/discovery/use-case/ListenToConnectedDeviceUseCase.test.js +1 -1
  566. package/lib/esm/src/internal/discovery/use-case/ListenToConnectedDeviceUseCase.test.js.map +3 -3
  567. package/lib/esm/src/internal/discovery/use-case/StartDiscoveringUseCase.js +1 -1
  568. package/lib/esm/src/internal/discovery/use-case/StartDiscoveringUseCase.js.map +2 -2
  569. package/lib/esm/src/internal/discovery/use-case/StartDiscoveringUseCase.test.js +1 -1
  570. package/lib/esm/src/internal/discovery/use-case/StartDiscoveringUseCase.test.js.map +3 -3
  571. package/lib/esm/src/internal/discovery/use-case/StopDiscoveringUseCase.js +1 -1
  572. package/lib/esm/src/internal/discovery/use-case/StopDiscoveringUseCase.js.map +2 -2
  573. package/lib/esm/src/internal/discovery/use-case/StopDiscoveringUseCase.test.js +1 -1
  574. package/lib/esm/src/internal/discovery/use-case/StopDiscoveringUseCase.test.js.map +3 -3
  575. package/lib/esm/src/internal/logger-publisher/service/DefaultLoggerPublisherService.stub.js +1 -1
  576. package/lib/esm/src/internal/logger-publisher/service/DefaultLoggerPublisherService.stub.js.map +2 -2
  577. package/lib/esm/src/internal/logger-publisher/service/DefaultLoggerPublisherService.test.js +1 -1
  578. package/lib/esm/src/internal/logger-publisher/service/DefaultLoggerPublisherService.test.js.map +2 -2
  579. package/lib/esm/src/internal/manager-api/data/AxiosManagerApiDataSource.js +1 -1
  580. package/lib/esm/src/internal/manager-api/data/AxiosManagerApiDataSource.js.map +3 -3
  581. package/lib/esm/src/internal/manager-api/data/AxiosManagerApiDataSource.test.js +1 -1
  582. package/lib/esm/src/internal/manager-api/data/AxiosManagerApiDataSource.test.js.map +3 -3
  583. package/lib/esm/src/internal/manager-api/data/ManagerApiDto.js.map +1 -1
  584. package/lib/esm/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.js +1 -1
  585. package/lib/esm/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.js.map +2 -2
  586. package/lib/esm/src/internal/manager-api/di/managerApiModule.js +1 -1
  587. package/lib/esm/src/internal/manager-api/di/managerApiModule.js.map +3 -3
  588. package/lib/esm/src/internal/manager-api/di/managerApiModule.test.js +1 -1
  589. package/lib/esm/src/internal/manager-api/di/managerApiModule.test.js.map +2 -2
  590. package/lib/esm/src/internal/manager-api/di/managerApiTypes.js +1 -1
  591. package/lib/esm/src/internal/manager-api/di/managerApiTypes.js.map +2 -2
  592. package/lib/esm/src/internal/manager-api/model/Application.js.map +1 -1
  593. package/lib/esm/src/internal/manager-api/model/Const.js +1 -1
  594. package/lib/esm/src/internal/manager-api/model/Const.js.map +3 -3
  595. package/lib/esm/src/internal/manager-api/model/Errors.js +1 -1
  596. package/lib/esm/src/internal/manager-api/model/Errors.js.map +3 -3
  597. package/lib/esm/src/internal/manager-api/service/DefaultManagerApiService.js +1 -1
  598. package/lib/esm/src/internal/manager-api/service/DefaultManagerApiService.js.map +3 -3
  599. package/lib/esm/src/internal/manager-api/service/DefaultManagerApiService.test.js +1 -1
  600. package/lib/esm/src/internal/manager-api/service/DefaultManagerApiService.test.js.map +3 -3
  601. package/lib/esm/src/internal/manager-api/use-case/SetProviderUseCase.js +2 -0
  602. package/lib/esm/src/internal/manager-api/use-case/SetProviderUseCase.js.map +7 -0
  603. package/lib/esm/src/internal/manager-api/use-case/SetProviderUseCase.test.js +2 -0
  604. package/lib/esm/src/internal/manager-api/use-case/SetProviderUseCase.test.js.map +7 -0
  605. package/lib/esm/src/internal/secure-channel/data/DefaultSecureChannelDataSource.js +2 -0
  606. package/lib/esm/src/internal/secure-channel/data/DefaultSecureChannelDataSource.js.map +7 -0
  607. package/lib/esm/src/internal/secure-channel/data/DefaultSecureChannelDataSource.test.js +2 -0
  608. package/lib/esm/src/internal/secure-channel/data/DefaultSecureChannelDataSource.test.js.map +7 -0
  609. package/lib/esm/src/internal/secure-channel/data/SecureChannelDataSource.js +1 -0
  610. package/lib/esm/src/internal/secure-channel/data/SecureChannelDataSource.js.map +7 -0
  611. package/lib/esm/src/internal/secure-channel/data/__mocks__/DefaultSecureChannelDataSource.js +2 -0
  612. package/lib/esm/src/internal/secure-channel/data/__mocks__/DefaultSecureChannelDataSource.js.map +7 -0
  613. package/lib/esm/src/internal/secure-channel/di/secureChannelModule.js +2 -0
  614. package/lib/esm/src/internal/secure-channel/di/secureChannelModule.js.map +7 -0
  615. package/lib/esm/src/internal/secure-channel/di/secureChannelModule.test.js +2 -0
  616. package/lib/esm/src/internal/secure-channel/di/secureChannelModule.test.js.map +7 -0
  617. package/lib/esm/src/internal/secure-channel/di/secureChannelTypes.js +2 -0
  618. package/lib/esm/src/internal/secure-channel/di/secureChannelTypes.js.map +7 -0
  619. package/lib/esm/src/internal/secure-channel/model/Const.js +2 -0
  620. package/lib/esm/src/internal/secure-channel/model/Const.js.map +7 -0
  621. package/lib/esm/src/internal/secure-channel/model/Errors.js +2 -0
  622. package/lib/esm/src/internal/secure-channel/model/Errors.js.map +7 -0
  623. package/lib/esm/src/internal/secure-channel/model/Params.js +1 -0
  624. package/lib/esm/src/internal/secure-channel/model/Params.js.map +7 -0
  625. package/lib/esm/src/internal/secure-channel/service/DefaultSecureChannelService.js +2 -0
  626. package/lib/esm/src/internal/secure-channel/service/DefaultSecureChannelService.js.map +7 -0
  627. package/lib/esm/src/internal/secure-channel/service/DefaultSecureChannelService.test.js +2 -0
  628. package/lib/esm/src/internal/secure-channel/service/DefaultSecureChannelService.test.js.map +7 -0
  629. package/lib/esm/src/internal/secure-channel/service/SecureChannelService.js +1 -0
  630. package/lib/esm/src/internal/secure-channel/service/SecureChannelService.js.map +7 -0
  631. package/lib/esm/src/internal/send/use-case/SendApduUseCase.js +1 -1
  632. package/lib/esm/src/internal/send/use-case/SendApduUseCase.js.map +3 -3
  633. package/lib/esm/src/internal/send/use-case/SendApduUseCase.test.js +1 -1
  634. package/lib/esm/src/internal/send/use-case/SendApduUseCase.test.js.map +3 -3
  635. package/lib/esm/src/internal/transport/di/transportModule.test.js +1 -1
  636. package/lib/esm/src/internal/transport/di/transportModule.test.js.map +2 -2
  637. package/lib/esm/src/internal/transport/service/DefaultTransportService.js +1 -1
  638. package/lib/esm/src/internal/transport/service/DefaultTransportService.js.map +3 -3
  639. package/lib/esm/src/internal/transport/service/DefaultTransportService.test.js +1 -1
  640. package/lib/esm/src/internal/transport/service/DefaultTransportService.test.js.map +2 -2
  641. package/lib/esm/src/internal/transport/service/__mocks__/DefaultTransportService.js +1 -1
  642. package/lib/esm/src/internal/transport/service/__mocks__/DefaultTransportService.js.map +2 -2
  643. package/lib/types/src/api/DeviceManagementKit.d.ts +26 -10
  644. package/lib/types/src/api/DeviceManagementKit.d.ts.map +1 -1
  645. package/lib/types/src/api/DeviceManagementKitBuilder.d.ts.map +1 -1
  646. package/lib/types/src/api/DmkConfig.d.ts +1 -0
  647. package/lib/types/src/api/DmkConfig.d.ts.map +1 -1
  648. package/lib/types/src/api/command/os/GetOsVersionCommand.d.ts +8 -2
  649. package/lib/types/src/api/command/os/GetOsVersionCommand.d.ts.map +1 -1
  650. package/lib/types/src/api/command/os/LoadCertificateCommand.d.ts +25 -0
  651. package/lib/types/src/api/command/os/LoadCertificateCommand.d.ts.map +1 -0
  652. package/lib/types/src/api/command/os/LoadCertificateCommand.test.d.ts +2 -0
  653. package/lib/types/src/api/command/os/LoadCertificateCommand.test.d.ts.map +1 -0
  654. package/lib/types/src/api/command/os/SecureElementFlagsParser.d.ts +43 -0
  655. package/lib/types/src/api/command/os/SecureElementFlagsParser.d.ts.map +1 -0
  656. package/lib/types/src/api/command/os/SecureElementFlagsParser.test.d.ts +2 -0
  657. package/lib/types/src/api/command/os/SecureElementFlagsParser.test.d.ts.map +1 -0
  658. package/lib/types/src/api/command/os/__mocks__/GetOsVersionCommand.d.ts.map +1 -1
  659. package/lib/types/src/api/command/use-case/SendCommandUseCase.d.ts +5 -1
  660. package/lib/types/src/api/command/use-case/SendCommandUseCase.d.ts.map +1 -1
  661. package/lib/types/src/api/command/utils/CommandUtils.d.ts +1 -0
  662. package/lib/types/src/api/command/utils/CommandUtils.d.ts.map +1 -1
  663. package/lib/types/src/api/device/SecureElementFlags.d.ts +41 -0
  664. package/lib/types/src/api/device/SecureElementFlags.d.ts.map +1 -0
  665. package/lib/types/src/api/device-action/DeviceAction.d.ts +7 -1
  666. package/lib/types/src/api/device-action/DeviceAction.d.ts.map +1 -1
  667. package/lib/types/src/api/device-action/__test-utils__/makeInternalApi.d.ts +2 -1
  668. package/lib/types/src/api/device-action/__test-utils__/makeInternalApi.d.ts.map +1 -1
  669. package/lib/types/src/api/device-action/__test-utils__/setupTestMachine.d.ts +4 -0
  670. package/lib/types/src/api/device-action/__test-utils__/setupTestMachine.d.ts.map +1 -1
  671. package/lib/types/src/api/device-action/__test-utils__/testDeviceActionStates.d.ts +5 -2
  672. package/lib/types/src/api/device-action/__test-utils__/testDeviceActionStates.d.ts.map +1 -1
  673. package/lib/types/src/api/device-action/model/UserInteractionRequired.d.ts +3 -2
  674. package/lib/types/src/api/device-action/model/UserInteractionRequired.d.ts.map +1 -1
  675. package/lib/types/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.d.ts +40 -0
  676. package/lib/types/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.d.ts.map +1 -0
  677. package/lib/types/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.test.d.ts +2 -0
  678. package/lib/types/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.test.d.ts.map +1 -0
  679. package/lib/types/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceActionTypes.d.ts +19 -0
  680. package/lib/types/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceActionTypes.d.ts.map +1 -0
  681. package/lib/types/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.d.ts.map +1 -1
  682. package/lib/types/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.d.ts +1 -1
  683. package/lib/types/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.d.ts.map +1 -1
  684. package/lib/types/src/api/device-session/DeviceSessionState.d.ts +4 -0
  685. package/lib/types/src/api/device-session/DeviceSessionState.d.ts.map +1 -1
  686. package/lib/types/src/api/device-session/use-case/{ToggleDeviceSessionRefresher.d.ts → DisableDeviceSessionRefresher.d.ts} +6 -6
  687. package/lib/types/src/api/device-session/use-case/DisableDeviceSessionRefresher.d.ts.map +1 -0
  688. package/lib/types/src/api/device-session/use-case/DisableDeviceSessionRefresher.test.d.ts +2 -0
  689. package/lib/types/src/api/device-session/use-case/DisableDeviceSessionRefresher.test.d.ts.map +1 -0
  690. package/lib/types/src/api/index.d.ts +7 -0
  691. package/lib/types/src/api/index.d.ts.map +1 -1
  692. package/lib/types/src/api/logger-subscriber/service/__mocks__/ConsoleLogger.d.ts +1 -1
  693. package/lib/types/src/api/logger-subscriber/service/__mocks__/ConsoleLogger.d.ts.map +1 -1
  694. package/lib/types/src/api/secure-channel/constants.d.ts +2 -0
  695. package/lib/types/src/api/secure-channel/constants.d.ts.map +1 -0
  696. package/lib/types/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.d.ts +8 -0
  697. package/lib/types/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.d.ts.map +1 -0
  698. package/lib/types/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.test.d.ts +2 -0
  699. package/lib/types/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.test.d.ts.map +1 -0
  700. package/lib/types/src/api/secure-channel/device-action/GenuineCheck/types.d.ts +48 -0
  701. package/lib/types/src/api/secure-channel/device-action/GenuineCheck/types.d.ts.map +1 -0
  702. package/lib/types/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.d.ts +8 -0
  703. package/lib/types/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.d.ts.map +1 -0
  704. package/lib/types/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.test.d.ts +2 -0
  705. package/lib/types/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.test.d.ts.map +1 -0
  706. package/lib/types/src/api/secure-channel/device-action/InstallApp/types.d.ts +44 -0
  707. package/lib/types/src/api/secure-channel/device-action/InstallApp/types.d.ts.map +1 -0
  708. package/lib/types/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.d.ts +8 -0
  709. package/lib/types/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.d.ts.map +1 -0
  710. package/lib/types/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.test.d.ts +2 -0
  711. package/lib/types/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.test.d.ts.map +1 -0
  712. package/lib/types/src/api/secure-channel/device-action/ListInstalledApps/types.d.ts +57 -0
  713. package/lib/types/src/api/secure-channel/device-action/ListInstalledApps/types.d.ts.map +1 -0
  714. package/lib/types/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.d.ts +8 -0
  715. package/lib/types/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.d.ts.map +1 -0
  716. package/lib/types/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.test.d.ts +2 -0
  717. package/lib/types/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.test.d.ts.map +1 -0
  718. package/lib/types/src/api/secure-channel/device-action/UninstallApp/types.d.ts +41 -0
  719. package/lib/types/src/api/secure-channel/device-action/UninstallApp/types.d.ts.map +1 -0
  720. package/lib/types/src/api/secure-channel/task/ConnectToSecureChannelTask.d.ts +23 -0
  721. package/lib/types/src/api/secure-channel/task/ConnectToSecureChannelTask.d.ts.map +1 -0
  722. package/lib/types/src/api/secure-channel/task/ConnectToSecureChannelTask.test.d.ts +2 -0
  723. package/lib/types/src/api/secure-channel/task/ConnectToSecureChannelTask.test.d.ts.map +1 -0
  724. package/lib/types/src/api/secure-channel/task/types.d.ts +105 -0
  725. package/lib/types/src/api/secure-channel/task/types.d.ts.map +1 -0
  726. package/lib/types/src/api/secure-channel/types.d.ts +4 -0
  727. package/lib/types/src/api/secure-channel/types.d.ts.map +1 -0
  728. package/lib/types/src/api/secure-channel/utils.d.ts +30 -0
  729. package/lib/types/src/api/secure-channel/utils.d.ts.map +1 -0
  730. package/lib/types/src/api/secure-channel/utils.test.d.ts +2 -0
  731. package/lib/types/src/api/secure-channel/utils.test.d.ts.map +1 -0
  732. package/lib/types/src/api/transport/model/DeviceApduSender.d.ts +17 -0
  733. package/lib/types/src/api/transport/model/DeviceApduSender.d.ts.map +1 -0
  734. package/lib/types/src/api/transport/model/DeviceConnection.d.ts +2 -1
  735. package/lib/types/src/api/transport/model/DeviceConnection.d.ts.map +1 -1
  736. package/lib/types/src/api/transport/model/DeviceConnectionFactory.stub.d.ts +1 -1
  737. package/lib/types/src/api/transport/model/DeviceConnectionFactory.stub.d.ts.map +1 -1
  738. package/lib/types/src/api/transport/model/DeviceConnectionStateMachine.d.ts +62 -0
  739. package/lib/types/src/api/transport/model/DeviceConnectionStateMachine.d.ts.map +1 -0
  740. package/lib/types/src/api/transport/model/DiscoveredDevice.d.ts +2 -0
  741. package/lib/types/src/api/transport/model/DiscoveredDevice.d.ts.map +1 -1
  742. package/lib/types/src/api/transport/model/Errors.d.ts +20 -0
  743. package/lib/types/src/api/transport/model/Errors.d.ts.map +1 -1
  744. package/lib/types/src/api/transport/model/Transport.d.ts +2 -2
  745. package/lib/types/src/api/transport/model/Transport.d.ts.map +1 -1
  746. package/lib/types/src/api/transport/model/TransportDiscoveredDevice.d.ts +2 -0
  747. package/lib/types/src/api/transport/model/TransportDiscoveredDevice.d.ts.map +1 -1
  748. package/lib/types/src/api/transport/model/__mocks__/TransportMock.d.ts +7 -7
  749. package/lib/types/src/api/transport/model/__mocks__/TransportMock.d.ts.map +1 -1
  750. package/lib/types/src/api/types.d.ts +6 -1
  751. package/lib/types/src/api/types.d.ts.map +1 -1
  752. package/lib/types/src/api/utils/HexaString.d.ts +1 -1
  753. package/lib/types/src/api/utils/HexaString.d.ts.map +1 -1
  754. package/lib/types/src/di.d.ts.map +1 -1
  755. package/lib/types/src/di.stub.d.ts +1 -1
  756. package/lib/types/src/di.stub.d.ts.map +1 -1
  757. package/lib/types/src/internal/config/data/__mocks__/LocalConfigDataSource.d.ts +1 -1
  758. package/lib/types/src/internal/config/data/__mocks__/LocalConfigDataSource.d.ts.map +1 -1
  759. package/lib/types/src/internal/config/data/__mocks__/RemoteConfigDataSource.d.ts +3 -3
  760. package/lib/types/src/internal/config/data/__mocks__/RemoteConfigDataSource.d.ts.map +1 -1
  761. package/lib/types/src/internal/device-session/data/ApduResponseConst.d.ts +1 -0
  762. package/lib/types/src/internal/device-session/data/ApduResponseConst.d.ts.map +1 -1
  763. package/lib/types/src/internal/device-session/data/DeviceSessionRefresherConst.d.ts +6 -1
  764. package/lib/types/src/internal/device-session/data/DeviceSessionRefresherConst.d.ts.map +1 -1
  765. package/lib/types/src/internal/device-session/di/deviceSessionTypes.d.ts +1 -1
  766. package/lib/types/src/internal/device-session/model/DevicePinger.d.ts +18 -0
  767. package/lib/types/src/internal/device-session/model/DevicePinger.d.ts.map +1 -0
  768. package/lib/types/src/internal/device-session/model/DevicePinger.test.d.ts +2 -0
  769. package/lib/types/src/internal/device-session/model/DevicePinger.test.d.ts.map +1 -0
  770. package/lib/types/src/internal/device-session/model/DeviceSession.d.ts +29 -12
  771. package/lib/types/src/internal/device-session/model/DeviceSession.d.ts.map +1 -1
  772. package/lib/types/src/internal/device-session/model/DeviceSession.stub.d.ts +3 -2
  773. package/lib/types/src/internal/device-session/model/DeviceSession.stub.d.ts.map +1 -1
  774. package/lib/types/src/internal/device-session/model/DeviceSessionEventDispatcher.d.ts +35 -0
  775. package/lib/types/src/internal/device-session/model/DeviceSessionEventDispatcher.d.ts.map +1 -0
  776. package/lib/types/src/internal/device-session/model/DeviceSessionEventDispatcher.test.d.ts +2 -0
  777. package/lib/types/src/internal/device-session/model/DeviceSessionEventDispatcher.test.d.ts.map +1 -0
  778. package/lib/types/src/internal/device-session/model/DeviceSessionRefresher.d.ts +17 -79
  779. package/lib/types/src/internal/device-session/model/DeviceSessionRefresher.d.ts.map +1 -1
  780. package/lib/types/src/internal/device-session/model/DeviceSessionStateHandler.d.ts +20 -0
  781. package/lib/types/src/internal/device-session/model/DeviceSessionStateHandler.d.ts.map +1 -0
  782. package/lib/types/src/internal/device-session/model/DeviceSessionStateHandler.test.d.ts +2 -0
  783. package/lib/types/src/internal/device-session/model/DeviceSessionStateHandler.test.d.ts.map +1 -0
  784. package/lib/types/src/internal/device-session/model/Frame.d.ts.map +1 -1
  785. package/lib/types/src/internal/device-session/service/MutexService.d.ts +6 -0
  786. package/lib/types/src/internal/device-session/service/MutexService.d.ts.map +1 -0
  787. package/lib/types/src/internal/device-session/service/MutexService.test.d.ts +2 -0
  788. package/lib/types/src/internal/device-session/service/MutexService.test.d.ts.map +1 -0
  789. package/lib/types/src/internal/device-session/service/RefresherService.d.ts +15 -0
  790. package/lib/types/src/internal/device-session/service/RefresherService.d.ts.map +1 -0
  791. package/lib/types/src/internal/device-session/service/RefresherService.test.d.ts +2 -0
  792. package/lib/types/src/internal/device-session/service/RefresherService.test.d.ts.map +1 -0
  793. package/lib/types/src/internal/device-session/use-case/CloseSessionsUseCase.d.ts +3 -1
  794. package/lib/types/src/internal/device-session/use-case/CloseSessionsUseCase.d.ts.map +1 -1
  795. package/lib/types/src/internal/device-session/utils/deviceSessionUtils.d.ts +3 -0
  796. package/lib/types/src/internal/device-session/utils/deviceSessionUtils.d.ts.map +1 -0
  797. package/lib/types/src/internal/discovery/di/discoveryTypes.d.ts +1 -1
  798. package/lib/types/src/internal/discovery/di/discoveryTypes.d.ts.map +1 -1
  799. package/lib/types/src/internal/discovery/use-case/ConnectUseCase.d.ts +11 -2
  800. package/lib/types/src/internal/discovery/use-case/ConnectUseCase.d.ts.map +1 -1
  801. package/lib/types/src/internal/discovery/use-case/ListenToAvailableDevicesUseCase.d.ts +24 -0
  802. package/lib/types/src/internal/discovery/use-case/ListenToAvailableDevicesUseCase.d.ts.map +1 -0
  803. package/lib/types/src/internal/discovery/use-case/ListenToAvailableDevicesUseCase.test.d.ts +2 -0
  804. package/lib/types/src/internal/discovery/use-case/ListenToAvailableDevicesUseCase.test.d.ts.map +1 -0
  805. package/lib/types/src/internal/discovery/use-case/ListenToConnectedDeviceUseCase.d.ts +1 -1
  806. package/lib/types/src/internal/discovery/use-case/ListenToConnectedDeviceUseCase.d.ts.map +1 -1
  807. package/lib/types/src/internal/discovery/use-case/StartDiscoveringUseCase.d.ts +1 -1
  808. package/lib/types/src/internal/discovery/use-case/StartDiscoveringUseCase.d.ts.map +1 -1
  809. package/lib/types/src/internal/discovery/use-case/StopDiscoveringUseCase.d.ts +1 -1
  810. package/lib/types/src/internal/discovery/use-case/StopDiscoveringUseCase.d.ts.map +1 -1
  811. package/lib/types/src/internal/logger-publisher/service/DefaultLoggerPublisherService.stub.d.ts +5 -5
  812. package/lib/types/src/internal/logger-publisher/service/DefaultLoggerPublisherService.stub.d.ts.map +1 -1
  813. package/lib/types/src/internal/manager-api/data/AxiosManagerApiDataSource.d.ts +12 -17
  814. package/lib/types/src/internal/manager-api/data/AxiosManagerApiDataSource.d.ts.map +1 -1
  815. package/lib/types/src/internal/manager-api/data/ManagerApiDataSource.d.ts +21 -50
  816. package/lib/types/src/internal/manager-api/data/ManagerApiDataSource.d.ts.map +1 -1
  817. package/lib/types/src/internal/manager-api/data/ManagerApiDto.d.ts +4 -1
  818. package/lib/types/src/internal/manager-api/data/ManagerApiDto.d.ts.map +1 -1
  819. package/lib/types/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.d.ts +6 -9
  820. package/lib/types/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.d.ts.map +1 -1
  821. package/lib/types/src/internal/manager-api/di/managerApiModule.d.ts.map +1 -1
  822. package/lib/types/src/internal/manager-api/di/managerApiTypes.d.ts +1 -0
  823. package/lib/types/src/internal/manager-api/di/managerApiTypes.d.ts.map +1 -1
  824. package/lib/types/src/internal/manager-api/model/Application.d.ts +4 -1
  825. package/lib/types/src/internal/manager-api/model/Application.d.ts.map +1 -1
  826. package/lib/types/src/internal/manager-api/model/Const.d.ts +1 -1
  827. package/lib/types/src/internal/manager-api/model/Const.d.ts.map +1 -1
  828. package/lib/types/src/internal/manager-api/model/Errors.d.ts +0 -6
  829. package/lib/types/src/internal/manager-api/model/Errors.d.ts.map +1 -1
  830. package/lib/types/src/internal/manager-api/model/Firmware.d.ts +4 -0
  831. package/lib/types/src/internal/manager-api/model/Firmware.d.ts.map +1 -1
  832. package/lib/types/src/internal/manager-api/model/Params.d.ts +19 -68
  833. package/lib/types/src/internal/manager-api/model/Params.d.ts.map +1 -1
  834. package/lib/types/src/internal/manager-api/service/DefaultManagerApiService.d.ts +7 -7
  835. package/lib/types/src/internal/manager-api/service/DefaultManagerApiService.d.ts.map +1 -1
  836. package/lib/types/src/internal/manager-api/service/ManagerApiService.d.ts +32 -4
  837. package/lib/types/src/internal/manager-api/service/ManagerApiService.d.ts.map +1 -1
  838. package/lib/types/src/internal/manager-api/use-case/SetProviderUseCase.d.ts +11 -0
  839. package/lib/types/src/internal/manager-api/use-case/SetProviderUseCase.d.ts.map +1 -0
  840. package/lib/types/src/internal/manager-api/use-case/SetProviderUseCase.test.d.ts +2 -0
  841. package/lib/types/src/internal/manager-api/use-case/SetProviderUseCase.test.d.ts.map +1 -0
  842. package/lib/types/src/internal/secure-channel/data/DefaultSecureChannelDataSource.d.ts +18 -0
  843. package/lib/types/src/internal/secure-channel/data/DefaultSecureChannelDataSource.d.ts.map +1 -0
  844. package/lib/types/src/internal/secure-channel/data/DefaultSecureChannelDataSource.test.d.ts +2 -0
  845. package/lib/types/src/internal/secure-channel/data/DefaultSecureChannelDataSource.test.d.ts.map +1 -0
  846. package/lib/types/src/internal/secure-channel/data/SecureChannelDataSource.d.ts +52 -0
  847. package/lib/types/src/internal/secure-channel/data/SecureChannelDataSource.d.ts.map +1 -0
  848. package/lib/types/src/internal/secure-channel/data/__mocks__/DefaultSecureChannelDataSource.d.ts +10 -0
  849. package/lib/types/src/internal/secure-channel/data/__mocks__/DefaultSecureChannelDataSource.d.ts.map +1 -0
  850. package/lib/types/src/internal/secure-channel/di/secureChannelModule.d.ts +9 -0
  851. package/lib/types/src/internal/secure-channel/di/secureChannelModule.d.ts.map +1 -0
  852. package/lib/types/src/internal/secure-channel/di/secureChannelModule.test.d.ts +2 -0
  853. package/lib/types/src/internal/secure-channel/di/secureChannelModule.test.d.ts.map +1 -0
  854. package/lib/types/src/internal/secure-channel/di/secureChannelTypes.d.ts +6 -0
  855. package/lib/types/src/internal/secure-channel/di/secureChannelTypes.d.ts.map +1 -0
  856. package/lib/types/src/internal/secure-channel/model/Const.d.ts +2 -0
  857. package/lib/types/src/internal/secure-channel/model/Const.d.ts.map +1 -0
  858. package/lib/types/src/internal/secure-channel/model/Errors.d.ts +14 -0
  859. package/lib/types/src/internal/secure-channel/model/Errors.d.ts.map +1 -0
  860. package/lib/types/src/internal/secure-channel/model/Params.d.ts +84 -0
  861. package/lib/types/src/internal/secure-channel/model/Params.d.ts.map +1 -0
  862. package/lib/types/src/internal/secure-channel/service/DefaultSecureChannelService.d.ts +21 -0
  863. package/lib/types/src/internal/secure-channel/service/DefaultSecureChannelService.d.ts.map +1 -0
  864. package/lib/types/src/internal/secure-channel/service/DefaultSecureChannelService.test.d.ts +2 -0
  865. package/lib/types/src/internal/secure-channel/service/DefaultSecureChannelService.test.d.ts.map +1 -0
  866. package/lib/types/src/internal/secure-channel/service/SecureChannelService.d.ts +56 -0
  867. package/lib/types/src/internal/secure-channel/service/SecureChannelService.d.ts.map +1 -0
  868. package/lib/types/src/internal/send/use-case/SendApduUseCase.d.ts +5 -1
  869. package/lib/types/src/internal/send/use-case/SendApduUseCase.d.ts.map +1 -1
  870. package/lib/types/src/internal/transport/service/DefaultTransportService.d.ts +2 -0
  871. package/lib/types/src/internal/transport/service/DefaultTransportService.d.ts.map +1 -1
  872. package/lib/types/src/internal/transport/service/TransportService.d.ts +3 -1
  873. package/lib/types/src/internal/transport/service/TransportService.d.ts.map +1 -1
  874. package/lib/types/src/internal/transport/service/__mocks__/DefaultTransportService.d.ts +7 -6
  875. package/lib/types/src/internal/transport/service/__mocks__/DefaultTransportService.d.ts.map +1 -1
  876. package/lib/types/tsconfig.prod.tsbuildinfo +1 -1
  877. package/package.json +14 -13
  878. package/lib/cjs/src/api/device-session/use-case/ToggleDeviceSessionRefresher.js +0 -2
  879. package/lib/cjs/src/api/device-session/use-case/ToggleDeviceSessionRefresher.js.map +0 -7
  880. package/lib/cjs/src/api/device-session/use-case/ToggleDeviceSessionRefresher.test.js +0 -2
  881. package/lib/cjs/src/api/device-session/use-case/ToggleDeviceSessionRefresher.test.js.map +0 -7
  882. package/lib/cjs/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.js +0 -2
  883. package/lib/cjs/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.js.map +0 -7
  884. package/lib/cjs/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.test.js +0 -2
  885. package/lib/cjs/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.test.js.map +0 -7
  886. package/lib/esm/src/api/device-session/use-case/ToggleDeviceSessionRefresher.js +0 -2
  887. package/lib/esm/src/api/device-session/use-case/ToggleDeviceSessionRefresher.js.map +0 -7
  888. package/lib/esm/src/api/device-session/use-case/ToggleDeviceSessionRefresher.test.js +0 -2
  889. package/lib/esm/src/api/device-session/use-case/ToggleDeviceSessionRefresher.test.js.map +0 -7
  890. package/lib/esm/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.js +0 -2
  891. package/lib/esm/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.js.map +0 -7
  892. package/lib/esm/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.test.js +0 -2
  893. package/lib/esm/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.test.js.map +0 -7
  894. package/lib/types/src/api/device-session/use-case/ToggleDeviceSessionRefresher.d.ts.map +0 -1
  895. package/lib/types/src/api/device-session/use-case/ToggleDeviceSessionRefresher.test.d.ts +0 -2
  896. package/lib/types/src/api/device-session/use-case/ToggleDeviceSessionRefresher.test.d.ts.map +0 -1
  897. package/lib/types/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.d.ts +0 -13
  898. package/lib/types/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.d.ts.map +0 -1
  899. package/lib/types/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.test.d.ts +0 -2
  900. package/lib/types/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.test.d.ts.map +0 -1
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.test.ts"],
4
- "sourcesContent": ["import { Left, Right } from \"purify-ts\";\nimport { assign, createMachine } from \"xstate\";\n\nimport { type Apdu } from \"@api/apdu/model/Apdu\";\nimport { ApduBuilder } from \"@api/apdu/utils/ApduBuilder\";\nimport { CommandResultFactory } from \"@api/command/model/CommandResult\";\nimport { makeDeviceActionInternalApiMock } from \"@api/device-action/__test-utils__/makeInternalApi\";\nimport { testDeviceActionStates } from \"@api/device-action/__test-utils__/testDeviceActionStates\";\nimport {\n type DeviceActionState,\n DeviceActionStatus,\n} from \"@api/device-action/model/DeviceActionState\";\nimport { UserInteractionRequired } from \"@api/device-action/model/UserInteractionRequired\";\nimport { UnknownDAError } from \"@api/device-action/os/Errors\";\nimport { OpenAppDeviceAction } from \"@api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction\";\nimport { type Command } from \"@api/types\";\nimport { UnknownDeviceExchangeError } from \"@root/src\";\n\nimport { SendCommandInAppDeviceAction } from \"./SendCommandInAppDeviceAction\";\nimport {\n type SendCommandInAppDAError,\n type SendCommandInAppDAIntermediateValue,\n type SendCommandInAppDAOutput,\n} from \"./SendCommandInAppDeviceActionTypes\";\n\njest.mock(\n \"@api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction\",\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n () => ({\n ...jest.requireActual(\n \"@api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction\",\n ),\n OpenAppDeviceAction: jest.fn(() => ({\n makeStateMachine: jest.fn(),\n })),\n }),\n);\n\nconst setupOpenAppDAMock = (error?: unknown) => {\n (OpenAppDeviceAction as jest.Mock).mockImplementation(() => ({\n makeStateMachine: jest.fn().mockImplementation(() =>\n createMachine({\n initial: \"pending\",\n states: {\n pending: {\n entry: assign({\n intermediateValue: {\n requiredUserInteraction: UserInteractionRequired.ConfirmOpenApp,\n },\n }),\n after: {\n 0: \"done\",\n },\n },\n done: {\n type: \"final\",\n },\n },\n output: () => (error ? Left(error) : Right(undefined)),\n }),\n ),\n }));\n};\n\ndescribe(\"SendCommandInAppDeviceAction\", () => {\n const sendMyCommand = jest.fn();\n\n const extractDependenciesMock = () => ({\n sendCommand: sendMyCommand,\n });\n\n const { sendCommand: apiSendCommandMock } = makeDeviceActionInternalApiMock();\n\n const commandParams = {\n paramString: \"aParameter\",\n paramNumber: 1234,\n };\n const mockedCommandResponse = {\n aNumber: 5678,\n aString: \"mockedResponseString\",\n };\n beforeEach(() => {\n jest.resetAllMocks();\n });\n\n describe(\"without mocking extractDependencies\", () => {\n it(\"should call sendCommand on internalApi with the correct parameters\", async () => {\n setupOpenAppDAMock();\n apiSendCommandMock.mockResolvedValue(\n CommandResultFactory({ data: undefined }),\n );\n\n const deviceAction = new SendCommandInAppDeviceAction({\n input: {\n command: new TestCommand(commandParams),\n appName: \"MyApp\",\n requiredUserInteraction: UserInteractionRequired.VerifyAddress,\n },\n });\n await new Promise<void>((resolve, reject) => {\n deviceAction\n ._execute(makeDeviceActionInternalApiMock())\n .observable.subscribe({\n error: () => reject(),\n complete: () => resolve(),\n next: () => {},\n });\n });\n\n expect(apiSendCommandMock).toHaveBeenCalledWith(\n new TestCommand(commandParams),\n );\n });\n });\n\n describe(\"error cases\", () => {\n it(\"should error and output the error if the open app fails\", (done) => {\n setupOpenAppDAMock(new UnknownDAError(\"Mocked error\"));\n\n const expectedStates: MyCommandSendCommandDAState[] = [\n {\n status: DeviceActionStatus.Pending,\n intermediateValue: {\n requiredUserInteraction: UserInteractionRequired.None,\n },\n },\n {\n status: DeviceActionStatus.Pending,\n intermediateValue: {\n requiredUserInteraction: UserInteractionRequired.ConfirmOpenApp,\n },\n },\n {\n status: DeviceActionStatus.Error,\n error: new UnknownDAError(\"Mocked error\"),\n },\n ];\n\n testDeviceActionStates(\n new SendCommandInAppDeviceAction({\n input: {\n command: new TestCommand(commandParams),\n appName: \"MyApp\",\n requiredUserInteraction: UserInteractionRequired.VerifyAddress,\n },\n }),\n expectedStates,\n makeDeviceActionInternalApiMock(),\n done,\n );\n });\n\n it(\"should error and output an error if the send command fails\", (done) => {\n setupOpenAppDAMock();\n\n sendMyCommand.mockResolvedValue(\n CommandResultFactory({\n error: new UnknownDeviceExchangeError(\"Mocked error\"),\n }),\n );\n\n const deviceAction = new SendCommandInAppDeviceAction({\n input: {\n command: new TestCommand(commandParams),\n appName: \"MyApp\",\n requiredUserInteraction: UserInteractionRequired.VerifyAddress,\n },\n });\n\n jest\n .spyOn(deviceAction, \"extractDependencies\")\n .mockImplementation(extractDependenciesMock);\n\n const expectedStates: MyCommandSendCommandDAState[] = [\n {\n status: DeviceActionStatus.Pending,\n intermediateValue: {\n requiredUserInteraction: UserInteractionRequired.None,\n },\n },\n {\n status: DeviceActionStatus.Pending,\n intermediateValue: {\n requiredUserInteraction: UserInteractionRequired.ConfirmOpenApp,\n },\n },\n {\n status: DeviceActionStatus.Pending,\n intermediateValue: {\n requiredUserInteraction: UserInteractionRequired.VerifyAddress,\n },\n },\n {\n status: DeviceActionStatus.Error,\n error: new UnknownDeviceExchangeError(\"Mocked error\"),\n },\n ];\n\n testDeviceActionStates(\n deviceAction,\n expectedStates,\n makeDeviceActionInternalApiMock(),\n done,\n );\n });\n });\n\n describe(\"success cases\", () => {\n it(\"should succeed and output the command result if the send command succeeds\", (done) => {\n setupOpenAppDAMock();\n\n sendMyCommand.mockResolvedValue(\n CommandResultFactory({ data: mockedCommandResponse }),\n );\n\n const deviceAction = new SendCommandInAppDeviceAction({\n input: {\n command: new TestCommand(commandParams),\n appName: \"MyApp\",\n requiredUserInteraction: UserInteractionRequired.VerifyAddress,\n },\n });\n\n jest\n .spyOn(deviceAction, \"extractDependencies\")\n .mockImplementation(extractDependenciesMock);\n\n const expectedStates: MyCommandSendCommandDAState[] = [\n {\n status: DeviceActionStatus.Pending,\n intermediateValue: {\n requiredUserInteraction: UserInteractionRequired.None,\n },\n },\n {\n status: DeviceActionStatus.Pending,\n intermediateValue: {\n requiredUserInteraction: UserInteractionRequired.ConfirmOpenApp,\n },\n },\n {\n status: DeviceActionStatus.Pending,\n intermediateValue: {\n requiredUserInteraction: UserInteractionRequired.VerifyAddress,\n },\n },\n {\n status: DeviceActionStatus.Completed,\n output: mockedCommandResponse,\n },\n ];\n\n testDeviceActionStates(\n deviceAction,\n expectedStates,\n makeDeviceActionInternalApiMock(),\n done,\n );\n });\n });\n});\n\ntype MyCommandResponse = {\n aNumber: number;\n aString: string;\n};\n\ntype MyCommandParams = {\n paramString: string;\n paramNumber: number;\n};\n\nclass TestCommand implements Command<MyCommandResponse, MyCommandParams> {\n params: MyCommandParams;\n constructor(params: MyCommandParams) {\n this.params = params;\n }\n getApdu(): Apdu {\n return new ApduBuilder({ cla: 0x00, ins: 0x01, p1: 0x02, p2: 0x03 })\n .add32BitUIntToData(this.params.paramNumber)\n .addAsciiStringToData(this.params.paramString)\n .build();\n }\n parseResponse() {\n return CommandResultFactory({ data: { aNumber: 1, aString: \"aString\" } });\n }\n}\n\ntype MyCommandSendCommandDAState = DeviceActionState<\n SendCommandInAppDAOutput<MyCommandResponse>,\n SendCommandInAppDAError<UnknownDAError>,\n SendCommandInAppDAIntermediateValue<\n UserInteractionRequired.None | UserInteractionRequired.VerifyAddress\n >\n>;\n"],
5
- "mappings": "AAAA,OAAS,QAAAA,EAAM,SAAAC,MAAa,YAC5B,OAAS,UAAAC,EAAQ,iBAAAC,MAAqB,SAGtC,OAAS,eAAAC,MAAmB,8BAC5B,OAAS,wBAAAC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C,EAAqB,CAAE,KAAM,CAAE,QAAS,EAAG,QAAS,SAAU,CAAE,CAAC,CAC1E,CACF",
6
- "names": ["Left", "Right", "assign", "createMachine", "ApduBuilder", "CommandResultFactory", "makeDeviceActionInternalApiMock", "testDeviceActionStates", "DeviceActionStatus", "UserInteractionRequired", "UnknownDAError", "OpenAppDeviceAction", "UnknownDeviceExchangeError", "SendCommandInAppDeviceAction", "setupOpenAppDAMock", "error", "sendMyCommand", "extractDependenciesMock", "apiSendCommandMock", "commandParams", "mockedCommandResponse", "deviceAction", "TestCommand", "resolve", "reject", "done", "expectedStates", "params"]
4
+ "sourcesContent": ["/* eslint @typescript-eslint/consistent-type-imports:0 */\nimport { Left, Right } from \"purify-ts\";\nimport { type Mock } from \"vitest\";\nimport { assign, createMachine } from \"xstate\";\n\nimport { type Apdu } from \"@api/apdu/model/Apdu\";\nimport { ApduBuilder } from \"@api/apdu/utils/ApduBuilder\";\nimport { CommandResultFactory } from \"@api/command/model/CommandResult\";\nimport { makeDeviceActionInternalApiMock } from \"@api/device-action/__test-utils__/makeInternalApi\";\nimport { testDeviceActionStates } from \"@api/device-action/__test-utils__/testDeviceActionStates\";\nimport {\n type DeviceActionState,\n DeviceActionStatus,\n} from \"@api/device-action/model/DeviceActionState\";\nimport { UserInteractionRequired } from \"@api/device-action/model/UserInteractionRequired\";\nimport { UnknownDAError } from \"@api/device-action/os/Errors\";\nimport { OpenAppDeviceAction } from \"@api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction\";\nimport { type Command } from \"@api/types\";\nimport { UnknownDeviceExchangeError } from \"@root/src\";\n\nimport { SendCommandInAppDeviceAction } from \"./SendCommandInAppDeviceAction\";\nimport {\n type SendCommandInAppDAError,\n type SendCommandInAppDAIntermediateValue,\n type SendCommandInAppDAOutput,\n} from \"./SendCommandInAppDeviceActionTypes\";\n\nvi.mock(\n \"@api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction\",\n async (importOriginal) => {\n const original =\n await importOriginal<\n typeof import(\"../OpenAppDeviceAction/OpenAppDeviceAction\")\n >();\n\n return {\n ...original,\n OpenAppDeviceAction: vi.fn(() => ({\n makeStateMachine: vi.fn(),\n })),\n };\n },\n);\n\nconst setupOpenAppDAMock = (error?: unknown) => {\n (OpenAppDeviceAction as Mock).mockImplementation(() => ({\n makeStateMachine: vi.fn().mockImplementation(() =>\n createMachine({\n initial: \"pending\",\n states: {\n pending: {\n entry: assign({\n intermediateValue: {\n requiredUserInteraction: UserInteractionRequired.ConfirmOpenApp,\n },\n }),\n after: {\n 0: \"done\",\n },\n },\n done: {\n type: \"final\",\n },\n },\n output: () => (error ? Left(error) : Right(undefined)),\n }),\n ),\n }));\n};\n\ndescribe(\"SendCommandInAppDeviceAction\", () => {\n const sendMyCommand = vi.fn();\n\n const extractDependenciesMock = () => ({\n sendCommand: sendMyCommand,\n });\n\n const { sendCommand: apiSendCommandMock } = makeDeviceActionInternalApiMock();\n\n const commandParams = {\n paramString: \"aParameter\",\n paramNumber: 1234,\n };\n const mockedCommandResponse = {\n aNumber: 5678,\n aString: \"mockedResponseString\",\n };\n beforeEach(() => {\n vi.resetAllMocks();\n });\n\n describe(\"without mocking extractDependencies\", () => {\n it(\"should call sendCommand on internalApi with the correct parameters\", async () => {\n setupOpenAppDAMock();\n apiSendCommandMock.mockResolvedValue(\n CommandResultFactory({ data: undefined }),\n );\n\n const deviceAction = new SendCommandInAppDeviceAction({\n input: {\n command: new TestCommand(commandParams),\n appName: \"MyApp\",\n requiredUserInteraction: UserInteractionRequired.VerifyAddress,\n },\n });\n await new Promise<void>((resolve, reject) => {\n deviceAction\n ._execute(makeDeviceActionInternalApiMock())\n .observable.subscribe({\n error: () => reject(),\n complete: () => resolve(),\n next: () => {},\n });\n });\n\n expect(apiSendCommandMock).toHaveBeenCalledWith(\n new TestCommand(commandParams),\n );\n });\n });\n\n describe(\"error cases\", () => {\n it(\"should error and output the error if the open app fails\", () =>\n new Promise<void>((resolve, reject) => {\n setupOpenAppDAMock(new UnknownDAError(\"Mocked error\"));\n\n const expectedStates: MyCommandSendCommandDAState[] = [\n {\n status: DeviceActionStatus.Pending,\n intermediateValue: {\n requiredUserInteraction: UserInteractionRequired.None,\n },\n },\n {\n status: DeviceActionStatus.Pending,\n intermediateValue: {\n requiredUserInteraction: UserInteractionRequired.ConfirmOpenApp,\n },\n },\n {\n status: DeviceActionStatus.Error,\n error: new UnknownDAError(\"Mocked error\"),\n },\n ];\n\n testDeviceActionStates(\n new SendCommandInAppDeviceAction({\n input: {\n command: new TestCommand(commandParams),\n appName: \"MyApp\",\n requiredUserInteraction: UserInteractionRequired.VerifyAddress,\n },\n }),\n expectedStates,\n makeDeviceActionInternalApiMock(),\n {\n onDone: resolve,\n onError: reject,\n },\n );\n }));\n\n it(\"should error and output an error if the send command fails\", () =>\n new Promise<void>((resolve, reject) => {\n setupOpenAppDAMock();\n\n sendMyCommand.mockResolvedValue(\n CommandResultFactory({\n error: new UnknownDeviceExchangeError(\"Mocked error\"),\n }),\n );\n\n const deviceAction = new SendCommandInAppDeviceAction({\n input: {\n command: new TestCommand(commandParams),\n appName: \"MyApp\",\n requiredUserInteraction: UserInteractionRequired.VerifyAddress,\n },\n });\n\n vi.spyOn(deviceAction, \"extractDependencies\").mockImplementation(\n extractDependenciesMock,\n );\n\n const expectedStates: MyCommandSendCommandDAState[] = [\n {\n status: DeviceActionStatus.Pending,\n intermediateValue: {\n requiredUserInteraction: UserInteractionRequired.None,\n },\n },\n {\n status: DeviceActionStatus.Pending,\n intermediateValue: {\n requiredUserInteraction: UserInteractionRequired.ConfirmOpenApp,\n },\n },\n {\n status: DeviceActionStatus.Pending,\n intermediateValue: {\n requiredUserInteraction: UserInteractionRequired.VerifyAddress,\n },\n },\n {\n status: DeviceActionStatus.Error,\n error: new UnknownDeviceExchangeError(\"Mocked error\"),\n },\n ];\n\n testDeviceActionStates(\n deviceAction,\n expectedStates,\n makeDeviceActionInternalApiMock(),\n {\n onDone: resolve,\n onError: reject,\n },\n );\n }));\n });\n\n describe(\"success cases\", () => {\n it(\"should succeed and output the command result if the send command succeeds\", () =>\n new Promise<void>((resolve, reject) => {\n setupOpenAppDAMock();\n\n sendMyCommand.mockResolvedValue(\n CommandResultFactory({ data: mockedCommandResponse }),\n );\n\n const deviceAction = new SendCommandInAppDeviceAction({\n input: {\n command: new TestCommand(commandParams),\n appName: \"MyApp\",\n requiredUserInteraction: UserInteractionRequired.VerifyAddress,\n },\n });\n\n vi.spyOn(deviceAction, \"extractDependencies\").mockImplementation(\n extractDependenciesMock,\n );\n\n const expectedStates: MyCommandSendCommandDAState[] = [\n {\n status: DeviceActionStatus.Pending,\n intermediateValue: {\n requiredUserInteraction: UserInteractionRequired.None,\n },\n },\n {\n status: DeviceActionStatus.Pending,\n intermediateValue: {\n requiredUserInteraction: UserInteractionRequired.ConfirmOpenApp,\n },\n },\n {\n status: DeviceActionStatus.Pending,\n intermediateValue: {\n requiredUserInteraction: UserInteractionRequired.VerifyAddress,\n },\n },\n {\n status: DeviceActionStatus.Completed,\n output: mockedCommandResponse,\n },\n ];\n\n testDeviceActionStates(\n deviceAction,\n expectedStates,\n makeDeviceActionInternalApiMock(),\n {\n onDone: resolve,\n onError: reject,\n },\n );\n }));\n });\n});\n\ntype MyCommandResponse = {\n aNumber: number;\n aString: string;\n};\n\ntype MyCommandParams = {\n paramString: string;\n paramNumber: number;\n};\n\nclass TestCommand implements Command<MyCommandResponse, MyCommandParams> {\n params: MyCommandParams;\n constructor(params: MyCommandParams) {\n this.params = params;\n }\n getApdu(): Apdu {\n return new ApduBuilder({ cla: 0x00, ins: 0x01, p1: 0x02, p2: 0x03 })\n .add32BitUIntToData(this.params.paramNumber)\n .addAsciiStringToData(this.params.paramString)\n .build();\n }\n parseResponse() {\n return CommandResultFactory({ data: { aNumber: 1, aString: \"aString\" } });\n }\n}\n\ntype MyCommandSendCommandDAState = DeviceActionState<\n SendCommandInAppDAOutput<MyCommandResponse>,\n SendCommandInAppDAError<UnknownDAError>,\n SendCommandInAppDAInterm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AQa,CACV,CACF,EAEAd,EACEe,EACAI,EACApB,EAAgC,EAChC,CACE,OAAQkB,EACR,QAASC,CACX,CACF,CACF,CAAC,CAAC,CACN,CAAC,CACH,CAAC,EAYD,MAAMF,CAAmE,CACvE,OACA,YAAYI,EAAyB,CACnC,KAAK,OAASA,CAChB,CACA,SAAgB,CACd,OAAO,IAAIvB,EAAY,CAAE,IAAK,EAAM,IAAK,EAAM,GAAI,EAAM,GAAI,CAAK,CAAC,EAChE,mBAAmB,KAAK,OAAO,WAAW,EAC1C,qBAAqB,KAAK,OAAO,WAAW,EAC5C,MAAM,CACX,CACA,eAAgB,CACd,OAAOC,EAAqB,CAAE,KAAM,CAAE,QAAS,EAAG,QAAS,SAAU,CAAE,CAAC,CAC1E,CACF",
6
+ "names": ["Left", "Right", "assign", "createMachine", "ApduBuilder", "CommandResultFactory", "makeDeviceActionInternalApiMock", "testDeviceActionStates", "DeviceActionStatus", "UserInteractionRequired", "UnknownDAError", "OpenAppDeviceAction", "UnknownDeviceExchangeError", "SendCommandInAppDeviceAction", "importOriginal", "setupOpenAppDAMock", "error", "sendMyCommand", "extractDependenciesMock", "apiSendCommandMock", "commandParams", "mockedCommandResponse", "deviceAction", "TestCommand", "resolve", "reject", "expectedStates", "params"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{createBrowserInspector as h}from"@statelyai/inspect";import{Observable as I,ReplaySubject as S,share as y}from"rxjs";import{createActor as b}from"xstate";import{DeviceActionStatus as a}from"../../device-action/model/DeviceActionState";class M{input;inspect=!1;constructor(t){this.input=t.input,this.inspect=!!t.inspect}_execute(t){const s=this.makeStateMachine(t),n=b(s,{input:this.input,inspect:this.inspect?h().inspect:void 0}),e=new S,c=r=>{const{context:i,status:p,output:m,error:d}=r;switch(p){case"active":e.next({status:a.Pending,intermediateValue:i.intermediateValue});break;case"done":m.caseOf({Left:o=>{e.next({status:a.Error,error:o})},Right:o=>{e.next({status:a.Completed,output:o})}}),e.complete();break;case"error":e.error(d),e.complete();break;case"stopped":e.next({status:a.Stopped}),e.complete();break;default:this._exhaustiveMatchingGuard(p)}},l=new I(r=>{const i=e.subscribe(r);return()=>{u.unsubscribe(),i.unsubscribe(),n.stop()}}),u=n.subscribe(c);return n.start(),{observable:l.pipe(y()),cancel:()=>{n.stop(),u.unsubscribe(),c(n.getSnapshot())}}}_exhaustiveMatchingGuard(t){throw console.log("_exhaustiveMatchingGuard status",t),new Error(`Unhandled status: ${t}`)}}export{M as XStateDeviceAction};
1
+ import{Observable as d,ReplaySubject as S,share as I}from"rxjs";import{createActor as y}from"xstate";import{DeviceActionStatus as a}from"../../device-action/model/DeviceActionState";class D{input;inspect=!1;constructor(t){this.input=t.input,this.inspect=!!t.inspect}_execute(t){const s=this.makeStateMachine(t),n=y(s,{input:this.input}),e=new S,c=r=>{const{context:i,status:p,output:m,error:h}=r;switch(p){case"active":e.next({status:a.Pending,intermediateValue:i.intermediateValue});break;case"done":m.caseOf({Left:o=>{e.next({status:a.Error,error:o})},Right:o=>{e.next({status:a.Completed,output:o})}}),e.complete();break;case"error":e.error(h),e.complete();break;case"stopped":e.next({status:a.Stopped}),e.complete();break;default:this._exhaustiveMatchingGuard(p)}},l=new d(r=>{const i=e.subscribe(r);return()=>{u.unsubscribe(),i.unsubscribe(),n.stop()}}),u=n.subscribe(c);return n.start(),{observable:l.pipe(I()),cancel:()=>{n.stop(),u.unsubscribe(),c(n.getSnapshot())}}}_exhaustiveMatchingGuard(t){throw console.log("_exhaustiveMatchingGuard status",t),new Error(`Unhandled status: ${t}`)}}export{D as XStateDeviceAction};
2
2
  //# sourceMappingURL=XStateDeviceAction.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/api/device-action/xstate-utils/XStateDeviceAction.ts"],
4
- "sourcesContent": ["import { createBrowserInspector } from \"@statelyai/inspect\";\nimport { Observable, ReplaySubject, share } from \"rxjs\";\nimport {\n createActor,\n type SnapshotFrom,\n type StateMachine,\n type StateSchema,\n} from \"xstate\";\n\nimport {\n type DeviceAction,\n type DeviceActionIntermediateValue,\n type ExecuteDeviceActionReturnType,\n type InternalApi,\n} from \"@api/device-action/DeviceAction\";\nimport {\n type DeviceActionState,\n DeviceActionStatus,\n} from \"@api/device-action/model/DeviceActionState\";\nimport { type DmkError } from \"@api/Error\";\n\nimport { type StateMachineTypes } from \"./StateMachineTypes\";\n\nexport type DeviceActionStateMachine<\n Output,\n Input,\n Error extends DmkError,\n IntermediateValue extends DeviceActionIntermediateValue,\n InternalState,\n> = StateMachine<\n StateMachineTypes<\n Output,\n Input,\n Error,\n IntermediateValue,\n InternalState\n >[\"context\"], // context\n /**\n * The following usages `any` are OK because this is just a wrapper around the\n * state machine and we are not directly going to use these types.\n */\n /* eslint-disable @typescript-eslint/no-explicit-any */\n any, // event\n any, // children\n any, // actor\n any, // action\n any, // guard\n any, // delay\n any, // state value\n any, // tag\n /* eslint-enable @typescript-eslint/no-explicit-any */\n StateMachineTypes<\n Output,\n Input,\n Error,\n IntermediateValue,\n InternalState\n >[\"input\"],\n StateMachineTypes<\n Output,\n Input,\n Error,\n IntermediateValue,\n InternalState\n >[\"output\"],\n /* eslint-disable @typescript-eslint/no-explicit-any */\n any,\n any,\n /* eslint-enable @typescript-eslint/no-explicit-any */\n StateSchema\n>;\n\n/**\n * A DeviceAction that uses an XState state machine to execute.\n * It maps the state machine snapshots to the DeviceActionState.\n * This class is abstract and should be extended to implement the state machine.\n */\nexport abstract class XStateDeviceAction<\n Output,\n Input,\n Error extends DmkError,\n IntermediateValue extends DeviceActionIntermediateValue,\n InternalState,\n> implements DeviceAction<Output, Input, Error, IntermediateValue>\n{\n readonly input: Input;\n readonly inspect: boolean = false;\n\n /**\n *\n * @param input The input for the DeviceAction\n * @param inspect If true, the state machine will be inspected in the browser\n */\n constructor(args: { input: Input; inspect?: boolean }) {\n this.input = args.input;\n this.inspect = Boolean(args.inspect);\n }\n\n protected abstract makeStateMachine(\n internalAPI: InternalApi,\n ): DeviceActionStateMachine<\n Output,\n Input,\n Error,\n IntermediateValue,\n InternalState\n >;\n\n _execute(\n internalApi: InternalApi,\n ): ExecuteDeviceActionReturnType<Output, Error, IntermediateValue> {\n const stateMachine = this.makeStateMachine(internalApi);\n\n const actor = createActor(stateMachine, {\n input: this.input,\n // optional inspector for debugging\n inspect: this.inspect ? createBrowserInspector().inspect : undefined,\n });\n\n /**\n * Using a ReplaySubject is important because the first snapshots might be\n * emitted before the observable is subscribed (if the machine goes through\n * those states fully synchronously).\n * This way, we ensure that the subscriber always receives the latest snapshot.\n * */\n const subject = new ReplaySubject<\n DeviceActionState<Output, Error, IntermediateValue>\n >();\n\n const handleActorSnapshot = (\n snapshot: SnapshotFrom<typeof stateMachine>,\n ) => {\n const { context, status, output, error } = snapshot;\n switch (status) {\n case \"active\":\n subject.next({\n status: DeviceActionStatus.Pending,\n intermediateValue: context.intermediateValue,\n });\n break;\n case \"done\":\n output.caseOf({\n Left: (err) => {\n subject.next({\n status: DeviceActionStatus.Error,\n error: err,\n });\n },\n Right: (result) => {\n subject.next({\n status: DeviceActionStatus.Completed,\n output: result,\n });\n },\n });\n subject.complete();\n break;\n case \"error\":\n // this is an error in the execution of the state machine, it should not happen\n subject.error(error);\n subject.complete();\n break;\n case \"stopped\":\n subject.next({\n status: DeviceActionStatus.Stopped,\n });\n subject.complete();\n break;\n default:\n this._exhaustiveMatchingGuard(status);\n }\n };\n\n const observable = new Observable<\n DeviceActionState<Output, Error, IntermediateValue>\n >((subscriber) => {\n const subjectSubscription = subject.subscribe(subscriber);\n return () => {\n actorSubscription.unsubscribe();\n subjectSubscription.unsubscribe();\n actor.stop(); // stop the actor when the observable is unsubscribed\n };\n });\n\n const actorSubscription = actor.subscribe(handleActorSnapshot);\n actor.start();\n\n return {\n observable: observable.pipe(share()), // share to garantee that once there is no more observer, the actor is stopped\n cancel: () => {\n actor.stop();\n actorSubscription.unsubscribe();\n handleActorSnapshot(actor.getSnapshot());\n },\n };\n }\n\n private _exhaustiveMatchingGuard(status: never): never {\n console.log(\"_exhaustiveMatchingGuard status\", status);\n throw new Error(`Unhandled status: ${status}`);\n }\n}\n"],
5
- "mappings": "AAAA,OAAS,0BAAAA,MAA8B,qBACvC,OAAS,cAAAC,EAAY,iBAAAC,EAAe,SAAAC,MAAa,OACjD,OACE,eAAAC,MAIK,SAQP,OAEE,sBAAAC,MACK,6CA2DA,MAAeC,CAOtB,CACW,MACA,QAAmB,GAO5B,YAAYC,EAA2C,CACrD,KAAK,MAAQA,EAAK,MAClB,KAAK,QAAU,EAAQA,EAAK,OAC9B,CAYA,SACEC,EACiE,CACjE,MAAMC,EAAe,KAAK,iBAAiBD,CAAW,EAEhDE,EAAQN,EAAYK,EAAc,CACtC,MAAO,KAAK,MAEZ,QAAS,KAAK,QAAUT,EAAuB,EAAE,QAAU,MAC7D,CAAC,EAQKW,EAAU,IAAIT,EAIdU,EACJC,GACG,CACH,KAAM,CAAE,QAAAC,EAAS,OAAAC,EAAQ,OAAAC,EAAQ,MAAAC,CAAM,EAAIJ,EAC3C,OAAQE,EAAQ,CACd,IAAK,SACHJ,EAAQ,KAAK,CACX,OAAQN,EAAmB,QAC3B,kBAAmBS,EAAQ,iBAC7B,CAAC,EACD,MACF,IAAK,OACHE,EAAO,OAAO,CACZ,KAAOE,GAAQ,CACbP,EAAQ,KAAK,CACX,OAAQN,EAAmB,MAC3B,MAAOa,CACT,CAAC,CACH,EACA,MAAQC,GAAW,CACjBR,EAAQ,KAAK,CACX,OAAQN,EAAmB,UAC3B,OAAQc,CACV,CAAC,CACH,CACF,CAAC,EACDR,EAAQ,SAAS,EACjB,MACF,IAAK,QAEHA,EAAQ,MAAMM,CAAK,EACnBN,EAAQ,SAAS,EACjB,MACF,IAAK,UACHA,EAAQ,KAAK,CACX,OAAQN,EAAmB,OAC7B,CAAC,EACDM,EAAQ,SAAS,EACjB,MACF,QACE,KAAK,yBAAyBI,CAAM,CACxC,CACF,EAEMK,EAAa,IAAInB,EAEpBoB,GAAe,CAChB,MAAMC,EAAsBX,EAAQ,UAAUU,CAAU,EACxD,MAAO,IAAM,CACXE,EAAkB,YAAY,EAC9BD,EAAoB,YAAY,EAChCZ,EAAM,KAAK,CACb,CACF,CAAC,EAEKa,EAAoBb,EAAM,UAAUE,CAAmB,EAC7D,OAAAF,EAAM,MAAM,EAEL,CACL,WAAYU,EAAW,KAAKjB,EAAM,CAAC,EACnC,OAAQ,IAAM,CACZO,EAAM,KAAK,EACXa,EAAkB,YAAY,EAC9BX,EAAoBF,EAAM,YAAY,CAAC,CACzC,CACF,CACF,CAEQ,yBAAyBK,EAAsB,CACrD,cAAQ,IAAI,kCAAmCA,CAAM,EAC/C,IAAI,MAAM,qBAAqBA,CAAM,EAAE,CAC/C,CACF",
6
- "names": ["createBrowserInspector", "Observable", "ReplaySubject", "share", "createActor", "DeviceActionStatus", "XStateDeviceAction", "args", "internalApi", "stateMachine", "actor", "subject", "handleActorSnapshot", "snapshot", "context", "status", "output", "error", "err", "result", "observable", "subscriber", "subjectSubscription", "actorSubscription"]
4
+ "sourcesContent": ["// import { createBrowserInspector } from \"@statelyai/inspect\";\nimport { Observable, ReplaySubject, share } from \"rxjs\";\nimport {\n createActor,\n type SnapshotFrom,\n type StateMachine,\n type StateSchema,\n} from \"xstate\";\n\nimport {\n type DeviceAction,\n type DeviceActionIntermediateValue,\n type ExecuteDeviceActionReturnType,\n type InternalApi,\n} from \"@api/device-action/DeviceAction\";\nimport {\n type DeviceActionState,\n DeviceActionStatus,\n} from \"@api/device-action/model/DeviceActionState\";\nimport { type DmkError } from \"@api/Error\";\n\nimport { type StateMachineTypes } from \"./StateMachineTypes\";\n\nexport type DeviceActionStateMachine<\n Output,\n Input,\n Error extends DmkError,\n IntermediateValue extends DeviceActionIntermediateValue,\n InternalState,\n> = StateMachine<\n StateMachineTypes<\n Output,\n Input,\n Error,\n IntermediateValue,\n InternalState\n >[\"context\"], // context\n /**\n * The following usages `any` are OK because this is just a wrapper around the\n * state machine and we are not directly going to use these types.\n */\n /* eslint-disable @typescript-eslint/no-explicit-any */\n any, // event\n any, // children\n any, // actor\n any, // action\n any, // guard\n any, // delay\n any, // state value\n any, // tag\n /* eslint-enable @typescript-eslint/no-explicit-any */\n StateMachineTypes<\n Output,\n Input,\n Error,\n IntermediateValue,\n InternalState\n >[\"input\"],\n StateMachineTypes<\n Output,\n Input,\n Error,\n IntermediateValue,\n InternalState\n >[\"output\"],\n /* eslint-disable @typescript-eslint/no-explicit-any */\n any,\n any,\n /* eslint-enable @typescript-eslint/no-explicit-any */\n StateSchema\n>;\n\n/**\n * A DeviceAction that uses an XState state machine to execute.\n * It maps the state machine snapshots to the DeviceActionState.\n * This class is abstract and should be extended to implement the state machine.\n */\nexport abstract class XStateDeviceAction<\n Output,\n Input,\n Error extends DmkError,\n IntermediateValue extends DeviceActionIntermediateValue,\n InternalState,\n> implements DeviceAction<Output, Input, Error, IntermediateValue>\n{\n readonly input: Input;\n readonly inspect: boolean = false;\n\n /**\n *\n * @param input The input for the DeviceAction\n * @param inspect If true, the state machine will be inspected in the browser\n */\n constructor(args: { input: Input; inspect?: boolean }) {\n this.input = args.input;\n this.inspect = Boolean(args.inspect);\n }\n\n protected abstract makeStateMachine(\n internalAPI: InternalApi,\n ): DeviceActionStateMachine<\n Output,\n Input,\n Error,\n IntermediateValue,\n InternalState\n >;\n\n _execute(\n internalApi: InternalApi,\n ): ExecuteDeviceActionReturnType<Output, Error, IntermediateValue> {\n const stateMachine = this.makeStateMachine(internalApi);\n\n const actor = createActor(stateMachine, {\n input: this.input,\n // optional inspector for debugging\n // inspect: this.inspect ? createBrowserInspector().inspect : undefined,\n });\n\n /**\n * Using a ReplaySubject is important because the first snapshots might be\n * emitted before the observable is subscribed (if the machine goes through\n * those states fully synchronously).\n * This way, we ensure that the subscriber always receives the latest snapshot.\n * */\n const subject = new ReplaySubject<\n DeviceActionState<Output, Error, IntermediateValue>\n >();\n\n const handleActorSnapshot = (\n snapshot: SnapshotFrom<typeof stateMachine>,\n ) => {\n const { context, status, output, error } = snapshot;\n switch (status) {\n case \"active\":\n subject.next({\n status: DeviceActionStatus.Pending,\n intermediateValue: context.intermediateValue,\n });\n break;\n case \"done\":\n output.caseOf({\n Left: (err) => {\n subject.next({\n status: DeviceActionStatus.Error,\n error: err,\n });\n },\n Right: (result) => {\n subject.next({\n status: DeviceActionStatus.Completed,\n output: result,\n });\n },\n });\n subject.complete();\n break;\n case \"error\":\n // this is an error in the execution of the state machine, it should not happen\n subject.error(error);\n subject.complete();\n break;\n case \"stopped\":\n subject.next({\n status: DeviceActionStatus.Stopped,\n });\n subject.complete();\n break;\n default:\n this._exhaustiveMatchingGuard(status);\n }\n };\n\n const observable = new Observable<\n DeviceActionState<Output, Error, IntermediateValue>\n >((subscriber) => {\n const subjectSubscription = subject.subscribe(subscriber);\n return () => {\n actorSubscription.unsubscribe();\n subjectSubscription.unsubscribe();\n actor.stop(); // stop the actor when the observable is unsubscribed\n };\n });\n\n const actorSubscription = actor.subscribe(handleActorSnapshot);\n actor.start();\n\n return {\n observable: observable.pipe(share()), // share to garantee that once there is no more observer, the actor is stopped\n cancel: () => {\n actor.stop();\n actorSubscription.unsubscribe();\n handleActorSnapshot(actor.getSnapshot());\n },\n };\n }\n\n private _exhaustiveMatchingGuard(status: never): never {\n console.log(\"_exhaustiveMatchingGuard status\", status);\n throw new Error(`Unhandled status: ${status}`);\n }\n}\n"],
5
+ "mappings": "AACA,OAAS,cAAAA,EAAY,iBAAAC,EAAe,SAAAC,MAAa,OACjD,OACE,eAAAC,MAIK,SAQP,OAEE,sBAAAC,MACK,6CA2DA,MAAeC,CAOtB,CACW,MACA,QAAmB,GAO5B,YAAYC,EAA2C,CACrD,KAAK,MAAQA,EAAK,MAClB,KAAK,QAAU,EAAQA,EAAK,OAC9B,CAYA,SACEC,EACiE,CACjE,MAAMC,EAAe,KAAK,iBAAiBD,CAAW,EAEhDE,EAAQN,EAAYK,EAAc,CACtC,MAAO,KAAK,KAGd,CAAC,EAQKE,EAAU,IAAIT,EAIdU,EACJC,GACG,CACH,KAAM,CAAE,QAAAC,EAAS,OAAAC,EAAQ,OAAAC,EAAQ,MAAAC,CAAM,EAAIJ,EAC3C,OAAQE,EAAQ,CACd,IAAK,SACHJ,EAAQ,KAAK,CACX,OAAQN,EAAmB,QAC3B,kBAAmBS,EAAQ,iBAC7B,CAAC,EACD,MACF,IAAK,OACHE,EAAO,OAAO,CACZ,KAAOE,GAAQ,CACbP,EAAQ,KAAK,CACX,OAAQN,EAAmB,MAC3B,MAAOa,CACT,CAAC,CACH,EACA,MAAQC,GAAW,CACjBR,EAAQ,KAAK,CACX,OAAQN,EAAmB,UAC3B,OAAQc,CACV,CAAC,CACH,CACF,CAAC,EACDR,EAAQ,SAAS,EACjB,MACF,IAAK,QAEHA,EAAQ,MAAMM,CAAK,EACnBN,EAAQ,SAAS,EACjB,MACF,IAAK,UACHA,EAAQ,KAAK,CACX,OAAQN,EAAmB,OAC7B,CAAC,EACDM,EAAQ,SAAS,EACjB,MACF,QACE,KAAK,yBAAyBI,CAAM,CACxC,CACF,EAEMK,EAAa,IAAInB,EAEpBoB,GAAe,CAChB,MAAMC,EAAsBX,EAAQ,UAAUU,CAAU,EACxD,MAAO,IAAM,CACXE,EAAkB,YAAY,EAC9BD,EAAoB,YAAY,EAChCZ,EAAM,KAAK,CACb,CACF,CAAC,EAEKa,EAAoBb,EAAM,UAAUE,CAAmB,EAC7D,OAAAF,EAAM,MAAM,EAEL,CACL,WAAYU,EAAW,KAAKjB,EAAM,CAAC,EACnC,OAAQ,IAAM,CACZO,EAAM,KAAK,EACXa,EAAkB,YAAY,EAC9BX,EAAoBF,EAAM,YAAY,CAAC,CACzC,CACF,CACF,CAEQ,yBAAyBK,EAAsB,CACrD,cAAQ,IAAI,kCAAmCA,CAAM,EAC/C,IAAI,MAAM,qBAAqBA,CAAM,EAAE,CAC/C,CACF",
6
+ "names": ["Observable", "ReplaySubject", "share", "createActor", "DeviceActionStatus", "XStateDeviceAction", "args", "internalApi", "stateMachine", "actor", "subject", "handleActorSnapshot", "snapshot", "context", "status", "output", "error", "err", "result", "observable", "subscriber", "subjectSubscription", "actorSubscription"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/api/device-model/data/StaticDeviceModelDataSource.ts"],
4
- "sourcesContent": ["import { injectable } from \"inversify\";\n\nimport { DeviceModelId } from \"@api/device/DeviceModel\";\nimport { DeviceModelDataSource } from \"@api/device-model/data/DeviceModelDataSource\";\nimport { BleDeviceInfos } from \"@api/device-model/model/BleDeviceInfos\";\nimport { TransportDeviceModel } from \"@api/device-model/model/DeviceModel\";\n\n/**\n * Static/in memory implementation of the device model data source\n */\n@injectable()\nexport class StaticDeviceModelDataSource implements DeviceModelDataSource {\n private static deviceModelByIds: {\n [key in DeviceModelId]: TransportDeviceModel;\n } = {\n [DeviceModelId.NANO_S]: new TransportDeviceModel({\n id: DeviceModelId.NANO_S,\n productName: \"Ledger Nano S\",\n usbProductId: 0x10,\n bootloaderUsbProductId: 0x0001,\n usbOnly: true,\n memorySize: 320 * 1024,\n masks: [0x31100000],\n }),\n [DeviceModelId.NANO_SP]: new TransportDeviceModel({\n id: DeviceModelId.NANO_SP,\n productName: \"Ledger Nano S Plus\",\n usbProductId: 0x50,\n bootloaderUsbProductId: 0x0005,\n usbOnly: true,\n memorySize: 1533 * 1024,\n masks: [0x33100000],\n }),\n [DeviceModelId.NANO_X]: new TransportDeviceModel({\n id: DeviceModelId.NANO_X,\n productName: \"Ledger Nano X\",\n usbProductId: 0x40,\n bootloaderUsbProductId: 0x0004,\n usbOnly: false,\n memorySize: 2 * 1024 * 1024,\n masks: [0x33000000],\n bluetoothSpec: [\n {\n serviceUuid: \"13d63400-2c97-0004-0000-4c6564676572\",\n notifyUuid: \"13d63400-2c97-0004-0001-4c6564676572\",\n writeUuid: \"13d63400-2c97-0004-0002-4c6564676572\",\n writeCmdUuid: \"13d63400-2c97-0004-0003-4c6564676572\",\n },\n ],\n }),\n [DeviceModelId.STAX]: new TransportDeviceModel({\n id: DeviceModelId.STAX,\n productName: \"Ledger Stax\",\n usbProductId: 0x60,\n bootloaderUsbProductId: 0x0006,\n usbOnly: false,\n memorySize: 1533 * 1024,\n masks: [0x33200000],\n bluetoothSpec: [\n {\n serviceUuid: \"13d63400-2c97-6004-0000-4c6564676572\",\n notifyUuid: \"13d63400-2c97-6004-0001-4c6564676572\",\n writeUuid: \"13d63400-2c97-6004-0002-4c6564676572\",\n writeCmdUuid: \"13d63400-2c97-6004-0003-4c6564676572\",\n },\n ],\n }),\n [DeviceModelId.FLEX]: new TransportDeviceModel({\n id: DeviceModelId.FLEX,\n productName: \"Ledger Flex\",\n usbProductId: 0x70,\n bootloaderUsbProductId: 0x0007,\n usbOnly: false,\n memorySize: 1533 * 1024,\n masks: [0x33300000],\n bluetoothSpec: [\n {\n serviceUuid: \"13d63400-2c97-3004-0000-4c6564676572\",\n notifyUuid: \"13d63400-2c97-3004-0001-4c6564676572\",\n writeUuid: \"13d63400-2c97-3004-0002-4c6564676572\",\n writeCmdUuid: \"13d63400-2c97-3004-0003-4c6564676572\",\n },\n ],\n }),\n };\n\n getAllDeviceModels(): TransportDeviceModel[] {\n return Object.values(StaticDeviceModelDataSource.deviceModelByIds);\n }\n\n getDeviceModel(params: { id: DeviceModelId }): TransportDeviceModel {\n return StaticDeviceModelDataSource.deviceModelByIds[params.id];\n }\n\n /**\n * Returns the list of device models that match all the given parameters\n */\n filterDeviceModels(\n params: Partial<TransportDeviceModel>,\n ): TransportDeviceModel[] {\n return this.getAllDeviceModels().filter((deviceModel) => {\n return Object.entries(params).every(([key, value]) => {\n return deviceModel[key as keyof TransportDeviceModel] === value;\n });\n });\n }\n\n getBluetoothServicesInfos(): Record<string, BleDeviceInfos> {\n return Object.values(StaticDeviceModelDataSource.deviceModelByIds).reduce<\n Record<string, BleDeviceInfos>\n >((acc, deviceModel) => {\n const { bluetoothSpec } = deviceModel;\n if (bluetoothSpec) {\n return {\n ...acc,\n ...bluetoothSpec.reduce<Record<string, BleDeviceInfos>>(\n (serviceToModel, bleSpec) => ({\n ...serviceToModel,\n [bleSpec.serviceUuid]: new BleDeviceInfos(\n deviceModel,\n bleSpec.serviceUuid,\n bleSpec.writeUuid,\n bleSpec.writeCmdUuid,\n bleSpec.notifyUuid,\n ),\n }),\n {},\n ),\n };\n }\n return acc;\n }, {});\n }\n\n getBluetoothServices(): string[] {\n return Object.values(StaticDeviceModelDataSource.deviceModelByIds)\n .map((deviceModel) =>\n (deviceModel.bluetoothSpec || []).map((spec) => spec.serviceUuid),\n )\n .flat()\n .filter((uuid) => !!uuid);\n }\n}\n"],
4
+ "sourcesContent": ["import { injectable } from \"inversify\";\n\nimport { DeviceModelId } from \"@api/device/DeviceModel\";\nimport { DeviceModelDataSource } from \"@api/device-model/data/DeviceModelDataSource\";\nimport { BleDeviceInfos } from \"@api/device-model/model/BleDeviceInfos\";\nimport { TransportDeviceModel } from \"@api/device-model/model/DeviceModel\";\n\n/**\n * Static/in memory implementation of the device model data source\n */\n@injectable()\nexport class StaticDeviceModelDataSource implements DeviceModelDataSource {\n private static deviceModelByIds: {\n [_key in DeviceModelId]: TransportDeviceModel;\n } = {\n [DeviceModelId.NANO_S]: new TransportDeviceModel({\n id: DeviceModelId.NANO_S,\n productName: \"Ledger Nano S\",\n usbProductId: 0x10,\n bootloaderUsbProductId: 0x0001,\n usbOnly: true,\n memorySize: 320 * 1024,\n masks: [0x31100000],\n }),\n [DeviceModelId.NANO_SP]: new TransportDeviceModel({\n id: DeviceModelId.NANO_SP,\n productName: \"Ledger Nano S Plus\",\n usbProductId: 0x50,\n bootloaderUsbProductId: 0x0005,\n usbOnly: true,\n memorySize: 1533 * 1024,\n masks: [0x33100000],\n }),\n [DeviceModelId.NANO_X]: new TransportDeviceModel({\n id: DeviceModelId.NANO_X,\n productName: \"Ledger Nano X\",\n usbProductId: 0x40,\n bootloaderUsbProductId: 0x0004,\n usbOnly: false,\n memorySize: 2 * 1024 * 1024,\n masks: [0x33000000],\n bluetoothSpec: [\n {\n serviceUuid: \"13d63400-2c97-0004-0000-4c6564676572\",\n notifyUuid: \"13d63400-2c97-0004-0001-4c6564676572\",\n writeUuid: \"13d63400-2c97-0004-0002-4c6564676572\",\n writeCmdUuid: \"13d63400-2c97-0004-0003-4c6564676572\",\n },\n ],\n }),\n [DeviceModelId.STAX]: new TransportDeviceModel({\n id: DeviceModelId.STAX,\n productName: \"Ledger Stax\",\n usbProductId: 0x60,\n bootloaderUsbProductId: 0x0006,\n usbOnly: false,\n memorySize: 1533 * 1024,\n masks: [0x33200000],\n bluetoothSpec: [\n {\n serviceUuid: \"13d63400-2c97-6004-0000-4c6564676572\",\n notifyUuid: \"13d63400-2c97-6004-0001-4c6564676572\",\n writeUuid: \"13d63400-2c97-6004-0002-4c6564676572\",\n writeCmdUuid: \"13d63400-2c97-6004-0003-4c6564676572\",\n },\n ],\n }),\n [DeviceModelId.FLEX]: new TransportDeviceModel({\n id: DeviceModelId.FLEX,\n productName: \"Ledger Flex\",\n usbProductId: 0x70,\n bootloaderUsbProductId: 0x0007,\n usbOnly: false,\n memorySize: 1533 * 1024,\n masks: [0x33300000],\n bluetoothSpec: [\n {\n serviceUuid: \"13d63400-2c97-3004-0000-4c6564676572\",\n notifyUuid: \"13d63400-2c97-3004-0001-4c6564676572\",\n writeUuid: \"13d63400-2c97-3004-0002-4c6564676572\",\n writeCmdUuid: \"13d63400-2c97-3004-0003-4c6564676572\",\n },\n ],\n }),\n };\n\n getAllDeviceModels(): TransportDeviceModel[] {\n return Object.values(StaticDeviceModelDataSource.deviceModelByIds);\n }\n\n getDeviceModel(params: { id: DeviceModelId }): TransportDeviceModel {\n return StaticDeviceModelDataSource.deviceModelByIds[params.id];\n }\n\n /**\n * Returns the list of device models that match all the given parameters\n */\n filterDeviceModels(\n params: Partial<TransportDeviceModel>,\n ): TransportDeviceModel[] {\n return this.getAllDeviceModels().filter((deviceModel) => {\n return Object.entries(params).every(([key, value]) => {\n return deviceModel[key as keyof TransportDeviceModel] === value;\n });\n });\n }\n\n getBluetoothServicesInfos(): Record<string, BleDeviceInfos> {\n return Object.values(StaticDeviceModelDataSource.deviceModelByIds).reduce<\n Record<string, BleDeviceInfos>\n >((acc, deviceModel) => {\n const { bluetoothSpec } = deviceModel;\n if (bluetoothSpec) {\n return {\n ...acc,\n ...bluetoothSpec.reduce<Record<string, BleDeviceInfos>>(\n (serviceToModel, bleSpec) => ({\n ...serviceToModel,\n [bleSpec.serviceUuid]: new BleDeviceInfos(\n deviceModel,\n bleSpec.serviceUuid,\n bleSpec.writeUuid,\n bleSpec.writeCmdUuid,\n bleSpec.notifyUuid,\n ),\n }),\n {},\n ),\n };\n }\n return acc;\n }, {});\n }\n\n getBluetoothServices(): string[] {\n return Object.values(StaticDeviceModelDataSource.deviceModelByIds)\n .map((deviceModel) =>\n (deviceModel.bluetoothSpec || []).map((spec) => spec.serviceUuid),\n )\n .flat()\n .filter((uuid) => !!uuid);\n }\n}\n"],
5
5
  "mappings": "gVAAA,OAAS,cAAAA,MAAkB,YAE3B,OAAS,iBAAAC,MAAqB,0BAE9B,OAAS,kBAAAC,MAAsB,yCAC/B,OAAS,wBAAAC,MAA4B,sCAM9B,IAAMC,EAAN,KAAmE,CA2ExE,oBAA6C,CAC3C,OAAO,OAAO,OAAOA,EAA4B,gBAAgB,CACnE,CAEA,eAAeC,EAAqD,CAClE,OAAOD,EAA4B,iBAAiBC,EAAO,EAAE,CAC/D,CAKA,mBACEA,EACwB,CACxB,OAAO,KAAK,mBAAmB,EAAE,OAAQC,GAChC,OAAO,QAAQD,CAAM,EAAE,MAAM,CAAC,CAACE,EAAKC,CAAK,IACvCF,EAAYC,CAAiC,IAAMC,CAC3D,CACF,CACH,CAEA,2BAA4D,CAC1D,OAAO,OAAO,OAAOJ,EAA4B,gBAAgB,EAAE,OAEjE,CAACK,EAAKH,IAAgB,CACtB,KAAM,CAAE,cAAAI,CAAc,EAAIJ,EAC1B,OAAII,EACK,CACL,GAAGD,EACH,GA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,CACF,CACF,CAAC,EACD,CAACA,EAAc,IAAI,EAAG,IAAIC,EAAqB,CAC7C,GAAID,EAAc,KAClB,YAAa,cACb,aAAc,IACd,uBAAwB,EACxB,QAAS,GACT,WAAY,KAAO,KACnB,MAAO,CAAC,SAAU,EAClB,cAAe,CACb,CACE,YAAa,uCACb,WAAY,uCACZ,UAAW,uCACX,aAAc,sCAChB,CACF,CACF,CAAC,CACH,GAzEWb,EAANe,EAAA,CADNC,EAAW,GACChB",
6
6
  "names": ["injectable", "DeviceModelId", "BleDeviceInfos", "TransportDeviceModel", "StaticDeviceModelDataSource", "params", "deviceModel", "key", "value", "acc", "bluetoothSpec", "serviceToModel", "bleSpec", "BleDeviceInfos", "spec", "uuid", "__publicField", "DeviceModelId", "TransportDeviceModel", "__decorateClass", "injectable"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/api/device-session/DeviceSessionState.ts"],
4
- "sourcesContent": ["import { type GetAppAndVersionResponse } from \"@api/command/os/GetAppAndVersionCommand\";\nimport { type BatteryStatusFlags } from \"@api/command/os/GetBatteryStatusCommand\";\nimport { type DeviceModelId } from \"@api/device/DeviceModel\";\nimport { type DeviceStatus } from \"@api/device/DeviceStatus\";\nimport { type Application } from \"@internal/manager-api/model/Application\";\n\n/**\n * The battery status of a device.\n */\nexport type BatteryStatus = {\n readonly level: number;\n readonly voltage: number;\n readonly temperature: number;\n readonly current: number;\n readonly status: BatteryStatusFlags;\n};\n\n/**\n * The firmware version of a device.\n */\nexport type FirmwareVersion = {\n /**\n * Microcontroller Unit version\n */\n readonly mcu: string;\n\n /**\n * Bootloader version\n */\n readonly bootloader: string;\n\n /**\n * Operating System version\n */\n readonly os: string;\n};\n\n/**\n * The current application running on a device. Alias of GetAppAndVersionResponse.\n */\nexport type RunningApp = GetAppAndVersionResponse;\n\n/**\n * The state types of a device session.\n */\nexport enum DeviceSessionStateType {\n Connected,\n ReadyWithoutSecureChannel,\n ReadyWithSecureChannel,\n}\n\ntype DeviceSessionBaseState = {\n readonly sessionStateType: DeviceSessionStateType;\n\n /**\n * The status of the device.\n */\n readonly deviceStatus: DeviceStatus;\n\n /**\n * The model of the device.\n */\n readonly deviceModelId: DeviceModelId;\n\n /**\n * The name of the device.\n */\n readonly deviceName?: string;\n};\n\ntype DeviceSessionReadyState = {\n /**\n * The battery status of the device.\n * TODO: This should not be optional, but it is not in the current implementation.\n */\n readonly batteryStatus?: BatteryStatus;\n\n /**\n * The firmware version of the device.\n * TODO: This should not be optional, but it is not in the current implementation.\n */\n readonly firmwareVersion?: FirmwareVersion;\n\n /**\n * The current application running on the device.\n */\n readonly currentApp: RunningApp;\n\n /**\n * The current applications installed on the device.\n */\n readonly installedApps: Application[];\n};\n\n/**\n * The state of a connected device session.\n */\nexport type ConnectedState = DeviceSessionBaseState & {\n /**\n * The type of the device session state.\n */\n readonly sessionStateType: DeviceSessionStateType.Connected;\n};\n\n/**\n * The state of a device session when it is ready without a secure channel.\n */\nexport type ReadyWithoutSecureChannelState = DeviceSessionBaseState &\n DeviceSessionReadyState & {\n /**\n * The type of the device session state.\n */\n readonly sessionStateType: DeviceSessionStateType.ReadyWithoutSecureChannel;\n };\n\n/**\n * The state of a device session when it is ready with a secure channel.\n */\nexport type ReadyWithSecureChannelState = DeviceSessionBaseState &\n DeviceSessionReadyState & {\n /**\n * The type of the device session state.\n */\n readonly sessionStateType: DeviceSessionStateType.ReadyWithSecureChannel;\n };\n\n/**\n * The state of a device session.\n */\nexport type DeviceSessionState =\n | ConnectedState\n | ReadyWithoutSecureChannelState\n | ReadyWithSecureChannelState;\n"],
4
+ "sourcesContent": ["import { type GetAppAndVersionResponse } from \"@api/command/os/GetAppAndVersionCommand\";\nimport { type BatteryStatusFlags } from \"@api/command/os/GetBatteryStatusCommand\";\nimport { type DeviceModelId } from \"@api/device/DeviceModel\";\nimport { type DeviceStatus } from \"@api/device/DeviceStatus\";\nimport { type Application } from \"@internal/manager-api/model/Application\";\n\n/**\n * The battery status of a device.\n */\nexport type BatteryStatus = {\n readonly level: number;\n readonly voltage: number;\n readonly temperature: number;\n readonly current: number;\n readonly status: BatteryStatusFlags;\n};\n\n/**\n * The firmware version of a device.\n */\nexport type FirmwareVersion = {\n /**\n * Microcontroller Unit version\n */\n readonly mcu: string;\n\n /**\n * Bootloader version\n */\n readonly bootloader: string;\n\n /**\n * Operating System version\n */\n readonly os: string;\n};\n\n/**\n * The current application running on a device. Alias of GetAppAndVersionResponse.\n */\nexport type RunningApp = GetAppAndVersionResponse;\n\n/**\n * The state types of a device session.\n */\nexport enum DeviceSessionStateType {\n Connected,\n ReadyWithoutSecureChannel,\n ReadyWithSecureChannel,\n}\n\ntype DeviceSessionBaseState = {\n readonly sessionStateType: DeviceSessionStateType;\n\n /**\n * The status of the device.\n */\n readonly deviceStatus: DeviceStatus;\n\n /**\n * The model of the device.\n */\n readonly deviceModelId: DeviceModelId;\n\n /**\n * The name of the device.\n */\n readonly deviceName?: string;\n};\n\ntype DeviceSessionReadyState = {\n /**\n * The battery status of the device.\n * TODO: This should not be optional, but it is not in the current implementation.\n */\n readonly batteryStatus?: BatteryStatus;\n\n /**\n * The firmware version of the device.\n * TODO: This should not be optional, but it is not in the current implementation.\n */\n readonly firmwareVersion?: FirmwareVersion;\n\n /**\n * The current application running on the device.\n */\n readonly currentApp: RunningApp;\n\n /**\n * The current applications installed on the device.\n */\n readonly installedApps: Application[];\n\n /**\n * The device is allowed to establish a secure connection.\n */\n readonly isSecureConnectionAllowed: boolean;\n};\n\n/**\n * The state of a connected device session.\n */\nexport type ConnectedState = DeviceSessionBaseState & {\n /**\n * The type of the device session state.\n */\n readonly sessionStateType: DeviceSessionStateType.Connected;\n};\n\n/**\n * The state of a device session when it is ready without a secure channel.\n */\nexport type ReadyWithoutSecureChannelState = DeviceSessionBaseState &\n DeviceSessionReadyState & {\n /**\n * The type of the device session state.\n */\n readonly sessionStateType: DeviceSessionStateType.ReadyWithoutSecureChannel;\n };\n\n/**\n * The state of a device session when it is ready with a secure channel.\n */\nexport type ReadyWithSecureChannelState = DeviceSessionBaseState &\n DeviceSessionReadyState & {\n /**\n * The type of the device session state.\n */\n readonly sessionStateType: DeviceSessionStateType.ReadyWithSecureChannel;\n };\n\n/**\n * The state of a device session.\n */\nexport type DeviceSessionState =\n | ConnectedState\n | ReadyWithoutSecureChannelState\n | ReadyWithSecureChannelState;\n"],
5
5
  "mappings": "AA6CO,IAAKA,OACVA,IAAA,yBACAA,IAAA,yDACAA,IAAA,mDAHUA,OAAA",
6
6
  "names": ["DeviceSessionStateType"]
7
7
  }
@@ -0,0 +1,2 @@
1
+ var p=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var v=(o,r,i,s)=>{for(var e=s>1?void 0:s?l(r,i):r,c=o.length-1,g;c>=0;c--)(g=o[c])&&(e=(s?g(r,i,e):g(e))||e);return s&&e&&p(r,i,e),e},n=(o,r)=>(i,s)=>r(i,s,o);import{inject as S,injectable as a}from"inversify";import{deviceSessionTypes as m}from"../../../internal/device-session/di/deviceSessionTypes";import{loggerTypes as d}from"../../../internal/logger-publisher/di/loggerTypes";let t=class{constructor(r,i){this._sessionService=r;this._logger=i("DisableDeviceSessionRefresherUseCase")}_logger;execute({sessionId:r,blockerId:i}){return this._sessionService.getDeviceSessionById(r).caseOf({Left:e=>{throw this._logger.error("Error getting device session",{data:{error:e}}),e},Right:e=>e.disableRefresher(i)})}};t=v([a(),n(0,S(m.DeviceSessionService)),n(1,S(d.LoggerPublisherServiceFactory))],t);export{t as DisableDeviceSessionRefresherUseCase};
2
+ //# sourceMappingURL=DisableDeviceSessionRefresher.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../src/api/device-session/use-case/DisableDeviceSessionRefresher.ts"],
4
+ "sourcesContent": ["import { inject, injectable } from \"inversify\";\n\nimport { type DeviceSessionId } from \"@api/device-session/types\";\nimport { LoggerPublisherService } from \"@api/logger-publisher/service/LoggerPublisherService\";\nimport { deviceSessionTypes } from \"@internal/device-session/di/deviceSessionTypes\";\nimport { type DeviceSessionService } from \"@internal/device-session/service/DeviceSessionService\";\nimport { loggerTypes } from \"@internal/logger-publisher/di/loggerTypes\";\n\nexport type DisableDeviceSessionRefresherUseCaseArgs = {\n sessionId: DeviceSessionId;\n blockerId: string;\n};\n\n/**\n * Disable the device session refresher.\n */\n@injectable()\nexport class DisableDeviceSessionRefresherUseCase {\n private readonly _logger: LoggerPublisherService;\n constructor(\n @inject(deviceSessionTypes.DeviceSessionService)\n private readonly _sessionService: DeviceSessionService,\n @inject(loggerTypes.LoggerPublisherServiceFactory)\n loggerFactory: (tag: string) => LoggerPublisherService,\n ) {\n this._logger = loggerFactory(\"DisableDeviceSessionRefresherUseCase\");\n }\n\n execute({ sessionId, blockerId }: DisableDeviceSessionRefresherUseCaseArgs) {\n const errorOrDeviceSession =\n this._sessionService.getDeviceSessionById(sessionId);\n\n return errorOrDeviceSession.caseOf({\n Left: (error) => {\n this._logger.error(\"Error getting device session\", { data: { error } });\n throw error;\n },\n // Return a function that can be used to reenable the refresher\n Right: (deviceSession) => deviceSession.disableRefresher(blockerId),\n });\n }\n}\n"],
5
+ "mappings": "iOAAA,OAAS,UAAAA,EAAQ,cAAAC,MAAkB,YAInC,OAAS,sBAAAC,MAA0B,iDAEnC,OAAS,eAAAC,MAAmB,4CAWrB,IAAMC,EAAN,KAA2C,CAEhD,YAEmBC,EAEjBC,EACA,CAHiB,qBAAAD,EAIjB,KAAK,QAAUC,EAAc,sCAAsC,CACrE,CARiB,QAUjB,QAAQ,CAAE,UAAAC,EAAW,UAAAC,CAAU,EAA6C,CAI1E,OAFE,KAAK,gBAAgB,qBAAqBD,CAAS,EAEzB,OAAO,CACjC,KAAOE,GAAU,CACf,WAAK,QAAQ,MAAM,+BAAgC,CAAE,KAAM,CAAE,MAAAA,CAAM,CAAE,CAAC,EAChEA,CACR,EAEA,MAAQC,GAAkBA,EAAc,iBAAiBF,CAAS,CACpE,CAAC,CACH,CACF,EAxBaJ,EAANO,EAAA,CADNC,EAAW,EAIPC,EAAA,EAAAC,EAAOC,EAAmB,oBAAoB,GAE9CF,EAAA,EAAAC,EAAOE,EAAY,6BAA6B,IALxCZ",
6
+ "names": ["inject", "injectable", "deviceSessionTypes", "loggerTypes", "DisableDeviceSessionRefresherUseCase", "_sessionService", "loggerFactory", "sessionId", "blockerId", "error", "deviceSession", "__decorateClass", "injectable", "__decorateParam", "inject", "deviceSessionTypes", "loggerTypes"]
7
+ }
@@ -0,0 +1,2 @@
1
+ import{DEVICE_SESSION_REFRESHER_DEFAULT_OPTIONS as f}from"../../../internal/device-session/data/DeviceSessionRefresherConst";import{deviceSessionStubBuilder as l}from"../../../internal/device-session/model/DeviceSession.stub";import{DeviceSessionNotFound as S}from"../../../internal/device-session/model/Errors";import{DefaultDeviceSessionService as m}from"../../../internal/device-session/service/DefaultDeviceSessionService";import{DefaultLoggerPublisherService as v}from"../../../internal/logger-publisher/service/DefaultLoggerPublisherService";import{AxiosManagerApiDataSource as d}from"../../../internal/manager-api/data/AxiosManagerApiDataSource";import{DefaultManagerApiService as p}from"../../../internal/manager-api/service/DefaultManagerApiService";import{DefaultSecureChannelDataSource as u}from"../../../internal/secure-channel/data/DefaultSecureChannelDataSource";import{DefaultSecureChannelService as D}from"../../../internal/secure-channel/service/DefaultSecureChannelService";import{DisableDeviceSessionRefresherUseCase as n}from"./DisableDeviceSessionRefresher";vi.mock("uuid",()=>({v4:()=>"fakeUuid"}));let e,r,i,o,t,c;describe("DisableDeviceSessionRefresherUseCase",()=>{beforeEach(()=>{e=new v([],"get-connected-device-use-case-test"),r=new m(()=>e),t=new p(new d({})),c=new D(new u({}))}),afterEach(()=>{vi.clearAllMocks()}),describe("execute",()=>{it("should disable the device session refresher and return a function to reenable it",()=>{o=l({id:"fakeSessionId"},()=>e,t,c,f),r.addDeviceSession(o),i=new n(r,()=>e);const s=vi.spyOn(o,"disableRefresher"),a=i.execute({sessionId:"fakeSessionId",blockerId:"fakeBlockerId"});expect(s).toHaveBeenCalledWith("fakeBlockerId"),a(),o.close()}),it("should throw error when deviceSession is not found",()=>{i=new n(r,()=>e);try{i.execute({sessionId:"fakeSessionId",blockerId:"fakeBlockerId"})}catch(s){expect(s).toBeInstanceOf(S)}})})});
2
+ //# sourceMappingURL=DisableDeviceSessionRefresher.test.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../src/api/device-session/use-case/DisableDeviceSessionRefresher.test.ts"],
4
+ "sourcesContent": ["import { type DmkConfig } from \"@api/DmkConfig\";\nimport { type LoggerPublisherService } from \"@api/logger-publisher/service/LoggerPublisherService\";\nimport { DEVICE_SESSION_REFRESHER_DEFAULT_OPTIONS } from \"@internal/device-session/data/DeviceSessionRefresherConst\";\nimport { type DeviceSession } from \"@internal/device-session/model/DeviceSession\";\nimport { deviceSessionStubBuilder } from \"@internal/device-session/model/DeviceSession.stub\";\nimport { DeviceSessionNotFound } from \"@internal/device-session/model/Errors\";\nimport { DefaultDeviceSessionService } from \"@internal/device-session/service/DefaultDeviceSessionService\";\nimport { type DeviceSessionService } from \"@internal/device-session/service/DeviceSessionService\";\nimport { DefaultLoggerPublisherService } from \"@internal/logger-publisher/service/DefaultLoggerPublisherService\";\nimport { AxiosManagerApiDataSource } from \"@internal/manager-api/data/AxiosManagerApiDataSource\";\nimport { DefaultManagerApiService } from \"@internal/manager-api/service/DefaultManagerApiService\";\nimport { type ManagerApiService } from \"@internal/manager-api/service/ManagerApiService\";\nimport { DefaultSecureChannelDataSource } from \"@internal/secure-channel/data/DefaultSecureChannelDataSource\";\nimport { DefaultSecureChannelService } from \"@internal/secure-channel/service/DefaultSecureChannelService\";\nimport { type SecureChannelService } from \"@internal/secure-channel/service/SecureChannelService\";\n\nimport { DisableDeviceSessionRefresherUseCase } from \"./DisableDeviceSessionRefresher\";\n\nvi.mock(\"uuid\", () => ({\n v4: () => \"fakeUuid\",\n}));\n\nlet logger: LoggerPublisherService;\nlet sessionService: DeviceSessionService;\nlet useCase: DisableDeviceSessionRefresherUseCase;\nlet deviceSession: DeviceSession;\nlet managerApi: ManagerApiService;\nlet secureChannel: SecureChannelService;\ndescribe(\"DisableDeviceSessionRefresherUseCase\", () => {\n beforeEach(() => {\n logger = new DefaultLoggerPublisherService(\n [],\n \"get-connected-device-use-case-test\",\n );\n sessionService = new DefaultDeviceSessionService(() => logger);\n managerApi = new DefaultManagerApiService(\n new AxiosManagerApiDataSource({} as DmkConfig),\n );\n secureChannel = new DefaultSecureChannelService(\n new DefaultSecureChannelDataSource({} as DmkConfig),\n );\n });\n\n afterEach(() => {\n vi.clearAllMocks();\n });\n\n describe(\"execute\", () => {\n it(\"should disable the device session refresher and return a function to reenable it\", () => {\n // given\n deviceSession = deviceSessionStubBuilder(\n { id: \"fakeSessionId\" },\n () => logger,\n managerApi,\n secureChannel,\n DEVICE_SESSION_REFRESHER_DEFAULT_OPTIONS,\n );\n sessionService.addDeviceSession(deviceSession);\n useCase = new DisableDeviceSessionRefresherUseCase(\n sessionService,\n () => logger,\n );\n\n const spy = vi.spyOn(deviceSession, \"disableRefresher\");\n\n // when\n const reenableRefresher = useCase.execute({\n sessionId: \"fakeSessionId\",\n blockerId: \"fakeBlockerId\",\n });\n\n // then\n expect(spy).toHaveBeenCalledWith(\"fakeBlockerId\");\n reenableRefresher();\n deviceSession.close();\n });\n\n it(\"should throw error when deviceSession is not found\", () => {\n // given\n useCase = new DisableDeviceSessionRefresherUseCase(\n sessionService,\n () => logger,\n );\n\n // when\n try {\n useCase.execute({\n sessionId: \"fakeSessionId\",\n blockerId: \"fakeBlockerId\",\n });\n } catch (error) {\n // then\n expect(error).toBeInstanceOf(DeviceSessionNotFound);\n }\n });\n });\n});\n"],
5
+ "mappings": "AAEA,OAAS,4CAAAA,MAAgD,4DAEzD,OAAS,4BAAAC,MAAgC,oDACzC,OAAS,yBAAAC,MAA6B,wCACtC,OAAS,+BAAAC,MAAmC,+DAE5C,OAAS,iCAAAC,MAAqC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TIONS", "deviceSessionStubBuilder", "DeviceSessionNotFound", "DefaultDeviceSessionService", "DefaultLoggerPublisherService", "AxiosManagerApiDataSource", "DefaultManagerApiService", "DefaultSecureChannelDataSource", "DefaultSecureChannelService", "DisableDeviceSessionRefresherUseCase", "logger", "sessionService", "useCase", "deviceSession", "managerApi", "secureChannel", "spy", "reenableRefresher", "error"]
7
+ }
@@ -1,2 +1,2 @@
1
- import{Apdu as o}from"./apdu/model/Apdu";import{APDU_MAX_PAYLOAD as p,ApduBuilder as m}from"./apdu/utils/ApduBuilder";import{ApduParser as n}from"./apdu/utils/ApduParser";export*from"./apdu/utils/AppBuilderError";import{ByteArrayBuilder as f}from"./apdu/utils/ByteArrayBuilder";import{ByteArrayParser as c}from"./apdu/utils/ByteArrayParser";import{InvalidStatusWordError as A}from"./command/Errors";import{CommandResultFactory as D,CommandResultStatus as S,isSuccessCommandResult as v}from"./command/model/CommandResult";import{CloseAppCommand as y}from"./command/os/CloseAppCommand";import{GetAppAndVersionCommand as g}from"./command/os/GetAppAndVersionCommand";import{BatteryStatusType as L,GetBatteryStatusCommand as G}from"./command/os/GetBatteryStatusCommand";import{GetOsVersionCommand as E}from"./command/os/GetOsVersionCommand";import{ListAppsCommand as M}from"./command/os/ListAppsCommand";import{OpenAppCommand as I}from"./command/os/OpenAppCommand";import{isCommandErrorCode as U}from"./command/utils/CommandErrors";import{CommandUtils as h}from"./command/utils/CommandUtils";import{GlobalCommandError as _,GlobalCommandErrorHandler as H}from"./command/utils/GlobalCommandError";import{DeviceModel as F,DeviceModelId as K,LEDGER_VENDOR_ID as X}from"./device/DeviceModel";import{DeviceStatus as q}from"./device/DeviceStatus";import{DeviceActionStatus as N}from"./device-action/model/DeviceActionState";import{UserInteractionRequired as j}from"./device-action/model/UserInteractionRequired";import{UnknownDAError as J}from"./device-action/os/Errors";import{GetDeviceStatusDeviceAction as Z}from"./device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction";import{GoToDashboardDeviceAction as ee}from"./device-action/os/GoToDashboard/GoToDashboardDeviceAction";import{ListAppsDeviceAction as oe}from"./device-action/os/ListApps/ListAppsDeviceAction";import{ListAppsWithMetadataDeviceAction as pe}from"./device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction";import{OpenAppDeviceAction as ie}from"./device-action/os/OpenAppDeviceAction/OpenAppDeviceAction";import{SendCommandInAppDeviceAction as se}from"./device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction";import{XStateDeviceAction as fe}from"./device-action/xstate-utils/XStateDeviceAction";import{StaticDeviceModelDataSource as ce}from"./device-model/data/StaticDeviceModelDataSource";import{BleDeviceInfos as Ae}from"./device-model/model/BleDeviceInfos";import{TransportDeviceModel as De}from"./device-model/model/DeviceModel";import{ApduResponse as ve}from"./device-session/ApduResponse";export*from"./device-session/data/FramerConst";import{DeviceSessionStateType as Ce}from"./device-session/DeviceSessionState";import{defaultApduReceiverServiceStubBuilder as Be}from"./device-session/service/DefaultApduReceiverService.stub";import{defaultApduSenderServiceStubBuilder as Ge}from"./device-session/service/DefaultApduSenderService.stub";import{FramerUtils as Ee}from"./device-session/utils/FramerUtils";import{DeviceManagementKit as Me}from"./DeviceManagementKit";import{DeviceManagementKitBuilder as Ie}from"./DeviceManagementKitBuilder";export*from"./Error";import{LogLevel as Ve}from"./logger-subscriber/model/LogLevel";import{ConsoleLogger as Pe}from"./logger-subscriber/service/ConsoleLogger";import{WebLogsExporterLogger as He}from"./logger-subscriber/service/WebLogsExporterLogger";import{ConnectedDevice as Fe}from"./transport/model/ConnectedDevice";export*from"./transport/model/Errors";import{TransportConnectedDevice as ke}from"./transport/model/TransportConnectedDevice";import{connectedDeviceStubBuilder as we}from"./transport/model/TransportConnectedDevice.stub";export*from"./types";import{base64StringToBuffer as je,isBase64String as ze}from"./utils/Base64String";import{bufferToHexaString as Qe,hexaStringToBuffer as Ze,isHexaString as $e}from"./utils/HexaString";export{p as APDU_MAX_PAYLOAD,o as Apdu,m as ApduBuilder,n as ApduParser,ve as ApduResponse,L as BatteryStatusType,Ae as BleDeviceInfos,f as ByteArrayBuilder,c as ByteArrayParser,y as CloseAppCommand,D as CommandResultFactory,S as CommandResultStatus,h as CommandUtils,Fe as ConnectedDevice,Pe as ConsoleLogger,N as DeviceActionStatus,Me as DeviceManagementKit,Ie as DeviceManagementKitBuilder,F as DeviceModel,K as DeviceModelId,Ce as DeviceSessionStateType,q as DeviceStatus,Ee as FramerUtils,g as GetAppAndVersionCommand,G as GetBatteryStatusCommand,Z as GetDeviceStatusDeviceAction,E as GetOsVersionCommand,_ as GlobalCommandError,H as GlobalCommandErrorHandler,ee as GoToDashboardDeviceAction,A as InvalidStatusWordError,X as LEDGER_VENDOR_ID,M as ListAppsCommand,oe as ListAppsDeviceAction,pe as ListAppsWithMetadataDeviceAction,Ve as LogLevel,I as OpenAppCommand,ie as OpenAppDeviceAction,se as SendCommandInAppDeviceAction,ce as StaticDeviceModelDataSource,ke as TransportConnectedDevice,De as TransportDeviceModel,J as UnknownDAError,j as UserInteractionRequired,He as WebLogsExporterLogger,fe as XStateDeviceAction,je as base64StringToBuffer,Qe as bufferToHexaString,we as connectedDeviceStubBuilder,Be as defaultApduReceiverServiceStubBuilder,Ge as defaultApduSenderServiceStubBuilder,Ze as hexaStringToBuffer,ze as isBase64String,U as isCommandErrorCode,$e as isHexaString,v as isSuccessCommandResult};
1
+ import{Apdu as r}from"./apdu/model/Apdu";import{APDU_MAX_PAYLOAD as p,ApduBuilder as i}from"./apdu/utils/ApduBuilder";import{ApduParser as n}from"./apdu/utils/ApduParser";export*from"./apdu/utils/AppBuilderError";import{ByteArrayBuilder as f}from"./apdu/utils/ByteArrayBuilder";import{ByteArrayParser as x}from"./apdu/utils/ByteArrayParser";import{InvalidStatusWordError as A}from"./command/Errors";import{CommandResultFactory as u,CommandResultStatus as l,isSuccessCommandResult as v}from"./command/model/CommandResult";import{CloseAppCommand as C}from"./command/os/CloseAppCommand";import{GetAppAndVersionCommand as g}from"./command/os/GetAppAndVersionCommand";import{BatteryStatusType as B,GetBatteryStatusCommand as G}from"./command/os/GetBatteryStatusCommand";import{GetOsVersionCommand as E}from"./command/os/GetOsVersionCommand";import{ListAppsCommand as I}from"./command/os/ListAppsCommand";import{LoadCertificateCommand as T}from"./command/os/LoadCertificateCommand";import{OpenAppCommand as O}from"./command/os/OpenAppCommand";import{isCommandErrorCode as P}from"./command/utils/CommandErrors";import{CommandUtils as _}from"./command/utils/CommandUtils";import{GlobalCommandError as H,GlobalCommandErrorHandler as W}from"./command/utils/GlobalCommandError";import{DeviceModel as K,DeviceModelId as X,LEDGER_VENDOR_ID as q}from"./device/DeviceModel";import{DeviceStatus as N}from"./device/DeviceStatus";import{DeviceActionStatus as j}from"./device-action/model/DeviceActionState";import{UserInteractionRequired as J}from"./device-action/model/UserInteractionRequired";import{CallTaskInAppDeviceAction as Z}from"./device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction";import{UnknownDAError as ee}from"./device-action/os/Errors";import{GetDeviceStatusDeviceAction as re}from"./device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction";import{GoToDashboardDeviceAction as pe}from"./device-action/os/GoToDashboard/GoToDashboardDeviceAction";import{ListAppsDeviceAction as me}from"./device-action/os/ListApps/ListAppsDeviceAction";import{ListAppsWithMetadataDeviceAction as ae}from"./device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction";import{OpenAppDeviceAction as fe}from"./device-action/os/OpenAppDeviceAction/OpenAppDeviceAction";import{SendCommandInAppDeviceAction as xe}from"./device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction";import{XStateDeviceAction as Ae}from"./device-action/xstate-utils/XStateDeviceAction";import{StaticDeviceModelDataSource as ue}from"./device-model/data/StaticDeviceModelDataSource";import{BleDeviceInfos as ve}from"./device-model/model/BleDeviceInfos";import{TransportDeviceModel as Ce}from"./device-model/model/DeviceModel";import{ApduResponse as ge}from"./device-session/ApduResponse";export*from"./device-session/data/FramerConst";import{DeviceSessionStateType as Ge}from"./device-session/DeviceSessionState";import{GenuineCheckDeviceAction as Ee}from"./secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction";import{InstallAppDeviceAction as Ie}from"./secure-channel/device-action/InstallApp/InstallAppDeviceAction";import{ListInstalledAppsDeviceAction as Te}from"./secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction";import{UninstallAppDeviceAction as Oe}from"./secure-channel/device-action/UninstallApp/UninstallAppDeviceAction";import{defaultApduReceiverServiceStubBuilder as Pe}from"./device-session/service/DefaultApduReceiverService.stub";import{defaultApduSenderServiceStubBuilder as _e}from"./device-session/service/DefaultApduSenderService.stub";import{FramerUtils as He}from"./device-session/utils/FramerUtils";import{DeviceManagementKit as Fe}from"./DeviceManagementKit";import{DeviceManagementKitBuilder as Xe}from"./DeviceManagementKitBuilder";export*from"./Error";import{LogLevel as Ne}from"./logger-subscriber/model/LogLevel";import{ConsoleLogger as je}from"./logger-subscriber/service/ConsoleLogger";import{WebLogsExporterLogger as Je}from"./logger-subscriber/service/WebLogsExporterLogger";import{ConnectedDevice as Ze}from"./transport/model/ConnectedDevice";import{DeviceConnectionStateMachine as eo}from"./transport/model/DeviceConnectionStateMachine";export*from"./transport/model/Errors";import{TransportConnectedDevice as to}from"./transport/model/TransportConnectedDevice";import{connectedDeviceStubBuilder as io}from"./transport/model/TransportConnectedDevice.stub";export*from"./types";import{base64StringToBuffer as ao,isBase64String as so}from"./utils/Base64String";import{bufferToHexaString as co,hexaStringToBuffer as xo,isHexaString as Ao}from"./utils/HexaString";export{p as APDU_MAX_PAYLOAD,r as Apdu,i as ApduBuilder,n as ApduParser,ge as ApduResponse,B as BatteryStatusType,ve as BleDeviceInfos,f as ByteArrayBuilder,x as ByteArrayParser,Z as CallTaskInAppDeviceAction,C as CloseAppCommand,u as CommandResultFactory,l as CommandResultStatus,_ as CommandUtils,Ze as ConnectedDevice,je as ConsoleLogger,j as DeviceActionStatus,eo as DeviceConnectionStateMachine,Fe as DeviceManagementKit,Xe as DeviceManagementKitBuilder,K as DeviceModel,X as DeviceModelId,Ge as DeviceSessionStateType,N as DeviceStatus,He as FramerUtils,Ee as GenuineCheckDeviceAction,g as GetAppAndVersionCommand,G as GetBatteryStatusCommand,re as GetDeviceStatusDeviceAction,E as GetOsVersionCommand,H as GlobalCommandError,W as GlobalCommandErrorHandler,pe as GoToDashboardDeviceAction,Ie as InstallAppDeviceAction,A as InvalidStatusWordError,q as LEDGER_VENDOR_ID,I as ListAppsCommand,me as ListAppsDeviceAction,ae as ListAppsWithMetadataDeviceAction,Te as ListInstalledAppsDeviceAction,T as LoadCertificateCommand,Ne as LogLevel,O as OpenAppCommand,fe as OpenAppDeviceAction,xe as SendCommandInAppDeviceAction,ue as StaticDeviceModelDataSource,to as TransportConnectedDevice,Ce as TransportDeviceModel,Oe as UninstallAppDeviceAction,ee as UnknownDAError,J as UserInteractionRequired,Je as WebLogsExporterLogger,Ae as XStateDeviceAction,ao as base64StringToBuffer,co as bufferToHexaString,io as connectedDeviceStubBuilder,Pe as defaultApduReceiverServiceStubBuilder,_e as defaultApduSenderServiceStubBuilder,xo as hexaStringToBuffer,so as isBase64String,P as isCommandErrorCode,Ao as isHexaString,v as isSuccessCommandResult};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/api/index.ts"],
4
- "sourcesContent": ["\"use strict\";\n\nexport { Apdu } from \"@api/apdu/model/Apdu\";\nexport { APDU_MAX_PAYLOAD, ApduBuilder } from \"@api/apdu/utils/ApduBuilder\";\nexport { ApduParser } from \"@api/apdu/utils/ApduParser\";\nexport * from \"@api/apdu/utils/AppBuilderError\";\nexport { ByteArrayBuilder } from \"@api/apdu/utils/ByteArrayBuilder\";\nexport { ByteArrayParser } from \"@api/apdu/utils/ByteArrayParser\";\nexport { InvalidStatusWordError } from \"@api/command/Errors\";\nexport {\n CommandResultFactory,\n CommandResultStatus,\n isSuccessCommandResult,\n} from \"@api/command/model/CommandResult\";\nexport { CloseAppCommand } from \"@api/command/os/CloseAppCommand\";\nexport {\n GetAppAndVersionCommand,\n type GetAppAndVersionResponse,\n} from \"@api/command/os/GetAppAndVersionCommand\";\nexport {\n BatteryStatusType,\n type GetBatteryStatusArgs,\n GetBatteryStatusCommand,\n type GetBatteryStatusResponse,\n} from \"@api/command/os/GetBatteryStatusCommand\";\nexport {\n GetOsVersionCommand,\n type GetOsVersionResponse,\n} from \"@api/command/os/GetOsVersionCommand\";\nexport {\n type ListAppsArgs,\n ListAppsCommand,\n type ListAppsErrorCodes,\n type ListAppsResponse,\n} from \"@api/command/os/ListAppsCommand\";\nexport {\n type OpenAppArgs,\n OpenAppCommand,\n} from \"@api/command/os/OpenAppCommand\";\nexport { isCommandErrorCode } from \"@api/command/utils/CommandErrors\";\nexport { CommandUtils } from \"@api/command/utils/CommandUtils\";\nexport {\n GlobalCommandError,\n GlobalCommandErrorHandler,\n} from \"@api/command/utils/GlobalCommandError\";\nexport {\n DeviceModel,\n DeviceModelId,\n LEDGER_VENDOR_ID,\n} from \"@api/device/DeviceModel\";\nexport { DeviceStatus } from \"@api/device/DeviceStatus\";\nexport { type InternalApi } from \"@api/device-action/DeviceAction\";\nexport {\n type DeviceActionState,\n DeviceActionStatus,\n} from \"@api/device-action/model/DeviceActionState\";\nexport { UserInteractionRequired } from \"@api/device-action/model/UserInteractionRequired\";\nexport { UnknownDAError } from \"@api/device-action/os/Errors\";\nexport { GetDeviceStatusDeviceAction } from \"@api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction\";\nexport { GoToDashboardDeviceAction } from \"@api/device-action/os/GoToDashboard/GoToDashboardDeviceAction\";\nexport { ListAppsDeviceAction } from \"@api/device-action/os/ListApps/ListAppsDeviceAction\";\nexport { ListAppsWithMetadataDeviceAction } from \"@api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction\";\nexport { OpenAppDeviceAction } from \"@api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction\";\nexport { SendCommandInAppDeviceAction } from \"@api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction\";\nexport {\n type DeviceActionStateMachine,\n XStateDeviceAction,\n} from \"@api/device-action/xstate-utils/XStateDeviceAction\";\nexport { StaticDeviceModelDataSource } from \"@api/device-model/data/StaticDeviceModelDataSource\";\nexport { BleDeviceInfos } from \"@api/device-model/model/BleDeviceInfos\";\nexport { TransportDeviceModel } from \"@api/device-model/model/DeviceModel\";\nexport { ApduResponse } from \"@api/device-session/ApduResponse\";\nexport * from \"@api/device-session/data/FramerConst\";\nexport {\n type DeviceSessionState,\n DeviceSessionStateType,\n} from \"@api/device-session/DeviceSessionState\";\n// TODO: remove from exported\nexport { defaultApduReceiverServiceStubBuilder } from \"@api/device-session/service/DefaultApduReceiverService.stub\";\nexport { defaultApduSenderServiceStubBuilder } from \"@api/device-session/service/DefaultApduSenderService.stub\";\nexport { FramerUtils } from \"@api/device-session/utils/FramerUtils\";\nexport { DeviceManagementKit } from \"@api/DeviceManagementKit\";\nexport { DeviceManagementKitBuilder } from \"@api/DeviceManagementKitBuilder\";\nexport * from \"@api/Error\";\nexport { LogLevel } from \"@api/logger-subscriber/model/LogLevel\";\nexport { ConsoleLogger } from \"@api/logger-subscriber/service/ConsoleLogger\";\nexport { WebLogsExporterLogger } from \"@api/logger-subscriber/service/WebLogsExporterLogger\";\nexport { ConnectedDevice } from \"@api/transport/model/ConnectedDevice\";\nexport * from \"@api/transport/model/Errors\";\nexport { TransportConnectedDevice } from \"@api/transport/model/TransportConnectedDevice\";\nexport { connectedDeviceStubBuilder } from \"@api/transport/model/TransportConnectedDevice.stub\";\nexport * from \"@api/types\";\nexport { base64StringToBuffer, isBase64String } from \"@api/utils/Base64String\";\nexport {\n bufferToHexaString,\n hexaStringToBuffer,\n isHexaString,\n} from \"@api/utils/HexaString\";\n"],
5
- "mappings": "AAEA,OAAS,QAAAA,MAAY,uBACrB,OAAS,oBAAAC,EAAkB,eAAAC,MAAmB,8BA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AAuB,uCAChC,WAAc,8BACd,OAAS,4BAAAC,OAAgC,gDACzC,OAAS,8BAAAC,OAAkC,qDAC3C,WAAc,aACd,OAAS,wBAAAC,GAAsB,kBAAAC,OAAsB,0BACrD,OACE,sBAAAC,GACA,sBAAAC,GACA,gBAAAC,OACK",
6
- "names": ["Apdu", "APDU_MAX_PAYLOAD", "ApduBuilder", "ApduParser", "ByteArrayBuilder", "ByteArrayParser", "InvalidStatusWordError", "CommandResultFactory", "CommandResultStatus", "isSuccessCommandResult", "CloseAppCommand", "GetAppAndVersionCommand", "BatteryStatusType", "GetBatteryStatusCommand", "GetOsVersionCommand", "ListAppsCommand", "OpenAppCommand", "isCommandErrorCode", "CommandUtils", "GlobalCommandError", "GlobalCommandErrorHandler", "DeviceModel", "DeviceModelId", "LEDGER_VENDOR_ID", "DeviceStatus", "DeviceActionStatus", "UserInteractionRequired", "UnknownDAError", "GetDeviceStatusDeviceAction", "GoToDashboardDeviceAction", "ListAppsDeviceAction", "ListAppsWithMetadataDeviceAction", "OpenAppDeviceAction", "SendCommandInAppDeviceAction", "XStateDeviceAction", "StaticDeviceModelDataSource", "BleDeviceInfos", "TransportDeviceModel", "ApduResponse", "DeviceSessionStateType", "defaultApduReceiverServiceStubBuilder", "defaultApduSenderServiceStubBuilder", "FramerUtils", "DeviceManagementKit", "DeviceManagementKitBuilder", "LogLevel", "ConsoleLogger", "WebLogsExporterLogger", "ConnectedDevice", "TransportConnectedDevice", "connectedDeviceStubBuilder", "base64StringToBuffer", "isBase64String", "bufferToHexaString", "hexaStringToBuffer", "isHexaString"]
4
+ "sourcesContent": ["\"use strict\";\n\nexport { Apdu } from \"@api/apdu/model/Apdu\";\nexport { APDU_MAX_PAYLOAD, ApduBuilder } from \"@api/apdu/utils/ApduBuilder\";\nexport { ApduParser } from \"@api/apdu/utils/ApduParser\";\nexport * from \"@api/apdu/utils/AppBuilderError\";\nexport { ByteArrayBuilder } from \"@api/apdu/utils/ByteArrayBuilder\";\nexport { ByteArrayParser } from \"@api/apdu/utils/ByteArrayParser\";\nexport { InvalidStatusWordError } from \"@api/command/Errors\";\nexport {\n CommandResultFactory,\n CommandResultStatus,\n isSuccessCommandResult,\n} from \"@api/command/model/CommandResult\";\nexport { CloseAppCommand } from \"@api/command/os/CloseAppCommand\";\nexport {\n GetAppAndVersionCommand,\n type GetAppAndVersionResponse,\n} from \"@api/command/os/GetAppAndVersionCommand\";\nexport {\n BatteryStatusType,\n type GetBatteryStatusArgs,\n GetBatteryStatusCommand,\n type GetBatteryStatusResponse,\n} from \"@api/command/os/GetBatteryStatusCommand\";\nexport {\n GetOsVersionCommand,\n type GetOsVersionResponse,\n} from \"@api/command/os/GetOsVersionCommand\";\nexport {\n type ListAppsArgs,\n ListAppsCommand,\n type ListAppsErrorCodes,\n type ListAppsResponse,\n} from \"@api/command/os/ListAppsCommand\";\nexport {\n type LoadCertificateArgs,\n LoadCertificateCommand,\n type LoadCertificateErrorCodes,\n} from \"@api/command/os/LoadCertificateCommand\";\nexport {\n type OpenAppArgs,\n OpenAppCommand,\n} from \"@api/command/os/OpenAppCommand\";\nexport { isCommandErrorCode } from \"@api/command/utils/CommandErrors\";\nexport { CommandUtils } from \"@api/command/utils/CommandUtils\";\nexport {\n GlobalCommandError,\n GlobalCommandErrorHandler,\n} from \"@api/command/utils/GlobalCommandError\";\nexport {\n DeviceModel,\n DeviceModelId,\n LEDGER_VENDOR_ID,\n} from \"@api/device/DeviceModel\";\nexport { DeviceStatus } from \"@api/device/DeviceStatus\";\nexport { type InternalApi } from \"@api/device-action/DeviceAction\";\nexport {\n type DeviceActionState,\n DeviceActionStatus,\n} from \"@api/device-action/model/DeviceActionState\";\nexport { UserInteractionRequired } from \"@api/device-action/model/UserInteractionRequired\";\nexport { CallTaskInAppDeviceAction } from \"@api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction\";\nexport { UnknownDAError } from \"@api/device-action/os/Errors\";\nexport { GetDeviceStatusDeviceAction } from \"@api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction\";\nexport { GoToDashboardDeviceAction } from \"@api/device-action/os/GoToDashboard/GoToDashboardDeviceAction\";\nexport { ListAppsDeviceAction } from \"@api/device-action/os/ListApps/ListAppsDeviceAction\";\nexport { ListAppsWithMetadataDeviceAction } from \"@api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction\";\nexport { OpenAppDeviceAction } from \"@api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction\";\nexport { SendCommandInAppDeviceAction } from \"@api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction\";\nexport {\n type DeviceActionStateMachine,\n XStateDeviceAction,\n} from \"@api/device-action/xstate-utils/XStateDeviceAction\";\nexport { StaticDeviceModelDataSource } from \"@api/device-model/data/StaticDeviceModelDataSource\";\nexport { BleDeviceInfos } from \"@api/device-model/model/BleDeviceInfos\";\nexport { TransportDeviceModel } from \"@api/device-model/model/DeviceModel\";\nexport { ApduResponse } from \"@api/device-session/ApduResponse\";\nexport * from \"@api/device-session/data/FramerConst\";\nexport {\n type DeviceSessionState,\n DeviceSessionStateType,\n} from \"@api/device-session/DeviceSessionState\";\nexport { GenuineCheckDeviceAction } from \"@api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction\";\nexport { InstallAppDeviceAction } from \"@api/secure-channel/device-action/InstallApp/InstallAppDeviceAction\";\nexport { ListInstalledAppsDeviceAction } from \"@api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction\";\nexport { UninstallAppDeviceAction } from \"@api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction\";\n// TODO: remove from exported\nexport { defaultApduReceiverServiceStubBuilder } from \"@api/device-session/service/DefaultApduReceiverService.stub\";\nexport { defaultApduSenderServiceStubBuilder } from \"@api/device-session/service/DefaultApduSenderService.stub\";\nexport { FramerUtils } from \"@api/device-session/utils/FramerUtils\";\nexport { DeviceManagementKit } from \"@api/DeviceManagementKit\";\nexport { DeviceManagementKitBuilder } from \"@api/DeviceManagementKitBuilder\";\nexport * from \"@api/Error\";\nexport { LogLevel } from \"@api/logger-subscriber/model/LogLevel\";\nexport { ConsoleLogger } from \"@api/logger-subscriber/service/ConsoleLogger\";\nexport { WebLogsExporterLogger } from \"@api/logger-subscriber/service/WebLogsExporterLogger\";\nexport { ConnectedDevice } from \"@api/transport/model/ConnectedDevice\";\nexport {\n DeviceConnectionStateMachine,\n type DeviceConnectionStateMachineParams,\n} from \"@api/transport/model/DeviceConnectionStateMachine\";\nexport * from \"@api/transport/model/Errors\";\nexport { TransportConnectedDevice } from \"@api/transport/model/TransportConnectedDevice\";\nexport { connectedDeviceStubBuilder } from \"@api/transport/model/TransportConnectedDevice.stub\";\nexport * from \"@api/types\";\nexport { base64StringToBuffer, isBase64String } from \"@api/utils/Base64String\";\nexport {\n bufferToHexaString,\n hexaStringToBuffer,\n isHexaString,\n} from \"@api/utils/HexaString\";\n"],
5
+ "mappings": "AAEA,OAAS,QAAAA,MAAY,uBACrB,OAAS,oBAAAC,EAAkB,eAAAC,MAAmB,8BAC9C,OAAS,cAAAC,MAAkB,6BAC3B,WAAc,kCACd,OAAS,oBAAAC,MAAwB,mCACjC,OAAS,mBAAAC,MAAuB,kCAChC,OAAS,0BAAAC,MAA8B,sBACvC,OACE,wBAAAC,EACA,uBAAAC,EACA,0BAAAC,MACK,mCACP,OAAS,mBAAAC,MAAuB,kCAChC,OACE,2BAAAC,MAEK,0CACP,OACE,qBAAAC,EAEA,2BAAAC,MAEK,0CACP,OACE,uBAAAC,MAEK,sCACP,OAEE,mBAAAC,MAGK,kCACP,OAEE,0BAAAC,MAEK,yCACP,OAEE,kBAAAC,MACK,iCACP,OAAS,sBAAAC,MAA0B,mCACnC,OAAS,gBAAAC,MAAoB,kCAC7B,OACE,sBAAAC,EACA,6BAAAC,MACK,wCACP,OACE,eAAAC,EACA,iBAAAC,EACA,oBAAAC,MACK,0BACP,OAAS,gBAAAC,MAAoB,2BAE7B,OAEE,sBAAAC,MACK,6CACP,OAAS,2BAAAC,MAA+B,mDACxC,OAAS,6BAAAC,MAAiC,4EAC1C,OAAS,kBAAAC,OAAsB,+BAC/B,OAAS,+BAAAC,OAAmC,oEAC5C,OAAS,6BAAAC,OAAiC,gEAC1C,OAAS,wBAAAC,OAA4B,sDACrC,OAAS,oCAAAC,OAAwC,8EACjD,OAAS,uBAAAC,OAA2B,gEACpC,OAAS,gCAAAC,OAAoC,kFAC7C,OAEE,sBAAAC,OACK,qDACP,OAAS,+BAAAC,OAAmC,qDAC5C,OAAS,kBAAAC,OAAsB,yCAC/B,OAAS,wBAAAC,OAA4B,sCACrC,OAAS,gBAAAC,OAAoB,mCAC7B,WAAc,uCACd,OAEE,0BAAAC,OACK,yCACP,OAAS,4BAAAC,OAAgC,0EACzC,OAAS,0BAAAC,OAA8B,sEACvC,OAAS,iCAAAC,OAAqC,oFAC9C,OAAS,4BAAAC,OAAgC,0EAEzC,OAAS,yCAAAC,OAA6C,8DACtD,OAAS,uCAAAC,OAA2C,4DACpD,OAAS,eAAAC,OAAmB,wCAC5B,OAAS,uBAAAC,OAA2B,2BACpC,OAAS,8BAAAC,OAAkC,kCAC3C,WAAc,aACd,OAAS,YAAAC,OAAgB,wCACzB,OAAS,iBAAAC,OAAqB,+CAC9B,OAAS,yBAAAC,OAA6B,uDACtC,OAAS,mBAAAC,OAAuB,uCAChC,OACE,gCAAAC,OAEK,oDACP,WAAc,8BACd,OAAS,4BAAAC,OAAgC,gDACzC,OAAS,8BAAAC,OAAkC,qDAC3C,WAAc,aACd,OAAS,wBAAAC,GAAsB,kBAAAC,OAAsB,0BACrD,OACE,sBAAAC,GACA,sBAAAC,GACA,gBAAAC,OACK",
6
+ "names": ["Apdu", "APDU_MAX_PAYLOAD", "ApduBuilder", "ApduParser", "ByteArrayBuilder", "ByteArrayParser", "InvalidStatusWordError", "CommandResultFactory", "CommandResultStatus", "isSuccessCommandResult", "CloseAppCommand", "GetAppAndVersionCommand", "BatteryStatusType", "GetBatteryStatusCommand", "GetOsVersionCommand", "ListAppsCommand", "LoadCertificateCommand", "OpenAppCommand", "isCommandErrorCode", "CommandUtils", "GlobalCommandError", "GlobalCommandErrorHandler", "DeviceModel", "DeviceModelId", "LEDGER_VENDOR_ID", "DeviceStatus", "DeviceActionStatus", "UserInteractionRequired", "CallTaskInAppDeviceAction", "UnknownDAError", "GetDeviceStatusDeviceAction", "GoToDashboardDeviceAction", "ListAppsDeviceAction", "ListAppsWithMetadataDeviceAction", "OpenAppDeviceAction", "SendCommandInAppDeviceAction", "XStateDeviceAction", "StaticDeviceModelDataSource", "BleDeviceInfos", "TransportDeviceModel", "ApduResponse", "DeviceSessionStateType", "GenuineCheckDeviceAction", "InstallAppDeviceAction", "ListInstalledAppsDeviceAction", "UninstallAppDeviceAction", "defaultApduReceiverServiceStubBuilder", "defaultApduSenderServiceStubBuilder", "FramerUtils", "DeviceManagementKit", "DeviceManagementKitBuilder", "LogLevel", "ConsoleLogger", "WebLogsExporterLogger", "ConnectedDevice", "DeviceConnectionStateMachine", "TransportConnectedDevice", "connectedDeviceStubBuilder", "base64StringToBuffer", "isBase64String", "bufferToHexaString", "hexaStringToBuffer", "isHexaString"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{LogLevel as t}from"../../logger-subscriber/model/LogLevel";import{ConsoleLogger as s}from"./ConsoleLogger";const d=jest.spyOn(console,"warn").mockImplementation(jest.fn()),n=jest.spyOn(console,"info").mockImplementation(jest.fn()),r=jest.spyOn(console,"debug").mockImplementation(jest.fn()),a=jest.spyOn(console,"error").mockImplementation(jest.fn()),i=jest.spyOn(console,"log").mockImplementation(jest.fn());let o;const e={data:{key:"value"},timestamp:1,tag:"tag"},l="message";describe("ConsoleLogger",()=>{afterAll(()=>{jest.restoreAllMocks()}),describe("default level (LogLevel.DEBUG)",()=>{beforeEach(()=>{jest.clearAllMocks(),o=new s}),describe("log",()=>{it("should log Info level",()=>{o.log(t.Info,l,e),expect(n).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Info level with a custom tag",()=>{const g="custom-tag";o.log(t.Info,l,{...e,tag:g}),expect(n).toHaveBeenCalledWith(`[${g}]`,l,e.data)}),it("should log Warn level",()=>{o.log(t.Warning,l,e),expect(d).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Debug level",()=>{o.log(t.Debug,l,e),expect(r).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Fatal level",()=>{o.log(t.Fatal,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should default to Log level if none present",()=>{o.log(null,l,e),expect(i).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Error level",()=>{o.log(t.Error,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)})})}),describe("custom level (LogLevel.Info)",()=>{beforeEach(()=>{jest.clearAllMocks(),o=new s(t.Info)}),describe("log",()=>{it("should log Info level",()=>{o.log(t.Info,l,e),expect(n).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Info level with a custom tag",()=>{const g="custom-tag";o.log(t.Info,l,{...e,tag:g}),expect(n).toHaveBeenCalledWith(`[${g}]`,l,e.data)}),it("should log Warn level",()=>{o.log(t.Warning,l,e),expect(d).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should not log Debug level",()=>{o.log(t.Debug,l,e),expect(r).not.toHaveBeenCalled()}),it("should default to Log level if none present",()=>{o.log(null,l,e),expect(i).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Error level",()=>{o.log(t.Error,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Fatal level",()=>{o.log(t.Fatal,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)})})}),describe("custom level (LogLevel.Warning)",()=>{beforeEach(()=>{jest.clearAllMocks(),o=new s(t.Warning)}),describe("log",()=>{it("should not log Info level",()=>{o.log(t.Info,l,e),expect(n).not.toHaveBeenCalled()}),it("should log Warn level",()=>{o.log(t.Warning,l,e),expect(d).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should not log Debug level",()=>{o.log(t.Debug,l,e),expect(r).not.toHaveBeenCalled()}),it("should default to Log level if none present",()=>{o.log(null,l,e),expect(i).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Error level",()=>{o.log(t.Error,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Fatal level",()=>{o.log(t.Fatal,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)})})}),describe("custom level (LogLevel.Error)",()=>{beforeEach(()=>{jest.clearAllMocks(),o=new s(t.Error)}),describe("log",()=>{it("should not log Info level",()=>{o.log(t.Info,l,e),expect(n).not.toHaveBeenCalled()}),it("should not log Warn level",()=>{o.log(t.Warning,l,e),expect(d).not.toHaveBeenCalled()}),it("should not log Debug level",()=>{o.log(t.Debug,l,e),expect(r).not.toHaveBeenCalled()}),it("should default to Log level if none present",()=>{o.log(null,l,e),expect(i).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Error level",()=>{o.log(t.Error,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Fatal level",()=>{o.log(t.Fatal,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)})})}),describe("custom level (LogLevel.Fatal)",()=>{beforeEach(()=>{jest.clearAllMocks(),o=new s(t.Fatal)}),describe("log",()=>{it("should not log Info level",()=>{o.log(t.Info,l,e),expect(n).not.toHaveBeenCalled()}),it("should not log Warn level",()=>{o.log(t.Warning,l,e),expect(d).not.toHaveBeenCalled()}),it("should not log Debug level",()=>{o.log(t.Debug,l,e),expect(r).not.toHaveBeenCalled()}),it("should log Fatal level",()=>{o.log(t.Fatal,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)})})})});
1
+ import{LogLevel as t}from"../../logger-subscriber/model/LogLevel";import{ConsoleLogger as i}from"./ConsoleLogger";const d=vi.spyOn(console,"warn").mockImplementation(vi.fn()),n=vi.spyOn(console,"info").mockImplementation(vi.fn()),r=vi.spyOn(console,"debug").mockImplementation(vi.fn()),a=vi.spyOn(console,"error").mockImplementation(vi.fn()),s=vi.spyOn(console,"log").mockImplementation(vi.fn());let o;const e={data:{key:"value"},timestamp:1,tag:"tag"},l="message";describe("ConsoleLogger",()=>{afterAll(()=>{vi.restoreAllMocks()}),describe("default level (LogLevel.DEBUG)",()=>{beforeEach(()=>{vi.clearAllMocks(),o=new i}),describe("log",()=>{it("should log Info level",()=>{o.log(t.Info,l,e),expect(n).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Info level with a custom tag",()=>{const g="custom-tag";o.log(t.Info,l,{...e,tag:g}),expect(n).toHaveBeenCalledWith(`[${g}]`,l,e.data)}),it("should log Warn level",()=>{o.log(t.Warning,l,e),expect(d).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Debug level",()=>{o.log(t.Debug,l,e),expect(r).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Fatal level",()=>{o.log(t.Fatal,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should default to Log level if none present",()=>{o.log(null,l,e),expect(s).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Error level",()=>{o.log(t.Error,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)})})}),describe("custom level (LogLevel.Info)",()=>{beforeEach(()=>{vi.clearAllMocks(),o=new i(t.Info)}),describe("log",()=>{it("should log Info level",()=>{o.log(t.Info,l,e),expect(n).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Info level with a custom tag",()=>{const g="custom-tag";o.log(t.Info,l,{...e,tag:g}),expect(n).toHaveBeenCalledWith(`[${g}]`,l,e.data)}),it("should log Warn level",()=>{o.log(t.Warning,l,e),expect(d).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should not log Debug level",()=>{o.log(t.Debug,l,e),expect(r).not.toHaveBeenCalled()}),it("should default to Log level if none present",()=>{o.log(null,l,e),expect(s).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Error level",()=>{o.log(t.Error,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Fatal level",()=>{o.log(t.Fatal,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)})})}),describe("custom level (LogLevel.Warning)",()=>{beforeEach(()=>{vi.clearAllMocks(),o=new i(t.Warning)}),describe("log",()=>{it("should not log Info level",()=>{o.log(t.Info,l,e),expect(n).not.toHaveBeenCalled()}),it("should log Warn level",()=>{o.log(t.Warning,l,e),expect(d).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should not log Debug level",()=>{o.log(t.Debug,l,e),expect(r).not.toHaveBeenCalled()}),it("should default to Log level if none present",()=>{o.log(null,l,e),expect(s).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Error level",()=>{o.log(t.Error,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Fatal level",()=>{o.log(t.Fatal,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)})})}),describe("custom level (LogLevel.Error)",()=>{beforeEach(()=>{vi.clearAllMocks(),o=new i(t.Error)}),describe("log",()=>{it("should not log Info level",()=>{o.log(t.Info,l,e),expect(n).not.toHaveBeenCalled()}),it("should not log Warn level",()=>{o.log(t.Warning,l,e),expect(d).not.toHaveBeenCalled()}),it("should not log Debug level",()=>{o.log(t.Debug,l,e),expect(r).not.toHaveBeenCalled()}),it("should default to Log level if none present",()=>{o.log(null,l,e),expect(s).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Error level",()=>{o.log(t.Error,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Fatal level",()=>{o.log(t.Fatal,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)})})}),describe("custom level (LogLevel.Fatal)",()=>{beforeEach(()=>{vi.clearAllMocks(),o=new i(t.Fatal)}),describe("log",()=>{it("should not log Info level",()=>{o.log(t.Info,l,e),expect(n).not.toHaveBeenCalled()}),it("should not log Warn level",()=>{o.log(t.Warning,l,e),expect(d).not.toHaveBeenCalled()}),it("should not log Debug level",()=>{o.log(t.Debug,l,e),expect(r).not.toHaveBeenCalled()}),it("should log Fatal level",()=>{o.log(t.Fatal,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)})})})});
2
2
  //# sourceMappingURL=ConsoleLogger.test.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/api/logger-subscriber/service/ConsoleLogger.test.ts"],
4
- "sourcesContent": ["import { LogLevel } from \"@api/logger-subscriber/model/LogLevel\";\nimport { type LogSubscriberOptions } from \"@api/logger-subscriber/model/LogSubscriberOptions\";\n\nimport { ConsoleLogger } from \"./ConsoleLogger\";\n\nconst warn = jest.spyOn(console, \"warn\").mockImplementation(jest.fn());\nconst info = jest.spyOn(console, \"info\").mockImplementation(jest.fn());\nconst debug = jest.spyOn(console, \"debug\").mockImplementation(jest.fn());\nconst error = jest.spyOn(console, \"error\").mockImplementation(jest.fn());\nconst log = jest.spyOn(console, \"log\").mockImplementation(jest.fn());\n\nlet logger: ConsoleLogger;\nconst options: LogSubscriberOptions = {\n data: { key: \"value\" },\n timestamp: 1,\n tag: \"tag\",\n};\nconst message = \"message\";\n\ndescribe(\"ConsoleLogger\", () => {\n afterAll(() => {\n jest.restoreAllMocks();\n });\n\n describe(\"default level (LogLevel.DEBUG)\", () => {\n beforeEach(() => {\n jest.clearAllMocks();\n logger = new ConsoleLogger();\n });\n\n describe(\"log\", () => {\n it(\"should log Info level\", () => {\n logger.log(LogLevel.Info, message, options);\n expect(info).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n\n it(\"should log Info level with a custom tag\", () => {\n const tag = \"custom-tag\";\n logger.log(LogLevel.Info, message, { ...options, tag });\n expect(info).toHaveBeenCalledWith(`[${tag}]`, message, options.data);\n });\n\n it(\"should log Warn level\", () => {\n logger.log(LogLevel.Warning, message, options);\n expect(warn).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n\n it(\"should log Debug level\", () => {\n logger.log(LogLevel.Debug, message, options);\n expect(debug).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n\n it(\"should log Fatal level\", () => {\n logger.log(LogLevel.Fatal, message, options);\n expect(error).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n\n it(\"should default to Log level if none present\", () => {\n logger.log(null, message, options);\n expect(log).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n\n it(\"should log Error level\", () => {\n logger.log(LogLevel.Error, message, options);\n expect(error).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n });\n });\n\n describe(\"custom level (LogLevel.Info)\", () => {\n beforeEach(() => {\n jest.clearAllMocks();\n logger = new ConsoleLogger(LogLevel.Info);\n });\n\n describe(\"log\", () => {\n it(\"should log Info level\", () => {\n logger.log(LogLevel.Info, message, options);\n expect(info).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n\n it(\"should log Info level with a custom tag\", () => {\n const tag = \"custom-tag\";\n logger.log(LogLevel.Info, message, { ...options, tag });\n expect(info).toHaveBeenCalledWith(`[${tag}]`, message, options.data);\n });\n\n it(\"should log Warn level\", () => {\n logger.log(LogLevel.Warning, message, options);\n expect(warn).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n\n it(\"should not log Debug level\", () => {\n logger.log(LogLevel.Debug, message, options);\n expect(debug).not.toHaveBeenCalled();\n });\n\n it(\"should default to Log level if none present\", () => {\n logger.log(null, message, options);\n expect(log).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n\n it(\"should log Error level\", () => {\n logger.log(LogLevel.Error, message, options);\n expect(error).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n\n it(\"should log Fatal level\", () => {\n logger.log(LogLevel.Fatal, message, options);\n expect(error).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n });\n });\n\n describe(\"custom level (LogLevel.Warning)\", () => {\n beforeEach(() => {\n jest.clearAllMocks();\n logger = new ConsoleLogger(LogLevel.Warning);\n });\n\n describe(\"log\", () => {\n it(\"should not log Info level\", () => {\n logger.log(LogLevel.Info, message, options);\n expect(info).not.toHaveBeenCalled();\n });\n\n it(\"should log Warn level\", () => {\n logger.log(LogLevel.Warning, message, options);\n expect(warn).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n\n it(\"should not log Debug level\", () => {\n logger.log(LogLevel.Debug, message, options);\n expect(debug).not.toHaveBeenCalled();\n });\n\n it(\"should default to Log level if none present\", () => {\n logger.log(null, message, options);\n expect(log).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n\n it(\"should log Error level\", () => {\n logger.log(LogLevel.Error, message, options);\n expect(error).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n\n it(\"should log Fatal level\", () => {\n logger.log(LogLevel.Fatal, message, options);\n expect(error).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n });\n });\n\n describe(\"custom level (LogLevel.Error)\", () => {\n beforeEach(() => {\n jest.clearAllMocks();\n logger = new ConsoleLogger(LogLevel.Error);\n });\n\n describe(\"log\", () => {\n it(\"should not log Info level\", () => {\n logger.log(LogLevel.Info, message, options);\n expect(info).not.toHaveBeenCalled();\n });\n\n it(\"should not log Warn level\", () => {\n logger.log(LogLevel.Warning, message, options);\n expect(warn).not.toHaveBeenCalled();\n });\n\n it(\"should not log Debug level\", () => {\n logger.log(LogLevel.Debug, message, options);\n expect(debug).not.toHaveBeenCalled();\n });\n\n it(\"should default to Log level if none present\", () => {\n logger.log(null, message, options);\n expect(log).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n\n it(\"should log Error level\", () => {\n logger.log(LogLevel.Error, message, options);\n expect(error).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n\n it(\"should log Fatal level\", () => {\n logger.log(LogLevel.Fatal, message, options);\n expect(error).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n });\n });\n\n describe(\"custom level (LogLevel.Fatal)\", () => {\n beforeEach(() => {\n jest.clearAllMocks();\n logger = new ConsoleLogger(LogLevel.Fatal);\n });\n\n describe(\"log\", () => {\n it(\"should not log Info level\", () => {\n logger.log(LogLevel.Info, message, options);\n expect(info).not.toHaveBeenCalled();\n });\n\n it(\"should not log Warn level\", () => {\n logger.log(LogLevel.Warning, message, options);\n expect(warn).not.toHaveBeenCalled();\n });\n\n it(\"should not log Debug level\", () => {\n logger.log(LogLevel.Debug, message, options);\n expect(debug).not.toHaveBeenCalled();\n });\n\n it(\"should log Fatal level\", () => {\n logger.log(LogLevel.Fatal, message, options);\n expect(error).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n });\n });\n});\n"],
5
- "mappings": "AAAA,OAAS,YAAAA,MAAgB,wCAGzB,OAAS,iBAAAC,MAAqB,kBAE9B,MAAMC,EAAO,KAAK,MAAM,QAAS,MAAM,EAAE,mBAAmB,KAAK,GAAG,CAAC,EAC/DC,EAAO,KAAK,MAAM,QAAS,MAAM,EAAE,mBAAmB,KAAK,GAAG,CAAC,EAC/DC,EAAQ,KAAK,MAAM,QAAS,OAAO,EAAE,mBAAmB,KAAK,GAAG,CAAC,EACjEC,EAAQ,KAAK,MAAM,QAAS,OAAO,EAAE,mBA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,cAAc,EACnBD,EAAS,IAAIN,EAAcD,EAAS,KAAK,CAC3C,CAAC,EAED,SAAS,MAAO,IAAM,CACpB,GAAG,4BAA6B,IAAM,CACpCO,EAAO,IAAIP,EAAS,KAAMS,EAASD,CAAO,EAC1C,OAAOL,CAAI,EAAE,IAAI,iBAAiB,CACpC,CAAC,EAED,GAAG,4BAA6B,IAAM,CACpCI,EAAO,IAAIP,EAAS,QAASS,EAASD,CAAO,EAC7C,OAAON,CAAI,EAAE,IAAI,iBAAiB,CACpC,CAAC,EAED,GAAG,6BAA8B,IAAM,CACrCK,EAAO,IAAIP,EAAS,MAAOS,EAASD,CAAO,EAC3C,OAAOJ,CAAK,EAAE,IAAI,iBAAiB,CACrC,CAAC,EAED,GAAG,yBAA0B,IAAM,CACjCG,EAAO,IAAIP,EAAS,MAAOS,EAASD,CAAO,EAC3C,OAAOH,CAAK,EAAE,qBACZ,IAAIG,EAAQ,GAAG,IACfC,EACAD,EAAQ,IACV,CACF,CAAC,CACH,CAAC,CACH,CAAC,CACH,CAAC",
4
+ "sourcesContent": ["import { LogLevel } from \"@api/logger-subscriber/model/LogLevel\";\nimport { type LogSubscriberOptions } from \"@api/logger-subscriber/model/LogSubscriberOptions\";\n\nimport { ConsoleLogger } from \"./ConsoleLogger\";\n\nconst warn = vi.spyOn(console, \"warn\").mockImplementation(vi.fn());\nconst info = vi.spyOn(console, \"info\").mockImplementation(vi.fn());\nconst debug = vi.spyOn(console, \"debug\").mockImplementation(vi.fn());\nconst error = vi.spyOn(console, \"error\").mockImplementation(vi.fn());\nconst log = vi.spyOn(console, \"log\").mockImplementation(vi.fn());\n\nlet logger: ConsoleLogger;\nconst options: LogSubscriberOptions = {\n data: { key: \"value\" },\n timestamp: 1,\n tag: \"tag\",\n};\nconst message = \"message\";\n\ndescribe(\"ConsoleLogger\", () => {\n afterAll(() => {\n vi.restoreAllMocks();\n });\n\n describe(\"default level (LogLevel.DEBUG)\", () => {\n beforeEach(() => {\n vi.clearAllMocks();\n logger = new ConsoleLogger();\n });\n\n describe(\"log\", () => {\n it(\"should log Info level\", () => {\n logger.log(LogLevel.Info, message, options);\n expect(info).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n\n it(\"should log Info level with a custom tag\", () => {\n const tag = \"custom-tag\";\n logger.log(LogLevel.Info, message, { ...options, tag });\n expect(info).toHaveBeenCalledWith(`[${tag}]`, message, options.data);\n });\n\n it(\"should log Warn level\", () => {\n logger.log(LogLevel.Warning, message, options);\n expect(warn).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n\n it(\"should log Debug level\", () => {\n logger.log(LogLevel.Debug, message, options);\n expect(debug).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n\n it(\"should log Fatal level\", () => {\n logger.log(LogLevel.Fatal, message, options);\n expect(error).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n\n it(\"should default to Log level if none present\", () => {\n logger.log(null, message, options);\n expect(log).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n\n it(\"should log Error level\", () => {\n logger.log(LogLevel.Error, message, options);\n expect(error).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n });\n });\n\n describe(\"custom level (LogLevel.Info)\", () => {\n beforeEach(() => {\n vi.clearAllMocks();\n logger = new ConsoleLogger(LogLevel.Info);\n });\n\n describe(\"log\", () => {\n it(\"should log Info level\", () => {\n logger.log(LogLevel.Info, message, options);\n expect(info).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n\n it(\"should log Info level with a custom tag\", () => {\n const tag = \"custom-tag\";\n logger.log(LogLevel.Info, message, { ...options, tag });\n expect(info).toHaveBeenCalledWith(`[${tag}]`, message, options.data);\n });\n\n it(\"should log Warn level\", () => {\n logger.log(LogLevel.Warning, message, options);\n expect(warn).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n\n it(\"should not log Debug level\", () => {\n logger.log(LogLevel.Debug, message, options);\n expect(debug).not.toHaveBeenCalled();\n });\n\n it(\"should default to Log level if none present\", () => {\n logger.log(null, message, options);\n expect(log).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n\n it(\"should log Error level\", () => {\n logger.log(LogLevel.Error, message, options);\n expect(error).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n\n it(\"should log Fatal level\", () => {\n logger.log(LogLevel.Fatal, message, options);\n expect(error).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n });\n });\n\n describe(\"custom level (LogLevel.Warning)\", () => {\n beforeEach(() => {\n vi.clearAllMocks();\n logger = new ConsoleLogger(LogLevel.Warning);\n });\n\n describe(\"log\", () => {\n it(\"should not log Info level\", () => {\n logger.log(LogLevel.Info, message, options);\n expect(info).not.toHaveBeenCalled();\n });\n\n it(\"should log Warn level\", () => {\n logger.log(LogLevel.Warning, message, options);\n expect(warn).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n\n it(\"should not log Debug level\", () => {\n logger.log(LogLevel.Debug, message, options);\n expect(debug).not.toHaveBeenCalled();\n });\n\n it(\"should default to Log level if none present\", () => {\n logger.log(null, message, options);\n expect(log).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n\n it(\"should log Error level\", () => {\n logger.log(LogLevel.Error, message, options);\n expect(error).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n\n it(\"should log Fatal level\", () => {\n logger.log(LogLevel.Fatal, message, options);\n expect(error).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n });\n });\n\n describe(\"custom level (LogLevel.Error)\", () => {\n beforeEach(() => {\n vi.clearAllMocks();\n logger = new ConsoleLogger(LogLevel.Error);\n });\n\n describe(\"log\", () => {\n it(\"should not log Info level\", () => {\n logger.log(LogLevel.Info, message, options);\n expect(info).not.toHaveBeenCalled();\n });\n\n it(\"should not log Warn level\", () => {\n logger.log(LogLevel.Warning, message, options);\n expect(warn).not.toHaveBeenCalled();\n });\n\n it(\"should not log Debug level\", () => {\n logger.log(LogLevel.Debug, message, options);\n expect(debug).not.toHaveBeenCalled();\n });\n\n it(\"should default to Log level if none present\", () => {\n logger.log(null, message, options);\n expect(log).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n\n it(\"should log Error level\", () => {\n logger.log(LogLevel.Error, message, options);\n expect(error).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n\n it(\"should log Fatal level\", () => {\n logger.log(LogLevel.Fatal, message, options);\n expect(error).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n });\n });\n\n describe(\"custom level (LogLevel.Fatal)\", () => {\n beforeEach(() => {\n vi.clearAllMocks();\n logger = new ConsoleLogger(LogLevel.Fatal);\n });\n\n describe(\"log\", () => {\n it(\"should not log Info level\", () => {\n logger.log(LogLevel.Info, message, options);\n expect(info).not.toHaveBeenCalled();\n });\n\n it(\"should not log Warn level\", () => {\n logger.log(LogLevel.Warning, message, options);\n expect(warn).not.toHaveBeenCalled();\n });\n\n it(\"should not log Debug level\", () => {\n logger.log(LogLevel.Debug, message, options);\n expect(debug).not.toHaveBeenCalled();\n });\n\n it(\"should log Fatal level\", () => {\n logger.log(LogLevel.Fatal, message, options);\n expect(error).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n });\n });\n});\n"],
5
+ "mappings": "AAAA,OAAS,YAAAA,MAAgB,wCAGzB,OAAS,iBAAAC,MAAqB,kBAE9B,MAAMC,EAAO,GAAG,MAAM,QAAS,MAAM,EAAE,mBAAmB,GAAG,GAAG,CAAC,EAC3DC,EAAO,GAAG,MAAM,QAAS,MAAM,EAAE,mBAAmB,GAAG,GAAG,CAA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,EAAQ,GAAG,IACfC,EACAD,EAAQ,IACV,CACF,CAAC,CACH,CAAC,CACH,CAAC,EAED,SAAS,gCAAiC,IAAM,CAC9C,WAAW,IAAM,CACf,GAAG,cAAc,EACjBD,EAAS,IAAIN,EAAcD,EAAS,KAAK,CAC3C,CAAC,EAED,SAAS,MAAO,IAAM,CACpB,GAAG,4BAA6B,IAAM,CACpCO,EAAO,IAAIP,EAAS,KAAMS,EAASD,CAAO,EAC1C,OAAOL,CAAI,EAAE,IAAI,iBAAiB,CACpC,CAAC,EAED,GAAG,4BAA6B,IAAM,CACpCI,EAAO,IAAIP,EAAS,QAASS,EAASD,CAAO,EAC7C,OAAON,CAAI,EAAE,IAAI,iBAAiB,CACpC,CAAC,EAED,GAAG,6BAA8B,IAAM,CACrCK,EAAO,IAAIP,EAAS,MAAOS,EAASD,CAAO,EAC3C,OAAOJ,CAAK,EAAE,IAAI,iBAAiB,CACrC,CAAC,EAED,GAAG,yBAA0B,IAAM,CACjCG,EAAO,IAAIP,EAAS,MAAOS,EAASD,CAAO,EAC3C,OAAOH,CAAK,EAAE,qBACZ,IAAIG,EAAQ,GAAG,IACfC,EACAD,EAAQ,IACV,CACF,CAAC,CACH,CAAC,CACH,CAAC,CACH,CAAC",
6
6
  "names": ["LogLevel", "ConsoleLogger", "warn", "info", "debug", "error", "log", "logger", "options", "message", "tag"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{deviceModelStubBuilder as n}from"../../device-model/model/DeviceModel.stub";import{DeviceSession as a}from"../../../internal/device-session/model/DeviceSession";import{getJSONStringifyReplacer as r}from"./WebLogsExporterLogger";describe("getJSONStringifyReplacer",()=>{it("should return a function that replaces Uint8Array correctly",()=>{const e=r(),t=new Uint8Array([1,2,3]),c=e("key",t);expect(c).toEqual({hex:"0x010203",readableHex:"01 02 03",value:"1,2,3"})}),it("should return a function that replaces DeviceSession",()=>{const e=n(),t=r(),c={deviceModel:n(),type:"USB",id:"mockedDeviceId",sendApdu:jest.fn(),transport:"USB"},i=new a({connectedDevice:c,id:"mockedSessionId"},jest.fn(),{}),o=JSON.stringify(i,t),s=`{"id":"mockedSessionId","connectedDevice":{"deviceModel":${JSON.stringify(e)},"type":"USB","id":"mockedDeviceId"}}`;i.close(),expect(o).toEqual(s)}),it("should return a function that replaces circular references",()=>{const e={name:"Alice"};e.self=e;const t='{"name":"Alice","self":"[Circular]"}',c=JSON.stringify(e,r());expect(c).toEqual(t)})});
1
+ import{deviceModelStubBuilder as n}from"../../device-model/model/DeviceModel.stub";import{DEVICE_SESSION_REFRESHER_DEFAULT_OPTIONS as a}from"../../../internal/device-session/data/DeviceSessionRefresherConst";import{DeviceSession as l}from"../../../internal/device-session/model/DeviceSession";import{getJSONStringifyReplacer as c}from"./WebLogsExporterLogger";describe("getJSONStringifyReplacer",()=>{it("should return a function that replaces Uint8Array correctly",()=>{const e=c(),t=new Uint8Array([1,2,3]),r=e("key",t);expect(r).toEqual({hex:"0x010203",readableHex:"01 02 03",value:"1,2,3"})}),it("should return a function that replaces DeviceSession",()=>{const e=n(),t=c(),r={deviceModel:n(),type:"USB",id:"mockedDeviceId",sendApdu:vi.fn(),transport:"USB"},i=new l({connectedDevice:r,id:"mockedSessionId"},vi.fn(),{},{},a),o=JSON.stringify(i,t),s=`{"id":"mockedSessionId","connectedDevice":{"deviceModel":${JSON.stringify(e)},"type":"USB","id":"mockedDeviceId"}}`;i.close(),expect(o).toEqual(s)}),it("should return a function that replaces circular references",()=>{const e={name:"Alice"};e.self=e;const t='{"name":"Alice","self":"[Circular]"}',r=JSON.stringify(e,c());expect(r).toEqual(t)})});
2
2
  //# sourceMappingURL=WebLogsExporterLogger.test.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/api/logger-subscriber/service/WebLogsExporterLogger.test.ts"],
4
- "sourcesContent": ["import { deviceModelStubBuilder } from \"@api/device-model/model/DeviceModel.stub\";\nimport { type TransportConnectedDevice } from \"@api/transport/model/TransportConnectedDevice\";\nimport { DeviceSession } from \"@internal/device-session/model/DeviceSession\";\nimport { type ManagerApiService } from \"@internal/manager-api/service/ManagerApiService\";\n\nimport { getJSONStringifyReplacer } from \"./WebLogsExporterLogger\";\n\ndescribe(\"getJSONStringifyReplacer\", () => {\n it(\"should return a function that replaces Uint8Array correctly\", () => {\n const replacer = getJSONStringifyReplacer();\n const value = new Uint8Array([1, 2, 3]);\n const result = replacer(\"key\", value);\n expect(result).toEqual({\n hex: \"0x010203\",\n readableHex: \"01 02 03\",\n value: \"1,2,3\",\n });\n });\n\n it(\"should return a function that replaces DeviceSession\", () => {\n const stubDeviceModel = deviceModelStubBuilder();\n const replacer = getJSONStringifyReplacer();\n\n const connectedDevice: TransportConnectedDevice = {\n deviceModel: deviceModelStubBuilder(),\n type: \"USB\",\n id: \"mockedDeviceId\",\n sendApdu: jest.fn(),\n transport: \"USB\",\n };\n\n const value = new DeviceSession(\n {\n connectedDevice,\n id: \"mockedSessionId\",\n },\n jest.fn(),\n {} as ManagerApiService,\n );\n const result = JSON.stringify(value, replacer);\n const expected = `{\"id\":\"mockedSessionId\",\"connectedDevice\":{\"deviceModel\":${JSON.stringify(\n stubDeviceModel,\n )},\"type\":\"USB\",\"id\":\"mockedDeviceId\"}}`;\n value.close();\n expect(result).toEqual(expected);\n });\n\n it(\"should return a function that replaces circular references\", () => {\n interface CircularObject {\n name: string;\n self?: CircularObject;\n }\n\n const obj: CircularObject = { name: \"Alice\" };\n obj.self = obj;\n\n const expected = '{\"name\":\"Alice\",\"self\":\"[Circular]\"}';\n const result = JSON.stringify(obj, getJSONStringifyReplacer());\n expect(result).toEqual(expected);\n });\n});\n"],
5
- "mappings": "AAAA,OAAS,0BAAAA,MAA8B,2CAEvC,OAAS,iBAAAC,MAAqB,+CAG9B,OAAS,4BAAAC,MAAgC,0BAEzC,SAAS,2BAA4B,IAAM,CACzC,GAAG,8DAA+D,IAAM,CACtE,MAAMC,EAAWD,EAAyB,EACpCE,EAAQ,IAAI,WAAW,CAAC,EAAG,EAAG,CAAC,CAAC,EAChCC,EAASF,EAAS,MAAOC,CAAK,EACpC,OAAOC,CAAM,EAAE,QAAQ,CACrB,IAAK,WACL,YAAa,WACb,MAAO,OACT,CAAC,CACH,CAAC,EAED,GAAG,uDAAwD,IAAM,CAC/D,MAAMC,EAAkBN,EAAuB,EACzCG,EAAWD,EAAyB,EAEpCK,EAA4C,CAChD,YAAaP,EAAuB,EACpC,KAAM,MACN,GAAI,iBACJ,SAAU,KAAK,GAAG,EAClB,UAAW,KACb,EAEMI,EAAQ,IAAIH,EAChB,CACE,gBAAAM,EACA,GAAI,iBACN,EACA,KAAK,GAAG,EACR,CAAC,CACH,EACMF,EAAS,KAAK,UAAUD,EAAOD,CAAQ,EACvCK,EAAW,4DAA4D,KAAK,UAChFF,CACF,CAAC,wCACDF,EAAM,MAAM,EACZ,OAAOC,CAAM,EAAE,QAAQG,CAAQ,CACjC,CAAC,EAED,GAAG,6DAA8D,IAAM,CAMrE,MAAMC,EAAsB,CAAE,KAAM,OAAQ,EAC5CA,EAAI,KAAOA,EAEX,MAAMD,EAAW,uCACXH,EAAS,KAAK,UAAUI,EAAKP,EAAyB,CAAC,EAC7D,OAAOG,CAAM,EAAE,QAAQG,CAAQ,CACjC,CAAC,CACH,CAAC",
6
- "names": ["deviceModelStubBuilder", "DeviceSession", "getJSONStringifyReplacer", "replacer", "value", "result", "stubDeviceModel", "connectedDevice", "expected", "obj"]
4
+ "sourcesContent": ["import { deviceModelStubBuilder } from \"@api/device-model/model/DeviceModel.stub\";\nimport { type TransportConnectedDevice } from \"@api/transport/model/TransportConnectedDevice\";\nimport { DEVICE_SESSION_REFRESHER_DEFAULT_OPTIONS } from \"@internal/device-session/data/DeviceSessionRefresherConst\";\nimport { DeviceSession } from \"@internal/device-session/model/DeviceSession\";\nimport { type ManagerApiService } from \"@internal/manager-api/service/ManagerApiService\";\nimport { type SecureChannelService } from \"@internal/secure-channel/service/SecureChannelService\";\n\nimport { getJSONStringifyReplacer } from \"./WebLogsExporterLogger\";\n\ndescribe(\"getJSONStringifyReplacer\", () => {\n it(\"should return a function that replaces Uint8Array correctly\", () => {\n const replacer = getJSONStringifyReplacer();\n const value = new Uint8Array([1, 2, 3]);\n const result = replacer(\"key\", value);\n expect(result).toEqual({\n hex: \"0x010203\",\n readableHex: \"01 02 03\",\n value: \"1,2,3\",\n });\n });\n\n it(\"should return a function that replaces DeviceSession\", () => {\n const stubDeviceModel = deviceModelStubBuilder();\n const replacer = getJSONStringifyReplacer();\n\n const connectedDevice: TransportConnectedDevice = {\n deviceModel: deviceModelStubBuilder(),\n type: \"USB\",\n id: \"mockedDeviceId\",\n sendApdu: vi.fn(),\n transport: \"USB\",\n };\n\n const value = new DeviceSession(\n {\n connectedDevice,\n id: \"mockedSessionId\",\n },\n vi.fn(),\n {} as ManagerApiService,\n {} as SecureChannelService,\n DEVICE_SESSION_REFRESHER_DEFAULT_OPTIONS,\n );\n const result = JSON.stringify(value, replacer);\n const expected = `{\"id\":\"mockedSessionId\",\"connectedDevice\":{\"deviceModel\":${JSON.stringify(\n stubDeviceModel,\n )},\"type\":\"USB\",\"id\":\"mockedDeviceId\"}}`;\n value.close();\n expect(result).toEqual(expected);\n });\n\n it(\"should return a function that replaces circular references\", () => {\n interface CircularObject {\n name: string;\n self?: CircularObject;\n }\n\n const obj: CircularObject = { name: \"Alice\" };\n obj.self = obj;\n\n const expected = '{\"name\":\"Alice\",\"self\":\"[Circular]\"}';\n const result = JSON.stringify(obj, getJSONStringifyReplacer());\n expect(result).toEqual(expected);\n });\n});\n"],
5
+ "mappings": "AAAA,OAAS,0BAAAA,MAA8B,2CAEvC,OAAS,4CAAAC,MAAgD,4DACzD,OAAS,iBAAAC,MAAqB,+CAI9B,OAAS,4BAAAC,MAAgC,0BAEzC,SAAS,2BAA4B,IAAM,CACzC,GAAG,8DAA+D,IAAM,CACtE,MAAMC,EAAWD,EAAyB,EACpCE,EAAQ,IAAI,WAAW,CAAC,EAAG,EAAG,CAAC,CAAC,EAChCC,EAASF,EAAS,MAAOC,CAAK,EACpC,OAAOC,CAAM,EAAE,QAAQ,CACrB,IAAK,WACL,YAAa,WACb,MAAO,OACT,CAAC,CACH,CAAC,EAED,GAAG,uDAAwD,IAAM,CAC/D,MAAMC,EAAkBP,EAAuB,EACzCI,EAAWD,EAAyB,EAEpCK,EAA4C,CAChD,YAAaR,EAAuB,EACpC,KAAM,MACN,GAAI,iBACJ,SAAU,GAAG,GAAG,EAChB,UAAW,KACb,EAEMK,EAAQ,IAAIH,EAChB,CACE,gBAAAM,EACA,GAAI,iBACN,EACA,GAAG,GAAG,EACN,CAAC,EACD,CAAC,EACDP,CACF,EACMK,EAAS,KAAK,UAAUD,EAAOD,CAAQ,EACvCK,EAAW,4DAA4D,KAAK,UAChFF,CACF,CAAC,wCACDF,EAAM,MAAM,EACZ,OAAOC,CAAM,EAAE,QAAQG,CAAQ,CACjC,CAAC,EAED,GAAG,6DAA8D,IAAM,CAMrE,MAAMC,EAAsB,CAAE,KAAM,OAAQ,EAC5CA,EAAI,KAAOA,EAEX,MAAMD,EAAW,uCACXH,EAAS,KAAK,UAAUI,EAAKP,EAAyB,CAAC,EAC7D,OAAOG,CAAM,EAAE,QAAQG,CAAQ,CACjC,CAAC,CACH,CAAC",
6
+ "names": ["deviceModelStubBuilder", "DEVICE_SESSION_REFRESHER_DEFAULT_OPTIONS", "DeviceSession", "getJSONStringifyReplacer", "replacer", "value", "result", "stubDeviceModel", "connectedDevice", "expected", "obj"]
7
7
  }
@@ -1,2 +1,2 @@
1
- class e{log=jest.fn()}export{e as ConsoleLogger};
1
+ class e{log=vi.fn()}export{e as ConsoleLogger};
2
2
  //# sourceMappingURL=ConsoleLogger.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../src/api/logger-subscriber/service/__mocks__/ConsoleLogger.ts"],
4
- "sourcesContent": ["export class ConsoleLogger {\n log = jest.fn();\n}\n"],
5
- "mappings": "AAAO,MAAMA,CAAc,CACzB,IAAM,KAAK,GAAG,CAChB",
4
+ "sourcesContent": ["export class ConsoleLogger {\n log = vi.fn();\n}\n"],
5
+ "mappings": "AAAO,MAAMA,CAAc,CACzB,IAAM,GAAG,GAAG,CACd",
6
6
  "names": ["ConsoleLogger"]
7
7
  }
@@ -0,0 +1,2 @@
1
+ const E="0000";export{E as GENUINE_DEVICE_RESULT};
2
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../src/api/secure-channel/constants.ts"],
4
+ "sourcesContent": ["export const GENUINE_DEVICE_RESULT = \"0000\";\n"],
5
+ "mappings": "AAAO,MAAMA,EAAwB",
6
+ "names": ["GENUINE_DEVICE_RESULT"]
7
+ }
@@ -0,0 +1,2 @@
1
+ import{Left as d,Right as v}from"purify-ts";import{assign as o,fromObservable as D,fromPromise as c,setup as V}from"xstate";import{isSuccessCommandResult as k}from"../../../command/model/CommandResult";import{GetOsVersionCommand as C}from"../../../command/os/GetOsVersionCommand";import{UserInteractionRequired as u}from"../../../device-action/model/UserInteractionRequired";import{DEFAULT_UNLOCK_TIMEOUT_MS as G}from"../../../device-action/os/Const";import{GoToDashboardDeviceAction as f}from"../../../device-action/os/GoToDashboard/GoToDashboardDeviceAction";import{XStateDeviceAction as y}from"../../../device-action/xstate-utils/XStateDeviceAction";import{DeviceSessionStateType as E}from"../../../device-session/DeviceSessionState";import{ConnectToSecureChannelTask as I}from"../../../secure-channel/task/ConnectToSecureChannelTask";import{SecureChannelEventType as p}from"../../../secure-channel/task/types";import{isDeviceGenuine as x}from"../../../secure-channel/utils";class P extends y{makeStateMachine(n){const{getOsVersion:h,getDeviceVersion:l,getFirmwareVersion:m,genuineCheck:S,getDeviceSessionState:r,setDeviceSessionState:i}=this.extractDependencies(n),a=this.input.unlockTimeout??G,s=new f({input:{unlockTimeout:a}}).makeStateMachine(n);return V({types:{input:{},context:{},output:{}},actors:{goToDashboard:s,getOsVersion:c(h),getDeviceVersion:c(l),getFirmwareVersion:c(m),genuineCheck:D(S)},guards:{hasError:e=>e.context._internalState.error!==null},actions:{assignErrorFromEvent:o({_internalState:e=>({...e.context._internalState,error:e.event.error})})}}).createMachine({id:"GenuineCheckDeviceAction",initial:"DeviceReady",context:e=>({input:{unlockTimeout:e.input.unlockTimeout},intermediateValue:{requiredUserInteraction:u.None},_internalState:{error:null,result:{isGenuine:!1},getOsVersionResponse:null,deviceVersion:null,firmwareVersion:null}}),states:{DeviceReady:{always:{target:"GoToDashboard"}},GoToDashboard:{invoke:{id:"goToDashboard",src:"goToDashboard",input:e=>({unlockTimeout:e.context.input.unlockTimeout}),onSnapshot:{actions:o({intermediateValue:e=>({...e.context.intermediateValue,requiredUserInteraction:e.event.snapshot.context.intermediateValue.requiredUserInteraction})})},onDone:{target:"GoToDashboardCheck",actions:o({_internalState:e=>e.event.output.caseOf({Right:()=>e.context._internalState,Left:t=>({...e.context._internalState,error:t})})})},onError:{target:"Error",actions:"assignErrorFromEvent"}}},GoToDashboardCheck:{always:[{target:"Error",guard:"hasError"},{target:"GetOsVersion"}]},GetOsVersion:{invoke:{id:"getOsVersion",src:"getOsVersion",input:e=>{},onDone:{target:"GetOsVersionCheck",actions:o({_internalState:e=>{if(k(e.event.output)){const t=r(),g=e.event.output.data.secureElementFlags.isSecureConnectionAllowed;return t.sessionStateType!==E.Connected&&i({...t,isSecureConnectionAllowed:g}),{...e.context._internalState,getOsVersionResponse:e.event.output.data}}return{...e.context._internalState,error:e.event.output.error}}})}}},GetOsVersionCheck:{always:[{target:"Error",guard:"hasError"},{target:"GetDeviceVersion"}]},GetDeviceVersion:{invoke:{id:"getDeviceVersion",src:"getDeviceVersion",input:e=>({deviceInfo:e.context._internalState.getOsVersionResponse}),onDone:{target:"GetDeviceVersionCheck",actions:o({_internalState:e=>e.event.output.caseOf({Right:t=>({...e.context._internalState,deviceVersion:t}),Left:t=>({...e.context._internalState,error:t})})})},onError:{target:"Error",actions:"assignErrorFromEvent"}}},GetDeviceVersionCheck:{always:[{target:"Error",guard:"hasError"},{target:"GetFirmwareVersion"}]},GetFirmwareVersion:{invoke:{id:"getFirmwareVersion",src:"getFirmwareVersion",input:e=>({deviceInfo:e.context._internalState.getOsVersionResponse,deviceVersion:e.context._internalState.deviceVersion}),onDone:{target:"GetFirmwareVersionCheck",actions:o({_internalState:e=>e.event.output.caseOf({Right:t=>({...e.context._internalState,firmwareVersion:t}),Left:t=>({...e.context._internalState,error:t})})})},onError:{target:"Error",actions:"assignErrorFromEvent"}}},GetFirmwareVersionCheck:{always:[{target:"Error",guard:"hasError"},{target:"GenuineCheck"}]},GenuineCheck:{invoke:{id:"genuineCheck",src:"genuineCheck",input:e=>({deviceInfo:e.context._internalState.getOsVersionResponse,finalFirmware:e.context._internalState.firmwareVersion}),onSnapshot:{actions:o({intermediateValue:e=>{switch(e.event.snapshot.context?.type){case p.PermissionRequested:return{requiredUserInteraction:u.AllowSecureConnection};case p.PermissionGranted:return{requiredUserInteraction:u.None};default:return{...e.context.intermediateValue}}},_internalState:e=>e.event.snapshot.context?.type===p.Result?{...e.context._internalState,result:{isGenuine:x(e.event.snapshot.context.payload)}}:e.context._internalState})},onDone:{target:"GenuineCheckCheck"},onError:{target:"Error",actions:"assignErrorFromEvent"}}},GenuineCheckCheck:{always:[{target:"Error",guard:"hasError"},{target:"Success"}]},Success:{type:"final"},Error:{type:"final"}},output:e=>e.context._internalState.error?d(e.context._internalState.error):v(e.context._internalState.result)})}extractDependencies(n){return{getOsVersion:()=>n.sendCommand(new C),getDeviceVersion:({input:r})=>{const{deviceInfo:i}=r;return n.getManagerApiService().getDeviceVersion(i)},getFirmwareVersion:({input:r})=>{const{deviceInfo:i,deviceVersion:a}=r;return n.getManagerApiService().getFirmwareVersion(i,a)},genuineCheck:({input:r})=>{const{deviceInfo:i,finalFirmware:a}=r,s=n.getSecureChannelService().genuineCheck(i,a);return new I(n,{connection:s}).run()},getDeviceSessionState:()=>n.getDeviceSessionState(),setDeviceSessionState:r=>n.setDeviceSessionState(r)}}}export{P as GenuineCheckDeviceAction};
2
+ //# sourceMappingURL=GenuineCheckDeviceAction.js.map