@ledgerhq/device-management-kit 0.6.5 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (759) hide show
  1. package/README.md +40 -3
  2. package/lib/cjs/package.json +22 -23
  3. package/lib/cjs/src/api/DeviceManagementKit.js +1 -1
  4. package/lib/cjs/src/api/DeviceManagementKit.js.map +3 -3
  5. package/lib/cjs/src/api/DeviceManagementKit.test.js +1 -1
  6. package/lib/cjs/src/api/DeviceManagementKit.test.js.map +3 -3
  7. package/lib/cjs/src/api/DeviceManagementKitBuilder.js +1 -1
  8. package/lib/cjs/src/api/DeviceManagementKitBuilder.js.map +2 -2
  9. package/lib/cjs/src/api/DmkConfig.js +1 -1
  10. package/lib/cjs/src/api/DmkConfig.js.map +1 -1
  11. package/lib/cjs/src/api/apdu/utils/ByteArrayBuilder.js +1 -1
  12. package/lib/cjs/src/api/apdu/utils/ByteArrayBuilder.js.map +3 -3
  13. package/lib/cjs/src/api/apdu/utils/ByteArrayBuilder.test.js +1 -1
  14. package/lib/cjs/src/api/apdu/utils/ByteArrayBuilder.test.js.map +2 -2
  15. package/lib/cjs/src/api/apdu/utils/ByteArrayParser.js +1 -1
  16. package/lib/cjs/src/api/apdu/utils/ByteArrayParser.js.map +3 -3
  17. package/lib/cjs/src/api/command/di/commandModule.js +1 -1
  18. package/lib/cjs/src/api/command/di/commandModule.js.map +3 -3
  19. package/lib/cjs/src/api/command/di/commandModule.test.js +1 -1
  20. package/lib/cjs/src/api/command/di/commandModule.test.js.map +2 -2
  21. package/lib/cjs/src/api/command/os/GetCustomImageSizeCommand.js +2 -0
  22. package/lib/cjs/src/api/command/os/GetCustomImageSizeCommand.js.map +7 -0
  23. package/lib/cjs/src/api/command/os/GetCustomImageSizeCommand.test.js +2 -0
  24. package/lib/cjs/src/api/command/os/GetCustomImageSizeCommand.test.js.map +7 -0
  25. package/lib/cjs/src/api/command/os/GetOsVersionCommand.js +1 -1
  26. package/lib/cjs/src/api/command/os/GetOsVersionCommand.js.map +3 -3
  27. package/lib/cjs/src/api/command/os/GetOsVersionCommand.test.js +1 -1
  28. package/lib/cjs/src/api/command/os/GetOsVersionCommand.test.js.map +3 -3
  29. package/lib/cjs/src/api/command/os/ListLanguagePackCommand.js +2 -0
  30. package/lib/cjs/src/api/command/os/ListLanguagePackCommand.js.map +7 -0
  31. package/lib/cjs/src/api/command/os/ListLanguagePackCommand.test.js +2 -0
  32. package/lib/cjs/src/api/command/os/ListLanguagePackCommand.test.js.map +7 -0
  33. package/lib/cjs/src/api/command/os/__mocks__/GetOsVersionCommand.js +1 -1
  34. package/lib/cjs/src/api/command/os/__mocks__/GetOsVersionCommand.js.map +2 -2
  35. package/lib/cjs/src/api/command/use-case/SendCommandUseCase.js +1 -1
  36. package/lib/cjs/src/api/command/use-case/SendCommandUseCase.js.map +3 -3
  37. package/lib/cjs/src/api/command/utils/CommandUtils.js +1 -1
  38. package/lib/cjs/src/api/command/utils/CommandUtils.js.map +3 -3
  39. package/lib/cjs/src/api/command/utils/CommandUtils.test.js +1 -1
  40. package/lib/cjs/src/api/command/utils/CommandUtils.test.js.map +3 -3
  41. package/lib/cjs/src/api/command/utils/GlobalCommandError.js +1 -1
  42. package/lib/cjs/src/api/command/utils/GlobalCommandError.js.map +2 -2
  43. package/lib/cjs/src/api/device/DeviceModel.js +1 -1
  44. package/lib/cjs/src/api/device/DeviceModel.js.map +2 -2
  45. package/lib/cjs/src/api/device-action/DeviceAction.js +1 -1
  46. package/lib/cjs/src/api/device-action/DeviceAction.js.map +1 -1
  47. package/lib/cjs/src/api/device-action/__test-utils__/makeInternalApi.js +1 -1
  48. package/lib/cjs/src/api/device-action/__test-utils__/makeInternalApi.js.map +3 -3
  49. package/lib/cjs/src/api/device-action/__test-utils__/setupTestMachine.js +1 -1
  50. package/lib/cjs/src/api/device-action/__test-utils__/setupTestMachine.js.map +3 -3
  51. package/lib/cjs/src/api/device-action/di/deviceActionModule.js +1 -1
  52. package/lib/cjs/src/api/device-action/di/deviceActionModule.js.map +3 -3
  53. package/lib/cjs/src/api/device-action/di/deviceActionModule.test.js +1 -1
  54. package/lib/cjs/src/api/device-action/di/deviceActionModule.test.js.map +2 -2
  55. package/lib/cjs/src/api/device-action/model/UserInteractionRequired.js +1 -1
  56. package/lib/cjs/src/api/device-action/model/UserInteractionRequired.js.map +2 -2
  57. package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.js +1 -1
  58. package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.js.map +2 -2
  59. package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.test.js +1 -1
  60. package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.test.js.map +2 -2
  61. package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceActionTypes.js +1 -1
  62. package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceActionTypes.js.map +1 -1
  63. package/lib/cjs/src/api/device-action/os/Errors.js +1 -1
  64. package/lib/cjs/src/api/device-action/os/Errors.js.map +3 -3
  65. package/lib/cjs/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.js +2 -0
  66. package/lib/cjs/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.js.map +7 -0
  67. package/lib/cjs/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.test.js +2 -0
  68. package/lib/cjs/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.test.js.map +7 -0
  69. package/lib/cjs/src/api/device-action/os/GetDeviceMetadata/types.js +2 -0
  70. package/lib/cjs/src/api/device-action/os/GetDeviceMetadata/types.js.map +7 -0
  71. package/lib/cjs/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.js +1 -1
  72. package/lib/cjs/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.js.map +2 -2
  73. package/lib/cjs/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.test.js +1 -1
  74. package/lib/cjs/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.test.js.map +2 -2
  75. package/lib/cjs/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.js +1 -1
  76. package/lib/cjs/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.js.map +3 -3
  77. package/lib/cjs/src/api/device-action/os/GoToDashboard/types.js +1 -1
  78. package/lib/cjs/src/api/device-action/os/GoToDashboard/types.js.map +1 -1
  79. package/lib/cjs/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.js +2 -0
  80. package/lib/cjs/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.js.map +7 -0
  81. package/lib/cjs/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.test.js +2 -0
  82. package/lib/cjs/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.test.js.map +7 -0
  83. package/lib/cjs/src/api/device-action/os/InstallOrUpdateApps/types.js +2 -0
  84. package/lib/cjs/src/api/device-action/os/InstallOrUpdateApps/types.js.map +7 -0
  85. package/lib/cjs/src/api/device-action/os/ListApps/ListAppsDeviceAction.js +1 -1
  86. package/lib/cjs/src/api/device-action/os/ListApps/ListAppsDeviceAction.js.map +2 -2
  87. package/lib/cjs/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.js +1 -1
  88. package/lib/cjs/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.js.map +3 -3
  89. package/lib/cjs/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.test.js +1 -1
  90. package/lib/cjs/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.test.js.map +2 -2
  91. package/lib/cjs/src/api/device-action/os/OpenAppDeviceAction/types.js +1 -1
  92. package/lib/cjs/src/api/device-action/os/OpenAppDeviceAction/types.js.map +1 -1
  93. package/lib/cjs/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.js +2 -0
  94. package/lib/cjs/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.js.map +7 -0
  95. package/lib/cjs/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.test.js +2 -0
  96. package/lib/cjs/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.test.js.map +7 -0
  97. package/lib/cjs/src/api/device-action/os/OpenAppWithDependencies/types.js +2 -0
  98. package/lib/cjs/src/api/device-action/os/OpenAppWithDependencies/types.js.map +7 -0
  99. package/lib/cjs/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.js +1 -1
  100. package/lib/cjs/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.js.map +2 -2
  101. package/lib/cjs/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.test.js +1 -1
  102. package/lib/cjs/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.test.js.map +2 -2
  103. package/lib/cjs/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceActionTypes.js +1 -1
  104. package/lib/cjs/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceActionTypes.js.map +1 -1
  105. package/lib/cjs/src/api/device-action/task/BuildAppsInstallPlanTask.js +2 -0
  106. package/lib/cjs/src/api/device-action/task/BuildAppsInstallPlanTask.js.map +7 -0
  107. package/lib/cjs/src/api/device-action/task/BuildAppsInstallPlanTask.test.js +2 -0
  108. package/lib/cjs/src/api/device-action/task/BuildAppsInstallPlanTask.test.js.map +7 -0
  109. package/lib/cjs/src/api/device-action/task/GetApplicationsMetadataTask.js +2 -0
  110. package/lib/cjs/src/api/device-action/task/GetApplicationsMetadataTask.js.map +7 -0
  111. package/lib/cjs/src/api/device-action/task/GetApplicationsMetadataTask.test.js +2 -0
  112. package/lib/cjs/src/api/device-action/task/GetApplicationsMetadataTask.test.js.map +7 -0
  113. package/lib/cjs/src/api/device-action/task/GetFirmwareMetadataTask.js +2 -0
  114. package/lib/cjs/src/api/device-action/task/GetFirmwareMetadataTask.js.map +7 -0
  115. package/lib/cjs/src/api/device-action/task/GetFirmwareMetadataTask.test.js +2 -0
  116. package/lib/cjs/src/api/device-action/task/GetFirmwareMetadataTask.test.js.map +7 -0
  117. package/lib/cjs/src/api/device-action/task/PredictOutOfMemoryTask.js +2 -0
  118. package/lib/cjs/src/api/device-action/task/PredictOutOfMemoryTask.js.map +7 -0
  119. package/lib/cjs/src/api/device-action/task/PredictOutOfMemoryTask.test.js +2 -0
  120. package/lib/cjs/src/api/device-action/task/PredictOutOfMemoryTask.test.js.map +7 -0
  121. package/lib/cjs/src/api/device-model/data/StaticDeviceModelDataSource.js +1 -1
  122. package/lib/cjs/src/api/device-model/data/StaticDeviceModelDataSource.js.map +2 -2
  123. package/lib/cjs/src/api/device-model/data/StaticDeviceModelDataSource.test.js +1 -1
  124. package/lib/cjs/src/api/device-model/data/StaticDeviceModelDataSource.test.js.map +2 -2
  125. package/lib/cjs/src/api/device-model/model/DeviceModel.js +1 -1
  126. package/lib/cjs/src/api/device-model/model/DeviceModel.js.map +2 -2
  127. package/lib/cjs/src/api/device-model/model/DeviceModel.stub.js +1 -1
  128. package/lib/cjs/src/api/device-model/model/DeviceModel.stub.js.map +2 -2
  129. package/lib/cjs/src/api/device-session/DeviceSessionState.js +1 -1
  130. package/lib/cjs/src/api/device-session/DeviceSessionState.js.map +2 -2
  131. package/lib/cjs/src/api/index.js +1 -1
  132. package/lib/cjs/src/api/index.js.map +3 -3
  133. package/lib/cjs/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.js +1 -1
  134. package/lib/cjs/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.js.map +2 -2
  135. package/lib/cjs/src/api/secure-channel/device-action/GenuineCheck/types.js.map +1 -1
  136. package/lib/cjs/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.js +1 -1
  137. package/lib/cjs/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.js.map +3 -3
  138. package/lib/cjs/src/api/secure-channel/device-action/InstallApp/types.js +1 -1
  139. package/lib/cjs/src/api/secure-channel/device-action/InstallApp/types.js.map +1 -1
  140. package/lib/cjs/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.js +1 -1
  141. package/lib/cjs/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.js.map +2 -2
  142. package/lib/cjs/src/api/secure-channel/device-action/ListInstalledApps/types.js +1 -1
  143. package/lib/cjs/src/api/secure-channel/device-action/ListInstalledApps/types.js.map +2 -2
  144. package/lib/cjs/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.js +1 -1
  145. package/lib/cjs/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.js.map +3 -3
  146. package/lib/cjs/src/api/secure-channel/device-action/UninstallApp/types.js +1 -1
  147. package/lib/cjs/src/api/secure-channel/device-action/UninstallApp/types.js.map +1 -1
  148. package/lib/cjs/src/api/secure-channel/task/ConnectToSecureChannelTask.js +1 -1
  149. package/lib/cjs/src/api/secure-channel/task/ConnectToSecureChannelTask.js.map +3 -3
  150. package/lib/cjs/src/api/secure-channel/task/ConnectToSecureChannelTask.test.js +1 -1
  151. package/lib/cjs/src/api/secure-channel/task/ConnectToSecureChannelTask.test.js.map +3 -3
  152. package/lib/cjs/src/api/secure-channel/task/types.js +1 -1
  153. package/lib/cjs/src/api/secure-channel/task/types.js.map +2 -2
  154. package/lib/cjs/src/api/secure-channel/utils.js +1 -1
  155. package/lib/cjs/src/api/secure-channel/utils.js.map +3 -3
  156. package/lib/cjs/src/api/secure-channel/utils.test.js +1 -1
  157. package/lib/cjs/src/api/secure-channel/utils.test.js.map +3 -3
  158. package/lib/cjs/src/api/transport/model/DeviceApduSender.js +2 -0
  159. package/lib/cjs/src/api/transport/model/DeviceApduSender.js.map +7 -0
  160. package/lib/cjs/src/api/transport/model/DeviceConnection.js +1 -1
  161. package/lib/cjs/src/api/transport/model/DeviceConnection.js.map +1 -1
  162. package/lib/cjs/src/api/transport/model/DeviceConnectionStateMachine.js +2 -0
  163. package/lib/cjs/src/api/transport/model/DeviceConnectionStateMachine.js.map +7 -0
  164. package/lib/cjs/src/api/transport/model/DeviceConnectionStateMachine.test.js +2 -0
  165. package/lib/cjs/src/api/transport/model/DeviceConnectionStateMachine.test.js.map +7 -0
  166. package/lib/cjs/src/api/transport/model/DiscoveredDevice.js.map +1 -1
  167. package/lib/cjs/src/api/transport/model/Errors.js +1 -1
  168. package/lib/cjs/src/api/transport/model/Errors.js.map +3 -3
  169. package/lib/cjs/src/api/transport/model/Transport.js.map +1 -1
  170. package/lib/cjs/src/api/types.js +1 -1
  171. package/lib/cjs/src/api/types.js.map +1 -1
  172. package/lib/cjs/src/api/utils/AppName.js +2 -0
  173. package/lib/cjs/src/api/utils/AppName.js.map +7 -0
  174. package/lib/cjs/src/api/utils/AppName.test.js +2 -0
  175. package/lib/cjs/src/api/utils/AppName.test.js.map +7 -0
  176. package/lib/cjs/src/di.js +1 -1
  177. package/lib/cjs/src/di.js.map +2 -2
  178. package/lib/cjs/src/internal/config/di/configModule.js +1 -1
  179. package/lib/cjs/src/internal/config/di/configModule.js.map +3 -3
  180. package/lib/cjs/src/internal/config/di/configModule.test.js +1 -1
  181. package/lib/cjs/src/internal/config/di/configModule.test.js.map +2 -2
  182. package/lib/cjs/src/internal/device-model/di/deviceModelModule.js +1 -1
  183. package/lib/cjs/src/internal/device-model/di/deviceModelModule.js.map +3 -3
  184. package/lib/cjs/src/internal/device-model/di/deviceModelModule.test.js +1 -1
  185. package/lib/cjs/src/internal/device-model/di/deviceModelModule.test.js.map +2 -2
  186. package/lib/cjs/src/internal/device-session/data/ApduResponseConst.js +1 -1
  187. package/lib/cjs/src/internal/device-session/data/ApduResponseConst.js.map +3 -3
  188. package/lib/cjs/src/internal/device-session/di/deviceSessionModule.js +1 -1
  189. package/lib/cjs/src/internal/device-session/di/deviceSessionModule.js.map +3 -3
  190. package/lib/cjs/src/internal/device-session/di/deviceSessionModule.test.js +1 -1
  191. package/lib/cjs/src/internal/device-session/di/deviceSessionModule.test.js.map +2 -2
  192. package/lib/cjs/src/internal/device-session/model/DevicePinger.js +1 -1
  193. package/lib/cjs/src/internal/device-session/model/DevicePinger.js.map +3 -3
  194. package/lib/cjs/src/internal/device-session/model/DeviceSession.js +1 -1
  195. package/lib/cjs/src/internal/device-session/model/DeviceSession.js.map +3 -3
  196. package/lib/cjs/src/internal/device-session/model/DeviceSessionStateHandler.js +1 -1
  197. package/lib/cjs/src/internal/device-session/model/DeviceSessionStateHandler.js.map +3 -3
  198. package/lib/cjs/src/internal/device-session/model/DeviceSessionStateHandler.test.js +1 -1
  199. package/lib/cjs/src/internal/device-session/model/DeviceSessionStateHandler.test.js.map +3 -3
  200. package/lib/cjs/src/internal/device-session/model/Frame.js +1 -1
  201. package/lib/cjs/src/internal/device-session/model/Frame.js.map +3 -3
  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/use-case/CloseSessionsUseCase.js +1 -1
  207. package/lib/cjs/src/internal/device-session/use-case/CloseSessionsUseCase.js.map +3 -3
  208. package/lib/cjs/src/internal/device-session/use-case/CloseSessionsUseCase.test.js +1 -1
  209. package/lib/cjs/src/internal/device-session/use-case/CloseSessionsUseCase.test.js.map +3 -3
  210. package/lib/cjs/src/internal/discovery/di/discoveryModule.js +1 -1
  211. package/lib/cjs/src/internal/discovery/di/discoveryModule.js.map +3 -3
  212. package/lib/cjs/src/internal/discovery/di/discoveryModule.test.js +1 -1
  213. package/lib/cjs/src/internal/discovery/di/discoveryModule.test.js.map +2 -2
  214. package/lib/cjs/src/internal/discovery/use-case/DisconnectUseCase.test.js +1 -1
  215. package/lib/cjs/src/internal/discovery/use-case/DisconnectUseCase.test.js.map +2 -2
  216. package/lib/cjs/src/internal/discovery/use-case/ListenToAvailableDevicesUseCase.js +1 -1
  217. package/lib/cjs/src/internal/discovery/use-case/ListenToAvailableDevicesUseCase.js.map +2 -2
  218. package/lib/cjs/src/internal/discovery/use-case/StartDiscoveringUseCase.js +1 -1
  219. package/lib/cjs/src/internal/discovery/use-case/StartDiscoveringUseCase.js.map +2 -2
  220. package/lib/cjs/src/internal/discovery/use-case/StartDiscoveringUseCase.test.js +1 -1
  221. package/lib/cjs/src/internal/discovery/use-case/StartDiscoveringUseCase.test.js.map +2 -2
  222. package/lib/cjs/src/internal/discovery/use-case/StopDiscoveringUseCase.js +1 -1
  223. package/lib/cjs/src/internal/discovery/use-case/StopDiscoveringUseCase.js.map +3 -3
  224. package/lib/cjs/src/internal/discovery/use-case/StopDiscoveringUseCase.test.js +1 -1
  225. package/lib/cjs/src/internal/discovery/use-case/StopDiscoveringUseCase.test.js.map +3 -3
  226. package/lib/cjs/src/internal/logger-publisher/di/loggerModule.js +1 -1
  227. package/lib/cjs/src/internal/logger-publisher/di/loggerModule.js.map +3 -3
  228. package/lib/cjs/src/internal/logger-publisher/di/loggerModule.test.js +1 -1
  229. package/lib/cjs/src/internal/logger-publisher/di/loggerModule.test.js.map +2 -2
  230. package/lib/cjs/src/internal/manager-api/data/AxiosManagerApiDataSource.js +1 -1
  231. package/lib/cjs/src/internal/manager-api/data/AxiosManagerApiDataSource.js.map +3 -3
  232. package/lib/cjs/src/internal/manager-api/data/AxiosManagerApiDataSource.test.js +1 -1
  233. package/lib/cjs/src/internal/manager-api/data/AxiosManagerApiDataSource.test.js.map +3 -3
  234. package/lib/cjs/src/internal/manager-api/data/ManagerApiDataSource.js +1 -1
  235. package/lib/cjs/src/internal/manager-api/data/ManagerApiDataSource.js.map +1 -1
  236. package/lib/cjs/src/internal/manager-api/data/ManagerApiDto.js +1 -1
  237. package/lib/cjs/src/internal/manager-api/data/ManagerApiDto.js.map +1 -1
  238. package/lib/cjs/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.js +1 -1
  239. package/lib/cjs/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.js.map +2 -2
  240. package/lib/cjs/src/internal/manager-api/di/managerApiModule.js +1 -1
  241. package/lib/cjs/src/internal/manager-api/di/managerApiModule.js.map +3 -3
  242. package/lib/cjs/src/internal/manager-api/di/managerApiModule.test.js +1 -1
  243. package/lib/cjs/src/internal/manager-api/di/managerApiModule.test.js.map +2 -2
  244. package/lib/cjs/src/internal/manager-api/di/managerApiTypes.js +1 -1
  245. package/lib/cjs/src/internal/manager-api/di/managerApiTypes.js.map +2 -2
  246. package/lib/cjs/src/internal/manager-api/model/Application.js +1 -1
  247. package/lib/cjs/src/internal/manager-api/model/Application.js.map +1 -1
  248. package/lib/cjs/src/internal/manager-api/model/Const.js +1 -1
  249. package/lib/cjs/src/internal/manager-api/model/Const.js.map +3 -3
  250. package/lib/cjs/src/internal/manager-api/model/Firmware.js +1 -1
  251. package/lib/cjs/src/internal/manager-api/model/Firmware.js.map +1 -1
  252. package/lib/cjs/src/internal/manager-api/model/Language.js +2 -0
  253. package/lib/cjs/src/internal/manager-api/model/Language.js.map +7 -0
  254. package/lib/cjs/src/internal/manager-api/model/Params.js +1 -1
  255. package/lib/cjs/src/internal/manager-api/model/Params.js.map +1 -1
  256. package/lib/cjs/src/internal/manager-api/service/DefaultManagerApiService.js +1 -1
  257. package/lib/cjs/src/internal/manager-api/service/DefaultManagerApiService.js.map +3 -3
  258. package/lib/cjs/src/internal/manager-api/service/DefaultManagerApiService.test.js +1 -1
  259. package/lib/cjs/src/internal/manager-api/service/DefaultManagerApiService.test.js.map +3 -3
  260. package/lib/cjs/src/internal/manager-api/service/ManagerApiService.js +1 -1
  261. package/lib/cjs/src/internal/manager-api/service/ManagerApiService.js.map +1 -1
  262. package/lib/cjs/src/internal/manager-api/use-case/SetProviderUseCase.js +2 -0
  263. package/lib/cjs/src/internal/manager-api/use-case/SetProviderUseCase.js.map +7 -0
  264. package/lib/cjs/src/internal/manager-api/use-case/SetProviderUseCase.test.js +2 -0
  265. package/lib/cjs/src/internal/manager-api/use-case/SetProviderUseCase.test.js.map +7 -0
  266. package/lib/cjs/src/internal/secure-channel/di/secureChannelModule.js +1 -1
  267. package/lib/cjs/src/internal/secure-channel/di/secureChannelModule.js.map +3 -3
  268. package/lib/cjs/src/internal/secure-channel/di/secureChannelModule.test.js +1 -1
  269. package/lib/cjs/src/internal/secure-channel/di/secureChannelModule.test.js.map +2 -2
  270. package/lib/cjs/src/internal/secure-channel/model/Errors.js +1 -1
  271. package/lib/cjs/src/internal/secure-channel/model/Errors.js.map +3 -3
  272. package/lib/cjs/src/internal/secure-channel/service/DefaultSecureChannelService.js +1 -1
  273. package/lib/cjs/src/internal/secure-channel/service/DefaultSecureChannelService.js.map +3 -3
  274. package/lib/cjs/src/internal/secure-channel/service/DefaultSecureChannelService.test.js +1 -1
  275. package/lib/cjs/src/internal/secure-channel/service/DefaultSecureChannelService.test.js.map +3 -3
  276. package/lib/cjs/src/internal/secure-channel/service/SecureChannelService.js +1 -1
  277. package/lib/cjs/src/internal/secure-channel/service/SecureChannelService.js.map +1 -1
  278. package/lib/cjs/src/internal/send/di/sendModule.js +1 -1
  279. package/lib/cjs/src/internal/send/di/sendModule.js.map +3 -3
  280. package/lib/cjs/src/internal/send/di/sendModule.test.js +1 -1
  281. package/lib/cjs/src/internal/send/di/sendModule.test.js.map +2 -2
  282. package/lib/cjs/src/internal/send/use-case/SendApduUseCase.js +1 -1
  283. package/lib/cjs/src/internal/send/use-case/SendApduUseCase.js.map +3 -3
  284. package/lib/cjs/src/internal/transport/di/transportModule.js +1 -1
  285. package/lib/cjs/src/internal/transport/di/transportModule.js.map +3 -3
  286. package/lib/cjs/src/internal/transport/di/transportModule.test.js +1 -1
  287. package/lib/cjs/src/internal/transport/di/transportModule.test.js.map +2 -2
  288. package/lib/cjs/src/internal/transport/service/DefaultTransportService.js +1 -1
  289. package/lib/cjs/src/internal/transport/service/DefaultTransportService.js.map +3 -3
  290. package/lib/cjs/src/internal/transport/service/TransportService.js +1 -1
  291. package/lib/cjs/src/internal/transport/service/TransportService.js.map +1 -1
  292. package/lib/cjs/src/internal/transport/service/__mocks__/DefaultTransportService.js +1 -1
  293. package/lib/cjs/src/internal/transport/service/__mocks__/DefaultTransportService.js.map +2 -2
  294. package/lib/esm/package.json +22 -23
  295. package/lib/esm/src/api/DeviceManagementKit.js +1 -1
  296. package/lib/esm/src/api/DeviceManagementKit.js.map +3 -3
  297. package/lib/esm/src/api/DeviceManagementKit.test.js +1 -1
  298. package/lib/esm/src/api/DeviceManagementKit.test.js.map +3 -3
  299. package/lib/esm/src/api/DeviceManagementKitBuilder.js +1 -1
  300. package/lib/esm/src/api/DeviceManagementKitBuilder.js.map +3 -3
  301. package/lib/esm/src/api/apdu/utils/ByteArrayBuilder.js +1 -1
  302. package/lib/esm/src/api/apdu/utils/ByteArrayBuilder.js.map +3 -3
  303. package/lib/esm/src/api/apdu/utils/ByteArrayBuilder.test.js +1 -1
  304. package/lib/esm/src/api/apdu/utils/ByteArrayBuilder.test.js.map +2 -2
  305. package/lib/esm/src/api/apdu/utils/ByteArrayParser.js +1 -1
  306. package/lib/esm/src/api/apdu/utils/ByteArrayParser.js.map +3 -3
  307. package/lib/esm/src/api/command/di/commandModule.js +1 -1
  308. package/lib/esm/src/api/command/di/commandModule.js.map +3 -3
  309. package/lib/esm/src/api/command/di/commandModule.test.js +1 -1
  310. package/lib/esm/src/api/command/di/commandModule.test.js.map +2 -2
  311. package/lib/esm/src/api/command/os/GetCustomImageSizeCommand.js +2 -0
  312. package/lib/esm/src/api/command/os/GetCustomImageSizeCommand.js.map +7 -0
  313. package/lib/esm/src/api/command/os/GetCustomImageSizeCommand.test.js +2 -0
  314. package/lib/esm/src/api/command/os/GetCustomImageSizeCommand.test.js.map +7 -0
  315. package/lib/esm/src/api/command/os/GetOsVersionCommand.js +1 -1
  316. package/lib/esm/src/api/command/os/GetOsVersionCommand.js.map +3 -3
  317. package/lib/esm/src/api/command/os/GetOsVersionCommand.test.js +1 -1
  318. package/lib/esm/src/api/command/os/GetOsVersionCommand.test.js.map +3 -3
  319. package/lib/esm/src/api/command/os/ListLanguagePackCommand.js +2 -0
  320. package/lib/esm/src/api/command/os/ListLanguagePackCommand.js.map +7 -0
  321. package/lib/esm/src/api/command/os/ListLanguagePackCommand.test.js +2 -0
  322. package/lib/esm/src/api/command/os/ListLanguagePackCommand.test.js.map +7 -0
  323. package/lib/esm/src/api/command/os/__mocks__/GetOsVersionCommand.js +1 -1
  324. package/lib/esm/src/api/command/os/__mocks__/GetOsVersionCommand.js.map +2 -2
  325. package/lib/esm/src/api/command/use-case/SendCommandUseCase.js +1 -1
  326. package/lib/esm/src/api/command/use-case/SendCommandUseCase.js.map +3 -3
  327. package/lib/esm/src/api/command/utils/CommandUtils.js +1 -1
  328. package/lib/esm/src/api/command/utils/CommandUtils.js.map +3 -3
  329. package/lib/esm/src/api/command/utils/CommandUtils.test.js +1 -1
  330. package/lib/esm/src/api/command/utils/CommandUtils.test.js.map +3 -3
  331. package/lib/esm/src/api/command/utils/GlobalCommandError.js +1 -1
  332. package/lib/esm/src/api/command/utils/GlobalCommandError.js.map +2 -2
  333. package/lib/esm/src/api/device/DeviceModel.js +1 -1
  334. package/lib/esm/src/api/device/DeviceModel.js.map +2 -2
  335. package/lib/esm/src/api/device-action/__test-utils__/makeInternalApi.js +1 -1
  336. package/lib/esm/src/api/device-action/__test-utils__/makeInternalApi.js.map +3 -3
  337. package/lib/esm/src/api/device-action/__test-utils__/setupTestMachine.js +1 -1
  338. package/lib/esm/src/api/device-action/__test-utils__/setupTestMachine.js.map +3 -3
  339. package/lib/esm/src/api/device-action/di/deviceActionModule.js +1 -1
  340. package/lib/esm/src/api/device-action/di/deviceActionModule.js.map +3 -3
  341. package/lib/esm/src/api/device-action/di/deviceActionModule.test.js +1 -1
  342. package/lib/esm/src/api/device-action/di/deviceActionModule.test.js.map +2 -2
  343. package/lib/esm/src/api/device-action/model/UserInteractionRequired.js +1 -1
  344. package/lib/esm/src/api/device-action/model/UserInteractionRequired.js.map +2 -2
  345. package/lib/esm/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.js +1 -1
  346. package/lib/esm/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.js.map +2 -2
  347. package/lib/esm/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.test.js +1 -1
  348. package/lib/esm/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.test.js.map +2 -2
  349. package/lib/esm/src/api/device-action/os/Errors.js +1 -1
  350. package/lib/esm/src/api/device-action/os/Errors.js.map +3 -3
  351. package/lib/esm/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.js +2 -0
  352. package/lib/esm/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.js.map +7 -0
  353. package/lib/esm/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.test.js +2 -0
  354. package/lib/esm/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.test.js.map +7 -0
  355. package/lib/esm/src/api/device-action/os/GetDeviceMetadata/types.js +1 -0
  356. package/lib/esm/src/api/device-action/os/GetDeviceMetadata/types.js.map +7 -0
  357. package/lib/esm/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.js +1 -1
  358. package/lib/esm/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.js.map +2 -2
  359. package/lib/esm/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.test.js +1 -1
  360. package/lib/esm/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.test.js.map +2 -2
  361. package/lib/esm/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.js +1 -1
  362. package/lib/esm/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.js.map +3 -3
  363. package/lib/esm/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.js +2 -0
  364. package/lib/esm/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.js.map +7 -0
  365. package/lib/esm/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.test.js +2 -0
  366. package/lib/esm/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.test.js.map +7 -0
  367. package/lib/esm/src/api/device-action/os/InstallOrUpdateApps/types.js +1 -0
  368. package/lib/esm/src/api/device-action/os/InstallOrUpdateApps/types.js.map +7 -0
  369. package/lib/esm/src/api/device-action/os/ListApps/ListAppsDeviceAction.js +1 -1
  370. package/lib/esm/src/api/device-action/os/ListApps/ListAppsDeviceAction.js.map +2 -2
  371. package/lib/esm/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.js +1 -1
  372. package/lib/esm/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.js.map +3 -3
  373. package/lib/esm/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.test.js +1 -1
  374. package/lib/esm/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.test.js.map +3 -3
  375. package/lib/esm/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.js +2 -0
  376. package/lib/esm/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.js.map +7 -0
  377. package/lib/esm/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.test.js +2 -0
  378. package/lib/esm/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.test.js.map +7 -0
  379. package/lib/esm/src/api/device-action/os/OpenAppWithDependencies/types.js +1 -0
  380. package/lib/esm/src/api/device-action/os/OpenAppWithDependencies/types.js.map +7 -0
  381. package/lib/esm/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.js +1 -1
  382. package/lib/esm/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.js.map +2 -2
  383. package/lib/esm/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.test.js +1 -1
  384. package/lib/esm/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.test.js.map +2 -2
  385. package/lib/esm/src/api/device-action/task/BuildAppsInstallPlanTask.js +2 -0
  386. package/lib/esm/src/api/device-action/task/BuildAppsInstallPlanTask.js.map +7 -0
  387. package/lib/esm/src/api/device-action/task/BuildAppsInstallPlanTask.test.js +2 -0
  388. package/lib/esm/src/api/device-action/task/BuildAppsInstallPlanTask.test.js.map +7 -0
  389. package/lib/esm/src/api/device-action/task/GetApplicationsMetadataTask.js +2 -0
  390. package/lib/esm/src/api/device-action/task/GetApplicationsMetadataTask.js.map +7 -0
  391. package/lib/esm/src/api/device-action/task/GetApplicationsMetadataTask.test.js +2 -0
  392. package/lib/esm/src/api/device-action/task/GetApplicationsMetadataTask.test.js.map +7 -0
  393. package/lib/esm/src/api/device-action/task/GetFirmwareMetadataTask.js +2 -0
  394. package/lib/esm/src/api/device-action/task/GetFirmwareMetadataTask.js.map +7 -0
  395. package/lib/esm/src/api/device-action/task/GetFirmwareMetadataTask.test.js +2 -0
  396. package/lib/esm/src/api/device-action/task/GetFirmwareMetadataTask.test.js.map +7 -0
  397. package/lib/esm/src/api/device-action/task/PredictOutOfMemoryTask.js +2 -0
  398. package/lib/esm/src/api/device-action/task/PredictOutOfMemoryTask.js.map +7 -0
  399. package/lib/esm/src/api/device-action/task/PredictOutOfMemoryTask.test.js +2 -0
  400. package/lib/esm/src/api/device-action/task/PredictOutOfMemoryTask.test.js.map +7 -0
  401. package/lib/esm/src/api/device-model/data/StaticDeviceModelDataSource.js +1 -1
  402. package/lib/esm/src/api/device-model/data/StaticDeviceModelDataSource.js.map +2 -2
  403. package/lib/esm/src/api/device-model/data/StaticDeviceModelDataSource.test.js +1 -1
  404. package/lib/esm/src/api/device-model/data/StaticDeviceModelDataSource.test.js.map +2 -2
  405. package/lib/esm/src/api/device-model/model/DeviceModel.js +1 -1
  406. package/lib/esm/src/api/device-model/model/DeviceModel.js.map +2 -2
  407. package/lib/esm/src/api/device-model/model/DeviceModel.stub.js +1 -1
  408. package/lib/esm/src/api/device-model/model/DeviceModel.stub.js.map +2 -2
  409. package/lib/esm/src/api/device-session/DeviceSessionState.js +1 -1
  410. package/lib/esm/src/api/device-session/DeviceSessionState.js.map +2 -2
  411. package/lib/esm/src/api/index.js +1 -1
  412. package/lib/esm/src/api/index.js.map +3 -3
  413. package/lib/esm/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.js +1 -1
  414. package/lib/esm/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.js.map +2 -2
  415. package/lib/esm/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.js +1 -1
  416. package/lib/esm/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.js.map +3 -3
  417. package/lib/esm/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.js +1 -1
  418. package/lib/esm/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.js.map +2 -2
  419. package/lib/esm/src/api/secure-channel/device-action/ListInstalledApps/types.js +1 -1
  420. package/lib/esm/src/api/secure-channel/device-action/ListInstalledApps/types.js.map +2 -2
  421. package/lib/esm/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.js +1 -1
  422. package/lib/esm/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.js.map +3 -3
  423. package/lib/esm/src/api/secure-channel/task/ConnectToSecureChannelTask.js +1 -1
  424. package/lib/esm/src/api/secure-channel/task/ConnectToSecureChannelTask.js.map +3 -3
  425. package/lib/esm/src/api/secure-channel/task/ConnectToSecureChannelTask.test.js +1 -1
  426. package/lib/esm/src/api/secure-channel/task/ConnectToSecureChannelTask.test.js.map +3 -3
  427. package/lib/esm/src/api/secure-channel/task/types.js +1 -1
  428. package/lib/esm/src/api/secure-channel/task/types.js.map +2 -2
  429. package/lib/esm/src/api/secure-channel/utils.js +1 -1
  430. package/lib/esm/src/api/secure-channel/utils.js.map +3 -3
  431. package/lib/esm/src/api/secure-channel/utils.test.js +1 -1
  432. package/lib/esm/src/api/secure-channel/utils.test.js.map +3 -3
  433. package/lib/esm/src/api/transport/model/DeviceApduSender.js +1 -0
  434. package/lib/esm/src/api/transport/model/DeviceApduSender.js.map +7 -0
  435. package/lib/esm/src/api/transport/model/DeviceConnectionStateMachine.js +2 -0
  436. package/lib/esm/src/api/transport/model/DeviceConnectionStateMachine.js.map +7 -0
  437. package/lib/esm/src/api/transport/model/DeviceConnectionStateMachine.test.js +2 -0
  438. package/lib/esm/src/api/transport/model/DeviceConnectionStateMachine.test.js.map +7 -0
  439. package/lib/esm/src/api/transport/model/Errors.js +1 -1
  440. package/lib/esm/src/api/transport/model/Errors.js.map +3 -3
  441. package/lib/esm/src/api/utils/AppName.js +2 -0
  442. package/lib/esm/src/api/utils/AppName.js.map +7 -0
  443. package/lib/esm/src/api/utils/AppName.test.js +2 -0
  444. package/lib/esm/src/api/utils/AppName.test.js.map +7 -0
  445. package/lib/esm/src/di.js +1 -1
  446. package/lib/esm/src/di.js.map +3 -3
  447. package/lib/esm/src/internal/config/di/configModule.js +1 -1
  448. package/lib/esm/src/internal/config/di/configModule.js.map +3 -3
  449. package/lib/esm/src/internal/config/di/configModule.test.js +1 -1
  450. package/lib/esm/src/internal/config/di/configModule.test.js.map +2 -2
  451. package/lib/esm/src/internal/device-model/di/deviceModelModule.js +1 -1
  452. package/lib/esm/src/internal/device-model/di/deviceModelModule.js.map +3 -3
  453. package/lib/esm/src/internal/device-model/di/deviceModelModule.test.js +1 -1
  454. package/lib/esm/src/internal/device-model/di/deviceModelModule.test.js.map +2 -2
  455. package/lib/esm/src/internal/device-session/data/ApduResponseConst.js +1 -1
  456. package/lib/esm/src/internal/device-session/data/ApduResponseConst.js.map +3 -3
  457. package/lib/esm/src/internal/device-session/di/deviceSessionModule.js +1 -1
  458. package/lib/esm/src/internal/device-session/di/deviceSessionModule.js.map +3 -3
  459. package/lib/esm/src/internal/device-session/di/deviceSessionModule.test.js +1 -1
  460. package/lib/esm/src/internal/device-session/di/deviceSessionModule.test.js.map +2 -2
  461. package/lib/esm/src/internal/device-session/model/DevicePinger.js +1 -1
  462. package/lib/esm/src/internal/device-session/model/DevicePinger.js.map +3 -3
  463. package/lib/esm/src/internal/device-session/model/DeviceSession.js +1 -1
  464. package/lib/esm/src/internal/device-session/model/DeviceSession.js.map +3 -3
  465. package/lib/esm/src/internal/device-session/model/DeviceSessionStateHandler.js +1 -1
  466. package/lib/esm/src/internal/device-session/model/DeviceSessionStateHandler.js.map +3 -3
  467. package/lib/esm/src/internal/device-session/model/DeviceSessionStateHandler.test.js +1 -1
  468. package/lib/esm/src/internal/device-session/model/DeviceSessionStateHandler.test.js.map +3 -3
  469. package/lib/esm/src/internal/device-session/model/Frame.js +1 -1
  470. package/lib/esm/src/internal/device-session/model/Frame.js.map +3 -3
  471. package/lib/esm/src/internal/device-session/service/DefaultApduSenderService.js +1 -1
  472. package/lib/esm/src/internal/device-session/service/DefaultApduSenderService.js.map +2 -2
  473. package/lib/esm/src/internal/device-session/service/DefaultApduSenderService.test.js +1 -1
  474. package/lib/esm/src/internal/device-session/service/DefaultApduSenderService.test.js.map +2 -2
  475. package/lib/esm/src/internal/device-session/use-case/CloseSessionsUseCase.js +1 -1
  476. package/lib/esm/src/internal/device-session/use-case/CloseSessionsUseCase.js.map +3 -3
  477. package/lib/esm/src/internal/device-session/use-case/CloseSessionsUseCase.test.js +1 -1
  478. package/lib/esm/src/internal/device-session/use-case/CloseSessionsUseCase.test.js.map +3 -3
  479. package/lib/esm/src/internal/discovery/di/discoveryModule.js +1 -1
  480. package/lib/esm/src/internal/discovery/di/discoveryModule.js.map +3 -3
  481. package/lib/esm/src/internal/discovery/di/discoveryModule.test.js +1 -1
  482. package/lib/esm/src/internal/discovery/di/discoveryModule.test.js.map +2 -2
  483. package/lib/esm/src/internal/discovery/use-case/DisconnectUseCase.test.js +1 -1
  484. package/lib/esm/src/internal/discovery/use-case/DisconnectUseCase.test.js.map +2 -2
  485. package/lib/esm/src/internal/discovery/use-case/ListenToAvailableDevicesUseCase.js +1 -1
  486. package/lib/esm/src/internal/discovery/use-case/ListenToAvailableDevicesUseCase.js.map +2 -2
  487. package/lib/esm/src/internal/discovery/use-case/StartDiscoveringUseCase.js +1 -1
  488. package/lib/esm/src/internal/discovery/use-case/StartDiscoveringUseCase.js.map +2 -2
  489. package/lib/esm/src/internal/discovery/use-case/StartDiscoveringUseCase.test.js +1 -1
  490. package/lib/esm/src/internal/discovery/use-case/StartDiscoveringUseCase.test.js.map +2 -2
  491. package/lib/esm/src/internal/discovery/use-case/StopDiscoveringUseCase.js +1 -1
  492. package/lib/esm/src/internal/discovery/use-case/StopDiscoveringUseCase.js.map +3 -3
  493. package/lib/esm/src/internal/discovery/use-case/StopDiscoveringUseCase.test.js +1 -1
  494. package/lib/esm/src/internal/discovery/use-case/StopDiscoveringUseCase.test.js.map +3 -3
  495. package/lib/esm/src/internal/logger-publisher/di/loggerModule.js +1 -1
  496. package/lib/esm/src/internal/logger-publisher/di/loggerModule.js.map +3 -3
  497. package/lib/esm/src/internal/logger-publisher/di/loggerModule.test.js +1 -1
  498. package/lib/esm/src/internal/logger-publisher/di/loggerModule.test.js.map +2 -2
  499. package/lib/esm/src/internal/manager-api/data/AxiosManagerApiDataSource.js +1 -1
  500. package/lib/esm/src/internal/manager-api/data/AxiosManagerApiDataSource.js.map +3 -3
  501. package/lib/esm/src/internal/manager-api/data/AxiosManagerApiDataSource.test.js +1 -1
  502. package/lib/esm/src/internal/manager-api/data/AxiosManagerApiDataSource.test.js.map +3 -3
  503. package/lib/esm/src/internal/manager-api/data/ManagerApiDto.js +1 -1
  504. package/lib/esm/src/internal/manager-api/data/ManagerApiDto.js.map +1 -1
  505. package/lib/esm/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.js +1 -1
  506. package/lib/esm/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.js.map +2 -2
  507. package/lib/esm/src/internal/manager-api/di/managerApiModule.js +1 -1
  508. package/lib/esm/src/internal/manager-api/di/managerApiModule.js.map +3 -3
  509. package/lib/esm/src/internal/manager-api/di/managerApiModule.test.js +1 -1
  510. package/lib/esm/src/internal/manager-api/di/managerApiModule.test.js.map +2 -2
  511. package/lib/esm/src/internal/manager-api/di/managerApiTypes.js +1 -1
  512. package/lib/esm/src/internal/manager-api/di/managerApiTypes.js.map +2 -2
  513. package/lib/esm/src/internal/manager-api/model/Application.js +1 -1
  514. package/lib/esm/src/internal/manager-api/model/Application.js.map +1 -1
  515. package/lib/esm/src/internal/manager-api/model/Const.js +1 -1
  516. package/lib/esm/src/internal/manager-api/model/Const.js.map +3 -3
  517. package/lib/esm/src/internal/manager-api/model/Language.js +1 -0
  518. package/lib/esm/src/internal/manager-api/model/Language.js.map +7 -0
  519. package/lib/esm/src/internal/manager-api/service/DefaultManagerApiService.js +1 -1
  520. package/lib/esm/src/internal/manager-api/service/DefaultManagerApiService.js.map +3 -3
  521. package/lib/esm/src/internal/manager-api/service/DefaultManagerApiService.test.js +1 -1
  522. package/lib/esm/src/internal/manager-api/service/DefaultManagerApiService.test.js.map +3 -3
  523. package/lib/esm/src/internal/manager-api/use-case/SetProviderUseCase.js +2 -0
  524. package/lib/esm/src/internal/manager-api/use-case/SetProviderUseCase.js.map +7 -0
  525. package/lib/esm/src/internal/manager-api/use-case/SetProviderUseCase.test.js +2 -0
  526. package/lib/esm/src/internal/manager-api/use-case/SetProviderUseCase.test.js.map +7 -0
  527. package/lib/esm/src/internal/secure-channel/di/secureChannelModule.js +1 -1
  528. package/lib/esm/src/internal/secure-channel/di/secureChannelModule.js.map +3 -3
  529. package/lib/esm/src/internal/secure-channel/di/secureChannelModule.test.js +1 -1
  530. package/lib/esm/src/internal/secure-channel/di/secureChannelModule.test.js.map +2 -2
  531. package/lib/esm/src/internal/secure-channel/model/Errors.js +1 -1
  532. package/lib/esm/src/internal/secure-channel/model/Errors.js.map +3 -3
  533. package/lib/esm/src/internal/secure-channel/service/DefaultSecureChannelService.js.map +3 -3
  534. package/lib/esm/src/internal/secure-channel/service/DefaultSecureChannelService.test.js +1 -1
  535. package/lib/esm/src/internal/secure-channel/service/DefaultSecureChannelService.test.js.map +3 -3
  536. package/lib/esm/src/internal/send/di/sendModule.js +1 -1
  537. package/lib/esm/src/internal/send/di/sendModule.js.map +3 -3
  538. package/lib/esm/src/internal/send/di/sendModule.test.js +1 -1
  539. package/lib/esm/src/internal/send/di/sendModule.test.js.map +2 -2
  540. package/lib/esm/src/internal/send/use-case/SendApduUseCase.js +1 -1
  541. package/lib/esm/src/internal/send/use-case/SendApduUseCase.js.map +3 -3
  542. package/lib/esm/src/internal/transport/di/transportModule.js +1 -1
  543. package/lib/esm/src/internal/transport/di/transportModule.js.map +3 -3
  544. package/lib/esm/src/internal/transport/di/transportModule.test.js +1 -1
  545. package/lib/esm/src/internal/transport/di/transportModule.test.js.map +2 -2
  546. package/lib/esm/src/internal/transport/service/DefaultTransportService.js +1 -1
  547. package/lib/esm/src/internal/transport/service/DefaultTransportService.js.map +3 -3
  548. package/lib/esm/src/internal/transport/service/__mocks__/DefaultTransportService.js +1 -1
  549. package/lib/esm/src/internal/transport/service/__mocks__/DefaultTransportService.js.map +2 -2
  550. package/lib/types/src/api/DeviceManagementKit.d.ts +11 -1
  551. package/lib/types/src/api/DeviceManagementKit.d.ts.map +1 -1
  552. package/lib/types/src/api/DeviceManagementKitBuilder.d.ts.map +1 -1
  553. package/lib/types/src/api/DmkConfig.d.ts +2 -0
  554. package/lib/types/src/api/DmkConfig.d.ts.map +1 -1
  555. package/lib/types/src/api/apdu/utils/ApduBuilder.d.ts.map +1 -1
  556. package/lib/types/src/api/apdu/utils/ApduParser.d.ts.map +1 -1
  557. package/lib/types/src/api/apdu/utils/ByteArrayBuilder.d.ts +28 -0
  558. package/lib/types/src/api/apdu/utils/ByteArrayBuilder.d.ts.map +1 -1
  559. package/lib/types/src/api/apdu/utils/ByteArrayParser.d.ts +1 -0
  560. package/lib/types/src/api/apdu/utils/ByteArrayParser.d.ts.map +1 -1
  561. package/lib/types/src/api/command/di/commandModule.d.ts.map +1 -1
  562. package/lib/types/src/api/command/os/GetCustomImageSizeCommand.d.ts +16 -0
  563. package/lib/types/src/api/command/os/GetCustomImageSizeCommand.d.ts.map +1 -0
  564. package/lib/types/src/api/command/os/GetCustomImageSizeCommand.test.d.ts +2 -0
  565. package/lib/types/src/api/command/os/GetCustomImageSizeCommand.test.d.ts.map +1 -0
  566. package/lib/types/src/api/command/os/GetOsVersionCommand.d.ts +30 -2
  567. package/lib/types/src/api/command/os/GetOsVersionCommand.d.ts.map +1 -1
  568. package/lib/types/src/api/command/os/ListLanguagePackCommand.d.ts +24 -0
  569. package/lib/types/src/api/command/os/ListLanguagePackCommand.d.ts.map +1 -0
  570. package/lib/types/src/api/command/os/ListLanguagePackCommand.test.d.ts +2 -0
  571. package/lib/types/src/api/command/os/ListLanguagePackCommand.test.d.ts.map +1 -0
  572. package/lib/types/src/api/command/os/__mocks__/GetOsVersionCommand.d.ts.map +1 -1
  573. package/lib/types/src/api/command/use-case/SendCommandUseCase.d.ts +5 -1
  574. package/lib/types/src/api/command/use-case/SendCommandUseCase.d.ts.map +1 -1
  575. package/lib/types/src/api/command/utils/CommandErrors.d.ts.map +1 -1
  576. package/lib/types/src/api/command/utils/CommandUtils.d.ts +4 -0
  577. package/lib/types/src/api/command/utils/CommandUtils.d.ts.map +1 -1
  578. package/lib/types/src/api/command/utils/GlobalCommandError.d.ts +1 -1
  579. package/lib/types/src/api/command/utils/GlobalCommandError.d.ts.map +1 -1
  580. package/lib/types/src/api/device/DeviceModel.d.ts +2 -1
  581. package/lib/types/src/api/device/DeviceModel.d.ts.map +1 -1
  582. package/lib/types/src/api/device-action/DeviceAction.d.ts +3 -1
  583. package/lib/types/src/api/device-action/DeviceAction.d.ts.map +1 -1
  584. package/lib/types/src/api/device-action/__test-utils__/makeInternalApi.d.ts.map +1 -1
  585. package/lib/types/src/api/device-action/__test-utils__/setupTestMachine.d.ts +5 -0
  586. package/lib/types/src/api/device-action/__test-utils__/setupTestMachine.d.ts.map +1 -1
  587. package/lib/types/src/api/device-action/di/deviceActionModule.d.ts.map +1 -1
  588. package/lib/types/src/api/device-action/model/UserInteractionRequired.d.ts +1 -0
  589. package/lib/types/src/api/device-action/model/UserInteractionRequired.d.ts.map +1 -1
  590. package/lib/types/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.d.ts.map +1 -1
  591. package/lib/types/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceActionTypes.d.ts +1 -1
  592. package/lib/types/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceActionTypes.d.ts.map +1 -1
  593. package/lib/types/src/api/device-action/os/Errors.d.ts +20 -0
  594. package/lib/types/src/api/device-action/os/Errors.d.ts.map +1 -1
  595. package/lib/types/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.d.ts +58 -0
  596. package/lib/types/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.d.ts.map +1 -0
  597. package/lib/types/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.test.d.ts +2 -0
  598. package/lib/types/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.test.d.ts.map +1 -0
  599. package/lib/types/src/api/device-action/os/GetDeviceMetadata/types.d.ts +28 -0
  600. package/lib/types/src/api/device-action/os/GetDeviceMetadata/types.d.ts.map +1 -0
  601. package/lib/types/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.d.ts.map +1 -1
  602. package/lib/types/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.d.ts.map +1 -1
  603. package/lib/types/src/api/device-action/os/GoToDashboard/types.d.ts +3 -4
  604. package/lib/types/src/api/device-action/os/GoToDashboard/types.d.ts.map +1 -1
  605. package/lib/types/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.d.ts +40 -0
  606. package/lib/types/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.d.ts.map +1 -0
  607. package/lib/types/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.test.d.ts +2 -0
  608. package/lib/types/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.test.d.ts.map +1 -0
  609. package/lib/types/src/api/device-action/os/InstallOrUpdateApps/types.d.ts +65 -0
  610. package/lib/types/src/api/device-action/os/InstallOrUpdateApps/types.d.ts.map +1 -0
  611. package/lib/types/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.d.ts.map +1 -1
  612. package/lib/types/src/api/device-action/os/OpenAppDeviceAction/types.d.ts +0 -1
  613. package/lib/types/src/api/device-action/os/OpenAppDeviceAction/types.d.ts.map +1 -1
  614. package/lib/types/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.d.ts +15 -0
  615. package/lib/types/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.d.ts.map +1 -0
  616. package/lib/types/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.test.d.ts +2 -0
  617. package/lib/types/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.test.d.ts.map +1 -0
  618. package/lib/types/src/api/device-action/os/OpenAppWithDependencies/types.d.ts +24 -0
  619. package/lib/types/src/api/device-action/os/OpenAppWithDependencies/types.d.ts.map +1 -0
  620. package/lib/types/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.d.ts.map +1 -1
  621. package/lib/types/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceActionTypes.d.ts +1 -1
  622. package/lib/types/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceActionTypes.d.ts.map +1 -1
  623. package/lib/types/src/api/device-action/task/BuildAppsInstallPlanTask.d.ts +30 -0
  624. package/lib/types/src/api/device-action/task/BuildAppsInstallPlanTask.d.ts.map +1 -0
  625. package/lib/types/src/api/device-action/task/BuildAppsInstallPlanTask.test.d.ts +2 -0
  626. package/lib/types/src/api/device-action/task/BuildAppsInstallPlanTask.test.d.ts.map +1 -0
  627. package/lib/types/src/api/device-action/task/GetApplicationsMetadataTask.d.ts +31 -0
  628. package/lib/types/src/api/device-action/task/GetApplicationsMetadataTask.d.ts.map +1 -0
  629. package/lib/types/src/api/device-action/task/GetApplicationsMetadataTask.test.d.ts +2 -0
  630. package/lib/types/src/api/device-action/task/GetApplicationsMetadataTask.test.d.ts.map +1 -0
  631. package/lib/types/src/api/device-action/task/GetFirmwareMetadataTask.d.ts +18 -0
  632. package/lib/types/src/api/device-action/task/GetFirmwareMetadataTask.d.ts.map +1 -0
  633. package/lib/types/src/api/device-action/task/GetFirmwareMetadataTask.test.d.ts +2 -0
  634. package/lib/types/src/api/device-action/task/GetFirmwareMetadataTask.test.d.ts.map +1 -0
  635. package/lib/types/src/api/device-action/task/PredictOutOfMemoryTask.d.ts +21 -0
  636. package/lib/types/src/api/device-action/task/PredictOutOfMemoryTask.d.ts.map +1 -0
  637. package/lib/types/src/api/device-action/task/PredictOutOfMemoryTask.test.d.ts +2 -0
  638. package/lib/types/src/api/device-action/task/PredictOutOfMemoryTask.test.d.ts.map +1 -0
  639. package/lib/types/src/api/device-model/data/StaticDeviceModelDataSource.d.ts.map +1 -1
  640. package/lib/types/src/api/device-model/model/DeviceModel.d.ts +2 -0
  641. package/lib/types/src/api/device-model/model/DeviceModel.d.ts.map +1 -1
  642. package/lib/types/src/api/device-model/model/DeviceModel.stub.d.ts.map +1 -1
  643. package/lib/types/src/api/device-session/DeviceSessionState.d.ts +93 -0
  644. package/lib/types/src/api/device-session/DeviceSessionState.d.ts.map +1 -1
  645. package/lib/types/src/api/device-session/service/DefaultApduReceiverService.stub.d.ts.map +1 -1
  646. package/lib/types/src/api/device-session/service/DefaultApduSenderService.stub.d.ts.map +1 -1
  647. package/lib/types/src/api/index.d.ts +6 -1
  648. package/lib/types/src/api/index.d.ts.map +1 -1
  649. package/lib/types/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.d.ts.map +1 -1
  650. package/lib/types/src/api/secure-channel/device-action/GenuineCheck/types.d.ts +2 -1
  651. package/lib/types/src/api/secure-channel/device-action/GenuineCheck/types.d.ts.map +1 -1
  652. package/lib/types/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.d.ts.map +1 -1
  653. package/lib/types/src/api/secure-channel/device-action/InstallApp/types.d.ts +2 -1
  654. package/lib/types/src/api/secure-channel/device-action/InstallApp/types.d.ts.map +1 -1
  655. package/lib/types/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.d.ts.map +1 -1
  656. package/lib/types/src/api/secure-channel/device-action/ListInstalledApps/types.d.ts +2 -1
  657. package/lib/types/src/api/secure-channel/device-action/ListInstalledApps/types.d.ts.map +1 -1
  658. package/lib/types/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.d.ts.map +1 -1
  659. package/lib/types/src/api/secure-channel/device-action/UninstallApp/types.d.ts +2 -1
  660. package/lib/types/src/api/secure-channel/device-action/UninstallApp/types.d.ts.map +1 -1
  661. package/lib/types/src/api/secure-channel/task/ConnectToSecureChannelTask.d.ts +5 -2
  662. package/lib/types/src/api/secure-channel/task/ConnectToSecureChannelTask.d.ts.map +1 -1
  663. package/lib/types/src/api/secure-channel/task/types.d.ts +6 -1
  664. package/lib/types/src/api/secure-channel/task/types.d.ts.map +1 -1
  665. package/lib/types/src/api/secure-channel/utils.d.ts +0 -11
  666. package/lib/types/src/api/secure-channel/utils.d.ts.map +1 -1
  667. package/lib/types/src/api/transport/model/DeviceApduSender.d.ts +17 -0
  668. package/lib/types/src/api/transport/model/DeviceApduSender.d.ts.map +1 -0
  669. package/lib/types/src/api/transport/model/DeviceConnection.d.ts +2 -1
  670. package/lib/types/src/api/transport/model/DeviceConnection.d.ts.map +1 -1
  671. package/lib/types/src/api/transport/model/DeviceConnectionStateMachine.d.ts +63 -0
  672. package/lib/types/src/api/transport/model/DeviceConnectionStateMachine.d.ts.map +1 -0
  673. package/lib/types/src/api/transport/model/DeviceConnectionStateMachine.test.d.ts +2 -0
  674. package/lib/types/src/api/transport/model/DeviceConnectionStateMachine.test.d.ts.map +1 -0
  675. package/lib/types/src/api/transport/model/DiscoveredDevice.d.ts +1 -1
  676. package/lib/types/src/api/transport/model/DiscoveredDevice.d.ts.map +1 -1
  677. package/lib/types/src/api/transport/model/Errors.d.ts +27 -3
  678. package/lib/types/src/api/transport/model/Errors.d.ts.map +1 -1
  679. package/lib/types/src/api/transport/model/Transport.d.ts +1 -1
  680. package/lib/types/src/api/transport/model/Transport.d.ts.map +1 -1
  681. package/lib/types/src/api/types.d.ts +6 -2
  682. package/lib/types/src/api/types.d.ts.map +1 -1
  683. package/lib/types/src/api/utils/AppName.d.ts +2 -0
  684. package/lib/types/src/api/utils/AppName.d.ts.map +1 -0
  685. package/lib/types/src/api/utils/AppName.test.d.ts +2 -0
  686. package/lib/types/src/api/utils/AppName.test.d.ts.map +1 -0
  687. package/lib/types/src/api/utils/HexaString.d.ts.map +1 -1
  688. package/lib/types/src/di.d.ts.map +1 -1
  689. package/lib/types/src/internal/config/di/configModule.d.ts.map +1 -1
  690. package/lib/types/src/internal/device-model/di/deviceModelModule.d.ts.map +1 -1
  691. package/lib/types/src/internal/device-session/data/ApduResponseConst.d.ts +1 -0
  692. package/lib/types/src/internal/device-session/data/ApduResponseConst.d.ts.map +1 -1
  693. package/lib/types/src/internal/device-session/di/deviceSessionModule.d.ts.map +1 -1
  694. package/lib/types/src/internal/device-session/model/DevicePinger.d.ts +1 -1
  695. package/lib/types/src/internal/device-session/model/DevicePinger.d.ts.map +1 -1
  696. package/lib/types/src/internal/device-session/model/DeviceSession.d.ts +3 -1
  697. package/lib/types/src/internal/device-session/model/DeviceSession.d.ts.map +1 -1
  698. package/lib/types/src/internal/device-session/model/DeviceSession.stub.d.ts.map +1 -1
  699. package/lib/types/src/internal/device-session/model/DeviceSessionStateHandler.d.ts.map +1 -1
  700. package/lib/types/src/internal/device-session/model/Frame.d.ts.map +1 -1
  701. package/lib/types/src/internal/device-session/use-case/CloseSessionsUseCase.d.ts +3 -1
  702. package/lib/types/src/internal/device-session/use-case/CloseSessionsUseCase.d.ts.map +1 -1
  703. package/lib/types/src/internal/device-session/utils/deviceSessionUtils.d.ts.map +1 -1
  704. package/lib/types/src/internal/discovery/di/discoveryModule.d.ts.map +1 -1
  705. package/lib/types/src/internal/discovery/use-case/ListenToAvailableDevicesUseCase.d.ts +1 -1
  706. package/lib/types/src/internal/discovery/use-case/ListenToAvailableDevicesUseCase.d.ts.map +1 -1
  707. package/lib/types/src/internal/discovery/use-case/StartDiscoveringUseCase.d.ts +1 -1
  708. package/lib/types/src/internal/discovery/use-case/StartDiscoveringUseCase.d.ts.map +1 -1
  709. package/lib/types/src/internal/discovery/use-case/StopDiscoveringUseCase.d.ts +4 -2
  710. package/lib/types/src/internal/discovery/use-case/StopDiscoveringUseCase.d.ts.map +1 -1
  711. package/lib/types/src/internal/logger-publisher/di/loggerModule.d.ts.map +1 -1
  712. package/lib/types/src/internal/manager-api/data/AxiosManagerApiDataSource.d.ts +24 -5
  713. package/lib/types/src/internal/manager-api/data/AxiosManagerApiDataSource.d.ts.map +1 -1
  714. package/lib/types/src/internal/manager-api/data/ManagerApiDataSource.d.ts +51 -6
  715. package/lib/types/src/internal/manager-api/data/ManagerApiDataSource.d.ts.map +1 -1
  716. package/lib/types/src/internal/manager-api/data/ManagerApiDto.d.ts +104 -18
  717. package/lib/types/src/internal/manager-api/data/ManagerApiDto.d.ts.map +1 -1
  718. package/lib/types/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.d.ts +7 -0
  719. package/lib/types/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.d.ts.map +1 -1
  720. package/lib/types/src/internal/manager-api/di/managerApiModule.d.ts.map +1 -1
  721. package/lib/types/src/internal/manager-api/di/managerApiTypes.d.ts +1 -0
  722. package/lib/types/src/internal/manager-api/di/managerApiTypes.d.ts.map +1 -1
  723. package/lib/types/src/internal/manager-api/model/Application.d.ts +12 -12
  724. package/lib/types/src/internal/manager-api/model/Application.d.ts.map +1 -1
  725. package/lib/types/src/internal/manager-api/model/Const.d.ts +2 -0
  726. package/lib/types/src/internal/manager-api/model/Const.d.ts.map +1 -1
  727. package/lib/types/src/internal/manager-api/model/Firmware.d.ts +17 -3
  728. package/lib/types/src/internal/manager-api/model/Firmware.d.ts.map +1 -1
  729. package/lib/types/src/internal/manager-api/model/Language.d.ts +12 -0
  730. package/lib/types/src/internal/manager-api/model/Language.d.ts.map +1 -0
  731. package/lib/types/src/internal/manager-api/model/Params.d.ts +20 -6
  732. package/lib/types/src/internal/manager-api/model/Params.d.ts.map +1 -1
  733. package/lib/types/src/internal/manager-api/service/DefaultManagerApiService.d.ts +9 -3
  734. package/lib/types/src/internal/manager-api/service/DefaultManagerApiService.d.ts.map +1 -1
  735. package/lib/types/src/internal/manager-api/service/ManagerApiService.d.ts +42 -7
  736. package/lib/types/src/internal/manager-api/service/ManagerApiService.d.ts.map +1 -1
  737. package/lib/types/src/internal/manager-api/use-case/SetProviderUseCase.d.ts +13 -0
  738. package/lib/types/src/internal/manager-api/use-case/SetProviderUseCase.d.ts.map +1 -0
  739. package/lib/types/src/internal/manager-api/use-case/SetProviderUseCase.test.d.ts +2 -0
  740. package/lib/types/src/internal/manager-api/use-case/SetProviderUseCase.test.d.ts.map +1 -0
  741. package/lib/types/src/internal/secure-channel/di/secureChannelModule.d.ts.map +1 -1
  742. package/lib/types/src/internal/secure-channel/model/Errors.d.ts +22 -2
  743. package/lib/types/src/internal/secure-channel/model/Errors.d.ts.map +1 -1
  744. package/lib/types/src/internal/secure-channel/service/DefaultSecureChannelService.d.ts +2 -2
  745. package/lib/types/src/internal/secure-channel/service/DefaultSecureChannelService.d.ts.map +1 -1
  746. package/lib/types/src/internal/secure-channel/service/SecureChannelService.d.ts +3 -3
  747. package/lib/types/src/internal/secure-channel/service/SecureChannelService.d.ts.map +1 -1
  748. package/lib/types/src/internal/send/di/sendModule.d.ts.map +1 -1
  749. package/lib/types/src/internal/send/use-case/SendApduUseCase.d.ts +9 -1
  750. package/lib/types/src/internal/send/use-case/SendApduUseCase.d.ts.map +1 -1
  751. package/lib/types/src/internal/transport/di/transportModule.d.ts.map +1 -1
  752. package/lib/types/src/internal/transport/service/DefaultTransportService.d.ts +2 -0
  753. package/lib/types/src/internal/transport/service/DefaultTransportService.d.ts.map +1 -1
  754. package/lib/types/src/internal/transport/service/TransportService.d.ts +3 -1
  755. package/lib/types/src/internal/transport/service/TransportService.d.ts.map +1 -1
  756. package/lib/types/src/internal/transport/service/__mocks__/DefaultTransportService.d.ts +1 -0
  757. package/lib/types/src/internal/transport/service/__mocks__/DefaultTransportService.d.ts.map +1 -1
  758. package/lib/types/tsconfig.prod.tsbuildinfo +1 -1
  759. package/package.json +14 -15
