@os1-platform/dispatch-mobile 1.0.7 → 1.3.11

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 (653) hide show
  1. package/README.md +90 -26
  2. package/android/.gradle/6.8/fileChanges/last-build.bin +0 -0
  3. package/android/.gradle/6.8/fileHashes/fileHashes.lock +0 -0
  4. package/android/.gradle/6.8/gc.properties +0 -0
  5. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  6. package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
  7. package/android/.gradle/checksums/checksums.lock +0 -0
  8. package/android/.gradle/configuration-cache/gc.properties +0 -0
  9. package/android/.gradle/vcs-1/gc.properties +0 -0
  10. package/android/.idea/gradle.xml +13 -0
  11. package/android/.idea/misc.xml +4 -0
  12. package/android/.idea/vcs.xml +6 -0
  13. package/android/.idea/workspace.xml +131 -0
  14. package/android/gradle.properties +1 -1
  15. package/android/local.properties +8 -0
  16. package/android/src/main/AndroidManifest.xml +0 -1
  17. package/lib/commonjs/components/dispatch/DispatchExecNavigator.js +46 -39
  18. package/lib/commonjs/components/dispatch/DispatchExecNavigator.js.map +1 -1
  19. package/lib/commonjs/components/executiontasks/ExecutionTasksIndex.js +14 -24
  20. package/lib/commonjs/components/executiontasks/ExecutionTasksIndex.js.map +1 -1
  21. package/lib/commonjs/components/executiontasks/cancellation/CancelET.js +142 -23
  22. package/lib/commonjs/components/executiontasks/cancellation/CancelET.js.map +1 -1
  23. package/lib/commonjs/components/executiontasks/cancellation/CancellationSchema.js.map +1 -1
  24. package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js +64 -16
  25. package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js.map +1 -1
  26. package/lib/commonjs/components/executiontasks/deliver/DeliverET.js +6 -16
  27. package/lib/commonjs/components/executiontasks/deliver/DeliverET.js.map +1 -1
  28. package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js +68 -26
  29. package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
  30. package/lib/commonjs/components/executiontasks/display/DisplayModalET.js +4 -13
  31. package/lib/commonjs/components/executiontasks/display/DisplayModalET.js.map +1 -1
  32. package/lib/commonjs/components/executiontasks/doodle/DoodleUtils.js +0 -2
  33. package/lib/commonjs/components/executiontasks/doodle/DoodleUtils.js.map +1 -1
  34. package/lib/commonjs/components/executiontasks/doodle/SignatureET.js +61 -28
  35. package/lib/commonjs/components/executiontasks/doodle/SignatureET.js.map +1 -1
  36. package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js +5 -19
  37. package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js.map +1 -1
  38. package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js +62 -18
  39. package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
  40. package/lib/commonjs/components/executiontasks/forms/FormGenerator.js +112 -28
  41. package/lib/commonjs/components/executiontasks/forms/FormGenerator.js.map +1 -1
  42. package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js +3 -26
  43. package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
  44. package/lib/commonjs/components/executiontasks/forms/widgets/DropdownWidget.js +49 -0
  45. package/lib/commonjs/components/executiontasks/forms/widgets/DropdownWidget.js.map +1 -0
  46. package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +1 -16
  47. package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
  48. package/lib/commonjs/components/executiontasks/forms/widgets/TimeRangeSelector.js +0 -10
  49. package/lib/commonjs/components/executiontasks/forms/widgets/TimeRangeSelector.js.map +1 -1
  50. package/lib/commonjs/components/executiontasks/httpRequest/HttpEtUtils.js +4 -13
  51. package/lib/commonjs/components/executiontasks/httpRequest/HttpEtUtils.js.map +1 -1
  52. package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js +0 -12
  53. package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js.map +1 -1
  54. package/lib/commonjs/components/executiontasks/imageCapture/CaptureSchema.js.map +1 -1
  55. package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js +7 -35
  56. package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
  57. package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js +74 -49
  58. package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
  59. package/lib/commonjs/components/executiontasks/payments/PaymentStyles.js +0 -4
  60. package/lib/commonjs/components/executiontasks/payments/PaymentStyles.js.map +1 -1
  61. package/lib/commonjs/components/executiontasks/payments/PaymentUtils.js +0 -2
  62. package/lib/commonjs/components/executiontasks/payments/PaymentUtils.js.map +1 -1
  63. package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js +64 -17
  64. package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
  65. package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js +63 -24
  66. package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
  67. package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js +71 -22
  68. package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
  69. package/lib/commonjs/components/executiontasks/pickup/PickupET.js +5 -15
  70. package/lib/commonjs/components/executiontasks/pickup/PickupET.js.map +1 -1
  71. package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js +60 -19
  72. package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js.map +1 -1
  73. package/lib/commonjs/components/executiontasks/scan/ScanET.js +843 -0
  74. package/lib/commonjs/components/executiontasks/scan/ScanET.js.map +1 -0
  75. package/lib/commonjs/components/executiontasks/scan/ScanSchema.js +6 -0
  76. package/lib/commonjs/components/executiontasks/scan/ScanSchema.js.map +1 -0
  77. package/lib/commonjs/components/executiontasks/scan/constants.js +19 -0
  78. package/lib/commonjs/components/executiontasks/scan/constants.js.map +1 -0
  79. package/lib/commonjs/components/executiontasks/scan/interfaces.js +29 -0
  80. package/lib/commonjs/components/executiontasks/scan/interfaces.js.map +1 -0
  81. package/lib/commonjs/components/executiontasks/scan/sub_components/CScanner.js +103 -0
  82. package/lib/commonjs/components/executiontasks/scan/sub_components/CScanner.js.map +1 -0
  83. package/lib/commonjs/components/executiontasks/scan/sub_components/DropDownUtils.js +74 -0
  84. package/lib/commonjs/components/executiontasks/scan/sub_components/DropDownUtils.js.map +1 -0
  85. package/lib/commonjs/components/executiontasks/scan/sub_components/ERDropDown.js +115 -0
  86. package/lib/commonjs/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -0
  87. package/lib/commonjs/components/executiontasks/scan/sub_components/ScanList.js +134 -0
  88. package/lib/commonjs/components/executiontasks/scan/sub_components/ScanList.js.map +1 -0
  89. package/lib/commonjs/components/executiontasks/scan/utils.js +373 -0
  90. package/lib/commonjs/components/executiontasks/scan/utils.js.map +1 -0
  91. package/lib/commonjs/components/executiontasks/scanner/CScanner.js +3 -21
  92. package/lib/commonjs/components/executiontasks/scanner/CScanner.js.map +1 -1
  93. package/lib/commonjs/components/executiontasks/scanner/ScannerSchema.js +4 -9
  94. package/lib/commonjs/components/executiontasks/scanner/ScannerSchema.js.map +1 -1
  95. package/lib/commonjs/components/executiontasks/scanner/ScannerUtils.js +7 -36
  96. package/lib/commonjs/components/executiontasks/scanner/ScannerUtils.js.map +1 -1
  97. package/lib/commonjs/components/executiontasks/scanner/returns/DropDownSelector.js +0 -5
  98. package/lib/commonjs/components/executiontasks/scanner/returns/DropDownSelector.js.map +1 -1
  99. package/lib/commonjs/components/executiontasks/scanner/returns/DropDownUtils.js +0 -9
  100. package/lib/commonjs/components/executiontasks/scanner/returns/DropDownUtils.js.map +1 -1
  101. package/lib/commonjs/components/executiontasks/scanner/returns/RTReasonSelection.js +0 -14
  102. package/lib/commonjs/components/executiontasks/scanner/returns/RTReasonSelection.js.map +1 -1
  103. package/lib/commonjs/components/executiontasks/scanner/returns/RTScan.js +1 -40
  104. package/lib/commonjs/components/executiontasks/scanner/returns/RTScan.js.map +1 -1
  105. package/lib/commonjs/components/executiontasks/scanner/returns/ReasonDropDown.js +0 -17
  106. package/lib/commonjs/components/executiontasks/scanner/returns/ReasonDropDown.js.map +1 -1
  107. package/lib/commonjs/components/executiontasks/scanner/returns/ScanList.js +0 -28
  108. package/lib/commonjs/components/executiontasks/scanner/returns/ScanList.js.map +1 -1
  109. package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js +334 -0
  110. package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -0
  111. package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPSchema.js +14 -0
  112. package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPSchema.js.map +1 -0
  113. package/lib/commonjs/components/executiontasks/validateOTP/constants.js +37 -0
  114. package/lib/commonjs/components/executiontasks/validateOTP/constants.js.map +1 -0
  115. package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js +59 -0
  116. package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -0
  117. package/lib/commonjs/components/executiontasks/validateOTP/utils.js +147 -0
  118. package/lib/commonjs/components/executiontasks/validateOTP/utils.js.map +1 -0
  119. package/lib/commonjs/components/executiontasks/verifyLocation/GeofenceUtils.js +0 -13
  120. package/lib/commonjs/components/executiontasks/verifyLocation/GeofenceUtils.js.map +1 -1
  121. package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js +4 -17
  122. package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js.map +1 -1
  123. package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js +3 -18
  124. package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
  125. package/lib/commonjs/components/widgets/AlertDisplay.js +0 -5
  126. package/lib/commonjs/components/widgets/AlertDisplay.js.map +1 -1
  127. package/lib/commonjs/components/widgets/CancelOrderDialog.js +0 -12
  128. package/lib/commonjs/components/widgets/CancelOrderDialog.js.map +1 -1
  129. package/lib/commonjs/components/widgets/IconButton.js +34 -0
  130. package/lib/commonjs/components/widgets/IconButton.js.map +1 -0
  131. package/lib/commonjs/components/widgets/ProgressDialog.js +0 -7
  132. package/lib/commonjs/components/widgets/ProgressDialog.js.map +1 -1
  133. package/lib/commonjs/components/widgets/SnackBarCustom.js +38 -38
  134. package/lib/commonjs/components/widgets/SnackBarCustom.js.map +1 -1
  135. package/lib/commonjs/components/widgets/SplitTextInput.js +93 -0
  136. package/lib/commonjs/components/widgets/SplitTextInput.js.map +1 -0
  137. package/lib/commonjs/components/widgets/Toaster.js +0 -2
  138. package/lib/commonjs/components/widgets/Toaster.js.map +1 -1
  139. package/lib/commonjs/config/DispatchSDKConfig.js +4 -5
  140. package/lib/commonjs/config/DispatchSDKConfig.js.map +1 -1
  141. package/lib/commonjs/constants/apiConstants.js +15 -0
  142. package/lib/commonjs/constants/apiConstants.js.map +1 -0
  143. package/lib/commonjs/constants/constants.js +7 -3
  144. package/lib/commonjs/constants/constants.js.map +1 -1
  145. package/lib/commonjs/constants/statuscode.js +3 -5
  146. package/lib/commonjs/constants/statuscode.js.map +1 -1
  147. package/lib/commonjs/errors/BaseError.js +3 -8
  148. package/lib/commonjs/errors/BaseError.js.map +1 -1
  149. package/lib/commonjs/errors/ErrorCodes.js +7 -6
  150. package/lib/commonjs/errors/ErrorCodes.js.map +1 -1
  151. package/lib/commonjs/events/EventDispatcher.js +27 -0
  152. package/lib/commonjs/events/EventDispatcher.js.map +1 -0
  153. package/lib/commonjs/events/EventListener.js +20 -0
  154. package/lib/commonjs/events/EventListener.js.map +1 -0
  155. package/lib/commonjs/events/constants.js +13 -0
  156. package/lib/commonjs/events/constants.js.map +1 -0
  157. package/lib/commonjs/events/index.js +11 -0
  158. package/lib/commonjs/events/index.js.map +1 -0
  159. package/lib/commonjs/events/interface.js +2 -0
  160. package/lib/commonjs/events/interface.js.map +1 -0
  161. package/lib/commonjs/index.js +9 -23
  162. package/lib/commonjs/index.js.map +1 -1
  163. package/lib/commonjs/manager/dispatch/DispatchStateContainer.js +527 -177
  164. package/lib/commonjs/manager/dispatch/DispatchStateContainer.js.map +1 -1
  165. package/lib/commonjs/manager/dispatchCodes/EventCodeContainer.js +55 -4
  166. package/lib/commonjs/manager/dispatchCodes/EventCodeContainer.js.map +1 -1
  167. package/lib/commonjs/manager/dispatchCodes/EventCodeRepo.js +70 -0
  168. package/lib/commonjs/manager/dispatchCodes/EventCodeRepo.js.map +1 -0
  169. package/lib/commonjs/manager/dispatchCodes/ReasonCodeContainer.js +3 -29
  170. package/lib/commonjs/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -1
  171. package/lib/commonjs/manager/dispatchCodes/ReasonCodeRepo.js +6 -20
  172. package/lib/commonjs/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -1
  173. package/lib/commonjs/manager/jobRemoval/JobRemovalManager.js +27 -0
  174. package/lib/commonjs/manager/jobRemoval/JobRemovalManager.js.map +1 -0
  175. package/lib/commonjs/manager/location/LocationManager.js +3 -20
  176. package/lib/commonjs/manager/location/LocationManager.js.map +1 -1
  177. package/lib/commonjs/manager/sdk/DispatchSDKManager.js +8 -36
  178. package/lib/commonjs/manager/sdk/DispatchSDKManager.js.map +1 -1
  179. package/lib/commonjs/manager/sdk/DispatchSdkCache.js +6 -17
  180. package/lib/commonjs/manager/sdk/DispatchSdkCache.js.map +1 -1
  181. package/lib/commonjs/manager/syncmanager/AppSyncManager.js +12 -46
  182. package/lib/commonjs/manager/syncmanager/AppSyncManager.js.map +1 -1
  183. package/lib/commonjs/manager/syncmanager/DBConfig.js +13 -7
  184. package/lib/commonjs/manager/syncmanager/DBConfig.js.map +1 -1
  185. package/lib/commonjs/manager/syncmanager/NativeSyncManager.js +0 -2
  186. package/lib/commonjs/manager/syncmanager/NativeSyncManager.js.map +1 -1
  187. package/lib/commonjs/manager/syncmanager/database.js +28 -12
  188. package/lib/commonjs/manager/syncmanager/database.js.map +1 -1
  189. package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js +0 -19
  190. package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
  191. package/lib/commonjs/manager/syncmanager/document/DocumentManager.js +3 -20
  192. package/lib/commonjs/manager/syncmanager/document/DocumentManager.js.map +1 -1
  193. package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js +3 -52
  194. package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
  195. package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js +59 -25
  196. package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js.map +1 -1
  197. package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js +77 -90
  198. package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
  199. package/lib/commonjs/manager/syncmanager/events/SyncHttpClient.js +27 -19
  200. package/lib/commonjs/manager/syncmanager/events/SyncHttpClient.js.map +1 -1
  201. package/lib/commonjs/models/DispatchModels.js +4 -5
  202. package/lib/commonjs/models/DispatchModels.js.map +1 -1
  203. package/lib/commonjs/models/ReasonCodes.js.map +1 -1
  204. package/lib/commonjs/models/execTasks/ETBaseModels.js.map +1 -1
  205. package/lib/commonjs/models/execTasks/ETConfig.js +28 -35
  206. package/lib/commonjs/models/execTasks/ETConfig.js.map +1 -1
  207. package/lib/commonjs/models/sdk.js +4 -5
  208. package/lib/commonjs/models/sdk.js.map +1 -1
  209. package/lib/commonjs/native/signature/SignatureCapture.js +3 -24
  210. package/lib/commonjs/native/signature/SignatureCapture.js.map +1 -1
  211. package/lib/commonjs/network/GraphQLClient.js +7 -35
  212. package/lib/commonjs/network/GraphQLClient.js.map +1 -1
  213. package/lib/commonjs/network/NetworkClient.js +2 -13
  214. package/lib/commonjs/network/NetworkClient.js.map +1 -1
  215. package/lib/commonjs/network/NetworkUtils.js +10 -8
  216. package/lib/commonjs/network/NetworkUtils.js.map +1 -1
  217. package/lib/commonjs/network/Queries.js +0 -2
  218. package/lib/commonjs/network/Queries.js.map +1 -1
  219. package/lib/commonjs/network/client.js +6 -21
  220. package/lib/commonjs/network/client.js.map +1 -1
  221. package/lib/commonjs/res/strings.js.map +1 -1
  222. package/lib/commonjs/resources/Login.js +4 -15
  223. package/lib/commonjs/resources/Login.js.map +1 -1
  224. package/lib/commonjs/resources/network.js +3 -8
  225. package/lib/commonjs/resources/network.js.map +1 -1
  226. package/lib/commonjs/styles/SdkColors.js +7 -7
  227. package/lib/commonjs/styles/SdkColors.js.map +1 -1
  228. package/lib/commonjs/styles/executionTasks/CommonStyles.js +42 -18
  229. package/lib/commonjs/styles/executionTasks/CommonStyles.js.map +1 -1
  230. package/lib/commonjs/ui/screens/CancellationScreen.js +36 -27
  231. package/lib/commonjs/ui/screens/CancellationScreen.js.map +1 -1
  232. package/lib/commonjs/ui/screens/CaptureInputScreen.js +6 -15
  233. package/lib/commonjs/ui/screens/CaptureInputScreen.js.map +1 -1
  234. package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js +0 -19
  235. package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js.map +1 -1
  236. package/lib/commonjs/ui/screens/DeliverScreen.js +6 -15
  237. package/lib/commonjs/ui/screens/DeliverScreen.js.map +1 -1
  238. package/lib/commonjs/ui/screens/DisplayScreen.js +7 -12
  239. package/lib/commonjs/ui/screens/DisplayScreen.js.map +1 -1
  240. package/lib/commonjs/ui/screens/DoodleScreen.js +6 -16
  241. package/lib/commonjs/ui/screens/DoodleScreen.js.map +1 -1
  242. package/lib/commonjs/ui/screens/DropCashScreen.js +6 -18
  243. package/lib/commonjs/ui/screens/DropCashScreen.js.map +1 -1
  244. package/lib/commonjs/ui/screens/ETScreensIndex.js +14 -16
  245. package/lib/commonjs/ui/screens/ETScreensIndex.js.map +1 -1
  246. package/lib/commonjs/ui/screens/FormsScreen.js +36 -15
  247. package/lib/commonjs/ui/screens/FormsScreen.js.map +1 -1
  248. package/lib/commonjs/ui/screens/GeofenceScreen.js +7 -13
  249. package/lib/commonjs/ui/screens/GeofenceScreen.js.map +1 -1
  250. package/lib/commonjs/ui/screens/HttpRequestScreen.js +5 -10
  251. package/lib/commonjs/ui/screens/HttpRequestScreen.js.map +1 -1
  252. package/lib/commonjs/ui/screens/ImageCaptureScreen.js +27 -14
  253. package/lib/commonjs/ui/screens/ImageCaptureScreen.js.map +1 -1
  254. package/lib/commonjs/ui/screens/PaymentScreen.js +11 -23
  255. package/lib/commonjs/ui/screens/PaymentScreen.js.map +1 -1
  256. package/lib/commonjs/ui/screens/PickupScreen.js +9 -13
  257. package/lib/commonjs/ui/screens/PickupScreen.js.map +1 -1
  258. package/lib/commonjs/ui/screens/RTScanScreen.js +8 -27
  259. package/lib/commonjs/ui/screens/RTScanScreen.js.map +1 -1
  260. package/lib/commonjs/ui/screens/ScanScreen.js +268 -0
  261. package/lib/commonjs/ui/screens/ScanScreen.js.map +1 -0
  262. package/lib/commonjs/ui/screens/StartWorkFlowScreen.js +21 -30
  263. package/lib/commonjs/ui/screens/StartWorkFlowScreen.js.map +1 -1
  264. package/lib/commonjs/ui/screens/ValidateOTPScreen.js +49 -0
  265. package/lib/commonjs/ui/screens/ValidateOTPScreen.js.map +1 -0
  266. package/lib/commonjs/ui/screens/WithBaseDispatchScreen.js +0 -10
  267. package/lib/commonjs/ui/screens/WithBaseDispatchScreen.js.map +1 -1
  268. package/lib/commonjs/ui/uiConfig/RouteParams.js +9 -1
  269. package/lib/commonjs/ui/uiConfig/RouteParams.js.map +1 -1
  270. package/lib/commonjs/utils/ApiUtils.js +115 -0
  271. package/lib/commonjs/utils/ApiUtils.js.map +1 -0
  272. package/lib/commonjs/utils/ExecTaskUtils.js +93 -31
  273. package/lib/commonjs/utils/ExecTaskUtils.js.map +1 -1
  274. package/lib/commonjs/utils/Logger.js +10 -29
  275. package/lib/commonjs/utils/Logger.js.map +1 -1
  276. package/lib/commonjs/utils/NetworkUtil.js +3 -19
  277. package/lib/commonjs/utils/NetworkUtil.js.map +1 -1
  278. package/lib/commonjs/utils/SdkUtils.js +2 -31
  279. package/lib/commonjs/utils/SdkUtils.js.map +1 -1
  280. package/lib/commonjs/utils/SyncManagerUtils.js +25 -40
  281. package/lib/commonjs/utils/SyncManagerUtils.js.map +1 -1
  282. package/lib/commonjs/utils/fcm/FCM.js +35 -16
  283. package/lib/commonjs/utils/fcm/FCM.js.map +1 -1
  284. package/lib/commonjs/utils/fcm/FcmUtils.js +50 -25
  285. package/lib/commonjs/utils/fcm/FcmUtils.js.map +1 -1
  286. package/lib/commonjs/utils/helper.js +0 -5
  287. package/lib/commonjs/utils/helper.js.map +1 -1
  288. package/lib/commonjs/utils/hooks/useTimer.js +44 -0
  289. package/lib/commonjs/utils/hooks/useTimer.js.map +1 -0
  290. package/lib/commonjs/utils/loginHelper.js +6 -18
  291. package/lib/commonjs/utils/loginHelper.js.map +1 -1
  292. package/lib/commonjs/utils/storage.js +53 -32
  293. package/lib/commonjs/utils/storage.js.map +1 -1
  294. package/lib/commonjs/utils/utils.js +8 -11
  295. package/lib/commonjs/utils/utils.js.map +1 -1
  296. package/lib/module/components/dispatch/DispatchExecNavigator.js +46 -28
  297. package/lib/module/components/dispatch/DispatchExecNavigator.js.map +1 -1
  298. package/lib/module/components/executiontasks/ExecutionTasksIndex.js +3 -1
  299. package/lib/module/components/executiontasks/ExecutionTasksIndex.js.map +1 -1
  300. package/lib/module/components/executiontasks/cancellation/CancelET.js +145 -19
  301. package/lib/module/components/executiontasks/cancellation/CancelET.js.map +1 -1
  302. package/lib/module/components/executiontasks/cancellation/CancellationSchema.js.map +1 -1
  303. package/lib/module/components/executiontasks/captureInput/CaptureText.js +66 -9
  304. package/lib/module/components/executiontasks/captureInput/CaptureText.js.map +1 -1
  305. package/lib/module/components/executiontasks/deliver/DeliverET.js +6 -7
  306. package/lib/module/components/executiontasks/deliver/DeliverET.js.map +1 -1
  307. package/lib/module/components/executiontasks/deliver/SLDeliverET.js +69 -16
  308. package/lib/module/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
  309. package/lib/module/components/executiontasks/display/DisplayModalET.js +4 -3
  310. package/lib/module/components/executiontasks/display/DisplayModalET.js.map +1 -1
  311. package/lib/module/components/executiontasks/doodle/DoodleUtils.js.map +1 -1
  312. package/lib/module/components/executiontasks/doodle/SignatureET.js +64 -14
  313. package/lib/module/components/executiontasks/doodle/SignatureET.js.map +1 -1
  314. package/lib/module/components/executiontasks/dropCash/DropCashET.js +5 -6
  315. package/lib/module/components/executiontasks/dropCash/DropCashET.js.map +1 -1
  316. package/lib/module/components/executiontasks/dropCash/SLDropCash.js +62 -8
  317. package/lib/module/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
  318. package/lib/module/components/executiontasks/forms/FormGenerator.js +114 -14
  319. package/lib/module/components/executiontasks/forms/FormGenerator.js.map +1 -1
  320. package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js +3 -15
  321. package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
  322. package/lib/module/components/executiontasks/forms/widgets/DropdownWidget.js +39 -0
  323. package/lib/module/components/executiontasks/forms/widgets/DropdownWidget.js.map +1 -0
  324. package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +1 -5
  325. package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
  326. package/lib/module/components/executiontasks/forms/widgets/TimeRangeSelector.js +0 -3
  327. package/lib/module/components/executiontasks/forms/widgets/TimeRangeSelector.js.map +1 -1
  328. package/lib/module/components/executiontasks/httpRequest/HttpEtUtils.js +4 -2
  329. package/lib/module/components/executiontasks/httpRequest/HttpEtUtils.js.map +1 -1
  330. package/lib/module/components/executiontasks/httpRequest/HttpRequestET.js +0 -3
  331. package/lib/module/components/executiontasks/httpRequest/HttpRequestET.js.map +1 -1
  332. package/lib/module/components/executiontasks/imageCapture/CaptureSchema.js.map +1 -1
  333. package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js +7 -10
  334. package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
  335. package/lib/module/components/executiontasks/imageCapture/ImageCapture.js +75 -35
  336. package/lib/module/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
  337. package/lib/module/components/executiontasks/payments/PaymentStyles.js.map +1 -1
  338. package/lib/module/components/executiontasks/payments/PaymentUtils.js.map +1 -1
  339. package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js +64 -6
  340. package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
  341. package/lib/module/components/executiontasks/payments/init/InitPaymentET.js +63 -11
  342. package/lib/module/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
  343. package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js +71 -10
  344. package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
  345. package/lib/module/components/executiontasks/pickup/PickupET.js +5 -6
  346. package/lib/module/components/executiontasks/pickup/PickupET.js.map +1 -1
  347. package/lib/module/components/executiontasks/pickup/SLPickupET.js +61 -10
  348. package/lib/module/components/executiontasks/pickup/SLPickupET.js.map +1 -1
  349. package/lib/module/components/executiontasks/scan/ScanET.js +833 -0
  350. package/lib/module/components/executiontasks/scan/ScanET.js.map +1 -0
  351. package/lib/module/components/executiontasks/scan/ScanSchema.js +2 -0
  352. package/lib/module/components/executiontasks/scan/ScanSchema.js.map +1 -0
  353. package/lib/module/components/executiontasks/scan/constants.js +7 -0
  354. package/lib/module/components/executiontasks/scan/constants.js.map +1 -0
  355. package/lib/module/components/executiontasks/scan/interfaces.js +21 -0
  356. package/lib/module/components/executiontasks/scan/interfaces.js.map +1 -0
  357. package/lib/module/components/executiontasks/scan/sub_components/CScanner.js +94 -0
  358. package/lib/module/components/executiontasks/scan/sub_components/CScanner.js.map +1 -0
  359. package/lib/module/components/executiontasks/scan/sub_components/DropDownUtils.js +66 -0
  360. package/lib/module/components/executiontasks/scan/sub_components/DropDownUtils.js.map +1 -0
  361. package/lib/module/components/executiontasks/scan/sub_components/ERDropDown.js +105 -0
  362. package/lib/module/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -0
  363. package/lib/module/components/executiontasks/scan/sub_components/ScanList.js +124 -0
  364. package/lib/module/components/executiontasks/scan/sub_components/ScanList.js.map +1 -0
  365. package/lib/module/components/executiontasks/scan/utils.js +358 -0
  366. package/lib/module/components/executiontasks/scan/utils.js.map +1 -0
  367. package/lib/module/components/executiontasks/scanner/CScanner.js +3 -8
  368. package/lib/module/components/executiontasks/scanner/CScanner.js.map +1 -1
  369. package/lib/module/components/executiontasks/scanner/ScannerSchema.js +3 -3
  370. package/lib/module/components/executiontasks/scanner/ScannerSchema.js.map +1 -1
  371. package/lib/module/components/executiontasks/scanner/ScannerUtils.js +6 -18
  372. package/lib/module/components/executiontasks/scanner/ScannerUtils.js.map +1 -1
  373. package/lib/module/components/executiontasks/scanner/returns/DropDownSelector.js +0 -2
  374. package/lib/module/components/executiontasks/scanner/returns/DropDownSelector.js.map +1 -1
  375. package/lib/module/components/executiontasks/scanner/returns/DropDownUtils.js +0 -5
  376. package/lib/module/components/executiontasks/scanner/returns/DropDownUtils.js.map +1 -1
  377. package/lib/module/components/executiontasks/scanner/returns/RTReasonSelection.js +0 -3
  378. package/lib/module/components/executiontasks/scanner/returns/RTReasonSelection.js.map +1 -1
  379. package/lib/module/components/executiontasks/scanner/returns/RTScan.js +1 -19
  380. package/lib/module/components/executiontasks/scanner/returns/RTScan.js.map +1 -1
  381. package/lib/module/components/executiontasks/scanner/returns/ReasonDropDown.js +0 -7
  382. package/lib/module/components/executiontasks/scanner/returns/ReasonDropDown.js.map +1 -1
  383. package/lib/module/components/executiontasks/scanner/returns/ScanList.js +0 -15
  384. package/lib/module/components/executiontasks/scanner/returns/ScanList.js.map +1 -1
  385. package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js +325 -0
  386. package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -0
  387. package/lib/module/components/executiontasks/validateOTP/ValidateOTPSchema.js +8 -0
  388. package/lib/module/components/executiontasks/validateOTP/ValidateOTPSchema.js.map +1 -0
  389. package/lib/module/components/executiontasks/validateOTP/constants.js +25 -0
  390. package/lib/module/components/executiontasks/validateOTP/constants.js.map +1 -0
  391. package/lib/module/components/executiontasks/validateOTP/sub-components/OTPInput.js +49 -0
  392. package/lib/module/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -0
  393. package/lib/module/components/executiontasks/validateOTP/utils.js +133 -0
  394. package/lib/module/components/executiontasks/validateOTP/utils.js.map +1 -0
  395. package/lib/module/components/executiontasks/verifyLocation/GeofenceUtils.js +0 -6
  396. package/lib/module/components/executiontasks/verifyLocation/GeofenceUtils.js.map +1 -1
  397. package/lib/module/components/executiontasks/verifyLocation/VerifyLocationET.js +4 -3
  398. package/lib/module/components/executiontasks/verifyLocation/VerifyLocationET.js.map +1 -1
  399. package/lib/module/components/executiontasks/verifyOtp/VerifyOtpET.js +4 -8
  400. package/lib/module/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
  401. package/lib/module/components/widgets/AlertDisplay.js.map +1 -1
  402. package/lib/module/components/widgets/CancelOrderDialog.js +0 -2
  403. package/lib/module/components/widgets/CancelOrderDialog.js.map +1 -1
  404. package/lib/module/components/widgets/IconButton.js +26 -0
  405. package/lib/module/components/widgets/IconButton.js.map +1 -0
  406. package/lib/module/components/widgets/ProgressDialog.js +0 -2
  407. package/lib/module/components/widgets/ProgressDialog.js.map +1 -1
  408. package/lib/module/components/widgets/SnackBarCustom.js +36 -18
  409. package/lib/module/components/widgets/SnackBarCustom.js.map +1 -1
  410. package/lib/module/components/widgets/SplitTextInput.js +84 -0
  411. package/lib/module/components/widgets/SplitTextInput.js.map +1 -0
  412. package/lib/module/components/widgets/Toaster.js.map +1 -1
  413. package/lib/module/config/DispatchSDKConfig.js +3 -4
  414. package/lib/module/config/DispatchSDKConfig.js.map +1 -1
  415. package/lib/module/constants/apiConstants.js +7 -0
  416. package/lib/module/constants/apiConstants.js.map +1 -0
  417. package/lib/module/constants/constants.js +4 -2
  418. package/lib/module/constants/constants.js.map +1 -1
  419. package/lib/module/constants/statuscode.js +3 -5
  420. package/lib/module/constants/statuscode.js.map +1 -1
  421. package/lib/module/errors/BaseError.js +3 -6
  422. package/lib/module/errors/BaseError.js.map +1 -1
  423. package/lib/module/errors/ErrorCodes.js +5 -5
  424. package/lib/module/errors/ErrorCodes.js.map +1 -1
  425. package/lib/module/events/EventDispatcher.js +19 -0
  426. package/lib/module/events/EventDispatcher.js.map +1 -0
  427. package/lib/module/events/EventListener.js +13 -0
  428. package/lib/module/events/EventListener.js.map +1 -0
  429. package/lib/module/events/constants.js +6 -0
  430. package/lib/module/events/constants.js.map +1 -0
  431. package/lib/module/events/index.js +3 -0
  432. package/lib/module/events/index.js.map +1 -0
  433. package/lib/module/events/interface.js +2 -0
  434. package/lib/module/events/interface.js.map +1 -0
  435. package/lib/module/index.js +4 -3
  436. package/lib/module/index.js.map +1 -1
  437. package/lib/module/manager/dispatch/DispatchStateContainer.js +529 -151
  438. package/lib/module/manager/dispatch/DispatchStateContainer.js.map +1 -1
  439. package/lib/module/manager/dispatchCodes/EventCodeContainer.js +52 -2
  440. package/lib/module/manager/dispatchCodes/EventCodeContainer.js.map +1 -1
  441. package/lib/module/manager/dispatchCodes/EventCodeRepo.js +61 -0
  442. package/lib/module/manager/dispatchCodes/EventCodeRepo.js.map +1 -0
  443. package/lib/module/manager/dispatchCodes/ReasonCodeContainer.js +3 -16
  444. package/lib/module/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -1
  445. package/lib/module/manager/dispatchCodes/ReasonCodeRepo.js +6 -14
  446. package/lib/module/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -1
  447. package/lib/module/manager/jobRemoval/JobRemovalManager.js +20 -0
  448. package/lib/module/manager/jobRemoval/JobRemovalManager.js.map +1 -0
  449. package/lib/module/manager/location/LocationManager.js +3 -14
  450. package/lib/module/manager/location/LocationManager.js.map +1 -1
  451. package/lib/module/manager/sdk/DispatchSDKManager.js +8 -14
  452. package/lib/module/manager/sdk/DispatchSDKManager.js.map +1 -1
  453. package/lib/module/manager/sdk/DispatchSdkCache.js +6 -13
  454. package/lib/module/manager/sdk/DispatchSdkCache.js.map +1 -1
  455. package/lib/module/manager/syncmanager/AppSyncManager.js +12 -26
  456. package/lib/module/manager/syncmanager/AppSyncManager.js.map +1 -1
  457. package/lib/module/manager/syncmanager/DBConfig.js +9 -5
  458. package/lib/module/manager/syncmanager/DBConfig.js.map +1 -1
  459. package/lib/module/manager/syncmanager/NativeSyncManager.js.map +1 -1
  460. package/lib/module/manager/syncmanager/database.js +27 -3
  461. package/lib/module/manager/syncmanager/database.js.map +1 -1
  462. package/lib/module/manager/syncmanager/document/DocumentHttpClient.js +0 -7
  463. package/lib/module/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
  464. package/lib/module/manager/syncmanager/document/DocumentManager.js +3 -14
  465. package/lib/module/manager/syncmanager/document/DocumentManager.js.map +1 -1
  466. package/lib/module/manager/syncmanager/document/DocumentSyncManager.js +3 -35
  467. package/lib/module/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
  468. package/lib/module/manager/syncmanager/events/ETEventsManager.js +59 -18
  469. package/lib/module/manager/syncmanager/events/ETEventsManager.js.map +1 -1
  470. package/lib/module/manager/syncmanager/events/EventsSyncManager.js +77 -68
  471. package/lib/module/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
  472. package/lib/module/manager/syncmanager/events/SyncHttpClient.js +26 -11
  473. package/lib/module/manager/syncmanager/events/SyncHttpClient.js.map +1 -1
  474. package/lib/module/models/DispatchModels.js +3 -4
  475. package/lib/module/models/DispatchModels.js.map +1 -1
  476. package/lib/module/models/ReasonCodes.js.map +1 -1
  477. package/lib/module/models/execTasks/ETBaseModels.js.map +1 -1
  478. package/lib/module/models/execTasks/ETConfig.js +22 -29
  479. package/lib/module/models/execTasks/ETConfig.js.map +1 -1
  480. package/lib/module/models/sdk.js +3 -4
  481. package/lib/module/models/sdk.js.map +1 -1
  482. package/lib/module/native/signature/SignatureCapture.js +3 -18
  483. package/lib/module/native/signature/SignatureCapture.js.map +1 -1
  484. package/lib/module/network/GraphQLClient.js +6 -26
  485. package/lib/module/network/GraphQLClient.js.map +1 -1
  486. package/lib/module/network/NetworkClient.js +2 -6
  487. package/lib/module/network/NetworkClient.js.map +1 -1
  488. package/lib/module/network/NetworkUtils.js +10 -3
  489. package/lib/module/network/NetworkUtils.js.map +1 -1
  490. package/lib/module/network/Queries.js.map +1 -1
  491. package/lib/module/network/client.js +7 -17
  492. package/lib/module/network/client.js.map +1 -1
  493. package/lib/module/res/strings.js.map +1 -1
  494. package/lib/module/resources/Login.js +4 -13
  495. package/lib/module/resources/Login.js.map +1 -1
  496. package/lib/module/resources/network.js +3 -6
  497. package/lib/module/resources/network.js.map +1 -1
  498. package/lib/module/styles/SdkColors.js +6 -6
  499. package/lib/module/styles/SdkColors.js.map +1 -1
  500. package/lib/module/styles/executionTasks/CommonStyles.js +41 -7
  501. package/lib/module/styles/executionTasks/CommonStyles.js.map +1 -1
  502. package/lib/module/ui/screens/CancellationScreen.js +36 -14
  503. package/lib/module/ui/screens/CancellationScreen.js.map +1 -1
  504. package/lib/module/ui/screens/CaptureInputScreen.js +7 -4
  505. package/lib/module/ui/screens/CaptureInputScreen.js.map +1 -1
  506. package/lib/module/ui/screens/CompleteObjectiveScreen.js +0 -3
  507. package/lib/module/ui/screens/CompleteObjectiveScreen.js.map +1 -1
  508. package/lib/module/ui/screens/DeliverScreen.js +7 -4
  509. package/lib/module/ui/screens/DeliverScreen.js.map +1 -1
  510. package/lib/module/ui/screens/DisplayScreen.js +5 -4
  511. package/lib/module/ui/screens/DisplayScreen.js.map +1 -1
  512. package/lib/module/ui/screens/DoodleScreen.js +7 -4
  513. package/lib/module/ui/screens/DoodleScreen.js.map +1 -1
  514. package/lib/module/ui/screens/DropCashScreen.js +7 -7
  515. package/lib/module/ui/screens/DropCashScreen.js.map +1 -1
  516. package/lib/module/ui/screens/ETScreensIndex.js +3 -1
  517. package/lib/module/ui/screens/ETScreensIndex.js.map +1 -1
  518. package/lib/module/ui/screens/FormsScreen.js +34 -6
  519. package/lib/module/ui/screens/FormsScreen.js.map +1 -1
  520. package/lib/module/ui/screens/GeofenceScreen.js +5 -4
  521. package/lib/module/ui/screens/GeofenceScreen.js.map +1 -1
  522. package/lib/module/ui/screens/HttpRequestScreen.js +5 -3
  523. package/lib/module/ui/screens/HttpRequestScreen.js.map +1 -1
  524. package/lib/module/ui/screens/ImageCaptureScreen.js +25 -5
  525. package/lib/module/ui/screens/ImageCaptureScreen.js.map +1 -1
  526. package/lib/module/ui/screens/PaymentScreen.js +12 -10
  527. package/lib/module/ui/screens/PaymentScreen.js.map +1 -1
  528. package/lib/module/ui/screens/PickupScreen.js +7 -5
  529. package/lib/module/ui/screens/PickupScreen.js.map +1 -1
  530. package/lib/module/ui/screens/RTScanScreen.js +9 -13
  531. package/lib/module/ui/screens/RTScanScreen.js.map +1 -1
  532. package/lib/module/ui/screens/ScanScreen.js +259 -0
  533. package/lib/module/ui/screens/ScanScreen.js.map +1 -0
  534. package/lib/module/ui/screens/StartWorkFlowScreen.js +22 -9
  535. package/lib/module/ui/screens/StartWorkFlowScreen.js.map +1 -1
  536. package/lib/module/ui/screens/ValidateOTPScreen.js +39 -0
  537. package/lib/module/ui/screens/ValidateOTPScreen.js.map +1 -0
  538. package/lib/module/ui/screens/WithBaseDispatchScreen.js +0 -3
  539. package/lib/module/ui/screens/WithBaseDispatchScreen.js.map +1 -1
  540. package/lib/module/ui/uiConfig/RouteParams.js +9 -1
  541. package/lib/module/ui/uiConfig/RouteParams.js.map +1 -1
  542. package/lib/module/utils/ApiUtils.js +101 -0
  543. package/lib/module/utils/ApiUtils.js.map +1 -0
  544. package/lib/module/utils/ExecTaskUtils.js +92 -21
  545. package/lib/module/utils/ExecTaskUtils.js.map +1 -1
  546. package/lib/module/utils/Logger.js +9 -21
  547. package/lib/module/utils/Logger.js.map +1 -1
  548. package/lib/module/utils/NetworkUtil.js +3 -15
  549. package/lib/module/utils/NetworkUtil.js.map +1 -1
  550. package/lib/module/utils/SdkUtils.js +2 -15
  551. package/lib/module/utils/SdkUtils.js.map +1 -1
  552. package/lib/module/utils/SyncManagerUtils.js +25 -10
  553. package/lib/module/utils/SyncManagerUtils.js.map +1 -1
  554. package/lib/module/utils/fcm/FCM.js +35 -4
  555. package/lib/module/utils/fcm/FCM.js.map +1 -1
  556. package/lib/module/utils/fcm/FcmUtils.js +50 -7
  557. package/lib/module/utils/fcm/FcmUtils.js.map +1 -1
  558. package/lib/module/utils/helper.js +0 -3
  559. package/lib/module/utils/helper.js.map +1 -1
  560. package/lib/module/utils/hooks/useTimer.js +37 -0
  561. package/lib/module/utils/hooks/useTimer.js.map +1 -0
  562. package/lib/module/utils/loginHelper.js +6 -16
  563. package/lib/module/utils/loginHelper.js.map +1 -1
  564. package/lib/module/utils/storage.js +51 -29
  565. package/lib/module/utils/storage.js.map +1 -1
  566. package/lib/module/utils/utils.js +8 -6
  567. package/lib/module/utils/utils.js.map +1 -1
  568. package/lib/typescript/components/executiontasks/CompletedWFSchema.d.ts +2 -2
  569. package/lib/typescript/components/executiontasks/ExecutionTasksIndex.d.ts +6 -2
  570. package/lib/typescript/components/executiontasks/cancellation/CancellationSchema.d.ts +10 -5
  571. package/lib/typescript/components/executiontasks/captureInput/CaptureInputSchema.d.ts +7 -7
  572. package/lib/typescript/components/executiontasks/deliver/DeliverETInput.d.ts +7 -7
  573. package/lib/typescript/components/executiontasks/display/DisplaySchema.d.ts +5 -5
  574. package/lib/typescript/components/executiontasks/doodle/SignatureSchema.d.ts +7 -7
  575. package/lib/typescript/components/executiontasks/dropCash/DropCashSchema.d.ts +2 -2
  576. package/lib/typescript/components/executiontasks/forms/FormSchema.d.ts +2 -2
  577. package/lib/typescript/components/executiontasks/forms/widgets/DateTimeWidget.d.ts +1 -1
  578. package/lib/typescript/components/executiontasks/forms/widgets/DropdownWidget.d.ts +9 -0
  579. package/lib/typescript/components/executiontasks/httpRequest/HttpRequestETSchema.d.ts +6 -6
  580. package/lib/typescript/components/executiontasks/imageCapture/CaptureSchema.d.ts +16 -11
  581. package/lib/typescript/components/executiontasks/payments/completePayment/CompletePaymentSchema.d.ts +2 -2
  582. package/lib/typescript/components/executiontasks/payments/init/InitPaymentSchema.d.ts +3 -3
  583. package/lib/typescript/components/executiontasks/payments/processPayment/ProcessPaymentSchema.d.ts +2 -2
  584. package/lib/typescript/components/executiontasks/pickup/PickpSchema.d.ts +3 -3
  585. package/lib/typescript/components/executiontasks/scan/ScanET.d.ts +16 -0
  586. package/lib/typescript/components/executiontasks/scan/ScanSchema.d.ts +70 -0
  587. package/lib/typescript/components/executiontasks/scan/constants.d.ts +6 -0
  588. package/lib/typescript/components/executiontasks/scan/interfaces.d.ts +41 -0
  589. package/lib/typescript/components/executiontasks/scan/sub_components/CScanner.d.ts +7 -0
  590. package/lib/typescript/components/executiontasks/scan/sub_components/DropDownUtils.d.ts +7 -0
  591. package/lib/typescript/components/executiontasks/scan/sub_components/ERDropDown.d.ts +17 -0
  592. package/lib/typescript/components/executiontasks/scan/sub_components/ScanList.d.ts +8 -0
  593. package/lib/typescript/components/executiontasks/scan/utils.d.ts +21 -0
  594. package/lib/typescript/components/executiontasks/scanner/ScannerSchema.d.ts +6 -6
  595. package/lib/typescript/components/executiontasks/scanner/returns/DropDownUtils.d.ts +1 -2
  596. package/lib/typescript/components/executiontasks/scanner/returns/RTReasonSelection.d.ts +1 -1
  597. package/lib/typescript/components/executiontasks/scanner/returns/ScanList.d.ts +1 -1
  598. package/lib/typescript/components/executiontasks/validateOTP/ValidateOTPET.d.ts +4 -0
  599. package/lib/typescript/components/executiontasks/validateOTP/ValidateOTPSchema.d.ts +54 -0
  600. package/lib/typescript/components/executiontasks/validateOTP/constants.d.ts +10 -0
  601. package/lib/typescript/components/executiontasks/validateOTP/sub-components/OTPInput.d.ts +12 -0
  602. package/lib/typescript/components/executiontasks/validateOTP/utils.d.ts +7 -0
  603. package/lib/typescript/components/executiontasks/verifyInput/VerifyInputSchema.d.ts +8 -8
  604. package/lib/typescript/components/executiontasks/verifyLocation/VerifyLocSchema.d.ts +9 -9
  605. package/lib/typescript/components/executiontasks/verifyOtp/VerifyOtpSchema.d.ts +3 -3
  606. package/lib/typescript/components/widgets/IconButton.d.ts +9 -0
  607. package/lib/typescript/components/widgets/SnackBarCustom.d.ts +9 -5
  608. package/lib/typescript/components/widgets/SplitTextInput.d.ts +12 -0
  609. package/lib/typescript/constants/apiConstants.d.ts +6 -0
  610. package/lib/typescript/constants/constants.d.ts +4 -2
  611. package/lib/typescript/errors/ErrorCodes.d.ts +3 -1
  612. package/lib/typescript/events/EventDispatcher.d.ts +5 -0
  613. package/lib/typescript/events/EventListener.d.ts +5 -0
  614. package/lib/typescript/events/constants.d.ts +5 -0
  615. package/lib/typescript/events/index.d.ts +2 -0
  616. package/lib/typescript/events/interface.d.ts +1 -0
  617. package/lib/typescript/index.d.ts +5 -4
  618. package/lib/typescript/manager/dispatch/DispatchStateContainer.d.ts +21 -8
  619. package/lib/typescript/manager/dispatchCodes/EventCodeContainer.d.ts +12 -1
  620. package/lib/typescript/manager/dispatchCodes/EventCodeRepo.d.ts +13 -0
  621. package/lib/typescript/manager/jobRemoval/JobRemovalManager.d.ts +6 -0
  622. package/lib/typescript/manager/sdk/DispatchSdkCache.d.ts +2 -0
  623. package/lib/typescript/manager/syncmanager/AppSyncManager.d.ts +1 -0
  624. package/lib/typescript/manager/syncmanager/DBConfig.d.ts +22 -2
  625. package/lib/typescript/manager/syncmanager/database.d.ts +5 -0
  626. package/lib/typescript/manager/syncmanager/document/models.d.ts +1 -1
  627. package/lib/typescript/manager/syncmanager/events/ETEventsManager.d.ts +5 -1
  628. package/lib/typescript/manager/syncmanager/events/EventsSyncManager.d.ts +5 -1
  629. package/lib/typescript/manager/syncmanager/events/SyncHttpClient.d.ts +3 -1
  630. package/lib/typescript/models/DispatchModels.d.ts +56 -1
  631. package/lib/typescript/models/ReasonCodes.d.ts +5 -0
  632. package/lib/typescript/models/auth.d.ts +1 -1
  633. package/lib/typescript/models/execTasks/ETBaseModels.d.ts +27 -8
  634. package/lib/typescript/models/execTasks/ETConfig.d.ts +8 -4
  635. package/lib/typescript/models/sdk.d.ts +5 -0
  636. package/lib/typescript/native/signature/SignatureCapture.d.ts +1 -1
  637. package/lib/typescript/network/NetworkUtils.d.ts +1 -5
  638. package/lib/typescript/styles/SdkColors.d.ts +1 -0
  639. package/lib/typescript/styles/executionTasks/CommonStyles.d.ts +36 -0
  640. package/lib/typescript/ui/screens/ETScreensIndex.d.ts +3 -1
  641. package/lib/typescript/ui/screens/ScanScreen.d.ts +3 -0
  642. package/lib/typescript/ui/screens/ValidateOTPScreen.d.ts +3 -0
  643. package/lib/typescript/ui/uiConfig/RouteParams.d.ts +8 -0
  644. package/lib/typescript/utils/ApiUtils.d.ts +61 -0
  645. package/lib/typescript/utils/ExecTaskUtils.d.ts +7 -2
  646. package/lib/typescript/utils/NetworkUtil.d.ts +1 -1
  647. package/lib/typescript/utils/SyncManagerUtils.d.ts +3 -1
  648. package/lib/typescript/utils/hooks/useTimer.d.ts +5 -0
  649. package/lib/typescript/utils/storage.d.ts +17 -0
  650. package/package.json +23 -24
  651. package/tsconfig.json +9 -8
  652. package/file_unzip.js +0 -5
  653. package/mobile-execution-lib-0.6.4.tgz +0 -0
