@ledgerhq/device-management-kit 0.0.0-opt-in-result-20250429135049 → 0.0.0-proxy-transport-20250715134556

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 (601) hide show
  1. package/lib/cjs/package.json +22 -23
  2. package/lib/cjs/src/api/DeviceManagementKit.test.js +1 -1
  3. package/lib/cjs/src/api/DeviceManagementKit.test.js.map +2 -2
  4. package/lib/cjs/src/api/DeviceManagementKitBuilder.js +1 -1
  5. package/lib/cjs/src/api/DeviceManagementKitBuilder.js.map +2 -2
  6. package/lib/cjs/src/api/DmkConfig.js +1 -1
  7. package/lib/cjs/src/api/DmkConfig.js.map +1 -1
  8. package/lib/cjs/src/api/apdu/utils/ByteArrayBuilder.js +1 -1
  9. package/lib/cjs/src/api/apdu/utils/ByteArrayBuilder.js.map +3 -3
  10. package/lib/cjs/src/api/apdu/utils/ByteArrayBuilder.test.js +1 -1
  11. package/lib/cjs/src/api/apdu/utils/ByteArrayBuilder.test.js.map +2 -2
  12. package/lib/cjs/src/api/command/di/commandModule.js +1 -1
  13. package/lib/cjs/src/api/command/di/commandModule.js.map +3 -3
  14. package/lib/cjs/src/api/command/di/commandModule.test.js +1 -1
  15. package/lib/cjs/src/api/command/di/commandModule.test.js.map +2 -2
  16. package/lib/cjs/src/api/command/os/GetCustomImageSizeCommand.js +2 -0
  17. package/lib/cjs/src/api/command/os/GetCustomImageSizeCommand.js.map +7 -0
  18. package/lib/cjs/src/api/command/os/GetCustomImageSizeCommand.test.js +2 -0
  19. package/lib/cjs/src/api/command/os/GetCustomImageSizeCommand.test.js.map +7 -0
  20. package/lib/cjs/src/api/command/os/GetOsVersionCommand.js +1 -1
  21. package/lib/cjs/src/api/command/os/GetOsVersionCommand.js.map +3 -3
  22. package/lib/cjs/src/api/command/os/GetOsVersionCommand.test.js +1 -1
  23. package/lib/cjs/src/api/command/os/GetOsVersionCommand.test.js.map +3 -3
  24. package/lib/cjs/src/api/command/os/ListLanguagePackCommand.js +2 -0
  25. package/lib/cjs/src/api/command/os/ListLanguagePackCommand.js.map +7 -0
  26. package/lib/cjs/src/api/command/os/ListLanguagePackCommand.test.js +2 -0
  27. package/lib/cjs/src/api/command/os/ListLanguagePackCommand.test.js.map +7 -0
  28. package/lib/cjs/src/api/command/os/__mocks__/GetOsVersionCommand.js +1 -1
  29. package/lib/cjs/src/api/command/os/__mocks__/GetOsVersionCommand.js.map +2 -2
  30. package/lib/cjs/src/api/command/utils/CommandUtils.js +1 -1
  31. package/lib/cjs/src/api/command/utils/CommandUtils.js.map +2 -2
  32. package/lib/cjs/src/api/command/utils/CommandUtils.test.js +1 -1
  33. package/lib/cjs/src/api/command/utils/CommandUtils.test.js.map +2 -2
  34. package/lib/cjs/src/api/device-action/DeviceAction.js +1 -1
  35. package/lib/cjs/src/api/device-action/DeviceAction.js.map +1 -1
  36. package/lib/cjs/src/api/device-action/__test-utils__/makeInternalApi.js +1 -1
  37. package/lib/cjs/src/api/device-action/__test-utils__/makeInternalApi.js.map +3 -3
  38. package/lib/cjs/src/api/device-action/__test-utils__/setupTestMachine.js +1 -1
  39. package/lib/cjs/src/api/device-action/__test-utils__/setupTestMachine.js.map +3 -3
  40. package/lib/cjs/src/api/device-action/di/deviceActionModule.js +1 -1
  41. package/lib/cjs/src/api/device-action/di/deviceActionModule.js.map +3 -3
  42. package/lib/cjs/src/api/device-action/di/deviceActionModule.test.js +1 -1
  43. package/lib/cjs/src/api/device-action/di/deviceActionModule.test.js.map +2 -2
  44. package/lib/cjs/src/api/device-action/model/UserInteractionRequired.js +1 -1
  45. package/lib/cjs/src/api/device-action/model/UserInteractionRequired.js.map +2 -2
  46. package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.js +1 -1
  47. package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.js.map +2 -2
  48. package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.test.js +1 -1
  49. package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.test.js.map +2 -2
  50. package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceActionTypes.js +1 -1
  51. package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceActionTypes.js.map +1 -1
  52. package/lib/cjs/src/api/device-action/os/Errors.js +1 -1
  53. package/lib/cjs/src/api/device-action/os/Errors.js.map +3 -3
  54. package/lib/cjs/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.js +2 -0
  55. package/lib/cjs/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.js.map +7 -0
  56. package/lib/cjs/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.test.js +2 -0
  57. package/lib/cjs/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.test.js.map +7 -0
  58. package/lib/cjs/src/api/device-action/os/GetDeviceMetadata/types.js +2 -0
  59. package/lib/cjs/src/api/device-action/os/GetDeviceMetadata/types.js.map +7 -0
  60. package/lib/cjs/src/api/device-action/os/GoToDashboard/types.js +1 -1
  61. package/lib/cjs/src/api/device-action/os/GoToDashboard/types.js.map +1 -1
  62. package/lib/cjs/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.js +2 -0
  63. package/lib/cjs/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.js.map +7 -0
  64. package/lib/cjs/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.test.js +2 -0
  65. package/lib/cjs/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.test.js.map +7 -0
  66. package/lib/cjs/src/api/device-action/os/InstallOrUpdateApps/types.js +2 -0
  67. package/lib/cjs/src/api/device-action/os/InstallOrUpdateApps/types.js.map +7 -0
  68. package/lib/cjs/src/api/device-action/os/ListApps/ListAppsDeviceAction.js +1 -1
  69. package/lib/cjs/src/api/device-action/os/ListApps/ListAppsDeviceAction.js.map +2 -2
  70. package/lib/cjs/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.js +1 -1
  71. package/lib/cjs/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.js.map +2 -2
  72. package/lib/cjs/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.test.js +1 -1
  73. package/lib/cjs/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.test.js.map +2 -2
  74. package/lib/cjs/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.js +2 -0
  75. package/lib/cjs/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.js.map +7 -0
  76. package/lib/cjs/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.test.js +2 -0
  77. package/lib/cjs/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.test.js.map +7 -0
  78. package/lib/cjs/src/api/device-action/os/OpenAppWithDependencies/types.js +2 -0
  79. package/lib/cjs/src/api/device-action/os/OpenAppWithDependencies/types.js.map +7 -0
  80. package/lib/cjs/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.js +1 -1
  81. package/lib/cjs/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.js.map +2 -2
  82. package/lib/cjs/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.test.js +1 -1
  83. package/lib/cjs/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.test.js.map +2 -2
  84. package/lib/cjs/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceActionTypes.js.map +1 -1
  85. package/lib/cjs/src/api/device-action/task/BuildAppsInstallPlanTask.js +2 -0
  86. package/lib/cjs/src/api/device-action/task/BuildAppsInstallPlanTask.js.map +7 -0
  87. package/lib/cjs/src/api/device-action/task/BuildAppsInstallPlanTask.test.js +2 -0
  88. package/lib/cjs/src/api/device-action/task/BuildAppsInstallPlanTask.test.js.map +7 -0
  89. package/lib/cjs/src/api/device-action/task/GetApplicationsMetadataTask.js +2 -0
  90. package/lib/cjs/src/api/device-action/task/GetApplicationsMetadataTask.js.map +7 -0
  91. package/lib/cjs/src/api/device-action/task/GetApplicationsMetadataTask.test.js +2 -0
  92. package/lib/cjs/src/api/device-action/task/GetApplicationsMetadataTask.test.js.map +7 -0
  93. package/lib/cjs/src/api/device-action/task/GetFirmwareMetadataTask.js +2 -0
  94. package/lib/cjs/src/api/device-action/task/GetFirmwareMetadataTask.js.map +7 -0
  95. package/lib/cjs/src/api/device-action/task/GetFirmwareMetadataTask.test.js +2 -0
  96. package/lib/cjs/src/api/device-action/task/GetFirmwareMetadataTask.test.js.map +7 -0
  97. package/lib/cjs/src/api/device-action/task/PredictOutOfMemoryTask.js +2 -0
  98. package/lib/cjs/src/api/device-action/task/PredictOutOfMemoryTask.js.map +7 -0
  99. package/lib/cjs/src/api/device-action/task/PredictOutOfMemoryTask.test.js +2 -0
  100. package/lib/cjs/src/api/device-action/task/PredictOutOfMemoryTask.test.js.map +7 -0
  101. package/lib/cjs/src/api/device-model/data/StaticDeviceModelDataSource.js +1 -1
  102. package/lib/cjs/src/api/device-model/data/StaticDeviceModelDataSource.js.map +2 -2
  103. package/lib/cjs/src/api/device-model/model/DeviceModel.js +1 -1
  104. package/lib/cjs/src/api/device-model/model/DeviceModel.js.map +2 -2
  105. package/lib/cjs/src/api/device-model/model/DeviceModel.stub.js +1 -1
  106. package/lib/cjs/src/api/device-model/model/DeviceModel.stub.js.map +2 -2
  107. package/lib/cjs/src/api/device-session/DeviceSessionState.js +1 -1
  108. package/lib/cjs/src/api/device-session/DeviceSessionState.js.map +2 -2
  109. package/lib/cjs/src/api/index.js +1 -1
  110. package/lib/cjs/src/api/index.js.map +3 -3
  111. package/lib/cjs/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.js +1 -1
  112. package/lib/cjs/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.js.map +2 -2
  113. package/lib/cjs/src/api/secure-channel/device-action/GenuineCheck/types.js.map +1 -1
  114. package/lib/cjs/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.js +1 -1
  115. package/lib/cjs/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.js.map +3 -3
  116. package/lib/cjs/src/api/secure-channel/device-action/InstallApp/types.js +1 -1
  117. package/lib/cjs/src/api/secure-channel/device-action/InstallApp/types.js.map +1 -1
  118. package/lib/cjs/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.js +1 -1
  119. package/lib/cjs/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.js.map +2 -2
  120. package/lib/cjs/src/api/secure-channel/device-action/ListInstalledApps/types.js +1 -1
  121. package/lib/cjs/src/api/secure-channel/device-action/ListInstalledApps/types.js.map +2 -2
  122. package/lib/cjs/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.js +1 -1
  123. package/lib/cjs/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.js.map +3 -3
  124. package/lib/cjs/src/api/secure-channel/device-action/UninstallApp/types.js +1 -1
  125. package/lib/cjs/src/api/secure-channel/device-action/UninstallApp/types.js.map +1 -1
  126. package/lib/cjs/src/api/secure-channel/task/ConnectToSecureChannelTask.js +1 -1
  127. package/lib/cjs/src/api/secure-channel/task/ConnectToSecureChannelTask.js.map +3 -3
  128. package/lib/cjs/src/api/secure-channel/task/ConnectToSecureChannelTask.test.js +1 -1
  129. package/lib/cjs/src/api/secure-channel/task/ConnectToSecureChannelTask.test.js.map +3 -3
  130. package/lib/cjs/src/api/secure-channel/task/types.js +1 -1
  131. package/lib/cjs/src/api/secure-channel/task/types.js.map +2 -2
  132. package/lib/cjs/src/api/secure-channel/utils.js +1 -1
  133. package/lib/cjs/src/api/secure-channel/utils.js.map +3 -3
  134. package/lib/cjs/src/api/secure-channel/utils.test.js +1 -1
  135. package/lib/cjs/src/api/secure-channel/utils.test.js.map +3 -3
  136. package/lib/cjs/src/api/transport/model/DeviceConnectionStateMachine.js +1 -1
  137. package/lib/cjs/src/api/transport/model/DeviceConnectionStateMachine.js.map +3 -3
  138. package/lib/cjs/src/api/transport/model/DeviceConnectionStateMachine.test.js +2 -0
  139. package/lib/cjs/src/api/transport/model/DeviceConnectionStateMachine.test.js.map +7 -0
  140. package/lib/cjs/src/api/transport/model/Errors.js +1 -1
  141. package/lib/cjs/src/api/transport/model/Errors.js.map +2 -2
  142. package/lib/cjs/src/api/types.js +1 -1
  143. package/lib/cjs/src/api/types.js.map +1 -1
  144. package/lib/cjs/src/di.js +1 -1
  145. package/lib/cjs/src/di.js.map +2 -2
  146. package/lib/cjs/src/internal/config/di/configModule.js +1 -1
  147. package/lib/cjs/src/internal/config/di/configModule.js.map +3 -3
  148. package/lib/cjs/src/internal/config/di/configModule.test.js +1 -1
  149. package/lib/cjs/src/internal/config/di/configModule.test.js.map +2 -2
  150. package/lib/cjs/src/internal/device-model/di/deviceModelModule.js +1 -1
  151. package/lib/cjs/src/internal/device-model/di/deviceModelModule.js.map +3 -3
  152. package/lib/cjs/src/internal/device-model/di/deviceModelModule.test.js +1 -1
  153. package/lib/cjs/src/internal/device-model/di/deviceModelModule.test.js.map +2 -2
  154. package/lib/cjs/src/internal/device-session/di/deviceSessionModule.js +1 -1
  155. package/lib/cjs/src/internal/device-session/di/deviceSessionModule.js.map +3 -3
  156. package/lib/cjs/src/internal/device-session/di/deviceSessionModule.test.js +1 -1
  157. package/lib/cjs/src/internal/device-session/di/deviceSessionModule.test.js.map +2 -2
  158. package/lib/cjs/src/internal/device-session/model/DeviceSession.js +1 -1
  159. package/lib/cjs/src/internal/device-session/model/DeviceSession.js.map +2 -2
  160. package/lib/cjs/src/internal/device-session/model/DeviceSessionStateHandler.js +1 -1
  161. package/lib/cjs/src/internal/device-session/model/DeviceSessionStateHandler.js.map +3 -3
  162. package/lib/cjs/src/internal/device-session/model/DeviceSessionStateHandler.test.js +1 -1
  163. package/lib/cjs/src/internal/device-session/model/DeviceSessionStateHandler.test.js.map +2 -2
  164. package/lib/cjs/src/internal/discovery/di/discoveryModule.js +1 -1
  165. package/lib/cjs/src/internal/discovery/di/discoveryModule.js.map +3 -3
  166. package/lib/cjs/src/internal/discovery/di/discoveryModule.test.js +1 -1
  167. package/lib/cjs/src/internal/discovery/di/discoveryModule.test.js.map +2 -2
  168. package/lib/cjs/src/internal/discovery/use-case/DisconnectUseCase.test.js +1 -1
  169. package/lib/cjs/src/internal/discovery/use-case/DisconnectUseCase.test.js.map +2 -2
  170. package/lib/cjs/src/internal/discovery/use-case/StopDiscoveringUseCase.js +1 -1
  171. package/lib/cjs/src/internal/discovery/use-case/StopDiscoveringUseCase.js.map +3 -3
  172. package/lib/cjs/src/internal/discovery/use-case/StopDiscoveringUseCase.test.js +1 -1
  173. package/lib/cjs/src/internal/discovery/use-case/StopDiscoveringUseCase.test.js.map +3 -3
  174. package/lib/cjs/src/internal/logger-publisher/di/loggerModule.js +1 -1
  175. package/lib/cjs/src/internal/logger-publisher/di/loggerModule.js.map +3 -3
  176. package/lib/cjs/src/internal/logger-publisher/di/loggerModule.test.js +1 -1
  177. package/lib/cjs/src/internal/logger-publisher/di/loggerModule.test.js.map +2 -2
  178. package/lib/cjs/src/internal/manager-api/data/AxiosManagerApiDataSource.js +1 -1
  179. package/lib/cjs/src/internal/manager-api/data/AxiosManagerApiDataSource.js.map +3 -3
  180. package/lib/cjs/src/internal/manager-api/data/AxiosManagerApiDataSource.test.js +1 -1
  181. package/lib/cjs/src/internal/manager-api/data/AxiosManagerApiDataSource.test.js.map +3 -3
  182. package/lib/cjs/src/internal/manager-api/data/ManagerApiDataSource.js +1 -1
  183. package/lib/cjs/src/internal/manager-api/data/ManagerApiDataSource.js.map +1 -1
  184. package/lib/cjs/src/internal/manager-api/data/ManagerApiDto.js +1 -1
  185. package/lib/cjs/src/internal/manager-api/data/ManagerApiDto.js.map +1 -1
  186. package/lib/cjs/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.js +1 -1
  187. package/lib/cjs/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.js.map +2 -2
  188. package/lib/cjs/src/internal/manager-api/di/managerApiModule.js +1 -1
  189. package/lib/cjs/src/internal/manager-api/di/managerApiModule.js.map +3 -3
  190. package/lib/cjs/src/internal/manager-api/di/managerApiModule.test.js +1 -1
  191. package/lib/cjs/src/internal/manager-api/di/managerApiModule.test.js.map +2 -2
  192. package/lib/cjs/src/internal/manager-api/model/Application.js +1 -1
  193. package/lib/cjs/src/internal/manager-api/model/Application.js.map +1 -1
  194. package/lib/cjs/src/internal/manager-api/model/Const.js +1 -1
  195. package/lib/cjs/src/internal/manager-api/model/Const.js.map +3 -3
  196. package/lib/cjs/src/internal/manager-api/model/Firmware.js +1 -1
  197. package/lib/cjs/src/internal/manager-api/model/Firmware.js.map +1 -1
  198. package/lib/cjs/src/internal/manager-api/model/Language.js +2 -0
  199. package/lib/cjs/src/internal/manager-api/model/Language.js.map +7 -0
  200. package/lib/cjs/src/internal/manager-api/model/Params.js +1 -1
  201. package/lib/cjs/src/internal/manager-api/model/Params.js.map +1 -1
  202. package/lib/cjs/src/internal/manager-api/service/DefaultManagerApiService.js +1 -1
  203. package/lib/cjs/src/internal/manager-api/service/DefaultManagerApiService.js.map +3 -3
  204. package/lib/cjs/src/internal/manager-api/service/DefaultManagerApiService.test.js +1 -1
  205. package/lib/cjs/src/internal/manager-api/service/DefaultManagerApiService.test.js.map +3 -3
  206. package/lib/cjs/src/internal/manager-api/service/ManagerApiService.js +1 -1
  207. package/lib/cjs/src/internal/manager-api/service/ManagerApiService.js.map +1 -1
  208. package/lib/cjs/src/internal/manager-api/use-case/SetProviderUseCase.js +1 -1
  209. package/lib/cjs/src/internal/manager-api/use-case/SetProviderUseCase.js.map +3 -3
  210. package/lib/cjs/src/internal/manager-api/use-case/SetProviderUseCase.test.js +1 -1
  211. package/lib/cjs/src/internal/manager-api/use-case/SetProviderUseCase.test.js.map +3 -3
  212. package/lib/cjs/src/internal/secure-channel/di/secureChannelModule.js +1 -1
  213. package/lib/cjs/src/internal/secure-channel/di/secureChannelModule.js.map +3 -3
  214. package/lib/cjs/src/internal/secure-channel/di/secureChannelModule.test.js +1 -1
  215. package/lib/cjs/src/internal/secure-channel/di/secureChannelModule.test.js.map +2 -2
  216. package/lib/cjs/src/internal/secure-channel/model/Errors.js +1 -1
  217. package/lib/cjs/src/internal/secure-channel/model/Errors.js.map +3 -3
  218. package/lib/cjs/src/internal/secure-channel/service/DefaultSecureChannelService.js +1 -1
  219. package/lib/cjs/src/internal/secure-channel/service/DefaultSecureChannelService.js.map +3 -3
  220. package/lib/cjs/src/internal/secure-channel/service/DefaultSecureChannelService.test.js +1 -1
  221. package/lib/cjs/src/internal/secure-channel/service/DefaultSecureChannelService.test.js.map +3 -3
  222. package/lib/cjs/src/internal/secure-channel/service/SecureChannelService.js +1 -1
  223. package/lib/cjs/src/internal/secure-channel/service/SecureChannelService.js.map +1 -1
  224. package/lib/cjs/src/internal/send/di/sendModule.js +1 -1
  225. package/lib/cjs/src/internal/send/di/sendModule.js.map +3 -3
  226. package/lib/cjs/src/internal/send/di/sendModule.test.js +1 -1
  227. package/lib/cjs/src/internal/send/di/sendModule.test.js.map +2 -2
  228. package/lib/cjs/src/internal/send/use-case/SendApduUseCase.js +1 -1
  229. package/lib/cjs/src/internal/send/use-case/SendApduUseCase.js.map +3 -3
  230. package/lib/cjs/src/internal/transport/di/transportModule.js +1 -1
  231. package/lib/cjs/src/internal/transport/di/transportModule.js.map +3 -3
  232. package/lib/cjs/src/internal/transport/di/transportModule.test.js +1 -1
  233. package/lib/cjs/src/internal/transport/di/transportModule.test.js.map +2 -2
  234. package/lib/esm/package.json +22 -23
  235. package/lib/esm/src/api/DeviceManagementKit.test.js +1 -1
  236. package/lib/esm/src/api/DeviceManagementKit.test.js.map +2 -2
  237. package/lib/esm/src/api/DeviceManagementKitBuilder.js +1 -1
  238. package/lib/esm/src/api/DeviceManagementKitBuilder.js.map +3 -3
  239. package/lib/esm/src/api/apdu/utils/ByteArrayBuilder.js +1 -1
  240. package/lib/esm/src/api/apdu/utils/ByteArrayBuilder.js.map +3 -3
  241. package/lib/esm/src/api/apdu/utils/ByteArrayBuilder.test.js +1 -1
  242. package/lib/esm/src/api/apdu/utils/ByteArrayBuilder.test.js.map +2 -2
  243. package/lib/esm/src/api/command/di/commandModule.js +1 -1
  244. package/lib/esm/src/api/command/di/commandModule.js.map +3 -3
  245. package/lib/esm/src/api/command/di/commandModule.test.js +1 -1
  246. package/lib/esm/src/api/command/di/commandModule.test.js.map +2 -2
  247. package/lib/esm/src/api/command/os/GetCustomImageSizeCommand.js +2 -0
  248. package/lib/esm/src/api/command/os/GetCustomImageSizeCommand.js.map +7 -0
  249. package/lib/esm/src/api/command/os/GetCustomImageSizeCommand.test.js +2 -0
  250. package/lib/esm/src/api/command/os/GetCustomImageSizeCommand.test.js.map +7 -0
  251. package/lib/esm/src/api/command/os/GetOsVersionCommand.js +1 -1
  252. package/lib/esm/src/api/command/os/GetOsVersionCommand.js.map +3 -3
  253. package/lib/esm/src/api/command/os/GetOsVersionCommand.test.js +1 -1
  254. package/lib/esm/src/api/command/os/GetOsVersionCommand.test.js.map +3 -3
  255. package/lib/esm/src/api/command/os/ListLanguagePackCommand.js +2 -0
  256. package/lib/esm/src/api/command/os/ListLanguagePackCommand.js.map +7 -0
  257. package/lib/esm/src/api/command/os/ListLanguagePackCommand.test.js +2 -0
  258. package/lib/esm/src/api/command/os/ListLanguagePackCommand.test.js.map +7 -0
  259. package/lib/esm/src/api/command/os/__mocks__/GetOsVersionCommand.js +1 -1
  260. package/lib/esm/src/api/command/os/__mocks__/GetOsVersionCommand.js.map +2 -2
  261. package/lib/esm/src/api/command/utils/CommandUtils.js +1 -1
  262. package/lib/esm/src/api/command/utils/CommandUtils.js.map +3 -3
  263. package/lib/esm/src/api/command/utils/CommandUtils.test.js +1 -1
  264. package/lib/esm/src/api/command/utils/CommandUtils.test.js.map +2 -2
  265. package/lib/esm/src/api/device-action/__test-utils__/makeInternalApi.js +1 -1
  266. package/lib/esm/src/api/device-action/__test-utils__/makeInternalApi.js.map +3 -3
  267. package/lib/esm/src/api/device-action/__test-utils__/setupTestMachine.js +1 -1
  268. package/lib/esm/src/api/device-action/__test-utils__/setupTestMachine.js.map +3 -3
  269. package/lib/esm/src/api/device-action/di/deviceActionModule.js +1 -1
  270. package/lib/esm/src/api/device-action/di/deviceActionModule.js.map +3 -3
  271. package/lib/esm/src/api/device-action/di/deviceActionModule.test.js +1 -1
  272. package/lib/esm/src/api/device-action/di/deviceActionModule.test.js.map +2 -2
  273. package/lib/esm/src/api/device-action/model/UserInteractionRequired.js +1 -1
  274. package/lib/esm/src/api/device-action/model/UserInteractionRequired.js.map +2 -2
  275. package/lib/esm/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.js +1 -1
  276. package/lib/esm/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.js.map +2 -2
  277. package/lib/esm/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.test.js +1 -1
  278. package/lib/esm/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.test.js.map +2 -2
  279. package/lib/esm/src/api/device-action/os/Errors.js +1 -1
  280. package/lib/esm/src/api/device-action/os/Errors.js.map +3 -3
  281. package/lib/esm/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.js +2 -0
  282. package/lib/esm/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.js.map +7 -0
  283. package/lib/esm/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.test.js +2 -0
  284. package/lib/esm/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.test.js.map +7 -0
  285. package/lib/esm/src/api/device-action/os/GetDeviceMetadata/types.js +1 -0
  286. package/lib/esm/src/api/device-action/os/GetDeviceMetadata/types.js.map +7 -0
  287. package/lib/esm/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.js +2 -0
  288. package/lib/esm/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.js.map +7 -0
  289. package/lib/esm/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.test.js +2 -0
  290. package/lib/esm/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.test.js.map +7 -0
  291. package/lib/esm/src/api/device-action/os/InstallOrUpdateApps/types.js +1 -0
  292. package/lib/esm/src/api/device-action/os/InstallOrUpdateApps/types.js.map +7 -0
  293. package/lib/esm/src/api/device-action/os/ListApps/ListAppsDeviceAction.js +1 -1
  294. package/lib/esm/src/api/device-action/os/ListApps/ListAppsDeviceAction.js.map +2 -2
  295. package/lib/esm/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.js +1 -1
  296. package/lib/esm/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.js.map +3 -3
  297. package/lib/esm/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.test.js +1 -1
  298. package/lib/esm/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.test.js.map +3 -3
  299. package/lib/esm/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.js +2 -0
  300. package/lib/esm/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.js.map +7 -0
  301. package/lib/esm/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.test.js +2 -0
  302. package/lib/esm/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.test.js.map +7 -0
  303. package/lib/esm/src/api/device-action/os/OpenAppWithDependencies/types.js +1 -0
  304. package/lib/esm/src/api/device-action/os/OpenAppWithDependencies/types.js.map +7 -0
  305. package/lib/esm/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.js +1 -1
  306. package/lib/esm/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.js.map +2 -2
  307. package/lib/esm/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.test.js +1 -1
  308. package/lib/esm/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.test.js.map +2 -2
  309. package/lib/esm/src/api/device-action/task/BuildAppsInstallPlanTask.js +2 -0
  310. package/lib/esm/src/api/device-action/task/BuildAppsInstallPlanTask.js.map +7 -0
  311. package/lib/esm/src/api/device-action/task/BuildAppsInstallPlanTask.test.js +2 -0
  312. package/lib/esm/src/api/device-action/task/BuildAppsInstallPlanTask.test.js.map +7 -0
  313. package/lib/esm/src/api/device-action/task/GetApplicationsMetadataTask.js +2 -0
  314. package/lib/esm/src/api/device-action/task/GetApplicationsMetadataTask.js.map +7 -0
  315. package/lib/esm/src/api/device-action/task/GetApplicationsMetadataTask.test.js +2 -0
  316. package/lib/esm/src/api/device-action/task/GetApplicationsMetadataTask.test.js.map +7 -0
  317. package/lib/esm/src/api/device-action/task/GetFirmwareMetadataTask.js +2 -0
  318. package/lib/esm/src/api/device-action/task/GetFirmwareMetadataTask.js.map +7 -0
  319. package/lib/esm/src/api/device-action/task/GetFirmwareMetadataTask.test.js +2 -0
  320. package/lib/esm/src/api/device-action/task/GetFirmwareMetadataTask.test.js.map +7 -0
  321. package/lib/esm/src/api/device-action/task/PredictOutOfMemoryTask.js +2 -0
  322. package/lib/esm/src/api/device-action/task/PredictOutOfMemoryTask.js.map +7 -0
  323. package/lib/esm/src/api/device-action/task/PredictOutOfMemoryTask.test.js +2 -0
  324. package/lib/esm/src/api/device-action/task/PredictOutOfMemoryTask.test.js.map +7 -0
  325. package/lib/esm/src/api/device-model/data/StaticDeviceModelDataSource.js +1 -1
  326. package/lib/esm/src/api/device-model/data/StaticDeviceModelDataSource.js.map +2 -2
  327. package/lib/esm/src/api/device-model/model/DeviceModel.js +1 -1
  328. package/lib/esm/src/api/device-model/model/DeviceModel.js.map +2 -2
  329. package/lib/esm/src/api/device-model/model/DeviceModel.stub.js +1 -1
  330. package/lib/esm/src/api/device-model/model/DeviceModel.stub.js.map +2 -2
  331. package/lib/esm/src/api/device-session/DeviceSessionState.js +1 -1
  332. package/lib/esm/src/api/device-session/DeviceSessionState.js.map +2 -2
  333. package/lib/esm/src/api/index.js +1 -1
  334. package/lib/esm/src/api/index.js.map +3 -3
  335. package/lib/esm/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.js +1 -1
  336. package/lib/esm/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.js.map +2 -2
  337. package/lib/esm/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.js +1 -1
  338. package/lib/esm/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.js.map +3 -3
  339. package/lib/esm/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.js +1 -1
  340. package/lib/esm/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.js.map +2 -2
  341. package/lib/esm/src/api/secure-channel/device-action/ListInstalledApps/types.js +1 -1
  342. package/lib/esm/src/api/secure-channel/device-action/ListInstalledApps/types.js.map +2 -2
  343. package/lib/esm/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.js +1 -1
  344. package/lib/esm/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.js.map +3 -3
  345. package/lib/esm/src/api/secure-channel/task/ConnectToSecureChannelTask.js +1 -1
  346. package/lib/esm/src/api/secure-channel/task/ConnectToSecureChannelTask.js.map +3 -3
  347. package/lib/esm/src/api/secure-channel/task/ConnectToSecureChannelTask.test.js +1 -1
  348. package/lib/esm/src/api/secure-channel/task/ConnectToSecureChannelTask.test.js.map +3 -3
  349. package/lib/esm/src/api/secure-channel/task/types.js +1 -1
  350. package/lib/esm/src/api/secure-channel/task/types.js.map +2 -2
  351. package/lib/esm/src/api/secure-channel/utils.js +1 -1
  352. package/lib/esm/src/api/secure-channel/utils.js.map +3 -3
  353. package/lib/esm/src/api/secure-channel/utils.test.js +1 -1
  354. package/lib/esm/src/api/secure-channel/utils.test.js.map +3 -3
  355. package/lib/esm/src/api/transport/model/DeviceConnectionStateMachine.js +1 -1
  356. package/lib/esm/src/api/transport/model/DeviceConnectionStateMachine.js.map +3 -3
  357. package/lib/esm/src/api/transport/model/DeviceConnectionStateMachine.test.js +2 -0
  358. package/lib/esm/src/api/transport/model/DeviceConnectionStateMachine.test.js.map +7 -0
  359. package/lib/esm/src/api/transport/model/Errors.js +1 -1
  360. package/lib/esm/src/api/transport/model/Errors.js.map +2 -2
  361. package/lib/esm/src/di.js +1 -1
  362. package/lib/esm/src/di.js.map +3 -3
  363. package/lib/esm/src/internal/config/di/configModule.js +1 -1
  364. package/lib/esm/src/internal/config/di/configModule.js.map +3 -3
  365. package/lib/esm/src/internal/config/di/configModule.test.js +1 -1
  366. package/lib/esm/src/internal/config/di/configModule.test.js.map +2 -2
  367. package/lib/esm/src/internal/device-model/di/deviceModelModule.js +1 -1
  368. package/lib/esm/src/internal/device-model/di/deviceModelModule.js.map +3 -3
  369. package/lib/esm/src/internal/device-model/di/deviceModelModule.test.js +1 -1
  370. package/lib/esm/src/internal/device-model/di/deviceModelModule.test.js.map +2 -2
  371. package/lib/esm/src/internal/device-session/di/deviceSessionModule.js +1 -1
  372. package/lib/esm/src/internal/device-session/di/deviceSessionModule.js.map +3 -3
  373. package/lib/esm/src/internal/device-session/di/deviceSessionModule.test.js +1 -1
  374. package/lib/esm/src/internal/device-session/di/deviceSessionModule.test.js.map +2 -2
  375. package/lib/esm/src/internal/device-session/model/DeviceSession.js +1 -1
  376. package/lib/esm/src/internal/device-session/model/DeviceSession.js.map +2 -2
  377. package/lib/esm/src/internal/device-session/model/DeviceSessionStateHandler.js +1 -1
  378. package/lib/esm/src/internal/device-session/model/DeviceSessionStateHandler.js.map +3 -3
  379. package/lib/esm/src/internal/device-session/model/DeviceSessionStateHandler.test.js +1 -1
  380. package/lib/esm/src/internal/device-session/model/DeviceSessionStateHandler.test.js.map +2 -2
  381. package/lib/esm/src/internal/discovery/di/discoveryModule.js +1 -1
  382. package/lib/esm/src/internal/discovery/di/discoveryModule.js.map +3 -3
  383. package/lib/esm/src/internal/discovery/di/discoveryModule.test.js +1 -1
  384. package/lib/esm/src/internal/discovery/di/discoveryModule.test.js.map +2 -2
  385. package/lib/esm/src/internal/discovery/use-case/DisconnectUseCase.test.js +1 -1
  386. package/lib/esm/src/internal/discovery/use-case/DisconnectUseCase.test.js.map +2 -2
  387. package/lib/esm/src/internal/discovery/use-case/StopDiscoveringUseCase.js +1 -1
  388. package/lib/esm/src/internal/discovery/use-case/StopDiscoveringUseCase.js.map +3 -3
  389. package/lib/esm/src/internal/discovery/use-case/StopDiscoveringUseCase.test.js +1 -1
  390. package/lib/esm/src/internal/discovery/use-case/StopDiscoveringUseCase.test.js.map +3 -3
  391. package/lib/esm/src/internal/logger-publisher/di/loggerModule.js +1 -1
  392. package/lib/esm/src/internal/logger-publisher/di/loggerModule.js.map +3 -3
  393. package/lib/esm/src/internal/logger-publisher/di/loggerModule.test.js +1 -1
  394. package/lib/esm/src/internal/logger-publisher/di/loggerModule.test.js.map +2 -2
  395. package/lib/esm/src/internal/manager-api/data/AxiosManagerApiDataSource.js +1 -1
  396. package/lib/esm/src/internal/manager-api/data/AxiosManagerApiDataSource.js.map +3 -3
  397. package/lib/esm/src/internal/manager-api/data/AxiosManagerApiDataSource.test.js +1 -1
  398. package/lib/esm/src/internal/manager-api/data/AxiosManagerApiDataSource.test.js.map +3 -3
  399. package/lib/esm/src/internal/manager-api/data/ManagerApiDto.js +1 -1
  400. package/lib/esm/src/internal/manager-api/data/ManagerApiDto.js.map +1 -1
  401. package/lib/esm/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.js +1 -1
  402. package/lib/esm/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.js.map +2 -2
  403. package/lib/esm/src/internal/manager-api/di/managerApiModule.js +1 -1
  404. package/lib/esm/src/internal/manager-api/di/managerApiModule.js.map +3 -3
  405. package/lib/esm/src/internal/manager-api/di/managerApiModule.test.js +1 -1
  406. package/lib/esm/src/internal/manager-api/di/managerApiModule.test.js.map +2 -2
  407. package/lib/esm/src/internal/manager-api/model/Application.js +1 -1
  408. package/lib/esm/src/internal/manager-api/model/Application.js.map +1 -1
  409. package/lib/esm/src/internal/manager-api/model/Const.js +1 -1
  410. package/lib/esm/src/internal/manager-api/model/Const.js.map +3 -3
  411. package/lib/esm/src/internal/manager-api/model/Language.js +1 -0
  412. package/lib/esm/src/internal/manager-api/model/Language.js.map +7 -0
  413. package/lib/esm/src/internal/manager-api/service/DefaultManagerApiService.js +1 -1
  414. package/lib/esm/src/internal/manager-api/service/DefaultManagerApiService.js.map +3 -3
  415. package/lib/esm/src/internal/manager-api/service/DefaultManagerApiService.test.js +1 -1
  416. package/lib/esm/src/internal/manager-api/service/DefaultManagerApiService.test.js.map +3 -3
  417. package/lib/esm/src/internal/manager-api/use-case/SetProviderUseCase.js +1 -1
  418. package/lib/esm/src/internal/manager-api/use-case/SetProviderUseCase.js.map +3 -3
  419. package/lib/esm/src/internal/manager-api/use-case/SetProviderUseCase.test.js +1 -1
  420. package/lib/esm/src/internal/manager-api/use-case/SetProviderUseCase.test.js.map +3 -3
  421. package/lib/esm/src/internal/secure-channel/di/secureChannelModule.js +1 -1
  422. package/lib/esm/src/internal/secure-channel/di/secureChannelModule.js.map +3 -3
  423. package/lib/esm/src/internal/secure-channel/di/secureChannelModule.test.js +1 -1
  424. package/lib/esm/src/internal/secure-channel/di/secureChannelModule.test.js.map +2 -2
  425. package/lib/esm/src/internal/secure-channel/model/Errors.js +1 -1
  426. package/lib/esm/src/internal/secure-channel/model/Errors.js.map +3 -3
  427. package/lib/esm/src/internal/secure-channel/service/DefaultSecureChannelService.js.map +3 -3
  428. package/lib/esm/src/internal/secure-channel/service/DefaultSecureChannelService.test.js +1 -1
  429. package/lib/esm/src/internal/secure-channel/service/DefaultSecureChannelService.test.js.map +3 -3
  430. package/lib/esm/src/internal/send/di/sendModule.js +1 -1
  431. package/lib/esm/src/internal/send/di/sendModule.js.map +3 -3
  432. package/lib/esm/src/internal/send/di/sendModule.test.js +1 -1
  433. package/lib/esm/src/internal/send/di/sendModule.test.js.map +2 -2
  434. package/lib/esm/src/internal/send/use-case/SendApduUseCase.js +1 -1
  435. package/lib/esm/src/internal/send/use-case/SendApduUseCase.js.map +3 -3
  436. package/lib/esm/src/internal/transport/di/transportModule.js +1 -1
  437. package/lib/esm/src/internal/transport/di/transportModule.js.map +3 -3
  438. package/lib/esm/src/internal/transport/di/transportModule.test.js +1 -1
  439. package/lib/esm/src/internal/transport/di/transportModule.test.js.map +2 -2
  440. package/lib/types/src/api/DeviceManagementKitBuilder.d.ts.map +1 -1
  441. package/lib/types/src/api/DmkConfig.d.ts +1 -0
  442. package/lib/types/src/api/DmkConfig.d.ts.map +1 -1
  443. package/lib/types/src/api/apdu/utils/ApduBuilder.d.ts.map +1 -1
  444. package/lib/types/src/api/apdu/utils/ApduParser.d.ts.map +1 -1
  445. package/lib/types/src/api/apdu/utils/ByteArrayBuilder.d.ts +28 -0
  446. package/lib/types/src/api/apdu/utils/ByteArrayBuilder.d.ts.map +1 -1
  447. package/lib/types/src/api/command/di/commandModule.d.ts.map +1 -1
  448. package/lib/types/src/api/command/os/GetCustomImageSizeCommand.d.ts +16 -0
  449. package/lib/types/src/api/command/os/GetCustomImageSizeCommand.d.ts.map +1 -0
  450. package/lib/types/src/api/command/os/GetCustomImageSizeCommand.test.d.ts +2 -0
  451. package/lib/types/src/api/command/os/GetCustomImageSizeCommand.test.d.ts.map +1 -0
  452. package/lib/types/src/api/command/os/GetOsVersionCommand.d.ts +30 -2
  453. package/lib/types/src/api/command/os/GetOsVersionCommand.d.ts.map +1 -1
  454. package/lib/types/src/api/command/os/ListLanguagePackCommand.d.ts +24 -0
  455. package/lib/types/src/api/command/os/ListLanguagePackCommand.d.ts.map +1 -0
  456. package/lib/types/src/api/command/os/ListLanguagePackCommand.test.d.ts +2 -0
  457. package/lib/types/src/api/command/os/ListLanguagePackCommand.test.d.ts.map +1 -0
  458. package/lib/types/src/api/command/os/__mocks__/GetOsVersionCommand.d.ts.map +1 -1
  459. package/lib/types/src/api/command/utils/CommandErrors.d.ts.map +1 -1
  460. package/lib/types/src/api/command/utils/CommandUtils.d.ts +3 -0
  461. package/lib/types/src/api/command/utils/CommandUtils.d.ts.map +1 -1
  462. package/lib/types/src/api/device-action/DeviceAction.d.ts +2 -0
  463. package/lib/types/src/api/device-action/DeviceAction.d.ts.map +1 -1
  464. package/lib/types/src/api/device-action/__test-utils__/makeInternalApi.d.ts.map +1 -1
  465. package/lib/types/src/api/device-action/__test-utils__/setupTestMachine.d.ts +5 -0
  466. package/lib/types/src/api/device-action/__test-utils__/setupTestMachine.d.ts.map +1 -1
  467. package/lib/types/src/api/device-action/di/deviceActionModule.d.ts.map +1 -1
  468. package/lib/types/src/api/device-action/model/UserInteractionRequired.d.ts +1 -0
  469. package/lib/types/src/api/device-action/model/UserInteractionRequired.d.ts.map +1 -1
  470. package/lib/types/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.d.ts.map +1 -1
  471. package/lib/types/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceActionTypes.d.ts +1 -0
  472. package/lib/types/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceActionTypes.d.ts.map +1 -1
  473. package/lib/types/src/api/device-action/os/Errors.d.ts +20 -0
  474. package/lib/types/src/api/device-action/os/Errors.d.ts.map +1 -1
  475. package/lib/types/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.d.ts +58 -0
  476. package/lib/types/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.d.ts.map +1 -0
  477. package/lib/types/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.test.d.ts +2 -0
  478. package/lib/types/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.test.d.ts.map +1 -0
  479. package/lib/types/src/api/device-action/os/GetDeviceMetadata/types.d.ts +28 -0
  480. package/lib/types/src/api/device-action/os/GetDeviceMetadata/types.d.ts.map +1 -0
  481. package/lib/types/src/api/device-action/os/GoToDashboard/types.d.ts +3 -4
  482. package/lib/types/src/api/device-action/os/GoToDashboard/types.d.ts.map +1 -1
  483. package/lib/types/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.d.ts +40 -0
  484. package/lib/types/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.d.ts.map +1 -0
  485. package/lib/types/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.test.d.ts +2 -0
  486. package/lib/types/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.test.d.ts.map +1 -0
  487. package/lib/types/src/api/device-action/os/InstallOrUpdateApps/types.d.ts +65 -0
  488. package/lib/types/src/api/device-action/os/InstallOrUpdateApps/types.d.ts.map +1 -0
  489. package/lib/types/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.d.ts.map +1 -1
  490. package/lib/types/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.d.ts +15 -0
  491. package/lib/types/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.d.ts.map +1 -0
  492. package/lib/types/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.test.d.ts +2 -0
  493. package/lib/types/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.test.d.ts.map +1 -0
  494. package/lib/types/src/api/device-action/os/OpenAppWithDependencies/types.d.ts +25 -0
  495. package/lib/types/src/api/device-action/os/OpenAppWithDependencies/types.d.ts.map +1 -0
  496. package/lib/types/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.d.ts.map +1 -1
  497. package/lib/types/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceActionTypes.d.ts +1 -0
  498. package/lib/types/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceActionTypes.d.ts.map +1 -1
  499. package/lib/types/src/api/device-action/task/BuildAppsInstallPlanTask.d.ts +30 -0
  500. package/lib/types/src/api/device-action/task/BuildAppsInstallPlanTask.d.ts.map +1 -0
  501. package/lib/types/src/api/device-action/task/BuildAppsInstallPlanTask.test.d.ts +2 -0
  502. package/lib/types/src/api/device-action/task/BuildAppsInstallPlanTask.test.d.ts.map +1 -0
  503. package/lib/types/src/api/device-action/task/GetApplicationsMetadataTask.d.ts +31 -0
  504. package/lib/types/src/api/device-action/task/GetApplicationsMetadataTask.d.ts.map +1 -0
  505. package/lib/types/src/api/device-action/task/GetApplicationsMetadataTask.test.d.ts +2 -0
  506. package/lib/types/src/api/device-action/task/GetApplicationsMetadataTask.test.d.ts.map +1 -0
  507. package/lib/types/src/api/device-action/task/GetFirmwareMetadataTask.d.ts +18 -0
  508. package/lib/types/src/api/device-action/task/GetFirmwareMetadataTask.d.ts.map +1 -0
  509. package/lib/types/src/api/device-action/task/GetFirmwareMetadataTask.test.d.ts +2 -0
  510. package/lib/types/src/api/device-action/task/GetFirmwareMetadataTask.test.d.ts.map +1 -0
  511. package/lib/types/src/api/device-action/task/PredictOutOfMemoryTask.d.ts +21 -0
  512. package/lib/types/src/api/device-action/task/PredictOutOfMemoryTask.d.ts.map +1 -0
  513. package/lib/types/src/api/device-action/task/PredictOutOfMemoryTask.test.d.ts +2 -0
  514. package/lib/types/src/api/device-action/task/PredictOutOfMemoryTask.test.d.ts.map +1 -0
  515. package/lib/types/src/api/device-model/data/StaticDeviceModelDataSource.d.ts.map +1 -1
  516. package/lib/types/src/api/device-model/model/DeviceModel.d.ts +2 -0
  517. package/lib/types/src/api/device-model/model/DeviceModel.d.ts.map +1 -1
  518. package/lib/types/src/api/device-model/model/DeviceModel.stub.d.ts.map +1 -1
  519. package/lib/types/src/api/device-session/DeviceSessionState.d.ts +93 -0
  520. package/lib/types/src/api/device-session/DeviceSessionState.d.ts.map +1 -1
  521. package/lib/types/src/api/device-session/service/DefaultApduReceiverService.stub.d.ts.map +1 -1
  522. package/lib/types/src/api/device-session/service/DefaultApduSenderService.stub.d.ts.map +1 -1
  523. package/lib/types/src/api/index.d.ts +5 -1
  524. package/lib/types/src/api/index.d.ts.map +1 -1
  525. package/lib/types/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.d.ts.map +1 -1
  526. package/lib/types/src/api/secure-channel/device-action/GenuineCheck/types.d.ts +2 -1
  527. package/lib/types/src/api/secure-channel/device-action/GenuineCheck/types.d.ts.map +1 -1
  528. package/lib/types/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.d.ts.map +1 -1
  529. package/lib/types/src/api/secure-channel/device-action/InstallApp/types.d.ts +2 -1
  530. package/lib/types/src/api/secure-channel/device-action/InstallApp/types.d.ts.map +1 -1
  531. package/lib/types/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.d.ts.map +1 -1
  532. package/lib/types/src/api/secure-channel/device-action/ListInstalledApps/types.d.ts +2 -1
  533. package/lib/types/src/api/secure-channel/device-action/ListInstalledApps/types.d.ts.map +1 -1
  534. package/lib/types/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.d.ts.map +1 -1
  535. package/lib/types/src/api/secure-channel/device-action/UninstallApp/types.d.ts +2 -1
  536. package/lib/types/src/api/secure-channel/device-action/UninstallApp/types.d.ts.map +1 -1
  537. package/lib/types/src/api/secure-channel/task/ConnectToSecureChannelTask.d.ts +5 -2
  538. package/lib/types/src/api/secure-channel/task/ConnectToSecureChannelTask.d.ts.map +1 -1
  539. package/lib/types/src/api/secure-channel/task/types.d.ts +6 -1
  540. package/lib/types/src/api/secure-channel/task/types.d.ts.map +1 -1
  541. package/lib/types/src/api/secure-channel/utils.d.ts +0 -11
  542. package/lib/types/src/api/secure-channel/utils.d.ts.map +1 -1
  543. package/lib/types/src/api/transport/model/DeviceConnectionStateMachine.d.ts.map +1 -1
  544. package/lib/types/src/api/transport/model/DeviceConnectionStateMachine.test.d.ts +2 -0
  545. package/lib/types/src/api/transport/model/DeviceConnectionStateMachine.test.d.ts.map +1 -0
  546. package/lib/types/src/api/transport/model/Errors.d.ts +2 -3
  547. package/lib/types/src/api/transport/model/Errors.d.ts.map +1 -1
  548. package/lib/types/src/api/types.d.ts +4 -1
  549. package/lib/types/src/api/types.d.ts.map +1 -1
  550. package/lib/types/src/api/utils/HexaString.d.ts.map +1 -1
  551. package/lib/types/src/di.d.ts.map +1 -1
  552. package/lib/types/src/internal/config/di/configModule.d.ts.map +1 -1
  553. package/lib/types/src/internal/device-model/di/deviceModelModule.d.ts.map +1 -1
  554. package/lib/types/src/internal/device-session/di/deviceSessionModule.d.ts.map +1 -1
  555. package/lib/types/src/internal/device-session/model/DeviceSession.d.ts +1 -0
  556. package/lib/types/src/internal/device-session/model/DeviceSession.d.ts.map +1 -1
  557. package/lib/types/src/internal/device-session/model/DeviceSession.stub.d.ts.map +1 -1
  558. package/lib/types/src/internal/device-session/model/DeviceSessionStateHandler.d.ts.map +1 -1
  559. package/lib/types/src/internal/device-session/utils/deviceSessionUtils.d.ts.map +1 -1
  560. package/lib/types/src/internal/discovery/di/discoveryModule.d.ts.map +1 -1
  561. package/lib/types/src/internal/discovery/use-case/StopDiscoveringUseCase.d.ts +3 -1
  562. package/lib/types/src/internal/discovery/use-case/StopDiscoveringUseCase.d.ts.map +1 -1
  563. package/lib/types/src/internal/logger-publisher/di/loggerModule.d.ts.map +1 -1
  564. package/lib/types/src/internal/manager-api/data/AxiosManagerApiDataSource.d.ts +20 -4
  565. package/lib/types/src/internal/manager-api/data/AxiosManagerApiDataSource.d.ts.map +1 -1
  566. package/lib/types/src/internal/manager-api/data/ManagerApiDataSource.d.ts +41 -6
  567. package/lib/types/src/internal/manager-api/data/ManagerApiDataSource.d.ts.map +1 -1
  568. package/lib/types/src/internal/manager-api/data/ManagerApiDto.d.ts +104 -18
  569. package/lib/types/src/internal/manager-api/data/ManagerApiDto.d.ts.map +1 -1
  570. package/lib/types/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.d.ts +5 -0
  571. package/lib/types/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.d.ts.map +1 -1
  572. package/lib/types/src/internal/manager-api/di/managerApiModule.d.ts.map +1 -1
  573. package/lib/types/src/internal/manager-api/model/Application.d.ts +12 -12
  574. package/lib/types/src/internal/manager-api/model/Application.d.ts.map +1 -1
  575. package/lib/types/src/internal/manager-api/model/Const.d.ts +1 -0
  576. package/lib/types/src/internal/manager-api/model/Const.d.ts.map +1 -1
  577. package/lib/types/src/internal/manager-api/model/Firmware.d.ts +17 -3
  578. package/lib/types/src/internal/manager-api/model/Firmware.d.ts.map +1 -1
  579. package/lib/types/src/internal/manager-api/model/Language.d.ts +12 -0
  580. package/lib/types/src/internal/manager-api/model/Language.d.ts.map +1 -0
  581. package/lib/types/src/internal/manager-api/model/Params.d.ts +20 -0
  582. package/lib/types/src/internal/manager-api/model/Params.d.ts.map +1 -1
  583. package/lib/types/src/internal/manager-api/service/DefaultManagerApiService.d.ts +7 -1
  584. package/lib/types/src/internal/manager-api/service/DefaultManagerApiService.d.ts.map +1 -1
  585. package/lib/types/src/internal/manager-api/service/ManagerApiService.d.ts +39 -1
  586. package/lib/types/src/internal/manager-api/service/ManagerApiService.d.ts.map +1 -1
  587. package/lib/types/src/internal/manager-api/use-case/SetProviderUseCase.d.ts +3 -1
  588. package/lib/types/src/internal/manager-api/use-case/SetProviderUseCase.d.ts.map +1 -1
  589. package/lib/types/src/internal/secure-channel/di/secureChannelModule.d.ts.map +1 -1
  590. package/lib/types/src/internal/secure-channel/model/Errors.d.ts +22 -2
  591. package/lib/types/src/internal/secure-channel/model/Errors.d.ts.map +1 -1
  592. package/lib/types/src/internal/secure-channel/service/DefaultSecureChannelService.d.ts +2 -2
  593. package/lib/types/src/internal/secure-channel/service/DefaultSecureChannelService.d.ts.map +1 -1
  594. package/lib/types/src/internal/secure-channel/service/SecureChannelService.d.ts +3 -3
  595. package/lib/types/src/internal/secure-channel/service/SecureChannelService.d.ts.map +1 -1
  596. package/lib/types/src/internal/send/di/sendModule.d.ts.map +1 -1
  597. package/lib/types/src/internal/send/use-case/SendApduUseCase.d.ts +5 -1
  598. package/lib/types/src/internal/send/use-case/SendApduUseCase.d.ts.map +1 -1
  599. package/lib/types/src/internal/transport/di/transportModule.d.ts.map +1 -1
  600. package/lib/types/tsconfig.prod.tsbuildinfo +1 -1
  601. package/package.json +17 -18
