@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,57 +4,47 @@
|
|
|
4
4
|
*
|
|
5
5
|
* @class LoginHelper
|
|
6
6
|
*/
|
|
7
|
-
import Auth from '../resources/Login';
|
|
8
7
|
|
|
8
|
+
import Auth from '../resources/Login';
|
|
9
9
|
class LoginHelper {
|
|
10
10
|
async initLogin(loginPayload, loginType) {
|
|
11
11
|
try {
|
|
12
12
|
let loginResponse;
|
|
13
|
-
|
|
14
13
|
switch (loginType) {
|
|
15
14
|
case 'mobilePassword':
|
|
16
15
|
loginResponse = await Auth.loginMobilePassword(loginPayload);
|
|
17
16
|
break;
|
|
18
|
-
|
|
19
17
|
case 'mobileOtp':
|
|
20
18
|
loginResponse = await Auth.loginMobileOtp(loginPayload);
|
|
21
19
|
break;
|
|
22
|
-
|
|
23
20
|
case 'mPin':
|
|
24
21
|
loginResponse = await Auth.loginMpin(loginPayload);
|
|
25
22
|
break;
|
|
26
|
-
|
|
27
23
|
case 'usernamePassword':
|
|
28
24
|
loginResponse = await Auth.loginUserName(loginPayload);
|
|
29
25
|
break;
|
|
30
|
-
|
|
31
26
|
case 'clientCredential':
|
|
32
27
|
loginResponse = await Auth.loginCredential(loginPayload);
|
|
33
28
|
break;
|
|
34
|
-
|
|
35
29
|
default:
|
|
36
30
|
break;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
31
|
+
}
|
|
32
|
+
// await Storage.setObject('LoginResponse', loginResponse);
|
|
40
33
|
return loginResponse;
|
|
41
34
|
} catch (e) {
|
|
42
35
|
// Flush all storage
|
|
43
36
|
throw new Error(e);
|
|
44
37
|
}
|
|
45
38
|
}
|
|
46
|
-
|
|
47
39
|
async handleAccessTokenExpiry() {
|
|
48
40
|
const data = {
|
|
49
|
-
tenant: '',
|
|
50
|
-
appName: '',
|
|
51
|
-
applicationSecret: ''
|
|
41
|
+
tenant: 'delhivery',
|
|
42
|
+
appName: 'user-auth',
|
|
43
|
+
applicationSecret: 'c8fda076-c0ab-4afd-b357-ecfba4dad6f8'
|
|
52
44
|
};
|
|
53
45
|
await Auth.refreshToken(data);
|
|
54
46
|
}
|
|
55
|
-
|
|
56
47
|
}
|
|
57
|
-
|
|
58
48
|
const loginHelper = new LoginHelper();
|
|
59
49
|
export default loginHelper;
|
|
60
50
|
//# sourceMappingURL=loginHelper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Auth","LoginHelper","initLogin","loginPayload","loginType","loginResponse","loginMobilePassword","loginMobileOtp","loginMpin","loginUserName","loginCredential","e","Error","handleAccessTokenExpiry","data","tenant","appName","applicationSecret","refreshToken","loginHelper"],"sources":["loginHelper.ts"],"sourcesContent":["/**\n * Creating a wrapper arround localstorage as https://reactnative.dev/docs/asyncstorage\n *\n *\n * @class LoginHelper\n */\nimport type { LoginPayload, LoginType } from '../models/auth';\nimport Auth from '../resources/Login';\nclass LoginHelper {\n async initLogin(loginPayload: LoginPayload, loginType: LoginType) {\n try {\n let loginResponse: any;\n switch (loginType) {\n case 'mobilePassword':\n loginResponse = await Auth.loginMobilePassword(loginPayload);\n break;\n case 'mobileOtp':\n loginResponse = await Auth.loginMobileOtp(loginPayload);\n break;\n case 'mPin':\n loginResponse = await Auth.loginMpin(loginPayload);\n break;\n case 'usernamePassword':\n loginResponse = await Auth.loginUserName(loginPayload);\n break;\n case 'clientCredential':\n loginResponse = await Auth.loginCredential(loginPayload);\n break;\n default:\n break;\n }\n // await Storage.setObject('LoginResponse', loginResponse);\n return loginResponse;\n } catch (e: any) {\n // Flush all storage\n throw new Error(e);\n }\n }\n\n async handleAccessTokenExpiry() {\n const data: any = {\n tenant: '',\n appName: '',\n applicationSecret: '',\n };\n await Auth.refreshToken(data);\n }\n}\n\nconst loginHelper = new LoginHelper();\nexport default loginHelper;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA
|
|
1
|
+
{"version":3,"names":["Auth","LoginHelper","initLogin","loginPayload","loginType","loginResponse","loginMobilePassword","loginMobileOtp","loginMpin","loginUserName","loginCredential","e","Error","handleAccessTokenExpiry","data","tenant","appName","applicationSecret","refreshToken","loginHelper"],"sources":["loginHelper.ts"],"sourcesContent":["/**\n * Creating a wrapper arround localstorage as https://reactnative.dev/docs/asyncstorage\n *\n *\n * @class LoginHelper\n */\nimport type { LoginPayload, LoginType } from '../models/auth';\nimport Auth from '../resources/Login';\nclass LoginHelper {\n async initLogin(loginPayload: LoginPayload, loginType: LoginType) {\n try {\n let loginResponse: any;\n switch (loginType) {\n case 'mobilePassword':\n loginResponse = await Auth.loginMobilePassword(loginPayload);\n break;\n case 'mobileOtp':\n loginResponse = await Auth.loginMobileOtp(loginPayload);\n break;\n case 'mPin':\n loginResponse = await Auth.loginMpin(loginPayload);\n break;\n case 'usernamePassword':\n loginResponse = await Auth.loginUserName(loginPayload);\n break;\n case 'clientCredential':\n loginResponse = await Auth.loginCredential(loginPayload);\n break;\n default:\n break;\n }\n // await Storage.setObject('LoginResponse', loginResponse);\n return loginResponse;\n } catch (e: any) {\n // Flush all storage\n throw new Error(e);\n }\n }\n\n async handleAccessTokenExpiry() {\n const data: any = {\n tenant: 'delhivery',\n appName: 'user-auth',\n applicationSecret: 'c8fda076-c0ab-4afd-b357-ecfba4dad6f8',\n };\n await Auth.refreshToken(data);\n }\n}\n\nconst loginHelper = new LoginHelper();\nexport default loginHelper;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,IAAI,MAAM,oBAAoB;AACrC,MAAMC,WAAW,CAAC;EAChB,MAAMC,SAASA,CAACC,YAA0B,EAAEC,SAAoB,EAAE;IAChE,IAAI;MACF,IAAIC,aAAkB;MACtB,QAAQD,SAAS;QACf,KAAK,gBAAgB;UACnBC,aAAa,GAAG,MAAML,IAAI,CAACM,mBAAmB,CAACH,YAAY,CAAC;UAC5D;QACF,KAAK,WAAW;UACdE,aAAa,GAAG,MAAML,IAAI,CAACO,cAAc,CAACJ,YAAY,CAAC;UACvD;QACF,KAAK,MAAM;UACTE,aAAa,GAAG,MAAML,IAAI,CAACQ,SAAS,CAACL,YAAY,CAAC;UAClD;QACF,KAAK,kBAAkB;UACrBE,aAAa,GAAG,MAAML,IAAI,CAACS,aAAa,CAACN,YAAY,CAAC;UACtD;QACF,KAAK,kBAAkB;UACrBE,aAAa,GAAG,MAAML,IAAI,CAACU,eAAe,CAACP,YAAY,CAAC;UACxD;QACF;UACE;MACJ;MACA;MACA,OAAOE,aAAa;IACtB,CAAC,CAAC,OAAOM,CAAM,EAAE;MACf;MACA,MAAM,IAAIC,KAAK,CAACD,CAAC,CAAC;IACpB;EACF;EAEA,MAAME,uBAAuBA,CAAA,EAAG;IAC9B,MAAMC,IAAS,GAAG;MAChBC,MAAM,EAAE,WAAW;MACnBC,OAAO,EAAE,WAAW;MACpBC,iBAAiB,EAAE;IACrB,CAAC;IACD,MAAMjB,IAAI,CAACkB,YAAY,CAACJ,IAAI,CAAC;EAC/B;AACF;AAEA,MAAMK,WAAW,GAAG,IAAIlB,WAAW,CAAC,CAAC;AACrC,eAAekB,WAAW"}
|
|
@@ -1,24 +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 { LOCAL_STORAGE_KEY_PREFIX } from './../constants/constants';
|
|
4
5
|
import AsyncStorage from '@react-native-async-storage/async-storage';
|
|
6
|
+
import Logger, { LOG_TYPE } from './Logger';
|
|
7
|
+
import { NativeModules } from 'react-native';
|
|
8
|
+
const {
|
|
9
|
+
SharedPreferencesModule
|
|
10
|
+
} = NativeModules;
|
|
11
|
+
|
|
5
12
|
/**
|
|
6
13
|
* Creating a wrapper arround localstorage as https://reactnative.dev/docs/asyncstorage
|
|
7
14
|
* depreciated using communiity package instead https://github.com/react-native-async-storage/async-storage
|
|
8
15
|
*
|
|
9
16
|
* @class Storage
|
|
10
17
|
*/
|
|
11
|
-
|
|
12
18
|
class Storage {
|
|
13
|
-
// private prefixKey: string;
|
|
14
19
|
constructor() {}
|
|
15
|
-
|
|
16
20
|
static getInstance() {
|
|
17
21
|
if (!this.classInstance) {
|
|
18
22
|
this.classInstance = new Storage();
|
|
19
23
|
Storage.prefixKey = LOCAL_STORAGE_KEY_PREFIX;
|
|
20
24
|
}
|
|
21
|
-
|
|
22
25
|
return this.classInstance;
|
|
23
26
|
}
|
|
24
27
|
/**
|
|
@@ -27,38 +30,32 @@ class Storage {
|
|
|
27
30
|
* @param {string} key
|
|
28
31
|
* @returns {Promise<string | null>}
|
|
29
32
|
*/
|
|
30
|
-
|
|
31
|
-
|
|
32
33
|
async getItem(key) {
|
|
33
34
|
if (!key) {
|
|
34
35
|
throw new TypeError('In-valid params.');
|
|
35
36
|
}
|
|
36
|
-
|
|
37
37
|
return await AsyncStorage.getItem(Storage.prefixKey + key);
|
|
38
38
|
}
|
|
39
|
+
|
|
39
40
|
/**
|
|
40
41
|
* Save a single itema
|
|
41
42
|
*
|
|
42
43
|
* @param {string} key
|
|
43
44
|
* @returns {Promise<void>}
|
|
44
45
|
*/
|
|
45
|
-
|
|
46
|
-
|
|
47
46
|
async setItem(key, value) {
|
|
48
47
|
if (!(key && value)) {
|
|
49
48
|
throw TypeError('In-valid params.');
|
|
50
49
|
}
|
|
51
|
-
|
|
52
50
|
return await AsyncStorage.setItem(Storage.prefixKey + key, value);
|
|
53
51
|
}
|
|
52
|
+
|
|
54
53
|
/**
|
|
55
54
|
* Save a Object
|
|
56
55
|
*
|
|
57
56
|
* @param {string} key
|
|
58
57
|
* @returns {Promise<{}|[]>}
|
|
59
58
|
*/
|
|
60
|
-
|
|
61
|
-
|
|
62
59
|
async setObject(key, value) {
|
|
63
60
|
if (!key) {
|
|
64
61
|
throw TypeError('In-valid params.');
|
|
@@ -66,6 +63,27 @@ class Storage {
|
|
|
66
63
|
return await AsyncStorage.setItem(Storage.prefixKey + key, JSON.stringify(value));
|
|
67
64
|
}
|
|
68
65
|
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
*
|
|
69
|
+
* @param input: Array<MultiObject>
|
|
70
|
+
* @returns
|
|
71
|
+
*/
|
|
72
|
+
async setMultiObject(input) {
|
|
73
|
+
if (input.some(arg => !(arg.key && arg.value) && typeof arg.value !== 'object' || Array.isArray(arg.value) && arg.value.length === 0 || Object.keys(arg.value).length === 0)) {
|
|
74
|
+
throw TypeError(`In-valid params: ${input}`);
|
|
75
|
+
} else {
|
|
76
|
+
try {
|
|
77
|
+
return await AsyncStorage.multiSet(input.map(arg => {
|
|
78
|
+
const v = [Storage.prefixKey + arg.key, JSON.stringify(arg.value)];
|
|
79
|
+
return v;
|
|
80
|
+
}));
|
|
81
|
+
} catch (error) {
|
|
82
|
+
Logger.getInstance().logEvent('~ setMultiObject Async Storage', 'Unable to multiSet data in Async Storage', LOG_TYPE.SDK_ERROR);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
69
87
|
/**
|
|
70
88
|
* Get an Object
|
|
71
89
|
*
|
|
@@ -73,15 +91,11 @@ class Storage {
|
|
|
73
91
|
* @returns {Promise<void>}
|
|
74
92
|
*/
|
|
75
93
|
// the return type of the function could be made as Generic
|
|
76
|
-
|
|
77
|
-
|
|
78
94
|
async getObject(key) {
|
|
79
95
|
if (!key) {
|
|
80
96
|
throw new TypeError('In-valid params.');
|
|
81
97
|
}
|
|
82
|
-
|
|
83
98
|
let val = await AsyncStorage.getItem(Storage.prefixKey + key);
|
|
84
|
-
|
|
85
99
|
if (val !== null) {
|
|
86
100
|
const obj = JSON.parse(val);
|
|
87
101
|
return obj;
|
|
@@ -89,27 +103,43 @@ class Storage {
|
|
|
89
103
|
return null;
|
|
90
104
|
}
|
|
91
105
|
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Get an Object
|
|
109
|
+
*
|
|
110
|
+
* @param {string} keys
|
|
111
|
+
* @returns {Promise<void>}
|
|
112
|
+
*/
|
|
113
|
+
|
|
114
|
+
async getMultiObject(keys) {
|
|
115
|
+
if (!keys) {
|
|
116
|
+
throw new TypeError(`Read In-valid params: ${keys}`);
|
|
117
|
+
}
|
|
118
|
+
let items = await AsyncStorage.multiGet(keys.map(key => Storage.prefixKey + key));
|
|
119
|
+
if (items) {
|
|
120
|
+
return items.map(i => {
|
|
121
|
+
if (i[1]) return [i[0], JSON.parse(i[1])];else return [i[0], null];
|
|
122
|
+
});
|
|
123
|
+
} else {
|
|
124
|
+
return [[]];
|
|
125
|
+
}
|
|
126
|
+
}
|
|
92
127
|
/**
|
|
93
128
|
* Deletes a single item
|
|
94
129
|
* @param {string} key
|
|
95
130
|
* @returns {Promise<void>}
|
|
96
131
|
*/
|
|
97
132
|
// need to handle cases for wrongs keys
|
|
98
|
-
|
|
99
|
-
|
|
100
133
|
async deleteItem(key) {
|
|
101
134
|
if (!key) {
|
|
102
135
|
throw new TypeError('In-valid params.');
|
|
103
136
|
}
|
|
104
|
-
|
|
105
137
|
await AsyncStorage.removeItem(Storage.prefixKey + key);
|
|
106
138
|
}
|
|
107
|
-
|
|
108
139
|
async deleteMultiple(keys) {
|
|
109
140
|
if (!keys || keys.length === 0) {
|
|
110
141
|
throw new TypeError('In-valid params.');
|
|
111
142
|
}
|
|
112
|
-
|
|
113
143
|
const alteredKeys = keys.map(k => {
|
|
114
144
|
if (k.startsWith(Storage.prefixKey)) {
|
|
115
145
|
return k;
|
|
@@ -119,24 +149,51 @@ class Storage {
|
|
|
119
149
|
});
|
|
120
150
|
await AsyncStorage.multiRemove(alteredKeys);
|
|
121
151
|
}
|
|
122
|
-
|
|
123
152
|
async getAllKeys(prefix) {
|
|
124
153
|
if (!prefix) {
|
|
125
154
|
throw new TypeError('In-valid params.');
|
|
126
155
|
}
|
|
127
|
-
|
|
128
156
|
const keys = await AsyncStorage.getAllKeys();
|
|
129
157
|
return keys.filter(key => {
|
|
130
158
|
return key.startsWith(Storage.prefixKey + prefix);
|
|
131
159
|
});
|
|
132
160
|
}
|
|
133
161
|
|
|
134
|
-
|
|
135
|
-
|
|
162
|
+
/**
|
|
163
|
+
* Shared preferences
|
|
164
|
+
*/
|
|
165
|
+
async setSharedItem(key, value) {
|
|
166
|
+
await SharedPreferencesModule.setItem(key, value);
|
|
167
|
+
}
|
|
168
|
+
async setSharedItems(items) {
|
|
169
|
+
await SharedPreferencesModule.setItems(JSON.stringify(items));
|
|
170
|
+
}
|
|
171
|
+
async getSharedItem(key) {
|
|
172
|
+
return await SharedPreferencesModule.getItem(key);
|
|
173
|
+
}
|
|
174
|
+
async getSharedItems(key) {
|
|
175
|
+
return await SharedPreferencesModule.getItems(key);
|
|
176
|
+
}
|
|
177
|
+
async getSharedAll() {
|
|
178
|
+
return await SharedPreferencesModule.getAll();
|
|
179
|
+
}
|
|
180
|
+
async getAllSharedKeys() {
|
|
181
|
+
return await SharedPreferencesModule.getAllKeys();
|
|
182
|
+
}
|
|
183
|
+
async clearShared() {
|
|
184
|
+
await SharedPreferencesModule.clear();
|
|
185
|
+
}
|
|
186
|
+
async removeSharedItem(key) {
|
|
187
|
+
await SharedPreferencesModule.removeItem(key);
|
|
188
|
+
}
|
|
189
|
+
async removeSharedItems(key) {
|
|
190
|
+
await SharedPreferencesModule.removeItems(key);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
136
193
|
|
|
194
|
+
// const storage = new Storage();
|
|
137
195
|
_defineProperty(Storage, "classInstance", void 0);
|
|
138
|
-
|
|
196
|
+
// private prefixKey: string;
|
|
139
197
|
_defineProperty(Storage, "prefixKey", void 0);
|
|
140
|
-
|
|
141
198
|
export default Storage;
|
|
142
199
|
//# sourceMappingURL=storage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["LOCAL_STORAGE_KEY_PREFIX","AsyncStorage","Storage","constructor","getInstance","classInstance","prefixKey","getItem","key","TypeError","setItem","value","setObject","JSON","stringify","getObject","val","obj","parse","deleteItem","removeItem","deleteMultiple","keys","length","alteredKeys","map","k","startsWith","multiRemove","getAllKeys","prefix","filter"],"sources":["storage.ts"],"sourcesContent":["import { LOCAL_STORAGE_KEY_PREFIX } from './../constants/constants';\nimport AsyncStorage from '@react-native-async-storage/async-storage';\n\n/**\n * Creating a wrapper arround localstorage as https://reactnative.dev/docs/asyncstorage\n * depreciated using communiity package instead https://github.com/react-native-async-storage/async-storage\n *\n * @class Storage\n */\nclass Storage {\n private static classInstance?: Storage;\n // private prefixKey: string;\n static prefixKey: string;\n private constructor() {}\n\n public static getInstance(): Storage {\n if (!this.classInstance) {\n this.classInstance = new Storage();\n Storage.prefixKey = LOCAL_STORAGE_KEY_PREFIX;\n }\n return this.classInstance;\n }\n /**\n * Get a single item\n *\n * @param {string} key\n * @returns {Promise<string | null>}\n */\n async getItem(key: string): Promise<string | null> {\n if (!key) {\n throw new TypeError('In-valid params.');\n }\n return await AsyncStorage.getItem(Storage.prefixKey + key);\n }\n\n /**\n * Save a single itema\n *\n * @param {string} key\n * @returns {Promise<void>}\n */\n async setItem(key: string, value: string): Promise<void> {\n if (!(key && value)) {\n throw TypeError('In-valid params.');\n }\n return await AsyncStorage.setItem(Storage.prefixKey + key, value);\n }\n\n /**\n * Save a Object\n *\n * @param {string} key\n * @returns {Promise<{}|[]>}\n */\n async setObject(key: string, value: {} | []): Promise<void> {\n if (!key) {\n throw TypeError('In-valid params.');\n } else {\n return await AsyncStorage.setItem(\n Storage.prefixKey + key,\n JSON.stringify(value)\n );\n }\n }\n\n /**\n * Get an Object\n *\n * @param {string} key\n * @returns {Promise<void>}\n */\n // the return type of the function could be made as Generic\n async getObject(key: string): Promise<{} | [] | null> {\n if (!key) {\n throw new TypeError('In-valid params.');\n }\n let val: string | null = await AsyncStorage.getItem(\n Storage.prefixKey + key\n );\n if (val !== null) {\n const obj = JSON.parse(val);\n return obj;\n } else {\n return null;\n }\n }\n /**\n * Deletes a single item\n * @param {string} key\n * @returns {Promise<void>}\n */\n // need to handle cases for wrongs keys\n async deleteItem(key: string): Promise<void> {\n if (!key) {\n throw new TypeError('In-valid params.');\n }\n await AsyncStorage.removeItem(Storage.prefixKey + key);\n }\n\n async deleteMultiple(keys: string[]) {\n if (!keys || keys.length === 0) {\n throw new TypeError('In-valid params.');\n }\n const alteredKeys = keys.map((k) => {\n if (k.startsWith(Storage.prefixKey)) {\n return k;\n } else {\n return Storage.prefixKey + k;\n }\n });\n await AsyncStorage.multiRemove(alteredKeys);\n }\n async getAllKeys(prefix: string): Promise<string[]> {\n if (!prefix) {\n throw new TypeError('In-valid params.');\n }\n const keys = await AsyncStorage.getAllKeys();\n return keys.filter((key) => {\n return key.startsWith(Storage.prefixKey + prefix);\n });\n }\n}\n\n// const storage = new Storage();\nexport default Storage;\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"names":["LOCAL_STORAGE_KEY_PREFIX","AsyncStorage","Logger","LOG_TYPE","NativeModules","SharedPreferencesModule","Storage","constructor","getInstance","classInstance","prefixKey","getItem","key","TypeError","setItem","value","setObject","JSON","stringify","setMultiObject","input","some","arg","Array","isArray","length","Object","keys","multiSet","map","v","error","logEvent","SDK_ERROR","getObject","val","obj","parse","getMultiObject","items","multiGet","i","deleteItem","removeItem","deleteMultiple","alteredKeys","k","startsWith","multiRemove","getAllKeys","prefix","filter","setSharedItem","setSharedItems","setItems","getSharedItem","getSharedItems","getItems","getSharedAll","getAll","getAllSharedKeys","clearShared","clear","removeSharedItem","removeSharedItems","removeItems","_defineProperty"],"sources":["storage.ts"],"sourcesContent":["import { LOCAL_STORAGE_KEY_PREFIX } from './../constants/constants';\nimport AsyncStorage from '@react-native-async-storage/async-storage';\nimport Logger, { LOG_TYPE } from './Logger';\nimport { NativeModules } from 'react-native';\n\ninterface MultiObject {\n key: string;\n value: {} | [];\n}\n\nconst { SharedPreferencesModule } = NativeModules;\n\n/**\n * Creating a wrapper arround localstorage as https://reactnative.dev/docs/asyncstorage\n * depreciated using communiity package instead https://github.com/react-native-async-storage/async-storage\n *\n * @class Storage\n */\nclass Storage {\n private static classInstance?: Storage;\n // private prefixKey: string;\n static prefixKey: string;\n private constructor() {}\n\n public static getInstance(): Storage {\n if (!this.classInstance) {\n this.classInstance = new Storage();\n Storage.prefixKey = LOCAL_STORAGE_KEY_PREFIX;\n }\n return this.classInstance;\n }\n /**\n * Get a single item\n *\n * @param {string} key\n * @returns {Promise<string | null>}\n */\n async getItem(key: string): Promise<string | null> {\n if (!key) {\n throw new TypeError('In-valid params.');\n }\n return await AsyncStorage.getItem(Storage.prefixKey + key);\n }\n\n /**\n * Save a single itema\n *\n * @param {string} key\n * @returns {Promise<void>}\n */\n async setItem(key: string, value: string): Promise<void> {\n if (!(key && value)) {\n throw TypeError('In-valid params.');\n }\n return await AsyncStorage.setItem(Storage.prefixKey + key, value);\n }\n\n /**\n * Save a Object\n *\n * @param {string} key\n * @returns {Promise<{}|[]>}\n */\n async setObject(key: string, value: {} | []): Promise<void> {\n if (!key) {\n throw TypeError('In-valid params.');\n } else {\n return await AsyncStorage.setItem(\n Storage.prefixKey + key,\n JSON.stringify(value)\n );\n }\n }\n\n /**\n *\n * @param input: Array<MultiObject>\n * @returns\n */\n async setMultiObject(input: Array<MultiObject>): Promise<void> {\n if (\n input.some(\n (arg) =>\n (!(arg.key && arg.value) && typeof arg.value !== 'object') ||\n (Array.isArray(arg.value) && arg.value.length === 0) ||\n Object.keys(arg.value).length === 0\n )\n ) {\n throw TypeError(`In-valid params: ${input}`);\n } else {\n try {\n return await AsyncStorage.multiSet(\n input.map((arg) => {\n const v: [string, string] = [\n Storage.prefixKey + arg.key,\n JSON.stringify(arg.value),\n ];\n return v;\n })\n );\n } catch (error) {\n Logger.getInstance().logEvent(\n '~ setMultiObject Async Storage',\n 'Unable to multiSet data in Async Storage',\n LOG_TYPE.SDK_ERROR\n );\n }\n }\n }\n\n /**\n * Get an Object\n *\n * @param {string} key\n * @returns {Promise<void>}\n */\n // the return type of the function could be made as Generic\n async getObject(key: string): Promise<{} | [] | null> {\n if (!key) {\n throw new TypeError('In-valid params.');\n }\n let val: string | null = await AsyncStorage.getItem(\n Storage.prefixKey + key\n );\n if (val !== null) {\n const obj = JSON.parse(val);\n return obj;\n } else {\n return null;\n }\n }\n\n /**\n * Get an Object\n *\n * @param {string} keys\n * @returns {Promise<void>}\n */\n\n async getMultiObject(keys: string[]): Promise<any[][]> {\n if (!keys) {\n throw new TypeError(`Read In-valid params: ${keys}`);\n }\n let items = await AsyncStorage.multiGet(\n keys.map((key) => Storage.prefixKey + key)\n );\n if (items) {\n return items.map((i) => {\n if (i[1]) return [i[0], JSON.parse(i[1])];\n else return [i[0], null];\n });\n } else {\n return [[]];\n }\n }\n /**\n * Deletes a single item\n * @param {string} key\n * @returns {Promise<void>}\n */\n // need to handle cases for wrongs keys\n async deleteItem(key: string): Promise<void> {\n if (!key) {\n throw new TypeError('In-valid params.');\n }\n await AsyncStorage.removeItem(Storage.prefixKey + key);\n }\n\n async deleteMultiple(keys: string[]) {\n if (!keys || keys.length === 0) {\n throw new TypeError('In-valid params.');\n }\n const alteredKeys = keys.map((k) => {\n if (k.startsWith(Storage.prefixKey)) {\n return k;\n } else {\n return Storage.prefixKey + k;\n }\n });\n await AsyncStorage.multiRemove(alteredKeys);\n }\n\n async getAllKeys(prefix: string): Promise<string[]> {\n if (!prefix) {\n throw new TypeError('In-valid params.');\n }\n const keys = await AsyncStorage.getAllKeys();\n return keys.filter((key) => {\n return key.startsWith(Storage.prefixKey + prefix);\n });\n }\n\n /**\n * Shared preferences\n */\n async setSharedItem(key: string, value: string): Promise<void> {\n await SharedPreferencesModule.setItem(key, value);\n }\n\n async setSharedItems(items: { key: string; value: string }[]): Promise<void> {\n await SharedPreferencesModule.setItems(JSON.stringify(items));\n }\n\n async getSharedItem(key: string): Promise<string> {\n return await SharedPreferencesModule.getItem(key);\n }\n\n async getSharedItems(key: string[]): Promise<string[][]> {\n return await SharedPreferencesModule.getItems(key);\n }\n\n async getSharedAll(): Promise<[][]> {\n return await SharedPreferencesModule.getAll();\n }\n\n async getAllSharedKeys(): Promise<string[]> {\n return await SharedPreferencesModule.getAllKeys();\n }\n\n async clearShared(): Promise<void> {\n await SharedPreferencesModule.clear();\n }\n\n async removeSharedItem(key: string): Promise<void> {\n await SharedPreferencesModule.removeItem(key);\n }\n\n async removeSharedItems(key: string[]): Promise<void> {\n await SharedPreferencesModule.removeItems(key);\n }\n}\n\n// const storage = new Storage();\nexport default Storage;\n"],"mappings":"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"}
|
|
@@ -5,16 +5,18 @@ export function isEmptyOrBlank(str) {
|
|
|
5
5
|
export function isMandatoryKeysPresent(obj, keys) {
|
|
6
6
|
if (!obj) return false;
|
|
7
7
|
if ((keys === null || keys === void 0 ? void 0 : keys.length) === 0) return true;
|
|
8
|
-
|
|
9
8
|
for (let i = 0; i < keys.length; i++) {
|
|
10
9
|
// @ts-ignore
|
|
11
|
-
if (
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
if (
|
|
11
|
+
// @ts-ignore
|
|
12
|
+
!(keys[i] in obj) ||
|
|
13
|
+
// @ts-ignore
|
|
14
|
+
obj[keys[i]] === null ||
|
|
15
|
+
// @ts-ignore
|
|
16
|
+
obj[keys[i]] === undefined ||
|
|
17
|
+
// @ts-ignore
|
|
15
18
|
obj[keys[i]] === '') return false;
|
|
16
19
|
}
|
|
17
|
-
|
|
18
20
|
return true;
|
|
19
21
|
}
|
|
20
22
|
export function isTokenExpired(accessToken) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["jwtDecode","isEmptyOrBlank","str","length","test","isMandatoryKeysPresent","obj","keys","i","undefined","isTokenExpired","accessToken","decodedData","exp","Date","now"],"sources":["utils.ts"],"sourcesContent":["import jwtDecode from 'jwt-decode';\n\nexport function isEmptyOrBlank(str: string | null | undefined) {\n return !str || str.length === 0 || /^\\s*$/.test(str);\n}\n\nexport function isMandatoryKeysPresent(obj: object, keys: string[]): boolean {\n if (!obj) return false;\n if (keys?.length === 0) return true;\n for (let i = 0; i < keys.length; i++) {\n // @ts-ignore\n if (\n // @ts-ignore\n !(keys[i] in obj) ||\n // @ts-ignore\n obj[keys[i]] === null ||\n // @ts-ignore\n obj[keys[i]] === undefined ||\n // @ts-ignore\n obj[keys[i]] === ''\n )\n return false;\n }\n return true;\n}\n\nexport function isTokenExpired(accessToken: string) {\n let decodedData: any = jwtDecode(accessToken);\n return !(decodedData && decodedData.exp * 1000 > Date.now());\n}\n"],"mappings":"AAAA,OAAOA,
|
|
1
|
+
{"version":3,"names":["jwtDecode","isEmptyOrBlank","str","length","test","isMandatoryKeysPresent","obj","keys","i","undefined","isTokenExpired","accessToken","decodedData","exp","Date","now"],"sources":["utils.ts"],"sourcesContent":["import jwtDecode from 'jwt-decode';\n\nexport function isEmptyOrBlank(str: string | null | undefined) {\n return !str || str.length === 0 || /^\\s*$/.test(str);\n}\n\nexport function isMandatoryKeysPresent(obj: object, keys: string[]): boolean {\n if (!obj) return false;\n if (keys?.length === 0) return true;\n for (let i = 0; i < keys.length; i++) {\n // @ts-ignore\n if (\n // @ts-ignore\n !(keys[i] in obj) ||\n // @ts-ignore\n obj[keys[i]] === null ||\n // @ts-ignore\n obj[keys[i]] === undefined ||\n // @ts-ignore\n obj[keys[i]] === ''\n )\n return false;\n }\n return true;\n}\n\nexport function isTokenExpired(accessToken: string) {\n let decodedData: any = jwtDecode(accessToken);\n return !(decodedData && decodedData.exp * 1000 > Date.now());\n}\n"],"mappings":"AAAA,OAAOA,SAAS,MAAM,YAAY;AAElC,OAAO,SAASC,cAAcA,CAACC,GAA8B,EAAE;EAC7D,OAAO,CAACA,GAAG,IAAIA,GAAG,CAACC,MAAM,KAAK,CAAC,IAAI,OAAO,CAACC,IAAI,CAACF,GAAG,CAAC;AACtD;AAEA,OAAO,SAASG,sBAAsBA,CAACC,GAAW,EAAEC,IAAc,EAAW;EAC3E,IAAI,CAACD,GAAG,EAAE,OAAO,KAAK;EACtB,IAAI,CAAAC,IAAI,aAAJA,IAAI,uBAAJA,IAAI,CAAEJ,MAAM,MAAK,CAAC,EAAE,OAAO,IAAI;EACnC,KAAK,IAAIK,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGD,IAAI,CAACJ,MAAM,EAAEK,CAAC,EAAE,EAAE;IACpC;IACA;IACE;IACA,EAAED,IAAI,CAACC,CAAC,CAAC,IAAIF,GAAG,CAAC;IACjB;IACAA,GAAG,CAACC,IAAI,CAACC,CAAC,CAAC,CAAC,KAAK,IAAI;IACrB;IACAF,GAAG,CAACC,IAAI,CAACC,CAAC,CAAC,CAAC,KAAKC,SAAS;IAC1B;IACAH,GAAG,CAACC,IAAI,CAACC,CAAC,CAAC,CAAC,KAAK,EAAE,EAEnB,OAAO,KAAK;EAChB;EACA,OAAO,IAAI;AACb;AAEA,OAAO,SAASE,cAAcA,CAACC,WAAmB,EAAE;EAClD,IAAIC,WAAgB,GAAGZ,SAAS,CAACW,WAAW,CAAC;EAC7C,OAAO,EAAEC,WAAW,IAAIA,WAAW,CAACC,GAAG,GAAG,IAAI,GAAGC,IAAI,CAACC,GAAG,CAAC,CAAC,CAAC;AAC9D"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BaseETResponse } from '../../models/execTasks/ETBaseModels';
|
|
2
|
-
export
|
|
2
|
+
export type CompletedWFResponse = BaseETResponse & {
|
|
3
3
|
/**
|
|
4
4
|
* Last Event code
|
|
5
5
|
*/
|
|
@@ -12,7 +12,7 @@ export declare type CompletedWFResponse = BaseETResponse & {
|
|
|
12
12
|
/**
|
|
13
13
|
* Can go back
|
|
14
14
|
*/
|
|
15
|
-
export
|
|
15
|
+
export type CanGoBack = boolean;
|
|
16
16
|
export interface CompletedWFRequest {
|
|
17
17
|
canGoBack?: CanGoBack;
|
|
18
18
|
}
|
|
@@ -5,7 +5,6 @@ import SignatureET from './doodle/SignatureET';
|
|
|
5
5
|
import CancelET from './cancellation/CancelET';
|
|
6
6
|
import type { CancellationInput, CancellationOutput } from './cancellation/CancellationSchema';
|
|
7
7
|
import type { SignatureInput, SignatureOutput } from './doodle/SignatureSchema';
|
|
8
|
-
import type { ScannerInput, ScannerOutput } from './scanner/ScannerSchema';
|
|
9
8
|
import DeliverET from './deliver/DeliverET';
|
|
10
9
|
import type { DeliverETInput, DeliverOutput, DeliverRemarks, LineItem } from './deliver/DeliverETInput';
|
|
11
10
|
import type { BaseETResponse } from '../../models/execTasks/ETBaseModels';
|
|
@@ -33,10 +32,10 @@ import CompletePaymentET from './payments/completePayment/CompletePaymentET';
|
|
|
33
32
|
import SLDeliverET from './deliver/SLDeliverET';
|
|
34
33
|
import SLPickupET from './pickup/SLPickupET';
|
|
35
34
|
import SLDropCash from './dropCash/SLDropCash';
|
|
36
|
-
import RTScan from './scanner/returns/RTScan';
|
|
37
|
-
import ScanList from './scanner/returns/ScanList';
|
|
38
|
-
import CScanner from './scanner/CScanner';
|
|
39
|
-
import RTReasonSelection from './scanner/returns/RTReasonSelection';
|
|
40
35
|
import HttpRequestET from './httpRequest/HttpRequestET';
|
|
41
|
-
|
|
42
|
-
|
|
36
|
+
import ScanET from './scan/ScanET';
|
|
37
|
+
import ValidateOTPET from './validateOTP/ValidateOTPET';
|
|
38
|
+
import type { ScannerInput, ScannerOutput } from './scan/ScanSchema';
|
|
39
|
+
import type { ValidateOTPInput, ValidateOTPOutput } from './validateOTP/ValidateOTPSchema';
|
|
40
|
+
export type { CancellationInput, CancellationOutput, DeliverETInput, DeliverOutput, LineItem, DeliverRemarks, DisplayETInput, DisplayETOutput, SignatureInput, SignatureOutput, FormInputSchema, FormOutputSchema, CaptureOutput, CaptureInput, VerifyLocationOutput, VerifyLocationInput, CompletePaymentInput, CompletePaymentOutput, InitPaymentInput, InitPaymentOutput, ProcessPaymentInput, ProcessPaymentOutput, PickupETInput, PickupETOutput, BaseETResponse, OtpInputSchema, OtpOutputSchema, CaptureTextInput, CaptureTextOutput, VerifyInput, VerifyInputResponse, DropCashInput, DropCashOutput, ScannerInput, ScannerOutput, ValidateOTPInput, ValidateOTPOutput, };
|
|
41
|
+
export { CancelET, DeliverET, DisplayModalET, SignatureET, FormGenerator, ImageCapture, VerifyLocationET, verifyLocation, PickupET, VerifyOtpET, CaptureText, InitPaymentET, ProcessPaymentET, DropCashET, CompletePaymentET, SLDeliverET, SLPickupET, SLDropCash, HttpRequestET, ScanET, ValidateOTPET, };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import type { CancellationInput } from './CancellationSchema';
|
|
3
|
-
declare const CancelET: (props: CancellationInput) => JSX.Element;
|
|
3
|
+
declare const CancelET: (props: CancellationInput) => React.JSX.Element;
|
|
4
4
|
export default CancelET;
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* List of reasons for cancellation
|
|
3
3
|
*/
|
|
4
|
-
import type {
|
|
5
|
-
|
|
4
|
+
import type { EventsRow, ReasonsRow } from '../../../manager/syncmanager/DBConfig';
|
|
5
|
+
import type { ApplicableReasons, BaseETResponse } from '../../../models/execTasks/ETBaseModels';
|
|
6
|
+
export type CancellationReasons = string[];
|
|
6
7
|
export interface CancellationInput {
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
cancelEvent: string;
|
|
9
|
+
cancellationEvents?: CancellationReasons;
|
|
10
|
+
cancellationReasons?: CancellationReasons;
|
|
11
|
+
applicableCodes?: ApplicableReasons;
|
|
12
|
+
eventRows?: EventsRow[];
|
|
13
|
+
onSubmitET: (reason: string, event?: string, reasonsRow?: ReasonsRow[]) => void;
|
|
9
14
|
}
|
|
10
|
-
export
|
|
15
|
+
export type CancellationOutput = BaseETResponse & {
|
|
11
16
|
remark: string;
|
|
12
17
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Input data type
|
|
3
3
|
*/
|
|
4
4
|
import type { BaseETRequest, BaseETResponse } from '../../../models/execTasks/ETBaseModels';
|
|
5
|
-
export
|
|
5
|
+
export type CaptureTextOutput = BaseETResponse & {
|
|
6
6
|
/**
|
|
7
7
|
* Value entered by user
|
|
8
8
|
*/
|
|
@@ -19,24 +19,24 @@ export declare type CaptureTextOutput = BaseETResponse & {
|
|
|
19
19
|
/**
|
|
20
20
|
* Input data type
|
|
21
21
|
*/
|
|
22
|
-
export
|
|
22
|
+
export type InputDataType = 'string' | 'number';
|
|
23
23
|
/**
|
|
24
24
|
* Regex to validate input strings
|
|
25
25
|
*/
|
|
26
|
-
export
|
|
26
|
+
export type ValidationRegex = string;
|
|
27
27
|
/**
|
|
28
28
|
* Title of instruction
|
|
29
29
|
*/
|
|
30
|
-
export
|
|
30
|
+
export type Title = string;
|
|
31
31
|
/**
|
|
32
32
|
* Message of instruction
|
|
33
33
|
*/
|
|
34
|
-
export
|
|
34
|
+
export type Message = string;
|
|
35
35
|
/**
|
|
36
36
|
* Can go back
|
|
37
37
|
*/
|
|
38
|
-
export
|
|
39
|
-
export
|
|
38
|
+
export type CanGoBack = boolean;
|
|
39
|
+
export type CaptureTextInput = BaseETRequest & {
|
|
40
40
|
inputType: InputDataType;
|
|
41
41
|
validationRegex: ValidationRegex;
|
|
42
42
|
onSubmitET: (value: CaptureTextOutput) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type { CaptureTextInput } from './CaptureInputSchema';
|
|
3
|
-
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare const CaptureText: (props: CaptureTextInput) => React.JSX.Element;
|
|
4
4
|
export default CaptureText;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function checkForValidation(data: string, regexRule: string | undefined): Promise<boolean>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type { DeliverETInput } from './DeliverETInput';
|
|
3
|
-
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare const DeliverET: (props: DeliverETInput) => React.JSX.Element;
|
|
4
4
|
export default DeliverET;
|
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
* Unique identifier for the item
|
|
3
3
|
*/
|
|
4
4
|
import type { BaseETRequest, BaseETResponse } from '../../../models/execTasks/ETBaseModels';
|
|
5
|
-
export
|
|
5
|
+
export type SKU = string;
|
|
6
6
|
/**
|
|
7
7
|
* Description of item
|
|
8
8
|
*/
|
|
9
|
-
export
|
|
9
|
+
export type ProductDescription = string;
|
|
10
10
|
/**
|
|
11
11
|
* Count of items
|
|
12
12
|
*/
|
|
13
|
-
export
|
|
13
|
+
export type ItemCount = number;
|
|
14
14
|
/**
|
|
15
15
|
* Items to be delivered
|
|
16
16
|
*/
|
|
17
|
-
export
|
|
17
|
+
export type LineItem = {
|
|
18
18
|
skuId: SKU;
|
|
19
19
|
productDescription?: ProductDescription;
|
|
20
20
|
count?: ItemCount;
|
|
@@ -22,19 +22,20 @@ export declare type LineItem = {
|
|
|
22
22
|
/**
|
|
23
23
|
* Any manual instruction to display for the Operator to work on
|
|
24
24
|
*/
|
|
25
|
-
export
|
|
25
|
+
export type Instruction = string;
|
|
26
26
|
export interface DeliverRemarks {
|
|
27
27
|
remark: string;
|
|
28
28
|
success: boolean;
|
|
29
29
|
}
|
|
30
|
-
export
|
|
30
|
+
export type DeliverETInput = BaseETRequest & {
|
|
31
31
|
items: LineItem[];
|
|
32
32
|
confirmCustodyExchange?: boolean;
|
|
33
33
|
confirmShipments?: boolean;
|
|
34
34
|
onSubmitET(response: DeliverOutput): void;
|
|
35
35
|
returnPackageCount?: number;
|
|
36
|
+
restrictCancel?: boolean;
|
|
36
37
|
};
|
|
37
|
-
export
|
|
38
|
+
export type DeliverOutput = BaseETResponse & {
|
|
38
39
|
/**
|
|
39
40
|
* Remark captured at time of delivery
|
|
40
41
|
*/
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type { DeliverETInput } from './DeliverETInput';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
import type { LineItem } from '../deliver/DeliverETInput';
|
|
4
4
|
export declare const renderItem: ({ item }: {
|
|
5
5
|
item: LineItem;
|
|
6
|
-
}) => JSX.Element;
|
|
7
|
-
declare const DeliverET: (props: DeliverETInput) => JSX.Element;
|
|
6
|
+
}) => React.JSX.Element;
|
|
7
|
+
declare const DeliverET: (props: DeliverETInput) => React.JSX.Element;
|
|
8
8
|
export default DeliverET;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type { DisplayETInput } from './DisplaySchema';
|
|
3
|
-
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare const DisplayModalET: (props: DisplayETInput) => React.JSX.Element;
|
|
4
4
|
export default DisplayModalET;
|
|
@@ -2,16 +2,16 @@ import type { BaseETRequest, BaseETResponse } from '../../../models/execTasks/ET
|
|
|
2
2
|
/**
|
|
3
3
|
* Type of display
|
|
4
4
|
*/
|
|
5
|
-
export
|
|
5
|
+
export type DisplayType = 'ALERT' | 'WARNING' | 'MESSAGE';
|
|
6
6
|
/**
|
|
7
7
|
* Text to be displayed
|
|
8
8
|
*/
|
|
9
|
-
export
|
|
9
|
+
export type DisplayText = string;
|
|
10
10
|
/**
|
|
11
11
|
* Url of image to be displayed
|
|
12
12
|
*/
|
|
13
|
-
export
|
|
14
|
-
export
|
|
13
|
+
export type DisplayImageURL = string;
|
|
14
|
+
export type DisplayETInput = BaseETRequest & {
|
|
15
15
|
showDialog: boolean;
|
|
16
16
|
displayType: DisplayType;
|
|
17
17
|
text?: DisplayText;
|
|
@@ -20,4 +20,4 @@ export declare type DisplayETInput = BaseETRequest & {
|
|
|
20
20
|
negativeBtn?: string;
|
|
21
21
|
onSubmit: (displayOutput: DisplayETOutput) => void;
|
|
22
22
|
};
|
|
23
|
-
export
|
|
23
|
+
export type DisplayETOutput = BaseETResponse;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import type { SignatureInput } from './SignatureSchema';
|
|
3
|
-
declare const SignatureET: (props: SignatureInput) => JSX.Element;
|
|
3
|
+
declare const SignatureET: (props: SignatureInput) => React.JSX.Element;
|
|
4
4
|
export default SignatureET;
|