@ledgerhq/device-management-kit 0.0.0-rn-ble-logs-20250416162013 → 0.0.0-rn-hid-sync-onboarding-behavior-20250516135345

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 (533) hide show
  1. package/README.md +3 -0
  2. package/lib/cjs/package.json +22 -23
  3. package/lib/cjs/src/api/DeviceManagementKit.test.js +1 -1
  4. package/lib/cjs/src/api/DeviceManagementKit.test.js.map +2 -2
  5. package/lib/cjs/src/api/DeviceManagementKitBuilder.js +1 -1
  6. package/lib/cjs/src/api/DeviceManagementKitBuilder.js.map +2 -2
  7. package/lib/cjs/src/api/DmkConfig.js +1 -1
  8. package/lib/cjs/src/api/DmkConfig.js.map +1 -1
  9. package/lib/cjs/src/api/command/di/commandModule.js +1 -1
  10. package/lib/cjs/src/api/command/di/commandModule.js.map +3 -3
  11. package/lib/cjs/src/api/command/di/commandModule.test.js +1 -1
  12. package/lib/cjs/src/api/command/di/commandModule.test.js.map +2 -2
  13. package/lib/cjs/src/api/command/os/GetCustomImageSizeCommand.js +2 -0
  14. package/lib/cjs/src/api/command/os/GetCustomImageSizeCommand.js.map +7 -0
  15. package/lib/cjs/src/api/command/os/GetCustomImageSizeCommand.test.js +2 -0
  16. package/lib/cjs/src/api/command/os/GetCustomImageSizeCommand.test.js.map +7 -0
  17. package/lib/cjs/src/api/command/os/GetOsVersionCommand.js +1 -1
  18. package/lib/cjs/src/api/command/os/GetOsVersionCommand.js.map +3 -3
  19. package/lib/cjs/src/api/command/os/GetOsVersionCommand.test.js +1 -1
  20. package/lib/cjs/src/api/command/os/GetOsVersionCommand.test.js.map +3 -3
  21. package/lib/cjs/src/api/command/os/ListLanguagePackCommand.js +2 -0
  22. package/lib/cjs/src/api/command/os/ListLanguagePackCommand.js.map +7 -0
  23. package/lib/cjs/src/api/command/os/ListLanguagePackCommand.test.js +2 -0
  24. package/lib/cjs/src/api/command/os/ListLanguagePackCommand.test.js.map +7 -0
  25. package/lib/cjs/src/api/command/os/__mocks__/GetOsVersionCommand.js +1 -1
  26. package/lib/cjs/src/api/command/os/__mocks__/GetOsVersionCommand.js.map +2 -2
  27. package/lib/cjs/src/api/command/use-case/SendCommandUseCase.js +1 -1
  28. package/lib/cjs/src/api/command/use-case/SendCommandUseCase.js.map +3 -3
  29. package/lib/cjs/src/api/device-action/DeviceAction.js +1 -1
  30. package/lib/cjs/src/api/device-action/DeviceAction.js.map +1 -1
  31. package/lib/cjs/src/api/device-action/__test-utils__/makeInternalApi.js +1 -1
  32. package/lib/cjs/src/api/device-action/__test-utils__/makeInternalApi.js.map +3 -3
  33. package/lib/cjs/src/api/device-action/__test-utils__/setupTestMachine.js +1 -1
  34. package/lib/cjs/src/api/device-action/__test-utils__/setupTestMachine.js.map +3 -3
  35. package/lib/cjs/src/api/device-action/di/deviceActionModule.js +1 -1
  36. package/lib/cjs/src/api/device-action/di/deviceActionModule.js.map +3 -3
  37. package/lib/cjs/src/api/device-action/di/deviceActionModule.test.js +1 -1
  38. package/lib/cjs/src/api/device-action/di/deviceActionModule.test.js.map +2 -2
  39. package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.js +1 -1
  40. package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.js.map +2 -2
  41. package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.test.js +1 -1
  42. package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.test.js.map +2 -2
  43. package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceActionTypes.js +1 -1
  44. package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceActionTypes.js.map +1 -1
  45. package/lib/cjs/src/api/device-action/os/Errors.js +1 -1
  46. package/lib/cjs/src/api/device-action/os/Errors.js.map +3 -3
  47. package/lib/cjs/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.js +2 -0
  48. package/lib/cjs/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.js.map +7 -0
  49. package/lib/cjs/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.test.js +2 -0
  50. package/lib/cjs/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.test.js.map +7 -0
  51. package/lib/cjs/src/api/device-action/os/GetDeviceMetadata/types.js +2 -0
  52. package/lib/cjs/src/api/device-action/os/GetDeviceMetadata/types.js.map +7 -0
  53. package/lib/cjs/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.js +1 -1
  54. package/lib/cjs/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.js.map +2 -2
  55. package/lib/cjs/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.test.js +1 -1
  56. package/lib/cjs/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.test.js.map +2 -2
  57. package/lib/cjs/src/api/device-action/os/GoToDashboard/types.js +1 -1
  58. package/lib/cjs/src/api/device-action/os/GoToDashboard/types.js.map +1 -1
  59. package/lib/cjs/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.js +2 -0
  60. package/lib/cjs/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.js.map +7 -0
  61. package/lib/cjs/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.test.js +2 -0
  62. package/lib/cjs/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.test.js.map +7 -0
  63. package/lib/cjs/src/api/device-action/os/InstallOrUpdateApps/types.js +2 -0
  64. package/lib/cjs/src/api/device-action/os/InstallOrUpdateApps/types.js.map +7 -0
  65. package/lib/cjs/src/api/device-action/os/ListApps/ListAppsDeviceAction.js +1 -1
  66. package/lib/cjs/src/api/device-action/os/ListApps/ListAppsDeviceAction.js.map +2 -2
  67. package/lib/cjs/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.js +2 -0
  68. package/lib/cjs/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.js.map +7 -0
  69. package/lib/cjs/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.test.js +2 -0
  70. package/lib/cjs/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.test.js.map +7 -0
  71. package/lib/cjs/src/api/device-action/os/OpenAppWithDependencies/types.js +2 -0
  72. package/lib/cjs/src/api/device-action/os/OpenAppWithDependencies/types.js.map +7 -0
  73. package/lib/cjs/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.js +1 -1
  74. package/lib/cjs/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.js.map +2 -2
  75. package/lib/cjs/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.test.js +1 -1
  76. package/lib/cjs/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.test.js.map +2 -2
  77. package/lib/cjs/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceActionTypes.js.map +1 -1
  78. package/lib/cjs/src/api/device-action/task/BuildAppsInstallPlanTask.js +2 -0
  79. package/lib/cjs/src/api/device-action/task/BuildAppsInstallPlanTask.js.map +7 -0
  80. package/lib/cjs/src/api/device-action/task/BuildAppsInstallPlanTask.test.js +2 -0
  81. package/lib/cjs/src/api/device-action/task/BuildAppsInstallPlanTask.test.js.map +7 -0
  82. package/lib/cjs/src/api/device-action/task/GetApplicationsMetadataTask.js +2 -0
  83. package/lib/cjs/src/api/device-action/task/GetApplicationsMetadataTask.js.map +7 -0
  84. package/lib/cjs/src/api/device-action/task/GetApplicationsMetadataTask.test.js +2 -0
  85. package/lib/cjs/src/api/device-action/task/GetApplicationsMetadataTask.test.js.map +7 -0
  86. package/lib/cjs/src/api/device-action/task/GetFirmwareMetadataTask.js +2 -0
  87. package/lib/cjs/src/api/device-action/task/GetFirmwareMetadataTask.js.map +7 -0
  88. package/lib/cjs/src/api/device-action/task/GetFirmwareMetadataTask.test.js +2 -0
  89. package/lib/cjs/src/api/device-action/task/GetFirmwareMetadataTask.test.js.map +7 -0
  90. package/lib/cjs/src/api/device-action/task/PredictOutOfMemoryTask.js +2 -0
  91. package/lib/cjs/src/api/device-action/task/PredictOutOfMemoryTask.js.map +7 -0
  92. package/lib/cjs/src/api/device-action/task/PredictOutOfMemoryTask.test.js +2 -0
  93. package/lib/cjs/src/api/device-action/task/PredictOutOfMemoryTask.test.js.map +7 -0
  94. package/lib/cjs/src/api/device-model/data/StaticDeviceModelDataSource.js +1 -1
  95. package/lib/cjs/src/api/device-model/data/StaticDeviceModelDataSource.js.map +2 -2
  96. package/lib/cjs/src/api/device-model/model/DeviceModel.js +1 -1
  97. package/lib/cjs/src/api/device-model/model/DeviceModel.js.map +2 -2
  98. package/lib/cjs/src/api/device-model/model/DeviceModel.stub.js +1 -1
  99. package/lib/cjs/src/api/device-model/model/DeviceModel.stub.js.map +2 -2
  100. package/lib/cjs/src/api/device-session/DeviceSessionState.js +1 -1
  101. package/lib/cjs/src/api/device-session/DeviceSessionState.js.map +2 -2
  102. package/lib/cjs/src/api/index.js +1 -1
  103. package/lib/cjs/src/api/index.js.map +3 -3
  104. package/lib/cjs/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.js +1 -1
  105. package/lib/cjs/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.js.map +3 -3
  106. package/lib/cjs/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.js +1 -1
  107. package/lib/cjs/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.js.map +3 -3
  108. package/lib/cjs/src/api/transport/model/DeviceConnectionStateMachine.js +1 -1
  109. package/lib/cjs/src/api/transport/model/DeviceConnectionStateMachine.js.map +3 -3
  110. package/lib/cjs/src/api/transport/model/Errors.js +1 -1
  111. package/lib/cjs/src/api/transport/model/Errors.js.map +3 -3
  112. package/lib/cjs/src/api/transport/model/Transport.js.map +1 -1
  113. package/lib/cjs/src/api/types.js +1 -1
  114. package/lib/cjs/src/api/types.js.map +1 -1
  115. package/lib/cjs/src/di.js +1 -1
  116. package/lib/cjs/src/di.js.map +2 -2
  117. package/lib/cjs/src/internal/config/di/configModule.js +1 -1
  118. package/lib/cjs/src/internal/config/di/configModule.js.map +3 -3
  119. package/lib/cjs/src/internal/config/di/configModule.test.js +1 -1
  120. package/lib/cjs/src/internal/config/di/configModule.test.js.map +2 -2
  121. package/lib/cjs/src/internal/device-model/di/deviceModelModule.js +1 -1
  122. package/lib/cjs/src/internal/device-model/di/deviceModelModule.js.map +3 -3
  123. package/lib/cjs/src/internal/device-model/di/deviceModelModule.test.js +1 -1
  124. package/lib/cjs/src/internal/device-model/di/deviceModelModule.test.js.map +2 -2
  125. package/lib/cjs/src/internal/device-session/data/ApduResponseConst.js +1 -1
  126. package/lib/cjs/src/internal/device-session/data/ApduResponseConst.js.map +3 -3
  127. package/lib/cjs/src/internal/device-session/di/deviceSessionModule.js +1 -1
  128. package/lib/cjs/src/internal/device-session/di/deviceSessionModule.js.map +3 -3
  129. package/lib/cjs/src/internal/device-session/di/deviceSessionModule.test.js +1 -1
  130. package/lib/cjs/src/internal/device-session/di/deviceSessionModule.test.js.map +2 -2
  131. package/lib/cjs/src/internal/device-session/model/DevicePinger.js +1 -1
  132. package/lib/cjs/src/internal/device-session/model/DevicePinger.js.map +3 -3
  133. package/lib/cjs/src/internal/device-session/model/DeviceSession.js +1 -1
  134. package/lib/cjs/src/internal/device-session/model/DeviceSession.js.map +3 -3
  135. package/lib/cjs/src/internal/device-session/model/DeviceSessionStateHandler.js +1 -1
  136. package/lib/cjs/src/internal/device-session/model/DeviceSessionStateHandler.js.map +3 -3
  137. package/lib/cjs/src/internal/device-session/model/DeviceSessionStateHandler.test.js +1 -1
  138. package/lib/cjs/src/internal/device-session/model/DeviceSessionStateHandler.test.js.map +2 -2
  139. package/lib/cjs/src/internal/device-session/model/Frame.js +1 -1
  140. package/lib/cjs/src/internal/device-session/model/Frame.js.map +3 -3
  141. package/lib/cjs/src/internal/discovery/di/discoveryModule.js +1 -1
  142. package/lib/cjs/src/internal/discovery/di/discoveryModule.js.map +3 -3
  143. package/lib/cjs/src/internal/discovery/di/discoveryModule.test.js +1 -1
  144. package/lib/cjs/src/internal/discovery/di/discoveryModule.test.js.map +2 -2
  145. package/lib/cjs/src/internal/discovery/use-case/DisconnectUseCase.test.js +1 -1
  146. package/lib/cjs/src/internal/discovery/use-case/DisconnectUseCase.test.js.map +2 -2
  147. package/lib/cjs/src/internal/discovery/use-case/StopDiscoveringUseCase.js +1 -1
  148. package/lib/cjs/src/internal/discovery/use-case/StopDiscoveringUseCase.js.map +3 -3
  149. package/lib/cjs/src/internal/discovery/use-case/StopDiscoveringUseCase.test.js +1 -1
  150. package/lib/cjs/src/internal/discovery/use-case/StopDiscoveringUseCase.test.js.map +3 -3
  151. package/lib/cjs/src/internal/logger-publisher/di/loggerModule.js +1 -1
  152. package/lib/cjs/src/internal/logger-publisher/di/loggerModule.js.map +3 -3
  153. package/lib/cjs/src/internal/logger-publisher/di/loggerModule.test.js +1 -1
  154. package/lib/cjs/src/internal/logger-publisher/di/loggerModule.test.js.map +2 -2
  155. package/lib/cjs/src/internal/manager-api/data/AxiosManagerApiDataSource.js +1 -1
  156. package/lib/cjs/src/internal/manager-api/data/AxiosManagerApiDataSource.js.map +3 -3
  157. package/lib/cjs/src/internal/manager-api/data/AxiosManagerApiDataSource.test.js +1 -1
  158. package/lib/cjs/src/internal/manager-api/data/AxiosManagerApiDataSource.test.js.map +3 -3
  159. package/lib/cjs/src/internal/manager-api/data/ManagerApiDataSource.js +1 -1
  160. package/lib/cjs/src/internal/manager-api/data/ManagerApiDataSource.js.map +1 -1
  161. package/lib/cjs/src/internal/manager-api/data/ManagerApiDto.js +1 -1
  162. package/lib/cjs/src/internal/manager-api/data/ManagerApiDto.js.map +1 -1
  163. package/lib/cjs/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.js +1 -1
  164. package/lib/cjs/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.js.map +2 -2
  165. package/lib/cjs/src/internal/manager-api/di/managerApiModule.js +1 -1
  166. package/lib/cjs/src/internal/manager-api/di/managerApiModule.js.map +3 -3
  167. package/lib/cjs/src/internal/manager-api/di/managerApiModule.test.js +1 -1
  168. package/lib/cjs/src/internal/manager-api/di/managerApiModule.test.js.map +2 -2
  169. package/lib/cjs/src/internal/manager-api/model/Application.js +1 -1
  170. package/lib/cjs/src/internal/manager-api/model/Application.js.map +1 -1
  171. package/lib/cjs/src/internal/manager-api/model/Const.js +1 -1
  172. package/lib/cjs/src/internal/manager-api/model/Const.js.map +3 -3
  173. package/lib/cjs/src/internal/manager-api/model/Firmware.js +1 -1
  174. package/lib/cjs/src/internal/manager-api/model/Firmware.js.map +1 -1
  175. package/lib/cjs/src/internal/manager-api/model/Language.js +2 -0
  176. package/lib/cjs/src/internal/manager-api/model/Language.js.map +7 -0
  177. package/lib/cjs/src/internal/manager-api/model/Params.js +1 -1
  178. package/lib/cjs/src/internal/manager-api/model/Params.js.map +1 -1
  179. package/lib/cjs/src/internal/manager-api/service/DefaultManagerApiService.js +1 -1
  180. package/lib/cjs/src/internal/manager-api/service/DefaultManagerApiService.js.map +3 -3
  181. package/lib/cjs/src/internal/manager-api/service/DefaultManagerApiService.test.js +1 -1
  182. package/lib/cjs/src/internal/manager-api/service/DefaultManagerApiService.test.js.map +3 -3
  183. package/lib/cjs/src/internal/manager-api/service/ManagerApiService.js +1 -1
  184. package/lib/cjs/src/internal/manager-api/service/ManagerApiService.js.map +1 -1
  185. package/lib/cjs/src/internal/manager-api/use-case/SetProviderUseCase.js +1 -1
  186. package/lib/cjs/src/internal/manager-api/use-case/SetProviderUseCase.js.map +3 -3
  187. package/lib/cjs/src/internal/manager-api/use-case/SetProviderUseCase.test.js +1 -1
  188. package/lib/cjs/src/internal/manager-api/use-case/SetProviderUseCase.test.js.map +3 -3
  189. package/lib/cjs/src/internal/secure-channel/di/secureChannelModule.js +1 -1
  190. package/lib/cjs/src/internal/secure-channel/di/secureChannelModule.js.map +3 -3
  191. package/lib/cjs/src/internal/secure-channel/di/secureChannelModule.test.js +1 -1
  192. package/lib/cjs/src/internal/secure-channel/di/secureChannelModule.test.js.map +2 -2
  193. package/lib/cjs/src/internal/secure-channel/service/DefaultSecureChannelService.js +1 -1
  194. package/lib/cjs/src/internal/secure-channel/service/DefaultSecureChannelService.js.map +3 -3
  195. package/lib/cjs/src/internal/secure-channel/service/DefaultSecureChannelService.test.js +1 -1
  196. package/lib/cjs/src/internal/secure-channel/service/DefaultSecureChannelService.test.js.map +3 -3
  197. package/lib/cjs/src/internal/secure-channel/service/SecureChannelService.js +1 -1
  198. package/lib/cjs/src/internal/secure-channel/service/SecureChannelService.js.map +1 -1
  199. package/lib/cjs/src/internal/send/di/sendModule.js +1 -1
  200. package/lib/cjs/src/internal/send/di/sendModule.js.map +3 -3
  201. package/lib/cjs/src/internal/send/di/sendModule.test.js +1 -1
  202. package/lib/cjs/src/internal/send/di/sendModule.test.js.map +2 -2
  203. package/lib/cjs/src/internal/transport/di/transportModule.js +1 -1
  204. package/lib/cjs/src/internal/transport/di/transportModule.js.map +3 -3
  205. package/lib/cjs/src/internal/transport/di/transportModule.test.js +1 -1
  206. package/lib/cjs/src/internal/transport/di/transportModule.test.js.map +2 -2
  207. package/lib/esm/package.json +22 -23
  208. package/lib/esm/src/api/DeviceManagementKit.test.js +1 -1
  209. package/lib/esm/src/api/DeviceManagementKit.test.js.map +2 -2
  210. package/lib/esm/src/api/DeviceManagementKitBuilder.js +1 -1
  211. package/lib/esm/src/api/DeviceManagementKitBuilder.js.map +3 -3
  212. package/lib/esm/src/api/command/di/commandModule.js +1 -1
  213. package/lib/esm/src/api/command/di/commandModule.js.map +3 -3
  214. package/lib/esm/src/api/command/di/commandModule.test.js +1 -1
  215. package/lib/esm/src/api/command/di/commandModule.test.js.map +2 -2
  216. package/lib/esm/src/api/command/os/GetCustomImageSizeCommand.js +2 -0
  217. package/lib/esm/src/api/command/os/GetCustomImageSizeCommand.js.map +7 -0
  218. package/lib/esm/src/api/command/os/GetCustomImageSizeCommand.test.js +2 -0
  219. package/lib/esm/src/api/command/os/GetCustomImageSizeCommand.test.js.map +7 -0
  220. package/lib/esm/src/api/command/os/GetOsVersionCommand.js +1 -1
  221. package/lib/esm/src/api/command/os/GetOsVersionCommand.js.map +3 -3
  222. package/lib/esm/src/api/command/os/GetOsVersionCommand.test.js +1 -1
  223. package/lib/esm/src/api/command/os/GetOsVersionCommand.test.js.map +3 -3
  224. package/lib/esm/src/api/command/os/ListLanguagePackCommand.js +2 -0
  225. package/lib/esm/src/api/command/os/ListLanguagePackCommand.js.map +7 -0
  226. package/lib/esm/src/api/command/os/ListLanguagePackCommand.test.js +2 -0
  227. package/lib/esm/src/api/command/os/ListLanguagePackCommand.test.js.map +7 -0
  228. package/lib/esm/src/api/command/os/__mocks__/GetOsVersionCommand.js +1 -1
  229. package/lib/esm/src/api/command/os/__mocks__/GetOsVersionCommand.js.map +2 -2
  230. package/lib/esm/src/api/command/use-case/SendCommandUseCase.js +1 -1
  231. package/lib/esm/src/api/command/use-case/SendCommandUseCase.js.map +3 -3
  232. package/lib/esm/src/api/device-action/__test-utils__/makeInternalApi.js +1 -1
  233. package/lib/esm/src/api/device-action/__test-utils__/makeInternalApi.js.map +3 -3
  234. package/lib/esm/src/api/device-action/__test-utils__/setupTestMachine.js +1 -1
  235. package/lib/esm/src/api/device-action/__test-utils__/setupTestMachine.js.map +3 -3
  236. package/lib/esm/src/api/device-action/di/deviceActionModule.js +1 -1
  237. package/lib/esm/src/api/device-action/di/deviceActionModule.js.map +3 -3
  238. package/lib/esm/src/api/device-action/di/deviceActionModule.test.js +1 -1
  239. package/lib/esm/src/api/device-action/di/deviceActionModule.test.js.map +2 -2
  240. package/lib/esm/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.js +1 -1
  241. package/lib/esm/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.js.map +2 -2
  242. package/lib/esm/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.test.js +1 -1
  243. package/lib/esm/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.test.js.map +2 -2
  244. package/lib/esm/src/api/device-action/os/Errors.js +1 -1
  245. package/lib/esm/src/api/device-action/os/Errors.js.map +3 -3
  246. package/lib/esm/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.js +2 -0
  247. package/lib/esm/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.js.map +7 -0
  248. package/lib/esm/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.test.js +2 -0
  249. package/lib/esm/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.test.js.map +7 -0
  250. package/lib/esm/src/api/device-action/os/GetDeviceMetadata/types.js +1 -0
  251. package/lib/esm/src/api/device-action/os/GetDeviceMetadata/types.js.map +7 -0
  252. package/lib/esm/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.js +1 -1
  253. package/lib/esm/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.js.map +2 -2
  254. package/lib/esm/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.test.js +1 -1
  255. package/lib/esm/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.test.js.map +2 -2
  256. package/lib/esm/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.js +2 -0
  257. package/lib/esm/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.js.map +7 -0
  258. package/lib/esm/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.test.js +2 -0
  259. package/lib/esm/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.test.js.map +7 -0
  260. package/lib/esm/src/api/device-action/os/InstallOrUpdateApps/types.js +1 -0
  261. package/lib/esm/src/api/device-action/os/InstallOrUpdateApps/types.js.map +7 -0
  262. package/lib/esm/src/api/device-action/os/ListApps/ListAppsDeviceAction.js +1 -1
  263. package/lib/esm/src/api/device-action/os/ListApps/ListAppsDeviceAction.js.map +2 -2
  264. package/lib/esm/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.js +2 -0
  265. package/lib/esm/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.js.map +7 -0
  266. package/lib/esm/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.test.js +2 -0
  267. package/lib/esm/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.test.js.map +7 -0
  268. package/lib/esm/src/api/device-action/os/OpenAppWithDependencies/types.js +1 -0
  269. package/lib/esm/src/api/device-action/os/OpenAppWithDependencies/types.js.map +7 -0
  270. package/lib/esm/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.js +1 -1
  271. package/lib/esm/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.js.map +2 -2
  272. package/lib/esm/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.test.js +1 -1
  273. package/lib/esm/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.test.js.map +2 -2
  274. package/lib/esm/src/api/device-action/task/BuildAppsInstallPlanTask.js +2 -0
  275. package/lib/esm/src/api/device-action/task/BuildAppsInstallPlanTask.js.map +7 -0
  276. package/lib/esm/src/api/device-action/task/BuildAppsInstallPlanTask.test.js +2 -0
  277. package/lib/esm/src/api/device-action/task/BuildAppsInstallPlanTask.test.js.map +7 -0
  278. package/lib/esm/src/api/device-action/task/GetApplicationsMetadataTask.js +2 -0
  279. package/lib/esm/src/api/device-action/task/GetApplicationsMetadataTask.js.map +7 -0
  280. package/lib/esm/src/api/device-action/task/GetApplicationsMetadataTask.test.js +2 -0
  281. package/lib/esm/src/api/device-action/task/GetApplicationsMetadataTask.test.js.map +7 -0
  282. package/lib/esm/src/api/device-action/task/GetFirmwareMetadataTask.js +2 -0
  283. package/lib/esm/src/api/device-action/task/GetFirmwareMetadataTask.js.map +7 -0
  284. package/lib/esm/src/api/device-action/task/GetFirmwareMetadataTask.test.js +2 -0
  285. package/lib/esm/src/api/device-action/task/GetFirmwareMetadataTask.test.js.map +7 -0
  286. package/lib/esm/src/api/device-action/task/PredictOutOfMemoryTask.js +2 -0
  287. package/lib/esm/src/api/device-action/task/PredictOutOfMemoryTask.js.map +7 -0
  288. package/lib/esm/src/api/device-action/task/PredictOutOfMemoryTask.test.js +2 -0
  289. package/lib/esm/src/api/device-action/task/PredictOutOfMemoryTask.test.js.map +7 -0
  290. package/lib/esm/src/api/device-model/data/StaticDeviceModelDataSource.js +1 -1
  291. package/lib/esm/src/api/device-model/data/StaticDeviceModelDataSource.js.map +2 -2
  292. package/lib/esm/src/api/device-model/model/DeviceModel.js +1 -1
  293. package/lib/esm/src/api/device-model/model/DeviceModel.js.map +2 -2
  294. package/lib/esm/src/api/device-model/model/DeviceModel.stub.js +1 -1
  295. package/lib/esm/src/api/device-model/model/DeviceModel.stub.js.map +2 -2
  296. package/lib/esm/src/api/device-session/DeviceSessionState.js +1 -1
  297. package/lib/esm/src/api/device-session/DeviceSessionState.js.map +2 -2
  298. package/lib/esm/src/api/index.js +1 -1
  299. package/lib/esm/src/api/index.js.map +3 -3
  300. package/lib/esm/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.js +1 -1
  301. package/lib/esm/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.js.map +3 -3
  302. package/lib/esm/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.js +1 -1
  303. package/lib/esm/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.js.map +3 -3
  304. package/lib/esm/src/api/transport/model/DeviceConnectionStateMachine.js +1 -1
  305. package/lib/esm/src/api/transport/model/DeviceConnectionStateMachine.js.map +3 -3
  306. package/lib/esm/src/api/transport/model/Errors.js +1 -1
  307. package/lib/esm/src/api/transport/model/Errors.js.map +3 -3
  308. package/lib/esm/src/di.js +1 -1
  309. package/lib/esm/src/di.js.map +3 -3
  310. package/lib/esm/src/internal/config/di/configModule.js +1 -1
  311. package/lib/esm/src/internal/config/di/configModule.js.map +3 -3
  312. package/lib/esm/src/internal/config/di/configModule.test.js +1 -1
  313. package/lib/esm/src/internal/config/di/configModule.test.js.map +2 -2
  314. package/lib/esm/src/internal/device-model/di/deviceModelModule.js +1 -1
  315. package/lib/esm/src/internal/device-model/di/deviceModelModule.js.map +3 -3
  316. package/lib/esm/src/internal/device-model/di/deviceModelModule.test.js +1 -1
  317. package/lib/esm/src/internal/device-model/di/deviceModelModule.test.js.map +2 -2
  318. package/lib/esm/src/internal/device-session/data/ApduResponseConst.js +1 -1
  319. package/lib/esm/src/internal/device-session/data/ApduResponseConst.js.map +3 -3
  320. package/lib/esm/src/internal/device-session/di/deviceSessionModule.js +1 -1
  321. package/lib/esm/src/internal/device-session/di/deviceSessionModule.js.map +3 -3
  322. package/lib/esm/src/internal/device-session/di/deviceSessionModule.test.js +1 -1
  323. package/lib/esm/src/internal/device-session/di/deviceSessionModule.test.js.map +2 -2
  324. package/lib/esm/src/internal/device-session/model/DevicePinger.js +1 -1
  325. package/lib/esm/src/internal/device-session/model/DevicePinger.js.map +3 -3
  326. package/lib/esm/src/internal/device-session/model/DeviceSession.js +1 -1
  327. package/lib/esm/src/internal/device-session/model/DeviceSession.js.map +3 -3
  328. package/lib/esm/src/internal/device-session/model/DeviceSessionStateHandler.js +1 -1
  329. package/lib/esm/src/internal/device-session/model/DeviceSessionStateHandler.js.map +3 -3
  330. package/lib/esm/src/internal/device-session/model/DeviceSessionStateHandler.test.js +1 -1
  331. package/lib/esm/src/internal/device-session/model/DeviceSessionStateHandler.test.js.map +2 -2
  332. package/lib/esm/src/internal/device-session/model/Frame.js +1 -1
  333. package/lib/esm/src/internal/device-session/model/Frame.js.map +3 -3
  334. package/lib/esm/src/internal/discovery/di/discoveryModule.js +1 -1
  335. package/lib/esm/src/internal/discovery/di/discoveryModule.js.map +3 -3
  336. package/lib/esm/src/internal/discovery/di/discoveryModule.test.js +1 -1
  337. package/lib/esm/src/internal/discovery/di/discoveryModule.test.js.map +2 -2
  338. package/lib/esm/src/internal/discovery/use-case/DisconnectUseCase.test.js +1 -1
  339. package/lib/esm/src/internal/discovery/use-case/DisconnectUseCase.test.js.map +2 -2
  340. package/lib/esm/src/internal/discovery/use-case/StopDiscoveringUseCase.js +1 -1
  341. package/lib/esm/src/internal/discovery/use-case/StopDiscoveringUseCase.js.map +3 -3
  342. package/lib/esm/src/internal/discovery/use-case/StopDiscoveringUseCase.test.js +1 -1
  343. package/lib/esm/src/internal/discovery/use-case/StopDiscoveringUseCase.test.js.map +3 -3
  344. package/lib/esm/src/internal/logger-publisher/di/loggerModule.js +1 -1
  345. package/lib/esm/src/internal/logger-publisher/di/loggerModule.js.map +3 -3
  346. package/lib/esm/src/internal/logger-publisher/di/loggerModule.test.js +1 -1
  347. package/lib/esm/src/internal/logger-publisher/di/loggerModule.test.js.map +2 -2
  348. package/lib/esm/src/internal/manager-api/data/AxiosManagerApiDataSource.js +1 -1
  349. package/lib/esm/src/internal/manager-api/data/AxiosManagerApiDataSource.js.map +3 -3
  350. package/lib/esm/src/internal/manager-api/data/AxiosManagerApiDataSource.test.js +1 -1
  351. package/lib/esm/src/internal/manager-api/data/AxiosManagerApiDataSource.test.js.map +3 -3
  352. package/lib/esm/src/internal/manager-api/data/ManagerApiDto.js +1 -1
  353. package/lib/esm/src/internal/manager-api/data/ManagerApiDto.js.map +1 -1
  354. package/lib/esm/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.js +1 -1
  355. package/lib/esm/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.js.map +2 -2
  356. package/lib/esm/src/internal/manager-api/di/managerApiModule.js +1 -1
  357. package/lib/esm/src/internal/manager-api/di/managerApiModule.js.map +3 -3
  358. package/lib/esm/src/internal/manager-api/di/managerApiModule.test.js +1 -1
  359. package/lib/esm/src/internal/manager-api/di/managerApiModule.test.js.map +2 -2
  360. package/lib/esm/src/internal/manager-api/model/Application.js +1 -1
  361. package/lib/esm/src/internal/manager-api/model/Application.js.map +1 -1
  362. package/lib/esm/src/internal/manager-api/model/Const.js +1 -1
  363. package/lib/esm/src/internal/manager-api/model/Const.js.map +3 -3
  364. package/lib/esm/src/internal/manager-api/model/Language.js +1 -0
  365. package/lib/esm/src/internal/manager-api/model/Language.js.map +7 -0
  366. package/lib/esm/src/internal/manager-api/service/DefaultManagerApiService.js +1 -1
  367. package/lib/esm/src/internal/manager-api/service/DefaultManagerApiService.js.map +3 -3
  368. package/lib/esm/src/internal/manager-api/service/DefaultManagerApiService.test.js +1 -1
  369. package/lib/esm/src/internal/manager-api/service/DefaultManagerApiService.test.js.map +3 -3
  370. package/lib/esm/src/internal/manager-api/use-case/SetProviderUseCase.js +1 -1
  371. package/lib/esm/src/internal/manager-api/use-case/SetProviderUseCase.js.map +3 -3
  372. package/lib/esm/src/internal/manager-api/use-case/SetProviderUseCase.test.js +1 -1
  373. package/lib/esm/src/internal/manager-api/use-case/SetProviderUseCase.test.js.map +3 -3
  374. package/lib/esm/src/internal/secure-channel/di/secureChannelModule.js +1 -1
  375. package/lib/esm/src/internal/secure-channel/di/secureChannelModule.js.map +3 -3
  376. package/lib/esm/src/internal/secure-channel/di/secureChannelModule.test.js +1 -1
  377. package/lib/esm/src/internal/secure-channel/di/secureChannelModule.test.js.map +2 -2
  378. package/lib/esm/src/internal/secure-channel/service/DefaultSecureChannelService.js.map +3 -3
  379. package/lib/esm/src/internal/secure-channel/service/DefaultSecureChannelService.test.js +1 -1
  380. package/lib/esm/src/internal/secure-channel/service/DefaultSecureChannelService.test.js.map +3 -3
  381. package/lib/esm/src/internal/send/di/sendModule.js +1 -1
  382. package/lib/esm/src/internal/send/di/sendModule.js.map +3 -3
  383. package/lib/esm/src/internal/send/di/sendModule.test.js +1 -1
  384. package/lib/esm/src/internal/send/di/sendModule.test.js.map +2 -2
  385. package/lib/esm/src/internal/transport/di/transportModule.js +1 -1
  386. package/lib/esm/src/internal/transport/di/transportModule.js.map +3 -3
  387. package/lib/esm/src/internal/transport/di/transportModule.test.js +1 -1
  388. package/lib/esm/src/internal/transport/di/transportModule.test.js.map +2 -2
  389. package/lib/types/src/api/DeviceManagementKit.d.ts +1 -1
  390. package/lib/types/src/api/DeviceManagementKitBuilder.d.ts.map +1 -1
  391. package/lib/types/src/api/DmkConfig.d.ts +1 -0
  392. package/lib/types/src/api/DmkConfig.d.ts.map +1 -1
  393. package/lib/types/src/api/apdu/utils/ApduBuilder.d.ts.map +1 -1
  394. package/lib/types/src/api/apdu/utils/ApduParser.d.ts.map +1 -1
  395. package/lib/types/src/api/apdu/utils/ByteArrayBuilder.d.ts.map +1 -1
  396. package/lib/types/src/api/command/di/commandModule.d.ts.map +1 -1
  397. package/lib/types/src/api/command/os/GetCustomImageSizeCommand.d.ts +16 -0
  398. package/lib/types/src/api/command/os/GetCustomImageSizeCommand.d.ts.map +1 -0
  399. package/lib/types/src/api/command/os/GetCustomImageSizeCommand.test.d.ts +2 -0
  400. package/lib/types/src/api/command/os/GetCustomImageSizeCommand.test.d.ts.map +1 -0
  401. package/lib/types/src/api/command/os/GetOsVersionCommand.d.ts +30 -2
  402. package/lib/types/src/api/command/os/GetOsVersionCommand.d.ts.map +1 -1
  403. package/lib/types/src/api/command/os/ListLanguagePackCommand.d.ts +24 -0
  404. package/lib/types/src/api/command/os/ListLanguagePackCommand.d.ts.map +1 -0
  405. package/lib/types/src/api/command/os/ListLanguagePackCommand.test.d.ts +2 -0
  406. package/lib/types/src/api/command/os/ListLanguagePackCommand.test.d.ts.map +1 -0
  407. package/lib/types/src/api/command/os/__mocks__/GetOsVersionCommand.d.ts.map +1 -1
  408. package/lib/types/src/api/command/use-case/SendCommandUseCase.d.ts +5 -1
  409. package/lib/types/src/api/command/use-case/SendCommandUseCase.d.ts.map +1 -1
  410. package/lib/types/src/api/command/utils/CommandErrors.d.ts.map +1 -1
  411. package/lib/types/src/api/device-action/DeviceAction.d.ts +3 -1
  412. package/lib/types/src/api/device-action/DeviceAction.d.ts.map +1 -1
  413. package/lib/types/src/api/device-action/__test-utils__/makeInternalApi.d.ts.map +1 -1
  414. package/lib/types/src/api/device-action/__test-utils__/setupTestMachine.d.ts +5 -0
  415. package/lib/types/src/api/device-action/__test-utils__/setupTestMachine.d.ts.map +1 -1
  416. package/lib/types/src/api/device-action/di/deviceActionModule.d.ts.map +1 -1
  417. package/lib/types/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.d.ts.map +1 -1
  418. package/lib/types/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceActionTypes.d.ts +1 -0
  419. package/lib/types/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceActionTypes.d.ts.map +1 -1
  420. package/lib/types/src/api/device-action/os/Errors.d.ts +10 -0
  421. package/lib/types/src/api/device-action/os/Errors.d.ts.map +1 -1
  422. package/lib/types/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.d.ts +58 -0
  423. package/lib/types/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.d.ts.map +1 -0
  424. package/lib/types/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.test.d.ts +2 -0
  425. package/lib/types/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.test.d.ts.map +1 -0
  426. package/lib/types/src/api/device-action/os/GetDeviceMetadata/types.d.ts +27 -0
  427. package/lib/types/src/api/device-action/os/GetDeviceMetadata/types.d.ts.map +1 -0
  428. package/lib/types/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.d.ts.map +1 -1
  429. package/lib/types/src/api/device-action/os/GoToDashboard/types.d.ts +3 -4
  430. package/lib/types/src/api/device-action/os/GoToDashboard/types.d.ts.map +1 -1
  431. package/lib/types/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.d.ts +40 -0
  432. package/lib/types/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.d.ts.map +1 -0
  433. package/lib/types/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.test.d.ts +2 -0
  434. package/lib/types/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.test.d.ts.map +1 -0
  435. package/lib/types/src/api/device-action/os/InstallOrUpdateApps/types.d.ts +64 -0
  436. package/lib/types/src/api/device-action/os/InstallOrUpdateApps/types.d.ts.map +1 -0
  437. package/lib/types/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.d.ts +15 -0
  438. package/lib/types/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.d.ts.map +1 -0
  439. package/lib/types/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.test.d.ts +2 -0
  440. package/lib/types/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.test.d.ts.map +1 -0
  441. package/lib/types/src/api/device-action/os/OpenAppWithDependencies/types.d.ts +25 -0
  442. package/lib/types/src/api/device-action/os/OpenAppWithDependencies/types.d.ts.map +1 -0
  443. package/lib/types/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.d.ts.map +1 -1
  444. package/lib/types/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceActionTypes.d.ts +1 -0
  445. package/lib/types/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceActionTypes.d.ts.map +1 -1
  446. package/lib/types/src/api/device-action/task/BuildAppsInstallPlanTask.d.ts +30 -0
  447. package/lib/types/src/api/device-action/task/BuildAppsInstallPlanTask.d.ts.map +1 -0
  448. package/lib/types/src/api/device-action/task/BuildAppsInstallPlanTask.test.d.ts +2 -0
  449. package/lib/types/src/api/device-action/task/BuildAppsInstallPlanTask.test.d.ts.map +1 -0
  450. package/lib/types/src/api/device-action/task/GetApplicationsMetadataTask.d.ts +31 -0
  451. package/lib/types/src/api/device-action/task/GetApplicationsMetadataTask.d.ts.map +1 -0
  452. package/lib/types/src/api/device-action/task/GetApplicationsMetadataTask.test.d.ts +2 -0
  453. package/lib/types/src/api/device-action/task/GetApplicationsMetadataTask.test.d.ts.map +1 -0
  454. package/lib/types/src/api/device-action/task/GetFirmwareMetadataTask.d.ts +18 -0
  455. package/lib/types/src/api/device-action/task/GetFirmwareMetadataTask.d.ts.map +1 -0
  456. package/lib/types/src/api/device-action/task/GetFirmwareMetadataTask.test.d.ts +2 -0
  457. package/lib/types/src/api/device-action/task/GetFirmwareMetadataTask.test.d.ts.map +1 -0
  458. package/lib/types/src/api/device-action/task/PredictOutOfMemoryTask.d.ts +21 -0
  459. package/lib/types/src/api/device-action/task/PredictOutOfMemoryTask.d.ts.map +1 -0
  460. package/lib/types/src/api/device-action/task/PredictOutOfMemoryTask.test.d.ts +2 -0
  461. package/lib/types/src/api/device-action/task/PredictOutOfMemoryTask.test.d.ts.map +1 -0
  462. package/lib/types/src/api/device-model/data/StaticDeviceModelDataSource.d.ts.map +1 -1
  463. package/lib/types/src/api/device-model/model/DeviceModel.d.ts +2 -0
  464. package/lib/types/src/api/device-model/model/DeviceModel.d.ts.map +1 -1
  465. package/lib/types/src/api/device-model/model/DeviceModel.stub.d.ts.map +1 -1
  466. package/lib/types/src/api/device-session/DeviceSessionState.d.ts +93 -0
  467. package/lib/types/src/api/device-session/DeviceSessionState.d.ts.map +1 -1
  468. package/lib/types/src/api/device-session/service/DefaultApduReceiverService.stub.d.ts.map +1 -1
  469. package/lib/types/src/api/device-session/service/DefaultApduSenderService.stub.d.ts.map +1 -1
  470. package/lib/types/src/api/index.d.ts +5 -1
  471. package/lib/types/src/api/index.d.ts.map +1 -1
  472. package/lib/types/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.d.ts.map +1 -1
  473. package/lib/types/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.d.ts.map +1 -1
  474. package/lib/types/src/api/transport/model/DeviceConnectionStateMachine.d.ts.map +1 -1
  475. package/lib/types/src/api/transport/model/Errors.d.ts +7 -3
  476. package/lib/types/src/api/transport/model/Errors.d.ts.map +1 -1
  477. package/lib/types/src/api/transport/model/Transport.d.ts +1 -1
  478. package/lib/types/src/api/transport/model/Transport.d.ts.map +1 -1
  479. package/lib/types/src/api/types.d.ts +4 -1
  480. package/lib/types/src/api/types.d.ts.map +1 -1
  481. package/lib/types/src/api/utils/HexaString.d.ts.map +1 -1
  482. package/lib/types/src/di.d.ts.map +1 -1
  483. package/lib/types/src/internal/config/di/configModule.d.ts.map +1 -1
  484. package/lib/types/src/internal/device-model/di/deviceModelModule.d.ts.map +1 -1
  485. package/lib/types/src/internal/device-session/data/ApduResponseConst.d.ts +1 -0
  486. package/lib/types/src/internal/device-session/data/ApduResponseConst.d.ts.map +1 -1
  487. package/lib/types/src/internal/device-session/di/deviceSessionModule.d.ts.map +1 -1
  488. package/lib/types/src/internal/device-session/model/DevicePinger.d.ts +1 -1
  489. package/lib/types/src/internal/device-session/model/DevicePinger.d.ts.map +1 -1
  490. package/lib/types/src/internal/device-session/model/DeviceSession.d.ts +2 -1
  491. package/lib/types/src/internal/device-session/model/DeviceSession.d.ts.map +1 -1
  492. package/lib/types/src/internal/device-session/model/DeviceSession.stub.d.ts.map +1 -1
  493. package/lib/types/src/internal/device-session/model/DeviceSessionStateHandler.d.ts.map +1 -1
  494. package/lib/types/src/internal/device-session/model/Frame.d.ts.map +1 -1
  495. package/lib/types/src/internal/device-session/utils/deviceSessionUtils.d.ts.map +1 -1
  496. package/lib/types/src/internal/discovery/di/discoveryModule.d.ts.map +1 -1
  497. package/lib/types/src/internal/discovery/use-case/StopDiscoveringUseCase.d.ts +4 -2
  498. package/lib/types/src/internal/discovery/use-case/StopDiscoveringUseCase.d.ts.map +1 -1
  499. package/lib/types/src/internal/logger-publisher/di/loggerModule.d.ts.map +1 -1
  500. package/lib/types/src/internal/manager-api/data/AxiosManagerApiDataSource.d.ts +20 -4
  501. package/lib/types/src/internal/manager-api/data/AxiosManagerApiDataSource.d.ts.map +1 -1
  502. package/lib/types/src/internal/manager-api/data/ManagerApiDataSource.d.ts +41 -6
  503. package/lib/types/src/internal/manager-api/data/ManagerApiDataSource.d.ts.map +1 -1
  504. package/lib/types/src/internal/manager-api/data/ManagerApiDto.d.ts +104 -18
  505. package/lib/types/src/internal/manager-api/data/ManagerApiDto.d.ts.map +1 -1
  506. package/lib/types/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.d.ts +5 -0
  507. package/lib/types/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.d.ts.map +1 -1
  508. package/lib/types/src/internal/manager-api/di/managerApiModule.d.ts.map +1 -1
  509. package/lib/types/src/internal/manager-api/model/Application.d.ts +12 -12
  510. package/lib/types/src/internal/manager-api/model/Application.d.ts.map +1 -1
  511. package/lib/types/src/internal/manager-api/model/Const.d.ts +1 -0
  512. package/lib/types/src/internal/manager-api/model/Const.d.ts.map +1 -1
  513. package/lib/types/src/internal/manager-api/model/Firmware.d.ts +17 -3
  514. package/lib/types/src/internal/manager-api/model/Firmware.d.ts.map +1 -1
  515. package/lib/types/src/internal/manager-api/model/Language.d.ts +12 -0
  516. package/lib/types/src/internal/manager-api/model/Language.d.ts.map +1 -0
  517. package/lib/types/src/internal/manager-api/model/Params.d.ts +20 -0
  518. package/lib/types/src/internal/manager-api/model/Params.d.ts.map +1 -1
  519. package/lib/types/src/internal/manager-api/service/DefaultManagerApiService.d.ts +7 -1
  520. package/lib/types/src/internal/manager-api/service/DefaultManagerApiService.d.ts.map +1 -1
  521. package/lib/types/src/internal/manager-api/service/ManagerApiService.d.ts +39 -1
  522. package/lib/types/src/internal/manager-api/service/ManagerApiService.d.ts.map +1 -1
  523. package/lib/types/src/internal/manager-api/use-case/SetProviderUseCase.d.ts +3 -1
  524. package/lib/types/src/internal/manager-api/use-case/SetProviderUseCase.d.ts.map +1 -1
  525. package/lib/types/src/internal/secure-channel/di/secureChannelModule.d.ts.map +1 -1
  526. package/lib/types/src/internal/secure-channel/service/DefaultSecureChannelService.d.ts +2 -2
  527. package/lib/types/src/internal/secure-channel/service/DefaultSecureChannelService.d.ts.map +1 -1
  528. package/lib/types/src/internal/secure-channel/service/SecureChannelService.d.ts +3 -3
  529. package/lib/types/src/internal/secure-channel/service/SecureChannelService.d.ts.map +1 -1
  530. package/lib/types/src/internal/send/di/sendModule.d.ts.map +1 -1
  531. package/lib/types/src/internal/transport/di/transportModule.d.ts.map +1 -1
  532. package/lib/types/tsconfig.prod.tsbuildinfo +1 -1
  533. package/package.json +14 -15
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/internal/manager-api/di/managerApiModule.test.ts"],
4
- "sourcesContent": ["import { Container } from \"inversify\";\n\nimport { type DmkConfig } from \"@api/DmkConfig\";\nimport { AxiosManagerApiDataSource } from \"@internal/manager-api/data/AxiosManagerApiDataSource\";\nimport { DefaultManagerApiService } from \"@internal/manager-api/service/DefaultManagerApiService\";\nimport { StubUseCase } from \"@root/src/di.stub\";\n\nimport { managerApiModuleFactory } from \"./managerApiModule\";\nimport { managerApiTypes } from \"./managerApiTypes\";\n\ndescribe(\"managerApiModuleFactory\", () => {\n describe(\"Default\", () => {\n let container: Container;\n let mod: ReturnType<typeof managerApiModuleFactory>;\n beforeEach(() => {\n mod = managerApiModuleFactory({\n stub: false,\n config: {\n managerApiUrl: \"http://fake.url\",\n mockUrl: \"http://fake-mock.url\",\n webSocketUrl: \"http://fake-websocket.url\",\n } as DmkConfig,\n });\n container = new Container();\n container.load(mod);\n });\n\n it(\"should return the config module\", () => {\n expect(mod).toBeDefined();\n });\n\n it(\"should return none stubbed use cases\", () => {\n const managerApiDataSource = container.get(\n managerApiTypes.ManagerApiDataSource,\n );\n expect(managerApiDataSource).toBeInstanceOf(AxiosManagerApiDataSource);\n\n const managerApiService = container.get(\n managerApiTypes.ManagerApiService,\n );\n expect(managerApiService).toBeInstanceOf(DefaultManagerApiService);\n\n const config = container.get(managerApiTypes.DmkConfig);\n expect(config).toEqual({\n managerApiUrl: \"http://fake.url\",\n mockUrl: \"http://fake-mock.url\",\n webSocketUrl: \"http://fake-websocket.url\",\n });\n });\n });\n\n describe(\"Stubbed\", () => {\n let container: Container;\n let mod: ReturnType<typeof managerApiModuleFactory>;\n beforeEach(() => {\n mod = managerApiModuleFactory({\n stub: true,\n config: {\n managerApiUrl: \"http://fake.url\",\n mockUrl: \"http://fake-mock.url\",\n webSocketUrl: \"http://fake-websocket.url\",\n } as DmkConfig,\n });\n container = new Container();\n container.load(mod);\n });\n\n it(\"should return the config module\", () => {\n expect(mod).toBeDefined();\n });\n\n it(\"should return stubbed use cases\", () => {\n const managerApiDataSource = container.get(\n managerApiTypes.ManagerApiDataSource,\n );\n expect(managerApiDataSource).toBeInstanceOf(StubUseCase);\n\n const managerApiService = container.get(\n managerApiTypes.ManagerApiService,\n );\n expect(managerApiService).toBeInstanceOf(StubUseCase);\n\n const config = container.get(managerApiTypes.DmkConfig);\n expect(config).toEqual({\n managerApiUrl: \"http://fake.url\",\n mockUrl: \"http://fake-mock.url\",\n webSocketUrl: \"http://fake-websocket.url\",\n });\n });\n });\n});\n"],
5
- "mappings": "AAAA,OAAS,aAAAA,MAAiB,YAG1B,OAAS,6BAAAC,MAAiC,uDAC1C,OAAS,4BAAAC,MAAgC,yDACzC,OAAS,eAAAC,MAAmB,oBAE5B,OAAS,2BAAAC,MAA+B,qBACxC,OAAS,mBAAAC,MAAuB,oBAEhC,SAAS,0BAA2B,IAAM,CACxC,SAAS,UAAW,IAAM,CACxB,IAAIC,EACAC,EACJ,WAAW,IAAM,CACfA,EAAMH,EAAwB,CAC5B,KAAM,GACN,OAAQ,CACN,cAAe,kBACf,QAAS,uBACT,aAAc,2BAChB,CACF,CAAC,EACDE,EAAY,IAAIN,EAChBM,EAAU,KAAKC,CAAG,CACpB,CAAC,EAED,GAAG,kCAAmC,IAAM,CAC1C,OAAOA,CAAG,EAAE,YAAY,CAC1B,CAAC,EAED,GAAG,uCAAwC,IAAM,CAC/C,MAAMC,EAAuBF,EAAU,IACrCD,EAAgB,oBAClB,EACA,OAAOG,CAAoB,EAAE,eAAeP,CAAyB,EAErE,MAAMQ,EAAoBH,EAAU,IAClCD,EAAgB,iBAClB,EACA,OAAOI,CAAiB,EAAE,eAAeP,CAAwB,EAEjE,MAAMQ,EAASJ,EAAU,IAAID,EAAgB,SAAS,EACtD,OAAOK,CAAM,EAAE,QAAQ,CACrB,cAAe,kBACf,QAAS,uBACT,aAAc,2BAChB,CAAC,CACH,CAAC,CACH,CAAC,EAED,SAAS,UAAW,IAAM,CACxB,IAAIJ,EACAC,EACJ,WAAW,IAAM,CACfA,EAAMH,EAAwB,CAC5B,KAAM,GACN,OAAQ,CACN,cAAe,kBACf,QAAS,uBACT,aAAc,2BAChB,CACF,CAAC,EACDE,EAAY,IAAIN,EAChBM,EAAU,KAAKC,CAAG,CACpB,CAAC,EAED,GAAG,kCAAmC,IAAM,CAC1C,OAAOA,CAAG,EAAE,YAAY,CAC1B,CAAC,EAED,GAAG,kCAAmC,IAAM,CAC1C,MAAMC,EAAuBF,EAAU,IACrCD,EAAgB,oBAClB,EACA,OAAOG,CAAoB,EAAE,eAAeL,CAAW,EAEvD,MAAMM,EAAoBH,EAAU,IAClCD,EAAgB,iBAClB,EACA,OAAOI,CAAiB,EAAE,eAAeN,CAAW,EAEpD,MAAMO,EAASJ,EAAU,IAAID,EAAgB,SAAS,EACtD,OAAOK,CAAM,EAAE,QAAQ,CACrB,cAAe,kBACf,QAAS,uBACT,aAAc,2BAChB,CAAC,CACH,CAAC,CACH,CAAC,CACH,CAAC",
4
+ "sourcesContent": ["import { Container } from \"inversify\";\n\nimport { type DmkConfig } from \"@api/DmkConfig\";\nimport { AxiosManagerApiDataSource } from \"@internal/manager-api/data/AxiosManagerApiDataSource\";\nimport { DefaultManagerApiService } from \"@internal/manager-api/service/DefaultManagerApiService\";\nimport { StubUseCase } from \"@root/src/di.stub\";\n\nimport { managerApiModuleFactory } from \"./managerApiModule\";\nimport { managerApiTypes } from \"./managerApiTypes\";\n\ndescribe(\"managerApiModuleFactory\", () => {\n describe(\"Default\", () => {\n let container: Container;\n let mod: ReturnType<typeof managerApiModuleFactory>;\n beforeEach(() => {\n mod = managerApiModuleFactory({\n stub: false,\n config: {\n managerApiUrl: \"http://fake.url\",\n mockUrl: \"http://fake-mock.url\",\n webSocketUrl: \"http://fake-websocket.url\",\n } as DmkConfig,\n });\n container = new Container();\n container.loadSync(mod);\n });\n\n it(\"should return the config module\", () => {\n expect(mod).toBeDefined();\n });\n\n it(\"should return none stubbed use cases\", () => {\n const managerApiDataSource = container.get(\n managerApiTypes.ManagerApiDataSource,\n );\n expect(managerApiDataSource).toBeInstanceOf(AxiosManagerApiDataSource);\n\n const managerApiService = container.get(\n managerApiTypes.ManagerApiService,\n );\n expect(managerApiService).toBeInstanceOf(DefaultManagerApiService);\n\n const config = container.get(managerApiTypes.DmkConfig);\n expect(config).toEqual({\n managerApiUrl: \"http://fake.url\",\n mockUrl: \"http://fake-mock.url\",\n webSocketUrl: \"http://fake-websocket.url\",\n });\n });\n });\n\n describe(\"Stubbed\", () => {\n let container: Container;\n let mod: ReturnType<typeof managerApiModuleFactory>;\n beforeEach(() => {\n mod = managerApiModuleFactory({\n stub: true,\n config: {\n managerApiUrl: \"http://fake.url\",\n mockUrl: \"http://fake-mock.url\",\n webSocketUrl: \"http://fake-websocket.url\",\n } as DmkConfig,\n });\n container = new Container();\n container.loadSync(mod);\n });\n\n it(\"should return the config module\", () => {\n expect(mod).toBeDefined();\n });\n\n it(\"should return stubbed use cases\", () => {\n const managerApiDataSource = container.get(\n managerApiTypes.ManagerApiDataSource,\n );\n expect(managerApiDataSource).toBeInstanceOf(StubUseCase);\n\n const managerApiService = container.get(\n managerApiTypes.ManagerApiService,\n );\n expect(managerApiService).toBeInstanceOf(StubUseCase);\n\n const config = container.get(managerApiTypes.DmkConfig);\n expect(config).toEqual({\n managerApiUrl: \"http://fake.url\",\n mockUrl: \"http://fake-mock.url\",\n webSocketUrl: \"http://fake-websocket.url\",\n });\n });\n });\n});\n"],
5
+ "mappings": "AAAA,OAAS,aAAAA,MAAiB,YAG1B,OAAS,6BAAAC,MAAiC,uDAC1C,OAAS,4BAAAC,MAAgC,yDACzC,OAAS,eAAAC,MAAmB,oBAE5B,OAAS,2BAAAC,MAA+B,qBACxC,OAAS,mBAAAC,MAAuB,oBAEhC,SAAS,0BAA2B,IAAM,CACxC,SAAS,UAAW,IAAM,CACxB,IAAIC,EACAC,EACJ,WAAW,IAAM,CACfA,EAAMH,EAAwB,CAC5B,KAAM,GACN,OAAQ,CACN,cAAe,kBACf,QAAS,uBACT,aAAc,2BAChB,CACF,CAAC,EACDE,EAAY,IAAIN,EAChBM,EAAU,SAASC,CAAG,CACxB,CAAC,EAED,GAAG,kCAAmC,IAAM,CAC1C,OAAOA,CAAG,EAAE,YAAY,CAC1B,CAAC,EAED,GAAG,uCAAwC,IAAM,CAC/C,MAAMC,EAAuBF,EAAU,IACrCD,EAAgB,oBAClB,EACA,OAAOG,CAAoB,EAAE,eAAeP,CAAyB,EAErE,MAAMQ,EAAoBH,EAAU,IAClCD,EAAgB,iBAClB,EACA,OAAOI,CAAiB,EAAE,eAAeP,CAAwB,EAEjE,MAAMQ,EAASJ,EAAU,IAAID,EAAgB,SAAS,EACtD,OAAOK,CAAM,EAAE,QAAQ,CACrB,cAAe,kBACf,QAAS,uBACT,aAAc,2BAChB,CAAC,CACH,CAAC,CACH,CAAC,EAED,SAAS,UAAW,IAAM,CACxB,IAAIJ,EACAC,EACJ,WAAW,IAAM,CACfA,EAAMH,EAAwB,CAC5B,KAAM,GACN,OAAQ,CACN,cAAe,kBACf,QAAS,uBACT,aAAc,2BAChB,CACF,CAAC,EACDE,EAAY,IAAIN,EAChBM,EAAU,SAASC,CAAG,CACxB,CAAC,EAED,GAAG,kCAAmC,IAAM,CAC1C,OAAOA,CAAG,EAAE,YAAY,CAC1B,CAAC,EAED,GAAG,kCAAmC,IAAM,CAC1C,MAAMC,EAAuBF,EAAU,IACrCD,EAAgB,oBAClB,EACA,OAAOG,CAAoB,EAAE,eAAeL,CAAW,EAEvD,MAAMM,EAAoBH,EAAU,IAClCD,EAAgB,iBAClB,EACA,OAAOI,CAAiB,EAAE,eAAeN,CAAW,EAEpD,MAAMO,EAASJ,EAAU,IAAID,EAAgB,SAAS,EACtD,OAAOK,CAAM,EAAE,QAAQ,CACrB,cAAe,kBACf,QAAS,uBACT,aAAc,2BAChB,CAAC,CACH,CAAC,CACH,CAAC,CACH,CAAC",
6
6
  "names": ["Container", "AxiosManagerApiDataSource", "DefaultManagerApiService", "StubUseCase", "managerApiModuleFactory", "managerApiTypes", "container", "mod", "managerApiDataSource", "managerApiService", "config"]