@@ -1,2 +1,2 @@
1
- "use strict";var d=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var l=(o,e)=>{for(var r in e)d(o,r,{get:e[r],enumerable:!0})},u=(o,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of a(e))!i.call(o,t)&&t!==r&&d(o,t,{get:()=>e[t],enumerable:!(s=c(e,t))||s.enumerable});return o};var p=o=>u(d({},"__esModule",{value:!0}),o);var z={};l(z,{AlreadySendingApduError:()=>C,DeviceAlreadyConnectedError:()=>E,DeviceDisconnectedBeforeSendingApdu:()=>f,DeviceDisconnectedWhileSendingError:()=>T,DeviceNotInitializedError:()=>S,DeviceNotRecognizedError:()=>y,DisconnectError:()=>_,GeneralDmkError:()=>n,NoAccessibleDeviceError:()=>v,NoTransportProvidedError:()=>h,NoTransportsProvidedError:()=>N,OpeningConnectionError:()=>x,ReconnectionFailedError:()=>A,SendApduConcurrencyError:()=>k,SendApduTimeoutError:()=>w,TransportAlreadyExistsError:()=>m,TransportNotSupportedError:()=>D,UnknownDeviceError:()=>g});module.exports=p(z);class n{_tag="GeneralDmkError";originalError;constructor(e){e instanceof Error?this.originalError=e:e!==void 0&&(this.originalError=new Error(String(e)))}}class E extends n{constructor(r){super(r);this.err=r}_tag="DeviceAlreadyDiscoveredError"}class y extends n{constructor(r){super(r);this.err=r}_tag="DeviceNotRecognizedError"}class v extends n{constructor(r){super(r);this.err=r}_tag="NoAccessibleDeviceError"}class x extends n{constructor(r){super(r);this.err=r}_tag="ConnectionOpeningError"}class g extends n{constructor(r){super(r);this.err=r}_tag="UnknownDeviceError"}class D extends n{constructor(r){super(r);this.err=r}_tag="TransportNotSupportedError"}class k extends n{constructor(r){super(r);this.err=r}_tag="SendApduConcurrencyError"}class w extends n{constructor(r){super(r);this.err=r}_tag="SendApduTimeoutError"}class _ extends n{constructor(r){super(r);this.err=r}_tag="DisconnectError"}class A extends n{constructor(r){super(r);this.err=r}_tag="ReconnectionFailedError"}class S extends n{constructor(r){super(r);this.err=r}_tag="DeviceNotInitializedError"}class N extends n{constructor(r){super(r);this.err=r}_tag="NoTransportsProvidedError"}class m extends n{constructor(r){super(r);this.err=r}_tag="TransportAlreadyExistsError"}class T extends n{constructor(r){super(r);this.err=r}_tag="DeviceDisconnectedWhileSendingError"}class C extends n{constructor(r){super(r);this.err=r}_tag="AlreadySendingApduError"}class f extends n{constructor(r){super(r);this.err=r}_tag="DeviceDisconnectedBeforeSendingApdu"}class h extends n{constructor(r){super(r);this.err=r}_tag="NoTransportProvidedError"}0&&(module.exports={AlreadySendingApduError,DeviceAlreadyConnectedError,DeviceDisconnectedBeforeSendingApdu,DeviceDisconnectedWhileSendingError,DeviceNotInitializedError,DeviceNotRecognizedError,DisconnectError,GeneralDmkError,NoAccessibleDeviceError,NoTransportProvidedError,NoTransportsProvidedError,OpeningConnectionError,ReconnectionFailedError,SendApduConcurrencyError,SendApduTimeoutError,TransportAlreadyExistsError,TransportNotSupportedError,UnknownDeviceError});
1
+ "use strict";var s=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var l=(o,e)=>{for(var r in e)s(o,r,{get:e[r],enumerable:!0})},u=(o,e,r,d)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of a(e))!i.call(o,t)&&t!==r&&s(o,t,{get:()=>e[t],enumerable:!(d=c(e,t))||d.enumerable});return o};var p=o=>u(s({},"__esModule",{value:!0}),o);var z={};l(z,{AlreadySendingApduError:()=>C,DeviceAlreadyConnectedError:()=>E,DeviceDisconnectedBeforeSendingApdu:()=>f,DeviceDisconnectedWhileSendingError:()=>T,DeviceNotInitializedError:()=>S,DeviceNotRecognizedError:()=>y,DisconnectError:()=>_,GeneralDmkError:()=>n,NoAccessibleDeviceError:()=>v,NoTransportProvidedError:()=>h,NoTransportsProvidedError:()=>N,OpeningConnectionError:()=>x,ReconnectionFailedError:()=>A,SendApduConcurrencyError:()=>k,SendApduTimeoutError:()=>w,TransportAlreadyExistsError:()=>m,TransportNotSupportedError:()=>D,UnknownDeviceError:()=>g});module.exports=p(z);class n{_tag="GeneralDmkError";originalError;constructor(e){e instanceof Error?this.originalError=e:e!==void 0&&(this.originalError=new Error(String(e)))}}class E extends n{constructor(r){super(r);this.err=r}_tag="DeviceAlreadyDiscoveredError"}class y extends n{constructor(r){super(r);this.err=r}_tag="DeviceNotRecognizedError"}class v extends n{constructor(r){super(r);this.err=r}_tag="NoAccessibleDeviceError"}class x extends n{_tag="ConnectionOpeningError";constructor(e){super(e)}}class g extends n{constructor(r){super(r);this.err=r}_tag="UnknownDeviceError"}class D extends n{constructor(r){super(r);this.err=r}_tag="TransportNotSupportedError"}class k extends n{constructor(r){super(r);this.err=r}_tag="SendApduConcurrencyError"}class w extends n{constructor(r){super(r);this.err=r}_tag="SendApduTimeoutError"}class _ extends n{constructor(r){super(r);this.err=r}_tag="DisconnectError"}class A extends n{constructor(r){super(r);this.err=r}_tag="ReconnectionFailedError"}class S extends n{constructor(r){super(r);this.err=r}_tag="DeviceNotInitializedError"}class N extends n{constructor(r){super(r);this.err=r}_tag="NoTransportsProvidedError"}class m extends n{constructor(r){super(r);this.err=r}_tag="TransportAlreadyExistsError"}class T extends n{constructor(r){super(r);this.err=r}_tag="DeviceDisconnectedWhileSendingError"}class C extends n{constructor(r){super(r);this.err=r}_tag="AlreadySendingApduError"}class f extends n{constructor(r){super(r);this.err=r}_tag="DeviceDisconnectedBeforeSendingApdu"}class h extends n{constructor(r){super(r);this.err=r}_tag="NoTransportProvidedError"}0&&(module.exports={AlreadySendingApduError,DeviceAlreadyConnectedError,DeviceDisconnectedBeforeSendingApdu,DeviceDisconnectedWhileSendingError,DeviceNotInitializedError,DeviceNotRecognizedError,DisconnectError,GeneralDmkError,NoAccessibleDeviceError,NoTransportProvidedError,NoTransportsProvidedError,OpeningConnectionError,ReconnectionFailedError,SendApduConcurrencyError,SendApduTimeoutError,TransportAlreadyExistsError,TransportNotSupportedError,UnknownDeviceError});
2
2
  //# sourceMappingURL=Errors.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/api/transport/model/Errors.ts"],
