@os1-platform/dispatch-mobile 3.1.9 → 3.2.1
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/README.md +0 -2
- package/android/.gradle/8.13/checksums/checksums.lock +0 -0
- package/android/.gradle/8.13/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/8.13/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/8.13/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/{8.10.2 → 8.13}/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/8.13/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -2
- package/android/.idea/caches/deviceStreaming.xml +218 -12
- package/android/build.gradle +14 -15
- package/android/gradle.properties +9 -4
- package/android/src/main/AndroidManifest.xml +4 -1
- package/android/src/main/java/com/dispatchsdk/location/LocationModule.kt +3 -3
- package/android/src/main/java/com/dispatchsdk/sync/SyncEventService.kt +2 -3
- package/android/src/main/java/com/dispatchsdk/utils/DispatchSdkUtils.kt +27 -11
- package/babel.config.js +1 -1
- package/dispatch-mobile.podspec +1 -1
- package/lib/commonjs/analytics/sentry/SentryAnalyticsUtils.js +1 -2
- package/lib/commonjs/analytics/sentry/SentryAnalyticsUtils.js.map +1 -1
- package/lib/commonjs/analytics/sentry/SentrySdkConstants.js +4 -0
- package/lib/commonjs/analytics/sentry/SentrySdkConstants.js.map +1 -1
- package/lib/commonjs/components/dispatch/DispatchExecNavigator.js +1 -2
- package/lib/commonjs/components/dispatch/DispatchExecNavigator.js.map +1 -1
- package/lib/commonjs/components/executiontasks/cancellation/CancelET.js +4 -5
- package/lib/commonjs/components/executiontasks/cancellation/CancelET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js +5 -6
- package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js.map +1 -1
- package/lib/commonjs/components/executiontasks/collectPayment/CollectPayment.js +1 -2
- package/lib/commonjs/components/executiontasks/collectPayment/CollectPayment.js.map +1 -1
- package/lib/commonjs/components/executiontasks/collectPayment/PaymentUtils.js +1 -2
- package/lib/commonjs/components/executiontasks/collectPayment/PaymentUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/collectPayment/components/CompletePayment.js +3 -4
- package/lib/commonjs/components/executiontasks/collectPayment/components/CompletePayment.js.map +1 -1
- package/lib/commonjs/components/executiontasks/collectPayment/components/InitPayment.js +5 -9
- package/lib/commonjs/components/executiontasks/collectPayment/components/InitPayment.js.map +1 -1
- package/lib/commonjs/components/executiontasks/collectPayment/components/PaymentContactDetails.js +8 -9
- package/lib/commonjs/components/executiontasks/collectPayment/components/PaymentContactDetails.js.map +1 -1
- package/lib/commonjs/components/executiontasks/collectPayment/components/ProcessPayment.js +24 -25
- package/lib/commonjs/components/executiontasks/collectPayment/components/ProcessPayment.js.map +1 -1
- package/lib/commonjs/components/executiontasks/deliver/DeliverET.js +1 -2
- package/lib/commonjs/components/executiontasks/deliver/DeliverET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js +5 -6
- package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/display/DisplayModalET.js +1 -2
- package/lib/commonjs/components/executiontasks/display/DisplayModalET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/doodle/SignatureET.js +6 -7
- package/lib/commonjs/components/executiontasks/doodle/SignatureET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js +1 -2
- package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js +5 -6
- package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/FormGenerator.js +13 -35
- package/lib/commonjs/components/executiontasks/forms/FormGenerator.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js +1 -2
- package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/DropdownWidget.js +1 -2
- package/lib/commonjs/components/executiontasks/forms/widgets/DropdownWidget.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +4 -5
- package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/TimeRangeSelector.js +1 -2
- package/lib/commonjs/components/executiontasks/forms/widgets/TimeRangeSelector.js.map +1 -1
- package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js +1 -2
- package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js +1 -2
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js +5 -6
- package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js +5 -6
- package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js +5 -6
- package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js +5 -6
- package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/pickup/PickupET.js +1 -2
- package/lib/commonjs/components/executiontasks/pickup/PickupET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js +5 -6
- package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/ScanET.js +8 -9
- package/lib/commonjs/components/executiontasks/scan/ScanET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/interfaces.js +17 -1
- package/lib/commonjs/components/executiontasks/scan/interfaces.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/sub_components/CScanner.js +5 -6
- package/lib/commonjs/components/executiontasks/scan/sub_components/CScanner.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/sub_components/DropDownUtils.js +1 -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 -2
- package/lib/commonjs/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/sub_components/SummaryPage.js +6 -6
- package/lib/commonjs/components/executiontasks/scan/sub_components/SummaryPage.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/utils.js +13 -15
- package/lib/commonjs/components/executiontasks/scan/utils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js +1 -2
- 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/components/ContactListView.js +5 -7
- package/lib/commonjs/components/executiontasks/validateOTP/components/ContactListView.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/components/OTPView.js +5 -6
- package/lib/commonjs/components/executiontasks/validateOTP/components/OTPView.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/components/VerificationComplete.js +8 -11
- package/lib/commonjs/components/executiontasks/validateOTP/components/VerificationComplete.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js +1 -2
- package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/utils.js +1 -2
- package/lib/commonjs/components/executiontasks/validateOTP/utils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/verifyLocation/GeofenceUtils.js +1 -2
- package/lib/commonjs/components/executiontasks/verifyLocation/GeofenceUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js +1 -2
- package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js +7 -12
- package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
- package/lib/commonjs/components/widgets/AlertDisplay.js +1 -2
- package/lib/commonjs/components/widgets/AlertDisplay.js.map +1 -1
- package/lib/commonjs/components/widgets/CancelOrderDialog.js +3 -4
- package/lib/commonjs/components/widgets/CancelOrderDialog.js.map +1 -1
- package/lib/commonjs/components/widgets/Card.js +2 -2
- package/lib/commonjs/components/widgets/Card.js.map +1 -1
- package/lib/commonjs/components/widgets/SearchBar.js +4 -3
- package/lib/commonjs/components/widgets/SearchBar.js.map +1 -1
- package/lib/commonjs/components/widgets/SnackBarCustom.js +12 -15
- package/lib/commonjs/components/widgets/SnackBarCustom.js.map +1 -1
- package/lib/commonjs/components/widgets/SplitTextInput.js +2 -3
- package/lib/commonjs/components/widgets/SplitTextInput.js.map +1 -1
- package/lib/commonjs/components/widgets/TabsComponent.js +1 -2
- package/lib/commonjs/components/widgets/TabsComponent.js.map +1 -1
- package/lib/commonjs/components/widgets/Timer.js +1 -2
- package/lib/commonjs/components/widgets/Timer.js.map +1 -1
- package/lib/commonjs/database/DBManager.js +112 -0
- package/lib/commonjs/database/DBManager.js.map +1 -0
- package/lib/commonjs/database/dbUpdate.json +6 -0
- package/lib/commonjs/index.js +1 -2
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/manager/dispatch/DispatchStateContainer.js +1 -2
- package/lib/commonjs/manager/dispatch/DispatchStateContainer.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/EventCodeRepo.js +8 -9
- package/lib/commonjs/manager/dispatchCodes/EventCodeRepo.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeContainer.js +5 -6
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeRepo.js +13 -10
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -1
- package/lib/commonjs/manager/location/LocationManager.js +0 -4
- package/lib/commonjs/manager/location/LocationManager.js.map +1 -1
- package/lib/commonjs/manager/sdk/DispatchSDKManager.js +8 -3
- package/lib/commonjs/manager/sdk/DispatchSDKManager.js.map +1 -1
- package/lib/commonjs/manager/sdk/callbacksHandler.js +1 -1
- package/lib/commonjs/manager/sdk/callbacksHandler.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/AppSyncManager.js +1 -2
- package/lib/commonjs/manager/syncmanager/AppSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/DBConfig.js +6 -2
- package/lib/commonjs/manager/syncmanager/DBConfig.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/database.js +118 -47
- package/lib/commonjs/manager/syncmanager/database.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js +1 -2
- package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentManager.js +17 -22
- package/lib/commonjs/manager/syncmanager/document/DocumentManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js +86 -77
- package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js +25 -28
- package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js +1 -2
- package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/SyncHttpClient.js +1 -2
- package/lib/commonjs/manager/syncmanager/events/SyncHttpClient.js.map +1 -1
- package/lib/commonjs/models/execTasks/ETConfig.js +1 -0
- package/lib/commonjs/models/execTasks/ETConfig.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/client.js.map +1 -1
- package/lib/commonjs/styles/executionTasks/CommonStyles.js +1 -2
- package/lib/commonjs/styles/executionTasks/CommonStyles.js.map +1 -1
- package/lib/commonjs/ui/screens/CancellationScreen.js +1 -2
- package/lib/commonjs/ui/screens/CancellationScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CaptureInputScreen.js +1 -2
- package/lib/commonjs/ui/screens/CaptureInputScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CollectPaymentScreen.js +1 -2
- package/lib/commonjs/ui/screens/CollectPaymentScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js +1 -2
- package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DeliverScreen.js +1 -2
- package/lib/commonjs/ui/screens/DeliverScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DisplayScreen.js +1 -2
- package/lib/commonjs/ui/screens/DisplayScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DoodleScreen.js +1 -2
- package/lib/commonjs/ui/screens/DoodleScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DropCashScreen.js +1 -2
- package/lib/commonjs/ui/screens/DropCashScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FormsScreen.js +1 -2
- package/lib/commonjs/ui/screens/FormsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/GeofenceScreen.js +1 -2
- package/lib/commonjs/ui/screens/GeofenceScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ImageCaptureScreen.js +1 -2
- package/lib/commonjs/ui/screens/ImageCaptureScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentScreen.js +1 -2
- package/lib/commonjs/ui/screens/PaymentScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PickupScreen.js +1 -2
- package/lib/commonjs/ui/screens/PickupScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ScanScreen.js +1 -2
- package/lib/commonjs/ui/screens/ScanScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/StartWorkFlowScreen.js +1 -2
- package/lib/commonjs/ui/screens/StartWorkFlowScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ValidateOTPScreen.js +1 -2
- package/lib/commonjs/ui/screens/ValidateOTPScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/WithBaseDispatchScreen.js +1 -2
- package/lib/commonjs/ui/screens/WithBaseDispatchScreen.js.map +1 -1
- package/lib/commonjs/utils/Constants.js.map +1 -1
- package/lib/commonjs/utils/Logger.js +1 -1
- package/lib/commonjs/utils/Logger.js.map +1 -1
- package/lib/commonjs/utils/SdkUtils.js +6 -5
- package/lib/commonjs/utils/SdkUtils.js.map +1 -1
- package/lib/commonjs/utils/SyncManagerUtils.js +3 -2
- package/lib/commonjs/utils/SyncManagerUtils.js.map +1 -1
- package/lib/commonjs/utils/fcm/FCM.js +1 -2
- package/lib/commonjs/utils/fcm/FCM.js.map +1 -1
- package/lib/commonjs/utils/fcm/FcmUtils.js +1 -2
- package/lib/commonjs/utils/fcm/FcmUtils.js.map +1 -1
- package/lib/commonjs/utils/hooks/useModal.js +1 -2
- package/lib/commonjs/utils/hooks/useModal.js.map +1 -1
- package/lib/commonjs/utils/storage.js +1 -2
- package/lib/commonjs/utils/storage.js.map +1 -1
- package/lib/module/analytics/sentry/SentrySdkConstants.js +4 -0
- package/lib/module/analytics/sentry/SentrySdkConstants.js.map +1 -1
- package/lib/module/components/executiontasks/cancellation/CancelET.js +1 -1
- package/lib/module/components/executiontasks/cancellation/CancelET.js.map +1 -1
- package/lib/module/components/executiontasks/captureInput/CaptureText.js +3 -3
- package/lib/module/components/executiontasks/captureInput/CaptureText.js.map +1 -1
- package/lib/module/components/executiontasks/collectPayment/components/CompletePayment.js +2 -2
- package/lib/module/components/executiontasks/collectPayment/components/CompletePayment.js.map +1 -1
- package/lib/module/components/executiontasks/collectPayment/components/InitPayment.js +3 -6
- package/lib/module/components/executiontasks/collectPayment/components/InitPayment.js.map +1 -1
- package/lib/module/components/executiontasks/collectPayment/components/PaymentContactDetails.js +6 -6
- package/lib/module/components/executiontasks/collectPayment/components/PaymentContactDetails.js.map +1 -1
- package/lib/module/components/executiontasks/collectPayment/components/ProcessPayment.js +21 -21
- package/lib/module/components/executiontasks/collectPayment/components/ProcessPayment.js.map +1 -1
- package/lib/module/components/executiontasks/deliver/SLDeliverET.js +3 -3
- package/lib/module/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
- package/lib/module/components/executiontasks/doodle/SignatureET.js +4 -4
- package/lib/module/components/executiontasks/doodle/SignatureET.js.map +1 -1
- package/lib/module/components/executiontasks/dropCash/SLDropCash.js +3 -3
- package/lib/module/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
- package/lib/module/components/executiontasks/forms/FormGenerator.js +11 -32
- package/lib/module/components/executiontasks/forms/FormGenerator.js.map +1 -1
- package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +2 -2
- package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/ImageCapture.js +4 -4
- package/lib/module/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
- package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js +3 -3
- package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/payments/init/InitPaymentET.js +3 -3
- package/lib/module/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js +3 -3
- package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/pickup/PickupET.js.map +1 -1
- package/lib/module/components/executiontasks/pickup/SLPickupET.js +3 -3
- package/lib/module/components/executiontasks/pickup/SLPickupET.js.map +1 -1
- package/lib/module/components/executiontasks/scan/ScanET.js +5 -5
- package/lib/module/components/executiontasks/scan/ScanET.js.map +1 -1
- package/lib/module/components/executiontasks/scan/interfaces.js +16 -0
- package/lib/module/components/executiontasks/scan/interfaces.js.map +1 -1
- package/lib/module/components/executiontasks/scan/sub_components/CScanner.js +5 -5
- package/lib/module/components/executiontasks/scan/sub_components/CScanner.js.map +1 -1
- package/lib/module/components/executiontasks/scan/sub_components/DropDownUtils.js +2 -2
- package/lib/module/components/executiontasks/scan/sub_components/DropDownUtils.js.map +1 -1
- package/lib/module/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -1
- package/lib/module/components/executiontasks/scan/sub_components/SummaryPage.js +3 -3
- package/lib/module/components/executiontasks/scan/sub_components/SummaryPage.js.map +1 -1
- package/lib/module/components/executiontasks/scan/utils.js +13 -14
- 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/components/ContactListView.js +3 -4
- package/lib/module/components/executiontasks/validateOTP/components/ContactListView.js.map +1 -1
- package/lib/module/components/executiontasks/validateOTP/components/OTPView.js +3 -3
- package/lib/module/components/executiontasks/validateOTP/components/OTPView.js.map +1 -1
- package/lib/module/components/executiontasks/validateOTP/components/VerificationComplete.js +7 -9
- package/lib/module/components/executiontasks/validateOTP/components/VerificationComplete.js.map +1 -1
- package/lib/module/components/executiontasks/verifyOtp/VerifyOtpET.js +7 -10
- package/lib/module/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
- package/lib/module/components/widgets/CancelOrderDialog.js +1 -1
- package/lib/module/components/widgets/CancelOrderDialog.js.map +1 -1
- package/lib/module/components/widgets/Card.js +1 -1
- package/lib/module/components/widgets/Card.js.map +1 -1
- package/lib/module/components/widgets/SearchBar.js +2 -1
- package/lib/module/components/widgets/SearchBar.js.map +1 -1
- package/lib/module/components/widgets/SnackBarCustom.js +6 -8
- package/lib/module/components/widgets/SnackBarCustom.js.map +1 -1
- package/lib/module/components/widgets/SplitTextInput.js +1 -1
- package/lib/module/components/widgets/SplitTextInput.js.map +1 -1
- package/lib/module/components/widgets/Timer.js.map +1 -1
- package/lib/module/database/DBManager.js +104 -0
- package/lib/module/database/DBManager.js.map +1 -0
- package/lib/module/database/dbUpdate.json +6 -0
- package/lib/module/manager/dispatch/DispatchStateContainer.js.map +1 -1
- package/lib/module/manager/dispatchCodes/EventCodeRepo.js +7 -7
- 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 +13 -8
- package/lib/module/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -1
- package/lib/module/manager/location/LocationManager.js +0 -4
- package/lib/module/manager/location/LocationManager.js.map +1 -1
- package/lib/module/manager/sdk/DispatchSDKManager.js +7 -1
- package/lib/module/manager/sdk/DispatchSDKManager.js.map +1 -1
- package/lib/module/manager/sdk/callbacksHandler.js +0 -2
- package/lib/module/manager/sdk/callbacksHandler.js.map +1 -1
- package/lib/module/manager/syncmanager/DBConfig.js +5 -1
- package/lib/module/manager/syncmanager/DBConfig.js.map +1 -1
- package/lib/module/manager/syncmanager/database.js +117 -43
- package/lib/module/manager/syncmanager/database.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentManager.js +16 -20
- package/lib/module/manager/syncmanager/document/DocumentManager.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentSyncManager.js +85 -75
- package/lib/module/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/ETEventsManager.js +20 -22
- package/lib/module/manager/syncmanager/events/ETEventsManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
- package/lib/module/models/execTasks/ETConfig.js +1 -0
- package/lib/module/models/execTasks/ETConfig.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/client.js.map +1 -1
- package/lib/module/ui/screens/ValidateOTPScreen.js.map +1 -1
- package/lib/module/utils/Constants.js.map +1 -1
- package/lib/module/utils/Logger.js +1 -1
- package/lib/module/utils/Logger.js.map +1 -1
- package/lib/module/utils/SdkUtils.js +5 -3
- package/lib/module/utils/SdkUtils.js.map +1 -1
- package/lib/module/utils/SyncManagerUtils.js +2 -0
- package/lib/module/utils/SyncManagerUtils.js.map +1 -1
- package/lib/typescript/babel.config.d.ts +1 -0
- package/lib/typescript/jest.config.d.ts +7 -0
- package/lib/typescript/jest.setup.d.ts +1 -0
- package/lib/typescript/scripts/bootstrap.d.ts +1 -0
- package/lib/typescript/{components → src/components}/executiontasks/httpRequest/HttpEtUtils.d.ts +1 -1
- package/lib/typescript/{components → src/components}/executiontasks/scan/interfaces.d.ts +15 -0
- package/lib/typescript/{components → src/components}/executiontasks/validateOTP/ValidateOTPSchema.d.ts +1 -1
- package/lib/typescript/{components → src/components}/widgets/CancelOrderDialog.d.ts +1 -1
- package/lib/typescript/{components → src/components}/widgets/SnackBarCustom.d.ts +3 -2
- package/lib/typescript/src/components/widgets/Timer.d.ts +6 -0
- package/lib/typescript/src/database/DBManager.d.ts +1 -0
- package/lib/typescript/{manager → src/manager}/dispatchCodes/EventCodeRepo.d.ts +1 -1
- package/lib/typescript/{manager → src/manager}/dispatchCodes/ReasonCodeRepo.d.ts +5 -3
- package/lib/typescript/{manager → src/manager}/syncmanager/DBConfig.d.ts +5 -1
- package/lib/typescript/src/manager/syncmanager/database.d.ts +31 -0
- package/lib/typescript/{manager → src/manager}/syncmanager/document/DocumentManager.d.ts +2 -3
- package/lib/typescript/{manager → src/manager}/syncmanager/document/DocumentSyncManager.d.ts +1 -2
- package/lib/typescript/{network → src/network}/GraphQLClient.d.ts +5 -5
- package/lib/typescript/{network → src/network}/NetworkClient.d.ts +3 -3
- package/lib/typescript/{network → src/network}/client.d.ts +3 -3
- package/lib/typescript/{resources → src/resources}/Login.d.ts +7 -7
- package/lib/typescript/{resources → src/resources}/network.d.ts +1 -1
- package/lib/typescript/{utils → src/utils}/ApiUtils.d.ts +2 -2
- package/lib/typescript/{utils → src/utils}/Constants.d.ts +4 -0
- package/package.json +104 -127
- package/src/components/executiontasks/cancellation/CancelET.tsx +1 -1
- package/src/components/executiontasks/captureInput/CaptureText.tsx +6 -6
- package/src/components/executiontasks/collectPayment/components/CompletePayment.tsx +2 -3
- package/src/components/executiontasks/collectPayment/components/InitPayment.tsx +3 -7
- package/src/components/executiontasks/collectPayment/components/PaymentContactDetails.tsx +3 -4
- package/src/components/executiontasks/collectPayment/components/ProcessPayment.tsx +7 -8
- package/src/components/executiontasks/deliver/SLDeliverET.tsx +3 -4
- package/src/components/executiontasks/doodle/SignatureET.tsx +5 -5
- package/src/components/executiontasks/dropCash/SLDropCash.tsx +3 -4
- package/src/components/executiontasks/forms/FormGenerator.tsx +38 -55
- package/src/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.tsx +2 -2
- package/src/components/executiontasks/imageCapture/ImageCapture.tsx +5 -7
- package/src/components/executiontasks/payments/completePayment/CompletePaymentET.tsx +3 -4
- package/src/components/executiontasks/payments/init/InitPaymentET.tsx +3 -4
- package/src/components/executiontasks/payments/processPayment/ProcessPaymentET.tsx +3 -4
- package/src/components/executiontasks/pickup/PickupET.tsx +3 -9
- package/src/components/executiontasks/pickup/SLPickupET.tsx +3 -4
- package/src/components/executiontasks/scan/ScanET.tsx +5 -6
- package/src/components/executiontasks/scan/interfaces.ts +16 -0
- package/src/components/executiontasks/scan/sub_components/CScanner.tsx +7 -6
- package/src/components/executiontasks/scan/sub_components/DropDownUtils.ts +2 -2
- package/src/components/executiontasks/scan/sub_components/ERDropDown.tsx +0 -1
- package/src/components/executiontasks/scan/sub_components/SummaryPage.tsx +3 -3
- package/src/components/executiontasks/scan/utils.ts +13 -13
- package/src/components/executiontasks/validateOTP/ValidateOTPET.tsx +5 -0
- package/src/components/executiontasks/validateOTP/ValidateOTPSchema.ts +1 -1
- package/src/components/executiontasks/validateOTP/components/ContactListView.tsx +3 -11
- package/src/components/executiontasks/validateOTP/components/OTPView.tsx +3 -4
- package/src/components/executiontasks/validateOTP/components/VerificationComplete.tsx +7 -7
- package/src/components/executiontasks/verifyOtp/VerifyOtpET.tsx +9 -17
- package/src/components/widgets/CancelOrderDialog.tsx +2 -2
- package/src/components/widgets/Card.tsx +1 -1
- package/src/components/widgets/SearchBar.tsx +2 -1
- package/src/components/widgets/SnackBarCustom.tsx +8 -10
- package/src/components/widgets/SplitTextInput.tsx +1 -1
- package/src/components/widgets/Timer.tsx +0 -1
- package/src/database/DBManager.ts +118 -0
- package/src/database/dbUpdate.json +6 -0
- package/src/manager/dispatch/DispatchStateContainer.tsx +5 -25
- package/src/manager/dispatchCodes/EventCodeRepo.ts +8 -12
- package/src/manager/dispatchCodes/ReasonCodeContainer.ts +5 -5
- package/src/manager/dispatchCodes/ReasonCodeRepo.ts +17 -15
- package/src/manager/location/LocationManager.ts +1 -8
- package/src/manager/sdk/DispatchSDKManager.ts +12 -4
- package/src/manager/sdk/callbacksHandler.ts +3 -8
- package/src/manager/syncmanager/DBConfig.ts +6 -1
- package/src/manager/syncmanager/database.ts +130 -71
- package/src/manager/syncmanager/document/DocumentManager.ts +19 -24
- package/src/manager/syncmanager/document/DocumentSyncManager.ts +95 -82
- package/src/manager/syncmanager/events/ETEventsManager.ts +30 -35
- package/src/manager/syncmanager/events/EventsSyncManager.ts +1 -1
- package/src/models/sdk.ts +2 -6
- package/src/native/signature/SignatureCapture.tsx +4 -3
- package/src/network/client.ts +2 -2
- package/src/ui/screens/ValidateOTPScreen.tsx +2 -4
- package/src/utils/Constants.ts +6 -1
- package/src/utils/Logger.ts +2 -1
- package/src/utils/SdkUtils.ts +6 -7
- package/src/utils/SyncManagerUtils.ts +1 -0
- package/tsconfig.build.json +1 -1
- package/tsconfig.json +2 -3
- package/android/.gradle/8.10.2/checksums/checksums.lock +0 -0
- package/android/.gradle/8.10.2/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/8.10.2/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/8.10.2/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/8.10.2/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/8.10.2/gc.properties +0 -0
- package/lib/typescript/components/widgets/Timer.d.ts +0 -7
- package/lib/typescript/manager/syncmanager/database.d.ts +0 -7
- /package/android/.gradle/{8.10.2 → 8.13}/fileChanges/last-build.bin +0 -0
- /package/android/.gradle/{8.10.2 → 8.13}/fileHashes/resourceHashesCache.bin +0 -0
- /package/android/.gradle/{8.10.2/dependencies-accessors → 8.13}/gc.properties +0 -0
- /package/lib/typescript/{analytics → src/analytics}/firebase/FirebaseLogging.d.ts +0 -0
- /package/lib/typescript/{analytics → src/analytics}/sentry/SentryAnalyticsSingleton.d.ts +0 -0
- /package/lib/typescript/{analytics → src/analytics}/sentry/SentryAnalyticsUtils.d.ts +0 -0
- /package/lib/typescript/{analytics → src/analytics}/sentry/SentryModels.d.ts +0 -0
- /package/lib/typescript/{analytics → src/analytics}/sentry/SentrySdkConstants.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/dispatch/DispatchExecNavigator.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/CompletedWFSchema.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/ExecutionTasksIndex.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/cancellation/CancelET.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/cancellation/CancellationSchema.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/captureInput/CaptureInputSchema.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/captureInput/CaptureText.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/captureInput/utils.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/collectPayment/CollectPayment.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/collectPayment/CollectPaymentSchema.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/collectPayment/PaymentStyles.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/collectPayment/PaymentUtils.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/collectPayment/components/CompletePayment.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/collectPayment/components/CustomContactsModal.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/collectPayment/components/InitPayment.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/collectPayment/components/PaymentContactDetails.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/collectPayment/components/ProcessPayment.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/deliver/DeliverET.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/deliver/DeliverETInput.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/deliver/SLDeliverET.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/display/DisplayModalET.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/display/DisplaySchema.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/doodle/SignatureET.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/doodle/SignatureSchema.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/dropCash/DropCashET.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/dropCash/DropCashSchema.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/dropCash/SLDropCash.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/forms/FormGenerator.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/forms/FormSchema.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/forms/widgets/DateTimeWidget.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/forms/widgets/DropdownWidget.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/forms/widgets/QRBarcodeScannerWidget.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/forms/widgets/TimeRangeSelector.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/httpRequest/HttpRequestET.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/httpRequest/HttpRequestETSchema.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/imageCapture/CaptureSchema.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/imageCapture/CaptureUtils.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/imageCapture/ImageCapture.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/payments/PaymentStyles.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/payments/PaymentUtils.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/payments/completePayment/CompletePaymentET.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/payments/completePayment/CompletePaymentSchema.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/payments/init/InitPaymentET.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/payments/init/InitPaymentSchema.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/payments/processPayment/ProcessPaymentET.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/payments/processPayment/ProcessPaymentSchema.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/pickup/PickpSchema.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/pickup/PickupET.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/pickup/SLPickupET.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/scan/ScanET.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/scan/ScanSchema.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/scan/constants.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/scan/modalConstant.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/scan/sub_components/CScanner.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/scan/sub_components/DropDownUtils.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/scan/sub_components/ERDropDown.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/scan/sub_components/SummaryPage.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/scan/utils.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/validateOTP/ValidateOTPET.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/validateOTP/ValidateOtpStyles.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/validateOTP/components/ContactListView.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/validateOTP/components/OTPView.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/validateOTP/components/VerificationComplete.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/validateOTP/constants.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/validateOTP/sub-components/ContactCard.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/validateOTP/sub-components/OTPInput.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/validateOTP/sub-components/ResendOTPButton.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/validateOTP/utils.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/verifyInput/VerifyInputSchema.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/verifyLocation/GeofenceUtils.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/verifyLocation/VerifyLocSchema.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/verifyLocation/VerifyLocationET.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/verifyOtp/VerifyOtpET.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/executiontasks/verifyOtp/VerifyOtpSchema.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/utils/Scale.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/utils/index.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/widgets/AlertDisplay.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/widgets/Card.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/widgets/ConfirmCancelModal.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/widgets/GoBackModal.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/widgets/IconButton.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/widgets/ModalWidget.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/widgets/ProgressDialog.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/widgets/SearchBar.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/widgets/SplitTextInput.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/widgets/TabsComponent.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/widgets/Toaster.d.ts +0 -0
- /package/lib/typescript/{config → src/config}/DispatchSDKConfig.d.ts +0 -0
- /package/lib/typescript/{constants → src/constants}/apiConstants.d.ts +0 -0
- /package/lib/typescript/{constants → src/constants}/constants.d.ts +0 -0
- /package/lib/typescript/{constants → src/constants}/statuscode.d.ts +0 -0
- /package/lib/typescript/{errors → src/errors}/BaseError.d.ts +0 -0
- /package/lib/typescript/{errors → src/errors}/ErrorCodes.d.ts +0 -0
- /package/lib/typescript/{events → src/events}/EventDispatcher.d.ts +0 -0
- /package/lib/typescript/{events → src/events}/EventListener.d.ts +0 -0
- /package/lib/typescript/{events → src/events}/constants.d.ts +0 -0
- /package/lib/typescript/{events → src/events}/index.d.ts +0 -0
- /package/lib/typescript/{events → src/events}/interface.d.ts +0 -0
- /package/lib/typescript/{icons → src/icons}/CircleMark.d.ts +0 -0
- /package/lib/typescript/{icons → src/icons}/FailedIcon.d.ts +0 -0
- /package/lib/typescript/{icons → src/icons}/FailureCloseIcon.d.ts +0 -0
- /package/lib/typescript/{icons → src/icons}/ScanIcon.d.ts +0 -0
- /package/lib/typescript/{icons → src/icons}/SuccessCompleteIcon.d.ts +0 -0
- /package/lib/typescript/{icons → src/icons}/file.d.ts +0 -0
- /package/lib/typescript/{icons → src/icons}/index.d.ts +0 -0
- /package/lib/typescript/{icons → src/icons}/interface.d.ts +0 -0
- /package/lib/typescript/{index.d.ts → src/index.d.ts} +0 -0
- /package/lib/typescript/{locale → src/locale}/Str.d.ts +0 -0
- /package/lib/typescript/{locale → src/locale}/i18n.d.ts +0 -0
- /package/lib/typescript/{locale → src/locale}/util.d.ts +0 -0
- /package/lib/typescript/{manager → src/manager}/dispatch/DispatchStateContainer.d.ts +0 -0
- /package/lib/typescript/{manager → src/manager}/dispatchCodes/EventCodeContainer.d.ts +0 -0
- /package/lib/typescript/{manager → src/manager}/dispatchCodes/ReasonCodeContainer.d.ts +0 -0
- /package/lib/typescript/{manager → src/manager}/jobRemoval/JobRemovalManager.d.ts +0 -0
- /package/lib/typescript/{manager → src/manager}/location/LocationManager.d.ts +0 -0
- /package/lib/typescript/{manager → src/manager}/sdk/DispatchSDKManager.d.ts +0 -0
- /package/lib/typescript/{manager → src/manager}/sdk/DispatchSdkCache.d.ts +0 -0
- /package/lib/typescript/{manager → src/manager}/sdk/callbacksHandler.d.ts +0 -0
- /package/lib/typescript/{manager → src/manager}/syncmanager/AppSyncManager.d.ts +0 -0
- /package/lib/typescript/{manager → src/manager}/syncmanager/NativeSyncManager.d.ts +0 -0
- /package/lib/typescript/{manager → src/manager}/syncmanager/constants.d.ts +0 -0
- /package/lib/typescript/{manager → src/manager}/syncmanager/document/DocumentHttpClient.d.ts +0 -0
- /package/lib/typescript/{manager → src/manager}/syncmanager/document/models.d.ts +0 -0
- /package/lib/typescript/{manager → src/manager}/syncmanager/events/ETEventsManager.d.ts +0 -0
- /package/lib/typescript/{manager → src/manager}/syncmanager/events/EventsGraphQLClient.d.ts +0 -0
- /package/lib/typescript/{manager → src/manager}/syncmanager/events/EventsSyncManager.d.ts +0 -0
- /package/lib/typescript/{manager → src/manager}/syncmanager/events/SyncHttpClient.d.ts +0 -0
- /package/lib/typescript/{models → src/models}/DispatchModels.d.ts +0 -0
- /package/lib/typescript/{models → src/models}/ReasonCodes.d.ts +0 -0
- /package/lib/typescript/{models → src/models}/auth.d.ts +0 -0
- /package/lib/typescript/{models → src/models}/execTasks/ETBaseModels.d.ts +0 -0
- /package/lib/typescript/{models → src/models}/execTasks/ETConfig.d.ts +0 -0
- /package/lib/typescript/{models → src/models}/execution.d.ts +0 -0
- /package/lib/typescript/{models → src/models}/fcm.d.ts +0 -0
- /package/lib/typescript/{models → src/models}/sdk.d.ts +0 -0
- /package/lib/typescript/{native → src/native}/LocationModule.d.ts +0 -0
- /package/lib/typescript/{native → src/native}/PermissionModule.d.ts +0 -0
- /package/lib/typescript/{native → src/native}/signature/SignatureCapture.d.ts +0 -0
- /package/lib/typescript/{network → src/network}/NetworkUtils.d.ts +0 -0
- /package/lib/typescript/{network → src/network}/Queries.d.ts +0 -0
- /package/lib/typescript/{res → src/res}/strings.d.ts +0 -0
- /package/lib/typescript/{styles → src/styles}/SdkColors.d.ts +0 -0
- /package/lib/typescript/{styles → src/styles}/executionTasks/CommonStyles.d.ts +0 -0
- /package/lib/typescript/{ui → src/ui}/screens/CancellationScreen.d.ts +0 -0
- /package/lib/typescript/{ui → src/ui}/screens/CaptureInputScreen.d.ts +0 -0
- /package/lib/typescript/{ui → src/ui}/screens/CollectPaymentScreen.d.ts +0 -0
- /package/lib/typescript/{ui → src/ui}/screens/CompleteObjectiveScreen.d.ts +0 -0
- /package/lib/typescript/{ui → src/ui}/screens/DeliverScreen.d.ts +0 -0
- /package/lib/typescript/{ui → src/ui}/screens/DisplayScreen.d.ts +0 -0
- /package/lib/typescript/{ui → src/ui}/screens/DoodleScreen.d.ts +0 -0
- /package/lib/typescript/{ui → src/ui}/screens/DropCashScreen.d.ts +0 -0
- /package/lib/typescript/{ui → src/ui}/screens/ETScreensIndex.d.ts +0 -0
- /package/lib/typescript/{ui → src/ui}/screens/FormsScreen.d.ts +0 -0
- /package/lib/typescript/{ui → src/ui}/screens/GeofenceScreen.d.ts +0 -0
- /package/lib/typescript/{ui → src/ui}/screens/HttpRequestScreen.d.ts +0 -0
- /package/lib/typescript/{ui → src/ui}/screens/ImageCaptureScreen.d.ts +0 -0
- /package/lib/typescript/{ui → src/ui}/screens/PaymentScreen.d.ts +0 -0
- /package/lib/typescript/{ui → src/ui}/screens/PickupScreen.d.ts +0 -0
- /package/lib/typescript/{ui → src/ui}/screens/ScanScreen.d.ts +0 -0
- /package/lib/typescript/{ui → src/ui}/screens/StartWorkFlowScreen.d.ts +0 -0
- /package/lib/typescript/{ui → src/ui}/screens/ValidateOTPScreen.d.ts +0 -0
- /package/lib/typescript/{ui → src/ui}/screens/WithBaseDispatchScreen.d.ts +0 -0
- /package/lib/typescript/{ui → src/ui}/uiConfig/RouteParams.d.ts +0 -0
- /package/lib/typescript/{utils → src/utils}/Enums.d.ts +0 -0
- /package/lib/typescript/{utils → src/utils}/ExecTaskUtils.d.ts +0 -0
- /package/lib/typescript/{utils → src/utils}/Logger.d.ts +0 -0
- /package/lib/typescript/{utils → src/utils}/NetworkUtil.d.ts +0 -0
- /package/lib/typescript/{utils → src/utils}/SdkUtils.d.ts +0 -0
- /package/lib/typescript/{utils → src/utils}/SyncManagerUtils.d.ts +0 -0
- /package/lib/typescript/{utils → src/utils}/context/paymentContext.d.ts +0 -0
- /package/lib/typescript/{utils → src/utils}/context/valdiateOTPContext.d.ts +0 -0
- /package/lib/typescript/{utils → src/utils}/fcm/FCM.d.ts +0 -0
- /package/lib/typescript/{utils → src/utils}/fcm/FcmUtils.d.ts +0 -0
- /package/lib/typescript/{utils → src/utils}/helper.d.ts +0 -0
- /package/lib/typescript/{utils → src/utils}/hooks/useModal.d.ts +0 -0
- /package/lib/typescript/{utils → src/utils}/hooks/useTimer.d.ts +0 -0
- /package/lib/typescript/{utils → src/utils}/loginHelper.d.ts +0 -0
- /package/lib/typescript/{utils → src/utils}/storage.d.ts +0 -0
- /package/lib/typescript/{utils → src/utils}/utils.d.ts +0 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { DispatchSDKConfig } from 'src/models/sdk';
|
|
1
|
+
import { DispatchSDKConfig } from '../../models/sdk';
|
|
3
2
|
import DispatchSdkCache from './DispatchSdkCache';
|
|
4
3
|
import { BaseError } from '../../errors/BaseError';
|
|
5
4
|
import ErrorCodes from '../../errors/ErrorCodes';
|
|
@@ -17,14 +16,10 @@ class CallbacksHandler {
|
|
|
17
16
|
) => Promise<Record<string, EmailAndPhoneResponse>>;
|
|
18
17
|
|
|
19
18
|
public init(
|
|
20
|
-
phoneCallback: (
|
|
21
|
-
sdsIds: string[]
|
|
22
|
-
) => Promise<{ key: string; value: string[] }>,
|
|
19
|
+
phoneCallback: (sdsIds: string[]) => Promise<{ key: string; value: string[] }>,
|
|
23
20
|
dateTimeCallBack: () => Promise<string>,
|
|
24
21
|
tokenRefreshCallback: () => Promise<string>,
|
|
25
|
-
emailAndPhoneCallback: (
|
|
26
|
-
sdsIds: string[]
|
|
27
|
-
) => Promise<Record<string, EmailAndPhoneResponse>>
|
|
22
|
+
emailAndPhoneCallback: (sdsIds: string[]) => Promise<Record<string, EmailAndPhoneResponse>>
|
|
28
23
|
) {
|
|
29
24
|
this._callbackToFetchPhoneNumbers = phoneCallback;
|
|
30
25
|
this._callbackToFetchDateTime = dateTimeCallBack;
|
|
@@ -7,7 +7,7 @@ export enum DispatchSyncType {
|
|
|
7
7
|
DISPATCH_SUB_STATUS_UPDATE = 'DISPATCH_SUB_STATUS_UPDATE',
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
export const DATABASE_NAME = '
|
|
10
|
+
export const DATABASE_NAME = 'DispatchSDK_DB';
|
|
11
11
|
export const EVENTS_TABLE = 'EVENTS_TABLE';
|
|
12
12
|
export const REASONS_TABLE = 'REASONS_TABLE';
|
|
13
13
|
export const EVENT_CODES_TABLE = 'EVENT_CODES_TABLE';
|
|
@@ -110,6 +110,11 @@ export const EventColumns = {
|
|
|
110
110
|
SUCCESS_EVENT: 'successEvent',
|
|
111
111
|
};
|
|
112
112
|
|
|
113
|
+
export const VERSION_TABLE = 'VERSION_TABLE';
|
|
114
|
+
export const VERSION_COLUMNS = {
|
|
115
|
+
VERSION_NO: 'versionNo'
|
|
116
|
+
};
|
|
117
|
+
|
|
113
118
|
// NEW CODE
|
|
114
119
|
export interface BulkEvent {
|
|
115
120
|
syncType: ExecEngineSyncType | DispatchSyncType;
|
|
@@ -1,93 +1,152 @@
|
|
|
1
|
-
import * as SQLite from 'expo-sqlite';
|
|
2
1
|
import * as DBConfig from './DBConfig';
|
|
3
|
-
import type { SQLResultSet, WebSQLDatabase } from 'expo-sqlite';
|
|
4
2
|
import { isEmptyOrBlank } from '../../utils/utils';
|
|
5
3
|
import { BaseError } from '../../errors/BaseError';
|
|
6
4
|
import BaseErrorCodes from '../../errors/ErrorCodes';
|
|
7
5
|
import Logger, { LOG_TYPE } from '../../utils/Logger';
|
|
6
|
+
import type { ExecQuery } from '../../utils/Constants';
|
|
7
|
+
import { openDatabaseSync, SQLiteDatabase } from 'expo-sqlite';
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
// Legacy type for backward compatibility
|
|
10
|
+
export interface SQLResultSet {
|
|
11
|
+
insertId?: number;
|
|
12
|
+
rowsAffected: number;
|
|
13
|
+
rows: {
|
|
14
|
+
_array: any[];
|
|
15
|
+
length: number;
|
|
16
|
+
item: (index: number) => any;
|
|
17
|
+
};
|
|
13
18
|
}
|
|
14
19
|
|
|
15
|
-
export interface ExecQuery {
|
|
16
|
-
query: string;
|
|
17
|
-
args: any[];
|
|
18
|
-
}
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
);
|
|
32
|
-
return;
|
|
21
|
+
class SQLDatabase {
|
|
22
|
+
private static instance: SQLDatabase;
|
|
23
|
+
private db: SQLiteDatabase;
|
|
24
|
+
|
|
25
|
+
private constructor() {
|
|
26
|
+
this.db = openDatabaseSync(DBConfig.DATABASE_NAME);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
public static getInstance(): SQLDatabase {
|
|
30
|
+
if (!SQLDatabase.instance) {
|
|
31
|
+
SQLDatabase.instance = new SQLDatabase();
|
|
33
32
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
tx.executeSql(
|
|
37
|
-
query,
|
|
38
|
-
args,
|
|
39
|
-
(_, sqlResultSet) => {
|
|
40
|
-
resolve(sqlResultSet);
|
|
41
|
-
},
|
|
42
|
-
(_, sqlError) => {
|
|
43
|
-
reject(sqlError);
|
|
44
|
-
return false;
|
|
45
|
-
}
|
|
46
|
-
);
|
|
47
|
-
});
|
|
48
|
-
});
|
|
49
|
-
}
|
|
33
|
+
return SQLDatabase.instance;
|
|
34
|
+
}
|
|
50
35
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
36
|
+
executeSetDataQuery(query: string, args: any[]): Promise<SQLResultSet> {
|
|
37
|
+
return new Promise((resolve, reject) => {
|
|
38
|
+
if (isEmptyOrBlank(query)) {
|
|
39
|
+
reject(new BaseError( BaseErrorCodes.InvalidArgumentError, 'SQL Query is null or empty'));
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
try {
|
|
43
|
+
const result = this.db.runSync(query, args);
|
|
44
|
+
const sqlResultSet: SQLResultSet = {
|
|
45
|
+
insertId: result.lastInsertRowId,
|
|
46
|
+
rowsAffected: result.changes,
|
|
47
|
+
rows: {
|
|
48
|
+
_array: [],
|
|
49
|
+
length: 0,
|
|
50
|
+
item: (index: number) => null
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
resolve(sqlResultSet);
|
|
54
|
+
} catch (error) {
|
|
55
|
+
reject(error);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
}
|
|
54
59
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
(
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
60
|
+
executeGetDataQuery(query: string, args: any[]): Promise<any> {
|
|
61
|
+
return new Promise((resolve, reject) => {
|
|
62
|
+
if (isEmptyOrBlank(query)) {
|
|
63
|
+
reject(new BaseError( BaseErrorCodes.InvalidArgumentError, 'SQL Query is null or empty'));
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
try {
|
|
68
|
+
const result = this.db.getAllSync(query, args);
|
|
69
|
+
const sqlResultSet: SQLResultSet = {
|
|
70
|
+
insertId: undefined,
|
|
71
|
+
rowsAffected: 0,
|
|
72
|
+
rows: {
|
|
73
|
+
_array: result,
|
|
74
|
+
length: result.length,
|
|
75
|
+
item: (index: number) => result[index] || null
|
|
65
76
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
77
|
+
};
|
|
78
|
+
resolve(sqlResultSet);
|
|
79
|
+
} catch (error) {
|
|
80
|
+
reject(error);
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
executeBulkQuery(_queryData: ExecQuery[]): Promise<boolean> {
|
|
86
|
+
return new Promise(async (resolve, reject) => {
|
|
87
|
+
try {
|
|
88
|
+
await this.db.withExclusiveTransactionAsync(async () => {
|
|
89
|
+
for (const _q of _queryData) {
|
|
90
|
+
this.db.runSync(_q.query, _q.args);
|
|
91
|
+
}
|
|
72
92
|
});
|
|
73
|
-
|
|
74
|
-
|
|
93
|
+
|
|
94
|
+
Logger.getInstance().logEvent(
|
|
95
|
+
'executeBulkQuery success: ',
|
|
96
|
+
JSON.stringify(_queryData.length + ' queries executed'),
|
|
97
|
+
LOG_TYPE.SDK_DEBUG
|
|
98
|
+
);
|
|
99
|
+
resolve(true);
|
|
100
|
+
} catch (error) {
|
|
75
101
|
Logger.getInstance().logEvent(
|
|
76
102
|
'executeBulkQuery err: ',
|
|
77
103
|
JSON.stringify(error),
|
|
78
104
|
LOG_TYPE.SDK_ERROR
|
|
79
105
|
);
|
|
80
106
|
reject(error);
|
|
81
|
-
// return false;
|
|
82
|
-
},
|
|
83
|
-
() => {
|
|
84
|
-
Logger.getInstance().logEvent(
|
|
85
|
-
'executeBulkQuery success: ',
|
|
86
|
-
JSON.stringify(_sqlResultSet),
|
|
87
|
-
LOG_TYPE.SDK_DEBUG
|
|
88
|
-
);
|
|
89
|
-
resolve(true);
|
|
90
107
|
}
|
|
91
|
-
);
|
|
92
|
-
}
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Executes an array of SQL DML statements.
|
|
113
|
+
*
|
|
114
|
+
* @param {Array<{query: string, args: any[]}>} input - The array of queries to execute.
|
|
115
|
+
* @return {Promise<SQLResultSet>} A promise that resolves with the SQL result set.
|
|
116
|
+
*/
|
|
117
|
+
executeStatementsInTxn(input: { sqlSmt: string; args: any[] }[]): Promise<SQLResultSet[]> {
|
|
118
|
+
return new Promise(async (resolve, reject) => {
|
|
119
|
+
if (input.some((_i) => isEmptyOrBlank(_i.sqlSmt))) {
|
|
120
|
+
reject(new Error('Statement is null or empty'));
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
try {
|
|
125
|
+
const resultSet: SQLResultSet[] = [];
|
|
126
|
+
|
|
127
|
+
await this.db.withExclusiveTransactionAsync(async () => {
|
|
128
|
+
for (const item of input) {
|
|
129
|
+
const result = await this.db.runAsync(item.sqlSmt, item.args);
|
|
130
|
+
const sqlResultSet: SQLResultSet = {
|
|
131
|
+
insertId: result.lastInsertRowId,
|
|
132
|
+
rowsAffected: result.changes,
|
|
133
|
+
rows: {
|
|
134
|
+
_array: [],
|
|
135
|
+
length: 0,
|
|
136
|
+
item: (index: number) => null
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
resultSet.push(sqlResultSet);
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
resolve(resultSet);
|
|
144
|
+
} catch (error) {
|
|
145
|
+
reject(error);
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
}
|
|
93
149
|
}
|
|
150
|
+
|
|
151
|
+
const Database = SQLDatabase.getInstance();
|
|
152
|
+
export default Database;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { DOCUMENT_COLUMNS, DOCUMENT_TABLE, DocumentRow } from '../DBConfig';
|
|
2
2
|
import { MAX_RETRY_COUNT, PROCESS_MAX_RETRIED_ROWS } from '../constants';
|
|
3
|
-
import
|
|
4
|
-
import type { SQLResultSet } from 'expo-sqlite';
|
|
3
|
+
import Database from '../database';
|
|
5
4
|
|
|
6
5
|
export default class DocumentManager {
|
|
7
6
|
private static instance: DocumentManager;
|
|
@@ -18,7 +17,7 @@ export default class DocumentManager {
|
|
|
18
17
|
}
|
|
19
18
|
|
|
20
19
|
public async init(): Promise<void> {
|
|
21
|
-
await Database.
|
|
20
|
+
await Database.executeSetDataQuery(
|
|
22
21
|
`CREATE TABLE IF NOT EXISTS ${DOCUMENT_TABLE} (\
|
|
23
22
|
${DOCUMENT_COLUMNS.ID} INTEGER PRIMARY KEY AUTOINCREMENT,\
|
|
24
23
|
${DOCUMENT_COLUMNS.DATA} TEXT,\
|
|
@@ -41,7 +40,7 @@ export default class DocumentManager {
|
|
|
41
40
|
}
|
|
42
41
|
|
|
43
42
|
public async truncateDocumentTable(): Promise<void> {
|
|
44
|
-
await Database.
|
|
43
|
+
await Database.executeSetDataQuery(`DELETE FROM ${DOCUMENT_TABLE};`, []);
|
|
45
44
|
}
|
|
46
45
|
|
|
47
46
|
public async insertDocument(
|
|
@@ -56,8 +55,8 @@ export default class DocumentManager {
|
|
|
56
55
|
geoTimeStamp?: string | null,
|
|
57
56
|
processedFilePath?: string | null,
|
|
58
57
|
priority?: number
|
|
59
|
-
): Promise<
|
|
60
|
-
return await Database.
|
|
58
|
+
): Promise<any> {
|
|
59
|
+
return await Database.executeSetDataQuery(
|
|
61
60
|
`INSERT INTO ${DOCUMENT_TABLE}(\
|
|
62
61
|
${DOCUMENT_COLUMNS.DATA},\
|
|
63
62
|
${DOCUMENT_COLUMNS.DISPATCH_ID},\
|
|
@@ -89,13 +88,13 @@ export default class DocumentManager {
|
|
|
89
88
|
|
|
90
89
|
public async getAllDocuments(dispatchID?: string): Promise<DocumentRow[]> {
|
|
91
90
|
if (!dispatchID) {
|
|
92
|
-
const resultSet = await Database.
|
|
91
|
+
const resultSet = await Database.executeGetDataQuery(
|
|
93
92
|
`SELECT * FROM ${DOCUMENT_TABLE};`,
|
|
94
93
|
[]
|
|
95
94
|
);
|
|
96
95
|
return resultSet.rows._array;
|
|
97
96
|
} else {
|
|
98
|
-
const resultSet = await Database.
|
|
97
|
+
const resultSet = await Database.executeGetDataQuery(
|
|
99
98
|
`SELECT * FROM ${DOCUMENT_TABLE}\
|
|
100
99
|
WHERE ${DOCUMENT_COLUMNS.DISPATCH_ID} =?;`,
|
|
101
100
|
[dispatchID]
|
|
@@ -106,14 +105,13 @@ export default class DocumentManager {
|
|
|
106
105
|
|
|
107
106
|
public async getAllUnsyncedDocs(): Promise<DocumentRow[]> {
|
|
108
107
|
if (PROCESS_MAX_RETRIED_ROWS) {
|
|
109
|
-
let resultSet = await Database.
|
|
110
|
-
`SELECT * from ${DOCUMENT_TABLE}
|
|
111
|
-
WHERE ${DOCUMENT_COLUMNS.SYNCED} = 0;`,
|
|
108
|
+
let resultSet = await Database.executeGetDataQuery(
|
|
109
|
+
`SELECT * from ${DOCUMENT_TABLE} WHERE ${DOCUMENT_COLUMNS.SYNCED} = 0;`,
|
|
112
110
|
[]
|
|
113
111
|
);
|
|
114
112
|
return resultSet.rows._array;
|
|
115
113
|
} else {
|
|
116
|
-
let resultSet = await Database.
|
|
114
|
+
let resultSet = await Database.executeGetDataQuery(
|
|
117
115
|
`SELECT * from ${DOCUMENT_TABLE}\
|
|
118
116
|
WHERE ${DOCUMENT_COLUMNS.SYNCED} = 0 AND ${DOCUMENT_COLUMNS.ATTEMPT_COUNT} < ${MAX_RETRY_COUNT};`,
|
|
119
117
|
[]
|
|
@@ -123,7 +121,7 @@ export default class DocumentManager {
|
|
|
123
121
|
}
|
|
124
122
|
|
|
125
123
|
public deleteAllSyncedDocuments(dispatchID: string) {
|
|
126
|
-
return Database.
|
|
124
|
+
return Database.executeSetDataQuery(
|
|
127
125
|
`DELETE FROM ${DOCUMENT_TABLE}\
|
|
128
126
|
WHERE ${DOCUMENT_COLUMNS.SYNCED} = 1 and ${DOCUMENT_COLUMNS.DISPATCH_ID} = ?;`,
|
|
129
127
|
[dispatchID]
|
|
@@ -132,7 +130,7 @@ export default class DocumentManager {
|
|
|
132
130
|
|
|
133
131
|
public async markDocumentSynced(id: number, fmsID: string): Promise<void> {
|
|
134
132
|
if (!id || !fmsID) return;
|
|
135
|
-
await Database.
|
|
133
|
+
await Database.executeSetDataQuery(
|
|
136
134
|
`UPDATE ${DOCUMENT_TABLE} SET ${DOCUMENT_COLUMNS.SYNCED} = 1,${DOCUMENT_COLUMNS.FMS_ID} = ? WHERE ${DOCUMENT_COLUMNS.ID} = ?;`,
|
|
137
135
|
[fmsID, id]
|
|
138
136
|
);
|
|
@@ -146,7 +144,7 @@ export default class DocumentManager {
|
|
|
146
144
|
sync: number
|
|
147
145
|
): Promise<void> {
|
|
148
146
|
if (!id) return;
|
|
149
|
-
await Database.
|
|
147
|
+
await Database.executeSetDataQuery(
|
|
150
148
|
`UPDATE ${DOCUMENT_TABLE} SET ${DOCUMENT_COLUMNS.SYNCED} = ?,${DOCUMENT_COLUMNS.FMS_ID} = ?,${DOCUMENT_COLUMNS.ATTEMPT_COUNT} = ? WHERE ${DOCUMENT_COLUMNS.ID} = ?;`,
|
|
151
149
|
[sync, fmsID, attempt, id]
|
|
152
150
|
);
|
|
@@ -158,7 +156,7 @@ export default class DocumentManager {
|
|
|
158
156
|
processedFilePath: String
|
|
159
157
|
): Promise<void> {
|
|
160
158
|
if (!id || !processedFilePath) return;
|
|
161
|
-
await Database.
|
|
159
|
+
await Database.executeSetDataQuery(
|
|
162
160
|
`UPDATE ${DOCUMENT_TABLE} SET ${DOCUMENT_COLUMNS.FILE_PATH} = ?, ${DOCUMENT_COLUMNS.PROCESSED_FILE_PATH} = ? WHERE ${DOCUMENT_COLUMNS.ID} = ?;`,
|
|
163
161
|
[origialFilePath, processedFilePath, id]
|
|
164
162
|
);
|
|
@@ -169,11 +167,8 @@ export default class DocumentManager {
|
|
|
169
167
|
uploadError: string
|
|
170
168
|
): Promise<void> {
|
|
171
169
|
if (!id) throw new TypeError('Document ID cannot be null');
|
|
172
|
-
await Database.
|
|
173
|
-
`UPDATE ${DOCUMENT_TABLE}
|
|
174
|
-
SET \
|
|
175
|
-
${DOCUMENT_COLUMNS.SYNC_ERROR} = ?\
|
|
176
|
-
WHERE ${DOCUMENT_COLUMNS.ID} = ?;`,
|
|
170
|
+
await Database.executeSetDataQuery(
|
|
171
|
+
`UPDATE ${DOCUMENT_TABLE} SET ${DOCUMENT_COLUMNS.SYNC_ERROR} = ? WHERE ${DOCUMENT_COLUMNS.ID} = ?;`,
|
|
177
172
|
[uploadError, id]
|
|
178
173
|
);
|
|
179
174
|
}
|
|
@@ -183,7 +178,7 @@ export default class DocumentManager {
|
|
|
183
178
|
priority: number
|
|
184
179
|
): Promise<void> {
|
|
185
180
|
if (!id) throw new TypeError('Document ID cannot be null');
|
|
186
|
-
await Database.
|
|
181
|
+
await Database.executeSetDataQuery(
|
|
187
182
|
`UPDATE ${DOCUMENT_TABLE}\
|
|
188
183
|
SET \
|
|
189
184
|
${DOCUMENT_COLUMNS.PRIORITY} = ?\
|
|
@@ -196,7 +191,7 @@ export default class DocumentManager {
|
|
|
196
191
|
public async getUnsyncedDocument(): Promise<DocumentRow[]> {
|
|
197
192
|
// If it is allowed max_retried_rows are allowed to process then it will refetch those data which are even have tried max attempt otherwise it will skip those events.
|
|
198
193
|
if (PROCESS_MAX_RETRIED_ROWS) {
|
|
199
|
-
let rs = await Database.
|
|
194
|
+
let rs = await Database.executeGetDataQuery(
|
|
200
195
|
`SELECT * from ${DOCUMENT_TABLE}\
|
|
201
196
|
WHERE ${DOCUMENT_COLUMNS.SYNCED} = 0 \
|
|
202
197
|
ORDER BY ${DOCUMENT_COLUMNS.PRIORITY} ASC LIMIT 1;`,
|
|
@@ -204,7 +199,7 @@ export default class DocumentManager {
|
|
|
204
199
|
);
|
|
205
200
|
return rs.rows._array;
|
|
206
201
|
} else {
|
|
207
|
-
let rs = await Database.
|
|
202
|
+
let rs = await Database.executeGetDataQuery(
|
|
208
203
|
`SELECT * from ${DOCUMENT_TABLE}\
|
|
209
204
|
WHERE ${DOCUMENT_COLUMNS.SYNCED} = 0 AND ${DOCUMENT_COLUMNS.ATTEMPT_COUNT} < ${MAX_RETRY_COUNT} \
|
|
210
205
|
ORDER BY ${DOCUMENT_COLUMNS.PRIORITY} ASC LIMIT 1;`,
|
|
@@ -9,7 +9,6 @@ import BaseErrorCodes, {
|
|
|
9
9
|
SyncManagerNotInitialized,
|
|
10
10
|
} from '../../../errors/ErrorCodes';
|
|
11
11
|
import Logger, { LOG_TYPE } from '../../../utils/Logger';
|
|
12
|
-
import type { SQLResultSet } from 'expo-sqlite';
|
|
13
12
|
import NetworkUtil from '../../../utils/NetworkUtil';
|
|
14
13
|
import ETEventsManager from '../events/ETEventsManager';
|
|
15
14
|
import { LAST_SYNCED_EVENT_ID, MAX_RETRY_COUNT, POD_DOC } from '../../syncmanager/constants';
|
|
@@ -162,7 +161,7 @@ export default class DocumentSyncManager {
|
|
|
162
161
|
geoTimeStamp: string,
|
|
163
162
|
processedFilePath: string,
|
|
164
163
|
priority: number = 1
|
|
165
|
-
): Promise<
|
|
164
|
+
): Promise<any> {
|
|
166
165
|
if (
|
|
167
166
|
isEmptyOrBlank(desc) ||
|
|
168
167
|
isEmptyOrBlank(dspID) ||
|
|
@@ -407,100 +406,114 @@ export default class DocumentSyncManager {
|
|
|
407
406
|
|
|
408
407
|
// This function will generate overlay base64 data and update documents table for processed_file_path columns with overlayed base64 data.
|
|
409
408
|
private async processBase64Data(documentRow: DocumentRow) {
|
|
409
|
+
let cta = 'processBase64Data-started';
|
|
410
|
+
let extra = {
|
|
411
|
+
msg: 'processBase64Data-started',
|
|
412
|
+
fName: documentRow.file_name && documentRow.file_name.length != 0 ? documentRow.file_name.substring(4) : '',
|
|
413
|
+
dName: documentRow.fms_folder_id && documentRow.fms_folder_id.length != 0 ? documentRow.fms_folder_id.substring(4) : '',
|
|
414
|
+
dispId: documentRow.dispatch_id && documentRow.dispatch_id.length != 0 ? documentRow.dispatch_id.substring(9) : ''
|
|
415
|
+
};
|
|
410
416
|
if (
|
|
411
417
|
documentRow.processed_file_path === null ||
|
|
412
418
|
documentRow.processed_file_path === ''
|
|
413
419
|
) {
|
|
414
|
-
let cta = 'processBase64Data-started';
|
|
415
|
-
let extra = {
|
|
416
|
-
msg: 'processBase64Data-started',
|
|
417
|
-
fName: documentRow.file_name && documentRow.file_name.length != 0 ? documentRow.file_name.substring(4) : '',
|
|
418
|
-
dName: documentRow.fms_folder_id && documentRow.fms_folder_id.length != 0 ? documentRow.fms_folder_id.substring(4) : '',
|
|
419
|
-
dispId: documentRow.dispatch_id && documentRow.dispatch_id.length != 0 ? documentRow.dispatch_id.substring(9) : ''
|
|
420
|
-
};
|
|
421
|
-
fireEventWithScreenName({
|
|
422
|
-
severityLevel: SeverityLevelValue.LOG,
|
|
423
|
-
eventName: SentryEventNameSdkConstants.APP_LOG,
|
|
424
|
-
screenName: cta,
|
|
425
|
-
cta: cta,
|
|
426
|
-
extraParams: extra,
|
|
427
|
-
});
|
|
428
|
-
Logger.getInstance().logEvent(
|
|
429
|
-
cta,
|
|
430
|
-
flattenObject(extra),
|
|
431
|
-
LOG_TYPE.SDK_ERROR
|
|
432
|
-
);
|
|
433
420
|
let filePath = '';
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
421
|
+
try {
|
|
422
|
+
fireEventWithScreenName({
|
|
423
|
+
severityLevel: SeverityLevelValue.LOG,
|
|
424
|
+
eventName: SentryEventNameSdkConstants.APP_LOG,
|
|
425
|
+
screenName: cta,
|
|
426
|
+
cta: cta,
|
|
427
|
+
extraParams: extra,
|
|
428
|
+
});
|
|
429
|
+
Logger.getInstance().logEvent(
|
|
430
|
+
cta,
|
|
431
|
+
flattenObject(extra),
|
|
432
|
+
LOG_TYPE.SDK_ERROR
|
|
433
|
+
);
|
|
434
|
+
|
|
435
|
+
// If templrary base 64 file already exist then do not create again
|
|
436
|
+
if (documentRow.file_path === null || documentRow.file_path === '') {
|
|
437
|
+
const imagePath = `${RNFS.TemporaryDirectoryPath}/${documentRow.file_name}`;
|
|
438
|
+
await RNFS.writeFile(imagePath, documentRow.data, 'base64'); // Write file to temprary location
|
|
439
|
+
filePath = imagePath;
|
|
440
|
+
// If file generated frommbase64 data does not have file:// then we are adding manually.
|
|
441
|
+
if (!imagePath.includes('file')) {
|
|
442
|
+
filePath = `file://${imagePath}`;
|
|
443
|
+
}
|
|
444
|
+
documentRow.file_path = filePath;
|
|
445
|
+
} else {
|
|
446
|
+
filePath = documentRow.file_path;
|
|
442
447
|
}
|
|
443
|
-
documentRow.
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
padding: '1% 1%',
|
|
476
|
-
type: TextBackgroundType.none,
|
|
477
|
-
color: '#444444CC',
|
|
448
|
+
let pFilePath = 'processed_' + documentRow.file_name; // File name for processed file.
|
|
449
|
+
let strGeoStamp = documentRow.geo_timestamp; // Saved geostamp string
|
|
450
|
+
let objGeoStamp = JSON.parse(strGeoStamp); // Conversion to geostamp object
|
|
451
|
+
let dateTime = objGeoStamp.dateTime; // Date time stamp in UTC format
|
|
452
|
+
let lat = objGeoStamp.lat; // Latitide
|
|
453
|
+
let lng = objGeoStamp.lng; // Longitude
|
|
454
|
+
let accuracy = objGeoStamp.accuracy; // Location accuracy
|
|
455
|
+
let strDMS = latlngToDms(`${lat}, ${lng}`); // Location in degree format
|
|
456
|
+
let strDMSWithAccuracy = strDMS;
|
|
457
|
+
if (accuracy !== '') {
|
|
458
|
+
strDMSWithAccuracy = strDMS + ' (Accuracy: ' + accuracy + 'm)'; // Appedning accuracy in location
|
|
459
|
+
}
|
|
460
|
+
const options = {
|
|
461
|
+
backgroundImage: {
|
|
462
|
+
src: filePath, // Image for overlay
|
|
463
|
+
scale: 1,
|
|
464
|
+
},
|
|
465
|
+
watermarkTexts: [
|
|
466
|
+
{
|
|
467
|
+
text: `${dateTime}\n${strDMSWithAccuracy}`, // Ooverlay text
|
|
468
|
+
position: {
|
|
469
|
+
position: Position.topLeft, // Overlay text position
|
|
470
|
+
},
|
|
471
|
+
style: { // Style for overlay
|
|
472
|
+
color: '#ffffff',
|
|
473
|
+
fontSize: 14,
|
|
474
|
+
fontName: 'Arial',
|
|
475
|
+
textBackgroundStyle: {
|
|
476
|
+
padding: '1% 1%',
|
|
477
|
+
type: TextBackgroundType.none,
|
|
478
|
+
color: '#444444CC',
|
|
479
|
+
},
|
|
478
480
|
},
|
|
479
481
|
},
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
482
|
+
],
|
|
483
|
+
scale: 1,
|
|
484
|
+
quality: 100,
|
|
485
|
+
filename: pFilePath,
|
|
486
|
+
saveFormat: ImageFormat.base64, // Saving in base6 format
|
|
487
|
+
};
|
|
488
|
+
let processedBase64 = await Marker.markText(options); // Generating overlay image
|
|
489
|
+
if (processedBase64 !== null && processedBase64 !== '') {
|
|
490
|
+
// Fetching base64 data from processed data.
|
|
491
|
+
var splittedDase64Data = processedBase64.split(
|
|
492
|
+
'data:image/png;base64,'
|
|
493
|
+
);
|
|
494
|
+
// Updating document document table with overlayed base64 data
|
|
495
|
+
await this.updateDocumentProcessedPath(
|
|
496
|
+
documentRow,
|
|
497
|
+
filePath,
|
|
498
|
+
splittedDase64Data[1]
|
|
499
|
+
);
|
|
500
|
+
documentRow.processed_file_path = splittedDase64Data[1];
|
|
501
|
+
}
|
|
502
|
+
} catch (error: any) {
|
|
503
|
+
console.log('====================================');
|
|
504
|
+
console.log('processBase64Data-error:', error);
|
|
505
|
+
console.log('====================================');
|
|
506
|
+
// Updating document document table with original base64 data
|
|
494
507
|
await this.updateDocumentProcessedPath(
|
|
495
508
|
documentRow,
|
|
496
509
|
filePath,
|
|
497
|
-
|
|
510
|
+
filePath
|
|
498
511
|
);
|
|
499
|
-
documentRow.processed_file_path =
|
|
512
|
+
documentRow.processed_file_path = "";
|
|
500
513
|
}
|
|
501
514
|
}
|
|
502
|
-
|
|
503
|
-
|
|
515
|
+
cta = 'processBase64Data-completed';
|
|
516
|
+
extra = {
|
|
504
517
|
msg: 'processBase64Data-completed',
|
|
505
518
|
fName: documentRow.file_name && documentRow.file_name.length != 0 ? documentRow.file_name.substring(4) : '',
|
|
506
519
|
dName: documentRow.fms_folder_id && documentRow.fms_folder_id.length != 0 ? documentRow.fms_folder_id.substring(4) : '',
|