7
7
  }
@@ -1,2 +1,2 @@
1
- var n=(r=>(r.currency="currency",r.plugin="plugin",r.tool="tool",r.swap="swap",r))(n||{});export{n as AppType};
1
+ var r=(n=>(n.currency="currency",n.plugin="plugin",n.tool="tool",n.swap="swap",n))(r||{});export{r as AppType};
2
2
  //# sourceMappingURL=Application.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/internal/manager-api/model/Application.ts"],
4
- "sourcesContent": ["export enum AppType {\n currency = \"currency\",\n plugin = \"plugin\",\n tool = \"tool\",\n swap = \"swap\",\n}\n\nexport type Application = {\n versionId: number;\n versionName: string;\n versionDisplayName: string;\n version: string;\n currencyId: string;\n description: string;\n applicationType: AppType;\n dateModified: string;\n icon: string;\n authorName: string;\n supportURL: string;\n contactURL: string;\n sourceURL: string;\n compatibleWallets: string;\n hash: string;\n perso: string;\n firmware: string;\n firmwareKey: string;\n delete: string;\n deleteKey: string;\n bytes: number;\n warning: string | null;\n isDevTools: boolean;\n category: number;\n parent: number | null;\n parentName: string | null;\n};\n"],
4
+ "sourcesContent": ["export enum AppType {\n currency = \"currency\",\n plugin = \"plugin\",\n tool = \"tool\",\n swap = \"swap\",\n}\n\nexport type Application = {\n versionId: number;\n versionName: string;\n versionDisplayName: string | null;\n version: string;\n currencyId: string | null;\n description: string | null;\n applicationType: AppType | null;\n dateModified: string;\n icon: string | null;\n authorName: string | null;\n supportURL: string | null;\n contactURL: string | null;\n sourceURL: string | null;\n compatibleWallets: string | null;\n hash: string;\n perso: string;\n firmware: string;\n firmwareKey: string;\n delete: string;\n deleteKey: string;\n bytes: number | null;\n warning: string | null;\n isDevTools: boolean;\n category: number | null;\n parent: number | null;\n parentName: string | null;\n};\n"],
5
5
  "mappings": "AAAO,IAAKA,OACVA,EAAA,SAAW,WACXA,EAAA,OAAS,SACTA,EAAA,KAAO,OACPA,EAAA,KAAO,OAJGA,OAAA",