4
- "sourcesContent": ["import { type DmkError } from \"@api/Error\";\n\nexport type ConnectError =\n | UnknownDeviceError\n | OpeningConnectionError\n | DeviceAlreadyConnectedError;\n\nexport class GeneralDmkError implements DmkError {\n _tag = \"GeneralDmkError\";\n originalError?: unknown;\n constructor(err?: unknown) {\n if (err instanceof Error) {\n this.originalError = err;\n } else if (err !== undefined) {\n this.originalError = new Error(String(err));\n }\n }\n}\n\nexport class DeviceAlreadyConnectedError extends GeneralDmkError {\n override readonly _tag = \"DeviceAlreadyDiscoveredError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class DeviceNotRecognizedError extends GeneralDmkError {\n override readonly _tag = \"DeviceNotRecognizedError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class NoAccessibleDeviceError extends GeneralDmkError {\n override readonly _tag = \"NoAccessibleDeviceError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class OpeningConnectionError extends GeneralDmkError {\n override readonly _tag = \"ConnectionOpeningError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class UnknownDeviceError extends GeneralDmkError {\n override readonly _tag = \"UnknownDeviceError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class TransportNotSupportedError extends GeneralDmkError {\n override readonly _tag = \"TransportNotSupportedError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\nexport class SendApduConcurrencyError extends GeneralDmkError {\n override readonly _tag = \"SendApduConcurrencyError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class SendApduTimeoutError extends GeneralDmkError {\n override readonly _tag = \"SendApduTimeoutError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\nexport class DisconnectError extends GeneralDmkError {\n override readonly _tag = \"DisconnectError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class ReconnectionFailedError extends GeneralDmkError {\n override readonly _tag = \"ReconnectionFailedError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class DeviceNotInitializedError extends GeneralDmkError {\n override readonly _tag = \"DeviceNotInitializedError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class NoTransportsProvidedError extends GeneralDmkError {\n override readonly _tag = \"NoTransportsProvidedError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class TransportAlreadyExistsError extends GeneralDmkError {\n override readonly _tag = \"TransportAlreadyExistsError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class DeviceDisconnectedWhileSendingError extends GeneralDmkError {\n override readonly _tag = \"DeviceDisconnectedWhileSendingError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class AlreadySendingApduError extends GeneralDmkError {\n override readonly _tag = \"AlreadySendingApduError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class DeviceDisconnectedBeforeSendingApdu extends GeneralDmkError {\n override readonly _tag = \"DeviceDisconnectedBeforeSendingApdu\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class NoTransportProvidedError extends GeneralDmkError {\n override readonly _tag = \"NoTransportProvidedError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n"],
5
- "mappings": "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",
4
+ "sourcesContent": ["import { type DmkError } from \"@api/Error\";\n\nexport type ConnectError =\n | UnknownDeviceError\n | OpeningConnectionError\n | DeviceAlreadyConnectedError;\n\nexport class GeneralDmkError implements DmkError {\n _tag = \"GeneralDmkError\";\n originalError?: unknown;\n constructor(err?: unknown) {\n if (err instanceof Error) {\n this.originalError = err;\n } else if (err !== undefined) {\n this.originalError = new Error(String(err));\n }\n }\n}\n\nexport class DeviceAlreadyConnectedError extends GeneralDmkError {\n override readonly _tag = \"DeviceAlreadyDiscoveredError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class DeviceNotRecognizedError extends GeneralDmkError {\n override readonly _tag = \"DeviceNotRecognizedError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class NoAccessibleDeviceError extends GeneralDmkError {\n override readonly _tag = \"NoAccessibleDeviceError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class OpeningConnectionError extends GeneralDmkError {\n override _tag = \"ConnectionOpeningError\";\n constructor(err?: unknown) {\n super(err);\n }\n}\n\nexport class UnknownDeviceError extends GeneralDmkError {\n override readonly _tag = \"UnknownDeviceError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class TransportNotSupportedError extends GeneralDmkError {\n override readonly _tag = \"TransportNotSupportedError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\nexport class SendApduConcurrencyError extends GeneralDmkError {\n override readonly _tag = \"SendApduConcurrencyError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class SendApduTimeoutError extends GeneralDmkError {\n override readonly _tag = \"SendApduTimeoutError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\nexport class DisconnectError extends GeneralDmkError {\n override readonly _tag = \"DisconnectError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class ReconnectionFailedError extends GeneralDmkError {\n override readonly _tag = \"ReconnectionFailedError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class DeviceNotInitializedError extends GeneralDmkError {\n override readonly _tag = \"DeviceNotInitializedError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class NoTransportsProvidedError extends GeneralDmkError {\n override readonly _tag = \"NoTransportsProvidedError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class TransportAlreadyExistsError extends GeneralDmkError {\n override readonly _tag = \"TransportAlreadyExistsError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class DeviceDisconnectedWhileSendingError extends GeneralDmkError {\n override readonly _tag = \"DeviceDisconnectedWhileSendingError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class AlreadySendingApduError extends GeneralDmkError {\n override readonly _tag = \"AlreadySendingApduError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class DeviceDisconnectedBeforeSendingApdu extends GeneralDmkError {\n override readonly _tag = \"DeviceDisconnectedBeforeSendingApdu\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class NoTransportProvidedError extends GeneralDmkError {\n override readonly _tag = \"NoTransportProvidedError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,6BAAAE,EAAA,gCAAAC,EAAA,wCAAAC,EAAA,wCAAAC,EAAA,8BAAAC,EAAA,6BAAAC,EAAA,oBAAAC,EAAA,oBAAAC,EAAA,4BAAAC,EAAA,6BAAAC,EAAA,8BAAAC,EAAA,2BAAAC,EAAA,4BAAAC,EAAA,6BAAAC,EAAA,yBAAAC,EAAA,gCAAAC,EAAA,+BAAAC,EAAA,uBAAAC,IAAA,eAAAC,EAAApB,GAOO,MAAMS,CAAoC,CAC/C,KAAO,kBACP,cACA,YAAYY,EAAe,CACrBA,aAAe,MACjB,KAAK,cAAgBA,EACZA,IAAQ,SACjB,KAAK,cAAgB,IAAI,MAAM,OAAOA,CAAG,CAAC,EAE9C,CACF,CAEO,MAAMlB,UAAoCM,CAAgB,CAE/D,YAAqBY,EAAe,CAClC,MAAMA,CAAG,EADU,SAAAA,CAErB,CAHkB,KAAO,8BAI3B,CAEO,MAAMd,UAAiCE,CAAgB,CAE5D,YAAqBY,EAAe,CAClC,MAAMA,CAAG,EADU,SAAAA,CAErB,CAHkB,KAAO,0BAI3B,CAEO,MAAMX,UAAgCD,CAAgB,CAE3D,YAAqBY,EAAe,CAClC,MAAMA,CAAG,EADU,SAAAA,CAErB,CAHkB,KAAO,yBAI3B,CAEO,MAAMR,UAA+BJ,CAAgB,CACjD,KAAO,yBAChB,YAAYY,EAAe,CACzB,MAAMA,CAAG,CACX,CACF,CAEO,MAAMF,UAA2BV,CAAgB,CAEtD,YAAqBY,EAAe,CAClC,MAAMA,CAAG,EADU,SAAAA,CAErB,CAHkB,KAAO,oBAI3B,CAEO,MAAMH,UAAmCT,CAAgB,CAE9D,YAAqBY,EAAe,CAClC,MAAMA,CAAG,EADU,SAAAA,CAErB,CAHkB,KAAO,4BAI3B,CACO,MAAMN,UAAiCN,CAAgB,CAE5D,YAAqBY,EAAe,CAClC,MAAMA,CAAG,EADU,SAAAA,CAErB,CAHkB,KAAO,0BAI3B,CAEO,MAAML,UAA6BP,CAAgB,CAExD,YAAqBY,EAAe,CAClC,MAAMA,CAAG,EADU,SAAAA,CAErB,CAHkB,KAAO,sBAI3B,CACO,MAAMb,UAAwBC,CAAgB,CAEnD,YAAqBY,EAAe,CAClC,MAAMA,CAAG,EADU,SAAAA,CAErB,CAHkB,KAAO,iBAI3B,CAEO,MAAMP,UAAgCL,CAAgB,CAE3D,YAAqBY,EAAe,CAClC,MAAMA,CAAG,EADU,SAAAA,CAErB,CAHkB,KAAO,yBAI3B,CAEO,MAAMf,UAAkCG,CAAgB,CAE7D,YAAqBY,EAAe,CAClC,MAAMA,CAAG,EADU,SAAAA,CAErB,CAHkB,KAAO,2BAI3B,CAEO,MAAMT,UAAkCH,CAAgB,CAE7D,YAAqBY,EAAe,CAClC,MAAMA,CAAG,EADU,SAAAA,CAErB,CAHkB,KAAO,2BAI3B,CAEO,MAAMJ,UAAoCR,CAAgB,CAE/D,YAAqBY,EAAe,CAClC,MAAMA,CAAG,EADU,SAAAA,CAErB,CAHkB,KAAO,6BAI3B,CAEO,MAAMhB,UAA4CI,CAAgB,CAEvE,YAAqBY,EAAe,CAClC,MAAMA,CAAG,EADU,SAAAA,CAErB,CAHkB,KAAO,qCAI3B,CAEO,MAAMnB,UAAgCO,CAAgB,CAE3D,YAAqBY,EAAe,CAClC,MAAMA,CAAG,EADU,SAAAA,CAErB,CAHkB,KAAO,yBAI3B,CAEO,MAAMjB,UAA4CK,CAAgB,CAEvE,YAAqBY,EAAe,CAClC,MAAMA,CAAG,EADU,SAAAA,CAErB,CAHkB,KAAO,qCAI3B,CAEO,MAAMV,UAAiCF,CAAgB,CAE5D,YAAqBY,EAAe,CAClC,MAAMA,CAAG,EADU,SAAAA,CAErB,CAHkB,KAAO,0BAI3B",
6
6
  "names": ["Errors_exports", "__export", "AlreadySendingApduError", "DeviceAlreadyConnectedError", "DeviceDisconnectedBeforeSendingApdu", "DeviceDisconnectedWhileSendingError", "DeviceNotInitializedError", "DeviceNotRecognizedError", "DisconnectError", "GeneralDmkError", "NoAccessibleDeviceError", "NoTransportProvidedError", "NoTransportsProvidedError", "OpeningConnectionError", "ReconnectionFailedError", "SendApduConcurrencyError", "SendApduTimeoutError", "TransportAlreadyExistsError", "TransportNotSupportedError", "UnknownDeviceError", "__toCommonJS", "err"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var o=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var A=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let p of a(e))!i.call(t,p)&&p!==n&&o(t,p,{get:()=>e[p],enumerable:!(r=s(e,p))||r.enumerable});return t};var d=t=>A(o({},"__esModule",{value:!0}),t);var c={};module.exports=d(c);
1
+ "use strict";var o=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var A=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let p of i(e))!s.call(t,p)&&p!==n&&o(t,p,{get:()=>e[p],enumerable:!(r=a(e,p))||r.enumerable});return t};var d=t=>A(o({},"__esModule",{value:!0}),t);var y={};module.exports=d(y);
2
2
  //# sourceMappingURL=types.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/api/types.ts"],