@@ -0,0 +1,2 @@
1
+ import{Left as p,Right as n}from"purify-ts/Either";import{afterEach as U,beforeEach as w,describe as m,expect as e,it as c,vi as i}from"vitest";import{ApduResponse as x}from"../../device-session/ApduResponse";import{DeviceConnectionStateMachine as D}from"./DeviceConnectionStateMachine";import{AlreadySendingApduError as y,DeviceDisconnectedWhileSendingError as f}from"./Errors";m("DeviceConnectionStateMachine",()=>{let d;const s={sendApdu:i.fn(),getDependencies:i.fn(),setDependencies:i.fn(),closeConnection:i.fn(),setupConnection:i.fn()},t=new x({statusCode:Uint8Array.from([144,0]),data:new Uint8Array}),v=new x({statusCode:Uint8Array.from([102,1]),data:new Uint8Array});w(()=>{i.useFakeTimers(),d=new D({deviceId:"deviceId",deviceApduSender:s,timeoutDuration:1e3,tryToReconnect:i.fn(),onTerminated:i.fn()})}),U(()=>{i.useRealTimers(),i.restoreAllMocks()}),m("Send APDUs",()=>{c("should send APDU successfully",async()=>{const o=Uint8Array.from([1,2,3,4]);s.sendApdu.mockResolvedValue(n(t));const a=await d.sendApdu(o);e(s.sendApdu).toHaveBeenCalledTimes(1),e(a).toStrictEqual(n(t))}),c("should send several APDUs successfully",async()=>{const o=Uint8Array.from([1,2,3,4]),a=Uint8Array.from([9,2,3,4]);s.sendApdu.mockResolvedValue(n(t));const r=await d.sendApdu(o),u=await d.sendApdu(a);e(s.sendApdu).toHaveBeenCalledTimes(2),e(r).toStrictEqual(n(t)),e(u).toStrictEqual(n(t))}),c("should not send several APDUs in parallel",async()=>{const o=Uint8Array.from([1,2,3,4]),a=Uint8Array.from([9,2,3,4]);s.sendApdu.mockResolvedValue(n(t));const r=d.sendApdu(o),u=await d.sendApdu(a),l=await r;e(s.sendApdu).toHaveBeenCalledTimes(1),e(l).toStrictEqual(n(t)),e(u).toStrictEqual(p(new y))}),c("Disconnected while sending APDU",async()=>{const o=Uint8Array.from([1,2,3,4]);s.sendApdu.mockResolvedValue(n(t));const a=d.sendApdu(o);d.eventDeviceDisconnected();const r=await a;e(s.sendApdu).toHaveBeenCalledTimes(1),e(r).toStrictEqual(p(new f))}),c("Request disconnection while sending APDU",async()=>{const o=Uint8Array.from([1,2,3,4]);s.sendApdu.mockResolvedValue(n(t));const a=d.sendApdu(o);d.closeConnection();const r=await a;e(s.sendApdu).toHaveBeenCalledTimes(1),e(r).toStrictEqual(p(new f))})}),m("Send APDUs triggering disconnection",()=>{c("should send one APDU successfully",async()=>{const o=Uint8Array.from([1,2,3,4]);s.sendApdu.mockResolvedValue(n(t));const a=await d.sendApdu(o,!0);e(s.sendApdu).toHaveBeenCalledTimes(2),e(s.sendApdu.mock.calls).toEqual([[o,!1,void 0],[Uint8Array.from([176,1,0,0,0]),!1,void 0]]),e(a).toStrictEqual(n(t))}),c("should send several APDUs successfully",async()=>{const o=Uint8Array.from([1,2,3,4]),a=Uint8Array.from([9,2,3,4]);s.sendApdu.mockResolvedValueOnce(n(t)).mockRejectedValueOnce(new Error("Transport error")).mockResolvedValueOnce(n(t));const r=d.sendApdu(o,!0);await Promise.resolve(),d.eventDeviceDisconnected(),d.eventDeviceConnected();const u=d.sendApdu(a),l=await r,A=await u;e(s.sendApdu).toHaveBeenCalledTimes(3),e(s.sendApdu.mock.calls).toEqual([[o,!1,void 0],[Uint8Array.from([176,1,0,0,0]),!1,void 0],[a,!1,void 0]]),e(l).toStrictEqual(n(t)),e(A).toStrictEqual(n(t))}),c("should send a second APDU after reconnection",async()=>{const o=Uint8Array.from([1,2,3,4]),a=Uint8Array.from([9,2,3,4]);s.sendApdu.mockResolvedValueOnce(n(t)).mockRejectedValueOnce(new Error("Transport error")).mockResolvedValueOnce(n(t));const r=await d.sendApdu(o,!0);d.eventDeviceDisconnected(),d.eventDeviceConnected();const u=await d.sendApdu(a);e(s.sendApdu).toHaveBeenCalledTimes(3),e(s.sendApdu.mock.calls).toEqual([[o,!1,void 0],[Uint8Array.from([176,1,0,0,0]),!1,void 0],[a,!1,void 0]]),e(r).toStrictEqual(n(t)),e(u).toStrictEqual(n(t))}),c("should send a second APDU without reconnection, after GetAppAndVersion response",async()=>{const o=Uint8Array.from([1,2,3,4]),a=Uint8Array.from([9,2,3,4]);s.sendApdu.mockResolvedValueOnce(n(t)).mockResolvedValueOnce(n(t)).mockResolvedValueOnce(n(t));const r=await d.sendApdu(o,!0),u=await d.sendApdu(a);e(s.sendApdu).toHaveBeenCalledTimes(3),e(s.sendApdu.mock.calls).toEqual([[o,!1,void 0],[Uint8Array.from([176,1,0,0,0]),!1,void 0],[a,!1,void 0]]),e(r).toStrictEqual(n(t)),e(u).toStrictEqual(n(t))}),c("should send a second APDU without reconnection, after GetAppAndVersion retries",async()=>{const o=Uint8Array.from([1,2,3,4]),a=Uint8Array.from([9,2,3,4]);s.sendApdu.mockResolvedValueOnce(n(t)).mockResolvedValueOnce(n(v)).mockResolvedValueOnce(n(v)).mockResolvedValueOnce(n(t)).mockResolvedValueOnce(n(t));const r=await d.sendApdu(o,!0),u=await d.sendApdu(a);e(s.sendApdu).toHaveBeenCalledTimes(5),e(s.sendApdu.mock.calls).toEqual([[o,!1,void 0],[Uint8Array.from([176,1,0,0,0]),!1,void 0],[Uint8Array.from([176,1,0,0,0]),!1,void 0],[Uint8Array.from([176,1,0,0,0]),!1,void 0],[a,!1,void 0]]),e(r).toStrictEqual(n(t)),e(u).toStrictEqual(n(t))}),c("should not send several APDUs in parallel",async()=>{const o=Uint8Array.from([1,2,3,4]),a=Uint8Array.from([9,2,3,4]);s.sendApdu.mockResolvedValue(n(t));const r=d.sendApdu(o,!0),u=await d.sendApdu(a),l=await r;e(s.sendApdu).toHaveBeenCalledTimes(2),e(s.sendApdu.mock.calls).toEqual([[o,!1,void 0],[Uint8Array.from([176,1,0,0,0]),!1,void 0]]),e(l).toStrictEqual(n(t)),e(u).toStrictEqual(p(new y))}),c("should send another APDU in promise handler",async()=>{const o=Uint8Array.from([1,2,3,4]),a=Uint8Array.from([9,2,3,4]);s.sendApdu.mockResolvedValue(n(t));let r;const u=await d.sendApdu(o,!0).then(A=>(r=d.sendApdu(a),A));d.eventDeviceDisconnected(),d.eventDeviceConnected();const l=await r;e(s.sendApdu).toHaveBeenCalledTimes(3),e(s.sendApdu.mock.calls).toEqual([[o,!1,void 0],[Uint8Array.from([176,1,0,0,0]),!1,void 0],[a,!1,void 0]]),e(u).toStrictEqual(n(t)),e(l).toStrictEqual(n(t))}),c("send an APDU while device is reconnecting",async()=>{const o=Uint8Array.from([1,2,3,4]);s.sendApdu.mockResolvedValue(n(t)),d.eventDeviceDisconnected();const a=d.sendApdu(o,!0);d.eventDeviceConnected();const r=await a;e(s.sendApdu).toHaveBeenCalledTimes(2),e(s.sendApdu.mock.calls).toEqual([[o,!1,void 0],[Uint8Array.from([176,1,0,0,0]),!1,void 0]]),e(r).toStrictEqual(n(t))}),c("Close while an APDU is waiting for reconnection",async()=>{const o=Uint8Array.from([1,2,3,4]),a=Uint8Array.from([9,2,3,4]);s.sendApdu.mockResolvedValue(n(t));let r;const u=d.sendApdu(o,!0);await Promise.resolve(),d.eventDeviceDisconnected();const l=await u;r=d.sendApdu(a),d.closeConnection();const A=await r;e(s.sendApdu.mock.calls).toEqual([[o,!1,void 0],[Uint8Array.from([176,1,0,0,0]),!1,void 0]]),e(l).toStrictEqual(n(t)),e(A).toStrictEqual(p(new f))})})});
2
+ //# sourceMappingURL=DeviceConnectionStateMachine.test.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../src/api/transport/model/DeviceConnectionStateMachine.test.ts"],
4
+ "sourcesContent": ["import { Left, Right } from \"purify-ts/Either\";\nimport { afterEach, beforeEach, describe, expect, it, vi } from \"vitest\";\n\nimport { ApduResponse } from \"@api/device-session/ApduResponse\";\n\nimport { type SendApduResult } from \"./DeviceConnection\";\nimport { DeviceConnectionStateMachine } from \"./DeviceConnectionStateMachine\";\nimport {\n AlreadySendingApduError,\n DeviceDisconnectedWhileSendingError,\n} from \"./Errors\";\n\ndescribe(\"DeviceConnectionStateMachine\", () => {\n let machine: DeviceConnectionStateMachine<void>;\n const mockApduSender = {\n sendApdu: vi.fn(),\n getDependencies: vi.fn(),\n setDependencies: vi.fn(),\n closeConnection: vi.fn(),\n setupConnection: vi.fn(),\n };\n\n const apduResponse = new ApduResponse({\n statusCode: Uint8Array.from([0x90, 0x00]),\n data: new Uint8Array(),\n });\n const apduResponseErrorBusy = new ApduResponse({\n statusCode: Uint8Array.from([0x66, 0x01]),\n data: new Uint8Array(),\n });\n\n beforeEach(() => {\n vi.useFakeTimers();\n machine = new DeviceConnectionStateMachine<void>({\n deviceId: \"deviceId\",\n deviceApduSender: mockApduSender,\n timeoutDuration: 1000,\n tryToReconnect: vi.fn(),\n onTerminated: vi.fn(),\n });\n });\n\n afterEach(() => {\n vi.useRealTimers();\n vi.restoreAllMocks();\n });\n\n describe(\"Send APDUs\", () => {\n it(\"should send APDU successfully\", async () => {\n // GIVEN\n const apdu = Uint8Array.from([1, 2, 3, 4]);\n mockApduSender.sendApdu.mockResolvedValue(Right(apduResponse));\n\n // WHEN\n const result = await machine.sendApdu(apdu);\n\n // THEN\n expect(mockApduSender.sendApdu).toHaveBeenCalledTimes(1);\n expect(result).toStrictEqual(Right(apduResponse));\n });\n\n it(\"should send several APDUs successfully\", async () => {\n // GIVEN\n const apdu = Uint8Array.from([1, 2, 3, 4]);\n const apdu2 = Uint8Array.from([9, 2, 3, 4]);\n mockApduSender.sendApdu.mockResolvedValue(Right(apduResponse));\n\n // WHEN\n const result = await machine.sendApdu(apdu);\n const result2 = await machine.sendApdu(apdu2);\n\n // THEN\n expect(mockApduSender.sendApdu).toHaveBeenCalledTimes(2);\n expect(result).toStrictEqual(Right(apduResponse));\n expect(result2).toStrictEqual(Right(apduResponse));\n });\n\n it(\"should not send several APDUs in parallel\", async () => {\n // GIVEN\n const apdu = Uint8Array.from([1, 2, 3, 4]);\n const apdu2 = Uint8Array.from([9, 2, 3, 4]);\n mockApduSender.sendApdu.mockResolvedValue(Right(apduResponse));\n\n // WHEN\n const promise = machine.sendApdu(apdu);\n const result2 = await machine.sendApdu(apdu2);\n const result = await promise;\n\n // THEN\n expect(mockApduSender.sendApdu).toHaveBeenCalledTimes(1);\n expect(result).toStrictEqual(Right(apduResponse));\n expect(result2).toStrictEqual(Left(new AlreadySendingApduError()));\n });\n\n it(\"Disconnected while sending APDU\", async () => {\n // GIVEN\n const apdu = Uint8Array.from([1, 2, 3, 4]);\n mockApduSender.sendApdu.mockResolvedValue(Right(apduResponse));\n\n // WHEN\n const promise = machine.sendApdu(apdu);\n machine.eventDeviceDisconnected();\n const result = await promise;\n\n // THEN\n expect(mockApduSender.sendApdu).toHaveBeenCalledTimes(1);\n expect(result).toStrictEqual(\n Left(new DeviceDisconnectedWhileSendingError()),\n );\n });\n\n it(\"Request disconnection while sending APDU\", async () => {\n // GIVEN\n const apdu = Uint8Array.from([1, 2, 3, 4]);\n mockApduSender.sendApdu.mockResolvedValue(Right(apduResponse));\n\n // WHEN\n const promise = machine.sendApdu(apdu);\n machine.closeConnection();\n const result = await promise;\n\n // THEN\n expect(mockApduSender.sendApdu).toHaveBeenCalledTimes(1);\n expect(result).toStrictEqual(\n Left(new DeviceDisconnectedWhileSendingError()),\n );\n });\n });\n\n describe(\"Send APDUs triggering disconnection\", () => {\n it(\"should send one APDU successfully\", async () => {\n // GIVEN\n const apdu = Uint8Array.from([1, 2, 3, 4]);\n mockApduSender.sendApdu.mockResolvedValue(Right(apduResponse));\n\n // WHEN\n const result = await machine.sendApdu(apdu, true);\n\n // THEN\n expect(mockApduSender.sendApdu).toHaveBeenCalledTimes(2);\n expect(mockApduSender.sendApdu.mock.calls).toEqual([\n [apdu, false, undefined],\n [Uint8Array.from([0xb0, 0x01, 0x00, 0x00, 0x00]), false, undefined], // GetAppAndVersion APDU sent after a successful result from an APDU that triggers disconnection\n ]);\n expect(result).toStrictEqual(Right(apduResponse));\n });\n\n it(\"should send several APDUs successfully\", async () => {\n // GIVEN\n const apdu = Uint8Array.from([1, 2, 3, 4]);\n const apdu2 = Uint8Array.from([9, 2, 3, 4]);\n mockApduSender.sendApdu\n .mockResolvedValueOnce(Right(apduResponse))\n .mockRejectedValueOnce(new Error(\"Transport error\"))\n .mockResolvedValueOnce(Right(apduResponse));\n\n // WHEN\n const promise1 = machine.sendApdu(apdu, true);\n await Promise.resolve(); // Allow the first APDU to be sent and processed before the disconnection event\n machine.eventDeviceDisconnected();\n machine.eventDeviceConnected();\n const promise2 = machine.sendApdu(apdu2);\n const result1 = await promise1;\n const result2 = await promise2;\n\n // THEN\n expect(mockApduSender.sendApdu).toHaveBeenCalledTimes(3);\n expect(mockApduSender.sendApdu.mock.calls).toEqual([\n [apdu, false, undefined],\n [Uint8Array.from([0xb0, 0x01, 0x00, 0x00, 0x00]), false, undefined], // GetAppAndVersion APDU sent after a successful result from an APDU that triggers disconnection\n [apdu2, false, undefined],\n ]);\n\n expect(result1).toStrictEqual(Right(apduResponse));\n expect(result2).toStrictEqual(Right(apduResponse));\n });\n\n it(\"should send a second APDU after reconnection\", async () => {\n // GIVEN\n const apdu = Uint8Array.from([1, 2, 3, 4]);\n const apdu2 = Uint8Array.from([9, 2, 3, 4]);\n mockApduSender.sendApdu\n .mockResolvedValueOnce(Right(apduResponse))\n .mockRejectedValueOnce(new Error(\"Transport error\"))\n .mockResolvedValueOnce(Right(apduResponse));\n\n // WHEN\n const result = await machine.sendApdu(apdu, true);\n machine.eventDeviceDisconnected();\n machine.eventDeviceConnected();\n const result2 = await machine.sendApdu(apdu2);\n\n // THEN\n expect(mockApduSender.sendApdu).toHaveBeenCalledTimes(3);\n expect(mockApduSender.sendApdu.mock.calls).toEqual([\n [apdu, false, undefined],\n [Uint8Array.from([0xb0, 0x01, 0x00, 0x00, 0x00]), false, undefined], // GetAppAndVersion APDU sent after a successful result from an APDU that triggers disconnection\n [apdu2, false, undefined],\n ]);\n expect(result).toStrictEqual(Right(apduResponse));\n expect(result2).toStrictEqual(Right(apduResponse));\n });\n\n it(\"should send a second APDU without reconnection, after GetAppAndVersion response\", async () => {\n // GIVEN\n const apdu = Uint8Array.from([1, 2, 3, 4]);\n const apdu2 = Uint8Array.from([9, 2, 3, 4]);\n mockApduSender.sendApdu\n .mockResolvedValueOnce(Right(apduResponse))\n .mockResolvedValueOnce(Right(apduResponse))\n .mockResolvedValueOnce(Right(apduResponse));\n\n // WHEN\n const result = await machine.sendApdu(apdu, true);\n const result2 = await machine.sendApdu(apdu2);\n\n // THEN\n expect(mockApduSender.sendApdu).toHaveBeenCalledTimes(3);\n expect(mockApduSender.sendApdu.mock.calls).toEqual([\n [apdu, false, undefined],\n [Uint8Array.from([0xb0, 0x01, 0x00, 0x00, 0x00]), false, undefined], // GetAppAndVersion APDU sent after a successful result from an APDU that triggers disconnection\n [apdu2, false, undefined],\n ]);\n expect(result).toStrictEqual(Right(apduResponse));\n expect(result2).toStrictEqual(Right(apduResponse));\n });\n\n it(\"should send a second APDU without reconnection, after GetAppAndVersion retries\", async () => {\n // GIVEN\n const apdu = Uint8Array.from([1, 2, 3, 4]);\n const apdu2 = Uint8Array.from([9, 2, 3, 4]);\n mockApduSender.sendApdu\n .mockResolvedValueOnce(Right(apduResponse))\n .mockResolvedValueOnce(Right(apduResponseErrorBusy))\n .mockResolvedValueOnce(Right(apduResponseErrorBusy))\n .mockResolvedValueOnce(Right(apduResponse))\n .mockResolvedValueOnce(Right(apduResponse));\n\n // WHEN\n const result = await machine.sendApdu(apdu, true);\n const result2 = await machine.sendApdu(apdu2);\n\n // THEN\n expect(mockApduSender.sendApdu).toHaveBeenCalledTimes(5);\n expect(mockApduSender.sendApdu.mock.calls).toEqual([\n [apdu, false, undefined],\n [Uint8Array.from([0xb0, 0x01, 0x00, 0x00, 0x00]), false, undefined],\n [Uint8Array.from([0xb0, 0x01, 0x00, 0x00, 0x00]), false, undefined],\n [Uint8Array.from([0xb0, 0x01, 0x00, 0x00, 0x00]), false, undefined],\n [apdu2, false, undefined],\n ]);\n expect(result).toStrictEqual(Right(apduResponse));\n expect(result2).toStrictEqual(Right(apduResponse));\n });\n\n it(\"should not send several APDUs in parallel\", async () => {\n // GIVEN\n const apdu = Uint8Array.from([1, 2, 3, 4]);\n const apdu2 = Uint8Array.from([9, 2, 3, 4]);\n mockApduSender.sendApdu.mockResolvedValue(Right(apduResponse));\n\n // WHEN\n const promise = machine.sendApdu(apdu, true);\n const result2 = await machine.sendApdu(apdu2);\n const result = await promise;\n\n // THEN\n expect(mockApduSender.sendApdu).toHaveBeenCalledTimes(2);\n expect(mockApduSender.sendApdu.mock.calls).toEqual([\n [apdu, false, undefined],\n [Uint8Array.from([0xb0, 0x01, 0x00, 0x00, 0x00]), false, undefined], // GetAppAndVersion APDU sent after a successful result from an APDU that triggers disconnection\n ]);\n expect(result).toStrictEqual(Right(apduResponse));\n expect(result2).toStrictEqual(Left(new AlreadySendingApduError()));\n });\n\n it(\"should send another APDU in promise handler\", async () => {\n // GIVEN\n const apdu = Uint8Array.from([1, 2, 3, 4]);\n const apdu2 = Uint8Array.from([9, 2, 3, 4]);\n mockApduSender.sendApdu.mockResolvedValue(Right(apduResponse));\n\n // WHEN\n let promise: Promise<SendApduResult> | undefined = undefined;\n const result = await machine.sendApdu(apdu, true).then((value) => {\n promise = machine.sendApdu(apdu2);\n return value;\n });\n machine.eventDeviceDisconnected();\n machine.eventDeviceConnected();\n const result2 = await promise!;\n\n // THEN\n expect(mockApduSender.sendApdu).toHaveBeenCalledTimes(3);\n expect(mockApduSender.sendApdu.mock.calls).toEqual([\n [apdu, false, undefined],\n [Uint8Array.from([0xb0, 0x01, 0x00, 0x00, 0x00]), false, undefined], // GetAppAndVersion APDU sent after a successful result from an APDU that triggers disconnection\n [apdu2, false, undefined],\n ]);\n expect(result).toStrictEqual(Right(apduResponse));\n expect(result2).toStrictEqual(Right(apduResponse));\n });\n\n it(\"send an APDU while device is reconnecting\", async () => {\n // GIVEN\n const apdu = Uint8Array.from([1, 2, 3, 4]);\n mockApduSender.sendApdu.mockResolvedValue(Right(apduResponse));\n\n // WHEN\n machine.eventDeviceDisconnected();\n const promise = machine.sendApdu(apdu, true);\n machine.eventDeviceConnected();\n const result = await promise;\n\n // THEN\n expect(mockApduSender.sendApdu).toHaveBeenCalledTimes(2);\n expect(mockApduSender.sendApdu.mock.calls).toEqual([\n [apdu, false, undefined],\n [Uint8Array.from([0xb0, 0x01, 0x00, 0x00, 0x00]), false, undefined], // GetAppAndVersion APDU sent after a successful result from an APDU that triggers disconnection\n ]);\n expect(result).toStrictEqual(Right(apduResponse));\n });\n\n it(\"Close while an APDU is waiting for reconnection\", async () => {\n // GIVEN\n const apdu = Uint8Array.from([1, 2, 3, 4]);\n const apdu2 = Uint8Array.from([9, 2, 3, 4]);\n mockApduSender.sendApdu.mockResolvedValue(Right(apduResponse));\n\n // WHEN\n let promise: Promise<SendApduResult> | undefined = undefined;\n const promise1 = machine.sendApdu(apdu, true);\n await Promise.resolve(); // Allow the first APDU promise to resolve before triggering disconnection\n machine.eventDeviceDisconnected();\n const result1 = await promise1;\n promise = machine.sendApdu(apdu2);\n machine.closeConnection();\n const result2 = await promise!;\n\n // THEN\n // expect(mockApduSender.sendApdu).toHaveBeenCalledTimes(2);\n expect(mockApduSender.sendApdu.mock.calls).toEqual([\n [apdu, false, undefined],\n [Uint8Array.from([0xb0, 0x01, 0x00, 0x00, 0x00]), false, undefined], // GetAppAndVersion APDU sent after a successful result from an APDU that triggers disconnection\n ]);\n expect(result1).toStrictEqual(Right(apduResponse));\n expect(result2).toStrictEqual(\n Left(new DeviceDisconnectedWhileSendingError()),\n );\n });\n });\n});\n"],
5
+ "mappings": "AAAA,OAAS,QAAAA,EAAM,SAAAC,MAAa,mBAC5B,OAAS,aAAAC,EAAW,cAAAC,EAAY,YAAAC,EAAU,UAAAC,EAAQ,MAAAC,EAAI,MAAAC,MAAU,SAEhE,OAAS,gBAAAC,MAAoB,mCAG7B,OAAS,gCAAAC,MAAoC,iCAC7C,OACE,2BAAAC,EACA,uCAAAC,MACK,WAEPP,EAAS,+BAAgC,IAAM,CAC7C,IAAIQ,EACJ,MAAMC,EAAiB,CACrB,SAAUN,EAAG,GAAG,EAChB,gBAAiBA,EAAG,GAAG,EACvB,gBAAiBA,EAAG,GAAG,EACvB,gBAAiBA,EAAG,GAAG,EACvB,gBAAiBA,EAAG,GAAG,CACzB,EAEMO,EAAe,IAAIN,EAAa,CACpC,WAAY,WAAW,KAAK,CAAC,IAAM,CAAI,CAAC,EACxC,KAAM,IAAI,UACZ,CAAC,EACKO,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,EACtBJ,EAAQ,wBAAwB,EAChC,MAAMW,EAAU,MAAMF,EACtBD,EAAUR,EAAQ,SAASM,CAAK,EAChCN,EAAQ,gBAAgB,EACxB,MAAMO,EAAU,MAAMC,EAItBf,EAAOQ,EAAe,SAAS,KAAK,KAAK,EAAE,QAAQ,CACjD,CAACG,EAAM,GAAO,MAAS,EACvB,CAAC,WAAW,KAAK,CAAC,IAAM,EAAM,EAAM,EAAM,CAAI,CAAC,EAAG,GAAO,MAAS,CACpE,CAAC,EACDX,EAAOkB,CAAO,EAAE,cAActB,EAAMa,CAAY,CAAC,EACjDT,EAAOc,CAAO,EAAE,cACdnB,EAAK,IAAIW,CAAqC,CAChD,CACF,CAAC,CACH,CAAC,CACH,CAAC",
6
+ "names": ["Left", "Right", "afterEach", "beforeEach", "describe", "expect", "it", "vi", "ApduResponse", "DeviceConnectionStateMachine", "AlreadySendingApduError", "DeviceDisconnectedWhileSendingError", "machine", "mockApduSender", "apduResponse", "apduResponseErrorBusy", "apdu", "result", "apdu2", "result2", "promise", "promise1", "promise2", "result1", "value"]
7
+ }
@@ -1,2 +1,2 @@
1
- class n{_tag="GeneralDmkError";originalError;constructor(o){o instanceof Error?this.originalError=o:o!==void 0&&(this.originalError=new Error(String(o)))}}class t extends n{constructor(r){super(r);this.err=r}_tag="DeviceAlreadyDiscoveredError"}class s extends n{constructor(r){super(r);this.err=r}_tag="DeviceNotRecognizedError"}class d extends n{constructor(r){super(r);this.err=r}_tag="NoAccessibleDeviceError"}class c extends n{constructor(r){super(r);this.err=r}_tag="ConnectionOpeningError"}class a extends n{constructor(r){super(r);this.err=r}_tag="UnknownDeviceError"}class i extends n{constructor(r){super(r);this.err=r}_tag="TransportNotSupportedError"}class l extends n{constructor(r){super(r);this.err=r}_tag="SendApduConcurrencyError"}class p extends n{constructor(r){super(r);this.err=r}_tag="DisconnectError"}class u extends n{constructor(r){super(r);this.err=r}_tag="ReconnectionFailedError"}class E extends n{constructor(r){super(r);this.err=r}_tag="DeviceNotInitializedError"}class y extends n{constructor(r){super(r);this.err=r}_tag="NoTransportsProvidedError"}class v extends n{constructor(r){super(r);this.err=r}_tag="TransportAlreadyExistsError"}class x extends n{constructor(r){super(r);this.err=r}_tag="NoTransportProvidedError"}export{t as DeviceAlreadyConnectedError,E as DeviceNotInitializedError,s as DeviceNotRecognizedError,p as DisconnectError,n as GeneralDmkError,d as NoAccessibleDeviceError,x as NoTransportProvidedError,y as NoTransportsProvidedError,c as OpeningConnectionError,u as ReconnectionFailedError,l as SendApduConcurrencyError,v as TransportAlreadyExistsError,i as TransportNotSupportedError,a as UnknownDeviceError};
1
+ class n{_tag="GeneralDmkError";originalError;constructor(e){e instanceof Error?this.originalError=e:e!==void 0&&(this.originalError=new Error(String(e)))}}class t extends n{constructor(r){super(r);this.err=r}_tag="DeviceAlreadyDiscoveredError"}class s extends n{constructor(r){super(r);this.err=r}_tag="DeviceNotRecognizedError"}class d extends n{constructor(r){super(r);this.err=r}_tag="NoAccessibleDeviceError"}class c extends n{_tag="ConnectionOpeningError";constructor(e){super(e)}}class a extends n{constructor(r){super(r);this.err=r}_tag="UnknownDeviceError"}class i extends n{constructor(r){super(r);this.err=r}_tag="TransportNotSupportedError"}class l extends n{constructor(r){super(r);this.err=r}_tag="SendApduConcurrencyError"}class u extends n{constructor(r){super(r);this.err=r}_tag="SendApduTimeoutError"}class p extends n{constructor(r){super(r);this.err=r}_tag="SendApduEmptyResponseError"}class E extends n{constructor(r){super(r);this.err=r}_tag="DisconnectError"}class y extends n{constructor(r){super(r);this.err=r}_tag="ReconnectionFailedError"}class x extends n{constructor(r){super(r);this.err=r}_tag="DeviceNotInitializedError"}class v extends n{constructor(r){super(r);this.err=r}_tag="NoTransportsProvidedError"}class g extends n{constructor(r){super(r);this.err=r}_tag="TransportAlreadyExistsError"}class k extends n{constructor(r){super(r);this.err=r}_tag="DeviceDisconnectedWhileSendingError"}class D extends n{constructor(r){super(r);this.err=r}_tag="AlreadySendingApduError"}class w extends n{constructor(r){super(r);this.err=r}_tag="DeviceDisconnectedBeforeSendingApdu"}class A extends n{constructor(r){super(r);this.err=r}_tag="NoTransportProvidedError"}export{D as AlreadySendingApduError,t as DeviceAlreadyConnectedError,w as DeviceDisconnectedBeforeSendingApdu,k as DeviceDisconnectedWhileSendingError,x as DeviceNotInitializedError,s as DeviceNotRecognizedError,E as DisconnectError,n as GeneralDmkError,d as NoAccessibleDeviceError,A as NoTransportProvidedError,v as NoTransportsProvidedError,c as OpeningConnectionError,y as ReconnectionFailedError,l as SendApduConcurrencyError,p as SendApduEmptyResponseError,u as SendApduTimeoutError,g as TransportAlreadyExistsError,i as TransportNotSupportedError,a as UnknownDeviceError};
2
2
  //# sourceMappingURL=Errors.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/api/transport/model/Errors.ts"],