6
6
  "names": ["AppType"]
7
7
  }
@@ -1,2 +1,2 @@
1
- const t="https://manager.api.live.ledger.com/api",o="http://localhost:8080",E=1;export{t as DEFAULT_MANAGER_API_BASE_URL,o as DEFAULT_MOCK_SERVER_BASE_URL,E as DEFAULT_PROVIDER};
1
+ const t="https://manager.api.live.ledger.com/api",_="http://localhost:8080",o=1,A="0";export{A as DEFAULT_FIRMWARE_DISTRIBUTION_SALT,t as DEFAULT_MANAGER_API_BASE_URL,_ as DEFAULT_MOCK_SERVER_BASE_URL,o as DEFAULT_PROVIDER};
2
2
  //# sourceMappingURL=Const.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/internal/manager-api/model/Const.ts"],
4
- "sourcesContent": ["export const DEFAULT_MANAGER_API_BASE_URL =\n \"https://manager.api.live.ledger.com/api\";\nexport const DEFAULT_MOCK_SERVER_BASE_URL = \"http://localhost:8080\";\nexport const DEFAULT_PROVIDER = 1;\n"],
5
- "mappings": "AAAO,MAAMA,EACX,0CACWC,EAA+B,wBAC/BC,EAAmB",
6
- "names": ["DEFAULT_MANAGER_API_BASE_URL", "DEFAULT_MOCK_SERVER_BASE_URL", "DEFAULT_PROVIDER"]
4
+ "sourcesContent": ["export const DEFAULT_MANAGER_API_BASE_URL =\n \"https://manager.api.live.ledger.com/api\";\nexport const DEFAULT_MOCK_SERVER_BASE_URL = \"http://localhost:8080\";\nexport const DEFAULT_PROVIDER = 1;\nexport const DEFAULT_FIRMWARE_DISTRIBUTION_SALT = \"0\";\n"],
5
+ "mappings": "AAAO,MAAMA,EACX,0CACWC,EAA+B,wBAC/BC,EAAmB,EACnBC,EAAqC",
6
+ "names": ["DEFAULT_MANAGER_API_BASE_URL", "DEFAULT_MOCK_SERVER_BASE_URL", "DEFAULT_PROVIDER", "DEFAULT_FIRMWARE_DISTRIBUTION_SALT"]
7
7
  }
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=Language.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -1,2 +1,2 @@
1
- var y=Object.defineProperty;var A=Object.getOwnPropertyDescriptor;var n=(i,r,e,t)=>{for(var s=t>1?void 0:t?A(r,e):r,a=i.length-1,p;a>=0;a--)(p=i[a])&&(s=(t?p(r,e,s):p(s))||s);return t&&s&&y(r,e,s),s},m=(i,r)=>(e,t)=>r(e,t,i);import{inject as g,injectable as h}from"inversify";import{EitherAsync as V}from"purify-ts";import{managerApiTypes as u}from"../../manager-api/di/managerApiTypes";import{HttpFetchApiError as c}from"../../manager-api/model/Errors";let o=class{constructor(r){this.dataSource=r}getAppList(r){const e={targetId:r.targetId.toString(),firmwareVersionName:r.seVersion};return this.dataSource.getAppList(e)}getDeviceVersion(r){const e={targetId:r.targetId.toString()};return this.dataSource.getDeviceVersion(e)}getFirmwareVersion(r,e){const t={version:r.seVersion,deviceId:e.id};return this.dataSource.getFirmwareVersion(t)}getAppsByHash(r){const e={hashes:r};return V(async({fromPromise:t,throwE:s})=>{if(e.hashes.length===0)return[];try{return await t(this.dataSource.getAppsByHash(e))}catch(a){return a instanceof c?s(a):s(new c(a))}})}};o=n([h(),m(0,g(u.ManagerApiDataSource))],o);export{o as DefaultManagerApiService};
1
+ var g=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var p=(s,e,r,t)=>{for(var a=t>1?void 0:t?u(e,r):e,i=s.length-1,o;i>=0;i--)(o=s[i])&&(a=(t?o(e,r,a):o(a))||a);return t&&a&&g(e,r,a),a},m=(s,e)=>(r,t)=>e(r,t,s);import{inject as F,injectable as d}from"inversify";import{EitherAsync as V}from"purify-ts";import{managerApiTypes as y}from"../../manager-api/di/managerApiTypes";import{HttpFetchApiError as c}from"../../manager-api/model/Errors";let n=class{constructor(e){this.dataSource=e}getAppList(e){const r={targetId:e.targetId.toString(),firmwareVersionName:e.seVersion};return this.dataSource.getAppList(r)}getDeviceVersion(e){const r={targetId:e.targetId.toString()};return this.dataSource.getDeviceVersion(r)}getFirmwareVersion(e,r){const t={version:e.seVersion,deviceId:r.id};return this.dataSource.getFirmwareVersion(t)}getOsuFirmwareVersion(e,r){const t={version:e.seVersion,deviceId:r.id};return this.dataSource.getOsuFirmwareVersion(t)}getLatestFirmwareVersion(e,r){const t={currentFinalFirmwareId:e.id,deviceId:r.id};return this.dataSource.getLatestFirmwareVersion(t)}getNextFirmwareVersion(e){return this.dataSource.getFirmwareVersionById(e.nextFinalFirmware)}getLanguagePackages(e,r){const t={deviceId:e.id,currentFinalFirmwareId:r.id};return this.dataSource.getLanguagePackages(t)}getMcuList(){return this.dataSource.getMcuList()}getAppsByHash(e){const r={hashes:e};return V(async({fromPromise:t,throwE:a})=>{if(r.hashes.length===0)return[];try{return await t(this.dataSource.getAppsByHash(r))}catch(i){return i instanceof c?a(i):a(new c(i))}})}};n=p([d(),m(0,F(y.ManagerApiDataSource))],n);export{n as DefaultManagerApiService};
2
2
  //# sourceMappingURL=DefaultManagerApiService.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/internal/manager-api/service/DefaultManagerApiService.ts"],