4
- "sourcesContent": ["export type { OpenAppErrorCodes } from \"./command/os/OpenAppCommand\";\nexport type { CommandErrors } from \"./command/utils/CommandErrors\";\nexport type { DeviceId } from \"./device/DeviceModel\";\nexport type { ConnectionType } from \"./discovery/ConnectionType\";\nexport type { CommandErrorArgs } from \"./Error\";\nexport type { LogSubscriberOptions } from \"./logger-subscriber/model/LogSubscriberOptions\";\nexport type { DiscoveredDevice } from \"./transport/model/DiscoveredDevice\";\nexport type {\n Transport,\n TransportArgs,\n TransportFactory,\n} from \"./transport/model/Transport\";\nexport type { TransportIdentifier } from \"./transport/model/TransportIdentifier\";\nexport type { ApduBuilderArgs } from \"@api/apdu/utils/ApduBuilder\";\nexport type { Command } from \"@api/command/Command\";\nexport type {\n CommandErrorResult,\n CommandResult,\n CommandSuccessResult,\n} from \"@api/command/model/CommandResult\";\nexport type { SendCommandUseCaseArgs } from \"@api/command/use-case/SendCommandUseCase\";\nexport type { DeviceModelId } from \"@api/device/DeviceModel\";\nexport {\n type DeviceAction,\n type DeviceActionIntermediateValue,\n type ExecuteDeviceActionReturnType,\n} from \"@api/device-action/DeviceAction\";\nexport {\n type GetDeviceStatusDAError,\n type GetDeviceStatusDAInput,\n type GetDeviceStatusDAIntermediateValue,\n type GetDeviceStatusDAOutput,\n type GetDeviceStatusDAState,\n} from \"@api/device-action/os/GetDeviceStatus/types\";\nexport {\n type GoToDashboardDAError,\n type GoToDashboardDAInput,\n type GoToDashboardDAIntermediateValue,\n type GoToDashboardDAOutput,\n type GoToDashboardDAState,\n} from \"@api/device-action/os/GoToDashboard/types\";\nexport {\n type ListAppsDAError,\n type ListAppsDAInput,\n type ListAppsDAIntermediateValue,\n type ListAppsDAOutput,\n type ListAppsDAState,\n} from \"@api/device-action/os/ListApps/types\";\nexport {\n type ListAppsWithMetadataDAError,\n type ListAppsWithMetadataDAInput,\n type ListAppsWithMetadataDAIntermediateValue,\n type ListAppsWithMetadataDAOutput,\n type ListAppsWithMetadataDAState,\n} from \"@api/device-action/os/ListAppsWithMetadata/types\";\nexport {\n type OpenAppDAError,\n type OpenAppDAInput,\n type OpenAppDAIntermediateValue,\n type OpenAppDAOutput,\n type OpenAppDARequiredInteraction,\n type OpenAppDAState,\n} from \"@api/device-action/os/OpenAppDeviceAction/types\";\nexport {\n type SendCommandInAppDAError,\n type SendCommandInAppDAInput,\n type SendCommandInAppDAIntermediateValue,\n type SendCommandInAppDAOutput,\n} from \"@api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceActionTypes\";\nexport type { ExecuteDeviceActionUseCaseArgs } from \"@api/device-action/use-case/ExecuteDeviceActionUseCase\";\nexport { type StateMachineTypes } from \"@api/device-action/xstate-utils/StateMachineTypes\";\nexport { type DeviceModelDataSource } from \"@api/device-model/data/DeviceModelDataSource\";\nexport type { DeviceSessionState } from \"@api/device-session/DeviceSessionState\";\nexport { type ApduReceiverService } from \"@api/device-session/service/ApduReceiverService\";\nexport { type ApduReceiverServiceFactory } from \"@api/device-session/service/ApduReceiverService\";\nexport { type ApduSenderServiceFactory } from \"@api/device-session/service/ApduSenderService\";\nexport { type ApduSenderService } from \"@api/device-session/service/ApduSenderService\";\nexport type { DeviceSessionId } from \"@api/device-session/types\";\nexport type { DmkConfig } from \"@api/DmkConfig\";\nexport type { DmkError } from \"@api/Error\";\nexport type { LoggerPublisherService } from \"@api/logger-publisher/service/LoggerPublisherService\";\nexport type {\n LoggerSubscriberService,\n LogParams,\n} from \"@api/logger-subscriber/service/LoggerSubscriberService\";\nexport {\n type GenuineCheckDAError,\n type GenuineCheckDAInput,\n type GenuineCheckDAIntermediateValue,\n type GenuineCheckDAOutput,\n type GenuineCheckDARequiredInteraction,\n type GenuineCheckDAState,\n} from \"@api/secure-channel/device-action/GenuineCheck/types\";\nexport {\n type InstallAppDAError,\n type InstallAppDAInput,\n type InstallAppDAIntermediateValue,\n type InstallAppDAOutput,\n type InstallAppDARequiredInteraction,\n type InstallAppDAState,\n} from \"@api/secure-channel/device-action/InstallApp/types\";\nexport {\n type ListInstalledAppsDAError,\n type ListInstalledAppsDAInput,\n type ListInstalledAppsDAIntermediateValue,\n type ListInstalledAppsDAOutput,\n type ListInstalledAppsDARequiredInteraction,\n type ListInstalledAppsDAState,\n} from \"@api/secure-channel/device-action/ListInstalledApps/types\";\nexport {\n type UninstallAppDAError,\n type UninstallAppDAInput,\n type UninstallAppDAIntermediateValue,\n type UninstallAppDAOutput,\n type UninstallAppDARequiredInteraction,\n type UninstallAppDAState,\n} from \"@api/secure-channel/device-action/UninstallApp/types\";\nexport { type DeviceApduSender } from \"@api/transport/model/DeviceApduSender\";\nexport {\n type DeviceConnection,\n type DisconnectHandler,\n type SendApduFnType,\n type SendApduResult,\n} from \"@api/transport/model/DeviceConnection\";\nexport { type TransportDiscoveredDevice } from \"@api/transport/model/TransportDiscoveredDevice\";\nexport type { HexaString } from \"@api/utils/HexaString\";\nexport type { ConnectUseCaseArgs } from \"@internal/discovery/use-case/ConnectUseCase\";\nexport type { DisconnectUseCaseArgs } from \"@internal/discovery/use-case/DisconnectUseCase\";\nexport type { GetConnectedDeviceUseCaseArgs } from \"@internal/discovery/use-case/GetConnectedDeviceUseCase\";\nexport type { StartDiscoveringUseCaseArgs } from \"@internal/discovery/use-case/StartDiscoveringUseCase\";\nexport type { SendApduUseCaseArgs } from \"@internal/send/use-case/SendApduUseCase\";\n"],
4
+ "sourcesContent": ["export type { OpenAppErrorCodes } from \"./command/os/OpenAppCommand\";\nexport type { CommandErrors } from \"./command/utils/CommandErrors\";\nexport type { DeviceId } from \"./device/DeviceModel\";\nexport type { ConnectionType } from \"./discovery/ConnectionType\";\nexport type { CommandErrorArgs } from \"./Error\";\nexport type { LogSubscriberOptions } from \"./logger-subscriber/model/LogSubscriberOptions\";\nexport type { DiscoveredDevice } from \"./transport/model/DiscoveredDevice\";\nexport type {\n Transport,\n TransportArgs,\n TransportFactory,\n} from \"./transport/model/Transport\";\nexport type { TransportIdentifier } from \"./transport/model/TransportIdentifier\";\nexport type { ApduBuilderArgs } from \"@api/apdu/utils/ApduBuilder\";\nexport type { Command } from \"@api/command/Command\";\nexport type {\n CommandErrorResult,\n CommandResult,\n CommandSuccessResult,\n} from \"@api/command/model/CommandResult\";\nexport type { SendCommandUseCaseArgs } from \"@api/command/use-case/SendCommandUseCase\";\nexport type { DeviceModelId } from \"@api/device/DeviceModel\";\nexport {\n type DeviceAction,\n type DeviceActionIntermediateValue,\n type ExecuteDeviceActionReturnType,\n} from \"@api/device-action/DeviceAction\";\nexport {\n type GetDeviceMetadataDAError,\n type GetDeviceMetadataDAInput,\n type GetDeviceMetadataDAIntermediateValue,\n type GetDeviceMetadataDAOutput,\n type GetDeviceMetadataDAState,\n} from \"@api/device-action/os/GetDeviceMetadata/types\";\nexport {\n type GetDeviceStatusDAError,\n type GetDeviceStatusDAInput,\n type GetDeviceStatusDAIntermediateValue,\n type GetDeviceStatusDAOutput,\n type GetDeviceStatusDAState,\n} from \"@api/device-action/os/GetDeviceStatus/types\";\nexport {\n type GoToDashboardDAError,\n type GoToDashboardDAInput,\n type GoToDashboardDAIntermediateValue,\n type GoToDashboardDAOutput,\n type GoToDashboardDAState,\n} from \"@api/device-action/os/GoToDashboard/types\";\nexport {\n type ApplicationConstraint,\n type ApplicationDependency,\n type ApplicationVersionConstraint,\n type InstallOrUpdateAppsDAError,\n type InstallOrUpdateAppsDAInput,\n type InstallOrUpdateAppsDAIntermediateValue,\n type InstallOrUpdateAppsDAOutput,\n type InstallOrUpdateAppsDAState,\n type InstallPlan,\n} from \"@api/device-action/os/InstallOrUpdateApps/types\";\nexport {\n type ListAppsDAError,\n type ListAppsDAInput,\n type ListAppsDAIntermediateValue,\n type ListAppsDAOutput,\n type ListAppsDAState,\n} from \"@api/device-action/os/ListApps/types\";\nexport {\n type ListAppsWithMetadataDAError,\n type ListAppsWithMetadataDAInput,\n type ListAppsWithMetadataDAIntermediateValue,\n type ListAppsWithMetadataDAOutput,\n type ListAppsWithMetadataDAState,\n} from \"@api/device-action/os/ListAppsWithMetadata/types\";\nexport {\n type OpenAppDAError,\n type OpenAppDAInput,\n type OpenAppDAIntermediateValue,\n type OpenAppDAOutput,\n type OpenAppDARequiredInteraction,\n type OpenAppDAState,\n} from \"@api/device-action/os/OpenAppDeviceAction/types\";\nexport {\n type OpenAppWithDependenciesDAError,\n type OpenAppWithDependenciesDAInput,\n type OpenAppWithDependenciesDAIntermediateValue,\n type OpenAppWithDependenciesDAOutput,\n type OpenAppWithDependenciesDARequiredInteraction,\n type OpenAppWithDependenciesDAState,\n} from \"@api/device-action/os/OpenAppWithDependencies/types\";\nexport {\n type SendCommandInAppDAError,\n type SendCommandInAppDAInput,\n type SendCommandInAppDAIntermediateValue,\n type SendCommandInAppDAOutput,\n} from \"@api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceActionTypes\";\nexport type { ExecuteDeviceActionUseCaseArgs } from \"@api/device-action/use-case/ExecuteDeviceActionUseCase\";\nexport { type StateMachineTypes } from \"@api/device-action/xstate-utils/StateMachineTypes\";\nexport { type DeviceModelDataSource } from \"@api/device-model/data/DeviceModelDataSource\";\nexport type {\n Catalog,\n CustomImage,\n DeviceSessionState,\n FirmwareUpdate,\n FirmwareUpdateContext,\n FirmwareVersion,\n InstalledLanguagePackage,\n RunningApp,\n} from \"@api/device-session/DeviceSessionState\";\nexport { type ApduReceiverService } from \"@api/device-session/service/ApduReceiverService\";\nexport { type ApduReceiverServiceFactory } from \"@api/device-session/service/ApduReceiverService\";\nexport { type ApduSenderServiceFactory } from \"@api/device-session/service/ApduSenderService\";\nexport { type ApduSenderService } from \"@api/device-session/service/ApduSenderService\";\nexport type { DeviceSessionId } from \"@api/device-session/types\";\nexport type { DmkConfig } from \"@api/DmkConfig\";\nexport type { DmkError } from \"@api/Error\";\nexport type { LoggerPublisherService } from \"@api/logger-publisher/service/LoggerPublisherService\";\nexport type {\n LoggerSubscriberService,\n LogParams,\n} from \"@api/logger-subscriber/service/LoggerSubscriberService\";\nexport {\n type GenuineCheckDAError,\n type GenuineCheckDAInput,\n type GenuineCheckDAIntermediateValue,\n type GenuineCheckDAOutput,\n type GenuineCheckDARequiredInteraction,\n type GenuineCheckDAState,\n} from \"@api/secure-channel/device-action/GenuineCheck/types\";\nexport {\n type InstallAppDAError,\n type InstallAppDAInput,\n type InstallAppDAIntermediateValue,\n type InstallAppDAOutput,\n type InstallAppDARequiredInteraction,\n type InstallAppDAState,\n} from \"@api/secure-channel/device-action/InstallApp/types\";\nexport {\n type ListInstalledAppsDAError,\n type ListInstalledAppsDAInput,\n type ListInstalledAppsDAIntermediateValue,\n type ListInstalledAppsDAOutput,\n type ListInstalledAppsDARequiredInteraction,\n type ListInstalledAppsDAState,\n} from \"@api/secure-channel/device-action/ListInstalledApps/types\";\nexport {\n type UninstallAppDAError,\n type UninstallAppDAInput,\n type UninstallAppDAIntermediateValue,\n type UninstallAppDAOutput,\n type UninstallAppDARequiredInteraction,\n type UninstallAppDAState,\n} from \"@api/secure-channel/device-action/UninstallApp/types\";\nexport { type DeviceApduSender } from \"@api/transport/model/DeviceApduSender\";\nexport {\n type DeviceConnection,\n type DisconnectHandler,\n type SendApduFnType,\n type SendApduResult,\n} from \"@api/transport/model/DeviceConnection\";\nexport { type TransportDiscoveredDevice } from \"@api/transport/model/TransportDiscoveredDevice\";\nexport type { HexaString } from \"@api/utils/HexaString\";\nexport type { ConnectUseCaseArgs } from \"@internal/discovery/use-case/ConnectUseCase\";\nexport type { DisconnectUseCaseArgs } from \"@internal/discovery/use-case/DisconnectUseCase\";\nexport type { GetConnectedDeviceUseCaseArgs } from \"@internal/discovery/use-case/GetConnectedDeviceUseCase\";\nexport type { StartDiscoveringUseCaseArgs } from \"@internal/discovery/use-case/StartDiscoveringUseCase\";\nexport type { SendApduUseCaseArgs } from \"@internal/send/use-case/SendApduUseCase\";\n"],
5
5
  "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
6
6
  "names": ["types_exports", "__toCommonJS"]
7
7
  }
package/lib/cjs/src/di.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var a=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var U=Object.prototype.hasOwnProperty;var C=(o,r)=>{for(var t in r)a(o,t,{get:r[t],enumerable:!0})},L=(o,r,t,m)=>{if(r&&typeof r=="object"||typeof r=="function")for(let e of S(r))!U.call(o,e)&&e!==t&&a(o,e,{get:()=>r[e],enumerable:!(m=g(r,e))||m.enumerable});return o};var u=o=>L(a({},"__esModule",{value:!0}),o);var k={};C(k,{makeContainer:()=>R});module.exports=u(k);var p=require("inversify"),c=require("./api/command/di/commandModule"),n=require("./api/device-action/di/deviceActionModule"),l=require("./internal/config/di/configModule"),d=require("./internal/device-model/di/deviceModelModule"),f=require("./internal/device-session/di/deviceSessionModule"),y=require("./internal/discovery/di/discoveryModule"),F=require("./internal/logger-publisher/di/loggerModule"),M=require("./internal/manager-api/di/managerApiModule"),i=require("./internal/manager-api/model/Const"),s=require("./internal/secure-channel/di/secureChannelModule"),A=require("./internal/secure-channel/model/Const"),E=require("./internal/send/di/sendModule"),_=require("./internal/transport/di/transportModule");const R=({stub:o=!1,transports:r=[],loggers:t=[],config:m={mockUrl:i.DEFAULT_MOCK_SERVER_BASE_URL,managerApiUrl:i.DEFAULT_MANAGER_API_BASE_URL,webSocketUrl:A.DEFAULT_WEB_SOCKET_BASE_URL,provider:i.DEFAULT_PROVIDER}})=>{const e=new p.Container;return e.load((0,l.configModuleFactory)({stub:o}),(0,d.deviceModelModuleFactory)({stub:o}),(0,_.transportModuleFactory)({stub:o,transports:r,config:m}),(0,M.managerApiModuleFactory)({stub:o,config:m}),(0,s.secureChannelModuleFactory)({stub:o,config:m}),(0,y.discoveryModuleFactory)({stub:o}),(0,F.loggerModuleFactory)({subscribers:t}),(0,f.deviceSessionModuleFactory)({stub:o}),(0,E.sendModuleFactory)({stub:o}),(0,c.commandModuleFactory)({stub:o}),(0,n.deviceActionModuleFactory)({stub:o})),e};0&&(module.exports={makeContainer});
1
+ "use strict";var a=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var U=Object.prototype.hasOwnProperty;var L=(o,r)=>{for(var i in r)a(o,i,{get:r[i],enumerable:!0})},R=(o,r,i,m)=>{if(r&&typeof r=="object"||typeof r=="function")for(let e of g(r))!U.call(o,e)&&e!==i&&a(o,e,{get:()=>r[e],enumerable:!(m=s(r,e))||m.enumerable});return o};var T=o=>R(a({},"__esModule",{value:!0}),o);var u={};L(u,{makeContainer:()=>D});module.exports=T(u);var p=require("inversify"),c=require("./api/command/di/commandModule"),n=require("./api/device-action/di/deviceActionModule"),l=require("./internal/config/di/configModule"),f=require("./internal/device-model/di/deviceModelModule"),d=require("./internal/device-session/di/deviceSessionModule"),y=require("./internal/discovery/di/discoveryModule"),F=require("./internal/logger-publisher/di/loggerModule"),M=require("./internal/manager-api/di/managerApiModule"),t=require("./internal/manager-api/model/Const"),A=require("./internal/secure-channel/di/secureChannelModule"),_=require("./internal/secure-channel/model/Const"),E=require("./internal/send/di/sendModule"),S=require("./internal/transport/di/transportModule");const D=({stub:o=!1,transports:r=[],loggers:i=[],config:m={mockUrl:t.DEFAULT_MOCK_SERVER_BASE_URL,managerApiUrl:t.DEFAULT_MANAGER_API_BASE_URL,webSocketUrl:_.DEFAULT_WEB_SOCKET_BASE_URL,provider:t.DEFAULT_PROVIDER,firmwareDistributionSalt:t.DEFAULT_FIRMWARE_DISTRIBUTION_SALT}})=>{const e=new p.Container;return e.loadSync((0,l.configModuleFactory)({stub:o}),(0,f.deviceModelModuleFactory)({stub:o}),(0,S.transportModuleFactory)({stub:o,transports:r,config:m}),(0,M.managerApiModuleFactory)({stub:o,config:m}),(0,A.secureChannelModuleFactory)({stub:o,config:m}),(0,y.discoveryModuleFactory)({stub:o}),(0,F.loggerModuleFactory)({subscribers:i}),(0,d.deviceSessionModuleFactory)({stub:o}),(0,E.sendModuleFactory)({stub:o}),(0,c.commandModuleFactory)({stub:o}),(0,n.deviceActionModuleFactory)({stub:o})),e};0&&(module.exports={makeContainer});
2
2
  //# sourceMappingURL=di.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/di.ts"],
