@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
|
@@ -4,261 +4,265 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _SyncManagerUtils = require("../../utils/SyncManagerUtils");
|
|
9
|
-
|
|
10
|
-
var _storage = _interopRequireDefault(require("../../utils/storage"));
|
|
11
|
-
|
|
12
|
-
var _mobileExecutionLib = require("mobile-execution-lib");
|
|
13
|
-
|
|
8
|
+
var _platformCoreosExecutionEngineSdk = require("@os1-platform/platform-coreos-execution-engine-sdk");
|
|
14
9
|
var _Toaster = require("../../components/widgets/Toaster");
|
|
15
|
-
|
|
16
10
|
var _ETConfig = require("../../models/execTasks/ETConfig");
|
|
17
|
-
|
|
18
11
|
var _EventsSyncManager = _interopRequireDefault(require("../syncmanager/events/EventsSyncManager"));
|
|
19
|
-
|
|
20
12
|
var _Logger = _interopRequireWildcard(require("../../utils/Logger"));
|
|
21
|
-
|
|
22
13
|
var _DispatchSdkCache = _interopRequireDefault(require("../sdk/DispatchSdkCache"));
|
|
23
|
-
|
|
24
14
|
var _BaseError = require("../../errors/BaseError");
|
|
25
|
-
|
|
26
15
|
var _ExecTaskUtils = require("../../utils/ExecTaskUtils");
|
|
27
|
-
|
|
28
16
|
var _ReasonCodeContainer = _interopRequireDefault(require("../dispatchCodes/ReasonCodeContainer"));
|
|
29
|
-
|
|
30
17
|
var _ErrorCodes = _interopRequireWildcard(require("../../errors/ErrorCodes"));
|
|
31
|
-
|
|
32
18
|
var _RouteParams = require("../../ui/uiConfig/RouteParams");
|
|
33
|
-
|
|
34
19
|
var _lodash = require("lodash");
|
|
35
|
-
|
|
20
|
+
var _EventDispatcher = _interopRequireDefault(require("../../events/EventDispatcher"));
|
|
21
|
+
var _EventCodeContainer = _interopRequireDefault(require("../dispatchCodes/EventCodeContainer"));
|
|
22
|
+
var _constants = require("../../constants/constants");
|
|
23
|
+
var _AppSyncManager = _interopRequireDefault(require("../syncmanager/AppSyncManager"));
|
|
24
|
+
var _constants2 = require("../syncmanager/constants");
|
|
25
|
+
var _storage = _interopRequireDefault(require("../../utils/storage"));
|
|
26
|
+
var _utils = require("../../components/executiontasks/scan/utils");
|
|
36
27
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
37
|
-
|
|
38
28
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
39
|
-
|
|
40
29
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
41
|
-
|
|
42
|
-
function
|
|
43
|
-
|
|
30
|
+
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; }
|
|
31
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
32
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } // NEW CODE
|
|
44
33
|
class DispatchStateContainer {
|
|
45
34
|
constructor() {
|
|
46
|
-
_defineProperty(this, "
|
|
47
|
-
|
|
35
|
+
_defineProperty(this, "cacheKeys", _DispatchSdkCache.default.KEYS);
|
|
36
|
+
_defineProperty(this, "cache", _DispatchSdkCache.default.getInstance());
|
|
48
37
|
_defineProperty(this, "successRoute", null);
|
|
49
|
-
|
|
50
38
|
_defineProperty(this, "failureRoute", null);
|
|
51
|
-
|
|
52
39
|
_defineProperty(this, "_stateKeys", []);
|
|
53
|
-
|
|
54
40
|
_defineProperty(this, "_jobObjectives", null);
|
|
55
|
-
|
|
56
41
|
_defineProperty(this, "_mappedStates", new Map());
|
|
57
|
-
|
|
58
|
-
_defineProperty(this, "saveAndProceedToNextET", (0, _lodash.debounce)(async (baseETProps, etOutput,
|
|
42
|
+
_defineProperty(this, "_mappedStatesData", new Map());
|
|
43
|
+
_defineProperty(this, "saveAndProceedToNextET", (0, _lodash.debounce)(async (baseETProps, etOutput, states, navigation, isLastTask, isMergedObjectiveBasedOutput) => {
|
|
59
44
|
try {
|
|
60
|
-
await this.sendETOutput(etOutput,
|
|
61
|
-
await this.moveToNextET(baseETProps,
|
|
45
|
+
await this.sendETOutput(etOutput, states, isMergedObjectiveBasedOutput);
|
|
46
|
+
await this.moveToNextET(etOutput, baseETProps, states, navigation, isLastTask);
|
|
62
47
|
} catch (error) {
|
|
63
48
|
_Logger.default.getInstance().logEvent('saveAndProceed', error.message, _Logger.LOG_TYPE.SDK_ERROR);
|
|
64
|
-
|
|
65
49
|
baseETProps.showProgress(false);
|
|
66
50
|
(0, _Toaster.showToast)(error.message);
|
|
67
51
|
}
|
|
68
52
|
}, 800));
|
|
69
53
|
}
|
|
70
|
-
|
|
71
54
|
get stateKeys() {
|
|
72
55
|
return this._stateKeys;
|
|
73
56
|
}
|
|
74
|
-
|
|
75
57
|
set stateKeys(value) {
|
|
76
58
|
this._stateKeys = value;
|
|
77
59
|
}
|
|
78
|
-
|
|
79
60
|
get mappedStates() {
|
|
80
61
|
return this._mappedStates;
|
|
81
62
|
}
|
|
82
|
-
|
|
83
63
|
set mappedStates(value) {
|
|
84
64
|
this._mappedStates = value;
|
|
85
65
|
}
|
|
86
|
-
|
|
87
66
|
/**
|
|
88
67
|
* Call this function when dispatch data is fetched successfully in client app
|
|
89
68
|
* @param dispatchID
|
|
90
69
|
* @param jobs
|
|
91
|
-
* @param
|
|
70
|
+
* @param dispatchWorkflows
|
|
92
71
|
* @param maxTaskReattempt
|
|
93
72
|
*/
|
|
94
|
-
async initDispatchExecutor(dispatchID, jobs,
|
|
95
|
-
if (!dispatchID || !jobs || jobs.length < 1) {
|
|
73
|
+
async initDispatchExecutor(dispatchID, jobs, dispatchWorkflows, maxTaskReattempt) {
|
|
74
|
+
if (!dispatchID || !jobs || jobs.length < 1 || !dispatchWorkflows || Object.keys(dispatchWorkflows).length < 1) {
|
|
96
75
|
_Logger.default.getInstance().logEvent('initDispatchExecutor', _ErrorCodes.InvalidArgumentsError, _Logger.LOG_TYPE.SDK_WARNING);
|
|
97
|
-
|
|
98
76
|
throw new _BaseError.BaseError(_ErrorCodes.default.InvalidArgumentError, _ErrorCodes.InvalidArgumentsError);
|
|
99
77
|
}
|
|
100
|
-
|
|
101
|
-
let storage = _storage.default.getInstance();
|
|
102
|
-
|
|
103
78
|
await (0, _SyncManagerUtils.clearCache)(dispatchID);
|
|
104
79
|
await _DispatchSdkCache.default.getInstance().setKeyInCache(_DispatchSdkCache.default.KEYS.DISPATCH_ID, dispatchID);
|
|
105
80
|
await (0, _SyncManagerUtils.createFmsFolder)(dispatchID);
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
81
|
+
|
|
82
|
+
// NEW CODE
|
|
83
|
+
let storage = _storage.default.getInstance();
|
|
84
|
+
const sharedPreferenceDispatchId = await storage.getSharedItem(_constants2.SHARED_PREFERENCE_DISPATCH_ID);
|
|
85
|
+
if (sharedPreferenceDispatchId) {
|
|
86
|
+
if (sharedPreferenceDispatchId !== dispatchID) {
|
|
87
|
+
await Promise.all([storage.setSharedItem(_constants2.SHARED_PREFERENCE_DISPATCH_ID, dispatchID), storage.setSharedItem(_constants2.LAST_SYNCED_EVENT_ID, '0')]);
|
|
88
|
+
}
|
|
89
|
+
} else {
|
|
90
|
+
await Promise.all([storage.setSharedItem(_constants2.SHARED_PREFERENCE_DISPATCH_ID, dispatchID), storage.setSharedItem(_constants2.LAST_SYNCED_EVENT_ID, '0')]);
|
|
91
|
+
}
|
|
92
|
+
await _platformCoreosExecutionEngineSdk.DispatchExecutor.start(dispatchID, jobs, dispatchWorkflows, {
|
|
93
|
+
maxTaskReattempt,
|
|
94
|
+
eventSyncBatchSize: _constants2.BULK_DATA_LIMIT
|
|
118
95
|
});
|
|
119
96
|
}
|
|
120
97
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
98
|
+
// NEW CODE
|
|
99
|
+
/**
|
|
100
|
+
*
|
|
101
|
+
* @param mergedObjectiveId
|
|
102
|
+
* @returns IExecutionTaskQueryResponse {
|
|
103
|
+
* mergedObjectiveId: string;
|
|
104
|
+
* taskName: string;
|
|
105
|
+
* taskId: string;
|
|
106
|
+
* input: any;
|
|
107
|
+
* }
|
|
108
|
+
*/
|
|
124
109
|
|
|
110
|
+
async queryNextET(mergedObjectiveId, statusFilter) {
|
|
111
|
+
if (!mergedObjectiveId) {
|
|
112
|
+
_Logger.default.getInstance().logEvent('queryNextET', 'CONSTRAINTS FAILED', _Logger.LOG_TYPE.SDK_ERROR);
|
|
125
113
|
throw new _BaseError.BaseError(_ErrorCodes.default.MERGING_ERROR, 'CONSTRAINTS FAILED');
|
|
126
114
|
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
}), _Logger.LOG_TYPE.SDK_ERROR);
|
|
115
|
+
return await _platformCoreosExecutionEngineSdk.DispatchExecutor.getNextTask(mergedObjectiveId[0], statusFilter);
|
|
116
|
+
}
|
|
117
|
+
async updateScanETOutputSharedPreference(etOutput, prefixedMergedObjectiveId, prefixKey) {
|
|
118
|
+
etOutput.mergedObjectiveIds = prefixedMergedObjectiveId;
|
|
119
|
+
let storage = _storage.default.getInstance();
|
|
120
|
+
const output = await storage.getSharedItem(_constants2.SHARED_PREFERENCE_SCAN_OUTPUT);
|
|
121
|
+
if (output) {
|
|
122
|
+
const scanETOutput = JSON.parse(output);
|
|
123
|
+
let _scanETOutput = {};
|
|
124
|
+
if (scanETOutput[prefixKey]) {
|
|
125
|
+
_scanETOutput = scanETOutput[prefixKey];
|
|
139
126
|
}
|
|
127
|
+
prefixedMergedObjectiveId.forEach(mergedId => {
|
|
128
|
+
_scanETOutput[mergedId] = etOutput;
|
|
129
|
+
});
|
|
140
130
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
131
|
+
// SAVE IN SHARED PREFERENCE
|
|
132
|
+
await storage.setSharedItem(_constants2.SHARED_PREFERENCE_SCAN_OUTPUT, JSON.stringify({
|
|
133
|
+
...scanETOutput,
|
|
134
|
+
[prefixKey]: _scanETOutput
|
|
135
|
+
}));
|
|
136
|
+
} else {
|
|
137
|
+
const scanETOutput = {};
|
|
138
|
+
prefixedMergedObjectiveId.forEach(mergedId => {
|
|
139
|
+
scanETOutput[mergedId] = etOutput;
|
|
140
|
+
});
|
|
141
|
+
// SAVE IN SHARED PREFERENCE
|
|
142
|
+
await storage.setSharedItem(_constants2.SHARED_PREFERENCE_SCAN_OUTPUT, JSON.stringify({
|
|
143
|
+
[prefixKey]: scanETOutput
|
|
144
|
+
}));
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
async updatePendingSharedPreference(eventType, prefixedMergedObjectiveId, prefixKey) {
|
|
148
|
+
let storage = _storage.default.getInstance();
|
|
149
|
+
const mergedIdOutput = await storage.getSharedItem(_constants2.SCAN_MERGED_OBJ_ID_OUTPUT);
|
|
150
|
+
if (mergedIdOutput) {
|
|
151
|
+
const mergedIds = JSON.parse(mergedIdOutput);
|
|
152
|
+
const _mergedIds = mergedIds[prefixKey];
|
|
153
|
+
if (_mergedIds) {
|
|
154
|
+
if (eventType) {
|
|
155
|
+
_mergedIds.success.push(...prefixedMergedObjectiveId);
|
|
156
|
+
_mergedIds.pending = [];
|
|
150
157
|
} else {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
this._mappedStates.set(nState.taskId, [{
|
|
154
|
-
nextState: nState,
|
|
155
|
-
objRef: o.objectiveId,
|
|
156
|
-
jobId: o.jobId
|
|
157
|
-
}]);
|
|
158
|
+
_mergedIds.failure.push(...prefixedMergedObjectiveId);
|
|
159
|
+
_mergedIds.pending = [];
|
|
158
160
|
}
|
|
161
|
+
await storage.setSharedItem(_constants2.SCAN_MERGED_OBJ_ID_OUTPUT, JSON.stringify({
|
|
162
|
+
...mergedIds,
|
|
163
|
+
[prefixKey]: _mergedIds
|
|
164
|
+
}));
|
|
159
165
|
}
|
|
160
166
|
}
|
|
161
|
-
|
|
162
|
-
const taskID = this._stateKeys.pop();
|
|
163
|
-
|
|
164
|
-
if (taskID) {
|
|
165
|
-
const nextStates = this._mappedStates.get(taskID);
|
|
166
|
-
|
|
167
|
-
this._mappedStates.delete(taskID);
|
|
168
|
-
|
|
169
|
-
return nextStates ?? [];
|
|
170
|
-
} else return null;
|
|
171
167
|
}
|
|
172
168
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
169
|
+
// NEW CODE
|
|
170
|
+
async sendETOutput(etOutput, states, isMergedObjectiveBasedOutput) {
|
|
171
|
+
const mergedObjectiveIds = states[_RouteParams.RouteParams.NEXT_STATES].mergedObjectiveIds;
|
|
172
|
+
const taskName = states[_RouteParams.RouteParams.NEXT_STATES].taskName;
|
|
173
|
+
const taskID = states[_RouteParams.RouteParams.NEXT_STATES].taskId;
|
|
174
|
+
const input = states[_RouteParams.RouteParams.NEXT_STATES].input;
|
|
175
|
+
let lockTaskResponse = true;
|
|
176
|
+
if (isMergedObjectiveBasedOutput) {
|
|
177
|
+
// NEW CODE
|
|
178
|
+
const output = etOutput;
|
|
179
|
+
let promises = [];
|
|
180
|
+
const prefixKey = this.findPrefixKey(mergedObjectiveIds, etOutput, states);
|
|
181
|
+
let defaultConfig = {
|
|
182
|
+
index: -1,
|
|
183
|
+
success: false,
|
|
184
|
+
output: {}
|
|
185
|
+
};
|
|
186
|
+
let mergedIds = {
|
|
187
|
+
success: [],
|
|
188
|
+
failure: [],
|
|
189
|
+
pending: [prefixKey]
|
|
190
|
+
};
|
|
191
|
+
const filterIds = await (0, _utils.getScanMergedObjectID)();
|
|
192
|
+
if (filterIds) {
|
|
193
|
+
mergedIds = filterIds[prefixKey];
|
|
194
|
+
}
|
|
195
|
+
Object.keys(etOutput).forEach(mergedObjectiveId => {
|
|
196
|
+
const _output = output[mergedObjectiveId].output;
|
|
197
|
+
// PREFIX_KEY
|
|
198
|
+
if (mergedObjectiveId === 'default') {
|
|
199
|
+
const defaultOutput = output['default'].output;
|
|
200
|
+
// DELIVER AT DIFF LOCATION
|
|
201
|
+
if (defaultOutput.eventCode === _constants.REASON_NOT_USED) {
|
|
202
|
+
// DO NOT SEND OUTPUT WHEN DELIVER AT DIFF LOCATION
|
|
203
|
+
defaultOutput.eventCode = '';
|
|
204
|
+
defaultOutput.reasonCode = '';
|
|
205
|
+
lockTaskResponse = false;
|
|
206
|
+
} else {
|
|
207
|
+
defaultConfig = {
|
|
208
|
+
index: promises.length,
|
|
209
|
+
success: defaultOutput.success,
|
|
210
|
+
output: output['default']
|
|
211
|
+
};
|
|
212
|
+
promises.push(_platformCoreosExecutionEngineSdk.DispatchExecutor.saveTaskOutput(mergedIds.pending, taskName, taskID, {
|
|
213
|
+
input,
|
|
214
|
+
output: defaultOutput
|
|
215
|
+
}, {
|
|
216
|
+
ec: defaultOutput.eventCode,
|
|
217
|
+
rc: defaultOutput.reasonCode || ''
|
|
218
|
+
}));
|
|
219
|
+
}
|
|
220
|
+
} else {
|
|
221
|
+
promises.push(_platformCoreosExecutionEngineSdk.DispatchExecutor.saveTaskOutput([mergedObjectiveId], taskName, taskID, {
|
|
222
|
+
input,
|
|
223
|
+
output: _output
|
|
224
|
+
}));
|
|
225
|
+
}
|
|
178
226
|
});
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
(
|
|
183
|
-
|
|
184
|
-
(0, _Toaster.showToast)('ENGINE NOT READY! Please Try again after some time');
|
|
185
|
-
} else if (error instanceof _mobileExecutionLib.ObjectiveNotFoundError) {
|
|
186
|
-
(0, _Toaster.showToast)('NO SUCH OBJECTIVE FOUND');
|
|
187
|
-
} else if (error instanceof _mobileExecutionLib.ObjectiveNotReadyError) {
|
|
188
|
-
(0, _Toaster.showToast)('OBJECTIVE NOT READY');
|
|
189
|
-
} else if (error instanceof _mobileExecutionLib.ObjectiveJobAlreadyCompletedError) {
|
|
190
|
-
(0, _Toaster.showToast)('OBJECTIVE CANNOT BE ATTEMPTED');
|
|
191
|
-
} else if (error instanceof _mobileExecutionLib.JobStatusInvalidError || error instanceof _mobileExecutionLib.JobNotFoundError || error instanceof _mobileExecutionLib.EmptyJobError || error instanceof _mobileExecutionLib.ETIdInvalidError) {
|
|
192
|
-
(0, _Toaster.showToast)('INVALID JOB');
|
|
227
|
+
const response = await Promise.all(promises);
|
|
228
|
+
if (defaultConfig.index !== -1) {
|
|
229
|
+
// UPDATE PENDING IN SHARED PREFERENCE MERGED_SCAN_OUTPUT
|
|
230
|
+
this.updatePendingSharedPreference(defaultConfig.success, response[defaultConfig.index], prefixKey);
|
|
231
|
+
this.updateScanETOutputSharedPreference(defaultConfig.output, response[defaultConfig.index], prefixKey);
|
|
193
232
|
}
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
async queryObjective(objRef, jobID) {
|
|
200
|
-
return await this.dispatchExecutor.queryObjectiveState(objRef, jobID);
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
async sendETOutput(etOutput, etState) {
|
|
204
|
-
if (!etState || etState.length === 0) {
|
|
205
|
-
_Logger.default.getInstance().logEvent('sendETOutput', 'CONSTRAINTS FAILED', _Logger.LOG_TYPE.SDK_ERROR);
|
|
206
|
-
|
|
207
|
-
return;
|
|
233
|
+
} else {
|
|
234
|
+
await _platformCoreosExecutionEngineSdk.DispatchExecutor.saveTaskOutput(mergedObjectiveIds, taskName, taskID, {
|
|
235
|
+
input,
|
|
236
|
+
output: etOutput
|
|
237
|
+
});
|
|
208
238
|
}
|
|
209
|
-
|
|
210
|
-
const promises = [];
|
|
211
|
-
etState.forEach(objItem => {
|
|
212
|
-
if (objItem.nextState.taskId === _ETConfig.ExecutionTaskID.DELIVER_CASH) {
|
|
213
|
-
var _objItem$nextState$da, _objItem$nextState$da2;
|
|
214
|
-
|
|
215
|
-
etOutput.amount = (_objItem$nextState$da = objItem.nextState.data) === null || _objItem$nextState$da === void 0 ? void 0 : (_objItem$nextState$da2 = _objItem$nextState$da.input) === null || _objItem$nextState$da2 === void 0 ? void 0 : _objItem$nextState$da2.expectedAmount;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
objItem.nextState.data.output = { ...etOutput
|
|
219
|
-
};
|
|
220
|
-
promises.push(this.dispatchExecutor.lockObjectiveState(objItem.objRef, objItem.jobId, objItem.nextState));
|
|
221
|
-
});
|
|
222
|
-
await Promise.all(promises);
|
|
223
239
|
}
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
240
|
+
findPrefixKey(mergedObjectiveIds, scanOutput, routeParams) {
|
|
241
|
+
const prefixedMergedObjectiveId = routeParams[_RouteParams.RouteParams.ROOT_META_DATA].prefixedMergedObjectiveId;
|
|
242
|
+
return prefixedMergedObjectiveId;
|
|
227
243
|
}
|
|
228
|
-
|
|
229
244
|
static getInstance() {
|
|
230
245
|
if (!DispatchStateContainer.instance) {
|
|
231
246
|
DispatchStateContainer.instance = new DispatchStateContainer();
|
|
232
247
|
}
|
|
233
|
-
|
|
234
248
|
return DispatchStateContainer.instance;
|
|
235
249
|
}
|
|
236
|
-
|
|
237
|
-
fetchObjectiveState(objRef, jobID) {
|
|
238
|
-
return this.dispatchExecutor.queryObjectiveStatus(objRef, jobID);
|
|
239
|
-
}
|
|
240
|
-
|
|
241
250
|
setSuccessRoute(route) {
|
|
242
251
|
this.successRoute = route;
|
|
243
252
|
}
|
|
244
|
-
|
|
245
253
|
getSuccessRoute() {
|
|
246
254
|
return this.successRoute;
|
|
247
255
|
}
|
|
248
|
-
|
|
249
256
|
setFailureRoute(route) {
|
|
250
257
|
this.failureRoute = route;
|
|
251
258
|
}
|
|
252
|
-
|
|
253
259
|
getFailureRoute() {
|
|
254
260
|
return this.failureRoute;
|
|
255
261
|
}
|
|
256
|
-
|
|
257
262
|
async getObjectiveSummary(jobObjective) {
|
|
258
263
|
try {
|
|
259
264
|
let response = [];
|
|
260
265
|
let summaryData = await _EventsSyncManager.default.getInstance().getObjectiveSummary(jobObjective.jobId + jobObjective.objectiveId);
|
|
261
|
-
|
|
262
266
|
if (summaryData) {
|
|
263
267
|
for (const k in summaryData) {
|
|
264
268
|
if (k === 'inputs') continue;else {
|
|
@@ -271,172 +275,224 @@ class DispatchStateContainer {
|
|
|
271
275
|
});
|
|
272
276
|
}
|
|
273
277
|
}
|
|
274
|
-
|
|
275
278
|
return response;
|
|
276
279
|
} else return response;
|
|
277
280
|
} catch (error) {
|
|
278
281
|
_Logger.default.getInstance().logEvent('getObjectiveSummary', error.message, _Logger.LOG_TYPE.SDK_ERROR);
|
|
279
|
-
|
|
280
282
|
return [];
|
|
281
283
|
}
|
|
282
284
|
}
|
|
283
|
-
|
|
284
|
-
async navigateToNextTask(navigation, route, etOutput, etSuccess, entityCode, eTaskID, baseETProps, isLastTask) {
|
|
285
|
+
async navigateToNextTask(navigation, route, etOutput, etSuccess, entityCode, eTaskID, baseETProps, isLastTask, isMergeObjectiveBasedOutput) {
|
|
285
286
|
try {
|
|
286
287
|
baseETProps.showProgress(true);
|
|
287
|
-
|
|
288
|
+
const mergedObjectiveIds = route.params[_RouteParams.RouteParams.NEXT_STATES].mergedObjectiveIds;
|
|
288
289
|
const reasonsContainer = _ReasonCodeContainer.default.getInstance();
|
|
289
|
-
|
|
290
|
-
if (
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
290
|
+
const eventsContainer = _EventCodeContainer.default.getInstance();
|
|
291
|
+
if (isMergeObjectiveBasedOutput) {
|
|
292
|
+
await this.saveAndProceed(baseETProps, etOutput, route.params, navigation, isLastTask, isMergeObjectiveBasedOutput);
|
|
293
|
+
} else {
|
|
294
|
+
const _eventCode = etOutput.eventCode;
|
|
295
|
+
if (etSuccess) {
|
|
296
|
+
if (!_eventCode) {
|
|
297
|
+
const _successApplicable = route.params[_RouteParams.RouteParams.NEXT_STATES].input.applicableReasons.success;
|
|
298
|
+
const successEventCodes = await eventsContainer.getEventCodes(_successApplicable);
|
|
298
299
|
let rParams;
|
|
299
|
-
rParams = {
|
|
300
|
+
rParams = {
|
|
301
|
+
...route.params
|
|
300
302
|
};
|
|
301
303
|
rParams[_RouteParams.RouteParams.ET_SUCCESS] = true;
|
|
302
304
|
rParams[_RouteParams.RouteParams.ET_SUCCESS_RESPONSE] = etOutput;
|
|
303
305
|
rParams[_RouteParams.RouteParams.CURRENT_ET_NAME] = eTaskID;
|
|
304
|
-
rParams[_RouteParams.RouteParams.REASONS] = successCodes;
|
|
305
306
|
rParams[_RouteParams.RouteParams.IS_LAST_ET] = isLastTask;
|
|
307
|
+
rParams[_RouteParams.RouteParams.EVENT_CODES] = successEventCodes;
|
|
308
|
+
rParams[_RouteParams.RouteParams.APPLICABLE_CODES] = _successApplicable;
|
|
309
|
+
rParams[_RouteParams.RouteParams.IS_MERGED_OBJ_BASED_OUTPUT] = isMergeObjectiveBasedOutput;
|
|
310
|
+
rParams[_RouteParams.RouteParams.ROOT_META_DATA] = route.params[_RouteParams.RouteParams.ROOT_META_DATA];
|
|
311
|
+
rParams[_RouteParams.RouteParams.CANCEL_EVENT] = '';
|
|
306
312
|
navigation.replace(_ETConfig.CustomScreens.REMARK_SCREEN, rParams);
|
|
313
|
+
} else {
|
|
314
|
+
const successCodes = await reasonsContainer.getReasonCodes(route.params[_RouteParams.RouteParams.NEXT_STATES].input.applicableReasons.success ? route.params[_RouteParams.RouteParams.NEXT_STATES].input.applicableReasons.success : route.params[_RouteParams.RouteParams.NEXT_STATES].input.applicableReasons, _eventCode);
|
|
315
|
+
if (successCodes && successCodes.length > 0) {
|
|
316
|
+
if (successCodes.length === 1) {
|
|
317
|
+
if (isMergeObjectiveBasedOutput) etOutput.baseResponse.reasonCode = successCodes[0].reasonCode;else etOutput.reasonCode = successCodes[0].reasonCode;
|
|
318
|
+
await this.saveAndProceed(baseETProps, etOutput, route.params, navigation, isLastTask, isMergeObjectiveBasedOutput);
|
|
319
|
+
} else {
|
|
320
|
+
let rParams;
|
|
321
|
+
rParams = {
|
|
322
|
+
...route.params
|
|
323
|
+
};
|
|
324
|
+
rParams[_RouteParams.RouteParams.ET_SUCCESS] = true;
|
|
325
|
+
rParams[_RouteParams.RouteParams.ET_SUCCESS_RESPONSE] = etOutput;
|
|
326
|
+
rParams[_RouteParams.RouteParams.CURRENT_ET_NAME] = eTaskID;
|
|
327
|
+
rParams[_RouteParams.RouteParams.REASONS] = successCodes;
|
|
328
|
+
rParams[_RouteParams.RouteParams.IS_LAST_ET] = isLastTask;
|
|
329
|
+
rParams[_RouteParams.RouteParams.ROOT_META_DATA] = route.params[_RouteParams.RouteParams.ROOT_META_DATA];
|
|
330
|
+
rParams[_RouteParams.RouteParams.CANCEL_EVENT] = _eventCode;
|
|
331
|
+
navigation.replace(_ETConfig.CustomScreens.REMARK_SCREEN, rParams);
|
|
332
|
+
}
|
|
333
|
+
} else {
|
|
334
|
+
await this.saveAndProceed(baseETProps, etOutput, route.params, navigation, isLastTask, isMergeObjectiveBasedOutput);
|
|
335
|
+
}
|
|
307
336
|
}
|
|
308
337
|
} else {
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
if (failureCodes && failureCodes.length > 0) {
|
|
315
|
-
if (failureCodes.length === 1) {
|
|
316
|
-
await this.saveAndProceed(baseETProps, await (0, _ExecTaskUtils.getBaseETResponse)(entityCode, false, _ETConfig.BaseEventCodes.ENTITY_FAILURE, failureCodes[0].reasonCode), route.params[_RouteParams.RouteParams.NEXT_STATES], navigation, isLastTask);
|
|
317
|
-
} else {
|
|
338
|
+
let failureCodes = [];
|
|
339
|
+
if (!_eventCode) {
|
|
340
|
+
const _failureApplicable = route.params[_RouteParams.RouteParams.NEXT_STATES].input.applicableReasons.failure;
|
|
341
|
+
const failureEventCodes = await eventsContainer.getEventCodes(_failureApplicable);
|
|
318
342
|
let rParams;
|
|
319
|
-
rParams = {
|
|
343
|
+
rParams = {
|
|
344
|
+
...route.params
|
|
320
345
|
};
|
|
321
346
|
rParams[_RouteParams.RouteParams.ET_SUCCESS] = false;
|
|
347
|
+
// rParams[RouteParams.ET_SUCCESS_RESPONSE] = etOutput;
|
|
322
348
|
rParams[_RouteParams.RouteParams.CURRENT_ET_NAME] = eTaskID;
|
|
323
|
-
rParams[_RouteParams.RouteParams.REASONS] = failureCodes;
|
|
324
349
|
rParams[_RouteParams.RouteParams.IS_LAST_ET] = isLastTask;
|
|
350
|
+
rParams[_RouteParams.RouteParams.EVENT_CODES] = failureEventCodes;
|
|
351
|
+
rParams[_RouteParams.RouteParams.APPLICABLE_CODES] = _failureApplicable;
|
|
352
|
+
rParams[_RouteParams.RouteParams.ROOT_META_DATA] = route.params[_RouteParams.RouteParams.ROOT_META_DATA];
|
|
353
|
+
rParams[_RouteParams.RouteParams.CANCEL_EVENT] = '';
|
|
325
354
|
navigation.replace(_ETConfig.CustomScreens.REMARK_SCREEN, rParams);
|
|
355
|
+
} else {
|
|
356
|
+
if (_eventCode === _constants.GO_BACK_EVENT_CODE) failureCodes = [];else failureCodes = await reasonsContainer.getReasonCodes(route.params[_RouteParams.RouteParams.NEXT_STATES].input.applicableReasons.failure ? route.params[_RouteParams.RouteParams.NEXT_STATES].input.applicableReasons.failure : route.params[_RouteParams.RouteParams.NEXT_STATES].input.applicableReasons, _eventCode);
|
|
357
|
+
if (failureCodes && failureCodes.length > 0) {
|
|
358
|
+
if (isMergeObjectiveBasedOutput) etOutput.baseResponse.reasonCode = failureCodes[0].reasonCode;
|
|
359
|
+
if (failureCodes.length === 1) {
|
|
360
|
+
await this.saveAndProceed(baseETProps, isMergeObjectiveBasedOutput ? etOutput : await (0, _ExecTaskUtils.getBaseETResponse)(entityCode, false, _eventCode, failureCodes[0].reasonCode, mergedObjectiveIds, eTaskID), route.params, navigation, isLastTask, isMergeObjectiveBasedOutput);
|
|
361
|
+
} else {
|
|
362
|
+
let rParams;
|
|
363
|
+
rParams = {
|
|
364
|
+
...route.params
|
|
365
|
+
};
|
|
366
|
+
rParams[_RouteParams.RouteParams.ET_SUCCESS] = false;
|
|
367
|
+
rParams[_RouteParams.RouteParams.CURRENT_ET_NAME] = eTaskID;
|
|
368
|
+
rParams[_RouteParams.RouteParams.REASONS] = failureCodes;
|
|
369
|
+
rParams[_RouteParams.RouteParams.IS_LAST_ET] = isLastTask;
|
|
370
|
+
rParams[_RouteParams.RouteParams.ROOT_META_DATA] = route.params[_RouteParams.RouteParams.ROOT_META_DATA];
|
|
371
|
+
rParams[_RouteParams.RouteParams.CANCEL_EVENT] = _eventCode;
|
|
372
|
+
navigation.replace(_ETConfig.CustomScreens.REMARK_SCREEN, rParams);
|
|
373
|
+
}
|
|
374
|
+
} else {
|
|
375
|
+
await this.saveAndProceed(baseETProps, isMergeObjectiveBasedOutput ? etOutput : await (0, _ExecTaskUtils.getBaseETResponse)(entityCode, false, _eventCode, '', mergedObjectiveIds, eTaskID), route.params, navigation, isLastTask, isMergeObjectiveBasedOutput);
|
|
376
|
+
}
|
|
326
377
|
}
|
|
327
|
-
} else {
|
|
328
|
-
await this.saveAndProceed(baseETProps, await (0, _ExecTaskUtils.getBaseETResponse)(entityCode, false, _ETConfig.BaseEventCodes.ENTITY_FAILURE, ''), route.params[_RouteParams.RouteParams.NEXT_STATES], navigation, isLastTask);
|
|
329
378
|
}
|
|
330
379
|
}
|
|
331
380
|
} catch (error) {
|
|
332
381
|
baseETProps.showProgress(false);
|
|
333
|
-
|
|
334
382
|
_Logger.default.getInstance().logEvent('navigateToNextTask', error.message, _Logger.LOG_TYPE.SDK_ERROR);
|
|
335
383
|
}
|
|
336
384
|
}
|
|
337
|
-
|
|
338
|
-
getJobObjectiveList(nextStates) {
|
|
339
|
-
const result = [];
|
|
340
|
-
nextStates.forEach(s => {
|
|
341
|
-
result.push({
|
|
342
|
-
jobId: s.jobId,
|
|
343
|
-
objectiveId: s.objRef
|
|
344
|
-
});
|
|
345
|
-
});
|
|
346
|
-
return result;
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
async moveToNextET(baseETProps, etStates, navigation, isLastTask) {
|
|
385
|
+
async moveToNextET(etOutput, baseETProps, states, navigation, isLastTask) {
|
|
350
386
|
try {
|
|
387
|
+
let etStates = states.next_states;
|
|
351
388
|
baseETProps.showProgress(true);
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
if (this._stateKeys.length !== 0) {
|
|
389
|
+
if (isLastTask && etStates && Object.keys(etStates).length > 0) {
|
|
390
|
+
if (this._mappedStates.size && this._stateKeys.length) {
|
|
355
391
|
const st = this._stateKeys.pop();
|
|
356
|
-
|
|
357
392
|
if (st) {
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
let nextStateList = this._mappedStates.get(st);
|
|
361
|
-
|
|
393
|
+
let rParams = {};
|
|
394
|
+
const _stData = this._mappedStates.get(st);
|
|
362
395
|
this._mappedStates.delete(st);
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
navigation.replace(nextStateList[0].nextState.taskId, rParams);
|
|
396
|
+
if (_stData) {
|
|
397
|
+
rParams[_RouteParams.RouteParams.NEXT_STATES] = _stData;
|
|
398
|
+
rParams[_RouteParams.RouteParams.ROOT_META_DATA] = states.rootMetaData;
|
|
399
|
+
navigation.replace(_stData.taskId, rParams);
|
|
368
400
|
}
|
|
369
|
-
|
|
370
|
-
return;
|
|
371
401
|
}
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
let nextState = etStates[0];
|
|
375
|
-
let completeJobsSummary = [];
|
|
376
|
-
let objSummary = await this.getObjectiveSummary({
|
|
377
|
-
jobId: etStates[0].jobId,
|
|
378
|
-
objectiveId: etStates[0].objRef
|
|
379
|
-
});
|
|
380
|
-
completeJobsSummary.push({
|
|
381
|
-
jobId: etStates[0].jobId,
|
|
382
|
-
objectiveRef: etStates[0].objRef,
|
|
383
|
-
jobObjectiveSummary: objSummary
|
|
384
|
-
});
|
|
385
|
-
|
|
386
|
-
for (let i = 1; i < etStates.length; i++) {
|
|
387
|
-
let obs = await this.getObjectiveSummary({
|
|
388
|
-
jobId: etStates[i].jobId,
|
|
389
|
-
objectiveId: etStates[i].objRef
|
|
390
|
-
});
|
|
391
|
-
completeJobsSummary.push({
|
|
392
|
-
jobId: etStates[i].jobId,
|
|
393
|
-
objectiveRef: etStates[i].objRef,
|
|
394
|
-
jobObjectiveSummary: obs
|
|
395
|
-
});
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
baseETProps.showProgress(false);
|
|
399
|
-
|
|
400
|
-
if (nextState.nextState.taskId === _ETConfig.ExecutionTaskID.COMPLETED_SUCCESS) {
|
|
401
|
-
navigation.replace(this.getSuccessRoute(), {
|
|
402
|
-
summary: objSummary,
|
|
403
|
-
completeSummary: completeJobsSummary,
|
|
404
|
-
objList: this.getJobObjectiveList(etStates),
|
|
405
|
-
objSuccess: true
|
|
406
|
-
});
|
|
407
402
|
} else {
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
403
|
+
baseETProps.showProgress(false);
|
|
404
|
+
// TODO: Remove this later
|
|
405
|
+
this.cache.clearKeys([this.cacheKeys.CURRENT_WORKING_TASK_ID]);
|
|
406
|
+
_AppSyncManager.default.getInstance().isForceStartEnabled = true;
|
|
407
|
+
_AppSyncManager.default.getInstance().isSyncActive = false;
|
|
408
|
+
_AppSyncManager.default.getInstance().startSDKSyncManager();
|
|
409
|
+
let objSummary = {
|
|
410
|
+
success: [],
|
|
411
|
+
failure: []
|
|
412
|
+
};
|
|
413
|
+
for (let [_key, _value] of this._mappedStatesData) {
|
|
414
|
+
const _objKey = _key === _ETConfig.ExecutionTaskID.COMPLETED_SUCCESS ? 'success' : 'failure';
|
|
415
|
+
const lastERCData = await _platformCoreosExecutionEngineSdk.DispatchExecutor.getlastERC(_value.mergedObjectiveIds);
|
|
416
|
+
for (const _lastER of lastERCData) {
|
|
417
|
+
var _objSummary$_objKey;
|
|
418
|
+
const reason = await _ReasonCodeContainer.default.getInstance().getReasonByCode(_lastER.lastReasonCode);
|
|
419
|
+
(_objSummary$_objKey = objSummary[_objKey]) === null || _objSummary$_objKey === void 0 ? void 0 : _objSummary$_objKey.push({
|
|
420
|
+
entityCode: _lastER.lastEntityCode,
|
|
421
|
+
eventCode: _lastER.lastEventCode,
|
|
422
|
+
reasonCode: _lastER.lastReasonCode,
|
|
423
|
+
reasonCodeDesc: reason === null || reason === void 0 ? void 0 : reason.description
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
if (this._mappedStatesData.get(_ETConfig.ExecutionTaskID.COMPLETED_SUCCESS)) {
|
|
428
|
+
this._mappedStatesData.clear();
|
|
429
|
+
this._mappedStates.clear();
|
|
430
|
+
this._stateKeys = [];
|
|
431
|
+
(0, _utils.clearScanOutput)(states.rootMetaData.prefixedMergedObjectiveId);
|
|
432
|
+
navigation.replace(this.getSuccessRoute(), {
|
|
433
|
+
summary: objSummary,
|
|
434
|
+
objSuccess: true
|
|
435
|
+
});
|
|
436
|
+
} else {
|
|
437
|
+
this._mappedStatesData.clear();
|
|
438
|
+
this._mappedStates.clear();
|
|
439
|
+
this._stateKeys = [];
|
|
440
|
+
(0, _utils.clearScanOutput)(states.rootMetaData.prefixedMergedObjectiveId);
|
|
441
|
+
navigation.replace(this.getFailureRoute(), {
|
|
442
|
+
summary: objSummary,
|
|
443
|
+
objSuccess: false
|
|
444
|
+
});
|
|
445
|
+
}
|
|
414
446
|
}
|
|
415
447
|
} else {
|
|
416
|
-
let
|
|
448
|
+
let rParams = {};
|
|
449
|
+
let nextStateDataArray = await this.queryNextET(states.next_states.mergedObjectiveIds, states.rootMetaData.statusFilter);
|
|
450
|
+
const storeTerminalData = nextStateDataArray.every(_state => _state.taskId === _ETConfig.ExecutionTaskID.COMPLETED_SUCCESS || _state.taskId === _ETConfig.ExecutionTaskID.COMPLETED_FAILURE);
|
|
451
|
+
if (storeTerminalData) {
|
|
452
|
+
if (nextStateDataArray.length === 2) {
|
|
453
|
+
// Array in case of last states containing c-s and c-f
|
|
454
|
+
this._mappedStates.set(nextStateDataArray[1].taskId, nextStateDataArray[1]);
|
|
455
|
+
this._stateKeys.push(nextStateDataArray[1].taskId);
|
|
456
|
+
}
|
|
457
|
+
nextStateDataArray.forEach(data => {
|
|
458
|
+
if (data.taskId === _ETConfig.ExecutionTaskID.COMPLETED_SUCCESS || data.taskId === _ETConfig.ExecutionTaskID.COMPLETED_FAILURE) this._mappedStatesData.set(data.taskId, data);
|
|
459
|
+
});
|
|
460
|
+
}
|
|
461
|
+
const nextStateData = nextStateDataArray[0];
|
|
417
462
|
baseETProps.showProgress(false);
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
463
|
+
if (nextStateData != null && Object.keys(nextStateData).length > 0) {
|
|
464
|
+
rParams[_RouteParams.RouteParams.NEXT_STATES] = nextStateData;
|
|
465
|
+
rParams[_RouteParams.RouteParams.ROOT_META_DATA] = states.rootMetaData;
|
|
466
|
+
|
|
467
|
+
/**
|
|
468
|
+
* Send END/BACK custom event
|
|
469
|
+
*/
|
|
470
|
+
if (!isLastTask) {
|
|
471
|
+
var _etOutput$baseRespons;
|
|
472
|
+
const eventOutputData = {
|
|
473
|
+
meta: (etOutput === null || etOutput === void 0 || (_etOutput$baseRespons = etOutput.baseResponse) === null || _etOutput$baseRespons === void 0 ? void 0 : _etOutput$baseRespons.meta) || (etOutput === null || etOutput === void 0 ? void 0 : etOutput.meta) || {},
|
|
474
|
+
etData: etOutput,
|
|
475
|
+
taskId: etStates.taskId,
|
|
476
|
+
nextTaskId: '',
|
|
477
|
+
timestamp: Date.now(),
|
|
478
|
+
customData: rParams[_RouteParams.RouteParams.ROOT_META_DATA].customEventsData
|
|
479
|
+
};
|
|
480
|
+
eventOutputData.nextTaskId = nextStateData.taskId;
|
|
481
|
+
eventOutputData.etData.eventCode !== _constants.GO_BACK_EVENT_CODE ? (0, _EventDispatcher.default)('END', etStates.taskName, eventOutputData) : (0, _EventDispatcher.default)('BACK', etStates.taskName, eventOutputData);
|
|
482
|
+
}
|
|
423
483
|
}
|
|
484
|
+
navigation.replace(nextStateData.taskId, rParams);
|
|
424
485
|
}
|
|
425
486
|
} catch (error) {
|
|
426
487
|
baseETProps.showProgress(false);
|
|
427
|
-
|
|
428
488
|
_Logger.default.getInstance().logEvent('moveToNextET', error.message, _Logger.LOG_TYPE.SDK_ERROR);
|
|
429
489
|
}
|
|
430
490
|
}
|
|
431
|
-
|
|
432
|
-
async saveAndProceed(baseETProps, etOutput, etStates, navigation, isLastTask) {
|
|
491
|
+
async saveAndProceed(baseETProps, etOutput, states, navigation, isLastTask, isMergedObjectiveBasedOutput) {
|
|
433
492
|
baseETProps.showProgress(true);
|
|
434
|
-
await this.saveAndProceedToNextET(baseETProps, etOutput,
|
|
493
|
+
await this.saveAndProceedToNextET(baseETProps, etOutput, states, navigation, isLastTask, isMergedObjectiveBasedOutput);
|
|
435
494
|
}
|
|
436
|
-
|
|
437
495
|
}
|
|
438
|
-
|
|
439
496
|
exports.default = DispatchStateContainer;
|
|
440
|
-
|
|
441
497
|
_defineProperty(DispatchStateContainer, "instance", void 0);
|
|
442
498
|
//# sourceMappingURL=DispatchStateContainer.js.map
|