@ledgerhq/device-management-kit 0.0.0-signer-eth-plugin-fix-20250331141239 → 0.0.0-test-recursive-stack-20251002122259

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 (780) hide show
  1. package/README.md +43 -6
  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 +3 -3
  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-action/xstate-utils/XStateDeviceAction.js +1 -1
  122. package/lib/cjs/src/api/device-action/xstate-utils/XStateDeviceAction.js.map +2 -2
  123. package/lib/cjs/src/api/device-model/data/StaticDeviceModelDataSource.js +1 -1
  124. package/lib/cjs/src/api/device-model/data/StaticDeviceModelDataSource.js.map +2 -2
  125. package/lib/cjs/src/api/device-model/data/StaticDeviceModelDataSource.test.js +1 -1
  126. package/lib/cjs/src/api/device-model/data/StaticDeviceModelDataSource.test.js.map +2 -2
  127. package/lib/cjs/src/api/device-model/model/DeviceModel.js +1 -1
  128. package/lib/cjs/src/api/device-model/model/DeviceModel.js.map +2 -2
  129. package/lib/cjs/src/api/device-model/model/DeviceModel.stub.js +1 -1
  130. package/lib/cjs/src/api/device-model/model/DeviceModel.stub.js.map +2 -2
  131. package/lib/cjs/src/api/device-session/DeviceSessionState.js +1 -1
  132. package/lib/cjs/src/api/device-session/DeviceSessionState.js.map +2 -2
  133. package/lib/cjs/src/api/index.js +1 -1
  134. package/lib/cjs/src/api/index.js.map +3 -3
  135. package/lib/cjs/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.js +1 -1
  136. package/lib/cjs/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.js.map +2 -2
  137. package/lib/cjs/src/api/secure-channel/device-action/GenuineCheck/types.js.map +1 -1
  138. package/lib/cjs/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.js +1 -1
  139. package/lib/cjs/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.js.map +3 -3
  140. package/lib/cjs/src/api/secure-channel/device-action/InstallApp/types.js +1 -1
  141. package/lib/cjs/src/api/secure-channel/device-action/InstallApp/types.js.map +1 -1
  142. package/lib/cjs/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.js +1 -1
  143. package/lib/cjs/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.js.map +2 -2
  144. package/lib/cjs/src/api/secure-channel/device-action/ListInstalledApps/types.js +1 -1
  145. package/lib/cjs/src/api/secure-channel/device-action/ListInstalledApps/types.js.map +2 -2
  146. package/lib/cjs/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.js +1 -1
  147. package/lib/cjs/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.js.map +3 -3
  148. package/lib/cjs/src/api/secure-channel/device-action/UninstallApp/types.js +1 -1
  149. package/lib/cjs/src/api/secure-channel/device-action/UninstallApp/types.js.map +1 -1
  150. package/lib/cjs/src/api/secure-channel/task/ConnectToSecureChannelTask.js +1 -1
  151. package/lib/cjs/src/api/secure-channel/task/ConnectToSecureChannelTask.js.map +3 -3
  152. package/lib/cjs/src/api/secure-channel/task/ConnectToSecureChannelTask.test.js +1 -1
  153. package/lib/cjs/src/api/secure-channel/task/ConnectToSecureChannelTask.test.js.map +3 -3
  154. package/lib/cjs/src/api/secure-channel/task/types.js +1 -1
  155. package/lib/cjs/src/api/secure-channel/task/types.js.map +2 -2
  156. package/lib/cjs/src/api/secure-channel/utils.js +1 -1
  157. package/lib/cjs/src/api/secure-channel/utils.js.map +3 -3
  158. package/lib/cjs/src/api/secure-channel/utils.test.js +1 -1
  159. package/lib/cjs/src/api/secure-channel/utils.test.js.map +3 -3
  160. package/lib/cjs/src/api/transport/model/DeviceApduSender.js +2 -0
  161. package/lib/cjs/src/api/transport/model/DeviceApduSender.js.map +7 -0
  162. package/lib/cjs/src/api/transport/model/DeviceConnection.js +1 -1
  163. package/lib/cjs/src/api/transport/model/DeviceConnection.js.map +1 -1
  164. package/lib/cjs/src/api/transport/model/DeviceConnectionStateMachine.js +2 -0
  165. package/lib/cjs/src/api/transport/model/DeviceConnectionStateMachine.js.map +7 -0
  166. package/lib/cjs/src/api/transport/model/DeviceConnectionStateMachine.test.js +2 -0
  167. package/lib/cjs/src/api/transport/model/DeviceConnectionStateMachine.test.js.map +7 -0
  168. package/lib/cjs/src/api/transport/model/DiscoveredDevice.js.map +1 -1
  169. package/lib/cjs/src/api/transport/model/Errors.js +1 -1
  170. package/lib/cjs/src/api/transport/model/Errors.js.map +3 -3
  171. package/lib/cjs/src/api/transport/model/Transport.js.map +1 -1
  172. package/lib/cjs/src/api/types.js +1 -1
  173. package/lib/cjs/src/api/types.js.map +1 -1
  174. package/lib/cjs/src/api/utils/AppName.js +2 -0
  175. package/lib/cjs/src/api/utils/AppName.js.map +7 -0
  176. package/lib/cjs/src/api/utils/AppName.test.js +2 -0
  177. package/lib/cjs/src/api/utils/AppName.test.js.map +7 -0
  178. package/lib/cjs/src/api/utils/HexaString.js +1 -1
  179. package/lib/cjs/src/api/utils/HexaString.js.map +3 -3
  180. package/lib/cjs/src/api/utils/HexaString.test.js +1 -1
  181. package/lib/cjs/src/api/utils/HexaString.test.js.map +2 -2
  182. package/lib/cjs/src/di.js +1 -1
  183. package/lib/cjs/src/di.js.map +2 -2
  184. package/lib/cjs/src/internal/config/di/configModule.js +1 -1
  185. package/lib/cjs/src/internal/config/di/configModule.js.map +3 -3
  186. package/lib/cjs/src/internal/config/di/configModule.test.js +1 -1
  187. package/lib/cjs/src/internal/config/di/configModule.test.js.map +2 -2
  188. package/lib/cjs/src/internal/device-model/di/deviceModelModule.js +1 -1
  189. package/lib/cjs/src/internal/device-model/di/deviceModelModule.js.map +3 -3
  190. package/lib/cjs/src/internal/device-model/di/deviceModelModule.test.js +1 -1
  191. package/lib/cjs/src/internal/device-model/di/deviceModelModule.test.js.map +2 -2
  192. package/lib/cjs/src/internal/device-session/data/ApduResponseConst.js +1 -1
  193. package/lib/cjs/src/internal/device-session/data/ApduResponseConst.js.map +3 -3
  194. package/lib/cjs/src/internal/device-session/di/deviceSessionModule.js +1 -1
  195. package/lib/cjs/src/internal/device-session/di/deviceSessionModule.js.map +3 -3
  196. package/lib/cjs/src/internal/device-session/di/deviceSessionModule.test.js +1 -1
  197. package/lib/cjs/src/internal/device-session/di/deviceSessionModule.test.js.map +2 -2
  198. package/lib/cjs/src/internal/device-session/model/DevicePinger.js +1 -1
  199. package/lib/cjs/src/internal/device-session/model/DevicePinger.js.map +3 -3
  200. package/lib/cjs/src/internal/device-session/model/DeviceSession.js +1 -1
  201. package/lib/cjs/src/internal/device-session/model/DeviceSession.js.map +3 -3
  202. package/lib/cjs/src/internal/device-session/model/DeviceSessionStateHandler.js +1 -1
  203. package/lib/cjs/src/internal/device-session/model/DeviceSessionStateHandler.js.map +3 -3
  204. package/lib/cjs/src/internal/device-session/model/DeviceSessionStateHandler.test.js +1 -1
  205. package/lib/cjs/src/internal/device-session/model/DeviceSessionStateHandler.test.js.map +3 -3
  206. package/lib/cjs/src/internal/device-session/model/Frame.js +1 -1
  207. package/lib/cjs/src/internal/device-session/model/Frame.js.map +3 -3
  208. package/lib/cjs/src/internal/device-session/service/DefaultApduReceiverService.js +1 -1
  209. package/lib/cjs/src/internal/device-session/service/DefaultApduReceiverService.js.map +2 -2
  210. package/lib/cjs/src/internal/device-session/service/DefaultApduSenderService.js +1 -1
  211. package/lib/cjs/src/internal/device-session/service/DefaultApduSenderService.js.map +2 -2
  212. package/lib/cjs/src/internal/device-session/service/DefaultApduSenderService.test.js +1 -1
  213. package/lib/cjs/src/internal/device-session/service/DefaultApduSenderService.test.js.map +2 -2
  214. package/lib/cjs/src/internal/device-session/use-case/CloseSessionsUseCase.js +1 -1
  215. package/lib/cjs/src/internal/device-session/use-case/CloseSessionsUseCase.js.map +3 -3
  216. package/lib/cjs/src/internal/device-session/use-case/CloseSessionsUseCase.test.js +1 -1
  217. package/lib/cjs/src/internal/device-session/use-case/CloseSessionsUseCase.test.js.map +3 -3
  218. package/lib/cjs/src/internal/discovery/di/discoveryModule.js +1 -1
  219. package/lib/cjs/src/internal/discovery/di/discoveryModule.js.map +3 -3
  220. package/lib/cjs/src/internal/discovery/di/discoveryModule.test.js +1 -1
  221. package/lib/cjs/src/internal/discovery/di/discoveryModule.test.js.map +2 -2
  222. package/lib/cjs/src/internal/discovery/use-case/DisconnectUseCase.test.js +1 -1
  223. package/lib/cjs/src/internal/discovery/use-case/DisconnectUseCase.test.js.map +2 -2
  224. package/lib/cjs/src/internal/discovery/use-case/ListenToAvailableDevicesUseCase.js +1 -1
  225. package/lib/cjs/src/internal/discovery/use-case/ListenToAvailableDevicesUseCase.js.map +2 -2
  226. package/lib/cjs/src/internal/discovery/use-case/StartDiscoveringUseCase.js +1 -1
  227. package/lib/cjs/src/internal/discovery/use-case/StartDiscoveringUseCase.js.map +2 -2
  228. package/lib/cjs/src/internal/discovery/use-case/StartDiscoveringUseCase.test.js +1 -1
  229. package/lib/cjs/src/internal/discovery/use-case/StartDiscoveringUseCase.test.js.map +2 -2
  230. package/lib/cjs/src/internal/discovery/use-case/StopDiscoveringUseCase.js +1 -1
  231. package/lib/cjs/src/internal/discovery/use-case/StopDiscoveringUseCase.js.map +3 -3
  232. package/lib/cjs/src/internal/discovery/use-case/StopDiscoveringUseCase.test.js +1 -1
  233. package/lib/cjs/src/internal/discovery/use-case/StopDiscoveringUseCase.test.js.map +3 -3
  234. package/lib/cjs/src/internal/logger-publisher/di/loggerModule.js +1 -1
  235. package/lib/cjs/src/internal/logger-publisher/di/loggerModule.js.map +3 -3
  236. package/lib/cjs/src/internal/logger-publisher/di/loggerModule.test.js +1 -1
  237. package/lib/cjs/src/internal/logger-publisher/di/loggerModule.test.js.map +2 -2
  238. package/lib/cjs/src/internal/manager-api/data/AxiosManagerApiDataSource.js +1 -1
  239. package/lib/cjs/src/internal/manager-api/data/AxiosManagerApiDataSource.js.map +3 -3
  240. package/lib/cjs/src/internal/manager-api/data/AxiosManagerApiDataSource.test.js +1 -1
  241. package/lib/cjs/src/internal/manager-api/data/AxiosManagerApiDataSource.test.js.map +3 -3
  242. package/lib/cjs/src/internal/manager-api/data/ManagerApiDataSource.js +1 -1
  243. package/lib/cjs/src/internal/manager-api/data/ManagerApiDataSource.js.map +1 -1
  244. package/lib/cjs/src/internal/manager-api/data/ManagerApiDto.js +1 -1
  245. package/lib/cjs/src/internal/manager-api/data/ManagerApiDto.js.map +1 -1
  246. package/lib/cjs/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.js +1 -1
  247. package/lib/cjs/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.js.map +2 -2
  248. package/lib/cjs/src/internal/manager-api/di/managerApiModule.js +1 -1
  249. package/lib/cjs/src/internal/manager-api/di/managerApiModule.js.map +3 -3
  250. package/lib/cjs/src/internal/manager-api/di/managerApiModule.test.js +1 -1
  251. package/lib/cjs/src/internal/manager-api/di/managerApiModule.test.js.map +2 -2
  252. package/lib/cjs/src/internal/manager-api/di/managerApiTypes.js +1 -1
  253. package/lib/cjs/src/internal/manager-api/di/managerApiTypes.js.map +2 -2
  254. package/lib/cjs/src/internal/manager-api/model/Application.js +1 -1
  255. package/lib/cjs/src/internal/manager-api/model/Application.js.map +1 -1
  256. package/lib/cjs/src/internal/manager-api/model/Const.js +1 -1
  257. package/lib/cjs/src/internal/manager-api/model/Const.js.map +3 -3
  258. package/lib/cjs/src/internal/manager-api/model/Firmware.js +1 -1
  259. package/lib/cjs/src/internal/manager-api/model/Firmware.js.map +1 -1
  260. package/lib/cjs/src/internal/manager-api/model/Language.js +2 -0
  261. package/lib/cjs/src/internal/manager-api/model/Language.js.map +7 -0
  262. package/lib/cjs/src/internal/manager-api/model/Params.js +1 -1
  263. package/lib/cjs/src/internal/manager-api/model/Params.js.map +1 -1
  264. package/lib/cjs/src/internal/manager-api/service/DefaultManagerApiService.js +1 -1
  265. package/lib/cjs/src/internal/manager-api/service/DefaultManagerApiService.js.map +3 -3
  266. package/lib/cjs/src/internal/manager-api/service/DefaultManagerApiService.test.js +1 -1
  267. package/lib/cjs/src/internal/manager-api/service/DefaultManagerApiService.test.js.map +3 -3
  268. package/lib/cjs/src/internal/manager-api/service/ManagerApiService.js +1 -1
  269. package/lib/cjs/src/internal/manager-api/service/ManagerApiService.js.map +1 -1
  270. package/lib/cjs/src/internal/manager-api/use-case/SetProviderUseCase.js +2 -0
  271. package/lib/cjs/src/internal/manager-api/use-case/SetProviderUseCase.js.map +7 -0
  272. package/lib/cjs/src/internal/manager-api/use-case/SetProviderUseCase.test.js +2 -0
  273. package/lib/cjs/src/internal/manager-api/use-case/SetProviderUseCase.test.js.map +7 -0
  274. package/lib/cjs/src/internal/secure-channel/di/secureChannelModule.js +1 -1
  275. package/lib/cjs/src/internal/secure-channel/di/secureChannelModule.js.map +3 -3
  276. package/lib/cjs/src/internal/secure-channel/di/secureChannelModule.test.js +1 -1
  277. package/lib/cjs/src/internal/secure-channel/di/secureChannelModule.test.js.map +2 -2
  278. package/lib/cjs/src/internal/secure-channel/model/Errors.js +1 -1
  279. package/lib/cjs/src/internal/secure-channel/model/Errors.js.map +3 -3
  280. package/lib/cjs/src/internal/secure-channel/service/DefaultSecureChannelService.js +1 -1
  281. package/lib/cjs/src/internal/secure-channel/service/DefaultSecureChannelService.js.map +3 -3
  282. package/lib/cjs/src/internal/secure-channel/service/DefaultSecureChannelService.test.js +1 -1
  283. package/lib/cjs/src/internal/secure-channel/service/DefaultSecureChannelService.test.js.map +3 -3
  284. package/lib/cjs/src/internal/secure-channel/service/SecureChannelService.js +1 -1
  285. package/lib/cjs/src/internal/secure-channel/service/SecureChannelService.js.map +1 -1
  286. package/lib/cjs/src/internal/send/di/sendModule.js +1 -1
  287. package/lib/cjs/src/internal/send/di/sendModule.js.map +3 -3
  288. package/lib/cjs/src/internal/send/di/sendModule.test.js +1 -1
  289. package/lib/cjs/src/internal/send/di/sendModule.test.js.map +2 -2
  290. package/lib/cjs/src/internal/send/use-case/SendApduUseCase.js +1 -1
  291. package/lib/cjs/src/internal/send/use-case/SendApduUseCase.js.map +3 -3
  292. package/lib/cjs/src/internal/transport/di/transportModule.js +1 -1
  293. package/lib/cjs/src/internal/transport/di/transportModule.js.map +3 -3
  294. package/lib/cjs/src/internal/transport/di/transportModule.test.js +1 -1
  295. package/lib/cjs/src/internal/transport/di/transportModule.test.js.map +2 -2
  296. package/lib/cjs/src/internal/transport/service/DefaultTransportService.js +1 -1
  297. package/lib/cjs/src/internal/transport/service/DefaultTransportService.js.map +3 -3
  298. package/lib/cjs/src/internal/transport/service/TransportService.js +1 -1
  299. package/lib/cjs/src/internal/transport/service/TransportService.js.map +1 -1
  300. package/lib/cjs/src/internal/transport/service/__mocks__/DefaultTransportService.js +1 -1
  301. package/lib/cjs/src/internal/transport/service/__mocks__/DefaultTransportService.js.map +2 -2
  302. package/lib/esm/package.json +22 -23
  303. package/lib/esm/src/api/DeviceManagementKit.js +1 -1
  304. package/lib/esm/src/api/DeviceManagementKit.js.map +3 -3
  305. package/lib/esm/src/api/DeviceManagementKit.test.js +1 -1
  306. package/lib/esm/src/api/DeviceManagementKit.test.js.map +3 -3
  307. package/lib/esm/src/api/DeviceManagementKitBuilder.js +1 -1
  308. package/lib/esm/src/api/DeviceManagementKitBuilder.js.map +3 -3
  309. package/lib/esm/src/api/apdu/utils/ByteArrayBuilder.js +1 -1
  310. package/lib/esm/src/api/apdu/utils/ByteArrayBuilder.js.map +3 -3
  311. package/lib/esm/src/api/apdu/utils/ByteArrayBuilder.test.js +1 -1
  312. package/lib/esm/src/api/apdu/utils/ByteArrayBuilder.test.js.map +2 -2
  313. package/lib/esm/src/api/apdu/utils/ByteArrayParser.js +1 -1
  314. package/lib/esm/src/api/apdu/utils/ByteArrayParser.js.map +3 -3
  315. package/lib/esm/src/api/command/di/commandModule.js +1 -1
  316. package/lib/esm/src/api/command/di/commandModule.js.map +3 -3
  317. package/lib/esm/src/api/command/di/commandModule.test.js +1 -1
  318. package/lib/esm/src/api/command/di/commandModule.test.js.map +2 -2
  319. package/lib/esm/src/api/command/os/GetCustomImageSizeCommand.js +2 -0
  320. package/lib/esm/src/api/command/os/GetCustomImageSizeCommand.js.map +7 -0
  321. package/lib/esm/src/api/command/os/GetCustomImageSizeCommand.test.js +2 -0
  322. package/lib/esm/src/api/command/os/GetCustomImageSizeCommand.test.js.map +7 -0
  323. package/lib/esm/src/api/command/os/GetOsVersionCommand.js +1 -1
  324. package/lib/esm/src/api/command/os/GetOsVersionCommand.js.map +3 -3
  325. package/lib/esm/src/api/command/os/GetOsVersionCommand.test.js +1 -1
  326. package/lib/esm/src/api/command/os/GetOsVersionCommand.test.js.map +3 -3
  327. package/lib/esm/src/api/command/os/ListLanguagePackCommand.js +2 -0
  328. package/lib/esm/src/api/command/os/ListLanguagePackCommand.js.map +7 -0
  329. package/lib/esm/src/api/command/os/ListLanguagePackCommand.test.js +2 -0
  330. package/lib/esm/src/api/command/os/ListLanguagePackCommand.test.js.map +7 -0
  331. package/lib/esm/src/api/command/os/__mocks__/GetOsVersionCommand.js +1 -1
  332. package/lib/esm/src/api/command/os/__mocks__/GetOsVersionCommand.js.map +2 -2
  333. package/lib/esm/src/api/command/use-case/SendCommandUseCase.js +1 -1
  334. package/lib/esm/src/api/command/use-case/SendCommandUseCase.js.map +3 -3
  335. package/lib/esm/src/api/command/utils/CommandUtils.js +1 -1
  336. package/lib/esm/src/api/command/utils/CommandUtils.js.map +3 -3
  337. package/lib/esm/src/api/command/utils/CommandUtils.test.js +1 -1
  338. package/lib/esm/src/api/command/utils/CommandUtils.test.js.map +3 -3
  339. package/lib/esm/src/api/command/utils/GlobalCommandError.js +1 -1
  340. package/lib/esm/src/api/command/utils/GlobalCommandError.js.map +2 -2
  341. package/lib/esm/src/api/device/DeviceModel.js +1 -1
  342. package/lib/esm/src/api/device/DeviceModel.js.map +2 -2
  343. package/lib/esm/src/api/device-action/__test-utils__/makeInternalApi.js +1 -1
  344. package/lib/esm/src/api/device-action/__test-utils__/makeInternalApi.js.map +3 -3
  345. package/lib/esm/src/api/device-action/__test-utils__/setupTestMachine.js +1 -1
  346. package/lib/esm/src/api/device-action/__test-utils__/setupTestMachine.js.map +3 -3
  347. package/lib/esm/src/api/device-action/di/deviceActionModule.js +1 -1
  348. package/lib/esm/src/api/device-action/di/deviceActionModule.js.map +3 -3
  349. package/lib/esm/src/api/device-action/di/deviceActionModule.test.js +1 -1
  350. package/lib/esm/src/api/device-action/di/deviceActionModule.test.js.map +2 -2
  351. package/lib/esm/src/api/device-action/model/UserInteractionRequired.js +1 -1
  352. package/lib/esm/src/api/device-action/model/UserInteractionRequired.js.map +2 -2
  353. package/lib/esm/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.js +1 -1
  354. package/lib/esm/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.js.map +2 -2
  355. package/lib/esm/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.test.js +1 -1
  356. package/lib/esm/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.test.js.map +2 -2
  357. package/lib/esm/src/api/device-action/os/Errors.js +1 -1
  358. package/lib/esm/src/api/device-action/os/Errors.js.map +3 -3
  359. package/lib/esm/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.js +2 -0
  360. package/lib/esm/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.js.map +7 -0
  361. package/lib/esm/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.test.js +2 -0
  362. package/lib/esm/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.test.js.map +7 -0
  363. package/lib/esm/src/api/device-action/os/GetDeviceMetadata/types.js +1 -0
  364. package/lib/esm/src/api/device-action/os/GetDeviceMetadata/types.js.map +7 -0
  365. package/lib/esm/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.js +1 -1
  366. package/lib/esm/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.js.map +3 -3
  367. package/lib/esm/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.test.js +1 -1
  368. package/lib/esm/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.test.js.map +2 -2
  369. package/lib/esm/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.js +1 -1
  370. package/lib/esm/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.js.map +3 -3
  371. package/lib/esm/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.js +2 -0
  372. package/lib/esm/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.js.map +7 -0
  373. package/lib/esm/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.test.js +2 -0
  374. package/lib/esm/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.test.js.map +7 -0
  375. package/lib/esm/src/api/device-action/os/InstallOrUpdateApps/types.js +1 -0
  376. package/lib/esm/src/api/device-action/os/InstallOrUpdateApps/types.js.map +7 -0
  377. package/lib/esm/src/api/device-action/os/ListApps/ListAppsDeviceAction.js +1 -1
  378. package/lib/esm/src/api/device-action/os/ListApps/ListAppsDeviceAction.js.map +2 -2
  379. package/lib/esm/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.js +1 -1
  380. package/lib/esm/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.js.map +3 -3
  381. package/lib/esm/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.test.js +1 -1
  382. package/lib/esm/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.test.js.map +3 -3
  383. package/lib/esm/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.js +2 -0
  384. package/lib/esm/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.js.map +7 -0
  385. package/lib/esm/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.test.js +2 -0
  386. package/lib/esm/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.test.js.map +7 -0
  387. package/lib/esm/src/api/device-action/os/OpenAppWithDependencies/types.js +1 -0
  388. package/lib/esm/src/api/device-action/os/OpenAppWithDependencies/types.js.map +7 -0
  389. package/lib/esm/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.js +1 -1
  390. package/lib/esm/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.js.map +2 -2
  391. package/lib/esm/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.test.js +1 -1
  392. package/lib/esm/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.test.js.map +2 -2
  393. package/lib/esm/src/api/device-action/task/BuildAppsInstallPlanTask.js +2 -0
  394. package/lib/esm/src/api/device-action/task/BuildAppsInstallPlanTask.js.map +7 -0
  395. package/lib/esm/src/api/device-action/task/BuildAppsInstallPlanTask.test.js +2 -0
  396. package/lib/esm/src/api/device-action/task/BuildAppsInstallPlanTask.test.js.map +7 -0
  397. package/lib/esm/src/api/device-action/task/GetApplicationsMetadataTask.js +2 -0
  398. package/lib/esm/src/api/device-action/task/GetApplicationsMetadataTask.js.map +7 -0
  399. package/lib/esm/src/api/device-action/task/GetApplicationsMetadataTask.test.js +2 -0
  400. package/lib/esm/src/api/device-action/task/GetApplicationsMetadataTask.test.js.map +7 -0
  401. package/lib/esm/src/api/device-action/task/GetFirmwareMetadataTask.js +2 -0
  402. package/lib/esm/src/api/device-action/task/GetFirmwareMetadataTask.js.map +7 -0
  403. package/lib/esm/src/api/device-action/task/GetFirmwareMetadataTask.test.js +2 -0
  404. package/lib/esm/src/api/device-action/task/GetFirmwareMetadataTask.test.js.map +7 -0
  405. package/lib/esm/src/api/device-action/task/PredictOutOfMemoryTask.js +2 -0
  406. package/lib/esm/src/api/device-action/task/PredictOutOfMemoryTask.js.map +7 -0
  407. package/lib/esm/src/api/device-action/task/PredictOutOfMemoryTask.test.js +2 -0
  408. package/lib/esm/src/api/device-action/task/PredictOutOfMemoryTask.test.js.map +7 -0
  409. package/lib/esm/src/api/device-action/xstate-utils/XStateDeviceAction.js +1 -1
  410. package/lib/esm/src/api/device-action/xstate-utils/XStateDeviceAction.js.map +2 -2
  411. package/lib/esm/src/api/device-model/data/StaticDeviceModelDataSource.js +1 -1
  412. package/lib/esm/src/api/device-model/data/StaticDeviceModelDataSource.js.map +2 -2
  413. package/lib/esm/src/api/device-model/data/StaticDeviceModelDataSource.test.js +1 -1
  414. package/lib/esm/src/api/device-model/data/StaticDeviceModelDataSource.test.js.map +2 -2
  415. package/lib/esm/src/api/device-model/model/DeviceModel.js +1 -1
  416. package/lib/esm/src/api/device-model/model/DeviceModel.js.map +2 -2
  417. package/lib/esm/src/api/device-model/model/DeviceModel.stub.js +1 -1
  418. package/lib/esm/src/api/device-model/model/DeviceModel.stub.js.map +2 -2
  419. package/lib/esm/src/api/device-session/DeviceSessionState.js +1 -1
  420. package/lib/esm/src/api/device-session/DeviceSessionState.js.map +2 -2
  421. package/lib/esm/src/api/index.js +1 -1
  422. package/lib/esm/src/api/index.js.map +3 -3
  423. package/lib/esm/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.js +1 -1
  424. package/lib/esm/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.js.map +2 -2
  425. package/lib/esm/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.js +1 -1
  426. package/lib/esm/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.js.map +3 -3
  427. package/lib/esm/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.js +1 -1
  428. package/lib/esm/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.js.map +2 -2
  429. package/lib/esm/src/api/secure-channel/device-action/ListInstalledApps/types.js +1 -1
  430. package/lib/esm/src/api/secure-channel/device-action/ListInstalledApps/types.js.map +2 -2
  431. package/lib/esm/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.js +1 -1
  432. package/lib/esm/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.js.map +3 -3
  433. package/lib/esm/src/api/secure-channel/task/ConnectToSecureChannelTask.js +1 -1
  434. package/lib/esm/src/api/secure-channel/task/ConnectToSecureChannelTask.js.map +3 -3
  435. package/lib/esm/src/api/secure-channel/task/ConnectToSecureChannelTask.test.js +1 -1
  436. package/lib/esm/src/api/secure-channel/task/ConnectToSecureChannelTask.test.js.map +3 -3
  437. package/lib/esm/src/api/secure-channel/task/types.js +1 -1
  438. package/lib/esm/src/api/secure-channel/task/types.js.map +2 -2
  439. package/lib/esm/src/api/secure-channel/utils.js +1 -1
  440. package/lib/esm/src/api/secure-channel/utils.js.map +3 -3
  441. package/lib/esm/src/api/secure-channel/utils.test.js +1 -1
  442. package/lib/esm/src/api/secure-channel/utils.test.js.map +3 -3
  443. package/lib/esm/src/api/transport/model/DeviceApduSender.js +1 -0
  444. package/lib/esm/src/api/transport/model/DeviceApduSender.js.map +7 -0
  445. package/lib/esm/src/api/transport/model/DeviceConnectionStateMachine.js +2 -0
  446. package/lib/esm/src/api/transport/model/DeviceConnectionStateMachine.js.map +7 -0
  447. package/lib/esm/src/api/transport/model/DeviceConnectionStateMachine.test.js +2 -0
  448. package/lib/esm/src/api/transport/model/DeviceConnectionStateMachine.test.js.map +7 -0
  449. package/lib/esm/src/api/transport/model/Errors.js +1 -1
  450. package/lib/esm/src/api/transport/model/Errors.js.map +3 -3
  451. package/lib/esm/src/api/utils/AppName.js +2 -0
  452. package/lib/esm/src/api/utils/AppName.js.map +7 -0
  453. package/lib/esm/src/api/utils/AppName.test.js +2 -0
  454. package/lib/esm/src/api/utils/AppName.test.js.map +7 -0
  455. package/lib/esm/src/api/utils/HexaString.js +1 -1
  456. package/lib/esm/src/api/utils/HexaString.js.map +3 -3
  457. package/lib/esm/src/api/utils/HexaString.test.js +1 -1
  458. package/lib/esm/src/api/utils/HexaString.test.js.map +2 -2
  459. package/lib/esm/src/di.js +1 -1
  460. package/lib/esm/src/di.js.map +3 -3
  461. package/lib/esm/src/internal/config/di/configModule.js +1 -1
  462. package/lib/esm/src/internal/config/di/configModule.js.map +3 -3
  463. package/lib/esm/src/internal/config/di/configModule.test.js +1 -1
  464. package/lib/esm/src/internal/config/di/configModule.test.js.map +2 -2
  465. package/lib/esm/src/internal/device-model/di/deviceModelModule.js +1 -1
  466. package/lib/esm/src/internal/device-model/di/deviceModelModule.js.map +3 -3
  467. package/lib/esm/src/internal/device-model/di/deviceModelModule.test.js +1 -1
  468. package/lib/esm/src/internal/device-model/di/deviceModelModule.test.js.map +2 -2
  469. package/lib/esm/src/internal/device-session/data/ApduResponseConst.js +1 -1
  470. package/lib/esm/src/internal/device-session/data/ApduResponseConst.js.map +3 -3
  471. package/lib/esm/src/internal/device-session/di/deviceSessionModule.js +1 -1
  472. package/lib/esm/src/internal/device-session/di/deviceSessionModule.js.map +3 -3
  473. package/lib/esm/src/internal/device-session/di/deviceSessionModule.test.js +1 -1
  474. package/lib/esm/src/internal/device-session/di/deviceSessionModule.test.js.map +2 -2
  475. package/lib/esm/src/internal/device-session/model/DevicePinger.js +1 -1
  476. package/lib/esm/src/internal/device-session/model/DevicePinger.js.map +3 -3
  477. package/lib/esm/src/internal/device-session/model/DeviceSession.js +1 -1
  478. package/lib/esm/src/internal/device-session/model/DeviceSession.js.map +3 -3
  479. package/lib/esm/src/internal/device-session/model/DeviceSessionStateHandler.js +1 -1
  480. package/lib/esm/src/internal/device-session/model/DeviceSessionStateHandler.js.map +3 -3
  481. package/lib/esm/src/internal/device-session/model/DeviceSessionStateHandler.test.js +1 -1
  482. package/lib/esm/src/internal/device-session/model/DeviceSessionStateHandler.test.js.map +3 -3
  483. package/lib/esm/src/internal/device-session/model/Frame.js +1 -1
  484. package/lib/esm/src/internal/device-session/model/Frame.js.map +3 -3
  485. package/lib/esm/src/internal/device-session/service/DefaultApduReceiverService.js +1 -1
  486. package/lib/esm/src/internal/device-session/service/DefaultApduReceiverService.js.map +2 -2
  487. package/lib/esm/src/internal/device-session/service/DefaultApduSenderService.js +1 -1
  488. package/lib/esm/src/internal/device-session/service/DefaultApduSenderService.js.map +2 -2
  489. package/lib/esm/src/internal/device-session/service/DefaultApduSenderService.test.js +1 -1
  490. package/lib/esm/src/internal/device-session/service/DefaultApduSenderService.test.js.map +2 -2
  491. package/lib/esm/src/internal/device-session/use-case/CloseSessionsUseCase.js +1 -1
  492. package/lib/esm/src/internal/device-session/use-case/CloseSessionsUseCase.js.map +3 -3
  493. package/lib/esm/src/internal/device-session/use-case/CloseSessionsUseCase.test.js +1 -1
  494. package/lib/esm/src/internal/device-session/use-case/CloseSessionsUseCase.test.js.map +3 -3
  495. package/lib/esm/src/internal/discovery/di/discoveryModule.js +1 -1
  496. package/lib/esm/src/internal/discovery/di/discoveryModule.js.map +3 -3
  497. package/lib/esm/src/internal/discovery/di/discoveryModule.test.js +1 -1
  498. package/lib/esm/src/internal/discovery/di/discoveryModule.test.js.map +2 -2
  499. package/lib/esm/src/internal/discovery/use-case/DisconnectUseCase.test.js +1 -1
  500. package/lib/esm/src/internal/discovery/use-case/DisconnectUseCase.test.js.map +2 -2
  501. package/lib/esm/src/internal/discovery/use-case/ListenToAvailableDevicesUseCase.js +1 -1
  502. package/lib/esm/src/internal/discovery/use-case/ListenToAvailableDevicesUseCase.js.map +2 -2
  503. package/lib/esm/src/internal/discovery/use-case/StartDiscoveringUseCase.js +1 -1
  504. package/lib/esm/src/internal/discovery/use-case/StartDiscoveringUseCase.js.map +2 -2
  505. package/lib/esm/src/internal/discovery/use-case/StartDiscoveringUseCase.test.js +1 -1
  506. package/lib/esm/src/internal/discovery/use-case/StartDiscoveringUseCase.test.js.map +2 -2
  507. package/lib/esm/src/internal/discovery/use-case/StopDiscoveringUseCase.js +1 -1
  508. package/lib/esm/src/internal/discovery/use-case/StopDiscoveringUseCase.js.map +3 -3
  509. package/lib/esm/src/internal/discovery/use-case/StopDiscoveringUseCase.test.js +1 -1
  510. package/lib/esm/src/internal/discovery/use-case/StopDiscoveringUseCase.test.js.map +3 -3
  511. package/lib/esm/src/internal/logger-publisher/di/loggerModule.js +1 -1
  512. package/lib/esm/src/internal/logger-publisher/di/loggerModule.js.map +3 -3
  513. package/lib/esm/src/internal/logger-publisher/di/loggerModule.test.js +1 -1
  514. package/lib/esm/src/internal/logger-publisher/di/loggerModule.test.js.map +2 -2
  515. package/lib/esm/src/internal/manager-api/data/AxiosManagerApiDataSource.js +1 -1
  516. package/lib/esm/src/internal/manager-api/data/AxiosManagerApiDataSource.js.map +3 -3
  517. package/lib/esm/src/internal/manager-api/data/AxiosManagerApiDataSource.test.js +1 -1
  518. package/lib/esm/src/internal/manager-api/data/AxiosManagerApiDataSource.test.js.map +3 -3
  519. package/lib/esm/src/internal/manager-api/data/ManagerApiDto.js +1 -1
  520. package/lib/esm/src/internal/manager-api/data/ManagerApiDto.js.map +1 -1
  521. package/lib/esm/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.js +1 -1
  522. package/lib/esm/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.js.map +2 -2
  523. package/lib/esm/src/internal/manager-api/di/managerApiModule.js +1 -1
  524. package/lib/esm/src/internal/manager-api/di/managerApiModule.js.map +3 -3
  525. package/lib/esm/src/internal/manager-api/di/managerApiModule.test.js +1 -1
  526. package/lib/esm/src/internal/manager-api/di/managerApiModule.test.js.map +2 -2
  527. package/lib/esm/src/internal/manager-api/di/managerApiTypes.js +1 -1
  528. package/lib/esm/src/internal/manager-api/di/managerApiTypes.js.map +2 -2
  529. package/lib/esm/src/internal/manager-api/model/Application.js +1 -1
  530. package/lib/esm/src/internal/manager-api/model/Application.js.map +1 -1
  531. package/lib/esm/src/internal/manager-api/model/Const.js +1 -1
  532. package/lib/esm/src/internal/manager-api/model/Const.js.map +3 -3
  533. package/lib/esm/src/internal/manager-api/model/Language.js +1 -0
  534. package/lib/esm/src/internal/manager-api/model/Language.js.map +7 -0
  535. package/lib/esm/src/internal/manager-api/service/DefaultManagerApiService.js +1 -1
  536. package/lib/esm/src/internal/manager-api/service/DefaultManagerApiService.js.map +3 -3
  537. package/lib/esm/src/internal/manager-api/service/DefaultManagerApiService.test.js +1 -1
  538. package/lib/esm/src/internal/manager-api/service/DefaultManagerApiService.test.js.map +3 -3
  539. package/lib/esm/src/internal/manager-api/use-case/SetProviderUseCase.js +2 -0
  540. package/lib/esm/src/internal/manager-api/use-case/SetProviderUseCase.js.map +7 -0
  541. package/lib/esm/src/internal/manager-api/use-case/SetProviderUseCase.test.js +2 -0
  542. package/lib/esm/src/internal/manager-api/use-case/SetProviderUseCase.test.js.map +7 -0
  543. package/lib/esm/src/internal/secure-channel/di/secureChannelModule.js +1 -1
  544. package/lib/esm/src/internal/secure-channel/di/secureChannelModule.js.map +3 -3
  545. package/lib/esm/src/internal/secure-channel/di/secureChannelModule.test.js +1 -1
  546. package/lib/esm/src/internal/secure-channel/di/secureChannelModule.test.js.map +2 -2
  547. package/lib/esm/src/internal/secure-channel/model/Errors.js +1 -1
  548. package/lib/esm/src/internal/secure-channel/model/Errors.js.map +3 -3
  549. package/lib/esm/src/internal/secure-channel/service/DefaultSecureChannelService.js.map +3 -3
  550. package/lib/esm/src/internal/secure-channel/service/DefaultSecureChannelService.test.js +1 -1
  551. package/lib/esm/src/internal/secure-channel/service/DefaultSecureChannelService.test.js.map +3 -3
  552. package/lib/esm/src/internal/send/di/sendModule.js +1 -1
  553. package/lib/esm/src/internal/send/di/sendModule.js.map +3 -3
  554. package/lib/esm/src/internal/send/di/sendModule.test.js +1 -1
  555. package/lib/esm/src/internal/send/di/sendModule.test.js.map +2 -2
  556. package/lib/esm/src/internal/send/use-case/SendApduUseCase.js +1 -1
  557. package/lib/esm/src/internal/send/use-case/SendApduUseCase.js.map +3 -3
  558. package/lib/esm/src/internal/transport/di/transportModule.js +1 -1
  559. package/lib/esm/src/internal/transport/di/transportModule.js.map +3 -3
  560. package/lib/esm/src/internal/transport/di/transportModule.test.js +1 -1
  561. package/lib/esm/src/internal/transport/di/transportModule.test.js.map +2 -2
  562. package/lib/esm/src/internal/transport/service/DefaultTransportService.js +1 -1
  563. package/lib/esm/src/internal/transport/service/DefaultTransportService.js.map +3 -3
  564. package/lib/esm/src/internal/transport/service/__mocks__/DefaultTransportService.js +1 -1
  565. package/lib/esm/src/internal/transport/service/__mocks__/DefaultTransportService.js.map +2 -2
  566. package/lib/types/src/api/DeviceManagementKit.d.ts +15 -1
  567. package/lib/types/src/api/DeviceManagementKit.d.ts.map +1 -1
  568. package/lib/types/src/api/DeviceManagementKitBuilder.d.ts.map +1 -1
  569. package/lib/types/src/api/DmkConfig.d.ts +2 -0
  570. package/lib/types/src/api/DmkConfig.d.ts.map +1 -1
  571. package/lib/types/src/api/apdu/utils/ApduBuilder.d.ts.map +1 -1
  572. package/lib/types/src/api/apdu/utils/ApduParser.d.ts.map +1 -1
  573. package/lib/types/src/api/apdu/utils/ByteArrayBuilder.d.ts +66 -0
  574. package/lib/types/src/api/apdu/utils/ByteArrayBuilder.d.ts.map +1 -1
  575. package/lib/types/src/api/apdu/utils/ByteArrayParser.d.ts +1 -0
  576. package/lib/types/src/api/apdu/utils/ByteArrayParser.d.ts.map +1 -1
  577. package/lib/types/src/api/command/di/commandModule.d.ts.map +1 -1
  578. package/lib/types/src/api/command/os/GetCustomImageSizeCommand.d.ts +16 -0
  579. package/lib/types/src/api/command/os/GetCustomImageSizeCommand.d.ts.map +1 -0
  580. package/lib/types/src/api/command/os/GetCustomImageSizeCommand.test.d.ts +2 -0
  581. package/lib/types/src/api/command/os/GetCustomImageSizeCommand.test.d.ts.map +1 -0
  582. package/lib/types/src/api/command/os/GetOsVersionCommand.d.ts +30 -2
  583. package/lib/types/src/api/command/os/GetOsVersionCommand.d.ts.map +1 -1
  584. package/lib/types/src/api/command/os/ListLanguagePackCommand.d.ts +24 -0
  585. package/lib/types/src/api/command/os/ListLanguagePackCommand.d.ts.map +1 -0
  586. package/lib/types/src/api/command/os/ListLanguagePackCommand.test.d.ts +2 -0
  587. package/lib/types/src/api/command/os/ListLanguagePackCommand.test.d.ts.map +1 -0
  588. package/lib/types/src/api/command/os/__mocks__/GetOsVersionCommand.d.ts.map +1 -1
  589. package/lib/types/src/api/command/use-case/SendCommandUseCase.d.ts +5 -1
  590. package/lib/types/src/api/command/use-case/SendCommandUseCase.d.ts.map +1 -1
  591. package/lib/types/src/api/command/utils/CommandErrors.d.ts.map +1 -1
  592. package/lib/types/src/api/command/utils/CommandUtils.d.ts +4 -0
  593. package/lib/types/src/api/command/utils/CommandUtils.d.ts.map +1 -1
  594. package/lib/types/src/api/command/utils/GlobalCommandError.d.ts +1 -1
  595. package/lib/types/src/api/command/utils/GlobalCommandError.d.ts.map +1 -1
  596. package/lib/types/src/api/device/DeviceModel.d.ts +2 -1
  597. package/lib/types/src/api/device/DeviceModel.d.ts.map +1 -1
  598. package/lib/types/src/api/device-action/DeviceAction.d.ts +3 -1
  599. package/lib/types/src/api/device-action/DeviceAction.d.ts.map +1 -1
  600. package/lib/types/src/api/device-action/__test-utils__/makeInternalApi.d.ts.map +1 -1
  601. package/lib/types/src/api/device-action/__test-utils__/setupTestMachine.d.ts +5 -0
  602. package/lib/types/src/api/device-action/__test-utils__/setupTestMachine.d.ts.map +1 -1
  603. package/lib/types/src/api/device-action/di/deviceActionModule.d.ts.map +1 -1
  604. package/lib/types/src/api/device-action/model/UserInteractionRequired.d.ts +1 -0
  605. package/lib/types/src/api/device-action/model/UserInteractionRequired.d.ts.map +1 -1
  606. package/lib/types/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.d.ts.map +1 -1
  607. package/lib/types/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceActionTypes.d.ts +1 -1
  608. package/lib/types/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceActionTypes.d.ts.map +1 -1
  609. package/lib/types/src/api/device-action/os/Errors.d.ts +20 -0
  610. package/lib/types/src/api/device-action/os/Errors.d.ts.map +1 -1
  611. package/lib/types/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.d.ts +58 -0
  612. package/lib/types/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.d.ts.map +1 -0
  613. package/lib/types/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.test.d.ts +2 -0
  614. package/lib/types/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.test.d.ts.map +1 -0
  615. package/lib/types/src/api/device-action/os/GetDeviceMetadata/types.d.ts +28 -0
  616. package/lib/types/src/api/device-action/os/GetDeviceMetadata/types.d.ts.map +1 -0
  617. package/lib/types/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.d.ts +1 -1
  618. package/lib/types/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.d.ts.map +1 -1
  619. package/lib/types/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.d.ts.map +1 -1
  620. package/lib/types/src/api/device-action/os/GoToDashboard/types.d.ts +3 -4
  621. package/lib/types/src/api/device-action/os/GoToDashboard/types.d.ts.map +1 -1
  622. package/lib/types/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.d.ts +40 -0
  623. package/lib/types/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.d.ts.map +1 -0
  624. package/lib/types/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.test.d.ts +2 -0
  625. package/lib/types/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.test.d.ts.map +1 -0
  626. package/lib/types/src/api/device-action/os/InstallOrUpdateApps/types.d.ts +65 -0
  627. package/lib/types/src/api/device-action/os/InstallOrUpdateApps/types.d.ts.map +1 -0
  628. package/lib/types/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.d.ts.map +1 -1
  629. package/lib/types/src/api/device-action/os/OpenAppDeviceAction/types.d.ts +0 -1
  630. package/lib/types/src/api/device-action/os/OpenAppDeviceAction/types.d.ts.map +1 -1
  631. package/lib/types/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.d.ts +15 -0
  632. package/lib/types/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.d.ts.map +1 -0
  633. package/lib/types/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.test.d.ts +2 -0
  634. package/lib/types/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.test.d.ts.map +1 -0
  635. package/lib/types/src/api/device-action/os/OpenAppWithDependencies/types.d.ts +24 -0
  636. package/lib/types/src/api/device-action/os/OpenAppWithDependencies/types.d.ts.map +1 -0
  637. package/lib/types/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.d.ts.map +1 -1
  638. package/lib/types/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceActionTypes.d.ts +1 -1
  639. package/lib/types/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceActionTypes.d.ts.map +1 -1
  640. package/lib/types/src/api/device-action/task/BuildAppsInstallPlanTask.d.ts +30 -0
  641. package/lib/types/src/api/device-action/task/BuildAppsInstallPlanTask.d.ts.map +1 -0
  642. package/lib/types/src/api/device-action/task/BuildAppsInstallPlanTask.test.d.ts +2 -0
  643. package/lib/types/src/api/device-action/task/BuildAppsInstallPlanTask.test.d.ts.map +1 -0
  644. package/lib/types/src/api/device-action/task/GetApplicationsMetadataTask.d.ts +31 -0
  645. package/lib/types/src/api/device-action/task/GetApplicationsMetadataTask.d.ts.map +1 -0
  646. package/lib/types/src/api/device-action/task/GetApplicationsMetadataTask.test.d.ts +2 -0
  647. package/lib/types/src/api/device-action/task/GetApplicationsMetadataTask.test.d.ts.map +1 -0
  648. package/lib/types/src/api/device-action/task/GetFirmwareMetadataTask.d.ts +18 -0
  649. package/lib/types/src/api/device-action/task/GetFirmwareMetadataTask.d.ts.map +1 -0
  650. package/lib/types/src/api/device-action/task/GetFirmwareMetadataTask.test.d.ts +2 -0
  651. package/lib/types/src/api/device-action/task/GetFirmwareMetadataTask.test.d.ts.map +1 -0
  652. package/lib/types/src/api/device-action/task/PredictOutOfMemoryTask.d.ts +21 -0
  653. package/lib/types/src/api/device-action/task/PredictOutOfMemoryTask.d.ts.map +1 -0
  654. package/lib/types/src/api/device-action/task/PredictOutOfMemoryTask.test.d.ts +2 -0
  655. package/lib/types/src/api/device-action/task/PredictOutOfMemoryTask.test.d.ts.map +1 -0
  656. package/lib/types/src/api/device-action/xstate-utils/XStateDeviceAction.d.ts +1 -0
  657. package/lib/types/src/api/device-action/xstate-utils/XStateDeviceAction.d.ts.map +1 -1
  658. package/lib/types/src/api/device-model/data/StaticDeviceModelDataSource.d.ts.map +1 -1
  659. package/lib/types/src/api/device-model/model/DeviceModel.d.ts +2 -0
  660. package/lib/types/src/api/device-model/model/DeviceModel.d.ts.map +1 -1
  661. package/lib/types/src/api/device-model/model/DeviceModel.stub.d.ts.map +1 -1
  662. package/lib/types/src/api/device-session/DeviceSessionState.d.ts +93 -0
  663. package/lib/types/src/api/device-session/DeviceSessionState.d.ts.map +1 -1
  664. package/lib/types/src/api/device-session/service/DefaultApduReceiverService.stub.d.ts.map +1 -1
  665. package/lib/types/src/api/device-session/service/DefaultApduSenderService.stub.d.ts.map +1 -1
  666. package/lib/types/src/api/index.d.ts +6 -1
  667. package/lib/types/src/api/index.d.ts.map +1 -1
  668. package/lib/types/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.d.ts.map +1 -1
  669. package/lib/types/src/api/secure-channel/device-action/GenuineCheck/types.d.ts +2 -1
  670. package/lib/types/src/api/secure-channel/device-action/GenuineCheck/types.d.ts.map +1 -1
  671. package/lib/types/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.d.ts.map +1 -1
  672. package/lib/types/src/api/secure-channel/device-action/InstallApp/types.d.ts +2 -1
  673. package/lib/types/src/api/secure-channel/device-action/InstallApp/types.d.ts.map +1 -1
  674. package/lib/types/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.d.ts.map +1 -1
  675. package/lib/types/src/api/secure-channel/device-action/ListInstalledApps/types.d.ts +2 -1
  676. package/lib/types/src/api/secure-channel/device-action/ListInstalledApps/types.d.ts.map +1 -1
  677. package/lib/types/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.d.ts.map +1 -1
  678. package/lib/types/src/api/secure-channel/device-action/UninstallApp/types.d.ts +2 -1
  679. package/lib/types/src/api/secure-channel/device-action/UninstallApp/types.d.ts.map +1 -1
  680. package/lib/types/src/api/secure-channel/task/ConnectToSecureChannelTask.d.ts +5 -2
  681. package/lib/types/src/api/secure-channel/task/ConnectToSecureChannelTask.d.ts.map +1 -1
  682. package/lib/types/src/api/secure-channel/task/types.d.ts +6 -1
  683. package/lib/types/src/api/secure-channel/task/types.d.ts.map +1 -1
  684. package/lib/types/src/api/secure-channel/utils.d.ts +0 -11
  685. package/lib/types/src/api/secure-channel/utils.d.ts.map +1 -1
  686. package/lib/types/src/api/transport/model/DeviceApduSender.d.ts +17 -0
  687. package/lib/types/src/api/transport/model/DeviceApduSender.d.ts.map +1 -0
  688. package/lib/types/src/api/transport/model/DeviceConnection.d.ts +2 -1
  689. package/lib/types/src/api/transport/model/DeviceConnection.d.ts.map +1 -1
  690. package/lib/types/src/api/transport/model/DeviceConnectionStateMachine.d.ts +63 -0
  691. package/lib/types/src/api/transport/model/DeviceConnectionStateMachine.d.ts.map +1 -0
  692. package/lib/types/src/api/transport/model/DeviceConnectionStateMachine.test.d.ts +2 -0
  693. package/lib/types/src/api/transport/model/DeviceConnectionStateMachine.test.d.ts.map +1 -0
  694. package/lib/types/src/api/transport/model/DiscoveredDevice.d.ts +1 -1
  695. package/lib/types/src/api/transport/model/DiscoveredDevice.d.ts.map +1 -1
  696. package/lib/types/src/api/transport/model/Errors.d.ts +27 -3
  697. package/lib/types/src/api/transport/model/Errors.d.ts.map +1 -1
  698. package/lib/types/src/api/transport/model/Transport.d.ts +1 -1
  699. package/lib/types/src/api/transport/model/Transport.d.ts.map +1 -1
  700. package/lib/types/src/api/types.d.ts +6 -2
  701. package/lib/types/src/api/types.d.ts.map +1 -1
  702. package/lib/types/src/api/utils/AppName.d.ts +2 -0
  703. package/lib/types/src/api/utils/AppName.d.ts.map +1 -0
  704. package/lib/types/src/api/utils/AppName.test.d.ts +2 -0
  705. package/lib/types/src/api/utils/AppName.test.d.ts.map +1 -0
  706. package/lib/types/src/api/utils/HexaString.d.ts +4 -3
  707. package/lib/types/src/api/utils/HexaString.d.ts.map +1 -1
  708. package/lib/types/src/di.d.ts.map +1 -1
  709. package/lib/types/src/internal/config/di/configModule.d.ts.map +1 -1
  710. package/lib/types/src/internal/device-model/di/deviceModelModule.d.ts.map +1 -1
  711. package/lib/types/src/internal/device-session/data/ApduResponseConst.d.ts +1 -0
  712. package/lib/types/src/internal/device-session/data/ApduResponseConst.d.ts.map +1 -1
  713. package/lib/types/src/internal/device-session/di/deviceSessionModule.d.ts.map +1 -1
  714. package/lib/types/src/internal/device-session/model/DevicePinger.d.ts +1 -1
  715. package/lib/types/src/internal/device-session/model/DevicePinger.d.ts.map +1 -1
  716. package/lib/types/src/internal/device-session/model/DeviceSession.d.ts +3 -1
  717. package/lib/types/src/internal/device-session/model/DeviceSession.d.ts.map +1 -1
  718. package/lib/types/src/internal/device-session/model/DeviceSession.stub.d.ts.map +1 -1
  719. package/lib/types/src/internal/device-session/model/DeviceSessionStateHandler.d.ts.map +1 -1
  720. package/lib/types/src/internal/device-session/model/Frame.d.ts.map +1 -1
  721. package/lib/types/src/internal/device-session/service/DefaultApduReceiverService.d.ts.map +1 -1
  722. package/lib/types/src/internal/device-session/use-case/CloseSessionsUseCase.d.ts +3 -1
  723. package/lib/types/src/internal/device-session/use-case/CloseSessionsUseCase.d.ts.map +1 -1
  724. package/lib/types/src/internal/device-session/utils/deviceSessionUtils.d.ts.map +1 -1
  725. package/lib/types/src/internal/discovery/di/discoveryModule.d.ts.map +1 -1
  726. package/lib/types/src/internal/discovery/use-case/ListenToAvailableDevicesUseCase.d.ts +1 -1
  727. package/lib/types/src/internal/discovery/use-case/ListenToAvailableDevicesUseCase.d.ts.map +1 -1
  728. package/lib/types/src/internal/discovery/use-case/StartDiscoveringUseCase.d.ts +1 -1
  729. package/lib/types/src/internal/discovery/use-case/StartDiscoveringUseCase.d.ts.map +1 -1
  730. package/lib/types/src/internal/discovery/use-case/StopDiscoveringUseCase.d.ts +4 -2
  731. package/lib/types/src/internal/discovery/use-case/StopDiscoveringUseCase.d.ts.map +1 -1
  732. package/lib/types/src/internal/logger-publisher/di/loggerModule.d.ts.map +1 -1
  733. package/lib/types/src/internal/manager-api/data/AxiosManagerApiDataSource.d.ts +24 -5
  734. package/lib/types/src/internal/manager-api/data/AxiosManagerApiDataSource.d.ts.map +1 -1
  735. package/lib/types/src/internal/manager-api/data/ManagerApiDataSource.d.ts +51 -6
  736. package/lib/types/src/internal/manager-api/data/ManagerApiDataSource.d.ts.map +1 -1
  737. package/lib/types/src/internal/manager-api/data/ManagerApiDto.d.ts +104 -18
  738. package/lib/types/src/internal/manager-api/data/ManagerApiDto.d.ts.map +1 -1
  739. package/lib/types/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.d.ts +7 -0
  740. package/lib/types/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.d.ts.map +1 -1
  741. package/lib/types/src/internal/manager-api/di/managerApiModule.d.ts.map +1 -1
  742. package/lib/types/src/internal/manager-api/di/managerApiTypes.d.ts +1 -0
  743. package/lib/types/src/internal/manager-api/di/managerApiTypes.d.ts.map +1 -1
  744. package/lib/types/src/internal/manager-api/model/Application.d.ts +12 -12
  745. package/lib/types/src/internal/manager-api/model/Application.d.ts.map +1 -1
  746. package/lib/types/src/internal/manager-api/model/Const.d.ts +2 -0
  747. package/lib/types/src/internal/manager-api/model/Const.d.ts.map +1 -1
  748. package/lib/types/src/internal/manager-api/model/Firmware.d.ts +17 -3
  749. package/lib/types/src/internal/manager-api/model/Firmware.d.ts.map +1 -1
  750. package/lib/types/src/internal/manager-api/model/Language.d.ts +12 -0
  751. package/lib/types/src/internal/manager-api/model/Language.d.ts.map +1 -0
  752. package/lib/types/src/internal/manager-api/model/Params.d.ts +20 -6
  753. package/lib/types/src/internal/manager-api/model/Params.d.ts.map +1 -1
  754. package/lib/types/src/internal/manager-api/service/DefaultManagerApiService.d.ts +9 -3
  755. package/lib/types/src/internal/manager-api/service/DefaultManagerApiService.d.ts.map +1 -1
  756. package/lib/types/src/internal/manager-api/service/ManagerApiService.d.ts +42 -7
  757. package/lib/types/src/internal/manager-api/service/ManagerApiService.d.ts.map +1 -1
  758. package/lib/types/src/internal/manager-api/use-case/SetProviderUseCase.d.ts +13 -0
  759. package/lib/types/src/internal/manager-api/use-case/SetProviderUseCase.d.ts.map +1 -0
  760. package/lib/types/src/internal/manager-api/use-case/SetProviderUseCase.test.d.ts +2 -0
  761. package/lib/types/src/internal/manager-api/use-case/SetProviderUseCase.test.d.ts.map +1 -0
  762. package/lib/types/src/internal/secure-channel/di/secureChannelModule.d.ts.map +1 -1
  763. package/lib/types/src/internal/secure-channel/model/Errors.d.ts +22 -2
  764. package/lib/types/src/internal/secure-channel/model/Errors.d.ts.map +1 -1
  765. package/lib/types/src/internal/secure-channel/service/DefaultSecureChannelService.d.ts +2 -2
  766. package/lib/types/src/internal/secure-channel/service/DefaultSecureChannelService.d.ts.map +1 -1
  767. package/lib/types/src/internal/secure-channel/service/SecureChannelService.d.ts +3 -3
  768. package/lib/types/src/internal/secure-channel/service/SecureChannelService.d.ts.map +1 -1
  769. package/lib/types/src/internal/send/di/sendModule.d.ts.map +1 -1
  770. package/lib/types/src/internal/send/use-case/SendApduUseCase.d.ts +9 -1
  771. package/lib/types/src/internal/send/use-case/SendApduUseCase.d.ts.map +1 -1
  772. package/lib/types/src/internal/transport/di/transportModule.d.ts.map +1 -1
  773. package/lib/types/src/internal/transport/service/DefaultTransportService.d.ts +2 -0
  774. package/lib/types/src/internal/transport/service/DefaultTransportService.d.ts.map +1 -1
  775. package/lib/types/src/internal/transport/service/TransportService.d.ts +3 -1
  776. package/lib/types/src/internal/transport/service/TransportService.d.ts.map +1 -1
  777. package/lib/types/src/internal/transport/service/__mocks__/DefaultTransportService.d.ts +1 -0
  778. package/lib/types/src/internal/transport/service/__mocks__/DefaultTransportService.d.ts.map +1 -1
  779. package/lib/types/tsconfig.prod.tsbuildinfo +1 -1
  780. package/package.json +16 -17
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/api/device-model/data/StaticDeviceModelDataSource.ts"],
4
- "sourcesContent": ["import { injectable } from \"inversify\";\n\nimport { DeviceModelId } from \"@api/device/DeviceModel\";\nimport { DeviceModelDataSource } from \"@api/device-model/data/DeviceModelDataSource\";\nimport { BleDeviceInfos } from \"@api/device-model/model/BleDeviceInfos\";\nimport { TransportDeviceModel } from \"@api/device-model/model/DeviceModel\";\n\n/**\n * Static/in memory implementation of the device model data source\n */\n@injectable()\nexport class StaticDeviceModelDataSource implements DeviceModelDataSource {\n private static deviceModelByIds: {\n [key in DeviceModelId]: TransportDeviceModel;\n } = {\n [DeviceModelId.NANO_S]: new TransportDeviceModel({\n id: DeviceModelId.NANO_S,\n productName: \"Ledger Nano S\",\n usbProductId: 0x10,\n bootloaderUsbProductId: 0x0001,\n usbOnly: true,\n memorySize: 320 * 1024,\n masks: [0x31100000],\n }),\n [DeviceModelId.NANO_SP]: new TransportDeviceModel({\n id: DeviceModelId.NANO_SP,\n productName: \"Ledger Nano S Plus\",\n usbProductId: 0x50,\n bootloaderUsbProductId: 0x0005,\n usbOnly: true,\n memorySize: 1533 * 1024,\n masks: [0x33100000],\n }),\n [DeviceModelId.NANO_X]: new TransportDeviceModel({\n id: DeviceModelId.NANO_X,\n productName: \"Ledger Nano X\",\n usbProductId: 0x40,\n bootloaderUsbProductId: 0x0004,\n usbOnly: false,\n memorySize: 2 * 1024 * 1024,\n masks: [0x33000000],\n bluetoothSpec: [\n {\n serviceUuid: \"13d63400-2c97-0004-0000-4c6564676572\",\n notifyUuid: \"13d63400-2c97-0004-0001-4c6564676572\",\n writeUuid: \"13d63400-2c97-0004-0002-4c6564676572\",\n writeCmdUuid: \"13d63400-2c97-0004-0003-4c6564676572\",\n },\n ],\n }),\n [DeviceModelId.STAX]: new TransportDeviceModel({\n id: DeviceModelId.STAX,\n productName: \"Ledger Stax\",\n usbProductId: 0x60,\n bootloaderUsbProductId: 0x0006,\n usbOnly: false,\n memorySize: 1533 * 1024,\n masks: [0x33200000],\n bluetoothSpec: [\n {\n serviceUuid: \"13d63400-2c97-6004-0000-4c6564676572\",\n notifyUuid: \"13d63400-2c97-6004-0001-4c6564676572\",\n writeUuid: \"13d63400-2c97-6004-0002-4c6564676572\",\n writeCmdUuid: \"13d63400-2c97-6004-0003-4c6564676572\",\n },\n ],\n }),\n [DeviceModelId.FLEX]: new TransportDeviceModel({\n id: DeviceModelId.FLEX,\n productName: \"Ledger Flex\",\n usbProductId: 0x70,\n bootloaderUsbProductId: 0x0007,\n usbOnly: false,\n memorySize: 1533 * 1024,\n masks: [0x33300000],\n bluetoothSpec: [\n {\n serviceUuid: \"13d63400-2c97-3004-0000-4c6564676572\",\n notifyUuid: \"13d63400-2c97-3004-0001-4c6564676572\",\n writeUuid: \"13d63400-2c97-3004-0002-4c6564676572\",\n writeCmdUuid: \"13d63400-2c97-3004-0003-4c6564676572\",\n },\n ],\n }),\n };\n\n getAllDeviceModels(): TransportDeviceModel[] {\n return Object.values(StaticDeviceModelDataSource.deviceModelByIds);\n }\n\n getDeviceModel(params: { id: DeviceModelId }): TransportDeviceModel {\n return StaticDeviceModelDataSource.deviceModelByIds[params.id];\n }\n\n /**\n * Returns the list of device models that match all the given parameters\n */\n filterDeviceModels(\n params: Partial<TransportDeviceModel>,\n ): TransportDeviceModel[] {\n return this.getAllDeviceModels().filter((deviceModel) => {\n return Object.entries(params).every(([key, value]) => {\n return deviceModel[key as keyof TransportDeviceModel] === value;\n });\n });\n }\n\n getBluetoothServicesInfos(): Record<string, BleDeviceInfos> {\n return Object.values(StaticDeviceModelDataSource.deviceModelByIds).reduce<\n Record<string, BleDeviceInfos>\n >((acc, deviceModel) => {\n const { bluetoothSpec } = deviceModel;\n if (bluetoothSpec) {\n return {\n ...acc,\n ...bluetoothSpec.reduce<Record<string, BleDeviceInfos>>(\n (serviceToModel, bleSpec) => ({\n ...serviceToModel,\n [bleSpec.serviceUuid]: new BleDeviceInfos(\n deviceModel,\n bleSpec.serviceUuid,\n bleSpec.writeUuid,\n bleSpec.writeCmdUuid,\n bleSpec.notifyUuid,\n ),\n }),\n {},\n ),\n };\n }\n return acc;\n }, {});\n }\n\n getBluetoothServices(): string[] {\n return Object.values(StaticDeviceModelDataSource.deviceModelByIds)\n .map((deviceModel) =>\n (deviceModel.bluetoothSpec || []).map((spec) => spec.serviceUuid),\n )\n .flat()\n .filter((uuid) => !!uuid);\n }\n}\n"],
5
- "mappings": "mrBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,iCAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAA2B,qBAE3BC,EAA8B,mCAE9BC,EAA+B,kDAC/BD,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O,KACnB,MAAO,CAAC,SAAU,CACpB,CAAC,EACD,CAAC,gBAAc,MAAM,EAAG,IAAI,uBAAqB,CAC/C,GAAI,gBAAc,OAClB,YAAa,gBACb,aAAc,GACd,uBAAwB,EACxB,QAAS,GACT,WAAY,EAAI,KAAO,KACvB,MAAO,CAAC,SAAU,EAClB,cAAe,CACb,CACE,YAAa,uCACb,WAAY,uCACZ,UAAW,uCACX,aAAc,sCAChB,CACF,CACF,CAAC,EACD,CAAC,gBAAc,IAAI,EAAG,IAAI,uBAAqB,CAC7C,GAAI,gBAAc,KAClB,YAAa,cACb,aAAc,GACd,uBAAwB,EACxB,QAAS,GACT,WAAY,KAAO,KACnB,MAAO,CAAC,SAAU,EAClB,cAAe,CACb,CACE,YAAa,uCACb,WAAY,uCACZ,UAAW,uCACX,aAAc,sCAChB,CACF,CACF,CAAC,EACD,CAAC,gBAAc,IAAI,EAAG,IAAI,uBAAqB,CAC7C,GAAI,gBAAc,KAClB,YAAa,cACb,aAAc,IACd,uBAAwB,EACxB,QAAS,GACT,WAAY,KAAO,KACnB,MAAO,CAAC,SAAU,EAClB,cAAe,CACb,CACE,YAAa,uCACb,WAAY,uCACZ,UAAW,uCACX,aAAc,sCAChB,CACF,CACF,CAAC,CACH,GAzEWA,EAANY,EAAA,IADN,cAAW,GACCZ",
4
+ "sourcesContent": ["import { injectable } from \"inversify\";\n\nimport { DeviceModelId } from \"@api/device/DeviceModel\";\nimport { DeviceModelDataSource } from \"@api/device-model/data/DeviceModelDataSource\";\nimport { BleDeviceInfos } from \"@api/device-model/model/BleDeviceInfos\";\nimport { TransportDeviceModel } from \"@api/device-model/model/DeviceModel\";\n\n/**\n * Static/in memory implementation of the device model data source\n */\n@injectable()\nexport class StaticDeviceModelDataSource implements DeviceModelDataSource {\n private static deviceModelByIds: {\n [_key in DeviceModelId]: TransportDeviceModel;\n } = {\n [DeviceModelId.NANO_S]: new TransportDeviceModel({\n id: DeviceModelId.NANO_S,\n productName: \"Ledger Nano S\",\n usbProductId: 0x10,\n bootloaderUsbProductId: 0x0001,\n usbOnly: true,\n memorySize: 320 * 1024,\n blockSize: 4 * 1024,\n masks: [0x31100000],\n }),\n [DeviceModelId.NANO_SP]: new TransportDeviceModel({\n id: DeviceModelId.NANO_SP,\n productName: \"Ledger Nano S Plus\",\n usbProductId: 0x50,\n bootloaderUsbProductId: 0x0005,\n usbOnly: true,\n memorySize: 1533 * 1024,\n blockSize: 32,\n masks: [0x33100000],\n }),\n [DeviceModelId.NANO_X]: new TransportDeviceModel({\n id: DeviceModelId.NANO_X,\n productName: \"Ledger Nano X\",\n usbProductId: 0x40,\n bootloaderUsbProductId: 0x0004,\n usbOnly: false,\n memorySize: 2 * 1024 * 1024,\n blockSize: 4 * 1024,\n masks: [0x33000000],\n bluetoothSpec: [\n {\n serviceUuid: \"13d63400-2c97-0004-0000-4c6564676572\",\n notifyUuid: \"13d63400-2c97-0004-0001-4c6564676572\",\n writeUuid: \"13d63400-2c97-0004-0002-4c6564676572\",\n writeCmdUuid: \"13d63400-2c97-0004-0003-4c6564676572\",\n },\n ],\n }),\n [DeviceModelId.STAX]: new TransportDeviceModel({\n id: DeviceModelId.STAX,\n productName: \"Ledger Stax\",\n usbProductId: 0x60,\n bootloaderUsbProductId: 0x0006,\n usbOnly: false,\n memorySize: 1533 * 1024,\n blockSize: 32,\n masks: [0x33200000],\n bluetoothSpec: [\n {\n serviceUuid: \"13d63400-2c97-6004-0000-4c6564676572\",\n notifyUuid: \"13d63400-2c97-6004-0001-4c6564676572\",\n writeUuid: \"13d63400-2c97-6004-0002-4c6564676572\",\n writeCmdUuid: \"13d63400-2c97-6004-0003-4c6564676572\",\n },\n ],\n }),\n [DeviceModelId.FLEX]: new TransportDeviceModel({\n id: DeviceModelId.FLEX,\n productName: \"Ledger Flex\",\n usbProductId: 0x70,\n bootloaderUsbProductId: 0x0007,\n usbOnly: false,\n memorySize: 1533 * 1024,\n blockSize: 32,\n masks: [0x33300000],\n bluetoothSpec: [\n {\n serviceUuid: \"13d63400-2c97-3004-0000-4c6564676572\",\n notifyUuid: \"13d63400-2c97-3004-0001-4c6564676572\",\n writeUuid: \"13d63400-2c97-3004-0002-4c6564676572\",\n writeCmdUuid: \"13d63400-2c97-3004-0003-4c6564676572\",\n },\n ],\n }),\n [DeviceModelId.APEX]: new TransportDeviceModel({\n id: DeviceModelId.APEX,\n productName: \"Ledger Apex\",\n usbProductId: 0x80,\n bootloaderUsbProductId: 0x0008,\n usbOnly: false,\n memorySize: 1533 * 1024,\n blockSize: 32,\n masks: [0x33400000],\n bluetoothSpec: [\n {\n serviceUuid: \"13d63400-2c97-8004-0000-4c6564676572\",\n notifyUuid: \"13d63400-2c97-8004-0001-4c6564676572\",\n writeUuid: \"13d63400-2c97-8004-0002-4c6564676572\",\n writeCmdUuid: \"13d63400-2c97-8004-0003-4c6564676572\",\n },\n ],\n }),\n };\n\n getAllDeviceModels(): TransportDeviceModel[] {\n return Object.values(StaticDeviceModelDataSource.deviceModelByIds);\n }\n\n getDeviceModel(params: { id: DeviceModelId }): TransportDeviceModel {\n return StaticDeviceModelDataSource.deviceModelByIds[params.id];\n }\n\n /**\n * Returns the list of device models that match all the given parameters\n */\n filterDeviceModels(\n params: Partial<TransportDeviceModel>,\n ): TransportDeviceModel[] {\n return this.getAllDeviceModels().filter((deviceModel) => {\n return Object.entries(params).every(([key, value]) => {\n return deviceModel[key as keyof TransportDeviceModel] === value;\n });\n });\n }\n\n getBluetoothServicesInfos(): Record<string, BleDeviceInfos> {\n return Object.values(StaticDeviceModelDataSource.deviceModelByIds).reduce<\n Record<string, BleDeviceInfos>\n >((acc, deviceModel) => {\n const { bluetoothSpec } = deviceModel;\n if (bluetoothSpec) {\n return {\n ...acc,\n ...bluetoothSpec.reduce<Record<string, BleDeviceInfos>>(\n (serviceToModel, bleSpec) => ({\n ...serviceToModel,\n [bleSpec.serviceUuid]: new BleDeviceInfos(\n deviceModel,\n bleSpec.serviceUuid,\n bleSpec.writeUuid,\n bleSpec.writeCmdUuid,\n bleSpec.notifyUuid,\n ),\n }),\n {},\n ),\n };\n }\n return acc;\n }, {});\n }\n\n getBluetoothServices(): string[] {\n return Object.values(StaticDeviceModelDataSource.deviceModelByIds)\n .map((deviceModel) =>\n (deviceModel.bluetoothSpec || []).map((spec) => spec.serviceUuid),\n )\n .flat()\n .filter((uuid) => !!uuid);\n }\n}\n"],
5
+ "mappings": "mrBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,iCAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAA2B,qBAE3BC,EAA8B,mCAE9BC,EAA+B,kDAC/BD,EAAqC,+CAM9B,IAAME,EAAN,KAAmE,CAkGxE,oBAA6C,CAC3C,OAAO,OAAO,OAAOA,EAA4B,gBAAgB,CACnE,CAEA,eAAeC,EAAqD,CAClE,OAAOD,EAA4B,iBAAiBC,EAAO,EAAE,CAC/D,CAKA,mBACEA,EACwB,CACxB,OAAO,KAAK,mBAAmB,EAAE,OAAQC,GAChC,OAAO,QAAQD,CAAM,EAAE,MAAM,CAAC,CAACE,EAAKC,CAAK,IACvCF,EAAYC,CAAiC,IAAMC,CAC3D,CACF,CACH,CAEA,2BAA4D,CAC1D,OAAO,OAAO,OAAOJ,EAA4B,gBAAgB,EAAE,OAEjE,CAACK,EAAKH,IAAgB,CACtB,KAAM,CAAE,cAAAI,CAAc,EAAIJ,EAC1B,OAAII,EACK,CACL,GAAGD,EACH,GAAGC,EAAc,OACf,CAACC,EAAgBC,KAAa,CAC5B,GAAGD,EACH,CAACC,EAAQ,WAAW,EAAG,IAAI,iBACzBN,EACAM,EAAQ,YACRA,EAAQ,UACRA,EAAQ,aACRA,EAAQ,UACV,CACF,GACA,CAAC,CACH,CACF,EAEKH,CACT,EAAG,CAAC,CAAC,CACP,CAEA,sBAAiC,CAC/B,OAAO,OAAO,OAAOL,EAA4B,gBAAgB,EAC9D,IAAKE,IACHA,EAAY,eAAiB,CAAC,GAAG,IAAKO,GAASA,EAAK,WAAW,CAClE,EACC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IAAI,EAAG,IAAI,uBAAqB,CAC7C,GAAI,gBAAc,KAClB,YAAa,cACb,aAAc,IACd,uBAAwB,EACxB,QAAS,GACT,WAAY,KAAO,KACnB,UAAW,GACX,MAAO,CAAC,SAAU,EAClB,cAAe,CACb,CACE,YAAa,uCACb,WAAY,uCACZ,UAAW,uCACX,aAAc,sCAChB,CACF,CACF,CAAC,CACH,GAhGWA,EAANY,EAAA,IADN,cAAW,GACCZ",
6
6
  "names": ["StaticDeviceModelDataSource_exports", "__export", "StaticDeviceModelDataSource", "__toCommonJS", "import_inversify", "import_DeviceModel", "import_BleDeviceInfos", "StaticDeviceModelDataSource", "params", "deviceModel", "key", "value", "acc", "bluetoothSpec", "serviceToModel", "bleSpec", "spec", "uuid", "__publicField", "__decorateClass"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("../../device/DeviceModel"),s=require("../../device-model/model/BleDeviceInfos"),i=require("./StaticDeviceModelDataSource");describe("StaticDeviceModelDataSource",()=>{describe("getAllDeviceModels",()=>{it("should return all device models",()=>{const c=new i.StaticDeviceModelDataSource().getAllDeviceModels();expect(c.length).toEqual(5),expect(c).toContainEqual(expect.objectContaining({id:e.DeviceModelId.NANO_S})),expect(c).toContainEqual(expect.objectContaining({id:e.DeviceModelId.NANO_SP})),expect(c).toContainEqual(expect.objectContaining({id:e.DeviceModelId.NANO_X})),expect(c).toContainEqual(expect.objectContaining({id:e.DeviceModelId.STAX})),expect(c).toContainEqual(expect.objectContaining({id:e.DeviceModelId.FLEX}))})}),describe("getDeviceModel",()=>{it("should return the associated device model",()=>{const t=new i.StaticDeviceModelDataSource,c=t.getDeviceModel({id:e.DeviceModelId.NANO_S});expect(c).toEqual(expect.objectContaining({id:e.DeviceModelId.NANO_S}));const o=t.getDeviceModel({id:e.DeviceModelId.NANO_SP});expect(o).toEqual(expect.objectContaining({id:e.DeviceModelId.NANO_SP}));const d=t.getDeviceModel({id:e.DeviceModelId.NANO_X});expect(d).toEqual(expect.objectContaining({id:e.DeviceModelId.NANO_X}));const n=t.getDeviceModel({id:e.DeviceModelId.STAX});expect(n).toEqual(expect.objectContaining({id:e.DeviceModelId.STAX}));const l=t.getDeviceModel({id:e.DeviceModelId.FLEX});expect(l).toEqual(expect.objectContaining({id:e.DeviceModelId.FLEX}))})}),describe("filterDeviceModels",()=>{it("should return the device models that match the given single parameter",()=>{const t=new i.StaticDeviceModelDataSource,c=t.filterDeviceModels({usbOnly:!0});expect(c.length).toEqual(2),expect(c).toContainEqual(expect.objectContaining({id:e.DeviceModelId.NANO_SP})),expect(c).toContainEqual(expect.objectContaining({id:e.DeviceModelId.NANO_S}));const o=t.filterDeviceModels({usbProductId:16});expect(o.length).toEqual(1),expect(o[0]).toEqual(expect.objectContaining({id:e.DeviceModelId.NANO_S}));const d=t.filterDeviceModels({usbProductId:64});expect(d.length).toEqual(1),expect(d[0]).toEqual(expect.objectContaining({id:e.DeviceModelId.NANO_X}));const n=t.filterDeviceModels({usbProductId:80});expect(n.length).toEqual(1),expect(n[0]).toEqual(expect.objectContaining({id:e.DeviceModelId.NANO_SP}));const l=t.filterDeviceModels({usbProductId:96});expect(l.length).toEqual(1),expect(l[0]).toEqual(expect.objectContaining({id:e.DeviceModelId.STAX}));const a=t.filterDeviceModels({usbProductId:0});expect(a.length).toEqual(0)}),it("should return the device models that match the given multiple parameters",()=>{const t=new i.StaticDeviceModelDataSource,c=t.filterDeviceModels({usbOnly:!1,usbProductId:64});expect(c.length).toEqual(1),expect(c[0]).toEqual(expect.objectContaining({id:e.DeviceModelId.NANO_X}));const o=t.filterDeviceModels({usbOnly:!0,usbProductId:80});expect(o.length).toEqual(1),expect(o[0]).toEqual(expect.objectContaining({id:e.DeviceModelId.NANO_SP}));const d=t.filterDeviceModels({usbOnly:!1,usbProductId:16});expect(d.length).toEqual(0)})}),describe("getBluetoothServicesInfos",()=>{it("should return the ble service infos record",()=>{const t=new i.StaticDeviceModelDataSource,c=t.getBluetoothServicesInfos();expect(c).toStrictEqual({"13d63400-2c97-0004-0000-4c6564676572":new s.BleDeviceInfos(t.getDeviceModel({id:e.DeviceModelId.NANO_X}),"13d63400-2c97-0004-0000-4c6564676572","13d63400-2c97-0004-0002-4c6564676572","13d63400-2c97-0004-0003-4c6564676572","13d63400-2c97-0004-0001-4c6564676572"),"13d63400-2c97-6004-0000-4c6564676572":new s.BleDeviceInfos(t.getDeviceModel({id:e.DeviceModelId.STAX}),"13d63400-2c97-6004-0000-4c6564676572","13d63400-2c97-6004-0002-4c6564676572","13d63400-2c97-6004-0003-4c6564676572","13d63400-2c97-6004-0001-4c6564676572"),"13d63400-2c97-3004-0000-4c6564676572":new s.BleDeviceInfos(t.getDeviceModel({id:e.DeviceModelId.FLEX}),"13d63400-2c97-3004-0000-4c6564676572","13d63400-2c97-3004-0002-4c6564676572","13d63400-2c97-3004-0003-4c6564676572","13d63400-2c97-3004-0001-4c6564676572")})})}),describe("getBluetoothServices",()=>{it("should return the bluetooth services",()=>{const c=new i.StaticDeviceModelDataSource().getBluetoothServices();expect(c).toStrictEqual(["13d63400-2c97-0004-0000-4c6564676572","13d63400-2c97-6004-0000-4c6564676572","13d63400-2c97-3004-0000-4c6564676572"])})})});
1
+ "use strict";var e=require("../../device/DeviceModel"),n=require("../../device-model/model/BleDeviceInfos"),i=require("./StaticDeviceModelDataSource");describe("StaticDeviceModelDataSource",()=>{describe("getAllDeviceModels",()=>{it("should return all device models",()=>{const c=new i.StaticDeviceModelDataSource().getAllDeviceModels();expect(c.length).toEqual(6),expect(c).toContainEqual(expect.objectContaining({id:e.DeviceModelId.APEX})),expect(c).toContainEqual(expect.objectContaining({id:e.DeviceModelId.NANO_S})),expect(c).toContainEqual(expect.objectContaining({id:e.DeviceModelId.NANO_SP})),expect(c).toContainEqual(expect.objectContaining({id:e.DeviceModelId.NANO_X})),expect(c).toContainEqual(expect.objectContaining({id:e.DeviceModelId.STAX})),expect(c).toContainEqual(expect.objectContaining({id:e.DeviceModelId.FLEX}))})}),describe("getDeviceModel",()=>{it("should return the associated device model",()=>{const t=new i.StaticDeviceModelDataSource,c=t.getDeviceModel({id:e.DeviceModelId.NANO_S});expect(c).toEqual(expect.objectContaining({id:e.DeviceModelId.NANO_S}));const o=t.getDeviceModel({id:e.DeviceModelId.NANO_SP});expect(o).toEqual(expect.objectContaining({id:e.DeviceModelId.NANO_SP}));const d=t.getDeviceModel({id:e.DeviceModelId.NANO_X});expect(d).toEqual(expect.objectContaining({id:e.DeviceModelId.NANO_X}));const l=t.getDeviceModel({id:e.DeviceModelId.STAX});expect(l).toEqual(expect.objectContaining({id:e.DeviceModelId.STAX}));const a=t.getDeviceModel({id:e.DeviceModelId.FLEX});expect(a).toEqual(expect.objectContaining({id:e.DeviceModelId.FLEX}))})}),describe("filterDeviceModels",()=>{it("should return the device models that match the given single parameter",()=>{const t=new i.StaticDeviceModelDataSource,c=t.filterDeviceModels({usbOnly:!0});expect(c.length).toEqual(2),expect(c).toContainEqual(expect.objectContaining({id:e.DeviceModelId.NANO_SP})),expect(c).toContainEqual(expect.objectContaining({id:e.DeviceModelId.NANO_S}));const o=t.filterDeviceModels({usbProductId:16});expect(o.length).toEqual(1),expect(o[0]).toEqual(expect.objectContaining({id:e.DeviceModelId.NANO_S}));const d=t.filterDeviceModels({usbProductId:64});expect(d.length).toEqual(1),expect(d[0]).toEqual(expect.objectContaining({id:e.DeviceModelId.NANO_X}));const l=t.filterDeviceModels({usbProductId:80});expect(l.length).toEqual(1),expect(l[0]).toEqual(expect.objectContaining({id:e.DeviceModelId.NANO_SP}));const a=t.filterDeviceModels({usbProductId:96});expect(a.length).toEqual(1),expect(a[0]).toEqual(expect.objectContaining({id:e.DeviceModelId.STAX}));const s=t.filterDeviceModels({usbProductId:0});expect(s.length).toEqual(0)}),it("should return the device models that match the given multiple parameters",()=>{const t=new i.StaticDeviceModelDataSource,c=t.filterDeviceModels({usbOnly:!1,usbProductId:64});expect(c.length).toEqual(1),expect(c[0]).toEqual(expect.objectContaining({id:e.DeviceModelId.NANO_X}));const o=t.filterDeviceModels({usbOnly:!0,usbProductId:80});expect(o.length).toEqual(1),expect(o[0]).toEqual(expect.objectContaining({id:e.DeviceModelId.NANO_SP}));const d=t.filterDeviceModels({usbOnly:!1,usbProductId:16});expect(d.length).toEqual(0)})}),describe("getBluetoothServicesInfos",()=>{it("should return the ble service infos record",()=>{const t=new i.StaticDeviceModelDataSource,c=t.getBluetoothServicesInfos();expect(c).toStrictEqual({"13d63400-2c97-0004-0000-4c6564676572":new n.BleDeviceInfos(t.getDeviceModel({id:e.DeviceModelId.NANO_X}),"13d63400-2c97-0004-0000-4c6564676572","13d63400-2c97-0004-0002-4c6564676572","13d63400-2c97-0004-0003-4c6564676572","13d63400-2c97-0004-0001-4c6564676572"),"13d63400-2c97-6004-0000-4c6564676572":new n.BleDeviceInfos(t.getDeviceModel({id:e.DeviceModelId.STAX}),"13d63400-2c97-6004-0000-4c6564676572","13d63400-2c97-6004-0002-4c6564676572","13d63400-2c97-6004-0003-4c6564676572","13d63400-2c97-6004-0001-4c6564676572"),"13d63400-2c97-3004-0000-4c6564676572":new n.BleDeviceInfos(t.getDeviceModel({id:e.DeviceModelId.FLEX}),"13d63400-2c97-3004-0000-4c6564676572","13d63400-2c97-3004-0002-4c6564676572","13d63400-2c97-3004-0003-4c6564676572","13d63400-2c97-3004-0001-4c6564676572"),"13d63400-2c97-8004-0000-4c6564676572":new n.BleDeviceInfos(t.getDeviceModel({id:e.DeviceModelId.APEX}),"13d63400-2c97-8004-0000-4c6564676572","13d63400-2c97-8004-0002-4c6564676572","13d63400-2c97-8004-0003-4c6564676572","13d63400-2c97-8004-0001-4c6564676572")})})}),describe("getBluetoothServices",()=>{it("should return the bluetooth services",()=>{const c=new i.StaticDeviceModelDataSource().getBluetoothServices();expect(c).toStrictEqual(["13d63400-2c97-0004-0000-4c6564676572","13d63400-2c97-6004-0000-4c6564676572","13d63400-2c97-3004-0000-4c6564676572","13d63400-2c97-8004-0000-4c6564676572"])})})});
2
2
  //# sourceMappingURL=StaticDeviceModelDataSource.test.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/api/device-model/data/StaticDeviceModelDataSource.test.ts"],
4
- "sourcesContent": ["import { DeviceModelId } from \"@api/device/DeviceModel\";\nimport { BleDeviceInfos } from \"@api/device-model/model/BleDeviceInfos\";\n\nimport { StaticDeviceModelDataSource } from \"./StaticDeviceModelDataSource\";\n\ndescribe(\"StaticDeviceModelDataSource\", () => {\n describe(\"getAllDeviceModels\", () => {\n it(\"should return all device models\", () => {\n const dataSource = new StaticDeviceModelDataSource();\n const deviceModels = dataSource.getAllDeviceModels();\n\n // Currently supporting 4 device models\n expect(deviceModels.length).toEqual(5);\n expect(deviceModels).toContainEqual(\n expect.objectContaining({ id: DeviceModelId.NANO_S }),\n );\n expect(deviceModels).toContainEqual(\n expect.objectContaining({ id: DeviceModelId.NANO_SP }),\n );\n expect(deviceModels).toContainEqual(\n expect.objectContaining({ id: DeviceModelId.NANO_X }),\n );\n expect(deviceModels).toContainEqual(\n expect.objectContaining({ id: DeviceModelId.STAX }),\n );\n expect(deviceModels).toContainEqual(\n expect.objectContaining({ id: DeviceModelId.FLEX }),\n );\n });\n });\n\n describe(\"getDeviceModel\", () => {\n it(\"should return the associated device model\", () => {\n const dataSource = new StaticDeviceModelDataSource();\n\n const deviceModel1 = dataSource.getDeviceModel({\n id: DeviceModelId.NANO_S,\n });\n expect(deviceModel1).toEqual(\n expect.objectContaining({ id: DeviceModelId.NANO_S }),\n );\n\n const deviceModel2 = dataSource.getDeviceModel({\n id: DeviceModelId.NANO_SP,\n });\n expect(deviceModel2).toEqual(\n expect.objectContaining({ id: DeviceModelId.NANO_SP }),\n );\n\n const deviceModel3 = dataSource.getDeviceModel({\n id: DeviceModelId.NANO_X,\n });\n expect(deviceModel3).toEqual(\n expect.objectContaining({ id: DeviceModelId.NANO_X }),\n );\n\n const deviceModel4 = dataSource.getDeviceModel({\n id: DeviceModelId.STAX,\n });\n expect(deviceModel4).toEqual(\n expect.objectContaining({ id: DeviceModelId.STAX }),\n );\n\n const deviceModel5 = dataSource.getDeviceModel({\n id: DeviceModelId.FLEX,\n });\n expect(deviceModel5).toEqual(\n expect.objectContaining({ id: DeviceModelId.FLEX }),\n );\n });\n });\n\n describe(\"filterDeviceModels\", () => {\n it(\"should return the device models that match the given single parameter\", () => {\n const dataSource = new StaticDeviceModelDataSource();\n\n const deviceModels1 = dataSource.filterDeviceModels({ usbOnly: true });\n expect(deviceModels1.length).toEqual(2);\n expect(deviceModels1).toContainEqual(\n expect.objectContaining({ id: DeviceModelId.NANO_SP }),\n );\n expect(deviceModels1).toContainEqual(\n expect.objectContaining({ id: DeviceModelId.NANO_S }),\n );\n\n const deviceModels2 = dataSource.filterDeviceModels({\n usbProductId: 0x10,\n });\n expect(deviceModels2.length).toEqual(1);\n expect(deviceModels2[0]).toEqual(\n expect.objectContaining({ id: DeviceModelId.NANO_S }),\n );\n\n const deviceModels3 = dataSource.filterDeviceModels({\n usbProductId: 0x40,\n });\n expect(deviceModels3.length).toEqual(1);\n expect(deviceModels3[0]).toEqual(\n expect.objectContaining({ id: DeviceModelId.NANO_X }),\n );\n\n const deviceModels4 = dataSource.filterDeviceModels({\n usbProductId: 0x50,\n });\n expect(deviceModels4.length).toEqual(1);\n expect(deviceModels4[0]).toEqual(\n expect.objectContaining({ id: DeviceModelId.NANO_SP }),\n );\n\n const deviceModels5 = dataSource.filterDeviceModels({\n usbProductId: 0x60,\n });\n expect(deviceModels5.length).toEqual(1);\n expect(deviceModels5[0]).toEqual(\n expect.objectContaining({ id: DeviceModelId.STAX }),\n );\n\n const deviceModels6 = dataSource.filterDeviceModels({\n usbProductId: 0x00,\n });\n expect(deviceModels6.length).toEqual(0);\n });\n\n it(\"should return the device models that match the given multiple parameters\", () => {\n const dataSource = new StaticDeviceModelDataSource();\n\n const deviceModels1 = dataSource.filterDeviceModels({\n usbOnly: false,\n usbProductId: 0x40,\n });\n expect(deviceModels1.length).toEqual(1);\n expect(deviceModels1[0]).toEqual(\n expect.objectContaining({ id: DeviceModelId.NANO_X }),\n );\n\n const deviceModels2 = dataSource.filterDeviceModels({\n usbOnly: true,\n usbProductId: 0x50,\n });\n expect(deviceModels2.length).toEqual(1);\n expect(deviceModels2[0]).toEqual(\n expect.objectContaining({ id: DeviceModelId.NANO_SP }),\n );\n\n // Nano S is usbOnly\n const deviceModels3 = dataSource.filterDeviceModels({\n usbOnly: false,\n usbProductId: 0x10,\n });\n expect(deviceModels3.length).toEqual(0);\n });\n });\n describe(\"getBluetoothServicesInfos\", () => {\n it(\"should return the ble service infos record\", () => {\n // given\n const dataSource = new StaticDeviceModelDataSource();\n // when\n const bleServiceInfos = dataSource.getBluetoothServicesInfos();\n // then\n expect(bleServiceInfos).toStrictEqual({\n \"13d63400-2c97-0004-0000-4c6564676572\": new BleDeviceInfos(\n dataSource.getDeviceModel({ id: DeviceModelId.NANO_X }),\n \"13d63400-2c97-0004-0000-4c6564676572\",\n \"13d63400-2c97-0004-0002-4c6564676572\",\n \"13d63400-2c97-0004-0003-4c6564676572\",\n \"13d63400-2c97-0004-0001-4c6564676572\",\n ),\n \"13d63400-2c97-6004-0000-4c6564676572\": new BleDeviceInfos(\n dataSource.getDeviceModel({ id: DeviceModelId.STAX }),\n \"13d63400-2c97-6004-0000-4c6564676572\",\n \"13d63400-2c97-6004-0002-4c6564676572\",\n \"13d63400-2c97-6004-0003-4c6564676572\",\n \"13d63400-2c97-6004-0001-4c6564676572\",\n ),\n \"13d63400-2c97-3004-0000-4c6564676572\": new BleDeviceInfos(\n dataSource.getDeviceModel({ id: DeviceModelId.FLEX }),\n \"13d63400-2c97-3004-0000-4c6564676572\",\n \"13d63400-2c97-3004-0002-4c6564676572\",\n \"13d63400-2c97-3004-0003-4c6564676572\",\n \"13d63400-2c97-3004-0001-4c6564676572\",\n ),\n });\n });\n });\n describe(\"getBluetoothServices\", () => {\n it(\"should return the bluetooth services\", () => {\n // given\n const dataSource = new StaticDeviceModelDataSource();\n // when\n const bleServices = dataSource.getBluetoothServices();\n // then\n expect(bleServices).toStrictEqual([\n \"13d63400-2c97-0004-0000-4c6564676572\",\n \"13d63400-2c97-6004-0000-4c6564676572\",\n \"13d63400-2c97-3004-0000-4c6564676572\",\n ]);\n });\n });\n});\n"],
5
- "mappings": "aAAA,IAAAA,EAA8B,mCAC9BC,EAA+B,kDAE/BC,EAA4C,yCAE5C,SAAS,8BAA+B,IAAM,CAC5C,SAAS,qBAAsB,IAAM,CACnC,GAAG,kCAAmC,IAAM,CAE1C,MAAMC,EADa,IAAI,8BAA4B,EACnB,mBAAmB,EAGnD,OAAOA,EAAa,MAAM,EAAE,QAAQ,CAAC,EACrC,OAAOA,CAAY,EAAE,eACnB,OAAO,iBAAiB,CAAE,GAAI,gBAAc,MAAO,CAAC,CACtD,EACA,OAAOA,CAAY,EAAE,eACnB,OAAO,iBAAiB,CAAE,GAAI,gBAAc,OAAQ,CAAC,CACvD,EACA,OAAOA,CAAY,EAAE,eACnB,OAAO,iBAAiB,CAAE,GAAI,gBAAc,MAAO,CAAC,CACtD,EACA,OAAOA,CAAY,EAAE,eACnB,OAAO,iBAAiB,CAAE,GAAI,gBAAc,IAAK,CAAC,CACpD,EACA,OAAOA,CAAY,EAAE,eACnB,OAAO,iBAAiB,CAAE,GAAI,gBAAc,IAAK,CAAC,CACpD,CACF,CAAC,CACH,CAAC,EAED,SAAS,iBAAkB,IAAM,CAC/B,GAAG,4CAA6C,IAAM,CACpD,MAAMC,EAAa,IAAI,8BAEjBC,EAAeD,EAAW,eAAe,CAC7C,GAAI,gBAAc,MACpB,CAAC,EACD,OAAOC,CAAY,EAAE,QACnB,OAAO,iBAAiB,CAAE,GAAI,gBAAc,MAAO,CAAC,CACtD,EAEA,MAAMC,EAAeF,EAAW,eAAe,CAC7C,GAAI,gBAAc,OACpB,CAAC,EACD,OAAOE,CAAY,EAAE,QACnB,OAAO,iBAAiB,CAAE,GAAI,gBAAc,OAAQ,CAAC,CACvD,EAEA,MA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,uCAAwC,IAAI,iBAC1CZ,EAAW,eAAe,CAAE,GAAI,gBAAc,MAAO,CAAC,EACtD,uCACA,uCACA,uCACA,sCACF,EACA,uCAAwC,IAAI,iBAC1CA,EAAW,eAAe,CAAE,GAAI,gBAAc,IAAK,CAAC,EACpD,uCACA,uCACA,uCACA,sCACF,EACA,uCAAwC,IAAI,iBAC1CA,EAAW,eAAe,CAAE,GAAI,gBAAc,IAAK,CAAC,EACpD,uCACA,uCACA,uCACA,sCACF,CACF,CAAC,CACH,CAAC,CACH,CAAC,EACD,SAAS,uBAAwB,IAAM,CACrC,GAAG,uCAAwC,IAAM,CAI/C,MAAMa,EAFa,IAAI,8BAA4B,EAEpB,qBAAqB,EAEpD,OAAOA,CAAW,EAAE,cAAc,CAChC,uCACA,uCACA,sCACF,CAAC,CACH,CAAC,CACH,CAAC,CACH,CAAC",
4
+ "sourcesContent": ["import { DeviceModelId } from \"@api/device/DeviceModel\";\nimport { BleDeviceInfos } from \"@api/device-model/model/BleDeviceInfos\";\n\nimport { StaticDeviceModelDataSource } from \"./StaticDeviceModelDataSource\";\n\ndescribe(\"StaticDeviceModelDataSource\", () => {\n describe(\"getAllDeviceModels\", () => {\n it(\"should return all device models\", () => {\n const dataSource = new StaticDeviceModelDataSource();\n const deviceModels = dataSource.getAllDeviceModels();\n\n expect(deviceModels.length).toEqual(6);\n expect(deviceModels).toContainEqual(\n expect.objectContaining({ id: DeviceModelId.APEX }),\n );\n expect(deviceModels).toContainEqual(\n expect.objectContaining({ id: DeviceModelId.NANO_S }),\n );\n expect(deviceModels).toContainEqual(\n expect.objectContaining({ id: DeviceModelId.NANO_SP }),\n );\n expect(deviceModels).toContainEqual(\n expect.objectContaining({ id: DeviceModelId.NANO_X }),\n );\n expect(deviceModels).toContainEqual(\n expect.objectContaining({ id: DeviceModelId.STAX }),\n );\n expect(deviceModels).toContainEqual(\n expect.objectContaining({ id: DeviceModelId.FLEX }),\n );\n });\n });\n\n describe(\"getDeviceModel\", () => {\n it(\"should return the associated device model\", () => {\n const dataSource = new StaticDeviceModelDataSource();\n\n const deviceModel1 = dataSource.getDeviceModel({\n id: DeviceModelId.NANO_S,\n });\n expect(deviceModel1).toEqual(\n expect.objectContaining({ id: DeviceModelId.NANO_S }),\n );\n\n const deviceModel2 = dataSource.getDeviceModel({\n id: DeviceModelId.NANO_SP,\n });\n expect(deviceModel2).toEqual(\n expect.objectContaining({ id: DeviceModelId.NANO_SP }),\n );\n\n const deviceModel3 = dataSource.getDeviceModel({\n id: DeviceModelId.NANO_X,\n });\n expect(deviceModel3).toEqual(\n expect.objectContaining({ id: DeviceModelId.NANO_X }),\n );\n\n const deviceModel4 = dataSource.getDeviceModel({\n id: DeviceModelId.STAX,\n });\n expect(deviceModel4).toEqual(\n expect.objectContaining({ id: DeviceModelId.STAX }),\n );\n\n const deviceModel5 = dataSource.getDeviceModel({\n id: DeviceModelId.FLEX,\n });\n expect(deviceModel5).toEqual(\n expect.objectContaining({ id: DeviceModelId.FLEX }),\n );\n });\n });\n\n describe(\"filterDeviceModels\", () => {\n it(\"should return the device models that match the given single parameter\", () => {\n const dataSource = new StaticDeviceModelDataSource();\n\n const deviceModels1 = dataSource.filterDeviceModels({ usbOnly: true });\n expect(deviceModels1.length).toEqual(2);\n expect(deviceModels1).toContainEqual(\n expect.objectContaining({ id: DeviceModelId.NANO_SP }),\n );\n expect(deviceModels1).toContainEqual(\n expect.objectContaining({ id: DeviceModelId.NANO_S }),\n );\n\n const deviceModels2 = dataSource.filterDeviceModels({\n usbProductId: 0x10,\n });\n expect(deviceModels2.length).toEqual(1);\n expect(deviceModels2[0]).toEqual(\n expect.objectContaining({ id: DeviceModelId.NANO_S }),\n );\n\n const deviceModels3 = dataSource.filterDeviceModels({\n usbProductId: 0x40,\n });\n expect(deviceModels3.length).toEqual(1);\n expect(deviceModels3[0]).toEqual(\n expect.objectContaining({ id: DeviceModelId.NANO_X }),\n );\n\n const deviceModels4 = dataSource.filterDeviceModels({\n usbProductId: 0x50,\n });\n expect(deviceModels4.length).toEqual(1);\n expect(deviceModels4[0]).toEqual(\n expect.objectContaining({ id: DeviceModelId.NANO_SP }),\n );\n\n const deviceModels5 = dataSource.filterDeviceModels({\n usbProductId: 0x60,\n });\n expect(deviceModels5.length).toEqual(1);\n expect(deviceModels5[0]).toEqual(\n expect.objectContaining({ id: DeviceModelId.STAX }),\n );\n\n const deviceModels6 = dataSource.filterDeviceModels({\n usbProductId: 0x00,\n });\n expect(deviceModels6.length).toEqual(0);\n });\n\n it(\"should return the device models that match the given multiple parameters\", () => {\n const dataSource = new StaticDeviceModelDataSource();\n\n const deviceModels1 = dataSource.filterDeviceModels({\n usbOnly: false,\n usbProductId: 0x40,\n });\n expect(deviceModels1.length).toEqual(1);\n expect(deviceModels1[0]).toEqual(\n expect.objectContaining({ id: DeviceModelId.NANO_X }),\n );\n\n const deviceModels2 = dataSource.filterDeviceModels({\n usbOnly: true,\n usbProductId: 0x50,\n });\n expect(deviceModels2.length).toEqual(1);\n expect(deviceModels2[0]).toEqual(\n expect.objectContaining({ id: DeviceModelId.NANO_SP }),\n );\n\n // Nano S is usbOnly\n const deviceModels3 = dataSource.filterDeviceModels({\n usbOnly: false,\n usbProductId: 0x10,\n });\n expect(deviceModels3.length).toEqual(0);\n });\n });\n describe(\"getBluetoothServicesInfos\", () => {\n it(\"should return the ble service infos record\", () => {\n // given\n const dataSource = new StaticDeviceModelDataSource();\n // when\n const bleServiceInfos = dataSource.getBluetoothServicesInfos();\n // then\n expect(bleServiceInfos).toStrictEqual({\n \"13d63400-2c97-0004-0000-4c6564676572\": new BleDeviceInfos(\n dataSource.getDeviceModel({ id: DeviceModelId.NANO_X }),\n \"13d63400-2c97-0004-0000-4c6564676572\",\n \"13d63400-2c97-0004-0002-4c6564676572\",\n \"13d63400-2c97-0004-0003-4c6564676572\",\n \"13d63400-2c97-0004-0001-4c6564676572\",\n ),\n \"13d63400-2c97-6004-0000-4c6564676572\": new BleDeviceInfos(\n dataSource.getDeviceModel({ id: DeviceModelId.STAX }),\n \"13d63400-2c97-6004-0000-4c6564676572\",\n \"13d63400-2c97-6004-0002-4c6564676572\",\n \"13d63400-2c97-6004-0003-4c6564676572\",\n \"13d63400-2c97-6004-0001-4c6564676572\",\n ),\n \"13d63400-2c97-3004-0000-4c6564676572\": new BleDeviceInfos(\n dataSource.getDeviceModel({ id: DeviceModelId.FLEX }),\n \"13d63400-2c97-3004-0000-4c6564676572\",\n \"13d63400-2c97-3004-0002-4c6564676572\",\n \"13d63400-2c97-3004-0003-4c6564676572\",\n \"13d63400-2c97-3004-0001-4c6564676572\",\n ),\n \"13d63400-2c97-8004-0000-4c6564676572\": new BleDeviceInfos(\n dataSource.getDeviceModel({ id: DeviceModelId.APEX }),\n \"13d63400-2c97-8004-0000-4c6564676572\",\n \"13d63400-2c97-8004-0002-4c6564676572\",\n \"13d63400-2c97-8004-0003-4c6564676572\",\n \"13d63400-2c97-8004-0001-4c6564676572\",\n ),\n });\n });\n });\n describe(\"getBluetoothServices\", () => {\n it(\"should return the bluetooth services\", () => {\n // given\n const dataSource = new StaticDeviceModelDataSource();\n // when\n const bleServices = dataSource.getBluetoothServices();\n // then\n expect(bleServices).toStrictEqual([\n \"13d63400-2c97-0004-0000-4c6564676572\",\n \"13d63400-2c97-6004-0000-4c6564676572\",\n \"13d63400-2c97-3004-0000-4c6564676572\",\n \"13d63400-2c97-8004-0000-4c6564676572\",\n ]);\n });\n });\n});\n"],
5
+ "mappings": "aAAA,IAAAA,EAA8B,mCAC9BC,EAA+B,kDAE/BC,EAA4C,yCAE5C,SAAS,8BAA+B,IAAM,CAC5C,SAAS,qBAAsB,IAAM,CACnC,GAAG,kCAAmC,IAAM,CAE1C,MAAMC,EADa,IAAI,8BAA4B,EACnB,mBAAmB,EAEnD,OAAOA,EAAa,MAAM,EAAE,QAAQ,CAAC,EACrC,OAAOA,CAAY,EAAE,eACnB,OAAO,iBAAiB,CAAE,GAAI,gBAAc,IAAK,CAAC,CACpD,EACA,OAAOA,CAAY,E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D,SAAS,uBAAwB,IAAM,CACrC,GAAG,uCAAwC,IAAM,CAI/C,MAAMa,EAFa,IAAI,8BAA4B,EAEpB,qBAAqB,EAEpD,OAAOA,CAAW,EAAE,cAAc,CAChC,uCACA,uCACA,uCACA,sCACF,CAAC,CACH,CAAC,CACH,CAAC,CACH,CAAC",
6
6
  "names": ["import_DeviceModel", "import_BleDeviceInfos", "import_StaticDeviceModelDataSource", "deviceModels", "dataSource", "deviceModel1", "deviceModel2", "deviceModel3", "deviceModel4", "deviceModel5", "deviceModels1", "deviceModels2", "deviceModels3", "deviceModels4", "deviceModels5", "deviceModels6", "bleServiceInfos", "bleServices"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var n=Object.create;var d=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var a=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty;var h=(t,e)=>{for(var r in e)d(t,r,{get:e[r],enumerable:!0})},c=(t,e,r,u)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of b(e))!l.call(t,o)&&o!==r&&d(t,o,{get:()=>e[o],enumerable:!(u=m(e,o))||u.enumerable});return t};var g=(t,e,r)=>(r=t!=null?n(a(t)):{},c(e||!t||!t.__esModule?d(r,"default",{value:t,enumerable:!0}):r,t)),S=t=>c(d({},"__esModule",{value:!0}),t);var I={};h(I,{TransportDeviceModel:()=>U});module.exports=S(I);var s=g(require("semver")),i=require("../../device/DeviceModel");class U{id;productName;usbProductId;bootloaderUsbProductId;usbOnly;memorySize;masks;bluetoothSpec;constructor(e){this.id=e.id,this.productName=e.productName,this.usbProductId=e.usbProductId,this.bootloaderUsbProductId=e.bootloaderUsbProductId,this.usbOnly=e.usbOnly,this.memorySize=e.memorySize,this.masks=e.masks,this.bluetoothSpec=e.bluetoothSpec}getBlockSize(e){switch(this.id){case i.DeviceModelId.NANO_S:return s.default.lt(s.default.coerce(e)??"","2.0.0")?4*1024:2*1024;case i.DeviceModelId.NANO_X:return 4*1024;case i.DeviceModelId.NANO_SP:case i.DeviceModelId.STAX:case i.DeviceModelId.FLEX:return 32}}}0&&(module.exports={TransportDeviceModel});
