@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
|
@@ -2,7 +2,7 @@ var _EventCodeRepo;
|
|
|
2
2
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
3
3
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
4
4
|
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); }
|
|
5
|
-
import
|
|
5
|
+
import Database from '../syncmanager/database';
|
|
6
6
|
import { EVENT_CODES_TABLE, EventColumns } from '../syncmanager/DBConfig';
|
|
7
7
|
export default class EventCodeRepo {
|
|
8
8
|
static getInstance() {
|
|
@@ -27,34 +27,34 @@ export default class EventCodeRepo {
|
|
|
27
27
|
await Promise.all(promises);
|
|
28
28
|
}
|
|
29
29
|
async insertEvent(event) {
|
|
30
|
-
await Database.
|
|
30
|
+
await Database.executeSetDataQuery(`INSERT OR REPLACE INTO ${EVENT_CODES_TABLE}(\
|
|
31
31
|
${EventColumns.CODE},\
|
|
32
32
|
${EventColumns.DESCRIPTION},\
|
|
33
33
|
${EventColumns.SUCCESS_EVENT})\
|
|
34
34
|
values (?,?,?)`, [event.eventCode, event.description, event.successEvent]);
|
|
35
35
|
}
|
|
36
36
|
async init() {
|
|
37
|
-
await Database.
|
|
37
|
+
await Database.executeSetDataQuery(`CREATE TABLE IF NOT EXISTS ${EVENT_CODES_TABLE} (\
|
|
38
38
|
${EventColumns.CODE} TEXT PRIMARY KEY NOT NULL,\
|
|
39
39
|
${EventColumns.DESCRIPTION} TEXT,\
|
|
40
40
|
${EventColumns.SUCCESS_EVENT} INTEGER);`, []);
|
|
41
41
|
}
|
|
42
42
|
async getAllEventCodes() {
|
|
43
|
-
const resultSet = await Database.
|
|
43
|
+
const resultSet = await Database.executeGetDataQuery(`SELECT * FROM ${EVENT_CODES_TABLE};`, []);
|
|
44
44
|
return resultSet.rows._array;
|
|
45
45
|
}
|
|
46
46
|
async deleteAll() {
|
|
47
|
-
return Database.
|
|
47
|
+
return Database.executeSetDataQuery(`DELETE FROM ${EVENT_CODES_TABLE};`, []);
|
|
48
48
|
}
|
|
49
49
|
async getEventsByCode(codes) {
|
|
50
50
|
if (!codes || codes.length < 1) return [];
|
|
51
51
|
const placeholders = codes.map(it => `'${it}'`).join(',');
|
|
52
|
-
const resultSet = await Database.
|
|
52
|
+
const resultSet = await Database.executeGetDataQuery(`SELECT * FROM ${EVENT_CODES_TABLE} WHERE ${EventColumns.CODE} IN (${placeholders});`, []);
|
|
53
53
|
return resultSet.rows._array;
|
|
54
54
|
}
|
|
55
55
|
async getEventByCode(code) {
|
|
56
56
|
if (!code) return [];
|
|
57
|
-
const resultSet = await Database.
|
|
57
|
+
const resultSet = await Database.executeGetDataQuery(`SELECT * FROM ${EVENT_CODES_TABLE} WHERE ${EventColumns.CODE} = ?;`, [code]);
|
|
58
58
|
return resultSet.rows._array;
|
|
59
59
|
}
|
|
60
60
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Database","EVENT_CODES_TABLE","EventColumns","EventCodeRepo","getInstance","instance","saveEventCode","eventsList","length","init","deleteAll","promises","r","eventRow","eventCode","description","successEvent","push","insertEvent","Promise","all","event","
|
|
1
|
+
{"version":3,"names":["Database","EVENT_CODES_TABLE","EventColumns","EventCodeRepo","getInstance","instance","saveEventCode","eventsList","length","init","deleteAll","promises","r","eventRow","eventCode","description","successEvent","push","insertEvent","Promise","all","event","executeSetDataQuery","CODE","DESCRIPTION","SUCCESS_EVENT","getAllEventCodes","resultSet","executeGetDataQuery","rows","_array","getEventsByCode","codes","placeholders","map","it","join","getEventByCode","code","_EventCodeRepo","_defineProperty"],"sources":["EventCodeRepo.ts"],"sourcesContent":["import Database from '../syncmanager/database';\nimport { EventsRow, EVENT_CODES_TABLE, EventColumns } from '../syncmanager/DBConfig';\nimport type { EventCodes } from '../../models/ReasonCodes';\n\nexport default class EventCodeRepo {\n private static instance: EventCodeRepo;\n public static getInstance(): EventCodeRepo {\n if (!EventCodeRepo.instance) {\n EventCodeRepo.instance = new EventCodeRepo();\n }\n return EventCodeRepo.instance;\n }\n\n public async saveEventCode(eventsList: EventCodes[]) {\n if (!eventsList || eventsList.length < 1) return;\n await this.init();\n await this.deleteAll();\n const promises: any[] = [];\n for (let r of eventsList) {\n const eventRow: EventsRow = {\n eventCode: r.eventCode,\n description: r.description,\n successEvent: r.successEvent,\n };\n promises.push(this.insertEvent(eventRow));\n }\n await Promise.all(promises);\n }\n private async insertEvent(event: EventsRow) {\n await Database.executeSetDataQuery(\n `INSERT OR REPLACE INTO ${EVENT_CODES_TABLE}(\\\n ${EventColumns.CODE},\\\n ${EventColumns.DESCRIPTION},\\\n ${EventColumns.SUCCESS_EVENT})\\\n values (?,?,?)`,\n [event.eventCode, event.description, event.successEvent]\n );\n }\n\n private async init(): Promise<void> {\n await Database.executeSetDataQuery(\n `CREATE TABLE IF NOT EXISTS ${EVENT_CODES_TABLE} (\\\n ${EventColumns.CODE} TEXT PRIMARY KEY NOT NULL,\\\n ${EventColumns.DESCRIPTION} TEXT,\\\n ${EventColumns.SUCCESS_EVENT} INTEGER);`,\n []\n );\n }\n public async getAllEventCodes(): Promise<EventsRow[]> {\n const resultSet = await Database.executeGetDataQuery(\n `SELECT * FROM ${EVENT_CODES_TABLE};`,\n []\n );\n return resultSet.rows._array;\n }\n public async deleteAll() {\n return Database.executeSetDataQuery(`DELETE FROM ${EVENT_CODES_TABLE};`, []);\n }\n\n public async getEventsByCode(codes: string[]): Promise<EventsRow[]> {\n if (!codes || codes.length < 1) return [];\n const placeholders = codes.map((it) => `'${it}'`).join(',');\n const resultSet = await Database.executeGetDataQuery(\n `SELECT * FROM ${EVENT_CODES_TABLE} WHERE ${EventColumns.CODE} IN (${placeholders});`,\n []\n );\n return resultSet.rows._array;\n }\n\n public async getEventByCode(code: string): Promise<EventsRow[]> {\n if (!code) return [];\n const resultSet = await Database.executeGetDataQuery(\n `SELECT * FROM ${EVENT_CODES_TABLE} WHERE ${EventColumns.CODE} = ?;`,\n [code]\n );\n return resultSet.rows._array;\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,QAAQ,MAAM,yBAAyB;AAC9C,SAAoBC,iBAAiB,EAAEC,YAAY,QAAQ,yBAAyB;AAGpF,eAAe,MAAMC,aAAa,CAAC;EAEjC,OAAcC,WAAWA,CAAA,EAAkB;IACzC,IAAI,CAACD,aAAa,CAACE,QAAQ,EAAE;MAC3BF,aAAa,CAACE,QAAQ,GAAG,IAAIF,aAAa,CAAC,CAAC;IAC9C;IACA,OAAOA,aAAa,CAACE,QAAQ;EAC/B;EAEA,MAAaC,aAAaA,CAACC,UAAwB,EAAE;IACnD,IAAI,CAACA,UAAU,IAAIA,UAAU,CAACC,MAAM,GAAG,CAAC,EAAE;IAC1C,MAAM,IAAI,CAACC,IAAI,CAAC,CAAC;IACjB,MAAM,IAAI,CAACC,SAAS,CAAC,CAAC;IACtB,MAAMC,QAAe,GAA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CAACC,KAAe,EAAwB;IAClE,IAAI,CAACA,KAAK,IAAIA,KAAK,CAACxB,MAAM,GAAG,CAAC,EAAE,OAAO,EAAE;IACzC,MAAMyB,YAAY,GAAGD,KAAK,CAACE,GAAG,CAAEC,EAAE,IAAK,IAAIA,EAAE,GAAG,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC;IAC3D,MAAMT,SAAS,GAAG,MAAM3B,QAAQ,CAAC4B,mBAAmB,CAClD,iBAAiB3B,iBAAiB,UAAUC,YAAY,CAACqB,IAAI,QAAQU,YAAY,IAAI,EACrF,EACF,CAAC;IACD,OAAON,SAAS,CAACE,IAAI,CAACC,MAAM;EAC9B;EAEA,MAAaO,cAAcA,CAACC,IAAY,EAAwB;IAC9D,IAAI,CAACA,IAAI,EAAE,OAAO,EAAE;IACpB,MAAMX,SAAS,GAAG,MAAM3B,QAAQ,CAAC4B,mBAAmB,CAClD,iBAAiB3B,iBAAiB,UAAUC,YAAY,CAACqB,IAAI,OAAO,EACpE,CAACe,IAAI,CACP,CAAC;IACD,OAAOX,SAAS,CAACE,IAAI,CAACC,MAAM;EAC9B;AACF;AAACS,cAAA,GAzEoBpC,aAAa;AAAAqC,eAAA,CAAbrC,aAAa","ignoreList":[]}
|
|
@@ -6,8 +6,8 @@ import DispatchSdkCache from '../sdk/DispatchSdkCache';
|
|
|
6
6
|
import Logger, { LOG_TYPE } from '../../utils/Logger';
|
|
7
7
|
import { BaseError } from '../../errors/BaseError';
|
|
8
8
|
import ErrorCodes from '../../errors/ErrorCodes';
|
|
9
|
-
import ReasonCodeRepo from './ReasonCodeRepo';
|
|
10
9
|
import GraphQLClient from '../../network/GraphQLClient';
|
|
10
|
+
import ReasonCodeRepoIns from './ReasonCodeRepo';
|
|
11
11
|
export default class ReasonCodeContainer {
|
|
12
12
|
constructor() {
|
|
13
13
|
_defineProperty(this, "cache", DispatchSdkCache.getInstance());
|
|
@@ -22,7 +22,7 @@ export default class ReasonCodeContainer {
|
|
|
22
22
|
if (!applicableCodes || applicableCodes[entityCode] == null || applicableCodes[entityCode].length < 1) return [];
|
|
23
23
|
try {
|
|
24
24
|
const codes = applicableCodes[entityCode];
|
|
25
|
-
let finalApplicableCodes = await
|
|
25
|
+
let finalApplicableCodes = await ReasonCodeRepoIns.getReasonsByCode(codes);
|
|
26
26
|
if (finalApplicableCodes && finalApplicableCodes.length > 0) {
|
|
27
27
|
return finalApplicableCodes;
|
|
28
28
|
} else return [];
|
|
@@ -41,7 +41,7 @@ export default class ReasonCodeContainer {
|
|
|
41
41
|
async getReasonByCode(code) {
|
|
42
42
|
try {
|
|
43
43
|
if (!code) return null;else {
|
|
44
|
-
const queryResult = await
|
|
44
|
+
const queryResult = await ReasonCodeRepoIns.getReasonByCode(code);
|
|
45
45
|
if (queryResult && queryResult.length > 0) {
|
|
46
46
|
return queryResult[0];
|
|
47
47
|
} else return null;
|
|
@@ -58,7 +58,7 @@ export default class ReasonCodeContainer {
|
|
|
58
58
|
try {
|
|
59
59
|
let graphlQLResponse = await GraphQLClient.getInstance().fetchReasonCodes();
|
|
60
60
|
if (graphlQLResponse && graphlQLResponse.data && graphlQLResponse.data.reasonList && graphlQLResponse.data.reasonList.data) {
|
|
61
|
-
await
|
|
61
|
+
await ReasonCodeRepoIns.saveReasonCode(graphlQLResponse.data.reasonList.data);
|
|
62
62
|
await this.cache.setKeyInCache(DispatchSdkCache.KEYS.REASON_FETCH_TIME, Date.now().toString());
|
|
63
63
|
} else {
|
|
64
64
|
Logger.getInstance().logEvent('fetchReasonCode', JSON.stringify(graphlQLResponse), LOG_TYPE.SDK_ERROR);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DispatchSdkCache","Logger","LOG_TYPE","BaseError","ErrorCodes","
|
|
1
|
+
{"version":3,"names":["DispatchSdkCache","Logger","LOG_TYPE","BaseError","ErrorCodes","GraphQLClient","ReasonCodeRepoIns","ReasonCodeContainer","constructor","_defineProperty","getInstance","instance","getReasonCodes","applicableCodes","entityCode","length","codes","finalApplicableCodes","getReasonsByCode","error","getReasonCodeFromText","reasonText","reasons","r","description","reasonCode","getReasonByCode","code","queryResult","fetchReasonCode","currentDate","Date","toLocaleDateString","lastFetchedTime","cache","getKeyFromCache","KEYS","REASON_FETCH_TIME","reasonFetchDate","parseInt","graphlQLResponse","fetchReasonCodes","data","reasonList","saveReasonCode","setKeyInCache","now","toString","logEvent","JSON","stringify","SDK_ERROR","REASON_CODE_API_ERROR","message","SDK_INFO","_ReasonCodeContainer"],"sources":["ReasonCodeContainer.ts"],"sourcesContent":["import DispatchSdkCache from '../sdk/DispatchSdkCache';\nimport Logger, { LOG_TYPE } from '../../utils/Logger';\nimport { BaseError } from '../../errors/BaseError';\nimport ErrorCodes from '../../errors/ErrorCodes';\nimport type { ApplicableReasons } from '../../models/execTasks/ETBaseModels';\nimport type { ReasonsRow } from '../syncmanager/DBConfig';\nimport GraphQLClient from '../../network/GraphQLClient';\nimport ReasonCodeRepoIns from './ReasonCodeRepo';\n\nexport default class ReasonCodeContainer {\n private static instance: ReasonCodeContainer;\n private cache: DispatchSdkCache = DispatchSdkCache.getInstance();\n private constructor() { }\n\n public static getInstance(): ReasonCodeContainer {\n if (!ReasonCodeContainer.instance) {\n ReasonCodeContainer.instance = new ReasonCodeContainer();\n }\n return ReasonCodeContainer.instance;\n }\n public async getReasonCodes(\n applicableCodes: ApplicableReasons,\n entityCode: string\n ): Promise<ReasonsRow[]> {\n if (\n !applicableCodes ||\n applicableCodes[entityCode] == null ||\n applicableCodes[entityCode].length < 1\n )\n return [];\n try {\n const codes: string[] = applicableCodes[entityCode];\n let finalApplicableCodes =\n await ReasonCodeRepoIns.getReasonsByCode(codes);\n if (finalApplicableCodes && finalApplicableCodes.length > 0) {\n return finalApplicableCodes;\n } else return [];\n } catch (error: any) {\n return [];\n }\n }\n public static getReasonCodeFromText(\n reasonText: string,\n reasons: ReasonsRow[]\n ): string {\n for (const r of reasons) {\n if (r.description === reasonText) {\n return r.reasonCode;\n }\n }\n return '';\n }\n public async getReasonByCode(code: string): Promise<ReasonsRow | null> {\n try {\n if (!code) return null;\n else {\n const queryResult = await ReasonCodeRepoIns.getReasonByCode(\n code\n );\n if (queryResult && queryResult.length > 0) {\n return queryResult[0];\n } else return null;\n }\n } catch (error: any) {\n return null;\n }\n }\n\n public async fetchReasonCode() {\n const currentDate = new Date().toLocaleDateString();\n const lastFetchedTime = await this.cache.getKeyFromCache(\n DispatchSdkCache.KEYS.REASON_FETCH_TIME\n );\n const reasonFetchDate = new Date(\n lastFetchedTime ? parseInt(lastFetchedTime) : 0\n ).toLocaleDateString();\n if (currentDate !== reasonFetchDate) {\n try {\n let graphlQLResponse =\n await GraphQLClient.getInstance().fetchReasonCodes();\n if (\n graphlQLResponse &&\n graphlQLResponse.data &&\n graphlQLResponse.data.reasonList &&\n graphlQLResponse.data.reasonList.data\n ) {\n await ReasonCodeRepoIns.saveReasonCode(\n graphlQLResponse.data.reasonList.data\n );\n await this.cache.setKeyInCache(\n DispatchSdkCache.KEYS.REASON_FETCH_TIME,\n Date.now().toString()\n );\n } else {\n Logger.getInstance().logEvent(\n 'fetchReasonCode',\n JSON.stringify(graphlQLResponse),\n LOG_TYPE.SDK_ERROR\n );\n throw new BaseError(\n ErrorCodes.REASON_CODE_API_ERROR,\n 'Unexpected error'\n );\n }\n } catch (error: any) {\n Logger.getInstance().logEvent(\n 'fetchReasonCode',\n error.message,\n LOG_TYPE.SDK_ERROR\n );\n throw new BaseError(ErrorCodes.REASON_CODE_API_ERROR, error.message);\n }\n } else {\n Logger.getInstance().logEvent(\n 'fetchReasonCode',\n 'NO Fetch REQUIRED',\n LOG_TYPE.SDK_INFO\n );\n }\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,gBAAgB,MAAM,yBAAyB;AACtD,OAAOC,MAAM,IAAIC,QAAQ,QAAQ,oBAAoB;AACrD,SAASC,SAAS,QAAQ,wBAAwB;AAClD,OAAOC,UAAU,MAAM,yBAAyB;AAGhD,OAAOC,aAAa,MAAM,6BAA6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gB,CAAC,EAChCtC,QAAQ,CAACiD,SACX,CAAC;UACD,MAAM,IAAIhD,SAAS,CACjBC,UAAU,CAACgD,qBAAqB,EAChC,kBACF,CAAC;QACH;MACF,CAAC,CAAC,OAAOjC,KAAU,EAAE;QACnBlB,MAAM,CAACS,WAAW,CAAC,CAAC,CAACsC,QAAQ,CAC3B,iBAAiB,EACjB7B,KAAK,CAACkC,OAAO,EACbnD,QAAQ,CAACiD,SACX,CAAC;QACD,MAAM,IAAIhD,SAAS,CAACC,UAAU,CAACgD,qBAAqB,EAAEjC,KAAK,CAACkC,OAAO,CAAC;MACtE;IACF,CAAC,MAAM;MACLpD,MAAM,CAACS,WAAW,CAAC,CAAC,CAACsC,QAAQ,CAC3B,iBAAiB,EACjB,mBAAmB,EACnB9C,QAAQ,CAACoD,QACX,CAAC;IACH;EACF;AACF;AAACC,oBAAA,GA/GoBhD,mBAAmB;AAAAE,eAAA,CAAnBF,mBAAmB","ignoreList":[]}
|
|
@@ -2,9 +2,10 @@ var _ReasonCodeRepo;
|
|
|
2
2
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
3
3
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
4
4
|
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); }
|
|
5
|
-
import
|
|
5
|
+
import Database from '../syncmanager/database';
|
|
6
6
|
import { ReasonColums, REASONS_TABLE } from '../syncmanager/DBConfig';
|
|
7
|
-
|
|
7
|
+
import { Platform } from 'react-native';
|
|
8
|
+
class ReasonCodeRepo {
|
|
8
9
|
static getInstance() {
|
|
9
10
|
if (!ReasonCodeRepo.instance) {
|
|
10
11
|
ReasonCodeRepo.instance = new ReasonCodeRepo();
|
|
@@ -28,7 +29,7 @@ export default class ReasonCodeRepo {
|
|
|
28
29
|
await Promise.all(promises);
|
|
29
30
|
}
|
|
30
31
|
async insertReason(reason) {
|
|
31
|
-
await Database.
|
|
32
|
+
await Database.executeSetDataQuery(`INSERT OR REPLACE INTO ${REASONS_TABLE}(\
|
|
32
33
|
${ReasonColums.CODE},\
|
|
33
34
|
${ReasonColums.DESCRIPTION},\
|
|
34
35
|
${ReasonColums.IS_ENABLED},\
|
|
@@ -36,31 +37,35 @@ export default class ReasonCodeRepo {
|
|
|
36
37
|
values (?,?,?,?)`, [reason.reasonCode, reason.description, reason.isEnabled, reason.isSystemDefined]);
|
|
37
38
|
}
|
|
38
39
|
async init() {
|
|
39
|
-
await Database.
|
|
40
|
+
const initResult = await Database.executeSetDataQuery(`CREATE TABLE IF NOT EXISTS ${REASONS_TABLE} (\
|
|
40
41
|
${ReasonColums.CODE} TEXT PRIMARY KEY NOT NULL,\
|
|
41
42
|
${ReasonColums.DESCRIPTION} TEXT,\
|
|
42
43
|
${ReasonColums.IS_ENABLED} INTEGER,\
|
|
43
44
|
${ReasonColums.SYSTEM_DEFINED} INTEGER);`, []);
|
|
45
|
+
return;
|
|
44
46
|
}
|
|
45
47
|
async getAllReasons() {
|
|
46
|
-
const resultSet = await Database.
|
|
48
|
+
const resultSet = await Database.executeGetDataQuery(`SELECT * FROM ${REASONS_TABLE};`, []);
|
|
47
49
|
return resultSet.rows._array;
|
|
48
50
|
}
|
|
49
51
|
async deleteAll() {
|
|
50
|
-
return Database.
|
|
52
|
+
return Database.executeSetDataQuery(`DELETE FROM ${REASONS_TABLE};`, []);
|
|
51
53
|
}
|
|
52
54
|
async getReasonsByCode(codes) {
|
|
53
55
|
if (!codes || codes.length < 1) return [];
|
|
54
56
|
const placeholders = codes.map(it => `'${it}'`).join(',');
|
|
55
|
-
const
|
|
57
|
+
const isEnabled = Platform.OS === 'ios' ? '1' : '1';
|
|
58
|
+
const resultSet = await Database.executeGetDataQuery(`SELECT * FROM ${REASONS_TABLE} WHERE ${ReasonColums.IS_ENABLED}= '${isEnabled}' AND ${ReasonColums.CODE} IN (${placeholders});`, []);
|
|
56
59
|
return resultSet.rows._array;
|
|
57
60
|
}
|
|
58
61
|
async getReasonByCode(code) {
|
|
59
62
|
if (!code) return [];
|
|
60
|
-
const resultSet = await Database.
|
|
63
|
+
const resultSet = await Database.executeGetDataQuery(`SELECT * FROM ${REASONS_TABLE} WHERE ${ReasonColums.CODE} = ?;`, [code]);
|
|
61
64
|
return resultSet.rows._array;
|
|
62
65
|
}
|
|
63
66
|
}
|
|
64
67
|
_ReasonCodeRepo = ReasonCodeRepo;
|
|
65
68
|
_defineProperty(ReasonCodeRepo, "instance", void 0);
|
|
69
|
+
const ReasonCodeRepoIns = ReasonCodeRepo.getInstance();
|
|
70
|
+
export default ReasonCodeRepoIns;
|
|
66
71
|
//# sourceMappingURL=ReasonCodeRepo.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Database","ReasonColums","REASONS_TABLE","ReasonCodeRepo","getInstance","instance","saveReasonCode","reasonsList","length","init","deleteAll","promises","r","reasonRow","reasonCode","description","isEnabled","isSystemDefined","push","insertReason","Promise","all","reason","
|
|
1
|
+
{"version":3,"names":["Database","ReasonColums","REASONS_TABLE","Platform","ReasonCodeRepo","getInstance","instance","saveReasonCode","reasonsList","length","init","deleteAll","promises","r","reasonRow","reasonCode","description","isEnabled","isSystemDefined","push","insertReason","Promise","all","reason","executeSetDataQuery","CODE","DESCRIPTION","IS_ENABLED","SYSTEM_DEFINED","initResult","getAllReasons","resultSet","executeGetDataQuery","rows","_array","getReasonsByCode","codes","placeholders","map","it","join","OS","getReasonByCode","code","_ReasonCodeRepo","_defineProperty","ReasonCodeRepoIns"],"sources":["ReasonCodeRepo.ts"],"sourcesContent":["import Database from '../syncmanager/database';\nimport { ReasonColums, REASONS_TABLE, ReasonsRow } from '../syncmanager/DBConfig';\nimport type { ReasonCodes } from '../../models/ReasonCodes';\nimport { Platform } from 'react-native';\n\nclass ReasonCodeRepo {\n private static instance: ReasonCodeRepo;\n public static getInstance(): ReasonCodeRepo {\n if (!ReasonCodeRepo.instance) {\n ReasonCodeRepo.instance = new ReasonCodeRepo();\n }\n return ReasonCodeRepo.instance;\n }\n\n public async saveReasonCode(reasonsList: ReasonCodes[]) {\n if (!reasonsList || reasonsList.length < 1) return;\n await this.init();\n await this.deleteAll();\n const promises: any[] = [];\n for (let r of reasonsList) {\n const reasonRow: ReasonsRow = {\n reasonCode: r.reasonCode,\n description: r.description,\n isEnabled: r.isEnabled,\n isSystemDefined: r.isSystemDefined,\n };\n promises.push(this.insertReason(reasonRow));\n }\n await Promise.all(promises);\n }\n private async insertReason(reason: ReasonsRow) {\n await Database.executeSetDataQuery(\n `INSERT OR REPLACE INTO ${REASONS_TABLE}(\\\n ${ReasonColums.CODE},\\\n ${ReasonColums.DESCRIPTION},\\\n ${ReasonColums.IS_ENABLED},\\\n ${ReasonColums.SYSTEM_DEFINED})\\\n values (?,?,?,?)`,\n [\n reason.reasonCode,\n reason.description,\n reason.isEnabled,\n reason.isSystemDefined,\n ]\n );\n }\n\n public async init(): Promise<void> {\n const initResult = await Database.executeSetDataQuery(\n `CREATE TABLE IF NOT EXISTS ${REASONS_TABLE} (\\\n ${ReasonColums.CODE} TEXT PRIMARY KEY NOT NULL,\\\n ${ReasonColums.DESCRIPTION} TEXT,\\\n ${ReasonColums.IS_ENABLED} INTEGER,\\\n ${ReasonColums.SYSTEM_DEFINED} INTEGER);`,\n []\n );\n return;\n }\n public async getAllReasons(): Promise<ReasonsRow[]> {\n const resultSet = await Database.executeGetDataQuery(\n `SELECT * FROM ${REASONS_TABLE};`,\n []\n );\n return resultSet.rows._array;\n }\n public async deleteAll() {\n return Database.executeSetDataQuery(`DELETE FROM ${REASONS_TABLE};`, []);\n }\n\n public async getReasonsByCode(codes: string[]): Promise<ReasonsRow[]> {\n if (!codes || codes.length < 1) return [];\n const placeholders = codes.map((it) => `'${it}'`).join(',');\n const isEnabled = Platform.OS === 'ios' ? '1' : '1';\n const resultSet = await Database.executeGetDataQuery(\n `SELECT * FROM ${REASONS_TABLE} WHERE ${ReasonColums.IS_ENABLED}= '${isEnabled}' AND ${ReasonColums.CODE} IN (${placeholders});`,\n []\n );\n return resultSet.rows._array;\n }\n\n public async getReasonByCode(code: string): Promise<ReasonsRow[]> {\n if (!code) return [];\n const resultSet = await Database.executeGetDataQuery(\n `SELECT * FROM ${REASONS_TABLE} WHERE ${ReasonColums.CODE} = ?;`,\n [code]\n );\n return resultSet.rows._array;\n }\n}\n\nconst ReasonCodeRepoIns = ReasonCodeRepo.getInstance();\nexport default ReasonCodeRepoIns;"],"mappings":";;;;AAAA,OAAOA,QAAQ,MAAM,yBAAyB;AAC9C,SAASC,YAAY,EAAEC,aAAa,QAAoB,yBAAyB;AAEjF,SAASC,QAAQ,QAAQ,cAAc;AAEvC,MAAMC,cAAc,CAAC;EAEnB,OAAcC,WAAWA,CAAA,EAAmB;IAC1C,IAAI,CAACD,cAAc,CAACE,QAAQ,EAAE;MAC5BF,cAAc,CAACE,QAAQ,GAAG,IAAIF,cAAc,CAAC,CAAC;IAChD;IACA,OAAOA,cAAc,CAACE,QAAQ;EAChC;EAEA,MAAaC,cAAcA,CAACC,WAA0B,EAAE;IACtD,IAAI,CAACA,WAAW,IAAIA,WAAW,CAACC,MAAM,GAAG,CAAC,EAAE;IAC5C,MAAM,IAAI,CAACC,IAAI,CAAC,CAAC;IACjB,MAAM,IAAI,CAACC,SAAS,CAAC,CAAC;IACtB,MAAMC,QAAe,GAAG,EAAE;IAC1B,KAAK,IAAIC,CAAC,IAAIL,WAAW,EAAE;MACzB,MAAMM,SAAqB,GAAG;QAC5BC,UAAU,EAAEF,CAAC,CAACE,UAAU;QACxBC,WAAW,EAAEH,CAAC,CAACG,WAAW;QAC1BC,SAAS,EAAEJ,CAAC,CAACI,SAAS;QACtBC,eAAe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AAK,CAAC3B,MAAM,GAAG,CAAC,EAAE,OAAO,EAAE;IACzC,MAAM4B,YAAY,GAAGD,KAAK,CAACE,GAAG,CAAEC,EAAE,IAAK,IAAIA,EAAE,GAAG,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC;IAC3D,MAAMvB,SAAS,GAAGd,QAAQ,CAACsC,EAAE,KAAK,KAAK,GAAG,GAAG,GAAG,GAAG;IACnD,MAAMV,SAAS,GAAG,MAAM/B,QAAQ,CAACgC,mBAAmB,CAClD,iBAAiB9B,aAAa,UAAUD,YAAY,CAAC0B,UAAU,MAAMV,SAAS,UAAUhB,YAAY,CAACwB,IAAI,QAAQY,YAAY,IAAI,EACjI,EACF,CAAC;IACD,OAAON,SAAS,CAACE,IAAI,CAACC,MAAM;EAC9B;EAEA,MAAaQ,eAAeA,CAACC,IAAY,EAAyB;IAChE,IAAI,CAACA,IAAI,EAAE,OAAO,EAAE;IACpB,MAAMZ,SAAS,GAAG,MAAM/B,QAAQ,CAACgC,mBAAmB,CAClD,iBAAiB9B,aAAa,UAAUD,YAAY,CAACwB,IAAI,OAAO,EAChE,CAACkB,IAAI,CACP,CAAC;IACD,OAAOZ,SAAS,CAACE,IAAI,CAACC,MAAM;EAC9B;AACF;AAACU,eAAA,GAnFKxC,cAAc;AAAAyC,eAAA,CAAdzC,cAAc;AAqFpB,MAAM0C,iBAAiB,GAAG1C,cAAc,CAACC,WAAW,CAAC,CAAC;AACtD,eAAeyC,iBAAiB","ignoreList":[]}
|
|
@@ -13,7 +13,6 @@ export default class LocationManager {
|
|
|
13
13
|
_defineProperty(this, "subscription", null);
|
|
14
14
|
}
|
|
15
15
|
async checkForLocationPermissions() {
|
|
16
|
-
console.log("checkForLocationPermissions");
|
|
17
16
|
if (Platform.OS === 'ios') {
|
|
18
17
|
// old code checking for permissions using expo-location
|
|
19
18
|
// let permissionResponse = await Location.getForegroundPermissionsAsync();
|
|
@@ -61,7 +60,6 @@ export default class LocationManager {
|
|
|
61
60
|
if (Platform.OS === 'android') {
|
|
62
61
|
LocationModule.startLocationUpdates();
|
|
63
62
|
this.subscription = LocationModule.addLocationListener(location => {
|
|
64
|
-
console.log('Location updated:', location);
|
|
65
63
|
if (location != null) {
|
|
66
64
|
this.lastLocationAndroid = location;
|
|
67
65
|
}
|
|
@@ -80,7 +78,6 @@ export default class LocationManager {
|
|
|
80
78
|
}
|
|
81
79
|
async getLastLocation() {
|
|
82
80
|
if (Platform.OS === 'android' && this.lastLocationAndroid != null) {
|
|
83
|
-
console.log("lastLocationAndroid:", this.lastLocationAndroid);
|
|
84
81
|
return {
|
|
85
82
|
latitude: this.lastLocationAndroid.latitude.toString(),
|
|
86
83
|
longitude: this.lastLocationAndroid.longitude.toString(),
|
|
@@ -89,7 +86,6 @@ export default class LocationManager {
|
|
|
89
86
|
}
|
|
90
87
|
if (Platform.OS === 'ios') {
|
|
91
88
|
this.lastLocationiOS = await LocationModule.getLastLocation();
|
|
92
|
-
console.log("lastLocationiOS:", this.lastLocationiOS);
|
|
93
89
|
if (this.lastLocationiOS) {
|
|
94
90
|
return {
|
|
95
91
|
latitude: this.lastLocationiOS.latitude.toString(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","PermissionModule","LocationModule","LocationManager","constructor","_defineProperty","checkForLocationPermissions","
|
|
1
|
+
{"version":3,"names":["Platform","PermissionModule","LocationModule","LocationManager","constructor","_defineProperty","checkForLocationPermissions","OS","foregroundPermission","requestForegroundPermissions","startUpdates","stopLocationUpdates","getInstance","instance","startLocationUpdates","subscription","addLocationListener","location","lastLocationAndroid","console","log","getLastLocation","latitude","toString","longitude","accuracy","lastLocationiOS","removeLocationListener","error","_LocationManager"],"sources":["LocationManager.ts"],"sourcesContent":["import { EmitterSubscription, Platform } from 'react-native';\nimport PermissionModule from '../../native/PermissionModule';\nimport LocationModule, { LocationType } from '../../native/LocationModule';\n\nexport default class LocationManager {\n private static instance: LocationManager;\n private lastLocationAndroid: LocationType | null = null;\n private lastLocationiOS: LocationType | null = null;\n private stopUpdate: { remove(): void } | undefined;\n private subscription: EmitterSubscription | null = null;\n\n public async checkForLocationPermissions(): Promise<boolean> {\n if (Platform.OS === 'ios') {\n // old code checking for permissions using expo-location\n // let permissionResponse = await Location.getForegroundPermissionsAsync();\n // if (permissionResponse.status === 'granted') {\n // this.startUpdates();\n // return true;\n // } else {\n // let { status } = await Location.requestForegroundPermissionsAsync();\n // if (status === 'granted') {\n // this.startUpdates();\n // return true;\n // } else {\n // this.stopLocationUpdates();\n // return false;\n // }\n // }\n let foregroundPermission = await PermissionModule.requestForegroundPermissions();\n if (foregroundPermission) {\n this.startUpdates();\n return true;\n } else {\n this.stopLocationUpdates();\n return false;\n }\n }\n if (Platform.OS === 'android') {\n let foregroundPermission = await PermissionModule.requestForegroundPermissions();\n if (foregroundPermission) {\n this.startUpdates();\n return true;\n } else {\n this.stopLocationUpdates();\n return false;\n }\n }\n return true;\n }\n\n public static getInstance(): LocationManager {\n if (!LocationManager.instance) {\n LocationManager.instance = new LocationManager();\n }\n return LocationManager.instance;\n }\n\n public startUpdates() {\n if (Platform.OS === 'android') {\n LocationModule.startLocationUpdates();\n this.subscription = LocationModule.addLocationListener((location) => {\n if (location != null) {\n this.lastLocationAndroid = location\n }\n });\n }\n\n if (Platform.OS === 'ios') {\n console.log(\"startUpdates\");\n LocationModule.startLocationUpdates();\n // this.subscription = LocationModule.addLocationListener((location) => {\n // console.log('Location updated:', location);\n // if (location != null) {\n // this.lastLocationiOS = location\n // }\n // });\n }\n }\n\n public async getLastLocation(): Promise<DLocation> {\n if (Platform.OS === 'android' && this.lastLocationAndroid != null) {\n return {\n latitude: this.lastLocationAndroid.latitude.toString(),\n longitude: this.lastLocationAndroid.longitude.toString(),\n accuracy: this.lastLocationAndroid.accuracy.toString(),\n };\n }\n if (Platform.OS === 'ios') {\n this.lastLocationiOS = await LocationModule.getLastLocation();\n if (this.lastLocationiOS) {\n return {\n latitude: this.lastLocationiOS.latitude.toString(),\n longitude: this.lastLocationiOS.longitude.toString(),\n accuracy: this.lastLocationiOS.accuracy.toString(),\n };\n }\n }\n return {\n latitude: 'null',\n longitude: 'null',\n accuracy: 'null',\n };\n }\n\n\n public stopLocationUpdates() {\n try {\n // code for android\n if (Platform.OS === 'android') {\n if (this.subscription) {\n LocationModule.removeLocationListener(this.subscription);\n }\n }\n\n // code for ios\n if (Platform.OS === 'ios') {\n if (this.subscription) {\n LocationModule.removeLocationListener(this.subscription);\n }\n }\n } catch (error: any) { }\n }\n}\n\nexport interface DLocation {\n latitude: string;\n longitude: string;\n accuracy: string;\n}\n"],"mappings":";;;;AAAA,SAA8BA,QAAQ,QAAQ,cAAc;AAC5D,OAAOC,gBAAgB,MAAM,+BAA+B;AAC5D,OAAOC,cAAc,MAAwB,6BAA6B;AAE1E,eAAe,MAAMC,eAAe,CAAC;EAAAC,YAAA;IAAAC,eAAA,8BAEgB,IAAI;IAAAA,eAAA,0BACR,IAAI;IAAAA,eAAA;IAAAA,eAAA,uBAEA,IAAI;EAAA;EAEvD,MAAaC,2BAA2BA,CAAA,EAAqB;IAC3D,IAAIN,QAAQ,CAACO,EAAE,KAAK,KAAK,EAAE;MACzB;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA,IAAIC,oBAAoB,GAAG,MAAMP,gBAAgB,CAACQ,4BAA4B,CAAC,CAAC;MAChF,IAAID,oBAAoB,EAAE;QACxB,IAAI,CAACE,YAAY,CAAC,CAAC;QACnB,OAAO,IAAI;MACb,CAAC,MAAM;QACL,IAAI,CAACC,mBAAmB,CAAC,CAAC;QAC1B,OAAO,KAAK;MACd;IACF;IACA,IAAIX,QAAQ,CAACO,EAAE,KAAK,SAAS,EAAE;MAC7B,IAAIC,oBAAoB,GAAG,MAAMP,gBAAgB,CAACQ,4BAA4B,CAAC,CAAC;MAChF,IAAID,oBAAoB,EAAE;QACxB,IAAI,CAACE,YAAY,CAAC,CAAC;QACnB,OAAO,IAAI;MACb,C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,CAACmB,eAAe,CAAC,CAAC;MAC7D,IAAI,IAAI,CAACK,eAAe,EAAE;QACxB,OAAO;UACLJ,QAAQ,EAAE,IAAI,CAACI,eAAe,CAACJ,QAAQ,CAACC,QAAQ,CAAC,CAAC;UAClDC,SAAS,EAAE,IAAI,CAACE,eAAe,CAACF,SAAS,CAACD,QAAQ,CAAC,CAAC;UACpDE,QAAQ,EAAE,IAAI,CAACC,eAAe,CAACD,QAAQ,CAACF,QAAQ,CAAC;QACnD,CAAC;MACH;IACF;IACA,OAAO;MACLD,QAAQ,EAAE,MAAM;MAChBE,SAAS,EAAE,MAAM;MACjBC,QAAQ,EAAE;IACZ,CAAC;EACH;EAGOd,mBAAmBA,CAAA,EAAG;IAC3B,IAAI;MACF;MACA,IAAIX,QAAQ,CAACO,EAAE,KAAK,SAAS,EAAE;QAC7B,IAAI,IAAI,CAACQ,YAAY,EAAE;UACrBb,cAAc,CAACyB,sBAAsB,CAAC,IAAI,CAACZ,YAAY,CAAC;QAC1D;MACF;;MAEA;MACA,IAAIf,QAAQ,CAACO,EAAE,KAAK,KAAK,EAAE;QACzB,IAAI,IAAI,CAACQ,YAAY,EAAE;UACrBb,cAAc,CAACyB,sBAAsB,CAAC,IAAI,CAACZ,YAAY,CAAC;QAC1D;MACF;IACF,CAAC,CAAC,OAAOa,KAAU,EAAE,CAAE;EACzB;AACF;AAACC,gBAAA,GAtHoB1B,eAAe;AAAAE,eAAA,CAAfF,eAAe","ignoreList":[]}
|
|
@@ -20,6 +20,7 @@ import { pushBulkEventForSync } from '../../utils/SyncManagerUtils';
|
|
|
20
20
|
import callbackHandler from './callbacksHandler';
|
|
21
21
|
import { DispatchExecutor as dispatchExecutor } from '@os1-platform/platform-coreos-execution-engine-sdk';
|
|
22
22
|
import { MAX_RETRY_COUNT } from '../syncmanager/constants';
|
|
23
|
+
import { initAndUpdateDatabase } from '../../database/DBManager';
|
|
23
24
|
export class DispatchSDKManager {
|
|
24
25
|
constructor() {
|
|
25
26
|
_defineProperty(this, "cache", DispatchSdkCache.getInstance());
|
|
@@ -49,11 +50,16 @@ export class DispatchSDKManager {
|
|
|
49
50
|
enableNative: true,
|
|
50
51
|
environment: sdkConfig.sentry.env,
|
|
51
52
|
dsn: sdkConfig.sentry.dsn,
|
|
52
|
-
tracesSampleRate: 1.0
|
|
53
|
+
tracesSampleRate: 1.0,
|
|
54
|
+
enableAutoSessionTracking: true,
|
|
55
|
+
enableAutoPerformanceTracing: false,
|
|
56
|
+
attachStacktrace: true,
|
|
57
|
+
maxBreadcrumbs: 50
|
|
53
58
|
});
|
|
54
59
|
}
|
|
55
60
|
await SdkUtils.checkMandatory();
|
|
56
61
|
await this.cache.setObjectInCache(this.keys.SDK_CONFIG, sdkConfig);
|
|
62
|
+
await initAndUpdateDatabase();
|
|
57
63
|
GraphQLClient.init(sdkConfig.tenantBaseURL);
|
|
58
64
|
AppSyncManager.initAppSync(sdkConfig.tenantBaseURL, sdkConfig.syncRetryCount ?? MAX_RETRY_COUNT);
|
|
59
65
|
LocationManager.getInstance().startUpdates();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DispatchSdkCache","LocationManager","AppSyncManager","Logger","ReasonCodeContainer","GraphQLClient","isMandatoryKeysPresent","isTokenExpired","BaseError","ErrorCodes","SdkUtils","Sentry","EventCodeRepo","Storage","pushBulkEventForSync","callbackHandler","DispatchExecutor","dispatchExecutor","MAX_RETRY_COUNT","DispatchSDKManager","constructor","_defineProperty","getInstance","KEYS","instance","initDispatchSDK","sdkConfig","_sdkConfig$sentry","_sdkConfig$callbacks","_sdkConfig$callbacks2","_sdkConfig$callbacks3","_sdkConfig$callbacks4","InvalidArgumentError","accessToken","ACCESS_TOKEN_EXPIRED","sentry","enabled","init","enableNative","environment","env","dsn","tracesSampleRate","checkMandatory","cache","setObjectInCache","keys","SDK_CONFIG","tenantBaseURL","initAppSync","syncRetryCount","startUpdates","eventMapping","saveEventCode","fetchReasonCode","setLogging","enableLogging","storage","callbacks","fetchPhoneNumbersCallback","fetchDateTimeCallback","tokenRefreshCallback","fetchSDSEmailAndPhoneNumbersCallback","_sdkConfig$callbacks5","storeMultipleKeysCallback","setSharedItems","readMultipleKeysCallback","getSharedItems","deleteMultipleKeysCallback","removeSharedItems","eventBulkSyncCallback","debugLevelLog","startSDKSyncManager","logCora","removeLocationUpdates","stopLocationUpdates","_DispatchSDKManager"],"sources":["DispatchSDKManager.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\nimport DispatchSdkCache from './DispatchSdkCache';\nimport LocationManager from '../location/LocationManager';\nimport AppSyncManager from '../syncmanager/AppSyncManager';\nimport Logger from '../../utils/Logger';\nimport ReasonCodeContainer from '../dispatchCodes/ReasonCodeContainer';\nimport GraphQLClient from '../../network/GraphQLClient';\nimport { isMandatoryKeysPresent, isTokenExpired } from '../../utils/utils';\nimport { BaseError } from '../../errors/BaseError';\nimport ErrorCodes from '../../errors/ErrorCodes';\nimport SdkUtils from '../../utils/SdkUtils';\nimport * as Sentry from '@sentry/react-native';\nimport type { DispatchSDKConfig } from '../../models/sdk';\nimport EventCodeRepo from '../dispatchCodes/EventCodeRepo';\nimport Storage from '../../utils/storage';\nimport { pushBulkEventForSync } from '../../utils/SyncManagerUtils';\nimport callbackHandler from './callbacksHandler';\nimport { DispatchExecutor as dispatchExecutor } from '@os1-platform/platform-coreos-execution-engine-sdk';\nimport { MAX_RETRY_COUNT } from '../syncmanager/constants';\n\nexport class DispatchSDKManager {\n private static instance: DispatchSDKManager;\n private cache: DispatchSdkCache = DispatchSdkCache.getInstance();\n private keys = DispatchSdkCache.KEYS;\n\n private constructor() { }\n\n public static getInstance(): DispatchSDKManager {\n if (!DispatchSDKManager.instance) {\n DispatchSDKManager.instance = new DispatchSDKManager();\n }\n return DispatchSDKManager.instance;\n }\n\n /**\n * Call this init method with username,userID & authentication tokens\n * @param sdkConfig\n */\n public async initDispatchSDK(sdkConfig: DispatchSDKConfig) {\n if (\n !isMandatoryKeysPresent(sdkConfig, [\n 'tenantID',\n 'userID',\n 'userName',\n 'tenantBaseURL',\n 'domain',\n 'accessToken',\n ])\n ) {\n throw new BaseError(
|
|
1
|
+
{"version":3,"names":["DispatchSdkCache","LocationManager","AppSyncManager","Logger","ReasonCodeContainer","GraphQLClient","isMandatoryKeysPresent","isTokenExpired","BaseError","ErrorCodes","SdkUtils","Sentry","EventCodeRepo","Storage","pushBulkEventForSync","callbackHandler","DispatchExecutor","dispatchExecutor","MAX_RETRY_COUNT","initAndUpdateDatabase","DispatchSDKManager","constructor","_defineProperty","getInstance","KEYS","instance","initDispatchSDK","sdkConfig","_sdkConfig$sentry","_sdkConfig$callbacks","_sdkConfig$callbacks2","_sdkConfig$callbacks3","_sdkConfig$callbacks4","InvalidArgumentError","accessToken","ACCESS_TOKEN_EXPIRED","sentry","enabled","init","enableNative","environment","env","dsn","tracesSampleRate","enableAutoSessionTracking","enableAutoPerformanceTracing","attachStacktrace","maxBreadcrumbs","checkMandatory","cache","setObjectInCache","keys","SDK_CONFIG","tenantBaseURL","initAppSync","syncRetryCount","startUpdates","eventMapping","saveEventCode","fetchReasonCode","setLogging","enableLogging","storage","callbacks","fetchPhoneNumbersCallback","fetchDateTimeCallback","tokenRefreshCallback","fetchSDSEmailAndPhoneNumbersCallback","_sdkConfig$callbacks5","storeMultipleKeysCallback","setSharedItems","readMultipleKeysCallback","getSharedItems","deleteMultipleKeysCallback","removeSharedItems","eventBulkSyncCallback","debugLevelLog","startSDKSyncManager","logCora","removeLocationUpdates","stopLocationUpdates","_DispatchSDKManager"],"sources":["DispatchSDKManager.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\nimport DispatchSdkCache from './DispatchSdkCache';\nimport LocationManager from '../location/LocationManager';\nimport AppSyncManager from '../syncmanager/AppSyncManager';\nimport Logger from '../../utils/Logger';\nimport ReasonCodeContainer from '../dispatchCodes/ReasonCodeContainer';\nimport GraphQLClient from '../../network/GraphQLClient';\nimport { isMandatoryKeysPresent, isTokenExpired } from '../../utils/utils';\nimport { BaseError } from '../../errors/BaseError';\nimport ErrorCodes from '../../errors/ErrorCodes';\nimport SdkUtils from '../../utils/SdkUtils';\nimport * as Sentry from '@sentry/react-native';\nimport type { DispatchSDKConfig } from '../../models/sdk';\nimport EventCodeRepo from '../dispatchCodes/EventCodeRepo';\nimport Storage from '../../utils/storage';\nimport { pushBulkEventForSync } from '../../utils/SyncManagerUtils';\nimport callbackHandler from './callbacksHandler';\nimport { DispatchExecutor as dispatchExecutor } from '@os1-platform/platform-coreos-execution-engine-sdk';\nimport { MAX_RETRY_COUNT } from '../syncmanager/constants';\nimport { initAndUpdateDatabase } from '../../database/DBManager';\n\nexport class DispatchSDKManager {\n private static instance: DispatchSDKManager;\n private cache: DispatchSdkCache = DispatchSdkCache.getInstance();\n private keys = DispatchSdkCache.KEYS;\n\n private constructor() { }\n\n public static getInstance(): DispatchSDKManager {\n if (!DispatchSDKManager.instance) {\n DispatchSDKManager.instance = new DispatchSDKManager();\n }\n return DispatchSDKManager.instance;\n }\n\n /**\n * Call this init method with username,userID & authentication tokens\n * @param sdkConfig\n */\n public async initDispatchSDK(sdkConfig: DispatchSDKConfig) {\n if (\n !isMandatoryKeysPresent(sdkConfig, [\n 'tenantID',\n 'userID',\n 'userName',\n 'tenantBaseURL',\n 'domain',\n 'accessToken',\n ])\n ) {\n throw new BaseError(ErrorCodes.InvalidArgumentError, 'Invalid/Missing Argument Passed in SdkConfig');\n }\n \n if (isTokenExpired(sdkConfig.accessToken)) {\n throw new BaseError(\n ErrorCodes.ACCESS_TOKEN_EXPIRED,\n 'JWT Token Expired!'\n );\n }\n \n if (sdkConfig.sentry && sdkConfig.sentry?.enabled) {\n Sentry.init({\n enableNative: true,\n environment: sdkConfig.sentry.env,\n dsn: sdkConfig.sentry.dsn,\n tracesSampleRate: 1.0,\n enableAutoSessionTracking: true,\n enableAutoPerformanceTracing: false,\n attachStacktrace: true,\n maxBreadcrumbs: 50,\n });\n }\n \n await SdkUtils.checkMandatory();\n \n await this.cache.setObjectInCache(this.keys.SDK_CONFIG, sdkConfig);\n await initAndUpdateDatabase()\n GraphQLClient.init(sdkConfig.tenantBaseURL);\n AppSyncManager.initAppSync(\n sdkConfig.tenantBaseURL,\n sdkConfig.syncRetryCount ?? MAX_RETRY_COUNT\n );\n LocationManager.getInstance().startUpdates();\n if (sdkConfig.eventMapping) {\n EventCodeRepo.getInstance().saveEventCode(sdkConfig.eventMapping);\n }\n await ReasonCodeContainer.getInstance().fetchReasonCode();\n \n Logger.getInstance().setLogging(sdkConfig.enableLogging ?? true, sdkConfig);\n let storage = Storage.getInstance();\n\n if (\n sdkConfig.callbacks?.fetchPhoneNumbersCallback &&\n sdkConfig?.callbacks?.fetchDateTimeCallback &&\n sdkConfig?.callbacks?.tokenRefreshCallback &&\n sdkConfig?.callbacks?.fetchSDSEmailAndPhoneNumbersCallback\n ) {\n await callbackHandler.init(\n sdkConfig.callbacks.fetchPhoneNumbersCallback,\n sdkConfig.callbacks.fetchDateTimeCallback,\n sdkConfig.callbacks.tokenRefreshCallback,\n sdkConfig?.callbacks?.fetchSDSEmailAndPhoneNumbersCallback\n );\n }\n await dispatchExecutor.init(\n {\n storeMultipleKeysCallback: storage.setSharedItems,\n readMultipleKeysCallback: storage.getSharedItems,\n deleteMultipleKeysCallback: storage.removeSharedItems,\n eventBulkSyncCallback: pushBulkEventForSync,\n },\n sdkConfig.debugLevelLog ? 'debug' : 'emerg'\n );\n AppSyncManager.getInstance().startSDKSyncManager();\n Logger.getInstance().logCora(\"Info\", \"Dispatch SDK Initialized\");\n }\n\n public removeLocationUpdates() {\n LocationManager.getInstance().stopLocationUpdates();\n }\n}\n"],"mappings":";;;;AAAA;AACA,OAAOA,gBAAgB,MAAM,oBAAoB;AACjD,OAAOC,eAAe,MAAM,6BAA6B;AACzD,OAAOC,cAAc,MAAM,+BAA+B;AAC1D,OAAOC,MAAM,MAAM,oBAAoB;AACvC,OAAOC,mBAAmB,MAAM,sCAAsC;AACtE,OAAOC,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AO,CAAC,MAAM,EAAE,0BAA0B,CAAC;EAClE;EAEOC,qBAAqBA,CAAA,EAAG;IAC7B9E,eAAe,CAACsB,WAAW,CAAC,CAAC,CAACyD,mBAAmB,CAAC,CAAC;EACrD;AACF;AAACC,mBAAA,GAnGY7D,kBAAkB;AAAAE,eAAA,CAAlBF,kBAAkB","ignoreList":[]}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
2
2
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
3
3
|
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); }
|
|
4
|
-
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
5
|
-
|
|
6
4
|
import DispatchSdkCache from './DispatchSdkCache';
|
|
7
5
|
import { BaseError } from '../../errors/BaseError';
|
|
8
6
|
import ErrorCodes from '../../errors/ErrorCodes';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DispatchSdkCache","BaseError","ErrorCodes","CallbacksHandler","constructor","_defineProperty","init","phoneCallback","dateTimeCallBack","tokenRefreshCallback","emailAndPhoneCallback","_callbackToFetchPhoneNumbers","_callbackToFetchDateTime","_callbackRefreshToken","_callbackfetchSDSEmailAndPhone","getPhoneNumbers","sdsIds","getEmailAndPhoneNumbers","getDateTime","refresheAndUpdateToken","SyncManagerNotInitialized","token","length","sdkConfig","getInstance","getObjectFromCache","KEYS","SDK_CONFIG","accessToken","headers","cache","keys","setObjectInCache","ACCESS_TOKEN_EXPIRED","callbackHandler"],"sources":["callbacksHandler.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"names":["DispatchSdkCache","BaseError","ErrorCodes","CallbacksHandler","constructor","_defineProperty","init","phoneCallback","dateTimeCallBack","tokenRefreshCallback","emailAndPhoneCallback","_callbackToFetchPhoneNumbers","_callbackToFetchDateTime","_callbackRefreshToken","_callbackfetchSDSEmailAndPhone","getPhoneNumbers","sdsIds","getEmailAndPhoneNumbers","getDateTime","refresheAndUpdateToken","SyncManagerNotInitialized","token","length","sdkConfig","getInstance","getObjectFromCache","KEYS","SDK_CONFIG","accessToken","headers","cache","keys","setObjectInCache","ACCESS_TOKEN_EXPIRED","callbackHandler"],"sources":["callbacksHandler.ts"],"sourcesContent":["import { DispatchSDKConfig } from '../../models/sdk';\nimport DispatchSdkCache from './DispatchSdkCache';\nimport { BaseError } from '../../errors/BaseError';\nimport ErrorCodes from '../../errors/ErrorCodes';\nimport { EmailAndPhoneResponse } from '../../components/executiontasks/validateOTP/ValidateOTPSchema';\n\nclass CallbacksHandler {\n private _callbackToFetchPhoneNumbers!: (\n sdsIds: string[]\n ) => Promise<{ key: string; value: string[] }>;\n\n private _callbackToFetchDateTime!: () => Promise<string>;\n private _callbackRefreshToken!: () => Promise<string>;\n private _callbackfetchSDSEmailAndPhone: (\n sdsIds: string[]\n ) => Promise<Record<string, EmailAndPhoneResponse>>;\n\n public init(\n phoneCallback: (sdsIds: string[]) => Promise<{ key: string; value: string[] }>,\n dateTimeCallBack: () => Promise<string>,\n tokenRefreshCallback: () => Promise<string>,\n emailAndPhoneCallback: (sdsIds: string[]) => Promise<Record<string, EmailAndPhoneResponse>>\n ) {\n this._callbackToFetchPhoneNumbers = phoneCallback;\n this._callbackToFetchDateTime = dateTimeCallBack;\n this._callbackRefreshToken = tokenRefreshCallback;\n this._callbackfetchSDSEmailAndPhone = emailAndPhoneCallback;\n }\n\n public async getPhoneNumbers(\n sdsIds: string[]\n ): Promise<{ key: string; value: string[] } | null> {\n if (!this._callbackToFetchPhoneNumbers) return null;\n else {\n return await this._callbackToFetchPhoneNumbers(sdsIds);\n }\n }\n\n // Method to get email and phone numbers\n public async getEmailAndPhoneNumbers(\n sdsIds: string[]\n ): Promise<Record<string, EmailAndPhoneResponse>> {\n return await this._callbackfetchSDSEmailAndPhone(sdsIds);\n }\n\n public async getDateTime(): Promise<string | ''> {\n if (!this._callbackToFetchDateTime) return '';\n else {\n return await this._callbackToFetchDateTime();\n }\n }\n\n public async refresheAndUpdateToken() {\n if (!this._callbackRefreshToken) {\n throw new BaseError(\n ErrorCodes.SyncManagerNotInitialized,\n 'Dispatch SDK Not Initalised'\n );\n } else {\n let token = await this._callbackRefreshToken();\n if (token && token.length != 0) {\n let sdkConfig =\n (await DispatchSdkCache.getInstance().getObjectFromCache(\n DispatchSdkCache.KEYS.SDK_CONFIG\n )) as DispatchSDKConfig;\n sdkConfig.accessToken = token;\n var headers = sdkConfig.headers;\n if (headers) {\n headers['x-coreos-access'] = token;\n sdkConfig.headers = headers;\n }\n let cache: DispatchSdkCache = DispatchSdkCache.getInstance();\n let keys = DispatchSdkCache.KEYS;\n cache.setObjectInCache(keys.SDK_CONFIG, sdkConfig);\n } else {\n throw new BaseError(\n ErrorCodes.ACCESS_TOKEN_EXPIRED,\n 'Unable to refresh token'\n );\n }\n }\n }\n}\nconst callbackHandler = new CallbacksHandler();\nexport default callbackHandler;\n"],"mappings":";;;AACA,OAAOA,gBAAgB,MAAM,oBAAoB;AACjD,SAASC,SAAS,QAAQ,wBAAwB;AAClD,OAAOC,UAAU,MAAM,yBAAyB;AAGhD,MAAMC,gBAAgB,CAAC;EAAAC,YAAA;IAAAC,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;EAAA;EAWdC,IAAIA,CACTC,aAA8E,EAC9EC,gBAAuC,EACvCC,oBAA2C,EAC3CC,qBAA2F,EAC3F;IACA,IAAI,CAACC,4BAA4B,GAAGJ,aAAa;IACjD,IAAI,CAACK,wBAAwB,GAAGJ,gBAAgB;IAChD,IAAI,CAACK,qBAAqB,GAAGJ,oBAAoB;IAC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AAgB,CAAC0B,IAAI;QAChCI,KAAK,CAACE,gBAAgB,CAACD,IAAI,CAACJ,UAAU,EAAEJ,SAAS,CAAC;MACpD,CAAC,MAAM;QACL,MAAM,IAAItB,SAAS,CACjBC,UAAU,CAAC+B,oBAAoB,EAC/B,yBACF,CAAC;MACH;IACF;EACF;AACF;AACA,MAAMC,eAAe,GAAG,IAAI/B,gBAAgB,CAAC,CAAC;AAC9C,eAAe+B,eAAe","ignoreList":[]}
|
|
@@ -4,7 +4,7 @@ export let DispatchSyncType = /*#__PURE__*/function (DispatchSyncType) {
|
|
|
4
4
|
DispatchSyncType["DISPATCH_SUB_STATUS_UPDATE"] = "DISPATCH_SUB_STATUS_UPDATE";
|
|
5
5
|
return DispatchSyncType;
|
|
6
6
|
}({});
|
|
7
|
-
export const DATABASE_NAME = '
|
|
7
|
+
export const DATABASE_NAME = 'DispatchSDK_DB';
|
|
8
8
|
export const EVENTS_TABLE = 'EVENTS_TABLE';
|
|
9
9
|
export const REASONS_TABLE = 'REASONS_TABLE';
|
|
10
10
|
export const EVENT_CODES_TABLE = 'EVENT_CODES_TABLE';
|
|
@@ -60,6 +60,10 @@ export const EventColumns = {
|
|
|
60
60
|
DESCRIPTION: 'description',
|
|
61
61
|
SUCCESS_EVENT: 'successEvent'
|
|
62
62
|
};
|
|
63
|
+
export const VERSION_TABLE = 'VERSION_TABLE';
|
|
64
|
+
export const VERSION_COLUMNS = {
|
|
65
|
+
VERSION_NO: 'versionNo'
|
|
66
|
+
};
|
|
63
67
|
|
|
64
68
|
// NEW CODE
|
|
65
69
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DispatchSyncType","DATABASE_NAME","EVENTS_TABLE","REASONS_TABLE","EVENT_CODES_TABLE","EVENTS_COLUMNS","ID","SEQUENCE","PAYLOAD","SYNCED","CONFIG","SYNC_TYPE","META","SYNC_ERROR","DISPATCH_ID","DATA_LENGTH","ATTEMPT_COUNT","DOCUMENT_TABLE","DOCUMENT_COLUMNS","DATA","BASE64","FILE_PATH","FILE_NAME","FILE_TYPE","FMS_FOLDER_ID","FMS_ID","PRIORITY","DESCRIPTION","JOB_ID","OBJECTIVE_REF","GEO_TIMESTAMP","PROCESSED_FILE_PATH","SyncMethod","ReasonColums","CODE","IS_ENABLED","SYSTEM_DEFINED","EventColumns","SUCCESS_EVENT","WORKFLOW_INSTANCE_TABLE","WORKFLOW_INSTANCE_COLUMNS","WORKFLOW_INSTANCE_ID","MERGED_WORKFLOW_INSTANCE_ID","SCANNABLE_ID","INITIAL_MERGED_WORKFLOW_INSTANCE_ID","STATUS","JOB_WF_ID","DISPLAY_DATA","WORKFLOW_ID"],"sources":["DBConfig.ts"],"sourcesContent":["import { IDispatch } from '@os1-platform/platform-coreos-execution-engine-sdk';\nexport type ExecEngineSyncType = IDispatch.SyncType;\n\nexport enum DispatchSyncType {\n DEFAULT = 'DEFAULT',\n DISPATCH_UPDATE = 'DISPATCH_UPDATE',\n DISPATCH_SUB_STATUS_UPDATE = 'DISPATCH_SUB_STATUS_UPDATE',\n}\n\nexport const DATABASE_NAME = '
|
|
1
|
+
{"version":3,"names":["DispatchSyncType","DATABASE_NAME","EVENTS_TABLE","REASONS_TABLE","EVENT_CODES_TABLE","EVENTS_COLUMNS","ID","SEQUENCE","PAYLOAD","SYNCED","CONFIG","SYNC_TYPE","META","SYNC_ERROR","DISPATCH_ID","DATA_LENGTH","ATTEMPT_COUNT","DOCUMENT_TABLE","DOCUMENT_COLUMNS","DATA","BASE64","FILE_PATH","FILE_NAME","FILE_TYPE","FMS_FOLDER_ID","FMS_ID","PRIORITY","DESCRIPTION","JOB_ID","OBJECTIVE_REF","GEO_TIMESTAMP","PROCESSED_FILE_PATH","SyncMethod","ReasonColums","CODE","IS_ENABLED","SYSTEM_DEFINED","EventColumns","SUCCESS_EVENT","VERSION_TABLE","VERSION_COLUMNS","VERSION_NO","WORKFLOW_INSTANCE_TABLE","WORKFLOW_INSTANCE_COLUMNS","WORKFLOW_INSTANCE_ID","MERGED_WORKFLOW_INSTANCE_ID","SCANNABLE_ID","INITIAL_MERGED_WORKFLOW_INSTANCE_ID","STATUS","JOB_WF_ID","DISPLAY_DATA","WORKFLOW_ID"],"sources":["DBConfig.ts"],"sourcesContent":["import { IDispatch } from '@os1-platform/platform-coreos-execution-engine-sdk';\nexport type ExecEngineSyncType = IDispatch.SyncType;\n\nexport enum DispatchSyncType {\n DEFAULT = 'DEFAULT',\n DISPATCH_UPDATE = 'DISPATCH_UPDATE',\n DISPATCH_SUB_STATUS_UPDATE = 'DISPATCH_SUB_STATUS_UPDATE',\n}\n\nexport const DATABASE_NAME = 'DispatchSDK_DB';\nexport const EVENTS_TABLE = 'EVENTS_TABLE';\nexport const REASONS_TABLE = 'REASONS_TABLE';\nexport const EVENT_CODES_TABLE = 'EVENT_CODES_TABLE';\n\nexport const EVENTS_COLUMNS = {\n ID: 'id',\n SEQUENCE: 'seq_number',\n PAYLOAD: 'payload',\n SYNCED: 'synced',\n CONFIG: 'config',\n SYNC_TYPE: 'sync_type',\n META: 'meta',\n SYNC_ERROR: 'sync_error',\n DISPATCH_ID: 'dispatch_id',\n DATA_LENGTH: 'data_length',\n ATTEMPT_COUNT: 'attempt_count',\n};\n\nexport const DOCUMENT_TABLE = 'DOCUMENTS_TABLE';\nexport const DOCUMENT_COLUMNS = {\n ID: 'id',\n DATA: 'data',\n BASE64: 'base64',\n FILE_PATH: 'file_path',\n FILE_NAME: 'file_name',\n FILE_TYPE: 'file_type',\n SYNCED: 'synced',\n FMS_FOLDER_ID: 'fms_folder_id',\n FMS_ID: 'fms_id',\n PRIORITY: 'priority',\n DESCRIPTION: 'desc',\n SYNC_ERROR: 'sync_error',\n DISPATCH_ID: 'dispatch_id',\n JOB_ID: 'job_id',\n OBJECTIVE_REF: 'objective_ref',\n ATTEMPT_COUNT: 'attempt_count',\n GEO_TIMESTAMP: 'geo_timestamp',\n PROCESSED_FILE_PATH: 'processed_file_path',\n};\nexport type DocumentRow = {\n id: number;\n data: string;\n base64: boolean;\n file_path: string;\n file_name: string;\n file_type: string;\n synced: boolean;\n fms_folder_id: string;\n fms_id: string;\n priority: number;\n desc: string;\n sync_error: string;\n dispatch_id: string;\n job_id: string;\n objective_ref: string;\n geo_timestamp: string;\n processed_file_path: string;\n attempt_count: number;\n};\nexport type EventRow = {\n id: number;\n payload: string;\n synced: boolean;\n config: string;\n sync_type: ExecEngineSyncType | DispatchSyncType;\n objective_ref: string;\n sync_error: string;\n dispatch_id: string;\n attempt_count: number;\n};\n\nexport enum SyncMethod {\n POST = 'POST',\n PUT = 'PUT',\n GET = 'GET',\n DELETE = 'DELETE',\n}\nexport const ReasonColums = {\n CODE: 'reasonCode',\n DESCRIPTION: 'description',\n IS_ENABLED: 'isEnabled',\n SYSTEM_DEFINED: 'isSystemDefined',\n};\nexport interface ReasonsRow {\n description: string;\n isEnabled: boolean;\n reasonCode: string;\n isSystemDefined: boolean;\n}\n\nexport interface EventsRow {\n description: string;\n successEvent: boolean;\n eventCode: string;\n}\n\nexport const EventColumns = {\n CODE: 'eventCode',\n DESCRIPTION: 'description',\n SUCCESS_EVENT: 'successEvent',\n};\n\nexport const VERSION_TABLE = 'VERSION_TABLE';\nexport const VERSION_COLUMNS = {\n VERSION_NO: 'versionNo'\n};\n\n// NEW CODE\nexport interface BulkEvent {\n syncType: ExecEngineSyncType | DispatchSyncType;\n dispatchId: string;\n data: any;\n meta?: any; // updatedBy, code, status, timestamp, [{jobId,wfId}]\n}\n\n// OLD CODE\n// export interface BulkEvent {\n// syncType: SyncType;\n// dispatchId: string;\n// data: string;\n// config: string;\n// sequence: number;\n// meta?: any;\n// }\n\nexport interface WFUpdateBulkEventData {\n [customETName: string]: EventETData;\n}\n\nexport interface EventETData {\n output: any;\n}\n\nexport interface WIUpdateOutputPayload {\n dispatchId: string;\n updatedBy: any;\n workflows: Array<WorkflowUpdatePayload>;\n}\n\nexport interface WorkflowUpdatePayload {\n status: string;\n timestamp: number;\n attemptId: 1;\n code: string;\n data: any;\n meta?: any;\n __unmerged?: Array<UnmergedData>;\n}\n\nexport interface UnmergedData {\n workflowInstanceId: string;\n jobId: string;\n data?: any;\n}\n\nexport interface CustodyData {\n dispatchId: string;\n jobId: string;\n custodyEntity: string;\n custodyLocationId: string;\n custodyEntityAmount: number;\n custodyEntityId: string;\n}\n\nexport const WORKFLOW_INSTANCE_TABLE = 'WF_INSTANCE_TABLE';\nexport const WORKFLOW_INSTANCE_COLUMNS = {\n WORKFLOW_INSTANCE_ID: 'WFIId',\n MERGED_WORKFLOW_INSTANCE_ID: 'MWFIId',\n JOB_ID: 'jobId',\n SCANNABLE_ID: 'scannableId',\n INITIAL_MERGED_WORKFLOW_INSTANCE_ID: 'InitialMWFIId',\n STATUS: 'status',\n JOB_WF_ID: 'jobWfId',\n DISPLAY_DATA: 'displayData',\n WORKFLOW_ID: 'WFId',\n};\n\nexport interface SyncManagerPayload {\n data: {\n action: ExecEngineSyncType | DispatchSyncType;\n payload: any;\n };\n length: number;\n}\n"],"mappings":"AAGA,WAAYA,gBAAgB,0BAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAA,OAAhBA,gBAAgB;AAAA;AAM5B,OAAO,MAAMC,aAAa,GAAG,gBAAgB;AAC7C,OAAO,MAAMC,YAAY,GAAG,cAAc;AAC1C,OAAO,MAAMC,aAAa,GAAG,eAAe;AAC5C,OAAO,MAAMC,iBAAiB,GAAG,mBAAmB;AAEpD,OAAO,MAAMC,cAAc,GAAG;EAC5BC,EAAE,EAAE,IAAI;EACRC,QAAQ,EAAE,YAAY;EACtBC,OAAO,EAAE,SAAS;EAClBC,MAAM,EAAE,QAAQ;EAChBC,MAAM,EAAE,QAAQ;EAChBC,SAAS,EAAE,WAAW;EACtBC,IAAI,EAAE,MAAM;EACZC,UAAU,EAAE,YAAY;EACxBC,WAAW,EAAE,aAAa;EAC1BC,WAAW,EAAE,aAAa;EAC1BC,aAAa,EAAE;AACjB,CAAC;AAED,OAAO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