4
- "sourcesContent": ["import { type DmkError } from \"@api/Error\";\n\nexport type ConnectError =\n | UnknownDeviceError\n | OpeningConnectionError\n | DeviceAlreadyConnectedError;\n\nexport class GeneralDmkError implements DmkError {\n _tag = \"GeneralDmkError\";\n originalError?: unknown;\n constructor(err?: unknown) {\n if (err instanceof Error) {\n this.originalError = err;\n } else if (err !== undefined) {\n this.originalError = new Error(String(err));\n }\n }\n}\n\nexport class DeviceAlreadyConnectedError extends GeneralDmkError {\n override readonly _tag = \"DeviceAlreadyDiscoveredError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class DeviceNotRecognizedError extends GeneralDmkError {\n override readonly _tag = \"DeviceNotRecognizedError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class NoAccessibleDeviceError extends GeneralDmkError {\n override readonly _tag = \"NoAccessibleDeviceError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class OpeningConnectionError extends GeneralDmkError {\n override readonly _tag = \"ConnectionOpeningError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class UnknownDeviceError extends GeneralDmkError {\n override readonly _tag = \"UnknownDeviceError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class TransportNotSupportedError extends GeneralDmkError {\n override readonly _tag = \"TransportNotSupportedError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\nexport class SendApduConcurrencyError extends GeneralDmkError {\n override readonly _tag = \"SendApduConcurrencyError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class DisconnectError extends GeneralDmkError {\n override readonly _tag = \"DisconnectError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class ReconnectionFailedError extends GeneralDmkError {\n override readonly _tag = \"ReconnectionFailedError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class DeviceNotInitializedError extends GeneralDmkError {\n override readonly _tag = \"DeviceNotInitializedError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class NoTransportsProvidedError extends GeneralDmkError {\n override readonly _tag = \"NoTransportsProvidedError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class TransportAlreadyExistsError extends GeneralDmkError {\n override readonly _tag = \"TransportAlreadyExistsError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class NoTransportProvidedError extends GeneralDmkError {\n override readonly _tag = \"NoTransportProvidedError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n"],
5
- "mappings": "AAOO,MAAMA,CAAoC,CAC/C,KAAO,kBACP,cACA,YAAYC,EAAe,CACrBA,aAAe,MACjB,KAAK,cAAgBA,EACZA,IAAQ,SACjB,KAAK,cAAgB,IAAI,MAAM,OAAOA,CAAG,CAAC,EAE9C,CACF,CAEO,MAAMC,UAAoCF,CAAgB,CAE/D,YAAqBC,EAAe,CAClC,MAAMA,CAAG,EADU,SAAAA,CAErB,CAHkB,KAAO,8BAI3B,CAEO,MAAME,UAAiCH,CAAgB,CAE5D,YAAqBC,EAAe,CAClC,MAAMA,CAAG,EADU,SAAAA,CAErB,CAHkB,KAAO,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mkError", "err", "DeviceAlreadyConnectedError", "DeviceNotRecognizedError", "NoAccessibleDeviceError", "OpeningConnectionError", "UnknownDeviceError", "TransportNotSupportedError", "SendApduConcurrencyError", "DisconnectError", "ReconnectionFailedError", "DeviceNotInitializedError", "NoTransportsProvidedError", "TransportAlreadyExistsError", "NoTransportProvidedError"]
4
+ "sourcesContent": ["import { type DmkError } from \"@api/Error\";\n\nexport type ConnectError =\n | UnknownDeviceError\n | OpeningConnectionError\n | DeviceAlreadyConnectedError;\n\nexport class GeneralDmkError implements DmkError {\n _tag = \"GeneralDmkError\";\n originalError?: unknown;\n constructor(err?: unknown) {\n if (err instanceof Error) {\n this.originalError = err;\n } else if (err !== undefined) {\n this.originalError = new Error(String(err));\n }\n }\n}\n\nexport class DeviceAlreadyConnectedError extends GeneralDmkError {\n override readonly _tag = \"DeviceAlreadyDiscoveredError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class DeviceNotRecognizedError extends GeneralDmkError {\n override readonly _tag = \"DeviceNotRecognizedError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class NoAccessibleDeviceError extends GeneralDmkError {\n override readonly _tag = \"NoAccessibleDeviceError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class OpeningConnectionError extends GeneralDmkError {\n override _tag = \"ConnectionOpeningError\";\n constructor(err?: unknown) {\n super(err);\n }\n}\n\nexport class UnknownDeviceError extends GeneralDmkError {\n override readonly _tag = \"UnknownDeviceError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class TransportNotSupportedError extends GeneralDmkError {\n override readonly _tag = \"TransportNotSupportedError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\nexport class SendApduConcurrencyError extends GeneralDmkError {\n override readonly _tag = \"SendApduConcurrencyError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class SendApduTimeoutError extends GeneralDmkError {\n override readonly _tag = \"SendApduTimeoutError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class SendApduEmptyResponseError extends GeneralDmkError {\n override readonly _tag = \"SendApduEmptyResponseError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class DisconnectError extends GeneralDmkError {\n override readonly _tag = \"DisconnectError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class ReconnectionFailedError extends GeneralDmkError {\n override readonly _tag = \"ReconnectionFailedError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class DeviceNotInitializedError extends GeneralDmkError {\n override readonly _tag = \"DeviceNotInitializedError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class NoTransportsProvidedError extends GeneralDmkError {\n override readonly _tag = \"NoTransportsProvidedError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class TransportAlreadyExistsError extends GeneralDmkError {\n override readonly _tag = \"TransportAlreadyExistsError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class DeviceDisconnectedWhileSendingError extends GeneralDmkError {\n override readonly _tag = \"DeviceDisconnectedWhileSendingError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class AlreadySendingApduError extends GeneralDmkError {\n override readonly _tag = \"AlreadySendingApduError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class DeviceDisconnectedBeforeSendingApdu extends GeneralDmkError {\n override readonly _tag = \"DeviceDisconnectedBeforeSendingApdu\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class NoTransportProvidedError extends GeneralDmkError {\n override readonly _tag = \"NoTransportProvidedError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n"],
5
+ "mappings": "AAOO,MAAMA,CAAoC,CAC/C,KAAO,kBACP,cACA,YAAYC,EAAe,CACrBA,aAAe,MACjB,KAAK,cAAgBA,EACZA,IAAQ,SACjB,KAAK,cAAgB,IAAI,MAAM,OAAOA,CAAG,CAAC,EAE9C,CACF,CAE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CAClC,MAAMA,CAAG,EADU,SAAAA,CAErB,CAHkB,KAAO,2BAI3B,CAEO,MAAMa,UAAkCd,CAAgB,CAE7D,YAAqBC,EAAe,CAClC,MAAMA,CAAG,EADU,SAAAA,CAErB,CAHkB,KAAO,2BAI3B,CAEO,MAAMc,UAAoCf,CAAgB,CAE/D,YAAqBC,EAAe,CAClC,MAAMA,CAAG,EADU,SAAAA,CAErB,CAHkB,KAAO,6BAI3B,CAEO,MAAMe,UAA4ChB,CAAgB,CAEvE,YAAqBC,EAAe,CAClC,MAAMA,CAAG,EADU,SAAAA,CAErB,CAHkB,KAAO,qCAI3B,CAEO,MAAMgB,UAAgCjB,CAAgB,CAE3D,YAAqBC,EAAe,CAClC,MAAMA,CAAG,EADU,SAAAA,CAErB,CAHkB,KAAO,yBAI3B,CAEO,MAAMiB,UAA4ClB,CAAgB,CAEvE,YAAqBC,EAAe,CAClC,MAAMA,CAAG,EADU,SAAAA,CAErB,CAHkB,KAAO,qCAI3B,CAEO,MAAMkB,UAAiCnB,CAAgB,CAE5D,YAAqBC,EAAe,CAClC,MAAMA,CAAG,EADU,SAAAA,CAErB,CAHkB,KAAO,0BAI3B",
6
+ "names": ["GeneralDmkError", "err", "DeviceAlreadyConnectedError", "DeviceNotRecognizedError", "NoAccessibleDeviceError", "OpeningConnectionError", "UnknownDeviceError", "TransportNotSupportedError", "SendApduConcurrencyError", "SendApduTimeoutError", "SendApduEmptyResponseError", "DisconnectError", "ReconnectionFailedError", "DeviceNotInitializedError", "NoTransportsProvidedError", "TransportAlreadyExistsError", "DeviceDisconnectedWhileSendingError", "AlreadySendingApduError", "DeviceDisconnectedBeforeSendingApdu", "NoTransportProvidedError"]
7
7
  }