4
- "sourcesContent": ["import { inject, injectable } from \"inversify\";\nimport { EitherAsync } from \"purify-ts\";\n\nimport { type GetOsVersionResponse } from \"@api/command/os/GetOsVersionCommand\";\nimport { type ManagerApiDataSource } from \"@internal/manager-api/data/ManagerApiDataSource\";\nimport { managerApiTypes } from \"@internal/manager-api/di/managerApiTypes\";\nimport { type Application } from \"@internal/manager-api/model/Application\";\nimport { type DeviceVersion } from \"@internal/manager-api/model/Device\";\nimport { HttpFetchApiError } from \"@internal/manager-api/model/Errors\";\nimport {\n type GetAppByHashParams,\n type GetAppListParams,\n type GetDeviceVersionParams,\n type GetFirmwareVersionParams,\n} from \"@internal/manager-api/model/Params\";\n\nimport { type ManagerApiService } from \"./ManagerApiService\";\n\n@injectable()\nexport class DefaultManagerApiService implements ManagerApiService {\n constructor(\n @inject(managerApiTypes.ManagerApiDataSource)\n private readonly dataSource: ManagerApiDataSource,\n ) {}\n\n getAppList(\n deviceInfo: GetOsVersionResponse,\n ): EitherAsync<HttpFetchApiError, Array<Application>> {\n const params: GetAppListParams = {\n targetId: deviceInfo.targetId.toString(),\n firmwareVersionName: deviceInfo.seVersion,\n };\n return this.dataSource.getAppList(params);\n }\n\n getDeviceVersion(deviceInfo: GetOsVersionResponse) {\n const params: GetDeviceVersionParams = {\n targetId: deviceInfo.targetId.toString(),\n };\n return this.dataSource.getDeviceVersion(params);\n }\n\n getFirmwareVersion(\n deviceInfo: GetOsVersionResponse,\n deviceVersion: DeviceVersion,\n ) {\n const params: GetFirmwareVersionParams = {\n version: deviceInfo.seVersion,\n deviceId: deviceVersion.id,\n };\n return this.dataSource.getFirmwareVersion(params);\n }\n\n getAppsByHash(appHashes: Array<string>) {\n const params: GetAppByHashParams = {\n hashes: appHashes,\n };\n return EitherAsync<HttpFetchApiError, Array<Application | null>>(\n async ({ fromPromise, throwE }) => {\n if (params.hashes.length === 0) {\n return [];\n }\n try {\n const response = await fromPromise(\n this.dataSource.getAppsByHash(params),\n );\n return response;\n } catch (error) {\n if (error instanceof HttpFetchApiError) {\n return throwE(error);\n }\n return throwE(new HttpFetchApiError(error));\n }\n },\n );\n }\n}\n"],
5
- "mappings": "iOAAA,OAAS,UAAAA,EAAQ,cAAAC,MAAkB,YACnC,OAAS,eAAAC,MAAmB,YAI5B,OAAS,mBAAAC,MAAuB,2CAGhC,OAAS,qBAAAC,MAAyB,qCAW3B,IAAMC,EAAN,KAA4D,CACjE,YAEmBC,EACjB,CADiB,gBAAAA,CAChB,CAEH,WACEC,EACoD,CACpD,MAAMC,EAA2B,CAC/B,SAAUD,EAAW,SAAS,SAAS,EACvC,oBAAqBA,EAAW,SAClC,EACA,OAAO,KAAK,WAAW,WAAWC,CAAM,CAC1C,CAEA,iBAAiBD,EAAkC,CACjD,MAAMC,EAAiC,CACrC,SAAUD,EAAW,SAAS,SAAS,CACzC,EACA,OAAO,KAAK,WAAW,iBAAiBC,CAAM,CAChD,CAEA,mBACED,EACAE,EACA,CACA,MAAMD,EAAmC,CACvC,QAASD,EAAW,UACpB,SAAUE,EAAc,EAC1B,EACA,OAAO,KAAK,WAAW,mBAAmBD,CAAM,CAClD,CAEA,cAAcE,EAA0B,CACtC,MAAMF,EAA6B,CACjC,OAAQE,CACV,EACA,OAAOC,EACL,MAAO,CAAE,YAAAC,EAAa,OAAAC,CAAO,IAAM,CACjC,GAAIL,EAAO,OAAO,SAAW,EAC3B,MAAO,CAAC,EAEV,GAAI,CAIF,OAHiB,MAAMI,EACrB,KAAK,WAAW,cAAcJ,CAAM,CACtC,CAEF,OAASM,EAAO,CACd,OAAIA,aAAiBC,EACZF,EAAOC,CAAK,EAEdD,EAAO,IAAIE,EAAkBD,CAAK,CAAC,CAC5C,CACF,CACF,CACF,CACF,EAzDaT,EAANW,EAAA,CADNC,EAAW,EAGPC,EAAA,EAAAC,EAAOC,EAAgB,oBAAoB,IAFnCf",
6
- "names": ["inject", "injectable", "EitherAsync", "managerApiTypes", "HttpFetchApiError", "DefaultManagerApiService", "dataSource", "deviceInfo", "params", "deviceVersion", "appHashes", "EitherAsync", "fromPromise", "throwE", "error", "HttpFetchApiError", "__decorateClass", "injectable", "__decorateParam", "inject", "managerApiTypes"]
4
+ "sourcesContent": ["import { inject, injectable } from \"inversify\";\nimport { EitherAsync } from \"purify-ts\";\n\nimport { type GetOsVersionResponse } from \"@api/command/os/GetOsVersionCommand\";\nimport { type ManagerApiDataSource } from \"@internal/manager-api/data/ManagerApiDataSource\";\nimport { managerApiTypes } from \"@internal/manager-api/di/managerApiTypes\";\nimport { type Application } from \"@internal/manager-api/model/Application\";\nimport { type DeviceVersion } from \"@internal/manager-api/model/Device\";\nimport { HttpFetchApiError } from \"@internal/manager-api/model/Errors\";\nimport {\n type FinalFirmware,\n type McuFirmware,\n type OsuFirmware,\n} from \"@internal/manager-api/model/Firmware\";\nimport {\n type GetAppByHashParams,\n type GetAppListParams,\n type GetDeviceVersionParams,\n type GetFirmwareVersionParams,\n type GetLanguagePackagesParams,\n type GetLatestFirmwareVersionParams,\n} from \"@internal/manager-api/model/Params\";\n\nimport { type ManagerApiService } from \"./ManagerApiService\";\n\n@injectable()\nexport class DefaultManagerApiService implements ManagerApiService {\n constructor(\n @inject(managerApiTypes.ManagerApiDataSource)\n private readonly dataSource: ManagerApiDataSource,\n ) {}\n\n getAppList(\n deviceInfo: GetOsVersionResponse,\n ): EitherAsync<HttpFetchApiError, Array<Application>> {\n const params: GetAppListParams = {\n targetId: deviceInfo.targetId.toString(),\n firmwareVersionName: deviceInfo.seVersion,\n };\n return this.dataSource.getAppList(params);\n }\n\n getDeviceVersion(deviceInfo: GetOsVersionResponse) {\n const params: GetDeviceVersionParams = {\n targetId: deviceInfo.targetId.toString(),\n };\n return this.dataSource.getDeviceVersion(params);\n }\n\n getFirmwareVersion(\n deviceInfo: GetOsVersionResponse,\n deviceVersion: DeviceVersion,\n ) {\n const params: GetFirmwareVersionParams = {\n version: deviceInfo.seVersion,\n deviceId: deviceVersion.id,\n };\n return this.dataSource.getFirmwareVersion(params);\n }\n\n getOsuFirmwareVersion(\n deviceInfo: GetOsVersionResponse,\n deviceVersion: DeviceVersion,\n ) {\n const params: GetFirmwareVersionParams = {\n version: deviceInfo.seVersion,\n deviceId: deviceVersion.id,\n };\n return this.dataSource.getOsuFirmwareVersion(params);\n }\n\n getLatestFirmwareVersion(\n currentFirmware: FinalFirmware,\n deviceVersion: DeviceVersion,\n ) {\n const params: GetLatestFirmwareVersionParams = {\n currentFinalFirmwareId: currentFirmware.id,\n deviceId: deviceVersion.id,\n };\n return this.dataSource.getLatestFirmwareVersion(params);\n }\n\n getNextFirmwareVersion(osuFirmware: OsuFirmware) {\n return this.dataSource.getFirmwareVersionById(\n osuFirmware.nextFinalFirmware,\n );\n }\n\n getLanguagePackages(\n deviceVersion: DeviceVersion,\n currentFirmware: FinalFirmware,\n ) {\n const params: GetLanguagePackagesParams = {\n deviceId: deviceVersion.id,\n currentFinalFirmwareId: currentFirmware.id,\n };\n return this.dataSource.getLanguagePackages(params);\n }\n\n getMcuList(): EitherAsync<HttpFetchApiError, Array<McuFirmware>> {\n return this.dataSource.getMcuList();\n }\n\n getAppsByHash(appHashes: Array<string>) {\n const params: GetAppByHashParams = {\n hashes: appHashes,\n };\n return EitherAsync<HttpFetchApiError, Array<Application | null>>(\n async ({ fromPromise, throwE }) => {\n if (params.hashes.length === 0) {\n return [];\n }\n try {\n const response = await fromPromise(\n this.dataSource.getAppsByHash(params),\n );\n return response;\n } catch (error) {\n if (error instanceof HttpFetchApiError) {\n return throwE(error);\n }\n return throwE(new HttpFetchApiError(error));\n }\n },\n );\n }\n}\n"],
5
+ "mappings": "iOAAA,OAAS,UAAAA,EAAQ,cAAAC,MAAkB,YACnC,OAAS,eAAAC,MAAmB,YAI5B,OAAS,mBAAAC,MAAuB,2CAGhC,OAAS,qBAAAC,MAAyB,qCAkB3B,IAAMC,EAAN,KAA4D,CACjE,YAEmBC,EACjB,CADiB,gBAAAA,CAChB,CAEH,WACEC,EACoD,CACpD,MAAMC,EAA2B,CAC/B,SAAUD,EAAW,SAAS,SAAS,EACvC,oBAAqBA,EAAW,SAClC,EACA,OAAO,KAAK,WAAW,WAAWC,CAAM,CAC1C,CAEA,iBAAiBD,EAAkC,CACjD,MAAMC,EAAiC,CACrC,SAAUD,EAAW,SAAS,SAAS,CACzC,EACA,OAAO,KAAK,WAAW,iBAAiBC,CAAM,CAChD,CAEA,mBACED,EACAE,EACA,CACA,MAAMD,EAAmC,CACvC,QAASD,EAAW,UACpB,SAAUE,EAAc,EAC1B,EACA,OAAO,KAAK,WAAW,mBAAmBD,CAAM,CAClD,CAEA,sBACED,EACAE,EACA,CACA,MAAMD,EAAmC,CACvC,QAASD,EAAW,UACpB,SAAUE,EAAc,EAC1B,EACA,OAAO,KAAK,WAAW,sBAAsBD,CAAM,CACrD,CAEA,yBACEE,EACAD,EACA,CACA,MAAMD,EAAyC,CAC7C,uBAAwBE,EAAgB,GACxC,SAAUD,EAAc,EAC1B,EACA,OAAO,KAAK,WAAW,yBAAyBD,CAAM,CACxD,CAEA,uBAAuBG,EAA0B,CAC/C,OAAO,KAAK,WAAW,uBACrBA,EAAY,iBACd,CACF,CAEA,oBACEF,EACAC,EACA,CACA,MAAMF,EAAoC,CACxC,SAAUC,EAAc,GACxB,uBAAwBC,EAAgB,EAC1C,EACA,OAAO,KAAK,WAAW,oBAAoBF,CAAM,CACnD,CAEA,YAAiE,CAC/D,OAAO,KAAK,WAAW,WAAW,CACpC,CAEA,cAAcI,EAA0B,CACtC,MAAMJ,EAA6B,CACjC,OAAQI,CACV,EACA,OAAOC,EACL,MAAO,CAAE,YAAAC,EAAa,OAAAC,CAAO,IAAM,CACjC,GAAIP,EAAO,OAAO,SAAW,EAC3B,MAAO,CAAC,EAEV,GAAI,CAIF,OAHiB,MAAMM,EACrB,KAAK,WAAW,cAAcN,CAAM,CACtC,CAEF,OAASQ,EAAO,CACd,OAAIA,aAAiBC,EACZF,EAAOC,CAAK,EAEdD,EAAO,IAAIE,EAAkBD,CAAK,CAAC,CAC5C,CACF,CACF,CACF,CACF,EApGaX,EAANa,EAAA,CADNC,EAAW,EAGPC,EAAA,EAAAC,EAAOC,EAAgB,oBAAoB,IAFnCjB",
6
+ "names": ["inject", "injectable", "EitherAsync", "managerApiTypes", "HttpFetchApiError", "DefaultManagerApiService", "dataSource", "deviceInfo", "params", "deviceVersion", "currentFirmware", "osuFirmware", "appHashes", "EitherAsync", "fromPromise", "throwE", "error", "HttpFetchApiError", "__decorateClass", "injectable", "__decorateParam", "inject", "managerApiTypes"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{Left as n,Right as r}from"purify-ts";import{getOsVersionCommandResponseMockBuilder as p}from"../../../api/command/os/__mocks__/GetOsVersionCommand";import{DeviceModelId as c}from"../../../api/device/DeviceModel";import{BTC_APP as s,BTC_APP_METADATA as o,ETH_APP as l,ETH_APP_METADATA as h}from"../../../api/device-action/__test-utils__/data";import{AxiosManagerApiDataSource as m}from"../../manager-api/data/AxiosManagerApiDataSource";import{HttpFetchApiError as d}from"../../manager-api/model/Errors";import{DefaultManagerApiService as u}from"./DefaultManagerApiService";vi.mock("@internal/manager-api/data/AxiosManagerApiDataSource");let a,t;describe("ManagerApiService",()=>{beforeEach(()=>{a=new m({}),t=new u(a)}),describe("getAppList",()=>{it("should call api with the correct parameters",()=>{const e=p(c.STAX);t.getAppList(e),expect(a.getAppList).toHaveBeenCalledWith({targetId:"857735172",firmwareVersionName:"1.3.0"})})}),describe("getAppsByHash",()=>{describe("success cases",()=>{it("with no apps, should return an empty list",async()=>{a.getAppsByHash.mockResolvedValue(r([])),expect(await t.getAppsByHash([])).toEqual(r([]))}),it("with one app, should return the metadata",async()=>{a.getAppsByHash.mockResolvedValue(r([o])),expect(await t.getAppsByHash([s.appFullHash])).toEqual(r([o]))}),it("with two app, should return the metadata of both apps",async()=>{a.getAppsByHash.mockResolvedValue(r([o,h])),expect(await t.getAppsByHash([s,l].map(e=>e.appFullHash))).toEqual(r([o,h]))}),it("with one app and one without `appFullHash`, should return the metadata of the correct app",async()=>{a.getAppsByHash.mockResolvedValue(r([o]));const e={...l,appFullHash:""};expect(await t.getAppsByHash([s,e].map(i=>i.appFullHash))).toEqual(r([o]))})}),describe("error cases",()=>{it("should return an error when the data source fails with a known error",async()=>{const e=new d(new Error("Failed to fetch data"));a.getAppsByHash.mockRejectedValue(e),expect(await t.getAppsByHash([s.appFullHash])).toEqual(n(e))}),it("should return an error when the data source fails with an unknown error",async()=>{const e=new Error("unkown error");a.getAppsByHash.mockRejectedValue(e),expect(await t.getAppsByHash([s.appFullHash])).toEqual(n(new d(e)))})})}),describe("getDeviceVersion",()=>{it("should call api with the correct parameters",()=>{const e=p(c.STAX);t.getDeviceVersion(e),expect(a.getDeviceVersion).toHaveBeenCalledWith({targetId:"857735172"})})}),describe("getFirmwareVersion",()=>{it("should call api with the correct parameters",()=>{const e={id:17,target_id:"857735172"},i=p(c.STAX);t.getFirmwareVersion(i,e),expect(a.getFirmwareVersion).toHaveBeenCalledWith({deviceId:17,version:"1.3.0"})})})});
1
+ import{Left as n,Right as i}from"purify-ts";import{getOsVersionCommandResponseMockBuilder as c}from"../../../api/command/os/__mocks__/GetOsVersionCommand";import{DeviceModelId as p}from"../../../api/device/DeviceModel";import{BTC_APP as s,BTC_APP_METADATA as o,ETH_APP as l,ETH_APP_METADATA as d}from"../../../api/device-action/__test-utils__/data";import{AxiosManagerApiDataSource as m}from"../../manager-api/data/AxiosManagerApiDataSource";import{HttpFetchApiError as h}from"../../manager-api/model/Errors";import{DefaultManagerApiService as u}from"./DefaultManagerApiService";vi.mock("@internal/manager-api/data/AxiosManagerApiDataSource");let t,a;describe("ManagerApiService",()=>{beforeEach(()=>{t=new m({}),a=new u(t)}),describe("getAppList",()=>{it("should call api with the correct parameters",()=>{const e=c(p.STAX);a.getAppList(e),expect(t.getAppList).toHaveBeenCalledWith({targetId:"857735172",firmwareVersionName:"1.3.0"})})}),describe("getAppsByHash",()=>{describe("success cases",()=>{it("with no apps, should return an empty list",async()=>{t.getAppsByHash.mockResolvedValue(i([])),expect(await a.getAppsByHash([])).toEqual(i([]))}),it("with one app, should return the metadata",async()=>{t.getAppsByHash.mockResolvedValue(i([o])),expect(await a.getAppsByHash([s.appFullHash])).toEqual(i([o]))}),it("with two app, should return the metadata of both apps",async()=>{t.getAppsByHash.mockResolvedValue(i([o,d])),expect(await a.getAppsByHash([s,l].map(e=>e.appFullHash))).toEqual(i([o,d]))}),it("with one app and one without `appFullHash`, should return the metadata of the correct app",async()=>{t.getAppsByHash.mockResolvedValue(i([o]));const e={...l,appFullHash:""};expect(await a.getAppsByHash([s,e].map(r=>r.appFullHash))).toEqual(i([o]))})}),describe("error cases",()=>{it("should return an error when the data source fails with a known error",async()=>{const e=new h(new Error("Failed to fetch data"));t.getAppsByHash.mockRejectedValue(e),expect(await a.getAppsByHash([s.appFullHash])).toEqual(n(e))}),it("should return an error when the data source fails with an unknown error",async()=>{const e=new Error("unkown error");t.getAppsByHash.mockRejectedValue(e),expect(await a.getAppsByHash([s.appFullHash])).toEqual(n(new h(e)))})})}),describe("getDeviceVersion",()=>{it("should call api with the correct parameters",()=>{const e=c(p.STAX);a.getDeviceVersion(e),expect(t.getDeviceVersion).toHaveBeenCalledWith({targetId:"857735172"})})}),describe("getFirmwareVersion",()=>{it("should call api with the correct parameters",()=>{const e={id:17,target_id:"857735172"},r=c(p.STAX);a.getFirmwareVersion(r,e),expect(t.getFirmwareVersion).toHaveBeenCalledWith({deviceId:17,version:"1.3.0"})})}),describe("getOsuFirmwareVersion",()=>{it("should call api with the correct parameters",()=>{const e={id:17,target_id:"857735172"},r=c(p.STAX);a.getOsuFirmwareVersion(r,e),expect(t.getOsuFirmwareVersion).toHaveBeenCalledWith({deviceId:17,version:"1.3.0"})})}),describe("getLatestFirmwareVersion",()=>{it("should call api with the correct parameters",()=>{const e={id:17,target_id:"857735172"},r={id:159};a.getLatestFirmwareVersion(r,e),expect(t.getLatestFirmwareVersion).toHaveBeenCalledWith({currentFinalFirmwareId:159,deviceId:17})})}),describe("getNextFirmwareVersion",()=>{it("should call api with the correct parameters",()=>{const e={nextFinalFirmware:159};a.getNextFirmwareVersion(e),expect(t.getFirmwareVersionById).toHaveBeenCalledWith(159)})}),describe("getLanguagePackages",()=>{it("should call api with the correct parameters",()=>{const e={id:17,target_id:"857735172"},r={id:159};a.getLanguagePackages(e,r),expect(t.getLanguagePackages).toHaveBeenCalledWith({deviceId:17,currentFinalFirmwareId:159})})}),describe("getMcuList",()=>{it("should call api with the correct parameters",()=>{a.getMcuList(),expect(t.getMcuList).toHaveBeenCalled()})})});
2
2
  //# sourceMappingURL=DefaultManagerApiService.test.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/internal/manager-api/service/DefaultManagerApiService.test.ts"],
4
- "sourcesContent": ["import { Left, Right } from \"purify-ts\";\nimport { type Mocked } from \"vitest\";\n\nimport { getOsVersionCommandResponseMockBuilder } from \"@api/command/os/__mocks__/GetOsVersionCommand\";\nimport { DeviceModelId } from \"@api/device/DeviceModel\";\nimport {\n BTC_APP,\n BTC_APP_METADATA,\n ETH_APP,\n ETH_APP_METADATA,\n} from \"@api/device-action/__test-utils__/data\";\nimport { type DmkConfig } from \"@api/DmkConfig\";\nimport { AxiosManagerApiDataSource } from \"@internal/manager-api/data/AxiosManagerApiDataSource\";\nimport { HttpFetchApiError } from \"@internal/manager-api/model/Errors\";\n\nimport { DefaultManagerApiService } from \"./DefaultManagerApiService\";\nimport { type ManagerApiService } from \"./ManagerApiService\";\n\nvi.mock(\"@internal/manager-api/data/AxiosManagerApiDataSource\");\nlet dataSource: Mocked<AxiosManagerApiDataSource>;\nlet service: ManagerApiService;\ndescribe(\"ManagerApiService\", () => {\n beforeEach(() => {\n dataSource = new AxiosManagerApiDataSource(\n {} as DmkConfig,\n ) as Mocked<AxiosManagerApiDataSource>;\n service = new DefaultManagerApiService(dataSource);\n });\n\n describe(\"getAppList\", () => {\n it(\"should call api with the correct parameters\", () => {\n // given\n const deviceInfo = getOsVersionCommandResponseMockBuilder(\n DeviceModelId.STAX,\n );\n // when\n service.getAppList(deviceInfo);\n // then\n expect(dataSource.getAppList).toHaveBeenCalledWith({\n targetId: \"857735172\",\n firmwareVersionName: \"1.3.0\",\n });\n });\n });\n\n describe(\"getAppsByHash\", () => {\n describe(\"success cases\", () => {\n it(\"with no apps, should return an empty list\", async () => {\n dataSource.getAppsByHash.mockResolvedValue(Right([]));\n expect(await service.getAppsByHash([])).toEqual(Right([]));\n });\n\n it(\"with one app, should return the metadata\", async () => {\n dataSource.getAppsByHash.mockResolvedValue(Right([BTC_APP_METADATA]));\n expect(await service.getAppsByHash([BTC_APP.appFullHash])).toEqual(\n Right([BTC_APP_METADATA]),\n );\n });\n\n it(\"with two app, should return the metadata of both apps\", async () => {\n dataSource.getAppsByHash.mockResolvedValue(\n Right([BTC_APP_METADATA, ETH_APP_METADATA]),\n );\n expect(\n await service.getAppsByHash(\n [BTC_APP, ETH_APP].map((app) => app.appFullHash),\n ),\n ).toEqual(Right([BTC_APP_METADATA, ETH_APP_METADATA]));\n });\n\n it(\"with one app and one without `appFullHash`, should return the metadata of the correct app\", async () => {\n dataSource.getAppsByHash.mockResolvedValue(Right([BTC_APP_METADATA]));\n const APP_WITH_NO_HASH = { ...ETH_APP, appFullHash: \"\" };\n expect(\n await service.getAppsByHash(\n [BTC_APP, APP_WITH_NO_HASH].map((app) => app.appFullHash),\n ),\n ).toEqual(Right([BTC_APP_METADATA]));\n });\n });\n\n describe(\"error cases\", () => {\n it(\"should return an error when the data source fails with a known error\", async () => {\n const error = new HttpFetchApiError(new Error(\"Failed to fetch data\"));\n dataSource.getAppsByHash.mockRejectedValue(error);\n expect(await service.getAppsByHash([BTC_APP.appFullHash])).toEqual(\n Left(error),\n );\n });\n\n it(\"should return an error when the data source fails with an unknown error\", async () => {\n const error = new Error(\"unkown error\");\n dataSource.getAppsByHash.mockRejectedValue(error);\n expect(await service.getAppsByHash([BTC_APP.appFullHash])).toEqual(\n Left(new HttpFetchApiError(error)),\n );\n });\n });\n });\n\n describe(\"getDeviceVersion\", () => {\n it(\"should call api with the correct parameters\", () => {\n // given\n const deviceInfo = getOsVersionCommandResponseMockBuilder(\n DeviceModelId.STAX,\n );\n // when\n service.getDeviceVersion(deviceInfo);\n // then\n expect(dataSource.getDeviceVersion).toHaveBeenCalledWith({\n targetId: \"857735172\",\n });\n });\n });\n describe(\"getFirmwareVersion\", () => {\n it(\"should call api with the correct parameters\", () => {\n // given\n const mockGetDeviceVersion = {\n id: 17,\n target_id: \"857735172\",\n };\n const deviceInfo = getOsVersionCommandResponseMockBuilder(\n DeviceModelId.STAX,\n );\n // when\n service.getFirmwareVersion(deviceInfo, mockGetDeviceVersion);\n // then\n expect(dataSource.getFirmwareVersion).toHaveBeenCalledWith({\n deviceId: 17,\n version: \"1.3.0\",\n });\n });\n });\n});\n"],
5
- "mappings": "AAAA,OAAS,QAAAA,EAAM,SAAAC,MAAa,YAG5B,OAAS,0CAAAC,MAA8C,gDACvD,OAAS,iBAAAC,MAAqB,0BAC9B,OACE,WAAAC,EACA,oBAAAC,EACA,WAAAC,EACA,oBAAAC,MACK,yCAEP,OAAS,6BAAAC,MAAiC,uDAC1C,OAAS,qBAAAC,MAAyB,qCAElC,OAAS,4BAAAC,MAAgC,6BAGzC,GAAG,KAAK,sDAAsD,EAC9D,IAAIC,EACAC,EACJ,SAAS,oBAAqB,IAAM,CAClC,WAAW,IAAM,CACfD,EAAa,IAAIH,EACf,CAAC,CACH,EACAI,EAAU,IAAIF,EAAyBC,CAAU,CACnD,CAAC,EAED,SAAS,aAAc,IAAM,CAC3B,GAAG,8CAA+C,IAAM,CAEtD,MAAME,EAAaX,EACjBC,EAAc,IAChB,EAEAS,EAAQ,WAAWC,CAAU,EAE7B,OAAOF,EAAW,UAAU,EAAE,qBAAqB,CACjD,SAAU,YACV,oBAAqB,OACvB,CAAC,CACH,CAAC,CACH,CAAC,EAED,SAAS,gBAAiB,IAAM,CAC9B,SAAS,gBAAiB,IAAM,CAC9B,GAAG,4CAA6C,SAAY,CAC1DA,EAAW,cAAc,kBAAkBV,EAAM,CAAC,CAAC,CAAC,EACpD,OAAO,MAAMW,EAAQ,cAAc,CAAC,CAAC,CAAC,EAAE,QAAQX,EAAM,CAAC,CAAC,CAAC,CAC3D,CAAC,EAED,GAAG,2CAA4C,SAAY,CACzDU,EAAW,cAAc,kBAAkBV,EAAM,CAACI,CAAgB,CAAC,CAAC,EACpE,OAAO,MAAMO,EAAQ,cAAc,CAACR,EAAQ,WAAW,CAAC,CAAC,EAAE,QACzDH,EAAM,CAACI,CAAgB,CAAC,CAC1B,CACF,CAAC,EAED,GAAG,wDAAyD,SAAY,CACtEM,EAAW,cAAc,kBACvBV,EAAM,CAACI,EAAkBE,CAAgB,CAAC,CAC5C,EACA,OACE,MAAMK,EAAQ,cACZ,CAACR,EAASE,CAAO,EAAE,IAAKQ,GAAQA,EAAI,WAAW,CACjD,CACF,EAAE,QAAQb,EAAM,CAACI,EAAkBE,CAAgB,CAAC,CAAC,CACvD,CAAC,EAED,GAAG,4FAA6F,SAAY,CAC1GI,EAAW,cAAc,kBAAkBV,EAAM,CAACI,CAAgB,CAAC,CAAC,EACpE,MAAMU,EAAmB,CAAE,GAAGT,EAAS,YAAa,EAAG,EACvD,OACE,MAAMM,EAAQ,cACZ,CAACR,EAASW,CAAgB,EAAE,IAAKD,GAAQA,EAAI,WAAW,CAC1D,CACF,EAAE,QAAQb,EAAM,CAACI,CAAgB,CAAC,CAAC,CACrC,CAAC,CACH,CAAC,EAED,SAAS,cAAe,IAAM,CAC5B,GAAG,uEAAwE,SAAY,CACrF,MAAMW,EAAQ,IAAIP,EAAkB,IAAI,MAAM,sBAAsB,CAAC,EACrEE,EAAW,cAAc,kBAAkBK,CAAK,EAChD,OAAO,MAAMJ,EAAQ,cAAc,CAACR,EAAQ,WAAW,CAAC,CAAC,EAAE,QACzDJ,EAAKgB,CAAK,CACZ,CACF,CAAC,EAED,GAAG,0EAA2E,SAAY,CACxF,MAAMA,EAAQ,IAAI,MAAM,cAAc,EACtCL,EAAW,cAAc,kBAAkBK,CAAK,EAChD,OAAO,MAAMJ,EAAQ,cAAc,CAACR,EAAQ,WAAW,CAAC,CAAC,EAAE,QACzDJ,EAAK,IAAIS,EAAkBO,CAAK,CAAC,CACnC,CACF,CAAC,CACH,CAAC,CACH,CAAC,EAED,SAAS,mBAAoB,IAAM,CACjC,GAAG,8CAA+C,IAAM,CAEtD,MAAMH,EAAaX,EACjBC,EAAc,IAChB,EAEAS,EAAQ,iBAAiBC,CAAU,EAEnC,OAAOF,EAAW,gBAAgB,EAAE,qBAAqB,CACvD,SAAU,WACZ,CAAC,CACH,CAAC,CACH,CAAC,EACD,SAAS,qBAAsB,IAAM,CACnC,GAAG,8CAA+C,IAAM,CAEtD,MAAMM,EAAuB,CAC3B,GAAI,GACJ,UAAW,WACb,EACMJ,EAAaX,EACjBC,EAAc,IAChB,EAEAS,EAAQ,mBAAmBC,EAAYI,CAAoB,EAE3D,OAAON,EAAW,kBAAkB,EAAE,qBAAqB,CACzD,SAAU,GACV,QAAS,OACX,CAAC,CACH,CAAC,CACH,CAAC,CACH,CAAC",
6
- "names": ["Left", "Right", "getOsVersionCommandResponseMockBuilder", "DeviceModelId", "BTC_APP", "BTC_APP_METADATA", "ETH_APP", "ETH_APP_METADATA", "AxiosManagerApiDataSource", "HttpFetchApiError", "DefaultManagerApiService", "dataSource", "service", "deviceInfo", "app", "APP_WITH_NO_HASH", "error", "mockGetDeviceVersion"]
4
+ "sourcesContent": ["import { Left, Right } from \"purify-ts\";\nimport { type Mocked } from \"vitest\";\n\nimport { getOsVersionCommandResponseMockBuilder } from \"@api/command/os/__mocks__/GetOsVersionCommand\";\nimport { DeviceModelId } from \"@api/device/DeviceModel\";\nimport {\n BTC_APP,\n BTC_APP_METADATA,\n ETH_APP,\n ETH_APP_METADATA,\n} from \"@api/device-action/__test-utils__/data\";\nimport { type DmkConfig } from \"@api/DmkConfig\";\nimport { AxiosManagerApiDataSource } from \"@internal/manager-api/data/AxiosManagerApiDataSource\";\nimport { HttpFetchApiError } from \"@internal/manager-api/model/Errors\";\nimport {\n type FinalFirmware,\n type OsuFirmware,\n} from \"@internal/manager-api/model/Firmware\";\n\nimport { DefaultManagerApiService } from \"./DefaultManagerApiService\";\nimport { type ManagerApiService } from \"./ManagerApiService\";\n\nvi.mock(\"@internal/manager-api/data/AxiosManagerApiDataSource\");\nlet dataSource: Mocked<AxiosManagerApiDataSource>;\nlet service: ManagerApiService;\ndescribe(\"ManagerApiService\", () => {\n beforeEach(() => {\n dataSource = new AxiosManagerApiDataSource(\n {} as DmkConfig,\n ) as Mocked<AxiosManagerApiDataSource>;\n service = new DefaultManagerApiService(dataSource);\n });\n\n describe(\"getAppList\", () => {\n it(\"should call api with the correct parameters\", () => {\n // given\n const deviceInfo = getOsVersionCommandResponseMockBuilder(\n DeviceModelId.STAX,\n );\n // when\n service.getAppList(deviceInfo);\n // then\n expect(dataSource.getAppList).toHaveBeenCalledWith({\n targetId: \"857735172\",\n firmwareVersionName: \"1.3.0\",\n });\n });\n });\n\n describe(\"getAppsByHash\", () => {\n describe(\"success cases\", () => {\n it(\"with no apps, should return an empty list\", async () => {\n dataSource.getAppsByHash.mockResolvedValue(Right([]));\n expect(await service.getAppsByHash([])).toEqual(Right([]));\n });\n\n it(\"with one app, should return the metadata\", async () => {\n dataSource.getAppsByHash.mockResolvedValue(Right([BTC_APP_METADATA]));\n expect(await service.getAppsByHash([BTC_APP.appFullHash])).toEqual(\n Right([BTC_APP_METADATA]),\n );\n });\n\n it(\"with two app, should return the metadata of both apps\", async () => {\n dataSource.getAppsByHash.mockResolvedValue(\n Right([BTC_APP_METADATA, ETH_APP_METADATA]),\n );\n expect(\n await service.getAppsByHash(\n [BTC_APP, ETH_APP].map((app) => app.appFullHash),\n ),\n ).toEqual(Right([BTC_APP_METADATA, ETH_APP_METADATA]));\n });\n\n it(\"with one app and one without `appFullHash`, should return the metadata of the correct app\", async () => {\n dataSource.getAppsByHash.mockResolvedValue(Right([BTC_APP_METADATA]));\n const APP_WITH_NO_HASH = { ...ETH_APP, appFullHash: \"\" };\n expect(\n await service.getAppsByHash(\n [BTC_APP, APP_WITH_NO_HASH].map((app) => app.appFullHash),\n ),\n ).toEqual(Right([BTC_APP_METADATA]));\n });\n });\n\n describe(\"error cases\", () => {\n it(\"should return an error when the data source fails with a known error\", async () => {\n const error = new HttpFetchApiError(new Error(\"Failed to fetch data\"));\n dataSource.getAppsByHash.mockRejectedValue(error);\n expect(await service.getAppsByHash([BTC_APP.appFullHash])).toEqual(\n Left(error),\n );\n });\n\n it(\"should return an error when the data source fails with an unknown error\", async () => {\n const error = new Error(\"unkown error\");\n dataSource.getAppsByHash.mockRejectedValue(error);\n expect(await service.getAppsByHash([BTC_APP.appFullHash])).toEqual(\n Left(new HttpFetchApiError(error)),\n );\n });\n });\n });\n\n describe(\"getDeviceVersion\", () => {\n it(\"should call api with the correct parameters\", () => {\n // given\n const deviceInfo = getOsVersionCommandResponseMockBuilder(\n DeviceModelId.STAX,\n );\n // when\n service.getDeviceVersion(deviceInfo);\n // then\n expect(dataSource.getDeviceVersion).toHaveBeenCalledWith({\n targetId: \"857735172\",\n });\n });\n });\n\n describe(\"getFirmwareVersion\", () => {\n it(\"should call api with the correct parameters\", () => {\n // given\n const mockGetDeviceVersion = {\n id: 17,\n target_id: \"857735172\",\n };\n const deviceInfo = getOsVersionCommandResponseMockBuilder(\n DeviceModelId.STAX,\n );\n // when\n service.getFirmwareVersion(deviceInfo, mockGetDeviceVersion);\n // then\n expect(dataSource.getFirmwareVersion).toHaveBeenCalledWith({\n deviceId: 17,\n version: \"1.3.0\",\n });\n });\n });\n\n describe(\"getOsuFirmwareVersion\", () => {\n it(\"should call api with the correct parameters\", () => {\n // given\n const mockGetDeviceVersion = {\n id: 17,\n target_id: \"857735172\",\n };\n const deviceInfo = getOsVersionCommandResponseMockBuilder(\n DeviceModelId.STAX,\n );\n // when\n service.getOsuFirmwareVersion(deviceInfo, mockGetDeviceVersion);\n // then\n expect(dataSource.getOsuFirmwareVersion).toHaveBeenCalledWith({\n deviceId: 17,\n version: \"1.3.0\",\n });\n });\n });\n\n describe(\"getLatestFirmwareVersion\", () => {\n it(\"should call api with the correct parameters\", () => {\n // given\n const deviceVersion = {\n id: 17,\n target_id: \"857735172\",\n };\n const currentFirmware = {\n id: 159,\n } as FinalFirmware;\n // when\n service.getLatestFirmwareVersion(currentFirmware, deviceVersion);\n // then\n expect(dataSource.getLatestFirmwareVersion).toHaveBeenCalledWith({\n currentFinalFirmwareId: 159,\n deviceId: 17,\n });\n });\n });\n\n describe(\"getNextFirmwareVersion\", () => {\n it(\"should call api with the correct parameters\", () => {\n // given\n const osuFirmware = {\n nextFinalFirmware: 159,\n } as OsuFirmware;\n // when\n service.getNextFirmwareVersion(osuFirmware);\n // then\n expect(dataSource.getFirmwareVersionById).toHaveBeenCalledWith(159);\n });\n });\n\n describe(\"getLanguagePackages\", () => {\n it(\"should call api with the correct parameters\", () => {\n // given\n const deviceVersion = {\n id: 17,\n target_id: \"857735172\",\n };\n const currentFirmware = {\n id: 159,\n } as FinalFirmware;\n // when\n service.getLanguagePackages(deviceVersion, currentFirmware);\n // then\n expect(dataSource.getLanguagePackages).toHaveBeenCalledWith({\n deviceId: 17,\n currentFinalFirmwareId: 159,\n });\n });\n });\n\n describe(\"getMcuList\", () => {\n it(\"should call api with the correct parameters\", () => {\n // when\n service.getMcuList();\n // then\n expect(dataSource.getMcuList).toHaveBeenCalled();\n });\n });\n});\n"],
5
+ "mappings": "AAAA,OAAS,QAAAA,EAAM,SAAAC,MAAa,YAG5B,OAAS,0CAAAC,MAA8C,gDACvD,OAAS,iBAAAC,MAAqB,0BAC9B,OACE,WAAAC,EACA,oBAAAC,EACA,WAAAC,EACA,oBAAAC,MACK,yCAEP,OAAS,6BAAAC,MAAiC,uDAC1C,OAAS,qBAAAC,MAAyB,qCAMlC,OAAS,4BAAAC,MAAgC,6BAGzC,GAAG,KAAK,sDAAsD,EAC9D,IAAIC,EACAC,EACJ,SAAS,oBAAqB,IAAM,CAClC,WAAW,IAAM,CACfD,EAAa,IAAIH,EACf,CAAC,CACH,EACAI,EAAU,IAAIF,EAAyBC,CAAU,CACnD,CAAC,EAED,SAAS,aAAc,IAAM,CAC3B,GAAG,8CAA+C,IAAM,CAEtD,MAAME,EAAaX,EACjBC,EAAc,IAChB,EAEAS,EAAQ,WAAWC,CAAU,EAE7B,OAAOF,EAAW,UAAU,EAAE,qBAAqB,CACjD,SAAU,YACV,oBAAqB,OACvB,CAAC,CACH,CAAC,CACH,CAAC,EAED,SAAS,gBAAiB,IAAM,CAC9B,SAAS,gBAAiB,IAAM,CAC9B,GAAG,4CAA6C,SAAY,CAC1DA,EAAW,cAAc,kBAAkBV,EAAM,CAAC,CAAC,CAAC,EACpD,OAAO,MAAMW,EAAQ,cAAc,CAAC,CAAC,CAAC,EAAE,QAAQX,EAAM,CAAC,CAAC,CAAC,CAC3D,CAAC,EAED,GAAG,2CAA4C,SAAY,CACzDU,EAAW,cAAc,kBAAkBV,EAAM,CAACI,CAAgB,CAAC,CAAC,EACpE,OAAO,MAAMO,EAAQ,cAAc,CAACR,EAAQ,WAAW,CAAC,CAAC,EAAE,QACzDH,EAAM,CAACI,CAAgB,CAAC,CAC1B,CACF,CAAC,EAED,GAAG,wDAAyD,SAAY,CACtEM,EAAW,cAAc,kBACvBV,EAAM,CAACI,EAAkBE,CAAgB,CAAC,CAC5C,EACA,OACE,MAAMK,EAAQ,cACZ,CAACR,EAASE,CAAO,EAAE,IAAKQ,GAAQA,EAAI,WAAW,CACjD,CACF,EAAE,QAAQb,EAAM,CAACI,EAAkBE,CAAgB,CAAC,CAAC,CACvD,CAAC,EAED,GAAG,4FAA6F,SAAY,CAC1GI,EAAW,cAAc,kBAAkBV,EAAM,CAACI,CAAgB,CAAC,CAAC,EACpE,MAAMU,EAAmB,CAAE,GAAGT,EAAS,YAAa,EAAG,EACvD,OACE,MAAMM,EAAQ,cACZ,CAACR,EAASW,CAAgB,EAAE,IAAKD,GAAQA,EAAI,WAAW,CAC1D,CACF,EAAE,QAAQb,EAAM,CAACI,CAAgB,CAAC,CAAC,CACrC,CAAC,CACH,CAAC,EAED,SAAS,cAAe,IAAM,CAC5B,GAAG,uEAAwE,SAAY,CACrF,MAAMW,EAAQ,IAAIP,EAAkB,IAAI,MAAM,sBAAsB,CAAC,EACrEE,EAAW,cAAc,kBAAkBK,CAAK,EAChD,OAAO,MAAMJ,EAAQ,cAAc,CAACR,EAAQ,WAAW,CAAC,CAAC,EAAE,QACzDJ,EAAKgB,CAAK,CACZ,CACF,CAAC,EAED,GAAG,0EAA2E,SAAY,CACxF,MAAMA,EAAQ,IAAI,MAAM,cAAc,EACtCL,EAAW,cAAc,kBAAkBK,CAAK,EAChD,OAAO,MAAMJ,EAAQ,cAAc,CAACR,EAAQ,WAAW,CAAC,CAAC,EAAE,QACzDJ,EAAK,IAAIS,EAAkBO,CAAK,CAAC,CACnC,CACF,CAAC,CACH,CAAC,CACH,CAAC,EAED,SAAS,mBAAoB,IAAM,CACjC,GAAG,8CAA+C,IAAM,CAEtD,MAAMH,EAAaX,EACjBC,EAAc,IAChB,EAEAS,EAAQ,iBAAiBC,CAAU,EAEnC,OAAOF,EAAW,gBAAgB,EAAE,qBAAqB,CACvD,SAAU,WACZ,CAAC,CACH,CAAC,CACH,CAAC,EAED,SAAS,qBAAsB,IAAM,CACnC,GAAG,8CAA+C,IAAM,CAEtD,MAAMM,EAAuB,CAC3B,GAAI,GACJ,UAAW,WACb,EACMJ,EAAaX,EACjBC,EAAc,IAChB,EAEAS,EAAQ,mBAAmBC,EAAYI,CAAoB,EAE3D,OAAON,EAAW,kBAAkB,EAAE,qBAAqB,CACzD,SAAU,GACV,QAAS,OACX,CAAC,CACH,CAAC,CACH,CAAC,EAED,SAAS,wBAAyB,IAAM,CACtC,GAAG,8CAA+C,IAAM,CAEtD,MAAMM,EAAuB,CAC3B,GAAI,GACJ,UAAW,WACb,EACMJ,EAAaX,EACjBC,EAAc,IAChB,EAEAS,EAAQ,sBAAsBC,EAAYI,CAAoB,EAE9D,OAAON,EAAW,qBAAqB,EAAE,qBAAqB,CAC5D,SAAU,GACV,QAAS,OACX,CAAC,CACH,CAAC,CACH,CAAC,EAED,SAAS,2BAA4B,IAAM,CACzC,GAAG,8CAA+C,IAAM,CAEtD,MAAMO,EAAgB,CACpB,GAAI,GACJ,UAAW,WACb,EACMC,EAAkB,CACtB,GAAI,GACN,EAEAP,EAAQ,yBAAyBO,EAAiBD,CAAa,EAE/D,OAAOP,EAAW,wBAAwB,EAAE,qBAAqB,CAC/D,uBAAwB,IACxB,SAAU,EACZ,CAAC,CACH,CAAC,CACH,CAAC,EAED,SAAS,yBAA0B,IAAM,CACvC,GAAG,8CAA+C,IAAM,CAEtD,MAAMS,EAAc,CAClB,kBAAmB,GACrB,EAEAR,EAAQ,uBAAuBQ,CAAW,EAE1C,OAAOT,EAAW,sBAAsB,EAAE,qBAAqB,GAAG,CACpE,CAAC,CACH,CAAC,EAED,SAAS,sBAAuB,IAAM,CACpC,GAAG,8CAA+C,IAAM,CAEtD,MAAMO,EAAgB,CACpB,GAAI,GACJ,UAAW,WACb,EACMC,EAAkB,CACtB,GAAI,GACN,EAEAP,EAAQ,oBAAoBM,EAAeC,CAAe,EAE1D,OAAOR,EAAW,mBAAmB,EAAE,qBAAqB,CAC1D,SAAU,GACV,uBAAwB,GAC1B,CAAC,CACH,CAAC,CACH,CAAC,EAED,SAAS,aAAc,IAAM,CAC3B,GAAG,8CAA+C,IAAM,CAEtDC,EAAQ,WAAW,EAEnB,OAAOD,EAAW,UAAU,EAAE,iBAAiB,CACjD,CAAC,CACH,CAAC,CACH,CAAC",
6
+ "names": ["Left", "Right", "getOsVersionCommandResponseMockBuilder", "DeviceModelId", "BTC_APP", "BTC_APP_METADATA", "ETH_APP", "ETH_APP_METADATA", "AxiosManagerApiDataSource", "HttpFetchApiError", "DefaultManagerApiService", "dataSource", "service", "deviceInfo", "app", "APP_WITH_NO_HASH", "error", "mockGetDeviceVersion", "deviceVersion", "currentFirmware", "osuFirmware"]
7
7
  }
