@os1-platform/dispatch-mobile 2.1.8 → 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.
- package/lib/commonjs/@types/assets/index.d.js.map +1 -1
- package/lib/commonjs/analytics/firebase/FirebaseLogging.js.map +1 -1
- package/lib/commonjs/analytics/sentry/SentryAnalyticsSingleton.js +4 -4
- package/lib/commonjs/analytics/sentry/SentryAnalyticsSingleton.js.map +1 -1
- package/lib/commonjs/analytics/sentry/SentryAnalyticsUtils.js +8 -9
- package/lib/commonjs/analytics/sentry/SentryAnalyticsUtils.js.map +1 -1
- package/lib/commonjs/analytics/sentry/SentryModels.js.map +1 -1
- package/lib/commonjs/analytics/sentry/SentrySdkConstants.js +2 -0
- package/lib/commonjs/analytics/sentry/SentrySdkConstants.js.map +1 -1
- package/lib/commonjs/components/dispatch/DispatchExecNavigator.js +4 -5
- package/lib/commonjs/components/dispatch/DispatchExecNavigator.js.map +1 -1
- package/lib/commonjs/components/executiontasks/CompletedWFSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/ExecutionTasksIndex.js.map +1 -1
- package/lib/commonjs/components/executiontasks/cancellation/CancelET.js +7 -9
- package/lib/commonjs/components/executiontasks/cancellation/CancelET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/cancellation/CancellationSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/captureInput/CaptureInputSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js +1 -1
- package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js.map +1 -1
- package/lib/commonjs/components/executiontasks/captureInput/utils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/deliver/DeliverET.js +14 -20
- package/lib/commonjs/components/executiontasks/deliver/DeliverET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/deliver/DeliverETInput.js.map +1 -1
- package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js +15 -21
- package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/display/DisplayModalET.js +1 -1
- package/lib/commonjs/components/executiontasks/display/DisplayModalET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/display/DisplaySchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/doodle/SignatureET.js +1 -2
- package/lib/commonjs/components/executiontasks/doodle/SignatureET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/doodle/SignatureSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js +1 -1
- package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/dropCash/DropCashSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js +1 -1
- package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/FormGenerator.js +1 -1
- package/lib/commonjs/components/executiontasks/forms/FormGenerator.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/FormSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js +12 -13
- package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/DropdownWidget.js +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/DropdownWidget.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +10 -11
- package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/TimeRangeSelector.js +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/TimeRangeSelector.js.map +1 -1
- package/lib/commonjs/components/executiontasks/httpRequest/HttpEtUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js +1 -1
- package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestETSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js +10 -12
- package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/PaymentStyles.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/PaymentUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js +1 -1
- package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js +4 -5
- package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/init/InitPaymentSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js +1 -1
- package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/pickup/PickpSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/pickup/PickupET.js +14 -20
- package/lib/commonjs/components/executiontasks/pickup/PickupET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js +15 -21
- package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/ScanET.js +2 -4
- package/lib/commonjs/components/executiontasks/scan/ScanET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/ScanSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/constants.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/interfaces.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/modalConstant.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/sub_components/CScanner.js +4 -5
- package/lib/commonjs/components/executiontasks/scan/sub_components/CScanner.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/sub_components/DropDownUtils.js +0 -1
- package/lib/commonjs/components/executiontasks/scan/sub_components/DropDownUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/sub_components/ERDropDown.js +1 -3
- package/lib/commonjs/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/sub_components/SummaryPage.js +2 -5
- package/lib/commonjs/components/executiontasks/scan/sub_components/SummaryPage.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/utils.js +1 -1
- package/lib/commonjs/components/executiontasks/scan/utils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/constants.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/utils.js +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/utils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/verifyInput/VerifyInputSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/verifyLocation/GeofenceUtils.js +1 -1
- package/lib/commonjs/components/executiontasks/verifyLocation/GeofenceUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js +1 -1
- package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js +1 -1
- package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpSchema.js.map +1 -1
- package/lib/commonjs/components/utils/index.js.map +1 -1
- package/lib/commonjs/components/widgets/AlertDisplay.js +1 -1
- package/lib/commonjs/components/widgets/AlertDisplay.js.map +1 -1
- package/lib/commonjs/components/widgets/CancelOrderDialog.js +1 -1
- package/lib/commonjs/components/widgets/CancelOrderDialog.js.map +1 -1
- package/lib/commonjs/components/widgets/Card.js +0 -1
- package/lib/commonjs/components/widgets/Card.js.map +1 -1
- package/lib/commonjs/components/widgets/GoBackModal.js.map +1 -1
- package/lib/commonjs/components/widgets/IconButton.js +19 -22
- package/lib/commonjs/components/widgets/IconButton.js.map +1 -1
- package/lib/commonjs/components/widgets/ModalWidget.js.map +1 -1
- package/lib/commonjs/components/widgets/ProgressDialog.js.map +1 -1
- package/lib/commonjs/components/widgets/SearchBar.js.map +1 -1
- package/lib/commonjs/components/widgets/SnackBarCustom.js +15 -18
- package/lib/commonjs/components/widgets/SnackBarCustom.js.map +1 -1
- package/lib/commonjs/components/widgets/SplitTextInput.js +9 -10
- package/lib/commonjs/components/widgets/SplitTextInput.js.map +1 -1
- package/lib/commonjs/components/widgets/TabsComponent.js +1 -1
- package/lib/commonjs/components/widgets/TabsComponent.js.map +1 -1
- package/lib/commonjs/components/widgets/Toaster.js.map +1 -1
- package/lib/commonjs/config/DispatchSDKConfig.js.map +1 -1
- package/lib/commonjs/constants/apiConstants.js.map +1 -1
- package/lib/commonjs/constants/constants.js.map +1 -1
- package/lib/commonjs/constants/statuscode.js.map +1 -1
- package/lib/commonjs/errors/BaseError.js +2 -2
- package/lib/commonjs/errors/BaseError.js.map +1 -1
- package/lib/commonjs/errors/ErrorCodes.js.map +1 -1
- package/lib/commonjs/events/EventDispatcher.js.map +1 -1
- package/lib/commonjs/events/EventListener.js.map +1 -1
- package/lib/commonjs/events/constants.js.map +1 -1
- package/lib/commonjs/events/index.js.map +1 -1
- package/lib/commonjs/events/interface.js.map +1 -1
- package/lib/commonjs/icons/ScanIcon.js.map +1 -1
- package/lib/commonjs/icons/file.js.map +1 -1
- package/lib/commonjs/icons/interface.js.map +1 -1
- package/lib/commonjs/index.js +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/locale/Str.js.map +1 -1
- package/lib/commonjs/locale/i18n.js.map +1 -1
- package/lib/commonjs/locale/util.js.map +1 -1
- package/lib/commonjs/manager/dispatch/DispatchStateContainer.js +5 -5
- package/lib/commonjs/manager/dispatch/DispatchStateContainer.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/EventCodeContainer.js +4 -4
- package/lib/commonjs/manager/dispatchCodes/EventCodeContainer.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/EventCodeRepo.js +5 -5
- package/lib/commonjs/manager/dispatchCodes/EventCodeRepo.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeContainer.js +5 -5
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeRepo.js +5 -5
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -1
- package/lib/commonjs/manager/jobRemoval/JobRemovalManager.js.map +1 -1
- package/lib/commonjs/manager/location/LocationManager.js +5 -5
- package/lib/commonjs/manager/location/LocationManager.js.map +1 -1
- package/lib/commonjs/manager/sdk/DispatchSDKManager.js +8 -8
- package/lib/commonjs/manager/sdk/DispatchSDKManager.js.map +1 -1
- package/lib/commonjs/manager/sdk/DispatchSdkCache.js +4 -4
- package/lib/commonjs/manager/sdk/DispatchSdkCache.js.map +1 -1
- package/lib/commonjs/manager/sdk/callbacksHandler.js +30 -3
- package/lib/commonjs/manager/sdk/callbacksHandler.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/AppSyncManager.js +5 -5
- package/lib/commonjs/manager/syncmanager/AppSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/DBConfig.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/NativeSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/constants.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/database.js +1 -1
- package/lib/commonjs/manager/syncmanager/database.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js +38 -21
- package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentManager.js +12 -5
- package/lib/commonjs/manager/syncmanager/document/DocumentManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js +128 -28
- package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/models.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js +5 -6
- package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/EventsGraphQLClient.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js +5 -6
- package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/SyncHttpClient.js +2 -6
- package/lib/commonjs/manager/syncmanager/events/SyncHttpClient.js.map +1 -1
- package/lib/commonjs/models/DispatchModels.js.map +1 -1
- package/lib/commonjs/models/ReasonCodes.js.map +1 -1
- package/lib/commonjs/models/auth.js.map +1 -1
- package/lib/commonjs/models/execTasks/ETBaseModels.js.map +1 -1
- package/lib/commonjs/models/execTasks/ETConfig.js.map +1 -1
- package/lib/commonjs/models/execution.js.map +1 -1
- package/lib/commonjs/models/fcm.js.map +1 -1
- package/lib/commonjs/models/sdk.js.map +1 -1
- package/lib/commonjs/native/signature/SignatureCapture.js +2 -2
- package/lib/commonjs/native/signature/SignatureCapture.js.map +1 -1
- package/lib/commonjs/network/GraphQLClient.js +13 -17
- package/lib/commonjs/network/GraphQLClient.js.map +1 -1
- package/lib/commonjs/network/NetworkClient.js +12 -2
- package/lib/commonjs/network/NetworkClient.js.map +1 -1
- package/lib/commonjs/network/NetworkUtils.js +14 -10
- package/lib/commonjs/network/NetworkUtils.js.map +1 -1
- package/lib/commonjs/network/Queries.js.map +1 -1
- package/lib/commonjs/network/client.js +3 -4
- package/lib/commonjs/network/client.js.map +1 -1
- package/lib/commonjs/res/strings.js.map +1 -1
- package/lib/commonjs/resources/Login.js +2 -2
- package/lib/commonjs/resources/Login.js.map +1 -1
- package/lib/commonjs/resources/network.js +2 -2
- package/lib/commonjs/resources/network.js.map +1 -1
- package/lib/commonjs/styles/SdkColors.js.map +1 -1
- package/lib/commonjs/styles/executionTasks/CommonStyles.js +1 -1
- package/lib/commonjs/styles/executionTasks/CommonStyles.js.map +1 -1
- package/lib/commonjs/ui/screens/CancellationScreen.js +6 -7
- package/lib/commonjs/ui/screens/CancellationScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CaptureInputScreen.js +6 -7
- package/lib/commonjs/ui/screens/CaptureInputScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js +6 -7
- package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DeliverScreen.js +6 -7
- package/lib/commonjs/ui/screens/DeliverScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DisplayScreen.js +6 -7
- package/lib/commonjs/ui/screens/DisplayScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DoodleScreen.js +6 -7
- package/lib/commonjs/ui/screens/DoodleScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DropCashScreen.js +7 -7
- package/lib/commonjs/ui/screens/DropCashScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ETScreensIndex.js.map +1 -1
- package/lib/commonjs/ui/screens/FormsScreen.js +6 -7
- package/lib/commonjs/ui/screens/FormsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/GeofenceScreen.js +6 -7
- package/lib/commonjs/ui/screens/GeofenceScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HttpRequestScreen.js +5 -6
- package/lib/commonjs/ui/screens/HttpRequestScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ImageCaptureScreen.js +6 -7
- package/lib/commonjs/ui/screens/ImageCaptureScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentScreen.js +6 -7
- package/lib/commonjs/ui/screens/PaymentScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PickupScreen.js +6 -7
- package/lib/commonjs/ui/screens/PickupScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ScanScreen.js +6 -8
- package/lib/commonjs/ui/screens/ScanScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/StartWorkFlowScreen.js +6 -7
- package/lib/commonjs/ui/screens/StartWorkFlowScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ValidateOTPScreen.js +6 -7
- package/lib/commonjs/ui/screens/ValidateOTPScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/WithBaseDispatchScreen.js +1 -1
- package/lib/commonjs/ui/screens/WithBaseDispatchScreen.js.map +1 -1
- package/lib/commonjs/ui/uiConfig/RouteParams.js.map +1 -1
- package/lib/commonjs/utils/ApiUtils.js.map +1 -1
- package/lib/commonjs/utils/ExecTaskUtils.js +1 -2
- package/lib/commonjs/utils/ExecTaskUtils.js.map +1 -1
- package/lib/commonjs/utils/Logger.js +4 -5
- package/lib/commonjs/utils/Logger.js.map +1 -1
- package/lib/commonjs/utils/NetworkUtil.js +2 -2
- package/lib/commonjs/utils/NetworkUtil.js.map +1 -1
- package/lib/commonjs/utils/SdkUtils.js +1 -1
- package/lib/commonjs/utils/SdkUtils.js.map +1 -1
- package/lib/commonjs/utils/SyncManagerUtils.js +1 -1
- package/lib/commonjs/utils/SyncManagerUtils.js.map +1 -1
- package/lib/commonjs/utils/fcm/FCM.js +1 -1
- package/lib/commonjs/utils/fcm/FCM.js.map +1 -1
- package/lib/commonjs/utils/fcm/FcmUtils.js +1 -1
- package/lib/commonjs/utils/fcm/FcmUtils.js.map +1 -1
- package/lib/commonjs/utils/helper.js +4 -4
- package/lib/commonjs/utils/helper.js.map +1 -1
- package/lib/commonjs/utils/hooks/useModal.js +2 -1
- package/lib/commonjs/utils/hooks/useModal.js.map +1 -1
- package/lib/commonjs/utils/hooks/useTimer.js.map +1 -1
- package/lib/commonjs/utils/loginHelper.js.map +1 -1
- package/lib/commonjs/utils/storage.js +6 -9
- package/lib/commonjs/utils/storage.js.map +1 -1
- package/lib/commonjs/utils/utils.js +1 -3
- package/lib/commonjs/utils/utils.js.map +1 -1
- package/lib/module/@types/assets/index.d.js.map +1 -1
- package/lib/module/analytics/firebase/FirebaseLogging.js.map +1 -1
- package/lib/module/analytics/sentry/SentryAnalyticsSingleton.js +4 -4
- package/lib/module/analytics/sentry/SentryAnalyticsSingleton.js.map +1 -1
- package/lib/module/analytics/sentry/SentryAnalyticsUtils.js +7 -8
- package/lib/module/analytics/sentry/SentryAnalyticsUtils.js.map +1 -1
- package/lib/module/analytics/sentry/SentryModels.js.map +1 -1
- package/lib/module/analytics/sentry/SentrySdkConstants.js +2 -0
- package/lib/module/analytics/sentry/SentrySdkConstants.js.map +1 -1
- package/lib/module/components/dispatch/DispatchExecNavigator.js +3 -4
- package/lib/module/components/dispatch/DispatchExecNavigator.js.map +1 -1
- package/lib/module/components/executiontasks/CompletedWFSchema.js.map +1 -1
- package/lib/module/components/executiontasks/ExecutionTasksIndex.js.map +1 -1
- package/lib/module/components/executiontasks/cancellation/CancelET.js +6 -8
- package/lib/module/components/executiontasks/cancellation/CancelET.js.map +1 -1
- package/lib/module/components/executiontasks/cancellation/CancellationSchema.js.map +1 -1
- package/lib/module/components/executiontasks/captureInput/CaptureInputSchema.js.map +1 -1
- package/lib/module/components/executiontasks/captureInput/CaptureText.js.map +1 -1
- package/lib/module/components/executiontasks/captureInput/utils.js.map +1 -1
- package/lib/module/components/executiontasks/deliver/DeliverET.js +13 -19
- package/lib/module/components/executiontasks/deliver/DeliverET.js.map +1 -1
- package/lib/module/components/executiontasks/deliver/DeliverETInput.js.map +1 -1
- package/lib/module/components/executiontasks/deliver/SLDeliverET.js +14 -20
- package/lib/module/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
- package/lib/module/components/executiontasks/display/DisplayModalET.js.map +1 -1
- package/lib/module/components/executiontasks/display/DisplaySchema.js.map +1 -1
- package/lib/module/components/executiontasks/doodle/SignatureET.js +0 -1
- package/lib/module/components/executiontasks/doodle/SignatureET.js.map +1 -1
- package/lib/module/components/executiontasks/doodle/SignatureSchema.js.map +1 -1
- package/lib/module/components/executiontasks/dropCash/DropCashET.js.map +1 -1
- package/lib/module/components/executiontasks/dropCash/DropCashSchema.js.map +1 -1
- package/lib/module/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
- package/lib/module/components/executiontasks/forms/FormGenerator.js.map +1 -1
- package/lib/module/components/executiontasks/forms/FormSchema.js.map +1 -1
- package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js +11 -12
- package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
- package/lib/module/components/executiontasks/forms/widgets/DropdownWidget.js.map +1 -1
- package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +9 -10
- package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
- package/lib/module/components/executiontasks/forms/widgets/TimeRangeSelector.js.map +1 -1
- package/lib/module/components/executiontasks/httpRequest/HttpEtUtils.js.map +1 -1
- package/lib/module/components/executiontasks/httpRequest/HttpRequestET.js.map +1 -1
- package/lib/module/components/executiontasks/httpRequest/HttpRequestETSchema.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/CaptureSchema.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/ImageCapture.js +9 -11
- package/lib/module/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
- package/lib/module/components/executiontasks/payments/PaymentStyles.js.map +1 -1
- package/lib/module/components/executiontasks/payments/PaymentUtils.js.map +1 -1
- package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentSchema.js.map +1 -1
- package/lib/module/components/executiontasks/payments/init/InitPaymentET.js +3 -4
- package/lib/module/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/payments/init/InitPaymentSchema.js.map +1 -1
- package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentSchema.js.map +1 -1
- package/lib/module/components/executiontasks/pickup/PickpSchema.js.map +1 -1
- package/lib/module/components/executiontasks/pickup/PickupET.js +13 -19
- package/lib/module/components/executiontasks/pickup/PickupET.js.map +1 -1
- package/lib/module/components/executiontasks/pickup/SLPickupET.js +14 -20
- package/lib/module/components/executiontasks/pickup/SLPickupET.js.map +1 -1
- package/lib/module/components/executiontasks/scan/ScanET.js +1 -3
- package/lib/module/components/executiontasks/scan/ScanET.js.map +1 -1
- package/lib/module/components/executiontasks/scan/ScanSchema.js.map +1 -1
- package/lib/module/components/executiontasks/scan/constants.js.map +1 -1
- package/lib/module/components/executiontasks/scan/interfaces.js.map +1 -1
- package/lib/module/components/executiontasks/scan/modalConstant.js.map +1 -1
- package/lib/module/components/executiontasks/scan/sub_components/CScanner.js +3 -4
- package/lib/module/components/executiontasks/scan/sub_components/CScanner.js.map +1 -1
- package/lib/module/components/executiontasks/scan/sub_components/DropDownUtils.js +0 -1
- package/lib/module/components/executiontasks/scan/sub_components/DropDownUtils.js.map +1 -1
- package/lib/module/components/executiontasks/scan/sub_components/ERDropDown.js +0 -2
- package/lib/module/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -1
- package/lib/module/components/executiontasks/scan/sub_components/SummaryPage.js +1 -4
- package/lib/module/components/executiontasks/scan/sub_components/SummaryPage.js.map +1 -1
- package/lib/module/components/executiontasks/scan/utils.js.map +1 -1
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -1
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPSchema.js.map +1 -1
- package/lib/module/components/executiontasks/validateOTP/constants.js.map +1 -1
- package/lib/module/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -1
- package/lib/module/components/executiontasks/validateOTP/utils.js.map +1 -1
- package/lib/module/components/executiontasks/verifyInput/VerifyInputSchema.js.map +1 -1
- package/lib/module/components/executiontasks/verifyLocation/GeofenceUtils.js.map +1 -1
- package/lib/module/components/executiontasks/verifyLocation/VerifyLocSchema.js.map +1 -1
- package/lib/module/components/executiontasks/verifyLocation/VerifyLocationET.js.map +1 -1
- package/lib/module/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
- package/lib/module/components/executiontasks/verifyOtp/VerifyOtpSchema.js.map +1 -1
- package/lib/module/components/utils/index.js.map +1 -1
- package/lib/module/components/widgets/AlertDisplay.js.map +1 -1
- package/lib/module/components/widgets/CancelOrderDialog.js.map +1 -1
- package/lib/module/components/widgets/Card.js +0 -1
- package/lib/module/components/widgets/Card.js.map +1 -1
- package/lib/module/components/widgets/GoBackModal.js.map +1 -1
- package/lib/module/components/widgets/IconButton.js +19 -22
- package/lib/module/components/widgets/IconButton.js.map +1 -1
- package/lib/module/components/widgets/ModalWidget.js.map +1 -1
- package/lib/module/components/widgets/ProgressDialog.js.map +1 -1
- package/lib/module/components/widgets/SearchBar.js.map +1 -1
- package/lib/module/components/widgets/SnackBarCustom.js +15 -18
- package/lib/module/components/widgets/SnackBarCustom.js.map +1 -1
- package/lib/module/components/widgets/SplitTextInput.js +8 -9
- package/lib/module/components/widgets/SplitTextInput.js.map +1 -1
- package/lib/module/components/widgets/TabsComponent.js.map +1 -1
- package/lib/module/components/widgets/Toaster.js.map +1 -1
- package/lib/module/config/DispatchSDKConfig.js.map +1 -1
- package/lib/module/constants/apiConstants.js.map +1 -1
- package/lib/module/constants/constants.js.map +1 -1
- package/lib/module/constants/statuscode.js.map +1 -1
- package/lib/module/errors/BaseError.js +2 -2
- package/lib/module/errors/BaseError.js.map +1 -1
- package/lib/module/errors/ErrorCodes.js.map +1 -1
- package/lib/module/events/EventDispatcher.js.map +1 -1
- package/lib/module/events/EventListener.js.map +1 -1
- package/lib/module/events/constants.js.map +1 -1
- package/lib/module/events/index.js.map +1 -1
- package/lib/module/events/interface.js.map +1 -1
- package/lib/module/icons/ScanIcon.js.map +1 -1
- package/lib/module/icons/file.js.map +1 -1
- package/lib/module/icons/interface.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/locale/Str.js.map +1 -1
- package/lib/module/locale/i18n.js.map +1 -1
- package/lib/module/locale/util.js.map +1 -1
- package/lib/module/manager/dispatch/DispatchStateContainer.js +4 -4
- package/lib/module/manager/dispatch/DispatchStateContainer.js.map +1 -1
- package/lib/module/manager/dispatchCodes/EventCodeContainer.js +4 -4
- package/lib/module/manager/dispatchCodes/EventCodeContainer.js.map +1 -1
- package/lib/module/manager/dispatchCodes/EventCodeRepo.js +4 -4
- package/lib/module/manager/dispatchCodes/EventCodeRepo.js.map +1 -1
- package/lib/module/manager/dispatchCodes/ReasonCodeContainer.js +4 -4
- package/lib/module/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -1
- package/lib/module/manager/dispatchCodes/ReasonCodeRepo.js +4 -4
- package/lib/module/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -1
- package/lib/module/manager/jobRemoval/JobRemovalManager.js.map +1 -1
- package/lib/module/manager/location/LocationManager.js +4 -4
- package/lib/module/manager/location/LocationManager.js.map +1 -1
- package/lib/module/manager/sdk/DispatchSDKManager.js +7 -7
- package/lib/module/manager/sdk/DispatchSDKManager.js.map +1 -1
- package/lib/module/manager/sdk/DispatchSdkCache.js +4 -4
- package/lib/module/manager/sdk/DispatchSdkCache.js.map +1 -1
- package/lib/module/manager/sdk/callbacksHandler.js +29 -3
- package/lib/module/manager/sdk/callbacksHandler.js.map +1 -1
- package/lib/module/manager/syncmanager/AppSyncManager.js +4 -4
- package/lib/module/manager/syncmanager/AppSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/DBConfig.js +1 -0
- package/lib/module/manager/syncmanager/DBConfig.js.map +1 -1
- package/lib/module/manager/syncmanager/NativeSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/constants.js.map +1 -1
- package/lib/module/manager/syncmanager/database.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentHttpClient.js +38 -21
- package/lib/module/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentManager.js +11 -4
- package/lib/module/manager/syncmanager/document/DocumentManager.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentSyncManager.js +127 -27
- package/lib/module/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/document/models.js.map +1 -1
- package/lib/module/manager/syncmanager/events/ETEventsManager.js +4 -5
- package/lib/module/manager/syncmanager/events/ETEventsManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/EventsGraphQLClient.js.map +1 -1
- package/lib/module/manager/syncmanager/events/EventsSyncManager.js +4 -5
- package/lib/module/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/SyncHttpClient.js +2 -6
- package/lib/module/manager/syncmanager/events/SyncHttpClient.js.map +1 -1
- package/lib/module/models/DispatchModels.js.map +1 -1
- package/lib/module/models/ReasonCodes.js.map +1 -1
- package/lib/module/models/auth.js.map +1 -1
- package/lib/module/models/execTasks/ETBaseModels.js.map +1 -1
- package/lib/module/models/execTasks/ETConfig.js.map +1 -1
- package/lib/module/models/execution.js.map +1 -1
- package/lib/module/models/fcm.js.map +1 -1
- package/lib/module/models/sdk.js.map +1 -1
- package/lib/module/native/signature/SignatureCapture.js +2 -2
- package/lib/module/native/signature/SignatureCapture.js.map +1 -1
- package/lib/module/network/GraphQLClient.js +13 -17
- package/lib/module/network/GraphQLClient.js.map +1 -1
- package/lib/module/network/NetworkClient.js +12 -2
- package/lib/module/network/NetworkClient.js.map +1 -1
- package/lib/module/network/NetworkUtils.js +14 -10
- package/lib/module/network/NetworkUtils.js.map +1 -1
- package/lib/module/network/Queries.js.map +1 -1
- package/lib/module/network/client.js +3 -4
- package/lib/module/network/client.js.map +1 -1
- package/lib/module/res/strings.js.map +1 -1
- package/lib/module/resources/Login.js +2 -2
- package/lib/module/resources/Login.js.map +1 -1
- package/lib/module/resources/network.js +2 -2
- package/lib/module/resources/network.js.map +1 -1
- package/lib/module/styles/SdkColors.js.map +1 -1
- package/lib/module/styles/executionTasks/CommonStyles.js.map +1 -1
- package/lib/module/ui/screens/CancellationScreen.js +5 -6
- package/lib/module/ui/screens/CancellationScreen.js.map +1 -1
- package/lib/module/ui/screens/CaptureInputScreen.js +5 -6
- package/lib/module/ui/screens/CaptureInputScreen.js.map +1 -1
- package/lib/module/ui/screens/CompleteObjectiveScreen.js +5 -6
- package/lib/module/ui/screens/CompleteObjectiveScreen.js.map +1 -1
- package/lib/module/ui/screens/DeliverScreen.js +5 -6
- package/lib/module/ui/screens/DeliverScreen.js.map +1 -1
- package/lib/module/ui/screens/DisplayScreen.js +5 -6
- package/lib/module/ui/screens/DisplayScreen.js.map +1 -1
- package/lib/module/ui/screens/DoodleScreen.js +5 -6
- package/lib/module/ui/screens/DoodleScreen.js.map +1 -1
- package/lib/module/ui/screens/DropCashScreen.js +5 -6
- package/lib/module/ui/screens/DropCashScreen.js.map +1 -1
- package/lib/module/ui/screens/ETScreensIndex.js.map +1 -1
- package/lib/module/ui/screens/FormsScreen.js +5 -6
- package/lib/module/ui/screens/FormsScreen.js.map +1 -1
- package/lib/module/ui/screens/GeofenceScreen.js +5 -6
- package/lib/module/ui/screens/GeofenceScreen.js.map +1 -1
- package/lib/module/ui/screens/HttpRequestScreen.js +5 -6
- package/lib/module/ui/screens/HttpRequestScreen.js.map +1 -1
- package/lib/module/ui/screens/ImageCaptureScreen.js +5 -6
- package/lib/module/ui/screens/ImageCaptureScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentScreen.js +5 -6
- package/lib/module/ui/screens/PaymentScreen.js.map +1 -1
- package/lib/module/ui/screens/PickupScreen.js +5 -6
- package/lib/module/ui/screens/PickupScreen.js.map +1 -1
- package/lib/module/ui/screens/ScanScreen.js +5 -7
- package/lib/module/ui/screens/ScanScreen.js.map +1 -1
- package/lib/module/ui/screens/StartWorkFlowScreen.js +5 -6
- package/lib/module/ui/screens/StartWorkFlowScreen.js.map +1 -1
- package/lib/module/ui/screens/ValidateOTPScreen.js +5 -6
- package/lib/module/ui/screens/ValidateOTPScreen.js.map +1 -1
- package/lib/module/ui/screens/WithBaseDispatchScreen.js.map +1 -1
- package/lib/module/ui/uiConfig/RouteParams.js.map +1 -1
- package/lib/module/utils/ApiUtils.js.map +1 -1
- package/lib/module/utils/ExecTaskUtils.js +1 -2
- package/lib/module/utils/ExecTaskUtils.js.map +1 -1
- package/lib/module/utils/Logger.js +4 -5
- package/lib/module/utils/Logger.js.map +1 -1
- package/lib/module/utils/NetworkUtil.js +2 -2
- package/lib/module/utils/NetworkUtil.js.map +1 -1
- package/lib/module/utils/SdkUtils.js.map +1 -1
- package/lib/module/utils/SyncManagerUtils.js.map +1 -1
- package/lib/module/utils/fcm/FCM.js.map +1 -1
- package/lib/module/utils/fcm/FcmUtils.js.map +1 -1
- package/lib/module/utils/helper.js +4 -4
- package/lib/module/utils/helper.js.map +1 -1
- package/lib/module/utils/hooks/useModal.js +1 -0
- package/lib/module/utils/hooks/useModal.js.map +1 -1
- package/lib/module/utils/hooks/useTimer.js.map +1 -1
- package/lib/module/utils/loginHelper.js.map +1 -1
- package/lib/module/utils/storage.js +5 -8
- package/lib/module/utils/storage.js.map +1 -1
- package/lib/module/utils/utils.js +1 -3
- package/lib/module/utils/utils.js.map +1 -1
- package/lib/typescript/analytics/sentry/SentrySdkConstants.d.ts +2 -0
- package/lib/typescript/manager/sdk/callbacksHandler.d.ts +3 -1
- package/lib/typescript/manager/syncmanager/document/DocumentManager.d.ts +1 -0
- package/lib/typescript/models/sdk.d.ts +1 -0
- package/package.json +1 -1
- package/src/analytics/sentry/SentrySdkConstants.ts +2 -0
- package/src/index.tsx +1 -1
- package/src/manager/sdk/DispatchSDKManager.ts +6 -2
- package/src/manager/sdk/callbacksHandler.ts +39 -2
- package/src/manager/syncmanager/document/DocumentHttpClient.ts +54 -24
- package/src/manager/syncmanager/document/DocumentManager.ts +15 -0
- package/src/manager/syncmanager/document/DocumentSyncManager.ts +137 -25
- package/src/models/auth.ts +1 -0
- package/src/models/sdk.ts +1 -0
- package/src/network/NetworkClient.ts +18 -2
- package/src/network/NetworkUtils.ts +9 -1
- package/src/network/client.ts +1 -1
- package/android/.gradle/6.8/fileChanges/last-build.bin +0 -0
- package/android/.gradle/6.8/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/6.8/gc.properties +0 -0
- package/android/.gradle/checksums/checksums.lock +0 -0
- package/android/.gradle/configuration-cache/gc.properties +0 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/.idea/gradle.xml +0 -13
- package/android/.idea/misc.xml +0 -10
- package/android/.idea/vcs.xml +0 -6
|
@@ -16,13 +16,13 @@ var _reactNativeFs = _interopRequireDefault(require("react-native-fs"));
|
|
|
16
16
|
var _reactNative = require("react-native");
|
|
17
17
|
var _SentrySdkConstants = require("../../../analytics/sentry/SentrySdkConstants");
|
|
18
18
|
var _SentryAnalyticsUtils = require("../../../analytics/sentry/SentryAnalyticsUtils");
|
|
19
|
-
var
|
|
19
|
+
var _DocumentSyncManager;
|
|
20
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); }
|
|
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 &&
|
|
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; }
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
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; }
|
|
24
|
-
function _toPropertyKey(
|
|
25
|
-
function _toPrimitive(
|
|
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); }
|
|
26
26
|
const latlngToDms = require('latlng-to-dms');
|
|
27
27
|
class DocumentSyncManager {
|
|
28
28
|
get retries() {
|
|
@@ -63,10 +63,30 @@ class DocumentSyncManager {
|
|
|
63
63
|
if ((documentRows === null || documentRows === void 0 ? void 0 : documentRows.length) > 0) {
|
|
64
64
|
await this.uploadDocToServer(documentRows[0]);
|
|
65
65
|
} else {
|
|
66
|
-
|
|
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);
|
|
67
77
|
}
|
|
68
78
|
} else {
|
|
69
|
-
|
|
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);
|
|
70
90
|
}
|
|
71
91
|
} catch (error) {} finally {
|
|
72
92
|
this.inProgress = false;
|
|
@@ -75,7 +95,26 @@ class DocumentSyncManager {
|
|
|
75
95
|
}
|
|
76
96
|
}
|
|
77
97
|
} else {
|
|
78
|
-
|
|
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);
|
|
79
118
|
}
|
|
80
119
|
}
|
|
81
120
|
async isSyncPending() {
|
|
@@ -86,15 +125,24 @@ class DocumentSyncManager {
|
|
|
86
125
|
async insertDocument(fmsFolderID, data, base64, desc, dspID,
|
|
87
126
|
// jobID: string,
|
|
88
127
|
// objRef: string,
|
|
89
|
-
filePath, fileType, fileName, geoTimeStamp, processedFilePath) {
|
|
90
|
-
let priority = arguments.length > 10 && arguments[10] !== undefined ? arguments[10] : 1;
|
|
128
|
+
filePath, fileType, fileName, geoTimeStamp, processedFilePath, priority = 1) {
|
|
91
129
|
if ((0, _utils.isEmptyOrBlank)(desc) || (0, _utils.isEmptyOrBlank)(dspID) ||
|
|
92
130
|
// isEmptyOrBlank(jobID) ||
|
|
93
131
|
// isEmptyOrBlank(objRef) ||
|
|
94
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 {
|
|
95
133
|
var _this$docManager;
|
|
96
134
|
if (!this.docManager) {
|
|
97
|
-
|
|
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);
|
|
98
146
|
this.docManager = await _DocumentManager.default.getInstance();
|
|
99
147
|
}
|
|
100
148
|
console.log('insertDocument1:', fmsFolderID);
|
|
@@ -115,7 +163,17 @@ class DocumentSyncManager {
|
|
|
115
163
|
try {
|
|
116
164
|
await this.docManager.markDocumentSynced(documentRow.id, fmsID);
|
|
117
165
|
} catch (err) {
|
|
118
|
-
|
|
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);
|
|
119
177
|
}
|
|
120
178
|
}
|
|
121
179
|
|
|
@@ -125,7 +183,17 @@ class DocumentSyncManager {
|
|
|
125
183
|
try {
|
|
126
184
|
await this.docManager.updateProcesedFilePath(documentRow.id, origialFilePath, processedPath);
|
|
127
185
|
} catch (err) {
|
|
128
|
-
|
|
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);
|
|
129
197
|
}
|
|
130
198
|
}
|
|
131
199
|
async updateDocError(documentRow, uploadError) {
|
|
@@ -133,7 +201,17 @@ class DocumentSyncManager {
|
|
|
133
201
|
try {
|
|
134
202
|
await this.docManager.updateDocSyncError(documentRow.id, uploadError);
|
|
135
203
|
} catch (err) {
|
|
136
|
-
|
|
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);
|
|
137
215
|
}
|
|
138
216
|
}
|
|
139
217
|
checkForInitialization() {
|
|
@@ -158,7 +236,6 @@ class DocumentSyncManager {
|
|
|
158
236
|
if (accuracy !== '') {
|
|
159
237
|
strDMSWithAccuracy = strDMS + ' (Accuracy: ' + accuracy + 'm)'; // Appedning accuracy in location
|
|
160
238
|
}
|
|
161
|
-
|
|
162
239
|
let fontSize = 14;
|
|
163
240
|
if (_reactNative.Platform.OS !== 'android') {
|
|
164
241
|
fontSize = 28;
|
|
@@ -175,7 +252,6 @@ class DocumentSyncManager {
|
|
|
175
252
|
position: {
|
|
176
253
|
position: _reactNativeImageMarker.Position.topLeft // Overlay text position
|
|
177
254
|
},
|
|
178
|
-
|
|
179
255
|
style: {
|
|
180
256
|
// Style for overlay
|
|
181
257
|
color: '#ffffff',
|
|
@@ -193,7 +269,6 @@ class DocumentSyncManager {
|
|
|
193
269
|
filename: pFilePath,
|
|
194
270
|
saveFormat: _reactNativeImageMarker.ImageFormat.jpg // Saving in jpeg format
|
|
195
271
|
};
|
|
196
|
-
|
|
197
272
|
let processedFilePath = await _reactNativeImageMarker.default.markText(options); // Generating overlay image
|
|
198
273
|
if (processedFilePath !== null && processedFilePath !== '') {
|
|
199
274
|
let completeFilePath = processedFilePath;
|
|
@@ -206,7 +281,6 @@ class DocumentSyncManager {
|
|
|
206
281
|
//original file path catprued from camera
|
|
207
282
|
completeFilePath // completeFilePath is the path with file:// of processed file
|
|
208
283
|
);
|
|
209
|
-
|
|
210
284
|
documentRow.processed_file_path = completeFilePath;
|
|
211
285
|
}
|
|
212
286
|
}
|
|
@@ -243,7 +317,6 @@ class DocumentSyncManager {
|
|
|
243
317
|
if (accuracy !== '') {
|
|
244
318
|
strDMSWithAccuracy = strDMS + ' (Accuracy: ' + accuracy + 'm)'; // Appedning accuracy in location
|
|
245
319
|
}
|
|
246
|
-
|
|
247
320
|
const options = {
|
|
248
321
|
backgroundImage: {
|
|
249
322
|
src: filePath,
|
|
@@ -256,7 +329,6 @@ class DocumentSyncManager {
|
|
|
256
329
|
position: {
|
|
257
330
|
position: _reactNativeImageMarker.Position.topLeft // Overlay text position
|
|
258
331
|
},
|
|
259
|
-
|
|
260
332
|
style: {
|
|
261
333
|
// Style for overlay
|
|
262
334
|
color: '#ffffff',
|
|
@@ -274,7 +346,6 @@ class DocumentSyncManager {
|
|
|
274
346
|
filename: pFilePath,
|
|
275
347
|
saveFormat: _reactNativeImageMarker.ImageFormat.base64 // Saving in base6 format
|
|
276
348
|
};
|
|
277
|
-
|
|
278
349
|
let processedBase64 = await _reactNativeImageMarker.default.markText(options); // Generating overlay image
|
|
279
350
|
if (processedBase64 !== null && processedBase64 !== '') {
|
|
280
351
|
// Fetching base64 data from processed data.
|
|
@@ -298,13 +369,34 @@ class DocumentSyncManager {
|
|
|
298
369
|
async uploadDocToServer(documentRow) {
|
|
299
370
|
try {
|
|
300
371
|
var _this$documentHttpCli;
|
|
301
|
-
let docRow =
|
|
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);
|
|
302
393
|
console.log('uploadDocToServer999:', docRow);
|
|
303
|
-
let fmsID = await ((_this$documentHttpCli = this.documentHttpClient) === null || _this$documentHttpCli === void 0 ? void 0 : _this$documentHttpCli.uploadDocument(
|
|
394
|
+
let fmsID = await ((_this$documentHttpCli = this.documentHttpClient) === null || _this$documentHttpCli === void 0 ? void 0 : _this$documentHttpCli.uploadDocument(docRow));
|
|
304
395
|
let extraParameters = {
|
|
305
396
|
fmsID: fmsID ?? '',
|
|
306
|
-
|
|
307
|
-
|
|
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) : ''
|
|
308
400
|
};
|
|
309
401
|
// TODO: SOLELY DEPENDS ON FMS_ID WHICH IS WRONG => IT SHOULD BE Response.status = 202
|
|
310
402
|
if (fmsID) {
|
|
@@ -312,7 +404,15 @@ class DocumentSyncManager {
|
|
|
312
404
|
await this.updateDocument(docRow, fmsID);
|
|
313
405
|
} else {
|
|
314
406
|
this._retries++;
|
|
315
|
-
|
|
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);
|
|
316
416
|
await this.updateDocError(docRow, 'Unexpected Error');
|
|
317
417
|
}
|
|
318
418
|
} catch (error) {
|
|
@@ -324,11 +424,11 @@ class DocumentSyncManager {
|
|
|
324
424
|
screenName: cta,
|
|
325
425
|
cta: cta,
|
|
326
426
|
extraParams: {
|
|
327
|
-
error: error
|
|
427
|
+
error: error
|
|
328
428
|
}
|
|
329
429
|
});
|
|
430
|
+
_Logger.default.getInstance().logEvent(cta, error, _Logger.LOG_TYPE.SDK_ERROR);
|
|
330
431
|
this._retries++;
|
|
331
|
-
_Logger.default.getInstance().logEvent('uploadDocToServer-sync-error', error.message, _Logger.LOG_TYPE.SDK_ERROR);
|
|
332
432
|
await this.updateDocError(documentRow, JSON.stringify({
|
|
333
433
|
message: error.message,
|
|
334
434
|
error: JSON.stringify(error === null || error === void 0 || (_error$response = error.response) === null || _error$response === void 0 ? void 0 : _error$response.data),
|
|
@@ -346,6 +446,6 @@ class DocumentSyncManager {
|
|
|
346
446
|
}
|
|
347
447
|
}
|
|
348
448
|
exports.default = DocumentSyncManager;
|
|
349
|
-
|
|
449
|
+
_DocumentSyncManager = DocumentSyncManager;
|
|
350
450
|
_defineProperty(DocumentSyncManager, "instance", void 0);
|
|
351
451
|
//# sourceMappingURL=DocumentSyncManager.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_DocumentManager","_interopRequireDefault","require","_DocumentHttpClient","_utils","_BaseError","_ErrorCodes","_interopRequireWildcard","_Logger","_NetworkUtil","_reactNativeImageMarker","_reactNativeFs","_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","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","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 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 = 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,YAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAA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AI,CAACnB,UAAU,CAACkI,wBAAwB,CAAC/G,KAAK,CAAC;EAClE;AACF;AAACgH,OAAA,CAAA7L,OAAA,GAAAoC,mBAAA;AAAA3C,MAAA,GAraoB2C,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,gBAA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AA6G,gBAAA,GAAL7G,KAAK,CAAEiH,QAAQ,cAAAJ,gBAAA,uBAAfA,gBAAA,CAAiBK;MAC3B,CAAC,CACH,CAAC;IACH;EACF;EAEA,MAAaC,eAAeA,CAACC,UAAmB,EAA0B;IACxE,IAAI,CAAC,IAAI,CAACzI,UAAU,EAAE,IAAI,CAACA,UAAU,GAAG,MAAMC,wBAAe,CAACT,WAAW,CAAC,CAAC;IAC3E,OAAO,IAAI,CAACQ,UAAU,CAACwI,eAAe,CAACC,UAAU,CAAC;EACpD;EAEA,MAAaC,eAAeA,CAACzG,KAAa,EAAE;IAC1C,IAAI,CAAC,IAAI,CAACjC,UAAU,EAAE,IAAI,CAACA,UAAU,GAAG,MAAMC,wBAAe,CAACT,WAAW,CAAC,CAAC;IAC3E,IAAIyC,KAAK,EAAE,MAAM,IAAI,CAACjC,UAAU,CAAC2I,wBAAwB,CAAC1G,KAAK,CAAC;EAClE;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
|
|
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 &&
|
|
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(
|
|
20
|
-
function _toPrimitive(
|
|
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
|
-
|
|
511
|
+
_ETEventsManager = ETEventsManager;
|
|
513
512
|
_defineProperty(ETEventsManager, "instance", void 0);
|
|
514
513
|
//# sourceMappingURL=ETEventsManager.js.map
|