4
- "sourcesContent": ["import { Container } from \"inversify\";\n\n// Uncomment this line to enable the logger middleware\n// import { makeLoggerMiddleware } from \"inversify-logger-middleware\";\nimport { commandModuleFactory } from \"@api/command/di/commandModule\";\nimport { deviceActionModuleFactory } from \"@api/device-action/di/deviceActionModule\";\nimport { type DmkConfig } from \"@api/DmkConfig\";\nimport { type LoggerSubscriberService } from \"@api/logger-subscriber/service/LoggerSubscriberService\";\nimport { type TransportFactory } from \"@api/transport/model/Transport\";\nimport { configModuleFactory } from \"@internal/config/di/configModule\";\nimport { deviceModelModuleFactory } from \"@internal/device-model/di/deviceModelModule\";\nimport { deviceSessionModuleFactory } from \"@internal/device-session/di/deviceSessionModule\";\nimport { discoveryModuleFactory } from \"@internal/discovery/di/discoveryModule\";\nimport { loggerModuleFactory } from \"@internal/logger-publisher/di/loggerModule\";\nimport { managerApiModuleFactory } from \"@internal/manager-api/di/managerApiModule\";\nimport {\n DEFAULT_MANAGER_API_BASE_URL,\n DEFAULT_MOCK_SERVER_BASE_URL,\n DEFAULT_PROVIDER,\n} from \"@internal/manager-api/model/Const\";\nimport { secureChannelModuleFactory } from \"@internal/secure-channel/di/secureChannelModule\";\nimport { DEFAULT_WEB_SOCKET_BASE_URL } from \"@internal/secure-channel/model/Const\";\nimport { sendModuleFactory } from \"@internal/send/di/sendModule\";\nimport { transportModuleFactory } from \"@internal/transport//di/transportModule\";\n\n// Uncomment this line to enable the logger middleware\n// const logger = makeLoggerMiddleware();\n\nexport type MakeContainerProps = {\n stub: boolean;\n transports: TransportFactory[];\n loggers: LoggerSubscriberService[];\n config: DmkConfig;\n};\n\nexport const makeContainer = ({\n stub = false,\n transports = [],\n loggers = [],\n config = {\n mockUrl: DEFAULT_MOCK_SERVER_BASE_URL,\n managerApiUrl: DEFAULT_MANAGER_API_BASE_URL,\n webSocketUrl: DEFAULT_WEB_SOCKET_BASE_URL,\n provider: DEFAULT_PROVIDER,\n },\n}: Partial<MakeContainerProps>) => {\n const container = new Container();\n\n // Uncomment this line to enable the logger middleware\n // container.applyMiddleware(logger);\n\n container.load(\n configModuleFactory({ stub }),\n deviceModelModuleFactory({ stub }),\n transportModuleFactory({ stub, transports, config }),\n managerApiModuleFactory({ stub, config }),\n secureChannelModuleFactory({ stub, config }),\n discoveryModuleFactory({ stub }),\n loggerModuleFactory({ subscribers: loggers }),\n deviceSessionModuleFactory({ stub }),\n sendModuleFactory({ stub }),\n commandModuleFactory({ stub }),\n deviceActionModuleFactory({ stub }),\n // modules go here\n );\n\n return container;\n};\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,mBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAA0B,qBAI1BC,EAAqC,yCACrCC,EAA0C,oDAI1CC,EAAoC,4CACpCC,EAAyC,uDACzCC,EAA2C,2DAC3CC,EAAuC,kDACvCC,EAAoC,sDACpCC,EAAwC,qDACxCC,EAIO,6CACPC,EAA2C,2DAC3CD,EAA4C,gDAC5CE,EAAkC,wCAClCC,EAAuC,mDAYhC,MAAMd,EAAgB,CAAC,CAC5B,KAAAe,EAAO,GACP,WAAAC,EAAa,CAAC,EACd,QAAAC,EAAU,CAAC,EACX,OAAAC,EAAS,CACP,QAAS,+BACT,cAAe,+BACf,aAAc,8BACd,SAAU,kBACZ,CACF,IAAmC,CACjC,MAAMC,EAAY,IAAI,YAKtB,OAAAA,EAAU,QACR,uBAAoB,CAAE,KAAAJ,CAAK,CAAC,KAC5B,4BAAyB,CAAE,KAAAA,CAAK,CAAC,KACjC,0BAAuB,CAAE,KAAAA,EAAM,WAAAC,EAAY,OAAAE,CAAO,CAAC,KACnD,2BAAwB,CAAE,KAAAH,EAAM,OAAAG,CAAO,CAAC,KACxC,8BAA2B,CAAE,KAAAH,EAAM,OAAAG,CAAO,CAAC,KAC3C,0BAAuB,CAAE,KAAAH,CAAK,CAAC,KAC/B,uBAAoB,CAAE,YAAaE,CAAQ,CAAC,KAC5C,8BAA2B,CAAE,KAAAF,CAAK,CAAC,KACnC,qBAAkB,CAAE,KAAAA,CAAK,CAAC,KAC1B,wBAAqB,CAAE,KAAAA,CAAK,CAAC,KAC7B,6BAA0B,CAAE,KAAAA,CAAK,CAAC,CAEpC,EAEOI,CACT",
4
+ "sourcesContent": ["import { Container } from \"inversify\";\n\nimport { commandModuleFactory } from \"@api/command/di/commandModule\";\nimport { deviceActionModuleFactory } from \"@api/device-action/di/deviceActionModule\";\nimport { type DmkConfig } from \"@api/DmkConfig\";\nimport { type LoggerSubscriberService } from \"@api/logger-subscriber/service/LoggerSubscriberService\";\nimport { type TransportFactory } from \"@api/transport/model/Transport\";\nimport { configModuleFactory } from \"@internal/config/di/configModule\";\nimport { deviceModelModuleFactory } from \"@internal/device-model/di/deviceModelModule\";\nimport { deviceSessionModuleFactory } from \"@internal/device-session/di/deviceSessionModule\";\nimport { discoveryModuleFactory } from \"@internal/discovery/di/discoveryModule\";\nimport { loggerModuleFactory } from \"@internal/logger-publisher/di/loggerModule\";\nimport { managerApiModuleFactory } from \"@internal/manager-api/di/managerApiModule\";\nimport {\n DEFAULT_FIRMWARE_DISTRIBUTION_SALT,\n DEFAULT_MANAGER_API_BASE_URL,\n DEFAULT_MOCK_SERVER_BASE_URL,\n DEFAULT_PROVIDER,\n} from \"@internal/manager-api/model/Const\";\nimport { secureChannelModuleFactory } from \"@internal/secure-channel/di/secureChannelModule\";\nimport { DEFAULT_WEB_SOCKET_BASE_URL } from \"@internal/secure-channel/model/Const\";\nimport { sendModuleFactory } from \"@internal/send/di/sendModule\";\nimport { transportModuleFactory } from \"@internal/transport//di/transportModule\";\n\nexport type MakeContainerProps = {\n stub: boolean;\n transports: TransportFactory[];\n loggers: LoggerSubscriberService[];\n config: DmkConfig;\n};\n\nexport const makeContainer = ({\n stub = false,\n transports = [],\n loggers = [],\n config = {\n mockUrl: DEFAULT_MOCK_SERVER_BASE_URL,\n managerApiUrl: DEFAULT_MANAGER_API_BASE_URL,\n webSocketUrl: DEFAULT_WEB_SOCKET_BASE_URL,\n provider: DEFAULT_PROVIDER,\n firmwareDistributionSalt: DEFAULT_FIRMWARE_DISTRIBUTION_SALT,\n },\n}: Partial<MakeContainerProps>) => {\n const container = new Container();\n\n container.loadSync(\n configModuleFactory({ stub }),\n deviceModelModuleFactory({ stub }),\n transportModuleFactory({ stub, transports, config }),\n managerApiModuleFactory({ stub, config }),\n secureChannelModuleFactory({ stub, config }),\n discoveryModuleFactory({ stub }),\n loggerModuleFactory({ subscribers: loggers }),\n deviceSessionModuleFactory({ stub }),\n sendModuleFactory({ stub }),\n commandModuleFactory({ stub }),\n deviceActionModuleFactory({ stub }),\n // modules go here\n );\n\n return container;\n};\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,mBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAA0B,qBAE1BC,EAAqC,yCACrCC,EAA0C,oDAI1CC,EAAoC,4CACpCC,EAAyC,uDACzCC,EAA2C,2DAC3CC,EAAuC,kDACvCC,EAAoC,sDACpCC,EAAwC,qDACxCC,EAKO,6CACPC,EAA2C,2DAC3CD,EAA4C,gDAC5CE,EAAkC,wCAClCC,EAAuC,mDAShC,MAAMd,EAAgB,CAAC,CAC5B,KAAAe,EAAO,GACP,WAAAC,EAAa,CAAC,EACd,QAAAC,EAAU,CAAC,EACX,OAAAC,EAAS,CACP,QAAS,+BACT,cAAe,+BACf,aAAc,8BACd,SAAU,mBACV,yBAA0B,oCAC5B,CACF,IAAmC,CACjC,MAAMC,EAAY,IAAI,YAEtB,OAAAA,EAAU,YACR,uBAAoB,CAAE,KAAAJ,CAAK,CAAC,KAC5B,4BAAyB,CAAE,KAAAA,CAAK,CAAC,KACjC,0BAAuB,CAAE,KAAAA,EAAM,WAAAC,EAAY,OAAAE,CAAO,CAAC,KACnD,2BAAwB,CAAE,KAAAH,EAAM,OAAAG,CAAO,CAAC,KACxC,8BAA2B,CAAE,KAAAH,EAAM,OAAAG,CAAO,CAAC,KAC3C,0BAAuB,CAAE,KAAAH,CAAK,CAAC,KAC/B,uBAAoB,CAAE,YAAaE,CAAQ,CAAC,KAC5C,8BAA2B,CAAE,KAAAF,CAAK,CAAC,KACnC,qBAAkB,CAAE,KAAAA,CAAK,CAAC,KAC1B,wBAAqB,CAAE,KAAAA,CAAK,CAAC,KAC7B,6BAA0B,CAAE,KAAAA,CAAK,CAAC,CAEpC,EAEOI,CACT",
6
6
  "names": ["di_exports", "__export", "makeContainer", "__toCommonJS", "import_inversify", "import_commandModule", "import_deviceActionModule", "import_configModule", "import_deviceModelModule", "import_deviceSessionModule", "import_discoveryModule", "import_loggerModule", "import_managerApiModule", "import_Const", "import_secureChannelModule", "import_sendModule", "import_transportModule", "stub", "transports", "loggers", "config", "container"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var f=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var D=Object.prototype.hasOwnProperty;var l=(t,o)=>{for(var a in o)f(t,a,{get:o[a],enumerable:!0})},y=(t,o,a,i)=>{if(o&&typeof o=="object"||typeof o=="function")for(let e of S(o))!D.call(t,e)&&e!==a&&f(t,e,{get:()=>o[e],enumerable:!(i=g(o,e))||i.enumerable});return t};var R=t=>y(f({},"__esModule",{value:!0}),t);var L={};l(L,{configModuleFactory:()=>F});module.exports=R(L);var m=require("inversify"),c=require("../../config/data/LocalConfigDataSource"),n=require("../../config/data/LocalConfigDataSource.stub"),u=require("../../config/data/RemoteConfigDataSource"),p=require("../../config/data/RemoteConfigDataSource.stub"),s=require("../../config/service/DefaultConfigService"),C=require("../../config/use-case/GetDmkVersionUseCase"),r=require("./configTypes");const F=({stub:t})=>new m.ContainerModule((o,a,i,e)=>{o(r.configTypes.LocalConfigDataSource).to(c.FileLocalConfigDataSource),o(r.configTypes.RemoteConfigDataSource).to(u.RestRemoteConfigDataSource),o(r.configTypes.GetDmkVersionUseCase).to(C.GetDmkVersionUseCase),o(r.configTypes.ConfigService).to(s.DefaultConfigService),t&&(e(r.configTypes.LocalConfigDataSource).to(n.StubLocalConfigDataSource),e(r.configTypes.RemoteConfigDataSource).to(p.StubRemoteConfigDataSource))});0&&(module.exports={configModuleFactory});
1
+ "use strict";var i=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var D=Object.getOwnPropertyNames;var S=Object.prototype.hasOwnProperty;var l=(t,o)=>{for(var e in o)i(t,e,{get:o[e],enumerable:!0})},R=(t,o,e,f)=>{if(o&&typeof o=="object"||typeof o=="function")for(let a of D(o))!S.call(t,a)&&a!==e&&i(t,a,{get:()=>o[a],enumerable:!(f=s(o,a))||f.enumerable});return t};var y=t=>R(i({},"__esModule",{value:!0}),t);var L={};l(L,{configModuleFactory:()=>F});module.exports=y(L);var m=require("inversify"),c=require("../../config/data/LocalConfigDataSource"),n=require("../../config/data/LocalConfigDataSource.stub"),u=require("../../config/data/RemoteConfigDataSource"),p=require("../../config/data/RemoteConfigDataSource.stub"),C=require("../../config/service/DefaultConfigService"),g=require("../../config/use-case/GetDmkVersionUseCase"),r=require("./configTypes");const F=({stub:t})=>new m.ContainerModule(({bind:o,rebindSync:e})=>{o(r.configTypes.LocalConfigDataSource).to(c.FileLocalConfigDataSource),o(r.configTypes.RemoteConfigDataSource).to(u.RestRemoteConfigDataSource),o(r.configTypes.GetDmkVersionUseCase).to(g.GetDmkVersionUseCase),o(r.configTypes.ConfigService).to(C.DefaultConfigService),t&&(e(r.configTypes.LocalConfigDataSource).to(n.StubLocalConfigDataSource),e(r.configTypes.RemoteConfigDataSource).to(p.StubRemoteConfigDataSource))});0&&(module.exports={configModuleFactory});
2
2
  //# sourceMappingURL=configModule.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/internal/config/di/configModule.ts"],
4
- "sourcesContent": ["import { ContainerModule } from \"inversify\";\n\nimport { FileLocalConfigDataSource } from \"@internal/config/data/LocalConfigDataSource\";\nimport { StubLocalConfigDataSource } from \"@internal/config/data/LocalConfigDataSource.stub\";\nimport { RestRemoteConfigDataSource } from \"@internal/config/data/RemoteConfigDataSource\";\nimport { StubRemoteConfigDataSource } from \"@internal/config/data/RemoteConfigDataSource.stub\";\nimport { DefaultConfigService } from \"@internal/config/service/DefaultConfigService\";\nimport { GetDmkVersionUseCase } from \"@internal/config/use-case/GetDmkVersionUseCase\";\n\nimport { configTypes } from \"./configTypes\";\n\n// This module is used to configure the dependency injection container\n// This is where we will bind our interfaces to their implementations (or mocks...)\ntype FactoryProps = {\n stub: boolean;\n};\n\nexport const configModuleFactory = ({ stub }: FactoryProps) =>\n new ContainerModule((bind, _unbind, _isBound, rebind) => {\n bind(configTypes.LocalConfigDataSource).to(FileLocalConfigDataSource);\n bind(configTypes.RemoteConfigDataSource).to(RestRemoteConfigDataSource);\n bind(configTypes.GetDmkVersionUseCase).to(GetDmkVersionUseCase);\n bind(configTypes.ConfigService).to(DefaultConfigService);\n\n if (stub) {\n // We can rebind our interfaces to their mock implementations\n rebind(configTypes.LocalConfigDataSource).to(StubLocalConfigDataSource);\n rebind(configTypes.RemoteConfigDataSource).to(StubRemoteConfigDataSource);\n }\n });\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,yBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAgC,qBAEhCC,EAA0C,uDAC1CA,EAA0C,4DAC1CC,EAA2C,wDAC3CA,EAA2C,6DAC3CC,EAAqC,yDACrCC,EAAqC,0DAErCC,EAA4B,yBAQrB,MAAMP,EAAsB,CAAC,CAAE,KAAAQ,CAAK,IACzC,IAAI,kBAAgB,CAACC,EAAMC,EAASC,EAAUC,IAAW,CACvDH,EAAK,cAAY,qBAAqB,EAAE,GAAG,2BAAyB,EACpEA,EAAK,cAAY,sBAAsB,EAAE,GAAG,4BAA0B,EACtEA,EAAK,cAAY,oBAAoB,EAAE,GAAG,sBAAoB,EAC9DA,EAAK,cAAY,aAAa,EAAE,GAAG,sBAAoB,EAEnDD,IAEFI,EAAO,cAAY,qBAAqB,EAAE,GAAG,2BAAyB,EACtEA,EAAO,cAAY,sBAAsB,EAAE,GAAG,4BAA0B,EAE5E,CAAC",
6
- "names": ["configModule_exports", "__export", "configModuleFactory", "__toCommonJS", "import_inversify", "import_LocalConfigDataSource", "import_RemoteConfigDataSource", "import_DefaultConfigService", "import_GetDmkVersionUseCase", "import_configTypes", "stub", "bind", "_unbind", "_isBound", "rebind"]
4
+ "sourcesContent": ["import { ContainerModule } from \"inversify\";\n\nimport { FileLocalConfigDataSource } from \"@internal/config/data/LocalConfigDataSource\";\nimport { StubLocalConfigDataSource } from \"@internal/config/data/LocalConfigDataSource.stub\";\nimport { RestRemoteConfigDataSource } from \"@internal/config/data/RemoteConfigDataSource\";\nimport { StubRemoteConfigDataSource } from \"@internal/config/data/RemoteConfigDataSource.stub\";\nimport { DefaultConfigService } from \"@internal/config/service/DefaultConfigService\";\nimport { GetDmkVersionUseCase } from \"@internal/config/use-case/GetDmkVersionUseCase\";\n\nimport { configTypes } from \"./configTypes\";\n\n// This module is used to configure the dependency injection container\n// This is where we will bind our interfaces to their implementations (or mocks...)\ntype FactoryProps = {\n stub: boolean;\n};\n\nexport const configModuleFactory = ({ stub }: FactoryProps) =>\n new ContainerModule(({ bind, rebindSync }) => {\n bind(configTypes.LocalConfigDataSource).to(FileLocalConfigDataSource);\n bind(configTypes.RemoteConfigDataSource).to(RestRemoteConfigDataSource);\n bind(configTypes.GetDmkVersionUseCase).to(GetDmkVersionUseCase);\n bind(configTypes.ConfigService).to(DefaultConfigService);\n\n if (stub) {\n // We can rebind our interfaces to their mock implementations\n rebindSync(configTypes.LocalConfigDataSource).to(\n StubLocalConfigDataSource,\n );\n rebindSync(configTypes.RemoteConfigDataSource).to(\n StubRemoteConfigDataSource,\n );\n }\n });\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,yBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAgC,qBAEhCC,EAA0C,uDAC1CA,EAA0C,4DAC1CC,EAA2C,wDAC3CA,EAA2C,6DAC3CC,EAAqC,yDACrCC,EAAqC,0DAErCC,EAA4B,yBAQrB,MAAMP,EAAsB,CAAC,CAAE,KAAAQ,CAAK,IACzC,IAAI,kBAAgB,CAAC,CAAE,KAAAC,EAAM,WAAAC,CAAW,IAAM,CAC5CD,EAAK,cAAY,qBAAqB,EAAE,GAAG,2BAAyB,EACpEA,EAAK,cAAY,sBAAsB,EAAE,GAAG,4BAA0B,EACtEA,EAAK,cAAY,oBAAoB,EAAE,GAAG,sBAAoB,EAC9DA,EAAK,cAAY,aAAa,EAAE,GAAG,sBAAoB,EAEnDD,IAEFE,EAAW,cAAY,qBAAqB,EAAE,GAC5C,2BACF,EACAA,EAAW,cAAY,sBAAsB,EAAE,GAC7C,4BACF,EAEJ,CAAC",
6
+ "names": ["configModule_exports", "__export", "configModuleFactory", "__toCommonJS", "import_inversify", "import_LocalConfigDataSource", "import_RemoteConfigDataSource", "import_DefaultConfigService", "import_GetDmkVersionUseCase", "import_configTypes", "stub", "bind", "rebindSync"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var a=require("inversify"),i=require("../../config/data/LocalConfigDataSource"),u=require("../../config/data/LocalConfigDataSource.stub"),f=require("../../config/data/RemoteConfigDataSource"),l=require("../../config/data/RemoteConfigDataSource.stub"),n=require("./configModule"),t=require("./configTypes");describe("configModuleFactory",()=>{describe("Default",()=>{let e,o;beforeEach(()=>{o=(0,n.configModuleFactory)({stub:!1}),e=new a.Container,e.load(o)}),it("should return the config module",()=>{expect(o).toBeDefined()}),it("should return none mocked data sources",()=>{const c=e.get(t.configTypes.LocalConfigDataSource),r=e.get(t.configTypes.RemoteConfigDataSource);expect(c).toBeInstanceOf(i.FileLocalConfigDataSource),expect(r).toBeInstanceOf(f.RestRemoteConfigDataSource)})}),describe("Mocked",()=>{let e,o;beforeEach(()=>{o=(0,n.configModuleFactory)({stub:!0}),e=new a.Container,e.load(o)}),it("should return the config module",()=>{expect(o).toBeDefined()}),it("should return mocked data sources",()=>{const c=e.get(t.configTypes.LocalConfigDataSource),r=e.get(t.configTypes.RemoteConfigDataSource);expect(c).toBeInstanceOf(u.StubLocalConfigDataSource),expect(r).toBeInstanceOf(l.StubRemoteConfigDataSource)})})});
1
+ "use strict";var a=require("inversify"),i=require("../../config/data/LocalConfigDataSource"),u=require("../../config/data/LocalConfigDataSource.stub"),f=require("../../config/data/RemoteConfigDataSource"),l=require("../../config/data/RemoteConfigDataSource.stub"),n=require("./configModule"),t=require("./configTypes");describe("configModuleFactory",()=>{describe("Default",()=>{let e,o;beforeEach(()=>{o=(0,n.configModuleFactory)({stub:!1}),e=new a.Container,e.loadSync(o)}),it("should return the config module",()=>{expect(o).toBeDefined()}),it("should return none mocked data sources",()=>{const c=e.get(t.configTypes.LocalConfigDataSource),r=e.get(t.configTypes.RemoteConfigDataSource);expect(c).toBeInstanceOf(i.FileLocalConfigDataSource),expect(r).toBeInstanceOf(f.RestRemoteConfigDataSource)})}),describe("Mocked",()=>{let e,o;beforeEach(()=>{o=(0,n.configModuleFactory)({stub:!0}),e=new a.Container,e.loadSync(o)}),it("should return the config module",()=>{expect(o).toBeDefined()}),it("should return mocked data sources",()=>{const c=e.get(t.configTypes.LocalConfigDataSource),r=e.get(t.configTypes.RemoteConfigDataSource);expect(c).toBeInstanceOf(u.StubLocalConfigDataSource),expect(r).toBeInstanceOf(l.StubRemoteConfigDataSource)})})});
2
2
  //# sourceMappingURL=configModule.test.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/internal/config/di/configModule.test.ts"],
4
- "sourcesContent": ["import { Container } from \"inversify\";\n\nimport { FileLocalConfigDataSource } from \"@internal/config/data/LocalConfigDataSource\";\nimport { StubLocalConfigDataSource } from \"@internal/config/data/LocalConfigDataSource.stub\";\nimport { RestRemoteConfigDataSource } from \"@internal/config/data/RemoteConfigDataSource\";\nimport { StubRemoteConfigDataSource } from \"@internal/config/data/RemoteConfigDataSource.stub\";\n\nimport { configModuleFactory } from \"./configModule\";\nimport { configTypes } from \"./configTypes\";\n\ndescribe(\"configModuleFactory\", () => {\n describe(\"Default\", () => {\n let container: Container;\n let mod: ReturnType<typeof configModuleFactory>;\n beforeEach(() => {\n mod = configModuleFactory({ stub: false });\n container = new Container();\n container.load(mod);\n });\n\n it(\"should return the config module\", () => {\n expect(mod).toBeDefined();\n });\n\n it(\"should return none mocked data sources\", () => {\n const localDataSource = container.get(configTypes.LocalConfigDataSource);\n const remoteDataSource = container.get(\n configTypes.RemoteConfigDataSource,\n );\n expect(localDataSource).toBeInstanceOf(FileLocalConfigDataSource);\n expect(remoteDataSource).toBeInstanceOf(RestRemoteConfigDataSource);\n });\n });\n\n describe(\"Mocked\", () => {\n let container: Container;\n let mod: ReturnType<typeof configModuleFactory>;\n beforeEach(() => {\n mod = configModuleFactory({ stub: true });\n container = new Container();\n container.load(mod);\n });\n\n it(\"should return the config module\", () => {\n expect(mod).toBeDefined();\n });\n\n it(\"should return mocked data sources\", () => {\n const localDataSource = container.get(configTypes.LocalConfigDataSource);\n const remoteDataSource = container.get(\n configTypes.RemoteConfigDataSource,\n );\n expect(localDataSource).toBeInstanceOf(StubLocalConfigDataSource);\n expect(remoteDataSource).toBeInstanceOf(StubRemoteConfigDataSource);\n });\n });\n});\n"],
5
- "mappings": "aAAA,IAAAA,EAA0B,qBAE1BC,EAA0C,uDAC1CA,EAA0C,4DAC1CC,EAA2C,wDAC3CA,EAA2C,6DAE3CC,EAAoC,0BACpCC,EAA4B,yBAE5B,SAAS,sBAAuB,IAAM,CACpC,SAAS,UAAW,IAAM,CACxB,IAAIC,EACAC,EACJ,WAAW,IAAM,CACfA,KAAM,uBAAoB,CAAE,KAAM,EAAM,CAAC,EACzCD,EAAY,IAAI,YAChBA,EAAU,KAAKC,CAAG,CACpB,CAAC,EAED,GAAG,kCAAmC,IAAM,CAC1C,OAAOA,CAAG,EAAE,YAAY,CAC1B,CAAC,EAED,GAAG,yCAA0C,IAAM,CACjD,MAAMC,EAAkBF,EAAU,IAAI,cAAY,qBAAqB,EACjEG,EAAmBH,EAAU,IACjC,cAAY,sBACd,EACA,OAAOE,CAAe,EAAE,eAAe,2BAAyB,EAChE,OAAOC,CAAgB,EAAE,eAAe,4BAA0B,CACpE,CAAC,CACH,CAAC,EAED,SAAS,SAAU,IAAM,CACvB,IAAIH,EACAC,EACJ,WAAW,IAAM,CACfA,KAAM,uBAAoB,CAAE,KAAM,EAAK,CAAC,EACxCD,EAAY,IAAI,YAChBA,EAAU,KAAKC,CAAG,CACpB,CAAC,EAED,GAAG,kCAAmC,IAAM,CAC1C,OAAOA,CAAG,EAAE,YAAY,CAC1B,CAAC,EAED,GAAG,oCAAqC,IAAM,CAC5C,MAAMC,EAAkBF,EAAU,IAAI,cAAY,qBAAqB,EACjEG,EAAmBH,EAAU,IACjC,cAAY,sBACd,EACA,OAAOE,CAAe,EAAE,eAAe,2BAAyB,EAChE,OAAOC,CAAgB,EAAE,eAAe,4BAA0B,CACpE,CAAC,CACH,CAAC,CACH,CAAC",
4
+ "sourcesContent": ["import { Container } from \"inversify\";\n\nimport { FileLocalConfigDataSource } from \"@internal/config/data/LocalConfigDataSource\";\nimport { StubLocalConfigDataSource } from \"@internal/config/data/LocalConfigDataSource.stub\";\nimport { RestRemoteConfigDataSource } from \"@internal/config/data/RemoteConfigDataSource\";\nimport { StubRemoteConfigDataSource } from \"@internal/config/data/RemoteConfigDataSource.stub\";\n\nimport { configModuleFactory } from \"./configModule\";\nimport { configTypes } from \"./configTypes\";\n\ndescribe(\"configModuleFactory\", () => {\n describe(\"Default\", () => {\n let container: Container;\n let mod: ReturnType<typeof configModuleFactory>;\n beforeEach(() => {\n mod = configModuleFactory({ stub: false });\n container = new Container();\n container.loadSync(mod);\n });\n\n it(\"should return the config module\", () => {\n expect(mod).toBeDefined();\n });\n\n it(\"should return none mocked data sources\", () => {\n const localDataSource = container.get(configTypes.LocalConfigDataSource);\n const remoteDataSource = container.get(\n configTypes.RemoteConfigDataSource,\n );\n expect(localDataSource).toBeInstanceOf(FileLocalConfigDataSource);\n expect(remoteDataSource).toBeInstanceOf(RestRemoteConfigDataSource);\n });\n });\n\n describe(\"Mocked\", () => {\n let container: Container;\n let mod: ReturnType<typeof configModuleFactory>;\n beforeEach(() => {\n mod = configModuleFactory({ stub: true });\n container = new Container();\n container.loadSync(mod);\n });\n\n it(\"should return the config module\", () => {\n expect(mod).toBeDefined();\n });\n\n it(\"should return mocked data sources\", () => {\n const localDataSource = container.get(configTypes.LocalConfigDataSource);\n const remoteDataSource = container.get(\n configTypes.RemoteConfigDataSource,\n );\n expect(localDataSource).toBeInstanceOf(StubLocalConfigDataSource);\n expect(remoteDataSource).toBeInstanceOf(StubRemoteConfigDataSource);\n });\n });\n});\n"],
5
+ "mappings": "aAAA,IAAAA,EAA0B,qBAE1BC,EAA0C,uDAC1CA,EAA0C,4DAC1CC,EAA2C,wDAC3CA,EAA2C,6DAE3CC,EAAoC,0BACpCC,EAA4B,yBAE5B,SAAS,sBAAuB,IAAM,CACpC,SAAS,UAAW,IAAM,CACxB,IAAIC,EACAC,EACJ,WAAW,IAAM,CACfA,KAAM,uBAAoB,CAAE,KAAM,EAAM,CAAC,EACzCD,EAAY,IAAI,YAChBA,EAAU,SAASC,CAAG,CACxB,CAAC,EAED,GAAG,kCAAmC,IAAM,CAC1C,OAAOA,CAAG,EAAE,YAAY,CAC1B,CAAC,EAED,GAAG,yCAA0C,IAAM,CACjD,MAAMC,EAAkBF,EAAU,IAAI,cAAY,qBAAqB,EACjEG,EAAmBH,EAAU,IACjC,cAAY,sBACd,EACA,OAAOE,CAAe,EAAE,eAAe,2BAAyB,EAChE,OAAOC,CAAgB,EAAE,eAAe,4BAA0B,CACpE,CAAC,CACH,CAAC,EAED,SAAS,SAAU,IAAM,CACvB,IAAIH,EACAC,EACJ,WAAW,IAAM,CACfA,KAAM,uBAAoB,CAAE,KAAM,EAAK,CAAC,EACxCD,EAAY,IAAI,YAChBA,EAAU,SAASC,CAAG,CACxB,CAAC,EAED,GAAG,kCAAmC,IAAM,CAC1C,OAAOA,CAAG,EAAE,YAAY,CAC1B,CAAC,EAED,GAAG,oCAAqC,IAAM,CAC5C,MAAMC,EAAkBF,EAAU,IAAI,cAAY,qBAAqB,EACjEG,EAAmBH,EAAU,IACjC,cAAY,sBACd,EACA,OAAOE,CAAe,EAAE,eAAe,2BAAyB,EAChE,OAAOC,CAAgB,EAAE,eAAe,4BAA0B,CACpE,CAAC,CACH,CAAC,CACH,CAAC",
6
6
  "names": ["import_inversify", "import_LocalConfigDataSource", "import_RemoteConfigDataSource", "import_configModule", "import_configTypes", "container", "mod", "localDataSource", "remoteDataSource"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var c=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var m=(e,o)=>{for(var t in o)c(e,t,{get:o[t],enumerable:!0})},s=(e,o,t,i)=>{if(o&&typeof o=="object"||typeof o=="function")for(let r of l(o))!u.call(e,r)&&r!==t&&c(e,r,{get:()=>o[r],enumerable:!(i=p(o,r))||i.enumerable});return e};var M=e=>s(c({},"__esModule",{value:!0}),e);var b={};m(b,{deviceModelModuleFactory:()=>y});module.exports=M(b);var d=require("inversify"),a=require("../../../api/device-model/data/StaticDeviceModelDataSource"),n=require("./deviceModelTypes");const y=({stub:e})=>new d.ContainerModule((o,t,i,r)=>{o(n.deviceModelTypes.DeviceModelDataSource).to(a.StaticDeviceModelDataSource)});0&&(module.exports={deviceModelModuleFactory});
1
+ "use strict";var c=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var M=Object.prototype.hasOwnProperty;var n=(e,o)=>{for(var r in o)c(e,r,{get:o[r],enumerable:!0})},s=(e,o,r,a)=>{if(o&&typeof o=="object"||typeof o=="function")for(let t of m(o))!M.call(e,t)&&t!==r&&c(e,t,{get:()=>o[t],enumerable:!(a=l(o,t))||a.enumerable});return e};var u=e=>s(c({},"__esModule",{value:!0}),e);var f={};n(f,{deviceModelModuleFactory:()=>y});module.exports=u(f);var i=require("inversify"),d=require("../../../api/device-model/data/StaticDeviceModelDataSource"),p=require("./deviceModelTypes");const y=({stub:e})=>new i.ContainerModule(({bind:o})=>{o(p.deviceModelTypes.DeviceModelDataSource).to(d.StaticDeviceModelDataSource)});0&&(module.exports={deviceModelModuleFactory});
2
2
  //# sourceMappingURL=deviceModelModule.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/internal/device-model/di/deviceModelModule.ts"],
4
- "sourcesContent": ["import { ContainerModule } from \"inversify\";\n\nimport { StaticDeviceModelDataSource } from \"@api/device-model/data/StaticDeviceModelDataSource\";\n\nimport { deviceModelTypes } from \"./deviceModelTypes\";\n\ntype FactoryProps = {\n stub: boolean;\n};\n\nexport const deviceModelModuleFactory = ({ stub }: FactoryProps) =>\n new ContainerModule((bind, _unbind, _isBound, _rebind) => {\n bind(deviceModelTypes.DeviceModelDataSource).to(\n StaticDeviceModelDataSource,\n );\n\n if (stub) {\n // We can rebind our interfaces to their mock implementations\n // rebind(...).to(....);\n }\n });\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,8BAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAgC,qBAEhCC,EAA4C,8DAE5CC,EAAiC,8BAM1B,MAAMJ,EAA2B,CAAC,CAAE,KAAAK,CAAK,IAC9C,IAAI,kBAAgB,CAACC,EAAMC,EAASC,EAAUC,IAAY,CACxDH,EAAK,mBAAiB,qBAAqB,EAAE,GAC3C,6BACF,CAMF,CAAC",
6
- "names": ["deviceModelModule_exports", "__export", "deviceModelModuleFactory", "__toCommonJS", "import_inversify", "import_StaticDeviceModelDataSource", "import_deviceModelTypes", "stub", "bind", "_unbind", "_isBound", "_rebind"]
4
+ "sourcesContent": ["import { ContainerModule } from \"inversify\";\n\nimport { StaticDeviceModelDataSource } from \"@api/device-model/data/StaticDeviceModelDataSource\";\n\nimport { deviceModelTypes } from \"./deviceModelTypes\";\n\ntype FactoryProps = {\n stub: boolean;\n};\n\nexport const deviceModelModuleFactory = ({ stub }: FactoryProps) =>\n new ContainerModule(({ bind }) => {\n bind(deviceModelTypes.DeviceModelDataSource).to(\n StaticDeviceModelDataSource,\n );\n\n if (stub) {\n // We can rebind our interfaces to their mock implementations\n // rebind(...).to(....);\n }\n });\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,8BAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAgC,qBAEhCC,EAA4C,8DAE5CC,EAAiC,8BAM1B,MAAMJ,EAA2B,CAAC,CAAE,KAAAK,CAAK,IAC9C,IAAI,kBAAgB,CAAC,CAAE,KAAAC,CAAK,IAAM,CAChCA,EAAK,mBAAiB,qBAAqB,EAAE,GAC3C,6BACF,CAMF,CAAC",
6
+ "names": ["deviceModelModule_exports", "__export", "deviceModelModuleFactory", "__toCommonJS", "import_inversify", "import_StaticDeviceModelDataSource", "import_deviceModelTypes", "stub", "bind"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var t=require("inversify"),d=require("../../../api/device-model/data/StaticDeviceModelDataSource"),r=require("./deviceModelModule"),c=require("./deviceModelTypes");describe("deviceModelModuleFactory",()=>{let e,o;beforeEach(()=>{o=(0,r.deviceModelModuleFactory)({stub:!1}),e=new t.Container,e.load(o)}),it("should return the device module",()=>{expect(o).toBeDefined()}),it("should return none mocked services and data sources",()=>{const i=e.get(c.deviceModelTypes.DeviceModelDataSource);expect(i).toBeInstanceOf(d.StaticDeviceModelDataSource)})});
1
+ "use strict";var t=require("inversify"),c=require("../../../api/device-model/data/StaticDeviceModelDataSource"),d=require("./deviceModelModule"),r=require("./deviceModelTypes");describe("deviceModelModuleFactory",()=>{let e,o;beforeEach(()=>{o=(0,d.deviceModelModuleFactory)({stub:!1}),e=new t.Container,e.loadSync(o)}),it("should return the device module",()=>{expect(o).toBeDefined()}),it("should return none mocked services and data sources",()=>{const i=e.get(r.deviceModelTypes.DeviceModelDataSource);expect(i).toBeInstanceOf(c.StaticDeviceModelDataSource)})});
2
2
  //# sourceMappingURL=deviceModelModule.test.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/internal/device-model/di/deviceModelModule.test.ts"],
4
- "sourcesContent": ["import { Container } from \"inversify\";\n\nimport { StaticDeviceModelDataSource } from \"@api/device-model/data/StaticDeviceModelDataSource\";\n\nimport { deviceModelModuleFactory } from \"./deviceModelModule\";\nimport { deviceModelTypes } from \"./deviceModelTypes\";\n\ndescribe(\"deviceModelModuleFactory\", () => {\n let container: Container;\n let mod: ReturnType<typeof deviceModelModuleFactory>;\n beforeEach(() => {\n mod = deviceModelModuleFactory({ stub: false });\n container = new Container();\n container.load(mod);\n });\n\n it(\"should return the device module\", () => {\n expect(mod).toBeDefined();\n });\n\n it(\"should return none mocked services and data sources\", () => {\n const deviceModelDataSource = container.get(\n deviceModelTypes.DeviceModelDataSource,\n );\n expect(deviceModelDataSource).toBeInstanceOf(StaticDeviceModelDataSource);\n });\n});\n"],
5
- "mappings": "aAAA,IAAAA,EAA0B,qBAE1BC,EAA4C,8DAE5CC,EAAyC,+BACzCC,EAAiC,8BAEjC,SAAS,2BAA4B,IAAM,CACzC,IAAIC,EACAC,EACJ,WAAW,IAAM,CACfA,KAAM,4BAAyB,CAAE,KAAM,EAAM,CAAC,EAC9CD,EAAY,IAAI,YAChBA,EAAU,KAAKC,CAAG,CACpB,CAAC,EAED,GAAG,kCAAmC,IAAM,CAC1C,OAAOA,CAAG,EAAE,YAAY,CAC1B,CAAC,EAED,GAAG,sDAAuD,IAAM,CAC9D,MAAMC,EAAwBF,EAAU,IACtC,mBAAiB,qBACnB,EACA,OAAOE,CAAqB,EAAE,eAAe,6BAA2B,CAC1E,CAAC,CACH,CAAC",
4
+ "sourcesContent": ["import { Container } from \"inversify\";\n\nimport { StaticDeviceModelDataSource } from \"@api/device-model/data/StaticDeviceModelDataSource\";\n\nimport { deviceModelModuleFactory } from \"./deviceModelModule\";\nimport { deviceModelTypes } from \"./deviceModelTypes\";\n\ndescribe(\"deviceModelModuleFactory\", () => {\n let container: Container;\n let mod: ReturnType<typeof deviceModelModuleFactory>;\n beforeEach(() => {\n mod = deviceModelModuleFactory({ stub: false });\n container = new Container();\n container.loadSync(mod);\n });\n\n it(\"should return the device module\", () => {\n expect(mod).toBeDefined();\n });\n\n it(\"should return none mocked services and data sources\", () => {\n const deviceModelDataSource = container.get(\n deviceModelTypes.DeviceModelDataSource,\n );\n expect(deviceModelDataSource).toBeInstanceOf(StaticDeviceModelDataSource);\n });\n});\n"],
5
+ "mappings": "aAAA,IAAAA,EAA0B,qBAE1BC,EAA4C,8DAE5CC,EAAyC,+BACzCC,EAAiC,8BAEjC,SAAS,2BAA4B,IAAM,CACzC,IAAIC,EACAC,EACJ,WAAW,IAAM,CACfA,KAAM,4BAAyB,CAAE,KAAM,EAAM,CAAC,EAC9CD,EAAY,IAAI,YAChBA,EAAU,SAASC,CAAG,CACxB,CAAC,EAED,GAAG,kCAAmC,IAAM,CAC1C,OAAOA,CAAG,EAAE,YAAY,CAC1B,CAAC,EAED,GAAG,sDAAuD,IAAM,CAC9D,MAAMC,EAAwBF,EAAU,IACtC,mBAAiB,qBACnB,EACA,OAAOE,CAAqB,EAAE,eAAe,6BAA2B,CAC1E,CAAC,CACH,CAAC",
6
6
  "names": ["import_inversify", "import_StaticDeviceModelDataSource", "import_deviceModelModule", "import_deviceModelTypes", "container", "mod", "deviceModelDataSource"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var a=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var D=Object.getOwnPropertyNames;var C=Object.prototype.hasOwnProperty;var F=(r,e)=>{for(var s in e)a(r,s,{get:e[s],enumerable:!0})},R=(r,e,s,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of D(e))!C.call(r,t)&&t!==s&&a(r,t,{get:()=>e[t],enumerable:!(i=y(e,t))||i.enumerable});return r};var U=r=>R(a({},"__esModule",{value:!0}),r);var h={};F(h,{deviceSessionModuleFactory:()=>b});module.exports=U(h);var v=require("inversify"),m=require("../../../api/device-session/use-case/DisableDeviceSessionRefresher"),g=require("../../device-session/service/DefaultApduReceiverService"),f=require("../../device-session/service/DefaultApduSenderService"),l=require("../../device-session/service/DefaultDeviceSessionService"),d=require("../../device-session/use-case/CloseSessionsUseCase"),A=require("../../device-session/use-case/GetDeviceSessionStateUseCase"),p=require("../../logger-publisher/di/loggerTypes"),u=require("../../../../src/di.stub"),o=require("./deviceSessionTypes");const b=({stub:r}={stub:!1})=>new v.ContainerModule((e,s,i,t,P,L,_)=>{e(o.deviceSessionTypes.ApduSenderServiceFactory).toFactory(c=>{const n=c.container.get(p.loggerTypes.LoggerPublisherServiceFactory);return S=>new f.DefaultApduSenderService(S,n)}),e(o.deviceSessionTypes.ApduReceiverServiceFactory).toFactory(c=>{const n=c.container.get(p.loggerTypes.LoggerPublisherServiceFactory);return(S={})=>new g.DefaultApduReceiverService(S,n)}),e(o.deviceSessionTypes.DeviceSessionService).to(l.DefaultDeviceSessionService).inSingletonScope(),e(o.deviceSessionTypes.GetDeviceSessionStateUseCase).to(A.GetDeviceSessionStateUseCase),e(o.deviceSessionTypes.CloseSessionsUseCase).to(d.CloseSessionsUseCase),e(o.deviceSessionTypes.DisableDeviceSessionRefresherUseCase).to(m.DisableDeviceSessionRefresherUseCase),r&&(t(o.deviceSessionTypes.GetDeviceSessionStateUseCase).to(u.StubUseCase),t(o.deviceSessionTypes.DisableDeviceSessionRefresherUseCase).to(u.StubUseCase))});0&&(module.exports={deviceSessionModuleFactory});
1
+ "use strict";var S=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var A=Object.prototype.hasOwnProperty;var C=(r,e)=>{for(var t in e)S(r,t,{get:e[t],enumerable:!0})},D=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of y(e))!A.call(r,o)&&o!==t&&S(r,o,{get:()=>e[o],enumerable:!(i=d(e,o))||i.enumerable});return r};var F=r=>D(S({},"__esModule",{value:!0}),r);var U={};C(U,{deviceSessionModuleFactory:()=>R});module.exports=F(U);var a=require("inversify"),u=require("../../../api/device-session/use-case/DisableDeviceSessionRefresher"),v=require("../../device-session/service/DefaultApduReceiverService"),m=require("../../device-session/service/DefaultApduSenderService"),g=require("../../device-session/service/DefaultDeviceSessionService"),l=require("../../device-session/use-case/CloseSessionsUseCase"),f=require("../../device-session/use-case/GetDeviceSessionStateUseCase"),p=require("../../logger-publisher/di/loggerTypes"),n=require("../../../../src/di.stub"),s=require("./deviceSessionTypes");const R=({stub:r}={stub:!1})=>new a.ContainerModule(({bind:e,rebindSync:t})=>{e(s.deviceSessionTypes.ApduSenderServiceFactory).toFactory(i=>{const o=i.get(p.loggerTypes.LoggerPublisherServiceFactory);return c=>new m.DefaultApduSenderService(c,o)}),e(s.deviceSessionTypes.ApduReceiverServiceFactory).toFactory(i=>{const o=i.get(p.loggerTypes.LoggerPublisherServiceFactory);return(c={})=>new v.DefaultApduReceiverService(c,o)}),e(s.deviceSessionTypes.DeviceSessionService).to(g.DefaultDeviceSessionService).inSingletonScope(),e(s.deviceSessionTypes.GetDeviceSessionStateUseCase).to(f.GetDeviceSessionStateUseCase),e(s.deviceSessionTypes.CloseSessionsUseCase).to(l.CloseSessionsUseCase),e(s.deviceSessionTypes.DisableDeviceSessionRefresherUseCase).to(u.DisableDeviceSessionRefresherUseCase),r&&(t(s.deviceSessionTypes.GetDeviceSessionStateUseCase).to(n.StubUseCase),t(s.deviceSessionTypes.DisableDeviceSessionRefresherUseCase).to(n.StubUseCase))});0&&(module.exports={deviceSessionModuleFactory});
2
2
  //# sourceMappingURL=deviceSessionModule.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/internal/device-session/di/deviceSessionModule.ts"],
4
- "sourcesContent": ["import { ContainerModule, type interfaces } from \"inversify\";\n\nimport { type ApduReceiverService } from \"@api/device-session/service/ApduReceiverService\";\nimport { type ApduReceiverConstructorArgs } from \"@api/device-session/service/ApduReceiverService\";\nimport { type ApduSenderService } from \"@api/device-session/service/ApduSenderService\";\nimport { type ApduSenderServiceConstructorArgs } from \"@api/device-session/service/ApduSenderService\";\nimport { DisableDeviceSessionRefresherUseCase } from \"@api/device-session/use-case/DisableDeviceSessionRefresher\";\nimport { type LoggerPublisherService } from \"@api/logger-publisher/service/LoggerPublisherService\";\nimport { DefaultApduReceiverService } from \"@internal/device-session/service/DefaultApduReceiverService\";\nimport { DefaultApduSenderService } from \"@internal/device-session/service/DefaultApduSenderService\";\nimport { DefaultDeviceSessionService } from \"@internal/device-session/service/DefaultDeviceSessionService\";\nimport { CloseSessionsUseCase } from \"@internal/device-session/use-case/CloseSessionsUseCase\";\nimport { GetDeviceSessionStateUseCase } from \"@internal/device-session/use-case/GetDeviceSessionStateUseCase\";\nimport { loggerTypes } from \"@internal/logger-publisher/di/loggerTypes\";\nimport { StubUseCase } from \"@root/src/di.stub\";\n\nimport { deviceSessionTypes } from \"./deviceSessionTypes\";\n\nexport type DeviceSessionModuleArgs = Partial<{\n stub: boolean;\n}>;\n\nexport const deviceSessionModuleFactory = (\n { stub }: DeviceSessionModuleArgs = { stub: false },\n) =>\n new ContainerModule(\n (\n bind,\n _unbind,\n _isBound,\n rebind,\n _unbindAsync,\n _onActivation,\n _onDeactivation,\n ) => {\n bind<interfaces.Factory<ApduSenderService>>(\n deviceSessionTypes.ApduSenderServiceFactory,\n ).toFactory((context) => {\n const logger = context.container.get<\n (name: string) => LoggerPublisherService\n >(loggerTypes.LoggerPublisherServiceFactory);\n\n return (args: ApduSenderServiceConstructorArgs) => {\n return new DefaultApduSenderService(args, logger);\n };\n });\n\n bind<interfaces.Factory<ApduReceiverService>>(\n deviceSessionTypes.ApduReceiverServiceFactory,\n ).toFactory((context) => {\n const logger = context.container.get<\n (name: string) => LoggerPublisherService\n >(loggerTypes.LoggerPublisherServiceFactory);\n\n return (args: ApduReceiverConstructorArgs = {}) => {\n return new DefaultApduReceiverService(args, logger);\n };\n });\n\n bind(deviceSessionTypes.DeviceSessionService)\n .to(DefaultDeviceSessionService)\n .inSingletonScope();\n\n bind(deviceSessionTypes.GetDeviceSessionStateUseCase).to(\n GetDeviceSessionStateUseCase,\n );\n bind(deviceSessionTypes.CloseSessionsUseCase).to(CloseSessionsUseCase);\n bind(deviceSessionTypes.DisableDeviceSessionRefresherUseCase).to(\n DisableDeviceSessionRefresherUseCase,\n );\n\n if (stub) {\n rebind(deviceSessionTypes.GetDeviceSessionStateUseCase).to(StubUseCase);\n rebind(deviceSessionTypes.DisableDeviceSessionRefresherUseCase).to(\n StubUseCase,\n );\n }\n },\n );\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,gCAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAiD,qBAMjDC,EAAqD,sEAErDC,EAA2C,uEAC3CC,EAAyC,qEACzCC,EAA4C,wEAC5CC,EAAqC,kEACrCC,EAA6C,0EAC7CC,EAA4B,qDAC5BC,EAA4B,6BAE5BC,EAAmC,gCAM5B,MAAMX,EAA6B,CACxC,CAAE,KAAAY,CAAK,EAA6B,CAAE,KAAM,EAAM,IAElD,IAAI,kBACF,CACEC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,IACG,CACHN,EACE,qBAAmB,wBACrB,EAAE,UAAWO,GAAY,CACvB,MAAMC,EAASD,EAAQ,UAAU,IAE/B,cAAY,6BAA6B,EAE3C,OAAQE,GACC,IAAI,2BAAyBA,EAAMD,CAAM,CAEpD,CAAC,EAEDR,EACE,qBAAmB,0BACrB,EAAE,UAAWO,GAAY,CACvB,MAAMC,EAASD,EAAQ,UAAU,IAE/B,cAAY,6BAA6B,EAE3C,MAAO,CAACE,EAAoC,CAAC,IACpC,IAAI,6BAA2BA,EAAMD,CAAM,CAEtD,CAAC,EAEDR,EAAK,qBAAmB,oBAAoB,EACzC,GAAG,6BAA2B,EAC9B,iBAAiB,EAEpBA,EAAK,qBAAmB,4BAA4B,EAAE,GACpD,8BACF,EACAA,EAAK,qBAAmB,oBAAoB,EAAE,GAAG,sBAAoB,EACrEA,EAAK,qBAAmB,oCAAoC,EAAE,GAC5D,sCACF,EAEID,IACFI,EAAO,qBAAmB,4BAA4B,EAAE,GAAG,aAAW,EACtEA,EAAO,qBAAmB,oCAAoC,EAAE,GAC9D,aACF,EAEJ,CACF",
6
- "names": ["deviceSessionModule_exports", "__export", "deviceSessionModuleFactory", "__toCommonJS", "import_inversify", "import_DisableDeviceSessionRefresher", "import_DefaultApduReceiverService", "import_DefaultApduSenderService", "import_DefaultDeviceSessionService", "import_CloseSessionsUseCase", "import_GetDeviceSessionStateUseCase", "import_loggerTypes", "import_di", "import_deviceSessionTypes", "stub", "bind", "_unbind", "_isBound", "rebind", "_unbindAsync", "_onActivation", "_onDeactivation", "context", "logger", "args"]
4
+ "sourcesContent": ["import { ContainerModule, type Factory } from \"inversify\";\n\nimport { type ApduReceiverService } from \"@api/device-session/service/ApduReceiverService\";\nimport { type ApduReceiverConstructorArgs } from \"@api/device-session/service/ApduReceiverService\";\nimport { type ApduSenderService } from \"@api/device-session/service/ApduSenderService\";\nimport { type ApduSenderServiceConstructorArgs } from \"@api/device-session/service/ApduSenderService\";\nimport { DisableDeviceSessionRefresherUseCase } from \"@api/device-session/use-case/DisableDeviceSessionRefresher\";\nimport { type LoggerPublisherService } from \"@api/logger-publisher/service/LoggerPublisherService\";\nimport { DefaultApduReceiverService } from \"@internal/device-session/service/DefaultApduReceiverService\";\nimport { DefaultApduSenderService } from \"@internal/device-session/service/DefaultApduSenderService\";\nimport { DefaultDeviceSessionService } from \"@internal/device-session/service/DefaultDeviceSessionService\";\nimport { CloseSessionsUseCase } from \"@internal/device-session/use-case/CloseSessionsUseCase\";\nimport { GetDeviceSessionStateUseCase } from \"@internal/device-session/use-case/GetDeviceSessionStateUseCase\";\nimport { loggerTypes } from \"@internal/logger-publisher/di/loggerTypes\";\nimport { StubUseCase } from \"@root/src/di.stub\";\n\nimport { deviceSessionTypes } from \"./deviceSessionTypes\";\n\nexport type DeviceSessionModuleArgs = Partial<{\n stub: boolean;\n}>;\n\nexport const deviceSessionModuleFactory = (\n { stub }: DeviceSessionModuleArgs = { stub: false },\n) =>\n new ContainerModule(({ bind, rebindSync }) => {\n bind<Factory<ApduSenderService>>(\n deviceSessionTypes.ApduSenderServiceFactory,\n ).toFactory((context) => {\n const logger = context.get<(name: string) => LoggerPublisherService>(\n loggerTypes.LoggerPublisherServiceFactory,\n );\n\n return (args: ApduSenderServiceConstructorArgs) => {\n return new DefaultApduSenderService(args, logger);\n };\n });\n\n bind<Factory<ApduReceiverService>>(\n deviceSessionTypes.ApduReceiverServiceFactory,\n ).toFactory((context) => {\n const logger = context.get<(name: string) => LoggerPublisherService>(\n loggerTypes.LoggerPublisherServiceFactory,\n );\n\n return (args: ApduReceiverConstructorArgs = {}) => {\n return new DefaultApduReceiverService(args, logger);\n };\n });\n\n bind(deviceSessionTypes.DeviceSessionService)\n .to(DefaultDeviceSessionService)\n .inSingletonScope();\n\n bind(deviceSessionTypes.GetDeviceSessionStateUseCase).to(\n GetDeviceSessionStateUseCase,\n );\n bind(deviceSessionTypes.CloseSessionsUseCase).to(CloseSessionsUseCase);\n bind(deviceSessionTypes.DisableDeviceSessionRefresherUseCase).to(\n DisableDeviceSessionRefresherUseCase,\n );\n\n if (stub) {\n rebindSync(deviceSessionTypes.GetDeviceSessionStateUseCase).to(\n StubUseCase,\n );\n rebindSync(deviceSessionTypes.DisableDeviceSessionRefresherUseCase).to(\n StubUseCase,\n );\n }\n });\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,gCAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAA8C,qBAM9CC,EAAqD,sEAErDC,EAA2C,uEAC3CC,EAAyC,qEACzCC,EAA4C,wEAC5CC,EAAqC,kEACrCC,EAA6C,0EAC7CC,EAA4B,qDAC5BC,EAA4B,6BAE5BC,EAAmC,gCAM5B,MAAMX,EAA6B,CACxC,CAAE,KAAAY,CAAK,EAA6B,CAAE,KAAM,EAAM,IAElD,IAAI,kBAAgB,CAAC,CAAE,KAAAC,EAAM,WAAAC,CAAW,IAAM,CAC5CD,EACE,qBAAmB,wBACrB,EAAE,UAAWE,GAAY,CACvB,MAAMC,EAASD,EAAQ,IACrB,cAAY,6BACd,EAEA,OAAQE,GACC,IAAI,2BAAyBA,EAAMD,CAAM,CAEpD,CAAC,EAEDH,EACE,qBAAmB,0BACrB,EAAE,UAAWE,GAAY,CACvB,MAAMC,EAASD,EAAQ,IACrB,cAAY,6BACd,EAEA,MAAO,CAACE,EAAoC,CAAC,IACpC,IAAI,6BAA2BA,EAAMD,CAAM,CAEtD,CAAC,EAEDH,EAAK,qBAAmB,oBAAoB,EACzC,GAAG,6BAA2B,EAC9B,iBAAiB,EAEpBA,EAAK,qBAAmB,4BAA4B,EAAE,GACpD,8BACF,EACAA,EAAK,qBAAmB,oBAAoB,EAAE,GAAG,sBAAoB,EACrEA,EAAK,qBAAmB,oCAAoC,EAAE,GAC5D,sCACF,EAEID,IACFE,EAAW,qBAAmB,4BAA4B,EAAE,GAC1D,aACF,EACAA,EAAW,qBAAmB,oCAAoC,EAAE,GAClE,aACF,EAEJ,CAAC",
6
+ "names": ["deviceSessionModule_exports", "__export", "deviceSessionModuleFactory", "__toCommonJS", "import_inversify", "import_DisableDeviceSessionRefresher", "import_DefaultApduReceiverService", "import_DefaultApduSenderService", "import_DefaultDeviceSessionService", "import_CloseSessionsUseCase", "import_GetDeviceSessionStateUseCase", "import_loggerTypes", "import_di", "import_deviceSessionTypes", "stub", "bind", "rebindSync", "context", "logger", "args"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var t=require("inversify"),i=require("./deviceSessionModule");describe("deviceSessionModuleFactory",()=>{describe("Default",()=>{let o,e;beforeEach(()=>{e=(0,i.deviceSessionModuleFactory)(),o=new t.Container,o.load(e)}),it("should return the config module",()=>{expect(e).toBeDefined()})})});
1
+ "use strict";var t=require("inversify"),i=require("./deviceSessionModule");describe("deviceSessionModuleFactory",()=>{describe("Default",()=>{let o,e;beforeEach(()=>{e=(0,i.deviceSessionModuleFactory)(),o=new t.Container,o.loadSync(e)}),it("should return the config module",()=>{expect(e).toBeDefined()})})});
2
2
  //# sourceMappingURL=deviceSessionModule.test.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/internal/device-session/di/deviceSessionModule.test.ts"],
4
- "sourcesContent": ["import { Container } from \"inversify\";\n\nimport { deviceSessionModuleFactory } from \"./deviceSessionModule\";\n\ndescribe(\"deviceSessionModuleFactory\", () => {\n describe(\"Default\", () => {\n let container: Container;\n let mod: ReturnType<typeof deviceSessionModuleFactory>;\n beforeEach(() => {\n mod = deviceSessionModuleFactory();\n container = new Container();\n container.load(mod);\n });\n\n it(\"should return the config module\", () => {\n expect(mod).toBeDefined();\n });\n });\n});\n"],
5
- "mappings": "aAAA,IAAAA,EAA0B,qBAE1BC,EAA2C,iCAE3C,SAAS,6BAA8B,IAAM,CAC3C,SAAS,UAAW,IAAM,CACxB,IAAIC,EACAC,EACJ,WAAW,IAAM,CACfA,KAAM,8BAA2B,EACjCD,EAAY,IAAI,YAChBA,EAAU,KAAKC,CAAG,CACpB,CAAC,EAED,GAAG,kCAAmC,IAAM,CAC1C,OAAOA,CAAG,EAAE,YAAY,CAC1B,CAAC,CACH,CAAC,CACH,CAAC",
4
+ "sourcesContent": ["import { Container } from \"inversify\";\n\nimport { deviceSessionModuleFactory } from \"./deviceSessionModule\";\n\ndescribe(\"deviceSessionModuleFactory\", () => {\n describe(\"Default\", () => {\n let container: Container;\n let mod: ReturnType<typeof deviceSessionModuleFactory>;\n beforeEach(() => {\n mod = deviceSessionModuleFactory();\n container = new Container();\n container.loadSync(mod);\n });\n\n it(\"should return the config module\", () => {\n expect(mod).toBeDefined();\n });\n });\n});\n"],
5
+ "mappings": "aAAA,IAAAA,EAA0B,qBAE1BC,EAA2C,iCAE3C,SAAS,6BAA8B,IAAM,CAC3C,SAAS,UAAW,IAAM,CACxB,IAAIC,EACAC,EACJ,WAAW,IAAM,CACfA,KAAM,8BAA2B,EACjCD,EAAY,IAAI,YAChBA,EAAU,SAASC,CAAG,CACxB,CAAC,EAED,GAAG,kCAAmC,IAAM,CAC1C,OAAOA,CAAG,EAAE,YAAY,CAC1B,CAAC,CACH,CAAC,CACH,CAAC",
6
6
  "names": ["import_inversify", "import_deviceSessionModule", "container", "mod"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var a=Object.defineProperty;var A=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var R=Object.prototype.hasOwnProperty;var b=(n,e)=>{for(var t in e)a(n,t,{get:e[t],enumerable:!0})},y=(n,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of C(e))!R.call(n,i)&&i!==t&&a(n,i,{get:()=>e[i],enumerable:!(s=A(e,i))||s.enumerable});return n};var T=n=>y(a({},"__esModule",{value:!0}),n);var I={};b(I,{DeviceSession:()=>O});module.exports=T(I);var v=require("rxjs"),d=require("uuid"),h=require("../../../api/command/utils/CommandUtils"),p=require("../../../api/device/DeviceStatus"),S=require("../../../api/device-session/DeviceSessionState"),u=require("../../device-session/data/DeviceSessionRefresherConst"),m=require("../../device-session/service/MutexService"),D=require("../../device-session/service/RefresherService"),l=require("./DevicePinger"),o=require("./DeviceSessionEventDispatcher"),_=require("./DeviceSessionRefresher"),f=require("./DeviceSessionStateHandler");class O{_id;_connectedDevice;_deviceState;_managerApiService;_secureChannelService;_logger;_refresherOptions;_pinger;_deviceSessionRefresher;_refresherService;_commandMutex=new m.MutexService;_sessionEventDispatcher=new o.DeviceSessionEventDispatcher;constructor({connectedDevice:e,id:t=(0,d.v4)()},s,i,r,E){this._id=t,this._connectedDevice=e,this._logger=s("device-session"),this._managerApiService=i,this._secureChannelService=r,this._refresherOptions={...u.DEVICE_SESSION_REFRESHER_DEFAULT_OPTIONS,...E},this._deviceState=new v.BehaviorSubject({sessionStateType:S.DeviceSessionStateType.Connected,deviceStatus:p.DeviceStatus.CONNECTED,deviceModelId:this._connectedDevice.deviceModel.id}),this._pinger=new l.DevicePinger(s,e,this._sessionEventDispatcher,(c,g)=>this.sendCommand(c,g)),this._deviceSessionRefresher=new _.DeviceSessionRefresher(s,this._refresherOptions,this._sessionEventDispatcher,this._connectedDevice),new f.DeviceSessionStateHandler(s,this._sessionEventDispatcher,this._connectedDevice,this._deviceState,c=>this.setDeviceSessionState(c)),this._refresherService=new D.RefresherService(s,{start:()=>this._deviceSessionRefresher.restartRefresher(),stop:()=>this._deviceSessionRefresher.stopRefresher()})}async initialiseSession(){try{await this._pinger.ping()}catch(e){throw this._logger.error("Error while initialising session",{data:{error:e}}),e}finally{this._refresherOptions.isRefresherDisabled||this._deviceSessionRefresher.startRefresher()}}get id(){return this._id}get connectedDevice(){return this._connectedDevice}get state(){return this._deviceState.asObservable()}setDeviceSessionState(e){this._deviceState.next(e)}async sendApdu(e,t={isPolling:!1,triggersDisconnection:!1,abortTimeout:void 0}){const s=await this._commandMutex.lock();try{this._sessionEventDispatcher.dispatch({eventName:o.SessionEvents.DEVICE_STATE_UPDATE_BUSY});const i=await this._connectedDevice.sendApdu(e,t.triggersDisconnection,t.abortTimeout);return i.ifRight(r=>{h.CommandUtils.isLockedDeviceResponse(r)?this._sessionEventDispatcher.dispatch({eventName:o.SessionEvents.DEVICE_STATE_UPDATE_LOCKED}):this._sessionEventDispatcher.dispatch({eventName:o.SessionEvents.DEVICE_STATE_UPDATE_CONNECTED})}).ifLeft(()=>{this._sessionEventDispatcher.dispatch({eventName:o.SessionEvents.DEVICE_STATE_UPDATE_CONNECTED})}),i}finally{s()}}async sendCommand(e,t){const s=e.getApdu();return(await this.sendApdu(s.getRawApdu(),{isPolling:!1,triggersDisconnection:e.triggersDisconnection??!1,abortTimeout:t})).caseOf({Left:r=>{throw r},Right:r=>e.parseResponse(r,this._connectedDevice.deviceModel.id)})}executeDeviceAction(e){const{observable:t,cancel:s}=e._execute({sendApdu:async i=>this.sendApdu(i),sendCommand:async(i,r)=>this.sendCommand(i,r),getDeviceSessionState:()=>this._deviceState.getValue(),getDeviceSessionStateObservable:()=>this.state,setDeviceSessionState:i=>(this.setDeviceSessionState(i),this._deviceState.getValue()),disableRefresher:i=>this._refresherService.disableRefresher(i),getManagerApiService:()=>this._managerApiService,getSecureChannelService:()=>this._secureChannelService});return{observable:t,cancel:s}}close(){this._updateDeviceStatus(p.DeviceStatus.NOT_CONNECTED),this._deviceState.complete(),this._deviceSessionRefresher.stopRefresher()}disableRefresher(e){return this._refresherService.disableRefresher(e)}_updateDeviceStatus(e){const t=this._deviceState.getValue();this._deviceState.next({...t,deviceStatus:e})}}0&&(module.exports={DeviceSession});
1
+ "use strict";var a=Object.defineProperty;var A=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var R=Object.prototype.hasOwnProperty;var b=(n,e)=>{for(var t in e)a(n,t,{get:e[t],enumerable:!0})},y=(n,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of C(e))!R.call(n,i)&&i!==t&&a(n,i,{get:()=>e[i],enumerable:!(s=A(e,i))||s.enumerable});return n};var T=n=>y(a({},"__esModule",{value:!0}),n);var I={};b(I,{DeviceSession:()=>O});module.exports=T(I);var v=require("rxjs"),d=require("uuid"),h=require("../../../api/command/utils/CommandUtils"),p=require("../../../api/device/DeviceStatus"),S=require("../../../api/device-session/DeviceSessionState"),u=require("../../device-session/data/DeviceSessionRefresherConst"),m=require("../../device-session/service/MutexService"),D=require("../../device-session/service/RefresherService"),l=require("./DevicePinger"),o=require("./DeviceSessionEventDispatcher"),_=require("./DeviceSessionRefresher"),f=require("./DeviceSessionStateHandler");class O{_id;_connectedDevice;_deviceState;_managerApiService;_secureChannelService;_logger;_refresherOptions;_pinger;_deviceSessionRefresher;_refresherService;_commandMutex=new m.MutexService;_sessionEventDispatcher=new o.DeviceSessionEventDispatcher;constructor({connectedDevice:e,id:t=(0,d.v4)()},s,i,r,g){this._id=t,this._connectedDevice=e,this._logger=s("device-session"),this._managerApiService=i,this._secureChannelService=r,this._refresherOptions={...u.DEVICE_SESSION_REFRESHER_DEFAULT_OPTIONS,...g},this._deviceState=new v.BehaviorSubject({sessionStateType:S.DeviceSessionStateType.Connected,deviceStatus:p.DeviceStatus.CONNECTED,deviceModelId:this._connectedDevice.deviceModel.id}),this._pinger=new l.DevicePinger(s,e,this._sessionEventDispatcher,(c,E)=>this.sendCommand(c,E)),this._deviceSessionRefresher=new _.DeviceSessionRefresher(s,this._refresherOptions,this._sessionEventDispatcher,this._connectedDevice),new f.DeviceSessionStateHandler(s,this._sessionEventDispatcher,this._connectedDevice,this._deviceState,c=>this.setDeviceSessionState(c)),this._refresherService=new D.RefresherService(s,{start:()=>this._deviceSessionRefresher.restartRefresher(),stop:()=>this._deviceSessionRefresher.stopRefresher()})}async initialiseSession(){try{await this._pinger.ping()}catch(e){throw this._logger.error("Error while initialising session",{data:{error:e}}),e}finally{this._refresherOptions.isRefresherDisabled||this._deviceSessionRefresher.startRefresher()}}get id(){return this._id}get connectedDevice(){return this._connectedDevice}get state(){return this._deviceState.asObservable()}getDeviceSessionState(){return this._deviceState.getValue()}setDeviceSessionState(e){this._deviceState.next(e)}async sendApdu(e,t={isPolling:!1,triggersDisconnection:!1,abortTimeout:void 0}){const s=await this._commandMutex.lock();try{this._sessionEventDispatcher.dispatch({eventName:o.SessionEvents.DEVICE_STATE_UPDATE_BUSY});const i=await this._connectedDevice.sendApdu(e,t.triggersDisconnection,t.abortTimeout);return i.ifRight(r=>{h.CommandUtils.isLockedDeviceResponse(r)?this._sessionEventDispatcher.dispatch({eventName:o.SessionEvents.DEVICE_STATE_UPDATE_LOCKED}):this._sessionEventDispatcher.dispatch({eventName:o.SessionEvents.DEVICE_STATE_UPDATE_CONNECTED})}).ifLeft(()=>{this._sessionEventDispatcher.dispatch({eventName:o.SessionEvents.DEVICE_STATE_UPDATE_CONNECTED})}),i}finally{s()}}async sendCommand(e,t){const s=e.getApdu();return(await this.sendApdu(s.getRawApdu(),{isPolling:!1,triggersDisconnection:e.triggersDisconnection??!1,abortTimeout:t})).caseOf({Left:r=>{throw r},Right:r=>e.parseResponse(r,this._connectedDevice.deviceModel.id)})}executeDeviceAction(e){const{observable:t,cancel:s}=e._execute({sendApdu:async i=>this.sendApdu(i),sendCommand:async(i,r)=>this.sendCommand(i,r),getDeviceModel:()=>this._connectedDevice.deviceModel,getDeviceSessionState:()=>this._deviceState.getValue(),getDeviceSessionStateObservable:()=>this.state,setDeviceSessionState:i=>(this.setDeviceSessionState(i),this._deviceState.getValue()),disableRefresher:i=>this._refresherService.disableRefresher(i),getManagerApiService:()=>this._managerApiService,getSecureChannelService:()=>this._secureChannelService});return{observable:t,cancel:s}}close(){this._updateDeviceStatus(p.DeviceStatus.NOT_CONNECTED),this._deviceState.complete(),this._deviceSessionRefresher.stopRefresher()}disableRefresher(e){return this._refresherService.disableRefresher(e)}_updateDeviceStatus(e){const t=this._deviceState.getValue();this._deviceState.next({...t,deviceStatus:e})}}0&&(module.exports={DeviceSession});
2
2
  //# sourceMappingURL=DeviceSession.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/internal/device-session/model/DeviceSession.ts"],
4
- "sourcesContent": ["import { type Either } from \"purify-ts\";\nimport { BehaviorSubject, type Observable } from \"rxjs\";\nimport { v4 as uuidv4 } from \"uuid\";\n\nimport { type Command } from \"@api/command/Command\";\nimport { type CommandResult } from \"@api/command/model/CommandResult\";\nimport { CommandUtils } from \"@api/command/utils/CommandUtils\";\nimport { DeviceStatus } from \"@api/device/DeviceStatus\";\nimport {\n type DeviceAction,\n type DeviceActionIntermediateValue,\n type ExecuteDeviceActionReturnType,\n} from \"@api/device-action/DeviceAction\";\nimport { type ApduResponse } from \"@api/device-session/ApduResponse\";\nimport {\n type DeviceSessionState,\n DeviceSessionStateType,\n} from \"@api/device-session/DeviceSessionState\";\nimport { type DeviceSessionId } from \"@api/device-session/types\";\nimport { type DmkError } from \"@api/Error\";\nimport { type LoggerPublisherService } from \"@api/logger-publisher/service/LoggerPublisherService\";\nimport { type TransportConnectedDevice } from \"@api/transport/model/TransportConnectedDevice\";\nimport { DEVICE_SESSION_REFRESHER_DEFAULT_OPTIONS } from \"@internal/device-session/data/DeviceSessionRefresherConst\";\nimport { MutexService } from \"@internal/device-session/service/MutexService\";\nimport { RefresherService } from \"@internal/device-session/service/RefresherService\";\nimport { type ManagerApiService } from \"@internal/manager-api/service/ManagerApiService\";\nimport { type SecureChannelService } from \"@internal/secure-channel/service/SecureChannelService\";\n\nimport { DevicePinger } from \"./DevicePinger\";\nimport {\n DeviceSessionEventDispatcher,\n SessionEvents,\n} from \"./DeviceSessionEventDispatcher\";\nimport { DeviceSessionRefresher } from \"./DeviceSessionRefresher\";\nimport { DeviceSessionStateHandler } from \"./DeviceSessionStateHandler\";\n\nexport type SessionConstructorArgs = {\n connectedDevice: TransportConnectedDevice;\n id?: DeviceSessionId;\n};\n\nexport type DeviceSessionRefresherOptions = {\n isRefresherDisabled: boolean;\n pollingInterval?: number;\n};\n\ntype SendApduOptions = {\n isPolling?: boolean;\n triggersDisconnection?: boolean;\n abortTimeout?: number;\n};\n\n/**\n * Represents a session with a device.\n */\nexport class DeviceSession {\n private readonly _id: DeviceSessionId;\n private readonly _connectedDevice: TransportConnectedDevice;\n private readonly _deviceState: BehaviorSubject<DeviceSessionState>;\n private readonly _managerApiService: ManagerApiService;\n private readonly _secureChannelService: SecureChannelService;\n private readonly _logger: LoggerPublisherService;\n private readonly _refresherOptions: DeviceSessionRefresherOptions;\n private _pinger: DevicePinger;\n private _deviceSessionRefresher: DeviceSessionRefresher;\n private readonly _refresherService: RefresherService;\n private _commandMutex = new MutexService();\n private _sessionEventDispatcher = new DeviceSessionEventDispatcher();\n\n constructor(\n { connectedDevice, id = uuidv4() }: SessionConstructorArgs,\n loggerModuleFactory: (tag: string) => LoggerPublisherService,\n managerApiService: ManagerApiService,\n secureChannelService: SecureChannelService,\n deviceSessionRefresherOptions: DeviceSessionRefresherOptions | undefined,\n ) {\n this._id = id;\n this._connectedDevice = connectedDevice;\n this._logger = loggerModuleFactory(\"device-session\");\n this._managerApiService = managerApiService;\n this._secureChannelService = secureChannelService;\n this._refresherOptions = {\n ...DEVICE_SESSION_REFRESHER_DEFAULT_OPTIONS,\n ...deviceSessionRefresherOptions,\n };\n this._deviceState = new BehaviorSubject<DeviceSessionState>({\n sessionStateType: DeviceSessionStateType.Connected,\n deviceStatus: DeviceStatus.CONNECTED,\n deviceModelId: this._connectedDevice.deviceModel.id,\n });\n\n this._pinger = new DevicePinger(\n loggerModuleFactory,\n connectedDevice,\n this._sessionEventDispatcher,\n (command, abortTimeout) => this.sendCommand(command, abortTimeout),\n );\n this._deviceSessionRefresher = new DeviceSessionRefresher(\n loggerModuleFactory,\n this._refresherOptions,\n this._sessionEventDispatcher,\n this._connectedDevice,\n );\n new DeviceSessionStateHandler(\n loggerModuleFactory,\n this._sessionEventDispatcher,\n this._connectedDevice,\n this._deviceState,\n (state) => this.setDeviceSessionState(state),\n );\n\n this._refresherService = new RefresherService(loggerModuleFactory, {\n start: () => this._deviceSessionRefresher.restartRefresher(),\n stop: () => this._deviceSessionRefresher.stopRefresher(),\n });\n }\n\n public async initialiseSession(): Promise<void> {\n try {\n await this._pinger.ping();\n } catch (error) {\n this._logger.error(\"Error while initialising session\", {\n data: { error },\n });\n throw error;\n } finally {\n if (!this._refresherOptions.isRefresherDisabled) {\n this._deviceSessionRefresher.startRefresher();\n }\n }\n }\n\n public get id(): DeviceSessionId {\n return this._id;\n }\n\n public get connectedDevice(): TransportConnectedDevice {\n return this._connectedDevice;\n }\n\n public get state(): Observable<DeviceSessionState> {\n return this._deviceState.asObservable();\n }\n\n public setDeviceSessionState(state: DeviceSessionState): void {\n this._deviceState.next(state);\n }\n\n public async sendApdu(\n rawApdu: Uint8Array,\n options: SendApduOptions = {\n isPolling: false,\n triggersDisconnection: false,\n abortTimeout: undefined,\n },\n ): Promise<Either<DmkError, ApduResponse>> {\n const release = await this._commandMutex.lock();\n\n try {\n this._sessionEventDispatcher.dispatch({\n eventName: SessionEvents.DEVICE_STATE_UPDATE_BUSY,\n });\n const result = await this._connectedDevice.sendApdu(\n rawApdu,\n options.triggersDisconnection,\n options.abortTimeout,\n );\n\n result\n .ifRight((response: ApduResponse) => {\n if (CommandUtils.isLockedDeviceResponse(response)) {\n this._sessionEventDispatcher.dispatch({\n eventName: SessionEvents.DEVICE_STATE_UPDATE_LOCKED,\n });\n } else {\n this._sessionEventDispatcher.dispatch({\n eventName: SessionEvents.DEVICE_STATE_UPDATE_CONNECTED,\n });\n }\n })\n .ifLeft(() => {\n this._sessionEventDispatcher.dispatch({\n eventName: SessionEvents.DEVICE_STATE_UPDATE_CONNECTED,\n });\n });\n return result;\n } finally {\n release();\n }\n }\n\n public async sendCommand<Response, Args, ErrorStatusCodes>(\n command: Command<Response, Args, ErrorStatusCodes>,\n abortTimeout?: number,\n ): Promise<CommandResult<Response, ErrorStatusCodes>> {\n const apdu = command.getApdu();\n\n const response = await this.sendApdu(apdu.getRawApdu(), {\n isPolling: false,\n triggersDisconnection: command.triggersDisconnection ?? false,\n abortTimeout,\n });\n\n return response.caseOf({\n Left: (err) => {\n throw err;\n },\n Right: (r) =>\n command.parseResponse(r, this._connectedDevice.deviceModel.id),\n });\n }\n\n public executeDeviceAction<\n Output,\n Input,\n E extends DmkError,\n IntermediateValue extends DeviceActionIntermediateValue,\n >(\n deviceAction: DeviceAction<Output, Input, E, IntermediateValue>,\n ): ExecuteDeviceActionReturnType<Output, E, IntermediateValue> {\n const { observable, cancel } = deviceAction._execute({\n sendApdu: async (apdu: Uint8Array) => this.sendApdu(apdu),\n sendCommand: async <Response, ErrorStatusCodes, Args>(\n command: Command<Response, ErrorStatusCodes, Args>,\n abortTimeout?: number,\n ) => this.sendCommand(command, abortTimeout),\n getDeviceSessionState: () => this._deviceState.getValue(),\n getDeviceSessionStateObservable: () => this.state,\n setDeviceSessionState: (state: DeviceSessionState) => {\n this.setDeviceSessionState(state);\n return this._deviceState.getValue();\n },\n disableRefresher: (blockerId: string) =>\n this._refresherService.disableRefresher(blockerId),\n getManagerApiService: () => this._managerApiService,\n getSecureChannelService: () => this._secureChannelService,\n });\n return { observable, cancel };\n }\n\n public close(): void {\n this._updateDeviceStatus(DeviceStatus.NOT_CONNECTED);\n this._deviceState.complete();\n this._deviceSessionRefresher.stopRefresher();\n }\n\n public disableRefresher(id: string): () => void {\n return this._refresherService.disableRefresher(id);\n }\n\n private _updateDeviceStatus(deviceStatus: DeviceStatus): void {\n const state = this._deviceState.getValue();\n this._deviceState.next({ ...state, deviceStatus });\n }\n}\n"],
5
- "mappings": "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",
4
+ "sourcesContent": ["import { type Either } from \"purify-ts\";\nimport { BehaviorSubject, type Observable } from \"rxjs\";\nimport { v4 as uuidv4 } from \"uuid\";\n\nimport { type Command } from \"@api/command/Command\";\nimport { type CommandResult } from \"@api/command/model/CommandResult\";\nimport { CommandUtils } from \"@api/command/utils/CommandUtils\";\nimport { DeviceStatus } from \"@api/device/DeviceStatus\";\nimport {\n type DeviceAction,\n type DeviceActionIntermediateValue,\n type ExecuteDeviceActionReturnType,\n} from \"@api/device-action/DeviceAction\";\nimport { type ApduResponse } from \"@api/device-session/ApduResponse\";\nimport {\n type DeviceSessionState,\n DeviceSessionStateType,\n} from \"@api/device-session/DeviceSessionState\";\nimport { type DeviceSessionId } from \"@api/device-session/types\";\nimport { type DmkError } from \"@api/Error\";\nimport { type LoggerPublisherService } from \"@api/logger-publisher/service/LoggerPublisherService\";\nimport { type TransportConnectedDevice } from \"@api/transport/model/TransportConnectedDevice\";\nimport { DEVICE_SESSION_REFRESHER_DEFAULT_OPTIONS } from \"@internal/device-session/data/DeviceSessionRefresherConst\";\nimport { MutexService } from \"@internal/device-session/service/MutexService\";\nimport { RefresherService } from \"@internal/device-session/service/RefresherService\";\nimport { type ManagerApiService } from \"@internal/manager-api/service/ManagerApiService\";\nimport { type SecureChannelService } from \"@internal/secure-channel/service/SecureChannelService\";\n\nimport { DevicePinger } from \"./DevicePinger\";\nimport {\n DeviceSessionEventDispatcher,\n SessionEvents,\n} from \"./DeviceSessionEventDispatcher\";\nimport { DeviceSessionRefresher } from \"./DeviceSessionRefresher\";\nimport { DeviceSessionStateHandler } from \"./DeviceSessionStateHandler\";\n\nexport type SessionConstructorArgs = {\n connectedDevice: TransportConnectedDevice;\n id?: DeviceSessionId;\n};\n\nexport type DeviceSessionRefresherOptions = {\n isRefresherDisabled: boolean;\n pollingInterval?: number;\n};\n\ntype SendApduOptions = {\n isPolling?: boolean;\n triggersDisconnection?: boolean;\n abortTimeout?: number;\n};\n\n/**\n * Represents a session with a device.\n */\nexport class DeviceSession {\n private readonly _id: DeviceSessionId;\n private readonly _connectedDevice: TransportConnectedDevice;\n private readonly _deviceState: BehaviorSubject<DeviceSessionState>;\n private readonly _managerApiService: ManagerApiService;\n private readonly _secureChannelService: SecureChannelService;\n private readonly _logger: LoggerPublisherService;\n private readonly _refresherOptions: DeviceSessionRefresherOptions;\n private _pinger: DevicePinger;\n private _deviceSessionRefresher: DeviceSessionRefresher;\n private readonly _refresherService: RefresherService;\n private _commandMutex = new MutexService();\n private _sessionEventDispatcher = new DeviceSessionEventDispatcher();\n\n constructor(\n { connectedDevice, id = uuidv4() }: SessionConstructorArgs,\n loggerModuleFactory: (tag: string) => LoggerPublisherService,\n managerApiService: ManagerApiService,\n secureChannelService: SecureChannelService,\n deviceSessionRefresherOptions: DeviceSessionRefresherOptions | undefined,\n ) {\n this._id = id;\n this._connectedDevice = connectedDevice;\n this._logger = loggerModuleFactory(\"device-session\");\n this._managerApiService = managerApiService;\n this._secureChannelService = secureChannelService;\n this._refresherOptions = {\n ...DEVICE_SESSION_REFRESHER_DEFAULT_OPTIONS,\n ...deviceSessionRefresherOptions,\n };\n this._deviceState = new BehaviorSubject<DeviceSessionState>({\n sessionStateType: DeviceSessionStateType.Connected,\n deviceStatus: DeviceStatus.CONNECTED,\n deviceModelId: this._connectedDevice.deviceModel.id,\n });\n\n this._pinger = new DevicePinger(\n loggerModuleFactory,\n connectedDevice,\n this._sessionEventDispatcher,\n (command, abortTimeout) => this.sendCommand(command, abortTimeout),\n );\n this._deviceSessionRefresher = new DeviceSessionRefresher(\n loggerModuleFactory,\n this._refresherOptions,\n this._sessionEventDispatcher,\n this._connectedDevice,\n );\n new DeviceSessionStateHandler(\n loggerModuleFactory,\n this._sessionEventDispatcher,\n this._connectedDevice,\n this._deviceState,\n (state) => this.setDeviceSessionState(state),\n );\n\n this._refresherService = new RefresherService(loggerModuleFactory, {\n start: () => this._deviceSessionRefresher.restartRefresher(),\n stop: () => this._deviceSessionRefresher.stopRefresher(),\n });\n }\n\n public async initialiseSession(): Promise<void> {\n try {\n await this._pinger.ping();\n } catch (error) {\n this._logger.error(\"Error while initialising session\", {\n data: { error },\n });\n throw error;\n } finally {\n if (!this._refresherOptions.isRefresherDisabled) {\n this._deviceSessionRefresher.startRefresher();\n }\n }\n }\n\n public get id(): DeviceSessionId {\n return this._id;\n }\n\n public get connectedDevice(): TransportConnectedDevice {\n return this._connectedDevice;\n }\n\n public get state(): Observable<DeviceSessionState> {\n return this._deviceState.asObservable();\n }\n\n public getDeviceSessionState(): DeviceSessionState {\n return this._deviceState.getValue();\n }\n\n public setDeviceSessionState(state: DeviceSessionState): void {\n this._deviceState.next(state);\n }\n\n public async sendApdu(\n rawApdu: Uint8Array,\n options: SendApduOptions = {\n isPolling: false,\n triggersDisconnection: false,\n abortTimeout: undefined,\n },\n ): Promise<Either<DmkError, ApduResponse>> {\n const release = await this._commandMutex.lock();\n\n try {\n this._sessionEventDispatcher.dispatch({\n eventName: SessionEvents.DEVICE_STATE_UPDATE_BUSY,\n });\n const result = await this._connectedDevice.sendApdu(\n rawApdu,\n options.triggersDisconnection,\n options.abortTimeout,\n );\n\n result\n .ifRight((response: ApduResponse) => {\n if (CommandUtils.isLockedDeviceResponse(response)) {\n this._sessionEventDispatcher.dispatch({\n eventName: SessionEvents.DEVICE_STATE_UPDATE_LOCKED,\n });\n } else {\n this._sessionEventDispatcher.dispatch({\n eventName: SessionEvents.DEVICE_STATE_UPDATE_CONNECTED,\n });\n }\n })\n .ifLeft(() => {\n this._sessionEventDispatcher.dispatch({\n eventName: SessionEvents.DEVICE_STATE_UPDATE_CONNECTED,\n });\n });\n return result;\n } finally {\n release();\n }\n }\n\n public async sendCommand<Response, Args, ErrorStatusCodes>(\n command: Command<Response, Args, ErrorStatusCodes>,\n abortTimeout?: number,\n ): Promise<CommandResult<Response, ErrorStatusCodes>> {\n const apdu = command.getApdu();\n\n const response = await this.sendApdu(apdu.getRawApdu(), {\n isPolling: false,\n triggersDisconnection: command.triggersDisconnection ?? false,\n abortTimeout,\n });\n\n return response.caseOf({\n Left: (err) => {\n throw err;\n },\n Right: (r) =>\n command.parseResponse(r, this._connectedDevice.deviceModel.id),\n });\n }\n\n public executeDeviceAction<\n Output,\n Input,\n E extends DmkError,\n IntermediateValue extends DeviceActionIntermediateValue,\n >(\n deviceAction: DeviceAction<Output, Input, E, IntermediateValue>,\n ): ExecuteDeviceActionReturnType<Output, E, IntermediateValue> {\n const { observable, cancel } = deviceAction._execute({\n sendApdu: async (apdu: Uint8Array) => this.sendApdu(apdu),\n sendCommand: async <Response, ErrorStatusCodes, Args>(\n command: Command<Response, ErrorStatusCodes, Args>,\n abortTimeout?: number,\n ) => this.sendCommand(command, abortTimeout),\n getDeviceModel: () => this._connectedDevice.deviceModel,\n getDeviceSessionState: () => this._deviceState.getValue(),\n getDeviceSessionStateObservable: () => this.state,\n setDeviceSessionState: (state: DeviceSessionState) => {\n this.setDeviceSessionState(state);\n return this._deviceState.getValue();\n },\n disableRefresher: (blockerId: string) =>\n this._refresherService.disableRefresher(blockerId),\n getManagerApiService: () => this._managerApiService,\n getSecureChannelService: () => this._secureChannelService,\n });\n return { observable, cancel };\n }\n\n public close(): void {\n this._updateDeviceStatus(DeviceStatus.NOT_CONNECTED);\n this._deviceState.complete();\n this._deviceSessionRefresher.stopRefresher();\n }\n\n public disableRefresher(id: string): () => void {\n return this._refresherService.disableRefresher(id);\n }\n\n private _updateDeviceStatus(deviceStatus: DeviceStatus): void {\n const state = this._deviceState.getValue();\n this._deviceState.next({ ...state, deviceStatus });\n }\n}\n"],
5
+ "mappings": "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",
6
6
  "names": ["DeviceSession_exports", "__export", "DeviceSession", "__toCommonJS", "import_rxjs", "import_uuid", "import_CommandUtils", "import_DeviceStatus", "import_DeviceSessionState", "import_DeviceSessionRefresherConst", "import_MutexService", "import_RefresherService", "import_DevicePinger", "import_DeviceSessionEventDispatcher", "import_DeviceSessionRefresher", "import_DeviceSessionStateHandler", "connectedDevice", "id", "uuidv4", "loggerModuleFactory", "managerApiService", "secureChannelService", "deviceSessionRefresherOptions", "command", "abortTimeout", "state", "error", "rawApdu", "options", "release", "result", "response", "apdu", "err", "deviceAction", "observable", "cancel", "blockerId", "deviceStatus"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var c=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var D=(i,e)=>{for(var s in e)c(i,s,{get:e[s],enumerable:!0})},d=(i,e,s,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of p(e))!u.call(i,n)&&n!==s&&c(i,n,{get:()=>e[n],enumerable:!(a=S(e,n))||a.enumerable});return i};var l=i=>d(c({},"__esModule",{value:!0}),i);var h={};D(h,{DeviceSessionStateHandler:()=>E});module.exports=l(h);var t=require("../../../api/index"),r=require("../../device-session/model/DeviceSessionEventDispatcher");class E{constructor(e,s,a,n,o){this._sessionEventDispatcher=s;this._connectedDevice=a;this._deviceState=n;this.setDeviceSessionState=o;this._subscription=this._sessionEventDispatcher.listen().subscribe(v=>this.mapEventAction(v)),this._logger=e("device-session-state-handler")}_subscription;_logger;_updateDeviceState(e){const s=this._parseDeviceStatus(e);if(s){const{sessionStateType:a,deviceStatus:n,currentApp:o}=s;this.setDeviceSessionState({sessionStateType:a,deviceStatus:n,deviceModelId:this._connectedDevice.deviceModel.id,currentApp:o,installedApps:[],isSecureConnectionAllowed:!1})}}mapEventAction=e=>{switch(e.eventName){case r.SessionEvents.COMMAND_SUCCEEDED:return this._updateDeviceState(e.eventData);case r.SessionEvents.DEVICE_STATE_UPDATE_BUSY:return this.setDeviceSessionState({...this._deviceState.getValue(),deviceStatus:t.DeviceStatus.BUSY});case r.SessionEvents.DEVICE_STATE_UPDATE_LOCKED:return this.setDeviceSessionState({...this._deviceState.getValue(),deviceStatus:t.DeviceStatus.LOCKED});case r.SessionEvents.DEVICE_STATE_UPDATE_CONNECTED:return this.setDeviceSessionState({...this._deviceState.getValue(),deviceStatus:t.DeviceStatus.CONNECTED});default:return null}};_parseDeviceStatus(e){return(0,t.isSuccessCommandResult)(e)?{sessionStateType:t.DeviceSessionStateType.ReadyWithoutSecureChannel,deviceStatus:t.DeviceStatus.CONNECTED,currentApp:{name:e.data.name,version:e.data.version}}:(this._logger.debug("Error while parsing APDU response",{data:{parsedResponse:e}}),null)}unsubscribe(){this._subscription.unsubscribe()}}0&&(module.exports={DeviceSessionStateHandler});
1
+ "use strict";var v=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var d=(s,e)=>{for(var n in e)v(s,n,{get:e[n],enumerable:!0})},D=(s,e,n,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of p(e))!u.call(s,i)&&i!==n&&v(s,i,{get:()=>e[i],enumerable:!(a=S(e,i))||a.enumerable});return s};var l=s=>D(v({},"__esModule",{value:!0}),s);var E={};d(E,{DeviceSessionStateHandler:()=>h});module.exports=l(E);var t=require("../../../api/index"),c=require("../../device-session/model/DeviceSessionEventDispatcher");class h{constructor(e,n,a,i,o){this._sessionEventDispatcher=n;this._connectedDevice=a;this._deviceState=i;this.setDeviceSessionState=o;this._subscription=this._sessionEventDispatcher.listen().subscribe(r=>this.mapEventAction(r)),this._logger=e("device-session-state-handler")}_subscription;_logger;_updateDeviceState(e){const n=this._parseDeviceStatus(e);if(n){const{sessionStateType:a,deviceStatus:i,currentApp:o}=n,r=this._deviceState.getValue();r.sessionStateType===t.DeviceSessionStateType.Connected?this.setDeviceSessionState({sessionStateType:a,deviceStatus:i,deviceModelId:this._connectedDevice.deviceModel.id,currentApp:o,installedApps:[],isSecureConnectionAllowed:!1}):this.setDeviceSessionState({...r,sessionStateType:a,deviceStatus:i,deviceModelId:this._connectedDevice.deviceModel.id,currentApp:o})}}mapEventAction=e=>{switch(e.eventName){case c.SessionEvents.COMMAND_SUCCEEDED:return this._updateDeviceState(e.eventData);case c.SessionEvents.DEVICE_STATE_UPDATE_BUSY:return this.setDeviceSessionState({...this._deviceState.getValue(),deviceStatus:t.DeviceStatus.BUSY});case c.SessionEvents.DEVICE_STATE_UPDATE_LOCKED:return this.setDeviceSessionState({...this._deviceState.getValue(),deviceStatus:t.DeviceStatus.LOCKED});case c.SessionEvents.DEVICE_STATE_UPDATE_CONNECTED:return this.setDeviceSessionState({...this._deviceState.getValue(),deviceStatus:t.DeviceStatus.CONNECTED});default:return null}};_parseDeviceStatus(e){return(0,t.isSuccessCommandResult)(e)?{sessionStateType:t.DeviceSessionStateType.ReadyWithoutSecureChannel,deviceStatus:t.DeviceStatus.CONNECTED,currentApp:{name:e.data.name,version:e.data.version}}:(this._logger.debug("Error while parsing APDU response",{data:{parsedResponse:e}}),null)}unsubscribe(){this._subscription.unsubscribe()}}0&&(module.exports={DeviceSessionStateHandler});
2
2
  //# sourceMappingURL=DeviceSessionStateHandler.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/internal/device-session/model/DeviceSessionStateHandler.ts"],
4
- "sourcesContent": ["import { type BehaviorSubject, type Subscription } from \"rxjs\";\n\nimport { type DeviceSessionState } from \"@api/device-session/DeviceSessionState\";\nimport {\n DeviceSessionStateType,\n DeviceStatus,\n type GetAppAndVersionResponse,\n isSuccessCommandResult,\n type TransportConnectedDevice,\n} from \"@api/index\";\nimport { type CommandResult, type LoggerPublisherService } from \"@api/types\";\nimport {\n type DeviceSessionEventDispatcher,\n type NewEvent,\n SessionEvents,\n} from \"@internal/device-session/model/DeviceSessionEventDispatcher\";\n\nexport type SetDeviceSessionStateFn = (state: DeviceSessionState) => void;\n\ntype NewDeviceStatus = {\n sessionStateType: DeviceSessionStateType;\n deviceStatus: DeviceStatus;\n currentApp: {\n name: string;\n version: string;\n };\n};\n\nexport class DeviceSessionStateHandler {\n private _subscription: Subscription;\n private readonly _logger: LoggerPublisherService;\n\n constructor(\n loggerModuleFactory: (tag: string) => LoggerPublisherService,\n private _sessionEventDispatcher: DeviceSessionEventDispatcher,\n private _connectedDevice: TransportConnectedDevice,\n private _deviceState: BehaviorSubject<DeviceSessionState>,\n private setDeviceSessionState: SetDeviceSessionStateFn,\n ) {\n this._subscription = this._sessionEventDispatcher\n .listen()\n .subscribe((event) => this.mapEventAction(event));\n this._logger = loggerModuleFactory(\"device-session-state-handler\");\n }\n\n private _updateDeviceState(\n parsedResponse: CommandResult<GetAppAndVersionResponse>,\n ): void {\n const newDeviceStatus = this._parseDeviceStatus(parsedResponse);\n\n if (newDeviceStatus) {\n const { sessionStateType, deviceStatus, currentApp } = newDeviceStatus;\n\n this.setDeviceSessionState({\n sessionStateType,\n deviceStatus,\n deviceModelId: this._connectedDevice.deviceModel.id,\n currentApp,\n installedApps: [],\n isSecureConnectionAllowed: false,\n });\n }\n }\n\n private mapEventAction = (event: NewEvent) => {\n switch (event.eventName) {\n case SessionEvents.COMMAND_SUCCEEDED:\n return this._updateDeviceState(event.eventData);\n case SessionEvents.DEVICE_STATE_UPDATE_BUSY:\n return this.setDeviceSessionState({\n ...this._deviceState.getValue(),\n deviceStatus: DeviceStatus.BUSY,\n });\n case SessionEvents.DEVICE_STATE_UPDATE_LOCKED:\n return this.setDeviceSessionState({\n ...this._deviceState.getValue(),\n deviceStatus: DeviceStatus.LOCKED,\n });\n case SessionEvents.DEVICE_STATE_UPDATE_CONNECTED:\n return this.setDeviceSessionState({\n ...this._deviceState.getValue(),\n deviceStatus: DeviceStatus.CONNECTED,\n });\n default:\n return null;\n }\n };\n\n private _parseDeviceStatus(\n parsedResponse: CommandResult<GetAppAndVersionResponse>,\n ): NewDeviceStatus | null {\n if (isSuccessCommandResult(parsedResponse)) {\n return {\n sessionStateType: DeviceSessionStateType.ReadyWithoutSecureChannel,\n deviceStatus: DeviceStatus.CONNECTED,\n currentApp: {\n name: parsedResponse.data.name,\n version: parsedResponse.data.version,\n },\n };\n } else {\n this._logger.debug(\"Error while parsing APDU response\", {\n data: { parsedResponse },\n });\n return null;\n }\n }\n\n public unsubscribe(): void {\n this._subscription.unsubscribe();\n }\n}\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,+BAAAE,IAAA,eAAAC,EAAAH,GAGA,IAAAI,EAMO,sBAEPC,EAIO,uEAaA,MAAMH,CAA0B,CAIrC,YACEI,EACQC,EACAC,EACAC,EACAC,EACR,CAJQ,6BAAAH,EACA,sBAAAC,EACA,kBAAAC,EACA,2BAAAC,EAER,KAAK,cAAgB,KAAK,wBACvB,OAAO,EACP,UAAWC,GAAU,KAAK,eAAeA,CAAK,CAAC,EAClD,KAAK,QAAUL,EAAoB,8BAA8B,CACnE,CAdQ,cACS,QAeT,mBACNM,EACM,CACN,MAAMC,EAAkB,KAAK,mBAAmBD,CAAc,EAE9D,GAAIC,EAAiB,CACnB,KAAM,CAAE,iBAAAC,EAAkB,aAAAC,EAAc,WAAAC,CAAW,EAAIH,EAEvD,KAAK,sBAAsB,CACzB,iBAAAC,EACA,aAAAC,EACA,cAAe,KAAK,iBAAiB,YAAY,GACjD,WAAAC,EACA,cAAe,CAAC,EAChB,0BAA2B,EAC7B,CAAC,CACH,CACF,CAEQ,eAAkBL,GAAoB,CAC5C,OAAQA,EAAM,UAAW,CACvB,KAAK,gBAAc,kBACjB,OAAO,KAAK,mBAAmBA,EAAM,SAAS,EAChD,KAAK,gBAAc,yBACjB,OAAO,KAAK,sBAAsB,CAChC,GAAG,KAAK,aAAa,SAAS,EAC9B,aAAc,eAAa,IAC7B,CAAC,EACH,KAAK,gBAAc,2BACjB,OAAO,KAAK,sBAAsB,CAChC,GAAG,KAAK,aAAa,SAAS,EAC9B,aAAc,eAAa,MAC7B,CAAC,EACH,KAAK,gBAAc,8BACjB,OAAO,KAAK,sBAAsB,CAChC,GAAG,KAAK,aAAa,SAAS,EAC9B,aAAc,eAAa,SAC7B,CAAC,EACH,QACE,OAAO,IACX,CACF,EAEQ,mBACNC,EACwB,CACxB,SAAI,0BAAuBA,CAAc,EAChC,CACL,iBAAkB,yBAAuB,0BACzC,aAAc,eAAa,UAC3B,WAAY,CACV,KAAMA,EAAe,KAAK,KAC1B,QAASA,EAAe,KAAK,OAC/B,CACF,GAEA,KAAK,QAAQ,MAAM,oCAAqC,CACtD,KAAM,CAAE,eAAAA,CAAe,CACzB,CAAC,EACM,KAEX,CAEO,aAAoB,CACzB,KAAK,cAAc,YAAY,CACjC,CACF",
6
- "names": ["DeviceSessionStateHandler_exports", "__export", "DeviceSessionStateHandler", "__toCommonJS", "import_api", "import_DeviceSessionEventDispatcher", "loggerModuleFactory", "_sessionEventDispatcher", "_connectedDevice", "_deviceState", "setDeviceSessionState", "event", "parsedResponse", "newDeviceStatus", "sessionStateType", "deviceStatus", "currentApp"]
4
+ "sourcesContent": ["import { type BehaviorSubject, type Subscription } from \"rxjs\";\n\nimport { type DeviceSessionState } from \"@api/device-session/DeviceSessionState\";\nimport {\n DeviceSessionStateType,\n DeviceStatus,\n type GetAppAndVersionResponse,\n isSuccessCommandResult,\n type TransportConnectedDevice,\n} from \"@api/index\";\nimport { type CommandResult, type LoggerPublisherService } from \"@api/types\";\nimport {\n type DeviceSessionEventDispatcher,\n type NewEvent,\n SessionEvents,\n} from \"@internal/device-session/model/DeviceSessionEventDispatcher\";\n\nexport type SetDeviceSessionStateFn = (state: DeviceSessionState) => void;\n\ntype NewDeviceStatus = {\n sessionStateType: DeviceSessionStateType;\n deviceStatus: DeviceStatus;\n currentApp: {\n name: string;\n version: string;\n };\n};\n\nexport class DeviceSessionStateHandler {\n private _subscription: Subscription;\n private readonly _logger: LoggerPublisherService;\n\n constructor(\n loggerModuleFactory: (tag: string) => LoggerPublisherService,\n private _sessionEventDispatcher: DeviceSessionEventDispatcher,\n private _connectedDevice: TransportConnectedDevice,\n private _deviceState: BehaviorSubject<DeviceSessionState>,\n private setDeviceSessionState: SetDeviceSessionStateFn,\n ) {\n this._subscription = this._sessionEventDispatcher\n .listen()\n .subscribe((event) => this.mapEventAction(event));\n this._logger = loggerModuleFactory(\"device-session-state-handler\");\n }\n\n private _updateDeviceState(\n parsedResponse: CommandResult<GetAppAndVersionResponse>,\n ): void {\n const newDeviceStatus = this._parseDeviceStatus(parsedResponse);\n\n if (newDeviceStatus) {\n const { sessionStateType, deviceStatus, currentApp } = newDeviceStatus;\n const state = this._deviceState.getValue();\n if (state.sessionStateType === DeviceSessionStateType.Connected) {\n // When device is connected, initialize fields to default values\n this.setDeviceSessionState({\n sessionStateType,\n deviceStatus,\n deviceModelId: this._connectedDevice.deviceModel.id,\n currentApp,\n installedApps: [],\n isSecureConnectionAllowed: false,\n });\n } else {\n // When device is ready, keep un-modified state fields\n this.setDeviceSessionState({\n ...state,\n sessionStateType,\n deviceStatus,\n deviceModelId: this._connectedDevice.deviceModel.id,\n currentApp,\n });\n }\n }\n }\n\n private mapEventAction = (event: NewEvent) => {\n switch (event.eventName) {\n case SessionEvents.COMMAND_SUCCEEDED:\n return this._updateDeviceState(event.eventData);\n case SessionEvents.DEVICE_STATE_UPDATE_BUSY:\n return this.setDeviceSessionState({\n ...this._deviceState.getValue(),\n deviceStatus: DeviceStatus.BUSY,\n });\n case SessionEvents.DEVICE_STATE_UPDATE_LOCKED:\n return this.setDeviceSessionState({\n ...this._deviceState.getValue(),\n deviceStatus: DeviceStatus.LOCKED,\n });\n case SessionEvents.DEVICE_STATE_UPDATE_CONNECTED:\n return this.setDeviceSessionState({\n ...this._deviceState.getValue(),\n deviceStatus: DeviceStatus.CONNECTED,\n });\n default:\n return null;\n }\n };\n\n private _parseDeviceStatus(\n parsedResponse: CommandResult<GetAppAndVersionResponse>,\n ): NewDeviceStatus | null {\n if (isSuccessCommandResult(parsedResponse)) {\n return {\n sessionStateType: DeviceSessionStateType.ReadyWithoutSecureChannel,\n deviceStatus: DeviceStatus.CONNECTED,\n currentApp: {\n name: parsedResponse.data.name,\n version: parsedResponse.data.version,\n },\n };\n } else {\n this._logger.debug(\"Error while parsing APDU response\", {\n data: { parsedResponse },\n });\n return null;\n }\n }\n\n public unsubscribe(): void {\n this._subscription.unsubscribe();\n }\n}\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,+BAAAE,IAAA,eAAAC,EAAAH,GAGA,IAAAI,EAMO,sBAEPC,EAIO,uEAaA,MAAMH,CAA0B,CAIrC,YACEI,EACQC,EACAC,EACAC,EACAC,EACR,CAJQ,6BAAAH,EACA,sBAAAC,EACA,kBAAAC,EACA,2BAAAC,EAER,KAAK,cAAgB,KAAK,wBACvB,OAAO,EACP,UAAWC,GAAU,KAAK,eAAeA,CAAK,CAAC,EAClD,KAAK,QAAUL,EAAoB,8BAA8B,CACnE,CAdQ,cACS,QAeT,mBACNM,EACM,CACN,MAAMC,EAAkB,KAAK,mBAAmBD,CAAc,EAE9D,GAAIC,EAAiB,CACnB,KAAM,CAAE,iBAAAC,EAAkB,aAAAC,EAAc,WAAAC,CAAW,EAAIH,EACjDI,EAAQ,KAAK,aAAa,SAAS,EACrCA,EAAM,mBAAqB,yBAAuB,UAEpD,KAAK,sBAAsB,CACzB,iBAAAH,EACA,aAAAC,EACA,cAAe,KAAK,iBAAiB,YAAY,GACjD,WAAAC,EACA,cAAe,CAAC,EAChB,0BAA2B,EAC7B,CAAC,EAGD,KAAK,sBAAsB,CACzB,GAAGC,EACH,iBAAAH,EACA,aAAAC,EACA,cAAe,KAAK,iBAAiB,YAAY,GACjD,WAAAC,CACF,CAAC,CAEL,CACF,CAEQ,eAAkBL,GAAoB,CAC5C,OAAQA,EAAM,UAAW,CACvB,KAAK,gBAAc,kBACjB,OAAO,KAAK,mBAAmBA,EAAM,SAAS,EAChD,KAAK,gBAAc,yBACjB,OAAO,KAAK,sBAAsB,CAChC,GAAG,KAAK,aAAa,SAAS,EAC9B,aAAc,eAAa,IAC7B,CAAC,EACH,KAAK,gBAAc,2BACjB,OAAO,KAAK,sBAAsB,CAChC,GAAG,KAAK,aAAa,SAAS,EAC9B,aAAc,eAAa,MAC7B,CAAC,EACH,KAAK,gBAAc,8BACjB,OAAO,KAAK,sBAAsB,CAChC,GAAG,KAAK,aAAa,SAAS,EAC9B,aAAc,eAAa,SAC7B,CAAC,EACH,QACE,OAAO,IACX,CACF,EAEQ,mBACNC,EACwB,CACxB,SAAI,0BAAuBA,CAAc,EAChC,CACL,iBAAkB,yBAAuB,0BACzC,aAAc,eAAa,UAC3B,WAAY,CACV,KAAMA,EAAe,KAAK,KAC1B,QAASA,EAAe,KAAK,OAC/B,CACF,GAEA,KAAK,QAAQ,MAAM,oCAAqC,CACtD,KAAM,CAAE,eAAAA,CAAe,CACzB,CAAC,EACM,KAEX,CAEO,aAAoB,CACzB,KAAK,cAAc,YAAY,CACjC,CACF",
6
+ "names": ["DeviceSessionStateHandler_exports", "__export", "DeviceSessionStateHandler", "__toCommonJS", "import_api", "import_DeviceSessionEventDispatcher", "loggerModuleFactory", "_sessionEventDispatcher", "_connectedDevice", "_deviceState", "setDeviceSessionState", "event", "parsedResponse", "newDeviceStatus", "sessionStateType", "deviceStatus", "currentApp", "state"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var r=require("rxjs"),t=require("vitest"),e=require("../../../api/index"),a=require("../../device-session/model/DeviceSessionEventDispatcher"),S=require("./DeviceSessionStateHandler");describe("DeviceSessionStateHandler",()=>{let n,d,c;const E=vi.fn(()=>c);let v,l,s,i;beforeEach(()=>{n=new r.Subject,d={listen:()=>n,dispatch:vi.fn()},c={error:vi.fn(),debug:vi.fn()},v={deviceModel:{id:"device-model-1"}},l=new r.BehaviorSubject({sessionStateType:e.DeviceSessionStateType.ReadyWithoutSecureChannel,deviceStatus:e.DeviceStatus.CONNECTED,deviceModelId:e.DeviceModelId.NANO_X,currentApp:{name:"",version:""},installedApps:[],isSecureConnectionAllowed:!1}),s=vi.fn(),i=new S.DeviceSessionStateHandler(E,d,v,l,s)}),afterEach(()=>{i&&typeof i.unsubscribe=="function"&&i.unsubscribe()}),it("updates device state on COMMAND_SUCCEEDED event with a successful response",()=>{const o={data:{name:"TestApp",version:"1.0.0"},status:e.CommandResultStatus.Success};n.next({eventName:a.SessionEvents.COMMAND_SUCCEEDED,eventData:o}),(0,t.expect)(s).toHaveBeenCalledWith({sessionStateType:e.DeviceSessionStateType.ReadyWithoutSecureChannel,deviceStatus:e.DeviceStatus.CONNECTED,deviceModelId:"device-model-1",currentApp:{name:"TestApp",version:"1.0.0"},installedApps:[],isSecureConnectionAllowed:!1})}),it("updates device state on DEVICE_STATE_UPDATE_BUSY event",()=>{n.next({eventName:a.SessionEvents.DEVICE_STATE_UPDATE_BUSY}),(0,t.expect)(s).toHaveBeenCalledWith(t.expect.objectContaining({deviceStatus:e.DeviceStatus.BUSY}))}),it("updates device state on DEVICE_STATE_UPDATE_CONNECTED event",()=>{n.next({eventName:a.SessionEvents.DEVICE_STATE_UPDATE_CONNECTED}),(0,t.expect)(s).toHaveBeenCalledWith(t.expect.objectContaining({deviceStatus:e.DeviceStatus.CONNECTED}))}),it("logs error and does not update state if command result is unsuccessful",()=>{const o={data:null,error:{_tag:"SomeOtherError"}};n.next({eventName:a.SessionEvents.COMMAND_SUCCEEDED,eventData:o}),(0,t.expect)(c.debug).toHaveBeenCalledWith("Error while parsing APDU response",{data:{parsedResponse:o}}),(0,t.expect)(s).not.toHaveBeenCalled()}),it("does not update state if command result is not a success",()=>{const o={data:null,error:{_tag:"SomeOtherError"}};n.next({eventName:a.SessionEvents.COMMAND_SUCCEEDED,eventData:o}),(0,t.expect)(s).not.toHaveBeenCalled()})});
1
+ "use strict";var r=require("rxjs"),t=require("vitest"),e=require("../../../api/index"),i=require("../../device-session/model/DeviceSessionEventDispatcher"),u=require("./DeviceSessionStateHandler");describe("DeviceSessionStateHandler",()=>{let n,v,c;const S=vi.fn(()=>c);let l,d,s,o;beforeEach(()=>{n=new r.Subject,v={listen:()=>n,dispatch:vi.fn()},c={error:vi.fn(),debug:vi.fn()},l={deviceModel:{id:"device-model-1"}},d=new r.BehaviorSubject({sessionStateType:e.DeviceSessionStateType.Connected,deviceStatus:e.DeviceStatus.CONNECTED,deviceModelId:e.DeviceModelId.NANO_X}),s=vi.fn(),o=new u.DeviceSessionStateHandler(S,v,l,d,s)}),afterEach(()=>{o&&typeof o.unsubscribe=="function"&&o.unsubscribe()}),it("updates device state on COMMAND_SUCCEEDED event with a successful response",()=>{const a={data:{name:"TestApp",version:"1.0.0"},status:e.CommandResultStatus.Success};n.next({eventName:i.SessionEvents.COMMAND_SUCCEEDED,eventData:a}),(0,t.expect)(s).toHaveBeenCalledWith({sessionStateType:e.DeviceSessionStateType.ReadyWithoutSecureChannel,deviceStatus:e.DeviceStatus.CONNECTED,deviceModelId:"device-model-1",currentApp:{name:"TestApp",version:"1.0.0"},installedApps:[],isSecureConnectionAllowed:!1})}),it("updates device state on COMMAND_SUCCEEDED event when device is ready",()=>{d.next({sessionStateType:e.DeviceSessionStateType.ReadyWithoutSecureChannel,deviceStatus:e.DeviceStatus.CONNECTED,deviceModelId:e.DeviceModelId.NANO_X,currentApp:{name:"",version:""},installedApps:["Bitcoin","Ethereum"],isSecureConnectionAllowed:!0});const a={data:{name:"TestApp",version:"1.0.0"},status:e.CommandResultStatus.Success};n.next({eventName:i.SessionEvents.COMMAND_SUCCEEDED,eventData:a}),(0,t.expect)(s).toHaveBeenCalledWith({sessionStateType:e.DeviceSessionStateType.ReadyWithoutSecureChannel,deviceStatus:e.DeviceStatus.CONNECTED,deviceModelId:"device-model-1",currentApp:{name:"TestApp",version:"1.0.0"},installedApps:["Bitcoin","Ethereum"],isSecureConnectionAllowed:!0})}),it("updates device state on DEVICE_STATE_UPDATE_BUSY event",()=>{n.next({eventName:i.SessionEvents.DEVICE_STATE_UPDATE_BUSY}),(0,t.expect)(s).toHaveBeenCalledWith(t.expect.objectContaining({deviceStatus:e.DeviceStatus.BUSY}))}),it("updates device state on DEVICE_STATE_UPDATE_CONNECTED event",()=>{n.next({eventName:i.SessionEvents.DEVICE_STATE_UPDATE_CONNECTED}),(0,t.expect)(s).toHaveBeenCalledWith(t.expect.objectContaining({deviceStatus:e.DeviceStatus.CONNECTED}))}),it("logs error and does not update state if command result is unsuccessful",()=>{const a={data:null,error:{_tag:"SomeOtherError"}};n.next({eventName:i.SessionEvents.COMMAND_SUCCEEDED,eventData:a}),(0,t.expect)(c.debug).toHaveBeenCalledWith("Error while parsing APDU response",{data:{parsedResponse:a}}),(0,t.expect)(s).not.toHaveBeenCalled()}),it("does not update state if command result is not a success",()=>{const a={data:null,error:{_tag:"SomeOtherError"}};n.next({eventName:i.SessionEvents.COMMAND_SUCCEEDED,eventData:a}),(0,t.expect)(s).not.toHaveBeenCalled()})});
2
2
  //# sourceMappingURL=DeviceSessionStateHandler.test.js.map