@@ -1,2 +1,2 @@
1
- var u=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var n=(e,a,o,t)=>{for(var r=t>1?void 0:t?g(a,o):a,c=e.length-1,i;c>=0;c--)(i=e[c])&&(r=(t?i(a,o,r):i(r))||r);return t&&r&&u(a,o,r),r},m=(e,a)=>(o,t)=>a(o,t,e);import{inject as A,injectable as D}from"inversify";import{managerApiTypes as f}from"../../manager-api/di/managerApiTypes";let p=class{constructor(a){this.managerApiDataSource=a}execute(a){this.managerApiDataSource.setProvider(a)}};p=n([D(),m(0,A(f.ManagerApiDataSource))],p);export{p as SetProviderUseCase};
1
+ var m=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var p=(o,e,i,s)=>{for(var t=s>1?void 0:s?v(e,i):e,a=o.length-1,r;a>=0;a--)(r=o[a])&&(t=(s?r(e,i,t):r(t))||t);return s&&t&&m(e,i,t),t},c=(o,e)=>(i,s)=>e(i,s,o);import{inject as S,injectable as f}from"inversify";import{DeviceSessionStateType as D}from"../../../api/device-session/DeviceSessionState";import{deviceSessionTypes as d}from"../../device-session/di/deviceSessionTypes";import{managerApiTypes as u}from"../../manager-api/di/managerApiTypes";let n=class{constructor(e,i){this.sessionService=e;this.managerApiDataSource=i}execute(e){for(const i of this.sessionService.getDeviceSessions()){const s=i.getDeviceSessionState();s.sessionStateType!==D.Connected&&i.setDeviceSessionState({...s,firmwareUpdateContext:void 0,installedApps:[],appsUpdates:void 0,catalog:void 0})}this.managerApiDataSource.setProvider(e)}};n=p([f(),c(0,S(d.DeviceSessionService)),c(1,S(u.ManagerApiDataSource))],n);export{n as SetProviderUseCase};
2
2
  //# sourceMappingURL=SetProviderUseCase.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/internal/manager-api/use-case/SetProviderUseCase.ts"],