@@ -0,0 +1,2 @@
1
+ const s=["BOLOS","OLOS","OLOS\0"],S=O=>s.includes(O);export{S as isDashboardName};
2
+ //# sourceMappingURL=AppName.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../src/api/utils/AppName.ts"],
4
+ "sourcesContent": ["const DASHBOARD_NAMES = [\"BOLOS\", \"OLOS\", \"OLOS\\u0000\"];\n\nexport const isDashboardName = (name: string) => DASHBOARD_NAMES.includes(name);\n"],
5
+ "mappings": "AAAA,MAAMA,EAAkB,CAAC,QAAS,OAAQ,QAAY,EAEzCC,EAAmBC,GAAiBF,EAAgB,SAASE,CAAI",
6
+ "names": ["DASHBOARD_NAMES", "isDashboardName", "name"]
7
+ }
@@ -0,0 +1,2 @@
1
+ import{isDashboardName as t}from"./AppName";describe("AppName",()=>{describe("isDashboardName",()=>{it("should return true if the value is BOLOS",()=>{const e=t("BOLOS");expect(e).toBeTruthy()}),it("should return true if the value is OLOS",()=>{const e=t("OLOS\0");expect(e).toBeTruthy()}),it("should return false if the value is Bitcoin",()=>{const e=t("Bitcoin");expect(e).toBeFalsy()})})});
2
+ //# sourceMappingURL=AppName.test.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../src/api/utils/AppName.test.ts"],
4
+ "sourcesContent": ["import { isDashboardName } from \"./AppName\";\n\ndescribe(\"AppName\", () => {\n describe(\"isDashboardName\", () => {\n it(\"should return true if the value is BOLOS\", () => {\n // GIVEN\n const value = \"BOLOS\";\n\n // WHEN\n const result = isDashboardName(value);\n\n // THEN\n expect(result).toBeTruthy();\n });\n\n it(\"should return true if the value is OLOS\", () => {\n // GIVEN\n const value = \"OLOS\\0\";\n\n // WHEN\n const result = isDashboardName(value);\n\n // THEN\n expect(result).toBeTruthy();\n });\n\n it(\"should return false if the value is Bitcoin\", () => {\n // GIVEN\n const value = \"Bitcoin\";\n\n // WHEN\n const result = isDashboardName(value);\n\n // THEN\n expect(result).toBeFalsy();\n });\n });\n});\n"],
5
+ "mappings": "AAAA,OAAS,mBAAAA,MAAuB,YAEhC,SAAS,UAAW,IAAM,CACxB,SAAS,kBAAmB,IAAM,CAChC,GAAG,2CAA4C,IAAM,CAKnD,MAAMC,EAASD,EAHD,OAGsB,EAGpC,OAAOC,CAAM,EAAE,WAAW,CAC5B,CAAC,EAED,GAAG,0CAA2C,IAAM,CAKlD,MAAMA,EAASD,EAHD,QAGsB,EAGpC,OAAOC,CAAM,EAAE,WAAW,CAC5B,CAAC,EAED,GAAG,8CAA+C,IAAM,CAKtD,MAAMA,EAASD,EAHD,SAGsB,EAGpC,OAAOC,CAAM,EAAE,UAAU,CAC3B,CAAC,CACH,CAAC,CACH,CAAC",
6
+ "names": ["isDashboardName", "result"]
7
+ }
package/lib/esm/src/di.js CHANGED
@@ -1,2 +1,2 @@
1
- import{Container as i}from"inversify";import{commandModuleFactory as a}from"./api/command/di/commandModule";import{deviceActionModuleFactory as p}from"./api/device-action/di/deviceActionModule";import{configModuleFactory as c}from"./internal/config/di/configModule";import{deviceModelModuleFactory as n}from"./internal/device-model/di/deviceModelModule";import{deviceSessionModuleFactory as l}from"./internal/device-session/di/deviceSessionModule";import{discoveryModuleFactory as f}from"./internal/discovery/di/discoveryModule";import{loggerModuleFactory as d}from"./internal/logger-publisher/di/loggerModule";import{managerApiModuleFactory as y}from"./internal/manager-api/di/managerApiModule";import{DEFAULT_MANAGER_API_BASE_URL as F,DEFAULT_MOCK_SERVER_BASE_URL as M}from"./internal/manager-api/model/Const";import{secureChannelModuleFactory as s}from"./internal/secure-channel/di/secureChannelModule";import{DEFAULT_WEB_SOCKET_BASE_URL as g}from"./internal/secure-channel/model/Const";import{sendModuleFactory as A}from"./internal/send/di/sendModule";import{transportModuleFactory as _}from"./internal/transport/di/transportModule";const x=({stub:o=!1,transports:t=[],loggers:m=[],config:r={mockUrl:M,managerApiUrl:F,webSocketUrl:g}})=>{const e=new i;return e.load(c({stub:o}),n({stub:o}),_({stub:o,transports:t,config:r}),y({stub:o,config:r}),s({stub:o,config:r}),f({stub:o}),d({subscribers:m}),l({stub:o}),A({stub:o}),a({stub:o}),p({stub:o})),e};export{x as makeContainer};
1
+ import{Container as m}from"inversify";import{commandModuleFactory as a}from"./api/command/di/commandModule";import{deviceActionModuleFactory as p}from"./api/device-action/di/deviceActionModule";import{configModuleFactory as c}from"./internal/config/di/configModule";import{deviceModelModuleFactory as n}from"./internal/device-model/di/deviceModelModule";import{deviceSessionModuleFactory as l}from"./internal/device-session/di/deviceSessionModule";import{discoveryModuleFactory as f}from"./internal/discovery/di/discoveryModule";import{loggerModuleFactory as d}from"./internal/logger-publisher/di/loggerModule";import{managerApiModuleFactory as y}from"./internal/manager-api/di/managerApiModule";import{DEFAULT_FIRMWARE_DISTRIBUTION_SALT as F,DEFAULT_MANAGER_API_BASE_URL as M,DEFAULT_MOCK_SERVER_BASE_URL as A,DEFAULT_PROVIDER as _}from"./internal/manager-api/model/Const";import{secureChannelModuleFactory as E}from"./internal/secure-channel/di/secureChannelModule";import{DEFAULT_WEB_SOCKET_BASE_URL as S}from"./internal/secure-channel/model/Const";import{sendModuleFactory as s}from"./internal/send/di/sendModule";import{transportModuleFactory as g}from"./internal/transport/di/transportModule";const x=({stub:o=!1,transports:t=[],loggers:i=[],config:r={mockUrl:A,managerApiUrl:M,webSocketUrl:S,provider:_,firmwareDistributionSalt:F}})=>{const e=new m;return e.loadSync(c({stub:o}),n({stub:o}),g({stub:o,transports:t,config:r}),y({stub:o,config:r}),E({stub:o,config:r}),f({stub:o}),d({subscribers:i}),l({stub:o}),s({stub:o}),a({stub:o}),p({stub:o})),e};export{x as makeContainer};
2
2
  //# sourceMappingURL=di.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/di.ts"],