@@ -3,7 +3,6 @@ import Network from './../resources/network';
3
3
  *
4
4
  * @class Helper
5
5
  */
6
-
7
6
  class Helper {
8
7
  /**
9
8
  * Check the availability of a network for an app.
@@ -19,9 +18,7 @@ class Helper {
19
18
  return false;
20
19
  }
21
20
  }
22
-
23
21
  }
24
-
25
22
  const helper = new Helper();
26
23
  export default helper;
27
24
  //# sourceMappingURL=helper.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["Network","Helper","checkNetwork","heartBeat","e","helper"],"sources":["helper.ts"],"sourcesContent":["import Network from './../resources/network';\n/**\n *\n * @class Helper\n */\nclass Helper {\n /**\n * Check the availability of a network for an app.\n *\n * @returns {Promise<boolean>}\n */\n async checkNetwork(): Promise<boolean> {\n try {\n await Network.heartBeat();\n return true;\n } catch (e: any) {\n // console.log('checkNetwork catch', e);\n return false;\n }\n }\n}\n\nconst helper = new Helper();\nexport default helper;\n"],"mappings":"AAAA,OAAOA,OAAP,MAAoB,wBAApB;AACA;AACA;AACA;AACA;;AACA,MAAMC,MAAN,CAAa;EACX;AACF;AACA;AACA;AACA;EACoB,MAAZC,YAAY,GAAqB;IACrC,IAAI;MACF,MAAMF,OAAO,CAACG,SAAR,EAAN;MACA,OAAO,IAAP;IACD,CAHD,CAGE,OAAOC,CAAP,EAAe;MACf;MACA,OAAO,KAAP;IACD;EACF;;AAdU;;AAiBb,MAAMC,MAAM,GAAG,IAAIJ,MAAJ,EAAf;AACA,eAAeI,MAAf"}
1
+ {"version":3,"names":["Network","Helper","checkNetwork","heartBeat","e","helper"],"sources":["helper.ts"],"sourcesContent":["import Network from './../resources/network';\n/**\n *\n * @class Helper\n */\nclass Helper {\n /**\n * Check the availability of a network for an app.\n *\n * @returns {Promise<boolean>}\n */\n async checkNetwork(): Promise<boolean> {\n try {\n await Network.heartBeat();\n return true;\n } catch (e: any) {\n // console.log('checkNetwork catch', e);\n return false;\n }\n }\n}\n\nconst helper = new Helper();\nexport default helper;\n"],"mappings":"AAAA,OAAOA,OAAO,MAAM,wBAAwB;AAC5C;AACA;AACA;AACA;AACA,MAAMC,MAAM,CAAC;EACX;AACF;AACA;AACA;AACA;EACE,MAAMC,YAAYA,CAAA,EAAqB;IACrC,IAAI;MACF,MAAMF,OAAO,CAACG,SAAS,EAAE;MACzB,OAAO,IAAI;IACb,CAAC,CAAC,OAAOC,CAAM,EAAE;MACf;MACA,OAAO,KAAK;IACd;EACF;AACF;AAEA,MAAMC,MAAM,GAAG,IAAIJ,MAAM,EAAE;AAC3B,eAAeI,MAAM"}
@@ -0,0 +1,37 @@
1
+ import { useEffect, useState } from 'react';
2
+ const useTimer = props => {
3
+ const {
4
+ initialMinute = 0,
5
+ initialSeconds = 0
6
+ } = props;
7
+ const [minutes, setMinutes] = useState(initialMinute);
8
+ const [seconds, setSeconds] = useState(initialSeconds);
9
+ useEffect(() => {
10
+ let myInterval = setInterval(() => {
11
+ if (seconds > 0) {
12
+ setSeconds(seconds - 1);
13
+ }
14
+ if (seconds === 0) {
15
+ if (minutes === 0) {
16
+ clearInterval(myInterval);
17
+ } else {
18
+ setMinutes(minutes - 1);
19
+ setSeconds(59);
20
+ }
21
+ }
22
+ }, 1000);
23
+ return () => {
24
+ clearInterval(myInterval);
25
+ };
26
+ });
27
+ const resetTimer = () => {
28
+ if (!minutes && !seconds) {
29
+ setMinutes(initialMinute);
30
+ setSeconds(initialSeconds);
31
+ }
32
+ };
33
+ const timer = minutes === 0 && seconds === 0 ? null : `${minutes}: ${seconds < 10 ? `0${seconds}` : seconds}`;
34
+ return [timer, resetTimer];
35
+ };
36
+ export default useTimer;
37
+ //# sourceMappingURL=useTimer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useEffect","useState","useTimer","props","initialMinute","initialSeconds","minutes","setMinutes","seconds","setSeconds","myInterval","setInterval","clearInterval","resetTimer","timer"],"sources":["useTimer.ts"],"sourcesContent":["import { useEffect, useState } from 'react';\n\nconst useTimer = (props: {\n initialMinute: number;\n initialSeconds: number;\n}): [string | null, () => void] => {\n const { initialMinute = 0, initialSeconds = 0 } = props;\n const [minutes, setMinutes] = useState(initialMinute);\n const [seconds, setSeconds] = useState(initialSeconds);\n useEffect(() => {\n let myInterval = setInterval(() => {\n if (seconds > 0) {\n setSeconds(seconds - 1);\n }\n if (seconds === 0) {\n if (minutes === 0) {\n clearInterval(myInterval);\n } else {\n setMinutes(minutes - 1);\n setSeconds(59);\n }\n }\n }, 1000);\n return () => {\n clearInterval(myInterval);\n };\n });\n\n const resetTimer = () => {\n if (!minutes && !seconds) {\n setMinutes(initialMinute);\n setSeconds(initialSeconds);\n }\n };\n\n const timer =\n minutes === 0 && seconds === 0\n ? null\n : `${minutes}: ${seconds < 10 ? `0${seconds}` : seconds}`;\n\n return [timer, resetTimer];\n};\n\nexport default useTimer;\n"],"mappings":"AAAA,SAASA,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAE3C,MAAMC,QAAQ,GAAIC,KAGjB,IAAkC;EACjC,MAAM;IAAEC,aAAa,GAAG,CAAC;IAAEC,cAAc,GAAG;EAAE,CAAC,GAAGF,KAAK;EACvD,MAAM,CAACG,OAAO,EAAEC,UAAU,CAAC,GAAGN,QAAQ,CAACG,aAAa,CAAC;EACrD,MAAM,CAACI,OAAO,EAAEC,UAAU,CAAC,GAAGR,QAAQ,CAACI,cAAc,CAAC;EACtDL,SAAS,CAAC,MAAM;IACd,IAAIU,UAAU,GAAGC,WAAW,CAAC,MAAM;MACjC,IAAIH,OAAO,GAAG,CAAC,EAAE;QACfC,UAAU,CAACD,OAAO,GAAG,CAAC,CAAC;MACzB;MACA,IAAIA,OAAO,KAAK,CAAC,EAAE;QACjB,IAAIF,OAAO,KAAK,CAAC,EAAE;UACjBM,aAAa,CAACF,UAAU,CAAC;QAC3B,CAAC,MAAM;UACLH,UAAU,CAACD,OAAO,GAAG,CAAC,CAAC;UACvBG,UAAU,CAAC,EAAE,CAAC;QAChB;MACF;IACF,CAAC,EAAE,IAAI,CAAC;IACR,OAAO,MAAM;MACXG,aAAa,CAACF,UAAU,CAAC;IAC3B,CAAC;EACH,CAAC,CAAC;EAEF,MAAMG,UAAU,GAAGA,CAAA,KAAM;IACvB,IAAI,CAACP,OAAO,IAAI,CAACE,OAAO,EAAE;MACxBD,UAAU,CAACH,aAAa,CAAC;MACzBK,UAAU,CAACJ,cAAc,CAAC;IAC5B;EACF,CAAC;EAED,MAAMS,KAAK,GACTR,OAAO,KAAK,CAAC,IAAIE,OAAO,KAAK,CAAC,GAC1B,IAAI,GACH,GAAEF,OAAQ,KAAIE,OAAO,GAAG,EAAE,GAAI,IAAGA,OAAQ,EAAC,GAAGA,OAAQ,EAAC;EAE7D,OAAO,CAACM,KAAK,EAAED,UAAU,CAAC;AAC5B,CAAC;AAED,eAAeX,QAAQ"}
@@ -4,57 +4,47 @@
4
4
  *
5
5
  * @class LoginHelper
6
6
  */
7
- import Auth from '../resources/Login';
8
7
 
8
+ import Auth from '../resources/Login';
9
9
  class LoginHelper {
10
10
  async initLogin(loginPayload, loginType) {
11
11
  try {
12
12
  let loginResponse;
13
-
14
13
  switch (loginType) {
15
14
  case 'mobilePassword':
16
15
  loginResponse = await Auth.loginMobilePassword(loginPayload);
17
16
  break;
18
-
19
17
  case 'mobileOtp':
20
18
  loginResponse = await Auth.loginMobileOtp(loginPayload);
21
19
  break;
22
-
23
20
  case 'mPin':
24
21
  loginResponse = await Auth.loginMpin(loginPayload);
25
22
  break;
26
-
27
23
  case 'usernamePassword':
28
24
  loginResponse = await Auth.loginUserName(loginPayload);
29
25
  break;
30
-
31
26
  case 'clientCredential':
32
27
  loginResponse = await Auth.loginCredential(loginPayload);
33
28
  break;
34
-
35
29
  default:
36
30
  break;
37
- } // await Storage.setObject('LoginResponse', loginResponse);
38
-
39
-
31
+ }
32
+ // await Storage.setObject('LoginResponse', loginResponse);
40
33
  return loginResponse;
41
34
  } catch (e) {
42
35
  // Flush all storage
43
36
  throw new Error(e);
44
37
  }
45
38
  }
46
-
47
39
  async handleAccessTokenExpiry() {
48
40
  const data = {
49
- tenant: '',
50
- appName: '',
51
- applicationSecret: ''
41
+ tenant: 'delhivery',
42
+ appName: 'user-auth',
43
+ applicationSecret: 'c8fda076-c0ab-4afd-b357-ecfba4dad6f8'
52
44
  };
53
45
  await Auth.refreshToken(data);
54
46
  }
55
-
56
47
  }
57
-
58
48
  const loginHelper = new LoginHelper();
59
49
  export default loginHelper;
60
50
  //# sourceMappingURL=loginHelper.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["Auth","LoginHelper","initLogin","loginPayload","loginType","loginResponse","loginMobilePassword","loginMobileOtp","loginMpin","loginUserName","loginCredential","e","Error","handleAccessTokenExpiry","data","tenant","appName","applicationSecret","refreshToken","loginHelper"],"sources":["loginHelper.ts"],"sourcesContent":["/**\n * Creating a wrapper arround localstorage as https://reactnative.dev/docs/asyncstorage\n *\n *\n * @class LoginHelper\n */\nimport type { LoginPayload, LoginType } from '../models/auth';\nimport Auth from '../resources/Login';\nclass LoginHelper {\n async initLogin(loginPayload: LoginPayload, loginType: LoginType) {\n try {\n let loginResponse: any;\n switch (loginType) {\n case 'mobilePassword':\n loginResponse = await Auth.loginMobilePassword(loginPayload);\n break;\n case 'mobileOtp':\n loginResponse = await Auth.loginMobileOtp(loginPayload);\n break;\n case 'mPin':\n loginResponse = await Auth.loginMpin(loginPayload);\n break;\n case 'usernamePassword':\n loginResponse = await Auth.loginUserName(loginPayload);\n break;\n case 'clientCredential':\n loginResponse = await Auth.loginCredential(loginPayload);\n break;\n default:\n break;\n }\n // await Storage.setObject('LoginResponse', loginResponse);\n return loginResponse;\n } catch (e: any) {\n // Flush all storage\n throw new Error(e);\n }\n }\n\n async handleAccessTokenExpiry() {\n const data: any = {\n tenant: '',\n appName: '',\n applicationSecret: '',\n };\n await Auth.refreshToken(data);\n }\n}\n\nconst loginHelper = new LoginHelper();\nexport default loginHelper;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AAEA,OAAOA,IAAP,MAAiB,oBAAjB;;AACA,MAAMC,WAAN,CAAkB;EACD,MAATC,SAAS,CAACC,YAAD,EAA6BC,SAA7B,EAAmD;IAChE,IAAI;MACF,IAAIC,aAAJ;;MACA,QAAQD,SAAR;QACE,KAAK,gBAAL;UACEC,aAAa,GAAG,MAAML,IAAI,CAACM,mBAAL,CAAyBH,YAAzB,CAAtB;UACA;;QACF,KAAK,WAAL;UACEE,aAAa,GAAG,MAAML,IAAI,CAACO,cAAL,CAAoBJ,YAApB,CAAtB;UACA;;QACF,KAAK,MAAL;UACEE,aAAa,GAAG,MAAML,IAAI,CAACQ,SAAL,CAAeL,YAAf,CAAtB;UACA;;QACF,KAAK,kBAAL;UACEE,aAAa,GAAG,MAAML,IAAI,CAACS,aAAL,CAAmBN,YAAnB,CAAtB;UACA;;QACF,KAAK,kBAAL;UACEE,aAAa,GAAG,MAAML,IAAI,CAACU,eAAL,CAAqBP,YAArB,CAAtB;UACA;;QACF;UACE;MAjBJ,CAFE,CAqBF;;;MACA,OAAOE,aAAP;IACD,CAvBD,CAuBE,OAAOM,CAAP,EAAe;MACf;MACA,MAAM,IAAIC,KAAJ,CAAUD,CAAV,CAAN;IACD;EACF;;EAE4B,MAAvBE,uBAAuB,GAAG;IAC9B,MAAMC,IAAS,GAAG;MAChBC,MAAM,EAAE,EADQ;MAEhBC,OAAO,EAAE,EAFO;MAGhBC,iBAAiB,EAAE;IAHH,CAAlB;IAKA,MAAMjB,IAAI,CAACkB,YAAL,CAAkBJ,IAAlB,CAAN;EACD;;AAtCe;;AAyClB,MAAMK,WAAW,GAAG,IAAIlB,WAAJ,EAApB;AACA,eAAekB,WAAf"}
1
+ {"version":3,"names":["Auth","LoginHelper","initLogin","loginPayload","loginType","loginResponse","loginMobilePassword","loginMobileOtp","loginMpin","loginUserName","loginCredential","e","Error","handleAccessTokenExpiry","data","tenant","appName","applicationSecret","refreshToken","loginHelper"],"sources":["loginHelper.ts"],"sourcesContent":["/**\n * Creating a wrapper arround localstorage as https://reactnative.dev/docs/asyncstorage\n *\n *\n * @class LoginHelper\n */\nimport type { LoginPayload, LoginType } from '../models/auth';\nimport Auth from '../resources/Login';\nclass LoginHelper {\n async initLogin(loginPayload: LoginPayload, loginType: LoginType) {\n try {\n let loginResponse: any;\n switch (loginType) {\n case 'mobilePassword':\n loginResponse = await Auth.loginMobilePassword(loginPayload);\n break;\n case 'mobileOtp':\n loginResponse = await Auth.loginMobileOtp(loginPayload);\n break;\n case 'mPin':\n loginResponse = await Auth.loginMpin(loginPayload);\n break;\n case 'usernamePassword':\n loginResponse = await Auth.loginUserName(loginPayload);\n break;\n case 'clientCredential':\n loginResponse = await Auth.loginCredential(loginPayload);\n break;\n default:\n break;\n }\n // await Storage.setObject('LoginResponse', loginResponse);\n return loginResponse;\n } catch (e: any) {\n // Flush all storage\n throw new Error(e);\n }\n }\n\n async handleAccessTokenExpiry() {\n const data: any = {\n tenant: 'delhivery',\n appName: 'user-auth',\n applicationSecret: 'c8fda076-c0ab-4afd-b357-ecfba4dad6f8',\n };\n await Auth.refreshToken(data);\n }\n}\n\nconst loginHelper = new LoginHelper();\nexport default loginHelper;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,IAAI,MAAM,oBAAoB;AACrC,MAAMC,WAAW,CAAC;EAChB,MAAMC,SAASA,CAACC,YAA0B,EAAEC,SAAoB,EAAE;IAChE,IAAI;MACF,IAAIC,aAAkB;MACtB,QAAQD,SAAS;QACf,KAAK,gBAAgB;UACnBC,aAAa,GAAG,MAAML,IAAI,CAACM,mBAAmB,CAACH,YAAY,CAAC;UAC5D;QACF,KAAK,WAAW;UACdE,aAAa,GAAG,MAAML,IAAI,CAACO,cAAc,CAACJ,YAAY,CAAC;UACvD;QACF,KAAK,MAAM;UACTE,aAAa,GAAG,MAAML,IAAI,CAACQ,SAAS,CAACL,YAAY,CAAC;UAClD;QACF,KAAK,kBAAkB;UACrBE,aAAa,GAAG,MAAML,IAAI,CAACS,aAAa,CAACN,YAAY,CAAC;UACtD;QACF,KAAK,kBAAkB;UACrBE,aAAa,GAAG,MAAML,IAAI,CAACU,eAAe,CAACP,YAAY,CAAC;UACxD;QACF;UACE;MAAM;MAEV;MACA,OAAOE,aAAa;IACtB,CAAC,CAAC,OAAOM,CAAM,EAAE;MACf;MACA,MAAM,IAAIC,KAAK,CAACD,CAAC,CAAC;IACpB;EACF;EAEA,MAAME,uBAAuBA,CAAA,EAAG;IAC9B,MAAMC,IAAS,GAAG;MAChBC,MAAM,EAAE,WAAW;MACnBC,OAAO,EAAE,WAAW;MACpBC,iBAAiB,EAAE;IACrB,CAAC;IACD,MAAMjB,IAAI,CAACkB,YAAY,CAACJ,IAAI,CAAC;EAC/B;AACF;AAEA,MAAMK,WAAW,GAAG,IAAIlB,WAAW,EAAE;AACrC,eAAekB,WAAW"}
@@ -1,24 +1,24 @@
1
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
-
1
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
3
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
3
4
  import { LOCAL_STORAGE_KEY_PREFIX } from './../constants/constants';
4
5
  import AsyncStorage from '@react-native-async-storage/async-storage';
6
+ import Logger, { LOG_TYPE } from './Logger';
5
7
  /**
6
8
  * Creating a wrapper arround localstorage as https://reactnative.dev/docs/asyncstorage
7
9
  * depreciated using communiity package instead https://github.com/react-native-async-storage/async-storage
8
10
  *
9
11
  * @class Storage
10
12
  */
11
-
12
13
  class Storage {
13
14
  // private prefixKey: string;
14
- constructor() {}
15
15
 
16
+ constructor() {}
16
17
  static getInstance() {
17
18
  if (!this.classInstance) {
18
19
  this.classInstance = new Storage();
19
20
  Storage.prefixKey = LOCAL_STORAGE_KEY_PREFIX;
20
21
  }
21
-
22
22
  return this.classInstance;
23
23
  }
24
24
  /**
@@ -27,38 +27,32 @@ class Storage {
27
27
  * @param {string} key
28
28
  * @returns {Promise<string | null>}
29
29
  */
30
-
31
-
32
30
  async getItem(key) {
33
31
  if (!key) {
34
32
  throw new TypeError('In-valid params.');
35
33
  }
36
-
37
34
  return await AsyncStorage.getItem(Storage.prefixKey + key);
38
35
  }
36
+
39
37
  /**
40
38
  * Save a single itema
41
39
  *
42
40
  * @param {string} key
43
41
  * @returns {Promise<void>}
44
42
  */
45
-
46
-
47
43
  async setItem(key, value) {
48
44
  if (!(key && value)) {
49
45
  throw TypeError('In-valid params.');
50
46
  }
51
-
52
47
  return await AsyncStorage.setItem(Storage.prefixKey + key, value);
53
48
  }
49
+
54
50
  /**
55
51
  * Save a Object
56
52
  *
57
53
  * @param {string} key
58
54
  * @returns {Promise<{}|[]>}
59
55
  */
60
-
61
-
62
56
  async setObject(key, value) {
63
57
  if (!key) {
64
58
  throw TypeError('In-valid params.');
@@ -66,6 +60,27 @@ class Storage {
66
60
  return await AsyncStorage.setItem(Storage.prefixKey + key, JSON.stringify(value));
67
61
  }
68
62
  }
63
+
64
+ /**
65
+ *
66
+ * @param input: Array<MultiObject>
67
+ * @returns
68
+ */
69
+ async setMultiObject(input) {
70
+ if (input.some(arg => !(arg.key && arg.value) && typeof arg.value !== 'object' || Array.isArray(arg.value) && arg.value.length === 0 || Object.keys(arg.value).length === 0)) {
71
+ throw TypeError(`In-valid params: ${input}`);
72
+ } else {
73
+ try {
74
+ return await AsyncStorage.multiSet(input.map(arg => {
75
+ const v = [Storage.prefixKey + arg.key, JSON.stringify(arg.value)];
76
+ return v;
77
+ }));
78
+ } catch (error) {
79
+ Logger.getInstance().logEvent('~ setMultiObject Async Storage', 'Unable to multiSet data in Async Storage', LOG_TYPE.SDK_ERROR);
80
+ }
81
+ }
82
+ }
83
+
69
84
  /**
70
85
  * Get an Object
71
86
  *
@@ -73,15 +88,11 @@ class Storage {
73
88
  * @returns {Promise<void>}
74
89
  */
75
90
  // the return type of the function could be made as Generic
76
-
77
-
78
91
  async getObject(key) {
79
92
  if (!key) {
80
93
  throw new TypeError('In-valid params.');
81
94
  }
82
-
83
95
  let val = await AsyncStorage.getItem(Storage.prefixKey + key);
84
-
85
96
  if (val !== null) {
86
97
  const obj = JSON.parse(val);
87
98
  return obj;
@@ -89,27 +100,43 @@ class Storage {
89
100
  return null;
90
101
  }
91
102
  }
103
+
104
+ /**
105
+ * Get an Object
106
+ *
107
+ * @param {string} keys
108
+ * @returns {Promise<void>}
109
+ */
110
+
111
+ async getMultiObject(keys) {
112
+ if (!keys) {
113
+ throw new TypeError(`Read In-valid params: ${keys}`);
114
+ }
115
+ let items = await AsyncStorage.multiGet(keys.map(key => Storage.prefixKey + key));
116
+ if (items) {
117
+ return items.map(i => {
118
+ if (i[1]) return [i[0], JSON.parse(i[1])];else return [i[0], null];
119
+ });
120
+ } else {
121
+ return [[]];
122
+ }
123
+ }
92
124
  /**
93
125
  * Deletes a single item
94
126
  * @param {string} key
95
127
  * @returns {Promise<void>}
96
128
  */
97
129
  // need to handle cases for wrongs keys
98
-
99
-
100
130
  async deleteItem(key) {
101
131
  if (!key) {
102
132
  throw new TypeError('In-valid params.');
103
133
  }
104
-
105
134
  await AsyncStorage.removeItem(Storage.prefixKey + key);
106
135
  }
107
-
108
136
  async deleteMultiple(keys) {
109
137
  if (!keys || keys.length === 0) {
110
138
  throw new TypeError('In-valid params.');
111
139
  }
112
-
113
140
  const alteredKeys = keys.map(k => {
114
141
  if (k.startsWith(Storage.prefixKey)) {
115
142
  return k;
@@ -119,24 +146,19 @@ class Storage {
119
146
  });
120
147
  await AsyncStorage.multiRemove(alteredKeys);
121
148
  }
122
-
123
149
  async getAllKeys(prefix) {
124
150
  if (!prefix) {
125
151
  throw new TypeError('In-valid params.');
126
152
  }
127
-
128
153
  const keys = await AsyncStorage.getAllKeys();
129
154
  return keys.filter(key => {
130
155
  return key.startsWith(Storage.prefixKey + prefix);
131
156
  });
132
157
  }
158
+ }
133
159
 
134
- } // const storage = new Storage();
135
-
136
-
160
+ // const storage = new Storage();
137
161
  _defineProperty(Storage, "classInstance", void 0);
138
-
139
162
  _defineProperty(Storage, "prefixKey", void 0);
140
-
141
163
  export default Storage;
142
164
  //# sourceMappingURL=storage.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["LOCAL_STORAGE_KEY_PREFIX","AsyncStorage","Storage","constructor","getInstance","classInstance","prefixKey","getItem","key","TypeError","setItem","value","setObject","JSON","stringify","getObject","val","obj","parse","deleteItem","removeItem","deleteMultiple","keys","length","alteredKeys","map","k","startsWith","multiRemove","getAllKeys","prefix","filter"],"sources":["storage.ts"],"sourcesContent":["import { LOCAL_STORAGE_KEY_PREFIX } from './../constants/constants';\nimport AsyncStorage from '@react-native-async-storage/async-storage';\n\n/**\n * Creating a wrapper arround localstorage as https://reactnative.dev/docs/asyncstorage\n * depreciated using communiity package instead https://github.com/react-native-async-storage/async-storage\n *\n * @class Storage\n */\nclass Storage {\n private static classInstance?: Storage;\n // private prefixKey: string;\n static prefixKey: string;\n private constructor() {}\n\n public static getInstance(): Storage {\n if (!this.classInstance) {\n this.classInstance = new Storage();\n Storage.prefixKey = LOCAL_STORAGE_KEY_PREFIX;\n }\n return this.classInstance;\n }\n /**\n * Get a single item\n *\n * @param {string} key\n * @returns {Promise<string | null>}\n */\n async getItem(key: string): Promise<string | null> {\n if (!key) {\n throw new TypeError('In-valid params.');\n }\n return await AsyncStorage.getItem(Storage.prefixKey + key);\n }\n\n /**\n * Save a single itema\n *\n * @param {string} key\n * @returns {Promise<void>}\n */\n async setItem(key: string, value: string): Promise<void> {\n if (!(key && value)) {\n throw TypeError('In-valid params.');\n }\n return await AsyncStorage.setItem(Storage.prefixKey + key, value);\n }\n\n /**\n * Save a Object\n *\n * @param {string} key\n * @returns {Promise<{}|[]>}\n */\n async setObject(key: string, value: {} | []): Promise<void> {\n if (!key) {\n throw TypeError('In-valid params.');\n } else {\n return await AsyncStorage.setItem(\n Storage.prefixKey + key,\n JSON.stringify(value)\n );\n }\n }\n\n /**\n * Get an Object\n *\n * @param {string} key\n * @returns {Promise<void>}\n */\n // the return type of the function could be made as Generic\n async getObject(key: string): Promise<{} | [] | null> {\n if (!key) {\n throw new TypeError('In-valid params.');\n }\n let val: string | null = await AsyncStorage.getItem(\n Storage.prefixKey + key\n );\n if (val !== null) {\n const obj = JSON.parse(val);\n return obj;\n } else {\n return null;\n }\n }\n /**\n * Deletes a single item\n * @param {string} key\n * @returns {Promise<void>}\n */\n // need to handle cases for wrongs keys\n async deleteItem(key: string): Promise<void> {\n if (!key) {\n throw new TypeError('In-valid params.');\n }\n await AsyncStorage.removeItem(Storage.prefixKey + key);\n }\n\n async deleteMultiple(keys: string[]) {\n if (!keys || keys.length === 0) {\n throw new TypeError('In-valid params.');\n }\n const alteredKeys = keys.map((k) => {\n if (k.startsWith(Storage.prefixKey)) {\n return k;\n } else {\n return Storage.prefixKey + k;\n }\n });\n await AsyncStorage.multiRemove(alteredKeys);\n }\n async getAllKeys(prefix: string): Promise<string[]> {\n if (!prefix) {\n throw new TypeError('In-valid params.');\n }\n const keys = await AsyncStorage.getAllKeys();\n return keys.filter((key) => {\n return key.startsWith(Storage.prefixKey + prefix);\n });\n }\n}\n\n// const storage = new Storage();\nexport default Storage;\n"],"mappings":"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"}
1
+ {"version":3,"names":["LOCAL_STORAGE_KEY_PREFIX","AsyncStorage","Logger","LOG_TYPE","Storage","constructor","getInstance","classInstance","prefixKey","getItem","key","TypeError","setItem","value","setObject","JSON","stringify","setMultiObject","input","some","arg","Array","isArray","length","Object","keys","multiSet","map","v","error","logEvent","SDK_ERROR","getObject","val","obj","parse","getMultiObject","items","multiGet","i","deleteItem","removeItem","deleteMultiple","alteredKeys","k","startsWith","multiRemove","getAllKeys","prefix","filter","_defineProperty"],"sources":["storage.ts"],"sourcesContent":["import { LOCAL_STORAGE_KEY_PREFIX } from './../constants/constants';\nimport AsyncStorage from '@react-native-async-storage/async-storage';\nimport Logger, { LOG_TYPE } from './Logger';\n\ninterface MultiObject {\n key: string;\n value: {} | [];\n}\n\n/**\n * Creating a wrapper arround localstorage as https://reactnative.dev/docs/asyncstorage\n * depreciated using communiity package instead https://github.com/react-native-async-storage/async-storage\n *\n * @class Storage\n */\nclass Storage {\n private static classInstance?: Storage;\n // private prefixKey: string;\n static prefixKey: string;\n private constructor() {}\n\n public static getInstance(): Storage {\n if (!this.classInstance) {\n this.classInstance = new Storage();\n Storage.prefixKey = LOCAL_STORAGE_KEY_PREFIX;\n }\n return this.classInstance;\n }\n /**\n * Get a single item\n *\n * @param {string} key\n * @returns {Promise<string | null>}\n */\n async getItem(key: string): Promise<string | null> {\n if (!key) {\n throw new TypeError('In-valid params.');\n }\n return await AsyncStorage.getItem(Storage.prefixKey + key);\n }\n\n /**\n * Save a single itema\n *\n * @param {string} key\n * @returns {Promise<void>}\n */\n async setItem(key: string, value: string): Promise<void> {\n if (!(key && value)) {\n throw TypeError('In-valid params.');\n }\n return await AsyncStorage.setItem(Storage.prefixKey + key, value);\n }\n\n /**\n * Save a Object\n *\n * @param {string} key\n * @returns {Promise<{}|[]>}\n */\n async setObject(key: string, value: {} | []): Promise<void> {\n if (!key) {\n throw TypeError('In-valid params.');\n } else {\n return await AsyncStorage.setItem(\n Storage.prefixKey + key,\n JSON.stringify(value)\n );\n }\n }\n\n /**\n *\n * @param input: Array<MultiObject>\n * @returns\n */\n async setMultiObject(input: Array<MultiObject>): Promise<void> {\n if (\n input.some(\n (arg) =>\n (!(arg.key && arg.value) && typeof arg.value !== 'object') ||\n (Array.isArray(arg.value) && arg.value.length === 0) ||\n Object.keys(arg.value).length === 0\n )\n ) {\n throw TypeError(`In-valid params: ${input}`);\n } else {\n try {\n return await AsyncStorage.multiSet(\n input.map((arg) => {\n const v: [string, string] = [\n Storage.prefixKey + arg.key,\n JSON.stringify(arg.value),\n ];\n return v;\n })\n );\n } catch (error) {\n Logger.getInstance().logEvent(\n '~ setMultiObject Async Storage',\n 'Unable to multiSet data in Async Storage',\n LOG_TYPE.SDK_ERROR\n );\n }\n }\n }\n\n /**\n * Get an Object\n *\n * @param {string} key\n * @returns {Promise<void>}\n */\n // the return type of the function could be made as Generic\n async getObject(key: string): Promise<{} | [] | null> {\n if (!key) {\n throw new TypeError('In-valid params.');\n }\n let val: string | null = await AsyncStorage.getItem(\n Storage.prefixKey + key\n );\n if (val !== null) {\n const obj = JSON.parse(val);\n return obj;\n } else {\n return null;\n }\n }\n\n /**\n * Get an Object\n *\n * @param {string} keys\n * @returns {Promise<void>}\n */\n\n async getMultiObject(keys: string[]): Promise<any[][]> {\n if (!keys) {\n throw new TypeError(`Read In-valid params: ${keys}`);\n }\n let items = await AsyncStorage.multiGet(\n keys.map((key) => Storage.prefixKey + key)\n );\n if (items) {\n return items.map((i) => {\n if (i[1]) return [i[0], JSON.parse(i[1])];\n else return [i[0], null];\n });\n } else {\n return [[]];\n }\n }\n /**\n * Deletes a single item\n * @param {string} key\n * @returns {Promise<void>}\n */\n // need to handle cases for wrongs keys\n async deleteItem(key: string): Promise<void> {\n if (!key) {\n throw new TypeError('In-valid params.');\n }\n await AsyncStorage.removeItem(Storage.prefixKey + key);\n }\n\n async deleteMultiple(keys: string[]) {\n if (!keys || keys.length === 0) {\n throw new TypeError('In-valid params.');\n }\n const alteredKeys = keys.map((k) => {\n if (k.startsWith(Storage.prefixKey)) {\n return k;\n } else {\n return Storage.prefixKey + k;\n }\n });\n await AsyncStorage.multiRemove(alteredKeys);\n }\n async getAllKeys(prefix: string): Promise<string[]> {\n if (!prefix) {\n throw new TypeError('In-valid params.');\n }\n const keys = await AsyncStorage.getAllKeys();\n return keys.filter((key) => {\n return key.startsWith(Storage.prefixKey + prefix);\n });\n }\n}\n\n// const storage = new Storage();\nexport default Storage;\n"],"mappings":"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"}
@@ -5,16 +5,18 @@ export function isEmptyOrBlank(str) {
5
5
  export function isMandatoryKeysPresent(obj, keys) {
6
6
  if (!obj) return false;
7
7
  if ((keys === null || keys === void 0 ? void 0 : keys.length) === 0) return true;
8
-
9
8
  for (let i = 0; i < keys.length; i++) {
10
9
  // @ts-ignore
11
- if ( // @ts-ignore
12
- !(keys[i] in obj) || // @ts-ignore
13
- obj[keys[i]] === null || // @ts-ignore
14
- obj[keys[i]] === undefined || // @ts-ignore
10
+ if (
11
+ // @ts-ignore
12
+ !(keys[i] in obj) ||
13
+ // @ts-ignore
14
+ obj[keys[i]] === null ||
15
+ // @ts-ignore
16
+ obj[keys[i]] === undefined ||
17
+ // @ts-ignore
15
18
  obj[keys[i]] === '') return false;
16
19
  }
17
-
18
20
  return true;
19
21
  }
20
22
  export function isTokenExpired(accessToken) {
@@ -1 +1 @@
1
- {"version":3,"names":["jwtDecode","isEmptyOrBlank","str","length","test","isMandatoryKeysPresent","obj","keys","i","undefined","isTokenExpired","accessToken","decodedData","exp","Date","now"],"sources":["utils.ts"],"sourcesContent":["import jwtDecode from 'jwt-decode';\n\nexport function isEmptyOrBlank(str: string | null | undefined) {\n return !str || str.length === 0 || /^\\s*$/.test(str);\n}\n\nexport function isMandatoryKeysPresent(obj: object, keys: string[]): boolean {\n if (!obj) return false;\n if (keys?.length === 0) return true;\n for (let i = 0; i < keys.length; i++) {\n // @ts-ignore\n if (\n // @ts-ignore\n !(keys[i] in obj) ||\n // @ts-ignore\n obj[keys[i]] === null ||\n // @ts-ignore\n obj[keys[i]] === undefined ||\n // @ts-ignore\n obj[keys[i]] === ''\n )\n return false;\n }\n return true;\n}\n\nexport function isTokenExpired(accessToken: string) {\n let decodedData: any = jwtDecode(accessToken);\n return !(decodedData && decodedData.exp * 1000 > Date.now());\n}\n"],"mappings":"AAAA,OAAOA,SAAP,MAAsB,YAAtB;AAEA,OAAO,SAASC,cAAT,CAAwBC,GAAxB,EAAwD;EAC7D,OAAO,CAACA,GAAD,IAAQA,GAAG,CAACC,MAAJ,KAAe,CAAvB,IAA4B,QAAQC,IAAR,CAAaF,GAAb,CAAnC;AACD;AAED,OAAO,SAASG,sBAAT,CAAgCC,GAAhC,EAA6CC,IAA7C,EAAsE;EAC3E,IAAI,CAACD,GAAL,EAAU,OAAO,KAAP;EACV,IAAI,CAAAC,IAAI,SAAJ,IAAAA,IAAI,WAAJ,YAAAA,IAAI,CAAEJ,MAAN,MAAiB,CAArB,EAAwB,OAAO,IAAP;;EACxB,KAAK,IAAIK,CAAC,GAAG,CAAb,EAAgBA,CAAC,GAAGD,IAAI,CAACJ,MAAzB,EAAiCK,CAAC,EAAlC,EAAsC;IACpC;IACA,KACE;IACA,EAAED,IAAI,CAACC,CAAD,CAAJ,IAAWF,GAAb,KACA;IACAA,GAAG,CAACC,IAAI,CAACC,CAAD,CAAL,CAAH,KAAiB,IAFjB,IAGA;IACAF,GAAG,CAACC,IAAI,CAACC,CAAD,CAAL,CAAH,KAAiBC,SAJjB,IAKA;IACAH,GAAG,CAACC,IAAI,CAACC,CAAD,CAAL,CAAH,KAAiB,EARnB,EAUE,OAAO,KAAP;EACH;;EACD,OAAO,IAAP;AACD;AAED,OAAO,SAASE,cAAT,CAAwBC,WAAxB,EAA6C;EAClD,IAAIC,WAAgB,GAAGZ,SAAS,CAACW,WAAD,CAAhC;EACA,OAAO,EAAEC,WAAW,IAAIA,WAAW,CAACC,GAAZ,GAAkB,IAAlB,GAAyBC,IAAI,CAACC,GAAL,EAA1C,CAAP;AACD"}
1
+ {"version":3,"names":["jwtDecode","isEmptyOrBlank","str","length","test","isMandatoryKeysPresent","obj","keys","i","undefined","isTokenExpired","accessToken","decodedData","exp","Date","now"],"sources":["utils.ts"],"sourcesContent":["import jwtDecode from 'jwt-decode';\n\nexport function isEmptyOrBlank(str: string | null | undefined) {\n return !str || str.length === 0 || /^\\s*$/.test(str);\n}\n\nexport function isMandatoryKeysPresent(obj: object, keys: string[]): boolean {\n if (!obj) return false;\n if (keys?.length === 0) return true;\n for (let i = 0; i < keys.length; i++) {\n // @ts-ignore\n if (\n // @ts-ignore\n !(keys[i] in obj) ||\n // @ts-ignore\n obj[keys[i]] === null ||\n // @ts-ignore\n obj[keys[i]] === undefined ||\n // @ts-ignore\n obj[keys[i]] === ''\n )\n return false;\n }\n return true;\n}\n\nexport function isTokenExpired(accessToken: string) {\n let decodedData: any = jwtDecode(accessToken);\n return !(decodedData && decodedData.exp * 1000 > Date.now());\n}\n"],"mappings":"AAAA,OAAOA,SAAS,MAAM,YAAY;AAElC,OAAO,SAASC,cAAcA,CAACC,GAA8B,EAAE;EAC7D,OAAO,CAACA,GAAG,IAAIA,GAAG,CAACC,MAAM,KAAK,CAAC,IAAI,OAAO,CAACC,IAAI,CAACF,GAAG,CAAC;AACtD;AAEA,OAAO,SAASG,sBAAsBA,CAACC,GAAW,EAAEC,IAAc,EAAW;EAC3E,IAAI,CAACD,GAAG,EAAE,OAAO,KAAK;EACtB,IAAI,CAAAC,IAAI,aAAJA,IAAI,uBAAJA,IAAI,CAAEJ,MAAM,MAAK,CAAC,EAAE,OAAO,IAAI;EACnC,KAAK,IAAIK,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGD,IAAI,CAACJ,MAAM,EAAEK,CAAC,EAAE,EAAE;IACpC;IACA;IACE;IACA,EAAED,IAAI,CAACC,CAAC,CAAC,IAAIF,GAAG,CAAC;IACjB;IACAA,GAAG,CAACC,IAAI,CAACC,CAAC,CAAC,CAAC,KAAK,IAAI;IACrB;IACAF,GAAG,CAACC,IAAI,CAACC,CAAC,CAAC,CAAC,KAAKC,SAAS;IAC1B;IACAH,GAAG,CAACC,IAAI,CAACC,CAAC,CAAC,CAAC,KAAK,EAAE,EAEnB,OAAO,KAAK;EAChB;EACA,OAAO,IAAI;AACb;AAEA,OAAO,SAASE,cAAcA,CAACC,WAAmB,EAAE;EAClD,IAAIC,WAAgB,GAAGZ,SAAS,CAACW,WAAW,CAAC;EAC7C,OAAO,EAAEC,WAAW,IAAIA,WAAW,CAACC,GAAG,GAAG,IAAI,GAAGC,IAAI,CAACC,GAAG,EAAE,CAAC;AAC9D"}
@@ -1,5 +1,5 @@
1
1
  import type { BaseETResponse } from '../../models/execTasks/ETBaseModels';
2
- export declare type CompletedWFResponse = BaseETResponse & {
2
+ export type CompletedWFResponse = BaseETResponse & {
3
3
  /**
4
4
  * Last Event code
5
5
  */
@@ -12,7 +12,7 @@ export declare type CompletedWFResponse = BaseETResponse & {
12
12
  /**
13
13
  * Can go back
14
14
  */
15
- export declare type CanGoBack = boolean;
15
+ export type CanGoBack = boolean;
16
16
  export interface CompletedWFRequest {
17
17
  canGoBack?: CanGoBack;
18
18
  }
@@ -38,5 +38,9 @@ import ScanList from './scanner/returns/ScanList';
38
38
  import CScanner from './scanner/CScanner';
39
39
  import RTReasonSelection from './scanner/returns/RTReasonSelection';
40
40
  import HttpRequestET from './httpRequest/HttpRequestET';
41
- export type { CancellationInput, CancellationOutput, DeliverETInput, DeliverOutput, LineItem, DeliverRemarks, DisplayETInput, DisplayETOutput, SignatureInput, SignatureOutput, FormInputSchema, FormOutputSchema, CaptureOutput, CaptureInput, VerifyLocationOutput, VerifyLocationInput, CompletePaymentInput, CompletePaymentOutput, InitPaymentInput, InitPaymentOutput, ProcessPaymentInput, ProcessPaymentOutput, PickupETInput, PickupETOutput, ScannerInput, ScannerOutput, BaseETResponse, OtpInputSchema, OtpOutputSchema, CaptureTextInput, CaptureTextOutput, VerifyInput, VerifyInputResponse, DropCashInput, DropCashOutput, };
42
- export { CancelET, DeliverET, DisplayModalET, SignatureET, FormGenerator, ImageCapture, VerifyLocationET, verifyLocation, PickupET, VerifyOtpET, CaptureText, InitPaymentET, ProcessPaymentET, DropCashET, CompletePaymentET, SLDeliverET, SLPickupET, SLDropCash, RTScan, ScanList, CScanner, RTReasonSelection, HttpRequestET, };
41
+ import ScanET from './scan/ScanET';
42
+ import ValidateOTPET from './validateOTP/ValidateOTPET';
43
+ import type { ScannerInput as SLScannerInput, ScannerOutput as SLScannerOutput } from './scan/ScanSchema';
44
+ import type { ValidateOTPInput, ValidateOTPOutput } from './validateOTP/ValidateOTPSchema';
45
+ export type { CancellationInput, CancellationOutput, DeliverETInput, DeliverOutput, LineItem, DeliverRemarks, DisplayETInput, DisplayETOutput, SignatureInput, SignatureOutput, FormInputSchema, FormOutputSchema, CaptureOutput, CaptureInput, VerifyLocationOutput, VerifyLocationInput, CompletePaymentInput, CompletePaymentOutput, InitPaymentInput, InitPaymentOutput, ProcessPaymentInput, ProcessPaymentOutput, PickupETInput, PickupETOutput, ScannerInput, ScannerOutput, BaseETResponse, OtpInputSchema, OtpOutputSchema, CaptureTextInput, CaptureTextOutput, VerifyInput, VerifyInputResponse, DropCashInput, DropCashOutput, SLScannerInput, SLScannerOutput, ValidateOTPInput, ValidateOTPOutput, };
46
+ export { CancelET, DeliverET, DisplayModalET, SignatureET, FormGenerator, ImageCapture, VerifyLocationET, verifyLocation, PickupET, VerifyOtpET, CaptureText, InitPaymentET, ProcessPaymentET, DropCashET, CompletePaymentET, SLDeliverET, SLPickupET, SLDropCash, RTScan, ScanList, CScanner, RTReasonSelection, HttpRequestET, ScanET, ValidateOTPET, };
@@ -1,12 +1,17 @@
1
1
  /**
2
2
  * List of reasons for cancellation
3
3
  */
4
- import type { BaseETResponse } from '../../../models/execTasks/ETBaseModels';
5
- export declare type CancellationReasons = string[];
4
+ import type { EventsRow, ReasonsRow } from '../../../manager/syncmanager/DBConfig';
5
+ import type { ApplicableReasons, BaseETResponse } from '../../../models/execTasks/ETBaseModels';
6
+ export type CancellationReasons = string[];
6
7
  export interface CancellationInput {
7
- cancellationReasons: CancellationReasons;
8
- onSubmitET: (reason: string) => void;
8
+ cancelEvent: string;
9
+ cancellationEvents?: CancellationReasons;
10
+ cancellationReasons?: CancellationReasons;
11
+ applicableCodes?: ApplicableReasons;
12
+ eventRows?: EventsRow[];
13
+ onSubmitET: (reason: string, event?: string, reasonsRow?: ReasonsRow[]) => void;
9
14
  }
10
- export declare type CancellationOutput = BaseETResponse & {
15
+ export type CancellationOutput = BaseETResponse & {
11
16
  remark: string;
12
17
  };
@@ -2,7 +2,7 @@
2
2
  * Input data type
3
3
  */
4
4
  import type { BaseETRequest, BaseETResponse } from '../../../models/execTasks/ETBaseModels';
5
- export declare type CaptureTextOutput = BaseETResponse & {
5
+ export type CaptureTextOutput = BaseETResponse & {
6
6
  /**
7
7
  * Value entered by user
8
8
  */
@@ -19,24 +19,24 @@ export declare type CaptureTextOutput = BaseETResponse & {
19
19
  /**
20
20
  * Input data type
21
21
  */
22
- export declare type InputDataType = 'string' | 'number';
22
+ export type InputDataType = 'string' | 'number';
23
23
  /**
24
24
  * Regex to validate input strings
25
25
  */
26
- export declare type ValidationRegex = string;
26
+ export type ValidationRegex = string;
27
27
  /**
28
28
  * Title of instruction
29
29
  */
30
- export declare type Title = string;
30
+ export type Title = string;
31
31
  /**
32
32
  * Message of instruction
33
33
  */
34
- export declare type Message = string;
34
+ export type Message = string;
35
35
  /**
36
36
  * Can go back
37
37
  */
38
- export declare type CanGoBack = boolean;
39
- export declare type CaptureTextInput = BaseETRequest & {
38
+ export type CanGoBack = boolean;
39
+ export type CaptureTextInput = BaseETRequest & {
40
40
  inputType: InputDataType;
41
41
  validationRegex: ValidationRegex;
42
42
  onSubmitET: (value: CaptureTextOutput) => void;
@@ -2,19 +2,19 @@
2
2
  * Unique identifier for the item
3
3
  */
4
4
  import type { BaseETRequest, BaseETResponse } from '../../../models/execTasks/ETBaseModels';
5
- export declare type SKU = string;
5
+ export type SKU = string;
6
6
  /**
7
7
  * Description of item
8
8
  */
9
- export declare type ProductDescription = string;
9
+ export type ProductDescription = string;
10
10
  /**
11
11
  * Count of items
12
12
  */
13
- export declare type ItemCount = number;
13
+ export type ItemCount = number;
14
14
  /**
15
15
  * Items to be delivered
16
16
  */
17
- export declare type LineItem = {
17
+ export type LineItem = {
18
18
  skuId: SKU;
19
19
  productDescription?: ProductDescription;
20
20
  count?: ItemCount;
@@ -22,19 +22,19 @@ export declare type LineItem = {
22
22
  /**
23
23
  * Any manual instruction to display for the Operator to work on
24
24
  */
25
- export declare type Instruction = string;
25
+ export type Instruction = string;
26
26
  export interface DeliverRemarks {
27
27
  remark: string;
28
28
  success: boolean;
29
29
  }
30
- export declare type DeliverETInput = BaseETRequest & {
30
+ export type DeliverETInput = BaseETRequest & {
31
31
  items: LineItem[];
32
32
  confirmCustodyExchange?: boolean;
33
33
  confirmShipments?: boolean;
34
34
  onSubmitET(response: DeliverOutput): void;
35
35
  returnPackageCount?: number;
36
36
  };
37
- export declare type DeliverOutput = BaseETResponse & {
37
+ export type DeliverOutput = BaseETResponse & {
38
38
  /**
39
39
  * Remark captured at time of delivery
40
40
  */
@@ -2,16 +2,16 @@ import type { BaseETRequest, BaseETResponse } from '../../../models/execTasks/ET
2
2
  /**
3
3
  * Type of display
4
4
  */
5
- export declare type DisplayType = 'ALERT' | 'WARNING' | 'MESSAGE';
5
+ export type DisplayType = 'ALERT' | 'WARNING' | 'MESSAGE';
6
6
  /**
7
7
  * Text to be displayed
8
8
  */
9
- export declare type DisplayText = string;
9
+ export type DisplayText = string;
10
10
  /**
11
11
  * Url of image to be displayed
12
12
  */
13
- export declare type DisplayImageURL = string;
14
- export declare type DisplayETInput = BaseETRequest & {
13
+ export type DisplayImageURL = string;
14
+ export type DisplayETInput = BaseETRequest & {
15
15
  showDialog: boolean;
16
16
  displayType: DisplayType;
17
17
  text?: DisplayText;
@@ -20,4 +20,4 @@ export declare type DisplayETInput = BaseETRequest & {
20
20
  negativeBtn?: string;
21
21
  onSubmit: (displayOutput: DisplayETOutput) => void;
22
22
  };
23
- export declare type DisplayETOutput = BaseETResponse;
23
+ export type DisplayETOutput = BaseETResponse;
@@ -2,24 +2,24 @@
2
2
  * Length (in cm)
3
3
  */
4
4
  import type { BaseETRequest, BaseETResponse } from '../../../models/execTasks/ETBaseModels';
5
- export declare type Length = number;
5
+ export type Length = number;
6
6
  /**
7
7
  * Breadth (in cm)
8
8
  */
9
- export declare type Breadth = number;
9
+ export type Breadth = number;
10
10
  /**
11
11
  * Maximum Size limit (in kb) of doodle image
12
12
  */
13
- export declare type MaxFileSize = number;
13
+ export type MaxFileSize = number;
14
14
  /**
15
15
  * Pen colour hex code
16
16
  */
17
- export declare type PenColor = string;
17
+ export type PenColor = string;
18
18
  /**
19
19
  * Any manual instruction to display for the Operator
20
20
  */
21
- export declare type Instruction = string;
22
- export declare type SignatureInput = BaseETRequest & {
21
+ export type Instruction = string;
22
+ export type SignatureInput = BaseETRequest & {
23
23
  resolution: Dimension;
24
24
  fileSizeLimit: MaxFileSize;
25
25
  penColor?: PenColor;
@@ -45,4 +45,4 @@ export interface SignatureBaseResponse {
45
45
  name: string;
46
46
  };
47
47
  }
48
- export declare type SignatureOutput = BaseETResponse & SignatureBaseResponse;
48
+ export type SignatureOutput = BaseETResponse & SignatureBaseResponse;