4
- "sourcesContent": ["import { inject, injectable } from \"inversify\";\n\nimport { type ManagerApiDataSource } from \"@internal/manager-api/data/ManagerApiDataSource\";\nimport { managerApiTypes } from \"@internal/manager-api/di/managerApiTypes\";\n\n/**\n * Use case to set the provider for the Manager API, this is used to set the\n * provider for the Manager API data source at runtime.\n */\n@injectable()\nexport class SetProviderUseCase {\n constructor(\n @inject(managerApiTypes.ManagerApiDataSource)\n private readonly managerApiDataSource: ManagerApiDataSource,\n ) {}\n\n execute(provider: number) {\n this.managerApiDataSource.setProvider(provider);\n }\n}\n"],
5
- "mappings": "iOAAA,OAAS,UAAAA,EAAQ,cAAAC,MAAkB,YAGnC,OAAS,mBAAAC,MAAuB,2CAOzB,IAAMC,EAAN,KAAyB,CAC9B,YAEmBC,EACjB,CADiB,0BAAAA,CAChB,CAEH,QAAQC,EAAkB,CACxB,KAAK,qBAAqB,YAAYA,CAAQ,CAChD,CACF,EATaF,EAANG,EAAA,CADNC,EAAW,EAGPC,EAAA,EAAAC,EAAOC,EAAgB,oBAAoB,IAFnCP",
6
- "names": ["inject", "injectable", "managerApiTypes", "SetProviderUseCase", "managerApiDataSource", "provider", "__decorateClass", "injectable", "__decorateParam", "inject", "managerApiTypes"]
4
+ "sourcesContent": ["import { inject, injectable } from \"inversify\";\n\nimport { DeviceSessionStateType } from \"@api/device-session/DeviceSessionState\";\nimport { deviceSessionTypes } from \"@internal/device-session/di/deviceSessionTypes\";\nimport type { DeviceSessionService } from \"@internal/device-session/service/DeviceSessionService\";\nimport { type ManagerApiDataSource } from \"@internal/manager-api/data/ManagerApiDataSource\";\nimport { managerApiTypes } from \"@internal/manager-api/di/managerApiTypes\";\n\n/**\n * Use case to set the provider for the Manager API, this is used to set the\n * provider for the Manager API data source at runtime.\n */\n@injectable()\nexport class SetProviderUseCase {\n constructor(\n @inject(deviceSessionTypes.DeviceSessionService)\n private readonly sessionService: DeviceSessionService,\n @inject(managerApiTypes.ManagerApiDataSource)\n private readonly managerApiDataSource: ManagerApiDataSource,\n ) {}\n\n execute(provider: number) {\n // Invalidate device session state fields that are dependent on the provider\n for (const session of this.sessionService.getDeviceSessions()) {\n const state = session.getDeviceSessionState();\n if (state.sessionStateType !== DeviceSessionStateType.Connected) {\n session.setDeviceSessionState({\n ...state,\n firmwareUpdateContext: undefined,\n installedApps: [],\n appsUpdates: undefined,\n catalog: undefined,\n });\n }\n }\n\n // Update the provider in the manager API\n this.managerApiDataSource.setProvider(provider);\n }\n}\n"],
5
+ "mappings": "iOAAA,OAAS,UAAAA,EAAQ,cAAAC,MAAkB,YAEnC,OAAS,0BAAAC,MAA8B,yCACvC,OAAS,sBAAAC,MAA0B,iDAGnC,OAAS,mBAAAC,MAAuB,2CAOzB,IAAMC,EAAN,KAAyB,CAC9B,YAEmBC,EAEAC,EACjB,CAHiB,oBAAAD,EAEA,0BAAAC,CAChB,CAEH,QAAQC,EAAkB,CAExB,UAAWC,KAAW,KAAK,eAAe,kBAAkB,EAAG,CAC7D,MAAMC,EAAQD,EAAQ,sBAAsB,EACxCC,EAAM,mBAAqBC,EAAuB,WACpDF,EAAQ,sBAAsB,CAC5B,GAAGC,EACH,sBAAuB,OACvB,cAAe,CAAC,EAChB,YAAa,OACb,QAAS,MACX,CAAC,CAEL,CAGA,KAAK,qBAAqB,YAAYF,CAAQ,CAChD,CACF,EA1BaH,EAANO,EAAA,CADNC,EAAW,EAGPC,EAAA,EAAAC,EAAOC,EAAmB,oBAAoB,GAE9CF,EAAA,EAAAC,EAAOE,EAAgB,oBAAoB,IAJnCZ",
6
+ "names": ["inject", "injectable", "DeviceSessionStateType", "deviceSessionTypes", "managerApiTypes", "SetProviderUseCase", "sessionService", "managerApiDataSource", "provider", "session", "state", "DeviceSessionStateType", "__decorateClass", "injectable", "__decorateParam", "inject", "deviceSessionTypes", "managerApiTypes"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{describe as o,expect as t,it as i,vi as s}from"vitest";import{SetProviderUseCase as c}from"./SetProviderUseCase";o("SetProviderUseCase",()=>{i("should call setProvider on ManagerApiDataSource with the correct provider",()=>{const e={setProvider:s.fn()},a=new c(e),r=123;a.execute(r),t(e.setProvider).toHaveBeenCalledWith(r)})});
1
+ import{describe as u,expect as a,it as d,vi as e}from"vitest";import{DeviceStatus as r}from"../../../api/device/DeviceStatus";import{DeviceSessionStateType as c}from"../../../api/device-session/DeviceSessionState";import{SetProviderUseCase as v}from"./SetProviderUseCase";u("SetProviderUseCase",()=>{const o=e.fn(),n=e.fn(),p=e.fn(),S={addDeviceSession:e.fn(),getDeviceSessionById:e.fn(),getDeviceSessionByDeviceId:e.fn(),removeDeviceSession:e.fn(),getDeviceSessions:p,sessionsObs:e.fn()},s={setProvider:e.fn()};beforeEach(()=>{e.clearAllMocks(),p.mockReturnValue([{getDeviceSessionState:o,setDeviceSessionState:n}])}),d("should call setProvider on ManagerApiDataSource with the correct provider",()=>{const i=new v(S,s),t=123;o.mockReturnValue({sessionStateType:c.Connected,deviceStatus:r.CONNECTED}),i.execute(t),a(s.setProvider).toHaveBeenCalledWith(t),a(n).not.toHaveBeenCalled()}),d("should clean the device session",()=>{const i=new v(S,s),t=123;o.mockReturnValue({sessionStateType:c.ReadyWithoutSecureChannel,deviceStatus:r.CONNECTED,firmwareVersion:"firmwareVersion",firmwareUpdateContext:"firmwareUpdateContext",installedApps:"apps",appsUpdates:"appsUpdate",catalog:"catalog"}),i.execute(t),a(s.setProvider).toHaveBeenCalledWith(t),a(n).toHaveBeenCalledWith({sessionStateType:c.ReadyWithoutSecureChannel,deviceStatus:r.CONNECTED,firmwareVersion:"firmwareVersion",firmwareUpdateContext:void 0,installedApps:[],appsUpdates:void 0,catalog:void 0})})});
2
2
  //# sourceMappingURL=SetProviderUseCase.test.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/internal/manager-api/use-case/SetProviderUseCase.test.ts"],
4
- "sourcesContent": ["import { describe, expect, it, vi } from \"vitest\";\n\nimport { type ManagerApiDataSource } from \"@internal/manager-api/data/ManagerApiDataSource\";\n\nimport { SetProviderUseCase } from \"./SetProviderUseCase\";\n\ndescribe(\"SetProviderUseCase\", () => {\n it(\"should call setProvider on ManagerApiDataSource with the correct provider\", () => {\n const mockManagerApiDataSource: ManagerApiDataSource = {\n setProvider: vi.fn(),\n } as unknown as ManagerApiDataSource;\n const useCase = new SetProviderUseCase(mockManagerApiDataSource);\n const provider = 123;\n useCase.execute(provider);\n expect(mockManagerApiDataSource.setProvider).toHaveBeenCalledWith(provider);\n });\n});\n"],
5
- "mappings": "AAAA,OAAS,YAAAA,EAAU,UAAAC,EAAQ,MAAAC,EAAI,MAAAC,MAAU,SAIzC,OAAS,sBAAAC,MAA0B,uBAEnCJ,EAAS,qBAAsB,IAAM,CACnCE,EAAG,4EAA6E,IAAM,CACpF,MAAMG,EAAiD,CACrD,YAAaF,EAAG,GAAG,CACrB,EACMG,EAAU,IAAIF,EAAmBC,CAAwB,EACzDE,EAAW,IACjBD,EAAQ,QAAQC,CAAQ,EACxBN,EAAOI,EAAyB,WAAW,EAAE,qBAAqBE,CAAQ,CAC5E,CAAC,CACH,CAAC",
6
- "names": ["describe", "expect", "it", "vi", "SetProviderUseCase", "mockManagerApiDataSource", "useCase", "provider"]
4
+ "sourcesContent": ["import { describe, expect, it, vi } from \"vitest\";\n\nimport { DeviceStatus } from \"@api/device/DeviceStatus\";\nimport {\n type Catalog,\n type DeviceSessionState,\n type FirmwareUpdateContext,\n type FirmwareVersion,\n} from \"@api/device-session/DeviceSessionState\";\nimport { DeviceSessionStateType } from \"@api/device-session/DeviceSessionState\";\nimport { type DeviceSession } from \"@internal/device-session/model/DeviceSession\";\nimport { type DeviceSessionService } from \"@internal/device-session/service/DeviceSessionService\";\nimport { type ManagerApiDataSource } from \"@internal/manager-api/data/ManagerApiDataSource\";\nimport { type Application } from \"@internal/manager-api/model/Application\";\n\nimport { SetProviderUseCase } from \"./SetProviderUseCase\";\n\ndescribe(\"SetProviderUseCase\", () => {\n const getDeviceSessionStateMock = vi.fn();\n const setDeviceSessionStateMock = vi.fn();\n const getDeviceSessionsMock = vi.fn();\n const mockDeviceSession = {\n addDeviceSession: vi.fn(),\n getDeviceSessionById: vi.fn(),\n getDeviceSessionByDeviceId: vi.fn(),\n removeDeviceSession: vi.fn(),\n getDeviceSessions: getDeviceSessionsMock,\n sessionsObs: vi.fn(),\n } as unknown as DeviceSessionService;\n\n const mockManagerApiDataSource: ManagerApiDataSource = {\n setProvider: vi.fn(),\n } as unknown as ManagerApiDataSource;\n\n beforeEach(() => {\n vi.clearAllMocks();\n getDeviceSessionsMock.mockReturnValue([\n {\n getDeviceSessionState: getDeviceSessionStateMock,\n setDeviceSessionState: setDeviceSessionStateMock,\n } as unknown as DeviceSession,\n ]);\n });\n\n it(\"should call setProvider on ManagerApiDataSource with the correct provider\", () => {\n // GIVEN\n const useCase = new SetProviderUseCase(\n mockDeviceSession,\n mockManagerApiDataSource,\n );\n const provider = 123;\n getDeviceSessionStateMock.mockReturnValue({\n sessionStateType: DeviceSessionStateType.Connected,\n deviceStatus: DeviceStatus.CONNECTED,\n } as DeviceSessionState);\n\n // WHEN\n useCase.execute(provider);\n\n // THEN\n expect(mockManagerApiDataSource.setProvider).toHaveBeenCalledWith(provider);\n expect(setDeviceSessionStateMock).not.toHaveBeenCalled();\n });\n\n it(\"should clean the device session\", () => {\n // GIVEN\n const useCase = new SetProviderUseCase(\n mockDeviceSession,\n mockManagerApiDataSource,\n );\n const provider = 123;\n getDeviceSessionStateMock.mockReturnValue({\n sessionStateType: DeviceSessionStateType.ReadyWithoutSecureChannel,\n deviceStatus: DeviceStatus.CONNECTED,\n firmwareVersion: \"firmwareVersion\" as unknown as FirmwareVersion,\n firmwareUpdateContext:\n \"firmwareUpdateContext\" as unknown as FirmwareUpdateContext,\n installedApps: \"apps\" as unknown as Application[],\n appsUpdates: \"appsUpdate\" as unknown as Application[],\n catalog: \"catalog\" as unknown as Catalog,\n } as DeviceSessionState);\n\n // WHEN\n useCase.execute(provider);\n\n // THEN\n expect(mockManagerApiDataSource.setProvider).toHaveBeenCalledWith(provider);\n expect(setDeviceSessionStateMock).toHaveBeenCalledWith({\n sessionStateType: DeviceSessionStateType.ReadyWithoutSecureChannel,\n deviceStatus: DeviceStatus.CONNECTED,\n firmwareVersion: \"firmwareVersion\" as unknown as FirmwareVersion,\n firmwareUpdateContext: undefined,\n installedApps: [],\n appsUpdates: undefined,\n catalog: undefined,\n });\n });\n});\n"],
5
+ "mappings": "AAAA,OAAS,YAAAA,EAAU,UAAAC,EAAQ,MAAAC,EAAI,MAAAC,MAAU,SAEzC,OAAS,gBAAAC,MAAoB,2BAO7B,OAAS,0BAAAC,MAA8B,yCAMvC,OAAS,sBAAAC,MAA0B,uBAEnCN,EAAS,qBAAsB,IAAM,CACnC,MAAMO,EAA4BJ,EAAG,GAAG,EAClCK,EAA4BL,EAAG,GAAG,EAClCM,EAAwBN,EAAG,GAAG,EAC9BO,EAAoB,CACxB,iBAAkBP,EAAG,GAAG,EACxB,qBAAsBA,EAAG,GAAG,EAC5B,2BAA4BA,EAAG,GAAG,EAClC,oBAAqBA,EAAG,GAAG,EAC3B,kBAAmBM,EACnB,YAAaN,EAAG,GAAG,CACrB,EAEMQ,EAAiD,CACrD,YAAaR,EAAG,GAAG,CACrB,EAEA,WAAW,IAAM,CACfA,EAAG,cAAc,EACjBM,EAAsB,gBAAgB,CACpC,CACE,sBAAuBF,EACvB,sBAAuBC,CACzB,CACF,CAAC,CACH,CAAC,EAEDN,EAAG,4EAA6E,IAAM,CAEpF,MAAMU,EAAU,IAAIN,EAClBI,EACAC,CACF,EACME,EAAW,IACjBN,EAA0B,gBAAgB,CACxC,iBAAkBF,EAAuB,UACzC,aAAcD,EAAa,SAC7B,CAAuB,EAGvBQ,EAAQ,QAAQC,CAAQ,EAGxBZ,EAAOU,EAAyB,WAAW,EAAE,qBAAqBE,CAAQ,EAC1EZ,EAAOO,CAAyB,EAAE,IAAI,iBAAiB,CACzD,CAAC,EAEDN,EAAG,kCAAmC,IAAM,CAE1C,MAAMU,EAAU,IAAIN,EAClBI,EACAC,CACF,EACME,EAAW,IACjBN,EAA0B,gBAAgB,CACxC,iBAAkBF,EAAuB,0BACzC,aAAcD,EAAa,UAC3B,gBAAiB,kBACjB,sBACE,wBACF,cAAe,OACf,YAAa,aACb,QAAS,SACX,CAAuB,EAGvBQ,EAAQ,QAAQC,CAAQ,EAGxBZ,EAAOU,EAAyB,WAAW,EAAE,qBAAqBE,CAAQ,EAC1EZ,EAAOO,CAAyB,EAAE,qBAAqB,CACrD,iBAAkBH,EAAuB,0BACzC,aAAcD,EAAa,UAC3B,gBAAiB,kBACjB,sBAAuB,OACvB,cAAe,CAAC,EAChB,YAAa,OACb,QAAS,MACX,CAAC,CACH,CAAC,CACH,CAAC",
6
+ "names": ["describe", "expect", "it", "vi", "DeviceStatus", "DeviceSessionStateType", "SetProviderUseCase", "getDeviceSessionStateMock", "setDeviceSessionStateMock", "getDeviceSessionsMock", "mockDeviceSession", "mockManagerApiDataSource", "useCase", "provider"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{ContainerModule as t}from"inversify";import{DefaultSecureChannelDataSource as a}from"../../secure-channel/data/DefaultSecureChannelDataSource";import{DefaultSecureChannelService as u}from"../../secure-channel/service/DefaultSecureChannelService";import{secureChannelTypes as o}from"./secureChannelTypes";const s=({stub:r,config:n})=>new t((e,c,i,m)=>{e(o.DmkConfig).toConstantValue(n),e(o.SecureChannelDataSource).to(a),e(o.SecureChannelService).to(u)});export{s as secureChannelModuleFactory};
1
+ import{ContainerModule as n}from"inversify";import{DefaultSecureChannelDataSource as a}from"../../secure-channel/data/DefaultSecureChannelDataSource";import{DefaultSecureChannelService as c}from"../../secure-channel/service/DefaultSecureChannelService";import{secureChannelTypes as o}from"./secureChannelTypes";const i=({stub:r,config:t})=>new n(({bind:e})=>{e(o.DmkConfig).toConstantValue(t),e(o.SecureChannelDataSource).to(a),e(o.SecureChannelService).to(c)});export{i as secureChannelModuleFactory};
2
2
  //# sourceMappingURL=secureChannelModule.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/internal/secure-channel/di/secureChannelModule.ts"],
4
- "sourcesContent": ["import { ContainerModule } from \"inversify\";\n\nimport { type DmkConfig } from \"@api/DmkConfig\";\nimport { DefaultSecureChannelDataSource } from \"@internal/secure-channel/data/DefaultSecureChannelDataSource\";\nimport { DefaultSecureChannelService } from \"@internal/secure-channel/service/DefaultSecureChannelService\";\n\nimport { secureChannelTypes } from \"./secureChannelTypes\";\n\ntype FactoryProps = {\n stub?: boolean;\n config: DmkConfig;\n};\n\nexport const secureChannelModuleFactory = ({ stub, config }: FactoryProps) =>\n new ContainerModule((bind, _unbind, _isBound, _rebind) => {\n bind(secureChannelTypes.DmkConfig).toConstantValue(config);\n\n bind(secureChannelTypes.SecureChannelDataSource).to(\n DefaultSecureChannelDataSource,\n );\n bind(secureChannelTypes.SecureChannelService).to(\n DefaultSecureChannelService,\n );\n\n if (stub) {\n /* empty */\n }\n });\n"],
5
- "mappings": "AAAA,OAAS,mBAAAA,MAAuB,YAGhC,OAAS,kCAAAC,MAAsC,+DAC/C,OAAS,+BAAAC,MAAmC,+DAE5C,OAAS,sBAAAC,MAA0B,uBAO5B,MAAMC,EAA6B,CAAC,CAAE,KAAAC,EAAM,OAAAC,CAAO,IACxD,IAAIN,EAAgB,CAACO,EAAMC,EAASC,EAAUC,IAAY,CACxDH,EAAKJ,EAAmB,SAAS,EAAE,gBAAgBG,CAAM,EAEzDC,EAAKJ,EAAmB,uBAAuB,EAAE,GAC/CF,CACF,EACAM,EAAKJ,EAAmB,oBAAoB,EAAE,GAC5CD,CACF,CAKF,CAAC",
6
- "names": ["ContainerModule", "DefaultSecureChannelDataSource", "DefaultSecureChannelService", "secureChannelTypes", "secureChannelModuleFactory", "stub", "config", "bind", "_unbind", "_isBound", "_rebind"]
4
+ "sourcesContent": ["import { ContainerModule } from \"inversify\";\n\nimport { type DmkConfig } from \"@api/DmkConfig\";\nimport { DefaultSecureChannelDataSource } from \"@internal/secure-channel/data/DefaultSecureChannelDataSource\";\nimport { DefaultSecureChannelService } from \"@internal/secure-channel/service/DefaultSecureChannelService\";\n\nimport { secureChannelTypes } from \"./secureChannelTypes\";\n\ntype FactoryProps = {\n stub?: boolean;\n config: DmkConfig;\n};\n\nexport const secureChannelModuleFactory = ({ stub, config }: FactoryProps) =>\n new ContainerModule(({ bind }) => {\n bind(secureChannelTypes.DmkConfig).toConstantValue(config);\n\n bind(secureChannelTypes.SecureChannelDataSource).to(\n DefaultSecureChannelDataSource,\n );\n bind(secureChannelTypes.SecureChannelService).to(\n DefaultSecureChannelService,\n );\n\n if (stub) {\n /* empty */\n }\n });\n"],
5
+ "mappings": "AAAA,OAAS,mBAAAA,MAAuB,YAGhC,OAAS,kCAAAC,MAAsC,+DAC/C,OAAS,+BAAAC,MAAmC,+DAE5C,OAAS,sBAAAC,MAA0B,uBAO5B,MAAMC,EAA6B,CAAC,CAAE,KAAAC,EAAM,OAAAC,CAAO,IACxD,IAAIN,EAAgB,CAAC,CAAE,KAAAO,CAAK,IAAM,CAChCA,EAAKJ,EAAmB,SAAS,EAAE,gBAAgBG,CAAM,EAEzDC,EAAKJ,EAAmB,uBAAuB,EAAE,GAC/CF,CACF,EACAM,EAAKJ,EAAmB,oBAAoB,EAAE,GAC5CD,CACF,CAKF,CAAC",
6
+ "names": ["ContainerModule", "DefaultSecureChannelDataSource", "DefaultSecureChannelService", "secureChannelTypes", "secureChannelModuleFactory", "stub", "config", "bind"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{Container as u}from"inversify";import{DefaultSecureChannelDataSource as l}from"../../secure-channel/data/DefaultSecureChannelDataSource";import{DefaultSecureChannelService as s}from"../../secure-channel/service/DefaultSecureChannelService";import{secureChannelModuleFactory as f}from"./secureChannelModule";import{secureChannelTypes as o}from"./secureChannelTypes";describe("secureChannelModuleFactory default use case",()=>{const n={webSocketUrl:"http://fake-websocket.url"};let e,t;beforeEach(()=>{t=f({stub:!1,config:n}),e=new u,e.load(t)}),it("the secure channel module should be defined",()=>{expect(t).toBeDefined()}),it("should return default use cases instead of stub",()=>{const r=e.get(o.DmkConfig);expect(r).toEqual({webSocketUrl:"http://fake-websocket.url"});const c=e.get(o.SecureChannelDataSource);expect(c).toBeInstanceOf(l);const a=e.get(o.SecureChannelService);expect(a).toBeInstanceOf(s)})});
1
+ import{Container as u}from"inversify";import{DefaultSecureChannelDataSource as l}from"../../secure-channel/data/DefaultSecureChannelDataSource";import{DefaultSecureChannelService as s}from"../../secure-channel/service/DefaultSecureChannelService";import{secureChannelModuleFactory as f}from"./secureChannelModule";import{secureChannelTypes as o}from"./secureChannelTypes";describe("secureChannelModuleFactory default use case",()=>{const n={webSocketUrl:"http://fake-websocket.url"};let e,t;beforeEach(()=>{t=f({stub:!1,config:n}),e=new u,e.loadSync(t)}),it("the secure channel module should be defined",()=>{expect(t).toBeDefined()}),it("should return default use cases instead of stub",()=>{const c=e.get(o.DmkConfig);expect(c).toEqual({webSocketUrl:"http://fake-websocket.url"});const r=e.get(o.SecureChannelDataSource);expect(r).toBeInstanceOf(l);const a=e.get(o.SecureChannelService);expect(a).toBeInstanceOf(s)})});
2
2
  //# sourceMappingURL=secureChannelModule.test.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/internal/secure-channel/di/secureChannelModule.test.ts"],
4
- "sourcesContent": ["import { Container } from \"inversify\";\n\nimport { type DmkConfig } from \"@api/index\";\nimport { DefaultSecureChannelDataSource } from \"@internal/secure-channel/data/DefaultSecureChannelDataSource\";\nimport { DefaultSecureChannelService } from \"@internal/secure-channel/service/DefaultSecureChannelService\";\n\nimport { secureChannelModuleFactory } from \"./secureChannelModule\";\nimport { secureChannelTypes } from \"./secureChannelTypes\";\n\ndescribe(\"secureChannelModuleFactory default use case\", () => {\n const mockDmkConfig = {\n webSocketUrl: \"http://fake-websocket.url\",\n } as DmkConfig;\n\n let container: Container;\n let mod: ReturnType<typeof secureChannelModuleFactory>;\n\n beforeEach(() => {\n mod = secureChannelModuleFactory({\n stub: false,\n config: mockDmkConfig,\n });\n container = new Container();\n container.load(mod);\n });\n\n it(\"the secure channel module should be defined\", () => {\n expect(mod).toBeDefined();\n });\n\n it(\"should return default use cases instead of stub\", () => {\n const config = container.get(secureChannelTypes.DmkConfig);\n expect(config).toEqual({\n webSocketUrl: \"http://fake-websocket.url\",\n });\n\n const secureChannelDataSource = container.get(\n secureChannelTypes.SecureChannelDataSource,\n );\n expect(secureChannelDataSource).toBeInstanceOf(\n DefaultSecureChannelDataSource,\n );\n\n const secureChannelService = container.get(\n secureChannelTypes.SecureChannelService,\n );\n expect(secureChannelService).toBeInstanceOf(DefaultSecureChannelService);\n });\n});\n"],
5
- "mappings": "AAAA,OAAS,aAAAA,MAAiB,YAG1B,OAAS,kCAAAC,MAAsC,+DAC/C,OAAS,+BAAAC,MAAmC,+DAE5C,OAAS,8BAAAC,MAAkC,wBAC3C,OAAS,sBAAAC,MAA0B,uBAEnC,SAAS,8CAA+C,IAAM,CAC5D,MAAMC,EAAgB,CACpB,aAAc,2BAChB,EAEA,IAAIC,EACAC,EAEJ,WAAW,IAAM,CACfA,EAAMJ,EAA2B,CAC/B,KAAM,GACN,OAAQE,CACV,CAAC,EACDC,EAAY,IAAIN,EAChBM,EAAU,KAAKC,CAAG,CACpB,CAAC,EAED,GAAG,8CAA+C,IAAM,CACtD,OAAOA,CAAG,EAAE,YAAY,CAC1B,CAAC,EAED,GAAG,kDAAmD,IAAM,CAC1D,MAAMC,EAASF,EAAU,IAAIF,EAAmB,SAAS,EACzD,OAAOI,CAAM,EAAE,QAAQ,CACrB,aAAc,2BAChB,CAAC,EAED,MAAMC,EAA0BH,EAAU,IACxCF,EAAmB,uBACrB,EACA,OAAOK,CAAuB,EAAE,eAC9BR,CACF,EAEA,MAAMS,EAAuBJ,EAAU,IACrCF,EAAmB,oBACrB,EACA,OAAOM,CAAoB,EAAE,eAAeR,CAA2B,CACzE,CAAC,CACH,CAAC",
4
+ "sourcesContent": ["import { Container } from \"inversify\";\n\nimport { type DmkConfig } from \"@api/index\";\nimport { DefaultSecureChannelDataSource } from \"@internal/secure-channel/data/DefaultSecureChannelDataSource\";\nimport { DefaultSecureChannelService } from \"@internal/secure-channel/service/DefaultSecureChannelService\";\n\nimport { secureChannelModuleFactory } from \"./secureChannelModule\";\nimport { secureChannelTypes } from \"./secureChannelTypes\";\n\ndescribe(\"secureChannelModuleFactory default use case\", () => {\n const mockDmkConfig = {\n webSocketUrl: \"http://fake-websocket.url\",\n } as DmkConfig;\n\n let container: Container;\n let mod: ReturnType<typeof secureChannelModuleFactory>;\n\n beforeEach(() => {\n mod = secureChannelModuleFactory({\n stub: false,\n config: mockDmkConfig,\n });\n container = new Container();\n container.loadSync(mod);\n });\n\n it(\"the secure channel module should be defined\", () => {\n expect(mod).toBeDefined();\n });\n\n it(\"should return default use cases instead of stub\", () => {\n const config = container.get(secureChannelTypes.DmkConfig);\n expect(config).toEqual({\n webSocketUrl: \"http://fake-websocket.url\",\n });\n\n const secureChannelDataSource = container.get(\n secureChannelTypes.SecureChannelDataSource,\n );\n expect(secureChannelDataSource).toBeInstanceOf(\n DefaultSecureChannelDataSource,\n );\n\n const secureChannelService = container.get(\n secureChannelTypes.SecureChannelService,\n );\n expect(secureChannelService).toBeInstanceOf(DefaultSecureChannelService);\n });\n});\n"],
5
+ "mappings": "AAAA,OAAS,aAAAA,MAAiB,YAG1B,OAAS,kCAAAC,MAAsC,+DAC/C,OAAS,+BAAAC,MAAmC,+DAE5C,OAAS,8BAAAC,MAAkC,wBAC3C,OAAS,sBAAAC,MAA0B,uBAEnC,SAAS,8CAA+C,IAAM,CAC5D,MAAMC,EAAgB,CACpB,aAAc,2BAChB,EAEA,IAAIC,EACAC,EAEJ,WAAW,IAAM,CACfA,EAAMJ,EAA2B,CAC/B,KAAM,GACN,OAAQE,CACV,CAAC,EACDC,EAAY,IAAIN,EAChBM,EAAU,SAASC,CAAG,CACxB,CAAC,EAED,GAAG,8CAA+C,IAAM,CACtD,OAAOA,CAAG,EAAE,YAAY,CAC1B,CAAC,EAED,GAAG,kDAAmD,IAAM,CAC1D,MAAMC,EAASF,EAAU,IAAIF,EAAmB,SAAS,EACzD,OAAOI,CAAM,EAAE,QAAQ,CACrB,aAAc,2BAChB,CAAC,EAED,MAAMC,EAA0BH,EAAU,IACxCF,EAAmB,uBACrB,EACA,OAAOK,CAAuB,EAAE,eAC9BR,CACF,EAEA,MAAMS,EAAuBJ,EAAU,IACrCF,EAAmB,oBACrB,EACA,OAAOM,CAAoB,EAAE,eAAeR,CAA2B,CACzE,CAAC,CACH,CAAC",
6
6
  "names": ["Container", "DefaultSecureChannelDataSource", "DefaultSecureChannelService", "secureChannelModuleFactory", "secureChannelTypes", "mockDmkConfig", "container", "mod", "config", "secureChannelDataSource", "secureChannelService"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/internal/secure-channel/service/DefaultSecureChannelService.ts"],
4
- "sourcesContent": ["import { inject, injectable } from \"inversify\";\nimport WebSocket from \"isomorphic-ws\";\nimport { Either } from \"purify-ts\";\n\nimport { type GetOsVersionResponse } from \"@api/index\";\nimport { type Application } from \"@internal/manager-api/model/Application\";\nimport { type FinalFirmware } from \"@internal/manager-api/model/Firmware\";\nimport { type SecureChannelDataSource } from \"@internal/secure-channel/data/SecureChannelDataSource\";\nimport { secureChannelTypes } from \"@internal/secure-channel/di/secureChannelTypes\";\nimport { WebSocketConnectionError } from \"@internal/secure-channel/model/Errors\";\nimport {\n type GenuineCheckParams,\n type InstallAppsParams,\n type ListInstalledAppsParams,\n type UninstallAppsParams,\n type UpdateFirmwareParams,\n type UpdateMcuParams,\n} from \"@internal/secure-channel/model/Params\";\n\nimport { type SecureChannelService } from \"./SecureChannelService\";\n\n@injectable()\nexport class DefaultSecureChannelService implements SecureChannelService {\n constructor(\n @inject(secureChannelTypes.SecureChannelDataSource)\n private readonly dataSource: SecureChannelDataSource,\n ) {}\n\n genuineCheck(\n deviceInfo: GetOsVersionResponse,\n finalFirmware: FinalFirmware,\n ): Either<WebSocketConnectionError, WebSocket> {\n const params: GenuineCheckParams = {\n targetId: deviceInfo.targetId.toString(),\n perso: finalFirmware.perso,\n };\n return this.dataSource.genuineCheck(params);\n }\n\n installApp(\n deviceInfo: GetOsVersionResponse,\n app: Pick<Application, \"perso\" | \"firmware\" | \"firmwareKey\" | \"hash\">,\n ): Either<WebSocketConnectionError, WebSocket> {\n const { perso, firmware, firmwareKey, hash } = app;\n const params: InstallAppsParams = {\n targetId: deviceInfo.targetId.toString(),\n perso,\n firmware,\n firmwareKey,\n hash,\n };\n return this.dataSource.installApp(params);\n }\n\n listInstalledApps(\n deviceInfo: GetOsVersionResponse,\n finalFirmware: FinalFirmware,\n ): Either<WebSocketConnectionError, WebSocket> {\n const params: ListInstalledAppsParams = {\n targetId: deviceInfo.targetId.toString(),\n perso: finalFirmware.perso,\n };\n return this.dataSource.listInstalledApps(params);\n }\n\n uninstallApp(\n deviceInfo: GetOsVersionResponse,\n app: Pick<Application, \"perso\" | \"delete\" | \"deleteKey\" | \"hash\">,\n ): Either<WebSocketConnectionError, WebSocket> {\n const { perso, delete: appDelete, deleteKey, hash } = app;\n const params: UninstallAppsParams = {\n targetId: deviceInfo.targetId.toString(),\n perso,\n firmware: appDelete,\n firmwareKey: deleteKey,\n hash,\n };\n return this.dataSource.uninstallApp(params);\n }\n\n updateFirmware(\n deviceInfo: GetOsVersionResponse,\n finalFirmware: FinalFirmware,\n ): Either<WebSocketConnectionError, WebSocket> {\n const params: UpdateFirmwareParams = {\n targetId: deviceInfo.targetId.toString(),\n perso: finalFirmware.perso,\n firmware: finalFirmware.firmware,\n firmwareKey: finalFirmware.firmwareKey,\n };\n return this.dataSource.updateFirmware(params);\n }\n\n updateMcu(\n deviceInfo: GetOsVersionResponse,\n param: { version: string },\n ): Either<WebSocketConnectionError, WebSocket> {\n const params: UpdateMcuParams = {\n targetId: deviceInfo.targetId.toString(),\n version: param.version,\n };\n return this.dataSource.updateMcu(params);\n }\n}\n"],
5
- "mappings": "iOAAA,OAAS,UAAAA,EAAQ,cAAAC,MAAkB,YAQnC,OAAS,sBAAAC,MAA0B,iDAc5B,IAAMC,EAAN,KAAkE,CACvE,YAEmBC,EACjB,CADiB,gBAAAA,CAChB,CAEH,aACEC,EACAC,EAC6C,CAC7C,MAAMC,EAA6B,CACjC,SAAUF,EAAW,SAAS,SAAS,EACvC,MAAOC,EAAc,KACvB,EACA,OAAO,KAAK,WAAW,aAAaC,CAAM,CAC5C,CAEA,WACEF,EACAG,EAC6C,CAC7C,KAAM,CAAE,MAAAC,EAAO,SAAAC,EAAU,YAAAC,EAAa,KAAAC,CAAK,EAAIJ,EACzCD,EAA4B,CAChC,SAAUF,EAAW,SAAS,SAAS,EACvC,MAAAI,EACA,SAAAC,EACA,YAAAC,EACA,KAAAC,CACF,EACA,OAAO,KAAK,WAAW,WAAWL,CAAM,CAC1C,CAEA,kBACEF,EACAC,EAC6C,CAC7C,MAAMC,EAAkC,CACtC,SAAUF,EAAW,SAAS,SAAS,EACvC,MAAOC,EAAc,KACvB,EACA,OAAO,KAAK,WAAW,kBAAkBC,CAAM,CACjD,CAEA,aACEF,EACAG,EAC6C,CAC7C,KAAM,CAAE,MAAAC,EAAO,OAAQI,EAAW,UAAAC,EAAW,KAAAF,CAAK,EAAIJ,EAChDD,EAA8B,CAClC,SAAUF,EAAW,SAAS,SAAS,EACvC,MAAAI,EACA,SAAUI,EACV,YAAaC,EACb,KAAAF,CACF,EACA,OAAO,KAAK,WAAW,aAAaL,CAAM,CAC5C,CAEA,eACEF,EACAC,EAC6C,CAC7C,MAAMC,EAA+B,CACnC,SAAUF,EAAW,SAAS,SAAS,EACvC,MAAOC,EAAc,MACrB,SAAUA,EAAc,SACxB,YAAaA,EAAc,WAC7B,EACA,OAAO,KAAK,WAAW,eAAeC,CAAM,CAC9C,CAEA,UACEF,EACAU,EAC6C,CAC7C,MAAMR,EAA0B,CAC9B,SAAUF,EAAW,SAAS,SAAS,EACvC,QAASU,EAAM,OACjB,EACA,OAAO,KAAK,WAAW,UAAUR,CAAM,CACzC,CACF,EAjFaJ,EAANa,EAAA,CADNC,EAAW,EAGPC,EAAA,EAAAC,EAAOC,EAAmB,uBAAuB,IAFzCjB",
6
- "names": ["inject", "injectable", "secureChannelTypes", "DefaultSecureChannelService", "dataSource", "deviceInfo", "finalFirmware", "params", "app", "perso", "firmware", "firmwareKey", "hash", "appDelete", "deleteKey", "param", "__decorateClass", "injectable", "__decorateParam", "inject", "secureChannelTypes"]
4
+ "sourcesContent": ["import { inject, injectable } from \"inversify\";\nimport WebSocket from \"isomorphic-ws\";\nimport { Either } from \"purify-ts\";\n\nimport { type GetOsVersionResponse } from \"@api/index\";\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 SecureChannelDataSource } from \"@internal/secure-channel/data/SecureChannelDataSource\";\nimport { secureChannelTypes } from \"@internal/secure-channel/di/secureChannelTypes\";\nimport { WebSocketConnectionError } from \"@internal/secure-channel/model/Errors\";\nimport {\n type GenuineCheckParams,\n type InstallAppsParams,\n type ListInstalledAppsParams,\n type UninstallAppsParams,\n type UpdateFirmwareParams,\n type UpdateMcuParams,\n} from \"@internal/secure-channel/model/Params\";\n\nimport { type SecureChannelService } from \"./SecureChannelService\";\n\n@injectable()\nexport class DefaultSecureChannelService implements SecureChannelService {\n constructor(\n @inject(secureChannelTypes.SecureChannelDataSource)\n private readonly dataSource: SecureChannelDataSource,\n ) {}\n\n genuineCheck(\n deviceInfo: GetOsVersionResponse,\n finalFirmware: FinalFirmware,\n ): Either<WebSocketConnectionError, WebSocket> {\n const params: GenuineCheckParams = {\n targetId: deviceInfo.targetId.toString(),\n perso: finalFirmware.perso,\n };\n return this.dataSource.genuineCheck(params);\n }\n\n installApp(\n deviceInfo: GetOsVersionResponse,\n app: Pick<Application, \"perso\" | \"firmware\" | \"firmwareKey\" | \"hash\">,\n ): Either<WebSocketConnectionError, WebSocket> {\n const { perso, firmware, firmwareKey, hash } = app;\n const params: InstallAppsParams = {\n targetId: deviceInfo.targetId.toString(),\n perso,\n firmware,\n firmwareKey,\n hash,\n };\n return this.dataSource.installApp(params);\n }\n\n listInstalledApps(\n deviceInfo: GetOsVersionResponse,\n finalFirmware: FinalFirmware,\n ): Either<WebSocketConnectionError, WebSocket> {\n const params: ListInstalledAppsParams = {\n targetId: deviceInfo.targetId.toString(),\n perso: finalFirmware.perso,\n };\n return this.dataSource.listInstalledApps(params);\n }\n\n uninstallApp(\n deviceInfo: GetOsVersionResponse,\n app: Pick<Application, \"perso\" | \"delete\" | \"deleteKey\" | \"hash\">,\n ): Either<WebSocketConnectionError, WebSocket> {\n const { perso, delete: appDelete, deleteKey, hash } = app;\n const params: UninstallAppsParams = {\n targetId: deviceInfo.targetId.toString(),\n perso,\n firmware: appDelete,\n firmwareKey: deleteKey,\n hash,\n };\n return this.dataSource.uninstallApp(params);\n }\n\n updateFirmware(\n deviceInfo: GetOsVersionResponse,\n osuFirmware: OsuFirmware,\n ): Either<WebSocketConnectionError, WebSocket> {\n const params: UpdateFirmwareParams = {\n targetId: deviceInfo.targetId.toString(),\n perso: osuFirmware.perso,\n firmware: osuFirmware.firmware,\n firmwareKey: osuFirmware.firmwareKey,\n };\n return this.dataSource.updateFirmware(params);\n }\n\n updateMcu(\n deviceInfo: GetOsVersionResponse,\n param: { version: string },\n ): Either<WebSocketConnectionError, WebSocket> {\n const params: UpdateMcuParams = {\n targetId: deviceInfo.targetId.toString(),\n version: param.version,\n };\n return this.dataSource.updateMcu(params);\n }\n}\n"],
5
+ "mappings": "iOAAA,OAAS,UAAAA,EAAQ,cAAAC,MAAkB,YAWnC,OAAS,sBAAAC,MAA0B,iDAc5B,IAAMC,EAAN,KAAkE,CACvE,YAEmBC,EACjB,CADiB,gBAAAA,CAChB,CAEH,aACEC,EACAC,EAC6C,CAC7C,MAAMC,EAA6B,CACjC,SAAUF,EAAW,SAAS,SAAS,EACvC,MAAOC,EAAc,KACvB,EACA,OAAO,KAAK,WAAW,aAAaC,CAAM,CAC5C,CAEA,WACEF,EACAG,EAC6C,CAC7C,KAAM,CAAE,MAAAC,EAAO,SAAAC,EAAU,YAAAC,EAAa,KAAAC,CAAK,EAAIJ,EACzCD,EAA4B,CAChC,SAAUF,EAAW,SAAS,SAAS,EACvC,MAAAI,EACA,SAAAC,EACA,YAAAC,EACA,KAAAC,CACF,EACA,OAAO,KAAK,WAAW,WAAWL,CAAM,CAC1C,CAEA,kBACEF,EACAC,EAC6C,CAC7C,MAAMC,EAAkC,CACtC,SAAUF,EAAW,SAAS,SAAS,EACvC,MAAOC,EAAc,KACvB,EACA,OAAO,KAAK,WAAW,kBAAkBC,CAAM,CACjD,CAEA,aACEF,EACAG,EAC6C,CAC7C,KAAM,CAAE,MAAAC,EAAO,OAAQI,EAAW,UAAAC,EAAW,KAAAF,CAAK,EAAIJ,EAChDD,EAA8B,CAClC,SAAUF,EAAW,SAAS,SAAS,EACvC,MAAAI,EACA,SAAUI,EACV,YAAaC,EACb,KAAAF,CACF,EACA,OAAO,KAAK,WAAW,aAAaL,CAAM,CAC5C,CAEA,eACEF,EACAU,EAC6C,CAC7C,MAAMR,EAA+B,CACnC,SAAUF,EAAW,SAAS,SAAS,EACvC,MAAOU,EAAY,MACnB,SAAUA,EAAY,SACtB,YAAaA,EAAY,WAC3B,EACA,OAAO,KAAK,WAAW,eAAeR,CAAM,CAC9C,CAEA,UACEF,EACAW,EAC6C,CAC7C,MAAMT,EAA0B,CAC9B,SAAUF,EAAW,SAAS,SAAS,EACvC,QAASW,EAAM,OACjB,EACA,OAAO,KAAK,WAAW,UAAUT,CAAM,CACzC,CACF,EAjFaJ,EAANc,EAAA,CADNC,EAAW,EAGPC,EAAA,EAAAC,EAAOC,EAAmB,uBAAuB,IAFzClB",
6
+ "names": ["inject", "injectable", "secureChannelTypes", "DefaultSecureChannelService", "dataSource", "deviceInfo", "finalFirmware", "params", "app", "perso", "firmware", "firmwareKey", "hash", "appDelete", "deleteKey", "osuFirmware", "param", "__decorateClass", "injectable", "__decorateParam", "inject", "secureChannelTypes"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{getOsVersionCommandResponseMockBuilder as i}from"../../../api/command/os/__mocks__/GetOsVersionCommand";import{DeviceModelId as s}from"../../../api/index";import{DefaultSecureChannelDataSource as l}from"../../secure-channel/data/DefaultSecureChannelDataSource";import{DefaultSecureChannelService as p}from"./DefaultSecureChannelService";vi.mock("@internal/secure-channel/data/DefaultSecureChannelDataSource");let t,a;describe("SecureChannelService",()=>{beforeEach(()=>{t=new l({}),a=new p(t)}),describe("genuineCheck service",()=>{it("should call genuineCheck data source with passing parameters",()=>{const e=i(s.NANO_SP),r={perso:"perso"};a.genuineCheck(e,r),expect(t.genuineCheck).toHaveBeenCalledWith({targetId:e.targetId.toString(),perso:"perso"})})}),describe("listInstalledApps service",()=>{it("should call listInstalledApps data source with passing parameters",()=>{const e=i(s.NANO_SP),r={perso:"perso"};a.listInstalledApps(e,r),expect(t.listInstalledApps).toHaveBeenCalledWith({targetId:e.targetId.toString(),perso:"perso"})})}),describe("updateMcu service",()=>{it("should call updateMcu data source with passing parameters",()=>{const e=i(s.NANO_SP),r="version";a.updateMcu(e,{version:r}),expect(t.updateMcu).toHaveBeenCalledWith({targetId:e.targetId.toString(),version:r})})}),describe("updateFirmware service",()=>{it("should call updateFirmware data source with passing parameters",()=>{const e=i(s.NANO_SP),r={perso:"perso",firmware:"firmware",firmwareKey:"firmwareKey"};a.updateFirmware(e,r),expect(t.updateFirmware).toHaveBeenCalledWith({targetId:e.targetId.toString(),perso:"perso",firmware:"firmware",firmwareKey:"firmwareKey"})})}),describe("installApp service",()=>{it("should call installApp data source with passing parameters",()=>{const e=i(s.NANO_SP),r="perso",n="firmware",o="firmwareKey",c="hash";a.installApp(e,{perso:r,firmware:n,firmwareKey:o,hash:c}),expect(t.installApp).toHaveBeenCalledWith({targetId:e.targetId.toString(),perso:r,firmware:n,firmwareKey:o,hash:c})})}),describe("uninstallApp service",()=>{it("should call uninstallApp data source with passing parameters",()=>{const e=i(s.NANO_SP),r="perso",n="delete",o="deleteKey",c="hash";a.uninstallApp(e,{perso:r,delete:n,deleteKey:o,hash:c}),expect(t.uninstallApp).toHaveBeenCalledWith({targetId:e.targetId.toString(),perso:r,firmware:n,firmwareKey:o,hash:c})})})});
1
+ import{getOsVersionCommandResponseMockBuilder as i}from"../../../api/command/os/__mocks__/GetOsVersionCommand";import{DeviceModelId as s}from"../../../api/index";import{DefaultSecureChannelDataSource as l}from"../../secure-channel/data/DefaultSecureChannelDataSource";import{DefaultSecureChannelService as p}from"./DefaultSecureChannelService";vi.mock("@internal/secure-channel/data/DefaultSecureChannelDataSource");let t,a;describe("SecureChannelService",()=>{beforeEach(()=>{t=new l({}),a=new p(t)}),describe("genuineCheck service",()=>{it("should call genuineCheck data source with passing parameters",()=>{const e=i(s.NANO_SP),r={perso:"perso"};a.genuineCheck(e,r),expect(t.genuineCheck).toHaveBeenCalledWith({targetId:e.targetId.toString(),perso:"perso"})})}),describe("listInstalledApps service",()=>{it("should call listInstalledApps data source with passing parameters",()=>{const e=i(s.NANO_SP),r={perso:"perso"};a.listInstalledApps(e,r),expect(t.listInstalledApps).toHaveBeenCalledWith({targetId:e.targetId.toString(),perso:"perso"})})}),describe("updateMcu service",()=>{it("should call updateMcu data source with passing parameters",()=>{const e=i(s.NANO_SP),r="version";a.updateMcu(e,{version:r}),expect(t.updateMcu).toHaveBeenCalledWith({targetId:e.targetId.toString(),version:r})})}),describe("updateFirmware service",()=>{it("should call updateFirmware data source with passing parameters",()=>{const e=i(s.NANO_SP),r={perso:"perso",firmware:"firmware",firmwareKey:"firmwareKey"};a.updateFirmware(e,r),expect(t.updateFirmware).toHaveBeenCalledWith({targetId:e.targetId.toString(),perso:"perso",firmware:"firmware",firmwareKey:"firmwareKey"})})}),describe("installApp service",()=>{it("should call installApp data source with passing parameters",()=>{const e=i(s.NANO_SP),r="perso",o="firmware",n="firmwareKey",c="hash";a.installApp(e,{perso:r,firmware:o,firmwareKey:n,hash:c}),expect(t.installApp).toHaveBeenCalledWith({targetId:e.targetId.toString(),perso:r,firmware:o,firmwareKey:n,hash:c})})}),describe("uninstallApp service",()=>{it("should call uninstallApp data source with passing parameters",()=>{const e=i(s.NANO_SP),r="perso",o="delete",n="deleteKey",c="hash";a.uninstallApp(e,{perso:r,delete:o,deleteKey:n,hash:c}),expect(t.uninstallApp).toHaveBeenCalledWith({targetId:e.targetId.toString(),perso:r,firmware:o,firmwareKey:n,hash:c})})})});
2
2
  //# sourceMappingURL=DefaultSecureChannelService.test.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/internal/secure-channel/service/DefaultSecureChannelService.test.ts"],
4
- "sourcesContent": ["import { type Mocked } from \"vitest\";\n\nimport { getOsVersionCommandResponseMockBuilder } from \"@api/command/os/__mocks__/GetOsVersionCommand\";\nimport { type DmkConfig } from \"@api/DmkConfig\";\nimport { DeviceModelId } from \"@api/index\";\nimport { type Application } from \"@internal/manager-api/model/Application\";\nimport { type FinalFirmware } from \"@internal/manager-api/model/Firmware\";\nimport { DefaultSecureChannelDataSource } from \"@internal/secure-channel/data/DefaultSecureChannelDataSource\";\n\nimport { DefaultSecureChannelService } from \"./DefaultSecureChannelService\";\nimport { type SecureChannelService } from \"./SecureChannelService\";\n\nvi.mock(\"@internal/secure-channel/data/DefaultSecureChannelDataSource\");\n\nlet dataSource: Mocked<DefaultSecureChannelDataSource>;\nlet service: SecureChannelService;\n\ndescribe(\"SecureChannelService\", () => {\n beforeEach(() => {\n dataSource = new DefaultSecureChannelDataSource(\n {} as DmkConfig,\n ) as Mocked<DefaultSecureChannelDataSource>;\n\n service = new DefaultSecureChannelService(dataSource);\n });\n\n describe(\"genuineCheck service\", () => {\n it(\"should call genuineCheck data source with passing parameters\", () => {\n // given\n const deviceInfo = getOsVersionCommandResponseMockBuilder(\n DeviceModelId.NANO_SP,\n );\n const finalFirmware = {\n perso: \"perso\",\n } as FinalFirmware;\n\n // when\n service.genuineCheck(deviceInfo, finalFirmware);\n\n // then\n expect(dataSource.genuineCheck).toHaveBeenCalledWith({\n targetId: deviceInfo.targetId.toString(),\n perso: \"perso\",\n });\n });\n });\n\n describe(\"listInstalledApps service\", () => {\n it(\"should call listInstalledApps data source with passing parameters\", () => {\n // given\n const deviceInfo = getOsVersionCommandResponseMockBuilder(\n DeviceModelId.NANO_SP,\n );\n\n const finalFirmware = {\n perso: \"perso\",\n } as FinalFirmware;\n\n // when\n service.listInstalledApps(deviceInfo, finalFirmware);\n\n // then\n expect(dataSource.listInstalledApps).toHaveBeenCalledWith({\n targetId: deviceInfo.targetId.toString(),\n perso: \"perso\",\n });\n });\n });\n\n describe(\"updateMcu service\", () => {\n it(\"should call updateMcu data source with passing parameters\", () => {\n // given\n const deviceInfo = getOsVersionCommandResponseMockBuilder(\n DeviceModelId.NANO_SP,\n );\n const version = \"version\";\n\n // when\n service.updateMcu(deviceInfo, { version });\n\n // then\n expect(dataSource.updateMcu).toHaveBeenCalledWith({\n targetId: deviceInfo.targetId.toString(),\n version,\n });\n });\n });\n\n describe(\"updateFirmware service\", () => {\n it(\"should call updateFirmware data source with passing parameters\", () => {\n // given\n const deviceInfo = getOsVersionCommandResponseMockBuilder(\n DeviceModelId.NANO_SP,\n );\n\n const finalFirmware = {\n perso: \"perso\",\n firmware: \"firmware\",\n firmwareKey: \"firmwareKey\",\n } as FinalFirmware;\n\n // when\n service.updateFirmware(deviceInfo, finalFirmware);\n\n // then\n expect(dataSource.updateFirmware).toHaveBeenCalledWith({\n targetId: deviceInfo.targetId.toString(),\n perso: \"perso\",\n firmware: \"firmware\",\n firmwareKey: \"firmwareKey\",\n });\n });\n });\n\n describe(\"installApp service\", () => {\n it(\"should call installApp data source with passing parameters\", () => {\n // given\n const deviceInfo = getOsVersionCommandResponseMockBuilder(\n DeviceModelId.NANO_SP,\n );\n const perso = \"perso\";\n const firmware = \"firmware\";\n const firmwareKey = \"firmwareKey\";\n const hash = \"hash\";\n\n // when\n service.installApp(deviceInfo, {\n perso,\n firmware,\n firmwareKey,\n hash,\n } as Application);\n\n // then\n expect(dataSource.installApp).toHaveBeenCalledWith({\n targetId: deviceInfo.targetId.toString(),\n perso,\n firmware,\n firmwareKey,\n hash,\n });\n });\n });\n\n describe(\"uninstallApp service\", () => {\n it(\"should call uninstallApp data source with passing parameters\", () => {\n // given\n const deviceInfo = getOsVersionCommandResponseMockBuilder(\n DeviceModelId.NANO_SP,\n );\n const perso = \"perso\";\n const appDelete = \"delete\";\n const deleteKey = \"deleteKey\";\n const hash = \"hash\";\n\n // when\n service.uninstallApp(deviceInfo, {\n perso,\n delete: appDelete,\n deleteKey,\n hash,\n } as Application);\n\n // then\n expect(dataSource.uninstallApp).toHaveBeenCalledWith({\n targetId: deviceInfo.targetId.toString(),\n perso,\n firmware: appDelete,\n firmwareKey: deleteKey,\n hash,\n });\n });\n });\n});\n"],
5
- "mappings": "AAEA,OAAS,0CAAAA,MAA8C,gDAEvD,OAAS,iBAAAC,MAAqB,aAG9B,OAAS,kCAAAC,MAAsC,+DAE/C,OAAS,+BAAAC,MAAmC,gCAG5C,GAAG,KAAK,8DAA8D,EAEtE,IAAIC,EACAC,EAEJ,SAAS,uBAAwB,IAAM,CACrC,WAAW,IAAM,CACfD,EAAa,IAAIF,EACf,CAAC,CACH,EAEAG,EAAU,IAAIF,EAA4BC,CAAU,CACtD,CAAC,EAED,SAAS,uBAAwB,IAAM,CACrC,GAAG,+DAAgE,IAAM,CAEvE,MAAME,EAAaN,EACjBC,EAAc,OAChB,EACMM,EAAgB,CACpB,MAAO,OACT,EAGAF,EAAQ,aAAaC,EAAYC,CAAa,EAG9C,OAAOH,EAAW,YAAY,EAAE,qBAAqB,CACnD,SAAUE,EAAW,SAAS,SAAS,EACvC,MAAO,OACT,CAAC,CACH,CAAC,CACH,CAAC,EAED,SAAS,4BAA6B,IAAM,CAC1C,GAAG,oEAAqE,IAAM,CAE5E,MAAMA,EAAaN,EACjBC,EAAc,OAChB,EAEMM,EAAgB,CACpB,MAAO,OACT,EAGAF,EAAQ,kBAAkBC,EAAYC,CAAa,EAGnD,OAAOH,EAAW,iBAAiB,EAAE,qBAAqB,CACxD,SAAUE,EAAW,SAAS,SAAS,EACvC,MAAO,OACT,CAAC,CACH,CAAC,CACH,CAAC,EAED,SAAS,oBAAqB,IAAM,CAClC,GAAG,4DAA6D,IAAM,CAEpE,MAAMA,EAAaN,EACjBC,EAAc,OAChB,EACMO,EAAU,UAGhBH,EAAQ,UAAUC,EAAY,CAAE,QAAAE,CAAQ,CAAC,EAGzC,OAAOJ,EAAW,SAAS,EAAE,qBAAqB,CAChD,SAAUE,EAAW,SAAS,SAAS,EACvC,QAAAE,CACF,CAAC,CACH,CAAC,CACH,CAAC,EAED,SAAS,yBAA0B,IAAM,CACvC,GAAG,iEAAkE,IAAM,CAEzE,MAAMF,EAAaN,EACjBC,EAAc,OAChB,EAEMM,EAAgB,CACpB,MAAO,QACP,SAAU,WACV,YAAa,aACf,EAGAF,EAAQ,eAAeC,EAAYC,CAAa,EAGhD,OAAOH,EAAW,cAAc,EAAE,qBAAqB,CACrD,SAAUE,EAAW,SAAS,SAAS,EACvC,MAAO,QACP,SAAU,WACV,YAAa,aACf,CAAC,CACH,CAAC,CACH,CAAC,EAED,SAAS,qBAAsB,IAAM,CACnC,GAAG,6DAA8D,IAAM,CAErE,MAAMA,EAAaN,EACjBC,EAAc,OAChB,EACMQ,EAAQ,QACRC,EAAW,WACXC,EAAc,cACdC,EAAO,OAGbP,EAAQ,WAAWC,EAAY,CAC7B,MAAAG,EACA,SAAAC,EACA,YAAAC,EACA,KAAAC,CACF,CAAgB,EAGhB,OAAOR,EAAW,UAAU,EAAE,qBAAqB,CACjD,SAAUE,EAAW,SAAS,SAAS,EACvC,MAAAG,EACA,SAAAC,EACA,YAAAC,EACA,KAAAC,CACF,CAAC,CACH,CAAC,CACH,CAAC,EAED,SAAS,uBAAwB,IAAM,CACrC,GAAG,+DAAgE,IAAM,CAEvE,MAAMN,EAAaN,EACjBC,EAAc,OAChB,EACMQ,EAAQ,QACRI,EAAY,SACZC,EAAY,YACZF,EAAO,OAGbP,EAAQ,aAAaC,EAAY,CAC/B,MAAAG,EACA,OAAQI,EACR,UAAAC,EACA,KAAAF,CACF,CAAgB,EAGhB,OAAOR,EAAW,YAAY,EAAE,qBAAqB,CACnD,SAAUE,EAAW,SAAS,SAAS,EACvC,MAAAG,EACA,SAAUI,EACV,YAAaC,EACb,KAAAF,CACF,CAAC,CACH,CAAC,CACH,CAAC,CACH,CAAC",
6
- "names": ["getOsVersionCommandResponseMockBuilder", "DeviceModelId", "DefaultSecureChannelDataSource", "DefaultSecureChannelService", "dataSource", "service", "deviceInfo", "finalFirmware", "version", "perso", "firmware", "firmwareKey", "hash", "appDelete", "deleteKey"]
4
+ "sourcesContent": ["import { type Mocked } from \"vitest\";\n\nimport { getOsVersionCommandResponseMockBuilder } from \"@api/command/os/__mocks__/GetOsVersionCommand\";\nimport { type DmkConfig } from \"@api/DmkConfig\";\nimport { DeviceModelId } from \"@api/index\";\nimport { type Application } from \"@internal/manager-api/model/Application\";\nimport {\n type FinalFirmware,\n type OsuFirmware,\n} from \"@internal/manager-api/model/Firmware\";\nimport { DefaultSecureChannelDataSource } from \"@internal/secure-channel/data/DefaultSecureChannelDataSource\";\n\nimport { DefaultSecureChannelService } from \"./DefaultSecureChannelService\";\nimport { type SecureChannelService } from \"./SecureChannelService\";\n\nvi.mock(\"@internal/secure-channel/data/DefaultSecureChannelDataSource\");\n\nlet dataSource: Mocked<DefaultSecureChannelDataSource>;\nlet service: SecureChannelService;\n\ndescribe(\"SecureChannelService\", () => {\n beforeEach(() => {\n dataSource = new DefaultSecureChannelDataSource(\n {} as DmkConfig,\n ) as Mocked<DefaultSecureChannelDataSource>;\n\n service = new DefaultSecureChannelService(dataSource);\n });\n\n describe(\"genuineCheck service\", () => {\n it(\"should call genuineCheck data source with passing parameters\", () => {\n // given\n const deviceInfo = getOsVersionCommandResponseMockBuilder(\n DeviceModelId.NANO_SP,\n );\n const finalFirmware = {\n perso: \"perso\",\n } as FinalFirmware;\n\n // when\n service.genuineCheck(deviceInfo, finalFirmware);\n\n // then\n expect(dataSource.genuineCheck).toHaveBeenCalledWith({\n targetId: deviceInfo.targetId.toString(),\n perso: \"perso\",\n });\n });\n });\n\n describe(\"listInstalledApps service\", () => {\n it(\"should call listInstalledApps data source with passing parameters\", () => {\n // given\n const deviceInfo = getOsVersionCommandResponseMockBuilder(\n DeviceModelId.NANO_SP,\n );\n\n const finalFirmware = {\n perso: \"perso\",\n } as FinalFirmware;\n\n // when\n service.listInstalledApps(deviceInfo, finalFirmware);\n\n // then\n expect(dataSource.listInstalledApps).toHaveBeenCalledWith({\n targetId: deviceInfo.targetId.toString(),\n perso: \"perso\",\n });\n });\n });\n\n describe(\"updateMcu service\", () => {\n it(\"should call updateMcu data source with passing parameters\", () => {\n // given\n const deviceInfo = getOsVersionCommandResponseMockBuilder(\n DeviceModelId.NANO_SP,\n );\n const version = \"version\";\n\n // when\n service.updateMcu(deviceInfo, { version });\n\n // then\n expect(dataSource.updateMcu).toHaveBeenCalledWith({\n targetId: deviceInfo.targetId.toString(),\n version,\n });\n });\n });\n\n describe(\"updateFirmware service\", () => {\n it(\"should call updateFirmware data source with passing parameters\", () => {\n // given\n const deviceInfo = getOsVersionCommandResponseMockBuilder(\n DeviceModelId.NANO_SP,\n );\n\n const osuFirmware = {\n perso: \"perso\",\n firmware: \"firmware\",\n firmwareKey: \"firmwareKey\",\n } as OsuFirmware;\n\n // when\n service.updateFirmware(deviceInfo, osuFirmware);\n\n // then\n expect(dataSource.updateFirmware).toHaveBeenCalledWith({\n targetId: deviceInfo.targetId.toString(),\n perso: \"perso\",\n firmware: \"firmware\",\n firmwareKey: \"firmwareKey\",\n });\n });\n });\n\n describe(\"installApp service\", () => {\n it(\"should call installApp data source with passing parameters\", () => {\n // given\n const deviceInfo = getOsVersionCommandResponseMockBuilder(\n DeviceModelId.NANO_SP,\n );\n const perso = \"perso\";\n const firmware = \"firmware\";\n const firmwareKey = \"firmwareKey\";\n const hash = \"hash\";\n\n // when\n service.installApp(deviceInfo, {\n perso,\n firmware,\n firmwareKey,\n hash,\n } as Application);\n\n // then\n expect(dataSource.installApp).toHaveBeenCalledWith({\n targetId: deviceInfo.targetId.toString(),\n perso,\n firmware,\n firmwareKey,\n hash,\n });\n });\n });\n\n describe(\"uninstallApp service\", () => {\n it(\"should call uninstallApp data source with passing parameters\", () => {\n // given\n const deviceInfo = getOsVersionCommandResponseMockBuilder(\n DeviceModelId.NANO_SP,\n );\n const perso = \"perso\";\n const appDelete = \"delete\";\n const deleteKey = \"deleteKey\";\n const hash = \"hash\";\n\n // when\n service.uninstallApp(deviceInfo, {\n perso,\n delete: appDelete,\n deleteKey,\n hash,\n } as Application);\n\n // then\n expect(dataSource.uninstallApp).toHaveBeenCalledWith({\n targetId: deviceInfo.targetId.toString(),\n perso,\n firmware: appDelete,\n firmwareKey: deleteKey,\n hash,\n });\n });\n });\n});\n"],
5
+ "mappings": "AAEA,OAAS,0CAAAA,MAA8C,gDAEvD,OAAS,iBAAAC,MAAqB,aAM9B,OAAS,kCAAAC,MAAsC,+DAE/C,OAAS,+BAAAC,MAAmC,gCAG5C,GAAG,KAAK,8DAA8D,EAEtE,IAAIC,EACAC,EAEJ,SAAS,uBAAwB,IAAM,CACrC,WAAW,IAAM,CACfD,EAAa,IAAIF,EACf,CAAC,CACH,EAEAG,EAAU,IAAIF,EAA4BC,CAAU,CACtD,CAAC,EAED,SAAS,uBAAwB,IAAM,CACrC,GAAG,+DAAgE,IAAM,CAEvE,MAAME,EAAaN,EACjBC,EAAc,OAChB,EACMM,EAAgB,CACpB,MAAO,OACT,EAGAF,EAAQ,aAAaC,EAAYC,CAAa,EAG9C,OAAOH,EAAW,YAAY,EAAE,qBAAqB,CACnD,SAAUE,EAAW,SAAS,SAAS,EACvC,MAAO,OACT,CAAC,CACH,CAAC,CACH,CAAC,EAED,SAAS,4BAA6B,IAAM,CAC1C,GAAG,oEAAqE,IAAM,CAE5E,MAAMA,EAAaN,EACjBC,EAAc,OAChB,EAEMM,EAAgB,CACpB,MAAO,OACT,EAGAF,EAAQ,kBAAkBC,EAAYC,CAAa,EAGnD,OAAOH,EAAW,iBAAiB,EAAE,qBAAqB,CACxD,SAAUE,EAAW,SAAS,SAAS,EACvC,MAAO,OACT,CAAC,CACH,CAAC,CACH,CAAC,EAED,SAAS,oBAAqB,IAAM,CAClC,GAAG,4DAA6D,IAAM,CAEpE,MAAMA,EAAaN,EACjBC,EAAc,OAChB,EACMO,EAAU,UAGhBH,EAAQ,UAAUC,EAAY,CAAE,QAAAE,CAAQ,CAAC,EAGzC,OAAOJ,EAAW,SAAS,EAAE,qBAAqB,CAChD,SAAUE,EAAW,SAAS,SAAS,EACvC,QAAAE,CACF,CAAC,CACH,CAAC,CACH,CAAC,EAED,SAAS,yBAA0B,IAAM,CACvC,GAAG,iEAAkE,IAAM,CAEzE,MAAMF,EAAaN,EACjBC,EAAc,OAChB,EAEMQ,EAAc,CAClB,MAAO,QACP,SAAU,WACV,YAAa,aACf,EAGAJ,EAAQ,eAAeC,EAAYG,CAAW,EAG9C,OAAOL,EAAW,cAAc,EAAE,qBAAqB,CACrD,SAAUE,EAAW,SAAS,SAAS,EACvC,MAAO,QACP,SAAU,WACV,YAAa,aACf,CAAC,CACH,CAAC,CACH,CAAC,EAED,SAAS,qBAAsB,IAAM,CACnC,GAAG,6DAA8D,IAAM,CAErE,MAAMA,EAAaN,EACjBC,EAAc,OAChB,EACMS,EAAQ,QACRC,EAAW,WACXC,EAAc,cACdC,EAAO,OAGbR,EAAQ,WAAWC,EAAY,CAC7B,MAAAI,EACA,SAAAC,EACA,YAAAC,EACA,KAAAC,CACF,CAAgB,EAGhB,OAAOT,EAAW,UAAU,EAAE,qBAAqB,CACjD,SAAUE,EAAW,SAAS,SAAS,EACvC,MAAAI,EACA,SAAAC,EACA,YAAAC,EACA,KAAAC,CACF,CAAC,CACH,CAAC,CACH,CAAC,EAED,SAAS,uBAAwB,IAAM,CACrC,GAAG,+DAAgE,IAAM,CAEvE,MAAMP,EAAaN,EACjBC,EAAc,OAChB,EACMS,EAAQ,QACRI,EAAY,SACZC,EAAY,YACZF,EAAO,OAGbR,EAAQ,aAAaC,EAAY,CAC/B,MAAAI,EACA,OAAQI,EACR,UAAAC,EACA,KAAAF,CACF,CAAgB,EAGhB,OAAOT,EAAW,YAAY,EAAE,qBAAqB,CACnD,SAAUE,EAAW,SAAS,SAAS,EACvC,MAAAI,EACA,SAAUI,EACV,YAAaC,EACb,KAAAF,CACF,CAAC,CACH,CAAC,CACH,CAAC,CACH,CAAC",
6
+ "names": ["getOsVersionCommandResponseMockBuilder", "DeviceModelId", "DefaultSecureChannelDataSource", "DefaultSecureChannelService", "dataSource", "service", "deviceInfo", "finalFirmware", "version", "osuFirmware", "perso", "firmware", "firmwareKey", "hash", "appDelete", "deleteKey"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{ContainerModule as s}from"inversify";import{SendApduUseCase as r}from"../../send/use-case/SendApduUseCase";import{StubUseCase as a}from"../../../../src/di.stub";import{sendTypes as o}from"./sendTypes";const A=({stub:e=!1})=>new s((n,d,i,t,p,u,m)=>{n(o.SendApduUseCase).to(r),e&&t(o.SendApduUseCase).to(a)});export{A as sendModuleFactory};
1
+ import{ContainerModule as t}from"inversify";import{SendApduUseCase as p}from"../../send/use-case/SendApduUseCase";import{StubUseCase as a}from"../../../../src/di.stub";import{sendTypes as e}from"./sendTypes";const f=({stub:o=!1})=>new t(({bind:s,rebindSync:r})=>{s(e.SendApduUseCase).to(p),o&&r(e.SendApduUseCase).to(a)});export{f as sendModuleFactory};
2
2
  //# sourceMappingURL=sendModule.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/internal/send/di/sendModule.ts"],
4
- "sourcesContent": ["import { ContainerModule } from \"inversify\";\n\nimport { SendApduUseCase } from \"@internal/send/use-case/SendApduUseCase\";\nimport { StubUseCase } from \"@root/src/di.stub\";\n\nimport { sendTypes } from \"./sendTypes\";\n\ntype FactoryProps = {\n stub: boolean;\n};\n\nexport const sendModuleFactory = ({ stub = false }: FactoryProps) =>\n new ContainerModule(\n (\n bind,\n _unbind,\n _isBound,\n rebind,\n _unbindAsync,\n _onActivation,\n _onDeactivation,\n ) => {\n bind(sendTypes.SendApduUseCase).to(SendApduUseCase);\n if (stub) {\n rebind(sendTypes.SendApduUseCase).to(StubUseCase);\n }\n },\n );\n"],
5
- "mappings": "AAAA,OAAS,mBAAAA,MAAuB,YAEhC,OAAS,mBAAAC,MAAuB,0CAChC,OAAS,eAAAC,MAAmB,oBAE5B,OAAS,aAAAC,MAAiB,cAMnB,MAAMC,EAAoB,CAAC,CAAE,KAAAC,EAAO,EAAM,IAC/C,IAAIL,EACF,CACEM,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,IACG,CACHN,EAAKH,EAAU,eAAe,EAAE,GAAGF,CAAe,EAC9CI,GACFI,EAAON,EAAU,eAAe,EAAE,GAAGD,CAAW,CAEpD,CACF",
6
- "names": ["ContainerModule", "SendApduUseCase", "StubUseCase", "sendTypes", "sendModuleFactory", "stub", "bind", "_unbind", "_isBound", "rebind", "_unbindAsync", "_onActivation", "_onDeactivation"]
4
+ "sourcesContent": ["import { ContainerModule } from \"inversify\";\n\nimport { SendApduUseCase } from \"@internal/send/use-case/SendApduUseCase\";\nimport { StubUseCase } from \"@root/src/di.stub\";\n\nimport { sendTypes } from \"./sendTypes\";\n\ntype FactoryProps = {\n stub: boolean;\n};\n\nexport const sendModuleFactory = ({ stub = false }: FactoryProps) =>\n new ContainerModule(({ bind, rebindSync }) => {\n bind(sendTypes.SendApduUseCase).to(SendApduUseCase);\n if (stub) {\n rebindSync(sendTypes.SendApduUseCase).to(StubUseCase);\n }\n });\n"],
5
+ "mappings": "AAAA,OAAS,mBAAAA,MAAuB,YAEhC,OAAS,mBAAAC,MAAuB,0CAChC,OAAS,eAAAC,MAAmB,oBAE5B,OAAS,aAAAC,MAAiB,cAMnB,MAAMC,EAAoB,CAAC,CAAE,KAAAC,EAAO,EAAM,IAC/C,IAAIL,EAAgB,CAAC,CAAE,KAAAM,EAAM,WAAAC,CAAW,IAAM,CAC5CD,EAAKH,EAAU,eAAe,EAAE,GAAGF,CAAe,EAC9CI,GACFE,EAAWJ,EAAU,eAAe,EAAE,GAAGD,CAAW,CAExD,CAAC",
6
+ "names": ["ContainerModule", "SendApduUseCase", "StubUseCase", "sendTypes", "sendModuleFactory", "stub", "bind", "rebindSync"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{Container as t}from"inversify";import{sendModuleFactory as r}from"./sendModule";describe("sendModuleFactory",()=>{describe("Default",()=>{let o,e;beforeEach(()=>{e=r({stub:!1}),o=new t,o.load(e)}),it("should return the config module",()=>{expect(e).toBeDefined()})})});
1
+ import{Container as t}from"inversify";import{sendModuleFactory as r}from"./sendModule";describe("sendModuleFactory",()=>{describe("Default",()=>{let o,e;beforeEach(()=>{e=r({stub:!1}),o=new t,o.loadSync(e)}),it("should return the config module",()=>{expect(e).toBeDefined()})})});
2
2
  //# sourceMappingURL=sendModule.test.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/internal/send/di/sendModule.test.ts"],
4
- "sourcesContent": ["import { Container } from \"inversify\";\n\nimport { sendModuleFactory } from \"./sendModule\";\n\ndescribe(\"sendModuleFactory\", () => {\n describe(\"Default\", () => {\n let container: Container;\n let mod: ReturnType<typeof sendModuleFactory>;\n beforeEach(() => {\n mod = sendModuleFactory({ stub: false });\n container = new Container();\n container.load(mod);\n });\n\n it(\"should return the config module\", () => {\n expect(mod).toBeDefined();\n });\n });\n});\n"],
5
- "mappings": "AAAA,OAAS,aAAAA,MAAiB,YAE1B,OAAS,qBAAAC,MAAyB,eAElC,SAAS,oBAAqB,IAAM,CAClC,SAAS,UAAW,IAAM,CACxB,IAAIC,EACAC,EACJ,WAAW,IAAM,CACfA,EAAMF,EAAkB,CAAE,KAAM,EAAM,CAAC,EACvCC,EAAY,IAAIF,EAChBE,EAAU,KAAKC,CAAG,CACpB,CAAC,EAED,GAAG,kCAAmC,IAAM,CAC1C,OAAOA,CAAG,EAAE,YAAY,CAC1B,CAAC,CACH,CAAC,CACH,CAAC",
4
+ "sourcesContent": ["import { Container } from \"inversify\";\n\nimport { sendModuleFactory } from \"./sendModule\";\n\ndescribe(\"sendModuleFactory\", () => {\n describe(\"Default\", () => {\n let container: Container;\n let mod: ReturnType<typeof sendModuleFactory>;\n beforeEach(() => {\n mod = sendModuleFactory({ stub: false });\n container = new Container();\n container.loadSync(mod);\n });\n\n it(\"should return the config module\", () => {\n expect(mod).toBeDefined();\n });\n });\n});\n"],
5
+ "mappings": "AAAA,OAAS,aAAAA,MAAiB,YAE1B,OAAS,qBAAAC,MAAyB,eAElC,SAAS,oBAAqB,IAAM,CAClC,SAAS,UAAW,IAAM,CACxB,IAAIC,EACAC,EACJ,WAAW,IAAM,CACfA,EAAMF,EAAkB,CAAE,KAAM,EAAM,CAAC,EACvCC,EAAY,IAAIF,EAChBE,EAAU,SAASC,CAAG,CACxB,CAAC,EAED,GAAG,kCAAmC,IAAM,CAC1C,OAAOA,CAAG,EAAE,YAAY,CAC1B,CAAC,CACH,CAAC,CACH,CAAC",
6
6
  "names": ["Container", "sendModuleFactory", "container", "mod"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{ContainerModule as p}from"inversify";import{DefaultTransportService as e}from"../../transport/service/DefaultTransportService";import{transportDiTypes as r}from"./transportDiTypes";const u=({stub:t=!1,transports:n=[],config:a}={})=>new p((o,s,i,m)=>{o(r.TransportsInput).toConstantValue(n),o(r.TransportService).to(e).inSingletonScope(),o(r.DmkConfig).toConstantValue(a)});export{u as transportModuleFactory};
1
+ import{ContainerModule as p}from"inversify";import{DefaultTransportService as e}from"../../transport/service/DefaultTransportService";import{transportDiTypes as t}from"./transportDiTypes";const f=({stub:r=!1,transports:a=[],config:n}={})=>new p(({bind:o})=>{o(t.TransportsInput).toConstantValue(a),o(t.TransportService).to(e).inSingletonScope(),o(t.DmkConfig).toConstantValue(n)});export{f as transportModuleFactory};
2
2
  //# sourceMappingURL=transportModule.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/internal/transport/di/transportModule.ts"],
4
- "sourcesContent": ["import { ContainerModule } from \"inversify\";\n\nimport { type DmkConfig } from \"@api/DmkConfig\";\nimport { type TransportFactory } from \"@api/transport/model/Transport\";\nimport { DefaultTransportService } from \"@internal/transport/service/DefaultTransportService\";\n\nimport { transportDiTypes } from \"./transportDiTypes\";\n\ntype FactoryProps = {\n stub: boolean;\n transports: TransportFactory[];\n config: DmkConfig;\n};\n\nexport const transportModuleFactory = ({\n stub = false,\n transports = [],\n config,\n}: Partial<FactoryProps> = {}) =>\n new ContainerModule((bind, _unbind, _isBound, _rebind) => {\n bind(transportDiTypes.TransportsInput).toConstantValue(transports);\n bind(transportDiTypes.TransportService)\n .to(DefaultTransportService)\n .inSingletonScope();\n\n bind(transportDiTypes.DmkConfig).toConstantValue(config);\n\n if (stub) {\n // TODO: Implement stub\n }\n });\n"],
5
- "mappings": "AAAA,OAAS,mBAAAA,MAAuB,YAIhC,OAAS,2BAAAC,MAA+B,sDAExC,OAAS,oBAAAC,MAAwB,qBAQ1B,MAAMC,EAAyB,CAAC,CACrC,KAAAC,EAAO,GACP,WAAAC,EAAa,CAAC,EACd,OAAAC,CACF,EAA2B,CAAC,IAC1B,IAAIN,EAAgB,CAACO,EAAMC,EAASC,EAAUC,IAAY,CACxDH,EAAKL,EAAiB,eAAe,EAAE,gBAAgBG,CAAU,EACjEE,EAAKL,EAAiB,gBAAgB,EACnC,GAAGD,CAAuB,EAC1B,iBAAiB,EAEpBM,EAAKL,EAAiB,SAAS,EAAE,gBAAgBI,CAAM,CAKzD,CAAC",
6
- "names": ["ContainerModule", "DefaultTransportService", "transportDiTypes", "transportModuleFactory", "stub", "transports", "config", "bind", "_unbind", "_isBound", "_rebind"]
4
+ "sourcesContent": ["import { ContainerModule } from \"inversify\";\n\nimport { type DmkConfig } from \"@api/DmkConfig\";\nimport { type TransportFactory } from \"@api/transport/model/Transport\";\nimport { DefaultTransportService } from \"@internal/transport/service/DefaultTransportService\";\n\nimport { transportDiTypes } from \"./transportDiTypes\";\n\ntype FactoryProps = {\n stub: boolean;\n transports: TransportFactory[];\n config: DmkConfig;\n};\n\nexport const transportModuleFactory = ({\n stub = false,\n transports = [],\n config,\n}: Partial<FactoryProps> = {}) =>\n new ContainerModule(({ bind }) => {\n bind(transportDiTypes.TransportsInput).toConstantValue(transports);\n bind(transportDiTypes.TransportService)\n .to(DefaultTransportService)\n .inSingletonScope();\n\n bind(transportDiTypes.DmkConfig).toConstantValue(config);\n\n if (stub) {\n // TODO: Implement stub\n }\n });\n"],
5
+ "mappings": "AAAA,OAAS,mBAAAA,MAAuB,YAIhC,OAAS,2BAAAC,MAA+B,sDAExC,OAAS,oBAAAC,MAAwB,qBAQ1B,MAAMC,EAAyB,CAAC,CACrC,KAAAC,EAAO,GACP,WAAAC,EAAa,CAAC,EACd,OAAAC,CACF,EAA2B,CAAC,IAC1B,IAAIN,EAAgB,CAAC,CAAE,KAAAO,CAAK,IAAM,CAChCA,EAAKL,EAAiB,eAAe,EAAE,gBAAgBG,CAAU,EACjEE,EAAKL,EAAiB,gBAAgB,EACnC,GAAGD,CAAuB,EAC1B,iBAAiB,EAEpBM,EAAKL,EAAiB,SAAS,EAAE,gBAAgBI,CAAM,CAKzD,CAAC",
6
+ "names": ["ContainerModule", "DefaultTransportService", "transportDiTypes", "transportModuleFactory", "stub", "transports", "config", "bind"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{Container as o}from"inversify";import{TransportMock as a}from"../../../api/transport/model/__mocks__/TransportMock";import{deviceModelModuleFactory as d}from"../../device-model/di/deviceModelModule";import{deviceSessionModuleFactory as l}from"../../device-session/di/deviceSessionModule";import{loggerModuleFactory as u}from"../../logger-publisher/di/loggerModule";import{transportDiTypes as i}from"./transportDiTypes";import{transportModuleFactory as n}from"./transportModule";describe("transportModuleFactory",()=>{describe("Default",()=>{let e,t;beforeEach(()=>{t=n(),e=new o,e.load(t)}),it("should create the transport module",()=>{expect(t).toBeDefined()}),it("should not bind the TransportService when transports is empty",()=>{try{e.get(i.TransportService)}catch(r){expect(r).toBeDefined()}})}),describe("With transports",()=>{let e,t,r;beforeEach(()=>{r=new a,vi.spyOn(r,"getIdentifier").mockReturnValue("MOCK");const s=u(),p=d({stub:!0}),c=l({stub:!0});t=n({transports:[()=>r],config:{managerApiUrl:"http://fake.url/api",mockUrl:"http://fake.url",webSocketUrl:"ws://fake.websocket.url"}}),e=new o,e.load(s,p,c,t)}),it("should bind the TransportService",()=>{expect(e.get(i.TransportService)).toBeDefined()})}),describe("With stub",()=>{let e,t,r;beforeEach(()=>{r=new a,vi.spyOn(r,"getIdentifier").mockReturnValue("MOCK"),t=n({stub:!0,transports:[()=>r]}),e=new o,e.load(t)}),it("should create the transport module",()=>{expect(t).toBeDefined()})})});
1
+ import{Container as o}from"inversify";import{TransportMock as a}from"../../../api/transport/model/__mocks__/TransportMock";import{deviceModelModuleFactory as l}from"../../device-model/di/deviceModelModule";import{deviceSessionModuleFactory as d}from"../../device-session/di/deviceSessionModule";import{loggerModuleFactory as u}from"../../logger-publisher/di/loggerModule";import{transportDiTypes as i}from"./transportDiTypes";import{transportModuleFactory as n}from"./transportModule";describe("transportModuleFactory",()=>{describe("Default",()=>{let e,t;beforeEach(()=>{t=n(),e=new o,e.loadSync(t)}),it("should create the transport module",()=>{expect(t).toBeDefined()}),it("should not bind the TransportService when transports is empty",()=>{try{e.get(i.TransportService)}catch(r){expect(r).toBeDefined()}})}),describe("With transports",()=>{let e,t,r;beforeEach(()=>{r=new a,vi.spyOn(r,"getIdentifier").mockReturnValue("MOCK");const s=u(),c=l({stub:!0}),p=d({stub:!0});t=n({transports:[()=>r],config:{managerApiUrl:"http://fake.url/api",mockUrl:"http://fake.url",webSocketUrl:"ws://fake.websocket.url",firmwareDistributionSalt:"salt"}}),e=new o,e.loadSync(s,c,p,t)}),it("should bind the TransportService",()=>{expect(e.get(i.TransportService)).toBeDefined()})}),describe("With stub",()=>{let e,t,r;beforeEach(()=>{r=new a,vi.spyOn(r,"getIdentifier").mockReturnValue("MOCK"),t=n({stub:!0,transports:[()=>r]}),e=new o,e.loadSync(t)}),it("should create the transport module",()=>{expect(t).toBeDefined()})})});
2
2
  //# sourceMappingURL=transportModule.test.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/internal/transport/di/transportModule.test.ts"],
4
- "sourcesContent": ["import { Container } from \"inversify\";\n\nimport { type DmkConfig } from \"@api/DmkConfig\";\nimport { TransportMock } from \"@api/transport/model/__mocks__/TransportMock\";\nimport { deviceModelModuleFactory } from \"@internal/device-model/di/deviceModelModule\";\nimport { deviceSessionModuleFactory } from \"@internal/device-session/di/deviceSessionModule\";\nimport { loggerModuleFactory } from \"@internal/logger-publisher/di/loggerModule\";\n\nimport { transportDiTypes } from \"./transportDiTypes\";\nimport { transportModuleFactory } from \"./transportModule\";\n\ndescribe(\"transportModuleFactory\", () => {\n describe(\"Default\", () => {\n let container: Container;\n let mod: ReturnType<typeof transportModuleFactory>;\n beforeEach(() => {\n mod = transportModuleFactory();\n container = new Container();\n container.load(mod);\n });\n\n it(\"should create the transport module\", () => {\n expect(mod).toBeDefined();\n });\n\n it(\"should not bind the TransportService when transports is empty\", () => {\n try {\n container.get(transportDiTypes.TransportService);\n } catch (error) {\n expect(error).toBeDefined();\n }\n });\n });\n\n describe(\"With transports\", () => {\n let container: Container;\n let mod: ReturnType<typeof transportModuleFactory>;\n let transport: TransportMock;\n beforeEach(() => {\n transport = new TransportMock();\n vi.spyOn(transport, \"getIdentifier\").mockReturnValue(\"MOCK\");\n const logger = loggerModuleFactory();\n const deviceModel = deviceModelModuleFactory({ stub: true });\n const deviceSession = deviceSessionModuleFactory({ stub: true });\n mod = transportModuleFactory({\n transports: [() => transport],\n config: {\n managerApiUrl: \"http://fake.url/api\",\n mockUrl: \"http://fake.url\",\n webSocketUrl: \"ws://fake.websocket.url\",\n } as DmkConfig,\n });\n container = new Container();\n container.load(logger, deviceModel, deviceSession, mod);\n });\n\n it(\"should bind the TransportService\", () => {\n expect(container.get(transportDiTypes.TransportService)).toBeDefined();\n });\n });\n\n describe(\"With stub\", () => {\n let container: Container;\n let mod: ReturnType<typeof transportModuleFactory>;\n let transport: TransportMock;\n beforeEach(() => {\n transport = new TransportMock();\n vi.spyOn(transport, \"getIdentifier\").mockReturnValue(\"MOCK\");\n mod = transportModuleFactory({\n stub: true,\n transports: [() => transport],\n });\n container = new Container();\n container.load(mod);\n });\n\n it(\"should create the transport module\", () => {\n expect(mod).toBeDefined();\n });\n });\n});\n"],
5
- "mappings": "AAAA,OAAS,aAAAA,MAAiB,YAG1B,OAAS,iBAAAC,MAAqB,+CAC9B,OAAS,4BAAAC,MAAgC,8CACzC,OAAS,8BAAAC,MAAkC,kDAC3C,OAAS,uBAAAC,MAA2B,6CAEpC,OAAS,oBAAAC,MAAwB,qBACjC,OAAS,0BAAAC,MAA8B,oBAEvC,SAAS,yBAA0B,IAAM,CACvC,SAAS,UAAW,IAAM,CACxB,IAAIC,EACAC,EACJ,WAAW,IAAM,CACfA,EAAMF,EAAuB,EAC7BC,EAAY,IAAIP,EAChBO,EAAU,KAAKC,CAAG,CACpB,CAAC,EAED,GAAG,qCAAsC,IAAM,CAC7C,OAAOA,CAAG,EAAE,YAAY,CAC1B,CAAC,EAED,GAAG,gEAAiE,IAAM,CACxE,GAAI,CACFD,EAAU,IAAIF,EAAiB,gBAAgB,CACjD,OAASI,EAAO,CACd,OAAOA,CAAK,EAAE,YAAY,CAC5B,CACF,CAAC,CACH,CAAC,EAED,SAAS,kBAAmB,IAAM,CAChC,IAAIF,EACAC,EACAE,EACJ,WAAW,IAAM,CACfA,EAAY,IAAIT,EAChB,GAAG,MAAMS,EAAW,eAAe,EAAE,gBAAgB,MAAM,EAC3D,MAAMC,EAASP,EAAoB,EAC7BQ,EAAcV,EAAyB,CAAE,KAAM,EAAK,CAAC,EACrDW,EAAgBV,EAA2B,CAAE,KAAM,EAAK,CAAC,EAC/DK,EAAMF,EAAuB,CAC3B,WAAY,CAAC,IAAMI,CAAS,EAC5B,OAAQ,CACN,cAAe,sBACf,QAAS,kBACT,aAAc,yBAChB,CACF,CAAC,EACDH,EAAY,IAAIP,EAChBO,EAAU,KAAKI,EAAQC,EAAaC,EAAeL,CAAG,CACxD,CAAC,EAED,GAAG,mCAAoC,IAAM,CAC3C,OAAOD,EAAU,IAAIF,EAAiB,gBAAgB,CAAC,EAAE,YAAY,CACvE,CAAC,CACH,CAAC,EAED,SAAS,YAAa,IAAM,CAC1B,IAAIE,EACAC,EACAE,EACJ,WAAW,IAAM,CACfA,EAAY,IAAIT,EAChB,GAAG,MAAMS,EAAW,eAAe,EAAE,gBAAgB,MAAM,EAC3DF,EAAMF,EAAuB,CAC3B,KAAM,GACN,WAAY,CAAC,IAAMI,CAAS,CAC9B,CAAC,EACDH,EAAY,IAAIP,EAChBO,EAAU,KAAKC,CAAG,CACpB,CAAC,EAED,GAAG,qCAAsC,IAAM,CAC7C,OAAOA,CAAG,EAAE,YAAY,CAC1B,CAAC,CACH,CAAC,CACH,CAAC",
4
+ "sourcesContent": ["import { Container } from \"inversify\";\n\nimport { type DmkConfig } from \"@api/DmkConfig\";\nimport { TransportMock } from \"@api/transport/model/__mocks__/TransportMock\";\nimport { deviceModelModuleFactory } from \"@internal/device-model/di/deviceModelModule\";\nimport { deviceSessionModuleFactory } from \"@internal/device-session/di/deviceSessionModule\";\nimport { loggerModuleFactory } from \"@internal/logger-publisher/di/loggerModule\";\n\nimport { transportDiTypes } from \"./transportDiTypes\";\nimport { transportModuleFactory } from \"./transportModule\";\n\ndescribe(\"transportModuleFactory\", () => {\n describe(\"Default\", () => {\n let container: Container;\n let mod: ReturnType<typeof transportModuleFactory>;\n beforeEach(() => {\n mod = transportModuleFactory();\n container = new Container();\n container.loadSync(mod);\n });\n\n it(\"should create the transport module\", () => {\n expect(mod).toBeDefined();\n });\n\n it(\"should not bind the TransportService when transports is empty\", () => {\n try {\n container.get(transportDiTypes.TransportService);\n } catch (error) {\n expect(error).toBeDefined();\n }\n });\n });\n\n describe(\"With transports\", () => {\n let container: Container;\n let mod: ReturnType<typeof transportModuleFactory>;\n let transport: TransportMock;\n beforeEach(() => {\n transport = new TransportMock();\n vi.spyOn(transport, \"getIdentifier\").mockReturnValue(\"MOCK\");\n const logger = loggerModuleFactory();\n const deviceModel = deviceModelModuleFactory({ stub: true });\n const deviceSession = deviceSessionModuleFactory({ stub: true });\n mod = transportModuleFactory({\n transports: [() => transport],\n config: {\n managerApiUrl: \"http://fake.url/api\",\n mockUrl: \"http://fake.url\",\n webSocketUrl: \"ws://fake.websocket.url\",\n firmwareDistributionSalt: \"salt\",\n } as DmkConfig,\n });\n container = new Container();\n container.loadSync(logger, deviceModel, deviceSession, mod);\n });\n\n it(\"should bind the TransportService\", () => {\n expect(container.get(transportDiTypes.TransportService)).toBeDefined();\n });\n });\n\n describe(\"With stub\", () => {\n let container: Container;\n let mod: ReturnType<typeof transportModuleFactory>;\n let transport: TransportMock;\n beforeEach(() => {\n transport = new TransportMock();\n vi.spyOn(transport, \"getIdentifier\").mockReturnValue(\"MOCK\");\n mod = transportModuleFactory({\n stub: true,\n transports: [() => transport],\n });\n container = new Container();\n container.loadSync(mod);\n });\n\n it(\"should create the transport module\", () => {\n expect(mod).toBeDefined();\n });\n });\n});\n"],
5
+ "mappings": "AAAA,OAAS,aAAAA,MAAiB,YAG1B,OAAS,iBAAAC,MAAqB,+CAC9B,OAAS,4BAAAC,MAAgC,8CACzC,OAAS,8BAAAC,MAAkC,kDAC3C,OAAS,uBAAAC,MAA2B,6CAEpC,OAAS,oBAAAC,MAAwB,qBACjC,OAAS,0BAAAC,MAA8B,oBAEvC,SAAS,yBAA0B,IAAM,CACvC,SAAS,UAAW,IAAM,CACxB,IAAIC,EACAC,EACJ,WAAW,IAAM,CACfA,EAAMF,EAAuB,EAC7BC,EAAY,IAAIP,EAChBO,EAAU,SAASC,CAAG,CACxB,CAAC,EAED,GAAG,qCAAsC,IAAM,CAC7C,OAAOA,CAAG,EAAE,YAAY,CAC1B,CAAC,EAED,GAAG,gEAAiE,IAAM,CACxE,GAAI,CACFD,EAAU,IAAIF,EAAiB,gBAAgB,CACjD,OAASI,EAAO,CACd,OAAOA,CAAK,EAAE,YAAY,CAC5B,CACF,CAAC,CACH,CAAC,EAED,SAAS,kBAAmB,IAAM,CAChC,IAAIF,EACAC,EACAE,EACJ,WAAW,IAAM,CACfA,EAAY,IAAIT,EAChB,GAAG,MAAMS,EAAW,eAAe,EAAE,gBAAgB,MAAM,EAC3D,MAAMC,EAASP,EAAoB,EAC7BQ,EAAcV,EAAyB,CAAE,KAAM,EAAK,CAAC,EACrDW,EAAgBV,EAA2B,CAAE,KAAM,EAAK,CAAC,EAC/DK,EAAMF,EAAuB,CAC3B,WAAY,CAAC,IAAMI,CAAS,EAC5B,OAAQ,CACN,cAAe,sBACf,QAAS,kBACT,aAAc,0BACd,yBAA0B,MAC5B,CACF,CAAC,EACDH,EAAY,IAAIP,EAChBO,EAAU,SAASI,EAAQC,EAAaC,EAAeL,CAAG,CAC5D,CAAC,EAED,GAAG,mCAAoC,IAAM,CAC3C,OAAOD,EAAU,IAAIF,EAAiB,gBAAgB,CAAC,EAAE,YAAY,CACvE,CAAC,CACH,CAAC,EAED,SAAS,YAAa,IAAM,CAC1B,IAAIE,EACAC,EACAE,EACJ,WAAW,IAAM,CACfA,EAAY,IAAIT,EAChB,GAAG,MAAMS,EAAW,eAAe,EAAE,gBAAgB,MAAM,EAC3DF,EAAMF,EAAuB,CAC3B,KAAM,GACN,WAAY,CAAC,IAAMI,CAAS,CAC9B,CAAC,EACDH,EAAY,IAAIP,EAChBO,EAAU,SAASC,CAAG,CACxB,CAAC,EAED,GAAG,qCAAsC,IAAM,CAC7C,OAAOA,CAAG,EAAE,YAAY,CAC1B,CAAC,CACH,CAAC,CACH,CAAC",
6
6
  "names": ["Container", "TransportMock", "deviceModelModuleFactory", "deviceSessionModuleFactory", "loggerModuleFactory", "transportDiTypes", "transportModuleFactory", "container", "mod", "error", "transport", "logger", "deviceModel", "deviceSession"]
7
7
  }
@@ -35,7 +35,7 @@ export declare class DeviceManagementKit {
35
35
  /**
36
36
  * Stops discovering devices connected.
37
37
  */
38
- stopDiscovering(): void;
38
+ stopDiscovering(): Promise<void>;
39
39
  /**
40
40
  * Listen to list of known discovered devices (and later BLE).
41
41
  * @param {ListenToAvailableDevicesUseCaseArgs} args - The transport to use for discover, or undefined to discover from all transports.