@os1-platform/dispatch-mobile 2.1.7 → 2.1.9

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 (546) hide show
  1. package/lib/commonjs/@types/assets/index.d.js.map +1 -1
  2. package/lib/commonjs/analytics/firebase/FirebaseLogging.js.map +1 -1
  3. package/lib/commonjs/analytics/sentry/SentryAnalyticsSingleton.js +4 -4
  4. package/lib/commonjs/analytics/sentry/SentryAnalyticsSingleton.js.map +1 -1
  5. package/lib/commonjs/analytics/sentry/SentryAnalyticsUtils.js +8 -9
  6. package/lib/commonjs/analytics/sentry/SentryAnalyticsUtils.js.map +1 -1
  7. package/lib/commonjs/analytics/sentry/SentryModels.js.map +1 -1
  8. package/lib/commonjs/analytics/sentry/SentrySdkConstants.js +2 -0
  9. package/lib/commonjs/analytics/sentry/SentrySdkConstants.js.map +1 -1
  10. package/lib/commonjs/components/dispatch/DispatchExecNavigator.js +4 -5
  11. package/lib/commonjs/components/dispatch/DispatchExecNavigator.js.map +1 -1
  12. package/lib/commonjs/components/executiontasks/CompletedWFSchema.js.map +1 -1
  13. package/lib/commonjs/components/executiontasks/ExecutionTasksIndex.js.map +1 -1
  14. package/lib/commonjs/components/executiontasks/cancellation/CancelET.js +7 -9
  15. package/lib/commonjs/components/executiontasks/cancellation/CancelET.js.map +1 -1
  16. package/lib/commonjs/components/executiontasks/cancellation/CancellationSchema.js.map +1 -1
  17. package/lib/commonjs/components/executiontasks/captureInput/CaptureInputSchema.js.map +1 -1
  18. package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js +1 -1
  19. package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js.map +1 -1
  20. package/lib/commonjs/components/executiontasks/captureInput/utils.js.map +1 -1
  21. package/lib/commonjs/components/executiontasks/deliver/DeliverET.js +14 -20
  22. package/lib/commonjs/components/executiontasks/deliver/DeliverET.js.map +1 -1
  23. package/lib/commonjs/components/executiontasks/deliver/DeliverETInput.js.map +1 -1
  24. package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js +15 -21
  25. package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
  26. package/lib/commonjs/components/executiontasks/display/DisplayModalET.js +1 -1
  27. package/lib/commonjs/components/executiontasks/display/DisplayModalET.js.map +1 -1
  28. package/lib/commonjs/components/executiontasks/display/DisplaySchema.js.map +1 -1
  29. package/lib/commonjs/components/executiontasks/doodle/SignatureET.js +1 -2
  30. package/lib/commonjs/components/executiontasks/doodle/SignatureET.js.map +1 -1
  31. package/lib/commonjs/components/executiontasks/doodle/SignatureSchema.js.map +1 -1
  32. package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js +1 -1
  33. package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js.map +1 -1
  34. package/lib/commonjs/components/executiontasks/dropCash/DropCashSchema.js.map +1 -1
  35. package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js +1 -1
  36. package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
  37. package/lib/commonjs/components/executiontasks/forms/FormGenerator.js +1 -1
  38. package/lib/commonjs/components/executiontasks/forms/FormGenerator.js.map +1 -1
  39. package/lib/commonjs/components/executiontasks/forms/FormSchema.js.map +1 -1
  40. package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js +12 -13
  41. package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
  42. package/lib/commonjs/components/executiontasks/forms/widgets/DropdownWidget.js +1 -1
  43. package/lib/commonjs/components/executiontasks/forms/widgets/DropdownWidget.js.map +1 -1
  44. package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +10 -11
  45. package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
  46. package/lib/commonjs/components/executiontasks/forms/widgets/TimeRangeSelector.js +1 -1
  47. package/lib/commonjs/components/executiontasks/forms/widgets/TimeRangeSelector.js.map +1 -1
  48. package/lib/commonjs/components/executiontasks/httpRequest/HttpEtUtils.js.map +1 -1
  49. package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js +1 -1
  50. package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js.map +1 -1
  51. package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestETSchema.js.map +1 -1
  52. package/lib/commonjs/components/executiontasks/imageCapture/CaptureSchema.js.map +1 -1
  53. package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js +2 -5
  54. package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
  55. package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js +10 -12
  56. package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
  57. package/lib/commonjs/components/executiontasks/payments/PaymentStyles.js.map +1 -1
  58. package/lib/commonjs/components/executiontasks/payments/PaymentUtils.js.map +1 -1
  59. package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js +1 -1
  60. package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
  61. package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentSchema.js.map +1 -1
  62. package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js +4 -5
  63. package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
  64. package/lib/commonjs/components/executiontasks/payments/init/InitPaymentSchema.js.map +1 -1
  65. package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js +1 -1
  66. package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
  67. package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentSchema.js.map +1 -1
  68. package/lib/commonjs/components/executiontasks/pickup/PickpSchema.js.map +1 -1
  69. package/lib/commonjs/components/executiontasks/pickup/PickupET.js +14 -20
  70. package/lib/commonjs/components/executiontasks/pickup/PickupET.js.map +1 -1
  71. package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js +15 -21
  72. package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js.map +1 -1
  73. package/lib/commonjs/components/executiontasks/scan/ScanET.js +2 -4
  74. package/lib/commonjs/components/executiontasks/scan/ScanET.js.map +1 -1
  75. package/lib/commonjs/components/executiontasks/scan/ScanSchema.js.map +1 -1
  76. package/lib/commonjs/components/executiontasks/scan/constants.js.map +1 -1
  77. package/lib/commonjs/components/executiontasks/scan/interfaces.js.map +1 -1
  78. package/lib/commonjs/components/executiontasks/scan/modalConstant.js.map +1 -1
  79. package/lib/commonjs/components/executiontasks/scan/sub_components/CScanner.js +4 -5
  80. package/lib/commonjs/components/executiontasks/scan/sub_components/CScanner.js.map +1 -1
  81. package/lib/commonjs/components/executiontasks/scan/sub_components/DropDownUtils.js +0 -1
  82. package/lib/commonjs/components/executiontasks/scan/sub_components/DropDownUtils.js.map +1 -1
  83. package/lib/commonjs/components/executiontasks/scan/sub_components/ERDropDown.js +1 -3
  84. package/lib/commonjs/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -1
  85. package/lib/commonjs/components/executiontasks/scan/sub_components/SummaryPage.js +2 -5
  86. package/lib/commonjs/components/executiontasks/scan/sub_components/SummaryPage.js.map +1 -1
  87. package/lib/commonjs/components/executiontasks/scan/utils.js +1 -1
  88. package/lib/commonjs/components/executiontasks/scan/utils.js.map +1 -1
  89. package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js +1 -1
  90. package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -1
  91. package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPSchema.js.map +1 -1
  92. package/lib/commonjs/components/executiontasks/validateOTP/constants.js.map +1 -1
  93. package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js +1 -1
  94. package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -1
  95. package/lib/commonjs/components/executiontasks/validateOTP/utils.js +1 -1
  96. package/lib/commonjs/components/executiontasks/validateOTP/utils.js.map +1 -1
  97. package/lib/commonjs/components/executiontasks/verifyInput/VerifyInputSchema.js.map +1 -1
  98. package/lib/commonjs/components/executiontasks/verifyLocation/GeofenceUtils.js +1 -1
  99. package/lib/commonjs/components/executiontasks/verifyLocation/GeofenceUtils.js.map +1 -1
  100. package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocSchema.js.map +1 -1
  101. package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js +1 -1
  102. package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js.map +1 -1
  103. package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js +1 -1
  104. package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
  105. package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpSchema.js.map +1 -1
  106. package/lib/commonjs/components/utils/index.js.map +1 -1
  107. package/lib/commonjs/components/widgets/AlertDisplay.js +1 -1
  108. package/lib/commonjs/components/widgets/AlertDisplay.js.map +1 -1
  109. package/lib/commonjs/components/widgets/CancelOrderDialog.js +1 -1
  110. package/lib/commonjs/components/widgets/CancelOrderDialog.js.map +1 -1
  111. package/lib/commonjs/components/widgets/Card.js +0 -1
  112. package/lib/commonjs/components/widgets/Card.js.map +1 -1
  113. package/lib/commonjs/components/widgets/GoBackModal.js.map +1 -1
  114. package/lib/commonjs/components/widgets/IconButton.js +19 -22
  115. package/lib/commonjs/components/widgets/IconButton.js.map +1 -1
  116. package/lib/commonjs/components/widgets/ModalWidget.js.map +1 -1
  117. package/lib/commonjs/components/widgets/ProgressDialog.js.map +1 -1
  118. package/lib/commonjs/components/widgets/SearchBar.js.map +1 -1
  119. package/lib/commonjs/components/widgets/SnackBarCustom.js +15 -18
  120. package/lib/commonjs/components/widgets/SnackBarCustom.js.map +1 -1
  121. package/lib/commonjs/components/widgets/SplitTextInput.js +9 -10
  122. package/lib/commonjs/components/widgets/SplitTextInput.js.map +1 -1
  123. package/lib/commonjs/components/widgets/TabsComponent.js +1 -1
  124. package/lib/commonjs/components/widgets/TabsComponent.js.map +1 -1
  125. package/lib/commonjs/components/widgets/Toaster.js.map +1 -1
  126. package/lib/commonjs/config/DispatchSDKConfig.js.map +1 -1
  127. package/lib/commonjs/constants/apiConstants.js.map +1 -1
  128. package/lib/commonjs/constants/constants.js.map +1 -1
  129. package/lib/commonjs/constants/statuscode.js.map +1 -1
  130. package/lib/commonjs/errors/BaseError.js +2 -2
  131. package/lib/commonjs/errors/BaseError.js.map +1 -1
  132. package/lib/commonjs/errors/ErrorCodes.js.map +1 -1
  133. package/lib/commonjs/events/EventDispatcher.js.map +1 -1
  134. package/lib/commonjs/events/EventListener.js.map +1 -1
  135. package/lib/commonjs/events/constants.js.map +1 -1
  136. package/lib/commonjs/events/index.js.map +1 -1
  137. package/lib/commonjs/events/interface.js.map +1 -1
  138. package/lib/commonjs/icons/ScanIcon.js.map +1 -1
  139. package/lib/commonjs/icons/file.js.map +1 -1
  140. package/lib/commonjs/icons/interface.js.map +1 -1
  141. package/lib/commonjs/index.js +1 -1
  142. package/lib/commonjs/index.js.map +1 -1
  143. package/lib/commonjs/locale/Str.js.map +1 -1
  144. package/lib/commonjs/locale/i18n.js.map +1 -1
  145. package/lib/commonjs/locale/util.js.map +1 -1
  146. package/lib/commonjs/manager/dispatch/DispatchStateContainer.js +5 -5
  147. package/lib/commonjs/manager/dispatch/DispatchStateContainer.js.map +1 -1
  148. package/lib/commonjs/manager/dispatchCodes/EventCodeContainer.js +4 -4
  149. package/lib/commonjs/manager/dispatchCodes/EventCodeContainer.js.map +1 -1
  150. package/lib/commonjs/manager/dispatchCodes/EventCodeRepo.js +5 -5
  151. package/lib/commonjs/manager/dispatchCodes/EventCodeRepo.js.map +1 -1
  152. package/lib/commonjs/manager/dispatchCodes/ReasonCodeContainer.js +5 -5
  153. package/lib/commonjs/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -1
  154. package/lib/commonjs/manager/dispatchCodes/ReasonCodeRepo.js +5 -5
  155. package/lib/commonjs/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -1
  156. package/lib/commonjs/manager/jobRemoval/JobRemovalManager.js.map +1 -1
  157. package/lib/commonjs/manager/location/LocationManager.js +5 -5
  158. package/lib/commonjs/manager/location/LocationManager.js.map +1 -1
  159. package/lib/commonjs/manager/sdk/DispatchSDKManager.js +8 -8
  160. package/lib/commonjs/manager/sdk/DispatchSDKManager.js.map +1 -1
  161. package/lib/commonjs/manager/sdk/DispatchSdkCache.js +4 -4
  162. package/lib/commonjs/manager/sdk/DispatchSdkCache.js.map +1 -1
  163. package/lib/commonjs/manager/sdk/callbacksHandler.js +30 -3
  164. package/lib/commonjs/manager/sdk/callbacksHandler.js.map +1 -1
  165. package/lib/commonjs/manager/syncmanager/AppSyncManager.js +5 -5
  166. package/lib/commonjs/manager/syncmanager/AppSyncManager.js.map +1 -1
  167. package/lib/commonjs/manager/syncmanager/DBConfig.js.map +1 -1
  168. package/lib/commonjs/manager/syncmanager/NativeSyncManager.js.map +1 -1
  169. package/lib/commonjs/manager/syncmanager/constants.js.map +1 -1
  170. package/lib/commonjs/manager/syncmanager/database.js +1 -1
  171. package/lib/commonjs/manager/syncmanager/database.js.map +1 -1
  172. package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js +38 -21
  173. package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
  174. package/lib/commonjs/manager/syncmanager/document/DocumentManager.js +12 -5
  175. package/lib/commonjs/manager/syncmanager/document/DocumentManager.js.map +1 -1
  176. package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js +130 -42
  177. package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
  178. package/lib/commonjs/manager/syncmanager/document/models.js.map +1 -1
  179. package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js +5 -6
  180. package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js.map +1 -1
  181. package/lib/commonjs/manager/syncmanager/events/EventsGraphQLClient.js.map +1 -1
  182. package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js +5 -6
  183. package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
  184. package/lib/commonjs/manager/syncmanager/events/SyncHttpClient.js +2 -6
  185. package/lib/commonjs/manager/syncmanager/events/SyncHttpClient.js.map +1 -1
  186. package/lib/commonjs/models/DispatchModels.js.map +1 -1
  187. package/lib/commonjs/models/ReasonCodes.js.map +1 -1
  188. package/lib/commonjs/models/auth.js.map +1 -1
  189. package/lib/commonjs/models/execTasks/ETBaseModels.js.map +1 -1
  190. package/lib/commonjs/models/execTasks/ETConfig.js.map +1 -1
  191. package/lib/commonjs/models/execution.js.map +1 -1
  192. package/lib/commonjs/models/fcm.js.map +1 -1
  193. package/lib/commonjs/models/sdk.js.map +1 -1
  194. package/lib/commonjs/native/signature/SignatureCapture.js +2 -2
  195. package/lib/commonjs/native/signature/SignatureCapture.js.map +1 -1
  196. package/lib/commonjs/network/GraphQLClient.js +13 -17
  197. package/lib/commonjs/network/GraphQLClient.js.map +1 -1
  198. package/lib/commonjs/network/NetworkClient.js +12 -2
  199. package/lib/commonjs/network/NetworkClient.js.map +1 -1
  200. package/lib/commonjs/network/NetworkUtils.js +14 -10
  201. package/lib/commonjs/network/NetworkUtils.js.map +1 -1
  202. package/lib/commonjs/network/Queries.js.map +1 -1
  203. package/lib/commonjs/network/client.js +3 -4
  204. package/lib/commonjs/network/client.js.map +1 -1
  205. package/lib/commonjs/res/strings.js.map +1 -1
  206. package/lib/commonjs/resources/Login.js +2 -2
  207. package/lib/commonjs/resources/Login.js.map +1 -1
  208. package/lib/commonjs/resources/network.js +2 -2
  209. package/lib/commonjs/resources/network.js.map +1 -1
  210. package/lib/commonjs/styles/SdkColors.js.map +1 -1
  211. package/lib/commonjs/styles/executionTasks/CommonStyles.js +1 -1
  212. package/lib/commonjs/styles/executionTasks/CommonStyles.js.map +1 -1
  213. package/lib/commonjs/ui/screens/CancellationScreen.js +6 -7
  214. package/lib/commonjs/ui/screens/CancellationScreen.js.map +1 -1
  215. package/lib/commonjs/ui/screens/CaptureInputScreen.js +6 -7
  216. package/lib/commonjs/ui/screens/CaptureInputScreen.js.map +1 -1
  217. package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js +6 -7
  218. package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js.map +1 -1
  219. package/lib/commonjs/ui/screens/DeliverScreen.js +6 -7
  220. package/lib/commonjs/ui/screens/DeliverScreen.js.map +1 -1
  221. package/lib/commonjs/ui/screens/DisplayScreen.js +6 -7
  222. package/lib/commonjs/ui/screens/DisplayScreen.js.map +1 -1
  223. package/lib/commonjs/ui/screens/DoodleScreen.js +6 -7
  224. package/lib/commonjs/ui/screens/DoodleScreen.js.map +1 -1
  225. package/lib/commonjs/ui/screens/DropCashScreen.js +7 -7
  226. package/lib/commonjs/ui/screens/DropCashScreen.js.map +1 -1
  227. package/lib/commonjs/ui/screens/ETScreensIndex.js.map +1 -1
  228. package/lib/commonjs/ui/screens/FormsScreen.js +6 -7
  229. package/lib/commonjs/ui/screens/FormsScreen.js.map +1 -1
  230. package/lib/commonjs/ui/screens/GeofenceScreen.js +6 -7
  231. package/lib/commonjs/ui/screens/GeofenceScreen.js.map +1 -1
  232. package/lib/commonjs/ui/screens/HttpRequestScreen.js +5 -6
  233. package/lib/commonjs/ui/screens/HttpRequestScreen.js.map +1 -1
  234. package/lib/commonjs/ui/screens/ImageCaptureScreen.js +6 -7
  235. package/lib/commonjs/ui/screens/ImageCaptureScreen.js.map +1 -1
  236. package/lib/commonjs/ui/screens/PaymentScreen.js +6 -7
  237. package/lib/commonjs/ui/screens/PaymentScreen.js.map +1 -1
  238. package/lib/commonjs/ui/screens/PickupScreen.js +6 -7
  239. package/lib/commonjs/ui/screens/PickupScreen.js.map +1 -1
  240. package/lib/commonjs/ui/screens/ScanScreen.js +6 -8
  241. package/lib/commonjs/ui/screens/ScanScreen.js.map +1 -1
  242. package/lib/commonjs/ui/screens/StartWorkFlowScreen.js +6 -7
  243. package/lib/commonjs/ui/screens/StartWorkFlowScreen.js.map +1 -1
  244. package/lib/commonjs/ui/screens/ValidateOTPScreen.js +6 -7
  245. package/lib/commonjs/ui/screens/ValidateOTPScreen.js.map +1 -1
  246. package/lib/commonjs/ui/screens/WithBaseDispatchScreen.js +1 -1
  247. package/lib/commonjs/ui/screens/WithBaseDispatchScreen.js.map +1 -1
  248. package/lib/commonjs/ui/uiConfig/RouteParams.js.map +1 -1
  249. package/lib/commonjs/utils/ApiUtils.js.map +1 -1
  250. package/lib/commonjs/utils/ExecTaskUtils.js +1 -2
  251. package/lib/commonjs/utils/ExecTaskUtils.js.map +1 -1
  252. package/lib/commonjs/utils/Logger.js +4 -5
  253. package/lib/commonjs/utils/Logger.js.map +1 -1
  254. package/lib/commonjs/utils/NetworkUtil.js +2 -2
  255. package/lib/commonjs/utils/NetworkUtil.js.map +1 -1
  256. package/lib/commonjs/utils/SdkUtils.js +1 -1
  257. package/lib/commonjs/utils/SdkUtils.js.map +1 -1
  258. package/lib/commonjs/utils/SyncManagerUtils.js +1 -1
  259. package/lib/commonjs/utils/SyncManagerUtils.js.map +1 -1
  260. package/lib/commonjs/utils/fcm/FCM.js +1 -1
  261. package/lib/commonjs/utils/fcm/FCM.js.map +1 -1
  262. package/lib/commonjs/utils/fcm/FcmUtils.js +1 -1
  263. package/lib/commonjs/utils/fcm/FcmUtils.js.map +1 -1
  264. package/lib/commonjs/utils/helper.js +4 -4
  265. package/lib/commonjs/utils/helper.js.map +1 -1
  266. package/lib/commonjs/utils/hooks/useModal.js +2 -1
  267. package/lib/commonjs/utils/hooks/useModal.js.map +1 -1
  268. package/lib/commonjs/utils/hooks/useTimer.js.map +1 -1
  269. package/lib/commonjs/utils/loginHelper.js.map +1 -1
  270. package/lib/commonjs/utils/storage.js +6 -9
  271. package/lib/commonjs/utils/storage.js.map +1 -1
  272. package/lib/commonjs/utils/utils.js +1 -3
  273. package/lib/commonjs/utils/utils.js.map +1 -1
  274. package/lib/module/@types/assets/index.d.js.map +1 -1
  275. package/lib/module/analytics/firebase/FirebaseLogging.js.map +1 -1
  276. package/lib/module/analytics/sentry/SentryAnalyticsSingleton.js +4 -4
  277. package/lib/module/analytics/sentry/SentryAnalyticsSingleton.js.map +1 -1
  278. package/lib/module/analytics/sentry/SentryAnalyticsUtils.js +7 -8
  279. package/lib/module/analytics/sentry/SentryAnalyticsUtils.js.map +1 -1
  280. package/lib/module/analytics/sentry/SentryModels.js.map +1 -1
  281. package/lib/module/analytics/sentry/SentrySdkConstants.js +2 -0
  282. package/lib/module/analytics/sentry/SentrySdkConstants.js.map +1 -1
  283. package/lib/module/components/dispatch/DispatchExecNavigator.js +3 -4
  284. package/lib/module/components/dispatch/DispatchExecNavigator.js.map +1 -1
  285. package/lib/module/components/executiontasks/CompletedWFSchema.js.map +1 -1
  286. package/lib/module/components/executiontasks/ExecutionTasksIndex.js.map +1 -1
  287. package/lib/module/components/executiontasks/cancellation/CancelET.js +6 -8
  288. package/lib/module/components/executiontasks/cancellation/CancelET.js.map +1 -1
  289. package/lib/module/components/executiontasks/cancellation/CancellationSchema.js.map +1 -1
  290. package/lib/module/components/executiontasks/captureInput/CaptureInputSchema.js.map +1 -1
  291. package/lib/module/components/executiontasks/captureInput/CaptureText.js.map +1 -1
  292. package/lib/module/components/executiontasks/captureInput/utils.js.map +1 -1
  293. package/lib/module/components/executiontasks/deliver/DeliverET.js +13 -19
  294. package/lib/module/components/executiontasks/deliver/DeliverET.js.map +1 -1
  295. package/lib/module/components/executiontasks/deliver/DeliverETInput.js.map +1 -1
  296. package/lib/module/components/executiontasks/deliver/SLDeliverET.js +14 -20
  297. package/lib/module/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
  298. package/lib/module/components/executiontasks/display/DisplayModalET.js.map +1 -1
  299. package/lib/module/components/executiontasks/display/DisplaySchema.js.map +1 -1
  300. package/lib/module/components/executiontasks/doodle/SignatureET.js +0 -1
  301. package/lib/module/components/executiontasks/doodle/SignatureET.js.map +1 -1
  302. package/lib/module/components/executiontasks/doodle/SignatureSchema.js.map +1 -1
  303. package/lib/module/components/executiontasks/dropCash/DropCashET.js.map +1 -1
  304. package/lib/module/components/executiontasks/dropCash/DropCashSchema.js.map +1 -1
  305. package/lib/module/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
  306. package/lib/module/components/executiontasks/forms/FormGenerator.js.map +1 -1
  307. package/lib/module/components/executiontasks/forms/FormSchema.js.map +1 -1
  308. package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js +11 -12
  309. package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
  310. package/lib/module/components/executiontasks/forms/widgets/DropdownWidget.js.map +1 -1
  311. package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +9 -10
  312. package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
  313. package/lib/module/components/executiontasks/forms/widgets/TimeRangeSelector.js.map +1 -1
  314. package/lib/module/components/executiontasks/httpRequest/HttpEtUtils.js.map +1 -1
  315. package/lib/module/components/executiontasks/httpRequest/HttpRequestET.js.map +1 -1
  316. package/lib/module/components/executiontasks/httpRequest/HttpRequestETSchema.js.map +1 -1
  317. package/lib/module/components/executiontasks/imageCapture/CaptureSchema.js.map +1 -1
  318. package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js +1 -4
  319. package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
  320. package/lib/module/components/executiontasks/imageCapture/ImageCapture.js +9 -11
  321. package/lib/module/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
  322. package/lib/module/components/executiontasks/payments/PaymentStyles.js.map +1 -1
  323. package/lib/module/components/executiontasks/payments/PaymentUtils.js.map +1 -1
  324. package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
  325. package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentSchema.js.map +1 -1
  326. package/lib/module/components/executiontasks/payments/init/InitPaymentET.js +3 -4
  327. package/lib/module/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
  328. package/lib/module/components/executiontasks/payments/init/InitPaymentSchema.js.map +1 -1
  329. package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
  330. package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentSchema.js.map +1 -1
  331. package/lib/module/components/executiontasks/pickup/PickpSchema.js.map +1 -1
  332. package/lib/module/components/executiontasks/pickup/PickupET.js +13 -19
  333. package/lib/module/components/executiontasks/pickup/PickupET.js.map +1 -1
  334. package/lib/module/components/executiontasks/pickup/SLPickupET.js +14 -20
  335. package/lib/module/components/executiontasks/pickup/SLPickupET.js.map +1 -1
  336. package/lib/module/components/executiontasks/scan/ScanET.js +1 -3
  337. package/lib/module/components/executiontasks/scan/ScanET.js.map +1 -1
  338. package/lib/module/components/executiontasks/scan/ScanSchema.js.map +1 -1
  339. package/lib/module/components/executiontasks/scan/constants.js.map +1 -1
  340. package/lib/module/components/executiontasks/scan/interfaces.js.map +1 -1
  341. package/lib/module/components/executiontasks/scan/modalConstant.js.map +1 -1
  342. package/lib/module/components/executiontasks/scan/sub_components/CScanner.js +3 -4
  343. package/lib/module/components/executiontasks/scan/sub_components/CScanner.js.map +1 -1
  344. package/lib/module/components/executiontasks/scan/sub_components/DropDownUtils.js +0 -1
  345. package/lib/module/components/executiontasks/scan/sub_components/DropDownUtils.js.map +1 -1
  346. package/lib/module/components/executiontasks/scan/sub_components/ERDropDown.js +0 -2
  347. package/lib/module/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -1
  348. package/lib/module/components/executiontasks/scan/sub_components/SummaryPage.js +1 -4
  349. package/lib/module/components/executiontasks/scan/sub_components/SummaryPage.js.map +1 -1
  350. package/lib/module/components/executiontasks/scan/utils.js.map +1 -1
  351. package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -1
  352. package/lib/module/components/executiontasks/validateOTP/ValidateOTPSchema.js.map +1 -1
  353. package/lib/module/components/executiontasks/validateOTP/constants.js.map +1 -1
  354. package/lib/module/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -1
  355. package/lib/module/components/executiontasks/validateOTP/utils.js.map +1 -1
  356. package/lib/module/components/executiontasks/verifyInput/VerifyInputSchema.js.map +1 -1
  357. package/lib/module/components/executiontasks/verifyLocation/GeofenceUtils.js.map +1 -1
  358. package/lib/module/components/executiontasks/verifyLocation/VerifyLocSchema.js.map +1 -1
  359. package/lib/module/components/executiontasks/verifyLocation/VerifyLocationET.js.map +1 -1
  360. package/lib/module/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
  361. package/lib/module/components/executiontasks/verifyOtp/VerifyOtpSchema.js.map +1 -1
  362. package/lib/module/components/utils/index.js.map +1 -1
  363. package/lib/module/components/widgets/AlertDisplay.js.map +1 -1
  364. package/lib/module/components/widgets/CancelOrderDialog.js.map +1 -1
  365. package/lib/module/components/widgets/Card.js +0 -1
  366. package/lib/module/components/widgets/Card.js.map +1 -1
  367. package/lib/module/components/widgets/GoBackModal.js.map +1 -1
  368. package/lib/module/components/widgets/IconButton.js +19 -22
  369. package/lib/module/components/widgets/IconButton.js.map +1 -1
  370. package/lib/module/components/widgets/ModalWidget.js.map +1 -1
  371. package/lib/module/components/widgets/ProgressDialog.js.map +1 -1
  372. package/lib/module/components/widgets/SearchBar.js.map +1 -1
  373. package/lib/module/components/widgets/SnackBarCustom.js +15 -18
  374. package/lib/module/components/widgets/SnackBarCustom.js.map +1 -1
  375. package/lib/module/components/widgets/SplitTextInput.js +8 -9
  376. package/lib/module/components/widgets/SplitTextInput.js.map +1 -1
  377. package/lib/module/components/widgets/TabsComponent.js.map +1 -1
  378. package/lib/module/components/widgets/Toaster.js.map +1 -1
  379. package/lib/module/config/DispatchSDKConfig.js.map +1 -1
  380. package/lib/module/constants/apiConstants.js.map +1 -1
  381. package/lib/module/constants/constants.js.map +1 -1
  382. package/lib/module/constants/statuscode.js.map +1 -1
  383. package/lib/module/errors/BaseError.js +2 -2
  384. package/lib/module/errors/BaseError.js.map +1 -1
  385. package/lib/module/errors/ErrorCodes.js.map +1 -1
  386. package/lib/module/events/EventDispatcher.js.map +1 -1
  387. package/lib/module/events/EventListener.js.map +1 -1
  388. package/lib/module/events/constants.js.map +1 -1
  389. package/lib/module/events/index.js.map +1 -1
  390. package/lib/module/events/interface.js.map +1 -1
  391. package/lib/module/icons/ScanIcon.js.map +1 -1
  392. package/lib/module/icons/file.js.map +1 -1
  393. package/lib/module/icons/interface.js.map +1 -1
  394. package/lib/module/index.js.map +1 -1
  395. package/lib/module/locale/Str.js.map +1 -1
  396. package/lib/module/locale/i18n.js.map +1 -1
  397. package/lib/module/locale/util.js.map +1 -1
  398. package/lib/module/manager/dispatch/DispatchStateContainer.js +4 -4
  399. package/lib/module/manager/dispatch/DispatchStateContainer.js.map +1 -1
  400. package/lib/module/manager/dispatchCodes/EventCodeContainer.js +4 -4
  401. package/lib/module/manager/dispatchCodes/EventCodeContainer.js.map +1 -1
  402. package/lib/module/manager/dispatchCodes/EventCodeRepo.js +4 -4
  403. package/lib/module/manager/dispatchCodes/EventCodeRepo.js.map +1 -1
  404. package/lib/module/manager/dispatchCodes/ReasonCodeContainer.js +4 -4
  405. package/lib/module/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -1
  406. package/lib/module/manager/dispatchCodes/ReasonCodeRepo.js +4 -4
  407. package/lib/module/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -1
  408. package/lib/module/manager/jobRemoval/JobRemovalManager.js.map +1 -1
  409. package/lib/module/manager/location/LocationManager.js +4 -4
  410. package/lib/module/manager/location/LocationManager.js.map +1 -1
  411. package/lib/module/manager/sdk/DispatchSDKManager.js +7 -7
  412. package/lib/module/manager/sdk/DispatchSDKManager.js.map +1 -1
  413. package/lib/module/manager/sdk/DispatchSdkCache.js +4 -4
  414. package/lib/module/manager/sdk/DispatchSdkCache.js.map +1 -1
  415. package/lib/module/manager/sdk/callbacksHandler.js +29 -3
  416. package/lib/module/manager/sdk/callbacksHandler.js.map +1 -1
  417. package/lib/module/manager/syncmanager/AppSyncManager.js +4 -4
  418. package/lib/module/manager/syncmanager/AppSyncManager.js.map +1 -1
  419. package/lib/module/manager/syncmanager/DBConfig.js +1 -0
  420. package/lib/module/manager/syncmanager/DBConfig.js.map +1 -1
  421. package/lib/module/manager/syncmanager/NativeSyncManager.js.map +1 -1
  422. package/lib/module/manager/syncmanager/constants.js.map +1 -1
  423. package/lib/module/manager/syncmanager/database.js.map +1 -1
  424. package/lib/module/manager/syncmanager/document/DocumentHttpClient.js +38 -21
  425. package/lib/module/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
  426. package/lib/module/manager/syncmanager/document/DocumentManager.js +11 -4
  427. package/lib/module/manager/syncmanager/document/DocumentManager.js.map +1 -1
  428. package/lib/module/manager/syncmanager/document/DocumentSyncManager.js +129 -41
  429. package/lib/module/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
  430. package/lib/module/manager/syncmanager/document/models.js.map +1 -1
  431. package/lib/module/manager/syncmanager/events/ETEventsManager.js +4 -5
  432. package/lib/module/manager/syncmanager/events/ETEventsManager.js.map +1 -1
  433. package/lib/module/manager/syncmanager/events/EventsGraphQLClient.js.map +1 -1
  434. package/lib/module/manager/syncmanager/events/EventsSyncManager.js +4 -5
  435. package/lib/module/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
  436. package/lib/module/manager/syncmanager/events/SyncHttpClient.js +2 -6
  437. package/lib/module/manager/syncmanager/events/SyncHttpClient.js.map +1 -1
  438. package/lib/module/models/DispatchModels.js.map +1 -1
  439. package/lib/module/models/ReasonCodes.js.map +1 -1
  440. package/lib/module/models/auth.js.map +1 -1
  441. package/lib/module/models/execTasks/ETBaseModels.js.map +1 -1
  442. package/lib/module/models/execTasks/ETConfig.js.map +1 -1
  443. package/lib/module/models/execution.js.map +1 -1
  444. package/lib/module/models/fcm.js.map +1 -1
  445. package/lib/module/models/sdk.js.map +1 -1
  446. package/lib/module/native/signature/SignatureCapture.js +2 -2
  447. package/lib/module/native/signature/SignatureCapture.js.map +1 -1
  448. package/lib/module/network/GraphQLClient.js +13 -17
  449. package/lib/module/network/GraphQLClient.js.map +1 -1
  450. package/lib/module/network/NetworkClient.js +12 -2
  451. package/lib/module/network/NetworkClient.js.map +1 -1
  452. package/lib/module/network/NetworkUtils.js +14 -10
  453. package/lib/module/network/NetworkUtils.js.map +1 -1
  454. package/lib/module/network/Queries.js.map +1 -1
  455. package/lib/module/network/client.js +3 -4
  456. package/lib/module/network/client.js.map +1 -1
  457. package/lib/module/res/strings.js.map +1 -1
  458. package/lib/module/resources/Login.js +2 -2
  459. package/lib/module/resources/Login.js.map +1 -1
  460. package/lib/module/resources/network.js +2 -2
  461. package/lib/module/resources/network.js.map +1 -1
  462. package/lib/module/styles/SdkColors.js.map +1 -1
  463. package/lib/module/styles/executionTasks/CommonStyles.js.map +1 -1
  464. package/lib/module/ui/screens/CancellationScreen.js +5 -6
  465. package/lib/module/ui/screens/CancellationScreen.js.map +1 -1
  466. package/lib/module/ui/screens/CaptureInputScreen.js +5 -6
  467. package/lib/module/ui/screens/CaptureInputScreen.js.map +1 -1
  468. package/lib/module/ui/screens/CompleteObjectiveScreen.js +5 -6
  469. package/lib/module/ui/screens/CompleteObjectiveScreen.js.map +1 -1
  470. package/lib/module/ui/screens/DeliverScreen.js +5 -6
  471. package/lib/module/ui/screens/DeliverScreen.js.map +1 -1
  472. package/lib/module/ui/screens/DisplayScreen.js +5 -6
  473. package/lib/module/ui/screens/DisplayScreen.js.map +1 -1
  474. package/lib/module/ui/screens/DoodleScreen.js +5 -6
  475. package/lib/module/ui/screens/DoodleScreen.js.map +1 -1
  476. package/lib/module/ui/screens/DropCashScreen.js +5 -6
  477. package/lib/module/ui/screens/DropCashScreen.js.map +1 -1
  478. package/lib/module/ui/screens/ETScreensIndex.js.map +1 -1
  479. package/lib/module/ui/screens/FormsScreen.js +5 -6
  480. package/lib/module/ui/screens/FormsScreen.js.map +1 -1
  481. package/lib/module/ui/screens/GeofenceScreen.js +5 -6
  482. package/lib/module/ui/screens/GeofenceScreen.js.map +1 -1
  483. package/lib/module/ui/screens/HttpRequestScreen.js +5 -6
  484. package/lib/module/ui/screens/HttpRequestScreen.js.map +1 -1
  485. package/lib/module/ui/screens/ImageCaptureScreen.js +5 -6
  486. package/lib/module/ui/screens/ImageCaptureScreen.js.map +1 -1
  487. package/lib/module/ui/screens/PaymentScreen.js +5 -6
  488. package/lib/module/ui/screens/PaymentScreen.js.map +1 -1
  489. package/lib/module/ui/screens/PickupScreen.js +5 -6
  490. package/lib/module/ui/screens/PickupScreen.js.map +1 -1
  491. package/lib/module/ui/screens/ScanScreen.js +5 -7
  492. package/lib/module/ui/screens/ScanScreen.js.map +1 -1
  493. package/lib/module/ui/screens/StartWorkFlowScreen.js +5 -6
  494. package/lib/module/ui/screens/StartWorkFlowScreen.js.map +1 -1
  495. package/lib/module/ui/screens/ValidateOTPScreen.js +5 -6
  496. package/lib/module/ui/screens/ValidateOTPScreen.js.map +1 -1
  497. package/lib/module/ui/screens/WithBaseDispatchScreen.js.map +1 -1
  498. package/lib/module/ui/uiConfig/RouteParams.js.map +1 -1
  499. package/lib/module/utils/ApiUtils.js.map +1 -1
  500. package/lib/module/utils/ExecTaskUtils.js +1 -2
  501. package/lib/module/utils/ExecTaskUtils.js.map +1 -1
  502. package/lib/module/utils/Logger.js +4 -5
  503. package/lib/module/utils/Logger.js.map +1 -1
  504. package/lib/module/utils/NetworkUtil.js +2 -2
  505. package/lib/module/utils/NetworkUtil.js.map +1 -1
  506. package/lib/module/utils/SdkUtils.js.map +1 -1
  507. package/lib/module/utils/SyncManagerUtils.js.map +1 -1
  508. package/lib/module/utils/fcm/FCM.js.map +1 -1
  509. package/lib/module/utils/fcm/FcmUtils.js.map +1 -1
  510. package/lib/module/utils/helper.js +4 -4
  511. package/lib/module/utils/helper.js.map +1 -1
  512. package/lib/module/utils/hooks/useModal.js +1 -0
  513. package/lib/module/utils/hooks/useModal.js.map +1 -1
  514. package/lib/module/utils/hooks/useTimer.js.map +1 -1
  515. package/lib/module/utils/loginHelper.js.map +1 -1
  516. package/lib/module/utils/storage.js +5 -8
  517. package/lib/module/utils/storage.js.map +1 -1
  518. package/lib/module/utils/utils.js +1 -3
  519. package/lib/module/utils/utils.js.map +1 -1
  520. package/lib/typescript/analytics/sentry/SentrySdkConstants.d.ts +2 -0
  521. package/lib/typescript/manager/sdk/callbacksHandler.d.ts +3 -1
  522. package/lib/typescript/manager/syncmanager/document/DocumentManager.d.ts +1 -0
  523. package/lib/typescript/models/sdk.d.ts +1 -0
  524. package/package.json +1 -1
  525. package/src/analytics/sentry/SentrySdkConstants.ts +2 -0
  526. package/src/components/executiontasks/imageCapture/CaptureUtils.ts +2 -3
  527. package/src/index.tsx +1 -1
  528. package/src/manager/sdk/DispatchSDKManager.ts +6 -2
  529. package/src/manager/sdk/callbacksHandler.ts +39 -2
  530. package/src/manager/syncmanager/document/DocumentHttpClient.ts +54 -24
  531. package/src/manager/syncmanager/document/DocumentManager.ts +15 -0
  532. package/src/manager/syncmanager/document/DocumentSyncManager.ts +139 -37
  533. package/src/models/auth.ts +1 -0
  534. package/src/models/sdk.ts +1 -0
  535. package/src/network/NetworkClient.ts +18 -2
  536. package/src/network/NetworkUtils.ts +9 -1
  537. package/src/network/client.ts +1 -1
  538. package/android/.gradle/6.8/fileChanges/last-build.bin +0 -0
  539. package/android/.gradle/6.8/fileHashes/fileHashes.lock +0 -0
  540. package/android/.gradle/6.8/gc.properties +0 -0
  541. package/android/.gradle/checksums/checksums.lock +0 -0
  542. package/android/.gradle/configuration-cache/gc.properties +0 -0
  543. package/android/.gradle/vcs-1/gc.properties +0 -0
  544. package/android/.idea/gradle.xml +0 -13
  545. package/android/.idea/misc.xml +0 -10
  546. package/android/.idea/vcs.xml +0 -6
