@ledgerhq/device-management-kit 0.0.0-wip-20250214170223 → 0.0.0-wrong-error-when-in-experimental-provider-20251021162636

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 (1076) hide show
  1. package/README.md +64 -11
  2. package/lib/cjs/index.js.map +1 -1
  3. package/lib/cjs/package.json +22 -23
  4. package/lib/cjs/src/api/DeviceManagementKit.js +1 -1
  5. package/lib/cjs/src/api/DeviceManagementKit.js.map +3 -3
  6. package/lib/cjs/src/api/DeviceManagementKit.test.js +1 -1
  7. package/lib/cjs/src/api/DeviceManagementKit.test.js.map +3 -3
  8. package/lib/cjs/src/api/DeviceManagementKitBuilder.js +1 -1
  9. package/lib/cjs/src/api/DeviceManagementKitBuilder.js.map +2 -2
  10. package/lib/cjs/src/api/DmkConfig.js +1 -1
  11. package/lib/cjs/src/api/DmkConfig.js.map +1 -1
  12. package/lib/cjs/src/api/apdu/utils/ByteArrayBuilder.js +1 -1
  13. package/lib/cjs/src/api/apdu/utils/ByteArrayBuilder.js.map +3 -3
  14. package/lib/cjs/src/api/apdu/utils/ByteArrayBuilder.test.js +1 -1
  15. package/lib/cjs/src/api/apdu/utils/ByteArrayBuilder.test.js.map +2 -2
  16. package/lib/cjs/src/api/apdu/utils/ByteArrayParser.js +1 -1
  17. package/lib/cjs/src/api/apdu/utils/ByteArrayParser.js.map +3 -3
  18. package/lib/cjs/src/api/command/Errors.js +1 -1
  19. package/lib/cjs/src/api/command/Errors.js.map +3 -3
  20. package/lib/cjs/src/api/command/di/commandModule.js +1 -1
  21. package/lib/cjs/src/api/command/di/commandModule.js.map +3 -3
  22. package/lib/cjs/src/api/command/di/commandModule.test.js +1 -1
  23. package/lib/cjs/src/api/command/di/commandModule.test.js.map +2 -2
  24. package/lib/cjs/src/api/command/model/CommandResult.js +1 -1
  25. package/lib/cjs/src/api/command/model/CommandResult.js.map +2 -2
  26. package/lib/cjs/src/api/command/os/GetCustomImageSizeCommand.js +2 -0
  27. package/lib/cjs/src/api/command/os/GetCustomImageSizeCommand.js.map +7 -0
  28. package/lib/cjs/src/api/command/os/GetCustomImageSizeCommand.test.js +2 -0
  29. package/lib/cjs/src/api/command/os/GetCustomImageSizeCommand.test.js.map +7 -0
  30. package/lib/cjs/src/api/command/os/GetOsVersionCommand.js +1 -1
  31. package/lib/cjs/src/api/command/os/GetOsVersionCommand.js.map +3 -3
  32. package/lib/cjs/src/api/command/os/GetOsVersionCommand.test.js +1 -1
  33. package/lib/cjs/src/api/command/os/GetOsVersionCommand.test.js.map +3 -3
  34. package/lib/cjs/src/api/command/os/ListLanguagePackCommand.js +2 -0
  35. package/lib/cjs/src/api/command/os/ListLanguagePackCommand.js.map +7 -0
  36. package/lib/cjs/src/api/command/os/ListLanguagePackCommand.test.js +2 -0
  37. package/lib/cjs/src/api/command/os/ListLanguagePackCommand.test.js.map +7 -0
  38. package/lib/cjs/src/api/command/os/SecureElementFlagsParser.js +2 -0
  39. package/lib/cjs/src/api/command/os/SecureElementFlagsParser.js.map +7 -0
  40. package/lib/cjs/src/api/command/os/SecureElementFlagsParser.test.js +2 -0
  41. package/lib/cjs/src/api/command/os/SecureElementFlagsParser.test.js.map +7 -0
  42. package/lib/cjs/src/api/command/os/__mocks__/GetOsVersionCommand.js +1 -1
  43. package/lib/cjs/src/api/command/os/__mocks__/GetOsVersionCommand.js.map +2 -2
  44. package/lib/cjs/src/api/command/use-case/SendCommandUseCase.js +1 -1
  45. package/lib/cjs/src/api/command/use-case/SendCommandUseCase.js.map +3 -3
  46. package/lib/cjs/src/api/command/use-case/SendCommandUseCase.test.js +1 -1
  47. package/lib/cjs/src/api/command/use-case/SendCommandUseCase.test.js.map +3 -3
  48. package/lib/cjs/src/api/command/utils/CommandUtils.js +1 -1
  49. package/lib/cjs/src/api/command/utils/CommandUtils.js.map +2 -2
  50. package/lib/cjs/src/api/command/utils/CommandUtils.test.js +1 -1
  51. package/lib/cjs/src/api/command/utils/CommandUtils.test.js.map +2 -2
  52. package/lib/cjs/src/api/command/utils/GlobalCommandError.js +1 -1
  53. package/lib/cjs/src/api/command/utils/GlobalCommandError.js.map +2 -2
  54. package/lib/cjs/src/api/device/DeviceModel.js +1 -1
  55. package/lib/cjs/src/api/device/DeviceModel.js.map +2 -2
  56. package/lib/cjs/src/api/device/SecureElementFlags.js +2 -0
  57. package/lib/cjs/src/api/device/SecureElementFlags.js.map +7 -0
  58. package/lib/cjs/src/api/device-action/DeviceAction.js +1 -1
  59. package/lib/cjs/src/api/device-action/DeviceAction.js.map +1 -1
  60. package/lib/cjs/src/api/device-action/__test-utils__/makeInternalApi.js +1 -1
  61. package/lib/cjs/src/api/device-action/__test-utils__/makeInternalApi.js.map +3 -3
  62. package/lib/cjs/src/api/device-action/__test-utils__/setupTestMachine.js +1 -1
  63. package/lib/cjs/src/api/device-action/__test-utils__/setupTestMachine.js.map +3 -3
  64. package/lib/cjs/src/api/device-action/di/deviceActionModule.js +1 -1
  65. package/lib/cjs/src/api/device-action/di/deviceActionModule.js.map +3 -3
  66. package/lib/cjs/src/api/device-action/di/deviceActionModule.test.js +1 -1
  67. package/lib/cjs/src/api/device-action/di/deviceActionModule.test.js.map +2 -2
  68. package/lib/cjs/src/api/device-action/model/UserInteractionRequired.js +1 -1
  69. package/lib/cjs/src/api/device-action/model/UserInteractionRequired.js.map +2 -2
  70. package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.js +1 -1
  71. package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.js.map +2 -2
  72. package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.test.js +1 -1
  73. package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.test.js.map +2 -2
  74. package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceActionTypes.js +1 -1
  75. package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceActionTypes.js.map +1 -1
  76. package/lib/cjs/src/api/device-action/os/Errors.js +1 -1
  77. package/lib/cjs/src/api/device-action/os/Errors.js.map +3 -3
  78. package/lib/cjs/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.js +2 -0
  79. package/lib/cjs/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.js.map +7 -0
  80. package/lib/cjs/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.test.js +2 -0
  81. package/lib/cjs/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.test.js.map +7 -0
  82. package/lib/cjs/src/api/device-action/os/GetDeviceMetadata/types.js +2 -0
  83. package/lib/cjs/src/api/device-action/os/GetDeviceMetadata/types.js.map +7 -0
  84. package/lib/cjs/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.js +1 -1
  85. package/lib/cjs/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.js.map +3 -3
  86. package/lib/cjs/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.test.js +1 -1
  87. package/lib/cjs/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.test.js.map +2 -2
  88. package/lib/cjs/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.js +1 -1
  89. package/lib/cjs/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.js.map +3 -3
  90. package/lib/cjs/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.test.js +1 -1
  91. package/lib/cjs/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.test.js.map +2 -2
  92. package/lib/cjs/src/api/device-action/os/GoToDashboard/types.js +1 -1
  93. package/lib/cjs/src/api/device-action/os/GoToDashboard/types.js.map +1 -1
  94. package/lib/cjs/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.js +2 -0
  95. package/lib/cjs/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.js.map +7 -0
  96. package/lib/cjs/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.test.js +2 -0
  97. package/lib/cjs/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.test.js.map +7 -0
  98. package/lib/cjs/src/api/device-action/os/InstallOrUpdateApps/types.js +2 -0
  99. package/lib/cjs/src/api/device-action/os/InstallOrUpdateApps/types.js.map +7 -0
  100. package/lib/cjs/src/api/device-action/os/ListApps/ListAppsDeviceAction.js +1 -1
  101. package/lib/cjs/src/api/device-action/os/ListApps/ListAppsDeviceAction.js.map +2 -2
  102. package/lib/cjs/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.js +1 -1
  103. package/lib/cjs/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.js.map +3 -3
  104. package/lib/cjs/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.test.js +1 -1
  105. package/lib/cjs/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.test.js.map +3 -3
  106. package/lib/cjs/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.js +1 -1
  107. package/lib/cjs/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.js.map +3 -3
  108. package/lib/cjs/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.test.js +1 -1
  109. package/lib/cjs/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.test.js.map +2 -2
  110. package/lib/cjs/src/api/device-action/os/OpenAppDeviceAction/types.js +1 -1
  111. package/lib/cjs/src/api/device-action/os/OpenAppDeviceAction/types.js.map +1 -1
  112. package/lib/cjs/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.js +2 -0
  113. package/lib/cjs/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.js.map +7 -0
  114. package/lib/cjs/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.test.js +2 -0
  115. package/lib/cjs/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.test.js.map +7 -0
  116. package/lib/cjs/src/api/device-action/os/OpenAppWithDependencies/types.js +2 -0
  117. package/lib/cjs/src/api/device-action/os/OpenAppWithDependencies/types.js.map +7 -0
  118. package/lib/cjs/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.js +1 -1
  119. package/lib/cjs/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.js.map +2 -2
  120. package/lib/cjs/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.test.js +1 -1
  121. package/lib/cjs/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.test.js.map +2 -2
  122. package/lib/cjs/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceActionTypes.js +1 -1
  123. package/lib/cjs/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceActionTypes.js.map +1 -1
  124. package/lib/cjs/src/api/device-action/task/BuildAppsInstallPlanTask.js +2 -0
  125. package/lib/cjs/src/api/device-action/task/BuildAppsInstallPlanTask.js.map +7 -0
  126. package/lib/cjs/src/api/device-action/task/BuildAppsInstallPlanTask.test.js +2 -0
  127. package/lib/cjs/src/api/device-action/task/BuildAppsInstallPlanTask.test.js.map +7 -0
  128. package/lib/cjs/src/api/device-action/task/GetApplicationsMetadataTask.js +2 -0
  129. package/lib/cjs/src/api/device-action/task/GetApplicationsMetadataTask.js.map +7 -0
  130. package/lib/cjs/src/api/device-action/task/GetApplicationsMetadataTask.test.js +2 -0
  131. package/lib/cjs/src/api/device-action/task/GetApplicationsMetadataTask.test.js.map +7 -0
  132. package/lib/cjs/src/api/device-action/task/GetFirmwareMetadataTask.js +2 -0
  133. package/lib/cjs/src/api/device-action/task/GetFirmwareMetadataTask.js.map +7 -0
  134. package/lib/cjs/src/api/device-action/task/GetFirmwareMetadataTask.test.js +2 -0
  135. package/lib/cjs/src/api/device-action/task/GetFirmwareMetadataTask.test.js.map +7 -0
  136. package/lib/cjs/src/api/device-action/task/PredictOutOfMemoryTask.js +2 -0
  137. package/lib/cjs/src/api/device-action/task/PredictOutOfMemoryTask.js.map +7 -0
  138. package/lib/cjs/src/api/device-action/task/PredictOutOfMemoryTask.test.js +2 -0
  139. package/lib/cjs/src/api/device-action/task/PredictOutOfMemoryTask.test.js.map +7 -0
  140. package/lib/cjs/src/api/device-action/xstate-utils/XStateDeviceAction.js +1 -1
  141. package/lib/cjs/src/api/device-action/xstate-utils/XStateDeviceAction.js.map +3 -3
  142. package/lib/cjs/src/api/device-model/data/StaticDeviceModelDataSource.js +1 -1
  143. package/lib/cjs/src/api/device-model/data/StaticDeviceModelDataSource.js.map +2 -2
  144. package/lib/cjs/src/api/device-model/data/StaticDeviceModelDataSource.test.js +1 -1
  145. package/lib/cjs/src/api/device-model/data/StaticDeviceModelDataSource.test.js.map +2 -2
  146. package/lib/cjs/src/api/device-model/model/DeviceModel.js +1 -1
  147. package/lib/cjs/src/api/device-model/model/DeviceModel.js.map +2 -2
  148. package/lib/cjs/src/api/device-model/model/DeviceModel.stub.js +1 -1
  149. package/lib/cjs/src/api/device-model/model/DeviceModel.stub.js.map +2 -2
  150. package/lib/cjs/src/api/device-session/DeviceSessionState.js +1 -1
  151. package/lib/cjs/src/api/device-session/DeviceSessionState.js.map +2 -2
  152. package/lib/cjs/src/api/device-session/use-case/DisableDeviceSessionRefresher.js +2 -0
  153. package/lib/cjs/src/api/device-session/use-case/DisableDeviceSessionRefresher.js.map +7 -0
  154. package/lib/cjs/src/api/device-session/use-case/DisableDeviceSessionRefresher.test.js +2 -0
  155. package/lib/cjs/src/api/device-session/use-case/DisableDeviceSessionRefresher.test.js.map +7 -0
  156. package/lib/cjs/src/api/index.js +1 -1
  157. package/lib/cjs/src/api/index.js.map +3 -3
  158. package/lib/cjs/src/api/logger-subscriber/service/WebLogsExporterLogger.test.js +1 -1
  159. package/lib/cjs/src/api/logger-subscriber/service/WebLogsExporterLogger.test.js.map +3 -3
  160. package/lib/cjs/src/api/secure-channel/constants.js +2 -0
  161. package/lib/cjs/src/api/secure-channel/constants.js.map +7 -0
  162. package/lib/cjs/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.js +2 -0
  163. package/lib/cjs/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.js.map +7 -0
  164. package/lib/cjs/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.test.js +2 -0
  165. package/lib/cjs/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.test.js.map +7 -0
  166. package/lib/cjs/src/api/secure-channel/device-action/GenuineCheck/types.js +2 -0
  167. package/lib/cjs/src/api/secure-channel/device-action/GenuineCheck/types.js.map +7 -0
  168. package/lib/cjs/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.js +2 -0
  169. package/lib/cjs/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.js.map +7 -0
  170. package/lib/cjs/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.test.js +2 -0
  171. package/lib/cjs/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.test.js.map +7 -0
  172. package/lib/cjs/src/api/secure-channel/device-action/InstallApp/types.js +2 -0
  173. package/lib/cjs/src/api/secure-channel/device-action/InstallApp/types.js.map +7 -0
  174. package/lib/cjs/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.js +2 -0
  175. package/lib/cjs/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.js.map +7 -0
  176. package/lib/cjs/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.test.js +2 -0
  177. package/lib/cjs/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.test.js.map +7 -0
  178. package/lib/cjs/src/api/secure-channel/device-action/ListInstalledApps/types.js +2 -0
  179. package/lib/cjs/src/api/secure-channel/device-action/ListInstalledApps/types.js.map +7 -0
  180. package/lib/cjs/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.js +2 -0
  181. package/lib/cjs/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.js.map +7 -0
  182. package/lib/cjs/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.test.js +2 -0
  183. package/lib/cjs/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.test.js.map +7 -0
  184. package/lib/cjs/src/api/secure-channel/device-action/UninstallApp/types.js +2 -0
  185. package/lib/cjs/src/api/secure-channel/device-action/UninstallApp/types.js.map +7 -0
  186. package/lib/cjs/src/api/secure-channel/task/ConnectToSecureChannelTask.js +2 -0
  187. package/lib/cjs/src/api/secure-channel/task/ConnectToSecureChannelTask.js.map +7 -0
  188. package/lib/cjs/src/api/secure-channel/task/ConnectToSecureChannelTask.test.js +2 -0
  189. package/lib/cjs/src/api/secure-channel/task/ConnectToSecureChannelTask.test.js.map +7 -0
  190. package/lib/cjs/src/api/secure-channel/task/types.js +2 -0
  191. package/lib/cjs/src/api/secure-channel/task/types.js.map +7 -0
  192. package/lib/cjs/src/api/secure-channel/types.js +2 -0
  193. package/lib/cjs/src/api/secure-channel/types.js.map +7 -0
  194. package/lib/cjs/src/api/secure-channel/utils.js +2 -0
  195. package/lib/cjs/src/api/secure-channel/utils.js.map +7 -0
  196. package/lib/cjs/src/api/secure-channel/utils.test.js +2 -0
  197. package/lib/cjs/src/api/secure-channel/utils.test.js.map +7 -0
  198. package/lib/cjs/src/api/transport/model/DeviceConnection.js +1 -1
  199. package/lib/cjs/src/api/transport/model/DeviceConnection.js.map +1 -1
  200. package/lib/cjs/src/api/transport/model/DeviceConnectionStateMachine.js +1 -1
  201. package/lib/cjs/src/api/transport/model/DeviceConnectionStateMachine.js.map +3 -3
  202. package/lib/cjs/src/api/transport/model/DeviceConnectionStateMachine.test.js +2 -0
  203. package/lib/cjs/src/api/transport/model/DeviceConnectionStateMachine.test.js.map +7 -0
  204. package/lib/cjs/src/api/transport/model/DiscoveredDevice.js +1 -1
  205. package/lib/cjs/src/api/transport/model/DiscoveredDevice.js.map +1 -1
  206. package/lib/cjs/src/api/transport/model/Errors.js +1 -1
  207. package/lib/cjs/src/api/transport/model/Errors.js.map +3 -3
  208. package/lib/cjs/src/api/transport/model/Transport.js.map +1 -1
  209. package/lib/cjs/src/api/transport/model/TransportConnectedDevice.test.js +1 -1
  210. package/lib/cjs/src/api/transport/model/TransportConnectedDevice.test.js.map +3 -3
  211. package/lib/cjs/src/api/transport/model/TransportDiscoveredDevice.js +1 -1
  212. package/lib/cjs/src/api/transport/model/TransportDiscoveredDevice.js.map +1 -1
  213. package/lib/cjs/src/api/transport/model/__mocks__/TransportMock.js +1 -1
  214. package/lib/cjs/src/api/transport/model/__mocks__/TransportMock.js.map +2 -2
  215. package/lib/cjs/src/api/types.js +1 -1
  216. package/lib/cjs/src/api/types.js.map +1 -1
  217. package/lib/cjs/src/api/utils/AppName.js +2 -0
  218. package/lib/cjs/src/api/utils/AppName.js.map +7 -0
  219. package/lib/cjs/src/api/utils/AppName.test.js +2 -0
  220. package/lib/cjs/src/api/utils/AppName.test.js.map +7 -0
  221. package/lib/cjs/src/api/utils/HexaString.js +1 -1
  222. package/lib/cjs/src/api/utils/HexaString.js.map +3 -3
  223. package/lib/cjs/src/api/utils/HexaString.test.js +1 -1
  224. package/lib/cjs/src/api/utils/HexaString.test.js.map +2 -2
  225. package/lib/cjs/src/di.js +1 -1
  226. package/lib/cjs/src/di.js.map +2 -2
  227. package/lib/cjs/src/internal/config/di/configModule.js +1 -1
  228. package/lib/cjs/src/internal/config/di/configModule.js.map +3 -3
  229. package/lib/cjs/src/internal/config/di/configModule.test.js +1 -1
  230. package/lib/cjs/src/internal/config/di/configModule.test.js.map +2 -2
  231. package/lib/cjs/src/internal/device-model/di/deviceModelModule.js +1 -1
  232. package/lib/cjs/src/internal/device-model/di/deviceModelModule.js.map +3 -3
  233. package/lib/cjs/src/internal/device-model/di/deviceModelModule.test.js +1 -1
  234. package/lib/cjs/src/internal/device-model/di/deviceModelModule.test.js.map +2 -2
  235. package/lib/cjs/src/internal/device-session/data/ApduResponseConst.js +1 -1
  236. package/lib/cjs/src/internal/device-session/data/ApduResponseConst.js.map +3 -3
  237. package/lib/cjs/src/internal/device-session/data/DeviceSessionRefresherConst.js +1 -1
  238. package/lib/cjs/src/internal/device-session/data/DeviceSessionRefresherConst.js.map +3 -3
  239. package/lib/cjs/src/internal/device-session/di/deviceSessionModule.js +1 -1
  240. package/lib/cjs/src/internal/device-session/di/deviceSessionModule.js.map +3 -3
  241. package/lib/cjs/src/internal/device-session/di/deviceSessionModule.test.js +1 -1
  242. package/lib/cjs/src/internal/device-session/di/deviceSessionModule.test.js.map +2 -2
  243. package/lib/cjs/src/internal/device-session/di/deviceSessionTypes.js +1 -1
  244. package/lib/cjs/src/internal/device-session/di/deviceSessionTypes.js.map +2 -2
  245. package/lib/cjs/src/internal/device-session/model/DevicePinger.js +2 -0
  246. package/lib/cjs/src/internal/device-session/model/DevicePinger.js.map +7 -0
  247. package/lib/cjs/src/internal/device-session/model/DevicePinger.test.js +2 -0
  248. package/lib/cjs/src/internal/device-session/model/DevicePinger.test.js.map +7 -0
  249. package/lib/cjs/src/internal/device-session/model/DeviceSession.js +1 -1
  250. package/lib/cjs/src/internal/device-session/model/DeviceSession.js.map +3 -3
  251. package/lib/cjs/src/internal/device-session/model/DeviceSession.stub.js +1 -1
  252. package/lib/cjs/src/internal/device-session/model/DeviceSession.stub.js.map +3 -3
  253. package/lib/cjs/src/internal/device-session/model/DeviceSessionEventDispatcher.js +2 -0
  254. package/lib/cjs/src/internal/device-session/model/DeviceSessionEventDispatcher.js.map +7 -0
  255. package/lib/cjs/src/internal/device-session/model/DeviceSessionEventDispatcher.test.js +2 -0
  256. package/lib/cjs/src/internal/device-session/model/DeviceSessionEventDispatcher.test.js.map +7 -0
  257. package/lib/cjs/src/internal/device-session/model/DeviceSessionRefresher.js +1 -1
  258. package/lib/cjs/src/internal/device-session/model/DeviceSessionRefresher.js.map +3 -3
  259. package/lib/cjs/src/internal/device-session/model/DeviceSessionRefresher.test.js +1 -1
  260. package/lib/cjs/src/internal/device-session/model/DeviceSessionRefresher.test.js.map +3 -3
  261. package/lib/cjs/src/internal/device-session/model/DeviceSessionStateHandler.js +2 -0
  262. package/lib/cjs/src/internal/device-session/model/DeviceSessionStateHandler.js.map +7 -0
  263. package/lib/cjs/src/internal/device-session/model/DeviceSessionStateHandler.test.js +2 -0
  264. package/lib/cjs/src/internal/device-session/model/DeviceSessionStateHandler.test.js.map +7 -0
  265. package/lib/cjs/src/internal/device-session/model/Frame.js +1 -1
  266. package/lib/cjs/src/internal/device-session/model/Frame.js.map +3 -3
  267. package/lib/cjs/src/internal/device-session/service/DefaultApduReceiverService.js +1 -1
  268. package/lib/cjs/src/internal/device-session/service/DefaultApduReceiverService.js.map +2 -2
  269. package/lib/cjs/src/internal/device-session/service/DefaultApduSenderService.js +1 -1
  270. package/lib/cjs/src/internal/device-session/service/DefaultApduSenderService.js.map +2 -2
  271. package/lib/cjs/src/internal/device-session/service/DefaultApduSenderService.test.js +1 -1
  272. package/lib/cjs/src/internal/device-session/service/DefaultApduSenderService.test.js.map +2 -2
  273. package/lib/cjs/src/internal/device-session/service/DefaultDeviceSessionService.test.js +1 -1
  274. package/lib/cjs/src/internal/device-session/service/DefaultDeviceSessionService.test.js.map +3 -3
  275. package/lib/cjs/src/internal/device-session/service/MutexService.js +2 -0
  276. package/lib/cjs/src/internal/device-session/service/MutexService.js.map +7 -0
  277. package/lib/cjs/src/internal/device-session/service/MutexService.test.js +2 -0
  278. package/lib/cjs/src/internal/device-session/service/MutexService.test.js.map +7 -0
  279. package/lib/cjs/src/internal/device-session/service/RefresherService.js +2 -0
  280. package/lib/cjs/src/internal/device-session/service/RefresherService.js.map +7 -0
  281. package/lib/cjs/src/internal/device-session/service/RefresherService.test.js +2 -0
  282. package/lib/cjs/src/internal/device-session/service/RefresherService.test.js.map +7 -0
  283. package/lib/cjs/src/internal/device-session/use-case/CloseSessionsUseCase.js +1 -1
  284. package/lib/cjs/src/internal/device-session/use-case/CloseSessionsUseCase.js.map +2 -2
  285. package/lib/cjs/src/internal/device-session/use-case/CloseSessionsUseCase.test.js +1 -1
  286. package/lib/cjs/src/internal/device-session/use-case/CloseSessionsUseCase.test.js.map +3 -3
  287. package/lib/cjs/src/internal/device-session/use-case/GetDeviceSessionStateUseCase.test.js +1 -1
  288. package/lib/cjs/src/internal/device-session/use-case/GetDeviceSessionStateUseCase.test.js.map +3 -3
  289. package/lib/cjs/src/internal/device-session/utils/deviceSessionUtils.js +2 -0
  290. package/lib/cjs/src/internal/device-session/utils/deviceSessionUtils.js.map +7 -0
  291. package/lib/cjs/src/internal/discovery/di/discoveryModule.js +1 -1
  292. package/lib/cjs/src/internal/discovery/di/discoveryModule.js.map +3 -3
  293. package/lib/cjs/src/internal/discovery/di/discoveryModule.test.js +1 -1
  294. package/lib/cjs/src/internal/discovery/di/discoveryModule.test.js.map +3 -3
  295. package/lib/cjs/src/internal/discovery/di/discoveryTypes.js +1 -1
  296. package/lib/cjs/src/internal/discovery/di/discoveryTypes.js.map +2 -2
  297. package/lib/cjs/src/internal/discovery/use-case/ConnectUseCase.js +1 -1
  298. package/lib/cjs/src/internal/discovery/use-case/ConnectUseCase.js.map +3 -3
  299. package/lib/cjs/src/internal/discovery/use-case/ConnectUseCase.test.js +1 -1
  300. package/lib/cjs/src/internal/discovery/use-case/ConnectUseCase.test.js.map +3 -3
  301. package/lib/cjs/src/internal/discovery/use-case/DisconnectUseCase.test.js +1 -1
  302. package/lib/cjs/src/internal/discovery/use-case/DisconnectUseCase.test.js.map +3 -3
  303. package/lib/cjs/src/internal/discovery/use-case/GetConnectedDeviceUseCase.test.js +1 -1
  304. package/lib/cjs/src/internal/discovery/use-case/GetConnectedDeviceUseCase.test.js.map +3 -3
  305. package/lib/cjs/src/internal/discovery/use-case/ListConnectedDevicesUseCase.test.js +1 -1
  306. package/lib/cjs/src/internal/discovery/use-case/ListConnectedDevicesUseCase.test.js.map +3 -3
  307. package/lib/cjs/src/internal/discovery/use-case/ListenToAvailableDevicesUseCase.js +2 -0
  308. package/lib/cjs/src/internal/discovery/use-case/ListenToAvailableDevicesUseCase.js.map +7 -0
  309. package/lib/cjs/src/internal/discovery/use-case/ListenToAvailableDevicesUseCase.test.js +2 -0
  310. package/lib/cjs/src/internal/discovery/use-case/ListenToAvailableDevicesUseCase.test.js.map +7 -0
  311. package/lib/cjs/src/internal/discovery/use-case/ListenToConnectedDeviceUseCase.js +1 -1
  312. package/lib/cjs/src/internal/discovery/use-case/ListenToConnectedDeviceUseCase.js.map +3 -3
  313. package/lib/cjs/src/internal/discovery/use-case/ListenToConnectedDeviceUseCase.test.js +1 -1
  314. package/lib/cjs/src/internal/discovery/use-case/ListenToConnectedDeviceUseCase.test.js.map +3 -3
  315. package/lib/cjs/src/internal/discovery/use-case/StartDiscoveringUseCase.js +1 -1
  316. package/lib/cjs/src/internal/discovery/use-case/StartDiscoveringUseCase.js.map +2 -2
  317. package/lib/cjs/src/internal/discovery/use-case/StartDiscoveringUseCase.test.js +1 -1
  318. package/lib/cjs/src/internal/discovery/use-case/StartDiscoveringUseCase.test.js.map +2 -2
  319. package/lib/cjs/src/internal/discovery/use-case/StopDiscoveringUseCase.js +1 -1
  320. package/lib/cjs/src/internal/discovery/use-case/StopDiscoveringUseCase.js.map +3 -3
  321. package/lib/cjs/src/internal/discovery/use-case/StopDiscoveringUseCase.test.js +1 -1
  322. package/lib/cjs/src/internal/discovery/use-case/StopDiscoveringUseCase.test.js.map +3 -3
  323. package/lib/cjs/src/internal/logger-publisher/di/loggerModule.js +1 -1
  324. package/lib/cjs/src/internal/logger-publisher/di/loggerModule.js.map +3 -3
  325. package/lib/cjs/src/internal/logger-publisher/di/loggerModule.test.js +1 -1
  326. package/lib/cjs/src/internal/logger-publisher/di/loggerModule.test.js.map +2 -2
  327. package/lib/cjs/src/internal/manager-api/data/AxiosManagerApiDataSource.js +1 -1
  328. package/lib/cjs/src/internal/manager-api/data/AxiosManagerApiDataSource.js.map +3 -3
  329. package/lib/cjs/src/internal/manager-api/data/AxiosManagerApiDataSource.test.js +1 -1
  330. package/lib/cjs/src/internal/manager-api/data/AxiosManagerApiDataSource.test.js.map +3 -3
  331. package/lib/cjs/src/internal/manager-api/data/ManagerApiDataSource.js +1 -1
  332. package/lib/cjs/src/internal/manager-api/data/ManagerApiDataSource.js.map +1 -1
  333. package/lib/cjs/src/internal/manager-api/data/ManagerApiDto.js +1 -1
  334. package/lib/cjs/src/internal/manager-api/data/ManagerApiDto.js.map +1 -1
  335. package/lib/cjs/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.js +1 -1
  336. package/lib/cjs/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.js.map +2 -2
  337. package/lib/cjs/src/internal/manager-api/di/managerApiModule.js +1 -1
  338. package/lib/cjs/src/internal/manager-api/di/managerApiModule.js.map +3 -3
  339. package/lib/cjs/src/internal/manager-api/di/managerApiModule.test.js +1 -1
  340. package/lib/cjs/src/internal/manager-api/di/managerApiModule.test.js.map +2 -2
  341. package/lib/cjs/src/internal/manager-api/di/managerApiTypes.js +1 -1
  342. package/lib/cjs/src/internal/manager-api/di/managerApiTypes.js.map +2 -2
  343. package/lib/cjs/src/internal/manager-api/model/Application.js +1 -1
  344. package/lib/cjs/src/internal/manager-api/model/Application.js.map +1 -1
  345. package/lib/cjs/src/internal/manager-api/model/Const.js +1 -1
  346. package/lib/cjs/src/internal/manager-api/model/Const.js.map +3 -3
  347. package/lib/cjs/src/internal/manager-api/model/Firmware.js +1 -1
  348. package/lib/cjs/src/internal/manager-api/model/Firmware.js.map +1 -1
  349. package/lib/cjs/src/internal/manager-api/model/Language.js +2 -0
  350. package/lib/cjs/src/internal/manager-api/model/Language.js.map +7 -0
  351. package/lib/cjs/src/internal/manager-api/model/Params.js +2 -0
  352. package/lib/cjs/src/internal/manager-api/model/Params.js.map +7 -0
  353. package/lib/cjs/src/internal/manager-api/service/DefaultManagerApiService.js +1 -1
  354. package/lib/cjs/src/internal/manager-api/service/DefaultManagerApiService.js.map +3 -3
  355. package/lib/cjs/src/internal/manager-api/service/DefaultManagerApiService.test.js +1 -1
  356. package/lib/cjs/src/internal/manager-api/service/DefaultManagerApiService.test.js.map +3 -3
  357. package/lib/cjs/src/internal/manager-api/service/ManagerApiService.js +1 -1
  358. package/lib/cjs/src/internal/manager-api/service/ManagerApiService.js.map +1 -1
  359. package/lib/cjs/src/internal/manager-api/use-case/SetProviderUseCase.js +2 -0
  360. package/lib/cjs/src/internal/manager-api/use-case/SetProviderUseCase.js.map +7 -0
  361. package/lib/cjs/src/internal/manager-api/use-case/SetProviderUseCase.test.js +2 -0
  362. package/lib/cjs/src/internal/manager-api/use-case/SetProviderUseCase.test.js.map +7 -0
  363. package/lib/cjs/src/internal/secure-channel/data/DefaultSecureChannelDataSource.js +1 -1
  364. package/lib/cjs/src/internal/secure-channel/data/DefaultSecureChannelDataSource.js.map +2 -2
  365. package/lib/cjs/src/internal/secure-channel/data/DefaultSecureChannelDataSource.test.js +1 -1
  366. package/lib/cjs/src/internal/secure-channel/data/DefaultSecureChannelDataSource.test.js.map +2 -2
  367. package/lib/cjs/src/internal/secure-channel/data/SecureChannelDataSource.js.map +1 -1
  368. package/lib/cjs/src/internal/secure-channel/di/secureChannelModule.js +1 -1
  369. package/lib/cjs/src/internal/secure-channel/di/secureChannelModule.js.map +3 -3
  370. package/lib/cjs/src/internal/secure-channel/di/secureChannelModule.test.js +1 -1
  371. package/lib/cjs/src/internal/secure-channel/di/secureChannelModule.test.js.map +2 -2
  372. package/lib/cjs/src/internal/secure-channel/model/Errors.js +1 -1
  373. package/lib/cjs/src/internal/secure-channel/model/Errors.js.map +3 -3
  374. package/lib/cjs/src/internal/secure-channel/model/Params.js +1 -1
  375. package/lib/cjs/src/internal/secure-channel/model/Params.js.map +1 -1
  376. package/lib/cjs/src/internal/secure-channel/service/DefaultSecureChannelService.js +1 -1
  377. package/lib/cjs/src/internal/secure-channel/service/DefaultSecureChannelService.js.map +3 -3
  378. package/lib/cjs/src/internal/secure-channel/service/DefaultSecureChannelService.test.js +1 -1
  379. package/lib/cjs/src/internal/secure-channel/service/DefaultSecureChannelService.test.js.map +3 -3
  380. package/lib/cjs/src/internal/secure-channel/service/SecureChannelService.js +1 -1
  381. package/lib/cjs/src/internal/secure-channel/service/SecureChannelService.js.map +1 -1
  382. package/lib/cjs/src/internal/send/di/sendModule.js +1 -1
  383. package/lib/cjs/src/internal/send/di/sendModule.js.map +3 -3
  384. package/lib/cjs/src/internal/send/di/sendModule.test.js +1 -1
  385. package/lib/cjs/src/internal/send/di/sendModule.test.js.map +2 -2
  386. package/lib/cjs/src/internal/send/use-case/SendApduUseCase.js +1 -1
  387. package/lib/cjs/src/internal/send/use-case/SendApduUseCase.js.map +3 -3
  388. package/lib/cjs/src/internal/send/use-case/SendApduUseCase.test.js +1 -1
  389. package/lib/cjs/src/internal/send/use-case/SendApduUseCase.test.js.map +3 -3
  390. package/lib/cjs/src/internal/transport/di/transportModule.js +1 -1
  391. package/lib/cjs/src/internal/transport/di/transportModule.js.map +3 -3
  392. package/lib/cjs/src/internal/transport/di/transportModule.test.js +1 -1
  393. package/lib/cjs/src/internal/transport/di/transportModule.test.js.map +2 -2
  394. package/lib/cjs/src/internal/transport/service/DefaultTransportService.js +1 -1
  395. package/lib/cjs/src/internal/transport/service/DefaultTransportService.js.map +3 -3
  396. package/lib/cjs/src/internal/transport/service/TransportService.js +1 -1
  397. package/lib/cjs/src/internal/transport/service/TransportService.js.map +1 -1
  398. package/lib/cjs/src/internal/transport/service/__mocks__/DefaultTransportService.js +1 -1
  399. package/lib/cjs/src/internal/transport/service/__mocks__/DefaultTransportService.js.map +2 -2
  400. package/lib/esm/package.json +22 -23
  401. package/lib/esm/src/api/DeviceManagementKit.js +1 -1
  402. package/lib/esm/src/api/DeviceManagementKit.js.map +3 -3
  403. package/lib/esm/src/api/DeviceManagementKit.test.js +1 -1
  404. package/lib/esm/src/api/DeviceManagementKit.test.js.map +3 -3
  405. package/lib/esm/src/api/DeviceManagementKitBuilder.js +1 -1
  406. package/lib/esm/src/api/DeviceManagementKitBuilder.js.map +3 -3
  407. package/lib/esm/src/api/apdu/utils/ByteArrayBuilder.js +1 -1
  408. package/lib/esm/src/api/apdu/utils/ByteArrayBuilder.js.map +3 -3
  409. package/lib/esm/src/api/apdu/utils/ByteArrayBuilder.test.js +1 -1
  410. package/lib/esm/src/api/apdu/utils/ByteArrayBuilder.test.js.map +2 -2
  411. package/lib/esm/src/api/apdu/utils/ByteArrayParser.js +1 -1
  412. package/lib/esm/src/api/apdu/utils/ByteArrayParser.js.map +3 -3
  413. package/lib/esm/src/api/command/Errors.js +1 -1
  414. package/lib/esm/src/api/command/Errors.js.map +3 -3
  415. package/lib/esm/src/api/command/di/commandModule.js +1 -1
  416. package/lib/esm/src/api/command/di/commandModule.js.map +3 -3
  417. package/lib/esm/src/api/command/di/commandModule.test.js +1 -1
  418. package/lib/esm/src/api/command/di/commandModule.test.js.map +2 -2
  419. package/lib/esm/src/api/command/model/CommandResult.js +1 -1
  420. package/lib/esm/src/api/command/model/CommandResult.js.map +2 -2
  421. package/lib/esm/src/api/command/os/GetCustomImageSizeCommand.js +2 -0
  422. package/lib/esm/src/api/command/os/GetCustomImageSizeCommand.js.map +7 -0
  423. package/lib/esm/src/api/command/os/GetCustomImageSizeCommand.test.js +2 -0
  424. package/lib/esm/src/api/command/os/GetCustomImageSizeCommand.test.js.map +7 -0
  425. package/lib/esm/src/api/command/os/GetOsVersionCommand.js +1 -1
  426. package/lib/esm/src/api/command/os/GetOsVersionCommand.js.map +3 -3
  427. package/lib/esm/src/api/command/os/GetOsVersionCommand.test.js +1 -1
  428. package/lib/esm/src/api/command/os/GetOsVersionCommand.test.js.map +3 -3
  429. package/lib/esm/src/api/command/os/ListLanguagePackCommand.js +2 -0
  430. package/lib/esm/src/api/command/os/ListLanguagePackCommand.js.map +7 -0
  431. package/lib/esm/src/api/command/os/ListLanguagePackCommand.test.js +2 -0
  432. package/lib/esm/src/api/command/os/ListLanguagePackCommand.test.js.map +7 -0
  433. package/lib/esm/src/api/command/os/SecureElementFlagsParser.js +2 -0
  434. package/lib/esm/src/api/command/os/SecureElementFlagsParser.js.map +7 -0
  435. package/lib/esm/src/api/command/os/SecureElementFlagsParser.test.js +2 -0
  436. package/lib/esm/src/api/command/os/SecureElementFlagsParser.test.js.map +7 -0
  437. package/lib/esm/src/api/command/os/__mocks__/GetOsVersionCommand.js +1 -1
  438. package/lib/esm/src/api/command/os/__mocks__/GetOsVersionCommand.js.map +2 -2
  439. package/lib/esm/src/api/command/use-case/SendCommandUseCase.js +1 -1
  440. package/lib/esm/src/api/command/use-case/SendCommandUseCase.js.map +3 -3
  441. package/lib/esm/src/api/command/use-case/SendCommandUseCase.test.js +1 -1
  442. package/lib/esm/src/api/command/use-case/SendCommandUseCase.test.js.map +3 -3
  443. package/lib/esm/src/api/command/utils/CommandUtils.js +1 -1
  444. package/lib/esm/src/api/command/utils/CommandUtils.js.map +3 -3
  445. package/lib/esm/src/api/command/utils/CommandUtils.test.js +1 -1
  446. package/lib/esm/src/api/command/utils/CommandUtils.test.js.map +2 -2
  447. package/lib/esm/src/api/command/utils/GlobalCommandError.js +1 -1
  448. package/lib/esm/src/api/command/utils/GlobalCommandError.js.map +2 -2
  449. package/lib/esm/src/api/device/DeviceModel.js +1 -1
  450. package/lib/esm/src/api/device/DeviceModel.js.map +2 -2
  451. package/lib/esm/src/api/device/SecureElementFlags.js +1 -0
  452. package/lib/esm/src/api/device/SecureElementFlags.js.map +7 -0
  453. package/lib/esm/src/api/device-action/__test-utils__/makeInternalApi.js +1 -1
  454. package/lib/esm/src/api/device-action/__test-utils__/makeInternalApi.js.map +3 -3
  455. package/lib/esm/src/api/device-action/__test-utils__/setupTestMachine.js +1 -1
  456. package/lib/esm/src/api/device-action/__test-utils__/setupTestMachine.js.map +3 -3
  457. package/lib/esm/src/api/device-action/di/deviceActionModule.js +1 -1
  458. package/lib/esm/src/api/device-action/di/deviceActionModule.js.map +3 -3
  459. package/lib/esm/src/api/device-action/di/deviceActionModule.test.js +1 -1
  460. package/lib/esm/src/api/device-action/di/deviceActionModule.test.js.map +2 -2
  461. package/lib/esm/src/api/device-action/model/UserInteractionRequired.js +1 -1
  462. package/lib/esm/src/api/device-action/model/UserInteractionRequired.js.map +2 -2
  463. package/lib/esm/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.js +1 -1
  464. package/lib/esm/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.js.map +2 -2
  465. package/lib/esm/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.test.js +1 -1
  466. package/lib/esm/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.test.js.map +2 -2
  467. package/lib/esm/src/api/device-action/os/Errors.js +1 -1
  468. package/lib/esm/src/api/device-action/os/Errors.js.map +3 -3
  469. package/lib/esm/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.js +2 -0
  470. package/lib/esm/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.js.map +7 -0
  471. package/lib/esm/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.test.js +2 -0
  472. package/lib/esm/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.test.js.map +7 -0
  473. package/lib/esm/src/api/device-action/os/GetDeviceMetadata/types.js +1 -0
  474. package/lib/esm/src/api/device-action/os/GetDeviceMetadata/types.js.map +7 -0
  475. package/lib/esm/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.js +1 -1
  476. package/lib/esm/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.js.map +3 -3
  477. package/lib/esm/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.test.js +1 -1
  478. package/lib/esm/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.test.js.map +2 -2
  479. package/lib/esm/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.js +1 -1
  480. package/lib/esm/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.js.map +3 -3
  481. package/lib/esm/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.test.js +1 -1
  482. package/lib/esm/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.test.js.map +2 -2
  483. package/lib/esm/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.js +2 -0
  484. package/lib/esm/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.js.map +7 -0
  485. package/lib/esm/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.test.js +2 -0
  486. package/lib/esm/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.test.js.map +7 -0
  487. package/lib/esm/src/api/device-action/os/InstallOrUpdateApps/types.js +1 -0
  488. package/lib/esm/src/api/device-action/os/InstallOrUpdateApps/types.js.map +7 -0
  489. package/lib/esm/src/api/device-action/os/ListApps/ListAppsDeviceAction.js +1 -1
  490. package/lib/esm/src/api/device-action/os/ListApps/ListAppsDeviceAction.js.map +2 -2
  491. package/lib/esm/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.js +1 -1
  492. package/lib/esm/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.js.map +3 -3
  493. package/lib/esm/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.test.js +1 -1
  494. package/lib/esm/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.test.js.map +3 -3
  495. package/lib/esm/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.js +1 -1
  496. package/lib/esm/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.js.map +3 -3
  497. package/lib/esm/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.test.js +1 -1
  498. package/lib/esm/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.test.js.map +3 -3
  499. package/lib/esm/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.js +2 -0
  500. package/lib/esm/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.js.map +7 -0
  501. package/lib/esm/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.test.js +2 -0
  502. package/lib/esm/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.test.js.map +7 -0
  503. package/lib/esm/src/api/device-action/os/OpenAppWithDependencies/types.js +1 -0
  504. package/lib/esm/src/api/device-action/os/OpenAppWithDependencies/types.js.map +7 -0
  505. package/lib/esm/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.js +1 -1
  506. package/lib/esm/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.js.map +2 -2
  507. package/lib/esm/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.test.js +1 -1
  508. package/lib/esm/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.test.js.map +2 -2
  509. package/lib/esm/src/api/device-action/task/BuildAppsInstallPlanTask.js +2 -0
  510. package/lib/esm/src/api/device-action/task/BuildAppsInstallPlanTask.js.map +7 -0
  511. package/lib/esm/src/api/device-action/task/BuildAppsInstallPlanTask.test.js +2 -0
  512. package/lib/esm/src/api/device-action/task/BuildAppsInstallPlanTask.test.js.map +7 -0
  513. package/lib/esm/src/api/device-action/task/GetApplicationsMetadataTask.js +2 -0
  514. package/lib/esm/src/api/device-action/task/GetApplicationsMetadataTask.js.map +7 -0
  515. package/lib/esm/src/api/device-action/task/GetApplicationsMetadataTask.test.js +2 -0
  516. package/lib/esm/src/api/device-action/task/GetApplicationsMetadataTask.test.js.map +7 -0
  517. package/lib/esm/src/api/device-action/task/GetFirmwareMetadataTask.js +2 -0
  518. package/lib/esm/src/api/device-action/task/GetFirmwareMetadataTask.js.map +7 -0
  519. package/lib/esm/src/api/device-action/task/GetFirmwareMetadataTask.test.js +2 -0
  520. package/lib/esm/src/api/device-action/task/GetFirmwareMetadataTask.test.js.map +7 -0
  521. package/lib/esm/src/api/device-action/task/PredictOutOfMemoryTask.js +2 -0
  522. package/lib/esm/src/api/device-action/task/PredictOutOfMemoryTask.js.map +7 -0
  523. package/lib/esm/src/api/device-action/task/PredictOutOfMemoryTask.test.js +2 -0
  524. package/lib/esm/src/api/device-action/task/PredictOutOfMemoryTask.test.js.map +7 -0
  525. package/lib/esm/src/api/device-action/xstate-utils/XStateDeviceAction.js +1 -1
  526. package/lib/esm/src/api/device-action/xstate-utils/XStateDeviceAction.js.map +3 -3
  527. package/lib/esm/src/api/device-model/data/StaticDeviceModelDataSource.js +1 -1
  528. package/lib/esm/src/api/device-model/data/StaticDeviceModelDataSource.js.map +2 -2
  529. package/lib/esm/src/api/device-model/data/StaticDeviceModelDataSource.test.js +1 -1
  530. package/lib/esm/src/api/device-model/data/StaticDeviceModelDataSource.test.js.map +2 -2
  531. package/lib/esm/src/api/device-model/model/DeviceModel.js +1 -1
  532. package/lib/esm/src/api/device-model/model/DeviceModel.js.map +2 -2
  533. package/lib/esm/src/api/device-model/model/DeviceModel.stub.js +1 -1
  534. package/lib/esm/src/api/device-model/model/DeviceModel.stub.js.map +2 -2
  535. package/lib/esm/src/api/device-session/DeviceSessionState.js +1 -1
  536. package/lib/esm/src/api/device-session/DeviceSessionState.js.map +2 -2
  537. package/lib/esm/src/api/device-session/use-case/DisableDeviceSessionRefresher.js +2 -0
  538. package/lib/esm/src/api/device-session/use-case/DisableDeviceSessionRefresher.js.map +7 -0
  539. package/lib/esm/src/api/device-session/use-case/DisableDeviceSessionRefresher.test.js +2 -0
  540. package/lib/esm/src/api/device-session/use-case/DisableDeviceSessionRefresher.test.js.map +7 -0
  541. package/lib/esm/src/api/index.js +1 -1
  542. package/lib/esm/src/api/index.js.map +3 -3
  543. package/lib/esm/src/api/logger-subscriber/service/WebLogsExporterLogger.test.js +1 -1
  544. package/lib/esm/src/api/logger-subscriber/service/WebLogsExporterLogger.test.js.map +3 -3
  545. package/lib/esm/src/api/secure-channel/constants.js +2 -0
  546. package/lib/esm/src/api/secure-channel/constants.js.map +7 -0
  547. package/lib/esm/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.js +2 -0
  548. package/lib/esm/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.js.map +7 -0
  549. package/lib/esm/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.test.js +2 -0
  550. package/lib/esm/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.test.js.map +7 -0
  551. package/lib/esm/src/api/secure-channel/device-action/GenuineCheck/types.js +1 -0
  552. package/lib/esm/src/api/secure-channel/device-action/GenuineCheck/types.js.map +7 -0
  553. package/lib/esm/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.js +2 -0
  554. package/lib/esm/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.js.map +7 -0
  555. package/lib/esm/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.test.js +2 -0
  556. package/lib/esm/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.test.js.map +7 -0
  557. package/lib/esm/src/api/secure-channel/device-action/InstallApp/types.js +1 -0
  558. package/lib/esm/src/api/secure-channel/device-action/InstallApp/types.js.map +7 -0
  559. package/lib/esm/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.js +2 -0
  560. package/lib/esm/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.js.map +7 -0
  561. package/lib/esm/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.test.js +2 -0
  562. package/lib/esm/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.test.js.map +7 -0
  563. package/lib/esm/src/api/secure-channel/device-action/ListInstalledApps/types.js +2 -0
  564. package/lib/esm/src/api/secure-channel/device-action/ListInstalledApps/types.js.map +7 -0
  565. package/lib/esm/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.js +2 -0
  566. package/lib/esm/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.js.map +7 -0
  567. package/lib/esm/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.test.js +2 -0
  568. package/lib/esm/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.test.js.map +7 -0
  569. package/lib/esm/src/api/secure-channel/device-action/UninstallApp/types.js +1 -0
  570. package/lib/esm/src/api/secure-channel/device-action/UninstallApp/types.js.map +7 -0
  571. package/lib/esm/src/api/secure-channel/task/ConnectToSecureChannelTask.js +2 -0
  572. package/lib/esm/src/api/secure-channel/task/ConnectToSecureChannelTask.js.map +7 -0
  573. package/lib/esm/src/api/secure-channel/task/ConnectToSecureChannelTask.test.js +2 -0
  574. package/lib/esm/src/api/secure-channel/task/ConnectToSecureChannelTask.test.js.map +7 -0
  575. package/lib/esm/src/api/secure-channel/task/types.js +2 -0
  576. package/lib/esm/src/api/secure-channel/task/types.js.map +7 -0
  577. package/lib/esm/src/api/secure-channel/types.js +1 -0
  578. package/lib/esm/src/api/secure-channel/types.js.map +7 -0
  579. package/lib/esm/src/api/secure-channel/utils.js +2 -0
  580. package/lib/esm/src/api/secure-channel/utils.js.map +7 -0
  581. package/lib/esm/src/api/secure-channel/utils.test.js +2 -0
  582. package/lib/esm/src/api/secure-channel/utils.test.js.map +7 -0
  583. package/lib/esm/src/api/transport/model/DeviceConnectionStateMachine.js +1 -1
  584. package/lib/esm/src/api/transport/model/DeviceConnectionStateMachine.js.map +3 -3
  585. package/lib/esm/src/api/transport/model/DeviceConnectionStateMachine.test.js +2 -0
  586. package/lib/esm/src/api/transport/model/DeviceConnectionStateMachine.test.js.map +7 -0
  587. package/lib/esm/src/api/transport/model/Errors.js +1 -1
  588. package/lib/esm/src/api/transport/model/Errors.js.map +3 -3
  589. package/lib/esm/src/api/transport/model/TransportConnectedDevice.test.js +1 -1
  590. package/lib/esm/src/api/transport/model/TransportConnectedDevice.test.js.map +3 -3
  591. package/lib/esm/src/api/transport/model/__mocks__/TransportMock.js +1 -1
  592. package/lib/esm/src/api/transport/model/__mocks__/TransportMock.js.map +2 -2
  593. package/lib/esm/src/api/utils/AppName.js +2 -0
  594. package/lib/esm/src/api/utils/AppName.js.map +7 -0
  595. package/lib/esm/src/api/utils/AppName.test.js +2 -0
  596. package/lib/esm/src/api/utils/AppName.test.js.map +7 -0
  597. package/lib/esm/src/api/utils/HexaString.js +1 -1
  598. package/lib/esm/src/api/utils/HexaString.js.map +3 -3
  599. package/lib/esm/src/api/utils/HexaString.test.js +1 -1
  600. package/lib/esm/src/api/utils/HexaString.test.js.map +2 -2
  601. package/lib/esm/src/di.js +1 -1
  602. package/lib/esm/src/di.js.map +3 -3
  603. package/lib/esm/src/internal/config/di/configModule.js +1 -1
  604. package/lib/esm/src/internal/config/di/configModule.js.map +3 -3
  605. package/lib/esm/src/internal/config/di/configModule.test.js +1 -1
  606. package/lib/esm/src/internal/config/di/configModule.test.js.map +2 -2
  607. package/lib/esm/src/internal/device-model/di/deviceModelModule.js +1 -1
  608. package/lib/esm/src/internal/device-model/di/deviceModelModule.js.map +3 -3
  609. package/lib/esm/src/internal/device-model/di/deviceModelModule.test.js +1 -1
  610. package/lib/esm/src/internal/device-model/di/deviceModelModule.test.js.map +2 -2
  611. package/lib/esm/src/internal/device-session/data/ApduResponseConst.js +1 -1
  612. package/lib/esm/src/internal/device-session/data/ApduResponseConst.js.map +3 -3
  613. package/lib/esm/src/internal/device-session/data/DeviceSessionRefresherConst.js +1 -1
  614. package/lib/esm/src/internal/device-session/data/DeviceSessionRefresherConst.js.map +3 -3
  615. package/lib/esm/src/internal/device-session/di/deviceSessionModule.js +1 -1
  616. package/lib/esm/src/internal/device-session/di/deviceSessionModule.js.map +3 -3
  617. package/lib/esm/src/internal/device-session/di/deviceSessionModule.test.js +1 -1
  618. package/lib/esm/src/internal/device-session/di/deviceSessionModule.test.js.map +2 -2
  619. package/lib/esm/src/internal/device-session/di/deviceSessionTypes.js +1 -1
  620. package/lib/esm/src/internal/device-session/di/deviceSessionTypes.js.map +2 -2
  621. package/lib/esm/src/internal/device-session/model/DevicePinger.js +2 -0
  622. package/lib/esm/src/internal/device-session/model/DevicePinger.js.map +7 -0
  623. package/lib/esm/src/internal/device-session/model/DevicePinger.test.js +2 -0
  624. package/lib/esm/src/internal/device-session/model/DevicePinger.test.js.map +7 -0
  625. package/lib/esm/src/internal/device-session/model/DeviceSession.js +1 -1
  626. package/lib/esm/src/internal/device-session/model/DeviceSession.js.map +3 -3
  627. package/lib/esm/src/internal/device-session/model/DeviceSession.stub.js +1 -1
  628. package/lib/esm/src/internal/device-session/model/DeviceSession.stub.js.map +3 -3
  629. package/lib/esm/src/internal/device-session/model/DeviceSessionEventDispatcher.js +2 -0
  630. package/lib/esm/src/internal/device-session/model/DeviceSessionEventDispatcher.js.map +7 -0
  631. package/lib/esm/src/internal/device-session/model/DeviceSessionEventDispatcher.test.js +2 -0
  632. package/lib/esm/src/internal/device-session/model/DeviceSessionEventDispatcher.test.js.map +7 -0
  633. package/lib/esm/src/internal/device-session/model/DeviceSessionRefresher.js +1 -1
  634. package/lib/esm/src/internal/device-session/model/DeviceSessionRefresher.js.map +3 -3
  635. package/lib/esm/src/internal/device-session/model/DeviceSessionRefresher.test.js +1 -1
  636. package/lib/esm/src/internal/device-session/model/DeviceSessionRefresher.test.js.map +3 -3
  637. package/lib/esm/src/internal/device-session/model/DeviceSessionStateHandler.js +2 -0
  638. package/lib/esm/src/internal/device-session/model/DeviceSessionStateHandler.js.map +7 -0
  639. package/lib/esm/src/internal/device-session/model/DeviceSessionStateHandler.test.js +2 -0
  640. package/lib/esm/src/internal/device-session/model/DeviceSessionStateHandler.test.js.map +7 -0
  641. package/lib/esm/src/internal/device-session/model/Frame.js +1 -1
  642. package/lib/esm/src/internal/device-session/model/Frame.js.map +3 -3
  643. package/lib/esm/src/internal/device-session/service/DefaultApduReceiverService.js +1 -1
  644. package/lib/esm/src/internal/device-session/service/DefaultApduReceiverService.js.map +2 -2
  645. package/lib/esm/src/internal/device-session/service/DefaultApduSenderService.js +1 -1
  646. package/lib/esm/src/internal/device-session/service/DefaultApduSenderService.js.map +2 -2
  647. package/lib/esm/src/internal/device-session/service/DefaultApduSenderService.test.js +1 -1
  648. package/lib/esm/src/internal/device-session/service/DefaultApduSenderService.test.js.map +2 -2
  649. package/lib/esm/src/internal/device-session/service/DefaultDeviceSessionService.test.js +1 -1
  650. package/lib/esm/src/internal/device-session/service/DefaultDeviceSessionService.test.js.map +3 -3
  651. package/lib/esm/src/internal/device-session/service/MutexService.js +2 -0
  652. package/lib/esm/src/internal/device-session/service/MutexService.js.map +7 -0
  653. package/lib/esm/src/internal/device-session/service/MutexService.test.js +2 -0
  654. package/lib/esm/src/internal/device-session/service/MutexService.test.js.map +7 -0
  655. package/lib/esm/src/internal/device-session/service/RefresherService.js +2 -0
  656. package/lib/esm/src/internal/device-session/service/RefresherService.js.map +7 -0
  657. package/lib/esm/src/internal/device-session/service/RefresherService.test.js +2 -0
  658. package/lib/esm/src/internal/device-session/service/RefresherService.test.js.map +7 -0
  659. package/lib/esm/src/internal/device-session/use-case/CloseSessionsUseCase.js +1 -1
  660. package/lib/esm/src/internal/device-session/use-case/CloseSessionsUseCase.js.map +2 -2
  661. package/lib/esm/src/internal/device-session/use-case/CloseSessionsUseCase.test.js +1 -1
  662. package/lib/esm/src/internal/device-session/use-case/CloseSessionsUseCase.test.js.map +3 -3
  663. package/lib/esm/src/internal/device-session/use-case/GetDeviceSessionStateUseCase.test.js +1 -1
  664. package/lib/esm/src/internal/device-session/use-case/GetDeviceSessionStateUseCase.test.js.map +3 -3
  665. package/lib/esm/src/internal/device-session/utils/deviceSessionUtils.js +2 -0
  666. package/lib/esm/src/internal/device-session/utils/deviceSessionUtils.js.map +7 -0
  667. package/lib/esm/src/internal/discovery/di/discoveryModule.js +1 -1
  668. package/lib/esm/src/internal/discovery/di/discoveryModule.js.map +3 -3
  669. package/lib/esm/src/internal/discovery/di/discoveryModule.test.js +1 -1
  670. package/lib/esm/src/internal/discovery/di/discoveryModule.test.js.map +3 -3
  671. package/lib/esm/src/internal/discovery/di/discoveryTypes.js +1 -1
  672. package/lib/esm/src/internal/discovery/di/discoveryTypes.js.map +2 -2
  673. package/lib/esm/src/internal/discovery/use-case/ConnectUseCase.js +1 -1
  674. package/lib/esm/src/internal/discovery/use-case/ConnectUseCase.js.map +3 -3
  675. package/lib/esm/src/internal/discovery/use-case/ConnectUseCase.test.js +1 -1
  676. package/lib/esm/src/internal/discovery/use-case/ConnectUseCase.test.js.map +3 -3
  677. package/lib/esm/src/internal/discovery/use-case/DisconnectUseCase.test.js +1 -1
  678. package/lib/esm/src/internal/discovery/use-case/DisconnectUseCase.test.js.map +3 -3
  679. package/lib/esm/src/internal/discovery/use-case/GetConnectedDeviceUseCase.test.js +1 -1
  680. package/lib/esm/src/internal/discovery/use-case/GetConnectedDeviceUseCase.test.js.map +3 -3
  681. package/lib/esm/src/internal/discovery/use-case/ListConnectedDevicesUseCase.test.js +1 -1
  682. package/lib/esm/src/internal/discovery/use-case/ListConnectedDevicesUseCase.test.js.map +3 -3
  683. package/lib/esm/src/internal/discovery/use-case/ListenToAvailableDevicesUseCase.js +2 -0
  684. package/lib/esm/src/internal/discovery/use-case/ListenToAvailableDevicesUseCase.js.map +7 -0
  685. package/lib/esm/src/internal/discovery/use-case/ListenToAvailableDevicesUseCase.test.js +2 -0
  686. package/lib/esm/src/internal/discovery/use-case/ListenToAvailableDevicesUseCase.test.js.map +7 -0
  687. package/lib/esm/src/internal/discovery/use-case/ListenToConnectedDeviceUseCase.js +1 -1
  688. package/lib/esm/src/internal/discovery/use-case/ListenToConnectedDeviceUseCase.js.map +3 -3
  689. package/lib/esm/src/internal/discovery/use-case/ListenToConnectedDeviceUseCase.test.js +1 -1
  690. package/lib/esm/src/internal/discovery/use-case/ListenToConnectedDeviceUseCase.test.js.map +3 -3
  691. package/lib/esm/src/internal/discovery/use-case/StartDiscoveringUseCase.js +1 -1
  692. package/lib/esm/src/internal/discovery/use-case/StartDiscoveringUseCase.js.map +2 -2
  693. package/lib/esm/src/internal/discovery/use-case/StartDiscoveringUseCase.test.js +1 -1
  694. package/lib/esm/src/internal/discovery/use-case/StartDiscoveringUseCase.test.js.map +2 -2
  695. package/lib/esm/src/internal/discovery/use-case/StopDiscoveringUseCase.js +1 -1
  696. package/lib/esm/src/internal/discovery/use-case/StopDiscoveringUseCase.js.map +3 -3
  697. package/lib/esm/src/internal/discovery/use-case/StopDiscoveringUseCase.test.js +1 -1
  698. package/lib/esm/src/internal/discovery/use-case/StopDiscoveringUseCase.test.js.map +3 -3
  699. package/lib/esm/src/internal/logger-publisher/di/loggerModule.js +1 -1
  700. package/lib/esm/src/internal/logger-publisher/di/loggerModule.js.map +3 -3
  701. package/lib/esm/src/internal/logger-publisher/di/loggerModule.test.js +1 -1
  702. package/lib/esm/src/internal/logger-publisher/di/loggerModule.test.js.map +2 -2
  703. package/lib/esm/src/internal/manager-api/data/AxiosManagerApiDataSource.js +1 -1
  704. package/lib/esm/src/internal/manager-api/data/AxiosManagerApiDataSource.js.map +3 -3
  705. package/lib/esm/src/internal/manager-api/data/AxiosManagerApiDataSource.test.js +1 -1
  706. package/lib/esm/src/internal/manager-api/data/AxiosManagerApiDataSource.test.js.map +3 -3
  707. package/lib/esm/src/internal/manager-api/data/ManagerApiDto.js +1 -1
  708. package/lib/esm/src/internal/manager-api/data/ManagerApiDto.js.map +1 -1
  709. package/lib/esm/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.js +1 -1
  710. package/lib/esm/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.js.map +2 -2
  711. package/lib/esm/src/internal/manager-api/di/managerApiModule.js +1 -1
  712. package/lib/esm/src/internal/manager-api/di/managerApiModule.js.map +3 -3
  713. package/lib/esm/src/internal/manager-api/di/managerApiModule.test.js +1 -1
  714. package/lib/esm/src/internal/manager-api/di/managerApiModule.test.js.map +2 -2
  715. package/lib/esm/src/internal/manager-api/di/managerApiTypes.js +1 -1
  716. package/lib/esm/src/internal/manager-api/di/managerApiTypes.js.map +2 -2
  717. package/lib/esm/src/internal/manager-api/model/Application.js +1 -1
  718. package/lib/esm/src/internal/manager-api/model/Application.js.map +1 -1
  719. package/lib/esm/src/internal/manager-api/model/Const.js +1 -1
  720. package/lib/esm/src/internal/manager-api/model/Const.js.map +3 -3
  721. package/lib/esm/src/internal/manager-api/model/Language.js +1 -0
  722. package/lib/esm/src/internal/manager-api/model/Language.js.map +7 -0
  723. package/lib/esm/src/internal/manager-api/model/Params.js +1 -0
  724. package/lib/esm/src/internal/manager-api/model/Params.js.map +7 -0
  725. package/lib/esm/src/internal/manager-api/service/DefaultManagerApiService.js +1 -1
  726. package/lib/esm/src/internal/manager-api/service/DefaultManagerApiService.js.map +3 -3
  727. package/lib/esm/src/internal/manager-api/service/DefaultManagerApiService.test.js +1 -1
  728. package/lib/esm/src/internal/manager-api/service/DefaultManagerApiService.test.js.map +3 -3
  729. package/lib/esm/src/internal/manager-api/use-case/SetProviderUseCase.js +2 -0
  730. package/lib/esm/src/internal/manager-api/use-case/SetProviderUseCase.js.map +7 -0
  731. package/lib/esm/src/internal/manager-api/use-case/SetProviderUseCase.test.js +2 -0
  732. package/lib/esm/src/internal/manager-api/use-case/SetProviderUseCase.test.js.map +7 -0
  733. package/lib/esm/src/internal/secure-channel/data/DefaultSecureChannelDataSource.js +1 -1
  734. package/lib/esm/src/internal/secure-channel/data/DefaultSecureChannelDataSource.js.map +2 -2
  735. package/lib/esm/src/internal/secure-channel/data/DefaultSecureChannelDataSource.test.js +1 -1
  736. package/lib/esm/src/internal/secure-channel/data/DefaultSecureChannelDataSource.test.js.map +2 -2
  737. package/lib/esm/src/internal/secure-channel/di/secureChannelModule.js +1 -1
  738. package/lib/esm/src/internal/secure-channel/di/secureChannelModule.js.map +3 -3
  739. package/lib/esm/src/internal/secure-channel/di/secureChannelModule.test.js +1 -1
  740. package/lib/esm/src/internal/secure-channel/di/secureChannelModule.test.js.map +2 -2
  741. package/lib/esm/src/internal/secure-channel/model/Errors.js +1 -1
  742. package/lib/esm/src/internal/secure-channel/model/Errors.js.map +3 -3
  743. package/lib/esm/src/internal/secure-channel/service/DefaultSecureChannelService.js +1 -1
  744. package/lib/esm/src/internal/secure-channel/service/DefaultSecureChannelService.js.map +3 -3
  745. package/lib/esm/src/internal/secure-channel/service/DefaultSecureChannelService.test.js +1 -1
  746. package/lib/esm/src/internal/secure-channel/service/DefaultSecureChannelService.test.js.map +3 -3
  747. package/lib/esm/src/internal/send/di/sendModule.js +1 -1
  748. package/lib/esm/src/internal/send/di/sendModule.js.map +3 -3
  749. package/lib/esm/src/internal/send/di/sendModule.test.js +1 -1
  750. package/lib/esm/src/internal/send/di/sendModule.test.js.map +2 -2
  751. package/lib/esm/src/internal/send/use-case/SendApduUseCase.js +1 -1
  752. package/lib/esm/src/internal/send/use-case/SendApduUseCase.js.map +3 -3
  753. package/lib/esm/src/internal/send/use-case/SendApduUseCase.test.js +1 -1
  754. package/lib/esm/src/internal/send/use-case/SendApduUseCase.test.js.map +3 -3
  755. package/lib/esm/src/internal/transport/di/transportModule.js +1 -1
  756. package/lib/esm/src/internal/transport/di/transportModule.js.map +3 -3
  757. package/lib/esm/src/internal/transport/di/transportModule.test.js +1 -1
  758. package/lib/esm/src/internal/transport/di/transportModule.test.js.map +2 -2
  759. package/lib/esm/src/internal/transport/service/DefaultTransportService.js +1 -1
  760. package/lib/esm/src/internal/transport/service/DefaultTransportService.js.map +3 -3
  761. package/lib/esm/src/internal/transport/service/__mocks__/DefaultTransportService.js +1 -1
  762. package/lib/esm/src/internal/transport/service/__mocks__/DefaultTransportService.js.map +2 -2
  763. package/lib/types/src/api/DeviceManagementKit.d.ts +31 -11
  764. package/lib/types/src/api/DeviceManagementKit.d.ts.map +1 -1
  765. package/lib/types/src/api/DeviceManagementKitBuilder.d.ts.map +1 -1
  766. package/lib/types/src/api/DmkConfig.d.ts +2 -0
  767. package/lib/types/src/api/DmkConfig.d.ts.map +1 -1
  768. package/lib/types/src/api/apdu/utils/ApduBuilder.d.ts.map +1 -1
  769. package/lib/types/src/api/apdu/utils/ApduParser.d.ts.map +1 -1
  770. package/lib/types/src/api/apdu/utils/ByteArrayBuilder.d.ts +66 -0
  771. package/lib/types/src/api/apdu/utils/ByteArrayBuilder.d.ts.map +1 -1
  772. package/lib/types/src/api/apdu/utils/ByteArrayParser.d.ts +1 -0
  773. package/lib/types/src/api/apdu/utils/ByteArrayParser.d.ts.map +1 -1
  774. package/lib/types/src/api/command/Errors.d.ts +5 -0
  775. package/lib/types/src/api/command/Errors.d.ts.map +1 -1
  776. package/lib/types/src/api/command/di/commandModule.d.ts.map +1 -1
  777. package/lib/types/src/api/command/model/CommandResult.d.ts +3 -3
  778. package/lib/types/src/api/command/model/CommandResult.d.ts.map +1 -1
  779. package/lib/types/src/api/command/os/GetCustomImageSizeCommand.d.ts +16 -0
  780. package/lib/types/src/api/command/os/GetCustomImageSizeCommand.d.ts.map +1 -0
  781. package/lib/types/src/api/command/os/GetCustomImageSizeCommand.test.d.ts +2 -0
  782. package/lib/types/src/api/command/os/GetCustomImageSizeCommand.test.d.ts.map +1 -0
  783. package/lib/types/src/api/command/os/GetOsVersionCommand.d.ts +38 -4
  784. package/lib/types/src/api/command/os/GetOsVersionCommand.d.ts.map +1 -1
  785. package/lib/types/src/api/command/os/ListLanguagePackCommand.d.ts +24 -0
  786. package/lib/types/src/api/command/os/ListLanguagePackCommand.d.ts.map +1 -0
  787. package/lib/types/src/api/command/os/ListLanguagePackCommand.test.d.ts +2 -0
  788. package/lib/types/src/api/command/os/ListLanguagePackCommand.test.d.ts.map +1 -0
  789. package/lib/types/src/api/command/os/SecureElementFlagsParser.d.ts +43 -0
  790. package/lib/types/src/api/command/os/SecureElementFlagsParser.d.ts.map +1 -0
  791. package/lib/types/src/api/command/os/SecureElementFlagsParser.test.d.ts +2 -0
  792. package/lib/types/src/api/command/os/SecureElementFlagsParser.test.d.ts.map +1 -0
  793. package/lib/types/src/api/command/os/__mocks__/GetOsVersionCommand.d.ts.map +1 -1
  794. package/lib/types/src/api/command/use-case/SendCommandUseCase.d.ts +5 -1
  795. package/lib/types/src/api/command/use-case/SendCommandUseCase.d.ts.map +1 -1
  796. package/lib/types/src/api/command/utils/CommandErrors.d.ts.map +1 -1
  797. package/lib/types/src/api/command/utils/CommandUtils.d.ts +3 -0
  798. package/lib/types/src/api/command/utils/CommandUtils.d.ts.map +1 -1
  799. package/lib/types/src/api/command/utils/GlobalCommandError.d.ts +1 -1
  800. package/lib/types/src/api/command/utils/GlobalCommandError.d.ts.map +1 -1
  801. package/lib/types/src/api/device/DeviceModel.d.ts +2 -1
  802. package/lib/types/src/api/device/DeviceModel.d.ts.map +1 -1
  803. package/lib/types/src/api/device/SecureElementFlags.d.ts +41 -0
  804. package/lib/types/src/api/device/SecureElementFlags.d.ts.map +1 -0
  805. package/lib/types/src/api/device-action/DeviceAction.d.ts +4 -1
  806. package/lib/types/src/api/device-action/DeviceAction.d.ts.map +1 -1
  807. package/lib/types/src/api/device-action/__test-utils__/makeInternalApi.d.ts.map +1 -1
  808. package/lib/types/src/api/device-action/__test-utils__/setupTestMachine.d.ts +9 -0
  809. package/lib/types/src/api/device-action/__test-utils__/setupTestMachine.d.ts.map +1 -1
  810. package/lib/types/src/api/device-action/di/deviceActionModule.d.ts.map +1 -1
  811. package/lib/types/src/api/device-action/model/UserInteractionRequired.d.ts +5 -2
  812. package/lib/types/src/api/device-action/model/UserInteractionRequired.d.ts.map +1 -1
  813. package/lib/types/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.d.ts.map +1 -1
  814. package/lib/types/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceActionTypes.d.ts +1 -1
  815. package/lib/types/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceActionTypes.d.ts.map +1 -1
  816. package/lib/types/src/api/device-action/os/Errors.d.ts +20 -0
  817. package/lib/types/src/api/device-action/os/Errors.d.ts.map +1 -1
  818. package/lib/types/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.d.ts +58 -0
  819. package/lib/types/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.d.ts.map +1 -0
  820. package/lib/types/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.test.d.ts +2 -0
  821. package/lib/types/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.test.d.ts.map +1 -0
  822. package/lib/types/src/api/device-action/os/GetDeviceMetadata/types.d.ts +28 -0
  823. package/lib/types/src/api/device-action/os/GetDeviceMetadata/types.d.ts.map +1 -0
  824. package/lib/types/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.d.ts +1 -1
  825. package/lib/types/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.d.ts.map +1 -1
  826. package/lib/types/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.d.ts.map +1 -1
  827. package/lib/types/src/api/device-action/os/GoToDashboard/types.d.ts +3 -4
  828. package/lib/types/src/api/device-action/os/GoToDashboard/types.d.ts.map +1 -1
  829. package/lib/types/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.d.ts +40 -0
  830. package/lib/types/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.d.ts.map +1 -0
  831. package/lib/types/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.test.d.ts +2 -0
  832. package/lib/types/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.test.d.ts.map +1 -0
  833. package/lib/types/src/api/device-action/os/InstallOrUpdateApps/types.d.ts +65 -0
  834. package/lib/types/src/api/device-action/os/InstallOrUpdateApps/types.d.ts.map +1 -0
  835. package/lib/types/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.d.ts +1 -1
  836. package/lib/types/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.d.ts.map +1 -1
  837. package/lib/types/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.d.ts.map +1 -1
  838. package/lib/types/src/api/device-action/os/OpenAppDeviceAction/types.d.ts +0 -1
  839. package/lib/types/src/api/device-action/os/OpenAppDeviceAction/types.d.ts.map +1 -1
  840. package/lib/types/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.d.ts +15 -0
  841. package/lib/types/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.d.ts.map +1 -0
  842. package/lib/types/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.test.d.ts +2 -0
  843. package/lib/types/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.test.d.ts.map +1 -0
  844. package/lib/types/src/api/device-action/os/OpenAppWithDependencies/types.d.ts +24 -0
  845. package/lib/types/src/api/device-action/os/OpenAppWithDependencies/types.d.ts.map +1 -0
  846. package/lib/types/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.d.ts.map +1 -1
  847. package/lib/types/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceActionTypes.d.ts +1 -1
  848. package/lib/types/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceActionTypes.d.ts.map +1 -1
  849. package/lib/types/src/api/device-action/task/BuildAppsInstallPlanTask.d.ts +30 -0
  850. package/lib/types/src/api/device-action/task/BuildAppsInstallPlanTask.d.ts.map +1 -0
  851. package/lib/types/src/api/device-action/task/BuildAppsInstallPlanTask.test.d.ts +2 -0
  852. package/lib/types/src/api/device-action/task/BuildAppsInstallPlanTask.test.d.ts.map +1 -0
  853. package/lib/types/src/api/device-action/task/GetApplicationsMetadataTask.d.ts +31 -0
  854. package/lib/types/src/api/device-action/task/GetApplicationsMetadataTask.d.ts.map +1 -0
  855. package/lib/types/src/api/device-action/task/GetApplicationsMetadataTask.test.d.ts +2 -0
  856. package/lib/types/src/api/device-action/task/GetApplicationsMetadataTask.test.d.ts.map +1 -0
  857. package/lib/types/src/api/device-action/task/GetFirmwareMetadataTask.d.ts +18 -0
  858. package/lib/types/src/api/device-action/task/GetFirmwareMetadataTask.d.ts.map +1 -0
  859. package/lib/types/src/api/device-action/task/GetFirmwareMetadataTask.test.d.ts +2 -0
  860. package/lib/types/src/api/device-action/task/GetFirmwareMetadataTask.test.d.ts.map +1 -0
  861. package/lib/types/src/api/device-action/task/PredictOutOfMemoryTask.d.ts +21 -0
  862. package/lib/types/src/api/device-action/task/PredictOutOfMemoryTask.d.ts.map +1 -0
  863. package/lib/types/src/api/device-action/task/PredictOutOfMemoryTask.test.d.ts +2 -0
  864. package/lib/types/src/api/device-action/task/PredictOutOfMemoryTask.test.d.ts.map +1 -0
  865. package/lib/types/src/api/device-action/xstate-utils/XStateDeviceAction.d.ts +1 -0
  866. package/lib/types/src/api/device-action/xstate-utils/XStateDeviceAction.d.ts.map +1 -1
  867. package/lib/types/src/api/device-model/data/StaticDeviceModelDataSource.d.ts.map +1 -1
  868. package/lib/types/src/api/device-model/model/DeviceModel.d.ts +2 -0
  869. package/lib/types/src/api/device-model/model/DeviceModel.d.ts.map +1 -1
  870. package/lib/types/src/api/device-model/model/DeviceModel.stub.d.ts.map +1 -1
  871. package/lib/types/src/api/device-session/DeviceSessionState.d.ts +97 -0
  872. package/lib/types/src/api/device-session/DeviceSessionState.d.ts.map +1 -1
  873. package/lib/types/src/api/device-session/service/DefaultApduReceiverService.stub.d.ts.map +1 -1
  874. package/lib/types/src/api/device-session/service/DefaultApduSenderService.stub.d.ts.map +1 -1
  875. package/lib/types/src/api/device-session/use-case/{ToggleDeviceSessionRefresher.d.ts → DisableDeviceSessionRefresher.d.ts} +6 -6
  876. package/lib/types/src/api/device-session/use-case/DisableDeviceSessionRefresher.d.ts.map +1 -0
  877. package/lib/types/src/api/device-session/use-case/DisableDeviceSessionRefresher.test.d.ts +2 -0
  878. package/lib/types/src/api/device-session/use-case/DisableDeviceSessionRefresher.test.d.ts.map +1 -0
  879. package/lib/types/src/api/index.d.ts +11 -3
  880. package/lib/types/src/api/index.d.ts.map +1 -1
  881. package/lib/types/src/api/secure-channel/constants.d.ts +2 -0
  882. package/lib/types/src/api/secure-channel/constants.d.ts.map +1 -0
  883. package/lib/types/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.d.ts +8 -0
  884. package/lib/types/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.d.ts.map +1 -0
  885. package/lib/types/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.test.d.ts +2 -0
  886. package/lib/types/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.test.d.ts.map +1 -0
  887. package/lib/types/src/api/secure-channel/device-action/GenuineCheck/types.d.ts +49 -0
  888. package/lib/types/src/api/secure-channel/device-action/GenuineCheck/types.d.ts.map +1 -0
  889. package/lib/types/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.d.ts +8 -0
  890. package/lib/types/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.d.ts.map +1 -0
  891. package/lib/types/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.test.d.ts +2 -0
  892. package/lib/types/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.test.d.ts.map +1 -0
  893. package/lib/types/src/api/secure-channel/device-action/InstallApp/types.d.ts +45 -0
  894. package/lib/types/src/api/secure-channel/device-action/InstallApp/types.d.ts.map +1 -0
  895. package/lib/types/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.d.ts +8 -0
  896. package/lib/types/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.d.ts.map +1 -0
  897. package/lib/types/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.test.d.ts +2 -0
  898. package/lib/types/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.test.d.ts.map +1 -0
  899. package/lib/types/src/api/secure-channel/device-action/ListInstalledApps/types.d.ts +58 -0
  900. package/lib/types/src/api/secure-channel/device-action/ListInstalledApps/types.d.ts.map +1 -0
  901. package/lib/types/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.d.ts +8 -0
  902. package/lib/types/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.d.ts.map +1 -0
  903. package/lib/types/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.test.d.ts +2 -0
  904. package/lib/types/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.test.d.ts.map +1 -0
  905. package/lib/types/src/api/secure-channel/device-action/UninstallApp/types.d.ts +42 -0
  906. package/lib/types/src/api/secure-channel/device-action/UninstallApp/types.d.ts.map +1 -0
  907. package/lib/types/src/api/secure-channel/task/ConnectToSecureChannelTask.d.ts +26 -0
  908. package/lib/types/src/api/secure-channel/task/ConnectToSecureChannelTask.d.ts.map +1 -0
  909. package/lib/types/src/api/secure-channel/task/ConnectToSecureChannelTask.test.d.ts +2 -0
  910. package/lib/types/src/api/secure-channel/task/ConnectToSecureChannelTask.test.d.ts.map +1 -0
  911. package/lib/types/src/api/secure-channel/task/types.d.ts +110 -0
  912. package/lib/types/src/api/secure-channel/task/types.d.ts.map +1 -0
  913. package/lib/types/src/api/secure-channel/types.d.ts +4 -0
  914. package/lib/types/src/api/secure-channel/types.d.ts.map +1 -0
  915. package/lib/types/src/api/secure-channel/utils.d.ts +19 -0
  916. package/lib/types/src/api/secure-channel/utils.d.ts.map +1 -0
  917. package/lib/types/src/api/secure-channel/utils.test.d.ts +2 -0
  918. package/lib/types/src/api/secure-channel/utils.test.d.ts.map +1 -0
  919. package/lib/types/src/api/transport/model/DeviceConnection.d.ts +2 -1
  920. package/lib/types/src/api/transport/model/DeviceConnection.d.ts.map +1 -1
  921. package/lib/types/src/api/transport/model/DeviceConnectionStateMachine.d.ts +17 -14
  922. package/lib/types/src/api/transport/model/DeviceConnectionStateMachine.d.ts.map +1 -1
  923. package/lib/types/src/api/transport/model/DeviceConnectionStateMachine.test.d.ts +2 -0
  924. package/lib/types/src/api/transport/model/DeviceConnectionStateMachine.test.d.ts.map +1 -0
  925. package/lib/types/src/api/transport/model/DiscoveredDevice.d.ts +1 -1
  926. package/lib/types/src/api/transport/model/DiscoveredDevice.d.ts.map +1 -1
  927. package/lib/types/src/api/transport/model/Errors.d.ts +12 -3
  928. package/lib/types/src/api/transport/model/Errors.d.ts.map +1 -1
  929. package/lib/types/src/api/transport/model/Transport.d.ts +2 -2
  930. package/lib/types/src/api/transport/model/Transport.d.ts.map +1 -1
  931. package/lib/types/src/api/transport/model/TransportDiscoveredDevice.d.ts +1 -1
  932. package/lib/types/src/api/transport/model/TransportDiscoveredDevice.d.ts.map +1 -1
  933. package/lib/types/src/api/transport/model/__mocks__/TransportMock.d.ts +1 -1
  934. package/lib/types/src/api/transport/model/__mocks__/TransportMock.d.ts.map +1 -1
  935. package/lib/types/src/api/types.d.ts +9 -2
  936. package/lib/types/src/api/types.d.ts.map +1 -1
  937. package/lib/types/src/api/utils/AppName.d.ts +2 -0
  938. package/lib/types/src/api/utils/AppName.d.ts.map +1 -0
  939. package/lib/types/src/api/utils/AppName.test.d.ts +2 -0
  940. package/lib/types/src/api/utils/AppName.test.d.ts.map +1 -0
  941. package/lib/types/src/api/utils/HexaString.d.ts +4 -3
  942. package/lib/types/src/api/utils/HexaString.d.ts.map +1 -1
  943. package/lib/types/src/di.d.ts.map +1 -1
  944. package/lib/types/src/internal/config/di/configModule.d.ts.map +1 -1
  945. package/lib/types/src/internal/device-model/di/deviceModelModule.d.ts.map +1 -1
  946. package/lib/types/src/internal/device-session/data/ApduResponseConst.d.ts +1 -0
  947. package/lib/types/src/internal/device-session/data/ApduResponseConst.d.ts.map +1 -1
  948. package/lib/types/src/internal/device-session/data/DeviceSessionRefresherConst.d.ts +6 -1
  949. package/lib/types/src/internal/device-session/data/DeviceSessionRefresherConst.d.ts.map +1 -1
  950. package/lib/types/src/internal/device-session/di/deviceSessionModule.d.ts.map +1 -1
  951. package/lib/types/src/internal/device-session/di/deviceSessionTypes.d.ts +1 -1
  952. package/lib/types/src/internal/device-session/model/DevicePinger.d.ts +18 -0
  953. package/lib/types/src/internal/device-session/model/DevicePinger.d.ts.map +1 -0
  954. package/lib/types/src/internal/device-session/model/DevicePinger.test.d.ts +2 -0
  955. package/lib/types/src/internal/device-session/model/DevicePinger.test.d.ts.map +1 -0
  956. package/lib/types/src/internal/device-session/model/DeviceSession.d.ts +22 -9
  957. package/lib/types/src/internal/device-session/model/DeviceSession.d.ts.map +1 -1
  958. package/lib/types/src/internal/device-session/model/DeviceSession.stub.d.ts +2 -2
  959. package/lib/types/src/internal/device-session/model/DeviceSession.stub.d.ts.map +1 -1
  960. package/lib/types/src/internal/device-session/model/DeviceSessionEventDispatcher.d.ts +35 -0
  961. package/lib/types/src/internal/device-session/model/DeviceSessionEventDispatcher.d.ts.map +1 -0
  962. package/lib/types/src/internal/device-session/model/DeviceSessionEventDispatcher.test.d.ts +2 -0
  963. package/lib/types/src/internal/device-session/model/DeviceSessionEventDispatcher.test.d.ts.map +1 -0
  964. package/lib/types/src/internal/device-session/model/DeviceSessionRefresher.d.ts +17 -79
  965. package/lib/types/src/internal/device-session/model/DeviceSessionRefresher.d.ts.map +1 -1
  966. package/lib/types/src/internal/device-session/model/DeviceSessionStateHandler.d.ts +20 -0
  967. package/lib/types/src/internal/device-session/model/DeviceSessionStateHandler.d.ts.map +1 -0
  968. package/lib/types/src/internal/device-session/model/DeviceSessionStateHandler.test.d.ts +2 -0
  969. package/lib/types/src/internal/device-session/model/DeviceSessionStateHandler.test.d.ts.map +1 -0
  970. package/lib/types/src/internal/device-session/model/Frame.d.ts.map +1 -1
  971. package/lib/types/src/internal/device-session/service/DefaultApduReceiverService.d.ts.map +1 -1
  972. package/lib/types/src/internal/device-session/service/MutexService.d.ts +6 -0
  973. package/lib/types/src/internal/device-session/service/MutexService.d.ts.map +1 -0
  974. package/lib/types/src/internal/device-session/service/MutexService.test.d.ts +2 -0
  975. package/lib/types/src/internal/device-session/service/MutexService.test.d.ts.map +1 -0
  976. package/lib/types/src/internal/device-session/service/RefresherService.d.ts +15 -0
  977. package/lib/types/src/internal/device-session/service/RefresherService.d.ts.map +1 -0
  978. package/lib/types/src/internal/device-session/service/RefresherService.test.d.ts +2 -0
  979. package/lib/types/src/internal/device-session/service/RefresherService.test.d.ts.map +1 -0
  980. package/lib/types/src/internal/device-session/use-case/CloseSessionsUseCase.d.ts +1 -1
  981. package/lib/types/src/internal/device-session/use-case/CloseSessionsUseCase.d.ts.map +1 -1
  982. package/lib/types/src/internal/device-session/utils/deviceSessionUtils.d.ts +3 -0
  983. package/lib/types/src/internal/device-session/utils/deviceSessionUtils.d.ts.map +1 -0
  984. package/lib/types/src/internal/discovery/di/discoveryModule.d.ts.map +1 -1
  985. package/lib/types/src/internal/discovery/di/discoveryTypes.d.ts +1 -1
  986. package/lib/types/src/internal/discovery/di/discoveryTypes.d.ts.map +1 -1
  987. package/lib/types/src/internal/discovery/use-case/ConnectUseCase.d.ts +8 -1
  988. package/lib/types/src/internal/discovery/use-case/ConnectUseCase.d.ts.map +1 -1
  989. package/lib/types/src/internal/discovery/use-case/ListenToAvailableDevicesUseCase.d.ts +24 -0
  990. package/lib/types/src/internal/discovery/use-case/ListenToAvailableDevicesUseCase.d.ts.map +1 -0
  991. package/lib/types/src/internal/discovery/use-case/ListenToAvailableDevicesUseCase.test.d.ts +2 -0
  992. package/lib/types/src/internal/discovery/use-case/ListenToAvailableDevicesUseCase.test.d.ts.map +1 -0
  993. package/lib/types/src/internal/discovery/use-case/ListenToConnectedDeviceUseCase.d.ts +1 -1
  994. package/lib/types/src/internal/discovery/use-case/ListenToConnectedDeviceUseCase.d.ts.map +1 -1
  995. package/lib/types/src/internal/discovery/use-case/StartDiscoveringUseCase.d.ts +1 -1
  996. package/lib/types/src/internal/discovery/use-case/StartDiscoveringUseCase.d.ts.map +1 -1
  997. package/lib/types/src/internal/discovery/use-case/StopDiscoveringUseCase.d.ts +4 -2
  998. package/lib/types/src/internal/discovery/use-case/StopDiscoveringUseCase.d.ts.map +1 -1
  999. package/lib/types/src/internal/logger-publisher/di/loggerModule.d.ts.map +1 -1
  1000. package/lib/types/src/internal/manager-api/data/AxiosManagerApiDataSource.d.ts +27 -7
  1001. package/lib/types/src/internal/manager-api/data/AxiosManagerApiDataSource.d.ts.map +1 -1
  1002. package/lib/types/src/internal/manager-api/data/ManagerApiDataSource.d.ts +62 -12
  1003. package/lib/types/src/internal/manager-api/data/ManagerApiDataSource.d.ts.map +1 -1
  1004. package/lib/types/src/internal/manager-api/data/ManagerApiDto.d.ts +106 -17
  1005. package/lib/types/src/internal/manager-api/data/ManagerApiDto.d.ts.map +1 -1
  1006. package/lib/types/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.d.ts +8 -0
  1007. package/lib/types/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.d.ts.map +1 -1
  1008. package/lib/types/src/internal/manager-api/di/managerApiModule.d.ts.map +1 -1
  1009. package/lib/types/src/internal/manager-api/di/managerApiTypes.d.ts +1 -0
  1010. package/lib/types/src/internal/manager-api/di/managerApiTypes.d.ts.map +1 -1
  1011. package/lib/types/src/internal/manager-api/model/Application.d.ts +14 -11
  1012. package/lib/types/src/internal/manager-api/model/Application.d.ts.map +1 -1
  1013. package/lib/types/src/internal/manager-api/model/Const.d.ts +2 -0
  1014. package/lib/types/src/internal/manager-api/model/Const.d.ts.map +1 -1
  1015. package/lib/types/src/internal/manager-api/model/Firmware.d.ts +17 -3
  1016. package/lib/types/src/internal/manager-api/model/Firmware.d.ts.map +1 -1
  1017. package/lib/types/src/internal/manager-api/model/Language.d.ts +12 -0
  1018. package/lib/types/src/internal/manager-api/model/Language.d.ts.map +1 -0
  1019. package/lib/types/src/internal/manager-api/model/Params.d.ts +57 -0
  1020. package/lib/types/src/internal/manager-api/model/Params.d.ts.map +1 -0
  1021. package/lib/types/src/internal/manager-api/service/DefaultManagerApiService.d.ts +13 -7
  1022. package/lib/types/src/internal/manager-api/service/DefaultManagerApiService.d.ts.map +1 -1
  1023. package/lib/types/src/internal/manager-api/service/ManagerApiService.d.ts +71 -5
  1024. package/lib/types/src/internal/manager-api/service/ManagerApiService.d.ts.map +1 -1
  1025. package/lib/types/src/internal/manager-api/use-case/SetProviderUseCase.d.ts +13 -0
  1026. package/lib/types/src/internal/manager-api/use-case/SetProviderUseCase.d.ts.map +1 -0
  1027. package/lib/types/src/internal/manager-api/use-case/SetProviderUseCase.test.d.ts +2 -0
  1028. package/lib/types/src/internal/manager-api/use-case/SetProviderUseCase.test.d.ts.map +1 -0
  1029. package/lib/types/src/internal/secure-channel/data/DefaultSecureChannelDataSource.d.ts +3 -3
  1030. package/lib/types/src/internal/secure-channel/data/DefaultSecureChannelDataSource.d.ts.map +1 -1
  1031. package/lib/types/src/internal/secure-channel/data/SecureChannelDataSource.d.ts +13 -13
  1032. package/lib/types/src/internal/secure-channel/data/SecureChannelDataSource.d.ts.map +1 -1
  1033. package/lib/types/src/internal/secure-channel/di/secureChannelModule.d.ts.map +1 -1
  1034. package/lib/types/src/internal/secure-channel/model/Errors.d.ts +27 -1
  1035. package/lib/types/src/internal/secure-channel/model/Errors.d.ts.map +1 -1
  1036. package/lib/types/src/internal/secure-channel/model/Params.d.ts +3 -5
  1037. package/lib/types/src/internal/secure-channel/model/Params.d.ts.map +1 -1
  1038. package/lib/types/src/internal/secure-channel/service/DefaultSecureChannelService.d.ts +7 -6
  1039. package/lib/types/src/internal/secure-channel/service/DefaultSecureChannelService.d.ts.map +1 -1
  1040. package/lib/types/src/internal/secure-channel/service/SecureChannelService.d.ts +42 -6
  1041. package/lib/types/src/internal/secure-channel/service/SecureChannelService.d.ts.map +1 -1
  1042. package/lib/types/src/internal/send/di/sendModule.d.ts.map +1 -1
  1043. package/lib/types/src/internal/send/use-case/SendApduUseCase.d.ts +9 -1
  1044. package/lib/types/src/internal/send/use-case/SendApduUseCase.d.ts.map +1 -1
  1045. package/lib/types/src/internal/transport/di/transportModule.d.ts.map +1 -1
  1046. package/lib/types/src/internal/transport/service/DefaultTransportService.d.ts +2 -2
  1047. package/lib/types/src/internal/transport/service/DefaultTransportService.d.ts.map +1 -1
  1048. package/lib/types/src/internal/transport/service/TransportService.d.ts +3 -3
  1049. package/lib/types/src/internal/transport/service/TransportService.d.ts.map +1 -1
  1050. package/lib/types/src/internal/transport/service/__mocks__/DefaultTransportService.d.ts +1 -1
  1051. package/lib/types/src/internal/transport/service/__mocks__/DefaultTransportService.d.ts.map +1 -1
  1052. package/lib/types/tsconfig.prod.tsbuildinfo +1 -1
  1053. package/package.json +19 -20
  1054. package/lib/cjs/src/api/device-session/use-case/ToggleDeviceSessionRefresher.js +0 -2
  1055. package/lib/cjs/src/api/device-session/use-case/ToggleDeviceSessionRefresher.js.map +0 -7
  1056. package/lib/cjs/src/api/device-session/use-case/ToggleDeviceSessionRefresher.test.js +0 -2
  1057. package/lib/cjs/src/api/device-session/use-case/ToggleDeviceSessionRefresher.test.js.map +0 -7
  1058. package/lib/cjs/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.js +0 -2
  1059. package/lib/cjs/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.js.map +0 -7
  1060. package/lib/cjs/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.test.js +0 -2
  1061. package/lib/cjs/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.test.js.map +0 -7
  1062. package/lib/esm/src/api/device-session/use-case/ToggleDeviceSessionRefresher.js +0 -2
  1063. package/lib/esm/src/api/device-session/use-case/ToggleDeviceSessionRefresher.js.map +0 -7
  1064. package/lib/esm/src/api/device-session/use-case/ToggleDeviceSessionRefresher.test.js +0 -2
  1065. package/lib/esm/src/api/device-session/use-case/ToggleDeviceSessionRefresher.test.js.map +0 -7
  1066. package/lib/esm/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.js +0 -2
  1067. package/lib/esm/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.js.map +0 -7
  1068. package/lib/esm/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.test.js +0 -2
  1069. package/lib/esm/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.test.js.map +0 -7
  1070. package/lib/types/src/api/device-session/use-case/ToggleDeviceSessionRefresher.d.ts.map +0 -1
  1071. package/lib/types/src/api/device-session/use-case/ToggleDeviceSessionRefresher.test.d.ts +0 -2
  1072. package/lib/types/src/api/device-session/use-case/ToggleDeviceSessionRefresher.test.d.ts.map +0 -1
  1073. package/lib/types/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.d.ts +0 -13
  1074. package/lib/types/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.d.ts.map +0 -1
  1075. package/lib/types/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.test.d.ts +0 -2
  1076. package/lib/types/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.test.d.ts.map +0 -1
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/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 o=Object.defineProperty;var A=Object.getOwnPropertyDescriptor;var D=Object.getOwnPropertyNames;var N=Object.prototype.hasOwnProperty;var O=(S,E)=>{for(var T in E)o(S,T,{get:E[T],enumerable:!0})},P=(S,E,T,t)=>{if(E&&typeof E=="object"||typeof E=="function")for(let _ of D(E))!N.call(S,_)&&_!==T&&o(S,_,{get:()=>E[_],enumerable:!(t=A(E,_))||t.enumerable});return S};var U=S=>P(o({},"__esModule",{value:!0}),S);var e={};O(e,{APDU_RESPONSE_STATUS_CODE_LENGTH:()=>c});module.exports=U(e);const c=2;0&&(module.exports={APDU_RESPONSE_STATUS_CODE_LENGTH});
1
+ "use strict";var t=Object.defineProperty;var N=Object.getOwnPropertyDescriptor;var O=Object.getOwnPropertyNames;var P=Object.prototype.hasOwnProperty;var U=(T,E)=>{for(var o in E)t(T,o,{get:E[o],enumerable:!0})},c=(T,E,o,S)=>{if(E&&typeof E=="object"||typeof E=="function")for(let _ of O(E))!P.call(T,_)&&_!==o&&t(T,_,{get:()=>E[_],enumerable:!(S=N(E,_))||S.enumerable});return T};var e=T=>c(t({},"__esModule",{value:!0}),T);var r={};U(r,{APDU_RESPONSE_STATUS_CODE_LENGTH:()=>n,PINGER_TIMEOUT:()=>p});module.exports=e(r);const n=2,p=800;0&&(module.exports={APDU_RESPONSE_STATUS_CODE_LENGTH,PINGER_TIMEOUT});
2
2
  //# sourceMappingURL=ApduResponseConst.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/internal/device-session/data/ApduResponseConst.ts"],
