@os1-platform/dispatch-mobile 2.1.5 → 2.1.7

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 (319) hide show
  1. package/lib/commonjs/analytics/firebase/FirebaseLogging.js +24 -0
  2. package/lib/commonjs/analytics/firebase/FirebaseLogging.js.map +1 -0
  3. package/lib/commonjs/analytics/sentry/SentryAnalyticsSingleton.js +44 -0
  4. package/lib/commonjs/analytics/sentry/SentryAnalyticsSingleton.js.map +1 -0
  5. package/lib/commonjs/analytics/sentry/SentryAnalyticsUtils.js +83 -0
  6. package/lib/commonjs/analytics/sentry/SentryAnalyticsUtils.js.map +1 -0
  7. package/lib/commonjs/analytics/sentry/SentryModels.js +6 -0
  8. package/lib/commonjs/analytics/sentry/SentryModels.js.map +1 -0
  9. package/lib/commonjs/analytics/sentry/SentrySdkConstants.js +78 -0
  10. package/lib/commonjs/analytics/sentry/SentrySdkConstants.js.map +1 -0
  11. package/lib/commonjs/components/executiontasks/cancellation/CancelET.js +51 -0
  12. package/lib/commonjs/components/executiontasks/cancellation/CancelET.js.map +1 -1
  13. package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js +23 -0
  14. package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js.map +1 -1
  15. package/lib/commonjs/components/executiontasks/deliver/DeliverET.js +16 -0
  16. package/lib/commonjs/components/executiontasks/deliver/DeliverET.js.map +1 -1
  17. package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js +52 -2
  18. package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
  19. package/lib/commonjs/components/executiontasks/display/DisplayModalET.js +16 -0
  20. package/lib/commonjs/components/executiontasks/display/DisplayModalET.js.map +1 -1
  21. package/lib/commonjs/components/executiontasks/doodle/SignatureET.js +41 -4
  22. package/lib/commonjs/components/executiontasks/doodle/SignatureET.js.map +1 -1
  23. package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js +16 -0
  24. package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js.map +1 -1
  25. package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js +23 -0
  26. package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
  27. package/lib/commonjs/components/executiontasks/forms/FormGenerator.js +41 -18
  28. package/lib/commonjs/components/executiontasks/forms/FormGenerator.js.map +1 -1
  29. package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js +14 -3
  30. package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
  31. package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +12 -1
  32. package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
  33. package/lib/commonjs/components/executiontasks/imageCapture/CaptureSchema.js.map +1 -1
  34. package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js +29 -16
  35. package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
  36. package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js +71 -6
  37. package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
  38. package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js +23 -0
  39. package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
  40. package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js +37 -0
  41. package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
  42. package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js +23 -0
  43. package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
  44. package/lib/commonjs/components/executiontasks/pickup/PickupET.js +16 -0
  45. package/lib/commonjs/components/executiontasks/pickup/PickupET.js.map +1 -1
  46. package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js +44 -0
  47. package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js.map +1 -1
  48. package/lib/commonjs/components/executiontasks/scan/ScanET.js +40 -1
  49. package/lib/commonjs/components/executiontasks/scan/ScanET.js.map +1 -1
  50. package/lib/commonjs/components/executiontasks/scan/sub_components/SummaryPage.js +23 -0
  51. package/lib/commonjs/components/executiontasks/scan/sub_components/SummaryPage.js.map +1 -1
  52. package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js +30 -0
  53. package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -1
  54. package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -1
  55. package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js +9 -0
  56. package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
  57. package/lib/commonjs/components/widgets/CancelOrderDialog.js +16 -0
  58. package/lib/commonjs/components/widgets/CancelOrderDialog.js.map +1 -1
  59. package/lib/commonjs/components/widgets/Card.js +17 -1
  60. package/lib/commonjs/components/widgets/Card.js.map +1 -1
  61. package/lib/commonjs/components/widgets/ModalWidget.js +22 -2
  62. package/lib/commonjs/components/widgets/ModalWidget.js.map +1 -1
  63. package/lib/commonjs/components/widgets/SearchBar.js +9 -0
  64. package/lib/commonjs/components/widgets/SearchBar.js.map +1 -1
  65. package/lib/commonjs/components/widgets/SnackBarCustom.js +9 -0
  66. package/lib/commonjs/components/widgets/SnackBarCustom.js.map +1 -1
  67. package/lib/commonjs/components/widgets/SplitTextInput.js +9 -0
  68. package/lib/commonjs/components/widgets/SplitTextInput.js.map +1 -1
  69. package/lib/commonjs/components/widgets/TabsComponent.js +12 -1
  70. package/lib/commonjs/components/widgets/TabsComponent.js.map +1 -1
  71. package/lib/commonjs/index.js +53 -0
  72. package/lib/commonjs/index.js.map +1 -1
  73. package/lib/commonjs/manager/location/LocationManager.js +9 -2
  74. package/lib/commonjs/manager/location/LocationManager.js.map +1 -1
  75. package/lib/commonjs/manager/sdk/DispatchSDKManager.js +3 -3
  76. package/lib/commonjs/manager/sdk/DispatchSDKManager.js.map +1 -1
  77. package/lib/commonjs/manager/sdk/DispatchSdkCache.js +3 -2
  78. package/lib/commonjs/manager/sdk/DispatchSdkCache.js.map +1 -1
  79. package/lib/commonjs/manager/sdk/callbacksHandler.js +8 -1
  80. package/lib/commonjs/manager/sdk/callbacksHandler.js.map +1 -1
  81. package/lib/commonjs/manager/syncmanager/DBConfig.js +3 -1
  82. package/lib/commonjs/manager/syncmanager/DBConfig.js.map +1 -1
  83. package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js +77 -3
  84. package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
  85. package/lib/commonjs/manager/syncmanager/document/DocumentManager.js +17 -3
  86. package/lib/commonjs/manager/syncmanager/document/DocumentManager.js.map +1 -1
  87. package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js +206 -6
  88. package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
  89. package/lib/commonjs/models/execTasks/ETBaseModels.js.map +1 -1
  90. package/lib/commonjs/models/sdk.js.map +1 -1
  91. package/lib/commonjs/styles/executionTasks/CommonStyles.js +4 -4
  92. package/lib/commonjs/styles/executionTasks/CommonStyles.js.map +1 -1
  93. package/lib/commonjs/ui/screens/DeliverScreen.js +18 -1
  94. package/lib/commonjs/ui/screens/DeliverScreen.js.map +1 -1
  95. package/lib/commonjs/ui/screens/DoodleScreen.js +9 -0
  96. package/lib/commonjs/ui/screens/DoodleScreen.js.map +1 -1
  97. package/lib/commonjs/ui/screens/DropCashScreen.js +10 -1
  98. package/lib/commonjs/ui/screens/DropCashScreen.js.map +1 -1
  99. package/lib/commonjs/ui/screens/FormsScreen.js +7 -0
  100. package/lib/commonjs/ui/screens/FormsScreen.js.map +1 -1
  101. package/lib/commonjs/ui/screens/GeofenceScreen.js +12 -0
  102. package/lib/commonjs/ui/screens/GeofenceScreen.js.map +1 -1
  103. package/lib/commonjs/ui/screens/ImageCaptureScreen.js +9 -0
  104. package/lib/commonjs/ui/screens/ImageCaptureScreen.js.map +1 -1
  105. package/lib/commonjs/ui/screens/PaymentScreen.js +9 -0
  106. package/lib/commonjs/ui/screens/PaymentScreen.js.map +1 -1
  107. package/lib/commonjs/ui/screens/PickupScreen.js +9 -0
  108. package/lib/commonjs/ui/screens/PickupScreen.js.map +1 -1
  109. package/lib/commonjs/ui/screens/ValidateOTPScreen.js +12 -0
  110. package/lib/commonjs/ui/screens/ValidateOTPScreen.js.map +1 -1
  111. package/lib/commonjs/utils/ExecTaskUtils.js +30 -13
  112. package/lib/commonjs/utils/ExecTaskUtils.js.map +1 -1
  113. package/lib/commonjs/utils/Logger.js +54 -41
  114. package/lib/commonjs/utils/Logger.js.map +1 -1
  115. package/lib/commonjs/utils/SyncManagerUtils.js +12 -2
  116. package/lib/commonjs/utils/SyncManagerUtils.js.map +1 -1
  117. package/lib/commonjs/utils/utils.js +24 -0
  118. package/lib/commonjs/utils/utils.js.map +1 -1
  119. package/lib/module/analytics/firebase/FirebaseLogging.js +17 -0
  120. package/lib/module/analytics/firebase/FirebaseLogging.js.map +1 -0
  121. package/lib/module/analytics/sentry/SentryAnalyticsSingleton.js +37 -0
  122. package/lib/module/analytics/sentry/SentryAnalyticsSingleton.js.map +1 -0
  123. package/lib/module/analytics/sentry/SentryAnalyticsUtils.js +74 -0
  124. package/lib/module/analytics/sentry/SentryAnalyticsUtils.js.map +1 -0
  125. package/lib/module/analytics/sentry/SentryModels.js +2 -0
  126. package/lib/module/analytics/sentry/SentryModels.js.map +1 -0
  127. package/lib/module/analytics/sentry/SentrySdkConstants.js +72 -0
  128. package/lib/module/analytics/sentry/SentrySdkConstants.js.map +1 -0
  129. package/lib/module/components/executiontasks/cancellation/CancelET.js +51 -0
  130. package/lib/module/components/executiontasks/cancellation/CancelET.js.map +1 -1
  131. package/lib/module/components/executiontasks/captureInput/CaptureText.js +23 -0
  132. package/lib/module/components/executiontasks/captureInput/CaptureText.js.map +1 -1
  133. package/lib/module/components/executiontasks/deliver/DeliverET.js +16 -0
  134. package/lib/module/components/executiontasks/deliver/DeliverET.js.map +1 -1
  135. package/lib/module/components/executiontasks/deliver/SLDeliverET.js +52 -2
  136. package/lib/module/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
  137. package/lib/module/components/executiontasks/display/DisplayModalET.js +16 -0
  138. package/lib/module/components/executiontasks/display/DisplayModalET.js.map +1 -1
  139. package/lib/module/components/executiontasks/doodle/SignatureET.js +41 -4
  140. package/lib/module/components/executiontasks/doodle/SignatureET.js.map +1 -1
  141. package/lib/module/components/executiontasks/dropCash/DropCashET.js +16 -0
  142. package/lib/module/components/executiontasks/dropCash/DropCashET.js.map +1 -1
  143. package/lib/module/components/executiontasks/dropCash/SLDropCash.js +23 -0
  144. package/lib/module/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
  145. package/lib/module/components/executiontasks/forms/FormGenerator.js +41 -18
  146. package/lib/module/components/executiontasks/forms/FormGenerator.js.map +1 -1
  147. package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js +14 -3
  148. package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
  149. package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +12 -1
  150. package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
  151. package/lib/module/components/executiontasks/imageCapture/CaptureSchema.js.map +1 -1
  152. package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js +29 -16
  153. package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
  154. package/lib/module/components/executiontasks/imageCapture/ImageCapture.js +72 -7
  155. package/lib/module/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
  156. package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js +23 -0
  157. package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
  158. package/lib/module/components/executiontasks/payments/init/InitPaymentET.js +37 -0
  159. package/lib/module/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
  160. package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js +23 -0
  161. package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
  162. package/lib/module/components/executiontasks/pickup/PickupET.js +16 -0
  163. package/lib/module/components/executiontasks/pickup/PickupET.js.map +1 -1
  164. package/lib/module/components/executiontasks/pickup/SLPickupET.js +44 -0
  165. package/lib/module/components/executiontasks/pickup/SLPickupET.js.map +1 -1
  166. package/lib/module/components/executiontasks/scan/ScanET.js +40 -1
  167. package/lib/module/components/executiontasks/scan/ScanET.js.map +1 -1
  168. package/lib/module/components/executiontasks/scan/sub_components/SummaryPage.js +23 -0
  169. package/lib/module/components/executiontasks/scan/sub_components/SummaryPage.js.map +1 -1
  170. package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js +30 -0
  171. package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -1
  172. package/lib/module/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -1
  173. package/lib/module/components/executiontasks/verifyOtp/VerifyOtpET.js +9 -0
  174. package/lib/module/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
  175. package/lib/module/components/widgets/CancelOrderDialog.js +16 -0
  176. package/lib/module/components/widgets/CancelOrderDialog.js.map +1 -1
  177. package/lib/module/components/widgets/Card.js +17 -1
  178. package/lib/module/components/widgets/Card.js.map +1 -1
  179. package/lib/module/components/widgets/ModalWidget.js +22 -2
  180. package/lib/module/components/widgets/ModalWidget.js.map +1 -1
  181. package/lib/module/components/widgets/SearchBar.js +9 -0
  182. package/lib/module/components/widgets/SearchBar.js.map +1 -1
  183. package/lib/module/components/widgets/SnackBarCustom.js +9 -0
  184. package/lib/module/components/widgets/SnackBarCustom.js.map +1 -1
  185. package/lib/module/components/widgets/SplitTextInput.js +9 -0
  186. package/lib/module/components/widgets/SplitTextInput.js.map +1 -1
  187. package/lib/module/components/widgets/TabsComponent.js +12 -1
  188. package/lib/module/components/widgets/TabsComponent.js.map +1 -1
  189. package/lib/module/index.js +11 -0
  190. package/lib/module/index.js.map +1 -1
  191. package/lib/module/manager/location/LocationManager.js +9 -2
  192. package/lib/module/manager/location/LocationManager.js.map +1 -1
  193. package/lib/module/manager/sdk/DispatchSDKManager.js +3 -3
  194. package/lib/module/manager/sdk/DispatchSDKManager.js.map +1 -1
  195. package/lib/module/manager/sdk/DispatchSdkCache.js +3 -2
  196. package/lib/module/manager/sdk/DispatchSdkCache.js.map +1 -1
  197. package/lib/module/manager/sdk/callbacksHandler.js +8 -1
  198. package/lib/module/manager/sdk/callbacksHandler.js.map +1 -1
  199. package/lib/module/manager/syncmanager/DBConfig.js +3 -1
  200. package/lib/module/manager/syncmanager/DBConfig.js.map +1 -1
  201. package/lib/module/manager/syncmanager/document/DocumentHttpClient.js +77 -3
  202. package/lib/module/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
  203. package/lib/module/manager/syncmanager/document/DocumentManager.js +17 -3
  204. package/lib/module/manager/syncmanager/document/DocumentManager.js.map +1 -1
  205. package/lib/module/manager/syncmanager/document/DocumentSyncManager.js +207 -7
  206. package/lib/module/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
  207. package/lib/module/models/execTasks/ETBaseModels.js.map +1 -1
  208. package/lib/module/models/sdk.js.map +1 -1
  209. package/lib/module/styles/executionTasks/CommonStyles.js +5 -5
  210. package/lib/module/styles/executionTasks/CommonStyles.js.map +1 -1
  211. package/lib/module/ui/screens/DeliverScreen.js +18 -1
  212. package/lib/module/ui/screens/DeliverScreen.js.map +1 -1
  213. package/lib/module/ui/screens/DoodleScreen.js +9 -0
  214. package/lib/module/ui/screens/DoodleScreen.js.map +1 -1
  215. package/lib/module/ui/screens/DropCashScreen.js +10 -0
  216. package/lib/module/ui/screens/DropCashScreen.js.map +1 -1
  217. package/lib/module/ui/screens/FormsScreen.js +7 -0
  218. package/lib/module/ui/screens/FormsScreen.js.map +1 -1
  219. package/lib/module/ui/screens/GeofenceScreen.js +12 -0
  220. package/lib/module/ui/screens/GeofenceScreen.js.map +1 -1
  221. package/lib/module/ui/screens/ImageCaptureScreen.js +9 -0
  222. package/lib/module/ui/screens/ImageCaptureScreen.js.map +1 -1
  223. package/lib/module/ui/screens/PaymentScreen.js +9 -0
  224. package/lib/module/ui/screens/PaymentScreen.js.map +1 -1
  225. package/lib/module/ui/screens/PickupScreen.js +9 -0
  226. package/lib/module/ui/screens/PickupScreen.js.map +1 -1
  227. package/lib/module/ui/screens/ValidateOTPScreen.js +12 -0
  228. package/lib/module/ui/screens/ValidateOTPScreen.js.map +1 -1
  229. package/lib/module/utils/ExecTaskUtils.js +30 -13
  230. package/lib/module/utils/ExecTaskUtils.js.map +1 -1
  231. package/lib/module/utils/Logger.js +54 -39
  232. package/lib/module/utils/Logger.js.map +1 -1
  233. package/lib/module/utils/SyncManagerUtils.js +12 -2
  234. package/lib/module/utils/SyncManagerUtils.js.map +1 -1
  235. package/lib/module/utils/utils.js +22 -0
  236. package/lib/module/utils/utils.js.map +1 -1
  237. package/lib/typescript/analytics/firebase/FirebaseLogging.d.ts +2 -0
  238. package/lib/typescript/analytics/sentry/SentryAnalyticsSingleton.d.ts +11 -0
  239. package/lib/typescript/analytics/sentry/SentryAnalyticsUtils.d.ts +2 -0
  240. package/lib/typescript/analytics/sentry/SentryModels.d.ts +15 -0
  241. package/lib/typescript/analytics/sentry/SentrySdkConstants.d.ts +66 -0
  242. package/lib/typescript/components/executiontasks/imageCapture/CaptureSchema.d.ts +4 -0
  243. package/lib/typescript/components/executiontasks/imageCapture/CaptureUtils.d.ts +7 -1
  244. package/lib/typescript/index.d.ts +7 -0
  245. package/lib/typescript/manager/dispatch/DispatchStateContainer.d.ts +2 -0
  246. package/lib/typescript/manager/location/LocationManager.d.ts +1 -0
  247. package/lib/typescript/manager/sdk/DispatchSdkCache.d.ts +2 -0
  248. package/lib/typescript/manager/sdk/callbacksHandler.d.ts +3 -1
  249. package/lib/typescript/manager/syncmanager/DBConfig.d.ts +4 -0
  250. package/lib/typescript/manager/syncmanager/document/DocumentManager.d.ts +3 -1
  251. package/lib/typescript/manager/syncmanager/document/DocumentSyncManager.d.ts +5 -1
  252. package/lib/typescript/models/execTasks/ETBaseModels.d.ts +25 -6
  253. package/lib/typescript/models/sdk.d.ts +1 -0
  254. package/lib/typescript/styles/executionTasks/CommonStyles.d.ts +4 -4
  255. package/lib/typescript/utils/Logger.d.ts +0 -3
  256. package/lib/typescript/utils/SyncManagerUtils.d.ts +1 -1
  257. package/lib/typescript/utils/utils.d.ts +4 -0
  258. package/package.json +10 -7
  259. package/src/analytics/firebase/FirebaseLogging.ts +25 -0
  260. package/src/analytics/sentry/SentryAnalyticsSingleton.ts +35 -0
  261. package/src/analytics/sentry/SentryAnalyticsUtils.ts +77 -0
  262. package/src/analytics/sentry/SentryModels.ts +18 -0
  263. package/src/analytics/sentry/SentrySdkConstants.ts +77 -0
  264. package/src/components/executiontasks/cancellation/CancelET.tsx +25 -2
  265. package/src/components/executiontasks/captureInput/CaptureText.tsx +15 -2
  266. package/src/components/executiontasks/deliver/DeliverET.tsx +8 -0
  267. package/src/components/executiontasks/deliver/SLDeliverET.tsx +22 -5
  268. package/src/components/executiontasks/display/DisplayModalET.tsx +8 -0
  269. package/src/components/executiontasks/doodle/SignatureET.tsx +37 -4
  270. package/src/components/executiontasks/dropCash/DropCashET.tsx +9 -0
  271. package/src/components/executiontasks/dropCash/SLDropCash.tsx +11 -0
  272. package/src/components/executiontasks/forms/FormGenerator.tsx +46 -29
  273. package/src/components/executiontasks/forms/widgets/DateTimeWidget.tsx +10 -3
  274. package/src/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.tsx +8 -1
  275. package/src/components/executiontasks/imageCapture/CaptureSchema.ts +4 -0
  276. package/src/components/executiontasks/imageCapture/CaptureUtils.ts +45 -18
  277. package/src/components/executiontasks/imageCapture/ImageCapture.tsx +42 -7
  278. package/src/components/executiontasks/payments/completePayment/CompletePaymentET.tsx +11 -0
  279. package/src/components/executiontasks/payments/init/InitPaymentET.tsx +17 -0
  280. package/src/components/executiontasks/payments/processPayment/ProcessPaymentET.tsx +11 -0
  281. package/src/components/executiontasks/pickup/PickupET.tsx +8 -0
  282. package/src/components/executiontasks/pickup/SLPickupET.tsx +19 -0
  283. package/src/components/executiontasks/scan/ScanET.tsx +19 -1
  284. package/src/components/executiontasks/scan/sub_components/SummaryPage.tsx +11 -0
  285. package/src/components/executiontasks/validateOTP/ValidateOTPET.tsx +14 -0
  286. package/src/components/executiontasks/validateOTP/sub-components/OTPInput.tsx +2 -0
  287. package/src/components/executiontasks/verifyOtp/VerifyOtpET.tsx +5 -0
  288. package/src/components/widgets/CancelOrderDialog.tsx +7 -0
  289. package/src/components/widgets/Card.tsx +9 -1
  290. package/src/components/widgets/ModalWidget.tsx +16 -2
  291. package/src/components/widgets/SearchBar.tsx +6 -1
  292. package/src/components/widgets/SnackBarCustom.tsx +4 -0
  293. package/src/components/widgets/SplitTextInput.tsx +6 -0
  294. package/src/components/widgets/TabsComponent.tsx +8 -1
  295. package/src/index.tsx +10 -3
  296. package/src/manager/location/LocationManager.ts +8 -1
  297. package/src/manager/sdk/DispatchSDKManager.ts +8 -2
  298. package/src/manager/sdk/DispatchSdkCache.ts +2 -1
  299. package/src/manager/sdk/callbacksHandler.ts +12 -1
  300. package/src/manager/syncmanager/DBConfig.ts +4 -0
  301. package/src/manager/syncmanager/document/DocumentHttpClient.ts +105 -5
  302. package/src/manager/syncmanager/document/DocumentManager.ts +28 -2
  303. package/src/manager/syncmanager/document/DocumentSyncManager.ts +230 -5
  304. package/src/models/execTasks/ETBaseModels.ts +20 -7
  305. package/src/models/sdk.ts +1 -0
  306. package/src/styles/executionTasks/CommonStyles.ts +5 -5
  307. package/src/ui/screens/DeliverScreen.tsx +9 -0
  308. package/src/ui/screens/DoodleScreen.tsx +5 -0
  309. package/src/ui/screens/DropCashScreen.tsx +6 -0
  310. package/src/ui/screens/FormsScreen.tsx +3 -0
  311. package/src/ui/screens/GeofenceScreen.tsx +11 -1
  312. package/src/ui/screens/ImageCaptureScreen.tsx +5 -0
  313. package/src/ui/screens/PaymentScreen.tsx +5 -0
  314. package/src/ui/screens/PickupScreen.tsx +7 -1
  315. package/src/ui/screens/ValidateOTPScreen.tsx +10 -0
  316. package/src/utils/ExecTaskUtils.ts +36 -10
  317. package/src/utils/Logger.ts +50 -51
  318. package/src/utils/SyncManagerUtils.ts +20 -2
  319. package/src/utils/utils.ts +23 -0