@@ -13,17 +13,16 @@ var _Logger = _interopRequireWildcard(require("../../../utils/Logger"));
13
13
  var _NetworkUtil = _interopRequireDefault(require("../../../utils/NetworkUtil"));
14
14
  var _reactNativeImageMarker = _interopRequireWildcard(require("react-native-image-marker"));
15
15
  var _reactNativeFs = _interopRequireDefault(require("react-native-fs"));
16
- var _storage = _interopRequireDefault(require("../../../utils/storage"));
17
16
  var _reactNative = require("react-native");
18
17
  var _SentrySdkConstants = require("../../../analytics/sentry/SentrySdkConstants");
19
18
  var _SentryAnalyticsUtils = require("../../../analytics/sentry/SentryAnalyticsUtils");
20
- var _class;
19
+ var _DocumentSyncManager;
21
20
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
22
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
21
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
23
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
24
23
  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; }
25
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
26
- 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); }
24
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
25
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
27
26
  const latlngToDms = require('latlng-to-dms');
28
27
  class DocumentSyncManager {
29
28
  get retries() {
@@ -64,10 +63,30 @@ class DocumentSyncManager {
64
63
  if ((documentRows === null || documentRows === void 0 ? void 0 : documentRows.length) > 0) {
65
64
  await this.uploadDocToServer(documentRows[0]);
66
65
  } else {
67
- _Logger.default.getInstance().logEvent('startDocumentSync', 'No data to sync', _Logger.LOG_TYPE.SDK_INFO);
66
+ let cta = 'startDocumentSync';
67
+ (0, _SentryAnalyticsUtils.fireEventWithScreenName)({
68
+ severityLevel: _SentrySdkConstants.SeverityLevelValue.LOG,
69
+ eventName: _SentrySdkConstants.SentryEventNameSdkConstants.APP_LOG,
70
+ screenName: cta,
71
+ cta: cta,
72
+ extraParams: {
73
+ msg: 'No data to sync'
74
+ }
75
+ });
76
+ _Logger.default.getInstance().logEvent(cta, 'No data to sync', _Logger.LOG_TYPE.SDK_ERROR);
68
77
  }
69
78
  } else {
70
- _Logger.default.getInstance().logEvent('startDocumentSync', 'No Network', _Logger.LOG_TYPE.SDK_INFO);
79
+ let cta = 'startDocumentSync';
80
+ (0, _SentryAnalyticsUtils.fireEventWithScreenName)({
81
+ severityLevel: _SentrySdkConstants.SeverityLevelValue.LOG,
82
+ eventName: _SentrySdkConstants.SentryEventNameSdkConstants.APP_LOG,
83
+ screenName: cta,
84
+ cta: cta,
85
+ extraParams: {
86
+ msg: 'No Network'
87
+ }
88
+ });
89
+ _Logger.default.getInstance().logEvent(cta, 'No Network', _Logger.LOG_TYPE.SDK_ERROR);
71
90
  }
72
91
  } catch (error) {} finally {
73
92
  this.inProgress = false;
@@ -76,7 +95,26 @@ class DocumentSyncManager {
76
95
  }
77
96
  }
78
97
  } else {
79
- _Logger.default.getInstance().logEvent('startDocumentSync', 'sync already in progress ', _Logger.LOG_TYPE.SDK_INFO);
98
+ if (!this.docManager) {
99
+ this.docManager = await _DocumentManager.default.getInstance();
100
+ }
101
+ let documentRows = await this.docManager.getUnsyncedDocument();
102
+ if ((documentRows === null || documentRows === void 0 ? void 0 : documentRows.length) > 0) {
103
+ await this.docManager.updateDocPriority(documentRows[0].id, documentRows[0].priority + 1);
104
+ this._retries = 0;
105
+ this.startDocumentSync();
106
+ }
107
+ let cta = 'startDocumentSync';
108
+ (0, _SentryAnalyticsUtils.fireEventWithScreenName)({
109
+ severityLevel: _SentrySdkConstants.SeverityLevelValue.LOG,
110
+ eventName: _SentrySdkConstants.SentryEventNameSdkConstants.APP_LOG,
111
+ screenName: cta,
112
+ cta: cta,
113
+ extraParams: {
114
+ msg: 'sync already in progress'
115
+ }
116
+ });
117
+ _Logger.default.getInstance().logEvent(cta, 'sync already in progress', _Logger.LOG_TYPE.SDK_ERROR);
80
118
  }