4
- "sourcesContent": ["export const APDU_RESPONSE_STATUS_CODE_LENGTH = 2;\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,sCAAAE,IAAA,eAAAC,EAAAH,GAAO,MAAME,EAAmC",
6
- "names": ["ApduResponseConst_exports", "__export", "APDU_RESPONSE_STATUS_CODE_LENGTH", "__toCommonJS"]
4
+ "sourcesContent": ["export const APDU_RESPONSE_STATUS_CODE_LENGTH = 2;\nexport const PINGER_TIMEOUT = 800;\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,sCAAAE,EAAA,mBAAAC,IAAA,eAAAC,EAAAJ,GAAO,MAAME,EAAmC,EACnCC,EAAiB",
6
+ "names": ["ApduResponseConst_exports", "__export", "APDU_RESPONSE_STATUS_CODE_LENGTH", "PINGER_TIMEOUT", "__toCommonJS"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var _=Object.defineProperty;var t=Object.getOwnPropertyDescriptor;var N=Object.getOwnPropertyNames;var V=Object.prototype.hasOwnProperty;var c=(S,E)=>{for(var R in E)_(S,R,{get:E[R],enumerable:!0})},e=(S,E,R,o)=>{if(E&&typeof E=="object"||typeof E=="function")for(let I of N(E))!V.call(S,I)&&I!==R&&_(S,I,{get:()=>E[I],enumerable:!(o=t(E,I))||o.enumerable});return S};var n=S=>e(_({},"__esModule",{value:!0}),S);var r={};c(r,{DEVICE_SESSION_REFRESH_INTERVAL:()=>p});module.exports=n(r);const p=1e3;0&&(module.exports={DEVICE_SESSION_REFRESH_INTERVAL});
1
+ "use strict";var R=Object.defineProperty;var L=Object.getOwnPropertyDescriptor;var e=Object.getOwnPropertyNames;var O=Object.prototype.hasOwnProperty;var o=(I,E)=>{for(var _ in E)R(I,_,{get:E[_],enumerable:!0})},s=(I,E,_,N)=>{if(E&&typeof E=="object"||typeof E=="function")for(let S of e(E))!O.call(I,S)&&S!==_&&R(I,S,{get:()=>E[S],enumerable:!(N=L(E,S))||N.enumerable});return I};var t=I=>s(R({},"__esModule",{value:!0}),I);var l={};o(l,{DEVICE_SESSION_REFRESHER_DEFAULT_OPTIONS:()=>D,DEVICE_SESSION_REFRESHER_MINIMUM_POLLING_INTERVAL:()=>r,DEVICE_SESSION_REFRESHER_POLLING_INTERVAL:()=>V});module.exports=t(l);const V=1e3,r=1e3,D={isRefresherDisabled:!1,pollingInterval:1e3};0&&(module.exports={DEVICE_SESSION_REFRESHER_DEFAULT_OPTIONS,DEVICE_SESSION_REFRESHER_MINIMUM_POLLING_INTERVAL,DEVICE_SESSION_REFRESHER_POLLING_INTERVAL});
2
2
  //# sourceMappingURL=DeviceSessionRefresherConst.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/internal/device-session/data/DeviceSessionRefresherConst.ts"],
4
- "sourcesContent": ["export const DEVICE_SESSION_REFRESH_INTERVAL = 1000;\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,qCAAAE,IAAA,eAAAC,EAAAH,GAAO,MAAME,EAAkC",
6
- "names": ["DeviceSessionRefresherConst_exports", "__export", "DEVICE_SESSION_REFRESH_INTERVAL", "__toCommonJS"]
4
+ "sourcesContent": ["// used for default args\nexport const DEVICE_SESSION_REFRESHER_POLLING_INTERVAL = 1000;\n\n// used to set a minimum interval for the exposed refresher options\nexport const DEVICE_SESSION_REFRESHER_MINIMUM_POLLING_INTERVAL = 1000;\n\nexport const DEVICE_SESSION_REFRESHER_DEFAULT_OPTIONS = {\n isRefresherDisabled: false,\n pollingInterval: DEVICE_SESSION_REFRESHER_POLLING_INTERVAL,\n};\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,8CAAAE,EAAA,sDAAAC,EAAA,8CAAAC,IAAA,eAAAC,EAAAL,GACO,MAAMI,EAA4C,IAG5CD,EAAoD,IAEpDD,EAA2C,CACtD,oBAAqB,GACrB,gBAAiB,GACnB",
6
+ "names": ["DeviceSessionRefresherConst_exports", "__export", "DEVICE_SESSION_REFRESHER_DEFAULT_OPTIONS", "DEVICE_SESSION_REFRESHER_MINIMUM_POLLING_INTERVAL", "DEVICE_SESSION_REFRESHER_POLLING_INTERVAL", "__toCommonJS"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var a=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var D=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 C(e))!D.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 P={};F(P,{deviceSessionModuleFactory:()=>h});module.exports=U(P);var v=require("inversify"),g=require("../../../api/device-session/use-case/ToggleDeviceSessionRefresher"),m=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 h=({stub:r}={stub:!1})=>new v.ContainerModule((e,s,i,t,b,L,T)=>{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 m.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.ToggleDeviceSessionRefresherUseCase).to(g.ToggleDeviceSessionRefresherUseCase),r&&(t(o.deviceSessionTypes.GetDeviceSessionStateUseCase).to(u.StubUseCase),t(o.deviceSessionTypes.ToggleDeviceSessionRefresherUseCase).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 { ToggleDeviceSessionRefresherUseCase } from \"@api/device-session/use-case/ToggleDeviceSessionRefresher\";\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.ToggleDeviceSessionRefresherUseCase).to(\n ToggleDeviceSessionRefresherUseCase,\n );\n\n if (stub) {\n rebind(deviceSessionTypes.GetDeviceSessionStateUseCase).to(StubUseCase);\n rebind(deviceSessionTypes.ToggleDeviceSessionRefresherUseCase).to(\n StubUseCase,\n );\n }\n },\n );\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,gCAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAiD,qBAMjDC,EAAoD,qEAEpDC,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,mCAAmC,EAAE,GAC3D,qCACF,EAEID,IACFI,EAAO,qBAAmB,4BAA4B,EAAE,GAAG,aAAW,EACtEA,EAAO,qBAAmB,mCAAmC,EAAE,GAC7D,aACF,EAEJ,CACF",
6
- "names": ["deviceSessionModule_exports", "__export", "deviceSessionModuleFactory", "__toCommonJS", "import_inversify", "import_ToggleDeviceSessionRefresher", "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 S=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var n=(s,e)=>{for(var r in e)S(s,r,{get:e[r],enumerable:!0})},t=(s,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of v(e))!a.call(s,o)&&o!==r&&S(s,o,{get:()=>e[o],enumerable:!(i=c(e,o))||i.enumerable});return s};var y=s=>t(S({},"__esModule",{value:!0}),s);var f={};n(f,{deviceSessionTypes:()=>l});module.exports=y(f);const l={ApduSenderServiceFactory:Symbol.for("ApduSenderServiceFactory"),ApduReceiverServiceFactory:Symbol.for("ApduReceiverServiceFactory"),DeviceSessionService:Symbol.for("DeviceSessionService"),GetDeviceSessionStateUseCase:Symbol.for("GetDeviceSessionStateUseCase"),ToggleDeviceSessionRefresherUseCase:Symbol.for("ToggleDeviceSessionRefresherUseCase"),CloseSessionsUseCase:Symbol.for("CloseSessionsUseCase")};0&&(module.exports={deviceSessionTypes});
1
+ "use strict";var r=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var n=(s,e)=>{for(var i in e)r(s,i,{get:e[i],enumerable:!0})},t=(s,e,i,S)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of v(e))!a.call(s,o)&&o!==i&&r(s,o,{get:()=>e[o],enumerable:!(S=c(e,o))||S.enumerable});return s};var y=s=>t(r({},"__esModule",{value:!0}),s);var b={};n(b,{deviceSessionTypes:()=>l});module.exports=y(b);const l={ApduSenderServiceFactory:Symbol.for("ApduSenderServiceFactory"),ApduReceiverServiceFactory:Symbol.for("ApduReceiverServiceFactory"),DeviceSessionService:Symbol.for("DeviceSessionService"),GetDeviceSessionStateUseCase:Symbol.for("GetDeviceSessionStateUseCase"),DisableDeviceSessionRefresherUseCase:Symbol.for("DisableDeviceSessionRefresherUseCase"),CloseSessionsUseCase:Symbol.for("CloseSessionsUseCase")};0&&(module.exports={deviceSessionTypes});
2
2
  //# sourceMappingURL=deviceSessionTypes.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/internal/device-session/di/deviceSessionTypes.ts"],
4
- "sourcesContent": ["export const deviceSessionTypes = {\n ApduSenderServiceFactory: Symbol.for(\"ApduSenderServiceFactory\"),\n ApduReceiverServiceFactory: Symbol.for(\"ApduReceiverServiceFactory\"),\n DeviceSessionService: Symbol.for(\"DeviceSessionService\"),\n GetDeviceSessionStateUseCase: Symbol.for(\"GetDeviceSessionStateUseCase\"),\n ToggleDeviceSessionRefresherUseCase: Symbol.for(\n \"ToggleDeviceSessionRefresherUseCase\",\n ),\n CloseSessionsUseCase: Symbol.for(\"CloseSessionsUseCase\"),\n};\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,wBAAAE,IAAA,eAAAC,EAAAH,GAAO,MAAME,EAAqB,CAChC,yBAA0B,OAAO,IAAI,0BAA0B,EAC/D,2BAA4B,OAAO,IAAI,4BAA4B,EACnE,qBAAsB,OAAO,IAAI,sBAAsB,EACvD,6BAA8B,OAAO,IAAI,8BAA8B,EACvE,oCAAqC,OAAO,IAC1C,qCACF,EACA,qBAAsB,OAAO,IAAI,sBAAsB,CACzD",
4
+ "sourcesContent": ["export const deviceSessionTypes = {\n ApduSenderServiceFactory: Symbol.for(\"ApduSenderServiceFactory\"),\n ApduReceiverServiceFactory: Symbol.for(\"ApduReceiverServiceFactory\"),\n DeviceSessionService: Symbol.for(\"DeviceSessionService\"),\n GetDeviceSessionStateUseCase: Symbol.for(\"GetDeviceSessionStateUseCase\"),\n DisableDeviceSessionRefresherUseCase: Symbol.for(\n \"DisableDeviceSessionRefresherUseCase\",\n ),\n CloseSessionsUseCase: Symbol.for(\"CloseSessionsUseCase\"),\n};\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,wBAAAE,IAAA,eAAAC,EAAAH,GAAO,MAAME,EAAqB,CAChC,yBAA0B,OAAO,IAAI,0BAA0B,EAC/D,2BAA4B,OAAO,IAAI,4BAA4B,EACnE,qBAAsB,OAAO,IAAI,sBAAsB,EACvD,6BAA8B,OAAO,IAAI,8BAA8B,EACvE,qCAAsC,OAAO,IAC3C,sCACF,EACA,qBAAsB,OAAO,IAAI,sBAAsB,CACzD",
6
6
  "names": ["deviceSessionTypes_exports", "__export", "deviceSessionTypes", "__toCommonJS"]
7
7
  }
@@ -0,0 +1,2 @@
1
+ "use strict";var m=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var E=Object.prototype.hasOwnProperty;var l=(s,e)=>{for(var n in e)m(s,n,{get:e[n],enumerable:!0})},h=(s,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of v(e))!E.call(s,t)&&t!==n&&m(s,t,{get:()=>e[t],enumerable:!(i=u(e,t))||i.enumerable});return s};var D=s=>h(m({},"__esModule",{value:!0}),s);var _={};l(_,{DevicePinger:()=>C});module.exports=D(_);var p=require("../../../api/device/DeviceModel"),a=require("../../../api/index"),c=require("../../device-session/data/ApduResponseConst"),d=require("../../device-session/data/DeviceSessionRefresherConst"),r=require("../../device-session/model/DeviceSessionEventDispatcher");class C{constructor(e,n,i,t){this.connectedDevice=n;this._sessionEventDispatcher=i;this._sendCommandFunction=t,this._logger=e("device-pinger"),this._subscription=this._sessionEventDispatcher.listen().subscribe(async o=>await this.mapEventAction(o))}_sendCommandFunction;_subscription;_logger;async ping(){try{return await this.mapDevicePingAction(this.connectedDevice.deviceModel.id)}catch(e){throw this._logger.error("Error while pinging device",{data:{error:e}}),e}}mapEventAction=async e=>{switch(e.eventName){case r.SessionEvents.REFRESH_NEEDED:return await this.ping();default:return null}};async mapDevicePingAction(e){switch(e){case p.DeviceModelId.NANO_S:{const n=async()=>{const o=await this._sendCommandFunction(new a.GetAppAndVersionCommand,c.PINGER_TIMEOUT);return this._sendCommandFunction(new a.GetOsVersionCommand,c.PINGER_TIMEOUT),o},i=new Promise(o=>{setTimeout(()=>o(null),d.DEVICE_SESSION_REFRESHER_POLLING_INTERVAL*2+100)}),t=await Promise.race([n(),i]);return t?this._sessionEventDispatcher.dispatch({eventName:r.SessionEvents.COMMAND_SUCCEEDED,eventData:t}):this._sessionEventDispatcher.dispatch({eventName:r.SessionEvents.DEVICE_STATE_UPDATE_LOCKED}),t}default:{const n=await this._sendCommandFunction(new a.GetAppAndVersionCommand,c.PINGER_TIMEOUT);return this._sessionEventDispatcher.dispatch({eventName:r.SessionEvents.COMMAND_SUCCEEDED,eventData:n}),n}}}unsubscribe(){this._subscription.unsubscribe()}}0&&(module.exports={DevicePinger});
2
+ //# sourceMappingURL=DevicePinger.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../src/internal/device-session/model/DevicePinger.ts"],
4
+ "sourcesContent": ["import { type Subscription } from \"rxjs\";\n\nimport { DeviceModelId } from \"@api/device/DeviceModel\";\nimport {\n GetAppAndVersionCommand,\n type GetAppAndVersionResponse,\n GetOsVersionCommand,\n type TransportConnectedDevice,\n} from \"@api/index\";\nimport {\n type Command,\n type CommandResult,\n type LoggerPublisherService,\n} from \"@api/types\";\nimport { PINGER_TIMEOUT } from \"@internal/device-session/data/ApduResponseConst\";\nimport { DEVICE_SESSION_REFRESHER_POLLING_INTERVAL } from \"@internal/device-session/data/DeviceSessionRefresherConst\";\nimport {\n type DeviceSessionEventDispatcher,\n type NewEvent,\n SessionEvents,\n} from \"@internal/device-session/model/DeviceSessionEventDispatcher\";\n\ntype SendCommandFunction = <Response, Args, ErrorStatusCodes>(\n command: Command<Response, Args, ErrorStatusCodes>,\n abortTimeout?: number,\n) => Promise<CommandResult<Response, ErrorStatusCodes>>;\n\nexport class DevicePinger {\n private readonly _sendCommandFunction: SendCommandFunction;\n private _subscription: Subscription;\n private _logger: LoggerPublisherService;\n\n constructor(\n loggerModuleFactory: (tag: string) => LoggerPublisherService,\n private connectedDevice: TransportConnectedDevice,\n private _sessionEventDispatcher: DeviceSessionEventDispatcher,\n sendCommandFunction: SendCommandFunction,\n ) {\n this._sendCommandFunction = sendCommandFunction;\n this._logger = loggerModuleFactory(\"device-pinger\");\n this._subscription = this._sessionEventDispatcher\n .listen()\n .subscribe(async (event) => await this.mapEventAction(event));\n }\n\n public async ping(): Promise<CommandResult<GetAppAndVersionResponse> | null> {\n try {\n const result = await this.mapDevicePingAction(\n this.connectedDevice.deviceModel.id,\n );\n return result;\n } catch (error) {\n this._logger.error(\"Error while pinging device\", {\n data: {\n error,\n },\n });\n throw error;\n }\n }\n\n private mapEventAction = async (event: NewEvent) => {\n switch (event.eventName) {\n case SessionEvents.REFRESH_NEEDED:\n return await this.ping();\n default:\n return null;\n }\n };\n\n private async mapDevicePingAction(deviceModelId: DeviceModelId) {\n switch (deviceModelId) {\n case DeviceModelId.NANO_S: {\n const chainPromise: () => Promise<\n CommandResult<GetAppAndVersionResponse>\n > = async () => {\n const appVersionResult = await this._sendCommandFunction(\n new GetAppAndVersionCommand(),\n PINGER_TIMEOUT,\n );\n\n this._sendCommandFunction(new GetOsVersionCommand(), PINGER_TIMEOUT);\n return appVersionResult;\n };\n\n const timeoutPromise: Promise<null> = new Promise((resolve) => {\n setTimeout(\n () => resolve(null),\n DEVICE_SESSION_REFRESHER_POLLING_INTERVAL * 2 + 100,\n );\n });\n\n const resultOrTimeout: CommandResult<GetAppAndVersionResponse> | null =\n await Promise.race([chainPromise(), timeoutPromise]);\n\n if (!resultOrTimeout) {\n this._sessionEventDispatcher.dispatch({\n eventName: SessionEvents.DEVICE_STATE_UPDATE_LOCKED,\n });\n } else {\n this._sessionEventDispatcher.dispatch({\n eventName: SessionEvents.COMMAND_SUCCEEDED,\n eventData: resultOrTimeout,\n });\n }\n return resultOrTimeout;\n }\n default: {\n const result = await this._sendCommandFunction(\n new GetAppAndVersionCommand(),\n PINGER_TIMEOUT,\n );\n this._sessionEventDispatcher.dispatch({\n eventName: SessionEvents.COMMAND_SUCCEEDED,\n eventData: result,\n });\n return result;\n }\n }\n }\n\n public unsubscribe(): void {\n this._subscription.unsubscribe();\n }\n}\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,kBAAAE,IAAA,eAAAC,EAAAH,GAEA,IAAAI,EAA8B,mCAC9BC,EAKO,sBAMPC,EAA+B,2DAC/BC,EAA0D,qEAC1DC,EAIO,uEAOA,MAAMN,CAAa,CAKxB,YACEO,EACQC,EACAC,EACRC,EACA,CAHQ,qBAAAF,EACA,6BAAAC,EAGR,KAAK,qBAAuBC,EAC5B,KAAK,QAAUH,EAAoB,eAAe,EAClD,KAAK,cAAgB,KAAK,wBACvB,OAAO,EACP,UAAU,MAAOI,GAAU,MAAM,KAAK,eAAeA,CAAK,CAAC,CAChE,CAfiB,qBACT,cACA,QAeR,MAAa,MAAgE,CAC3E,GAAI,CAIF,OAHe,MAAM,KAAK,oBACxB,KAAK,gBAAgB,YAAY,EACnC,CAEF,OAASC,EAAO,CACd,WAAK,QAAQ,MAAM,6BAA8B,CAC/C,KAAM,CACJ,MAAAA,CACF,CACF,CAAC,EACKA,CACR,CACF,CAEQ,eAAiB,MAAOD,GAAoB,CAClD,OAAQA,EAAM,UAAW,CACvB,KAAK,gBAAc,eACjB,OAAO,MAAM,KAAK,KAAK,EACzB,QACE,OAAO,IACX,CACF,EAEA,MAAc,oBAAoBE,EAA8B,CAC9D,OAAQA,EAAe,CACrB,KAAK,gBAAc,OAAQ,CACzB,MAAMC,EAEF,SAAY,CACd,MAAMC,EAAmB,MAAM,KAAK,qBAClC,IAAI,0BACJ,gBACF,EAEA,YAAK,qBAAqB,IAAI,sBAAuB,gBAAc,EAC5DA,CACT,EAEMC,EAAgC,IAAI,QAASC,GAAY,CAC7D,WACE,IAAMA,EAAQ,IAAI,EAClB,4CAA4C,EAAI,GAClD,CACF,CAAC,EAEKC,EACJ,MAAM,QAAQ,KAAK,CAACJ,EAAa,EAAGE,CAAc,CAAC,EAErD,OAAKE,EAKH,KAAK,wBAAwB,SAAS,CACpC,UAAW,gBAAc,kBACzB,UAAWA,CACb,CAAC,EAPD,KAAK,wBAAwB,SAAS,CACpC,UAAW,gBAAc,0BAC3B,CAAC,EAOIA,CACT,CACA,QAAS,CACP,MAAMC,EAAS,MAAM,KAAK,qBACxB,IAAI,0BACJ,gBACF,EACA,YAAK,wBAAwB,SAAS,CACpC,UAAW,gBAAc,kBACzB,UAAWA,CACb,CAAC,EACMA,CACT,CACF,CACF,CAEO,aAAoB,CACzB,KAAK,cAAc,YAAY,CACjC,CACF",
6
+ "names": ["DevicePinger_exports", "__export", "DevicePinger", "__toCommonJS", "import_DeviceModel", "import_api", "import_ApduResponseConst", "import_DeviceSessionRefresherConst", "import_DeviceSessionEventDispatcher", "loggerModuleFactory", "connectedDevice", "_sessionEventDispatcher", "sendCommandFunction", "event", "error", "deviceModelId", "chainPromise", "appVersionResult", "timeoutPromise", "resolve", "resultOrTimeout", "result"]
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";var E=require("rxjs"),e=require("vitest"),d=require("../../../api/device/DeviceModel"),p=require("../../../api/index"),D=require("../../device-session/data/DeviceSessionRefresherConst"),a=require("../../device-session/model/DeviceSessionEventDispatcher"),m=require("./DevicePinger");(0,e.describe)("DevicePinger",()=>{let n,u;const v=e.vi.fn(()=>u);let r,s,i,o;(0,e.beforeEach)(()=>{r=new E.Subject,s={listen:()=>r.asObservable(),dispatch:e.vi.fn()},n=e.vi.fn(),u={info:e.vi.fn(),warn:e.vi.fn(),error:e.vi.fn(),debug:e.vi.fn(),subscribers:[]},i={deviceModel:{id:d.DeviceModelId.NANO_X}},o=new m.DevicePinger(v,i,s,n)}),(0,e.afterEach)(()=>{o.unsubscribe(),e.vi.restoreAllMocks()}),(0,e.it)("should call sendCommandFunction and dispatch COMMAND_SUCCEEDED event on successful ping for non-NANO_S",async()=>{const t={status:"success",data:{foo:"bar"}};n.mockResolvedValue(t);const c=await o.ping();(0,e.expect)(n).toHaveBeenCalledTimes(1);const l=n.mock.calls[0][0];(0,e.expect)(l).toBeInstanceOf(p.GetAppAndVersionCommand),(0,e.expect)(s.dispatch).toHaveBeenCalledWith({eventName:a.SessionEvents.COMMAND_SUCCEEDED,eventData:t}),(0,e.expect)(c).toEqual(t)}),(0,e.it)("should log error and throw error on ping failure",async()=>{const t=new Error("ping failed");n.mockRejectedValue(t),await(0,e.expect)(o.ping()).rejects.toThrow("ping failed"),(0,e.expect)(n).toHaveBeenCalledTimes(1)}),(0,e.it)("should dispatch DEVICE_STATE_UPDATE_LOCKED and return null on timeout for NANO_S",async()=>{i.deviceModel.id=d.DeviceModelId.NANO_S,o.unsubscribe(),o=new m.DevicePinger(v,i,s,n);const t=new Promise(()=>{});n.mockReturnValueOnce(t),e.vi.useFakeTimers();const c=o.ping();e.vi.advanceTimersByTime(D.DEVICE_SESSION_REFRESHER_POLLING_INTERVAL*4);const l=await c;(0,e.expect)(l).toBeNull(),(0,e.expect)(s.dispatch).toHaveBeenCalledWith({eventName:a.SessionEvents.DEVICE_STATE_UPDATE_LOCKED}),(0,e.expect)(n).toHaveBeenCalledTimes(1),e.vi.useRealTimers()}),(0,e.it)("should call ping on REFRESH_NEEDED event",async()=>{const t={status:"success",data:{foo:"bar"}};n.mockResolvedValue(t),r.next({eventName:a.SessionEvents.REFRESH_NEEDED,eventData:void 0}),await Promise.resolve(),(0,e.expect)(n).toHaveBeenCalled(),(0,e.expect)(s.dispatch).toHaveBeenCalledWith({eventName:a.SessionEvents.COMMAND_SUCCEEDED,eventData:t})}),(0,e.it)("should not process events after unsubscribe is called",async()=>{o.unsubscribe(),n.mockClear(),r.next({eventName:a.SessionEvents.REFRESH_NEEDED,eventData:void 0}),await Promise.resolve(),(0,e.expect)(n).not.toHaveBeenCalled()})});
2
+ //# sourceMappingURL=DevicePinger.test.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../src/internal/device-session/model/DevicePinger.test.ts"],
4
+ "sourcesContent": ["import { Subject } from \"rxjs\";\nimport { afterEach, beforeEach, describe, expect, it, vi } from \"vitest\";\n\nimport { DeviceModelId } from \"@api/device/DeviceModel\";\nimport {\n GetAppAndVersionCommand,\n type TransportConnectedDevice,\n} from \"@api/index\";\nimport type { LoggerPublisherService } from \"@api/types\";\nimport { DEVICE_SESSION_REFRESHER_POLLING_INTERVAL } from \"@internal/device-session/data/DeviceSessionRefresherConst\";\nimport {\n type DeviceSessionEventDispatcher,\n type NewEvent,\n SessionEvents,\n} from \"@internal/device-session/model/DeviceSessionEventDispatcher\";\n\nimport { DevicePinger } from \"./DevicePinger\";\n\ndescribe(\"DevicePinger\", () => {\n let dummySendCommandFunction: ReturnType<typeof vi.fn>;\n let mockLogger: LoggerPublisherService & {\n info: ReturnType<typeof vi.fn>;\n warn: ReturnType<typeof vi.fn>;\n error: ReturnType<typeof vi.fn>;\n };\n const mockedLoggerModuleFactory = vi.fn(() => mockLogger);\n let eventSubject: Subject<NewEvent>;\n let mockSessionEventDispatcher: DeviceSessionEventDispatcher;\n let dummyConnectedDevice: TransportConnectedDevice;\n let devicePinger: DevicePinger;\n\n beforeEach(() => {\n eventSubject = new Subject<NewEvent>();\n mockSessionEventDispatcher = {\n listen: () => eventSubject.asObservable(),\n dispatch: vi.fn(),\n } as unknown as DeviceSessionEventDispatcher;\n\n dummySendCommandFunction = vi.fn();\n mockLogger = {\n info: vi.fn(),\n warn: vi.fn(),\n error: vi.fn(),\n debug: vi.fn(),\n subscribers: [],\n };\n\n dummyConnectedDevice = {\n deviceModel: {\n id: DeviceModelId.NANO_X,\n },\n } as unknown as TransportConnectedDevice;\n\n devicePinger = new DevicePinger(\n mockedLoggerModuleFactory,\n dummyConnectedDevice,\n mockSessionEventDispatcher,\n dummySendCommandFunction,\n );\n });\n\n afterEach(() => {\n devicePinger.unsubscribe();\n vi.restoreAllMocks();\n });\n\n it(\"should call sendCommandFunction and dispatch COMMAND_SUCCEEDED event on successful ping for non-NANO_S\", async () => {\n // given\n const dummyResult = {\n status: \"success\",\n data: { foo: \"bar\" },\n };\n dummySendCommandFunction.mockResolvedValue(dummyResult);\n\n // when\n const result = await devicePinger.ping();\n\n // then\n expect(dummySendCommandFunction).toHaveBeenCalledTimes(1);\n const commandArg = dummySendCommandFunction.mock\n .calls[0]![0] as GetAppAndVersionCommand;\n expect(commandArg).toBeInstanceOf(GetAppAndVersionCommand);\n expect(mockSessionEventDispatcher.dispatch).toHaveBeenCalledWith({\n eventName: SessionEvents.COMMAND_SUCCEEDED,\n eventData: dummyResult,\n });\n expect(result).toEqual(dummyResult);\n });\n\n it(\"should log error and throw error on ping failure\", async () => {\n // given\n const dummyError = new Error(\"ping failed\");\n dummySendCommandFunction.mockRejectedValue(dummyError);\n\n // then\n await expect(devicePinger.ping()).rejects.toThrow(\"ping failed\");\n expect(dummySendCommandFunction).toHaveBeenCalledTimes(1);\n });\n\n it(\"should dispatch DEVICE_STATE_UPDATE_LOCKED and return null on timeout for NANO_S\", async () => {\n // given\n dummyConnectedDevice.deviceModel.id = DeviceModelId.NANO_S;\n devicePinger.unsubscribe();\n devicePinger = new DevicePinger(\n mockedLoggerModuleFactory,\n dummyConnectedDevice,\n mockSessionEventDispatcher,\n dummySendCommandFunction,\n );\n const neverResolvingPromise = new Promise(() => {});\n dummySendCommandFunction.mockReturnValueOnce(neverResolvingPromise);\n vi.useFakeTimers();\n\n // when\n const pingPromise = devicePinger.ping();\n vi.advanceTimersByTime(DEVICE_SESSION_REFRESHER_POLLING_INTERVAL * 4);\n\n const result = await pingPromise;\n\n // then\n expect(result).toBeNull();\n expect(mockSessionEventDispatcher.dispatch).toHaveBeenCalledWith({\n eventName: SessionEvents.DEVICE_STATE_UPDATE_LOCKED,\n });\n expect(dummySendCommandFunction).toHaveBeenCalledTimes(1);\n\n vi.useRealTimers();\n });\n\n it(\"should call ping on REFRESH_NEEDED event\", async () => {\n // given\n const dummyResult = {\n status: \"success\",\n data: { foo: \"bar\" },\n };\n dummySendCommandFunction.mockResolvedValue(dummyResult);\n\n // when\n eventSubject.next({\n eventName: SessionEvents.REFRESH_NEEDED,\n eventData: undefined,\n });\n await Promise.resolve();\n\n // then\n expect(dummySendCommandFunction).toHaveBeenCalled();\n expect(mockSessionEventDispatcher.dispatch).toHaveBeenCalledWith({\n eventName: SessionEvents.COMMAND_SUCCEEDED,\n eventData: dummyResult,\n });\n });\n\n it(\"should not process events after unsubscribe is called\", async () => {\n // given\n devicePinger.unsubscribe();\n dummySendCommandFunction.mockClear();\n\n // when\n eventSubject.next({\n eventName: SessionEvents.REFRESH_NEEDED,\n eventData: undefined,\n });\n await Promise.resolve();\n\n // then\n expect(dummySendCommandFunction).not.toHaveBeenCalled();\n });\n});\n"],
5
+ "mappings": "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",
6
+ "names": ["import_rxjs", "import_vitest", "import_DeviceModel", "import_api", "import_DeviceSessionRefresherConst", "import_DeviceSessionEventDispatcher", "import_DevicePinger", "dummySendCommandFunction", "mockLogger", "mockedLoggerModuleFactory", "eventSubject", "mockSessionEventDispatcher", "dummyConnectedDevice", "devicePinger", "dummyResult", "result", "commandArg", "dummyError", "neverResolvingPromise", "pingPromise"]
7
+ }
@@ -1,2 +1,2 @@
1
- "use strict";var a=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var C=Object.prototype.hasOwnProperty;var _=(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 f(e))!C.call(n,i)&&i!==t&&a(n,i,{get:()=>e[i],enumerable:!(s=g(e,i))||s.enumerable});return n};var A=n=>y(a({},"__esModule",{value:!0}),n);var R={};_(R,{DeviceSession:()=>E});module.exports=A(R);var d=require("purify-ts"),p=require("rxjs"),u=require("uuid"),v=require("../../../api/command/utils/CommandUtils"),r=require("../../../api/device/DeviceStatus"),S=require("../../../api/device-session/DeviceSessionState"),l=require("../../../api/Error"),h=require("../../device-session/data/DeviceSessionRefresherConst"),m=require("./DeviceSessionRefresher");class E{_id;_connectedDevice;_deviceState;_refresher;_managerApiService;_secureChannelService;constructor({connectedDevice:e,id:t=(0,u.v4)()},s,i,o){this._id=t,this._connectedDevice=e,this._deviceState=new p.BehaviorSubject({sessionStateType:S.DeviceSessionStateType.Connected,deviceStatus:r.DeviceStatus.CONNECTED,deviceModelId:this._connectedDevice.deviceModel.id}),this._refresher=new m.DeviceSessionRefresher({refreshInterval:h.DEVICE_SESSION_REFRESH_INTERVAL,deviceStatus:r.DeviceStatus.CONNECTED,deviceModelId:this._connectedDevice.deviceModel.id,sendApduFn:c=>this.sendApdu(c,{isPolling:!0,triggersDisconnection:!1}),updateStateFn:c=>{const D=this._deviceState.getValue();this.setDeviceSessionState(c(D))}},s("device-session-refresher")),this._managerApiService=i,this._secureChannelService=o}get id(){return this._id}get connectedDevice(){return this._connectedDevice}get state(){return this._deviceState.asObservable()}setDeviceSessionState(e){this._deviceState.next(e)}updateDeviceStatus(e){const t=this._deviceState.getValue();this._refresher.setDeviceStatus(e),this._deviceState.next({...t,deviceStatus:e})}async sendApdu(e,t={isPolling:!1,triggersDisconnection:!1}){return t.isPolling||(this.toggleRefresher(!1),await this.waitUntilReady()),this._deviceState.getValue().deviceStatus===r.DeviceStatus.BUSY?(0,d.Left)(new l.DeviceBusyError):(this.updateDeviceStatus(r.DeviceStatus.BUSY),(await this._connectedDevice.sendApdu(e,t.triggersDisconnection)).ifRight(o=>{v.CommandUtils.isLockedDeviceResponse(o)?this.updateDeviceStatus(r.DeviceStatus.LOCKED):this.updateDeviceStatus(r.DeviceStatus.CONNECTED),t.isPolling||this.toggleRefresher(!0)}).ifLeft(()=>{this.updateDeviceStatus(r.DeviceStatus.CONNECTED),t.isPolling||this.toggleRefresher(!0)}))}async waitUntilReady(){let e;await new Promise(t=>{e=this._deviceState.subscribe(s=>{s.deviceStatus===r.DeviceStatus.CONNECTED&&(e?.unsubscribe(),t())})})}async sendCommand(e){const t=e.getApdu();return(await this.sendApdu(t.getRawApdu(),{isPolling:!1,triggersDisconnection:e.triggersDisconnection??!1})).caseOf({Left:i=>{throw i},Right:i=>e.parseResponse(i,this._connectedDevice.deviceModel.id)})}executeDeviceAction(e){const{observable:t,cancel:s}=e._execute({sendApdu:async i=>this.sendApdu(i),sendCommand:async i=>this.sendCommand(i),getDeviceSessionState:()=>this._deviceState.getValue(),getDeviceSessionStateObservable:()=>this.state,setDeviceSessionState:i=>(this.setDeviceSessionState(i),this._deviceState.getValue()),getManagerApiService:()=>this._managerApiService,getSecureChannelService:()=>this._secureChannelService});return{observable:t,cancel:s}}close(){this.updateDeviceStatus(r.DeviceStatus.NOT_CONNECTED),this._deviceState.complete(),this._refresher.stop()}toggleRefresher(e){e?this._refresher.start():this._refresher.stop()}}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, Left } from \"purify-ts\";\nimport { BehaviorSubject, type Subscription } 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 { DeviceBusyError, 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_REFRESH_INTERVAL } from \"@internal/device-session/data/DeviceSessionRefresherConst\";\nimport { type ManagerApiService } from \"@internal/manager-api/service/ManagerApiService\";\nimport { type SecureChannelService } from \"@internal/secure-channel/service/SecureChannelService\";\n\nimport { DeviceSessionRefresher } from \"./DeviceSessionRefresher\";\n\nexport type SessionConstructorArgs = {\n connectedDevice: TransportConnectedDevice;\n id?: DeviceSessionId;\n};\n\ntype SendApduOptions = {\n isPolling?: boolean;\n triggersDisconnection?: boolean;\n};\n\n/**\n * Represents a session with a device.\n */\nexport class DeviceSession {\n private readonly _id: DeviceSessionId;\n private readonly _connectedDevice: TransportConnectedDevice;\n private readonly _deviceState: BehaviorSubject<DeviceSessionState>;\n private readonly _refresher: DeviceSessionRefresher;\n private readonly _managerApiService: ManagerApiService;\n private readonly _secureChannelService: SecureChannelService;\n\n constructor(\n { connectedDevice, id = uuidv4() }: SessionConstructorArgs,\n loggerModuleFactory: (tag: string) => LoggerPublisherService,\n managerApiService: ManagerApiService,\n secureChannelService: SecureChannelService,\n ) {\n this._id = id;\n this._connectedDevice = connectedDevice;\n this._deviceState = new BehaviorSubject<DeviceSessionState>({\n sessionStateType: DeviceSessionStateType.Connected,\n deviceStatus: DeviceStatus.CONNECTED,\n deviceModelId: this._connectedDevice.deviceModel.id,\n });\n this._refresher = new DeviceSessionRefresher(\n {\n refreshInterval: DEVICE_SESSION_REFRESH_INTERVAL,\n deviceStatus: DeviceStatus.CONNECTED,\n deviceModelId: this._connectedDevice.deviceModel.id,\n sendApduFn: (rawApdu: Uint8Array) =>\n this.sendApdu(rawApdu, {\n isPolling: true,\n triggersDisconnection: false,\n }),\n updateStateFn: (callback) => {\n const state = this._deviceState.getValue();\n this.setDeviceSessionState(callback(state));\n },\n },\n loggerModuleFactory(\"device-session-refresher\"),\n );\n this._managerApiService = managerApiService;\n this._secureChannelService = secureChannelService;\n }\n\n public get id() {\n return this._id;\n }\n\n public get connectedDevice() {\n return this._connectedDevice;\n }\n\n public get state() {\n return this._deviceState.asObservable();\n }\n\n public setDeviceSessionState(state: DeviceSessionState) {\n this._deviceState.next(state);\n }\n\n private updateDeviceStatus(deviceStatus: DeviceStatus) {\n const sessionState = this._deviceState.getValue();\n this._refresher.setDeviceStatus(deviceStatus);\n this._deviceState.next({\n ...sessionState,\n deviceStatus,\n });\n }\n\n async sendApdu(\n rawApdu: Uint8Array,\n options: SendApduOptions = {\n isPolling: false,\n triggersDisconnection: false,\n },\n ): Promise<Either<DmkError, ApduResponse>> {\n if (!options.isPolling) {\n this.toggleRefresher(false);\n await this.waitUntilReady();\n }\n\n const sessionState = this._deviceState.getValue();\n if (sessionState.deviceStatus === DeviceStatus.BUSY) {\n return Left(new DeviceBusyError());\n }\n\n this.updateDeviceStatus(DeviceStatus.BUSY);\n\n const errorOrResponse = await this._connectedDevice.sendApdu(\n rawApdu,\n options.triggersDisconnection,\n );\n\n return errorOrResponse\n .ifRight((response: ApduResponse) => {\n if (CommandUtils.isLockedDeviceResponse(response)) {\n this.updateDeviceStatus(DeviceStatus.LOCKED);\n } else {\n this.updateDeviceStatus(DeviceStatus.CONNECTED);\n }\n\n if (!options.isPolling) {\n this.toggleRefresher(true);\n }\n })\n .ifLeft(() => {\n this.updateDeviceStatus(DeviceStatus.CONNECTED);\n\n if (!options.isPolling) {\n this.toggleRefresher(true);\n }\n });\n }\n\n async waitUntilReady() {\n let deviceStateSub: Subscription;\n\n await new Promise<void>((resolve) => {\n deviceStateSub = this._deviceState.subscribe((state) => {\n if (state.deviceStatus === DeviceStatus.CONNECTED) {\n deviceStateSub?.unsubscribe();\n resolve();\n }\n });\n });\n }\n\n async sendCommand<Response, Args, ErrorStatusCodes>(\n command: Command<Response, Args, ErrorStatusCodes>,\n ): Promise<CommandResult<Response, ErrorStatusCodes>> {\n const apdu = command.getApdu();\n const response = await this.sendApdu(apdu.getRawApdu(), {\n isPolling: false,\n triggersDisconnection: command.triggersDisconnection ?? false,\n });\n\n return response.caseOf({\n Left: (err) => {\n throw err;\n },\n Right: (r) =>\n command.parseResponse(r, this._connectedDevice.deviceModel.id),\n });\n }\n\n executeDeviceAction<\n Output,\n Input,\n Error extends DmkError,\n IntermediateValue extends DeviceActionIntermediateValue,\n >(\n deviceAction: DeviceAction<Output, Input, Error, IntermediateValue>,\n ): ExecuteDeviceActionReturnType<Output, Error, IntermediateValue> {\n const { observable, cancel } = deviceAction._execute({\n sendApdu: async (apdu: Uint8Array) => this.sendApdu(apdu),\n sendCommand: async <Response, ErrorStatusCodes, Args>(\n command: Command<Response, ErrorStatusCodes, Args>,\n ) => this.sendCommand(command),\n getDeviceSessionState: () => this._deviceState.getValue(),\n getDeviceSessionStateObservable: () => this.state,\n setDeviceSessionState: (state: DeviceSessionState) => {\n this.setDeviceSessionState(state);\n return this._deviceState.getValue();\n },\n getManagerApiService: () => this._managerApiService,\n getSecureChannelService: () => this._secureChannelService,\n });\n\n return {\n observable,\n cancel,\n };\n }\n\n close() {\n this.updateDeviceStatus(DeviceStatus.NOT_CONNECTED);\n this._deviceState.complete();\n this._refresher.stop();\n }\n\n toggleRefresher(enabled: boolean) {\n if (enabled) {\n this._refresher.start();\n } else {\n this._refresher.stop();\n }\n }\n}\n"],
5
- "mappings": "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",
6
- "names": ["DeviceSession_exports", "__export", "DeviceSession", "__toCommonJS", "import_purify_ts", "import_rxjs", "import_uuid", "import_CommandUtils", "import_DeviceStatus", "import_DeviceSessionState", "import_Error", "import_DeviceSessionRefresherConst", "import_DeviceSessionRefresher", "connectedDevice", "id", "uuidv4", "loggerModuleFactory", "managerApiService", "secureChannelService", "rawApdu", "callback", "state", "deviceStatus", "sessionState", "options", "response", "deviceStateSub", "resolve", "command", "apdu", "err", "r", "deviceAction", "observable", "cancel", "enabled"]
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
+ "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 t=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var g=(r,e)=>{for(var i in e)t(r,i,{get:e[i],enumerable:!0})},v=(r,e,i,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of S(e))!p.call(r,o)&&o!==i&&t(r,o,{get:()=>e[o],enumerable:!(n=a(e,o))||n.enumerable});return r};var m=r=>v(t({},"__esModule",{value:!0}),r);var l={};g(l,{deviceSessionStubBuilder:()=>u});module.exports=m(l);var c=require("../../../api/transport/model/TransportConnectedDevice.stub"),s=require("../../device-session/model/DeviceSession");const u=(r={},e,i,n)=>new s.DeviceSession({connectedDevice:(0,c.connectedDeviceStubBuilder)(),id:"fakeSessionId",...r},e,i,n);0&&(module.exports={deviceSessionStubBuilder});
1
+ "use strict";var s=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var v=(r,e)=>{for(var o in e)s(r,o,{get:e[o],enumerable:!0})},g=(r,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of p(e))!a.call(r,i)&&i!==o&&s(r,i,{get:()=>e[i],enumerable:!(n=S(e,i))||n.enumerable});return r};var m=r=>g(s({},"__esModule",{value:!0}),r);var f={};v(f,{deviceSessionStubBuilder:()=>u});module.exports=m(f);var t=require("../../../api/transport/model/TransportConnectedDevice.stub"),c=require("../../device-session/model/DeviceSession");const u=(r={},e,o,n,i)=>new c.DeviceSession({connectedDevice:(0,t.connectedDeviceStubBuilder)(),id:"fakeSessionId",...r},e,o,n,i);0&&(module.exports={deviceSessionStubBuilder});
2
2
  //# sourceMappingURL=DeviceSession.stub.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/internal/device-session/model/DeviceSession.stub.ts"],
4
- "sourcesContent": ["import { type LoggerPublisherService } from \"@api/logger-publisher/service/LoggerPublisherService\";\nimport { connectedDeviceStubBuilder } from \"@api/transport/model/TransportConnectedDevice.stub\";\nimport {\n DeviceSession,\n type SessionConstructorArgs,\n} from \"@internal/device-session/model/DeviceSession\";\nimport type { ManagerApiService } from \"@internal/manager-api/service/ManagerApiService\";\nimport { type SecureChannelService } from \"@internal/secure-channel/service/SecureChannelService\";\n\nexport const deviceSessionStubBuilder = (\n props: Partial<SessionConstructorArgs> = {},\n loggerFactory: (tag: string) => LoggerPublisherService,\n managerApi: ManagerApiService,\n secureChannel: SecureChannelService,\n) =>\n new DeviceSession(\n {\n connectedDevice: connectedDeviceStubBuilder(),\n id: \"fakeSessionId\",\n ...props,\n },\n loggerFactory,\n managerApi,\n secureChannel,\n );\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,8BAAAE,IAAA,eAAAC,EAAAH,GACA,IAAAI,EAA2C,8DAC3CC,EAGO,wDAIA,MAAMH,EAA2B,CACtCI,EAAyC,CAAC,EAC1CC,EACAC,EACAC,IAEA,IAAI,gBACF,CACE,mBAAiB,8BAA2B,EAC5C,GAAI,gBACJ,GAAGH,CACL,EACAC,EACAC,EACAC,CACF",
6
- "names": ["DeviceSession_stub_exports", "__export", "deviceSessionStubBuilder", "__toCommonJS", "import_TransportConnectedDevice", "import_DeviceSession", "props", "loggerFactory", "managerApi", "secureChannel"]
4
+ "sourcesContent": ["import { type LoggerPublisherService } from \"@api/logger-publisher/service/LoggerPublisherService\";\nimport { connectedDeviceStubBuilder } from \"@api/transport/model/TransportConnectedDevice.stub\";\nimport {\n DeviceSession,\n type DeviceSessionRefresherOptions,\n type SessionConstructorArgs,\n} from \"@internal/device-session/model/DeviceSession\";\nimport type { ManagerApiService } from \"@internal/manager-api/service/ManagerApiService\";\nimport { type SecureChannelService } from \"@internal/secure-channel/service/SecureChannelService\";\n\nexport const deviceSessionStubBuilder = (\n props: Partial<SessionConstructorArgs> = {},\n loggerFactory: (tag: string) => LoggerPublisherService,\n managerApi: ManagerApiService,\n secureChannel: SecureChannelService,\n deviceSessionRefresherOptions: DeviceSessionRefresherOptions,\n) =>\n new DeviceSession(\n {\n connectedDevice: connectedDeviceStubBuilder(),\n id: \"fakeSessionId\",\n ...props,\n },\n loggerFactory,\n managerApi,\n secureChannel,\n deviceSessionRefresherOptions,\n );\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,8BAAAE,IAAA,eAAAC,EAAAH,GACA,IAAAI,EAA2C,8DAC3CC,EAIO,wDAIA,MAAMH,EAA2B,CACtCI,EAAyC,CAAC,EAC1CC,EACAC,EACAC,EACAC,IAEA,IAAI,gBACF,CACE,mBAAiB,8BAA2B,EAC5C,GAAI,gBACJ,GAAGJ,CACL,EACAC,EACAC,EACAC,EACAC,CACF",
6
+ "names": ["DeviceSession_stub_exports", "__export", "deviceSessionStubBuilder", "__toCommonJS", "import_TransportConnectedDevice", "import_DeviceSession", "props", "loggerFactory", "managerApi", "secureChannel", "deviceSessionRefresherOptions"]
7
7
  }
@@ -0,0 +1,2 @@
1
+ "use strict";var _=Object.defineProperty;var C=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var A=Object.prototype.hasOwnProperty;var o=(E,e)=>{for(var D in e)_(E,D,{get:e[D],enumerable:!0})},d=(E,e,D,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of S(e))!A.call(E,t)&&t!==D&&_(E,t,{get:()=>e[t],enumerable:!(s=C(e,t))||s.enumerable});return E};var a=E=>d(_({},"__esModule",{value:!0}),E);var r={};o(r,{DeviceSessionEventDispatcher:()=>v,SessionEvents:()=>i});module.exports=a(r);var T=require("rxjs"),i=(n=>(n.NEW_STATE="NEW_STATE",n.REFRESH_NEEDED="REFRESH_NEEDED",n.COMMAND_SUCCEEDED="COMMAND_SUCCEEDED",n.DEVICE_STATE_UPDATE_BUSY="DEVICE_STATE_UPDATE_BUSY",n.DEVICE_STATE_UPDATE_LOCKED="DEVICE_STATE_UPDATE_LOCKED",n.DEVICE_STATE_UPDATE_CONNECTED="DEVICE_STATE_UPDATE_CONNECTED",n))(i||{});class v{_eventEmitter=new T.Subject;listen(){return this._eventEmitter.asObservable()}dispatch(e){this._eventEmitter.next(e)}}0&&(module.exports={DeviceSessionEventDispatcher,SessionEvents});
2
+ //# sourceMappingURL=DeviceSessionEventDispatcher.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../src/internal/device-session/model/DeviceSessionEventDispatcher.ts"],
4
+ "sourcesContent": ["import { type Observable, Subject } from \"rxjs\";\n\nimport { type GetAppAndVersionResponse } from \"@api/index\";\nimport { type CommandResult } from \"@api/types\";\n\nexport enum SessionEvents {\n NEW_STATE = \"NEW_STATE\",\n REFRESH_NEEDED = \"REFRESH_NEEDED\",\n COMMAND_SUCCEEDED = \"COMMAND_SUCCEEDED\",\n DEVICE_STATE_UPDATE_BUSY = \"DEVICE_STATE_UPDATE_BUSY\",\n DEVICE_STATE_UPDATE_LOCKED = \"DEVICE_STATE_UPDATE_LOCKED\",\n DEVICE_STATE_UPDATE_CONNECTED = \"DEVICE_STATE_UPDATE_CONNECTED\",\n}\n\ninterface SessionEventPayloads {\n [SessionEvents.NEW_STATE]: undefined;\n [SessionEvents.REFRESH_NEEDED]: undefined;\n [SessionEvents.DEVICE_STATE_UPDATE_BUSY]: undefined;\n [SessionEvents.DEVICE_STATE_UPDATE_LOCKED]: undefined;\n [SessionEvents.DEVICE_STATE_UPDATE_CONNECTED]: undefined;\n [SessionEvents.COMMAND_SUCCEEDED]: CommandResult<GetAppAndVersionResponse>;\n}\n\nexport type NewEvent = {\n [K in SessionEvents]: SessionEventPayloads[K] extends undefined\n ? { eventName: K; eventData?: undefined }\n : { eventName: K; eventData: SessionEventPayloads[K] };\n}[SessionEvents];\n\nexport class DeviceSessionEventDispatcher {\n private _eventEmitter: Subject<NewEvent> = new Subject();\n\n public listen(): Observable<NewEvent> {\n return this._eventEmitter.asObservable();\n }\n\n public dispatch(event: NewEvent): void {\n this._eventEmitter.next(event);\n }\n}\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,kCAAAE,EAAA,kBAAAC,IAAA,eAAAC,EAAAJ,GAAA,IAAAK,EAAyC,gBAK7BF,OACVA,EAAA,UAAY,YACZA,EAAA,eAAiB,iBACjBA,EAAA,kBAAoB,oBACpBA,EAAA,yBAA2B,2BAC3BA,EAAA,2BAA6B,6BAC7BA,EAAA,8BAAgC,gCANtBA,OAAA,IAwBL,MAAMD,CAA6B,CAChC,cAAmC,IAAI,UAExC,QAA+B,CACpC,OAAO,KAAK,cAAc,aAAa,CACzC,CAEO,SAASI,EAAuB,CACrC,KAAK,cAAc,KAAKA,CAAK,CAC/B,CACF",
6
+ "names": ["DeviceSessionEventDispatcher_exports", "__export", "DeviceSessionEventDispatcher", "SessionEvents", "__toCommonJS", "import_rxjs", "event"]
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";var e=require("vitest"),i=require("./DeviceSessionEventDispatcher");(0,e.describe)("DeviceSessionEventDispatcher",()=>{let a;beforeEach(()=>{a=new i.DeviceSessionEventDispatcher}),(0,e.it)("should dispatch and receive an event without payload",()=>new Promise((o,c)=>{const t={eventName:i.SessionEvents.REFRESH_NEEDED,eventData:void 0},n=a.listen().subscribe(r=>{try{(0,e.expect)(r).toEqual(t),o(void 0)}catch(s){c(s)}finally{n.unsubscribe()}});a.dispatch(t)})),(0,e.it)("should dispatch and receive a COMMAND_SUCCEEDED event with payload",()=>new Promise((o,c)=>{const t={status:"success",data:{someField:"dummyValue"}},n={eventName:i.SessionEvents.COMMAND_SUCCEEDED,eventData:t},r=a.listen().subscribe(s=>{if(s.eventName===i.SessionEvents.COMMAND_SUCCEEDED)try{(0,e.expect)(s).toEqual(n),o(void 0)}catch(E){c(E)}finally{r.unsubscribe()}});a.dispatch(n)})),(0,e.it)("should dispatch multiple events",()=>new Promise((o,c)=>{const t=[{eventName:i.SessionEvents.DEVICE_STATE_UPDATE_BUSY,eventData:void 0},{eventName:i.SessionEvents.DEVICE_STATE_UPDATE_CONNECTED,eventData:void 0}],n=[],r=a.listen().subscribe(s=>{if(n.push(s),n.length===t.length)try{(0,e.expect)(n).toEqual(t),o(void 0)}catch(E){c(E)}finally{r.unsubscribe()}});t.forEach(s=>a.dispatch(s))}))});
2
+ //# sourceMappingURL=DeviceSessionEventDispatcher.test.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../src/internal/device-session/model/DeviceSessionEventDispatcher.test.ts"],
4
+ "sourcesContent": ["import { describe, expect, it } from \"vitest\";\n\nimport { type GetAppAndVersionResponse } from \"@api/index\";\nimport type { CommandResult } from \"@api/types\";\n\nimport {\n DeviceSessionEventDispatcher,\n type NewEvent,\n SessionEvents,\n} from \"./DeviceSessionEventDispatcher\";\n\ndescribe(\"DeviceSessionEventDispatcher\", () => {\n let dispatcher: DeviceSessionEventDispatcher;\n\n beforeEach(() => {\n dispatcher = new DeviceSessionEventDispatcher();\n });\n\n it(\"should dispatch and receive an event without payload\", () =>\n new Promise((resolve, reject) => {\n // given\n const expectedEvent: NewEvent = {\n eventName: SessionEvents.REFRESH_NEEDED,\n eventData: undefined,\n };\n\n // when\n const subscription = dispatcher.listen().subscribe((event) => {\n // then\n try {\n expect(event).toEqual(expectedEvent);\n resolve(undefined);\n } catch (error) {\n reject(error);\n } finally {\n subscription.unsubscribe();\n }\n });\n\n dispatcher.dispatch(expectedEvent);\n }));\n\n it(\"should dispatch and receive a COMMAND_SUCCEEDED event with payload\", () =>\n new Promise((resolve, reject) => {\n // given\n const dummyCommandResult = {\n status: \"success\",\n data: { someField: \"dummyValue\" },\n } as unknown as CommandResult<GetAppAndVersionResponse>;\n\n const expectedEvent: NewEvent = {\n eventName: SessionEvents.COMMAND_SUCCEEDED,\n eventData: dummyCommandResult,\n };\n\n // when\n const subscription = dispatcher.listen().subscribe((event) => {\n if (event.eventName === SessionEvents.COMMAND_SUCCEEDED) {\n // then\n try {\n expect(event).toEqual(expectedEvent);\n resolve(undefined);\n } catch (error) {\n reject(error);\n } finally {\n subscription.unsubscribe();\n }\n }\n });\n\n dispatcher.dispatch(expectedEvent);\n }));\n\n it(\"should dispatch multiple events\", () =>\n new Promise((resolve, reject) => {\n // given\n const events: NewEvent[] = [\n {\n eventName: SessionEvents.DEVICE_STATE_UPDATE_BUSY,\n eventData: undefined,\n },\n {\n eventName: SessionEvents.DEVICE_STATE_UPDATE_CONNECTED,\n eventData: undefined,\n },\n ];\n const received: NewEvent[] = [];\n\n // when\n const subscription = dispatcher.listen().subscribe((event) => {\n received.push(event);\n\n // then\n if (received.length === events.length) {\n try {\n expect(received).toEqual(events);\n resolve(undefined);\n } catch (error) {\n reject(error);\n } finally {\n subscription.unsubscribe();\n }\n }\n });\n\n events.forEach((event) => dispatcher.dispatch(event));\n }));\n});\n"],
5
+ "mappings": "aAAA,IAAAA,EAAqC,kBAKrCC,EAIO,6CAEP,YAAS,+BAAgC,IAAM,CAC7C,IAAIC,EAEJ,WAAW,IAAM,CACfA,EAAa,IAAI,8BACnB,CAAC,KAED,MAAG,uDAAwD,IACzD,IAAI,QAAQ,CAACC,EAASC,IAAW,CAE/B,MAAMC,EAA0B,CAC9B,UAAW,gBAAc,eACzB,UAAW,MACb,EAGMC,EAAeJ,EAAW,OAAO,EAAE,UAAWK,GAAU,CAE5D,GAAI,IACF,UAAOA,CAAK,EAAE,QAAQF,CAAa,EACnCF,EAAQ,MAAS,CACnB,OAASK,EAAO,CACdJ,EAAOI,CAAK,CACd,QAAE,CACAF,EAAa,YAAY,CAC3B,CACF,CAAC,EAEDJ,EAAW,SAASG,CAAa,CACnC,CAAC,CAAC,KAEJ,MAAG,qEAAsE,IACvE,IAAI,QAAQ,CAACF,EAASC,IAAW,CAE/B,MAAMK,EAAqB,CACzB,OAAQ,UACR,KAAM,CAAE,UAAW,YAAa,CAClC,EAEMJ,EAA0B,CAC9B,UAAW,gBAAc,kBACzB,UAAWI,CACb,EAGMH,EAAeJ,EAAW,OAAO,EAAE,UAAWK,GAAU,CAC5D,GAAIA,EAAM,YAAc,gBAAc,kBAEpC,GAAI,IACF,UAAOA,CAAK,EAAE,QAAQF,CAAa,EACnCF,EAAQ,MAAS,CACnB,OAASK,EAAO,CACdJ,EAAOI,CAAK,CACd,QAAE,CACAF,EAAa,YAAY,CAC3B,CAEJ,CAAC,EAEDJ,EAAW,SAASG,CAAa,CACnC,CAAC,CAAC,KAEJ,MAAG,kCAAmC,IACpC,IAAI,QAAQ,CAACF,EAASC,IAAW,CAE/B,MAAMM,EAAqB,CACzB,CACE,UAAW,gBAAc,yBACzB,UAAW,MACb,EACA,CACE,UAAW,gBAAc,8BACzB,UAAW,MACb,CACF,EACMC,EAAuB,CAAC,EAGxBL,EAAeJ,EAAW,OAAO,EAAE,UAAWK,GAAU,CAI5D,GAHAI,EAAS,KAAKJ,CAAK,EAGfI,EAAS,SAAWD,EAAO,OAC7B,GAAI,IACF,UAAOC,CAAQ,EAAE,QAAQD,CAAM,EAC/BP,EAAQ,MAAS,CACnB,OAASK,EAAO,CACdJ,EAAOI,CAAK,CACd,QAAE,CACAF,EAAa,YAAY,CAC3B,CAEJ,CAAC,EAEDI,EAAO,QAASH,GAAUL,EAAW,SAASK,CAAK,CAAC,CACtD,CAAC,CAAC,CACN,CAAC",
6
+ "names": ["import_vitest", "import_DeviceSessionEventDispatcher", "dispatcher", "resolve", "reject", "expectedEvent", "subscription", "event", "error", "dummyCommandResult", "events", "received"]
7
+ }
@@ -1,2 +1,2 @@
1
- "use strict";var u=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var A=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var f=(n,e)=>{for(var t in e)u(n,t,{get:e[t],enumerable:!0})},O=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of A(e))!g.call(n,s)&&s!==t&&u(n,s,{get:()=>e[s],enumerable:!(i=l(e,s))||i.enumerable});return n};var y=n=>O(u({},"__esModule",{value:!0}),n),c=(n,e,t,i)=>{for(var s=i>1?void 0:i?l(e,t):e,a=n.length-1,o;a>=0;a--)(o=n[a])&&(s=(i?o(e,t,s):o(s))||s);return i&&s&&u(e,t,s),s};var D={};f(D,{DeviceSessionRefresher:()=>d});module.exports=y(D);var m=require("inversify"),r=require("rxjs"),h=require("../../../api/command/model/CommandResult"),v=require("../../../api/command/os/GetAppAndVersionCommand"),_=require("../../../api/command/os/GetOsVersionCommand"),b=require("../../../api/device/DeviceModel"),p=require("../../../api/device/DeviceStatus"),S=require("../../../api/device-session/DeviceSessionState");let d=class{_logger;_getAppAndVersionCommand=new v.GetAppAndVersionCommand;_getOsVersionCommand=new _.GetOsVersionCommand;_deviceStatus;_subscription;_refreshInterval;_deviceModelId;_sendApduFn;_updateStateFn;constructor({refreshInterval:e,deviceStatus:t,sendApduFn:i,updateStateFn:s,deviceModelId:a},o){this._deviceStatus=t,this._logger=o,this._sendApduFn=i,this._updateStateFn=s,this._refreshInterval=e,this._deviceModelId=a,this.start()}start(){if(this._subscription&&!this._subscription.closed){this._logger.warn("Refresher already started");return}const e=this._deviceModelId===b.DeviceModelId.NANO_S?this._getNanoSRefreshObservable(this._refreshInterval*2):this._getDefaultRefreshObservable((0,r.interval)(this._refreshInterval));this._subscription=e.subscribe(t=>{!t||!(0,h.isSuccessCommandResult)(t)||this._updateStateFn(i=>({...i,sessionStateType:S.DeviceSessionStateType.ReadyWithoutSecureChannel,deviceStatus:this._deviceStatus,currentApp:t.data,installedApps:"installedApps"in i?i.installedApps:[]}))})}_getDefaultRefreshObservable(e=(0,r.from)([0])){return e.pipe((0,r.filter)(()=>![p.DeviceStatus.BUSY,p.DeviceStatus.NOT_CONNECTED].includes(this._deviceStatus)),(0,r.switchMap)(async()=>{const t=this._getAppAndVersionCommand.getApdu().getRawApdu();return await this._sendApduFn(t)}),(0,r.map)(t=>t.caseOf({Left:i=>(this._logger.error("Error in sending APDU when polling",{data:{error:i}}),null),Right:i=>{try{return this._getAppAndVersionCommand.parseResponse(i)}catch(s){return this._logger.error("Error in parsing APDU response",{data:{error:s}}),null}}})),(0,r.filter)(t=>t!==null))}_getNanoSRefreshObservable(e){const t=this._getDefaultRefreshObservable().pipe((0,r.switchMap)(async s=>{const a=this._getOsVersionCommand.getApdu().getRawApdu();return await this._sendApduFn(a),s})),i=(0,r.of)(null).pipe((0,r.delay)(e),(0,r.map)(s=>{this._logger.warn("Nanos refresh timeout, setting device status to LOCKED"),this._updateStateFn(a=>({...a,deviceStatus:p.DeviceStatus.LOCKED}))}));return(0,r.interval)(e+100).pipe((0,r.switchMap)(()=>(0,r.race)(t,i)))}setDeviceStatus(e){e===p.DeviceStatus.NOT_CONNECTED&&this.stop(),this._deviceStatus=e}stop(){!this._subscription||this._subscription.closed||(this._subscription.unsubscribe(),this._subscription=void 0)}};d=c([(0,m.injectable)()],d);0&&(module.exports={DeviceSessionRefresher});
1
+ "use strict";var n=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var v=Object.prototype.hasOwnProperty;var a=(t,e)=>{for(var s in e)n(t,s,{get:e[s],enumerable:!0})},d=(t,e,s,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of f(e))!v.call(t,i)&&i!==s&&n(t,i,{get:()=>e[i],enumerable:!(r=l(e,i))||r.enumerable});return t};var u=t=>d(n({},"__esModule",{value:!0}),t);var _={};a(_,{DeviceSessionRefresher:()=>g});module.exports=u(_);var c=require("rxjs"),h=require("../../../api/device/DeviceModel"),o=require("../../device-session/data/DeviceSessionRefresherConst"),p=require("../../device-session/model/DeviceSessionEventDispatcher");class g{constructor(e,s,r,i){this._sessionEventDispatcher=r;this._refresherOptions=s,this._logger=e("device-session-refresher"),this._connectedDeviceID=i.deviceModel.id}_refresherSubscription;_refresherOptions;_logger;_connectedDeviceID;startRefresher(){if(this._refresherOptions.isRefresherDisabled)return;const e=this.getValidPollingInterval(this._refresherOptions,this._logger)*2;this._refresherSubscription=(0,c.timer)(0,e).subscribe(()=>{this._sessionEventDispatcher.dispatch({eventName:p.SessionEvents.REFRESH_NEEDED})})}stopRefresher(){this._refresherSubscription&&(this._refresherSubscription.unsubscribe(),this._refresherSubscription=void 0,this._logger.info("Refresher stopped."))}restartRefresher(){this.stopRefresher(),this.startRefresher(),this._logger.info("Refresher restarted.")}destroy(){this.stopRefresher()}getValidPollingInterval=(e,s)=>{const{pollingInterval:r}=e;switch(this._connectedDeviceID){case h.DeviceModelId.NANO_S:{const i=o.DEVICE_SESSION_REFRESHER_POLLING_INTERVAL*2;return r!==void 0&&r<i?(s.warn(`Polling interval of ${r} is too low, setting to minimum as ${i}`),i):r??i}default:return r!==void 0&&r<o.DEVICE_SESSION_REFRESHER_MINIMUM_POLLING_INTERVAL?(s.warn(`Polling interval of ${r} is too low, setting to minimum as ${o.DEVICE_SESSION_REFRESHER_MINIMUM_POLLING_INTERVAL}`),o.DEVICE_SESSION_REFRESHER_MINIMUM_POLLING_INTERVAL):r??o.DEVICE_SESSION_REFRESHER_POLLING_INTERVAL}}}0&&(module.exports={DeviceSessionRefresher});
2
2
  //# sourceMappingURL=DeviceSessionRefresher.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/internal/device-session/model/DeviceSessionRefresher.ts"],