@@ -13,6 +13,9 @@ import { onTaskStart } from '../../utils/ExecTaskUtils';
13
13
  import { DispatchExecutor } from '@os1-platform/platform-coreos-execution-engine-sdk';
14
14
  import { GO_BACK_EVENT_CODE } from '../../constants/constants';
15
15
  import Helper from '../../utils/helper';
16
+ //{ fireEventWithScreenName } from 'src/analytics/sentry/SentryAnalyticsUtils';
17
+ import { ScreenNameSdkConstants, SentryEventNameSdkConstants, SeverityLevelValue } from '../../analytics/sentry/SentrySdkConstants';
18
+ import { fireEventWithScreenName } from '../../analytics/sentry/SentryAnalyticsUtils';
16
19
 
17
20
  // OLD CODE
18
21
  // function getTotalExpected(nextStates: any[]): ETAmount {
@@ -51,6 +54,9 @@ const DropCashScreen = ({
51
54
 
52
55
  useEffect(() => {
53
56
  (async () => {
57
+ //fire sentry event
58
+ fireEventWithScreenName({severityLevel:SeverityLevelValue.LOG, eventName:SentryEventNameSdkConstants.RETURN_CASH_ET_OPENED, screenName:ScreenNameSdkConstants.RETURN_CASH_ET_SCREEN});
59
+ //
54
60
  onTaskStart(
55
61
  nextState,
56
62
  route.params[RouteParams.ROOT_META_DATA].customEventsData
@@ -14,6 +14,8 @@ import callbackHandler from '../../manager/sdk/callbacksHandler';
14
14
  import { DispatchExecutor as dispatchExecutor } from '@os1-platform/platform-coreos-execution-engine-sdk';
15
15
  import { AjvError } from '@rjsf/core';
16
16
  import Helper from '../../utils/helper';
17
+ import { ScreenNameSdkConstants, SentryEventNameSdkConstants, SeverityLevelValue } from '../../analytics/sentry/SentrySdkConstants';
18
+ import { fireEventWithScreenName } from '../../analytics/sentry/SentryAnalyticsUtils';
17
19
 
18
20
  const FormsScreen = ({
19
21
  route,
@@ -38,6 +40,7 @@ const FormsScreen = ({
38
40
 
39
41
  useEffect(() => {
40
42
  (async () => {
43
+ fireEventWithScreenName({severityLevel:SeverityLevelValue.LOG, eventName:SentryEventNameSdkConstants.FORM_ET_OPENED, screenName:ScreenNameSdkConstants.FORM_ET_SCREEN});
41
44
  onTaskStart(
42
45
  route.params[RouteParams.NEXT_STATES],
43
46
  route.params[RouteParams.ROOT_META_DATA].customEventsData
@@ -7,6 +7,8 @@ import type { BaseETProps } from '../../models/DispatchModels';
7
7
  import DispatchStateContainer from '../../manager/dispatch/DispatchStateContainer';
8
8
  import { RouteParams, getDataFromNextState } from '../uiConfig/RouteParams';
9
9
  import { onTaskStart } from '../../utils/ExecTaskUtils';
10
+ import { ScreenNameSdkConstants, SentryEventNameSdkConstants, SeverityLevelValue } from '../../analytics/sentry/SentrySdkConstants';
11
+ import { fireEventWithScreenName } from '../../analytics/sentry/SentryAnalyticsUtils';
10
12
 
11
13
  const GeofenceScreen = ({
12
14
  route,
@@ -20,7 +22,15 @@ const GeofenceScreen = ({
20
22
  const nextState = route.params[RouteParams.NEXT_STATES];
21
23
  const { taskMeta, mergedObjectiveId, input, wfMeta } =
22
24
  getDataFromNextState(nextState);
23
- useEffect(() => {
25
+
26
+ useEffect(() => {
27
+ (async () => {
28
+ //fire sentry event
29
+ fireEventWithScreenName({severityLevel:SeverityLevelValue.LOG, eventName:SentryEventNameSdkConstants.VERIFY_LOCATION_ET_OPENED, screenName:ScreenNameSdkConstants.VERIFY_LOCATION_ET_SCREEN});
30
+ })();
31
+ }, []);
32
+
33
+ useEffect(() => {
24
34
  onTaskStart(
25
35
  nextState,
26
36
  route.params[RouteParams.ROOT_META_DATA].customEventsData
@@ -8,6 +8,8 @@ import { RouteParams, getDataFromNextState } from '../uiConfig/RouteParams';
8
8
  import { onTaskStart } from '../../utils/ExecTaskUtils';
9
9
  import { DispatchExecutor } from '@os1-platform/platform-coreos-execution-engine-sdk';
10
10
  import Helper from '../../utils/helper';
11
+ import { ScreenNameSdkConstants, SentryEventNameSdkConstants, SeverityLevelValue } from '../../analytics/sentry/SentrySdkConstants';
12
+ import { fireEventWithScreenName } from '../../analytics/sentry/SentryAnalyticsUtils';
11
13
 
12
14
 
13
15
  const ImageCaptureScreen = ({
@@ -30,6 +32,9 @@ const ImageCaptureScreen = ({
30
32
 
31
33
  useEffect(() => {
32
34
  (async () => {
35
+ //fire sentry event
36
+ fireEventWithScreenName({severityLevel:SeverityLevelValue.LOG, eventName:SentryEventNameSdkConstants.CAPTURE_IMAGE_ET_OPENED, screenName:ScreenNameSdkConstants.CAPTURE_IMAGE_ET_SCREEN});
37
+ //
33
38
  onTaskStart(
34
39
  route.params[RouteParams.NEXT_STATES],
35
40
  route.params[RouteParams.ROOT_META_DATA].customEventsData
@@ -21,6 +21,8 @@ import { useEffect } from 'react';
21
21
  import { IDispatch } from '@os1-platform/platform-coreos-execution-engine-sdk';
22
22
  import { GO_BACK_EVENT_CODE } from '../../constants/constants';
23
23
  import Helper from '../../utils/helper';
24
+ import { ScreenNameSdkConstants, SentryEventNameSdkConstants, SeverityLevelValue } from '../../analytics/sentry/SentrySdkConstants';
25
+ import { fireEventWithScreenName } from '../../analytics/sentry/SentryAnalyticsUtils';
24
26
 
25
27
  const PaymentScreen = ({
26
28
  navigation,
@@ -45,6 +47,9 @@ const PaymentScreen = ({
45
47
 
46
48
  useEffect(() => {
47
49
  (async () => {
50
+ //fire sentry event
51
+ fireEventWithScreenName({severityLevel:SeverityLevelValue.LOG, eventName:SentryEventNameSdkConstants.COLLECT_CASH_ET_OPENED, screenName:ScreenNameSdkConstants.COLLECT_CASH_ET_SCREEN});
52
+ //
48
53
  onTaskStart(
49
54
  route.params[RouteParams.NEXT_STATES],
50
55
  route.params[RouteParams.ROOT_META_DATA].customEventsData
@@ -10,6 +10,8 @@ import { onTaskStart } from '../../utils/ExecTaskUtils';
10
10
  import { DispatchExecutor } from '@os1-platform/platform-coreos-execution-engine-sdk';
11
11
  import SLPickupET from '../../components/executiontasks/pickup/SLPickupET';
12
12
  import Helper from '../../utils/helper';
13
+ import { ScreenNameSdkConstants, SentryEventNameSdkConstants, SeverityLevelValue } from '../../analytics/sentry/SentrySdkConstants';
14
+ import { fireEventWithScreenName } from '../../analytics/sentry/SentryAnalyticsUtils';
13
15
 
14
16
  const PickupScreen = ({
15
17
  route,
@@ -21,7 +23,6 @@ const PickupScreen = ({
21
23
  baseETProps: BaseETProps;
22
24
  }) => {
23
25
  const helperInstance = Helper.getInstance();
24
-
25
26
  const nextState = route.params[RouteParams.NEXT_STATES];
26
27
  const { taskMeta, mergedObjectiveId, input, wfMeta, taskName } =
27
28
  getDataFromNextState(nextState);
@@ -31,8 +32,13 @@ const PickupScreen = ({
31
32
  const [items, setItems] = useState([]);
32
33
  const [isSelfLoopTrue, setSelfLoop] = useState(false);
33
34
 
35
+
36
+
34
37
  useEffect(() => {
35
38
  (async () => {
39
+ //fire sentry event
40
+ fireEventWithScreenName({severityLevel:SeverityLevelValue.LOG, eventName:SentryEventNameSdkConstants.PICKUP_ET_OPENED, screenName:ScreenNameSdkConstants.PICKUP_ET_SCREEN});
41
+ //
36
42
  onTaskStart(
37
43
  nextState,
38
44
  route.params[RouteParams.ROOT_META_DATA].customEventsData
@@ -6,6 +6,8 @@ import DispatchStateContainer from '../../manager/dispatch/DispatchStateContaine
6
6
  import { RouteParams, getDataFromNextState } from '../uiConfig/RouteParams';
7
7
  import ValidateOTPET from '../../components/executiontasks/validateOTP/ValidateOTPET';
8
8
  import { handleDynamicValues, onTaskStart } from '../../utils/ExecTaskUtils';
9
+ import { ScreenNameSdkConstants, SentryEventNameSdkConstants, SeverityLevelValue } from '../../analytics/sentry/SentrySdkConstants';
10
+ import { fireEventWithScreenName } from '../../analytics/sentry/SentryAnalyticsUtils';
9
11
 
10
12
  const ValidateOTPScreen = ({
11
13
  route,
@@ -37,6 +39,14 @@ const ValidateOTPScreen = ({
37
39
  }
38
40
  }, []);
39
41
 
42
+ useEffect(() => {
43
+ (async () => {
44
+ //fire sentry event
45
+ fireEventWithScreenName({severityLevel:SeverityLevelValue.LOG, eventName:SentryEventNameSdkConstants.VERIFY_OTP_ET_OPENED, screenName:ScreenNameSdkConstants.VERIFY_OTP_ET_SCREEN});
46
+ })();
47
+ }, []);
48
+
49
+
40
50
  return (
41
51
  <ValidateOTPET
42
52
  {..._input}
@@ -9,6 +9,7 @@ import dispatchEvent from '../events/EventDispatcher';
9
9
  import type { startEvent } from '../models/DispatchModels';
10
10
  import { JSONPath } from 'jsonpath-plus';
11
11
  import { IDispatch } from '@os1-platform/platform-coreos-execution-engine-sdk';
12
+ import { last } from 'lodash';
12
13
 
13
14
  export async function getBaseETResponse(
14
15
  entityCode: string,
@@ -18,14 +19,20 @@ export async function getBaseETResponse(
18
19
  mergedObjectiveIds: Array<string>,
19
20
  taskId: ExecutionTaskID
20
21
  ): Promise<BaseETResponse> {
21
- // let location = LocationManager.getInstance().getLastLocation();
22
+ let lastLocation = LocationManager.getInstance().getLastLocation();
23
+ console.log("getBaseETResponse:lastLocation:",JSON.stringify(lastLocation))
24
+
22
25
  let cache = DispatchSdkCache.getInstance();
23
26
  const sdkConfig = (await cache.getObjectFromCache(
24
27
  DispatchSdkCache.KEYS.SDK_CONFIG
25
28
  )) as DispatchSDKConfig;
26
- /* const startTime = await cache.getObjectFromCache(
29
+ const startTime = await cache.getObjectFromCache(
27
30
  DispatchSdkCache.KEYS.TASK_START_TIME
28
- ); */
31
+ );
32
+ const startLocation = await cache.getObjectFromCache(
33
+ DispatchSdkCache.KEYS.TASK_START_LOCATION
34
+ );
35
+ console.log("getBaseETResponse:startLocation:",startLocation);
29
36
  let baseResponse: BaseETResponse = {
30
37
  entityCode: entityCode,
31
38
  success: success,
@@ -33,19 +40,29 @@ export async function getBaseETResponse(
33
40
  reasonCode: reasonCode,
34
41
  id: taskId,
35
42
  meta: {
36
- /* location: {
37
- latitude: location.latitude,
38
- longitude: location.longitude,
39
- },*/
43
+ startLocation:{
44
+ latitude:startLocation.latitude,
45
+ longitude:startLocation.longitude
46
+ },
47
+ endLocation:{
48
+ latitude:lastLocation.latitude,
49
+ longitude:lastLocation.longitude
50
+ },
51
+ // location: {
52
+ // latitude: location.latitude,
53
+ // longitude: location.longitude,
54
+ // },
40
55
  userDetails: {
41
56
  id: sdkConfig?.userID ?? '',
42
57
  name: sdkConfig?.userName ?? '',
43
58
  },
44
- /*startTime: startTime ? parseInt(startTime) : Date.now(),
45
- endTime: Date.now(), */
59
+ startTime: startTime ? parseInt(startTime) : Date.now(),
60
+ endTime: Date.now(),
46
61
  },
47
62
  mergedObjectiveIds,
48
63
  };
64
+ console.log("getBaseETResponse:baseResponse:",JSON.stringify(baseResponse));
65
+
49
66
  return baseResponse;
50
67
  }
51
68
 
@@ -129,8 +146,17 @@ export function onTaskStart(
129
146
  const keys = DispatchSdkCache.KEYS;
130
147
  const cache = DispatchSdkCache.getInstance();
131
148
  (async () => {
132
- // await cache.setKeyInCache(keys.TASK_START_TIME, Date.now().toString());
149
+ let lastLocation = LocationManager.getInstance().getLastLocation();
150
+ let location = {
151
+ latitude: lastLocation.latitude,
152
+ longitude: lastLocation.longitude,
153
+ }
154
+ console.log("onTaskStart:lastLocation:",location)
155
+ await cache.setKeyInCache(keys.TASK_START_TIME, Date.now().toString());
133
156
  await cache.setKeyInCache(keys.CURRENT_WORKING_TASK_ID, eventData.taskId);
157
+ await cache.setObjectInCache(keys.TASK_START_LOCATION, location);
158
+
159
+
134
160
  })();
135
161
  if (triggerEvent) {
136
162
  const customEtName = eventData.taskName;
@@ -1,7 +1,6 @@
1
1
  import DispatchSdkCache from '../manager/sdk/DispatchSdkCache';
2
2
  import type { DispatchSDKConfig } from '../models/sdk';
3
3
  import * as Sentry from '@sentry/react-native';
4
- import { Severity } from '@sentry/react-native';
5
4
  import crashlytics from '@react-native-firebase/crashlytics';
6
5
 
7
6
  export const enum LOG_TYPE {
@@ -43,7 +42,7 @@ class Logger {
43
42
  logType === LOG_TYPE.APP_WARNING
44
43
  ) {
45
44
  crashlytics().recordError(new Error(message), TAG);
46
- this.sendSentryException(new Error(message), TAG, logType);
45
+ //this.sendSentryException(new Error(message), TAG, logType);
47
46
  }
48
47
  }
49
48
 
@@ -54,57 +53,57 @@ class Logger {
54
53
  return Logger.instance;
55
54
  }
56
55
 
57
- public sendSentryException(exception: any, logTag: string, logType: string) {
58
- (async () => {
59
- try {
60
- Sentry.captureException(
61
- exception,
62
- await this.getUserConfig(Severity.Error, logType, logTag)
63
- );
64
- } catch (error: any) {}
65
- })();
66
- }
56
+ // public sendSentryException(exception: any, logTag: string, logType: string) {
57
+ // // (async () => {
58
+ // // try {
59
+ // // Sentry.captureException(
60
+ // // exception,
61
+ // // await this.getUserConfig(Severity.Error, logType, logTag)
62
+ // // );
63
+ // // } catch (error: any) {}
64
+ // // })();
65
+ // }
67
66
 
68
- public sendSentryMessage(message: string, logTag: string, logType: string) {
69
- (async () => {
70
- try {
71
- Sentry.captureMessage(
72
- message,
73
- await this.getUserConfig(Severity.Warning, logType, logTag)
74
- );
75
- } catch (error: any) {}
76
- })();
77
- }
67
+ // public sendSentryMessage(message: string, logTag: string, logType: string) {
68
+ // // (async () => {
69
+ // // try {
70
+ // // Sentry.captureMessage(
71
+ // // message,
72
+ // // await this.getUserConfig(Severity.Warning, logType, logTag)
73
+ // // );
74
+ // // } catch (error: any) {}
75
+ // // })();
76
+ // }
78
77
 
79
- private async getUserConfig(
80
- logLevel: Severity,
81
- logType: string,
82
- logTag: string
83
- ) {
84
- try {
85
- const config = (await DispatchSdkCache.getInstance().getObjectFromCache(
86
- DispatchSdkCache.KEYS.SDK_CONFIG
87
- )) as DispatchSDKConfig;
88
- const dspId = await DispatchSdkCache.getInstance().getKeyFromCache(
89
- DispatchSdkCache.KEYS.DISPATCH_ID
90
- );
91
- return {
92
- user: {
93
- id: config?.userID,
94
- username: config?.userName,
95
- },
96
- tags: {
97
- dispatchId: dspId,
98
- errorTime: Date.now(),
99
- logType: logType,
100
- logTag: logTag,
101
- },
102
- level: logLevel,
103
- };
104
- } catch (error: any) {
105
- return undefined;
106
- }
107
- }
78
+ // private async getUserConfig(
79
+ // logLevel: Severity,
80
+ // logType: string,
81
+ // logTag: string
82
+ // ) {
83
+ // try {
84
+ // const config = (await DispatchSdkCache.getInstance().getObjectFromCache(
85
+ // DispatchSdkCache.KEYS.SDK_CONFIG
86
+ // )) as DispatchSDKConfig;
87
+ // const dspId = await DispatchSdkCache.getInstance().getKeyFromCache(
88
+ // DispatchSdkCache.KEYS.DISPATCH_ID
89
+ // );
90
+ // return {
91
+ // user: {
92
+ // id: config?.userID,
93
+ // username: config?.userName,
94
+ // },
95
+ // tags: {
96
+ // dispatchId: dspId,
97
+ // errorTime: Date.now(),
98
+ // logType: logType,
99
+ // logTag: logTag,
100
+ // },
101
+ // level: logLevel,
102
+ // };
103
+ // } catch (error: any) {
104
+ // return undefined;
105
+ // }
106
+ // }
108
107
  }
109
108
 
110
109
  export default Logger;
@@ -14,6 +14,7 @@ import type {
14
14
  ExecEngineSyncType,
15
15
  } from '../manager/syncmanager/DBConfig';
16
16
  import Storage from './storage';
17
+ import LocationManager from '../manager/location/LocationManager';
17
18
 
18
19
  const keys = DispatchSdkCache.KEYS;
19
20
  const cache = DispatchSdkCache.getInstance();
@@ -135,8 +136,23 @@ export async function insertDocumentInDB(
135
136
  // objRef: string,
136
137
  base64Image: string | null,
137
138
  imageDesc: string,
138
- filePath: string | null
139
+ filePath: string | null,
140
+ dateTime: string | null,
141
+ lat: string,
142
+ lng: string,
143
+ accuracy: string
139
144
  ): Promise<number | undefined> {
145
+ let geoTimeStamp = {
146
+ dateTime: dateTime,
147
+ lat: lat,
148
+ lng: lng,
149
+ accuracy: accuracy,
150
+ };
151
+ let geoTimeStampStr = JSON.stringify(geoTimeStamp);
152
+ console.log('geoTimeStampStr:', geoTimeStampStr);
153
+ console.log('insertDocumentInDB1:', fmsFolderName);
154
+
155
+ let processedFilePath = '';
140
156
  try {
141
157
  const dspID = await cache.getKeyFromCache(keys.DISPATCH_ID);
142
158
  let response = await DocumentSyncManager.getInstance().insertDocument(
@@ -149,7 +165,9 @@ export async function insertDocumentInDB(
149
165
  // objRef,
150
166
  filePath,
151
167
  'image',
152
- fileName
168
+ fileName,
169
+ geoTimeStampStr,
170
+ processedFilePath
153
171
  );
154
172
  AppSyncManager.getInstance().startSDKSyncManager();
155
173
  return response.insertId;
@@ -28,3 +28,26 @@ export function isTokenExpired(accessToken: string) {
28
28
  let decodedData: any = jwtDecode(accessToken);
29
29
  return !(decodedData && decodedData.exp * 1000 > Date.now());
30
30
  }
31
+
32
+ export function flattenObject(obj: Record<string, any>, prefix = ''): string {
33
+ return JSON.stringify(obj);
34
+ // return Object.keys(obj).reduce((acc, key) => {
35
+ // const flatKey = prefix ? `${prefix}.${key}` : key;
36
+ // if (typeof obj[key] === 'object' && !Array.isArray(obj[key])) {
37
+ // return acc ?? '' + flattenObject(obj[key], flatKey);
38
+ // } else {
39
+ // return acc ?? '' + `${flatKey}: ${JSON.stringify(obj[key])}\n`;
40
+ // }
41
+ // }, '');
42
+ }
43
+
44
+
45
+ export function createObjectWithoutNullValues<T extends { [key: string]: any }>(obj: T): Partial<T> {
46
+ const newObj: Partial<T> = {};
47
+ for (const key in obj) {
48
+ if (Object.prototype.hasOwnProperty.call(obj, key) && obj[key] !== null && obj[key] !== 'request' && obj[key] !== 'headers') {
49
+ newObj[key] = obj[key];
50
+ }
51
+ }
52
+ return newObj;
53
+ }