@os1-platform/dispatch-mobile 1.0.8 → 2.0.0
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 +310 -74
- package/android/.gradle/7.0.2/fileChanges/last-build.bin +0 -0
- package/android/.gradle/7.0.2/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.0.2/gc.properties +0 -0
- package/android/.gradle/7.2/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/android/.gradle/7.2/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/7.2/executionHistory/executionHistory.bin +0 -0
- package/android/.gradle/7.2/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/7.2/fileChanges/last-build.bin +0 -0
- package/android/.gradle/7.2/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/7.2/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.2/fileHashes/resourceHashesCache.bin +0 -0
- package/android/.gradle/7.2/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
- package/android/.gradle/checksums/checksums.lock +0 -0
- package/android/.gradle/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/.idea/compiler.xml +6 -0
- package/android/.idea/gradle.xml +18 -0
- package/android/.idea/jarRepositories.xml +35 -0
- package/android/.idea/kotlinc.xml +6 -0
- package/android/.idea/misc.xml +9 -0
- package/android/.idea/vcs.xml +6 -0
- package/android/gradle.properties +1 -1
- package/android/local.properties +8 -0
- package/android/src/main/AndroidManifest.xml +0 -1
- package/android/src/main/java/com/dispatchsdk/DispatchSdkPackage.kt +3 -1
- package/android/src/main/java/com/dispatchsdk/sharedPref/SharedPreferenceModule.kt +166 -0
- package/lib/commonjs/@types/assets/index.d.js +2 -0
- package/lib/commonjs/@types/assets/index.d.js.map +1 -0
- package/lib/commonjs/components/dispatch/DispatchExecNavigator.js +50 -43
- package/lib/commonjs/components/dispatch/DispatchExecNavigator.js.map +1 -1
- package/lib/commonjs/components/executiontasks/ExecutionTasksIndex.js +10 -48
- package/lib/commonjs/components/executiontasks/ExecutionTasksIndex.js.map +1 -1
- package/lib/commonjs/components/executiontasks/cancellation/CancelET.js +142 -23
- package/lib/commonjs/components/executiontasks/cancellation/CancelET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/cancellation/CancellationSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js +66 -18
- package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js.map +1 -1
- package/lib/commonjs/components/executiontasks/captureInput/utils.js +13 -0
- package/lib/commonjs/components/executiontasks/captureInput/utils.js.map +1 -0
- package/lib/commonjs/components/executiontasks/deliver/DeliverET.js +6 -16
- package/lib/commonjs/components/executiontasks/deliver/DeliverET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/deliver/DeliverETInput.js.map +1 -1
- package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js +212 -95
- package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/display/DisplayModalET.js +16 -25
- package/lib/commonjs/components/executiontasks/display/DisplayModalET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/doodle/SignatureET.js +65 -29
- package/lib/commonjs/components/executiontasks/doodle/SignatureET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js +5 -19
- package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js +74 -30
- package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/FormGenerator.js +139 -50
- package/lib/commonjs/components/executiontasks/forms/FormGenerator.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js +3 -26
- package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/DropdownWidget.js +49 -0
- package/lib/commonjs/components/executiontasks/forms/widgets/DropdownWidget.js.map +1 -0
- package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +2 -17
- package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/TimeRangeSelector.js +0 -10
- package/lib/commonjs/components/executiontasks/forms/widgets/TimeRangeSelector.js.map +1 -1
- package/lib/commonjs/components/executiontasks/httpRequest/HttpEtUtils.js +5 -14
- package/lib/commonjs/components/executiontasks/httpRequest/HttpEtUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js +3 -15
- package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js +11 -36
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js +73 -48
- package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/PaymentStyles.js +0 -4
- package/lib/commonjs/components/executiontasks/payments/PaymentStyles.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/PaymentUtils.js +0 -2
- package/lib/commonjs/components/executiontasks/payments/PaymentUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js +76 -29
- package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js +63 -24
- package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js +71 -22
- package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/pickup/PickupET.js +5 -15
- package/lib/commonjs/components/executiontasks/pickup/PickupET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js +138 -32
- package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/ScanET.js +741 -0
- package/lib/commonjs/components/executiontasks/scan/ScanET.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/ScanSchema.js +19 -0
- package/lib/commonjs/components/executiontasks/scan/ScanSchema.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/constants.js +19 -0
- package/lib/commonjs/components/executiontasks/scan/constants.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/interfaces.js +43 -0
- package/lib/commonjs/components/executiontasks/scan/interfaces.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/modalConstant.js +104 -0
- package/lib/commonjs/components/executiontasks/scan/modalConstant.js.map +1 -0
- package/lib/commonjs/components/executiontasks/{scanner → scan/sub_components}/CScanner.js +9 -29
- package/lib/commonjs/components/executiontasks/scan/sub_components/CScanner.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/DropDownUtils.js +109 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/DropDownUtils.js.map +1 -0
- package/lib/commonjs/components/executiontasks/{scanner/returns/ReasonDropDown.js → scan/sub_components/ERDropDown.js} +72 -55
- package/lib/commonjs/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/SummaryPage.js +1099 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/SummaryPage.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/utils.js +762 -0
- package/lib/commonjs/components/executiontasks/scan/utils.js.map +1 -0
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js +333 -0
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -0
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPSchema.js +14 -0
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPSchema.js.map +1 -0
- package/lib/commonjs/components/executiontasks/validateOTP/constants.js +37 -0
- package/lib/commonjs/components/executiontasks/validateOTP/constants.js.map +1 -0
- package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js +63 -0
- package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -0
- package/lib/commonjs/components/executiontasks/validateOTP/utils.js +147 -0
- package/lib/commonjs/components/executiontasks/validateOTP/utils.js.map +1 -0
- package/lib/commonjs/components/executiontasks/verifyLocation/GeofenceUtils.js +0 -13
- package/lib/commonjs/components/executiontasks/verifyLocation/GeofenceUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js +4 -17
- package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js +3 -18
- package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpSchema.js.map +1 -1
- package/lib/commonjs/components/utils/index.js +14 -0
- package/lib/commonjs/components/utils/index.js.map +1 -0
- package/lib/commonjs/components/widgets/AlertDisplay.js +0 -5
- package/lib/commonjs/components/widgets/AlertDisplay.js.map +1 -1
- package/lib/commonjs/components/widgets/CancelOrderDialog.js +0 -12
- package/lib/commonjs/components/widgets/CancelOrderDialog.js.map +1 -1
- package/lib/commonjs/components/widgets/Card.js +88 -0
- package/lib/commonjs/components/widgets/Card.js.map +1 -0
- package/lib/commonjs/components/widgets/GoBackModal.js +48 -0
- package/lib/commonjs/components/widgets/GoBackModal.js.map +1 -0
- package/lib/commonjs/components/widgets/IconButton.js +34 -0
- package/lib/commonjs/components/widgets/IconButton.js.map +1 -0
- package/lib/commonjs/components/widgets/ModalWidget.js +99 -0
- package/lib/commonjs/components/widgets/ModalWidget.js.map +1 -0
- package/lib/commonjs/components/widgets/ProgressDialog.js +0 -7
- package/lib/commonjs/components/widgets/ProgressDialog.js.map +1 -1
- package/lib/commonjs/components/widgets/SearchBar.js +74 -0
- package/lib/commonjs/components/widgets/SearchBar.js.map +1 -0
- package/lib/commonjs/components/widgets/SnackBarCustom.js +48 -40
- package/lib/commonjs/components/widgets/SnackBarCustom.js.map +1 -1
- package/lib/commonjs/components/widgets/SplitTextInput.js +93 -0
- package/lib/commonjs/components/widgets/SplitTextInput.js.map +1 -0
- package/lib/commonjs/components/widgets/TabsComponent.js +64 -0
- package/lib/commonjs/components/widgets/TabsComponent.js.map +1 -0
- package/lib/commonjs/components/widgets/Toaster.js +0 -2
- package/lib/commonjs/components/widgets/Toaster.js.map +1 -1
- package/lib/commonjs/config/DispatchSDKConfig.js +4 -5
- package/lib/commonjs/config/DispatchSDKConfig.js.map +1 -1
- package/lib/commonjs/constants/apiConstants.js +17 -0
- package/lib/commonjs/constants/apiConstants.js.map +1 -0
- package/lib/commonjs/constants/constants.js +7 -3
- package/lib/commonjs/constants/constants.js.map +1 -1
- package/lib/commonjs/constants/statuscode.js +3 -5
- package/lib/commonjs/constants/statuscode.js.map +1 -1
- package/lib/commonjs/errors/BaseError.js +3 -8
- package/lib/commonjs/errors/BaseError.js.map +1 -1
- package/lib/commonjs/errors/ErrorCodes.js +7 -6
- package/lib/commonjs/errors/ErrorCodes.js.map +1 -1
- package/lib/commonjs/events/EventDispatcher.js +23 -0
- package/lib/commonjs/events/EventDispatcher.js.map +1 -0
- package/lib/commonjs/events/EventListener.js +20 -0
- package/lib/commonjs/events/EventListener.js.map +1 -0
- package/lib/commonjs/events/constants.js +15 -0
- package/lib/commonjs/events/constants.js.map +1 -0
- package/lib/commonjs/events/index.js +11 -0
- package/lib/commonjs/events/index.js.map +1 -0
- package/lib/commonjs/events/interface.js +2 -0
- package/lib/commonjs/events/interface.js.map +1 -0
- package/lib/commonjs/index.js +40 -35
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/manager/dispatch/DispatchStateContainer.js +328 -272
- package/lib/commonjs/manager/dispatch/DispatchStateContainer.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/EventCodeContainer.js +55 -4
- package/lib/commonjs/manager/dispatchCodes/EventCodeContainer.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/EventCodeRepo.js +70 -0
- package/lib/commonjs/manager/dispatchCodes/EventCodeRepo.js.map +1 -0
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeContainer.js +3 -29
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeRepo.js +6 -20
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -1
- package/lib/commonjs/manager/jobRemoval/JobRemovalManager.js +23 -0
- package/lib/commonjs/manager/jobRemoval/JobRemovalManager.js.map +1 -0
- package/lib/commonjs/manager/location/LocationManager.js +3 -20
- package/lib/commonjs/manager/location/LocationManager.js.map +1 -1
- package/lib/commonjs/manager/sdk/DispatchSDKManager.js +23 -37
- package/lib/commonjs/manager/sdk/DispatchSDKManager.js.map +1 -1
- package/lib/commonjs/manager/sdk/DispatchSdkCache.js +6 -17
- package/lib/commonjs/manager/sdk/DispatchSdkCache.js.map +1 -1
- package/lib/commonjs/manager/sdk/callbacksHandler.js +26 -0
- package/lib/commonjs/manager/sdk/callbacksHandler.js.map +1 -0
- package/lib/commonjs/manager/syncmanager/AppSyncManager.js +26 -46
- package/lib/commonjs/manager/syncmanager/AppSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/DBConfig.js +48 -9
- package/lib/commonjs/manager/syncmanager/DBConfig.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/NativeSyncManager.js +0 -2
- package/lib/commonjs/manager/syncmanager/NativeSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/constants.js +17 -0
- package/lib/commonjs/manager/syncmanager/constants.js.map +1 -0
- package/lib/commonjs/manager/syncmanager/database.js +28 -12
- package/lib/commonjs/manager/syncmanager/database.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js +11 -36
- package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentManager.js +8 -26
- package/lib/commonjs/manager/syncmanager/document/DocumentManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js +19 -58
- package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js +414 -29
- package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js +208 -103
- package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/SyncHttpClient.js +157 -36
- package/lib/commonjs/manager/syncmanager/events/SyncHttpClient.js.map +1 -1
- package/lib/commonjs/models/DispatchModels.js +4 -5
- package/lib/commonjs/models/DispatchModels.js.map +1 -1
- package/lib/commonjs/models/ReasonCodes.js.map +1 -1
- package/lib/commonjs/models/execTasks/ETBaseModels.js +4 -0
- package/lib/commonjs/models/execTasks/ETBaseModels.js.map +1 -1
- package/lib/commonjs/models/execTasks/ETConfig.js +28 -35
- package/lib/commonjs/models/execTasks/ETConfig.js.map +1 -1
- package/lib/commonjs/models/sdk.js +4 -5
- package/lib/commonjs/models/sdk.js.map +1 -1
- package/lib/commonjs/native/signature/SignatureCapture.js +3 -24
- package/lib/commonjs/native/signature/SignatureCapture.js.map +1 -1
- package/lib/commonjs/network/GraphQLClient.js +7 -35
- package/lib/commonjs/network/GraphQLClient.js.map +1 -1
- package/lib/commonjs/network/NetworkClient.js +2 -13
- package/lib/commonjs/network/NetworkClient.js.map +1 -1
- package/lib/commonjs/network/NetworkUtils.js +10 -8
- package/lib/commonjs/network/NetworkUtils.js.map +1 -1
- package/lib/commonjs/network/Queries.js +0 -2
- package/lib/commonjs/network/Queries.js.map +1 -1
- package/lib/commonjs/network/client.js +6 -21
- package/lib/commonjs/network/client.js.map +1 -1
- package/lib/commonjs/res/strings.js.map +1 -1
- package/lib/commonjs/resources/Login.js +4 -15
- package/lib/commonjs/resources/Login.js.map +1 -1
- package/lib/commonjs/resources/network.js +3 -8
- package/lib/commonjs/resources/network.js.map +1 -1
- package/lib/commonjs/styles/SdkColors.js +10 -8
- package/lib/commonjs/styles/SdkColors.js.map +1 -1
- package/lib/commonjs/styles/executionTasks/CommonStyles.js +58 -25
- package/lib/commonjs/styles/executionTasks/CommonStyles.js.map +1 -1
- package/lib/commonjs/ui/screens/CancellationScreen.js +67 -27
- package/lib/commonjs/ui/screens/CancellationScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CaptureInputScreen.js +15 -16
- package/lib/commonjs/ui/screens/CaptureInputScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js +11 -23
- package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DeliverScreen.js +30 -17
- package/lib/commonjs/ui/screens/DeliverScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DisplayScreen.js +17 -13
- package/lib/commonjs/ui/screens/DisplayScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DoodleScreen.js +17 -20
- package/lib/commonjs/ui/screens/DoodleScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DropCashScreen.js +43 -31
- package/lib/commonjs/ui/screens/DropCashScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ETScreensIndex.js +10 -19
- package/lib/commonjs/ui/screens/ETScreensIndex.js.map +1 -1
- package/lib/commonjs/ui/screens/FormsScreen.js +105 -17
- package/lib/commonjs/ui/screens/FormsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/GeofenceScreen.js +16 -14
- package/lib/commonjs/ui/screens/GeofenceScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HttpRequestScreen.js +14 -11
- package/lib/commonjs/ui/screens/HttpRequestScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ImageCaptureScreen.js +38 -17
- package/lib/commonjs/ui/screens/ImageCaptureScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentScreen.js +28 -29
- package/lib/commonjs/ui/screens/PaymentScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PickupScreen.js +41 -19
- package/lib/commonjs/ui/screens/PickupScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ScanScreen.js +121 -0
- package/lib/commonjs/ui/screens/ScanScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/StartWorkFlowScreen.js +64 -38
- package/lib/commonjs/ui/screens/StartWorkFlowScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ValidateOTPScreen.js +55 -0
- package/lib/commonjs/ui/screens/ValidateOTPScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/WithBaseDispatchScreen.js +0 -10
- package/lib/commonjs/ui/screens/WithBaseDispatchScreen.js.map +1 -1
- package/lib/commonjs/ui/uiConfig/RouteParams.js +24 -1
- package/lib/commonjs/ui/uiConfig/RouteParams.js.map +1 -1
- package/lib/commonjs/utils/ApiUtils.js +129 -0
- package/lib/commonjs/utils/ApiUtils.js.map +1 -0
- package/lib/commonjs/utils/ExecTaskUtils.js +111 -41
- package/lib/commonjs/utils/ExecTaskUtils.js.map +1 -1
- package/lib/commonjs/utils/Logger.js +10 -29
- package/lib/commonjs/utils/Logger.js.map +1 -1
- package/lib/commonjs/utils/NetworkUtil.js +3 -19
- package/lib/commonjs/utils/NetworkUtil.js.map +1 -1
- package/lib/commonjs/utils/SdkUtils.js +2 -31
- package/lib/commonjs/utils/SdkUtils.js.map +1 -1
- package/lib/commonjs/utils/SyncManagerUtils.js +61 -43
- package/lib/commonjs/utils/SyncManagerUtils.js.map +1 -1
- package/lib/commonjs/utils/fcm/FCM.js +59 -11
- package/lib/commonjs/utils/fcm/FCM.js.map +1 -1
- package/lib/commonjs/utils/fcm/FcmUtils.js +82 -21
- package/lib/commonjs/utils/fcm/FcmUtils.js.map +1 -1
- package/lib/commonjs/utils/helper.js +0 -5
- package/lib/commonjs/utils/helper.js.map +1 -1
- package/lib/commonjs/utils/hooks/useModal.js +53 -0
- package/lib/commonjs/utils/hooks/useModal.js.map +1 -0
- package/lib/commonjs/utils/hooks/useTimer.js +44 -0
- package/lib/commonjs/utils/hooks/useTimer.js.map +1 -0
- package/lib/commonjs/utils/loginHelper.js +6 -18
- package/lib/commonjs/utils/loginHelper.js.map +1 -1
- package/lib/commonjs/utils/storage.js +87 -31
- package/lib/commonjs/utils/storage.js.map +1 -1
- package/lib/commonjs/utils/utils.js +8 -11
- package/lib/commonjs/utils/utils.js.map +1 -1
- package/lib/module/@types/assets/index.d.js +2 -0
- package/lib/module/@types/assets/index.d.js.map +1 -0
- package/lib/module/components/dispatch/DispatchExecNavigator.js +50 -32
- package/lib/module/components/dispatch/DispatchExecNavigator.js.map +1 -1
- package/lib/module/components/executiontasks/ExecutionTasksIndex.js +3 -5
- package/lib/module/components/executiontasks/ExecutionTasksIndex.js.map +1 -1
- package/lib/module/components/executiontasks/cancellation/CancelET.js +145 -19
- package/lib/module/components/executiontasks/cancellation/CancelET.js.map +1 -1
- package/lib/module/components/executiontasks/cancellation/CancellationSchema.js.map +1 -1
- package/lib/module/components/executiontasks/captureInput/CaptureText.js +68 -10
- package/lib/module/components/executiontasks/captureInput/CaptureText.js.map +1 -1
- package/lib/module/components/executiontasks/captureInput/utils.js +7 -0
- package/lib/module/components/executiontasks/captureInput/utils.js.map +1 -0
- package/lib/module/components/executiontasks/deliver/DeliverET.js +6 -7
- package/lib/module/components/executiontasks/deliver/DeliverET.js.map +1 -1
- package/lib/module/components/executiontasks/deliver/DeliverETInput.js.map +1 -1
- package/lib/module/components/executiontasks/deliver/SLDeliverET.js +214 -86
- package/lib/module/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
- package/lib/module/components/executiontasks/display/DisplayModalET.js +16 -15
- package/lib/module/components/executiontasks/display/DisplayModalET.js.map +1 -1
- package/lib/module/components/executiontasks/doodle/SignatureET.js +68 -15
- package/lib/module/components/executiontasks/doodle/SignatureET.js.map +1 -1
- package/lib/module/components/executiontasks/dropCash/DropCashET.js +5 -6
- package/lib/module/components/executiontasks/dropCash/DropCashET.js.map +1 -1
- package/lib/module/components/executiontasks/dropCash/SLDropCash.js +75 -20
- package/lib/module/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
- package/lib/module/components/executiontasks/forms/FormGenerator.js +142 -37
- package/lib/module/components/executiontasks/forms/FormGenerator.js.map +1 -1
- package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js +3 -15
- package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
- package/lib/module/components/executiontasks/forms/widgets/DropdownWidget.js +39 -0
- package/lib/module/components/executiontasks/forms/widgets/DropdownWidget.js.map +1 -0
- package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +2 -6
- package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
- package/lib/module/components/executiontasks/forms/widgets/TimeRangeSelector.js +0 -3
- package/lib/module/components/executiontasks/forms/widgets/TimeRangeSelector.js.map +1 -1
- package/lib/module/components/executiontasks/httpRequest/HttpEtUtils.js +6 -4
- package/lib/module/components/executiontasks/httpRequest/HttpEtUtils.js.map +1 -1
- package/lib/module/components/executiontasks/httpRequest/HttpRequestET.js +3 -6
- package/lib/module/components/executiontasks/httpRequest/HttpRequestET.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/CaptureSchema.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js +11 -11
- package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/ImageCapture.js +75 -35
- package/lib/module/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
- package/lib/module/components/executiontasks/payments/PaymentStyles.js.map +1 -1
- package/lib/module/components/executiontasks/payments/PaymentUtils.js.map +1 -1
- package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js +77 -18
- package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/payments/init/InitPaymentET.js +64 -11
- package/lib/module/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js +72 -11
- package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/pickup/PickupET.js +5 -6
- package/lib/module/components/executiontasks/pickup/PickupET.js.map +1 -1
- package/lib/module/components/executiontasks/pickup/SLPickupET.js +141 -25
- package/lib/module/components/executiontasks/pickup/SLPickupET.js.map +1 -1
- package/lib/module/components/executiontasks/scan/ScanET.js +732 -0
- package/lib/module/components/executiontasks/scan/ScanET.js.map +1 -0
- package/lib/module/components/executiontasks/scan/ScanSchema.js +17 -0
- package/lib/module/components/executiontasks/scan/ScanSchema.js.map +1 -0
- package/lib/module/components/executiontasks/scan/constants.js +7 -0
- package/lib/module/components/executiontasks/scan/constants.js.map +1 -0
- package/lib/module/components/executiontasks/scan/interfaces.js +33 -0
- package/lib/module/components/executiontasks/scan/interfaces.js.map +1 -0
- package/lib/module/components/executiontasks/scan/modalConstant.js +94 -0
- package/lib/module/components/executiontasks/scan/modalConstant.js.map +1 -0
- package/lib/module/components/executiontasks/{scanner → scan/sub_components}/CScanner.js +9 -16
- package/lib/module/components/executiontasks/scan/sub_components/CScanner.js.map +1 -0
- package/lib/module/components/executiontasks/scan/sub_components/DropDownUtils.js +101 -0
- package/lib/module/components/executiontasks/scan/sub_components/DropDownUtils.js.map +1 -0
- package/lib/module/components/executiontasks/scan/sub_components/ERDropDown.js +107 -0
- package/lib/module/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -0
- package/lib/module/components/executiontasks/scan/sub_components/SummaryPage.js +1092 -0
- package/lib/module/components/executiontasks/scan/sub_components/SummaryPage.js.map +1 -0
- package/lib/module/components/executiontasks/scan/utils.js +726 -0
- package/lib/module/components/executiontasks/scan/utils.js.map +1 -0
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js +324 -0
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -0
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPSchema.js +8 -0
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPSchema.js.map +1 -0
- package/lib/module/components/executiontasks/validateOTP/constants.js +25 -0
- package/lib/module/components/executiontasks/validateOTP/constants.js.map +1 -0
- package/lib/module/components/executiontasks/validateOTP/sub-components/OTPInput.js +53 -0
- package/lib/module/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -0
- package/lib/module/components/executiontasks/validateOTP/utils.js +133 -0
- package/lib/module/components/executiontasks/validateOTP/utils.js.map +1 -0
- package/lib/module/components/executiontasks/verifyLocation/GeofenceUtils.js +0 -6
- package/lib/module/components/executiontasks/verifyLocation/GeofenceUtils.js.map +1 -1
- package/lib/module/components/executiontasks/verifyLocation/VerifyLocationET.js +4 -3
- package/lib/module/components/executiontasks/verifyLocation/VerifyLocationET.js.map +1 -1
- package/lib/module/components/executiontasks/verifyOtp/VerifyOtpET.js +5 -9
- package/lib/module/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
- package/lib/module/components/executiontasks/verifyOtp/VerifyOtpSchema.js.map +1 -1
- package/lib/module/components/utils/index.js +8 -0
- package/lib/module/components/utils/index.js.map +1 -0
- package/lib/module/components/widgets/AlertDisplay.js.map +1 -1
- package/lib/module/components/widgets/CancelOrderDialog.js +0 -2
- package/lib/module/components/widgets/CancelOrderDialog.js.map +1 -1
- package/lib/module/components/widgets/Card.js +80 -0
- package/lib/module/components/widgets/Card.js.map +1 -0
- package/lib/module/components/widgets/GoBackModal.js +40 -0
- package/lib/module/components/widgets/GoBackModal.js.map +1 -0
- package/lib/module/components/widgets/IconButton.js +26 -0
- package/lib/module/components/widgets/IconButton.js.map +1 -0
- package/lib/module/components/widgets/ModalWidget.js +92 -0
- package/lib/module/components/widgets/ModalWidget.js.map +1 -0
- package/lib/module/components/widgets/ProgressDialog.js +0 -2
- package/lib/module/components/widgets/ProgressDialog.js.map +1 -1
- package/lib/module/components/widgets/SearchBar.js +66 -0
- package/lib/module/components/widgets/SearchBar.js.map +1 -0
- package/lib/module/components/widgets/SnackBarCustom.js +46 -20
- package/lib/module/components/widgets/SnackBarCustom.js.map +1 -1
- package/lib/module/components/widgets/SplitTextInput.js +84 -0
- package/lib/module/components/widgets/SplitTextInput.js.map +1 -0
- package/lib/module/components/widgets/TabsComponent.js +55 -0
- package/lib/module/components/widgets/TabsComponent.js.map +1 -0
- package/lib/module/components/widgets/Toaster.js.map +1 -1
- package/lib/module/config/DispatchSDKConfig.js +3 -4
- package/lib/module/config/DispatchSDKConfig.js.map +1 -1
- package/lib/module/constants/apiConstants.js +9 -0
- package/lib/module/constants/apiConstants.js.map +1 -0
- package/lib/module/constants/constants.js +4 -2
- package/lib/module/constants/constants.js.map +1 -1
- package/lib/module/constants/statuscode.js +3 -5
- package/lib/module/constants/statuscode.js.map +1 -1
- package/lib/module/errors/BaseError.js +3 -6
- package/lib/module/errors/BaseError.js.map +1 -1
- package/lib/module/errors/ErrorCodes.js +5 -5
- package/lib/module/errors/ErrorCodes.js.map +1 -1
- package/lib/module/events/EventDispatcher.js +16 -0
- package/lib/module/events/EventDispatcher.js.map +1 -0
- package/lib/module/events/EventListener.js +13 -0
- package/lib/module/events/EventListener.js.map +1 -0
- package/lib/module/events/constants.js +8 -0
- package/lib/module/events/constants.js.map +1 -0
- package/lib/module/events/index.js +3 -0
- package/lib/module/events/index.js.map +1 -0
- package/lib/module/events/interface.js +2 -0
- package/lib/module/events/interface.js.map +1 -0
- package/lib/module/index.js +9 -5
- package/lib/module/index.js.map +1 -1
- package/lib/module/manager/dispatch/DispatchStateContainer.js +334 -247
- package/lib/module/manager/dispatch/DispatchStateContainer.js.map +1 -1
- package/lib/module/manager/dispatchCodes/EventCodeContainer.js +52 -2
- package/lib/module/manager/dispatchCodes/EventCodeContainer.js.map +1 -1
- package/lib/module/manager/dispatchCodes/EventCodeRepo.js +61 -0
- package/lib/module/manager/dispatchCodes/EventCodeRepo.js.map +1 -0
- package/lib/module/manager/dispatchCodes/ReasonCodeContainer.js +3 -16
- package/lib/module/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -1
- package/lib/module/manager/dispatchCodes/ReasonCodeRepo.js +6 -14
- package/lib/module/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -1
- package/lib/module/manager/jobRemoval/JobRemovalManager.js +22 -0
- package/lib/module/manager/jobRemoval/JobRemovalManager.js.map +1 -0
- package/lib/module/manager/location/LocationManager.js +3 -14
- package/lib/module/manager/location/LocationManager.js.map +1 -1
- package/lib/module/manager/sdk/DispatchSDKManager.js +23 -15
- package/lib/module/manager/sdk/DispatchSDKManager.js.map +1 -1
- package/lib/module/manager/sdk/DispatchSdkCache.js +6 -13
- package/lib/module/manager/sdk/DispatchSdkCache.js.map +1 -1
- package/lib/module/manager/sdk/callbacksHandler.js +19 -0
- package/lib/module/manager/sdk/callbacksHandler.js.map +1 -0
- package/lib/module/manager/syncmanager/AppSyncManager.js +26 -26
- package/lib/module/manager/syncmanager/AppSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/DBConfig.js +41 -7
- package/lib/module/manager/syncmanager/DBConfig.js.map +1 -1
- package/lib/module/manager/syncmanager/NativeSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/constants.js +6 -0
- package/lib/module/manager/syncmanager/constants.js.map +1 -0
- package/lib/module/manager/syncmanager/database.js +27 -3
- package/lib/module/manager/syncmanager/database.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentHttpClient.js +11 -24
- package/lib/module/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentManager.js +8 -20
- package/lib/module/manager/syncmanager/document/DocumentManager.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentSyncManager.js +19 -41
- package/lib/module/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/ETEventsManager.js +415 -22
- package/lib/module/manager/syncmanager/events/ETEventsManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/EventsSyncManager.js +209 -82
- package/lib/module/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/SyncHttpClient.js +152 -24
- package/lib/module/manager/syncmanager/events/SyncHttpClient.js.map +1 -1
- package/lib/module/models/DispatchModels.js +3 -4
- package/lib/module/models/DispatchModels.js.map +1 -1
- package/lib/module/models/ReasonCodes.js.map +1 -1
- package/lib/module/models/execTasks/ETBaseModels.js +1 -1
- package/lib/module/models/execTasks/ETBaseModels.js.map +1 -1
- package/lib/module/models/execTasks/ETConfig.js +22 -29
- package/lib/module/models/execTasks/ETConfig.js.map +1 -1
- package/lib/module/models/sdk.js +3 -4
- package/lib/module/models/sdk.js.map +1 -1
- package/lib/module/native/signature/SignatureCapture.js +3 -18
- package/lib/module/native/signature/SignatureCapture.js.map +1 -1
- package/lib/module/network/GraphQLClient.js +6 -26
- package/lib/module/network/GraphQLClient.js.map +1 -1
- package/lib/module/network/NetworkClient.js +2 -6
- package/lib/module/network/NetworkClient.js.map +1 -1
- package/lib/module/network/NetworkUtils.js +10 -3
- package/lib/module/network/NetworkUtils.js.map +1 -1
- package/lib/module/network/Queries.js.map +1 -1
- package/lib/module/network/client.js +7 -17
- package/lib/module/network/client.js.map +1 -1
- package/lib/module/res/strings.js.map +1 -1
- package/lib/module/resources/Login.js +4 -13
- package/lib/module/resources/Login.js.map +1 -1
- package/lib/module/resources/network.js +3 -6
- package/lib/module/resources/network.js.map +1 -1
- package/lib/module/styles/SdkColors.js +9 -7
- package/lib/module/styles/SdkColors.js.map +1 -1
- package/lib/module/styles/executionTasks/CommonStyles.js +57 -14
- package/lib/module/styles/executionTasks/CommonStyles.js.map +1 -1
- package/lib/module/ui/screens/CancellationScreen.js +68 -15
- package/lib/module/ui/screens/CancellationScreen.js.map +1 -1
- package/lib/module/ui/screens/CaptureInputScreen.js +17 -6
- package/lib/module/ui/screens/CaptureInputScreen.js.map +1 -1
- package/lib/module/ui/screens/CompleteObjectiveScreen.js +12 -8
- package/lib/module/ui/screens/CompleteObjectiveScreen.js.map +1 -1
- package/lib/module/ui/screens/DeliverScreen.js +32 -7
- package/lib/module/ui/screens/DeliverScreen.js.map +1 -1
- package/lib/module/ui/screens/DisplayScreen.js +16 -6
- package/lib/module/ui/screens/DisplayScreen.js.map +1 -1
- package/lib/module/ui/screens/DoodleScreen.js +19 -9
- package/lib/module/ui/screens/DoodleScreen.js.map +1 -1
- package/lib/module/ui/screens/DropCashScreen.js +45 -19
- package/lib/module/ui/screens/DropCashScreen.js.map +1 -1
- package/lib/module/ui/screens/ETScreensIndex.js +3 -2
- package/lib/module/ui/screens/ETScreensIndex.js.map +1 -1
- package/lib/module/ui/screens/FormsScreen.js +104 -9
- package/lib/module/ui/screens/FormsScreen.js.map +1 -1
- package/lib/module/ui/screens/GeofenceScreen.js +15 -6
- package/lib/module/ui/screens/GeofenceScreen.js.map +1 -1
- package/lib/module/ui/screens/HttpRequestScreen.js +15 -5
- package/lib/module/ui/screens/HttpRequestScreen.js.map +1 -1
- package/lib/module/ui/screens/ImageCaptureScreen.js +37 -9
- package/lib/module/ui/screens/ImageCaptureScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentScreen.js +30 -17
- package/lib/module/ui/screens/PaymentScreen.js.map +1 -1
- package/lib/module/ui/screens/PickupScreen.js +40 -12
- package/lib/module/ui/screens/PickupScreen.js.map +1 -1
- package/lib/module/ui/screens/ScanScreen.js +111 -0
- package/lib/module/ui/screens/ScanScreen.js.map +1 -0
- package/lib/module/ui/screens/StartWorkFlowScreen.js +64 -16
- package/lib/module/ui/screens/StartWorkFlowScreen.js.map +1 -1
- package/lib/module/ui/screens/ValidateOTPScreen.js +45 -0
- package/lib/module/ui/screens/ValidateOTPScreen.js.map +1 -0
- package/lib/module/ui/screens/WithBaseDispatchScreen.js +0 -3
- package/lib/module/ui/screens/WithBaseDispatchScreen.js.map +1 -1
- package/lib/module/ui/uiConfig/RouteParams.js +23 -1
- package/lib/module/ui/uiConfig/RouteParams.js.map +1 -1
- package/lib/module/utils/ApiUtils.js +116 -0
- package/lib/module/utils/ApiUtils.js.map +1 -0
- package/lib/module/utils/ExecTaskUtils.js +110 -31
- package/lib/module/utils/ExecTaskUtils.js.map +1 -1
- package/lib/module/utils/Logger.js +9 -21
- package/lib/module/utils/Logger.js.map +1 -1
- package/lib/module/utils/NetworkUtil.js +3 -15
- package/lib/module/utils/NetworkUtil.js.map +1 -1
- package/lib/module/utils/SdkUtils.js +2 -15
- package/lib/module/utils/SdkUtils.js.map +1 -1
- package/lib/module/utils/SyncManagerUtils.js +62 -14
- package/lib/module/utils/SyncManagerUtils.js.map +1 -1
- package/lib/module/utils/fcm/FCM.js +63 -3
- package/lib/module/utils/fcm/FCM.js.map +1 -1
- package/lib/module/utils/fcm/FcmUtils.js +86 -7
- package/lib/module/utils/fcm/FcmUtils.js.map +1 -1
- package/lib/module/utils/helper.js +0 -3
- package/lib/module/utils/helper.js.map +1 -1
- package/lib/module/utils/hooks/useModal.js +43 -0
- package/lib/module/utils/hooks/useModal.js.map +1 -0
- package/lib/module/utils/hooks/useTimer.js +37 -0
- package/lib/module/utils/hooks/useTimer.js.map +1 -0
- package/lib/module/utils/loginHelper.js +6 -16
- package/lib/module/utils/loginHelper.js.map +1 -1
- package/lib/module/utils/storage.js +86 -29
- package/lib/module/utils/storage.js.map +1 -1
- package/lib/module/utils/utils.js +8 -6
- package/lib/module/utils/utils.js.map +1 -1
- package/lib/typescript/components/dispatch/DispatchExecNavigator.d.ts +2 -2
- package/lib/typescript/components/executiontasks/CompletedWFSchema.d.ts +2 -2
- package/lib/typescript/components/executiontasks/ExecutionTasksIndex.d.ts +6 -7
- package/lib/typescript/components/executiontasks/cancellation/CancelET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/cancellation/CancellationSchema.d.ts +10 -5
- package/lib/typescript/components/executiontasks/captureInput/CaptureInputSchema.d.ts +7 -7
- package/lib/typescript/components/executiontasks/captureInput/CaptureText.d.ts +2 -2
- package/lib/typescript/components/executiontasks/captureInput/utils.d.ts +1 -0
- package/lib/typescript/components/executiontasks/deliver/DeliverET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/deliver/DeliverETInput.d.ts +8 -7
- package/lib/typescript/components/executiontasks/deliver/SLDeliverET.d.ts +3 -3
- package/lib/typescript/components/executiontasks/display/DisplayModalET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/display/DisplaySchema.d.ts +5 -5
- package/lib/typescript/components/executiontasks/doodle/SignatureET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/doodle/SignatureSchema.d.ts +7 -7
- package/lib/typescript/components/executiontasks/dropCash/DropCashET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/dropCash/DropCashSchema.d.ts +2 -2
- package/lib/typescript/components/executiontasks/dropCash/SLDropCash.d.ts +2 -2
- package/lib/typescript/components/executiontasks/forms/FormGenerator.d.ts +2 -2
- package/lib/typescript/components/executiontasks/forms/FormSchema.d.ts +2 -2
- package/lib/typescript/components/executiontasks/forms/widgets/DateTimeWidget.d.ts +3 -3
- package/lib/typescript/components/executiontasks/forms/widgets/DropdownWidget.d.ts +9 -0
- package/lib/typescript/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.d.ts +2 -2
- package/lib/typescript/components/executiontasks/forms/widgets/TimeRangeSelector.d.ts +2 -2
- package/lib/typescript/components/executiontasks/httpRequest/HttpEtUtils.d.ts +1 -1
- package/lib/typescript/components/executiontasks/httpRequest/HttpRequestET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/httpRequest/HttpRequestETSchema.d.ts +6 -6
- package/lib/typescript/components/executiontasks/imageCapture/CaptureSchema.d.ts +17 -11
- package/lib/typescript/components/executiontasks/imageCapture/ImageCapture.d.ts +2 -2
- package/lib/typescript/components/executiontasks/payments/completePayment/CompletePaymentET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/payments/completePayment/CompletePaymentSchema.d.ts +2 -2
- package/lib/typescript/components/executiontasks/payments/init/InitPaymentET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/payments/init/InitPaymentSchema.d.ts +3 -3
- package/lib/typescript/components/executiontasks/payments/processPayment/ProcessPaymentET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/payments/processPayment/ProcessPaymentSchema.d.ts +2 -2
- package/lib/typescript/components/executiontasks/pickup/PickpSchema.d.ts +3 -3
- package/lib/typescript/components/executiontasks/pickup/PickupET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/pickup/SLPickupET.d.ts +3 -3
- package/lib/typescript/components/executiontasks/scan/ScanET.d.ts +16 -0
- package/lib/typescript/components/executiontasks/scan/ScanSchema.d.ts +86 -0
- package/lib/typescript/components/executiontasks/scan/constants.d.ts +6 -0
- package/lib/typescript/components/executiontasks/scan/interfaces.d.ts +94 -0
- package/lib/typescript/components/executiontasks/scan/modalConstant.d.ts +37 -0
- package/lib/typescript/components/executiontasks/{scanner → scan/sub_components}/CScanner.d.ts +1 -1
- package/lib/typescript/components/executiontasks/scan/sub_components/DropDownUtils.d.ts +7 -0
- package/lib/typescript/components/executiontasks/scan/sub_components/ERDropDown.d.ts +17 -0
- package/lib/typescript/components/executiontasks/scan/sub_components/SummaryPage.d.ts +21 -0
- package/lib/typescript/components/executiontasks/scan/utils.d.ts +37 -0
- package/lib/typescript/components/executiontasks/validateOTP/ValidateOTPET.d.ts +4 -0
- package/lib/typescript/components/executiontasks/validateOTP/ValidateOTPSchema.d.ts +54 -0
- package/lib/typescript/components/executiontasks/validateOTP/constants.d.ts +10 -0
- package/lib/typescript/components/executiontasks/validateOTP/sub-components/OTPInput.d.ts +12 -0
- package/lib/typescript/components/executiontasks/validateOTP/utils.d.ts +7 -0
- package/lib/typescript/components/executiontasks/verifyInput/VerifyInputSchema.d.ts +8 -8
- package/lib/typescript/components/executiontasks/verifyLocation/VerifyLocSchema.d.ts +9 -9
- package/lib/typescript/components/executiontasks/verifyLocation/VerifyLocationET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/verifyOtp/VerifyOtpET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/verifyOtp/VerifyOtpSchema.d.ts +6 -6
- package/lib/typescript/components/utils/index.d.ts +2 -0
- package/lib/typescript/components/widgets/CancelOrderDialog.d.ts +2 -2
- package/lib/typescript/components/widgets/Card.d.ts +17 -0
- package/lib/typescript/components/widgets/GoBackModal.d.ts +9 -0
- package/lib/typescript/components/widgets/IconButton.d.ts +9 -0
- package/lib/typescript/components/widgets/ModalWidget.d.ts +30 -0
- package/lib/typescript/components/widgets/ProgressDialog.d.ts +2 -2
- package/lib/typescript/components/widgets/SearchBar.d.ts +10 -0
- package/lib/typescript/components/widgets/SnackBarCustom.d.ts +10 -5
- package/lib/typescript/components/widgets/SplitTextInput.d.ts +12 -0
- package/lib/typescript/components/widgets/TabsComponent.d.ts +15 -0
- package/lib/typescript/constants/apiConstants.d.ts +7 -0
- package/lib/typescript/constants/constants.d.ts +4 -2
- package/lib/typescript/errors/ErrorCodes.d.ts +3 -1
- package/lib/typescript/events/EventDispatcher.d.ts +3 -0
- package/lib/typescript/events/EventListener.d.ts +5 -0
- package/lib/typescript/events/constants.d.ts +7 -0
- package/lib/typescript/events/index.d.ts +2 -0
- package/lib/typescript/events/interface.d.ts +1 -0
- package/lib/typescript/index.d.ts +12 -9
- package/lib/typescript/manager/dispatch/DispatchStateContainer.d.ts +38 -17
- package/lib/typescript/manager/dispatchCodes/EventCodeContainer.d.ts +12 -1
- package/lib/typescript/manager/dispatchCodes/EventCodeRepo.d.ts +13 -0
- package/lib/typescript/manager/jobRemoval/JobRemovalManager.d.ts +0 -0
- package/lib/typescript/manager/sdk/DispatchSdkCache.d.ts +1 -0
- package/lib/typescript/manager/sdk/callbacksHandler.d.ts +13 -0
- package/lib/typescript/manager/syncmanager/AppSyncManager.d.ts +3 -1
- package/lib/typescript/manager/syncmanager/DBConfig.d.ts +80 -4
- package/lib/typescript/manager/syncmanager/constants.d.ts +5 -0
- package/lib/typescript/manager/syncmanager/database.d.ts +5 -0
- package/lib/typescript/manager/syncmanager/document/DocumentManager.d.ts +1 -1
- package/lib/typescript/manager/syncmanager/document/DocumentSyncManager.d.ts +1 -1
- package/lib/typescript/manager/syncmanager/document/models.d.ts +1 -1
- package/lib/typescript/manager/syncmanager/events/ETEventsManager.d.ts +15 -2
- package/lib/typescript/manager/syncmanager/events/EventsSyncManager.d.ts +4 -2
- package/lib/typescript/manager/syncmanager/events/SyncHttpClient.d.ts +6 -3
- package/lib/typescript/models/DispatchModels.d.ts +59 -5
- package/lib/typescript/models/ReasonCodes.d.ts +5 -0
- package/lib/typescript/models/auth.d.ts +1 -1
- package/lib/typescript/models/execTasks/ETBaseModels.d.ts +44 -20
- package/lib/typescript/models/execTasks/ETConfig.d.ts +8 -4
- package/lib/typescript/models/sdk.d.ts +12 -0
- package/lib/typescript/native/signature/SignatureCapture.d.ts +2 -2
- package/lib/typescript/network/NetworkUtils.d.ts +1 -5
- package/lib/typescript/styles/SdkColors.d.ts +2 -0
- package/lib/typescript/styles/executionTasks/CommonStyles.d.ts +50 -5
- package/lib/typescript/ui/screens/CancellationScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/CaptureInputScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/CompleteObjectiveScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/DeliverScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/DisplayScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/DoodleScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/DropCashScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/ETScreensIndex.d.ts +3 -2
- package/lib/typescript/ui/screens/FormsScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/GeofenceScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/HttpRequestScreen.d.ts +1 -1
- package/lib/typescript/ui/screens/ImageCaptureScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/PaymentScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/PickupScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/ScanScreen.d.ts +3 -0
- package/lib/typescript/ui/screens/StartWorkFlowScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/ValidateOTPScreen.d.ts +3 -0
- package/lib/typescript/ui/screens/WithBaseDispatchScreen.d.ts +2 -2
- package/lib/typescript/ui/uiConfig/RouteParams.d.ts +14 -0
- package/lib/typescript/utils/ApiUtils.d.ts +61 -0
- package/lib/typescript/utils/ExecTaskUtils.d.ts +10 -4
- package/lib/typescript/utils/NetworkUtil.d.ts +1 -1
- package/lib/typescript/utils/SyncManagerUtils.d.ts +4 -3
- package/lib/typescript/utils/hooks/useModal.d.ts +6 -0
- package/lib/typescript/utils/hooks/useTimer.d.ts +5 -0
- package/lib/typescript/utils/storage.d.ts +32 -0
- package/package.json +26 -26
- package/tsconfig.json +9 -9
- package/file_unzip.js +0 -5
- package/lib/commonjs/components/executiontasks/doodle/DoodleUtils.js +0 -28
- package/lib/commonjs/components/executiontasks/doodle/DoodleUtils.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/CScanner.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/ScannerSchema.js +0 -32
- package/lib/commonjs/components/executiontasks/scanner/ScannerSchema.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/ScannerUtils.js +0 -193
- package/lib/commonjs/components/executiontasks/scanner/ScannerUtils.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownSelector.js +0 -20
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownSelector.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownUtils.js +0 -49
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownUtils.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/RTReasonSelection.js +0 -107
- package/lib/commonjs/components/executiontasks/scanner/returns/RTReasonSelection.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/RTScan.js +0 -317
- package/lib/commonjs/components/executiontasks/scanner/returns/RTScan.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/ReasonDropDown.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/ScanList.js +0 -276
- package/lib/commonjs/components/executiontasks/scanner/returns/ScanList.js.map +0 -1
- package/lib/commonjs/ui/screens/RTScanScreen.js +0 -118
- package/lib/commonjs/ui/screens/RTScanScreen.js.map +0 -1
- package/lib/module/components/executiontasks/doodle/DoodleUtils.js +0 -19
- package/lib/module/components/executiontasks/doodle/DoodleUtils.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/CScanner.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/ScannerSchema.js +0 -24
- package/lib/module/components/executiontasks/scanner/ScannerSchema.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/ScannerUtils.js +0 -158
- package/lib/module/components/executiontasks/scanner/ScannerUtils.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/returns/DropDownSelector.js +0 -9
- package/lib/module/components/executiontasks/scanner/returns/DropDownSelector.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/returns/DropDownUtils.js +0 -38
- package/lib/module/components/executiontasks/scanner/returns/DropDownUtils.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/returns/RTReasonSelection.js +0 -86
- package/lib/module/components/executiontasks/scanner/returns/RTReasonSelection.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/returns/RTScan.js +0 -287
- package/lib/module/components/executiontasks/scanner/returns/RTScan.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/returns/ReasonDropDown.js +0 -80
- package/lib/module/components/executiontasks/scanner/returns/ReasonDropDown.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/returns/ScanList.js +0 -253
- package/lib/module/components/executiontasks/scanner/returns/ScanList.js.map +0 -1
- package/lib/module/ui/screens/RTScanScreen.js +0 -93
- package/lib/module/ui/screens/RTScanScreen.js.map +0 -1
- package/lib/typescript/components/executiontasks/doodle/DoodleUtils.d.ts +0 -3
- package/lib/typescript/components/executiontasks/scanner/ScannerSchema.d.ts +0 -75
- package/lib/typescript/components/executiontasks/scanner/ScannerUtils.d.ts +0 -15
- package/lib/typescript/components/executiontasks/scanner/returns/DropDownSelector.d.ts +0 -3
- package/lib/typescript/components/executiontasks/scanner/returns/DropDownUtils.d.ts +0 -3
- package/lib/typescript/components/executiontasks/scanner/returns/RTReasonSelection.d.ts +0 -7
- package/lib/typescript/components/executiontasks/scanner/returns/RTScan.d.ts +0 -4
- package/lib/typescript/components/executiontasks/scanner/returns/ReasonDropDown.d.ts +0 -14
- package/lib/typescript/components/executiontasks/scanner/returns/ScanList.d.ts +0 -17
- package/lib/typescript/ui/screens/RTScanScreen.d.ts +0 -3
- package/mobile-execution-lib-0.6.4.tgz +0 -0
|
@@ -1,32 +1,40 @@
|
|
|
1
|
-
import LocationManager from '../manager/location/LocationManager';
|
|
2
1
|
import DispatchSdkCache from '../manager/sdk/DispatchSdkCache';
|
|
3
2
|
import { EntityCode, ExecutionTaskID } from '../models/execTasks/ETConfig';
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
import dispatchEvent from '../events/EventDispatcher';
|
|
4
|
+
import { JSONPath } from 'jsonpath-plus';
|
|
5
|
+
export async function getBaseETResponse(entityCode, success, eventCode, reasonCode, mergedObjectiveIds, taskId) {
|
|
6
|
+
// let location = LocationManager.getInstance().getLastLocation();
|
|
6
7
|
let cache = DispatchSdkCache.getInstance();
|
|
7
8
|
const sdkConfig = await cache.getObjectFromCache(DispatchSdkCache.KEYS.SDK_CONFIG);
|
|
9
|
+
/* const startTime = await cache.getObjectFromCache(
|
|
10
|
+
DispatchSdkCache.KEYS.TASK_START_TIME
|
|
11
|
+
); */
|
|
8
12
|
let baseResponse = {
|
|
9
13
|
entityCode: entityCode,
|
|
10
14
|
success: success,
|
|
11
15
|
eventCode: eventCode,
|
|
12
16
|
reasonCode: reasonCode,
|
|
17
|
+
id: taskId,
|
|
13
18
|
meta: {
|
|
14
|
-
location: {
|
|
19
|
+
/* location: {
|
|
15
20
|
latitude: location.latitude,
|
|
16
|
-
longitude: location.longitude
|
|
17
|
-
}
|
|
21
|
+
longitude: location.longitude,
|
|
22
|
+
},*/
|
|
18
23
|
userDetails: {
|
|
19
24
|
id: (sdkConfig === null || sdkConfig === void 0 ? void 0 : sdkConfig.userID) ?? '',
|
|
20
25
|
name: (sdkConfig === null || sdkConfig === void 0 ? void 0 : sdkConfig.userName) ?? ''
|
|
21
|
-
}
|
|
22
|
-
startTime: Date.now(),
|
|
23
|
-
endTime: Date.now()
|
|
24
|
-
}
|
|
26
|
+
}
|
|
27
|
+
/*startTime: startTime ? parseInt(startTime) : Date.now(),
|
|
28
|
+
endTime: Date.now(), */
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
mergedObjectiveIds
|
|
25
32
|
};
|
|
26
33
|
return baseResponse;
|
|
27
34
|
}
|
|
28
|
-
export async function getObjectiveCompleteResp(entityCode, success, eventCode, reasonCode) {
|
|
29
|
-
let completeResponse = {
|
|
35
|
+
export async function getObjectiveCompleteResp(entityCode, success, eventCode, reasonCode, mergedObjectiveId, taskId) {
|
|
36
|
+
let completeResponse = {
|
|
37
|
+
...(await getBaseETResponse(entityCode, success, eventCode, reasonCode, mergedObjectiveId, taskId))
|
|
30
38
|
};
|
|
31
39
|
return completeResponse;
|
|
32
40
|
}
|
|
@@ -34,60 +42,131 @@ export function getEntityCodeByET(etId) {
|
|
|
34
42
|
switch (etId) {
|
|
35
43
|
case ExecutionTaskID.CAPTURE_INPUT:
|
|
36
44
|
return EntityCode.CAPTURE_INPUT;
|
|
37
|
-
|
|
38
45
|
case ExecutionTaskID.IMAGE_CAPTURE:
|
|
39
46
|
return EntityCode.IMAGE_CAPTURE;
|
|
40
|
-
|
|
41
47
|
case ExecutionTaskID.DELIVER:
|
|
42
48
|
return EntityCode.DELIVER;
|
|
43
|
-
|
|
44
49
|
case ExecutionTaskID.DOODLE:
|
|
45
50
|
return EntityCode.DOODLE;
|
|
46
|
-
|
|
47
51
|
case ExecutionTaskID.FORMS:
|
|
48
52
|
return EntityCode.FORMS;
|
|
49
|
-
|
|
50
53
|
case ExecutionTaskID.SCAN:
|
|
51
54
|
return EntityCode.SCAN;
|
|
52
|
-
|
|
53
55
|
case ExecutionTaskID.DISPLAY:
|
|
54
56
|
return EntityCode.DISPLAY;
|
|
55
|
-
|
|
56
57
|
case ExecutionTaskID.PICKUP:
|
|
57
58
|
return EntityCode.PICKUP;
|
|
58
|
-
|
|
59
59
|
case ExecutionTaskID.START_WORKFLOW:
|
|
60
60
|
return EntityCode.START_WORKFLOW;
|
|
61
|
-
|
|
62
61
|
case ExecutionTaskID.VERIFY_LOCATION:
|
|
63
62
|
return EntityCode.VERIFY_LOCATION;
|
|
64
|
-
|
|
65
63
|
case ExecutionTaskID.COMPLETED_FAILURE:
|
|
66
64
|
return EntityCode.COMPLETED_FAILURE;
|
|
67
|
-
|
|
68
65
|
case ExecutionTaskID.COMPLETED_SUCCESS:
|
|
69
66
|
return EntityCode.COMPLETED_SUCCESS;
|
|
70
|
-
|
|
71
67
|
case ExecutionTaskID.INIT_PAYMENT:
|
|
72
68
|
return EntityCode.INIT_PAYMENT;
|
|
73
|
-
|
|
74
69
|
case ExecutionTaskID.PROCESS_PAYMENT:
|
|
75
70
|
return EntityCode.PROCESS_PAYMENT;
|
|
76
|
-
|
|
77
71
|
case ExecutionTaskID.COMPLETE_PAYMENT:
|
|
78
72
|
return EntityCode.COMPLETE_PAYMENT;
|
|
79
|
-
|
|
80
73
|
case ExecutionTaskID.DELIVER_CASH:
|
|
81
74
|
return EntityCode.DELIVER_CASH;
|
|
82
|
-
|
|
83
75
|
case ExecutionTaskID.VERIFY_INPUT:
|
|
84
76
|
return EntityCode.VERIFY_INPUT;
|
|
85
|
-
|
|
77
|
+
case ExecutionTaskID.VALIDATE_OTP_ET:
|
|
78
|
+
return EntityCode.VALIDATE_OTP_ET;
|
|
86
79
|
default:
|
|
87
80
|
return 'NO_ENTITY_CODE_FOUND';
|
|
88
81
|
}
|
|
89
82
|
}
|
|
90
|
-
|
|
91
|
-
|
|
83
|
+
|
|
84
|
+
// export function checkForImagesInEvents(eventRow: EventRow) {
|
|
85
|
+
// console.log(eventRow);
|
|
86
|
+
// }
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* This function will be called on start of every execution task and is being used in ET screens components.
|
|
90
|
+
* @param eventData nextState: state | objRef: string | jobId: string
|
|
91
|
+
*/
|
|
92
|
+
|
|
93
|
+
export function onTaskStart(eventData, customData) {
|
|
94
|
+
let triggerEvent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
95
|
+
const keys = DispatchSdkCache.KEYS;
|
|
96
|
+
const cache = DispatchSdkCache.getInstance();
|
|
97
|
+
(async () => {
|
|
98
|
+
// await cache.setKeyInCache(keys.TASK_START_TIME, Date.now().toString());
|
|
99
|
+
await cache.setKeyInCache(keys.CURRENT_WORKING_TASK_ID, eventData.taskId);
|
|
100
|
+
})();
|
|
101
|
+
if (triggerEvent) {
|
|
102
|
+
const customEtName = eventData.taskName;
|
|
103
|
+
const eventOutputData = {
|
|
104
|
+
etData: eventData.input,
|
|
105
|
+
taskId: eventData.taskId,
|
|
106
|
+
timestamp: Date.now(),
|
|
107
|
+
customData
|
|
108
|
+
};
|
|
109
|
+
/* eventData[0].groupId
|
|
110
|
+
? (eventOutputData['groupId'] = eventData[0].groupId)
|
|
111
|
+
: null; */
|
|
112
|
+
|
|
113
|
+
/* eventData.forEach((objItem: stateWithObjRef) => {
|
|
114
|
+
eventOutputData.etData[objItem.jobId] = {
|
|
115
|
+
...(objItem.nextState.data.input || {}),
|
|
116
|
+
workflowInstanceId: objItem.nextState.workflowInstanceId,
|
|
117
|
+
additionalData: objItem?.additionalData || {},
|
|
118
|
+
};
|
|
119
|
+
}); */
|
|
120
|
+
dispatchEvent('START', customEtName, eventOutputData);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
const isLeafData = value => {
|
|
124
|
+
switch (typeof value) {
|
|
125
|
+
case 'boolean':
|
|
126
|
+
case 'number':
|
|
127
|
+
return true;
|
|
128
|
+
default:
|
|
129
|
+
return false;
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
const isDynamicValue = function (input) {
|
|
133
|
+
if (input.charAt(0) === '{' && input.charAt(1) === '{' && input.charAt(input.length - 1) === '}' && input.charAt(input.length - 2) === '}') return true;else return false;
|
|
134
|
+
};
|
|
135
|
+
export function handleDynamicValues(jsonInput, dataBlob) {
|
|
136
|
+
for (const key in jsonInput) {
|
|
137
|
+
let value = jsonInput[key];
|
|
138
|
+
if (!isLeafData(value)) {
|
|
139
|
+
if (value && typeof value === 'string' && isDynamicValue(value)) {
|
|
140
|
+
const path = value.substring(2, value.length - 2);
|
|
141
|
+
const output = JSONPath({
|
|
142
|
+
json: dataBlob,
|
|
143
|
+
path
|
|
144
|
+
});
|
|
145
|
+
const outputResp = output.pop();
|
|
146
|
+
if (outputResp) jsonInput[key] = outputResp;
|
|
147
|
+
} else if (typeof value === 'object') {
|
|
148
|
+
if (Array.isArray(value)) {
|
|
149
|
+
if (typeof value[0] === 'string') {
|
|
150
|
+
const dynamicVal = value.filter(_val => isDynamicValue(_val));
|
|
151
|
+
if (dynamicVal.length) {
|
|
152
|
+
const path = dynamicVal[0].substring(2, dynamicVal[0].length - 2);
|
|
153
|
+
const output = JSONPath({
|
|
154
|
+
json: dataBlob,
|
|
155
|
+
path
|
|
156
|
+
});
|
|
157
|
+
const outputResp = output.pop();
|
|
158
|
+
if (outputResp) jsonInput[key] = outputResp;
|
|
159
|
+
}
|
|
160
|
+
} else if (typeof value[0] === 'object') {
|
|
161
|
+
jsonInput[key] = value.map(val => {
|
|
162
|
+
val = handleDynamicValues(val, dataBlob);
|
|
163
|
+
return val;
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
} else handleDynamicValues(value, dataBlob);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
return jsonInput;
|
|
92
171
|
}
|
|
93
172
|
//# sourceMappingURL=ExecTaskUtils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["LocationManager","DispatchSdkCache","EntityCode","ExecutionTaskID","getBaseETResponse","entityCode","success","eventCode","reasonCode","location","getInstance","getLastLocation","cache","sdkConfig","getObjectFromCache","KEYS","SDK_CONFIG","baseResponse","meta","latitude","longitude","userDetails","id","userID","name","userName","startTime","Date","now","endTime","getObjectiveCompleteResp","completeResponse","getEntityCodeByET","etId","CAPTURE_INPUT","IMAGE_CAPTURE","DELIVER","DOODLE","FORMS","SCAN","DISPLAY","PICKUP","START_WORKFLOW","VERIFY_LOCATION","COMPLETED_FAILURE","COMPLETED_SUCCESS","INIT_PAYMENT","PROCESS_PAYMENT","COMPLETE_PAYMENT","DELIVER_CASH","VERIFY_INPUT","checkForImagesInEvents","eventRow","console","log"],"sources":["ExecTaskUtils.ts"],"sourcesContent":["import type { BaseETResponse } from '../models/execTasks/ETBaseModels';\nimport LocationManager from '../manager/location/LocationManager';\nimport DispatchSdkCache from '../manager/sdk/DispatchSdkCache';\nimport type { CompletedWFResponse } from '../components/executiontasks/CompletedWFSchema';\nimport { EntityCode, ExecutionTaskID } from '../models/execTasks/ETConfig';\nimport type { EventRow } from '../manager/syncmanager/DBConfig';\nimport type { DispatchSDKConfig } from '../models/sdk';\n\nexport async function getBaseETResponse(\n entityCode: string,\n success: boolean,\n eventCode: string,\n reasonCode: string\n): Promise<BaseETResponse> {\n let location = LocationManager.getInstance().getLastLocation();\n let cache = DispatchSdkCache.getInstance();\n const sdkConfig = (await cache.getObjectFromCache(\n DispatchSdkCache.KEYS.SDK_CONFIG\n )) as DispatchSDKConfig;\n let baseResponse: BaseETResponse = {\n entityCode: entityCode,\n success: success,\n eventCode: eventCode,\n reasonCode: reasonCode,\n meta: {\n location: {\n latitude: location.latitude,\n longitude: location.longitude,\n },\n userDetails: {\n id: sdkConfig?.userID ?? '',\n name: sdkConfig?.userName ?? '',\n },\n startTime: Date.now(),\n endTime: Date.now(),\n },\n };\n return baseResponse;\n}\n\nexport async function getObjectiveCompleteResp(\n entityCode: string,\n success: boolean,\n eventCode: string,\n reasonCode: string\n) {\n let completeResponse: CompletedWFResponse = {\n ...(await getBaseETResponse(entityCode, success, eventCode, reasonCode)),\n };\n return completeResponse;\n}\nexport function getEntityCodeByET(etId: string): string {\n switch (etId) {\n case ExecutionTaskID.CAPTURE_INPUT:\n return EntityCode.CAPTURE_INPUT;\n case ExecutionTaskID.IMAGE_CAPTURE:\n return EntityCode.IMAGE_CAPTURE;\n case ExecutionTaskID.DELIVER:\n return EntityCode.DELIVER;\n case ExecutionTaskID.DOODLE:\n return EntityCode.DOODLE;\n case ExecutionTaskID.FORMS:\n return EntityCode.FORMS;\n case ExecutionTaskID.SCAN:\n return EntityCode.SCAN;\n case ExecutionTaskID.DISPLAY:\n return EntityCode.DISPLAY;\n case ExecutionTaskID.PICKUP:\n return EntityCode.PICKUP;\n case ExecutionTaskID.START_WORKFLOW:\n return EntityCode.START_WORKFLOW;\n case ExecutionTaskID.VERIFY_LOCATION:\n return EntityCode.VERIFY_LOCATION;\n case ExecutionTaskID.COMPLETED_FAILURE:\n return EntityCode.COMPLETED_FAILURE;\n case ExecutionTaskID.COMPLETED_SUCCESS:\n return EntityCode.COMPLETED_SUCCESS;\n case ExecutionTaskID.INIT_PAYMENT:\n return EntityCode.INIT_PAYMENT;\n case ExecutionTaskID.PROCESS_PAYMENT:\n return EntityCode.PROCESS_PAYMENT;\n case ExecutionTaskID.COMPLETE_PAYMENT:\n return EntityCode.COMPLETE_PAYMENT;\n case ExecutionTaskID.DELIVER_CASH:\n return EntityCode.DELIVER_CASH;\n case ExecutionTaskID.VERIFY_INPUT:\n return EntityCode.VERIFY_INPUT;\n default:\n return 'NO_ENTITY_CODE_FOUND';\n }\n}\n\nexport function checkForImagesInEvents(eventRow: EventRow) {\n console.log(eventRow);\n}\n"],"mappings":"AACA,OAAOA,eAAP,MAA4B,qCAA5B;AACA,OAAOC,gBAAP,MAA6B,iCAA7B;AAEA,SAASC,UAAT,EAAqBC,eAArB,QAA4C,8BAA5C;AAIA,OAAO,eAAeC,iBAAf,CACLC,UADK,EAELC,OAFK,EAGLC,SAHK,EAILC,UAJK,EAKoB;EACzB,IAAIC,QAAQ,GAAGT,eAAe,CAACU,WAAhB,GAA8BC,eAA9B,EAAf;EACA,IAAIC,KAAK,GAAGX,gBAAgB,CAACS,WAAjB,EAAZ;EACA,MAAMG,SAAS,GAAI,MAAMD,KAAK,CAACE,kBAAN,CACvBb,gBAAgB,CAACc,IAAjB,CAAsBC,UADC,CAAzB;EAGA,IAAIC,YAA4B,GAAG;IACjCZ,UAAU,EAAEA,UADqB;IAEjCC,OAAO,EAAEA,OAFwB;IAGjCC,SAAS,EAAEA,SAHsB;IAIjCC,UAAU,EAAEA,UAJqB;IAKjCU,IAAI,EAAE;MACJT,QAAQ,EAAE;QACRU,QAAQ,EAAEV,QAAQ,CAACU,QADX;QAERC,SAAS,EAAEX,QAAQ,CAACW;MAFZ,CADN;MAKJC,WAAW,EAAE;QACXC,EAAE,EAAE,CAAAT,SAAS,SAAT,IAAAA,SAAS,WAAT,YAAAA,SAAS,CAAEU,MAAX,KAAqB,EADd;QAEXC,IAAI,EAAE,CAAAX,SAAS,SAAT,IAAAA,SAAS,WAAT,YAAAA,SAAS,CAAEY,QAAX,KAAuB;MAFlB,CALT;MASJC,SAAS,EAAEC,IA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ACF,KAAK1C,eAAe,CAAC2C,YAArB;MACE,OAAO5C,UAAU,CAAC4C,YAAlB;;IACF,KAAK3C,eAAe,CAAC4C,eAArB;MACE,OAAO7C,UAAU,CAAC6C,eAAlB;;IACF,KAAK5C,eAAe,CAAC6C,gBAArB;MACE,OAAO9C,UAAU,CAAC8C,gBAAlB;;IACF,KAAK7C,eAAe,CAAC8C,YAArB;MACE,OAAO/C,UAAU,CAAC+C,YAAlB;;IACF,KAAK9C,eAAe,CAAC+C,YAArB;MACE,OAAOhD,UAAU,CAACgD,YAAlB;;IACF;MACE,OAAO,sBAAP;EApCJ;AAsCD;AAED,OAAO,SAASC,sBAAT,CAAgCC,QAAhC,EAAoD;EACzDC,OAAO,CAACC,GAAR,CAAYF,QAAZ;AACD"}
|
|
1
|
+
{"version":3,"names":["DispatchSdkCache","EntityCode","ExecutionTaskID","dispatchEvent","JSONPath","getBaseETResponse","entityCode","success","eventCode","reasonCode","mergedObjectiveIds","taskId","cache","getInstance","sdkConfig","getObjectFromCache","KEYS","SDK_CONFIG","baseResponse","id","meta","userDetails","userID","name","userName","getObjectiveCompleteResp","mergedObjectiveId","completeResponse","getEntityCodeByET","etId","CAPTURE_INPUT","IMAGE_CAPTURE","DELIVER","DOODLE","FORMS","SCAN","DISPLAY","PICKUP","START_WORKFLOW","VERIFY_LOCATION","COMPLETED_FAILURE","COMPLETED_SUCCESS","INIT_PAYMENT","PROCESS_PAYMENT","COMPLETE_PAYMENT","DELIVER_CASH","VERIFY_INPUT","VALIDATE_OTP_ET","onTaskStart","eventData","customData","triggerEvent","arguments","length","undefined","keys","setKeyInCache","CURRENT_WORKING_TASK_ID","customEtName","taskName","eventOutputData","etData","input","timestamp","Date","now","isLeafData","value","isDynamicValue","charAt","handleDynamicValues","jsonInput","dataBlob","key","path","substring","output","json","outputResp","pop","Array","isArray","dynamicVal","filter","_val","map","val"],"sources":["ExecTaskUtils.ts"],"sourcesContent":["import type { BaseETResponse } from '../models/execTasks/ETBaseModels';\nimport LocationManager from '../manager/location/LocationManager';\nimport DispatchSdkCache from '../manager/sdk/DispatchSdkCache';\nimport type { CompletedWFResponse } from '../components/executiontasks/CompletedWFSchema';\nimport { EntityCode, ExecutionTaskID } from '../models/execTasks/ETConfig';\nimport type { EventRow } from '../manager/syncmanager/DBConfig';\nimport type { DispatchSDKConfig } from '../models/sdk';\nimport dispatchEvent from '../events/EventDispatcher';\nimport type { startEvent } from '../models/DispatchModels';\nimport { JSONPath } from 'jsonpath-plus';\nimport { IDispatch } from '@os1-platform/platform-coreos-execution-engine-sdk';\n\nexport async function getBaseETResponse(\n entityCode: string,\n success: boolean,\n eventCode: string,\n reasonCode: string,\n mergedObjectiveIds: Array<string>,\n taskId: ExecutionTaskID\n): Promise<BaseETResponse> {\n // let location = LocationManager.getInstance().getLastLocation();\n let cache = DispatchSdkCache.getInstance();\n const sdkConfig = (await cache.getObjectFromCache(\n DispatchSdkCache.KEYS.SDK_CONFIG\n )) as DispatchSDKConfig;\n /* const startTime = await cache.getObjectFromCache(\n DispatchSdkCache.KEYS.TASK_START_TIME\n ); */\n let baseResponse: BaseETResponse = {\n entityCode: entityCode,\n success: success,\n eventCode: eventCode,\n reasonCode: reasonCode,\n id: taskId,\n meta: {\n /* location: {\n latitude: location.latitude,\n longitude: location.longitude,\n },*/\n userDetails: {\n id: sdkConfig?.userID ?? '',\n name: sdkConfig?.userName ?? '',\n },\n /*startTime: startTime ? parseInt(startTime) : Date.now(),\n endTime: Date.now(), */\n },\n mergedObjectiveIds,\n };\n return baseResponse;\n}\n\nexport async function getObjectiveCompleteResp(\n entityCode: string,\n success: boolean,\n eventCode: string,\n reasonCode: string,\n mergedObjectiveId: Array<string>,\n taskId: ExecutionTaskID\n) {\n let completeResponse: CompletedWFResponse = {\n ...(await getBaseETResponse(\n entityCode,\n success,\n eventCode,\n reasonCode,\n mergedObjectiveId,\n taskId\n )),\n };\n return completeResponse;\n}\nexport function getEntityCodeByET(etId: string): string {\n switch (etId) {\n case ExecutionTaskID.CAPTURE_INPUT:\n return EntityCode.CAPTURE_INPUT;\n case ExecutionTaskID.IMAGE_CAPTURE:\n return EntityCode.IMAGE_CAPTURE;\n case ExecutionTaskID.DELIVER:\n return EntityCode.DELIVER;\n case ExecutionTaskID.DOODLE:\n return EntityCode.DOODLE;\n case ExecutionTaskID.FORMS:\n return EntityCode.FORMS;\n case ExecutionTaskID.SCAN:\n return EntityCode.SCAN;\n case ExecutionTaskID.DISPLAY:\n return EntityCode.DISPLAY;\n case ExecutionTaskID.PICKUP:\n return EntityCode.PICKUP;\n case ExecutionTaskID.START_WORKFLOW:\n return EntityCode.START_WORKFLOW;\n case ExecutionTaskID.VERIFY_LOCATION:\n return EntityCode.VERIFY_LOCATION;\n case ExecutionTaskID.COMPLETED_FAILURE:\n return EntityCode.COMPLETED_FAILURE;\n case ExecutionTaskID.COMPLETED_SUCCESS:\n return EntityCode.COMPLETED_SUCCESS;\n case ExecutionTaskID.INIT_PAYMENT:\n return EntityCode.INIT_PAYMENT;\n case ExecutionTaskID.PROCESS_PAYMENT:\n return EntityCode.PROCESS_PAYMENT;\n case ExecutionTaskID.COMPLETE_PAYMENT:\n return EntityCode.COMPLETE_PAYMENT;\n case ExecutionTaskID.DELIVER_CASH:\n return EntityCode.DELIVER_CASH;\n case ExecutionTaskID.VERIFY_INPUT:\n return EntityCode.VERIFY_INPUT;\n case ExecutionTaskID.VALIDATE_OTP_ET:\n return EntityCode.VALIDATE_OTP_ET;\n default:\n return 'NO_ENTITY_CODE_FOUND';\n }\n}\n\n// export function checkForImagesInEvents(eventRow: EventRow) {\n// console.log(eventRow);\n// }\n\n/**\n * This function will be called on start of every execution task and is being used in ET screens components.\n * @param eventData nextState: state | objRef: string | jobId: string\n */\n\nexport function onTaskStart(\n eventData: IDispatch.IExecutionTaskQueryResponse,\n customData: any,\n triggerEvent = true\n) {\n const keys = DispatchSdkCache.KEYS;\n const cache = DispatchSdkCache.getInstance();\n (async () => {\n // await cache.setKeyInCache(keys.TASK_START_TIME, Date.now().toString());\n await cache.setKeyInCache(keys.CURRENT_WORKING_TASK_ID, eventData.taskId);\n })();\n if (triggerEvent) {\n const customEtName = eventData.taskName;\n const eventOutputData: startEvent = {\n etData: eventData.input,\n taskId: eventData.taskId,\n timestamp: Date.now(),\n customData,\n };\n /* eventData[0].groupId\n ? (eventOutputData['groupId'] = eventData[0].groupId)\n : null; */\n\n /* eventData.forEach((objItem: stateWithObjRef) => {\n eventOutputData.etData[objItem.jobId] = {\n ...(objItem.nextState.data.input || {}),\n workflowInstanceId: objItem.nextState.workflowInstanceId,\n additionalData: objItem?.additionalData || {},\n };\n }); */\n dispatchEvent('START', customEtName, eventOutputData);\n }\n}\n\nconst isLeafData = (value: any) => {\n switch (typeof value) {\n case 'boolean':\n case 'number':\n return true;\n default:\n return false;\n }\n};\nconst isDynamicValue = function (input: string) {\n if (\n input.charAt(0) === '{' &&\n input.charAt(1) === '{' &&\n input.charAt(input.length - 1) === '}' &&\n input.charAt(input.length - 2) === '}'\n )\n return true;\n else return false;\n};\n\nexport function handleDynamicValues(jsonInput: any, dataBlob: any) {\n for (const key in jsonInput) {\n let value = jsonInput[key];\n if (!isLeafData(value)) {\n if (value && typeof value === 'string' && isDynamicValue(value)) {\n const path = value.substring(2, value.length - 2);\n const output = JSONPath({\n json: dataBlob,\n path,\n });\n const outputResp = output.pop();\n if (outputResp) jsonInput[key] = outputResp;\n } else if (typeof value === 'object') {\n if (Array.isArray(value)) {\n if (typeof value[0] === 'string') {\n const dynamicVal = value.filter((_val) => isDynamicValue(_val));\n if (dynamicVal.length) {\n const path = dynamicVal[0].substring(2, dynamicVal[0].length - 2);\n const output = JSONPath({\n json: dataBlob,\n path,\n });\n const outputResp = output.pop();\n if (outputResp) jsonInput[key] = outputResp;\n }\n } else if (typeof value[0] === 'object') {\n jsonInput[key] = value.map((val) => {\n val = handleDynamicValues(val, dataBlob);\n return val;\n });\n }\n } else handleDynamicValues(value, dataBlob);\n }\n }\n }\n return jsonInput;\n}\n"],"mapp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AAEO,UAAU,CAAC,CAAC,CAAC,CAAC7B,MAAM,GAAG,CAAC,CAAC;cACjE,MAAMuB,MAAM,GAAGxE,QAAQ,CAAC;gBACtByE,IAAI,EAAEL,QAAQ;gBACdE;cACF,CAAC,CAAC;cACF,MAAMI,UAAU,GAAGF,MAAM,CAACG,GAAG,CAAC,CAAC;cAC/B,IAAID,UAAU,EAAEP,SAAS,CAACE,GAAG,CAAC,GAAGK,UAAU;YAC7C;UACF,CAAC,MAAM,IAAI,OAAOX,KAAK,CAAC,CAAC,CAAC,KAAK,QAAQ,EAAE;YACvCI,SAAS,CAACE,GAAG,CAAC,GAAGN,KAAK,CAACkB,GAAG,CAAEC,GAAG,IAAK;cAClCA,GAAG,GAAGhB,mBAAmB,CAACgB,GAAG,EAAEd,QAAQ,CAAC;cACxC,OAAOc,GAAG;YACZ,CAAC,CAAC;UACJ;QACF,CAAC,MAAMhB,mBAAmB,CAACH,KAAK,EAAEK,QAAQ,CAAC;MAC7C;IACF;EACF;EACA,OAAOD,SAAS;AAClB"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
|
-
|
|
1
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
3
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
3
4
|
import DispatchSdkCache from '../manager/sdk/DispatchSdkCache';
|
|
4
5
|
import * as Sentry from '@sentry/react-native';
|
|
5
6
|
import { Severity } from '@sentry/react-native';
|
|
6
7
|
import crashlytics from '@react-native-firebase/crashlytics';
|
|
7
|
-
export let LOG_TYPE
|
|
8
|
-
|
|
9
|
-
(function (LOG_TYPE) {
|
|
8
|
+
export let LOG_TYPE = /*#__PURE__*/function (LOG_TYPE) {
|
|
10
9
|
LOG_TYPE["SDK_ERROR"] = "sdk_error";
|
|
11
10
|
LOG_TYPE["SDK_WARNING"] = "sdk_warning";
|
|
12
11
|
LOG_TYPE["SDK_INFO"] = "sdk_info";
|
|
@@ -15,13 +14,12 @@ export let LOG_TYPE;
|
|
|
15
14
|
LOG_TYPE["APP_WARNING"] = "app_warning";
|
|
16
15
|
LOG_TYPE["APP_DEBUG"] = "app_debug";
|
|
17
16
|
LOG_TYPE["APP_INFO"] = "app_info";
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
return LOG_TYPE;
|
|
18
|
+
}({});
|
|
20
19
|
class Logger {
|
|
21
20
|
constructor() {
|
|
22
|
-
_defineProperty(this, "enableLogs",
|
|
21
|
+
_defineProperty(this, "enableLogs", false);
|
|
23
22
|
}
|
|
24
|
-
|
|
25
23
|
setLogging(enabled, sdkConfig) {
|
|
26
24
|
this.enableLogs = enabled;
|
|
27
25
|
crashlytics().setUserId(sdkConfig.userID).then().catch();
|
|
@@ -31,26 +29,21 @@ class Logger {
|
|
|
31
29
|
tenantId: sdkConfig.tenantID
|
|
32
30
|
}).then().catch();
|
|
33
31
|
}
|
|
34
|
-
|
|
35
32
|
logEvent(TAG, message, logType) {
|
|
36
33
|
if (this.enableLogs) console.log(TAG, message);
|
|
37
|
-
crashlytics().log(`${TAG} - ${logType} -${message}`);
|
|
38
|
-
this.sendSentryMessage(message, TAG, logType);
|
|
39
|
-
|
|
34
|
+
// crashlytics().log(`${TAG} - ${logType} -${message}`);
|
|
35
|
+
// this.sendSentryMessage(message, TAG, logType);
|
|
40
36
|
if (logType === LOG_TYPE.SDK_WARNING || logType === LOG_TYPE.SDK_ERROR || logType === LOG_TYPE.APP_ERROR || logType === LOG_TYPE.APP_WARNING) {
|
|
41
37
|
crashlytics().recordError(new Error(message), TAG);
|
|
42
38
|
this.sendSentryException(new Error(message), TAG, logType);
|
|
43
39
|
}
|
|
44
40
|
}
|
|
45
|
-
|
|
46
41
|
static getInstance() {
|
|
47
42
|
if (!Logger.instance) {
|
|
48
43
|
Logger.instance = new Logger();
|
|
49
44
|
}
|
|
50
|
-
|
|
51
45
|
return Logger.instance;
|
|
52
46
|
}
|
|
53
|
-
|
|
54
47
|
sendSentryException(exception, logTag, logType) {
|
|
55
48
|
(async () => {
|
|
56
49
|
try {
|
|
@@ -58,7 +51,6 @@ class Logger {
|
|
|
58
51
|
} catch (error) {}
|
|
59
52
|
})();
|
|
60
53
|
}
|
|
61
|
-
|
|
62
54
|
sendSentryMessage(message, logTag, logType) {
|
|
63
55
|
(async () => {
|
|
64
56
|
try {
|
|
@@ -66,7 +58,6 @@ class Logger {
|
|
|
66
58
|
} catch (error) {}
|
|
67
59
|
})();
|
|
68
60
|
}
|
|
69
|
-
|
|
70
61
|
async getUserConfig(logLevel, logType, logTag) {
|
|
71
62
|
try {
|
|
72
63
|
const config = await DispatchSdkCache.getInstance().getObjectFromCache(DispatchSdkCache.KEYS.SDK_CONFIG);
|
|
@@ -88,10 +79,7 @@ class Logger {
|
|
|
88
79
|
return undefined;
|
|
89
80
|
}
|
|
90
81
|
}
|
|
91
|
-
|
|
92
82
|
}
|
|
93
|
-
|
|
94
83
|
_defineProperty(Logger, "instance", void 0);
|
|
95
|
-
|
|
96
84
|
export default Logger;
|
|
97
85
|
//# sourceMappingURL=Logger.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DispatchSdkCache","Sentry","Severity","crashlytics","LOG_TYPE","Logger","setLogging","enabled","sdkConfig","enableLogs","setUserId","userID","then","catch","setAttributes","userId","userName","tenantId","tenantID","logEvent","TAG","message","logType","console","log","
|
|
1
|
+
{"version":3,"names":["DispatchSdkCache","Sentry","Severity","crashlytics","LOG_TYPE","Logger","constructor","_defineProperty","setLogging","enabled","sdkConfig","enableLogs","setUserId","userID","then","catch","setAttributes","userId","userName","tenantId","tenantID","logEvent","TAG","message","logType","console","log","SDK_WARNING","SDK_ERROR","APP_ERROR","APP_WARNING","recordError","Error","sendSentryException","getInstance","instance","exception","logTag","captureException","getUserConfig","error","sendSentryMessage","captureMessage","Warning","logLevel","config","getObjectFromCache","KEYS","SDK_CONFIG","dspId","getKeyFromCache","DISPATCH_ID","user","id","username","tags","dispatchId","errorTime","Date","now","level","undefined"],"sources":["Logger.ts"],"sourcesContent":["import DispatchSdkCache from '../manager/sdk/DispatchSdkCache';\nimport type { DispatchSDKConfig } from '../models/sdk';\nimport * as Sentry from '@sentry/react-native';\nimport { Severity } from '@sentry/react-native';\nimport crashlytics from '@react-native-firebase/crashlytics';\n\nexport const enum LOG_TYPE {\n SDK_ERROR = 'sdk_error',\n SDK_WARNING = 'sdk_warning',\n SDK_INFO = 'sdk_info',\n SDK_DEBUG = 'sdk_debug',\n APP_ERROR = 'app_error',\n APP_WARNING = 'app_warning',\n APP_DEBUG = 'app_debug',\n APP_INFO = 'app_info',\n}\n\nclass Logger {\n private static instance: Logger;\n private enableLogs: boolean = false;\n\n setLogging(enabled: boolean, sdkConfig: DispatchSDKConfig) {\n this.enableLogs = enabled;\n crashlytics().setUserId(sdkConfig.userID).then().catch();\n crashlytics()\n .setAttributes({\n userId: sdkConfig.userID,\n userName: sdkConfig.userName,\n tenantId: sdkConfig.tenantID,\n })\n .then()\n .catch();\n }\n\n logEvent(TAG: string, message: string, logType: LOG_TYPE) {\n if (this.enableLogs) console.log(TAG, message);\n // crashlytics().log(`${TAG} - ${logType} -${message}`);\n // this.sendSentryMessage(message, TAG, logType);\n if (\n logType === LOG_TYPE.SDK_WARNING ||\n logType === LOG_TYPE.SDK_ERROR ||\n logType === LOG_TYPE.APP_ERROR ||\n logType === LOG_TYPE.APP_WARNING\n ) {\n crashlytics().recordError(new Error(message), TAG);\n this.sendSentryException(new Error(message), TAG, logType);\n }\n }\n\n public static getInstance(): Logger {\n if (!Logger.instance) {\n Logger.instance = new Logger();\n }\n return Logger.instance;\n }\n\n public sendSentryException(exception: any, logTag: string, logType: string) {\n (async () => {\n try {\n Sentry.captureException(\n exception,\n await this.getUserConfig(Severity.Error, logType, logTag)\n );\n } catch (error: any) {}\n })();\n }\n\n public sendSentryMessage(message: string, logTag: string, logType: string) {\n (async () => {\n try {\n Sentry.captureMessage(\n message,\n await this.getUserConfig(Severity.Warning, logType, logTag)\n );\n } catch (error: any) {}\n })();\n }\n\n private async getUserConfig(\n logLevel: Severity,\n logType: string,\n logTag: string\n ) {\n try {\n const config = (await DispatchSdkCache.getInstance().getObjectFromCache(\n DispatchSdkCache.KEYS.SDK_CONFIG\n )) as DispatchSDKConfig;\n const dspId = await DispatchSdkCache.getInstance().getKeyFromCache(\n DispatchSdkCache.KEYS.DISPATCH_ID\n );\n return {\n user: {\n id: config?.userID,\n username: config?.userName,\n },\n tags: {\n dispatchId: dspId,\n errorTime: Date.now(),\n logType: logType,\n logTag: logTag,\n },\n level: logLevel,\n };\n } catch (error: any) {\n return undefined;\n }\n }\n}\n\nexport default Logger;\n"],"mappings":";;;AAAA,OAAOA,gBAAgB,MAAM,iCAAiC;AAE9D,OAAO,KAAKC,MAAM,MAAM,sBAAsB;AAC9C,SAASC,QAAQ,QAAQ,sBAAsB;AAC/C,OAAOC,WAAW,MAAM,oCAAoC;AAE5D,WAAkBC,QAAQ,0BAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAAA,OAARA,QAAQ;AAAA;AAW1B,MAAMC,MAAM,CAAC;EAAAC,YAAA;IAAAC,eAAA,qBAEmB,KAAK;EAAA;EAEnCC,UAAUA,CAACC,OAAgB,EAAEC,SAA4B,EAAE;IACzD,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;EACF;AACF;AAACtD,eAAA,CA1FKF,MAAM;AA4FZ,eAAeA,MAAM"}
|
|
@@ -1,34 +1,27 @@
|
|
|
1
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
|
-
|
|
1
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
3
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
3
4
|
import NetInfo from '@react-native-community/netinfo';
|
|
4
|
-
|
|
5
5
|
class NetworkUtils {
|
|
6
6
|
constructor() {
|
|
7
7
|
_defineProperty(this, "_isAvailable", true);
|
|
8
|
-
|
|
9
8
|
_defineProperty(this, "_listeners", new Set());
|
|
10
|
-
|
|
11
9
|
_defineProperty(this, "_handleConnectivityChange", netInfo => {
|
|
12
10
|
this._isAvailable = netInfo.isConnected ?? false;
|
|
13
|
-
|
|
14
11
|
this._listeners.forEach(listener => {
|
|
15
12
|
listener(this._isAvailable);
|
|
16
13
|
});
|
|
17
14
|
});
|
|
18
|
-
|
|
19
15
|
NetInfo.addEventListener(this._handleConnectivityChange);
|
|
20
16
|
this.isAvailableAsync();
|
|
21
17
|
}
|
|
22
|
-
|
|
23
18
|
isAvailable() {
|
|
24
19
|
return this._isAvailable;
|
|
25
20
|
}
|
|
26
|
-
|
|
27
21
|
async isAvailableAsync() {
|
|
28
22
|
if (this._isAvailable) {
|
|
29
23
|
return this._isAvailable;
|
|
30
24
|
}
|
|
31
|
-
|
|
32
25
|
try {
|
|
33
26
|
const netInfo = await NetInfo.fetch();
|
|
34
27
|
this._isAvailable = netInfo.isConnected ?? false;
|
|
@@ -36,19 +29,14 @@ class NetworkUtils {
|
|
|
36
29
|
this._isAvailable = false;
|
|
37
30
|
console.warn(`Uncaught error when fetching connectivity status: ${e}`);
|
|
38
31
|
}
|
|
39
|
-
|
|
40
32
|
return this._isAvailable;
|
|
41
33
|
}
|
|
42
|
-
|
|
43
34
|
addListener(listener) {
|
|
44
35
|
this._listeners.add(listener);
|
|
45
36
|
}
|
|
46
|
-
|
|
47
37
|
removeListener(listener) {
|
|
48
38
|
this._listeners.delete(listener);
|
|
49
39
|
}
|
|
50
|
-
|
|
51
40
|
}
|
|
52
|
-
|
|
53
41
|
export default new NetworkUtils();
|
|
54
42
|
//# sourceMappingURL=NetworkUtil.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["NetInfo","NetworkUtils","constructor","Set","netInfo","_isAvailable","isConnected","_listeners","forEach","listener","addEventListener","_handleConnectivityChange","isAvailableAsync","isAvailable","fetch","e","console","warn","addListener","add","removeListener","delete"],"sources":["NetworkUtil.ts"],"sourcesContent":["import NetInfo, { NetInfoState } from '@react-native-community/netinfo';\n\ntype ConnectivityListener = (available: boolean) => void;\n\nclass NetworkUtils {\n _isAvailable = true;\n _listeners = new Set<ConnectivityListener>();\n\n constructor() {\n NetInfo.addEventListener(this._handleConnectivityChange);\n this.isAvailableAsync();\n }\n\n isAvailable(): boolean {\n return this._isAvailable;\n }\n\n async isAvailableAsync(): Promise<boolean> {\n if (this._isAvailable) {\n return this._isAvailable;\n }\n\n try {\n const netInfo = await NetInfo.fetch();\n this._isAvailable = netInfo.isConnected ?? false;\n } catch (e) {\n this._isAvailable = false;\n console.warn(`Uncaught error when fetching connectivity status: ${e}`);\n }\n\n return this._isAvailable;\n }\n\n _handleConnectivityChange = (netInfo: NetInfoState) => {\n this._isAvailable = netInfo.isConnected ?? false;\n this._listeners.forEach((listener) => {\n listener(this._isAvailable);\n });\n };\n\n addListener(listener: ConnectivityListener): void {\n this._listeners.add(listener);\n }\n\n removeListener(listener: ConnectivityListener): void {\n this._listeners.delete(listener);\n }\n}\n\nexport default new NetworkUtils();\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["NetInfo","NetworkUtils","constructor","_defineProperty","Set","netInfo","_isAvailable","isConnected","_listeners","forEach","listener","addEventListener","_handleConnectivityChange","isAvailableAsync","isAvailable","fetch","e","console","warn","addListener","add","removeListener","delete"],"sources":["NetworkUtil.ts"],"sourcesContent":["import NetInfo, { NetInfoState } from '@react-native-community/netinfo';\n\ntype ConnectivityListener = (available: boolean) => void;\n\nclass NetworkUtils {\n _isAvailable = true;\n _listeners = new Set<ConnectivityListener>();\n\n constructor() {\n NetInfo.addEventListener(this._handleConnectivityChange);\n this.isAvailableAsync();\n }\n\n isAvailable(): boolean {\n return this._isAvailable;\n }\n\n async isAvailableAsync(): Promise<boolean> {\n if (this._isAvailable) {\n return this._isAvailable;\n }\n\n try {\n const netInfo = await NetInfo.fetch();\n this._isAvailable = netInfo.isConnected ?? false;\n } catch (e) {\n this._isAvailable = false;\n console.warn(`Uncaught error when fetching connectivity status: ${e}`);\n }\n\n return this._isAvailable;\n }\n\n _handleConnectivityChange = (netInfo: NetInfoState) => {\n this._isAvailable = netInfo.isConnected ?? false;\n this._listeners.forEach((listener) => {\n listener(this._isAvailable);\n });\n };\n\n addListener(listener: ConnectivityListener): void {\n this._listeners.add(listener);\n }\n\n removeListener(listener: ConnectivityListener): void {\n this._listeners.delete(listener);\n }\n}\n\nexport default new NetworkUtils();\n"],"mappings":";;;AAAA,OAAOA,OAAO,MAAwB,iCAAiC;AAIvE,MAAMC,YAAY,CAAC;EAIjBC,WAAWA,CAAA,EAAG;IAAAC,eAAA,uBAHC,IAAI;IAAAA,eAAA,qBACN,IAAIC,GAAG,CAAuB,CAAC;IAAAD,eAAA,oCA2BfE,OAAqB,IAAK;MACrD,IAAI,CAACC,YAAY,GAAGD,OAAO,CAACE,WAAW,IAAI,KAAK;MAChD,IAAI,CAACC,UAAU,CAACC,OAAO,CAAEC,QAAQ,IAAK;QACpCA,QAAQ,CAAC,IAAI,CAACJ,YAAY,CAAC;MAC7B,CAAC,CAAC;IACJ,CAAC;IA7BCN,OAAO,CAACW,gBAAgB,CAAC,IAAI,CAACC,yBAAyB,CAAC;IACxD,IAAI,CAACC,gBAAgB,CAAC,CAAC;EACzB;EAEAC,WAAWA,CAAA,EAAY;IACrB,OAAO,IAAI,CAACR,YAAY;EAC1B;EAEA,MAAMO,gBAAgBA,CAAA,EAAqB;IACzC,IAAI,IAAI,CAACP,YAAY,EAAE;MACrB,OAAO,IAAI,CAACA,YAAY;IAC1B;IAEA,IAAI;MACF,MAAMD,OAAO,GAAG,MAAML,OAAO,CAACe,KAAK,CAAC,CAAC;MACrC,IAAI,CAACT,YAAY,GAAGD,OAAO,CAACE,WAAW,IAAI,KAAK;IAClD,CAAC,CAAC,OAAOS,CAAC,EAAE;MACV,IAAI,CAACV,YAAY,GAAG,KAAK;MACzBW,OAAO,CAACC,IAAI,CAAE,qDAAoDF,CAAE,EAAC,CAAC;IACxE;IAEA,OAAO,IAAI,CAACV,YAAY;EAC1B;EASAa,WAAWA,CAACT,QAA8B,EAAQ;IAChD,IAAI,CAACF,UAAU,CAACY,GAAG,CAACV,QAAQ,CAAC;EAC/B;EAEAW,cAAcA,CAACX,QAA8B,EAAQ;IACnD,IAAI,CAACF,UAAU,CAACc,MAAM,CAACZ,QAAQ,CAAC;EAClC;AACF;AAEA,eAAe,IAAIT,YAAY,CAAC,CAAC"}
|
|
@@ -21,7 +21,6 @@ export default class SdkUtils {
|
|
|
21
21
|
await remoteConfig().fetch(expiration);
|
|
22
22
|
remoteConfig().fetchAndActivate().then(fetchedRemotely => {
|
|
23
23
|
let config = remoteConfig().getAll();
|
|
24
|
-
|
|
25
24
|
if (fetchedRemotely) {
|
|
26
25
|
Logger.getInstance().logEvent('Remote Config', 'Configs were retrieved from the backend and activated.', LOG_TYPE.SDK_INFO);
|
|
27
26
|
resolve(config);
|
|
@@ -37,67 +36,55 @@ export default class SdkUtils {
|
|
|
37
36
|
}
|
|
38
37
|
});
|
|
39
38
|
}
|
|
39
|
+
|
|
40
40
|
/**
|
|
41
41
|
* Function to download apk file from a public URL
|
|
42
42
|
* @param apkURL - URL where apk is hosted
|
|
43
43
|
* @param version - expected version of apk (used for naming the file)
|
|
44
44
|
* @param callback - callback for getting progress of download
|
|
45
45
|
*/
|
|
46
|
-
|
|
47
|
-
|
|
48
46
|
static async downloadAPK(apkURL, version, callback) {
|
|
49
47
|
const fileUri = FileSystem.cacheDirectory + `${version}.apk`;
|
|
50
48
|
const fileInfo = await FileSystem.getInfoAsync(fileUri);
|
|
51
49
|
const currentDate = new Date().toLocaleDateString();
|
|
52
50
|
const fileDate = new Date(fileInfo.modificationTime ? fileInfo.modificationTime * 1000 : 0).toLocaleDateString();
|
|
53
|
-
|
|
54
51
|
if (fileInfo.exists && currentDate === fileDate) {
|
|
55
52
|
return fileInfo.uri;
|
|
56
53
|
}
|
|
57
|
-
|
|
58
54
|
const downloadResumable = FileSystem.createDownloadResumable(apkURL, FileSystem.cacheDirectory + `${version}.apk`, {}, callback);
|
|
59
55
|
const downloadResult = await downloadResumable.downloadAsync();
|
|
60
56
|
return downloadResult === null || downloadResult === void 0 ? void 0 : downloadResult.uri;
|
|
61
57
|
}
|
|
58
|
+
|
|
62
59
|
/**
|
|
63
60
|
* Opens & Install an APK file
|
|
64
61
|
* @param uri - source of apk file
|
|
65
62
|
*/
|
|
66
|
-
|
|
67
|
-
|
|
68
63
|
static async deleteApk(version) {
|
|
69
64
|
await FileSystem.deleteAsync(FileSystem.cacheDirectory + `${version}.apk`);
|
|
70
65
|
}
|
|
71
|
-
|
|
72
66
|
static async openAPKFile(uri) {
|
|
73
67
|
return await DispatchSdkUtils.openAndInstallApk(uri);
|
|
74
68
|
}
|
|
75
|
-
|
|
76
69
|
static openAppSettings() {
|
|
77
70
|
DispatchSdkUtils.openSettings().then().catch(error => {
|
|
78
71
|
Logger.getInstance().logEvent('Intent error', error.message, LOG_TYPE.SDK_ERROR);
|
|
79
72
|
});
|
|
80
73
|
}
|
|
81
|
-
|
|
82
74
|
static async checkMandatory() {
|
|
83
75
|
const dateTimeCheck = await DispatchSdkUtils.isAutomaticDateTimeEnabled();
|
|
84
|
-
|
|
85
76
|
if (!dateTimeCheck) {
|
|
86
77
|
throw new BaseError(ErrorCodes.SYSTEM_TIME_CHECK_FAILED, 'Automatic date/time not enabled!');
|
|
87
78
|
}
|
|
88
|
-
|
|
89
79
|
await Location.enableNetworkProviderAsync();
|
|
90
80
|
let locationServicesCheck = await Location.hasServicesEnabledAsync();
|
|
91
81
|
const foregroundLocation = await Location.requestForegroundPermissionsAsync();
|
|
92
82
|
const bgLocation = await Location.requestBackgroundPermissionsAsync();
|
|
93
|
-
|
|
94
83
|
if (!(locationServicesCheck && foregroundLocation && bgLocation)) {
|
|
95
84
|
throw new BaseError(ErrorCodes.LOCATION_OR_GPS_NOT_ENABLED, 'Location or GPS not enabled');
|
|
96
85
|
}
|
|
97
|
-
|
|
98
86
|
let internet = await NetworkUtil.isAvailableAsync();
|
|
99
87
|
if (!internet) throw new BaseError(ErrorCodes.INTERNET_NOT_ENABLED, 'Internet is disabled! Please enable internet and try again ');
|
|
100
88
|
}
|
|
101
|
-
|
|
102
89
|
}
|
|
103
90
|
//# sourceMappingURL=SdkUtils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["remoteConfig","Logger","LOG_TYPE","FileSystem","NativeModules","Location","NetworkUtil","BaseError","ErrorCodes","DispatchSdkUtils","DispatchUtilsInterface","SdkUtils","getRemoteConfig","expiration","Promise","resolve","reject","fetch","fetchAndActivate","then","fetchedRemotely","config","getAll","getInstance","logEvent","SDK_INFO","catch","err","error","downloadAPK","apkURL","version","callback","fileUri","cacheDirectory","fileInfo","getInfoAsync","currentDate","Date","toLocaleDateString","fileDate","modificationTime","exists","uri","downloadResumable","createDownloadResumable","downloadResult","downloadAsync","deleteApk","deleteAsync","openAPKFile","openAndInstallApk","openAppSettings","openSettings","message","SDK_ERROR","checkMandatory","dateTimeCheck","isAutomaticDateTimeEnabled","SYSTEM_TIME_CHECK_FAILED","enableNetworkProviderAsync","locationServicesCheck","hasServicesEnabledAsync","foregroundLocation","requestForegroundPermissionsAsync","bgLocation","requestBackgroundPermissionsAsync","LOCATION_OR_GPS_NOT_ENABLED","internet","isAvailableAsync","INTERNET_NOT_ENABLED"],"sources":["SdkUtils.ts"],"sourcesContent":["import remoteConfig from '@react-native-firebase/remote-config';\nimport Logger, { LOG_TYPE } from './Logger';\nimport type { DownloadProgressData } from 'expo-file-system';\nimport * as FileSystem from 'expo-file-system';\nimport { NativeModules } from 'react-native';\nimport * as Location from 'expo-location';\nimport NetworkUtil from './NetworkUtil';\nimport { BaseError } from '../errors/BaseError';\nimport ErrorCodes from '../errors/ErrorCodes';\n\nconst { DispatchSdkUtils } = NativeModules;\n\ninterface DispatchUtilsInterface {\n openAndInstallApk(apkUri: String): Promise<boolean>;\n openSettings(): Promise<boolean>;\n showAndroidDialog(\n title: string,\n message: string,\n positiveText: string,\n negativeText: string | null,\n cancelable: boolean\n ): Promise<boolean>;\n isAutomaticDateTimeEnabled(): Promise<boolean>;\n}\n\nexport { DispatchSdkUtils as DispatchUtilsInterface };\n\nexport default class SdkUtils {\n /**\n * number of seconds to cache the firebase config\n * @param expiration\n */\n static async getRemoteConfig(expiration: number): Promise<any> {\n return new Promise(async (resolve, reject) => {\n try {\n await remoteConfig().fetch(expiration);\n remoteConfig()\n .fetchAndActivate()\n .then((fetchedRemotely) => {\n let config = remoteConfig().getAll();\n if (fetchedRemotely) {\n Logger.getInstance().logEvent(\n 'Remote Config',\n 'Configs were retrieved from the backend and activated.',\n LOG_TYPE.SDK_INFO\n );\n resolve(config);\n } else {\n Logger.getInstance().logEvent(\n 'Remote Config',\n 'No configs were fetched from the backend, and the local configs were already activated',\n LOG_TYPE.SDK_INFO\n );\n resolve(config);\n }\n })\n .catch((err) => {\n reject(err);\n });\n } catch (error: any) {\n reject(error);\n }\n });\n }\n\n /**\n * Function to download apk file from a public URL\n * @param apkURL - URL where apk is hosted\n * @param version - expected version of apk (used for naming the file)\n * @param callback - callback for getting progress of download\n */\n public static async downloadAPK(\n apkURL: string,\n version: string,\n callback: (progress: DownloadProgressData) => any\n ): Promise<string | undefined> {\n const fileUri = FileSystem.cacheDirectory + `${version}.apk`;\n const fileInfo = await FileSystem.getInfoAsync(fileUri);\n const currentDate = new Date().toLocaleDateString();\n const fileDate = new Date(\n fileInfo.modificationTime ? fileInfo.modificationTime * 1000 : 0\n ).toLocaleDateString();\n if (fileInfo.exists && currentDate === fileDate) {\n return fileInfo.uri;\n }\n const downloadResumable = FileSystem.createDownloadResumable(\n apkURL,\n FileSystem.cacheDirectory + `${version}.apk`,\n {},\n callback\n );\n const downloadResult = await downloadResumable.downloadAsync();\n return downloadResult?.uri;\n }\n\n /**\n * Opens & Install an APK file\n * @param uri - source of apk file\n */\n public static async deleteApk(version: string) {\n await FileSystem.deleteAsync(FileSystem.cacheDirectory + `${version}.apk`);\n }\n\n public static async openAPKFile(uri: string) {\n return await (DispatchSdkUtils as DispatchUtilsInterface).openAndInstallApk(\n uri\n );\n }\n\n public static openAppSettings() {\n (DispatchSdkUtils as DispatchUtilsInterface)\n .openSettings()\n .then()\n .catch((error) => {\n Logger.getInstance().logEvent(\n 'Intent error',\n error.message,\n LOG_TYPE.SDK_ERROR\n );\n });\n }\n\n public static async checkMandatory() {\n const dateTimeCheck = await (\n DispatchSdkUtils as DispatchUtilsInterface\n ).isAutomaticDateTimeEnabled();\n if (!dateTimeCheck) {\n throw new BaseError(\n ErrorCodes.SYSTEM_TIME_CHECK_FAILED,\n 'Automatic date/time not enabled!'\n );\n }\n await Location.enableNetworkProviderAsync();\n let locationServicesCheck = await Location.hasServicesEnabledAsync();\n const foregroundLocation =\n await Location.requestForegroundPermissionsAsync();\n const bgLocation = await Location.requestBackgroundPermissionsAsync();\n if (!(locationServicesCheck && foregroundLocation && bgLocation)) {\n throw new BaseError(\n ErrorCodes.LOCATION_OR_GPS_NOT_ENABLED,\n 'Location or GPS not enabled'\n );\n }\n let internet = await NetworkUtil.isAvailableAsync();\n if (!internet)\n throw new BaseError(\n ErrorCodes.INTERNET_NOT_ENABLED,\n 'Internet is disabled! Please enable internet and try again '\n );\n }\n}\n"],"mappings":"AAAA,OAAOA,
|
|
1
|
+
{"version":3,"names":["remoteConfig","Logger","LOG_TYPE","FileSystem","NativeModules","Location","NetworkUtil","BaseError","ErrorCodes","DispatchSdkUtils","DispatchUtilsInterface","SdkUtils","getRemoteConfig","expiration","Promise","resolve","reject","fetch","fetchAndActivate","then","fetchedRemotely","config","getAll","getInstance","logEvent","SDK_INFO","catch","err","error","downloadAPK","apkURL","version","callback","fileUri","cacheDirectory","fileInfo","getInfoAsync","currentDate","Date","toLocaleDateString","fileDate","modificationTime","exists","uri","downloadResumable","createDownloadResumable","downloadResult","downloadAsync","deleteApk","deleteAsync","openAPKFile","openAndInstallApk","openAppSettings","openSettings","message","SDK_ERROR","checkMandatory","dateTimeCheck","isAutomaticDateTimeEnabled","SYSTEM_TIME_CHECK_FAILED","enableNetworkProviderAsync","locationServicesCheck","hasServicesEnabledAsync","foregroundLocation","requestForegroundPermissionsAsync","bgLocation","requestBackgroundPermissionsAsync","LOCATION_OR_GPS_NOT_ENABLED","internet","isAvailableAsync","INTERNET_NOT_ENABLED"],"sources":["SdkUtils.ts"],"sourcesContent":["import remoteConfig from '@react-native-firebase/remote-config';\nimport Logger, { LOG_TYPE } from './Logger';\nimport type { DownloadProgressData } from 'expo-file-system';\nimport * as FileSystem from 'expo-file-system';\nimport { NativeModules } from 'react-native';\nimport * as Location from 'expo-location';\nimport NetworkUtil from './NetworkUtil';\nimport { BaseError } from '../errors/BaseError';\nimport ErrorCodes from '../errors/ErrorCodes';\n\nconst { DispatchSdkUtils } = NativeModules;\n\ninterface DispatchUtilsInterface {\n openAndInstallApk(apkUri: String): Promise<boolean>;\n openSettings(): Promise<boolean>;\n showAndroidDialog(\n title: string,\n message: string,\n positiveText: string,\n negativeText: string | null,\n cancelable: boolean\n ): Promise<boolean>;\n isAutomaticDateTimeEnabled(): Promise<boolean>;\n}\n\nexport { DispatchSdkUtils as DispatchUtilsInterface };\n\nexport default class SdkUtils {\n /**\n * number of seconds to cache the firebase config\n * @param expiration\n */\n static async getRemoteConfig(expiration: number): Promise<any> {\n return new Promise(async (resolve, reject) => {\n try {\n await remoteConfig().fetch(expiration);\n remoteConfig()\n .fetchAndActivate()\n .then((fetchedRemotely) => {\n let config = remoteConfig().getAll();\n if (fetchedRemotely) {\n Logger.getInstance().logEvent(\n 'Remote Config',\n 'Configs were retrieved from the backend and activated.',\n LOG_TYPE.SDK_INFO\n );\n resolve(config);\n } else {\n Logger.getInstance().logEvent(\n 'Remote Config',\n 'No configs were fetched from the backend, and the local configs were already activated',\n LOG_TYPE.SDK_INFO\n );\n resolve(config);\n }\n })\n .catch((err) => {\n reject(err);\n });\n } catch (error: any) {\n reject(error);\n }\n });\n }\n\n /**\n * Function to download apk file from a public URL\n * @param apkURL - URL where apk is hosted\n * @param version - expected version of apk (used for naming the file)\n * @param callback - callback for getting progress of download\n */\n public static async downloadAPK(\n apkURL: string,\n version: string,\n callback: (progress: DownloadProgressData) => any\n ): Promise<string | undefined> {\n const fileUri = FileSystem.cacheDirectory + `${version}.apk`;\n const fileInfo = await FileSystem.getInfoAsync(fileUri);\n const currentDate = new Date().toLocaleDateString();\n const fileDate = new Date(\n fileInfo.modificationTime ? fileInfo.modificationTime * 1000 : 0\n ).toLocaleDateString();\n if (fileInfo.exists && currentDate === fileDate) {\n return fileInfo.uri;\n }\n const downloadResumable = FileSystem.createDownloadResumable(\n apkURL,\n FileSystem.cacheDirectory + `${version}.apk`,\n {},\n callback\n );\n const downloadResult = await downloadResumable.downloadAsync();\n return downloadResult?.uri;\n }\n\n /**\n * Opens & Install an APK file\n * @param uri - source of apk file\n */\n public static async deleteApk(version: string) {\n await FileSystem.deleteAsync(FileSystem.cacheDirectory + `${version}.apk`);\n }\n\n public static async openAPKFile(uri: string) {\n return await (DispatchSdkUtils as DispatchUtilsInterface).openAndInstallApk(\n uri\n );\n }\n\n public static openAppSettings() {\n (DispatchSdkUtils as DispatchUtilsInterface)\n .openSettings()\n .then()\n .catch((error) => {\n Logger.getInstance().logEvent(\n 'Intent error',\n error.message,\n LOG_TYPE.SDK_ERROR\n );\n });\n }\n\n public static async checkMandatory() {\n const dateTimeCheck = await (\n DispatchSdkUtils as DispatchUtilsInterface\n ).isAutomaticDateTimeEnabled();\n if (!dateTimeCheck) {\n throw new BaseError(\n ErrorCodes.SYSTEM_TIME_CHECK_FAILED,\n 'Automatic date/time not enabled!'\n );\n }\n await Location.enableNetworkProviderAsync();\n let locationServicesCheck = await Location.hasServicesEnabledAsync();\n const foregroundLocation =\n await Location.requestForegroundPermissionsAsync();\n const bgLocation = await Location.requestBackgroundPermissionsAsync();\n if (!(locationServicesCheck && foregroundLocation && bgLocation)) {\n throw new BaseError(\n ErrorCodes.LOCATION_OR_GPS_NOT_ENABLED,\n 'Location or GPS not enabled'\n );\n }\n let internet = await NetworkUtil.isAvailableAsync();\n if (!internet)\n throw new BaseError(\n ErrorCodes.INTERNET_NOT_ENABLED,\n 'Internet is disabled! Please enable internet and try again '\n );\n }\n}\n"],"mappings":"AAAA,OAAOA,YAAY,MAAM,sCAAsC;AAC/D,OAAOC,MAAM,IAAIC,QAAQ,QAAQ,UAAU;AAE3C,OAAO,KAAKC,UAAU,MAAM,kBAAkB;AAC9C,SAASC,aAAa,QAAQ,cAAc;AAC5C,OAAO,KAAKC,QAAQ,MAAM,eAAe;AACzC,OAAOC,WAAW,MAAM,eAAe;AACvC,SAASC,SAAS,QAAQ,qBAAqB;AAC/C,OAAOC,UAAU,MAAM,sBAAsB;AAE7C,MAAM;EAAEC;AAAiB,CAAC,GAAGL,a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