81
119
  }
82
120
  async isSyncPending() {
@@ -87,15 +125,24 @@ class DocumentSyncManager {
87
125
  async insertDocument(fmsFolderID, data, base64, desc, dspID,
88
126
  // jobID: string,
89
127
  // objRef: string,
90
- filePath, fileType, fileName, geoTimeStamp, processedFilePath) {
91
- let priority = arguments.length > 10 && arguments[10] !== undefined ? arguments[10] : 1;
128
+ filePath, fileType, fileName, geoTimeStamp, processedFilePath, priority = 1) {
92
129
  if ((0, _utils.isEmptyOrBlank)(desc) || (0, _utils.isEmptyOrBlank)(dspID) ||
93
130
  // isEmptyOrBlank(jobID) ||
94
131
  // isEmptyOrBlank(objRef) ||
95
132
  (0, _utils.isEmptyOrBlank)(fileType) || (0, _utils.isEmptyOrBlank)(fileName) || base64 && (0, _utils.isEmptyOrBlank)(data) || !base64 && (0, _utils.isEmptyOrBlank)(filePath)) throw new _BaseError.BaseError(_ErrorCodes.default.InvalidArgumentError, _ErrorCodes.InvalidArgumentsError);else {
96
133
  var _this$docManager;
97
134
  if (!this.docManager) {
98
- _Logger.default.getInstance().logEvent('insertDocument', 'INIT DOC SYNC AGAIN', _Logger.LOG_TYPE.SDK_INFO);
135
+ let cta = 'insertDocument';
136
+ (0, _SentryAnalyticsUtils.fireEventWithScreenName)({
137
+ severityLevel: _SentrySdkConstants.SeverityLevelValue.LOG,
138
+ eventName: _SentrySdkConstants.SentryEventNameSdkConstants.APP_LOG,
139
+ screenName: cta,
140
+ cta: cta,
141
+ extraParams: {
142
+ msg: 'INIT DOC SYNC AGAIN'
143
+ }
144
+ });
145
+ _Logger.default.getInstance().logEvent(cta, 'INIT DOC SYNC AGAIN', _Logger.LOG_TYPE.SDK_ERROR);
99
146
  this.docManager = await _DocumentManager.default.getInstance();
100
147
  }
101
148
  console.log('insertDocument1:', fmsFolderID);
@@ -116,7 +163,17 @@ class DocumentSyncManager {
116
163
  try {
117
164
  await this.docManager.markDocumentSynced(documentRow.id, fmsID);
118
165
  } catch (err) {
119
- _Logger.default.getInstance().logEvent('updateDocument', err.message, _Logger.LOG_TYPE.SDK_WARNING);
166
+ let cta = 'updateDocument';
167
+ (0, _SentryAnalyticsUtils.fireEventWithScreenName)({
168
+ severityLevel: _SentrySdkConstants.SeverityLevelValue.LOG,
169
+ eventName: _SentrySdkConstants.SentryEventNameSdkConstants.APP_LOG,
170
+ screenName: cta,
171
+ cta: cta,
172
+ extraParams: {
173
+ msg: err
174
+ }
175
+ });
176
+ _Logger.default.getInstance().logEvent(cta, err, _Logger.LOG_TYPE.SDK_WARNING);
120
177
  }
121
178
  }
122
179
 
@@ -126,7 +183,17 @@ class DocumentSyncManager {
126
183
  try {
127
184
  await this.docManager.updateProcesedFilePath(documentRow.id, origialFilePath, processedPath);
128
185
  } catch (err) {
129
- _Logger.default.getInstance().logEvent('updateDocument', err.message, _Logger.LOG_TYPE.SDK_WARNING);
186
+ let cta = 'updateDocument';
187
+ (0, _SentryAnalyticsUtils.fireEventWithScreenName)({
188
+ severityLevel: _SentrySdkConstants.SeverityLevelValue.ERROR,
189
+ eventName: _SentrySdkConstants.SentryEventNameSdkConstants.APP_ERROR,
190
+ screenName: cta,
191
+ cta: cta,
192
+ extraParams: {
193
+ msg: err
194
+ }
195
+ });
196
+ _Logger.default.getInstance().logEvent(cta, err, _Logger.LOG_TYPE.SDK_WARNING);
130
197
  }
131
198
  }
132
199
  async updateDocError(documentRow, uploadError) {
@@ -134,7 +201,17 @@ class DocumentSyncManager {
134
201
  try {
135
202
  await this.docManager.updateDocSyncError(documentRow.id, uploadError);
136
203
  } catch (err) {
137
- _Logger.default.getInstance().logEvent('updateDocError', err.message, _Logger.LOG_TYPE.SDK_WARNING);
204
+ let cta = 'updateDocError';
205
+ (0, _SentryAnalyticsUtils.fireEventWithScreenName)({
206
+ severityLevel: _SentrySdkConstants.SeverityLevelValue.ERROR,
207
+ eventName: _SentrySdkConstants.SentryEventNameSdkConstants.APP_ERROR,
208
+ screenName: cta,
209
+ cta: cta,
210
+ extraParams: {
211
+ msg: err
212
+ }
213
+ });
214
+ _Logger.default.getInstance().logEvent(cta, err, _Logger.LOG_TYPE.SDK_WARNING);
138
215
  }
139
216
  }
140
217
  checkForInitialization() {
@@ -159,19 +236,10 @@ class DocumentSyncManager {
159
236
  if (accuracy !== '') {
160
237
  strDMSWithAccuracy = strDMS + ' (Accuracy: ' + accuracy + 'm)'; // Appedning accuracy in location
161
238
  }
162
-
163
239
  let fontSize = 14;
164
- let fileSize = await _storage.default.getInstance().getItem('maxSize'); // File max size
165
- let cRatio = await _storage.default.getInstance().getItem('cRatio'); // File compression ratio
166
- let nFileSize = Number(fileSize);
167
- let ncRatio = Number(cRatio);
168
- let wholeRatio = Math.round(ncRatio * 100); // Compression ratio to be made
169
240
  if (_reactNative.Platform.OS !== 'android') {
170
241
  fontSize = 28;
171
242
  }
172
- if (wholeRatio >= 75) {
173
- wholeRatio = 25;
174
- }
175
243
  const options = {
176
244
  backgroundImage: {
177
245
  // Image for overlay
@@ -184,7 +252,6 @@ class DocumentSyncManager {
184
252
  position: {
185
253
  position: _reactNativeImageMarker.Position.topLeft // Overlay text position
186
254
  },
187
-
188
255
  style: {
189
256
  // Style for overlay
190
257
  color: '#ffffff',
@@ -197,15 +264,11 @@ class DocumentSyncManager {
197
264
  }
198
265
  }
199
266
  }],
200
- scale: 1,
201
- quality: 100 - wholeRatio,
202
- // Compressio ratio in which file will generate
203
- maxSize: nFileSize,
204
- // Max file size in which file will generate
267
+ scale: 0,
268
+ quality: 100,
205
269
  filename: pFilePath,
206
270
  saveFormat: _reactNativeImageMarker.ImageFormat.jpg // Saving in jpeg format
207
271
  };
208
-
209
272
  let processedFilePath = await _reactNativeImageMarker.default.markText(options); // Generating overlay image
210
273
  if (processedFilePath !== null && processedFilePath !== '') {
211
274
  let completeFilePath = processedFilePath;
@@ -218,7 +281,6 @@ class DocumentSyncManager {
218
281
  //original file path catprued from camera
219
282
  completeFilePath // completeFilePath is the path with file:// of processed file
220
283
  );
221
-
222
284
  documentRow.processed_file_path = completeFilePath;
223
285
  }
224
286
  }
@@ -255,7 +317,6 @@ class DocumentSyncManager {
255
317
  if (accuracy !== '') {
256
318
  strDMSWithAccuracy = strDMS + ' (Accuracy: ' + accuracy + 'm)'; // Appedning accuracy in location
257
319
  }
258
-
259
320
  const options = {
260
321
  backgroundImage: {
261
322
  src: filePath,
@@ -268,7 +329,6 @@ class DocumentSyncManager {
268
329
  position: {
269
330
  position: _reactNativeImageMarker.Position.topLeft // Overlay text position
270
331
  },
271
-
272
332
  style: {
273
333
  // Style for overlay
274
334
  color: '#ffffff',
@@ -286,7 +346,6 @@ class DocumentSyncManager {
286
346
  filename: pFilePath,
287
347
  saveFormat: _reactNativeImageMarker.ImageFormat.base64 // Saving in base6 format
288
348
  };
289
-
290
349
  let processedBase64 = await _reactNativeImageMarker.default.markText(options); // Generating overlay image
291
350
  if (processedBase64 !== null && processedBase64 !== '') {
292
351
  // Fetching base64 data from processed data.
@@ -310,13 +369,34 @@ class DocumentSyncManager {
310
369
  async uploadDocToServer(documentRow) {
311
370
  try {
312
371
  var _this$documentHttpCli;
313
- let docRow = await this.processPODData(documentRow);
372
+ let docRow = documentRow;
373
+ let cta = 'uploadDocToServer-geoStamp';
374
+ let geoStampAvailable = false;
375
+ if (documentRow.geo_timestamp && documentRow.geo_timestamp.length != 0) {
376
+ geoStampAvailable = true;
377
+ docRow = await this.processPODData(documentRow);
378
+ }
379
+ let extra = {
380
+ msg: geoStampAvailable ? "geoStamp availale" : 'geoStamp not availale',
381
+ fName: docRow.file_name && docRow.file_name.length != 0 ? docRow.file_name.substring(4) : '',
382
+ dName: docRow.fms_folder_id && docRow.fms_folder_id.length != 0 ? docRow.fms_folder_id.substring(4) : '',
383
+ dispId: docRow.dispatch_id && docRow.dispatch_id.length != 0 ? docRow.dispatch_id.substring(9) : ''
384
+ };
385
+ (0, _SentryAnalyticsUtils.fireEventWithScreenName)({
386
+ severityLevel: _SentrySdkConstants.SeverityLevelValue.LOG,
387
+ eventName: _SentrySdkConstants.SentryEventNameSdkConstants.APP_LOG,
388
+ screenName: cta,
389
+ cta: cta,
390
+ extraParams: extra
391
+ });
392
+ _Logger.default.getInstance().logEvent(cta, (0, _utils.flattenObject)(extra), _Logger.LOG_TYPE.SDK_ERROR);
314
393
  console.log('uploadDocToServer999:', docRow);
315
- let fmsID = await ((_this$documentHttpCli = this.documentHttpClient) === null || _this$documentHttpCli === void 0 ? void 0 : _this$documentHttpCli.uploadDocument(documentRow));
394
+ let fmsID = await ((_this$documentHttpCli = this.documentHttpClient) === null || _this$documentHttpCli === void 0 ? void 0 : _this$documentHttpCli.uploadDocument(docRow));
316
395
  let extraParameters = {
317
396
  fmsID: fmsID ?? '',
318
- fileName: docRow.file_name,
319
- folderName: docRow.fms_folder_id
397
+ fName: docRow.file_name && docRow.file_name.length != 0 ? docRow.file_name.substring(4) : '',
398
+ dName: docRow.fms_folder_id && docRow.fms_folder_id.length != 0 ? docRow.fms_folder_id.substring(4) : '',
399
+ dispId: docRow.dispatch_id && docRow.dispatch_id.length != 0 ? docRow.dispatch_id.substring(9) : ''
320
400
  };
321
401
  // TODO: SOLELY DEPENDS ON FMS_ID WHICH IS WRONG => IT SHOULD BE Response.status = 202
322
402
  if (fmsID) {
@@ -324,7 +404,15 @@ class DocumentSyncManager {
324
404
  await this.updateDocument(docRow, fmsID);
325
405
  } else {
326
406
  this._retries++;
327
- _Logger.default.getInstance().logEvent('uploadDocToServer-empty-fms-id', (0, _utils.flattenObject)(extraParameters), _Logger.LOG_TYPE.SDK_ERROR);
407
+ let cta = 'uploadDocToServer-empty-fms-id';
408
+ (0, _SentryAnalyticsUtils.fireEventWithScreenName)({
409
+ severityLevel: _SentrySdkConstants.SeverityLevelValue.LOG,
410
+ eventName: _SentrySdkConstants.SentryEventNameSdkConstants.APP_LOG,
411
+ screenName: cta,
412
+ cta: cta,
413
+ extraParams: extraParameters
414
+ });
415
+ _Logger.default.getInstance().logEvent(cta, (0, _utils.flattenObject)(extraParameters), _Logger.LOG_TYPE.SDK_ERROR);
328
416
  await this.updateDocError(docRow, 'Unexpected Error');
329
417
  }
330
418
  } catch (error) {
@@ -336,11 +424,11 @@ class DocumentSyncManager {
336
424
  screenName: cta,
337
425
  cta: cta,
338
426
  extraParams: {
339
- error: error.message
427
+ error: error
340
428
  }
341
429
  });
430
+ _Logger.default.getInstance().logEvent(cta, error, _Logger.LOG_TYPE.SDK_ERROR);
342
431
  this._retries++;
343
- _Logger.default.getInstance().logEvent('uploadDocToServer-sync-error', error.message, _Logger.LOG_TYPE.SDK_ERROR);
344
432
  await this.updateDocError(documentRow, JSON.stringify({
345
433
  message: error.message,
346
434
  error: JSON.stringify(error === null || error === void 0 || (_error$response = error.response) === null || _error$response === void 0 ? void 0 : _error$response.data),
@@ -358,6 +446,6 @@ class DocumentSyncManager {
358
446
  }
359
447
  }
360
448
  exports.default = DocumentSyncManager;
361
- _class = DocumentSyncManager;
449
+ _DocumentSyncManager = DocumentSyncManager;
362
450
  _defineProperty(DocumentSyncManager, "instance", void 0);
363
451
  //# sourceMappingURL=DocumentSyncManager.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_DocumentManager","_interopRequireDefault","require","_DocumentHttpClient","_utils","_BaseError","_ErrorCodes","_interopRequireWildcard","_Logger","_NetworkUtil","_reactNativeImageMarker","_reactNativeFs","_storage","_reactNative","_SentrySdkConstants","_SentryAnalyticsUtils","_class","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","obj","_defineProperty","key","value","_toPropertyKey","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","TypeError","Number","latlngToDms","DocumentSyncManager","retries","_retries","constructor","init","baseURL","retryCount","isEmptyOrBlank","BaseError","BaseErrorCodes","InvalidBaseURL","maxRetryCount","documentHttpClient","DocumentHttpClient","getInstance","instance","startDocumentSync","inProgress","hasNetwork","NetworkUtil","isAvailableAsync","checkForInitialization","docManager","DocumentManager","documentRows","getUnsyncedDocument","length","uploadDocToServer","Logger","logEvent","LOG_TYPE","SDK_INFO","error","isSyncPending","leftDocuments","getAllUnsyncedDocs","insertDocument","fmsFolderID","data","base64","desc","dspID","filePath","fileType","fileName","geoTimeStamp","processedFilePath","priority","arguments","InvalidArgumentError","InvalidArgumentsError","_this$docManager","console","log","insertResponse","forceDocumentSync","updateDocument","documentRow","fmsID","markDocumentSynced","id","err","message","SDK_WARNING","updateDocumentProcessedPath","origialFilePath","processedPath","updateProcesedFilePath","updateDocError","uploadError","updateDocSyncError","SyncManagerNotInitialized","processImageData","processed_file_path","pFilePath","file_name","strGeoStamp","geo_timestamp","objGeoStamp","JSON","parse","dateTime","lat","lng","accuracy","strDMS","strDMSWithAccuracy","fontSize","fileSize","Storage","getItem","cRatio","nFileSize","ncRatio","wholeRatio","Math","round","Platform","OS","options","backgroundImage","src","file_path","scale","watermarkTexts","text","position","Position","topLeft","style","color","fontName","textBackgroundStyle","padding","type","TextBackgroundType","none","quality","maxSize","filename","saveFormat","ImageFormat","jpg","Marker","markText","completeFilePath","includes","processBase64Data","imagePath","RNFS","TemporaryDirectoryPath","writeFile","processedBase64","splittedDase64Data","split","processPODData","_this$documentHttpCli","docRow","uploadDocument","extraParameters","folderName","fms_folder_id","flattenObject","SDK_ERROR","_error$response","_error$response2","cta","fireEventWithScreenName","severityLevel","SeverityLevelValue","ERROR","eventName","SentryEventNameSdkConstants","API_ERROR","screenName","extraParams","stringify","response","status","getAllDocuments","dispatchID","clearSyncedDocs","deleteAllSyncedDocuments","exports"],"sources":["DocumentSyncManager.ts"],"sourcesContent":["import type { DocumentRow } from '../DBConfig';\nimport DocumentManager from './DocumentManager';\nimport DocumentHttpClient from './DocumentHttpClient';\nimport { isEmptyOrBlank, flattenObject } from '../../../utils/utils';\nimport { BaseError } from '../../../errors/BaseError';\nimport BaseErrorCodes, {\n InvalidArgumentsError,\n InvalidBaseURL,\n SyncManagerNotInitialized,\n} from '../../../errors/ErrorCodes';\nimport Logger, { LOG_TYPE } from '../../../utils/Logger';\nimport type { SQLResultSet } from 'expo-sqlite';\nimport NetworkUtil from '../../../utils/NetworkUtil';\nimport Marker, {\n Position,\n TextBackgroundType,\n ImageFormat,\n} from 'react-native-image-marker';\nimport RNFS from 'react-native-fs';\nimport Storage from '../../../utils/storage';\nimport { Platform } from 'react-native';\nimport { ScreenNameSdkConstants, SentryEventNameSdkConstants, SeverityLevelValue } from '../../../analytics/sentry/SentrySdkConstants';\nimport { fireEventWithScreenName } from '../../../analytics/sentry/SentryAnalyticsUtils';\nconst latlngToDms = require('latlng-to-dms');\n\n\nexport default class DocumentSyncManager {\n private documentHttpClient: DocumentHttpClient | undefined;\n private inProgress: boolean = false;\n private static instance: DocumentSyncManager;\n private docManager: DocumentManager | undefined;\n private maxRetryCount: number = 3;\n private _retries = 0;\n\n get retries(): number {\n return this._retries;\n }\n\n set retries(value: number) {\n this._retries = value;\n }\n\n private constructor() {}\n\n public init(baseURL: string, retryCount: number) {\n if (isEmptyOrBlank(baseURL))\n throw new BaseError(BaseErrorCodes.InvalidBaseURL, InvalidBaseURL);\n this.maxRetryCount = retryCount;\n this.documentHttpClient = new DocumentHttpClient(baseURL);\n }\n\n public static getInstance(): DocumentSyncManager {\n if (!DocumentSyncManager.instance) {\n DocumentSyncManager.instance = new DocumentSyncManager();\n }\n return DocumentSyncManager.instance;\n }\n\n public async startDocumentSync(): Promise<void> {\n if (!this.inProgress && this._retries < this.maxRetryCount) {\n this.inProgress = true;\n const hasNetwork = await NetworkUtil.isAvailableAsync();\n try {\n this.checkForInitialization();\n if (!this.docManager) {\n this.docManager = await DocumentManager.getInstance();\n }\n if (hasNetwork) {\n let documentRows: DocumentRow[] =\n await this.docManager.getUnsyncedDocument();\n if (documentRows?.length > 0) {\n await this.uploadDocToServer(documentRows[0]);\n } else {\n Logger.getInstance().logEvent(\n 'startDocumentSync',\n 'No data to sync',\n LOG_TYPE.SDK_INFO\n );\n }\n } else {\n Logger.getInstance().logEvent(\n 'startDocumentSync',\n 'No Network',\n LOG_TYPE.SDK_INFO\n );\n }\n } catch (error: any) {\n } finally {\n this.inProgress = false;\n if ((await this.isSyncPending()) && hasNetwork) {\n await this.startDocumentSync();\n }\n }\n } else {\n Logger.getInstance().logEvent(\n 'startDocumentSync',\n 'sync already in progress ',\n LOG_TYPE.SDK_INFO\n );\n }\n }\n\n public async isSyncPending(): Promise<boolean> {\n if (!this.docManager) this.docManager = await DocumentManager.getInstance();\n let leftDocuments = await this.docManager.getAllUnsyncedDocs();\n return leftDocuments?.length > 0 && this._retries < this.maxRetryCount;\n }\n\n public async insertDocument(\n fmsFolderID: string | null,\n data: string | null,\n base64: boolean,\n desc: string,\n dspID: string,\n // jobID: string,\n // objRef: string,\n filePath: string | null,\n fileType: string,\n fileName: string,\n geoTimeStamp: string,\n processedFilePath: string,\n priority: number = 1\n ): Promise<SQLResultSet> {\n if (\n isEmptyOrBlank(desc) ||\n isEmptyOrBlank(dspID) ||\n // isEmptyOrBlank(jobID) ||\n // isEmptyOrBlank(objRef) ||\n isEmptyOrBlank(fileType) ||\n isEmptyOrBlank(fileName) ||\n (base64 && isEmptyOrBlank(data)) ||\n (!base64 && isEmptyOrBlank(filePath))\n )\n throw new BaseError(\n BaseErrorCodes.InvalidArgumentError,\n InvalidArgumentsError\n );\n else {\n if (!this.docManager) {\n Logger.getInstance().logEvent(\n 'insertDocument',\n 'INIT DOC SYNC AGAIN',\n LOG_TYPE.SDK_INFO\n );\n this.docManager = await DocumentManager.getInstance();\n }\n console.log('insertDocument1:',fmsFolderID);\n let insertResponse = await this.docManager?.insertDocument(\n fmsFolderID,\n desc,\n dspID,\n // jobID,\n // objRef,\n base64,\n fileName,\n fileType,\n data,\n filePath,\n geoTimeStamp,\n processedFilePath,\n priority\n );\n return insertResponse;\n }\n }\n\n public async forceDocumentSync() {\n if (!this.docManager) this.docManager = await DocumentManager.getInstance();\n this._retries = 0;\n await this.startDocumentSync();\n }\n\n private async updateDocument(documentRow: DocumentRow, fmsID: string) {\n if (!this.docManager) this.docManager = await DocumentManager.getInstance();\n try {\n await this.docManager.markDocumentSynced(documentRow.id, fmsID);\n } catch (err: any) {\n Logger.getInstance().logEvent(\n 'updateDocument',\n err.message,\n LOG_TYPE.SDK_WARNING\n );\n }\n }\n\n // This function is updating processed_file_path column for the base64 overlayed data and overlayed image file for POD. Also if it is base 64 then it is also storing temprary file path in file_path as original bae64 image.\n private async updateDocumentProcessedPath(\n documentRow: DocumentRow,\n origialFilePath: String,\n processedPath: String\n ) {\n if (!this.docManager) this.docManager = await DocumentManager.getInstance();\n try {\n await this.docManager.updateProcesedFilePath(\n documentRow.id,\n origialFilePath,\n processedPath\n );\n } catch (err: any) {\n Logger.getInstance().logEvent(\n 'updateDocument',\n err.message,\n LOG_TYPE.SDK_WARNING\n );\n }\n }\n\n private async updateDocError(documentRow: DocumentRow, uploadError: string) {\n if (!this.docManager) this.docManager = await DocumentManager.getInstance();\n try {\n await this.docManager.updateDocSyncError(documentRow.id, uploadError);\n } catch (err: any) {\n Logger.getInstance().logEvent(\n 'updateDocError',\n err.message,\n LOG_TYPE.SDK_WARNING\n );\n }\n }\n private checkForInitialization() {\n if (!this.documentHttpClient) {\n throw new BaseError(\n BaseErrorCodes.SyncManagerNotInitialized,\n SyncManagerNotInitialized\n );\n }\n }\n\n // This function will generate overlay image and update documents table for processed_file_path columns with overlayed image path.\n private async processImageData(documentRow: DocumentRow) {\n // If processed_file_path of overlayed image already existing then do not generate it again.\n if (\n documentRow.processed_file_path === null ||\n documentRow.processed_file_path === ''\n ) {\n let pFilePath = 'processed_' + documentRow.file_name; // File name for processed file.\n let strGeoStamp = documentRow.geo_timestamp; // Saved geostamp string\n let objGeoStamp = JSON.parse(strGeoStamp); // Conversion to geostamp object\n let dateTime = objGeoStamp.dateTime; // Date time stamp in UTC format\n let lat = objGeoStamp.lat; // Latitide\n let lng = objGeoStamp.lng; // Longitude\n let accuracy = objGeoStamp.accuracy; // Location accuracy\n let strDMS = latlngToDms(`${lat}, ${lng}`); // Location in degree format\n let strDMSWithAccuracy = strDMS; \n if (accuracy !== '') {\n strDMSWithAccuracy = strDMS + ' (Accuracy: ' + accuracy + 'm)'; // Appedning accuracy in location \n }\n let fontSize = 14;\n \n let fileSize = await Storage.getInstance().getItem('maxSize'); // File max size\n let cRatio = await Storage.getInstance().getItem('cRatio'); // File compression ratio\n let nFileSize = Number(fileSize);\n let ncRatio = Number(cRatio);\n let wholeRatio = Math.round(ncRatio * 100); // Compression ratio to be made\n if (Platform.OS !== 'android') {\n fontSize = 28;\n }\n if(wholeRatio >= 75){\n wholeRatio = 25;\n }\n const options = {\n backgroundImage: { // Image for overlay\n src: documentRow.file_path,\n scale: 1,\n },\n watermarkTexts: [ \n {\n text: `${dateTime}\\n${strDMSWithAccuracy}`, //Overlay text\n position: {\n position: Position.topLeft, // Overlay text position\n },\n style: { // Style for overlay\n color: '#ffffff',\n fontSize: fontSize,\n fontName: 'Arial',\n textBackgroundStyle: {\n padding: '1% 1%',\n type: TextBackgroundType.none,\n color: '#444444CC',\n },\n },\n },\n ],\n scale: 1,\n quality: 100 - wholeRatio, // Compressio ratio in which file will generate\n maxSize: nFileSize, // Max file size in which file will generate\n filename: pFilePath,\n saveFormat: ImageFormat.jpg, // Saving in jpeg format\n };\n let processedFilePath = await Marker.markText(options); // Generating overlay image\n if (processedFilePath !== null && processedFilePath !== '') {\n let completeFilePath = processedFilePath;\n // If processd image file path does not have prefix file:// then we are addding manually\n if (!processedFilePath.includes('file')) {\n completeFilePath = 'file://' + processedFilePath;\n }\n // Updating document document table with overlayed image path\n this.updateDocumentProcessedPath(\n documentRow,\n documentRow.file_path, //original file path catprued from camera\n completeFilePath // completeFilePath is the path with file:// of processed file \n );\n documentRow.processed_file_path = completeFilePath; \n }\n }\n return documentRow;\n }\n\n // This function will generate overlay base64 data and update documents table for processed_file_path columns with overlayed base64 data.\n private async processBase64Data(documentRow: DocumentRow) {\n // If base64 overlayed data already existing then do not generate it again.\n if (\n documentRow.processed_file_path === null ||\n documentRow.processed_file_path === ''\n ) {\n let filePath = '';\n // If templrary base 64 file already exist then do not create again\n if (documentRow.file_path === null || documentRow.file_path === '') {\n const imagePath = `${RNFS.TemporaryDirectoryPath}/${documentRow.file_name}`;\n await RNFS.writeFile(imagePath, documentRow.data, 'base64'); // Write file to temprary location\n filePath = imagePath;\n // If file generated frommbase64 data does not have file:// then we are adding manually.\n if (!imagePath.includes('file')) {\n filePath = `file://${imagePath}`;\n }\n documentRow.file_path = filePath;\n } else {\n filePath = documentRow.file_path;\n }\n let pFilePath = 'processed_' + documentRow.file_name; // File name for processed file.\n let strGeoStamp = documentRow.geo_timestamp; // Saved geostamp string\n let objGeoStamp = JSON.parse(strGeoStamp); // Conversion to geostamp object\n let dateTime = objGeoStamp.dateTime; // Date time stamp in UTC format\n let lat = objGeoStamp.lat; // Latitide\n let lng = objGeoStamp.lng; // Longitude\n let accuracy = objGeoStamp.accuracy; // Location accuracy\n let strDMS = latlngToDms(`${lat}, ${lng}`); // Location in degree format\n let strDMSWithAccuracy = strDMS; \n if (accuracy !== '') {\n strDMSWithAccuracy = strDMS + ' (Accuracy: ' + accuracy + 'm)'; // Appedning accuracy in location \n }\n const options = {\n backgroundImage: {\n src: filePath, // Image for overlay\n scale: 1,\n },\n watermarkTexts: [\n {\n text: `${dateTime}\\n${strDMSWithAccuracy}`, // Ooverlay text\n position: {\n position: Position.topLeft, // Overlay text position\n },\n style: { // Style for overlay\n color: '#ffffff',\n fontSize: 14,\n fontName: 'Arial',\n textBackgroundStyle: {\n padding: '1% 1%',\n type: TextBackgroundType.none,\n color: '#444444CC',\n },\n },\n },\n ],\n scale: 1,\n quality: 100,\n filename: pFilePath,\n saveFormat: ImageFormat.base64, // Saving in base6 format\n };\n let processedBase64 = await Marker.markText(options); // Generating overlay image\n if (processedBase64 !== null && processedBase64 !== '') {\n // Fetching base64 data from processed data.\n var splittedDase64Data = processedBase64.split(\n 'data:image/png;base64,'\n );\n // Updating document document table with overlayed base64 data\n await this.updateDocumentProcessedPath(\n documentRow,\n filePath,\n splittedDase64Data[1]\n );\n documentRow.processed_file_path = splittedDase64Data[1];\n }\n }\n return documentRow;\n }\n\n // This function will calling respective overlay method for base64 (for signature POD) or image (for image POD).\n private async processPODData(documentRow: DocumentRow) {\n if (documentRow.base64 && documentRow.data != null) {\n return await this.processBase64Data(documentRow);\n } else {\n return await this.processImageData(documentRow);\n }\n }\n\n private async uploadDocToServer(documentRow: DocumentRow) {\n try {\n let docRow = await this.processPODData(documentRow);\n console.log('uploadDocToServer999:', docRow);\n let fmsID = await this.documentHttpClient?.uploadDocument(documentRow);\n\n let extraParameters = {\n fmsID: fmsID ?? '',\n fileName: docRow.file_name,\n folderName: docRow.fms_folder_id\n };\n // TODO: SOLELY DEPENDS ON FMS_ID WHICH IS WRONG => IT SHOULD BE Response.status = 202\n if (fmsID) {\n this._retries = 0;\n await this.updateDocument(docRow, fmsID);\n } else {\n this._retries++;\n Logger.getInstance().logEvent(\n 'uploadDocToServer-empty-fms-id',\n flattenObject(extraParameters),\n LOG_TYPE.SDK_ERROR\n );\n await this.updateDocError(docRow, 'Unexpected Error');\n }\n } catch (error: any) {\n const cta = 'uploadDocToServer-error';\n fireEventWithScreenName({\n severityLevel: SeverityLevelValue.ERROR,\n eventName: SentryEventNameSdkConstants.API_ERROR,\n screenName: cta,\n cta: cta,\n extraParams: {\n error: error.message,\n },\n });\n this._retries++;\n Logger.getInstance().logEvent(\n 'uploadDocToServer-sync-error',\n error.message,\n LOG_TYPE.SDK_ERROR\n );\n await this.updateDocError(\n documentRow,\n JSON.stringify({\n message: error.message,\n error: JSON.stringify(error?.response?.data),\n status: error?.response?.status,\n })\n );\n }\n }\n\n public async getAllDocuments(dispatchID?: string): Promise<DocumentRow[]> {\n if (!this.docManager) this.docManager = await DocumentManager.getInstance();\n return this.docManager.getAllDocuments(dispatchID);\n }\n\n public async clearSyncedDocs(dspID: string) {\n if (!this.docManager) this.docManager = await DocumentManager.getInstance();\n if (dspID) await this.docManager.deleteAllSyncedDocuments(dspID);\n }\n}\n"],"mappings":";;;;;;AACA,IAAAA,gBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,mBAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAC,uBAAA,CAAAL,OAAA;AAKA,IAAAM,OAAA,GAAAD,uBAAA,CAAAL,OAAA;AAEA,IAAAO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AAK,gBAAAgH,eAAA,GAALhH,KAAK,CAAE6H,QAAQ,cAAAb,eAAA,uBAAfA,eAAA,CAAiB1G,IAAI,CAAC;QAC5CwH,MAAM,EAAE9H,KAAK,aAALA,KAAK,gBAAAiH,gBAAA,GAALjH,KAAK,CAAE6H,QAAQ,cAAAZ,gBAAA,uBAAfA,gBAAA,CAAiBa;MAC3B,CAAC,CACH,CAAC;IACH;EACF;EAEA,MAAaC,eAAeA,CAACC,UAAmB,EAA0B;IACxE,IAAI,CAAC,IAAI,CAAC1I,UAAU,EAAE,IAAI,CAACA,UAAU,GAAG,MAAMC,wBAAe,CAACT,WAAW,CAAC,CAAC;IAC3E,OAAO,IAAI,CAACQ,UAAU,CAACyI,eAAe,CAACC,UAAU,CAAC;EACpD;EAEA,MAAaC,eAAeA,CAACxH,KAAa,EAAE;IAC1C,IAAI,CAAC,IAAI,CAACnB,UAAU,EAAE,IAAI,CAACA,UAAU,GAAG,MAAMC,wBAAe,CAACT,WAAW,CAAC,CAAC;IAC3E,IAAI2B,KAAK,EAAE,MAAM,IAAI,CAACnB,UAAU,CAAC4I,wBAAwB,CAACzH,KAAK,CAAC;EAClE;AACF;AAAC0H,OAAA,CAAAvM,OAAA,GAAAoC,mBAAA;AAAA3C,MAAA,GA/aoB2C,mBAAmB;AAAApB,eAAA,CAAnBoB,mBAAmB"}
1
+ {"version":3,"names":["_DocumentManager","_interopRequireDefault","require","_DocumentHttpClient","_utils","_BaseError","_ErrorCodes","_interopRequireWildcard","_Logger","_NetworkUtil","_reactNativeImageMarker","_reactNativeFs","_reactNative","_SentrySdkConstants","_SentryAnalyticsUtils","_DocumentSyncManager","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","obj","_defineProperty","key","value","_toPropertyKey","enumerable","configurable","writable","_toPrimitive","Symbol","toPrimitive","TypeError","String","Number","latlngToDms","DocumentSyncManager","retries","_retries","constructor","init","baseURL","retryCount","isEmptyOrBlank","BaseError","BaseErrorCodes","InvalidBaseURL","maxRetryCount","documentHttpClient","DocumentHttpClient","getInstance","instance","startDocumentSync","inProgress","hasNetwork","NetworkUtil","isAvailableAsync","checkForInitialization","docManager","DocumentManager","documentRows","getUnsyncedDocument","length","uploadDocToServer","cta","fireEventWithScreenName","severityLevel","SeverityLevelValue","LOG","eventName","SentryEventNameSdkConstants","APP_LOG","screenName","extraParams","msg","Logger","logEvent","LOG_TYPE","SDK_ERROR","error","isSyncPending","updateDocPriority","id","priority","leftDocuments","getAllUnsyncedDocs","insertDocument","fmsFolderID","data","base64","desc","dspID","filePath","fileType","fileName","geoTimeStamp","processedFilePath","InvalidArgumentError","InvalidArgumentsError","_this$docManager","console","log","insertResponse","forceDocumentSync","updateDocument","documentRow","fmsID","markDocumentSynced","err","SDK_WARNING","updateDocumentProcessedPath","origialFilePath","processedPath","updateProcesedFilePath","ERROR","APP_ERROR","updateDocError","uploadError","updateDocSyncError","SyncManagerNotInitialized","processImageData","processed_file_path","pFilePath","file_name","strGeoStamp","geo_timestamp","objGeoStamp","JSON","parse","dateTime","lat","lng","accuracy","strDMS","strDMSWithAccuracy","fontSize","Platform","OS","options","backgroundImage","src","file_path","scale","watermarkTexts","text","position","Position","topLeft","style","color","fontName","textBackgroundStyle","padding","type","TextBackgroundType","none","quality","filename","saveFormat","ImageFormat","jpg","Marker","markText","completeFilePath","includes","processBase64Data","imagePath","RNFS","TemporaryDirectoryPath","writeFile","processedBase64","splittedDase64Data","split","processPODData","_this$documentHttpCli","docRow","geoStampAvailable","extra","fName","substring","dName","fms_folder_id","dispId","dispatch_id","flattenObject","uploadDocument","extraParameters","_error$response","_error$response2","API_ERROR","stringify","message","response","status","getAllDocuments","dispatchID","clearSyncedDocs","deleteAllSyncedDocuments","exports"],"sources":["DocumentSyncManager.ts"],"sourcesContent":["import type { DocumentRow } from '../DBConfig';\nimport DocumentManager from './DocumentManager';\nimport DocumentHttpClient from './DocumentHttpClient';\nimport { isEmptyOrBlank, flattenObject } from '../../../utils/utils';\nimport { BaseError } from '../../../errors/BaseError';\nimport BaseErrorCodes, {\n InvalidArgumentsError,\n InvalidBaseURL,\n SyncManagerNotInitialized,\n} from '../../../errors/ErrorCodes';\nimport Logger, { LOG_TYPE } from '../../../utils/Logger';\nimport type { SQLResultSet } from 'expo-sqlite';\nimport NetworkUtil from '../../../utils/NetworkUtil';\nimport Marker, {\n Position,\n TextBackgroundType,\n ImageFormat,\n} from 'react-native-image-marker';\nimport RNFS from 'react-native-fs';\nimport Storage from '../../../utils/storage';\nimport { Platform } from 'react-native';\nimport { ScreenNameSdkConstants, SentryEventNameSdkConstants, SeverityLevelValue } from '../../../analytics/sentry/SentrySdkConstants';\nimport { fireEventWithScreenName } from '../../../analytics/sentry/SentryAnalyticsUtils';\nconst latlngToDms = require('latlng-to-dms');\n\n\nexport default class DocumentSyncManager {\n private documentHttpClient: DocumentHttpClient | undefined;\n private inProgress: boolean = false;\n private static instance: DocumentSyncManager;\n private docManager: DocumentManager | undefined;\n private maxRetryCount: number = 3;\n private _retries = 0;\n get retries(): number {\n return this._retries;\n }\n\n set retries(value: number) {\n this._retries = value;\n }\n\n private constructor() {}\n\n public init(baseURL: string, retryCount: number) {\n if (isEmptyOrBlank(baseURL))\n throw new BaseError(BaseErrorCodes.InvalidBaseURL, InvalidBaseURL);\n this.maxRetryCount = retryCount;\n this.documentHttpClient = new DocumentHttpClient(baseURL);\n }\n\n public static getInstance(): DocumentSyncManager {\n if (!DocumentSyncManager.instance) {\n DocumentSyncManager.instance = new DocumentSyncManager();\n }\n return DocumentSyncManager.instance;\n }\n\n public async startDocumentSync(): Promise<void> {\n if (!this.inProgress && this._retries < this.maxRetryCount) {\n this.inProgress = true;\n const hasNetwork = await NetworkUtil.isAvailableAsync();\n try {\n this.checkForInitialization();\n if (!this.docManager) {\n this.docManager = await DocumentManager.getInstance();\n }\n if (hasNetwork) {\n let documentRows: DocumentRow[] =\n await this.docManager.getUnsyncedDocument();\n if (documentRows?.length > 0) {\n await this.uploadDocToServer(documentRows[0]);\n } else {\n let cta = 'startDocumentSync'\n fireEventWithScreenName({\n severityLevel: SeverityLevelValue.LOG,\n eventName: SentryEventNameSdkConstants.APP_LOG,\n screenName: cta,\n cta: cta,\n extraParams: {\n msg:'No data to sync'\n },\n });\n Logger.getInstance().logEvent(\n cta,\n 'No data to sync',\n LOG_TYPE.SDK_ERROR\n );\n }\n } else {\n let cta = 'startDocumentSync'\n fireEventWithScreenName({\n severityLevel: SeverityLevelValue.LOG,\n eventName: SentryEventNameSdkConstants.APP_LOG,\n screenName: cta,\n cta: cta,\n extraParams: {\n msg:'No Network'\n },\n });\n Logger.getInstance().logEvent(\n cta,\n 'No Network',\n LOG_TYPE.SDK_ERROR\n );\n }\n } catch (error: any) {\n } finally {\n this.inProgress = false;\n if ((await this.isSyncPending()) && hasNetwork) {\n await this.startDocumentSync();\n }\n }\n } else {\n if (!this.docManager) {\n this.docManager = await DocumentManager.getInstance();\n }\n let documentRows: DocumentRow[] =\n await this.docManager.getUnsyncedDocument();\n if (documentRows?.length > 0) {\n await this.docManager.updateDocPriority(documentRows[0].id, documentRows[0].priority + 1);\n this._retries = 0;\n this.startDocumentSync();\n }\n let cta = 'startDocumentSync'\n fireEventWithScreenName({\n severityLevel: SeverityLevelValue.LOG,\n eventName: SentryEventNameSdkConstants.APP_LOG,\n screenName: cta,\n cta: cta,\n extraParams: {\n msg:'sync already in progress'\n },\n });\n Logger.getInstance().logEvent(\n cta,\n 'sync already in progress',\n LOG_TYPE.SDK_ERROR\n );\n }\n }\n\n public async isSyncPending(): Promise<boolean> {\n if (!this.docManager) this.docManager = await DocumentManager.getInstance();\n let leftDocuments = await this.docManager.getAllUnsyncedDocs();\n return leftDocuments?.length > 0 && this._retries < this.maxRetryCount;\n }\n\n public async insertDocument(\n fmsFolderID: string | null,\n data: string | null,\n base64: boolean,\n desc: string,\n dspID: string,\n // jobID: string,\n // objRef: string,\n filePath: string | null,\n fileType: string,\n fileName: string,\n geoTimeStamp: string,\n processedFilePath: string,\n priority: number = 1\n ): Promise<SQLResultSet> {\n if (\n isEmptyOrBlank(desc) ||\n isEmptyOrBlank(dspID) ||\n // isEmptyOrBlank(jobID) ||\n // isEmptyOrBlank(objRef) ||\n isEmptyOrBlank(fileType) ||\n isEmptyOrBlank(fileName) ||\n (base64 && isEmptyOrBlank(data)) ||\n (!base64 && isEmptyOrBlank(filePath))\n )\n throw new BaseError(\n BaseErrorCodes.InvalidArgumentError,\n InvalidArgumentsError\n );\n else {\n if (!this.docManager) {\n let cta = 'insertDocument'\n fireEventWithScreenName({\n severityLevel: SeverityLevelValue.LOG,\n eventName: SentryEventNameSdkConstants.APP_LOG,\n screenName: cta,\n cta: cta,\n extraParams: {\n msg:'INIT DOC SYNC AGAIN'\n },\n });\n Logger.getInstance().logEvent(\n cta,\n 'INIT DOC SYNC AGAIN',\n LOG_TYPE.SDK_ERROR\n );\n this.docManager = await DocumentManager.getInstance();\n }\n console.log('insertDocument1:',fmsFolderID);\n let insertResponse = await this.docManager?.insertDocument(\n fmsFolderID,\n desc,\n dspID,\n // jobID,\n // objRef,\n base64,\n fileName,\n fileType,\n data,\n filePath,\n geoTimeStamp,\n processedFilePath,\n priority\n );\n return insertResponse;\n }\n }\n\n public async forceDocumentSync() {\n if (!this.docManager) this.docManager = await DocumentManager.getInstance();\n this._retries = 0;\n await this.startDocumentSync();\n }\n\n private async updateDocument(documentRow: DocumentRow, fmsID: string) {\n if (!this.docManager) this.docManager = await DocumentManager.getInstance();\n try {\n await this.docManager.markDocumentSynced(documentRow.id, fmsID);\n } catch (err: any) {\n let cta = 'updateDocument'\n fireEventWithScreenName({\n severityLevel: SeverityLevelValue.LOG,\n eventName: SentryEventNameSdkConstants.APP_LOG,\n screenName: cta,\n cta: cta,\n extraParams: {\n msg:err\n },\n });\n Logger.getInstance().logEvent(\n cta,\n err,\n LOG_TYPE.SDK_WARNING\n );\n }\n }\n\n // This function is updating processed_file_path column for the base64 overlayed data and overlayed image file for POD. Also if it is base 64 then it is also storing temprary file path in file_path as original bae64 image.\n private async updateDocumentProcessedPath(\n documentRow: DocumentRow,\n origialFilePath: String,\n processedPath: String\n ) {\n if (!this.docManager) this.docManager = await DocumentManager.getInstance();\n try {\n await this.docManager.updateProcesedFilePath(\n documentRow.id,\n origialFilePath,\n processedPath\n );\n } catch (err: any) {\n let cta = 'updateDocument'\n fireEventWithScreenName({\n severityLevel: SeverityLevelValue.ERROR,\n eventName: SentryEventNameSdkConstants.APP_ERROR,\n screenName: cta,\n cta: cta,\n extraParams: {\n msg:err\n },\n });\n Logger.getInstance().logEvent(\n cta,\n err,\n LOG_TYPE.SDK_WARNING\n );\n }\n }\n\n private async updateDocError(documentRow: DocumentRow, uploadError: string) {\n if (!this.docManager) this.docManager = await DocumentManager.getInstance();\n try {\n await this.docManager.updateDocSyncError(documentRow.id, uploadError);\n } catch (err: any) {\n let cta = 'updateDocError'\n fireEventWithScreenName({\n severityLevel: SeverityLevelValue.ERROR,\n eventName: SentryEventNameSdkConstants.APP_ERROR,\n screenName: cta,\n cta: cta,\n extraParams: {\n msg:err\n },\n });\n Logger.getInstance().logEvent(\n cta,\n err,\n LOG_TYPE.SDK_WARNING\n );\n }\n }\n private checkForInitialization() {\n if (!this.documentHttpClient) {\n throw new BaseError(\n BaseErrorCodes.SyncManagerNotInitialized,\n SyncManagerNotInitialized\n );\n }\n }\n\n // This function will generate overlay image and update documents table for processed_file_path columns with overlayed image path.\n private async processImageData(documentRow: DocumentRow) {\n // If processed_file_path of overlayed image already existing then do not generate it again.\n if (\n documentRow.processed_file_path === null ||\n documentRow.processed_file_path === ''\n ) {\n let pFilePath = 'processed_' + documentRow.file_name; // File name for processed file.\n let strGeoStamp = documentRow.geo_timestamp; // Saved geostamp string\n let objGeoStamp = JSON.parse(strGeoStamp); // Conversion to geostamp object\n let dateTime = objGeoStamp.dateTime; // Date time stamp in UTC format\n let lat = objGeoStamp.lat; // Latitide\n let lng = objGeoStamp.lng; // Longitude\n let accuracy = objGeoStamp.accuracy; // Location accuracy\n let strDMS = latlngToDms(`${lat}, ${lng}`); // Location in degree format\n let strDMSWithAccuracy = strDMS; \n if (accuracy !== '') {\n strDMSWithAccuracy = strDMS + ' (Accuracy: ' + accuracy + 'm)'; // Appedning accuracy in location \n }\n let fontSize = 14;\n if (Platform.OS !== 'android') {\n fontSize = 28;\n }\n const options = {\n backgroundImage: { // Image for overlay\n src: documentRow.file_path,\n scale: 1,\n },\n watermarkTexts: [ \n {\n text: `${dateTime}\\n${strDMSWithAccuracy}`, //Overlay text\n position: {\n position: Position.topLeft, // Overlay text position\n },\n style: { // Style for overlay\n color: '#ffffff',\n fontSize: fontSize,\n fontName: 'Arial',\n textBackgroundStyle: {\n padding: '1% 1%',\n type: TextBackgroundType.none,\n color: '#444444CC',\n },\n },\n },\n ],\n scale: 0,\n quality: 100, \n filename: pFilePath,\n saveFormat: ImageFormat.jpg, // Saving in jpeg format\n };\n let processedFilePath = await Marker.markText(options); // Generating overlay image\n if (processedFilePath !== null && processedFilePath !== '') {\n let completeFilePath = processedFilePath;\n // If processd image file path does not have prefix file:// then we are addding manually\n if (!processedFilePath.includes('file')) {\n completeFilePath = 'file://' + processedFilePath;\n }\n // Updating document document table with overlayed image path\n this.updateDocumentProcessedPath(\n documentRow,\n documentRow.file_path, //original file path catprued from camera\n completeFilePath // completeFilePath is the path with file:// of processed file \n );\n documentRow.processed_file_path = completeFilePath; \n }\n }\n return documentRow;\n }\n\n // This function will generate overlay base64 data and update documents table for processed_file_path columns with overlayed base64 data.\n private async processBase64Data(documentRow: DocumentRow) {\n // If base64 overlayed data already existing then do not generate it again.\n if (\n documentRow.processed_file_path === null ||\n documentRow.processed_file_path === ''\n ) {\n let filePath = '';\n // If templrary base 64 file already exist then do not create again\n if (documentRow.file_path === null || documentRow.file_path === '') {\n const imagePath = `${RNFS.TemporaryDirectoryPath}/${documentRow.file_name}`;\n await RNFS.writeFile(imagePath, documentRow.data, 'base64'); // Write file to temprary location\n filePath = imagePath;\n // If file generated frommbase64 data does not have file:// then we are adding manually.\n if (!imagePath.includes('file')) {\n filePath = `file://${imagePath}`;\n }\n documentRow.file_path = filePath;\n } else {\n filePath = documentRow.file_path;\n }\n let pFilePath = 'processed_' + documentRow.file_name; // File name for processed file.\n let strGeoStamp = documentRow.geo_timestamp; // Saved geostamp string\n let objGeoStamp = JSON.parse(strGeoStamp); // Conversion to geostamp object\n let dateTime = objGeoStamp.dateTime; // Date time stamp in UTC format\n let lat = objGeoStamp.lat; // Latitide\n let lng = objGeoStamp.lng; // Longitude\n let accuracy = objGeoStamp.accuracy; // Location accuracy\n let strDMS = latlngToDms(`${lat}, ${lng}`); // Location in degree format\n let strDMSWithAccuracy = strDMS; \n if (accuracy !== '') {\n strDMSWithAccuracy = strDMS + ' (Accuracy: ' + accuracy + 'm)'; // Appedning accuracy in location \n }\n const options = {\n backgroundImage: {\n src: filePath, // Image for overlay\n scale: 1,\n },\n watermarkTexts: [\n {\n text: `${dateTime}\\n${strDMSWithAccuracy}`, // Ooverlay text\n position: {\n position: Position.topLeft, // Overlay text position\n },\n style: { // Style for overlay\n color: '#ffffff',\n fontSize: 14,\n fontName: 'Arial',\n textBackgroundStyle: {\n padding: '1% 1%',\n type: TextBackgroundType.none,\n color: '#444444CC',\n },\n },\n },\n ],\n scale: 1,\n quality: 100,\n filename: pFilePath,\n saveFormat: ImageFormat.base64, // Saving in base6 format\n };\n let processedBase64 = await Marker.markText(options); // Generating overlay image\n if (processedBase64 !== null && processedBase64 !== '') {\n // Fetching base64 data from processed data.\n var splittedDase64Data = processedBase64.split(\n 'data:image/png;base64,'\n );\n // Updating document document table with overlayed base64 data\n await this.updateDocumentProcessedPath(\n documentRow,\n filePath,\n splittedDase64Data[1]\n );\n documentRow.processed_file_path = splittedDase64Data[1];\n }\n }\n return documentRow;\n }\n\n // This function will calling respective overlay method for base64 (for signature POD) or image (for image POD).\n private async processPODData(documentRow: DocumentRow) {\n if (documentRow.base64 && documentRow.data != null) {\n return await this.processBase64Data(documentRow);\n } else {\n return await this.processImageData(documentRow);\n }\n }\n\n private async uploadDocToServer(documentRow: DocumentRow) {\n try {\n let docRow = documentRow;\n let cta = 'uploadDocToServer-geoStamp';\n let geoStampAvailable = false\n if(documentRow.geo_timestamp && documentRow.geo_timestamp.length != 0){\n geoStampAvailable = true;\n docRow = await this.processPODData(documentRow);\n }\n let extra = {\n msg: geoStampAvailable ? \"geoStamp availale\" : 'geoStamp not availale',\n fName: docRow.file_name && docRow.file_name.length != 0 ? docRow.file_name.substring(4): '',\n dName: docRow.fms_folder_id && docRow.fms_folder_id.length != 0 ? docRow.fms_folder_id.substring(4): '',\n dispId: docRow.dispatch_id && docRow.dispatch_id.length != 0 ? docRow.dispatch_id.substring(9): ''\n };\n fireEventWithScreenName({\n severityLevel: SeverityLevelValue.LOG,\n eventName: SentryEventNameSdkConstants.APP_LOG,\n screenName: cta,\n cta: cta,\n extraParams: extra,\n });\n Logger.getInstance().logEvent(\n cta,\n flattenObject(extra),\n LOG_TYPE.SDK_ERROR\n );\n console.log('uploadDocToServer999:', docRow);\n let fmsID = await this.documentHttpClient?.uploadDocument(docRow);\n\n let extraParameters = {\n fmsID: fmsID ?? '',\n fName: docRow.file_name && docRow.file_name.length != 0 ? docRow.file_name.substring(4): '',\n dName: docRow.fms_folder_id && docRow.fms_folder_id.length != 0 ? docRow.fms_folder_id.substring(4): '',\n dispId: docRow.dispatch_id && docRow.dispatch_id.length != 0 ? docRow.dispatch_id.substring(9): ''\n };\n // TODO: SOLELY DEPENDS ON FMS_ID WHICH IS WRONG => IT SHOULD BE Response.status = 202\n if (fmsID) {\n this._retries = 0;\n await this.updateDocument(docRow, fmsID);\n } else {\n this._retries++;\n let cta = 'uploadDocToServer-empty-fms-id'\n fireEventWithScreenName({\n severityLevel: SeverityLevelValue.LOG,\n eventName: SentryEventNameSdkConstants.APP_LOG,\n screenName: cta,\n cta: cta,\n extraParams: extraParameters,\n });\n Logger.getInstance().logEvent(\n cta,\n flattenObject(extraParameters),\n LOG_TYPE.SDK_ERROR\n );\n await this.updateDocError(docRow, 'Unexpected Error');\n }\n } catch (error: any) {\n const cta = 'uploadDocToServer-error';\n fireEventWithScreenName({\n severityLevel: SeverityLevelValue.ERROR,\n eventName: SentryEventNameSdkConstants.API_ERROR,\n screenName: cta,\n cta: cta,\n extraParams: {\n error: error,\n },\n });\n Logger.getInstance().logEvent(\n cta,\n error,\n LOG_TYPE.SDK_ERROR\n );\n this._retries++;\n await this.updateDocError(\n documentRow,\n JSON.stringify({\n message: error.message,\n error: JSON.stringify(error?.response?.data),\n status: error?.response?.status,\n })\n );\n }\n }\n\n public async getAllDocuments(dispatchID?: string): Promise<DocumentRow[]> {\n if (!this.docManager) this.docManager = await DocumentManager.getInstance();\n return this.docManager.getAllDocuments(dispatchID);\n }\n\n public async clearSyncedDocs(dspID: string) {\n if (!this.docManager) this.docManager = await DocumentManager.getInstance();\n if (dspID) await this.docManager.deleteAllSyncedDocuments(dspID);\n }\n}\n"],"mappings":";;;;;;AACA,IAAAA,gBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,mBAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAC,uBAAA,CAAAL,OAAA;AAKA,IAAAM,OAAA,GAAAD,uBAAA,CAAAL,OAAA;AAEA,IAAAO,YAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,uBAAA,GAAAH,uBAAA,CAAAL,OAAA;AAKA,IAAAS,cAAA,GAAAV,sBAAA,CAAAC,OAAA;AAEA,IAAAU,YAAA,GAAAV,OAAA;AACA,IAAAW,mBAAA,GAAAX,OAAA;AACA,IAAAY,qBAAA,GAAAZ,OAAA;AAAyF,IAAAa,oBAAA;AAAA,SAAAC,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA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AACF;AAAC2G,OAAA,CAAA/L,OAAA,GAAA6B,mBAAA;AAAApC,oBAAA,GArhBoBoC,mBAAmB;AAAAd,eAAA,CAAnBc,mBAAmB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["models.ts"],"sourcesContent":["export type FILE_TAGS = {\n key: string;\n value: string;\n};\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["models.ts"],"sourcesContent":["export type FILE_TAGS = {\n key: string;\n value: string;\n};\n"],"mappings":"","ignoreList":[]}
@@ -12,12 +12,12 @@ var _ErrorCodes = _interopRequireWildcard(require("../../../errors/ErrorCodes"))
12
12
  var _Logger = _interopRequireWildcard(require("../../../utils/Logger"));
13
13
  var _constants = require("../constants");
14
14
  var _platformCoreosExecutionEngineSdk = require("@os1-platform/platform-coreos-execution-engine-sdk");
15
- var _class;
15
+ var _ETEventsManager;
16
16
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
17
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
17
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
18
18
  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; }
19
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
20
- 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); } // NEW CODE
19
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
20
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } // NEW CODE
21
21
  const SyncType = _platformCoreosExecutionEngineSdk.IDispatch.SyncType;
22
22
  class ETEventsManager {
23
23
  constructor() {
@@ -225,7 +225,6 @@ class ETEventsManager {
225
225
  // ? _evData.meta.jobId + _evData.meta.objectiveReference
226
226
  // : 'NO_REF_FOUND'
227
227
  );
228
-
229
228
  queryData.push({
230
229
  query: `INSERT INTO ${_DBConfig.EVENTS_TABLE}(\
231
230
  ${_DBConfig.EVENTS_COLUMNS.PAYLOAD},\
@@ -509,6 +508,6 @@ class ETEventsManager {
509
508
  }
510
509
  }
511
510
  exports.default = ETEventsManager;
512
- _class = ETEventsManager;
511
+ _ETEventsManager = ETEventsManager;
513
512
  _defineProperty(ETEventsManager, "instance", void 0);
514
513
  //# sourceMappingURL=ETEventsManager.js.map