1
+ "use strict";var b=Object.create;var s=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var l=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty;var S=(t,e)=>{for(var i in e)s(t,i,{get:e[i],enumerable:!0})},c=(t,e,i,d)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of m(e))!a.call(t,o)&&o!==i&&s(t,o,{get:()=>e[o],enumerable:!(d=n(e,o))||d.enumerable});return t};var h=(t,e,i)=>(i=t!=null?b(l(t)):{},c(e||!t||!t.__esModule?s(i,"default",{value:t,enumerable:!0}):i,t)),g=t=>c(s({},"__esModule",{value:!0}),t);var I={};S(I,{TransportDeviceModel:()=>U});module.exports=g(I);var u=h(require("semver")),r=require("../../device/DeviceModel");class U{id;productName;usbProductId;bootloaderUsbProductId;usbOnly;memorySize;blockSize;masks;bluetoothSpec;constructor(e){this.id=e.id,this.productName=e.productName,this.usbProductId=e.usbProductId,this.bootloaderUsbProductId=e.bootloaderUsbProductId,this.usbOnly=e.usbOnly,this.memorySize=e.memorySize,this.blockSize=e.blockSize,this.masks=e.masks,this.bluetoothSpec=e.bluetoothSpec}getBlockSize(e){switch(this.id){case r.DeviceModelId.NANO_S:return u.default.lt(u.default.coerce(e)??"","2.0.0")?4*1024:2*1024;case r.DeviceModelId.NANO_X:return 4*1024;case r.DeviceModelId.NANO_SP:case r.DeviceModelId.STAX:case r.DeviceModelId.FLEX:case r.DeviceModelId.APEX:return 32}}}0&&(module.exports={TransportDeviceModel});
2
2
  //# sourceMappingURL=DeviceModel.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/api/device-model/model/DeviceModel.ts"],
