@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,IAAAA,EAA4B,qBAC5BC,EAAsC,kBAGtCC,EAA4B,uCAC5BC,EAAqC,4CACrCC,EAAgD,6DAChDC,EAAuC,oEACvCC,EAGO,sDACPC,EAAwC,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AO,IAAI,6BAA2B,cAAc,CACtD,CACF,KAEA,0BACEL,EACAK,KACA,mCAAgC,EAChCD,CACF,CACF,CAAC,CACH,CAAC,EAED,SAAS,gBAAiB,IAAM,CAC9B,GAAG,4EAA8EA,GAAS,CACxFX,EAAmB,EAEnBE,EAAc,qBACZ,wBAAqB,CAAE,KAAMI,CAAsB,CAAC,CACtD,EAEA,MAAMC,EAAe,IAAI,+BAA6B,CACpD,MAAO,CACL,QAAS,IAAIC,EAAYH,CAAa,EACtC,QAAS,QACT,wBAAyB,0BAAwB,aACnD,CACF,CAAC,EAED,KACG,MAAME,EAAc,qBAAqB,EACzC,mBAAmBJ,CAAuB,EAE7C,MAAMS,EAAgD,CACpD,CACE,OAAQ,qBAAmB,QAC3B,kBAAmB,CACjB,wBAAyB,0BAAwB,IACnD,CACF,EACA,CACE,OAAQ,qBAAmB,QAC3B,kBAAmB,CACjB,wBAAyB,0BAAwB,cACnD,CACF,EACA,CACE,OAAQ,qBAAmB,QAC3B,kBAAmB,CACjB,wBAAyB,0BAAwB,aACnD,CACF,EACA,CACE,OAAQ,qBAAmB,UAC3B,OAAQN,CACV,CACF,KAEA,0BACEC,EACAK,KACA,mCAAgC,EAChCD,CACF,CACF,CAAC,CACH,CAAC,CACH,CAAC,EAYD,MAAMH,CAAmE,CACvE,OACA,YAAYK,EAAyB,CACnC,KAAK,OAASA,CAChB,CACA,SAAgB,CACd,OAAO,IAAI,cAAY,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,SAAO,wBAAqB,CAAE,KAAM,CAAE,QAAS,EAAG,QAAS,SAAU,CAAE,CAAC,CAC1E,CACF",
6
- "names": ["import_purify_ts", "import_xstate", "import_ApduBuilder", "import_CommandResult", "import_makeInternalApi", "import_testDeviceActionStates", "import_DeviceActionState", "import_UserInteractionRequired", "import_Errors", "import_OpenAppDeviceAction", "import_src", "import_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 SendCommandInAppDAIntermediateValue<\n UserInteractionRequired.None | UserInteractionRequired.VerifyAddress\n >\n>;\n"],
5
+ "mappings": "aACA,IAAAA,EAA4B,qBAE5BC,EAAsC,kBAGtCC,EAA4B,uCAC5BC,EAAqC,4CACrCC,EAAgD,6DAChDC,EAAuC,oEACvCC,EAGO,sD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AM,CACX,CACA,eAAgB,CACd,SAAO,wBAAqB,CAAE,KAAM,CAAE,QAAS,EAAG,QAAS,SAAU,CAAE,CAAC,CAC1E,CACF",
6
+ "names": ["import_purify_ts", "import_xstate", "import_ApduBuilder", "import_CommandResult", "import_makeInternalApi", "import_testDeviceActionStates", "import_DeviceActionState", "import_UserInteractionRequired", "import_Errors", "import_OpenAppDeviceAction", "import_src", "import_SendCommandInAppDeviceAction", "importOriginal", "setupOpenAppDAMock", "error", "sendMyCommand", "extractDependenciesMock", "apiSendCommandMock", "commandParams", "mockedCommandResponse", "deviceAction", "TestCommand", "resolve", "reject", "expectedStates", "params"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var s=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var A=Object.getOwnPropertyNames;var x=Object.prototype.hasOwnProperty;var D=(n,e)=>{for(var r in e)s(n,r,{get:e[r],enumerable:!0})},E=(n,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of A(e))!x.call(n,t)&&t!==r&&s(n,t,{get:()=>e[t],enumerable:!(a=v(e,t))||a.enumerable});return n};var M=n=>E(s({},"__esModule",{value:!0}),n);var f={};D(f,{XStateDeviceAction:()=>V});module.exports=M(f);var h=require("@statelyai/inspect"),i=require("rxjs"),I=require("xstate"),o=require("../../device-action/model/DeviceActionState");class V{input;inspect=!1;constructor(e){this.input=e.input,this.inspect=!!e.inspect}_execute(e){const r=this.makeStateMachine(e),a=(0,I.createActor)(r,{input:this.input,inspect:this.inspect?(0,h.createBrowserInspector)().inspect:void 0}),t=new i.ReplaySubject,l=c=>{const{context:u,status:d,output:y,error:b}=c;switch(d){case"active":t.next({status:o.DeviceActionStatus.Pending,intermediateValue:u.intermediateValue});break;case"done":y.caseOf({Left:p=>{t.next({status:o.DeviceActionStatus.Error,error:p})},Right:p=>{t.next({status:o.DeviceActionStatus.Completed,output:p})}}),t.complete();break;case"error":t.error(b),t.complete();break;case"stopped":t.next({status:o.DeviceActionStatus.Stopped}),t.complete();break;default:this._exhaustiveMatchingGuard(d)}},S=new i.Observable(c=>{const u=t.subscribe(c);return()=>{m.unsubscribe(),u.unsubscribe(),a.stop()}}),m=a.subscribe(l);return a.start(),{observable:S.pipe((0,i.share)()),cancel:()=>{a.stop(),m.unsubscribe(),l(a.getSnapshot())}}}_exhaustiveMatchingGuard(e){throw console.log("_exhaustiveMatchingGuard status",e),new Error(`Unhandled status: ${e}`)}}0&&(module.exports={XStateDeviceAction});
1
+ "use strict";var s=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var A=Object.prototype.hasOwnProperty;var x=(n,e)=>{for(var r in e)s(n,r,{get:e[r],enumerable:!0})},D=(n,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of v(e))!A.call(n,t)&&t!==r&&s(n,t,{get:()=>e[t],enumerable:!(a=b(e,t))||a.enumerable});return n};var E=n=>D(s({},"__esModule",{value:!0}),n);var V={};x(V,{XStateDeviceAction:()=>M});module.exports=E(V);var i=require("rxjs"),d=require("xstate"),o=require("../../device-action/model/DeviceActionState");class M{input;inspect=!1;constructor(e){this.input=e.input,this.inspect=!!e.inspect}_execute(e){const r=this.makeStateMachine(e),a=(0,d.createActor)(r,{input:this.input}),t=new i.ReplaySubject,l=c=>{const{context:u,status:h,output:I,error:y}=c;switch(h){case"active":t.next({status:o.DeviceActionStatus.Pending,intermediateValue:u.intermediateValue});break;case"done":I.caseOf({Left:p=>{t.next({status:o.DeviceActionStatus.Error,error:p})},Right:p=>{t.next({status:o.DeviceActionStatus.Completed,output:p})}}),t.complete();break;case"error":t.error(y),t.complete();break;case"stopped":t.next({status:o.DeviceActionStatus.Stopped}),t.complete();break;default:this._exhaustiveMatchingGuard(h)}},S=new i.Observable(c=>{const u=t.subscribe(c);return()=>{m.unsubscribe(),u.unsubscribe(),a.stop()}}),m=a.subscribe(l);return a.start(),{observable:S.pipe((0,i.share)()),cancel:()=>{a.stop(),m.unsubscribe(),l(a.getSnapshot())}}}_exhaustiveMatchingGuard(e){throw console.log("_exhaustiveMatchingGuard status",e),new Error(`Unhandled status: ${e}`)}}0&&(module.exports={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": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,wBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAuC,8BACvCC,EAAiD,gBACjDC,EAKO,kBAQPC,EAGO,sDA2DA,MAAeL,CAOtB,CACW,MACA,QAAmB,GAO5B,YAAYM,EAA2C,CACrD,KAAK,MAAQA,EAAK,MAClB,KAAK,QAAU,EAAQA,EAAK,OAC9B,CAYA,SACEC,EACiE,CACjE,MAAMC,EAAe,KAAK,iBAAiBD,CAAW,EAEhDE,KAAQ,eAAYD,EAAc,CACtC,MAAO,KAAK,MAEZ,QAAS,KAAK,WAAU,0BAAuB,EAAE,QAAU,MAC7D,CAAC,EAQKE,EAAU,IAAI,gBAIdC,EACJC,GACG,CACH,KAAM,CAAE,QAAAC,EAAS,OAAAC,EAAQ,OAAAC,EAAQ,MAAAC,CAAM,EAAIJ,EAC3C,OAAQE,EAAQ,CACd,IAAK,SACHJ,EAAQ,KAAK,CACX,OAAQ,qBAAmB,QAC3B,kBAAmBG,EAAQ,iBAC7B,CAAC,EACD,MACF,IAAK,OACHE,EAAO,OAAO,CACZ,KAAOE,GAAQ,CACbP,EAAQ,KAAK,CACX,OAAQ,qBAAmB,MAC3B,MAAOO,CACT,CAAC,CACH,EACA,MAAQC,GAAW,CACjBR,EAAQ,KAAK,CACX,OAAQ,qBAAmB,UAC3B,OAAQQ,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,OAAQ,qBAAmB,OAC7B,CAAC,EACDA,EAAQ,SAAS,EACjB,MACF,QACE,KAAK,yBAAyBI,CAAM,CACxC,CACF,EAEMK,EAAa,IAAI,aAEpBC,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,QAAK,SAAM,CAAC,EACnC,OAAQ,IAAM,CACZV,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": ["XStateDeviceAction_exports", "__export", "XStateDeviceAction", "__toCommonJS", "import_inspect", "import_rxjs", "import_xstate", "import_DeviceActionState", "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}`);\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C,EAEKa,EAAoBb,EAAM,UAAUE,CAAmB,EAC7D,OAAAF,EAAM,MAAM,EAEL,CACL,WAAYU,EAAW,QAAK,SAAM,CAAC,EACnC,OAAQ,IAAM,CACZV,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": ["XStateDeviceAction_exports", "__export", "XStateDeviceAction", "__toCommonJS", "import_rxjs", "import_xstate", "import_DeviceActionState", "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": "mrBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,iCAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAA2B,qBAE3BC,EAA8B,mCAE9BC,EAA+B,kDAC/BD,EAAqC,+CAM9B,IAAME,EAAN,KAAmE,CA2ExE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,CAAC,gBAAc,MAAM,EAAG,IAAI,uBAAqB,CAC/C,GAAI,gBAAc,OAClB,YAAa,gBACb,aAAc,GACd,uBAAwB,EACxB,QAAS,GACT,WAAY,EAAI,KAAO,KACvB,MAAO,CAAC,SAAU,EAClB,cAAe,CACb,CACE,YAAa,uCACb,WAAY,uCACZ,UAAW,uCACX,aAAc,sCAChB,CACF,CACF,CAAC,EACD,CAAC,gBAAc,IAAI,EAAG,IAAI,uBAAqB,CAC7C,GAAI,gBAAc,KAClB,YAAa,cACb,aAAc,GACd,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,EACD,CAAC,gBAAc,IAAI,EAAG,IAAI,uBAAqB,CAC7C,GAAI,gBAAc,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,GAzEWA,EAANY,EAAA,IADN,cAAW,GACCZ",
6
6
  "names": ["StaticDeviceModelDataSource_exports", "__export", "StaticDeviceModelDataSource", "__toCommonJS", "import_inversify", "import_DeviceModel", "import_BleDeviceInfos", "StaticDeviceModelDataSource", "params", "deviceModel", "key", "value", "acc", "bluetoothSpec", "serviceToModel", "bleSpec", "spec", "uuid", "__publicField", "__decorateClass"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var o=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var d=(a,e)=>{for(var r in e)o(a,r,{get:e[r],enumerable:!0})},l=(a,e,r,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of y(e))!p.call(a,n)&&n!==r&&o(a,n,{get:()=>e[n],enumerable:!(t=i(e,n))||t.enumerable});return a};var S=a=>l(o({},"__esModule",{value:!0}),a);var u={};d(u,{DeviceSessionStateType:()=>s});module.exports=S(u);var s=(t=>(t[t.Connected=0]="Connected",t[t.ReadyWithoutSecureChannel=1]="ReadyWithoutSecureChannel",t[t.ReadyWithSecureChannel=2]="ReadyWithSecureChannel",t))(s||{});0&&(module.exports={DeviceSessionStateType});
1
+ "use strict";var r=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var p=(n,e)=>{for(var o in e)r(n,o,{get:e[o],enumerable:!0})},l=(n,e,o,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of y(e))!d.call(n,a)&&a!==o&&r(n,a,{get:()=>e[a],enumerable:!(t=s(e,a))||t.enumerable});return n};var S=n=>l(r({},"__esModule",{value:!0}),n);var u={};p(u,{DeviceSessionStateType:()=>i});module.exports=S(u);var i=(t=>(t[t.Connected=0]="Connected",t[t.ReadyWithoutSecureChannel=1]="ReadyWithoutSecureChannel",t[t.ReadyWithSecureChannel=2]="ReadyWithSecureChannel",t))(i||{});0&&(module.exports={DeviceSessionStateType});
2
2
  //# sourceMappingURL=DeviceSessionState.js.map
@@ -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": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,4BAAAE,IAAA,eAAAC,EAAAH,GA6CO,IAAKE,OACVA,IAAA,yBACAA,IAAA,yDACAA,IAAA,mDAHUA,OAAA",
6
6
  "names": ["DeviceSessionState_exports", "__export", "DeviceSessionStateType", "__toCommonJS"]
7
7
  }
@@ -0,0 +1,2 @@
1
+ "use strict";var g=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var f=(s,e)=>{for(var i in e)g(s,i,{get:e[i],enumerable:!0})},y=(s,e,i,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of d(e))!h.call(s,r)&&r!==i&&g(s,r,{get:()=>e[r],enumerable:!(o=p(e,r))||o.enumerable});return s};var D=s=>y(g({},"__esModule",{value:!0}),s),l=(s,e,i,o)=>{for(var r=o>1?void 0:o?p(e,i):e,n=s.length-1,v;n>=0;n--)(v=s[n])&&(r=(o?v(e,i,r):v(r))||r);return o&&r&&g(e,i,r),r},S=(s,e)=>(i,o)=>e(i,o,s);var b={};f(b,{DisableDeviceSessionRefresherUseCase:()=>t});module.exports=D(b);var c=require("inversify"),a=require("../../../internal/device-session/di/deviceSessionTypes"),m=require("../../../internal/logger-publisher/di/loggerTypes");let t=class{constructor(e,i){this._sessionService=e;this._logger=i("DisableDeviceSessionRefresherUseCase")}_logger;execute({sessionId:e,blockerId:i}){return this._sessionService.getDeviceSessionById(e).caseOf({Left:r=>{throw this._logger.error("Error getting device session",{data:{error:r}}),r},Right:r=>r.disableRefresher(i)})}};t=l([(0,c.injectable)(),S(0,(0,c.inject)(a.deviceSessionTypes.DeviceSessionService)),S(1,(0,c.inject)(m.loggerTypes.LoggerPublisherServiceFactory))],t);0&&(module.exports={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": "okBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,0CAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAmC,qBAInCC,EAAmC,0DAEnCC,EAA4B,qDAWrB,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,IADN,cAAW,EAIPC,EAAA,eAAO,qBAAmB,oBAAoB,GAE9CA,EAAA,eAAO,cAAY,6BAA6B,IALxCR",
6
+ "names": ["DisableDeviceSessionRefresher_exports", "__export", "DisableDeviceSessionRefresherUseCase", "__toCommonJS", "import_inversify", "import_deviceSessionTypes", "import_loggerTypes", "DisableDeviceSessionRefresherUseCase", "_sessionService", "loggerFactory", "sessionId", "blockerId", "error", "deviceSession", "__decorateClass", "__decorateParam"]
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";var a=require("../../../internal/device-session/data/DeviceSessionRefresherConst"),f=require("../../../internal/device-session/model/DeviceSession.stub"),l=require("../../../internal/device-session/model/Errors"),S=require("../../../internal/device-session/service/DefaultDeviceSessionService"),m=require("../../../internal/logger-publisher/service/DefaultLoggerPublisherService"),v=require("../../../internal/manager-api/data/AxiosManagerApiDataSource"),d=require("../../../internal/manager-api/service/DefaultManagerApiService"),p=require("../../../internal/secure-channel/data/DefaultSecureChannelDataSource"),u=require("../../../internal/secure-channel/service/DefaultSecureChannelService"),n=require("./DisableDeviceSessionRefresher");vi.mock("uuid",()=>({v4:()=>"fakeUuid"}));let e,r,i,o,t,c;describe("DisableDeviceSessionRefresherUseCase",()=>{beforeEach(()=>{e=new m.DefaultLoggerPublisherService([],"get-connected-device-use-case-test"),r=new S.DefaultDeviceSessionService(()=>e),t=new d.DefaultManagerApiService(new v.AxiosManagerApiDataSource({})),c=new u.DefaultSecureChannelService(new p.DefaultSecureChannelDataSource({}))}),afterEach(()=>{vi.clearAllMocks()}),describe("execute",()=>{it("should disable the device session refresher and return a function to reenable it",()=>{o=(0,f.deviceSessionStubBuilder)({id:"fakeSessionId"},()=>e,t,c,a.DEVICE_SESSION_REFRESHER_DEFAULT_OPTIONS),r.addDeviceSession(o),i=new n.DisableDeviceSessionRefresherUseCase(r,()=>e);const s=vi.spyOn(o,"disableRefresher"),D=i.execute({sessionId:"fakeSessionId",blockerId:"fakeBlockerId"});expect(s).toHaveBeenCalledWith("fakeBlockerId"),D(),o.close()}),it("should throw error when deviceSession is not found",()=>{i=new n.DisableDeviceSessionRefresherUseCase(r,()=>e);try{i.execute({sessionId:"fakeSessionId",blockerId:"fakeBlockerId"})}catch(s){expect(s).toBeInstanceOf(l.DeviceSessionNotFound)}})})});
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,IAAAA,EAAyD,qEAEzDC,EAAyC,6DACzCC,EAAsC,iDACtCC,EAA4C,wEAE5CC,EAA8C,4EAC9CC,EAA0C,gEAC1CC,EAAyC,kEAEzCC,EAA+C,wEAC/CC,EAA4C,wEAG5CC,EAAqD,2CAErD,GAAG,KAAK,OAAQ,KAAO,CACrB,GAAI,IAAM,UACZ,EAAE,EAEF,IAAIC,EACAC,EACAC,EACAC,EACAC,EACAC,EACJ,SAAS,uCAAwC,IAAM,CACrD,WAAW,IAAM,CACfL,EAAS,IAAI,gCACX,CAAC,EACD,oCACF,EACAC,EAAiB,IAAI,8BAA4B,IAAMD,CAAM,EAC7DI,EAAa,IAAI,2BACf,IAAI,4BAA0B,CAAC,CAAc,CAC/C,EACAC,EAAgB,IAAI,8BAClB,IAAI,iCAA+B,CAAC,CAAc,CACpD,CACF,CAAC,EAED,UAAU,IAAM,CACd,GAAG,cAAc,CACnB,CAAC,EAED,SAAS,UAAW,IAAM,CACxB,GAAG,mFAAoF,IAAM,CAE3FF,KAAgB,4BACd,CAAE,GAAI,eAAgB,EACtB,IAAMH,EACNI,EACAC,EACA,0CACF,EACAJ,EAAe,iBAAiBE,CAAa,EAC7CD,EAAU,IAAI,uCACZD,EACA,IAAMD,CACR,EAEA,MAAMM,EAAM,GAAG,MAAMH,EAAe,kBAAkB,EAGhDI,EAAoBL,EAAQ,QAAQ,CACxC,UAAW,gBACX,UAAW,eACb,CAAC,EAGD,OAAOI,CAAG,EAAE,qBAAqB,eAAe,EAChDC,EAAkB,EAClBJ,EAAc,MAAM,CACtB,CAAC,EAED,GAAG,qDAAsD,IAAM,CAE7DD,EAAU,IAAI,uCACZD,EACA,IAAMD,CACR,EAGA,GAAI,CACFE,EAAQ,QAAQ,CACd,UAAW,gBACX,UAAW,eACb,CAAC,CACH,OAASM,EAAO,CAEd,OAAOA,CAAK,EAAE,eAAe,uBAAqB,CACpD,CACF,CAAC,CACH,CAAC,CACH,CAAC",
6
+ "names": ["import_DeviceSessionRefresherConst", "import_DeviceSession", "import_Errors", "import_DefaultDeviceSessionService", "import_DefaultLoggerPublisherService", "import_AxiosManagerApiDataSource", "import_DefaultManagerApiService", "import_DefaultSecureChannelDataSource", "import_DefaultSecureChannelService", "import_DisableDeviceSessionRefresher", "logger", "sessionService", "useCase", "deviceSession", "managerApi", "secureChannel", "spy", "reenableRefresher", "error"]
7
+ }
@@ -1,2 +1,2 @@
1
- "use strict";var A=Object.defineProperty;var re=Object.getOwnPropertyDescriptor;var oe=Object.getOwnPropertyNames;var te=Object.prototype.hasOwnProperty;var pe=(t,o)=>{for(var p in o)A(t,p,{get:o[p],enumerable:!0})},d=(t,o,p,u)=>{if(o&&typeof o=="object"||typeof o=="function")for(let s of oe(o))!te.call(t,s)&&s!==p&&A(t,s,{get:()=>o[s],enumerable:!(u=re(o,s))||u.enumerable});return t},r=(t,o,p)=>(d(t,o,"default"),p&&d(p,o,"default"));var me=t=>d(A({},"__esModule",{value:!0}),t);var e={};pe(e,{APDU_MAX_PAYLOAD:()=>a.APDU_MAX_PAYLOAD,Apdu:()=>D.Apdu,ApduBuilder:()=>a.ApduBuilder,ApduParser:()=>S.ApduParser,ApduResponse:()=>X.ApduResponse,BatteryStatusType:()=>f.BatteryStatusType,BleDeviceInfos:()=>F.BleDeviceInfos,ByteArrayBuilder:()=>v.ByteArrayBuilder,ByteArrayParser:()=>l.ByteArrayParser,CloseAppCommand:()=>C.CloseAppCommand,CommandResultFactory:()=>m.CommandResultFactory,CommandResultStatus:()=>m.CommandResultStatus,CommandUtils:()=>E.CommandUtils,ConnectedDevice:()=>Z.ConnectedDevice,ConsoleLogger:()=>J.ConsoleLogger,DeviceActionStatus:()=>M.DeviceActionStatus,DeviceManagementKit:()=>Y.DeviceManagementKit,DeviceManagementKitBuilder:()=>j.DeviceManagementKitBuilder,DeviceModel:()=>i.DeviceModel,DeviceModelId:()=>i.DeviceModelId,DeviceSessionStateType:()=>k.DeviceSessionStateType,DeviceStatus:()=>b.DeviceStatus,FramerUtils:()=>N.FramerUtils,GetAppAndVersionCommand:()=>g.GetAppAndVersionCommand,GetBatteryStatusCommand:()=>f.GetBatteryStatusCommand,GetDeviceStatusDeviceAction:()=>O.GetDeviceStatusDeviceAction,GetOsVersionCommand:()=>B.GetOsVersionCommand,GlobalCommandError:()=>x.GlobalCommandError,GlobalCommandErrorHandler:()=>x.GlobalCommandErrorHandler,GoToDashboardDeviceAction:()=>U.GoToDashboardDeviceAction,InvalidStatusWordError:()=>y.InvalidStatusWordError,LEDGER_VENDOR_ID:()=>i.LEDGER_VENDOR_ID,ListAppsCommand:()=>L.ListAppsCommand,ListAppsDeviceAction:()=>V.ListAppsDeviceAction,ListAppsWithMetadataDeviceAction:()=>h.ListAppsWithMetadataDeviceAction,LogLevel:()=>z.LogLevel,OpenAppCommand:()=>G.OpenAppCommand,OpenAppDeviceAction:()=>P.OpenAppDeviceAction,SendCommandInAppDeviceAction:()=>_.SendCommandInAppDeviceAction,StaticDeviceModelDataSource:()=>W.StaticDeviceModelDataSource,TransportConnectedDevice:()=>$.TransportConnectedDevice,TransportDeviceModel:()=>K.TransportDeviceModel,UnknownDAError:()=>I.UnknownDAError,UserInteractionRequired:()=>T.UserInteractionRequired,WebLogsExporterLogger:()=>Q.WebLogsExporterLogger,XStateDeviceAction:()=>H.XStateDeviceAction,base64StringToBuffer:()=>c.base64StringToBuffer,bufferToHexaString:()=>n.bufferToHexaString,connectedDeviceStubBuilder:()=>ee.connectedDeviceStubBuilder,defaultApduReceiverServiceStubBuilder:()=>q.defaultApduReceiverServiceStubBuilder,defaultApduSenderServiceStubBuilder:()=>w.defaultApduSenderServiceStubBuilder,hexaStringToBuffer:()=>n.hexaStringToBuffer,isBase64String:()=>c.isBase64String,isCommandErrorCode:()=>R.isCommandErrorCode,isHexaString:()=>n.isHexaString,isSuccessCommandResult:()=>m.isSuccessCommandResult});module.exports=me(e);var D=require("./apdu/model/Apdu"),a=require("./apdu/utils/ApduBuilder"),S=require("./apdu/utils/ApduParser");r(e,require("./apdu/utils/AppBuilderError"),module.exports);var v=require("./apdu/utils/ByteArrayBuilder"),l=require("./apdu/utils/ByteArrayParser"),y=require("./command/Errors"),m=require("./command/model/CommandResult"),C=require("./command/os/CloseAppCommand"),g=require("./command/os/GetAppAndVersionCommand"),f=require("./command/os/GetBatteryStatusCommand"),B=require("./command/os/GetOsVersionCommand"),L=require("./command/os/ListAppsCommand"),G=require("./command/os/OpenAppCommand"),R=require("./command/utils/CommandErrors"),E=require("./command/utils/CommandUtils"),x=require("./command/utils/GlobalCommandError"),i=require("./device/DeviceModel"),b=require("./device/DeviceStatus"),M=require("./device-action/model/DeviceActionState"),T=require("./device-action/model/UserInteractionRequired"),I=require("./device-action/os/Errors"),O=require("./device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction"),U=require("./device-action/os/GoToDashboard/GoToDashboardDeviceAction"),V=require("./device-action/os/ListApps/ListAppsDeviceAction"),h=require("./device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction"),P=require("./device-action/os/OpenAppDeviceAction/OpenAppDeviceAction"),_=require("./device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction"),H=require("./device-action/xstate-utils/XStateDeviceAction"),W=require("./device-model/data/StaticDeviceModelDataSource"),F=require("./device-model/model/BleDeviceInfos"),K=require("./device-model/model/DeviceModel"),X=require("./device-session/ApduResponse");r(e,require("./device-session/data/FramerConst"),module.exports);var k=require("./device-session/DeviceSessionState"),q=require("./device-session/service/DefaultApduReceiverService.stub"),w=require("./device-session/service/DefaultApduSenderService.stub"),N=require("./device-session/utils/FramerUtils"),Y=require("./DeviceManagementKit"),j=require("./DeviceManagementKitBuilder");r(e,require("./Error"),module.exports);var z=require("./logger-subscriber/model/LogLevel"),J=require("./logger-subscriber/service/ConsoleLogger"),Q=require("./logger-subscriber/service/WebLogsExporterLogger"),Z=require("./transport/model/ConnectedDevice");r(e,require("./transport/model/Errors"),module.exports);var $=require("./transport/model/TransportConnectedDevice"),ee=require("./transport/model/TransportConnectedDevice.stub");r(e,require("./types"),module.exports);var c=require("./utils/Base64String"),n=require("./utils/HexaString");0&&(module.exports={APDU_MAX_PAYLOAD,Apdu,ApduBuilder,ApduParser,ApduResponse,BatteryStatusType,BleDeviceInfos,ByteArrayBuilder,ByteArrayParser,CloseAppCommand,CommandResultFactory,CommandResultStatus,CommandUtils,ConnectedDevice,ConsoleLogger,DeviceActionStatus,DeviceManagementKit,DeviceManagementKitBuilder,DeviceModel,DeviceModelId,DeviceSessionStateType,DeviceStatus,FramerUtils,GetAppAndVersionCommand,GetBatteryStatusCommand,GetDeviceStatusDeviceAction,GetOsVersionCommand,GlobalCommandError,GlobalCommandErrorHandler,GoToDashboardDeviceAction,InvalidStatusWordError,LEDGER_VENDOR_ID,ListAppsCommand,ListAppsDeviceAction,ListAppsWithMetadataDeviceAction,LogLevel,OpenAppCommand,OpenAppDeviceAction,SendCommandInAppDeviceAction,StaticDeviceModelDataSource,TransportConnectedDevice,TransportDeviceModel,UnknownDAError,UserInteractionRequired,WebLogsExporterLogger,XStateDeviceAction,base64StringToBuffer,bufferToHexaString,connectedDeviceStubBuilder,defaultApduReceiverServiceStubBuilder,defaultApduSenderServiceStubBuilder,hexaStringToBuffer,isBase64String,isCommandErrorCode,isHexaString,isSuccessCommandResult,...require("./apdu/utils/AppBuilderError"),...require("./device-session/data/FramerConst"),...require("./Error"),...require("./transport/model/Errors"),...require("./types")});
1
+ "use strict";var A=Object.defineProperty;var ae=Object.getOwnPropertyDescriptor;var se=Object.getOwnPropertyNames;var fe=Object.prototype.hasOwnProperty;var ce=(t,r)=>{for(var p in r)A(t,p,{get:r[p],enumerable:!0})},d=(t,r,p,D)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of se(r))!fe.call(t,a)&&a!==p&&A(t,a,{get:()=>r[a],enumerable:!(D=ae(r,a))||D.enumerable});return t},o=(t,r,p)=>(d(t,r,"default"),p&&d(p,r,"default"));var xe=t=>d(A({},"__esModule",{value:!0}),t);var e={};ce(e,{APDU_MAX_PAYLOAD:()=>s.APDU_MAX_PAYLOAD,Apdu:()=>u.Apdu,ApduBuilder:()=>s.ApduBuilder,ApduParser:()=>l.ApduParser,ApduResponse:()=>q.ApduResponse,BatteryStatusType:()=>f.BatteryStatusType,BleDeviceInfos:()=>K.BleDeviceInfos,ByteArrayBuilder:()=>v.ByteArrayBuilder,ByteArrayParser:()=>S.ByteArrayParser,CallTaskInAppDeviceAction:()=>h.CallTaskInAppDeviceAction,CloseAppCommand:()=>y.CloseAppCommand,CommandResultFactory:()=>i.CommandResultFactory,CommandResultStatus:()=>i.CommandResultStatus,CommandUtils:()=>M.CommandUtils,ConnectedDevice:()=>pe.ConnectedDevice,ConsoleLogger:()=>re.ConsoleLogger,DeviceActionStatus:()=>b.DeviceActionStatus,DeviceConnectionStateMachine:()=>ie.DeviceConnectionStateMachine,DeviceManagementKit:()=>$.DeviceManagementKit,DeviceManagementKitBuilder:()=>ee.DeviceManagementKitBuilder,DeviceModel:()=>m.DeviceModel,DeviceModelId:()=>m.DeviceModelId,DeviceSessionStateType:()=>w.DeviceSessionStateType,DeviceStatus:()=>I.DeviceStatus,FramerUtils:()=>Z.FramerUtils,GenuineCheckDeviceAction:()=>N.GenuineCheckDeviceAction,GetAppAndVersionCommand:()=>g.GetAppAndVersionCommand,GetBatteryStatusCommand:()=>f.GetBatteryStatusCommand,GetDeviceStatusDeviceAction:()=>U.GetDeviceStatusDeviceAction,GetOsVersionCommand:()=>L.GetOsVersionCommand,GlobalCommandError:()=>c.GlobalCommandError,GlobalCommandErrorHandler:()=>c.GlobalCommandErrorHandler,GoToDashboardDeviceAction:()=>P.GoToDashboardDeviceAction,InstallAppDeviceAction:()=>Y.InstallAppDeviceAction,InvalidStatusWordError:()=>C.InvalidStatusWordError,LEDGER_VENDOR_ID:()=>m.LEDGER_VENDOR_ID,ListAppsCommand:()=>B.ListAppsCommand,ListAppsDeviceAction:()=>V.ListAppsDeviceAction,ListAppsWithMetadataDeviceAction:()=>_.ListAppsWithMetadataDeviceAction,ListInstalledAppsDeviceAction:()=>j.ListInstalledAppsDeviceAction,LoadCertificateCommand:()=>G.LoadCertificateCommand,LogLevel:()=>oe.LogLevel,OpenAppCommand:()=>R.OpenAppCommand,OpenAppDeviceAction:()=>k.OpenAppDeviceAction,SendCommandInAppDeviceAction:()=>H.SendCommandInAppDeviceAction,StaticDeviceModelDataSource:()=>F.StaticDeviceModelDataSource,TransportConnectedDevice:()=>me.TransportConnectedDevice,TransportDeviceModel:()=>X.TransportDeviceModel,UninstallAppDeviceAction:()=>z.UninstallAppDeviceAction,UnknownDAError:()=>O.UnknownDAError,UserInteractionRequired:()=>T.UserInteractionRequired,WebLogsExporterLogger:()=>te.WebLogsExporterLogger,XStateDeviceAction:()=>W.XStateDeviceAction,base64StringToBuffer:()=>x.base64StringToBuffer,bufferToHexaString:()=>n.bufferToHexaString,connectedDeviceStubBuilder:()=>ne.connectedDeviceStubBuilder,defaultApduReceiverServiceStubBuilder:()=>J.defaultApduReceiverServiceStubBuilder,defaultApduSenderServiceStubBuilder:()=>Q.defaultApduSenderServiceStubBuilder,hexaStringToBuffer:()=>n.hexaStringToBuffer,isBase64String:()=>x.isBase64String,isCommandErrorCode:()=>E.isCommandErrorCode,isHexaString:()=>n.isHexaString,isSuccessCommandResult:()=>i.isSuccessCommandResult});module.exports=xe(e);var u=require("./apdu/model/Apdu"),s=require("./apdu/utils/ApduBuilder"),l=require("./apdu/utils/ApduParser");o(e,require("./apdu/utils/AppBuilderError"),module.exports);var v=require("./apdu/utils/ByteArrayBuilder"),S=require("./apdu/utils/ByteArrayParser"),C=require("./command/Errors"),i=require("./command/model/CommandResult"),y=require("./command/os/CloseAppCommand"),g=require("./command/os/GetAppAndVersionCommand"),f=require("./command/os/GetBatteryStatusCommand"),L=require("./command/os/GetOsVersionCommand"),B=require("./command/os/ListAppsCommand"),G=require("./command/os/LoadCertificateCommand"),R=require("./command/os/OpenAppCommand"),E=require("./command/utils/CommandErrors"),M=require("./command/utils/CommandUtils"),c=require("./command/utils/GlobalCommandError"),m=require("./device/DeviceModel"),I=require("./device/DeviceStatus"),b=require("./device-action/model/DeviceActionState"),T=require("./device-action/model/UserInteractionRequired"),h=require("./device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction"),O=require("./device-action/os/Errors"),U=require("./device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction"),P=require("./device-action/os/GoToDashboard/GoToDashboardDeviceAction"),V=require("./device-action/os/ListApps/ListAppsDeviceAction"),_=require("./device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction"),k=require("./device-action/os/OpenAppDeviceAction/OpenAppDeviceAction"),H=require("./device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction"),W=require("./device-action/xstate-utils/XStateDeviceAction"),F=require("./device-model/data/StaticDeviceModelDataSource"),K=require("./device-model/model/BleDeviceInfos"),X=require("./device-model/model/DeviceModel"),q=require("./device-session/ApduResponse");o(e,require("./device-session/data/FramerConst"),module.exports);var w=require("./device-session/DeviceSessionState"),N=require("./secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction"),Y=require("./secure-channel/device-action/InstallApp/InstallAppDeviceAction"),j=require("./secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction"),z=require("./secure-channel/device-action/UninstallApp/UninstallAppDeviceAction"),J=require("./device-session/service/DefaultApduReceiverService.stub"),Q=require("./device-session/service/DefaultApduSenderService.stub"),Z=require("./device-session/utils/FramerUtils"),$=require("./DeviceManagementKit"),ee=require("./DeviceManagementKitBuilder");o(e,require("./Error"),module.exports);var oe=require("./logger-subscriber/model/LogLevel"),re=require("./logger-subscriber/service/ConsoleLogger"),te=require("./logger-subscriber/service/WebLogsExporterLogger"),pe=require("./transport/model/ConnectedDevice"),ie=require("./transport/model/DeviceConnectionStateMachine");o(e,require("./transport/model/Errors"),module.exports);var me=require("./transport/model/TransportConnectedDevice"),ne=require("./transport/model/TransportConnectedDevice.stub");o(e,require("./types"),module.exports);var x=require("./utils/Base64String"),n=require("./utils/HexaString");0&&(module.exports={APDU_MAX_PAYLOAD,Apdu,ApduBuilder,ApduParser,ApduResponse,BatteryStatusType,BleDeviceInfos,ByteArrayBuilder,ByteArrayParser,CallTaskInAppDeviceAction,CloseAppCommand,CommandResultFactory,CommandResultStatus,CommandUtils,ConnectedDevice,ConsoleLogger,DeviceActionStatus,DeviceConnectionStateMachine,DeviceManagementKit,DeviceManagementKitBuilder,DeviceModel,DeviceModelId,DeviceSessionStateType,DeviceStatus,FramerUtils,GenuineCheckDeviceAction,GetAppAndVersionCommand,GetBatteryStatusCommand,GetDeviceStatusDeviceAction,GetOsVersionCommand,GlobalCommandError,GlobalCommandErrorHandler,GoToDashboardDeviceAction,InstallAppDeviceAction,InvalidStatusWordError,LEDGER_VENDOR_ID,ListAppsCommand,ListAppsDeviceAction,ListAppsWithMetadataDeviceAction,ListInstalledAppsDeviceAction,LoadCertificateCommand,LogLevel,OpenAppCommand,OpenAppDeviceAction,SendCommandInAppDeviceAction,StaticDeviceModelDataSource,TransportConnectedDevice,TransportDeviceModel,UninstallAppDeviceAction,UnknownDAError,UserInteractionRequired,WebLogsExporterLogger,XStateDeviceAction,base64StringToBuffer,bufferToHexaString,connectedDeviceStubBuilder,defaultApduReceiverServiceStubBuilder,defaultApduSenderServiceStubBuilder,hexaStringToBuffer,isBase64String,isCommandErrorCode,isHexaString,isSuccessCommandResult,...require("./apdu/utils/AppBuilderError"),...require("./device-session/data/FramerConst"),...require("./Error"),...require("./transport/model/Errors"),...require("./types")});
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": "meAAA,IAAAA,EAAA,GAAAC,GAAAD,EAAA,u/EAAAE,GAAAF,GAEA,IAAAG,EAAqB,gCACrBC,EAA8C,uCAC9CC,EAA2B,sCAC3BC,EAAAN,EAAc,2CALd,gBAMA,IAAAO,EAAiC,4CACjCC,EAAgC,2CAChCC,EAAuC,+BACvCC,EAIO,4CACPC,EAAgC,2CAChCC,EAGO,mDACPC,EAKO,mDACPC,EAGO,+CACPC,EAKO,2CACPC,EAGO,0CACPC,EAAmC,4CACnCC,EAA6B,2CAC7BC,EAGO,iDACPC,EAIO,mCACPC,EAA6B,oCAE7BC,EAGO,sDACPC,EAAwC,4DACxCd,EAA+B,wCAC/Be,EAA4C,6EAC5CC,EAA0C,yEAC1CC,EAAqC,+DACrCC,EAAiD,uFACjDC,EAAoC,yEACpCC,EAA6C,2FAC7CC,EAGO,8DACPC,EAA4C,8DAC5CC,EAA+B,kDAC/BZ,EAAqC,+CACrCa,EAA6B,4CAC7B3B,EAAAN,EAAc,gDAxEd,gBAyEA,IAAAkC,EAGO,kDAEPC,EAAsD,uEACtDC,EAAoD,qEACpDC,EAA4B,iDAC5BC,EAAoC,oCACpCC,EAA2C,2CAC3CjC,EAAAN,EAAc,sBAnFd,gBAoFA,IAAAwC,EAAyB,iDACzBC,EAA8B,wDAC9BC,EAAsC,gEACtCC,EAAgC,gDAChCrC,EAAAN,EAAc,uCAxFd,gBAyFA,IAAA4C,EAAyC,yDACzCA,GAA2C,8DAC3CtC,EAAAN,EAAc,sBA3Fd,gBA4FA,IAAA6C,EAAqD,mCACrDC,EAIO",
6
- "names": ["api_exports", "__export", "__toCommonJS", "import_Apdu", "import_ApduBuilder", "import_ApduParser", "__reExport", "import_ByteArrayBuilder", "import_ByteArrayParser", "import_Errors", "import_CommandResult", "import_CloseAppCommand", "import_GetAppAndVersionCommand", "import_GetBatteryStatusCommand", "import_GetOsVersionCommand", "import_ListAppsCommand", "import_OpenAppCommand", "import_CommandErrors", "import_CommandUtils", "import_GlobalCommandError", "import_DeviceModel", "import_DeviceStatus", "import_DeviceActionState", "import_UserInteractionRequired", "import_GetDeviceStatusDeviceAction", "import_GoToDashboardDeviceAction", "import_ListAppsDeviceAction", "import_ListAppsWithMetadataDeviceAction", "import_OpenAppDeviceAction", "import_SendCommandInAppDeviceAction", "import_XStateDeviceAction", "import_StaticDeviceModelDataSource", "import_BleDeviceInfos", "import_ApduResponse", "import_DeviceSessionState", "import_DefaultApduReceiverService", "import_DefaultApduSenderService", "import_FramerUtils", "import_DeviceManagementKit", "import_DeviceManagementKitBuilder", "import_LogLevel", "import_ConsoleLogger", "import_WebLogsExporterLogger", "import_ConnectedDevice", "import_TransportConnectedDevice", "import_Base64String", "import_HexaString"]
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": "meAAA,IAAAA,EAAA,GAAAC,GAAAD,EAAA,k5FAAAE,GAAAF,GAEA,IAAAG,EAAqB,gCACrBC,EAA8C,uCAC9CC,EAA2B,sCAC3BC,EAAAN,EAAc,2CALd,gBAMA,IAAAO,EAAiC,4CACjCC,EAAgC,2CAChCC,EAAuC,+BACvCC,EAIO,4CACPC,EAAgC,2CAChCC,EAGO,mDACPC,EAKO,mDACPC,EAGO,+CACPC,EAKO,2CACPC,EAIO,kDACPC,EAGO,0CACPC,EAAmC,4CACnCC,EAA6B,2CAC7BC,EAGO,iDACPC,EAIO,mCACPC,EAA6B,oCAE7BC,EAGO,sDACPC,EAAwC,4DACxCC,EAA0C,qFAC1ChB,EAA+B,wCAC/BiB,EAA4C,6EAC5CC,EAA0C,yEAC1CC,EAAqC,+DACrCC,EAAiD,uFACjDC,EAAoC,yEACpCC,EAA6C,2FAC7CC,EAGO,8DACPC,EAA4C,8DAC5CC,EAA+B,kDAC/Bb,EAAqC,+CACrCc,EAA6B,4CAC7B7B,EAAAN,EAAc,gDA9Ed,gBA+EA,IAAAoC,EAGO,kDACPC,EAAyC,mFACzCC,EAAuC,+EACvCC,EAA8C,6FAC9CC,EAAyC,mFAEzCC,EAAsD,uEACtDC,EAAoD,qEACpDC,EAA4B,iDAC5BC,EAAoC,oCACpCC,GAA2C,2CAC3CvC,EAAAN,EAAc,sBA7Fd,gBA8FA,IAAA8C,GAAyB,iDACzBC,GAA8B,wDAC9BC,GAAsC,gEACtCC,GAAgC,gDAChCC,GAGO,6DACP5C,EAAAN,EAAc,uCAtGd,gBAuGA,IAAAmD,GAAyC,yDACzCA,GAA2C,8DAC3C7C,EAAAN,EAAc,sBAzGd,gBA0GA,IAAAoD,EAAqD,mCACrDC,EAIO",
6
+ "names": ["api_exports", "__export", "__toCommonJS", "import_Apdu", "import_ApduBuilder", "import_ApduParser", "__reExport", "import_ByteArrayBuilder", "import_ByteArrayParser", "import_Errors", "import_CommandResult", "import_CloseAppCommand", "import_GetAppAndVersionCommand", "import_GetBatteryStatusCommand", "import_GetOsVersionCommand", "import_ListAppsCommand", "import_LoadCertificateCommand", "import_OpenAppCommand", "import_CommandErrors", "import_CommandUtils", "import_GlobalCommandError", "import_DeviceModel", "import_DeviceStatus", "import_DeviceActionState", "import_UserInteractionRequired", "import_CallTaskInAppDeviceAction", "import_GetDeviceStatusDeviceAction", "import_GoToDashboardDeviceAction", "import_ListAppsDeviceAction", "import_ListAppsWithMetadataDeviceAction", "import_OpenAppDeviceAction", "import_SendCommandInAppDeviceAction", "import_XStateDeviceAction", "import_StaticDeviceModelDataSource", "import_BleDeviceInfos", "import_ApduResponse", "import_DeviceSessionState", "import_GenuineCheckDeviceAction", "import_InstallAppDeviceAction", "import_ListInstalledAppsDeviceAction", "import_UninstallAppDeviceAction", "import_DefaultApduReceiverService", "import_DefaultApduSenderService", "import_FramerUtils", "import_DeviceManagementKit", "import_DeviceManagementKitBuilder", "import_LogLevel", "import_ConsoleLogger", "import_WebLogsExporterLogger", "import_ConnectedDevice", "import_DeviceConnectionStateMachine", "import_TransportConnectedDevice", "import_Base64String", "import_HexaString"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var t=require("../../logger-subscriber/model/LogLevel"),g=require("./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 g.ConsoleLogger}),describe("log",()=>{it("should log Info level",()=>{o.log(t.LogLevel.Info,l,e),expect(n).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Info level with a custom tag",()=>{const s="custom-tag";o.log(t.LogLevel.Info,l,{...e,tag:s}),expect(n).toHaveBeenCalledWith(`[${s}]`,l,e.data)}),it("should log Warn level",()=>{o.log(t.LogLevel.Warning,l,e),expect(d).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Debug level",()=>{o.log(t.LogLevel.Debug,l,e),expect(r).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Fatal level",()=>{o.log(t.LogLevel.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.LogLevel.Error,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)})})}),describe("custom level (LogLevel.Info)",()=>{beforeEach(()=>{jest.clearAllMocks(),o=new g.ConsoleLogger(t.LogLevel.Info)}),describe("log",()=>{it("should log Info level",()=>{o.log(t.LogLevel.Info,l,e),expect(n).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Info level with a custom tag",()=>{const s="custom-tag";o.log(t.LogLevel.Info,l,{...e,tag:s}),expect(n).toHaveBeenCalledWith(`[${s}]`,l,e.data)}),it("should log Warn level",()=>{o.log(t.LogLevel.Warning,l,e),expect(d).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should not log Debug level",()=>{o.log(t.LogLevel.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.LogLevel.Error,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Fatal level",()=>{o.log(t.LogLevel.Fatal,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)})})}),describe("custom level (LogLevel.Warning)",()=>{beforeEach(()=>{jest.clearAllMocks(),o=new g.ConsoleLogger(t.LogLevel.Warning)}),describe("log",()=>{it("should not log Info level",()=>{o.log(t.LogLevel.Info,l,e),expect(n).not.toHaveBeenCalled()}),it("should log Warn level",()=>{o.log(t.LogLevel.Warning,l,e),expect(d).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should not log Debug level",()=>{o.log(t.LogLevel.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.LogLevel.Error,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Fatal level",()=>{o.log(t.LogLevel.Fatal,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)})})}),describe("custom level (LogLevel.Error)",()=>{beforeEach(()=>{jest.clearAllMocks(),o=new g.ConsoleLogger(t.LogLevel.Error)}),describe("log",()=>{it("should not log Info level",()=>{o.log(t.LogLevel.Info,l,e),expect(n).not.toHaveBeenCalled()}),it("should not log Warn level",()=>{o.log(t.LogLevel.Warning,l,e),expect(d).not.toHaveBeenCalled()}),it("should not log Debug level",()=>{o.log(t.LogLevel.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.LogLevel.Error,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Fatal level",()=>{o.log(t.LogLevel.Fatal,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)})})}),describe("custom level (LogLevel.Fatal)",()=>{beforeEach(()=>{jest.clearAllMocks(),o=new g.ConsoleLogger(t.LogLevel.Fatal)}),describe("log",()=>{it("should not log Info level",()=>{o.log(t.LogLevel.Info,l,e),expect(n).not.toHaveBeenCalled()}),it("should not log Warn level",()=>{o.log(t.LogLevel.Warning,l,e),expect(d).not.toHaveBeenCalled()}),it("should not log Debug level",()=>{o.log(t.LogLevel.Debug,l,e),expect(r).not.toHaveBeenCalled()}),it("should log Fatal level",()=>{o.log(t.LogLevel.Fatal,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)})})})});
1
+ "use strict";var t=require("../../logger-subscriber/model/LogLevel"),g=require("./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 g.ConsoleLogger}),describe("log",()=>{it("should log Info level",()=>{o.log(t.LogLevel.Info,l,e),expect(n).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Info level with a custom tag",()=>{const i="custom-tag";o.log(t.LogLevel.Info,l,{...e,tag:i}),expect(n).toHaveBeenCalledWith(`[${i}]`,l,e.data)}),it("should log Warn level",()=>{o.log(t.LogLevel.Warning,l,e),expect(d).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Debug level",()=>{o.log(t.LogLevel.Debug,l,e),expect(r).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Fatal level",()=>{o.log(t.LogLevel.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.LogLevel.Error,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)})})}),describe("custom level (LogLevel.Info)",()=>{beforeEach(()=>{vi.clearAllMocks(),o=new g.ConsoleLogger(t.LogLevel.Info)}),describe("log",()=>{it("should log Info level",()=>{o.log(t.LogLevel.Info,l,e),expect(n).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Info level with a custom tag",()=>{const i="custom-tag";o.log(t.LogLevel.Info,l,{...e,tag:i}),expect(n).toHaveBeenCalledWith(`[${i}]`,l,e.data)}),it("should log Warn level",()=>{o.log(t.LogLevel.Warning,l,e),expect(d).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should not log Debug level",()=>{o.log(t.LogLevel.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.LogLevel.Error,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Fatal level",()=>{o.log(t.LogLevel.Fatal,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)})})}),describe("custom level (LogLevel.Warning)",()=>{beforeEach(()=>{vi.clearAllMocks(),o=new g.ConsoleLogger(t.LogLevel.Warning)}),describe("log",()=>{it("should not log Info level",()=>{o.log(t.LogLevel.Info,l,e),expect(n).not.toHaveBeenCalled()}),it("should log Warn level",()=>{o.log(t.LogLevel.Warning,l,e),expect(d).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should not log Debug level",()=>{o.log(t.LogLevel.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.LogLevel.Error,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Fatal level",()=>{o.log(t.LogLevel.Fatal,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)})})}),describe("custom level (LogLevel.Error)",()=>{beforeEach(()=>{vi.clearAllMocks(),o=new g.ConsoleLogger(t.LogLevel.Error)}),describe("log",()=>{it("should not log Info level",()=>{o.log(t.LogLevel.Info,l,e),expect(n).not.toHaveBeenCalled()}),it("should not log Warn level",()=>{o.log(t.LogLevel.Warning,l,e),expect(d).not.toHaveBeenCalled()}),it("should not log Debug level",()=>{o.log(t.LogLevel.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.LogLevel.Error,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Fatal level",()=>{o.log(t.LogLevel.Fatal,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)})})}),describe("custom level (LogLevel.Fatal)",()=>{beforeEach(()=>{vi.clearAllMocks(),o=new g.ConsoleLogger(t.LogLevel.Fatal)}),describe("log",()=>{it("should not log Info level",()=>{o.log(t.LogLevel.Info,l,e),expect(n).not.toHaveBeenCalled()}),it("should not log Warn level",()=>{o.log(t.LogLevel.Warning,l,e),expect(d).not.toHaveBeenCalled()}),it("should not log Debug level",()=>{o.log(t.LogLevel.Debug,l,e),expect(r).not.toHaveBeenCalled()}),it("should log Fatal level",()=>{o.log(t.LogLevel.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,IAAAA,EAAyB,iDAGzBC,EAA8B,2BAE9B,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,mBAAmB,KAAK,G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C,CAAC,EAED,SAAS,MAAO,IAAM,CACpB,GAAG,4BAA6B,IAAM,CACpCA,EAAO,IAAI,WAAS,KAAME,EAASD,CAAO,EAC1C,OAAOL,CAAI,EAAE,IAAI,iBAAiB,CACpC,CAAC,EAED,GAAG,4BAA6B,IAAM,CACpCI,EAAO,IAAI,WAAS,QAASE,EAASD,CAAO,EAC7C,OAAON,CAAI,EAAE,IAAI,iBAAiB,CACpC,CAAC,EAED,GAAG,6BAA8B,IAAM,CACrCK,EAAO,IAAI,WAAS,MAAOE,EAASD,CAAO,EAC3C,OAAOJ,CAAK,EAAE,IAAI,iBAAiB,CACrC,CAAC,EAED,GAAG,yBAA0B,IAAM,CACjCG,EAAO,IAAI,WAAS,MAAOE,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,IAAAA,EAAyB,iDAGzBC,EAA8B,2BAE9B,MAAMC,EAAO,GAAG,MAAM,QAAS,MAAM,EAAE,mBAAmB,GAAG,GAAG,CAAC,EAC3DC,EAAO,GAAG,MAAM,QAAS,MAAM,EAAE,mBAAmB,GAAG,GAAG,CAAC,EAC3DC,EAAQ,GAAG,MAAM,QAAS,OAAO,EAAE,mBAAmB,GAAG,GAAG,CAAC,EA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CACf,GAAG,cAAc,EACjBD,EAAS,IAAI,gBAAc,WAAS,KAAK,CAC3C,CAAC,EAED,SAAS,MAAO,IAAM,CACpB,GAAG,4BAA6B,IAAM,CACpCA,EAAO,IAAI,WAAS,KAAME,EAASD,CAAO,EAC1C,OAAOL,CAAI,EAAE,IAAI,iBAAiB,CACpC,CAAC,EAED,GAAG,4BAA6B,IAAM,CACpCI,EAAO,IAAI,WAAS,QAASE,EAASD,CAAO,EAC7C,OAAON,CAAI,EAAE,IAAI,iBAAiB,CACpC,CAAC,EAED,GAAG,6BAA8B,IAAM,CACrCK,EAAO,IAAI,WAAS,MAAOE,EAASD,CAAO,EAC3C,OAAOJ,CAAK,EAAE,IAAI,iBAAiB,CACrC,CAAC,EAED,GAAG,yBAA0B,IAAM,CACjCG,EAAO,IAAI,WAAS,MAAOE,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": ["import_LogLevel", "import_ConsoleLogger", "warn", "info", "debug", "error", "log", "logger", "options", "message", "tag"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var i=require("../../device-model/model/DeviceModel.stub"),o=require("../../../internal/device-session/model/DeviceSession"),r=require("./WebLogsExporterLogger");describe("getJSONStringifyReplacer",()=>{it("should return a function that replaces Uint8Array correctly",()=>{const e=(0,r.getJSONStringifyReplacer)(),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=(0,i.deviceModelStubBuilder)(),t=(0,r.getJSONStringifyReplacer)(),c={deviceModel:(0,i.deviceModelStubBuilder)(),type:"USB",id:"mockedDeviceId",sendApdu:jest.fn(),transport:"USB"},n=new o.DeviceSession({connectedDevice:c,id:"mockedSessionId"},jest.fn(),{}),s=JSON.stringify(n,t),a=`{"id":"mockedSessionId","connectedDevice":{"deviceModel":${JSON.stringify(e)},"type":"USB","id":"mockedDeviceId"}}`;n.close(),expect(s).toEqual(a)}),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,(0,r.getJSONStringifyReplacer)());expect(c).toEqual(t)})});
1
+ "use strict";var i=require("../../device-model/model/DeviceModel.stub"),o=require("../../../internal/device-session/data/DeviceSessionRefresherConst"),s=require("../../../internal/device-session/model/DeviceSession"),c=require("./WebLogsExporterLogger");describe("getJSONStringifyReplacer",()=>{it("should return a function that replaces Uint8Array correctly",()=>{const e=(0,c.getJSONStringifyReplacer)(),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=(0,i.deviceModelStubBuilder)(),t=(0,c.getJSONStringifyReplacer)(),r={deviceModel:(0,i.deviceModelStubBuilder)(),type:"USB",id:"mockedDeviceId",sendApdu:vi.fn(),transport:"USB"},n=new s.DeviceSession({connectedDevice:r,id:"mockedSessionId"},vi.fn(),{},{},o.DEVICE_SESSION_REFRESHER_DEFAULT_OPTIONS),a=JSON.stringify(n,t),l=`{"id":"mockedSessionId","connectedDevice":{"deviceModel":${JSON.stringify(e)},"type":"USB","id":"mockedDeviceId"}}`;n.close(),expect(a).toEqual(l)}),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,(0,c.getJSONStringifyReplacer)());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,IAAAA,EAAuC,oDAEvCC,EAA8B,wDAG9BC,EAAyC,mCAEzC,SAAS,2BAA4B,IAAM,CACzC,GAAG,8DAA+D,IAAM,CACtE,MAAMC,KAAW,4BAAyB,EACpCC,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,KAAkB,0BAAuB,EACzCH,KAAW,4BAAyB,EAEpCI,EAA4C,CAChD,eAAa,0BAAuB,EACpC,KAAM,MACN,GAAI,iBACJ,SAAU,KAAK,GAAG,EAClB,UAAW,KACb,EAEMH,EAAQ,IAAI,gBAChB,CACE,gBAAAG,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,KAAK,4BAAyB,CAAC,EAC7D,OAAOJ,CAAM,EAAE,QAAQG,CAAQ,CACjC,CAAC,CACH,CAAC",
6
- "names": ["import_DeviceModel", "import_DeviceSession", "import_WebLogsExporterLogger", "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,IAAAA,EAAuC,oDAEvCC,EAAyD,qEACzDC,EAA8B,wDAI9BC,EAAyC,mCAEzC,SAAS,2BAA4B,IAAM,CACzC,GAAG,8DAA+D,IAAM,CACtE,MAAMC,KAAW,4BAAyB,EACpCC,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,KAAkB,0BAAuB,EACzCH,KAAW,4BAAyB,EAEpCI,EAA4C,CAChD,eAAa,0BAAuB,EACpC,KAAM,MACN,GAAI,iBACJ,SAAU,GAAG,GAAG,EAChB,UAAW,KACb,EAEMH,EAAQ,IAAI,gBAChB,CACE,gBAAAG,EACA,GAAI,iBACN,EACA,GAAG,GAAG,EACN,CAAC,EACD,CAAC,EACD,0CACF,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,KAAK,4BAAyB,CAAC,EAC7D,OAAOJ,CAAM,EAAE,QAAQG,CAAQ,CACjC,CAAC,CACH,CAAC",
6
+ "names": ["import_DeviceModel", "import_DeviceSessionRefresherConst", "import_DeviceSession", "import_WebLogsExporterLogger", "replacer", "value", "result", "stubDeviceModel", "connectedDevice", "expected", "obj"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var l=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var t=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var c=(e,o)=>{for(var g in o)l(e,g,{get:o[g],enumerable:!0})},f=(e,o,g,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let s of t(o))!a.call(e,s)&&s!==g&&l(e,s,{get:()=>o[s],enumerable:!(n=r(o,s))||n.enumerable});return e};var j=e=>f(l({},"__esModule",{value:!0}),e);var x={};c(x,{ConsoleLogger:()=>p});module.exports=j(x);class p{log=jest.fn()}0&&(module.exports={ConsoleLogger});
1
+ "use strict";var s=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var f=(e,o)=>{for(var l in o)s(e,l,{get:o[l],enumerable:!0})},i=(e,o,l,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let g of a(o))!c.call(e,g)&&g!==l&&s(e,g,{get:()=>o[g],enumerable:!(n=r(o,g))||n.enumerable});return e};var p=e=>i(s({},"__esModule",{value:!0}),e);var v={};f(v,{ConsoleLogger:()=>t});module.exports=p(v);class t{log=vi.fn()}0&&(module.exports={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": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,mBAAAE,IAAA,eAAAC,EAAAH,GAAO,MAAME,CAAc,CACzB,IAAM,KAAK,GAAG,CAChB",
4
+ "sourcesContent": ["export class ConsoleLogger {\n log = vi.fn();\n}\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,mBAAAE,IAAA,eAAAC,EAAAH,GAAO,MAAME,CAAc,CACzB,IAAM,GAAG,GAAG,CACd",
6
6
  "names": ["ConsoleLogger_exports", "__export", "ConsoleLogger", "__toCommonJS"]
7
7
  }
@@ -0,0 +1,2 @@
1
+ "use strict";var N=Object.defineProperty;var _=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var e=Object.prototype.hasOwnProperty;var n=(o,E)=>{for(var I in E)N(o,I,{get:E[I],enumerable:!0})},p=(o,E,I,U)=>{if(E&&typeof E=="object"||typeof E=="function")for(let t of c(E))!e.call(o,t)&&t!==I&&N(o,t,{get:()=>E[t],enumerable:!(U=_(E,t))||U.enumerable});return o};var r=o=>p(N({},"__esModule",{value:!0}),o);var x={};n(x,{GENUINE_DEVICE_RESULT:()=>s});module.exports=r(x);const s="0000";0&&(module.exports={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": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,2BAAAE,IAAA,eAAAC,EAAAH,GAAO,MAAME,EAAwB",
6
+ "names": ["constants_exports", "__export", "GENUINE_DEVICE_RESULT", "__toCommonJS"]
7
+ }