4
- "sourcesContent": ["import { injectable } from \"inversify\";\nimport { Either } from \"purify-ts\";\nimport {\n delay,\n filter,\n from,\n interval,\n map,\n Observable,\n of,\n race,\n Subscription,\n switchMap,\n} from \"rxjs\";\n\nimport { isSuccessCommandResult } from \"@api/command/model/CommandResult\";\nimport {\n GetAppAndVersionCommand,\n GetAppAndVersionCommandResult,\n} from \"@api/command/os/GetAppAndVersionCommand\";\nimport { GetOsVersionCommand } from \"@api/command/os/GetOsVersionCommand\";\nimport { DeviceModelId } from \"@api/device/DeviceModel\";\nimport { DeviceStatus } from \"@api/device/DeviceStatus\";\nimport { ApduResponse } from \"@api/device-session/ApduResponse\";\nimport {\n DeviceSessionState,\n DeviceSessionStateType,\n} from \"@api/device-session/DeviceSessionState\";\nimport { DmkError } from \"@api/Error\";\nimport { type LoggerPublisherService } from \"@api/logger-publisher/service/LoggerPublisherService\";\nimport { SendApduFnType } from \"@api/transport/model/DeviceConnection\";\n\ntype UpdateStateFnType = (\n callback: (state: DeviceSessionState) => DeviceSessionState,\n) => void;\n\n/**\n * The arguments for the DeviceSessionRefresher.\n */\nexport type DeviceSessionRefresherArgs = {\n /**\n * The refresh interval in milliseconds.\n */\n refreshInterval: number;\n\n /**\n * The current device status when the refresher is created.\n */\n deviceStatus: Exclude<DeviceStatus, DeviceStatus.NOT_CONNECTED>;\n\n /**\n * The function used to send APDU commands to the device.\n */\n sendApduFn: (rawApdu: Uint8Array) => Promise<Either<DmkError, ApduResponse>>;\n\n /**\n * Callback that updates the state of the device session with\n * polling response.\n * @param callback - A function that will take the previous state and return the new state.\n * @returns void\n */\n updateStateFn: UpdateStateFnType;\n\n /**\n * Device model to handle NanoS specific refresher\n */\n deviceModelId: DeviceModelId;\n};\n\n/**\n * The session refresher that periodically sends a command to refresh the session.\n */\n@injectable()\nexport class DeviceSessionRefresher {\n private readonly _logger: LoggerPublisherService;\n private readonly _getAppAndVersionCommand = new GetAppAndVersionCommand();\n private readonly _getOsVersionCommand = new GetOsVersionCommand();\n private _deviceStatus: DeviceStatus;\n private _subscription?: Subscription;\n private readonly _refreshInterval: number;\n private readonly _deviceModelId: DeviceModelId;\n private readonly _sendApduFn: SendApduFnType;\n private readonly _updateStateFn: UpdateStateFnType;\n\n constructor(\n {\n refreshInterval,\n deviceStatus,\n sendApduFn,\n updateStateFn,\n deviceModelId,\n }: DeviceSessionRefresherArgs,\n logger: LoggerPublisherService,\n ) {\n this._deviceStatus = deviceStatus;\n this._logger = logger;\n this._sendApduFn = sendApduFn;\n this._updateStateFn = updateStateFn;\n this._refreshInterval = refreshInterval;\n this._deviceModelId = deviceModelId;\n\n this.start();\n }\n\n /**\n * Start the session refresher.\n * The refresher will send commands to refresh the session.\n */\n start() {\n if (this._subscription && !this._subscription.closed) {\n this._logger.warn(\"Refresher already started\");\n return;\n }\n\n // NanoS has a specific refresher that sends GetAppAndVersion and GetOsVersion commands\n const refreshObservable =\n this._deviceModelId === DeviceModelId.NANO_S\n ? this._getNanoSRefreshObservable(this._refreshInterval * 2)\n : this._getDefaultRefreshObservable(interval(this._refreshInterval));\n\n this._subscription = refreshObservable.subscribe((parsedResponse) => {\n if (!parsedResponse || !isSuccessCommandResult(parsedResponse)) {\n return;\n }\n // `batteryStatus` and `firmwareVersion` are not available in the polling response.\n this._updateStateFn((state) => ({\n ...state,\n sessionStateType: DeviceSessionStateType.ReadyWithoutSecureChannel,\n deviceStatus: this._deviceStatus,\n currentApp: parsedResponse.data,\n installedApps: \"installedApps\" in state ? state.installedApps : [],\n }));\n });\n }\n\n /**\n * Creates an observable that refreshes a device state with GetAppAndVersion command result.\n *\n * @param {ObservableInput<number>} parentObservable - The parent observable to base the refresh observable on. Defaults to an array with a single number [0].\n * @return {Observable<GetAppAndVersionCommandResult>} An observable that emits the result of the GetAppAndVersionCommand.\n */\n private _getDefaultRefreshObservable(\n parentObservable: Observable<number> = from([0]),\n ): Observable<GetAppAndVersionCommandResult> {\n return parentObservable.pipe(\n filter(\n () =>\n ![DeviceStatus.BUSY, DeviceStatus.NOT_CONNECTED].includes(\n this._deviceStatus,\n ),\n ),\n switchMap(async () => {\n const rawApdu = this._getAppAndVersionCommand.getApdu().getRawApdu();\n return await this._sendApduFn(rawApdu);\n }),\n map((resp) =>\n resp.caseOf({\n Left: (error) => {\n this._logger.error(\"Error in sending APDU when polling\", {\n data: { error },\n });\n return null;\n },\n Right: (data: ApduResponse) => {\n try {\n return this._getAppAndVersionCommand.parseResponse(data);\n } catch (error) {\n this._logger.error(\"Error in parsing APDU response\", {\n data: { error },\n });\n return null;\n }\n },\n }),\n ),\n filter((parsedResponse) => parsedResponse !== null),\n );\n }\n\n /**\n * Creates an observable that emits events to refresh the NanoS device state.\n *\n * @param {number} refreshInterval - The interval, in milliseconds, at which the NanoS state should be refreshed.\n * @return {Observable<GetAppAndVersionCommandResult | void>} An observable that emits events to refresh the NanoS device state and handle timeout scenarios.\n */\n private _getNanoSRefreshObservable(\n refreshInterval: number,\n ): Observable<GetAppAndVersionCommandResult | void> {\n const nanoSRefreshObservable = this._getDefaultRefreshObservable().pipe(\n switchMap(async (resp) => {\n const rawApdu = this._getOsVersionCommand.getApdu().getRawApdu();\n await this._sendApduFn(rawApdu);\n return resp;\n }),\n );\n const timeoutObservable = of(null).pipe(\n delay(refreshInterval),\n map((_) => {\n this._logger.warn(\n \"Nanos refresh timeout, setting device status to LOCKED\",\n );\n this._updateStateFn((state) => ({\n ...state,\n deviceStatus: DeviceStatus.LOCKED,\n }));\n }),\n );\n return interval(refreshInterval + 100).pipe(\n switchMap(() => race(nanoSRefreshObservable, timeoutObservable)),\n );\n }\n\n /**\n * Maintain a device status to prevent sending APDU when the device is busy.\n *\n * @param {DeviceStatus} deviceStatus - The new device status.\n */\n setDeviceStatus(deviceStatus: DeviceStatus) {\n if (deviceStatus === DeviceStatus.NOT_CONNECTED) {\n this.stop();\n }\n this._deviceStatus = deviceStatus;\n }\n\n /**\n * Stops the session refresher.\n * The refresher will no longer send commands to refresh the session.\n */\n stop() {\n if (!this._subscription || this._subscription.closed) {\n return;\n }\n this._subscription.unsubscribe();\n this._subscription = undefined;\n }\n}\n"],
5
- "mappings": "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",
6
- "names": ["DeviceSessionRefresher_exports", "__export", "DeviceSessionRefresher", "__toCommonJS", "import_inversify", "import_rxjs", "import_CommandResult", "import_GetAppAndVersionCommand", "import_GetOsVersionCommand", "import_DeviceModel", "import_DeviceStatus", "import_DeviceSessionState", "DeviceSessionRefresher", "refreshInterval", "deviceStatus", "sendApduFn", "updateStateFn", "deviceModelId", "logger", "refreshObservable", "parsedResponse", "state", "parentObservable", "rawApdu", "resp", "error", "data", "nanoSRefreshObservable", "timeoutObservable", "_", "__decorateClass"]
4
+ "sourcesContent": ["import { type Subscription, timer } from \"rxjs\";\n\nimport { DeviceModelId } from \"@api/device/DeviceModel\";\nimport { type TransportConnectedDevice } from \"@api/transport/model/TransportConnectedDevice\";\nimport { type LoggerPublisherService } from \"@api/types\";\nimport {\n DEVICE_SESSION_REFRESHER_MINIMUM_POLLING_INTERVAL,\n DEVICE_SESSION_REFRESHER_POLLING_INTERVAL,\n} from \"@internal/device-session/data/DeviceSessionRefresherConst\";\nimport {\n type DeviceSessionEventDispatcher,\n SessionEvents,\n} from \"@internal/device-session/model/DeviceSessionEventDispatcher\";\n\nexport interface DeviceSessionRefresherOptions {\n isRefresherDisabled: boolean;\n pollingInterval?: number;\n}\n\nexport class DeviceSessionRefresher {\n private _refresherSubscription!: Subscription | undefined;\n private _refresherOptions: DeviceSessionRefresherOptions;\n private readonly _logger: LoggerPublisherService;\n private _connectedDeviceID: DeviceModelId;\n\n constructor(\n loggerModuleFactory: (tag: string) => LoggerPublisherService,\n refresherOptions: DeviceSessionRefresherOptions,\n private _sessionEventDispatcher: DeviceSessionEventDispatcher,\n connectedDevice: TransportConnectedDevice,\n ) {\n this._refresherOptions = refresherOptions;\n this._logger = loggerModuleFactory(\"device-session-refresher\");\n this._connectedDeviceID = connectedDevice.deviceModel.id;\n }\n\n public startRefresher(): void {\n if (this._refresherOptions.isRefresherDisabled) return;\n\n const pollingInterval =\n this.getValidPollingInterval(this._refresherOptions, this._logger) * 2;\n\n this._refresherSubscription = timer(0, pollingInterval).subscribe(() => {\n this._sessionEventDispatcher.dispatch({\n eventName: SessionEvents.REFRESH_NEEDED,\n });\n });\n }\n\n public stopRefresher(): void {\n if (this._refresherSubscription) {\n this._refresherSubscription.unsubscribe();\n this._refresherSubscription = undefined;\n this._logger.info(\"Refresher stopped.\");\n }\n }\n\n public restartRefresher(): void {\n this.stopRefresher();\n this.startRefresher();\n this._logger.info(\"Refresher restarted.\");\n }\n\n public destroy(): void {\n this.stopRefresher();\n }\n\n private getValidPollingInterval = (\n refresherOptions: DeviceSessionRefresherOptions,\n logger: LoggerPublisherService,\n ): number => {\n const { pollingInterval } = refresherOptions;\n switch (this._connectedDeviceID) {\n case DeviceModelId.NANO_S: {\n const defaultNanoPollingInterval =\n DEVICE_SESSION_REFRESHER_POLLING_INTERVAL * 2;\n if (\n pollingInterval !== undefined &&\n pollingInterval < defaultNanoPollingInterval\n ) {\n logger.warn(\n `Polling interval of ${pollingInterval} is too low, setting to minimum as ${defaultNanoPollingInterval}`,\n );\n return defaultNanoPollingInterval;\n }\n return pollingInterval ?? defaultNanoPollingInterval;\n }\n default:\n if (\n pollingInterval !== undefined &&\n pollingInterval < DEVICE_SESSION_REFRESHER_MINIMUM_POLLING_INTERVAL\n ) {\n logger.warn(\n `Polling interval of ${pollingInterval} is too low, setting to minimum as ${DEVICE_SESSION_REFRESHER_MINIMUM_POLLING_INTERVAL}`,\n );\n return DEVICE_SESSION_REFRESHER_MINIMUM_POLLING_INTERVAL;\n }\n\n return pollingInterval ?? DEVICE_SESSION_REFRESHER_POLLING_INTERVAL;\n }\n };\n}\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,4BAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAyC,gBAEzCC,EAA8B,mCAG9BC,EAGO,qEACPC,EAGO,uEAOA,MAAML,CAAuB,CAMlC,YACEM,EACAC,EACQC,EACRC,EACA,CAFQ,6BAAAD,EAGR,KAAK,kBAAoBD,EACzB,KAAK,QAAUD,EAAoB,0BAA0B,EAC7D,KAAK,mBAAqBG,EAAgB,YAAY,EACxD,CAdQ,uBACA,kBACS,QACT,mBAaD,gBAAuB,CAC5B,GAAI,KAAK,kBAAkB,oBAAqB,OAEhD,MAAMC,EACJ,KAAK,wBAAwB,KAAK,kBAAmB,KAAK,OAAO,EAAI,EAEvE,KAAK,0BAAyB,SAAM,EAAGA,CAAe,EAAE,UAAU,IAAM,CACtE,KAAK,wBAAwB,SAAS,CACpC,UAAW,gBAAc,cAC3B,CAAC,CACH,CAAC,CACH,CAEO,eAAsB,CACvB,KAAK,yBACP,KAAK,uBAAuB,YAAY,EACxC,KAAK,uBAAyB,OAC9B,KAAK,QAAQ,KAAK,oBAAoB,EAE1C,CAEO,kBAAyB,CAC9B,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,QAAQ,KAAK,sBAAsB,CAC1C,CAEO,SAAgB,CACrB,KAAK,cAAc,CACrB,CAEQ,wBAA0B,CAChCH,EACAI,IACW,CACX,KAAM,CAAE,gBAAAD,CAAgB,EAAIH,EAC5B,OAAQ,KAAK,mBAAoB,CAC/B,KAAK,gBAAc,OAAQ,CACzB,MAAMK,EACJ,4CAA4C,EAC9C,OACEF,IAAoB,QACpBA,EAAkBE,GAElBD,EAAO,KACL,uBAAuBD,CAAe,sCAAsCE,CAA0B,EACxG,EACOA,GAEFF,GAAmBE,CAC5B,CACA,QACE,OACEF,IAAoB,QACpBA,EAAkB,qDAElBC,EAAO,KACL,uBAAuBD,CAAe,sCAAsC,mDAAiD,EAC/H,EACO,qDAGFA,GAAmB,2CAC9B,CACF,CACF",
6
+ "names": ["DeviceSessionRefresher_exports", "__export", "DeviceSessionRefresher", "__toCommonJS", "import_rxjs", "import_DeviceModel", "import_DeviceSessionRefresherConst", "import_DeviceSessionEventDispatcher", "loggerModuleFactory", "refresherOptions", "_sessionEventDispatcher", "connectedDevice", "pollingInterval", "logger", "defaultNanoPollingInterval"]
7
7
  }