4
- "sourcesContent": ["import semver from \"semver\";\n\nimport { DeviceModelId } from \"@api/device/DeviceModel\";\n\n/**\n * The info of a device model\n */\nexport class TransportDeviceModel {\n id: DeviceModelId;\n productName: string;\n usbProductId: number;\n bootloaderUsbProductId: number;\n usbOnly: boolean;\n memorySize: number;\n masks: number[];\n bluetoothSpec?: {\n serviceUuid: string;\n writeUuid: string;\n writeCmdUuid: string;\n notifyUuid: string;\n }[];\n\n constructor(props: {\n id: DeviceModelId;\n productName: string;\n usbProductId: number;\n bootloaderUsbProductId: number;\n usbOnly: boolean;\n memorySize: number;\n masks: number[];\n\n bluetoothSpec?: {\n serviceUuid: string;\n writeUuid: string;\n writeCmdUuid: string;\n notifyUuid: string;\n }[];\n }) {\n this.id = props.id;\n this.productName = props.productName;\n this.usbProductId = props.usbProductId;\n this.bootloaderUsbProductId = props.bootloaderUsbProductId;\n this.usbOnly = props.usbOnly;\n this.memorySize = props.memorySize;\n this.masks = props.masks;\n this.bluetoothSpec = props.bluetoothSpec;\n }\n\n getBlockSize(firmwareVersion: string): number {\n switch (this.id) {\n case DeviceModelId.NANO_S:\n return semver.lt(semver.coerce(firmwareVersion) ?? \"\", \"2.0.0\")\n ? 4 * 1024\n : 2 * 1024;\n case DeviceModelId.NANO_X:\n return 4 * 1024;\n case DeviceModelId.NANO_SP:\n case DeviceModelId.STAX:\n case DeviceModelId.FLEX:\n return 32;\n }\n }\n}\n"],
5
- "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,0BAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAmB,qBAEnBC,EAA8B,mCAKvB,MAAMH,CAAqB,CAChC,GACA,YACA,aACA,uBACA,QACA,WACA,MACA,cAOA,YAAYI,EAeT,CACD,KAAK,GAAKA,EAAM,GAChB,KAAK,YAAcA,EAAM,YACzB,KAAK,aAAeA,EAAM,aAC1B,KAAK,uBAAyBA,EAAM,uBACpC,KAAK,QAAUA,EAAM,QACrB,KAAK,WAAaA,EAAM,WACxB,KAAK,MAAQA,EAAM,MACnB,KAAK,cAAgBA,EAAM,aAC7B,CAEA,aAAaC,EAAiC,CAC5C,OAAQ,KAAK,GAAI,CACf,KAAK,gBAAc,OACjB,OAAO,EAAAC,QAAO,GAAG,EAAAA,QAAO,OAAOD,CAAe,GAAK,GAAI,OAAO,EAC1D,EAAI,KACJ,EAAI,KACV,KAAK,gBAAc,OACjB,MAAO,GAAI,KACb,KAAK,gBAAc,QACnB,KAAK,gBAAc,KACnB,KAAK,gBAAc,KACjB,MAAO,GACX,CACF,CACF",
4
+ "sourcesContent": ["import semver from \"semver\";\n\nimport { DeviceModelId } from \"@api/device/DeviceModel\";\n\n/**\n * The info of a device model\n */\nexport class TransportDeviceModel {\n id: DeviceModelId;\n productName: string;\n usbProductId: number;\n bootloaderUsbProductId: number;\n usbOnly: boolean;\n memorySize: number;\n blockSize: number;\n masks: number[];\n bluetoothSpec?: {\n serviceUuid: string;\n writeUuid: string;\n writeCmdUuid: string;\n notifyUuid: string;\n }[];\n\n constructor(props: {\n id: DeviceModelId;\n productName: string;\n usbProductId: number;\n bootloaderUsbProductId: number;\n usbOnly: boolean;\n memorySize: number;\n blockSize: number;\n masks: number[];\n\n bluetoothSpec?: {\n serviceUuid: string;\n writeUuid: string;\n writeCmdUuid: string;\n notifyUuid: string;\n }[];\n }) {\n this.id = props.id;\n this.productName = props.productName;\n this.usbProductId = props.usbProductId;\n this.bootloaderUsbProductId = props.bootloaderUsbProductId;\n this.usbOnly = props.usbOnly;\n this.memorySize = props.memorySize;\n this.blockSize = props.blockSize;\n this.masks = props.masks;\n this.bluetoothSpec = props.bluetoothSpec;\n }\n\n getBlockSize(firmwareVersion: string): number {\n switch (this.id) {\n case DeviceModelId.NANO_S:\n return semver.lt(semver.coerce(firmwareVersion) ?? \"\", \"2.0.0\")\n ? 4 * 1024\n : 2 * 1024;\n case DeviceModelId.NANO_X:\n return 4 * 1024;\n case DeviceModelId.NANO_SP:\n case DeviceModelId.STAX:\n case DeviceModelId.FLEX:\n case DeviceModelId.APEX:\n return 32;\n }\n }\n}\n"],
5
+ "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,0BAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAmB,qBAEnBC,EAA8B,mCAKvB,MAAMH,CAAqB,CAChC,GACA,YACA,aACA,uBACA,QACA,WACA,UACA,MACA,cAOA,YAAYI,EAgBT,CACD,KAAK,GAAKA,EAAM,GAChB,KAAK,YAAcA,EAAM,YACzB,KAAK,aAAeA,EAAM,aAC1B,KAAK,uBAAyBA,EAAM,uBACpC,KAAK,QAAUA,EAAM,QACrB,KAAK,WAAaA,EAAM,WACxB,KAAK,UAAYA,EAAM,UACvB,KAAK,MAAQA,EAAM,MACnB,KAAK,cAAgBA,EAAM,aAC7B,CAEA,aAAaC,EAAiC,CAC5C,OAAQ,KAAK,GAAI,CACf,KAAK,gBAAc,OACjB,OAAO,EAAAC,QAAO,GAAG,EAAAA,QAAO,OAAOD,CAAe,GAAK,GAAI,OAAO,EAC1D,EAAI,KACJ,EAAI,KACV,KAAK,gBAAc,OACjB,MAAO,GAAI,KACb,KAAK,gBAAc,QACnB,KAAK,gBAAc,KACnB,KAAK,gBAAc,KACnB,KAAK,gBAAc,KACjB,MAAO,GACX,CACF,CACF",
6
6
  "names": ["DeviceModel_exports", "__export", "TransportDeviceModel", "__toCommonJS", "import_semver", "import_DeviceModel", "props", "firmwareVersion", "semver"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var i=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var s=(e,o)=>{for(var r in o)i(e,r,{get:o[r],enumerable:!0})},m=(e,o,r,t)=>{if(o&&typeof o=="object"||typeof o=="function")for(let d of l(o))!a.call(e,d)&&d!==r&&i(e,d,{get:()=>o[d],enumerable:!(t=u(o,d))||t.enumerable});return e};var n=e=>m(i({},"__esModule",{value:!0}),e);var b={};s(b,{deviceModelStubBuilder:()=>p});module.exports=n(b);var c=require("../../device/DeviceModel");function p(e={}){return{id:c.DeviceModelId.NANO_X,productName:"Ledger Nano X",usbProductId:64,bootloaderUsbProductId:4,usbOnly:!1,memorySize:2*1024*1024,masks:[855638016],bluetoothSpec:[{serviceUuid:"13d63400-2c97-0004-0000-4c6564676572",notifyUuid:"13d63400-2c97-0004-0001-4c6564676572",writeUuid:"13d63400-2c97-0004-0002-4c6564676572",writeCmdUuid:"13d63400-2c97-0004-0003-4c6564676572"}],getBlockSize:()=>4*1024,...e}}0&&(module.exports={deviceModelStubBuilder});
1
+ "use strict";var i=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var s=(e,o)=>{for(var r in o)i(e,r,{get:o[r],enumerable:!0})},m=(e,o,r,c)=>{if(o&&typeof o=="object"||typeof o=="function")for(let d of l(o))!a.call(e,d)&&d!==r&&i(e,d,{get:()=>o[d],enumerable:!(c=u(o,d))||c.enumerable});return e};var n=e=>m(i({},"__esModule",{value:!0}),e);var b={};s(b,{deviceModelStubBuilder:()=>p});module.exports=n(b);var t=require("../../device/DeviceModel");function p(e={}){return{id:t.DeviceModelId.NANO_X,productName:"Ledger Nano X",usbProductId:64,bootloaderUsbProductId:4,usbOnly:!1,memorySize:2*1024*1024,blockSize:32,masks:[855638016],bluetoothSpec:[{serviceUuid:"13d63400-2c97-0004-0000-4c6564676572",notifyUuid:"13d63400-2c97-0004-0001-4c6564676572",writeUuid:"13d63400-2c97-0004-0002-4c6564676572",writeCmdUuid:"13d63400-2c97-0004-0003-4c6564676572"}],getBlockSize:()=>4*1024,...e}}0&&(module.exports={deviceModelStubBuilder});
2
2
  //# sourceMappingURL=DeviceModel.stub.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/api/device-model/model/DeviceModel.stub.ts"],
4
- "sourcesContent": ["import { DeviceModelId } from \"@api/device/DeviceModel\";\nimport { type TransportDeviceModel } from \"@api/device-model/model/DeviceModel\";\n\nexport function deviceModelStubBuilder(\n props: Partial<TransportDeviceModel> = {},\n): TransportDeviceModel {\n return {\n id: DeviceModelId.NANO_X,\n productName: \"Ledger Nano X\",\n usbProductId: 0x40,\n bootloaderUsbProductId: 0x0004,\n usbOnly: false,\n memorySize: 2 * 1024 * 1024,\n masks: [0x33000000],\n bluetoothSpec: [\n {\n serviceUuid: \"13d63400-2c97-0004-0000-4c6564676572\",\n notifyUuid: \"13d63400-2c97-0004-0001-4c6564676572\",\n writeUuid: \"13d63400-2c97-0004-0002-4c6564676572\",\n writeCmdUuid: \"13d63400-2c97-0004-0003-4c6564676572\",\n },\n ],\n getBlockSize: () => 4 * 1024,\n ...props,\n };\n}\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,4BAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAA8B,mCAGvB,SAASF,EACdG,EAAuC,CAAC,EAClB,CACtB,MAAO,CACL,GAAI,gBAAc,OAClB,YAAa,gBACb,aAAc,GACd,uBAAwB,EACxB,QAAS,GACT,WAAY,EAAI,KAAO,KACvB,MAAO,CAAC,SAAU,EAClB,cAAe,CACb,CACE,YAAa,uCACb,WAAY,uCACZ,UAAW,uCACX,aAAc,sCAChB,CACF,EACA,aAAc,IAAM,EAAI,KACxB,GAAGA,CACL,CACF",
4
+ "sourcesContent": ["import { DeviceModelId } from \"@api/device/DeviceModel\";\nimport { type TransportDeviceModel } from \"@api/device-model/model/DeviceModel\";\n\nexport function deviceModelStubBuilder(\n props: Partial<TransportDeviceModel> = {},\n): TransportDeviceModel {\n return {\n id: DeviceModelId.NANO_X,\n productName: \"Ledger Nano X\",\n usbProductId: 0x40,\n bootloaderUsbProductId: 0x0004,\n usbOnly: false,\n memorySize: 2 * 1024 * 1024,\n blockSize: 32,\n masks: [0x33000000],\n bluetoothSpec: [\n {\n serviceUuid: \"13d63400-2c97-0004-0000-4c6564676572\",\n notifyUuid: \"13d63400-2c97-0004-0001-4c6564676572\",\n writeUuid: \"13d63400-2c97-0004-0002-4c6564676572\",\n writeCmdUuid: \"13d63400-2c97-0004-0003-4c6564676572\",\n },\n ],\n getBlockSize: () => 4 * 1024,\n ...props,\n };\n}\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,4BAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAA8B,mCAGvB,SAASF,EACdG,EAAuC,CAAC,EAClB,CACtB,MAAO,CACL,GAAI,gBAAc,OAClB,YAAa,gBACb,aAAc,GACd,uBAAwB,EACxB,QAAS,GACT,WAAY,EAAI,KAAO,KACvB,UAAW,GACX,MAAO,CAAC,SAAU,EAClB,cAAe,CACb,CACE,YAAa,uCACb,WAAY,uCACZ,UAAW,uCACX,aAAc,sCAChB,CACF,EACA,aAAc,IAAM,EAAI,KACxB,GAAGA,CACL,CACF",
6
6
  "names": ["DeviceModel_stub_exports", "__export", "deviceModelStubBuilder", "__toCommonJS", "import_DeviceModel", "props"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var r=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var p=(n,e)=>{for(var o in e)r(n,o,{get:e[o],enumerable:!0})},l=(n,e,o,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of y(e))!d.call(n,a)&&a!==o&&r(n,a,{get:()=>e[a],enumerable:!(t=s(e,a))||t.enumerable});return n};var S=n=>l(r({},"__esModule",{value:!0}),n);var u={};p(u,{DeviceSessionStateType:()=>i});module.exports=S(u);var i=(t=>(t[t.Connected=0]="Connected",t[t.ReadyWithoutSecureChannel=1]="ReadyWithoutSecureChannel",t[t.ReadyWithSecureChannel=2]="ReadyWithSecureChannel",t))(i||{});0&&(module.exports={DeviceSessionStateType});
1
+ "use strict";var o=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var d=(t,e)=>{for(var n in e)o(t,n,{get:e[n],enumerable:!0})},y=(t,e,n,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of s(e))!l.call(t,r)&&r!==n&&o(t,r,{get:()=>e[r],enumerable:!(a=p(e,r))||a.enumerable});return t};var m=t=>y(o({},"__esModule",{value:!0}),t);var u={};d(u,{DeviceSessionStateType:()=>i});module.exports=m(u);var i=(a=>(a[a.Connected=0]="Connected",a[a.ReadyWithoutSecureChannel=1]="ReadyWithoutSecureChannel",a[a.ReadyWithSecureChannel=2]="ReadyWithSecureChannel",a))(i||{});0&&(module.exports={DeviceSessionStateType});
2
2
  //# sourceMappingURL=DeviceSessionState.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/api/device-session/DeviceSessionState.ts"],
4
- "sourcesContent": ["import { type GetAppAndVersionResponse } from \"@api/command/os/GetAppAndVersionCommand\";\nimport { type BatteryStatusFlags } from \"@api/command/os/GetBatteryStatusCommand\";\nimport { type DeviceModelId } from \"@api/device/DeviceModel\";\nimport { type DeviceStatus } from \"@api/device/DeviceStatus\";\nimport { type Application } from \"@internal/manager-api/model/Application\";\n\n/**\n * The battery status of a device.\n */\nexport type BatteryStatus = {\n readonly level: number;\n readonly voltage: number;\n readonly temperature: number;\n readonly current: number;\n readonly status: BatteryStatusFlags;\n};\n\n/**\n * The firmware version of a device.\n */\nexport type FirmwareVersion = {\n /**\n * Microcontroller Unit version\n */\n readonly mcu: string;\n\n /**\n * Bootloader version\n */\n readonly bootloader: string;\n\n /**\n * Operating System version\n */\n readonly os: string;\n};\n\n/**\n * The current application running on a device. Alias of GetAppAndVersionResponse.\n */\nexport type RunningApp = GetAppAndVersionResponse;\n\n/**\n * The state types of a device session.\n */\nexport enum DeviceSessionStateType {\n Connected,\n ReadyWithoutSecureChannel,\n ReadyWithSecureChannel,\n}\n\ntype DeviceSessionBaseState = {\n readonly sessionStateType: DeviceSessionStateType;\n\n /**\n * The status of the device.\n */\n readonly deviceStatus: DeviceStatus;\n\n /**\n * The model of the device.\n */\n readonly deviceModelId: DeviceModelId;\n\n /**\n * The name of the device.\n */\n readonly deviceName?: string;\n};\n\ntype DeviceSessionReadyState = {\n /**\n * The battery status of the device.\n * TODO: This should not be optional, but it is not in the current implementation.\n */\n readonly batteryStatus?: BatteryStatus;\n\n /**\n * The firmware version of the device.\n * TODO: This should not be optional, but it is not in the current implementation.\n */\n readonly firmwareVersion?: FirmwareVersion;\n\n /**\n * The current application running on the device.\n */\n readonly currentApp: RunningApp;\n\n /**\n * The current applications installed on the device.\n */\n readonly installedApps: Application[];\n\n /**\n * The device is allowed to establish a secure connection.\n */\n readonly isSecureConnectionAllowed: boolean;\n};\n\n/**\n * The state of a connected device session.\n */\nexport type ConnectedState = DeviceSessionBaseState & {\n /**\n * The type of the device session state.\n */\n readonly sessionStateType: DeviceSessionStateType.Connected;\n};\n\n/**\n * The state of a device session when it is ready without a secure channel.\n */\nexport type ReadyWithoutSecureChannelState = DeviceSessionBaseState &\n DeviceSessionReadyState & {\n /**\n * The type of the device session state.\n */\n readonly sessionStateType: DeviceSessionStateType.ReadyWithoutSecureChannel;\n };\n\n/**\n * The state of a device session when it is ready with a secure channel.\n */\nexport type ReadyWithSecureChannelState = DeviceSessionBaseState &\n DeviceSessionReadyState & {\n /**\n * The type of the device session state.\n */\n readonly sessionStateType: DeviceSessionStateType.ReadyWithSecureChannel;\n };\n\n/**\n * The state of a device session.\n */\nexport type DeviceSessionState =\n | ConnectedState\n | ReadyWithoutSecureChannelState\n | ReadyWithSecureChannelState;\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,4BAAAE,IAAA,eAAAC,EAAAH,GA6CO,IAAKE,OACVA,IAAA,yBACAA,IAAA,yDACAA,IAAA,mDAHUA,OAAA",
4
+ "sourcesContent": ["import { type GetAppAndVersionResponse } from \"@api/command/os/GetAppAndVersionCommand\";\nimport { type BatteryStatusFlags } from \"@api/command/os/GetBatteryStatusCommand\";\nimport { type GetOsVersionResponse } from \"@api/command/os/GetOsVersionCommand\";\nimport { type DeviceModelId } from \"@api/device/DeviceModel\";\nimport { type DeviceStatus } from \"@api/device/DeviceStatus\";\nimport { type Application } from \"@internal/manager-api/model/Application\";\nimport {\n type FinalFirmware,\n type OsuFirmware,\n} from \"@internal/manager-api/model/Firmware\";\nimport { type LanguagePackage } from \"@internal/manager-api/model/Language\";\n\n/**\n * The battery status of a device.\n */\nexport type BatteryStatus = {\n readonly level: number;\n readonly voltage: number;\n readonly temperature: number;\n readonly current: number;\n readonly status: BatteryStatusFlags;\n};\n\n/**\n * The firmware version of a device.\n */\nexport type FirmwareVersion = {\n /**\n * Microcontroller Unit version\n */\n readonly mcu: string;\n\n /**\n * Bootloader version\n */\n readonly bootloader: string;\n\n /**\n * Operating System version\n */\n readonly os: string;\n\n /**\n * Metadata for advanced users, to get detailed informations on\n * the firmware running on the device.\n */\n readonly metadata?: GetOsVersionResponse;\n};\n\n/**\n * Context for firmware updates\n */\nexport type FirmwareUpdateContext = {\n /**\n * Current installed firmware\n */\n readonly currentFirmware: FinalFirmware;\n\n /**\n * Available firmware update\n */\n readonly availableUpdate?: FirmwareUpdate;\n};\n\n/**\n * Available firmware update\n */\nexport type FirmwareUpdate = {\n /**\n * Version of the OS updater firmware\n */\n readonly osuFirmware: OsuFirmware;\n\n /**\n * Version of the final firmware\n */\n readonly finalFirmware: FinalFirmware;\n\n /**\n * Indicates if the MCU needs to be updated\n */\n readonly mcuUpdateRequired: boolean;\n};\n\n/**\n * The app store catalog for that device.\n */\nexport type Catalog = {\n /**\n * Available applications for the device\n */\n readonly applications: Application[];\n\n /**\n * Available languages packages for the device\n */\n readonly languagePackages: LanguagePackage[];\n};\n\n/**\n * Language package installed on the device\n */\nexport type InstalledLanguagePackage = {\n /**\n * The identifier of the language package\n */\n readonly id: number;\n\n /**\n * The size of the language package\n */\n readonly size: number;\n};\n\n/**\n * Custom image metadata, if one was loaded on the device\n */\nexport type CustomImage = {\n /**\n * The size of loaded custom image, if one was loaded\n */\n readonly size?: number;\n};\n\n/**\n * The current application running on a device. Alias of GetAppAndVersionResponse.\n */\nexport type RunningApp = GetAppAndVersionResponse;\n\n/**\n * The state types of a device session.\n */\nexport enum DeviceSessionStateType {\n Connected,\n ReadyWithoutSecureChannel,\n ReadyWithSecureChannel,\n}\n\ntype DeviceSessionBaseState = {\n readonly sessionStateType: DeviceSessionStateType;\n\n /**\n * The status of the device.\n */\n readonly deviceStatus: DeviceStatus;\n\n /**\n * The model of the device.\n */\n readonly deviceModelId: DeviceModelId;\n\n /**\n * The name of the device.\n */\n readonly deviceName?: string;\n};\n\ntype DeviceSessionReadyState = {\n /**\n * The battery status of the device.\n * TODO: This should not be optional, but it is not in the current implementation.\n */\n readonly batteryStatus?: BatteryStatus;\n\n /**\n * The firmware version of the device.\n * TODO: This should not be optional, but it is not in the current implementation.\n */\n readonly firmwareVersion?: FirmwareVersion;\n\n /**\n * Context of available firmware update\n */\n readonly firmwareUpdateContext?: FirmwareUpdateContext;\n\n /**\n * The current application running on the device.\n */\n readonly currentApp: RunningApp;\n\n /**\n * The current applications installed on the device.\n */\n readonly installedApps: Application[];\n\n /**\n * Available updates from the app store for installed applications.\n */\n readonly appsUpdates?: Application[];\n\n /**\n * The current language packages installed on the device.\n */\n readonly installedLanguages?: InstalledLanguagePackage[];\n\n /**\n * Catalog of available applications and languages for the device.\n */\n readonly catalog?: Catalog;\n\n /**\n * Custom image metadata.\n */\n readonly customImage?: CustomImage;\n\n /**\n * The device is allowed to establish a secure connection.\n */\n readonly isSecureConnectionAllowed: boolean;\n};\n\n/**\n * The state of a connected device session.\n */\nexport type ConnectedState = DeviceSessionBaseState & {\n /**\n * The type of the device session state.\n */\n readonly sessionStateType: DeviceSessionStateType.Connected;\n};\n\n/**\n * The state of a device session when it is ready without a secure channel.\n */\nexport type ReadyWithoutSecureChannelState = DeviceSessionBaseState &\n DeviceSessionReadyState & {\n /**\n * The type of the device session state.\n */\n readonly sessionStateType: DeviceSessionStateType.ReadyWithoutSecureChannel;\n };\n\n/**\n * The state of a device session when it is ready with a secure channel.\n */\nexport type ReadyWithSecureChannelState = DeviceSessionBaseState &\n DeviceSessionReadyState & {\n /**\n * The type of the device session state.\n */\n readonly sessionStateType: DeviceSessionStateType.ReadyWithSecureChannel;\n };\n\n/**\n * The state of a device session.\n */\nexport type DeviceSessionState =\n | ConnectedState\n | ReadyWithoutSecureChannelState\n | ReadyWithSecureChannelState;\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,4BAAAE,IAAA,eAAAC,EAAAH,GAoIO,IAAKE,OACVA,IAAA,yBACAA,IAAA,yDACAA,IAAA,mDAHUA,OAAA",
6
6
  "names": ["DeviceSessionState_exports", "__export", "DeviceSessionStateType", "__toCommonJS"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var A=Object.defineProperty;var ne=Object.getOwnPropertyDescriptor;var ae=Object.getOwnPropertyNames;var se=Object.prototype.hasOwnProperty;var fe=(t,r)=>{for(var p in r)A(t,p,{get:r[p],enumerable:!0})},d=(t,r,p,u)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of ae(r))!se.call(t,a)&&a!==p&&A(t,a,{get:()=>r[a],enumerable:!(u=ne(r,a))||u.enumerable});return t},o=(t,r,p)=>(d(t,r,"default"),p&&d(p,r,"default"));var ce=t=>d(A({},"__esModule",{value:!0}),t);var e={};fe(e,{APDU_MAX_PAYLOAD:()=>s.APDU_MAX_PAYLOAD,Apdu:()=>D.Apdu,ApduBuilder:()=>s.ApduBuilder,ApduParser:()=>l.ApduParser,ApduResponse:()=>q.ApduResponse,BatteryStatusType:()=>f.BatteryStatusType,BleDeviceInfos:()=>K.BleDeviceInfos,ByteArrayBuilder:()=>v.ByteArrayBuilder,ByteArrayParser:()=>S.ByteArrayParser,CallTaskInAppDeviceAction:()=>O.CallTaskInAppDeviceAction,CloseAppCommand:()=>y.CloseAppCommand,CommandResultFactory:()=>i.CommandResultFactory,CommandResultStatus:()=>i.CommandResultStatus,CommandUtils:()=>I.CommandUtils,ConnectedDevice:()=>pe.ConnectedDevice,ConsoleLogger:()=>re.ConsoleLogger,DeviceActionStatus:()=>M.DeviceActionStatus,DeviceManagementKit:()=>$.DeviceManagementKit,DeviceManagementKitBuilder:()=>ee.DeviceManagementKitBuilder,DeviceModel:()=>m.DeviceModel,DeviceModelId:()=>m.DeviceModelId,DeviceSessionStateType:()=>w.DeviceSessionStateType,DeviceStatus:()=>b.DeviceStatus,FramerUtils:()=>Z.FramerUtils,GenuineCheckDeviceAction:()=>N.GenuineCheckDeviceAction,GetAppAndVersionCommand:()=>g.GetAppAndVersionCommand,GetBatteryStatusCommand:()=>f.GetBatteryStatusCommand,GetDeviceStatusDeviceAction:()=>h.GetDeviceStatusDeviceAction,GetOsVersionCommand:()=>L.GetOsVersionCommand,GlobalCommandError:()=>c.GlobalCommandError,GlobalCommandErrorHandler:()=>c.GlobalCommandErrorHandler,GoToDashboardDeviceAction:()=>V.GoToDashboardDeviceAction,InstallAppDeviceAction:()=>Y.InstallAppDeviceAction,InvalidStatusWordError:()=>C.InvalidStatusWordError,LEDGER_VENDOR_ID:()=>m.LEDGER_VENDOR_ID,ListAppsCommand:()=>B.ListAppsCommand,ListAppsDeviceAction:()=>P.ListAppsDeviceAction,ListAppsWithMetadataDeviceAction:()=>_.ListAppsWithMetadataDeviceAction,ListInstalledAppsDeviceAction:()=>j.ListInstalledAppsDeviceAction,LoadCertificateCommand:()=>G.LoadCertificateCommand,LogLevel:()=>oe.LogLevel,OpenAppCommand:()=>R.OpenAppCommand,OpenAppDeviceAction:()=>k.OpenAppDeviceAction,SendCommandInAppDeviceAction:()=>H.SendCommandInAppDeviceAction,StaticDeviceModelDataSource:()=>F.StaticDeviceModelDataSource,TransportConnectedDevice:()=>ie.TransportConnectedDevice,TransportDeviceModel:()=>X.TransportDeviceModel,UninstallAppDeviceAction:()=>z.UninstallAppDeviceAction,UnknownDAError:()=>U.UnknownDAError,UserInteractionRequired:()=>T.UserInteractionRequired,WebLogsExporterLogger:()=>te.WebLogsExporterLogger,XStateDeviceAction:()=>W.XStateDeviceAction,base64StringToBuffer:()=>x.base64StringToBuffer,bufferToHexaString:()=>n.bufferToHexaString,connectedDeviceStubBuilder:()=>me.connectedDeviceStubBuilder,defaultApduReceiverServiceStubBuilder:()=>J.defaultApduReceiverServiceStubBuilder,defaultApduSenderServiceStubBuilder:()=>Q.defaultApduSenderServiceStubBuilder,hexaStringToBuffer:()=>n.hexaStringToBuffer,isBase64String:()=>x.isBase64String,isCommandErrorCode:()=>E.isCommandErrorCode,isHexaString:()=>n.isHexaString,isSuccessCommandResult:()=>i.isSuccessCommandResult});module.exports=ce(e);var D=require("./apdu/model/Apdu"),s=require("./apdu/utils/ApduBuilder"),l=require("./apdu/utils/ApduParser");o(e,require("./apdu/utils/AppBuilderError"),module.exports);var v=require("./apdu/utils/ByteArrayBuilder"),S=require("./apdu/utils/ByteArrayParser"),C=require("./command/Errors"),i=require("./command/model/CommandResult"),y=require("./command/os/CloseAppCommand"),g=require("./command/os/GetAppAndVersionCommand"),f=require("./command/os/GetBatteryStatusCommand"),L=require("./command/os/GetOsVersionCommand"),B=require("./command/os/ListAppsCommand"),G=require("./command/os/LoadCertificateCommand"),R=require("./command/os/OpenAppCommand"),E=require("./command/utils/CommandErrors"),I=require("./command/utils/CommandUtils"),c=require("./command/utils/GlobalCommandError"),m=require("./device/DeviceModel"),b=require("./device/DeviceStatus"),M=require("./device-action/model/DeviceActionState"),T=require("./device-action/model/UserInteractionRequired"),O=require("./device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction"),U=require("./device-action/os/Errors"),h=require("./device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction"),V=require("./device-action/os/GoToDashboard/GoToDashboardDeviceAction"),P=require("./device-action/os/ListApps/ListAppsDeviceAction"),_=require("./device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction"),k=require("./device-action/os/OpenAppDeviceAction/OpenAppDeviceAction"),H=require("./device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction"),W=require("./device-action/xstate-utils/XStateDeviceAction"),F=require("./device-model/data/StaticDeviceModelDataSource"),K=require("./device-model/model/BleDeviceInfos"),X=require("./device-model/model/DeviceModel"),q=require("./device-session/ApduResponse");o(e,require("./device-session/data/FramerConst"),module.exports);var w=require("./device-session/DeviceSessionState"),N=require("./secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction"),Y=require("./secure-channel/device-action/InstallApp/InstallAppDeviceAction"),j=require("./secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction"),z=require("./secure-channel/device-action/UninstallApp/UninstallAppDeviceAction"),J=require("./device-session/service/DefaultApduReceiverService.stub"),Q=require("./device-session/service/DefaultApduSenderService.stub"),Z=require("./device-session/utils/FramerUtils"),$=require("./DeviceManagementKit"),ee=require("./DeviceManagementKitBuilder");o(e,require("./Error"),module.exports);var oe=require("./logger-subscriber/model/LogLevel"),re=require("./logger-subscriber/service/ConsoleLogger"),te=require("./logger-subscriber/service/WebLogsExporterLogger"),pe=require("./transport/model/ConnectedDevice");o(e,require("./transport/model/Errors"),module.exports);var ie=require("./transport/model/TransportConnectedDevice"),me=require("./transport/model/TransportConnectedDevice.stub");o(e,require("./types"),module.exports);var x=require("./utils/Base64String"),n=require("./utils/HexaString");0&&(module.exports={APDU_MAX_PAYLOAD,Apdu,ApduBuilder,ApduParser,ApduResponse,BatteryStatusType,BleDeviceInfos,ByteArrayBuilder,ByteArrayParser,CallTaskInAppDeviceAction,CloseAppCommand,CommandResultFactory,CommandResultStatus,CommandUtils,ConnectedDevice,ConsoleLogger,DeviceActionStatus,DeviceManagementKit,DeviceManagementKitBuilder,DeviceModel,DeviceModelId,DeviceSessionStateType,DeviceStatus,FramerUtils,GenuineCheckDeviceAction,GetAppAndVersionCommand,GetBatteryStatusCommand,GetDeviceStatusDeviceAction,GetOsVersionCommand,GlobalCommandError,GlobalCommandErrorHandler,GoToDashboardDeviceAction,InstallAppDeviceAction,InvalidStatusWordError,LEDGER_VENDOR_ID,ListAppsCommand,ListAppsDeviceAction,ListAppsWithMetadataDeviceAction,ListInstalledAppsDeviceAction,LoadCertificateCommand,LogLevel,OpenAppCommand,OpenAppDeviceAction,SendCommandInAppDeviceAction,StaticDeviceModelDataSource,TransportConnectedDevice,TransportDeviceModel,UninstallAppDeviceAction,UnknownDAError,UserInteractionRequired,WebLogsExporterLogger,XStateDeviceAction,base64StringToBuffer,bufferToHexaString,connectedDeviceStubBuilder,defaultApduReceiverServiceStubBuilder,defaultApduSenderServiceStubBuilder,hexaStringToBuffer,isBase64String,isCommandErrorCode,isHexaString,isSuccessCommandResult,...require("./apdu/utils/AppBuilderError"),...require("./device-session/data/FramerConst"),...require("./Error"),...require("./transport/model/Errors"),...require("./types")});
1
+ "use strict";var D=Object.defineProperty;var xe=Object.getOwnPropertyDescriptor;var Ae=Object.getOwnPropertyNames;var de=Object.prototype.hasOwnProperty;var De=(p,o)=>{for(var i in o)D(p,i,{get:o[i],enumerable:!0})},d=(p,o,i,l)=>{if(o&&typeof o=="object"||typeof o=="function")for(let s of Ae(o))!de.call(p,s)&&s!==i&&D(p,s,{get:()=>o[s],enumerable:!(l=xe(o,s))||l.enumerable});return p},r=(p,o,i)=>(d(p,o,"default"),i&&d(i,o,"default"));var le=p=>d(D({},"__esModule",{value:!0}),p);var e={};De(e,{APDU_MAX_PAYLOAD:()=>c.APDU_MAX_PAYLOAD,Apdu:()=>u.Apdu,ApduBuilder:()=>c.ApduBuilder,ApduParser:()=>v.ApduParser,ApduResponse:()=>Y.ApduResponse,AppAlreadyInstalledDAError:()=>t.AppAlreadyInstalledDAError,BatteryStatusType:()=>f.BatteryStatusType,BleDeviceInfos:()=>q.BleDeviceInfos,ByteArrayBuilder:()=>S.ByteArrayBuilder,ByteArrayParser:()=>C.ByteArrayParser,CallTaskInAppDeviceAction:()=>T.CallTaskInAppDeviceAction,CloseAppCommand:()=>L.CloseAppCommand,CommandResultFactory:()=>n.CommandResultFactory,CommandResultStatus:()=>n.CommandResultStatus,CommandUtils:()=>I.CommandUtils,ConnectedDevice:()=>ae.ConnectedDevice,ConsoleLogger:()=>ne.ConsoleLogger,DeviceActionStatus:()=>b.DeviceActionStatus,DeviceConnectionStateMachine:()=>se.DeviceConnectionStateMachine,DeviceLockedError:()=>t.DeviceLockedError,DeviceManagementKit:()=>te.DeviceManagementKit,DeviceManagementKitBuilder:()=>pe.DeviceManagementKitBuilder,DeviceModel:()=>m.DeviceModel,DeviceModelId:()=>m.DeviceModelId,DeviceSessionStateType:()=>j.DeviceSessionStateType,DeviceStatus:()=>O.DeviceStatus,FramerUtils:()=>oe.FramerUtils,GenuineCheckDeviceAction:()=>z.GenuineCheckDeviceAction,GetAppAndVersionCommand:()=>g.GetAppAndVersionCommand,GetBatteryStatusCommand:()=>f.GetBatteryStatusCommand,GetDeviceMetadataDeviceAction:()=>U.GetDeviceMetadataDeviceAction,GetDeviceStatusDeviceAction:()=>P.GetDeviceStatusDeviceAction,GetOsVersionCommand:()=>B.GetOsVersionCommand,GlobalCommandError:()=>x.GlobalCommandError,GlobalCommandErrorHandler:()=>x.GlobalCommandErrorHandler,GoToDashboardDeviceAction:()=>V.GoToDashboardDeviceAction,InstallAppDeviceAction:()=>J.InstallAppDeviceAction,InstallOrUpdateAppsDeviceAction:()=>k.InstallOrUpdateAppsDeviceAction,InvalidStatusWordError:()=>y.InvalidStatusWordError,LEDGER_VENDOR_ID:()=>m.LEDGER_VENDOR_ID,ListAppsCommand:()=>E.ListAppsCommand,ListAppsDeviceAction:()=>W.ListAppsDeviceAction,ListAppsWithMetadataDeviceAction:()=>_.ListAppsWithMetadataDeviceAction,ListInstalledAppsDeviceAction:()=>Q.ListInstalledAppsDeviceAction,LoadCertificateCommand:()=>G.LoadCertificateCommand,LogLevel:()=>ie.LogLevel,OpenAppCommand:()=>M.OpenAppCommand,OpenAppDeviceAction:()=>F.OpenAppDeviceAction,OpenAppWithDependenciesDeviceAction:()=>H.OpenAppWithDependenciesDeviceAction,OutOfMemoryDAError:()=>t.OutOfMemoryDAError,RefusedByUserDAError:()=>t.RefusedByUserDAError,SecureChannelError:()=>$.SecureChannelError,SendCommandInAppDeviceAction:()=>w.SendCommandInAppDeviceAction,StaticDeviceModelDataSource:()=>X.StaticDeviceModelDataSource,TransportConnectedDevice:()=>ce.TransportConnectedDevice,TransportDeviceModel:()=>N.TransportDeviceModel,UninstallAppDeviceAction:()=>Z.UninstallAppDeviceAction,UnknownDAError:()=>t.UnknownDAError,UnsupportedFirmwareDAError:()=>t.UnsupportedFirmwareDAError,UserInteractionRequired:()=>h.UserInteractionRequired,WebLogsExporterLogger:()=>me.WebLogsExporterLogger,XStateDeviceAction:()=>K.XStateDeviceAction,base64StringToBuffer:()=>A.base64StringToBuffer,bufferToHexaString:()=>a.bufferToHexaString,connectedDeviceStubBuilder:()=>fe.connectedDeviceStubBuilder,defaultApduReceiverServiceStubBuilder:()=>ee.defaultApduReceiverServiceStubBuilder,defaultApduSenderServiceStubBuilder:()=>re.defaultApduSenderServiceStubBuilder,hexaStringToBuffer:()=>a.hexaStringToBuffer,isBase64String:()=>A.isBase64String,isCommandErrorCode:()=>R.isCommandErrorCode,isHexaString:()=>a.isHexaString,isSuccessCommandResult:()=>n.isSuccessCommandResult});module.exports=le(e);var u=require("./apdu/model/Apdu"),c=require("./apdu/utils/ApduBuilder"),v=require("./apdu/utils/ApduParser");r(e,require("./apdu/utils/AppBuilderError"),module.exports);var S=require("./apdu/utils/ByteArrayBuilder"),C=require("./apdu/utils/ByteArrayParser"),y=require("./command/Errors"),n=require("./command/model/CommandResult"),L=require("./command/os/CloseAppCommand"),g=require("./command/os/GetAppAndVersionCommand"),f=require("./command/os/GetBatteryStatusCommand"),B=require("./command/os/GetOsVersionCommand"),E=require("./command/os/ListAppsCommand"),G=require("./command/os/LoadCertificateCommand"),M=require("./command/os/OpenAppCommand"),R=require("./command/utils/CommandErrors"),I=require("./command/utils/CommandUtils"),x=require("./command/utils/GlobalCommandError"),m=require("./device/DeviceModel"),O=require("./device/DeviceStatus"),b=require("./device-action/model/DeviceActionState"),h=require("./device-action/model/UserInteractionRequired"),T=require("./device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction"),t=require("./device-action/os/Errors"),U=require("./device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction"),P=require("./device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction"),V=require("./device-action/os/GoToDashboard/GoToDashboardDeviceAction"),k=require("./device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction"),W=require("./device-action/os/ListApps/ListAppsDeviceAction"),_=require("./device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction"),F=require("./device-action/os/OpenAppDeviceAction/OpenAppDeviceAction"),H=require("./device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction"),w=require("./device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction"),K=require("./device-action/xstate-utils/XStateDeviceAction"),X=require("./device-model/data/StaticDeviceModelDataSource"),q=require("./device-model/model/BleDeviceInfos"),N=require("./device-model/model/DeviceModel"),Y=require("./device-session/ApduResponse");r(e,require("./device-session/data/FramerConst"),module.exports);var j=require("./device-session/DeviceSessionState"),z=require("./secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction"),J=require("./secure-channel/device-action/InstallApp/InstallAppDeviceAction"),Q=require("./secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction"),Z=require("./secure-channel/device-action/UninstallApp/UninstallAppDeviceAction"),$=require("../internal/secure-channel/model/Errors"),ee=require("./device-session/service/DefaultApduReceiverService.stub"),re=require("./device-session/service/DefaultApduSenderService.stub"),oe=require("./device-session/utils/FramerUtils"),te=require("./DeviceManagementKit"),pe=require("./DeviceManagementKitBuilder");r(e,require("./Error"),module.exports);var ie=require("./logger-subscriber/model/LogLevel"),ne=require("./logger-subscriber/service/ConsoleLogger"),me=require("./logger-subscriber/service/WebLogsExporterLogger"),ae=require("./transport/model/ConnectedDevice"),se=require("./transport/model/DeviceConnectionStateMachine");r(e,require("./transport/model/Errors"),module.exports);var ce=require("./transport/model/TransportConnectedDevice"),fe=require("./transport/model/TransportConnectedDevice.stub");r(e,require("./types"),module.exports);var A=require("./utils/Base64String"),a=require("./utils/HexaString");0&&(module.exports={APDU_MAX_PAYLOAD,Apdu,ApduBuilder,ApduParser,ApduResponse,AppAlreadyInstalledDAError,BatteryStatusType,BleDeviceInfos,ByteArrayBuilder,ByteArrayParser,CallTaskInAppDeviceAction,CloseAppCommand,CommandResultFactory,CommandResultStatus,CommandUtils,ConnectedDevice,ConsoleLogger,DeviceActionStatus,DeviceConnectionStateMachine,DeviceLockedError,DeviceManagementKit,DeviceManagementKitBuilder,DeviceModel,DeviceModelId,DeviceSessionStateType,DeviceStatus,FramerUtils,GenuineCheckDeviceAction,GetAppAndVersionCommand,GetBatteryStatusCommand,GetDeviceMetadataDeviceAction,GetDeviceStatusDeviceAction,GetOsVersionCommand,GlobalCommandError,GlobalCommandErrorHandler,GoToDashboardDeviceAction,InstallAppDeviceAction,InstallOrUpdateAppsDeviceAction,InvalidStatusWordError,LEDGER_VENDOR_ID,ListAppsCommand,ListAppsDeviceAction,ListAppsWithMetadataDeviceAction,ListInstalledAppsDeviceAction,LoadCertificateCommand,LogLevel,OpenAppCommand,OpenAppDeviceAction,OpenAppWithDependenciesDeviceAction,OutOfMemoryDAError,RefusedByUserDAError,SecureChannelError,SendCommandInAppDeviceAction,StaticDeviceModelDataSource,TransportConnectedDevice,TransportDeviceModel,UninstallAppDeviceAction,UnknownDAError,UnsupportedFirmwareDAError,UserInteractionRequired,WebLogsExporterLogger,XStateDeviceAction,base64StringToBuffer,bufferToHexaString,connectedDeviceStubBuilder,defaultApduReceiverServiceStubBuilder,defaultApduSenderServiceStubBuilder,hexaStringToBuffer,isBase64String,isCommandErrorCode,isHexaString,isSuccessCommandResult,...require("./apdu/utils/AppBuilderError"),...require("./device-session/data/FramerConst"),...require("./Error"),...require("./transport/model/Errors"),...require("./types")});
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/api/index.ts"],
4
- "sourcesContent": ["\"use strict\";\n\nexport { Apdu } from \"@api/apdu/model/Apdu\";\nexport { APDU_MAX_PAYLOAD, ApduBuilder } from \"@api/apdu/utils/ApduBuilder\";\nexport { ApduParser } from \"@api/apdu/utils/ApduParser\";\nexport * from \"@api/apdu/utils/AppBuilderError\";\nexport { ByteArrayBuilder } from \"@api/apdu/utils/ByteArrayBuilder\";\nexport { ByteArrayParser } from \"@api/apdu/utils/ByteArrayParser\";\nexport { InvalidStatusWordError } from \"@api/command/Errors\";\nexport {\n CommandResultFactory,\n CommandResultStatus,\n isSuccessCommandResult,\n} from \"@api/command/model/CommandResult\";\nexport { CloseAppCommand } from \"@api/command/os/CloseAppCommand\";\nexport {\n GetAppAndVersionCommand,\n type GetAppAndVersionResponse,\n} from \"@api/command/os/GetAppAndVersionCommand\";\nexport {\n BatteryStatusType,\n type GetBatteryStatusArgs,\n GetBatteryStatusCommand,\n type GetBatteryStatusResponse,\n} from \"@api/command/os/GetBatteryStatusCommand\";\nexport {\n GetOsVersionCommand,\n type GetOsVersionResponse,\n} from \"@api/command/os/GetOsVersionCommand\";\nexport {\n type ListAppsArgs,\n ListAppsCommand,\n type ListAppsErrorCodes,\n type ListAppsResponse,\n} from \"@api/command/os/ListAppsCommand\";\nexport {\n type LoadCertificateArgs,\n LoadCertificateCommand,\n type LoadCertificateErrorCodes,\n} from \"@api/command/os/LoadCertificateCommand\";\nexport {\n type OpenAppArgs,\n OpenAppCommand,\n} from \"@api/command/os/OpenAppCommand\";\nexport { isCommandErrorCode } from \"@api/command/utils/CommandErrors\";\nexport { CommandUtils } from \"@api/command/utils/CommandUtils\";\nexport {\n GlobalCommandError,\n GlobalCommandErrorHandler,\n} from \"@api/command/utils/GlobalCommandError\";\nexport {\n DeviceModel,\n DeviceModelId,\n LEDGER_VENDOR_ID,\n} from \"@api/device/DeviceModel\";\nexport { DeviceStatus } from \"@api/device/DeviceStatus\";\nexport { type InternalApi } from \"@api/device-action/DeviceAction\";\nexport {\n type DeviceActionState,\n DeviceActionStatus,\n} from \"@api/device-action/model/DeviceActionState\";\nexport { UserInteractionRequired } from \"@api/device-action/model/UserInteractionRequired\";\nexport { CallTaskInAppDeviceAction } from \"@api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction\";\nexport { UnknownDAError } from \"@api/device-action/os/Errors\";\nexport { GetDeviceStatusDeviceAction } from \"@api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction\";\nexport { GoToDashboardDeviceAction } from \"@api/device-action/os/GoToDashboard/GoToDashboardDeviceAction\";\nexport { ListAppsDeviceAction } from \"@api/device-action/os/ListApps/ListAppsDeviceAction\";\nexport { ListAppsWithMetadataDeviceAction } from \"@api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction\";\nexport { OpenAppDeviceAction } from \"@api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction\";\nexport { SendCommandInAppDeviceAction } from \"@api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction\";\nexport {\n type DeviceActionStateMachine,\n XStateDeviceAction,\n} from \"@api/device-action/xstate-utils/XStateDeviceAction\";\nexport { StaticDeviceModelDataSource } from \"@api/device-model/data/StaticDeviceModelDataSource\";\nexport { BleDeviceInfos } from \"@api/device-model/model/BleDeviceInfos\";\nexport { TransportDeviceModel } from \"@api/device-model/model/DeviceModel\";\nexport { ApduResponse } from \"@api/device-session/ApduResponse\";\nexport * from \"@api/device-session/data/FramerConst\";\nexport {\n type DeviceSessionState,\n DeviceSessionStateType,\n} from \"@api/device-session/DeviceSessionState\";\nexport { GenuineCheckDeviceAction } from \"@api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction\";\nexport { InstallAppDeviceAction } from \"@api/secure-channel/device-action/InstallApp/InstallAppDeviceAction\";\nexport { ListInstalledAppsDeviceAction } from \"@api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction\";\nexport { UninstallAppDeviceAction } from \"@api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction\";\n// TODO: remove from exported\nexport { defaultApduReceiverServiceStubBuilder } from \"@api/device-session/service/DefaultApduReceiverService.stub\";\nexport { defaultApduSenderServiceStubBuilder } from \"@api/device-session/service/DefaultApduSenderService.stub\";\nexport { FramerUtils } from \"@api/device-session/utils/FramerUtils\";\nexport { DeviceManagementKit } from \"@api/DeviceManagementKit\";\nexport { DeviceManagementKitBuilder } from \"@api/DeviceManagementKitBuilder\";\nexport * from \"@api/Error\";\nexport { LogLevel } from \"@api/logger-subscriber/model/LogLevel\";\nexport { ConsoleLogger } from \"@api/logger-subscriber/service/ConsoleLogger\";\nexport { WebLogsExporterLogger } from \"@api/logger-subscriber/service/WebLogsExporterLogger\";\nexport { ConnectedDevice } from \"@api/transport/model/ConnectedDevice\";\nexport * from \"@api/transport/model/Errors\";\nexport { TransportConnectedDevice } from \"@api/transport/model/TransportConnectedDevice\";\nexport { connectedDeviceStubBuilder } from \"@api/transport/model/TransportConnectedDevice.stub\";\nexport * from \"@api/types\";\nexport { base64StringToBuffer, isBase64String } from \"@api/utils/Base64String\";\nexport {\n bufferToHexaString,\n hexaStringToBuffer,\n isHexaString,\n} from \"@api/utils/HexaString\";\n"],
5
- "mappings": "meAAA,IAAAA,EAAA,GAAAC,GAAAD,EAAA,i1FAAAE,GAAAF,GAEA,IAAAG,EAAqB,gCACrBC,EAA8C,uCAC9CC,EAA2B,sCAC3BC,EAAAN,EAAc,2CALd,gBAMA,IAAAO,EAAiC,4CACjCC,EAAgC,2CAChCC,EAAuC,+BACvCC,EAIO,4CACPC,EAAgC,2CAChCC,EAGO,mDACPC,EAKO,mDACPC,EAGO,+CACPC,EAKO,2CACPC,EAIO,kDACPC,EAGO,0CACPC,EAAmC,4CACnCC,EAA6B,2CAC7BC,EAGO,iDACPC,EAIO,mCACPC,EAA6B,oCAE7BC,EAGO,sDACPC,EAAwC,4DACxCC,EAA0C,qFAC1ChB,EAA+B,wCAC/BiB,EAA4C,6EAC5CC,EAA0C,yEAC1CC,EAAqC,+DACrCC,EAAiD,uFACjDC,EAAoC,yEACpCC,EAA6C,2FAC7CC,EAGO,8DACPC,EAA4C,8DAC5CC,EAA+B,kDAC/Bb,EAAqC,+CACrCc,EAA6B,4CAC7B7B,EAAAN,EAAc,gDA9Ed,gBA+EA,IAAAoC,EAGO,kDACPC,EAAyC,mFACzCC,EAAuC,+EACvCC,EAA8C,6FAC9CC,EAAyC,mFAEzCC,EAAsD,uEACtDC,EAAoD,qEACpDC,EAA4B,iDAC5BC,EAAoC,oCACpCC,GAA2C,2CAC3CvC,EAAAN,EAAc,sBA7Fd,gBA8FA,IAAA8C,GAAyB,iDACzBC,GAA8B,wDAC9BC,GAAsC,gEACtCC,GAAgC,gDAChC3C,EAAAN,EAAc,uCAlGd,gBAmGA,IAAAkD,GAAyC,yDACzCA,GAA2C,8DAC3C5C,EAAAN,EAAc,sBArGd,gBAsGA,IAAAmD,EAAqD,mCACrDC,EAIO",
6
- "names": ["api_exports", "__export", "__toCommonJS", "import_Apdu", "import_ApduBuilder", "import_ApduParser", "__reExport", "import_ByteArrayBuilder", "import_ByteArrayParser", "import_Errors", "import_CommandResult", "import_CloseAppCommand", "import_GetAppAndVersionCommand", "import_GetBatteryStatusCommand", "import_GetOsVersionCommand", "import_ListAppsCommand", "import_LoadCertificateCommand", "import_OpenAppCommand", "import_CommandErrors", "import_CommandUtils", "import_GlobalCommandError", "import_DeviceModel", "import_DeviceStatus", "import_DeviceActionState", "import_UserInteractionRequired", "import_CallTaskInAppDeviceAction", "import_GetDeviceStatusDeviceAction", "import_GoToDashboardDeviceAction", "import_ListAppsDeviceAction", "import_ListAppsWithMetadataDeviceAction", "import_OpenAppDeviceAction", "import_SendCommandInAppDeviceAction", "import_XStateDeviceAction", "import_StaticDeviceModelDataSource", "import_BleDeviceInfos", "import_ApduResponse", "import_DeviceSessionState", "import_GenuineCheckDeviceAction", "import_InstallAppDeviceAction", "import_ListInstalledAppsDeviceAction", "import_UninstallAppDeviceAction", "import_DefaultApduReceiverService", "import_DefaultApduSenderService", "import_FramerUtils", "import_DeviceManagementKit", "import_DeviceManagementKitBuilder", "import_LogLevel", "import_ConsoleLogger", "import_WebLogsExporterLogger", "import_ConnectedDevice", "import_TransportConnectedDevice", "import_Base64String", "import_HexaString"]
4
+ "sourcesContent": ["\"use strict\";\n\nexport { Apdu } from \"@api/apdu/model/Apdu\";\nexport { APDU_MAX_PAYLOAD, ApduBuilder } from \"@api/apdu/utils/ApduBuilder\";\nexport { ApduParser } from \"@api/apdu/utils/ApduParser\";\nexport * from \"@api/apdu/utils/AppBuilderError\";\nexport { ByteArrayBuilder } from \"@api/apdu/utils/ByteArrayBuilder\";\nexport { ByteArrayParser } from \"@api/apdu/utils/ByteArrayParser\";\nexport { InvalidStatusWordError } from \"@api/command/Errors\";\nexport {\n CommandResultFactory,\n CommandResultStatus,\n isSuccessCommandResult,\n} from \"@api/command/model/CommandResult\";\nexport { CloseAppCommand } from \"@api/command/os/CloseAppCommand\";\nexport {\n GetAppAndVersionCommand,\n type GetAppAndVersionResponse,\n} from \"@api/command/os/GetAppAndVersionCommand\";\nexport {\n BatteryStatusType,\n type GetBatteryStatusArgs,\n GetBatteryStatusCommand,\n type GetBatteryStatusResponse,\n} from \"@api/command/os/GetBatteryStatusCommand\";\nexport {\n GetOsVersionCommand,\n type GetOsVersionResponse,\n} from \"@api/command/os/GetOsVersionCommand\";\nexport {\n type ListAppsArgs,\n ListAppsCommand,\n type ListAppsErrorCodes,\n type ListAppsResponse,\n} from \"@api/command/os/ListAppsCommand\";\nexport {\n type LoadCertificateArgs,\n LoadCertificateCommand,\n type LoadCertificateErrorCodes,\n} from \"@api/command/os/LoadCertificateCommand\";\nexport {\n type OpenAppArgs,\n OpenAppCommand,\n} from \"@api/command/os/OpenAppCommand\";\nexport { isCommandErrorCode } from \"@api/command/utils/CommandErrors\";\nexport { CommandUtils } from \"@api/command/utils/CommandUtils\";\nexport {\n GlobalCommandError,\n GlobalCommandErrorHandler,\n} from \"@api/command/utils/GlobalCommandError\";\nexport {\n DeviceModel,\n DeviceModelId,\n LEDGER_VENDOR_ID,\n} from \"@api/device/DeviceModel\";\nexport { DeviceStatus } from \"@api/device/DeviceStatus\";\nexport { type InternalApi } from \"@api/device-action/DeviceAction\";\nexport {\n type DeviceActionState,\n DeviceActionStatus,\n} from \"@api/device-action/model/DeviceActionState\";\nexport { UserInteractionRequired } from \"@api/device-action/model/UserInteractionRequired\";\nexport { CallTaskInAppDeviceAction } from \"@api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction\";\nexport {\n AppAlreadyInstalledDAError,\n DeviceLockedError,\n OutOfMemoryDAError,\n RefusedByUserDAError,\n UnknownDAError,\n UnsupportedFirmwareDAError,\n} from \"@api/device-action/os/Errors\";\nexport { GetDeviceMetadataDeviceAction } from \"@api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction\";\nexport { GetDeviceStatusDeviceAction } from \"@api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction\";\nexport { GoToDashboardDeviceAction } from \"@api/device-action/os/GoToDashboard/GoToDashboardDeviceAction\";\nexport { InstallOrUpdateAppsDeviceAction } from \"@api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction\";\nexport { ListAppsDeviceAction } from \"@api/device-action/os/ListApps/ListAppsDeviceAction\";\nexport { ListAppsWithMetadataDeviceAction } from \"@api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction\";\nexport { OpenAppDeviceAction } from \"@api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction\";\nexport { OpenAppWithDependenciesDeviceAction } from \"@api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction\";\nexport { SendCommandInAppDeviceAction } from \"@api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction\";\nexport {\n type DeviceActionStateMachine,\n XStateDeviceAction,\n} from \"@api/device-action/xstate-utils/XStateDeviceAction\";\nexport { StaticDeviceModelDataSource } from \"@api/device-model/data/StaticDeviceModelDataSource\";\nexport { BleDeviceInfos } from \"@api/device-model/model/BleDeviceInfos\";\nexport { TransportDeviceModel } from \"@api/device-model/model/DeviceModel\";\nexport { ApduResponse } from \"@api/device-session/ApduResponse\";\nexport * from \"@api/device-session/data/FramerConst\";\nexport {\n type DeviceSessionState,\n DeviceSessionStateType,\n} from \"@api/device-session/DeviceSessionState\";\nexport { GenuineCheckDeviceAction } from \"@api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction\";\nexport { InstallAppDeviceAction } from \"@api/secure-channel/device-action/InstallApp/InstallAppDeviceAction\";\nexport { ListInstalledAppsDeviceAction } from \"@api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction\";\nexport { UninstallAppDeviceAction } from \"@api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction\";\nexport { SecureChannelError } from \"@internal/secure-channel/model/Errors\";\n// TODO: remove from exported\nexport { defaultApduReceiverServiceStubBuilder } from \"@api/device-session/service/DefaultApduReceiverService.stub\";\nexport { defaultApduSenderServiceStubBuilder } from \"@api/device-session/service/DefaultApduSenderService.stub\";\nexport { FramerUtils } from \"@api/device-session/utils/FramerUtils\";\nexport { DeviceManagementKit } from \"@api/DeviceManagementKit\";\nexport { DeviceManagementKitBuilder } from \"@api/DeviceManagementKitBuilder\";\nexport * from \"@api/Error\";\nexport { LogLevel } from \"@api/logger-subscriber/model/LogLevel\";\nexport { ConsoleLogger } from \"@api/logger-subscriber/service/ConsoleLogger\";\nexport { WebLogsExporterLogger } from \"@api/logger-subscriber/service/WebLogsExporterLogger\";\nexport { ConnectedDevice } from \"@api/transport/model/ConnectedDevice\";\nexport {\n DeviceConnectionStateMachine,\n type DeviceConnectionStateMachineParams,\n} from \"@api/transport/model/DeviceConnectionStateMachine\";\nexport * from \"@api/transport/model/Errors\";\nexport { TransportConnectedDevice } from \"@api/transport/model/TransportConnectedDevice\";\nexport { connectedDeviceStubBuilder } from \"@api/transport/model/TransportConnectedDevice.stub\";\nexport * from \"@api/types\";\nexport { base64StringToBuffer, isBase64String } from \"@api/utils/Base64String\";\nexport {\n bufferToHexaString,\n hexaStringToBuffer,\n isHexaString,\n} from \"@api/utils/HexaString\";\n"],
5
+ "mappings": "meAAA,IAAAA,EAAA,GAAAC,GAAAD,EAAA,s5GAAAE,GAAAF,GAEA,IAAAG,EAAqB,gCACrBC,EAA8C,uCAC9CC,EAA2B,sCAC3BC,EAAAN,EAAc,2CALd,gBAMA,IAAAO,EAAiC,4CACjCC,EAAgC,2CAChCC,EAAuC,+BACvCC,EAIO,4CACPC,EAAgC,2CAChCC,EAGO,mDACPC,EAKO,mDACPC,EAGO,+CACPC,EAKO,2CACPC,EAIO,kDACPC,EAGO,0CACPC,EAAmC,4CACnCC,EAA6B,2CAC7BC,EAGO,iDACPC,EAIO,mCACPC,EAA6B,oCAE7BC,EAGO,sDACPC,EAAwC,4DACxCC,EAA0C,qFAC1ChB,EAOO,wCACPiB,EAA8C,iFAC9CC,EAA4C,6EAC5CC,EAA0C,yEAC1CC,EAAgD,qFAChDC,EAAqC,+DACrCC,EAAiD,uFACjDC,EAAoC,yEACpCC,EAAoD,6FACpDC,EAA6C,2FAC7CC,EAGO,8DACPC,EAA4C,8DAC5CC,EAA+B,kDAC/BhB,EAAqC,+CACrCiB,EAA6B,4CAC7BhC,EAAAN,EAAc,gDAxFd,gBAyFA,IAAAuC,EAGO,kDACPC,EAAyC,mFACzCC,EAAuC,+EACvCC,EAA8C,6FAC9CC,EAAyC,mFACzClC,EAAmC,iDAEnCmC,GAAsD,uEACtDC,GAAoD,qEACpDC,GAA4B,iDAC5BC,GAAoC,oCACpCC,GAA2C,2CAC3C1C,EAAAN,EAAc,sBAxGd,gBAyGA,IAAAiD,GAAyB,iDACzBC,GAA8B,wDAC9BC,GAAsC,gEACtCC,GAAgC,gDAChCC,GAGO,6DACP/C,EAAAN,EAAc,uCAjHd,gBAkHA,IAAAsD,GAAyC,yDACzCA,GAA2C,8DAC3ChD,EAAAN,EAAc,sBApHd,gBAqHA,IAAAuD,EAAqD,mCACrDC,EAIO",
6
+ "names": ["api_exports", "__export", "__toCommonJS", "import_Apdu", "import_ApduBuilder", "import_ApduParser", "__reExport", "import_ByteArrayBuilder", "import_ByteArrayParser", "import_Errors", "import_CommandResult", "import_CloseAppCommand", "import_GetAppAndVersionCommand", "import_GetBatteryStatusCommand", "import_GetOsVersionCommand", "import_ListAppsCommand", "import_LoadCertificateCommand", "import_OpenAppCommand", "import_CommandErrors", "import_CommandUtils", "import_GlobalCommandError", "import_DeviceModel", "import_DeviceStatus", "import_DeviceActionState", "import_UserInteractionRequired", "import_CallTaskInAppDeviceAction", "import_GetDeviceMetadataDeviceAction", "import_GetDeviceStatusDeviceAction", "import_GoToDashboardDeviceAction", "import_InstallOrUpdateAppsDeviceAction", "import_ListAppsDeviceAction", "import_ListAppsWithMetadataDeviceAction", "import_OpenAppDeviceAction", "import_OpenAppWithDependenciesDeviceAction", "import_SendCommandInAppDeviceAction", "import_XStateDeviceAction", "import_StaticDeviceModelDataSource", "import_BleDeviceInfos", "import_ApduResponse", "import_DeviceSessionState", "import_GenuineCheckDeviceAction", "import_InstallAppDeviceAction", "import_ListInstalledAppsDeviceAction", "import_UninstallAppDeviceAction", "import_DefaultApduReceiverService", "import_DefaultApduSenderService", "import_FramerUtils", "import_DeviceManagementKit", "import_DeviceManagementKitBuilder", "import_LogLevel", "import_ConsoleLogger", "import_WebLogsExporterLogger", "import_ConnectedDevice", "import_DeviceConnectionStateMachine", "import_TransportConnectedDevice", "import_Base64String", "import_HexaString"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var S=Object.defineProperty;var I=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var w=Object.prototype.hasOwnProperty;var O=(o,t)=>{for(var s in t)S(o,s,{get:t[s],enumerable:!0})},F=(o,t,s,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of x(t))!w.call(o,a)&&a!==s&&S(o,a,{get:()=>t[a],enumerable:!(u=I(t,a))||u.enumerable});return o};var T=o=>F(S({},"__esModule",{value:!0}),o);var M={};O(M,{GenuineCheckDeviceAction:()=>A});module.exports=T(M);var m=require("purify-ts"),n=require("xstate"),v=require("../../../command/model/CommandResult"),D=require("../../../command/os/GetOsVersionCommand"),h=require("../../../device-action/model/UserInteractionRequired"),V=require("../../../device-action/os/Const"),k=require("../../../device-action/os/GoToDashboard/GoToDashboardDeviceAction"),C=require("../../../device-action/xstate-utils/XStateDeviceAction"),G=require("../../../device-session/DeviceSessionState"),f=require("../../../secure-channel/task/ConnectToSecureChannelTask"),l=require("../../../secure-channel/task/types"),y=require("../../../secure-channel/utils");class A extends C.XStateDeviceAction{makeStateMachine(t){const{getOsVersion:s,getDeviceVersion:u,getFirmwareVersion:a,genuineCheck:g,getDeviceSessionState:d,setDeviceSessionState:i}=this.extractDependencies(t),c=this.input.unlockTimeout??V.DEFAULT_UNLOCK_TIMEOUT_MS,p=new k.GoToDashboardDeviceAction({input:{unlockTimeout:c}}).makeStateMachine(t);return(0,n.setup)({types:{input:{},context:{},output:{}},actors:{goToDashboard:p,getOsVersion:(0,n.fromPromise)(s),getDeviceVersion:(0,n.fromPromise)(u),getFirmwareVersion:(0,n.fromPromise)(a),genuineCheck:(0,n.fromObservable)(g)},guards:{hasError:e=>e.context._internalState.error!==null},actions:{assignErrorFromEvent:(0,n.assign)({_internalState:e=>({...e.context._internalState,error:e.event.error})})}}).createMachine({id:"GenuineCheckDeviceAction",initial:"DeviceReady",context:e=>({input:{unlockTimeout:e.input.unlockTimeout},intermediateValue:{requiredUserInteraction:h.UserInteractionRequired.None},_internalState:{error:null,result:{isGenuine:!1},getOsVersionResponse:null,deviceVersion:null,firmwareVersion:null}}),states:{DeviceReady:{always:{target:"GoToDashboard"}},GoToDashboard:{invoke:{id:"goToDashboard",src:"goToDashboard",input:e=>({unlockTimeout:e.context.input.unlockTimeout}),onSnapshot:{actions:(0,n.assign)({intermediateValue:e=>({...e.context.intermediateValue,requiredUserInteraction:e.event.snapshot.context.intermediateValue.requiredUserInteraction})})},onDone:{target:"GoToDashboardCheck",actions:(0,n.assign)({_internalState:e=>e.event.output.caseOf({Right:()=>e.context._internalState,Left:r=>({...e.context._internalState,error:r})})})},onError:{target:"Error",actions:"assignErrorFromEvent"}}},GoToDashboardCheck:{always:[{target:"Error",guard:"hasError"},{target:"GetOsVersion"}]},GetOsVersion:{invoke:{id:"getOsVersion",src:"getOsVersion",input:e=>{},onDone:{target:"GetOsVersionCheck",actions:(0,n.assign)({_internalState:e=>{if((0,v.isSuccessCommandResult)(e.event.output)){const r=d(),E=e.event.output.data.secureElementFlags.isSecureConnectionAllowed;return r.sessionStateType!==G.DeviceSessionStateType.Connected&&i({...r,isSecureConnectionAllowed:E}),{...e.context._internalState,getOsVersionResponse:e.event.output.data}}return{...e.context._internalState,error:e.event.output.error}}})}}},GetOsVersionCheck:{always:[{target:"Error",guard:"hasError"},{target:"GetDeviceVersion"}]},GetDeviceVersion:{invoke:{id:"getDeviceVersion",src:"getDeviceVersion",input:e=>({deviceInfo:e.context._internalState.getOsVersionResponse}),onDone:{target:"GetDeviceVersionCheck",actions:(0,n.assign)({_internalState:e=>e.event.output.caseOf({Right:r=>({...e.context._internalState,deviceVersion:r}),Left:r=>({...e.context._internalState,error:r})})})},onError:{target:"Error",actions:"assignErrorFromEvent"}}},GetDeviceVersionCheck:{always:[{target:"Error",guard:"hasError"},{target:"GetFirmwareVersion"}]},GetFirmwareVersion:{invoke:{id:"getFirmwareVersion",src:"getFirmwareVersion",input:e=>({deviceInfo:e.context._internalState.getOsVersionResponse,deviceVersion:e.context._internalState.deviceVersion}),onDone:{target:"GetFirmwareVersionCheck",actions:(0,n.assign)({_internalState:e=>e.event.output.caseOf({Right:r=>({...e.context._internalState,firmwareVersion:r}),Left:r=>({...e.context._internalState,error:r})})})},onError:{target:"Error",actions:"assignErrorFromEvent"}}},GetFirmwareVersionCheck:{always:[{target:"Error",guard:"hasError"},{target:"GenuineCheck"}]},GenuineCheck:{invoke:{id:"genuineCheck",src:"genuineCheck",input:e=>({deviceInfo:e.context._internalState.getOsVersionResponse,finalFirmware:e.context._internalState.firmwareVersion}),onSnapshot:{actions:(0,n.assign)({intermediateValue:e=>{switch(e.event.snapshot.context?.type){case l.SecureChannelEventType.PermissionRequested:return{requiredUserInteraction:h.UserInteractionRequired.AllowSecureConnection};case l.SecureChannelEventType.PermissionGranted:return{requiredUserInteraction:h.UserInteractionRequired.None};default:return{...e.context.intermediateValue}}},_internalState:e=>e.event.snapshot.context?.type===l.SecureChannelEventType.Result?{...e.context._internalState,result:{isGenuine:(0,y.isDeviceGenuine)(e.event.snapshot.context.payload)}}:e.context._internalState})},onDone:{target:"GenuineCheckCheck"},onError:{target:"Error",actions:"assignErrorFromEvent"}}},GenuineCheckCheck:{always:[{target:"Error",guard:"hasError"},{target:"Success"}]},Success:{type:"final"},Error:{type:"final"}},output:e=>e.context._internalState.error?(0,m.Left)(e.context._internalState.error):(0,m.Right)(e.context._internalState.result)})}extractDependencies(t){return{getOsVersion:()=>t.sendCommand(new D.GetOsVersionCommand),getDeviceVersion:({input:i})=>{const{deviceInfo:c}=i;return t.getManagerApiService().getDeviceVersion(c,1)},getFirmwareVersion:({input:i})=>{const{deviceInfo:c,deviceVersion:p}=i;return t.getManagerApiService().getFirmwareVersion(c,p,1)},genuineCheck:({input:i})=>{const{deviceInfo:c,finalFirmware:p}=i,e=t.getSecureChannelService().genuineCheck(c,p);return new f.ConnectToSecureChannelTask(t,{connection:e}).run()},getDeviceSessionState:()=>t.getDeviceSessionState(),setDeviceSessionState:i=>t.setDeviceSessionState(i)}}}0&&(module.exports={GenuineCheckDeviceAction});
1
+ "use strict";var g=Object.defineProperty;var I=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var w=Object.prototype.hasOwnProperty;var O=(o,t)=>{for(var s in t)g(o,s,{get:t[s],enumerable:!0})},A=(o,t,s,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of x(t))!w.call(o,a)&&a!==s&&g(o,a,{get:()=>t[a],enumerable:!(u=I(t,a))||u.enumerable});return o};var F=o=>A(g({},"__esModule",{value:!0}),o);var M={};O(M,{GenuineCheckDeviceAction:()=>T});module.exports=F(M);var m=require("purify-ts"),n=require("xstate"),d=require("../../../command/model/CommandResult"),D=require("../../../command/os/GetOsVersionCommand"),l=require("../../../device-action/model/UserInteractionRequired"),V=require("../../../device-action/os/Const"),k=require("../../../device-action/os/GoToDashboard/GoToDashboardDeviceAction"),C=require("../../../device-action/xstate-utils/XStateDeviceAction"),G=require("../../../device-session/DeviceSessionState"),f=require("../../../secure-channel/task/ConnectToSecureChannelTask"),h=require("../../../secure-channel/task/types"),E=require("../../../secure-channel/utils");class T extends C.XStateDeviceAction{makeStateMachine(t){const{getOsVersion:s,getDeviceVersion:u,getFirmwareVersion:a,genuineCheck:v,getDeviceSessionState:i,setDeviceSessionState:c}=this.extractDependencies(t),p=this.input.unlockTimeout??V.DEFAULT_UNLOCK_TIMEOUT_MS,S=new k.GoToDashboardDeviceAction({input:{unlockTimeout:p}}).makeStateMachine(t);return(0,n.setup)({types:{input:{},context:{},output:{}},actors:{goToDashboard:S,getOsVersion:(0,n.fromPromise)(s),getDeviceVersion:(0,n.fromPromise)(u),getFirmwareVersion:(0,n.fromPromise)(a),genuineCheck:(0,n.fromObservable)(v)},guards:{hasError:e=>e.context._internalState.error!==null},actions:{assignErrorFromEvent:(0,n.assign)({_internalState:e=>({...e.context._internalState,error:e.event.error})})}}).createMachine({id:"GenuineCheckDeviceAction",initial:"DeviceReady",context:e=>({input:{unlockTimeout:e.input.unlockTimeout},intermediateValue:{requiredUserInteraction:l.UserInteractionRequired.None},_internalState:{error:null,result:{isGenuine:!1},getOsVersionResponse:null,deviceVersion:null,firmwareVersion:null}}),states:{DeviceReady:{always:{target:"GoToDashboard"}},GoToDashboard:{invoke:{id:"goToDashboard",src:"goToDashboard",input:e=>({unlockTimeout:e.context.input.unlockTimeout}),onSnapshot:{actions:(0,n.assign)({intermediateValue:e=>({...e.context.intermediateValue,requiredUserInteraction:e.event.snapshot.context.intermediateValue.requiredUserInteraction})})},onDone:{target:"GoToDashboardCheck",actions:(0,n.assign)({_internalState:e=>e.event.output.caseOf({Right:()=>e.context._internalState,Left:r=>({...e.context._internalState,error:r})})})},onError:{target:"Error",actions:"assignErrorFromEvent"}}},GoToDashboardCheck:{always:[{target:"Error",guard:"hasError"},{target:"GetOsVersion"}]},GetOsVersion:{invoke:{id:"getOsVersion",src:"getOsVersion",input:e=>{},onDone:{target:"GetOsVersionCheck",actions:(0,n.assign)({_internalState:e=>{if((0,d.isSuccessCommandResult)(e.event.output)){const r=i(),y=e.event.output.data.secureElementFlags.isSecureConnectionAllowed;return r.sessionStateType!==G.DeviceSessionStateType.Connected&&c({...r,isSecureConnectionAllowed:y}),{...e.context._internalState,getOsVersionResponse:e.event.output.data}}return{...e.context._internalState,error:e.event.output.error}}})}}},GetOsVersionCheck:{always:[{target:"Error",guard:"hasError"},{target:"GetDeviceVersion"}]},GetDeviceVersion:{invoke:{id:"getDeviceVersion",src:"getDeviceVersion",input:e=>({deviceInfo:e.context._internalState.getOsVersionResponse}),onDone:{target:"GetDeviceVersionCheck",actions:(0,n.assign)({_internalState:e=>e.event.output.caseOf({Right:r=>({...e.context._internalState,deviceVersion:r}),Left:r=>({...e.context._internalState,error:r})})})},onError:{target:"Error",actions:"assignErrorFromEvent"}}},GetDeviceVersionCheck:{always:[{target:"Error",guard:"hasError"},{target:"GetFirmwareVersion"}]},GetFirmwareVersion:{invoke:{id:"getFirmwareVersion",src:"getFirmwareVersion",input:e=>({deviceInfo:e.context._internalState.getOsVersionResponse,deviceVersion:e.context._internalState.deviceVersion}),onDone:{target:"GetFirmwareVersionCheck",actions:(0,n.assign)({_internalState:e=>e.event.output.caseOf({Right:r=>({...e.context._internalState,firmwareVersion:r}),Left:r=>({...e.context._internalState,error:r})})})},onError:{target:"Error",actions:"assignErrorFromEvent"}}},GetFirmwareVersionCheck:{always:[{target:"Error",guard:"hasError"},{target:"GenuineCheck"}]},GenuineCheck:{invoke:{id:"genuineCheck",src:"genuineCheck",input:e=>({deviceInfo:e.context._internalState.getOsVersionResponse,finalFirmware:e.context._internalState.firmwareVersion}),onSnapshot:{actions:(0,n.assign)({intermediateValue:e=>{switch(e.event.snapshot.context?.type){case h.SecureChannelEventType.PermissionRequested:return{requiredUserInteraction:l.UserInteractionRequired.AllowSecureConnection};case h.SecureChannelEventType.PermissionGranted:return{requiredUserInteraction:l.UserInteractionRequired.None};default:return{...e.context.intermediateValue}}},_internalState:e=>e.event.snapshot.context?.type===h.SecureChannelEventType.Error?{...e.context._internalState,error:e.event.snapshot.context.error.mapDAErrors()}:e.event.snapshot.context?.type===h.SecureChannelEventType.Result?{...e.context._internalState,result:{isGenuine:(0,E.isDeviceGenuine)(e.event.snapshot.context.payload)}}:e.context._internalState})},onDone:{target:"GenuineCheckCheck"},onError:{target:"Error",actions:"assignErrorFromEvent"}}},GenuineCheckCheck:{always:[{target:"Error",guard:"hasError"},{target:"Success"}]},Success:{type:"final"},Error:{type:"final"}},output:e=>e.context._internalState.error?(0,m.Left)(e.context._internalState.error):(0,m.Right)(e.context._internalState.result)})}extractDependencies(t){return{getOsVersion:()=>t.sendCommand(new D.GetOsVersionCommand),getDeviceVersion:({input:i})=>{const{deviceInfo:c}=i;return t.getManagerApiService().getDeviceVersion(c)},getFirmwareVersion:({input:i})=>{const{deviceInfo:c,deviceVersion:p}=i;return t.getManagerApiService().getFirmwareVersion(c,p)},genuineCheck:({input:i})=>{const{deviceInfo:c,finalFirmware:p}=i,S=t.getSecureChannelService().genuineCheck(c,p);return new f.ConnectToSecureChannelTask(t,{connection:S}).run()},getDeviceSessionState:()=>t.getDeviceSessionState(),setDeviceSessionState:i=>t.setDeviceSessionState(i)}}}0&&(module.exports={GenuineCheckDeviceAction});
2
2
  //# sourceMappingURL=GenuineCheckDeviceAction.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.ts"],
4
- "sourcesContent": ["import { Left, Right } from \"purify-ts\";\nimport { assign, fromObservable, fromPromise, setup } from \"xstate\";\n\nimport { isSuccessCommandResult } from \"@api/command/model/CommandResult\";\nimport {\n GetOsVersionCommand,\n type GetOsVersionResponse,\n} from \"@api/command/os/GetOsVersionCommand\";\nimport { type InternalApi } from \"@api/device-action/DeviceAction\";\nimport { UserInteractionRequired } from \"@api/device-action/model/UserInteractionRequired\";\nimport { DEFAULT_UNLOCK_TIMEOUT_MS } from \"@api/device-action/os/Const\";\nimport { GoToDashboardDeviceAction } from \"@api/device-action/os/GoToDashboard/GoToDashboardDeviceAction\";\nimport { type StateMachineTypes } from \"@api/device-action/xstate-utils/StateMachineTypes\";\nimport {\n type DeviceActionStateMachine,\n XStateDeviceAction,\n} from \"@api/device-action/xstate-utils/XStateDeviceAction\";\nimport {\n type DeviceSessionState,\n DeviceSessionStateType,\n} from \"@api/device-session/DeviceSessionState\";\nimport {\n type GenuineCheckDAError,\n type GenuineCheckDAInput,\n type GenuineCheckDAIntermediateValue,\n type GenuineCheckDAOutput,\n type GenuineCheckStateMachineInternalState,\n type MachineDependencies,\n} from \"@api/secure-channel/device-action/GenuineCheck/types\";\nimport { ConnectToSecureChannelTask } from \"@api/secure-channel/task/ConnectToSecureChannelTask\";\nimport { SecureChannelEventType } from \"@api/secure-channel/task/types\";\nimport { type Input } from \"@api/secure-channel/types\";\nimport { isDeviceGenuine } from \"@api/secure-channel/utils\";\nimport { type DeviceVersion } from \"@internal/manager-api/model/Device\";\nimport { type FinalFirmware } from \"@internal/manager-api/model/Firmware\";\n\nexport class GenuineCheckDeviceAction extends XStateDeviceAction<\n GenuineCheckDAOutput,\n GenuineCheckDAInput,\n GenuineCheckDAError,\n GenuineCheckDAIntermediateValue,\n GenuineCheckStateMachineInternalState\n> {\n override makeStateMachine(\n internalApi: InternalApi,\n ): DeviceActionStateMachine<\n GenuineCheckDAOutput,\n GenuineCheckDAInput,\n GenuineCheckDAError,\n GenuineCheckDAIntermediateValue,\n GenuineCheckStateMachineInternalState\n > {\n type types = StateMachineTypes<\n GenuineCheckDAOutput,\n GenuineCheckDAInput,\n GenuineCheckDAError,\n GenuineCheckDAIntermediateValue,\n GenuineCheckStateMachineInternalState\n >;\n\n const {\n getOsVersion,\n getDeviceVersion,\n getFirmwareVersion,\n genuineCheck,\n getDeviceSessionState,\n setDeviceSessionState,\n } = this.extractDependencies(internalApi);\n\n const unlockTimeout = this.input.unlockTimeout ?? DEFAULT_UNLOCK_TIMEOUT_MS;\n\n const goToDashboardMachine = new GoToDashboardDeviceAction({\n input: {\n unlockTimeout,\n },\n }).makeStateMachine(internalApi);\n\n return setup({\n types: {\n input: {} as types[\"input\"],\n context: {} as types[\"context\"],\n output: {} as types[\"output\"],\n },\n actors: {\n goToDashboard: goToDashboardMachine,\n getOsVersion: fromPromise(getOsVersion),\n getDeviceVersion: fromPromise(getDeviceVersion),\n getFirmwareVersion: fromPromise(getFirmwareVersion),\n genuineCheck: fromObservable(genuineCheck),\n },\n guards: {\n hasError: (_) => _.context._internalState.error !== null,\n },\n actions: {\n assignErrorFromEvent: assign({\n _internalState: (_) => ({\n ..._.context._internalState,\n error: _.event[\"error\"],\n }),\n }),\n },\n }).createMachine({\n /** @xstate-layout N4IgpgJg5mDOIC5QHEwDsCuBLNYDCAFmAMYDWAImAG5bFgCCxALlgPZoB0lNdASmAEMIATwDEAbQAMAXUSgADq1hYW7OSAAeiAIwB2AGwAWDvskBOAKwAmC9YvbJADkMAaEMMQBmT2ZPazuo6SFp6SDpKG+gC+UW6omDj4RGTctAzMbJzIrAAqrOQCsAQARqwCAE4QohDsYBw4VKykdVC5+YUlZZVSskggisqqaOpaCFaGntocEwaOFkYR2oa6bh4I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cGvQiIlHA2Bw4u2ZZ2dHTn0ZR80JMe6SXrk-NjbIU2FuXR1PCFUwXV7N1JWlNtHAMCCov8R2fHMbQfaS6Ntb4yN3IFgn+VCWt9HTiwQKOKZJhsCWJeCAv7KLicA9LvHsoXM3lyrkxa5AzdOwOlvtjbzU0FYCA4HUYdUb9ys1NX-6AFo6Z9A5pWCSyzBozaIY9vw5fsaxEfg9WS8L9qmTHfghDWNe-tGMXjK2Vc44mEJ7AONs3hHBnyCBYCIwZQw2Vvh3e+aEWQwlNDlaO+V-BbhMDiRsIYcSqjxBDSYJlFQBBKtsMCbsJjtzOlzI0rJYRmkjEg9eDomq+HJqYUUQYKoQw9BwSwoR9DSgONTO2FC0YdSnENBhb8vD+GAV2ckLME72H3GLaYtUdJBjFjXERK8u7iNcrqSRQtEAb0lAqSUuh971iPk7AkbEOCq28KBYmjttFa10UpEshjCajBxCZeqngaL2BCttGxBV-C1kpm6L2U8kZQMSjA86qUPGvmuF4-kh8pgGCahEJqsNTyVSmPMZu9VoqQK1BHSh-t3rTRuhI-uyD-p022PYkKys3YKIASfMCxhljRT0OYfex0b7xMqWInmtT9H0PqYw1EIVRYYL0MFJqRwtrSnHs3BwmIQiOFcZ3ISFS0kx3mMA221hHDnJqjiOm9dHasRqmVR0cx+w7OGa1URXcKkGOmVIhAkhR5Q1Yvwt0JTmL1ReXEt5OjYwAGUMDEDoLAeA3yjFjEsD0+Yug9AzFhp4ECBghQ4qMuclsl9dmwM4AAUQeuUQ5+VvA1S2JKbOzEWZ1xPm6Q8QiJSSwdkcDUMQohAA */\n id: \"GenuineCheckDeviceAction\",\n initial: \"DeviceReady\",\n context: (_) => {\n return {\n input: {\n unlockTimeout: _.input.unlockTimeout,\n },\n intermediateValue: {\n requiredUserInteraction: UserInteractionRequired.None,\n },\n _internalState: {\n error: null,\n result: { isGenuine: false },\n getOsVersionResponse: null,\n deviceVersion: null,\n firmwareVersion: null,\n },\n };\n },\n states: {\n DeviceReady: {\n always: {\n target: \"GoToDashboard\",\n },\n },\n GoToDashboard: {\n invoke: {\n id: \"goToDashboard\",\n src: \"goToDashboard\",\n input: (_) => ({\n unlockTimeout: _.context.input.unlockTimeout,\n }),\n onSnapshot: {\n actions: assign({\n intermediateValue: (_) => ({\n ..._.context.intermediateValue,\n requiredUserInteraction:\n _.event.snapshot.context.intermediateValue\n .requiredUserInteraction,\n }),\n }),\n },\n onDone: {\n target: \"GoToDashboardCheck\",\n actions: assign({\n _internalState: (_) =>\n _.event.output.caseOf<GenuineCheckStateMachineInternalState>({\n Right: () => _.context._internalState,\n Left: (error) => ({\n ..._.context._internalState,\n error,\n }),\n }),\n }),\n },\n onError: {\n target: \"Error\",\n actions: \"assignErrorFromEvent\",\n },\n },\n },\n GoToDashboardCheck: {\n always: [\n {\n target: \"Error\",\n guard: \"hasError\",\n },\n {\n target: \"GetOsVersion\",\n },\n ],\n },\n GetOsVersion: {\n invoke: {\n id: \"getOsVersion\",\n src: \"getOsVersion\",\n input: (_) => undefined,\n onDone: {\n target: \"GetOsVersionCheck\",\n actions: assign({\n _internalState: (_) => {\n if (isSuccessCommandResult(_.event.output)) {\n const currentState: DeviceSessionState =\n getDeviceSessionState();\n const isSecureConnectionAllowed =\n _.event.output.data.secureElementFlags\n .isSecureConnectionAllowed;\n if (\n currentState.sessionStateType !==\n DeviceSessionStateType.Connected\n ) {\n setDeviceSessionState({\n ...currentState,\n isSecureConnectionAllowed,\n });\n }\n return {\n ..._.context._internalState,\n getOsVersionResponse: _.event.output.data,\n };\n }\n return {\n ..._.context._internalState,\n error: _.event.output.error,\n };\n },\n }),\n },\n },\n },\n GetOsVersionCheck: {\n always: [\n {\n target: \"Error\",\n guard: \"hasError\",\n },\n {\n target: \"GetDeviceVersion\",\n },\n ],\n },\n GetDeviceVersion: {\n invoke: {\n id: \"getDeviceVersion\",\n src: \"getDeviceVersion\",\n input: (_) => ({\n deviceInfo: _.context._internalState.getOsVersionResponse!,\n }),\n onDone: {\n target: \"GetDeviceVersionCheck\",\n actions: assign({\n _internalState: (_) =>\n _.event.output.caseOf<GenuineCheckStateMachineInternalState>({\n Right: (deviceVersion) => ({\n ..._.context._internalState,\n deviceVersion,\n }),\n Left: (error) => ({\n ..._.context._internalState,\n error,\n }),\n }),\n }),\n },\n onError: {\n target: \"Error\",\n actions: \"assignErrorFromEvent\",\n },\n },\n },\n GetDeviceVersionCheck: {\n always: [\n {\n target: \"Error\",\n guard: \"hasError\",\n },\n { target: \"GetFirmwareVersion\" },\n ],\n },\n GetFirmwareVersion: {\n invoke: {\n id: \"getFirmwareVersion\",\n src: \"getFirmwareVersion\",\n input: (_) => ({\n deviceInfo: _.context._internalState.getOsVersionResponse!,\n deviceVersion: _.context._internalState.deviceVersion!,\n }),\n onDone: {\n target: \"GetFirmwareVersionCheck\",\n actions: assign({\n _internalState: (_) =>\n _.event.output.caseOf<GenuineCheckStateMachineInternalState>({\n Right: (firmwareVersion) => ({\n ..._.context._internalState,\n firmwareVersion,\n }),\n Left: (error) => ({\n ..._.context._internalState,\n error,\n }),\n }),\n }),\n },\n onError: {\n target: \"Error\",\n actions: \"assignErrorFromEvent\",\n },\n },\n },\n GetFirmwareVersionCheck: {\n always: [\n {\n target: \"Error\",\n guard: \"hasError\",\n },\n { target: \"GenuineCheck\" },\n ],\n },\n GenuineCheck: {\n invoke: {\n id: \"genuineCheck\",\n src: \"genuineCheck\",\n input: (_) => ({\n deviceInfo: _.context._internalState.getOsVersionResponse!,\n finalFirmware: _.context._internalState.firmwareVersion!,\n }),\n onSnapshot: {\n actions: assign({\n intermediateValue: (_) => {\n switch (_.event.snapshot.context?.type) {\n case SecureChannelEventType.PermissionRequested: {\n return {\n requiredUserInteraction:\n UserInteractionRequired.AllowSecureConnection,\n };\n }\n case SecureChannelEventType.PermissionGranted: {\n return {\n requiredUserInteraction: UserInteractionRequired.None,\n };\n }\n default:\n return {\n ..._.context.intermediateValue,\n };\n }\n },\n _internalState: (_) => {\n if (\n _.event.snapshot.context?.type ===\n SecureChannelEventType.Result\n ) {\n return {\n ..._.context._internalState,\n result: {\n isGenuine: isDeviceGenuine(\n _.event.snapshot.context.payload,\n ),\n },\n };\n }\n return _.context._internalState;\n },\n }),\n },\n onDone: {\n target: \"GenuineCheckCheck\",\n },\n onError: {\n target: \"Error\",\n actions: \"assignErrorFromEvent\",\n },\n },\n },\n GenuineCheckCheck: {\n always: [\n {\n target: \"Error\",\n guard: \"hasError\",\n },\n {\n target: \"Success\",\n },\n ],\n },\n Success: {\n type: \"final\",\n },\n Error: {\n type: \"final\",\n },\n },\n output: (_) => {\n if (_.context._internalState.error) {\n return Left(_.context._internalState.error);\n } else {\n return Right(_.context._internalState.result);\n }\n },\n });\n }\n\n extractDependencies(internalApi: InternalApi): MachineDependencies {\n const provider = 1; // TODO: get the provider from user configuration\n\n const getOsVersion = () =>\n internalApi.sendCommand(new GetOsVersionCommand());\n\n const getDeviceVersion = ({\n input,\n }: Input<{ deviceInfo: GetOsVersionResponse }>) => {\n const { deviceInfo } = input;\n return internalApi\n .getManagerApiService()\n .getDeviceVersion(deviceInfo, provider);\n };\n\n const getFirmwareVersion = ({\n input,\n }: Input<{\n deviceInfo: GetOsVersionResponse;\n deviceVersion: DeviceVersion;\n }>) => {\n const { deviceInfo, deviceVersion } = input;\n return internalApi\n .getManagerApiService()\n .getFirmwareVersion(deviceInfo, deviceVersion, provider);\n };\n\n const genuineCheck = ({\n input,\n }: Input<{\n deviceInfo: GetOsVersionResponse;\n finalFirmware: FinalFirmware;\n }>) => {\n const { deviceInfo, finalFirmware } = input;\n const eitherConnection = internalApi\n .getSecureChannelService()\n .genuineCheck(deviceInfo, finalFirmware);\n return new ConnectToSecureChannelTask(internalApi, {\n connection: eitherConnection,\n }).run();\n };\n\n return {\n getOsVersion,\n getDeviceVersion,\n getFirmwareVersion,\n genuineCheck,\n getDeviceSessionState: () => internalApi.getDeviceSessionState(),\n setDeviceSessionState: (state: DeviceSessionState) =>\n internalApi.setDeviceSessionState(state),\n };\n }\n}\n"],
5
- "mappings": "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O,CACL,KAAM,CAAE,WAAAC,EAAY,cAAAC,CAAc,EAAIF,EAChCG,EAAmBlB,EACtB,wBAAwB,EACxB,aAAagB,EAAYC,CAAa,EACzC,OAAO,IAAI,6BAA2BjB,EAAa,CACjD,WAAYkB,CACd,CAAC,EAAE,IAAI,CACT,EAOE,sBAAuB,IAAMlB,EAAY,sBAAsB,EAC/D,sBAAwBmB,GACtBnB,EAAY,sBAAsBmB,CAAK,CAC3C,CACF,CACF",
4
+ "sourcesContent": ["import { Left, Right } from \"purify-ts\";\nimport { assign, fromObservable, fromPromise, setup } from \"xstate\";\n\nimport { isSuccessCommandResult } from \"@api/command/model/CommandResult\";\nimport {\n GetOsVersionCommand,\n type GetOsVersionResponse,\n} from \"@api/command/os/GetOsVersionCommand\";\nimport { type InternalApi } from \"@api/device-action/DeviceAction\";\nimport { UserInteractionRequired } from \"@api/device-action/model/UserInteractionRequired\";\nimport { DEFAULT_UNLOCK_TIMEOUT_MS } from \"@api/device-action/os/Const\";\nimport { GoToDashboardDeviceAction } from \"@api/device-action/os/GoToDashboard/GoToDashboardDeviceAction\";\nimport { type StateMachineTypes } from \"@api/device-action/xstate-utils/StateMachineTypes\";\nimport {\n type DeviceActionStateMachine,\n XStateDeviceAction,\n} from \"@api/device-action/xstate-utils/XStateDeviceAction\";\nimport {\n type DeviceSessionState,\n DeviceSessionStateType,\n} from \"@api/device-session/DeviceSessionState\";\nimport {\n type GenuineCheckDAError,\n type GenuineCheckDAInput,\n type GenuineCheckDAIntermediateValue,\n type GenuineCheckDAOutput,\n type GenuineCheckStateMachineInternalState,\n type MachineDependencies,\n} from \"@api/secure-channel/device-action/GenuineCheck/types\";\nimport { ConnectToSecureChannelTask } from \"@api/secure-channel/task/ConnectToSecureChannelTask\";\nimport { SecureChannelEventType } from \"@api/secure-channel/task/types\";\nimport { type Input } from \"@api/secure-channel/types\";\nimport { isDeviceGenuine } from \"@api/secure-channel/utils\";\nimport { type DeviceVersion } from \"@internal/manager-api/model/Device\";\nimport { type FinalFirmware } from \"@internal/manager-api/model/Firmware\";\n\nexport class GenuineCheckDeviceAction extends XStateDeviceAction<\n GenuineCheckDAOutput,\n GenuineCheckDAInput,\n GenuineCheckDAError,\n GenuineCheckDAIntermediateValue,\n GenuineCheckStateMachineInternalState\n> {\n override makeStateMachine(\n internalApi: InternalApi,\n ): DeviceActionStateMachine<\n GenuineCheckDAOutput,\n GenuineCheckDAInput,\n GenuineCheckDAError,\n GenuineCheckDAIntermediateValue,\n GenuineCheckStateMachineInternalState\n > {\n type types = StateMachineTypes<\n GenuineCheckDAOutput,\n GenuineCheckDAInput,\n GenuineCheckDAError,\n GenuineCheckDAIntermediateValue,\n GenuineCheckStateMachineInternalState\n >;\n\n const {\n getOsVersion,\n getDeviceVersion,\n getFirmwareVersion,\n genuineCheck,\n getDeviceSessionState,\n setDeviceSessionState,\n } = this.extractDependencies(internalApi);\n\n const unlockTimeout = this.input.unlockTimeout ?? DEFAULT_UNLOCK_TIMEOUT_MS;\n\n const goToDashboardMachine = new GoToDashboardDeviceAction({\n input: {\n unlockTimeout,\n },\n }).makeStateMachine(internalApi);\n\n return setup({\n types: {\n input: {} as types[\"input\"],\n context: {} as types[\"context\"],\n output: {} as types[\"output\"],\n },\n actors: {\n goToDashboard: goToDashboardMachine,\n getOsVersion: fromPromise(getOsVersion),\n getDeviceVersion: fromPromise(getDeviceVersion),\n getFirmwareVersion: fromPromise(getFirmwareVersion),\n genuineCheck: fromObservable(genuineCheck),\n },\n guards: {\n hasError: (_) => _.context._internalState.error !== null,\n },\n actions: {\n assignErrorFromEvent: assign({\n _internalState: (_) => ({\n ..._.context._internalState,\n error: _.event[\"error\"],\n }),\n }),\n },\n }).createMachine({\n /** @xstate-layout N4IgpgJg5mDOIC5QHEwDsCuBLNYDCAFmAMYDWAImAG5bFgCCxALlgPZoB0lNdASmAEMIATwDEAbQAMAXUSgADq1hYW7OSAAeiAIwB2AGwAWDvskBOAKwAmC9YvbJADkMAaEMMQBmT2ZPazuo6SF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DKkITv4lDHNSzGvpxrKP1+7yHVCYxtDJ5Y2NAyRqbbAJfF7WGJhsUVmMvZHbI55KOo1t8ahwsa8xgHXrnx3L+UdCUthZsDdG8W3dEMcGvQiIlHA2Bw4u2ZZ2dHTn0ZR80JMe6SXrk-NjbIU2FuXR1PCFUwXV7N1JWlNtHAMCCov8R2fHMbQfaS6Ntb4yN3IFgn+VCWt9HTiwQKOKZJhsCWJeCAv7KLicA9LvHsoXM3lyrkxa5AzdOwOlvtjbzU0FYCA4HUYdUb9ys1NX-6AFo6Z9A5pWCSyzBozaIY9vw5fsaxEfg9WS8L9qmTHfghDWNe-tGMXjK2Vc44mEJ7AONs3hHBnyCBYCIwZQw2Vvh3e+aEWQwlNDlaO+V-BbhMDiRsIYcSqjxBDSYJlFQBBKtsMCbsJjtzOlzI0rJYRmkjEg9eDomq+HJqYUUQYKoQw9BwSwoR9DSgONTO2FC0YdSnENBhb8vD+GAV2ckLME72H3GLaYtUdJBjFjXERK8u7iNcrqSRQtEAb0lAqSUuh971iPk7AkbEOCq28KBYmjttFa10UpEshjCajBxCZeqngaL2BCttGxBV-C1kpm6L2U8kZQMSjA86qUPGvmuF4-kh8pgGCahEJqsNTyVSmPMZu9VoqQK1BHSh-t3rTRuhI-uyD-p022PYkKys3YKIASfMCxhljRT0OYfex0b7xMqWInmtT9H0PqYw1EIVRYYL0MFJqRwtrSnHs3BwmIQiOFcZ3ISFS0kx3mMA221hHDnJqjiOm9dHasRqmVR0cx+w7OGa1URXcKkGOmVIhAkhR5Q1Yvwt0JTmL1ReXEt5OjYwAGUMDEDoLAeA3yjFjEsD0+Yug9AzFhp4ECBghQ4qMuclsl9dmwM4AAUQeuUQ5+VvA1S2JKbOzEWZ1xPm6Q8QiJSSwdkcDUMQohAA */\n id: \"GenuineCheckDeviceAction\",\n initial: \"DeviceReady\",\n context: (_) => {\n return {\n input: {\n unlockTimeout: _.input.unlockTimeout,\n },\n intermediateValue: {\n requiredUserInteraction: UserInteractionRequired.None,\n },\n _internalState: {\n error: null,\n result: { isGenuine: false },\n getOsVersionResponse: null,\n deviceVersion: null,\n firmwareVersion: null,\n },\n };\n },\n states: {\n DeviceReady: {\n always: {\n target: \"GoToDashboard\",\n },\n },\n GoToDashboard: {\n invoke: {\n id: \"goToDashboard\",\n src: \"goToDashboard\",\n input: (_) => ({\n unlockTimeout: _.context.input.unlockTimeout,\n }),\n onSnapshot: {\n actions: assign({\n intermediateValue: (_) => ({\n ..._.context.intermediateValue,\n requiredUserInteraction:\n _.event.snapshot.context.intermediateValue\n .requiredUserInteraction,\n }),\n }),\n },\n onDone: {\n target: \"GoToDashboardCheck\",\n actions: assign({\n _internalState: (_) =>\n _.event.output.caseOf<GenuineCheckStateMachineInternalState>({\n Right: () => _.context._internalState,\n Left: (error) => ({\n ..._.context._internalState,\n error,\n }),\n }),\n }),\n },\n onError: {\n target: \"Error\",\n actions: \"assignErrorFromEvent\",\n },\n },\n },\n GoToDashboardCheck: {\n always: [\n {\n target: \"Error\",\n guard: \"hasError\",\n },\n {\n target: \"GetOsVersion\",\n },\n ],\n },\n GetOsVersion: {\n invoke: {\n id: \"getOsVersion\",\n src: \"getOsVersion\",\n input: (_) => undefined,\n onDone: {\n target: \"GetOsVersionCheck\",\n actions: assign({\n _internalState: (_) => {\n if (isSuccessCommandResult(_.event.output)) {\n const currentState: DeviceSessionState =\n getDeviceSessionState();\n const isSecureConnectionAllowed =\n _.event.output.data.secureElementFlags\n .isSecureConnectionAllowed;\n if (\n currentState.sessionStateType !==\n DeviceSessionStateType.Connected\n ) {\n setDeviceSessionState({\n ...currentState,\n isSecureConnectionAllowed,\n });\n }\n return {\n ..._.context._internalState,\n getOsVersionResponse: _.event.output.data,\n };\n }\n return {\n ..._.context._internalState,\n error: _.event.output.error,\n };\n },\n }),\n },\n },\n },\n GetOsVersionCheck: {\n always: [\n {\n target: \"Error\",\n guard: \"hasError\",\n },\n {\n target: \"GetDeviceVersion\",\n },\n ],\n },\n GetDeviceVersion: {\n invoke: {\n id: \"getDeviceVersion\",\n src: \"getDeviceVersion\",\n input: (_) => ({\n deviceInfo: _.context._internalState.getOsVersionResponse!,\n }),\n onDone: {\n target: \"GetDeviceVersionCheck\",\n actions: assign({\n _internalState: (_) =>\n _.event.output.caseOf<GenuineCheckStateMachineInternalState>({\n Right: (deviceVersion) => ({\n ..._.context._internalState,\n deviceVersion,\n }),\n Left: (error) => ({\n ..._.context._internalState,\n error,\n }),\n }),\n }),\n },\n onError: {\n target: \"Error\",\n actions: \"assignErrorFromEvent\",\n },\n },\n },\n GetDeviceVersionCheck: {\n always: [\n {\n target: \"Error\",\n guard: \"hasError\",\n },\n { target: \"GetFirmwareVersion\" },\n ],\n },\n GetFirmwareVersion: {\n invoke: {\n id: \"getFirmwareVersion\",\n src: \"getFirmwareVersion\",\n input: (_) => ({\n deviceInfo: _.context._internalState.getOsVersionResponse!,\n deviceVersion: _.context._internalState.deviceVersion!,\n }),\n onDone: {\n target: \"GetFirmwareVersionCheck\",\n actions: assign({\n _internalState: (_) =>\n _.event.output.caseOf<GenuineCheckStateMachineInternalState>({\n Right: (firmwareVersion) => ({\n ..._.context._internalState,\n firmwareVersion,\n }),\n Left: (error) => ({\n ..._.context._internalState,\n error,\n }),\n }),\n }),\n },\n onError: {\n target: \"Error\",\n actions: \"assignErrorFromEvent\",\n },\n },\n },\n GetFirmwareVersionCheck: {\n always: [\n {\n target: \"Error\",\n guard: \"hasError\",\n },\n { target: \"GenuineCheck\" },\n ],\n },\n GenuineCheck: {\n invoke: {\n id: \"genuineCheck\",\n src: \"genuineCheck\",\n input: (_) => ({\n deviceInfo: _.context._internalState.getOsVersionResponse!,\n finalFirmware: _.context._internalState.firmwareVersion!,\n }),\n onSnapshot: {\n actions: assign({\n intermediateValue: (_) => {\n switch (_.event.snapshot.context?.type) {\n case SecureChannelEventType.PermissionRequested: {\n return {\n requiredUserInteraction:\n UserInteractionRequired.AllowSecureConnection,\n };\n }\n case SecureChannelEventType.PermissionGranted: {\n return {\n requiredUserInteraction: UserInteractionRequired.None,\n };\n }\n default:\n return {\n ..._.context.intermediateValue,\n };\n }\n },\n _internalState: (_) => {\n if (\n _.event.snapshot.context?.type ===\n SecureChannelEventType.Error\n ) {\n return {\n ..._.context._internalState,\n error: _.event.snapshot.context.error.mapDAErrors(),\n };\n } else if (\n _.event.snapshot.context?.type ===\n SecureChannelEventType.Result\n ) {\n return {\n ..._.context._internalState,\n result: {\n isGenuine: isDeviceGenuine(\n _.event.snapshot.context.payload,\n ),\n },\n };\n }\n return _.context._internalState;\n },\n }),\n },\n onDone: {\n target: \"GenuineCheckCheck\",\n },\n onError: {\n target: \"Error\",\n actions: \"assignErrorFromEvent\",\n },\n },\n },\n GenuineCheckCheck: {\n always: [\n {\n target: \"Error\",\n guard: \"hasError\",\n },\n {\n target: \"Success\",\n },\n ],\n },\n Success: {\n type: \"final\",\n },\n Error: {\n type: \"final\",\n },\n },\n output: (_) => {\n if (_.context._internalState.error) {\n return Left(_.context._internalState.error);\n } else {\n return Right(_.context._internalState.result);\n }\n },\n });\n }\n\n extractDependencies(internalApi: InternalApi): MachineDependencies {\n const getOsVersion = () =>\n internalApi.sendCommand(new GetOsVersionCommand());\n\n const getDeviceVersion = ({\n input,\n }: Input<{ deviceInfo: GetOsVersionResponse }>) => {\n const { deviceInfo } = input;\n return internalApi.getManagerApiService().getDeviceVersion(deviceInfo);\n };\n\n const getFirmwareVersion = ({\n input,\n }: Input<{\n deviceInfo: GetOsVersionResponse;\n deviceVersion: DeviceVersion;\n }>) => {\n const { deviceInfo, deviceVersion } = input;\n return internalApi\n .getManagerApiService()\n .getFirmwareVersion(deviceInfo, deviceVersion);\n };\n\n const genuineCheck = ({\n input,\n }: Input<{\n deviceInfo: GetOsVersionResponse;\n finalFirmware: FinalFirmware;\n }>) => {\n const { deviceInfo, finalFirmware } = input;\n const eitherConnection = internalApi\n .getSecureChannelService()\n .genuineCheck(deviceInfo, finalFirmware);\n return new ConnectToSecureChannelTask(internalApi, {\n connection: eitherConnection,\n }).run();\n };\n\n return {\n getOsVersion,\n getDeviceVersion,\n getFirmwareVersion,\n genuineCheck,\n getDeviceSessionState: () => internalApi.getDeviceSessionState(),\n setDeviceSessionState: (state: DeviceSessionState) =>\n internalApi.setDeviceSessionState(state),\n };\n }\n}\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,8BAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAA4B,qBAC5BC,EAA2D,kBAE3DC,EAAuC,4CACvCC,EAGO,+CAEPC,EAAwC,4DACxCC,EAA0C,uCAC1CC,EAA0C,yEAE1CC,EAGO,8DACPC,EAGO,kDASPC,EAA2C,+DAC3CC,EAAuC,0CAEvCC,EAAgC,qCAIzB,MAAMb,UAAiC,oBAM5C,CACS,iBACPc,EAOA,CASA,KAAM,CACJ,aAAAC,EACA,iBAAAC,EACA,mBAAAC,EACA,aAAAC,EACA,sBAAAC,EACA,sBAAAC,CACF,EAAI,KAAK,oBAAoBN,CAAW,EAElCO,EAAgB,KAAK,MAAM,eAAiB,4BAE5CC,EAAuB,IAAI,4BAA0B,CACzD,MAAO,CACL,cAAAD,CACF,CACF,CAAC,EAAE,iBAAiBP,CAAW,EAE/B,SAAO,SAAM,CACX,MAAO,CACL,MAAO,CAAC,EACR,QAAS,CAAC,EACV,OAAQ,CAAC,CACX,EACA,OAAQ,CACN,cAAeQ,EACf,gBAAc,eAAYP,CAAY,EACtC,oBAAkB,eAAYC,CAAgB,EAC9C,sBAAoB,eAAYC,CAAkB,EAClD,gBAAc,kBAAeC,CAAY,CAC3C,EACA,OAAQ,CACN,SAAWK,GAAMA,EAAE,QAAQ,eAAe,QAAU,IACtD,EACA,QAAS,CACP,wBAAsB,UAAO,CAC3B,eAAiBA,IAAO,CACtB,GAAGA,EAAE,QAAQ,eACb,MAAOA,EAAE,MAAM,KACjB,EACF,CAAC,CACH,CACF,CAAC,EAAE,cAAc,CAEf,GAAI,2BACJ,QAAS,cACT,QAAUA,IACD,CACL,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,CACjD,KAAM,CAAE,WAAAC,CAAW,EAAID,EACvB,OAAOf,EAAY,qBAAqB,EAAE,iBAAiBgB,CAAU,CACvE,EAgCE,mBA9ByB,CAAC,CAC1B,MAAAD,CACF,IAGO,CACL,KAAM,CAAE,WAAAC,EAAY,cAAAH,CAAc,EAAIE,EACtC,OAAOf,EACJ,qBAAqB,EACrB,mBAAmBgB,EAAYH,CAAa,CACjD,EAqBE,aAnBmB,CAAC,CACpB,MAAAE,CACF,IAGO,CACL,KAAM,CAAE,WAAAC,EAAY,cAAAC,CAAc,EAAIF,EAChCG,EAAmBlB,EACtB,wBAAwB,EACxB,aAAagB,EAAYC,CAAa,EACzC,OAAO,IAAI,6BAA2BjB,EAAa,CACjD,WAAYkB,CACd,CAAC,EAAE,IAAI,CACT,EAOE,sBAAuB,IAAMlB,EAAY,sBAAsB,EAC/D,sBAAwBmB,GACtBnB,EAAY,sBAAsBmB,CAAK,CAC3C,CACF,CACF",
6
6
  "names": ["GenuineCheckDeviceAction_exports", "__export", "GenuineCheckDeviceAction", "__toCommonJS", "import_purify_ts", "import_xstate", "import_CommandResult", "import_GetOsVersionCommand", "import_UserInteractionRequired", "import_Const", "import_GoToDashboardDeviceAction", "import_XStateDeviceAction", "import_DeviceSessionState", "import_ConnectToSecureChannelTask", "import_types", "import_utils", "internalApi", "getOsVersion", "getDeviceVersion", "getFirmwareVersion", "genuineCheck", "getDeviceSessionState", "setDeviceSessionState", "unlockTimeout", "goToDashboardMachine", "_", "error", "currentState", "isSecureConnectionAllowed", "deviceVersion", "firmwareVersion", "input", "deviceInfo", "finalFirmware", "eitherConnection", "state"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../src/api/secure-channel/device-action/GenuineCheck/types.ts"],
4
- "sourcesContent": ["import { type EitherAsync } from \"purify-ts\";\nimport { type Observable } from \"rxjs\";\n\nimport {\n type GetOsVersionCommandResult,\n type GetOsVersionResponse,\n} from \"@api/command/os/GetOsVersionCommand\";\nimport { type DeviceActionState } from \"@api/device-action/model/DeviceActionState\";\nimport { type UserInteractionRequired } from \"@api/device-action/model/UserInteractionRequired\";\nimport { type UnknownDAError } from \"@api/device-action/os/Errors\";\nimport { type SecureChannelEvent } from \"@api/secure-channel/task/types\";\nimport { type Input } from \"@api/secure-channel/types\";\nimport {\n type CommandErrorResult,\n type DeviceSessionState,\n type GoToDashboardDAError,\n type GoToDashboardDAInput,\n} from \"@api/types\";\nimport { type DeviceVersion } from \"@internal/manager-api/model/Device\";\nimport { type HttpFetchApiError } from \"@internal/manager-api/model/Errors\";\nimport { type FinalFirmware } from \"@internal/manager-api/model/Firmware\";\n\nexport type GenuineCheckDAOutput = { isGenuine: boolean };\n\nexport type GenuineCheckDAInput = GoToDashboardDAInput;\n\nexport type GenuineCheckDAError =\n | CommandErrorResult[\"error\"]\n | GoToDashboardDAError\n | HttpFetchApiError\n | UnknownDAError;\n\nexport type GenuineCheckDARequiredInteraction =\n | UserInteractionRequired.None\n | UserInteractionRequired.UnlockDevice\n | UserInteractionRequired.AllowSecureConnection;\n\nexport type GenuineCheckDAIntermediateValue = {\n requiredUserInteraction: GenuineCheckDARequiredInteraction;\n};\n\nexport type GenuineCheckDAState = DeviceActionState<\n GenuineCheckDAOutput,\n GenuineCheckDAError,\n GenuineCheckDAIntermediateValue\n>;\n\nexport type GenuineCheckStateMachineInternalState = {\n error: GenuineCheckDAError | null;\n result: { isGenuine: boolean };\n getOsVersionResponse: GetOsVersionResponse | null;\n deviceVersion: DeviceVersion | null;\n firmwareVersion: FinalFirmware | null;\n};\n\nexport type MachineDependencies = {\n getOsVersion: () => Promise<GetOsVersionCommandResult>;\n getDeviceVersion: (\n args: Input<{ deviceInfo: GetOsVersionResponse }>,\n ) => EitherAsync<HttpFetchApiError, DeviceVersion>;\n getFirmwareVersion: (\n args: Input<{\n deviceInfo: GetOsVersionResponse;\n deviceVersion: DeviceVersion;\n }>,\n ) => EitherAsync<HttpFetchApiError, FinalFirmware>;\n genuineCheck: (\n args: Input<{\n deviceInfo: GetOsVersionResponse;\n finalFirmware: FinalFirmware;\n }>,\n ) => Observable<SecureChannelEvent>;\n getDeviceSessionState: () => DeviceSessionState;\n setDeviceSessionState: (state: DeviceSessionState) => DeviceSessionState;\n};\n"],
4
+ "sourcesContent": ["import { type EitherAsync } from \"purify-ts\";\nimport { type Observable } from \"rxjs\";\n\nimport {\n type GetOsVersionCommandResult,\n type GetOsVersionResponse,\n} from \"@api/command/os/GetOsVersionCommand\";\nimport { type DeviceActionState } from \"@api/device-action/model/DeviceActionState\";\nimport { type UserInteractionRequired } from \"@api/device-action/model/UserInteractionRequired\";\nimport { type UnknownDAError } from \"@api/device-action/os/Errors\";\nimport { type SecureChannelEvent } from \"@api/secure-channel/task/types\";\nimport { type Input } from \"@api/secure-channel/types\";\nimport {\n type CommandErrorResult,\n type DeviceSessionState,\n type GoToDashboardDAError,\n type GoToDashboardDAInput,\n} from \"@api/types\";\nimport { type DeviceVersion } from \"@internal/manager-api/model/Device\";\nimport { type HttpFetchApiError } from \"@internal/manager-api/model/Errors\";\nimport { type FinalFirmware } from \"@internal/manager-api/model/Firmware\";\nimport type { SecureChannelDAErrors } from \"@internal/secure-channel/model/Errors\";\n\nexport type GenuineCheckDAOutput = { isGenuine: boolean };\n\nexport type GenuineCheckDAInput = GoToDashboardDAInput;\n\nexport type GenuineCheckDAError =\n | CommandErrorResult[\"error\"]\n | GoToDashboardDAError\n | HttpFetchApiError\n | SecureChannelDAErrors\n | UnknownDAError;\n\nexport type GenuineCheckDARequiredInteraction =\n | UserInteractionRequired.None\n | UserInteractionRequired.UnlockDevice\n | UserInteractionRequired.AllowSecureConnection;\n\nexport type GenuineCheckDAIntermediateValue = {\n requiredUserInteraction: GenuineCheckDARequiredInteraction;\n};\n\nexport type GenuineCheckDAState = DeviceActionState<\n GenuineCheckDAOutput,\n GenuineCheckDAError,\n GenuineCheckDAIntermediateValue\n>;\n\nexport type GenuineCheckStateMachineInternalState = {\n error: GenuineCheckDAError | null;\n result: { isGenuine: boolean };\n getOsVersionResponse: GetOsVersionResponse | null;\n deviceVersion: DeviceVersion | null;\n firmwareVersion: FinalFirmware | null;\n};\n\nexport type MachineDependencies = {\n getOsVersion: () => Promise<GetOsVersionCommandResult>;\n getDeviceVersion: (\n args: Input<{ deviceInfo: GetOsVersionResponse }>,\n ) => EitherAsync<HttpFetchApiError, DeviceVersion>;\n getFirmwareVersion: (\n args: Input<{\n deviceInfo: GetOsVersionResponse;\n deviceVersion: DeviceVersion;\n }>,\n ) => EitherAsync<HttpFetchApiError, FinalFirmware>;\n genuineCheck: (\n args: Input<{\n deviceInfo: GetOsVersionResponse;\n finalFirmware: FinalFirmware;\n }>,\n ) => Observable<SecureChannelEvent>;\n getDeviceSessionState: () => DeviceSessionState;\n setDeviceSessionState: (state: DeviceSessionState) => DeviceSessionState;\n};\n"],
5
5
  "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
6
6
  "names": ["types_exports", "__toCommonJS"]
7
7
  }