4
- "sourcesContent": ["import { Container } from \"inversify\";\n\n// Uncomment this line to enable the logger middleware\n// import { makeLoggerMiddleware } from \"inversify-logger-middleware\";\nimport { commandModuleFactory } from \"@api/command/di/commandModule\";\nimport { deviceActionModuleFactory } from \"@api/device-action/di/deviceActionModule\";\nimport { type DmkConfig } from \"@api/DmkConfig\";\nimport { type LoggerSubscriberService } from \"@api/logger-subscriber/service/LoggerSubscriberService\";\nimport { type TransportFactory } from \"@api/transport/model/Transport\";\nimport { configModuleFactory } from \"@internal/config/di/configModule\";\nimport { deviceModelModuleFactory } from \"@internal/device-model/di/deviceModelModule\";\nimport { deviceSessionModuleFactory } from \"@internal/device-session/di/deviceSessionModule\";\nimport { discoveryModuleFactory } from \"@internal/discovery/di/discoveryModule\";\nimport { loggerModuleFactory } from \"@internal/logger-publisher/di/loggerModule\";\nimport { managerApiModuleFactory } from \"@internal/manager-api/di/managerApiModule\";\nimport {\n DEFAULT_MANAGER_API_BASE_URL,\n DEFAULT_MOCK_SERVER_BASE_URL,\n} from \"@internal/manager-api/model/Const\";\nimport { secureChannelModuleFactory } from \"@internal/secure-channel/di/secureChannelModule\";\nimport { DEFAULT_WEB_SOCKET_BASE_URL } from \"@internal/secure-channel/model/Const\";\nimport { sendModuleFactory } from \"@internal/send/di/sendModule\";\nimport { transportModuleFactory } from \"@internal/transport//di/transportModule\";\n\n// Uncomment this line to enable the logger middleware\n// const logger = makeLoggerMiddleware();\n\nexport type MakeContainerProps = {\n stub: boolean;\n transports: TransportFactory[];\n loggers: LoggerSubscriberService[];\n config: DmkConfig;\n};\n\nexport const makeContainer = ({\n stub = false,\n transports = [],\n loggers = [],\n config = {\n mockUrl: DEFAULT_MOCK_SERVER_BASE_URL,\n managerApiUrl: DEFAULT_MANAGER_API_BASE_URL,\n webSocketUrl: DEFAULT_WEB_SOCKET_BASE_URL,\n },\n}: Partial<MakeContainerProps>) => {\n const container = new Container();\n\n // Uncomment this line to enable the logger middleware\n // container.applyMiddleware(logger);\n\n container.load(\n configModuleFactory({ stub }),\n deviceModelModuleFactory({ stub }),\n transportModuleFactory({ stub, transports, config }),\n managerApiModuleFactory({ stub, config }),\n secureChannelModuleFactory({ stub, config }),\n discoveryModuleFactory({ stub }),\n loggerModuleFactory({ subscribers: loggers }),\n deviceSessionModuleFactory({ stub }),\n sendModuleFactory({ stub }),\n commandModuleFactory({ stub }),\n deviceActionModuleFactory({ stub }),\n // modules go here\n );\n\n return container;\n};\n"],
5
-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ory", "deviceSessionModuleFactory", "discoveryModuleFactory", "loggerModuleFactory", "managerApiModuleFactory", "DEFAULT_MANAGER_API_BASE_URL", "DEFAULT_MOCK_SERVER_BASE_URL", "secureChannelModuleFactory", "DEFAULT_WEB_SOCKET_BASE_URL", "sendModuleFactory", "transportModuleFactory", "makeContainer", "stub", "transports", "loggers", "config", "container"]
4
+ "sourcesContent": ["import { Container } from \"inversify\";\n\nimport { commandModuleFactory } from \"@api/command/di/commandModule\";\nimport { deviceActionModuleFactory } from \"@api/device-action/di/deviceActionModule\";\nimport { type DmkConfig } from \"@api/DmkConfig\";\nimport { type LoggerSubscriberService } from \"@api/logger-subscriber/service/LoggerSubscriberService\";\nimport { type TransportFactory } from \"@api/transport/model/Transport\";\nimport { configModuleFactory } from \"@internal/config/di/configModule\";\nimport { deviceModelModuleFactory } from \"@internal/device-model/di/deviceModelModule\";\nimport { deviceSessionModuleFactory } from \"@internal/device-session/di/deviceSessionModule\";\nimport { discoveryModuleFactory } from \"@internal/discovery/di/discoveryModule\";\nimport { loggerModuleFactory } from \"@internal/logger-publisher/di/loggerModule\";\nimport { managerApiModuleFactory } from \"@internal/manager-api/di/managerApiModule\";\nimport {\n DEFAULT_FIRMWARE_DISTRIBUTION_SALT,\n DEFAULT_MANAGER_API_BASE_URL,\n DEFAULT_MOCK_SERVER_BASE_URL,\n DEFAULT_PROVIDER,\n} from \"@internal/manager-api/model/Const\";\nimport { secureChannelModuleFactory } from \"@internal/secure-channel/di/secureChannelModule\";\nimport { DEFAULT_WEB_SOCKET_BASE_URL } from \"@internal/secure-channel/model/Const\";\nimport { sendModuleFactory } from \"@internal/send/di/sendModule\";\nimport { transportModuleFactory } from \"@internal/transport//di/transportModule\";\n\nexport type MakeContainerProps = {\n stub: boolean;\n transports: TransportFactory[];\n loggers: LoggerSubscriberService[];\n config: DmkConfig;\n};\n\nexport const makeContainer = ({\n stub = false,\n transports = [],\n loggers = [],\n config = {\n mockUrl: DEFAULT_MOCK_SERVER_BASE_URL,\n managerApiUrl: DEFAULT_MANAGER_API_BASE_URL,\n webSocketUrl: DEFAULT_WEB_SOCKET_BASE_URL,\n provider: DEFAULT_PROVIDER,\n firmwareDistributionSalt: DEFAULT_FIRMWARE_DISTRIBUTION_SALT,\n },\n}: Partial<MakeContainerProps>) => {\n const container = new Container();\n\n container.loadSync(\n configModuleFactory({ stub }),\n deviceModelModuleFactory({ stub }),\n transportModuleFactory({ stub, transports, config }),\n managerApiModuleFactory({ stub, config }),\n secureChannelModuleFactory({ stub, config }),\n discoveryModuleFactory({ stub }),\n loggerModuleFactory({ subscribers: loggers }),\n deviceSessionModuleFactory({ stub }),\n sendModuleFactory({ stub }),\n commandModuleFactory({ stub }),\n deviceActionModuleFactory({ stub }),\n // modules go here\n );\n\n return container;\n};\n"],
5
+ "mappings": "AAAA,OAAS,aAAAA,MAAiB,YAE1B,OAAS,wBAAAC,MAA4B,gCACrC,OAAS,6BAAAC,MAAiC,2CAI1C,OAAS,uBAAAC,MAA2B,mCACpC,OAAS,4BAAAC,MAAgC,8CACzC,OAAS,8BAAAC,MAAkC,kDAC3C,OAAS,0BAAAC,MAA8B,yCACvC,OAAS,uBAAAC,MAA2B,6CACpC,OAAS,2BAAAC,MAA+B,4CACxC,OACE,sCAAAC,EACA,gCAAAC,EACA,gCAAAC,EACA,oBAAAC,MACK,oCACP,OAAS,8BAAAC,MAAkC,kDAC3C,OAAS,+BAAAC,MAAmC,uCAC5C,OAAS,qBAAAC,MAAyB,+BAClC,OAAS,0BAAAC,MAA8B,0CAShC,MAAMC,EAAgB,CAAC,CAC5B,KAAAC,EAAO,GACP,WAAAC,EAAa,CAAC,EACd,QAAAC,EAAU,CAAC,EACX,OAAAC,EAAS,CACP,QAASV,EACT,cAAeD,EACf,aAAcI,EACd,SAAUF,EACV,yBAA0BH,CAC5B,CACF,IAAmC,CACjC,MAAMa,EAAY,IAAItB,EAEtB,OAAAsB,EAAU,SACRnB,EAAoB,CAAE,KAAAe,CAAK,CAAC,EAC5Bd,EAAyB,CAAE,KAAAc,CAAK,CAAC,EACjCF,EAAuB,CAAE,KAAAE,EAAM,WAAAC,EAAY,OAAAE,CAAO,CAAC,EACnDb,EAAwB,CAAE,KAAAU,EAAM,OAAAG,CAAO,CAAC,EACxCR,EAA2B,CAAE,KAAAK,EAAM,OAAAG,CAAO,CAAC,EAC3Cf,EAAuB,CAAE,KAAAY,CAAK,CAAC,EAC/BX,EAAoB,CAAE,YAAaa,CAAQ,CAAC,EAC5Cf,EAA2B,CAAE,KAAAa,CAAK,CAAC,EACnCH,EAAkB,CAAE,KAAAG,CAAK,CAAC,EAC1BjB,EAAqB,CAAE,KAAAiB,CAAK,CAAC,EAC7BhB,EAA0B,CAAE,KAAAgB,CAAK,CAAC,CAEpC,EAEOI,CACT",
6
+ "names": ["Container", "commandModuleFactory", "deviceActionModuleFactory", "configModuleFactory", "deviceModelModuleFactory", "deviceSessionModuleFactory", "discoveryModuleFactory", "loggerModuleFactory", "managerApiModuleFactory", "DEFAULT_FIRMWARE_DISTRIBUTION_SALT", "DEFAULT_MANAGER_API_BASE_URL", "DEFAULT_MOCK_SERVER_BASE_URL", "DEFAULT_PROVIDER", "secureChannelModuleFactory", "DEFAULT_WEB_SOCKET_BASE_URL", "sendModuleFactory", "transportModuleFactory", "makeContainer", "stub", "transports", "loggers", "config", "container"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{ContainerModule as a}from"inversify";import{FileLocalConfigDataSource as i}from"../../config/data/LocalConfigDataSource";import{StubLocalConfigDataSource as f}from"../../config/data/LocalConfigDataSource.stub";import{RestRemoteConfigDataSource as m}from"../../config/data/RemoteConfigDataSource";import{StubRemoteConfigDataSource as c}from"../../config/data/RemoteConfigDataSource.stub";import{DefaultConfigService as n}from"../../config/service/DefaultConfigService";import{GetDmkVersionUseCase as u}from"../../config/use-case/GetDmkVersionUseCase";import{configTypes as o}from"./configTypes";const L=({stub:r})=>new a((t,p,s,e)=>{t(o.LocalConfigDataSource).to(i),t(o.RemoteConfigDataSource).to(m),t(o.GetDmkVersionUseCase).to(u),t(o.ConfigService).to(n),r&&(e(o.LocalConfigDataSource).to(f),e(o.RemoteConfigDataSource).to(c))});export{L as configModuleFactory};
1
+ import{ContainerModule as a}from"inversify";import{FileLocalConfigDataSource as i}from"../../config/data/LocalConfigDataSource";import{StubLocalConfigDataSource as f}from"../../config/data/LocalConfigDataSource.stub";import{RestRemoteConfigDataSource as m}from"../../config/data/RemoteConfigDataSource";import{StubRemoteConfigDataSource as c}from"../../config/data/RemoteConfigDataSource.stub";import{DefaultConfigService as n}from"../../config/service/DefaultConfigService";import{GetDmkVersionUseCase as u}from"../../config/use-case/GetDmkVersionUseCase";import{configTypes as o}from"./configTypes";const y=({stub:r})=>new a(({bind:t,rebindSync:e})=>{t(o.LocalConfigDataSource).to(i),t(o.RemoteConfigDataSource).to(m),t(o.GetDmkVersionUseCase).to(u),t(o.ConfigService).to(n),r&&(e(o.LocalConfigDataSource).to(f),e(o.RemoteConfigDataSource).to(c))});export{y as configModuleFactory};
2
2
  //# sourceMappingURL=configModule.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/internal/config/di/configModule.ts"],
4
- "sourcesContent": ["import { ContainerModule } from \"inversify\";\n\nimport { FileLocalConfigDataSource } from \"@internal/config/data/LocalConfigDataSource\";\nimport { StubLocalConfigDataSource } from \"@internal/config/data/LocalConfigDataSource.stub\";\nimport { RestRemoteConfigDataSource } from \"@internal/config/data/RemoteConfigDataSource\";\nimport { StubRemoteConfigDataSource } from \"@internal/config/data/RemoteConfigDataSource.stub\";\nimport { DefaultConfigService } from \"@internal/config/service/DefaultConfigService\";\nimport { GetDmkVersionUseCase } from \"@internal/config/use-case/GetDmkVersionUseCase\";\n\nimport { configTypes } from \"./configTypes\";\n\n// This module is used to configure the dependency injection container\n// This is where we will bind our interfaces to their implementations (or mocks...)\ntype FactoryProps = {\n stub: boolean;\n};\n\nexport const configModuleFactory = ({ stub }: FactoryProps) =>\n new ContainerModule((bind, _unbind, _isBound, rebind) => {\n bind(configTypes.LocalConfigDataSource).to(FileLocalConfigDataSource);\n bind(configTypes.RemoteConfigDataSource).to(RestRemoteConfigDataSource);\n bind(configTypes.GetDmkVersionUseCase).to(GetDmkVersionUseCase);\n bind(configTypes.ConfigService).to(DefaultConfigService);\n\n if (stub) {\n // We can rebind our interfaces to their mock implementations\n rebind(configTypes.LocalConfigDataSource).to(StubLocalConfigDataSource);\n rebind(configTypes.RemoteConfigDataSource).to(StubRemoteConfigDataSource);\n }\n });\n"],
5
- "mappings": "AAAA,OAAS,mBAAAA,MAAuB,YAEhC,OAAS,6BAAAC,MAAiC,8CAC1C,OAAS,6BAAAC,MAAiC,mDAC1C,OAAS,8BAAAC,MAAkC,+CAC3C,OAAS,8BAAAC,MAAkC,oDAC3C,OAAS,wBAAAC,MAA4B,gDACrC,OAAS,wBAAAC,MAA4B,iDAErC,OAAS,eAAAC,MAAmB,gBAQrB,MAAMC,EAAsB,CAAC,CAAE,KAAAC,CAAK,IACzC,IAAIT,EAAgB,CAACU,EAAMC,EAASC,EAAUC,IAAW,CACvDH,EAAKH,EAAY,qBAAqB,EAAE,GAAGN,CAAyB,EACpES,EAAKH,EAAY,sBAAsB,EAAE,GAAGJ,CAA0B,EACtEO,EAAKH,EAAY,oBAAoB,EAAE,GAAGD,CAAoB,EAC9DI,EAAKH,EAAY,aAAa,EAAE,GAAGF,CAAoB,EAEnDI,IAEFI,EAAON,EAAY,qBAAqB,EAAE,GAAGL,CAAyB,EACtEW,EAAON,EAAY,sBAAsB,EAAE,GAAGH,CAA0B,EAE5E,CAAC",
6
- "names": ["ContainerModule", "FileLocalConfigDataSource", "StubLocalConfigDataSource", "RestRemoteConfigDataSource", "StubRemoteConfigDataSource", "DefaultConfigService", "GetDmkVersionUseCase", "configTypes", "configModuleFactory", "stub", "bind", "_unbind", "_isBound", "rebind"]
4
+ "sourcesContent": ["import { ContainerModule } from \"inversify\";\n\nimport { FileLocalConfigDataSource } from \"@internal/config/data/LocalConfigDataSource\";\nimport { StubLocalConfigDataSource } from \"@internal/config/data/LocalConfigDataSource.stub\";\nimport { RestRemoteConfigDataSource } from \"@internal/config/data/RemoteConfigDataSource\";\nimport { StubRemoteConfigDataSource } from \"@internal/config/data/RemoteConfigDataSource.stub\";\nimport { DefaultConfigService } from \"@internal/config/service/DefaultConfigService\";\nimport { GetDmkVersionUseCase } from \"@internal/config/use-case/GetDmkVersionUseCase\";\n\nimport { configTypes } from \"./configTypes\";\n\n// This module is used to configure the dependency injection container\n// This is where we will bind our interfaces to their implementations (or mocks...)\ntype FactoryProps = {\n stub: boolean;\n};\n\nexport const configModuleFactory = ({ stub }: FactoryProps) =>\n new ContainerModule(({ bind, rebindSync }) => {\n bind(configTypes.LocalConfigDataSource).to(FileLocalConfigDataSource);\n bind(configTypes.RemoteConfigDataSource).to(RestRemoteConfigDataSource);\n bind(configTypes.GetDmkVersionUseCase).to(GetDmkVersionUseCase);\n bind(configTypes.ConfigService).to(DefaultConfigService);\n\n if (stub) {\n // We can rebind our interfaces to their mock implementations\n rebindSync(configTypes.LocalConfigDataSource).to(\n StubLocalConfigDataSource,\n );\n rebindSync(configTypes.RemoteConfigDataSource).to(\n StubRemoteConfigDataSource,\n );\n }\n });\n"],
5
+ "mappings": "AAAA,OAAS,mBAAAA,MAAuB,YAEhC,OAAS,6BAAAC,MAAiC,8CAC1C,OAAS,6BAAAC,MAAiC,mDAC1C,OAAS,8BAAAC,MAAkC,+CAC3C,OAAS,8BAAAC,MAAkC,oDAC3C,OAAS,wBAAAC,MAA4B,gDACrC,OAAS,wBAAAC,MAA4B,iDAErC,OAAS,eAAAC,MAAmB,gBAQrB,MAAMC,EAAsB,CAAC,CAAE,KAAAC,CAAK,IACzC,IAAIT,EAAgB,CAAC,CAAE,KAAAU,EAAM,WAAAC,CAAW,IAAM,CAC5CD,EAAKH,EAAY,qBAAqB,EAAE,GAAGN,CAAyB,EACpES,EAAKH,EAAY,sBAAsB,EAAE,GAAGJ,CAA0B,EACtEO,EAAKH,EAAY,oBAAoB,EAAE,GAAGD,CAAoB,EAC9DI,EAAKH,EAAY,aAAa,EAAE,GAAGF,CAAoB,EAEnDI,IAEFE,EAAWJ,EAAY,qBAAqB,EAAE,GAC5CL,CACF,EACAS,EAAWJ,EAAY,sBAAsB,EAAE,GAC7CH,CACF,EAEJ,CAAC",
6
+ "names": ["ContainerModule", "FileLocalConfigDataSource", "StubLocalConfigDataSource", "RestRemoteConfigDataSource", "StubRemoteConfigDataSource", "DefaultConfigService", "GetDmkVersionUseCase", "configTypes", "configModuleFactory", "stub", "bind", "rebindSync"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{Container as a}from"inversify";import{FileLocalConfigDataSource as i}from"../../config/data/LocalConfigDataSource";import{StubLocalConfigDataSource as u}from"../../config/data/LocalConfigDataSource.stub";import{RestRemoteConfigDataSource as f}from"../../config/data/RemoteConfigDataSource";import{StubRemoteConfigDataSource as l}from"../../config/data/RemoteConfigDataSource.stub";import{configModuleFactory as n}from"./configModule";import{configTypes as t}from"./configTypes";describe("configModuleFactory",()=>{describe("Default",()=>{let e,o;beforeEach(()=>{o=n({stub:!1}),e=new a,e.load(o)}),it("should return the config module",()=>{expect(o).toBeDefined()}),it("should return none mocked data sources",()=>{const c=e.get(t.LocalConfigDataSource),r=e.get(t.RemoteConfigDataSource);expect(c).toBeInstanceOf(i),expect(r).toBeInstanceOf(f)})}),describe("Mocked",()=>{let e,o;beforeEach(()=>{o=n({stub:!0}),e=new a,e.load(o)}),it("should return the config module",()=>{expect(o).toBeDefined()}),it("should return mocked data sources",()=>{const c=e.get(t.LocalConfigDataSource),r=e.get(t.RemoteConfigDataSource);expect(c).toBeInstanceOf(u),expect(r).toBeInstanceOf(l)})})});
1
+ import{Container as a}from"inversify";import{FileLocalConfigDataSource as i}from"../../config/data/LocalConfigDataSource";import{StubLocalConfigDataSource as u}from"../../config/data/LocalConfigDataSource.stub";import{RestRemoteConfigDataSource as f}from"../../config/data/RemoteConfigDataSource";import{StubRemoteConfigDataSource as l}from"../../config/data/RemoteConfigDataSource.stub";import{configModuleFactory as n}from"./configModule";import{configTypes as t}from"./configTypes";describe("configModuleFactory",()=>{describe("Default",()=>{let e,o;beforeEach(()=>{o=n({stub:!1}),e=new a,e.loadSync(o)}),it("should return the config module",()=>{expect(o).toBeDefined()}),it("should return none mocked data sources",()=>{const c=e.get(t.LocalConfigDataSource),r=e.get(t.RemoteConfigDataSource);expect(c).toBeInstanceOf(i),expect(r).toBeInstanceOf(f)})}),describe("Mocked",()=>{let e,o;beforeEach(()=>{o=n({stub:!0}),e=new a,e.loadSync(o)}),it("should return the config module",()=>{expect(o).toBeDefined()}),it("should return mocked data sources",()=>{const c=e.get(t.LocalConfigDataSource),r=e.get(t.RemoteConfigDataSource);expect(c).toBeInstanceOf(u),expect(r).toBeInstanceOf(l)})})});
2
2
  //# sourceMappingURL=configModule.test.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/internal/config/di/configModule.test.ts"],
4
- "sourcesContent": ["import { Container } from \"inversify\";\n\nimport { FileLocalConfigDataSource } from \"@internal/config/data/LocalConfigDataSource\";\nimport { StubLocalConfigDataSource } from \"@internal/config/data/LocalConfigDataSource.stub\";\nimport { RestRemoteConfigDataSource } from \"@internal/config/data/RemoteConfigDataSource\";\nimport { StubRemoteConfigDataSource } from \"@internal/config/data/RemoteConfigDataSource.stub\";\n\nimport { configModuleFactory } from \"./configModule\";\nimport { configTypes } from \"./configTypes\";\n\ndescribe(\"configModuleFactory\", () => {\n describe(\"Default\", () => {\n let container: Container;\n let mod: ReturnType<typeof configModuleFactory>;\n beforeEach(() => {\n mod = configModuleFactory({ stub: false });\n container = new Container();\n container.load(mod);\n });\n\n it(\"should return the config module\", () => {\n expect(mod).toBeDefined();\n });\n\n it(\"should return none mocked data sources\", () => {\n const localDataSource = container.get(configTypes.LocalConfigDataSource);\n const remoteDataSource = container.get(\n configTypes.RemoteConfigDataSource,\n );\n expect(localDataSource).toBeInstanceOf(FileLocalConfigDataSource);\n expect(remoteDataSource).toBeInstanceOf(RestRemoteConfigDataSource);\n });\n });\n\n describe(\"Mocked\", () => {\n let container: Container;\n let mod: ReturnType<typeof configModuleFactory>;\n beforeEach(() => {\n mod = configModuleFactory({ stub: true });\n container = new Container();\n container.load(mod);\n });\n\n it(\"should return the config module\", () => {\n expect(mod).toBeDefined();\n });\n\n it(\"should return mocked data sources\", () => {\n const localDataSource = container.get(configTypes.LocalConfigDataSource);\n const remoteDataSource = container.get(\n configTypes.RemoteConfigDataSource,\n );\n expect(localDataSource).toBeInstanceOf(StubLocalConfigDataSource);\n expect(remoteDataSource).toBeInstanceOf(StubRemoteConfigDataSource);\n });\n });\n});\n"],
5
- "mappings": "AAAA,OAAS,aAAAA,MAAiB,YAE1B,OAAS,6BAAAC,MAAiC,8CAC1C,OAAS,6BAAAC,MAAiC,mDAC1C,OAAS,8BAAAC,MAAkC,+CAC3C,OAAS,8BAAAC,MAAkC,oDAE3C,OAAS,uBAAAC,MAA2B,iBACpC,OAAS,eAAAC,MAAmB,gBAE5B,SAAS,sBAAuB,IAAM,CACpC,SAAS,UAAW,IAAM,CACxB,IAAIC,EACAC,EACJ,WAAW,IAAM,CACfA,EAAMH,EAAoB,CAAE,KAAM,EAAM,CAAC,EACzCE,EAAY,IAAIP,EAChBO,EAAU,KAAKC,CAAG,CACpB,CAAC,EAED,GAAG,kCAAmC,IAAM,CAC1C,OAAOA,CAAG,EAAE,YAAY,CAC1B,CAAC,EAED,GAAG,yCAA0C,IAAM,CACjD,MAAMC,EAAkBF,EAAU,IAAID,EAAY,qBAAqB,EACjEI,EAAmBH,EAAU,IACjCD,EAAY,sBACd,EACA,OAAOG,CAAe,EAAE,eAAeR,CAAyB,EAChE,OAAOS,CAAgB,EAAE,eAAeP,CAA0B,CACpE,CAAC,CACH,CAAC,EAED,SAAS,SAAU,IAAM,CACvB,IAAII,EACAC,EACJ,WAAW,IAAM,CACfA,EAAMH,EAAoB,CAAE,KAAM,EAAK,CAAC,EACxCE,EAAY,IAAIP,EAChBO,EAAU,KAAKC,CAAG,CACpB,CAAC,EAED,GAAG,kCAAmC,IAAM,CAC1C,OAAOA,CAAG,EAAE,YAAY,CAC1B,CAAC,EAED,GAAG,oCAAqC,IAAM,CAC5C,MAAMC,EAAkBF,EAAU,IAAID,EAAY,qBAAqB,EACjEI,EAAmBH,EAAU,IACjCD,EAAY,sBACd,EACA,OAAOG,CAAe,EAAE,eAAeP,CAAyB,EAChE,OAAOQ,CAAgB,EAAE,eAAeN,CAA0B,CACpE,CAAC,CACH,CAAC,CACH,CAAC",
4
+ "sourcesContent": ["import { Container } from \"inversify\";\n\nimport { FileLocalConfigDataSource } from \"@internal/config/data/LocalConfigDataSource\";\nimport { StubLocalConfigDataSource } from \"@internal/config/data/LocalConfigDataSource.stub\";\nimport { RestRemoteConfigDataSource } from \"@internal/config/data/RemoteConfigDataSource\";\nimport { StubRemoteConfigDataSource } from \"@internal/config/data/RemoteConfigDataSource.stub\";\n\nimport { configModuleFactory } from \"./configModule\";\nimport { configTypes } from \"./configTypes\";\n\ndescribe(\"configModuleFactory\", () => {\n describe(\"Default\", () => {\n let container: Container;\n let mod: ReturnType<typeof configModuleFactory>;\n beforeEach(() => {\n mod = configModuleFactory({ stub: false });\n container = new Container();\n container.loadSync(mod);\n });\n\n it(\"should return the config module\", () => {\n expect(mod).toBeDefined();\n });\n\n it(\"should return none mocked data sources\", () => {\n const localDataSource = container.get(configTypes.LocalConfigDataSource);\n const remoteDataSource = container.get(\n configTypes.RemoteConfigDataSource,\n );\n expect(localDataSource).toBeInstanceOf(FileLocalConfigDataSource);\n expect(remoteDataSource).toBeInstanceOf(RestRemoteConfigDataSource);\n });\n });\n\n describe(\"Mocked\", () => {\n let container: Container;\n let mod: ReturnType<typeof configModuleFactory>;\n beforeEach(() => {\n mod = configModuleFactory({ stub: true });\n container = new Container();\n container.loadSync(mod);\n });\n\n it(\"should return the config module\", () => {\n expect(mod).toBeDefined();\n });\n\n it(\"should return mocked data sources\", () => {\n const localDataSource = container.get(configTypes.LocalConfigDataSource);\n const remoteDataSource = container.get(\n configTypes.RemoteConfigDataSource,\n );\n expect(localDataSource).toBeInstanceOf(StubLocalConfigDataSource);\n expect(remoteDataSource).toBeInstanceOf(StubRemoteConfigDataSource);\n });\n });\n});\n"],
5
+ "mappings": "AAAA,OAAS,aAAAA,MAAiB,YAE1B,OAAS,6BAAAC,MAAiC,8CAC1C,OAAS,6BAAAC,MAAiC,mDAC1C,OAAS,8BAAAC,MAAkC,+CAC3C,OAAS,8BAAAC,MAAkC,oDAE3C,OAAS,uBAAAC,MAA2B,iBACpC,OAAS,eAAAC,MAAmB,gBAE5B,SAAS,sBAAuB,IAAM,CACpC,SAAS,UAAW,IAAM,CACxB,IAAIC,EACAC,EACJ,WAAW,IAAM,CACfA,EAAMH,EAAoB,CAAE,KAAM,EAAM,CAAC,EACzCE,EAAY,IAAIP,EAChBO,EAAU,SAASC,CAAG,CACxB,CAAC,EAED,GAAG,kCAAmC,IAAM,CAC1C,OAAOA,CAAG,EAAE,YAAY,CAC1B,CAAC,EAED,GAAG,yCAA0C,IAAM,CACjD,MAAMC,EAAkBF,EAAU,IAAID,EAAY,qBAAqB,EACjEI,EAAmBH,EAAU,IACjCD,EAAY,sBACd,EACA,OAAOG,CAAe,EAAE,eAAeR,CAAyB,EAChE,OAAOS,CAAgB,EAAE,eAAeP,CAA0B,CACpE,CAAC,CACH,CAAC,EAED,SAAS,SAAU,IAAM,CACvB,IAAII,EACAC,EACJ,WAAW,IAAM,CACfA,EAAMH,EAAoB,CAAE,KAAM,EAAK,CAAC,EACxCE,EAAY,IAAIP,EAChBO,EAAU,SAASC,CAAG,CACxB,CAAC,EAED,GAAG,kCAAmC,IAAM,CAC1C,OAAOA,CAAG,EAAE,YAAY,CAC1B,CAAC,EAED,GAAG,oCAAqC,IAAM,CAC5C,MAAMC,EAAkBF,EAAU,IAAID,EAAY,qBAAqB,EACjEI,EAAmBH,EAAU,IACjCD,EAAY,sBACd,EACA,OAAOG,CAAe,EAAE,eAAeP,CAAyB,EAChE,OAAOQ,CAAgB,EAAE,eAAeN,CAA0B,CACpE,CAAC,CACH,CAAC,CACH,CAAC",
6
6
  "names": ["Container", "FileLocalConfigDataSource", "StubLocalConfigDataSource", "RestRemoteConfigDataSource", "StubRemoteConfigDataSource", "configModuleFactory", "configTypes", "container", "mod", "localDataSource", "remoteDataSource"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{ContainerModule as r}from"inversify";import{StaticDeviceModelDataSource as t}from"../../../api/device-model/data/StaticDeviceModelDataSource";import{deviceModelTypes as i}from"./deviceModelTypes";const u=({stub:o})=>new r((e,c,d,a)=>{e(i.DeviceModelDataSource).to(t)});export{u as deviceModelModuleFactory};
1
+ import{ContainerModule as t}from"inversify";import{StaticDeviceModelDataSource as r}from"../../../api/device-model/data/StaticDeviceModelDataSource";import{deviceModelTypes as c}from"./deviceModelTypes";const p=({stub:o})=>new t(({bind:e})=>{e(c.DeviceModelDataSource).to(r)});export{p as deviceModelModuleFactory};
2
2
  //# sourceMappingURL=deviceModelModule.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/internal/device-model/di/deviceModelModule.ts"],
4
- "sourcesContent": ["import { ContainerModule } from \"inversify\";\n\nimport { StaticDeviceModelDataSource } from \"@api/device-model/data/StaticDeviceModelDataSource\";\n\nimport { deviceModelTypes } from \"./deviceModelTypes\";\n\ntype FactoryProps = {\n stub: boolean;\n};\n\nexport const deviceModelModuleFactory = ({ stub }: FactoryProps) =>\n new ContainerModule((bind, _unbind, _isBound, _rebind) => {\n bind(deviceModelTypes.DeviceModelDataSource).to(\n StaticDeviceModelDataSource,\n );\n\n if (stub) {\n // We can rebind our interfaces to their mock implementations\n // rebind(...).to(....);\n }\n });\n"],
5
- "mappings": "AAAA,OAAS,mBAAAA,MAAuB,YAEhC,OAAS,+BAAAC,MAAmC,qDAE5C,OAAS,oBAAAC,MAAwB,qBAM1B,MAAMC,EAA2B,CAAC,CAAE,KAAAC,CAAK,IAC9C,IAAIJ,EAAgB,CAACK,EAAMC,EAASC,EAAUC,IAAY,CACxDH,EAAKH,EAAiB,qBAAqB,EAAE,GAC3CD,CACF,CAMF,CAAC",
6
- "names": ["ContainerModule", "StaticDeviceModelDataSource", "deviceModelTypes", "deviceModelModuleFactory", "stub", "bind", "_unbind", "_isBound", "_rebind"]
4
+ "sourcesContent": ["import { ContainerModule } from \"inversify\";\n\nimport { StaticDeviceModelDataSource } from \"@api/device-model/data/StaticDeviceModelDataSource\";\n\nimport { deviceModelTypes } from \"./deviceModelTypes\";\n\ntype FactoryProps = {\n stub: boolean;\n};\n\nexport const deviceModelModuleFactory = ({ stub }: FactoryProps) =>\n new ContainerModule(({ bind }) => {\n bind(deviceModelTypes.DeviceModelDataSource).to(\n StaticDeviceModelDataSource,\n );\n\n if (stub) {\n // We can rebind our interfaces to their mock implementations\n // rebind(...).to(....);\n }\n });\n"],
5
+ "mappings": "AAAA,OAAS,mBAAAA,MAAuB,YAEhC,OAAS,+BAAAC,MAAmC,qDAE5C,OAAS,oBAAAC,MAAwB,qBAM1B,MAAMC,EAA2B,CAAC,CAAE,KAAAC,CAAK,IAC9C,IAAIJ,EAAgB,CAAC,CAAE,KAAAK,CAAK,IAAM,CAChCA,EAAKH,EAAiB,qBAAqB,EAAE,GAC3CD,CACF,CAMF,CAAC",
6
+ "names": ["ContainerModule", "StaticDeviceModelDataSource", "deviceModelTypes", "deviceModelModuleFactory", "stub", "bind"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{Container as d}from"inversify";import{StaticDeviceModelDataSource as r}from"../../../api/device-model/data/StaticDeviceModelDataSource";import{deviceModelModuleFactory as c}from"./deviceModelModule";import{deviceModelTypes as i}from"./deviceModelTypes";describe("deviceModelModuleFactory",()=>{let e,o;beforeEach(()=>{o=c({stub:!1}),e=new d,e.load(o)}),it("should return the device module",()=>{expect(o).toBeDefined()}),it("should return none mocked services and data sources",()=>{const t=e.get(i.DeviceModelDataSource);expect(t).toBeInstanceOf(r)})});
1
+ import{Container as c}from"inversify";import{StaticDeviceModelDataSource as d}from"../../../api/device-model/data/StaticDeviceModelDataSource";import{deviceModelModuleFactory as r}from"./deviceModelModule";import{deviceModelTypes as i}from"./deviceModelTypes";describe("deviceModelModuleFactory",()=>{let e,o;beforeEach(()=>{o=r({stub:!1}),e=new c,e.loadSync(o)}),it("should return the device module",()=>{expect(o).toBeDefined()}),it("should return none mocked services and data sources",()=>{const t=e.get(i.DeviceModelDataSource);expect(t).toBeInstanceOf(d)})});
2
2
  //# sourceMappingURL=deviceModelModule.test.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/internal/device-model/di/deviceModelModule.test.ts"],
4
- "sourcesContent": ["import { Container } from \"inversify\";\n\nimport { StaticDeviceModelDataSource } from \"@api/device-model/data/StaticDeviceModelDataSource\";\n\nimport { deviceModelModuleFactory } from \"./deviceModelModule\";\nimport { deviceModelTypes } from \"./deviceModelTypes\";\n\ndescribe(\"deviceModelModuleFactory\", () => {\n let container: Container;\n let mod: ReturnType<typeof deviceModelModuleFactory>;\n beforeEach(() => {\n mod = deviceModelModuleFactory({ stub: false });\n container = new Container();\n container.load(mod);\n });\n\n it(\"should return the device module\", () => {\n expect(mod).toBeDefined();\n });\n\n it(\"should return none mocked services and data sources\", () => {\n const deviceModelDataSource = container.get(\n deviceModelTypes.DeviceModelDataSource,\n );\n expect(deviceModelDataSource).toBeInstanceOf(StaticDeviceModelDataSource);\n });\n});\n"],
5
- "mappings": "AAAA,OAAS,aAAAA,MAAiB,YAE1B,OAAS,+BAAAC,MAAmC,qDAE5C,OAAS,4BAAAC,MAAgC,sBACzC,OAAS,oBAAAC,MAAwB,qBAEjC,SAAS,2BAA4B,IAAM,CACzC,IAAIC,EACAC,EACJ,WAAW,IAAM,CACfA,EAAMH,EAAyB,CAAE,KAAM,EAAM,CAAC,EAC9CE,EAAY,IAAIJ,EAChBI,EAAU,KAAKC,CAAG,CACpB,CAAC,EAED,GAAG,kCAAmC,IAAM,CAC1C,OAAOA,CAAG,EAAE,YAAY,CAC1B,CAAC,EAED,GAAG,sDAAuD,IAAM,CAC9D,MAAMC,EAAwBF,EAAU,IACtCD,EAAiB,qBACnB,EACA,OAAOG,CAAqB,EAAE,eAAeL,CAA2B,CAC1E,CAAC,CACH,CAAC",
4
+ "sourcesContent": ["import { Container } from \"inversify\";\n\nimport { StaticDeviceModelDataSource } from \"@api/device-model/data/StaticDeviceModelDataSource\";\n\nimport { deviceModelModuleFactory } from \"./deviceModelModule\";\nimport { deviceModelTypes } from \"./deviceModelTypes\";\n\ndescribe(\"deviceModelModuleFactory\", () => {\n let container: Container;\n let mod: ReturnType<typeof deviceModelModuleFactory>;\n beforeEach(() => {\n mod = deviceModelModuleFactory({ stub: false });\n container = new Container();\n container.loadSync(mod);\n });\n\n it(\"should return the device module\", () => {\n expect(mod).toBeDefined();\n });\n\n it(\"should return none mocked services and data sources\", () => {\n const deviceModelDataSource = container.get(\n deviceModelTypes.DeviceModelDataSource,\n );\n expect(deviceModelDataSource).toBeInstanceOf(StaticDeviceModelDataSource);\n });\n});\n"],
5
+ "mappings": "AAAA,OAAS,aAAAA,MAAiB,YAE1B,OAAS,+BAAAC,MAAmC,qDAE5C,OAAS,4BAAAC,MAAgC,sBACzC,OAAS,oBAAAC,MAAwB,qBAEjC,SAAS,2BAA4B,IAAM,CACzC,IAAIC,EACAC,EACJ,WAAW,IAAM,CACfA,EAAMH,EAAyB,CAAE,KAAM,EAAM,CAAC,EAC9CE,EAAY,IAAIJ,EAChBI,EAAU,SAASC,CAAG,CACxB,CAAC,EAED,GAAG,kCAAmC,IAAM,CAC1C,OAAOA,CAAG,EAAE,YAAY,CAC1B,CAAC,EAED,GAAG,sDAAuD,IAAM,CAC9D,MAAMC,EAAwBF,EAAU,IACtCD,EAAiB,qBACnB,EACA,OAAOG,CAAqB,EAAE,eAAeL,CAA2B,CAC1E,CAAC,CACH,CAAC",
6
6
  "names": ["Container", "StaticDeviceModelDataSource", "deviceModelModuleFactory", "deviceModelTypes", "container", "mod", "deviceModelDataSource"]
7
7
  }
@@ -1,2 +1,2 @@
1
- const E=2;export{E as APDU_RESPONSE_STATUS_CODE_LENGTH};
1
+ const E=2,T=800;export{E as APDU_RESPONSE_STATUS_CODE_LENGTH,T as PINGER_TIMEOUT};
2
2
  //# sourceMappingURL=ApduResponseConst.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/internal/device-session/data/ApduResponseConst.ts"],
4
- "sourcesContent": ["export const APDU_RESPONSE_STATUS_CODE_LENGTH = 2;\n"],
5
- "mappings": "AAAO,MAAMA,EAAmC",
6
- "names": ["APDU_RESPONSE_STATUS_CODE_LENGTH"]
4
+ "sourcesContent": ["export const APDU_RESPONSE_STATUS_CODE_LENGTH = 2;\nexport const PINGER_TIMEOUT = 800;\n"],
5
+ "mappings": "AAAO,MAAMA,EAAmC,EACnCC,EAAiB",
6
+ "names": ["APDU_RESPONSE_STATUS_CODE_LENGTH", "PINGER_TIMEOUT"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{ContainerModule as a}from"inversify";import{DisableDeviceSessionRefresherUseCase as p}from"../../../api/device-session/use-case/DisableDeviceSessionRefresher";import{DefaultApduReceiverService as u}from"../../device-session/service/DefaultApduReceiverService";import{DefaultApduSenderService as v}from"../../device-session/service/DefaultApduSenderService";import{DefaultDeviceSessionService as m}from"../../device-session/service/DefaultDeviceSessionService";import{CloseSessionsUseCase as g}from"../../device-session/use-case/CloseSessionsUseCase";import{GetDeviceSessionStateUseCase as f}from"../../device-session/use-case/GetDeviceSessionStateUseCase";import{loggerTypes as c}from"../../logger-publisher/di/loggerTypes";import{StubUseCase as n}from"../../../../src/di.stub";import{deviceSessionTypes as e}from"./deviceSessionTypes";const w=({stub:S}={stub:!1})=>new a((r,l,d,i,A,y,D)=>{r(e.ApduSenderServiceFactory).toFactory(o=>{const t=o.container.get(c.LoggerPublisherServiceFactory);return s=>new v(s,t)}),r(e.ApduReceiverServiceFactory).toFactory(o=>{const t=o.container.get(c.LoggerPublisherServiceFactory);return(s={})=>new u(s,t)}),r(e.DeviceSessionService).to(m).inSingletonScope(),r(e.GetDeviceSessionStateUseCase).to(f),r(e.CloseSessionsUseCase).to(g),r(e.DisableDeviceSessionRefresherUseCase).to(p),S&&(i(e.GetDeviceSessionStateUseCase).to(n),i(e.DisableDeviceSessionRefresherUseCase).to(n))});export{w as deviceSessionModuleFactory};
1
+ import{ContainerModule as n}from"inversify";import{DisableDeviceSessionRefresherUseCase as a}from"../../../api/device-session/use-case/DisableDeviceSessionRefresher";import{DefaultApduReceiverService as u}from"../../device-session/service/DefaultApduReceiverService";import{DefaultApduSenderService as v}from"../../device-session/service/DefaultApduSenderService";import{DefaultDeviceSessionService as m}from"../../device-session/service/DefaultDeviceSessionService";import{CloseSessionsUseCase as g}from"../../device-session/use-case/CloseSessionsUseCase";import{GetDeviceSessionStateUseCase as l}from"../../device-session/use-case/GetDeviceSessionStateUseCase";import{loggerTypes as c}from"../../logger-publisher/di/loggerTypes";import{StubUseCase as S}from"../../../../src/di.stub";import{deviceSessionTypes as e}from"./deviceSessionTypes";const b=({stub:p}={stub:!1})=>new n(({bind:r,rebindSync:i})=>{r(e.ApduSenderServiceFactory).toFactory(o=>{const s=o.get(c.LoggerPublisherServiceFactory);return t=>new v(t,s)}),r(e.ApduReceiverServiceFactory).toFactory(o=>{const s=o.get(c.LoggerPublisherServiceFactory);return(t={})=>new u(t,s)}),r(e.DeviceSessionService).to(m).inSingletonScope(),r(e.GetDeviceSessionStateUseCase).to(l),r(e.CloseSessionsUseCase).to(g),r(e.DisableDeviceSessionRefresherUseCase).to(a),p&&(i(e.GetDeviceSessionStateUseCase).to(S),i(e.DisableDeviceSessionRefresherUseCase).to(S))});export{b as deviceSessionModuleFactory};
2
2
  //# sourceMappingURL=deviceSessionModule.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/internal/device-session/di/deviceSessionModule.ts"],
4
- "sourcesContent": ["import { ContainerModule, type interfaces } from \"inversify\";\n\nimport { type ApduReceiverService } from \"@api/device-session/service/ApduReceiverService\";\nimport { type ApduReceiverConstructorArgs } from \"@api/device-session/service/ApduReceiverService\";\nimport { type ApduSenderService } from \"@api/device-session/service/ApduSenderService\";\nimport { type ApduSenderServiceConstructorArgs } from \"@api/device-session/service/ApduSenderService\";\nimport { DisableDeviceSessionRefresherUseCase } from \"@api/device-session/use-case/DisableDeviceSessionRefresher\";\nimport { type LoggerPublisherService } from \"@api/logger-publisher/service/LoggerPublisherService\";\nimport { DefaultApduReceiverService } from \"@internal/device-session/service/DefaultApduReceiverService\";\nimport { DefaultApduSenderService } from \"@internal/device-session/service/DefaultApduSenderService\";\nimport { DefaultDeviceSessionService } from \"@internal/device-session/service/DefaultDeviceSessionService\";\nimport { CloseSessionsUseCase } from \"@internal/device-session/use-case/CloseSessionsUseCase\";\nimport { GetDeviceSessionStateUseCase } from \"@internal/device-session/use-case/GetDeviceSessionStateUseCase\";\nimport { loggerTypes } from \"@internal/logger-publisher/di/loggerTypes\";\nimport { StubUseCase } from \"@root/src/di.stub\";\n\nimport { deviceSessionTypes } from \"./deviceSessionTypes\";\n\nexport type DeviceSessionModuleArgs = Partial<{\n stub: boolean;\n}>;\n\nexport const deviceSessionModuleFactory = (\n { stub }: DeviceSessionModuleArgs = { stub: false },\n) =>\n new ContainerModule(\n (\n bind,\n _unbind,\n _isBound,\n rebind,\n _unbindAsync,\n _onActivation,\n _onDeactivation,\n ) => {\n bind<interfaces.Factory<ApduSenderService>>(\n deviceSessionTypes.ApduSenderServiceFactory,\n ).toFactory((context) => {\n const logger = context.container.get<\n (name: string) => LoggerPublisherService\n >(loggerTypes.LoggerPublisherServiceFactory);\n\n return (args: ApduSenderServiceConstructorArgs) => {\n return new DefaultApduSenderService(args, logger);\n };\n });\n\n bind<interfaces.Factory<ApduReceiverService>>(\n deviceSessionTypes.ApduReceiverServiceFactory,\n ).toFactory((context) => {\n const logger = context.container.get<\n (name: string) => LoggerPublisherService\n >(loggerTypes.LoggerPublisherServiceFactory);\n\n return (args: ApduReceiverConstructorArgs = {}) => {\n return new DefaultApduReceiverService(args, logger);\n };\n });\n\n bind(deviceSessionTypes.DeviceSessionService)\n .to(DefaultDeviceSessionService)\n .inSingletonScope();\n\n bind(deviceSessionTypes.GetDeviceSessionStateUseCase).to(\n GetDeviceSessionStateUseCase,\n );\n bind(deviceSessionTypes.CloseSessionsUseCase).to(CloseSessionsUseCase);\n bind(deviceSessionTypes.DisableDeviceSessionRefresherUseCase).to(\n DisableDeviceSessionRefresherUseCase,\n );\n\n if (stub) {\n rebind(deviceSessionTypes.GetDeviceSessionStateUseCase).to(StubUseCase);\n rebind(deviceSessionTypes.DisableDeviceSessionRefresherUseCase).to(\n StubUseCase,\n );\n }\n },\n );\n"],
5
- "mappings": "AAAA,OAAS,mBAAAA,MAAwC,YAMjD,OAAS,wCAAAC,MAA4C,6DAErD,OAAS,8BAAAC,MAAkC,8DAC3C,OAAS,4BAAAC,MAAgC,4DACzC,OAAS,+BAAAC,MAAmC,+DAC5C,OAAS,wBAAAC,MAA4B,yDACrC,OAAS,gCAAAC,MAAoC,iEAC7C,OAAS,eAAAC,MAAmB,4CAC5B,OAAS,eAAAC,MAAmB,oBAE5B,OAAS,sBAAAC,MAA0B,uBAM5B,MAAMC,EAA6B,CACxC,CAAE,KAAAC,CAAK,EAA6B,CAAE,KAAM,EAAM,IAElD,IAAIX,EACF,CACEY,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,IACG,CACHN,EACEH,EAAmB,wBACrB,EAAE,UAAWU,GAAY,CACvB,MAAMC,EAASD,EAAQ,UAAU,IAE/BZ,EAAY,6BAA6B,EAE3C,OAAQc,GACC,IAAIlB,EAAyBkB,EAAMD,CAAM,CAEpD,CAAC,EAEDR,EACEH,EAAmB,0BACrB,EAAE,UAAWU,GAAY,CACvB,MAAMC,EAASD,EAAQ,UAAU,IAE/BZ,EAAY,6BAA6B,EAE3C,MAAO,CAACc,EAAoC,CAAC,IACpC,IAAInB,EAA2BmB,EAAMD,CAAM,CAEtD,CAAC,EAEDR,EAAKH,EAAmB,oBAAoB,EACzC,GAAGL,CAA2B,EAC9B,iBAAiB,EAEpBQ,EAAKH,EAAmB,4BAA4B,EAAE,GACpDH,CACF,EACAM,EAAKH,EAAmB,oBAAoB,EAAE,GAAGJ,CAAoB,EACrEO,EAAKH,EAAmB,oCAAoC,EAAE,GAC5DR,CACF,EAEIU,IACFI,EAAON,EAAmB,4BAA4B,EAAE,GAAGD,CAAW,EACtEO,EAAON,EAAmB,oCAAoC,EAAE,GAC9DD,CACF,EAEJ,CACF",
6
- "names": ["ContainerModule", "DisableDeviceSessionRefresherUseCase", "DefaultApduReceiverService", "DefaultApduSenderService", "DefaultDeviceSessionService", "CloseSessionsUseCase", "GetDeviceSessionStateUseCase", "loggerTypes", "StubUseCase", "deviceSessionTypes", "deviceSessionModuleFactory", "stub", "bind", "_unbind", "_isBound", "rebind", "_unbindAsync", "_onActivation", "_onDeactivation", "context", "logger", "args"]
4
+ "sourcesContent": ["import { ContainerModule, type Factory } from \"inversify\";\n\nimport { type ApduReceiverService } from \"@api/device-session/service/ApduReceiverService\";\nimport { type ApduReceiverConstructorArgs } from \"@api/device-session/service/ApduReceiverService\";\nimport { type ApduSenderService } from \"@api/device-session/service/ApduSenderService\";\nimport { type ApduSenderServiceConstructorArgs } from \"@api/device-session/service/ApduSenderService\";\nimport { DisableDeviceSessionRefresherUseCase } from \"@api/device-session/use-case/DisableDeviceSessionRefresher\";\nimport { type LoggerPublisherService } from \"@api/logger-publisher/service/LoggerPublisherService\";\nimport { DefaultApduReceiverService } from \"@internal/device-session/service/DefaultApduReceiverService\";\nimport { DefaultApduSenderService } from \"@internal/device-session/service/DefaultApduSenderService\";\nimport { DefaultDeviceSessionService } from \"@internal/device-session/service/DefaultDeviceSessionService\";\nimport { CloseSessionsUseCase } from \"@internal/device-session/use-case/CloseSessionsUseCase\";\nimport { GetDeviceSessionStateUseCase } from \"@internal/device-session/use-case/GetDeviceSessionStateUseCase\";\nimport { loggerTypes } from \"@internal/logger-publisher/di/loggerTypes\";\nimport { StubUseCase } from \"@root/src/di.stub\";\n\nimport { deviceSessionTypes } from \"./deviceSessionTypes\";\n\nexport type DeviceSessionModuleArgs = Partial<{\n stub: boolean;\n}>;\n\nexport const deviceSessionModuleFactory = (\n { stub }: DeviceSessionModuleArgs = { stub: false },\n) =>\n new ContainerModule(({ bind, rebindSync }) => {\n bind<Factory<ApduSenderService>>(\n deviceSessionTypes.ApduSenderServiceFactory,\n ).toFactory((context) => {\n const logger = context.get<(name: string) => LoggerPublisherService>(\n loggerTypes.LoggerPublisherServiceFactory,\n );\n\n return (args: ApduSenderServiceConstructorArgs) => {\n return new DefaultApduSenderService(args, logger);\n };\n });\n\n bind<Factory<ApduReceiverService>>(\n deviceSessionTypes.ApduReceiverServiceFactory,\n ).toFactory((context) => {\n const logger = context.get<(name: string) => LoggerPublisherService>(\n loggerTypes.LoggerPublisherServiceFactory,\n );\n\n return (args: ApduReceiverConstructorArgs = {}) => {\n return new DefaultApduReceiverService(args, logger);\n };\n });\n\n bind(deviceSessionTypes.DeviceSessionService)\n .to(DefaultDeviceSessionService)\n .inSingletonScope();\n\n bind(deviceSessionTypes.GetDeviceSessionStateUseCase).to(\n GetDeviceSessionStateUseCase,\n );\n bind(deviceSessionTypes.CloseSessionsUseCase).to(CloseSessionsUseCase);\n bind(deviceSessionTypes.DisableDeviceSessionRefresherUseCase).to(\n DisableDeviceSessionRefresherUseCase,\n );\n\n if (stub) {\n rebindSync(deviceSessionTypes.GetDeviceSessionStateUseCase).to(\n StubUseCase,\n );\n rebindSync(deviceSessionTypes.DisableDeviceSessionRefresherUseCase).to(\n StubUseCase,\n );\n }\n });\n"],
5
+ "mappings": "AAAA,OAAS,mBAAAA,MAAqC,YAM9C,OAAS,wCAAAC,MAA4C,6DAErD,OAAS,8BAAAC,MAAkC,8DAC3C,OAAS,4BAAAC,MAAgC,4DACzC,OAAS,+BAAAC,MAAmC,+DAC5C,OAAS,wBAAAC,MAA4B,yDACrC,OAAS,gCAAAC,MAAoC,iEAC7C,OAAS,eAAAC,MAAmB,4CAC5B,OAAS,eAAAC,MAAmB,oBAE5B,OAAS,sBAAAC,MAA0B,uBAM5B,MAAMC,EAA6B,CACxC,CAAE,KAAAC,CAAK,EAA6B,CAAE,KAAM,EAAM,IAElD,IAAIX,EAAgB,CAAC,CAAE,KAAAY,EAAM,WAAAC,CAAW,IAAM,CAC5CD,EACEH,EAAmB,wBACrB,EAAE,UAAWK,GAAY,CACvB,MAAMC,EAASD,EAAQ,IACrBP,EAAY,6BACd,EAEA,OAAQS,GACC,IAAIb,EAAyBa,EAAMD,CAAM,CAEpD,CAAC,EAEDH,EACEH,EAAmB,0BACrB,EAAE,UAAWK,GAAY,CACvB,MAAMC,EAASD,EAAQ,IACrBP,EAAY,6BACd,EAEA,MAAO,CAACS,EAAoC,CAAC,IACpC,IAAId,EAA2Bc,EAAMD,CAAM,CAEtD,CAAC,EAEDH,EAAKH,EAAmB,oBAAoB,EACzC,GAAGL,CAA2B,EAC9B,iBAAiB,EAEpBQ,EAAKH,EAAmB,4BAA4B,EAAE,GACpDH,CACF,EACAM,EAAKH,EAAmB,oBAAoB,EAAE,GAAGJ,CAAoB,EACrEO,EAAKH,EAAmB,oCAAoC,EAAE,GAC5DR,CACF,EAEIU,IACFE,EAAWJ,EAAmB,4BAA4B,EAAE,GAC1DD,CACF,EACAK,EAAWJ,EAAmB,oCAAoC,EAAE,GAClED,CACF,EAEJ,CAAC",
6
+ "names": ["ContainerModule", "DisableDeviceSessionRefresherUseCase", "DefaultApduReceiverService", "DefaultApduSenderService", "DefaultDeviceSessionService", "CloseSessionsUseCase", "GetDeviceSessionStateUseCase", "loggerTypes", "StubUseCase", "deviceSessionTypes", "deviceSessionModuleFactory", "stub", "bind", "rebindSync", "context", "logger", "args"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{Container as t}from"inversify";import{deviceSessionModuleFactory as i}from"./deviceSessionModule";describe("deviceSessionModuleFactory",()=>{describe("Default",()=>{let o,e;beforeEach(()=>{e=i(),o=new t,o.load(e)}),it("should return the config module",()=>{expect(e).toBeDefined()})})});
1
+ import{Container as t}from"inversify";import{deviceSessionModuleFactory as i}from"./deviceSessionModule";describe("deviceSessionModuleFactory",()=>{describe("Default",()=>{let o,e;beforeEach(()=>{e=i(),o=new t,o.loadSync(e)}),it("should return the config module",()=>{expect(e).toBeDefined()})})});
2
2
  //# sourceMappingURL=deviceSessionModule.test.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/internal/device-session/di/deviceSessionModule.test.ts"],
4
- "sourcesContent": ["import { Container } from \"inversify\";\n\nimport { deviceSessionModuleFactory } from \"./deviceSessionModule\";\n\ndescribe(\"deviceSessionModuleFactory\", () => {\n describe(\"Default\", () => {\n let container: Container;\n let mod: ReturnType<typeof deviceSessionModuleFactory>;\n beforeEach(() => {\n mod = deviceSessionModuleFactory();\n container = new Container();\n container.load(mod);\n });\n\n it(\"should return the config module\", () => {\n expect(mod).toBeDefined();\n });\n });\n});\n"],
5
- "mappings": "AAAA,OAAS,aAAAA,MAAiB,YAE1B,OAAS,8BAAAC,MAAkC,wBAE3C,SAAS,6BAA8B,IAAM,CAC3C,SAAS,UAAW,IAAM,CACxB,IAAIC,EACAC,EACJ,WAAW,IAAM,CACfA,EAAMF,EAA2B,EACjCC,EAAY,IAAIF,EAChBE,EAAU,KAAKC,CAAG,CACpB,CAAC,EAED,GAAG,kCAAmC,IAAM,CAC1C,OAAOA,CAAG,EAAE,YAAY,CAC1B,CAAC,CACH,CAAC,CACH,CAAC",
4
+ "sourcesContent": ["import { Container } from \"inversify\";\n\nimport { deviceSessionModuleFactory } from \"./deviceSessionModule\";\n\ndescribe(\"deviceSessionModuleFactory\", () => {\n describe(\"Default\", () => {\n let container: Container;\n let mod: ReturnType<typeof deviceSessionModuleFactory>;\n beforeEach(() => {\n mod = deviceSessionModuleFactory();\n container = new Container();\n container.loadSync(mod);\n });\n\n it(\"should return the config module\", () => {\n expect(mod).toBeDefined();\n });\n });\n});\n"],
5
+ "mappings": "AAAA,OAAS,aAAAA,MAAiB,YAE1B,OAAS,8BAAAC,MAAkC,wBAE3C,SAAS,6BAA8B,IAAM,CAC3C,SAAS,UAAW,IAAM,CACxB,IAAIC,EACAC,EACJ,WAAW,IAAM,CACfA,EAAMF,EAA2B,EACjCC,EAAY,IAAIF,EAChBE,EAAU,SAASC,CAAG,CACxB,CAAC,EAED,GAAG,kCAAmC,IAAM,CAC1C,OAAOA,CAAG,EAAE,YAAY,CAC1B,CAAC,CACH,CAAC,CACH,CAAC",
6
6
  "names": ["Container", "deviceSessionModuleFactory", "container", "mod"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{DeviceModelId as a}from"../../../api/device/DeviceModel";import{GetAppAndVersionCommand as r,GetOsVersionCommand as c}from"../../../api/index";import{DEVICE_SESSION_REFRESHER_POLLING_INTERVAL as p}from"../../device-session/data/DeviceSessionRefresherConst";import{SessionEvents as i}from"../../device-session/model/DeviceSessionEventDispatcher";class l{constructor(e,t,o,n){this.connectedDevice=t;this._sessionEventDispatcher=o;this._sendCommandFunction=n,this._logger=e("device-pinger"),this._subscription=this._sessionEventDispatcher.listen().subscribe(async s=>await this.mapEventAction(s))}_sendCommandFunction;_subscription;_logger;async ping(){try{return await this.mapDevicePingAction(this.connectedDevice.deviceModel.id)}catch(e){throw this._logger.error("Error while pinging device",{data:{error:e}}),e}}mapEventAction=async e=>{switch(e.eventName){case i.REFRESH_NEEDED:return await this.ping();default:return null}};async mapDevicePingAction(e){switch(e){case a.NANO_S:{const t=(async()=>{const s=await this._sendCommandFunction(new r);return this._sendCommandFunction(new c),s})(),o=new Promise(s=>{setTimeout(()=>s(null),p*2+100)}),n=await Promise.race([t,o]);return n?this._sessionEventDispatcher.dispatch({eventName:i.COMMAND_SUCCEEDED,eventData:n}):this._sessionEventDispatcher.dispatch({eventName:i.DEVICE_STATE_UPDATE_LOCKED}),n}default:{const t=await this._sendCommandFunction(new r);return this._sessionEventDispatcher.dispatch({eventName:i.COMMAND_SUCCEEDED,eventData:t}),t}}}unsubscribe(){this._subscription.unsubscribe()}}export{l as DevicePinger};
1
+ import{DeviceModelId as c}from"../../../api/device/DeviceModel";import{GetAppAndVersionCommand as a,GetOsVersionCommand as m}from"../../../api/index";import{PINGER_TIMEOUT as o}from"../../device-session/data/ApduResponseConst";import{DEVICE_SESSION_REFRESHER_POLLING_INTERVAL as p}from"../../device-session/data/DeviceSessionRefresherConst";import{SessionEvents as i}from"../../device-session/model/DeviceSessionEventDispatcher";class D{constructor(e,t,r,n){this.connectedDevice=t;this._sessionEventDispatcher=r;this._sendCommandFunction=n,this._logger=e("device-pinger"),this._subscription=this._sessionEventDispatcher.listen().subscribe(async s=>await this.mapEventAction(s))}_sendCommandFunction;_subscription;_logger;async ping(){try{return await this.mapDevicePingAction(this.connectedDevice.deviceModel.id)}catch(e){throw this._logger.error("Error while pinging device",{data:{error:e}}),e}}mapEventAction=async e=>{switch(e.eventName){case i.REFRESH_NEEDED:return await this.ping();default:return null}};async mapDevicePingAction(e){switch(e){case c.NANO_S:{const t=async()=>{const s=await this._sendCommandFunction(new a,o);return this._sendCommandFunction(new m,o),s},r=new Promise(s=>{setTimeout(()=>s(null),p*2+100)}),n=await Promise.race([t(),r]);return n?this._sessionEventDispatcher.dispatch({eventName:i.COMMAND_SUCCEEDED,eventData:n}):this._sessionEventDispatcher.dispatch({eventName:i.DEVICE_STATE_UPDATE_LOCKED}),n}default:{const t=await this._sendCommandFunction(new a,o);return this._sessionEventDispatcher.dispatch({eventName:i.COMMAND_SUCCEEDED,eventData:t}),t}}}unsubscribe(){this._subscription.unsubscribe()}}export{D as DevicePinger};
2
2
  //# sourceMappingURL=DevicePinger.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/internal/device-session/model/DevicePinger.ts"],
4
- "sourcesContent": ["import { type Subscription } from \"rxjs\";\n\nimport { DeviceModelId } from \"@api/device/DeviceModel\";\nimport {\n GetAppAndVersionCommand,\n type GetAppAndVersionResponse,\n GetOsVersionCommand,\n type TransportConnectedDevice,\n} from \"@api/index\";\nimport {\n type Command,\n type CommandResult,\n type LoggerPublisherService,\n} from \"@api/types\";\nimport { DEVICE_SESSION_REFRESHER_POLLING_INTERVAL } from \"@internal/device-session/data/DeviceSessionRefresherConst\";\nimport {\n type DeviceSessionEventDispatcher,\n type NewEvent,\n SessionEvents,\n} from \"@internal/device-session/model/DeviceSessionEventDispatcher\";\n\ntype SendCommandFunction = <Response, Args, ErrorStatusCodes>(\n command: Command<Response, Args, ErrorStatusCodes>,\n) => Promise<CommandResult<Response, ErrorStatusCodes>>;\n\nexport class DevicePinger {\n private readonly _sendCommandFunction: SendCommandFunction;\n private _subscription: Subscription;\n private _logger: LoggerPublisherService;\n\n constructor(\n loggerModuleFactory: (tag: string) => LoggerPublisherService,\n private connectedDevice: TransportConnectedDevice,\n private _sessionEventDispatcher: DeviceSessionEventDispatcher,\n sendCommandFunction: SendCommandFunction,\n ) {\n this._sendCommandFunction = sendCommandFunction;\n this._logger = loggerModuleFactory(\"device-pinger\");\n this._subscription = this._sessionEventDispatcher\n .listen()\n .subscribe(async (event) => await this.mapEventAction(event));\n }\n\n public async ping(): Promise<CommandResult<GetAppAndVersionResponse> | null> {\n try {\n const result = await this.mapDevicePingAction(\n this.connectedDevice.deviceModel.id,\n );\n return result;\n } catch (error) {\n this._logger.error(\"Error while pinging device\", {\n data: {\n error,\n },\n });\n throw error;\n }\n }\n\n private mapEventAction = async (event: NewEvent) => {\n switch (event.eventName) {\n case SessionEvents.REFRESH_NEEDED:\n return await this.ping();\n default:\n return null;\n }\n };\n\n private async mapDevicePingAction(deviceModelId: DeviceModelId) {\n switch (deviceModelId) {\n case DeviceModelId.NANO_S: {\n const chainPromise: Promise<CommandResult<GetAppAndVersionResponse>> =\n (async () => {\n const appVersionResult = await this._sendCommandFunction(\n new GetAppAndVersionCommand(),\n );\n\n this._sendCommandFunction(new GetOsVersionCommand());\n return appVersionResult;\n })();\n\n const timeoutPromise: Promise<null> = new Promise((resolve) => {\n setTimeout(\n () => resolve(null),\n DEVICE_SESSION_REFRESHER_POLLING_INTERVAL * 2 + 100,\n );\n });\n\n const resultOrTimeout: CommandResult<GetAppAndVersionResponse> | null =\n await Promise.race([chainPromise, timeoutPromise]);\n\n if (!resultOrTimeout) {\n this._sessionEventDispatcher.dispatch({\n eventName: SessionEvents.DEVICE_STATE_UPDATE_LOCKED,\n });\n } else {\n this._sessionEventDispatcher.dispatch({\n eventName: SessionEvents.COMMAND_SUCCEEDED,\n eventData: resultOrTimeout,\n });\n }\n return resultOrTimeout;\n }\n default: {\n const result = await this._sendCommandFunction(\n new GetAppAndVersionCommand(),\n );\n this._sessionEventDispatcher.dispatch({\n eventName: SessionEvents.COMMAND_SUCCEEDED,\n eventData: result,\n });\n return result;\n }\n }\n }\n\n public unsubscribe(): void {\n this._subscription.unsubscribe();\n }\n}\n"],
5
- "mappings": "AAEA,OAAS,iBAAAA,MAAqB,0BAC9B,OACE,2BAAAC,EAEA,uBAAAC,MAEK,aAMP,OAAS,6CAAAC,MAAiD,4DAC1D,OAGE,iBAAAC,MACK,8DAMA,MAAMC,CAAa,CAKxB,YACEC,EACQC,EACAC,EACRC,EACA,CAHQ,qBAAAF,EACA,6BAAAC,EAGR,KAAK,qBAAuBC,EAC5B,KAAK,QAAUH,EAAoB,eAAe,EAClD,KAAK,cAAgB,KAAK,wBACvB,OAAO,EACP,UAAU,MAAOI,GAAU,MAAM,KAAK,eAAeA,CAAK,CAAC,CAChE,CAfiB,qBACT,cACA,QAeR,MAAa,MAAgE,CAC3E,GAAI,CAIF,OAHe,MAAM,KAAK,oBACxB,KAAK,gBAAgB,YAAY,EACnC,CAEF,OAASC,EAAO,CACd,WAAK,QAAQ,MAAM,6BAA8B,CAC/C,KAAM,CACJ,MAAAA,CACF,CACF,CAAC,EACKA,CACR,CACF,CAEQ,eAAiB,MAAOD,GAAoB,CAClD,OAAQA,EAAM,UAAW,CACvB,KAAKN,EAAc,eACjB,OAAO,MAAM,KAAK,KAAK,EACzB,QACE,OAAO,IACX,CACF,EAEA,MAAc,oBAAoBQ,EAA8B,CAC9D,OAAQA,EAAe,CACrB,KAAKZ,EAAc,OAAQ,CACzB,MAAMa,GACH,SAAY,CACX,MAAMC,EAAmB,MAAM,KAAK,qBAClC,IAAIb,CACN,EAEA,YAAK,qBAAqB,IAAIC,CAAqB,EAC5CY,CACT,GAAG,EAECC,EAAgC,IAAI,QAASC,GAAY,CAC7D,WACE,IAAMA,EAAQ,IAAI,EAClBb,EAA4C,EAAI,GAClD,CACF,CAAC,EAEKc,EACJ,MAAM,QAAQ,KAAK,CAACJ,EAAcE,CAAc,CAAC,EAEnD,OAAKE,EAKH,KAAK,wBAAwB,SAAS,CACpC,UAAWb,EAAc,kBACzB,UAAWa,CACb,CAAC,EAPD,KAAK,wBAAwB,SAAS,CACpC,UAAWb,EAAc,0BAC3B,CAAC,EAOIa,CACT,CACA,QAAS,CACP,MAAMC,EAAS,MAAM,KAAK,qBACxB,IAAIjB,CACN,EACA,YAAK,wBAAwB,SAAS,CACpC,UAAWG,EAAc,kBACzB,UAAWc,CACb,CAAC,EACMA,CACT,CACF,CACF,CAEO,aAAoB,CACzB,KAAK,cAAc,YAAY,CACjC,CACF",
6
- "names": ["DeviceModelId", "GetAppAndVersionCommand", "GetOsVersionCommand", "DEVICE_SESSION_REFRESHER_POLLING_INTERVAL", "SessionEvents", "DevicePinger", "loggerModuleFactory", "connectedDevice", "_sessionEventDispatcher", "sendCommandFunction", "event", "error", "deviceModelId", "chainPromise", "appVersionResult", "timeoutPromise", "resolve", "resultOrTimeout", "result"]
4
+ "sourcesContent": ["import { type Subscription } from \"rxjs\";\n\nimport { DeviceModelId } from \"@api/device/DeviceModel\";\nimport {\n GetAppAndVersionCommand,\n type GetAppAndVersionResponse,\n GetOsVersionCommand,\n type TransportConnectedDevice,\n} from \"@api/index\";\nimport {\n type Command,\n type CommandResult,\n type LoggerPublisherService,\n} from \"@api/types\";\nimport { PINGER_TIMEOUT } from \"@internal/device-session/data/ApduResponseConst\";\nimport { DEVICE_SESSION_REFRESHER_POLLING_INTERVAL } from \"@internal/device-session/data/DeviceSessionRefresherConst\";\nimport {\n type DeviceSessionEventDispatcher,\n type NewEvent,\n SessionEvents,\n} from \"@internal/device-session/model/DeviceSessionEventDispatcher\";\n\ntype SendCommandFunction = <Response, Args, ErrorStatusCodes>(\n command: Command<Response, Args, ErrorStatusCodes>,\n abortTimeout?: number,\n) => Promise<CommandResult<Response, ErrorStatusCodes>>;\n\nexport class DevicePinger {\n private readonly _sendCommandFunction: SendCommandFunction;\n private _subscription: Subscription;\n private _logger: LoggerPublisherService;\n\n constructor(\n loggerModuleFactory: (tag: string) => LoggerPublisherService,\n private connectedDevice: TransportConnectedDevice,\n private _sessionEventDispatcher: DeviceSessionEventDispatcher,\n sendCommandFunction: SendCommandFunction,\n ) {\n this._sendCommandFunction = sendCommandFunction;\n this._logger = loggerModuleFactory(\"device-pinger\");\n this._subscription = this._sessionEventDispatcher\n .listen()\n .subscribe(async (event) => await this.mapEventAction(event));\n }\n\n public async ping(): Promise<CommandResult<GetAppAndVersionResponse> | null> {\n try {\n const result = await this.mapDevicePingAction(\n this.connectedDevice.deviceModel.id,\n );\n return result;\n } catch (error) {\n this._logger.error(\"Error while pinging device\", {\n data: {\n error,\n },\n });\n throw error;\n }\n }\n\n private mapEventAction = async (event: NewEvent) => {\n switch (event.eventName) {\n case SessionEvents.REFRESH_NEEDED:\n return await this.ping();\n default:\n return null;\n }\n };\n\n private async mapDevicePingAction(deviceModelId: DeviceModelId) {\n switch (deviceModelId) {\n case DeviceModelId.NANO_S: {\n const chainPromise: () => Promise<\n CommandResult<GetAppAndVersionResponse>\n > = async () => {\n const appVersionResult = await this._sendCommandFunction(\n new GetAppAndVersionCommand(),\n PINGER_TIMEOUT,\n );\n\n this._sendCommandFunction(new GetOsVersionCommand(), PINGER_TIMEOUT);\n return appVersionResult;\n };\n\n const timeoutPromise: Promise<null> = new Promise((resolve) => {\n setTimeout(\n () => resolve(null),\n DEVICE_SESSION_REFRESHER_POLLING_INTERVAL * 2 + 100,\n );\n });\n\n const resultOrTimeout: CommandResult<GetAppAndVersionResponse> | null =\n await Promise.race([chainPromise(), timeoutPromise]);\n\n if (!resultOrTimeout) {\n this._sessionEventDispatcher.dispatch({\n eventName: SessionEvents.DEVICE_STATE_UPDATE_LOCKED,\n });\n } else {\n this._sessionEventDispatcher.dispatch({\n eventName: SessionEvents.COMMAND_SUCCEEDED,\n eventData: resultOrTimeout,\n });\n }\n return resultOrTimeout;\n }\n default: {\n const result = await this._sendCommandFunction(\n new GetAppAndVersionCommand(),\n PINGER_TIMEOUT,\n );\n this._sessionEventDispatcher.dispatch({\n eventName: SessionEvents.COMMAND_SUCCEEDED,\n eventData: result,\n });\n return result;\n }\n }\n }\n\n public unsubscribe(): void {\n this._subscription.unsubscribe();\n }\n}\n"],
5
+ "mappings": "AAEA,OAAS,iBAAAA,MAAqB,0BAC9B,OACE,2BAAAC,EAEA,uBAAAC,MAEK,aAMP,OAAS,kBAAAC,MAAsB,kDAC/B,OAAS,6CAAAC,MAAiD,4DAC1D,OAGE,iBAAAC,MACK,8DAOA,MAAMC,CAAa,CAKxB,YACEC,EACQC,EACAC,EACRC,EACA,CAHQ,qBAAAF,EACA,6BAAAC,EAGR,KAAK,qBAAuBC,EAC5B,KAAK,QAAUH,EAAoB,eAAe,EAClD,KAAK,cAAgB,KAAK,wBACvB,OAAO,EACP,UAAU,MAAOI,GAAU,MAAM,KAAK,eAAeA,CAAK,CAAC,CAChE,CAfiB,qBACT,cACA,QAeR,MAAa,MAAgE,CAC3E,GAAI,CAIF,OAHe,MAAM,KAAK,oBACxB,KAAK,gBAAgB,YAAY,EACnC,CAEF,OAASC,EAAO,CACd,WAAK,QAAQ,MAAM,6BAA8B,CAC/C,KAAM,CACJ,MAAAA,CACF,CACF,CAAC,EACKA,CACR,CACF,CAEQ,eAAiB,MAAOD,GAAoB,CAClD,OAAQA,EAAM,UAAW,CACvB,KAAKN,EAAc,eACjB,OAAO,MAAM,KAAK,KAAK,EACzB,QACE,OAAO,IACX,CACF,EAEA,MAAc,oBAAoBQ,EAA8B,CAC9D,OAAQA,EAAe,CACrB,KAAKb,EAAc,OAAQ,CACzB,MAAMc,EAEF,SAAY,CACd,MAAMC,EAAmB,MAAM,KAAK,qBAClC,IAAId,EACJE,CACF,EAEA,YAAK,qBAAqB,IAAID,EAAuBC,CAAc,EAC5DY,CACT,EAEMC,EAAgC,IAAI,QAASC,GAAY,CAC7D,WACE,IAAMA,EAAQ,IAAI,EAClBb,EAA4C,EAAI,GAClD,CACF,CAAC,EAEKc,EACJ,MAAM,QAAQ,KAAK,CAACJ,EAAa,EAAGE,CAAc,CAAC,EAErD,OAAKE,EAKH,KAAK,wBAAwB,SAAS,CACpC,UAAWb,EAAc,kBACzB,UAAWa,CACb,CAAC,EAPD,KAAK,wBAAwB,SAAS,CACpC,UAAWb,EAAc,0BAC3B,CAAC,EAOIa,CACT,CACA,QAAS,CACP,MAAMC,EAAS,MAAM,KAAK,qBACxB,IAAIlB,EACJE,CACF,EACA,YAAK,wBAAwB,SAAS,CACpC,UAAWE,EAAc,kBACzB,UAAWc,CACb,CAAC,EACMA,CACT,CACF,CACF,CAEO,aAAoB,CACzB,KAAK,cAAc,YAAY,CACjC,CACF",
6
+ "names": ["DeviceModelId", "GetAppAndVersionCommand", "GetOsVersionCommand", "PINGER_TIMEOUT", "DEVICE_SESSION_REFRESHER_POLLING_INTERVAL", "SessionEvents", "DevicePinger", "loggerModuleFactory", "connectedDevice", "_sessionEventDispatcher", "sendCommandFunction", "event", "error", "deviceModelId", "chainPromise", "appVersionResult", "timeoutPromise", "resolve", "resultOrTimeout", "result"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{BehaviorSubject as p}from"rxjs";import{v4 as v}from"uuid";import{CommandUtils as d}from"../../../api/command/utils/CommandUtils";import{DeviceStatus as c}from"../../../api/device/DeviceStatus";import{DeviceSessionStateType as h}from"../../../api/device-session/DeviceSessionState";import{DEVICE_SESSION_REFRESHER_DEFAULT_OPTIONS as S}from"../../device-session/data/DeviceSessionRefresherConst";import{MutexService as m}from"../../device-session/service/MutexService";import{RefresherService as u}from"../../device-session/service/RefresherService";import{DevicePinger as D}from"./DevicePinger";import{DeviceSessionEventDispatcher as l,SessionEvents as r}from"./DeviceSessionEventDispatcher";import{DeviceSessionRefresher as _}from"./DeviceSessionRefresher";import{DeviceSessionStateHandler as f}from"./DeviceSessionStateHandler";class x{_id;_connectedDevice;_deviceState;_managerApiService;_secureChannelService;_logger;_refresherOptions;_pinger;_deviceSessionRefresher;_refresherService;_commandMutex=new m;_sessionEventDispatcher=new l;constructor({connectedDevice:e,id:s=v()},t,i,n,a){this._id=s,this._connectedDevice=e,this._logger=t("device-session"),this._managerApiService=i,this._secureChannelService=n,this._refresherOptions={...S,...a},this._deviceState=new p({sessionStateType:h.Connected,deviceStatus:c.CONNECTED,deviceModelId:this._connectedDevice.deviceModel.id}),this._pinger=new D(t,e,this._sessionEventDispatcher,o=>this.sendCommand(o)),this._deviceSessionRefresher=new _(t,this._refresherOptions,this._sessionEventDispatcher,this._connectedDevice),new f(t,this._sessionEventDispatcher,this._connectedDevice,this._deviceState,o=>this.setDeviceSessionState(o)),this._refresherService=new u(t,{start:()=>this._deviceSessionRefresher.restartRefresher(),stop:()=>this._deviceSessionRefresher.stopRefresher()})}async initialiseSession(){try{await this._pinger.ping()}catch(e){throw this._logger.error("Error while initialising session",{data:{error:e}}),e}finally{this._refresherOptions.isRefresherDisabled||this._deviceSessionRefresher.startRefresher()}}get id(){return this._id}get connectedDevice(){return this._connectedDevice}get state(){return this._deviceState.asObservable()}setDeviceSessionState(e){this._deviceState.next(e)}async sendApdu(e,s={isPolling:!1,triggersDisconnection:!1}){const t=await this._commandMutex.lock();try{this._sessionEventDispatcher.dispatch({eventName:r.DEVICE_STATE_UPDATE_BUSY});const i=await this._connectedDevice.sendApdu(e,s.triggersDisconnection);return i.ifRight(n=>{d.isLockedDeviceResponse(n)?this._sessionEventDispatcher.dispatch({eventName:r.DEVICE_STATE_UPDATE_LOCKED}):this._sessionEventDispatcher.dispatch({eventName:r.DEVICE_STATE_UPDATE_CONNECTED})}).ifLeft(()=>{this._sessionEventDispatcher.dispatch({eventName:r.DEVICE_STATE_UPDATE_CONNECTED})}),i}finally{t()}}async sendCommand(e){const s=e.getApdu();return(await this.sendApdu(s.getRawApdu(),{isPolling:!1,triggersDisconnection:e.triggersDisconnection??!1})).caseOf({Left:i=>{throw i},Right:i=>e.parseResponse(i,this._connectedDevice.deviceModel.id)})}executeDeviceAction(e){const{observable:s,cancel:t}=e._execute({sendApdu:async i=>this.sendApdu(i),sendCommand:async i=>this.sendCommand(i),getDeviceSessionState:()=>this._deviceState.getValue(),getDeviceSessionStateObservable:()=>this.state,setDeviceSessionState:i=>(this.setDeviceSessionState(i),this._deviceState.getValue()),disableRefresher:i=>this._refresherService.disableRefresher(i),getManagerApiService:()=>this._managerApiService,getSecureChannelService:()=>this._secureChannelService});return{observable:s,cancel:t}}close(){this._updateDeviceStatus(c.NOT_CONNECTED),this._deviceState.complete(),this._deviceSessionRefresher.stopRefresher()}disableRefresher(e){return this._refresherService.disableRefresher(e)}_updateDeviceStatus(e){const s=this._deviceState.getValue();this._deviceState.next({...s,deviceStatus:e})}}export{x as DeviceSession};
1
+ import{BehaviorSubject as v}from"rxjs";import{v4 as d}from"uuid";import{CommandUtils as h}from"../../../api/command/utils/CommandUtils";import{DeviceStatus as c}from"../../../api/device/DeviceStatus";import{DeviceSessionStateType as S}from"../../../api/device-session/DeviceSessionState";import{DEVICE_SESSION_REFRESHER_DEFAULT_OPTIONS as u}from"../../device-session/data/DeviceSessionRefresherConst";import{MutexService as m}from"../../device-session/service/MutexService";import{RefresherService as D}from"../../device-session/service/RefresherService";import{DevicePinger as l}from"./DevicePinger";import{DeviceSessionEventDispatcher as _,SessionEvents as n}from"./DeviceSessionEventDispatcher";import{DeviceSessionRefresher as f}from"./DeviceSessionRefresher";import{DeviceSessionStateHandler as g}from"./DeviceSessionStateHandler";class V{_id;_connectedDevice;_deviceState;_managerApiService;_secureChannelService;_logger;_refresherOptions;_pinger;_deviceSessionRefresher;_refresherService;_commandMutex=new m;_sessionEventDispatcher=new _;constructor({connectedDevice:e,id:s=d()},t,i,r,a){this._id=s,this._connectedDevice=e,this._logger=t("device-session"),this._managerApiService=i,this._secureChannelService=r,this._refresherOptions={...u,...a},this._deviceState=new v({sessionStateType:S.Connected,deviceStatus:c.CONNECTED,deviceModelId:this._connectedDevice.deviceModel.id}),this._pinger=new l(t,e,this._sessionEventDispatcher,(o,p)=>this.sendCommand(o,p)),this._deviceSessionRefresher=new f(t,this._refresherOptions,this._sessionEventDispatcher,this._connectedDevice),new g(t,this._sessionEventDispatcher,this._connectedDevice,this._deviceState,o=>this.setDeviceSessionState(o)),this._refresherService=new D(t,{start:()=>this._deviceSessionRefresher.restartRefresher(),stop:()=>this._deviceSessionRefresher.stopRefresher()})}async initialiseSession(){try{await this._pinger.ping()}catch(e){throw this._logger.error("Error while initialising session",{data:{error:e}}),e}finally{this._refresherOptions.isRefresherDisabled||this._deviceSessionRefresher.startRefresher()}}get id(){return this._id}get connectedDevice(){return this._connectedDevice}get state(){return this._deviceState.asObservable()}getDeviceSessionState(){return this._deviceState.getValue()}setDeviceSessionState(e){this._deviceState.next(e)}async sendApdu(e,s={isPolling:!1,triggersDisconnection:!1,abortTimeout:void 0}){const t=await this._commandMutex.lock();try{this._sessionEventDispatcher.dispatch({eventName:n.DEVICE_STATE_UPDATE_BUSY});const i=await this._connectedDevice.sendApdu(e,s.triggersDisconnection,s.abortTimeout);return i.ifRight(r=>{h.isLockedDeviceResponse(r)?this._sessionEventDispatcher.dispatch({eventName:n.DEVICE_STATE_UPDATE_LOCKED}):this._sessionEventDispatcher.dispatch({eventName:n.DEVICE_STATE_UPDATE_CONNECTED})}).ifLeft(()=>{this._sessionEventDispatcher.dispatch({eventName:n.DEVICE_STATE_UPDATE_CONNECTED})}),i}finally{t()}}async sendCommand(e,s){const t=e.getApdu();return(await this.sendApdu(t.getRawApdu(),{isPolling:!1,triggersDisconnection:e.triggersDisconnection??!1,abortTimeout:s})).caseOf({Left:r=>{throw r},Right:r=>e.parseResponse(r,this._connectedDevice.deviceModel.id)})}executeDeviceAction(e){const{observable:s,cancel:t}=e._execute({sendApdu:async i=>this.sendApdu(i),sendCommand:async(i,r)=>this.sendCommand(i,r),getDeviceModel:()=>this._connectedDevice.deviceModel,getDeviceSessionState:()=>this._deviceState.getValue(),getDeviceSessionStateObservable:()=>this.state,setDeviceSessionState:i=>(this.setDeviceSessionState(i),this._deviceState.getValue()),disableRefresher:i=>this._refresherService.disableRefresher(i),getManagerApiService:()=>this._managerApiService,getSecureChannelService:()=>this._secureChannelService});return{observable:s,cancel:t}}close(){this._updateDeviceStatus(c.NOT_CONNECTED),this._deviceState.complete(),this._deviceSessionRefresher.stopRefresher()}disableRefresher(e){return this._refresherService.disableRefresher(e)}_updateDeviceStatus(e){const s=this._deviceState.getValue();this._deviceState.next({...s,deviceStatus:e})}}export{V as DeviceSession};
2
2
  //# sourceMappingURL=DeviceSession.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/internal/device-session/model/DeviceSession.ts"],
4
- "sourcesContent": ["import { type Either } from \"purify-ts\";\nimport { BehaviorSubject, type Observable } from \"rxjs\";\nimport { v4 as uuidv4 } from \"uuid\";\n\nimport { type Command } from \"@api/command/Command\";\nimport { type CommandResult } from \"@api/command/model/CommandResult\";\nimport { CommandUtils } from \"@api/command/utils/CommandUtils\";\nimport { DeviceStatus } from \"@api/device/DeviceStatus\";\nimport {\n type DeviceAction,\n type DeviceActionIntermediateValue,\n type ExecuteDeviceActionReturnType,\n} from \"@api/device-action/DeviceAction\";\nimport { type ApduResponse } from \"@api/device-session/ApduResponse\";\nimport {\n type DeviceSessionState,\n DeviceSessionStateType,\n} from \"@api/device-session/DeviceSessionState\";\nimport { type DeviceSessionId } from \"@api/device-session/types\";\nimport { type DmkError } from \"@api/Error\";\nimport { type LoggerPublisherService } from \"@api/logger-publisher/service/LoggerPublisherService\";\nimport { type TransportConnectedDevice } from \"@api/transport/model/TransportConnectedDevice\";\nimport { DEVICE_SESSION_REFRESHER_DEFAULT_OPTIONS } from \"@internal/device-session/data/DeviceSessionRefresherConst\";\nimport { MutexService } from \"@internal/device-session/service/MutexService\";\nimport { RefresherService } from \"@internal/device-session/service/RefresherService\";\nimport { type ManagerApiService } from \"@internal/manager-api/service/ManagerApiService\";\nimport { type SecureChannelService } from \"@internal/secure-channel/service/SecureChannelService\";\n\nimport { DevicePinger } from \"./DevicePinger\";\nimport {\n DeviceSessionEventDispatcher,\n SessionEvents,\n} from \"./DeviceSessionEventDispatcher\";\nimport { DeviceSessionRefresher } from \"./DeviceSessionRefresher\";\nimport { DeviceSessionStateHandler } from \"./DeviceSessionStateHandler\";\n\nexport type SessionConstructorArgs = {\n connectedDevice: TransportConnectedDevice;\n id?: DeviceSessionId;\n};\n\nexport type DeviceSessionRefresherOptions = {\n isRefresherDisabled: boolean;\n pollingInterval?: number;\n};\n\ntype SendApduOptions = {\n isPolling?: boolean;\n triggersDisconnection?: boolean;\n};\n\n/**\n * Represents a session with a device.\n */\nexport class DeviceSession {\n private readonly _id: DeviceSessionId;\n private readonly _connectedDevice: TransportConnectedDevice;\n private readonly _deviceState: BehaviorSubject<DeviceSessionState>;\n private readonly _managerApiService: ManagerApiService;\n private readonly _secureChannelService: SecureChannelService;\n private readonly _logger: LoggerPublisherService;\n private readonly _refresherOptions: DeviceSessionRefresherOptions;\n private _pinger: DevicePinger;\n private _deviceSessionRefresher: DeviceSessionRefresher;\n private readonly _refresherService: RefresherService;\n private _commandMutex = new MutexService();\n private _sessionEventDispatcher = new DeviceSessionEventDispatcher();\n\n constructor(\n { connectedDevice, id = uuidv4() }: SessionConstructorArgs,\n loggerModuleFactory: (tag: string) => LoggerPublisherService,\n managerApiService: ManagerApiService,\n secureChannelService: SecureChannelService,\n deviceSessionRefresherOptions: DeviceSessionRefresherOptions | undefined,\n ) {\n this._id = id;\n this._connectedDevice = connectedDevice;\n this._logger = loggerModuleFactory(\"device-session\");\n this._managerApiService = managerApiService;\n this._secureChannelService = secureChannelService;\n this._refresherOptions = {\n ...DEVICE_SESSION_REFRESHER_DEFAULT_OPTIONS,\n ...deviceSessionRefresherOptions,\n };\n this._deviceState = new BehaviorSubject<DeviceSessionState>({\n sessionStateType: DeviceSessionStateType.Connected,\n deviceStatus: DeviceStatus.CONNECTED,\n deviceModelId: this._connectedDevice.deviceModel.id,\n });\n\n this._pinger = new DevicePinger(\n loggerModuleFactory,\n connectedDevice,\n this._sessionEventDispatcher,\n (command) => this.sendCommand(command),\n );\n this._deviceSessionRefresher = new DeviceSessionRefresher(\n loggerModuleFactory,\n this._refresherOptions,\n this._sessionEventDispatcher,\n this._connectedDevice,\n );\n new DeviceSessionStateHandler(\n loggerModuleFactory,\n this._sessionEventDispatcher,\n this._connectedDevice,\n this._deviceState,\n (state) => this.setDeviceSessionState(state),\n );\n\n this._refresherService = new RefresherService(loggerModuleFactory, {\n start: () => this._deviceSessionRefresher.restartRefresher(),\n stop: () => this._deviceSessionRefresher.stopRefresher(),\n });\n }\n\n public async initialiseSession(): Promise<void> {\n try {\n await this._pinger.ping();\n } catch (error) {\n this._logger.error(\"Error while initialising session\", {\n data: { error },\n });\n throw error;\n } finally {\n if (!this._refresherOptions.isRefresherDisabled) {\n this._deviceSessionRefresher.startRefresher();\n }\n }\n }\n\n public get id(): DeviceSessionId {\n return this._id;\n }\n\n public get connectedDevice(): TransportConnectedDevice {\n return this._connectedDevice;\n }\n\n public get state(): Observable<DeviceSessionState> {\n return this._deviceState.asObservable();\n }\n\n public setDeviceSessionState(state: DeviceSessionState): void {\n this._deviceState.next(state);\n }\n\n public async sendApdu(\n rawApdu: Uint8Array,\n options: SendApduOptions = {\n isPolling: false,\n triggersDisconnection: false,\n },\n ): Promise<Either<DmkError, ApduResponse>> {\n const release = await this._commandMutex.lock();\n\n try {\n this._sessionEventDispatcher.dispatch({\n eventName: SessionEvents.DEVICE_STATE_UPDATE_BUSY,\n });\n const result = await this._connectedDevice.sendApdu(\n rawApdu,\n options.triggersDisconnection,\n );\n\n result\n .ifRight((response: ApduResponse) => {\n if (CommandUtils.isLockedDeviceResponse(response)) {\n this._sessionEventDispatcher.dispatch({\n eventName: SessionEvents.DEVICE_STATE_UPDATE_LOCKED,\n });\n } else {\n this._sessionEventDispatcher.dispatch({\n eventName: SessionEvents.DEVICE_STATE_UPDATE_CONNECTED,\n });\n }\n })\n .ifLeft(() => {\n this._sessionEventDispatcher.dispatch({\n eventName: SessionEvents.DEVICE_STATE_UPDATE_CONNECTED,\n });\n });\n return result;\n } finally {\n release();\n }\n }\n\n public async sendCommand<Response, Args, ErrorStatusCodes>(\n command: Command<Response, Args, ErrorStatusCodes>,\n ): Promise<CommandResult<Response, ErrorStatusCodes>> {\n const apdu = command.getApdu();\n\n const response = await this.sendApdu(apdu.getRawApdu(), {\n isPolling: false,\n triggersDisconnection: command.triggersDisconnection ?? false,\n });\n\n return response.caseOf({\n Left: (err) => {\n throw err;\n },\n Right: (r) =>\n command.parseResponse(r, this._connectedDevice.deviceModel.id),\n });\n }\n\n public executeDeviceAction<\n Output,\n Input,\n E extends DmkError,\n IntermediateValue extends DeviceActionIntermediateValue,\n >(\n deviceAction: DeviceAction<Output, Input, E, IntermediateValue>,\n ): ExecuteDeviceActionReturnType<Output, E, IntermediateValue> {\n const { observable, cancel } = deviceAction._execute({\n sendApdu: async (apdu: Uint8Array) => this.sendApdu(apdu),\n sendCommand: async <Response, ErrorStatusCodes, Args>(\n command: Command<Response, ErrorStatusCodes, Args>,\n ) => this.sendCommand(command),\n getDeviceSessionState: () => this._deviceState.getValue(),\n getDeviceSessionStateObservable: () => this.state,\n setDeviceSessionState: (state: DeviceSessionState) => {\n this.setDeviceSessionState(state);\n return this._deviceState.getValue();\n },\n disableRefresher: (blockerId: string) =>\n this._refresherService.disableRefresher(blockerId),\n getManagerApiService: () => this._managerApiService,\n getSecureChannelService: () => this._secureChannelService,\n });\n return { observable, cancel };\n }\n\n public close(): void {\n this._updateDeviceStatus(DeviceStatus.NOT_CONNECTED);\n this._deviceState.complete();\n this._deviceSessionRefresher.stopRefresher();\n }\n\n public disableRefresher(id: string): () => void {\n return this._refresherService.disableRefresher(id);\n }\n\n private _updateDeviceStatus(deviceStatus: DeviceStatus): void {\n const state = this._deviceState.getValue();\n this._deviceState.next({ ...state, deviceStatus });\n }\n}\n"],
5
- "mappings": "AACA,OAAS,mBAAAA,MAAwC,OACjD,OAAS,MAAMC,MAAc,OAI7B,OAAS,gBAAAC,MAAoB,kCAC7B,OAAS,gBAAAC,MAAoB,2BAO7B,OAEE,0BAAAC,MACK,yCAKP,OAAS,4CAAAC,MAAgD,4DACzD,OAAS,gBAAAC,MAAoB,gDAC7B,OAAS,oBAAAC,MAAwB,oDAIjC,OAAS,gBAAAC,MAAoB,iBAC7B,OACE,gCAAAC,EACA,iBAAAC,MACK,iCACP,OAAS,0BAAAC,MAA8B,2BACvC,OAAS,6BAAAC,MAAiC,8BAoBnC,MAAMC,CAAc,CACR,IACA,iBACA,aACA,mBACA,sBACA,QACA,kBACT,QACA,wBACS,kBACT,cAAgB,IAAIP,EACpB,wBAA0B,IAAIG,EAEtC,YACE,CAAE,gBAAAK,EAAiB,GAAAC,EAAKd,EAAO,CAAE,EACjCe,EACAC,EACAC,EACAC,EACA,CACA,KAAK,IAAMJ,EACX,KAAK,iBAAmBD,EACxB,KAAK,QAAUE,EAAoB,gBAAgB,EACnD,KAAK,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S,EAC3B,KAAK,wBAAwB,cAAc,CAC7C,CAEO,iBAAiBY,EAAwB,CAC9C,OAAO,KAAK,kBAAkB,iBAAiBA,CAAE,CACnD,CAEQ,oBAAoBoB,EAAkC,CAC5D,MAAMd,EAAQ,KAAK,aAAa,SAAS,EACzC,KAAK,aAAa,KAAK,CAAE,GAAGA,EAAO,aAAAc,CAAa,CAAC,CACnD,CACF",
6
- "names": ["BehaviorSubject", "uuidv4", "CommandUtils", "DeviceStatus", "DeviceSessionStateType", "DEVICE_SESSION_REFRESHER_DEFAULT_OPTIONS", "MutexService", "RefresherService", "DevicePinger", "DeviceSessionEventDispatcher", "SessionEvents", "DeviceSessionRefresher", "DeviceSessionStateHandler", "DeviceSession", "connectedDevice", "id", "loggerModuleFactory", "managerApiService", "secureChannelService", "deviceSessionRefresherOptions", "command", "state", "error", "rawApdu", "options", "release", "result", "response", "apdu", "err", "r", "deviceAction", "observable", "cancel", "blockerId", "deviceStatus"]
4
+ "sourcesContent": ["import { type Either } from \"purify-ts\";\nimport { BehaviorSubject, type Observable } from \"rxjs\";\nimport { v4 as uuidv4 } from \"uuid\";\n\nimport { type Command } from \"@api/command/Command\";\nimport { type CommandResult } from \"@api/command/model/CommandResult\";\nimport { CommandUtils } from \"@api/command/utils/CommandUtils\";\nimport { DeviceStatus } from \"@api/device/DeviceStatus\";\nimport {\n type DeviceAction,\n type DeviceActionIntermediateValue,\n type ExecuteDeviceActionReturnType,\n} from \"@api/device-action/DeviceAction\";\nimport { type ApduResponse } from \"@api/device-session/ApduResponse\";\nimport {\n type DeviceSessionState,\n DeviceSessionStateType,\n} from \"@api/device-session/DeviceSessionState\";\nimport { type DeviceSessionId } from \"@api/device-session/types\";\nimport { type DmkError } from \"@api/Error\";\nimport { type LoggerPublisherService } from \"@api/logger-publisher/service/LoggerPublisherService\";\nimport { type TransportConnectedDevice } from \"@api/transport/model/TransportConnectedDevice\";\nimport { DEVICE_SESSION_REFRESHER_DEFAULT_OPTIONS } from \"@internal/device-session/data/DeviceSessionRefresherConst\";\nimport { MutexService } from \"@internal/device-session/service/MutexService\";\nimport { RefresherService } from \"@internal/device-session/service/RefresherService\";\nimport { type ManagerApiService } from \"@internal/manager-api/service/ManagerApiService\";\nimport { type SecureChannelService } from \"@internal/secure-channel/service/SecureChannelService\";\n\nimport { DevicePinger } from \"./DevicePinger\";\nimport {\n DeviceSessionEventDispatcher,\n SessionEvents,\n} from \"./DeviceSessionEventDispatcher\";\nimport { DeviceSessionRefresher } from \"./DeviceSessionRefresher\";\nimport { DeviceSessionStateHandler } from \"./DeviceSessionStateHandler\";\n\nexport type SessionConstructorArgs = {\n connectedDevice: TransportConnectedDevice;\n id?: DeviceSessionId;\n};\n\nexport type DeviceSessionRefresherOptions = {\n isRefresherDisabled: boolean;\n pollingInterval?: number;\n};\n\ntype SendApduOptions = {\n isPolling?: boolean;\n triggersDisconnection?: boolean;\n abortTimeout?: number;\n};\n\n/**\n * Represents a session with a device.\n */\nexport class DeviceSession {\n private readonly _id: DeviceSessionId;\n private readonly _connectedDevice: TransportConnectedDevice;\n private readonly _deviceState: BehaviorSubject<DeviceSessionState>;\n private readonly _managerApiService: ManagerApiService;\n private readonly _secureChannelService: SecureChannelService;\n private readonly _logger: LoggerPublisherService;\n private readonly _refresherOptions: DeviceSessionRefresherOptions;\n private _pinger: DevicePinger;\n private _deviceSessionRefresher: DeviceSessionRefresher;\n private readonly _refresherService: RefresherService;\n private _commandMutex = new MutexService();\n private _sessionEventDispatcher = new DeviceSessionEventDispatcher();\n\n constructor(\n { connectedDevice, id = uuidv4() }: SessionConstructorArgs,\n loggerModuleFactory: (tag: string) => LoggerPublisherService,\n managerApiService: ManagerApiService,\n secureChannelService: SecureChannelService,\n deviceSessionRefresherOptions: DeviceSessionRefresherOptions | undefined,\n ) {\n this._id = id;\n this._connectedDevice = connectedDevice;\n this._logger = loggerModuleFactory(\"device-session\");\n this._managerApiService = managerApiService;\n this._secureChannelService = secureChannelService;\n this._refresherOptions = {\n ...DEVICE_SESSION_REFRESHER_DEFAULT_OPTIONS,\n ...deviceSessionRefresherOptions,\n };\n this._deviceState = new BehaviorSubject<DeviceSessionState>({\n sessionStateType: DeviceSessionStateType.Connected,\n deviceStatus: DeviceStatus.CONNECTED,\n deviceModelId: this._connectedDevice.deviceModel.id,\n });\n\n this._pinger = new DevicePinger(\n loggerModuleFactory,\n connectedDevice,\n this._sessionEventDispatcher,\n (command, abortTimeout) => this.sendCommand(command, abortTimeout),\n );\n this._deviceSessionRefresher = new DeviceSessionRefresher(\n loggerModuleFactory,\n this._refresherOptions,\n this._sessionEventDispatcher,\n this._connectedDevice,\n );\n new DeviceSessionStateHandler(\n loggerModuleFactory,\n this._sessionEventDispatcher,\n this._connectedDevice,\n this._deviceState,\n (state) => this.setDeviceSessionState(state),\n );\n\n this._refresherService = new RefresherService(loggerModuleFactory, {\n start: () => this._deviceSessionRefresher.restartRefresher(),\n stop: () => this._deviceSessionRefresher.stopRefresher(),\n });\n }\n\n public async initialiseSession(): Promise<void> {\n try {\n await this._pinger.ping();\n } catch (error) {\n this._logger.error(\"Error while initialising session\", {\n data: { error },\n });\n throw error;\n } finally {\n if (!this._refresherOptions.isRefresherDisabled) {\n this._deviceSessionRefresher.startRefresher();\n }\n }\n }\n\n public get id(): DeviceSessionId {\n return this._id;\n }\n\n public get connectedDevice(): TransportConnectedDevice {\n return this._connectedDevice;\n }\n\n public get state(): Observable<DeviceSessionState> {\n return this._deviceState.asObservable();\n }\n\n public getDeviceSessionState(): DeviceSessionState {\n return this._deviceState.getValue();\n }\n\n public setDeviceSessionState(state: DeviceSessionState): void {\n this._deviceState.next(state);\n }\n\n public async sendApdu(\n rawApdu: Uint8Array,\n options: SendApduOptions = {\n isPolling: false,\n triggersDisconnection: false,\n abortTimeout: undefined,\n },\n ): Promise<Either<DmkError, ApduResponse>> {\n const release = await this._commandMutex.lock();\n\n try {\n this._sessionEventDispatcher.dispatch({\n eventName: SessionEvents.DEVICE_STATE_UPDATE_BUSY,\n });\n const result = await this._connectedDevice.sendApdu(\n rawApdu,\n options.triggersDisconnection,\n options.abortTimeout,\n );\n\n result\n .ifRight((response: ApduResponse) => {\n if (CommandUtils.isLockedDeviceResponse(response)) {\n this._sessionEventDispatcher.dispatch({\n eventName: SessionEvents.DEVICE_STATE_UPDATE_LOCKED,\n });\n } else {\n this._sessionEventDispatcher.dispatch({\n eventName: SessionEvents.DEVICE_STATE_UPDATE_CONNECTED,\n });\n }\n })\n .ifLeft(() => {\n this._sessionEventDispatcher.dispatch({\n eventName: SessionEvents.DEVICE_STATE_UPDATE_CONNECTED,\n });\n });\n return result;\n } finally {\n release();\n }\n }\n\n public async sendCommand<Response, Args, ErrorStatusCodes>(\n command: Command<Response, Args, ErrorStatusCodes>,\n abortTimeout?: number,\n ): Promise<CommandResult<Response, ErrorStatusCodes>> {\n const apdu = command.getApdu();\n\n const response = await this.sendApdu(apdu.getRawApdu(), {\n isPolling: false,\n triggersDisconnection: command.triggersDisconnection ?? false,\n abortTimeout,\n });\n\n return response.caseOf({\n Left: (err) => {\n throw err;\n },\n Right: (r) =>\n command.parseResponse(r, this._connectedDevice.deviceModel.id),\n });\n }\n\n public executeDeviceAction<\n Output,\n Input,\n E extends DmkError,\n IntermediateValue extends DeviceActionIntermediateValue,\n >(\n deviceAction: DeviceAction<Output, Input, E, IntermediateValue>,\n ): ExecuteDeviceActionReturnType<Output, E, IntermediateValue> {\n const { observable, cancel } = deviceAction._execute({\n sendApdu: async (apdu: Uint8Array) => this.sendApdu(apdu),\n sendCommand: async <Response, ErrorStatusCodes, Args>(\n command: Command<Response, ErrorStatusCodes, Args>,\n abortTimeout?: number,\n ) => this.sendCommand(command, abortTimeout),\n getDeviceModel: () => this._connectedDevice.deviceModel,\n getDeviceSessionState: () => this._deviceState.getValue(),\n getDeviceSessionStateObservable: () => this.state,\n setDeviceSessionState: (state: DeviceSessionState) => {\n this.setDeviceSessionState(state);\n return this._deviceState.getValue();\n },\n disableRefresher: (blockerId: string) =>\n this._refresherService.disableRefresher(blockerId),\n getManagerApiService: () => this._managerApiService,\n getSecureChannelService: () => this._secureChannelService,\n });\n return { observable, cancel };\n }\n\n public close(): void {\n this._updateDeviceStatus(DeviceStatus.NOT_CONNECTED);\n this._deviceState.complete();\n this._deviceSessionRefresher.stopRefresher();\n }\n\n public disableRefresher(id: string): () => void {\n return this._refresherService.disableRefresher(id);\n }\n\n private _updateDeviceStatus(deviceStatus: DeviceStatus): void {\n const state = this._deviceState.getValue();\n this._deviceState.next({ ...state, deviceStatus });\n }\n}\n"],
5
+ "mappings": "AACA,OAAS,mBAAAA,MAAwC,OACjD,OAAS,MAAMC,MAAc,OAI7B,OAAS,gBAAAC,MAAoB,kCAC7B,OAAS,gBAAAC,MAAoB,2BAO7B,OAEE,0BAAAC,MACK,yCAKP,OAAS,4CAAAC,MAAgD,4DACzD,OAAS,gBAAAC,MAAoB,gDAC7B,OAAS,oBAAAC,MAAwB,oDAIjC,OAAS,gBAAAC,MAAoB,iBAC7B,OACE,gCAAAC,EACA,iBAAAC,MACK,iCACP,OAAS,0BAAAC,MAA8B,2BACvC,OAAS,6BAAAC,MAAiC,8BAqBnC,MAAMC,CAAc,CACR,IACA,iBACA,aACA,mBACA,sBACA,QACA,kBACT,QACA,wBACS,kBACT,cAAgB,IAAIP,EACpB,wBAA0B,IAAIG,EAEtC,YACE,CAAE,gBAAAK,EAAiB,GAAAC,EAAKd,EAAO,CAAE,EACjCe,EACAC,EACAC,EACAC,EACA,CACA,KAAK,IAAMJ,EACX,KAAK,iBAAmBD,EACxB,KAAK,QAAUE,EAAoB,gBAAgB,EACnD,KAAK,mBAAqBC,EAC1B,KAAK,sBAAwBC,EAC7B,KAAK,kBAAoB,CACvB,GAAGb,EACH,GAAGc,CACL,EACA,KAAK,aAAe,IAAInB,EAAoC,CAC1D,iBAAkBI,EAAuB,UACzC,aAAcD,EAAa,UAC3B,cAAe,KAAK,iBAAiB,YAAY,EACnD,CAAC,EAED,KAAK,QAAU,IAAIK,EACjBQ,EACAF,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AkB,iBAAiBA,CAAE,CACnD,CAEQ,oBAAoBoB,EAAkC,CAC5D,MAAMb,EAAQ,KAAK,aAAa,SAAS,EACzC,KAAK,aAAa,KAAK,CAAE,GAAGA,EAAO,aAAAa,CAAa,CAAC,CACnD,CACF",
6
+ "names": ["BehaviorSubject", "uuidv4", "CommandUtils", "DeviceStatus", "DeviceSessionStateType", "DEVICE_SESSION_REFRESHER_DEFAULT_OPTIONS", "MutexService", "RefresherService", "DevicePinger", "DeviceSessionEventDispatcher", "SessionEvents", "DeviceSessionRefresher", "DeviceSessionStateHandler", "DeviceSession", "connectedDevice", "id", "loggerModuleFactory", "managerApiService", "secureChannelService", "deviceSessionRefresherOptions", "command", "abortTimeout", "state", "error", "rawApdu", "options", "release", "result", "response", "apdu", "err", "deviceAction", "observable", "cancel", "blockerId", "deviceStatus"]
7
7
  }