@os1-platform/dispatch-mobile 1.0.7 → 1.3.11
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 +90 -26
- package/android/.gradle/6.8/fileChanges/last-build.bin +0 -0
- package/android/.gradle/6.8/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/6.8/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/android/.gradle/checksums/checksums.lock +0 -0
- package/android/.gradle/configuration-cache/gc.properties +0 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/.idea/gradle.xml +13 -0
- package/android/.idea/misc.xml +4 -0
- package/android/.idea/vcs.xml +6 -0
- package/android/.idea/workspace.xml +131 -0
- package/android/gradle.properties +1 -1
- package/android/local.properties +8 -0
- package/android/src/main/AndroidManifest.xml +0 -1
- package/lib/commonjs/components/dispatch/DispatchExecNavigator.js +46 -39
- package/lib/commonjs/components/dispatch/DispatchExecNavigator.js.map +1 -1
- package/lib/commonjs/components/executiontasks/ExecutionTasksIndex.js +14 -24
- 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 +64 -16
- package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js.map +1 -1
- 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/SLDeliverET.js +68 -26
- package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/display/DisplayModalET.js +4 -13
- package/lib/commonjs/components/executiontasks/display/DisplayModalET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/doodle/DoodleUtils.js +0 -2
- package/lib/commonjs/components/executiontasks/doodle/DoodleUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/doodle/SignatureET.js +61 -28
- 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 +62 -18
- package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/FormGenerator.js +112 -28
- 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 +1 -16
- 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 +4 -13
- package/lib/commonjs/components/executiontasks/httpRequest/HttpEtUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js +0 -12
- 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 +7 -35
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js +74 -49
- 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 +64 -17
- 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 +60 -19
- package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/ScanET.js +843 -0
- package/lib/commonjs/components/executiontasks/scan/ScanET.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/ScanSchema.js +6 -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 +29 -0
- package/lib/commonjs/components/executiontasks/scan/interfaces.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/CScanner.js +103 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/CScanner.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/DropDownUtils.js +74 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/DropDownUtils.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/ERDropDown.js +115 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/ScanList.js +134 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/ScanList.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/utils.js +373 -0
- package/lib/commonjs/components/executiontasks/scan/utils.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scanner/CScanner.js +3 -21
- package/lib/commonjs/components/executiontasks/scanner/CScanner.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scanner/ScannerSchema.js +4 -9
- package/lib/commonjs/components/executiontasks/scanner/ScannerSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scanner/ScannerUtils.js +7 -36
- package/lib/commonjs/components/executiontasks/scanner/ScannerUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownSelector.js +0 -5
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownSelector.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownUtils.js +0 -9
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/RTReasonSelection.js +0 -14
- package/lib/commonjs/components/executiontasks/scanner/returns/RTReasonSelection.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/RTScan.js +1 -40
- package/lib/commonjs/components/executiontasks/scanner/returns/RTScan.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/ReasonDropDown.js +0 -17
- package/lib/commonjs/components/executiontasks/scanner/returns/ReasonDropDown.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/ScanList.js +0 -28
- package/lib/commonjs/components/executiontasks/scanner/returns/ScanList.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js +334 -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 +59 -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/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/IconButton.js +34 -0
- package/lib/commonjs/components/widgets/IconButton.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/SnackBarCustom.js +38 -38
- 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/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 +15 -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 +27 -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 +13 -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 +9 -23
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/manager/dispatch/DispatchStateContainer.js +527 -177
- 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 +27 -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 +8 -36
- 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/syncmanager/AppSyncManager.js +12 -46
- package/lib/commonjs/manager/syncmanager/AppSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/DBConfig.js +13 -7
- 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/database.js +28 -12
- package/lib/commonjs/manager/syncmanager/database.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js +0 -19
- package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentManager.js +3 -20
- package/lib/commonjs/manager/syncmanager/document/DocumentManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js +3 -52
- package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js +59 -25
- package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js +77 -90
- package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/SyncHttpClient.js +27 -19
- 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.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 +7 -7
- package/lib/commonjs/styles/SdkColors.js.map +1 -1
- package/lib/commonjs/styles/executionTasks/CommonStyles.js +42 -18
- package/lib/commonjs/styles/executionTasks/CommonStyles.js.map +1 -1
- package/lib/commonjs/ui/screens/CancellationScreen.js +36 -27
- package/lib/commonjs/ui/screens/CancellationScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CaptureInputScreen.js +6 -15
- package/lib/commonjs/ui/screens/CaptureInputScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js +0 -19
- package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DeliverScreen.js +6 -15
- package/lib/commonjs/ui/screens/DeliverScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DisplayScreen.js +7 -12
- package/lib/commonjs/ui/screens/DisplayScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DoodleScreen.js +6 -16
- package/lib/commonjs/ui/screens/DoodleScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DropCashScreen.js +6 -18
- package/lib/commonjs/ui/screens/DropCashScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ETScreensIndex.js +14 -16
- package/lib/commonjs/ui/screens/ETScreensIndex.js.map +1 -1
- package/lib/commonjs/ui/screens/FormsScreen.js +36 -15
- package/lib/commonjs/ui/screens/FormsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/GeofenceScreen.js +7 -13
- package/lib/commonjs/ui/screens/GeofenceScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HttpRequestScreen.js +5 -10
- package/lib/commonjs/ui/screens/HttpRequestScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ImageCaptureScreen.js +27 -14
- package/lib/commonjs/ui/screens/ImageCaptureScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentScreen.js +11 -23
- package/lib/commonjs/ui/screens/PaymentScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PickupScreen.js +9 -13
- package/lib/commonjs/ui/screens/PickupScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/RTScanScreen.js +8 -27
- package/lib/commonjs/ui/screens/RTScanScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ScanScreen.js +268 -0
- package/lib/commonjs/ui/screens/ScanScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/StartWorkFlowScreen.js +21 -30
- package/lib/commonjs/ui/screens/StartWorkFlowScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ValidateOTPScreen.js +49 -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 +9 -1
- package/lib/commonjs/ui/uiConfig/RouteParams.js.map +1 -1
- package/lib/commonjs/utils/ApiUtils.js +115 -0
- package/lib/commonjs/utils/ApiUtils.js.map +1 -0
- package/lib/commonjs/utils/ExecTaskUtils.js +93 -31
- 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 +25 -40
- package/lib/commonjs/utils/SyncManagerUtils.js.map +1 -1
- package/lib/commonjs/utils/fcm/FCM.js +35 -16
- package/lib/commonjs/utils/fcm/FCM.js.map +1 -1
- package/lib/commonjs/utils/fcm/FcmUtils.js +50 -25
- 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/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 +53 -32
- 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/components/dispatch/DispatchExecNavigator.js +46 -28
- package/lib/module/components/dispatch/DispatchExecNavigator.js.map +1 -1
- package/lib/module/components/executiontasks/ExecutionTasksIndex.js +3 -1
- 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 +66 -9
- package/lib/module/components/executiontasks/captureInput/CaptureText.js.map +1 -1
- 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/SLDeliverET.js +69 -16
- package/lib/module/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
- package/lib/module/components/executiontasks/display/DisplayModalET.js +4 -3
- package/lib/module/components/executiontasks/display/DisplayModalET.js.map +1 -1
- package/lib/module/components/executiontasks/doodle/DoodleUtils.js.map +1 -1
- package/lib/module/components/executiontasks/doodle/SignatureET.js +64 -14
- 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 +62 -8
- package/lib/module/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
- package/lib/module/components/executiontasks/forms/FormGenerator.js +114 -14
- 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 +1 -5
- 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 +4 -2
- package/lib/module/components/executiontasks/httpRequest/HttpEtUtils.js.map +1 -1
- package/lib/module/components/executiontasks/httpRequest/HttpRequestET.js +0 -3
- 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 +7 -10
- 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 +64 -6
- package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/payments/init/InitPaymentET.js +63 -11
- package/lib/module/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js +71 -10
- 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 +61 -10
- package/lib/module/components/executiontasks/pickup/SLPickupET.js.map +1 -1
- package/lib/module/components/executiontasks/scan/ScanET.js +833 -0
- package/lib/module/components/executiontasks/scan/ScanET.js.map +1 -0
- package/lib/module/components/executiontasks/scan/ScanSchema.js +2 -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 +21 -0
- package/lib/module/components/executiontasks/scan/interfaces.js.map +1 -0
- package/lib/module/components/executiontasks/scan/sub_components/CScanner.js +94 -0
- package/lib/module/components/executiontasks/scan/sub_components/CScanner.js.map +1 -0
- package/lib/module/components/executiontasks/scan/sub_components/DropDownUtils.js +66 -0
- package/lib/module/components/executiontasks/scan/sub_components/DropDownUtils.js.map +1 -0
- package/lib/module/components/executiontasks/scan/sub_components/ERDropDown.js +105 -0
- package/lib/module/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -0
- package/lib/module/components/executiontasks/scan/sub_components/ScanList.js +124 -0
- package/lib/module/components/executiontasks/scan/sub_components/ScanList.js.map +1 -0
- package/lib/module/components/executiontasks/scan/utils.js +358 -0
- package/lib/module/components/executiontasks/scan/utils.js.map +1 -0
- package/lib/module/components/executiontasks/scanner/CScanner.js +3 -8
- package/lib/module/components/executiontasks/scanner/CScanner.js.map +1 -1
- package/lib/module/components/executiontasks/scanner/ScannerSchema.js +3 -3
- package/lib/module/components/executiontasks/scanner/ScannerSchema.js.map +1 -1
- package/lib/module/components/executiontasks/scanner/ScannerUtils.js +6 -18
- package/lib/module/components/executiontasks/scanner/ScannerUtils.js.map +1 -1
- package/lib/module/components/executiontasks/scanner/returns/DropDownSelector.js +0 -2
- package/lib/module/components/executiontasks/scanner/returns/DropDownSelector.js.map +1 -1
- package/lib/module/components/executiontasks/scanner/returns/DropDownUtils.js +0 -5
- package/lib/module/components/executiontasks/scanner/returns/DropDownUtils.js.map +1 -1
- package/lib/module/components/executiontasks/scanner/returns/RTReasonSelection.js +0 -3
- package/lib/module/components/executiontasks/scanner/returns/RTReasonSelection.js.map +1 -1
- package/lib/module/components/executiontasks/scanner/returns/RTScan.js +1 -19
- package/lib/module/components/executiontasks/scanner/returns/RTScan.js.map +1 -1
- package/lib/module/components/executiontasks/scanner/returns/ReasonDropDown.js +0 -7
- package/lib/module/components/executiontasks/scanner/returns/ReasonDropDown.js.map +1 -1
- package/lib/module/components/executiontasks/scanner/returns/ScanList.js +0 -15
- package/lib/module/components/executiontasks/scanner/returns/ScanList.js.map +1 -1
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js +325 -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 +49 -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 +4 -8
- package/lib/module/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
- 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/IconButton.js +26 -0
- package/lib/module/components/widgets/IconButton.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/SnackBarCustom.js +36 -18
- 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/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 +7 -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 +19 -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 +6 -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 +4 -3
- package/lib/module/index.js.map +1 -1
- package/lib/module/manager/dispatch/DispatchStateContainer.js +529 -151
- 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 +20 -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 +8 -14
- 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/syncmanager/AppSyncManager.js +12 -26
- package/lib/module/manager/syncmanager/AppSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/DBConfig.js +9 -5
- 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/database.js +27 -3
- package/lib/module/manager/syncmanager/database.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentHttpClient.js +0 -7
- package/lib/module/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentManager.js +3 -14
- package/lib/module/manager/syncmanager/document/DocumentManager.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentSyncManager.js +3 -35
- package/lib/module/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/ETEventsManager.js +59 -18
- package/lib/module/manager/syncmanager/events/ETEventsManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/EventsSyncManager.js +77 -68
- package/lib/module/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/SyncHttpClient.js +26 -11
- 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.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 +6 -6
- package/lib/module/styles/SdkColors.js.map +1 -1
- package/lib/module/styles/executionTasks/CommonStyles.js +41 -7
- package/lib/module/styles/executionTasks/CommonStyles.js.map +1 -1
- package/lib/module/ui/screens/CancellationScreen.js +36 -14
- package/lib/module/ui/screens/CancellationScreen.js.map +1 -1
- package/lib/module/ui/screens/CaptureInputScreen.js +7 -4
- package/lib/module/ui/screens/CaptureInputScreen.js.map +1 -1
- package/lib/module/ui/screens/CompleteObjectiveScreen.js +0 -3
- package/lib/module/ui/screens/CompleteObjectiveScreen.js.map +1 -1
- package/lib/module/ui/screens/DeliverScreen.js +7 -4
- package/lib/module/ui/screens/DeliverScreen.js.map +1 -1
- package/lib/module/ui/screens/DisplayScreen.js +5 -4
- package/lib/module/ui/screens/DisplayScreen.js.map +1 -1
- package/lib/module/ui/screens/DoodleScreen.js +7 -4
- package/lib/module/ui/screens/DoodleScreen.js.map +1 -1
- package/lib/module/ui/screens/DropCashScreen.js +7 -7
- package/lib/module/ui/screens/DropCashScreen.js.map +1 -1
- package/lib/module/ui/screens/ETScreensIndex.js +3 -1
- package/lib/module/ui/screens/ETScreensIndex.js.map +1 -1
- package/lib/module/ui/screens/FormsScreen.js +34 -6
- package/lib/module/ui/screens/FormsScreen.js.map +1 -1
- package/lib/module/ui/screens/GeofenceScreen.js +5 -4
- package/lib/module/ui/screens/GeofenceScreen.js.map +1 -1
- package/lib/module/ui/screens/HttpRequestScreen.js +5 -3
- package/lib/module/ui/screens/HttpRequestScreen.js.map +1 -1
- package/lib/module/ui/screens/ImageCaptureScreen.js +25 -5
- package/lib/module/ui/screens/ImageCaptureScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentScreen.js +12 -10
- package/lib/module/ui/screens/PaymentScreen.js.map +1 -1
- package/lib/module/ui/screens/PickupScreen.js +7 -5
- package/lib/module/ui/screens/PickupScreen.js.map +1 -1
- package/lib/module/ui/screens/RTScanScreen.js +9 -13
- package/lib/module/ui/screens/RTScanScreen.js.map +1 -1
- package/lib/module/ui/screens/ScanScreen.js +259 -0
- package/lib/module/ui/screens/ScanScreen.js.map +1 -0
- package/lib/module/ui/screens/StartWorkFlowScreen.js +22 -9
- package/lib/module/ui/screens/StartWorkFlowScreen.js.map +1 -1
- package/lib/module/ui/screens/ValidateOTPScreen.js +39 -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 +9 -1
- package/lib/module/ui/uiConfig/RouteParams.js.map +1 -1
- package/lib/module/utils/ApiUtils.js +101 -0
- package/lib/module/utils/ApiUtils.js.map +1 -0
- package/lib/module/utils/ExecTaskUtils.js +92 -21
- 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 +25 -10
- package/lib/module/utils/SyncManagerUtils.js.map +1 -1
- package/lib/module/utils/fcm/FCM.js +35 -4
- package/lib/module/utils/fcm/FCM.js.map +1 -1
- package/lib/module/utils/fcm/FcmUtils.js +50 -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/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 +51 -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/executiontasks/CompletedWFSchema.d.ts +2 -2
- package/lib/typescript/components/executiontasks/ExecutionTasksIndex.d.ts +6 -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/deliver/DeliverETInput.d.ts +7 -7
- package/lib/typescript/components/executiontasks/display/DisplaySchema.d.ts +5 -5
- package/lib/typescript/components/executiontasks/doodle/SignatureSchema.d.ts +7 -7
- package/lib/typescript/components/executiontasks/dropCash/DropCashSchema.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 +1 -1
- package/lib/typescript/components/executiontasks/forms/widgets/DropdownWidget.d.ts +9 -0
- package/lib/typescript/components/executiontasks/httpRequest/HttpRequestETSchema.d.ts +6 -6
- package/lib/typescript/components/executiontasks/imageCapture/CaptureSchema.d.ts +16 -11
- package/lib/typescript/components/executiontasks/payments/completePayment/CompletePaymentSchema.d.ts +2 -2
- package/lib/typescript/components/executiontasks/payments/init/InitPaymentSchema.d.ts +3 -3
- 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/scan/ScanET.d.ts +16 -0
- package/lib/typescript/components/executiontasks/scan/ScanSchema.d.ts +70 -0
- package/lib/typescript/components/executiontasks/scan/constants.d.ts +6 -0
- package/lib/typescript/components/executiontasks/scan/interfaces.d.ts +41 -0
- package/lib/typescript/components/executiontasks/scan/sub_components/CScanner.d.ts +7 -0
- 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/ScanList.d.ts +8 -0
- package/lib/typescript/components/executiontasks/scan/utils.d.ts +21 -0
- package/lib/typescript/components/executiontasks/scanner/ScannerSchema.d.ts +6 -6
- package/lib/typescript/components/executiontasks/scanner/returns/DropDownUtils.d.ts +1 -2
- package/lib/typescript/components/executiontasks/scanner/returns/RTReasonSelection.d.ts +1 -1
- package/lib/typescript/components/executiontasks/scanner/returns/ScanList.d.ts +1 -1
- 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/verifyOtp/VerifyOtpSchema.d.ts +3 -3
- package/lib/typescript/components/widgets/IconButton.d.ts +9 -0
- package/lib/typescript/components/widgets/SnackBarCustom.d.ts +9 -5
- package/lib/typescript/components/widgets/SplitTextInput.d.ts +12 -0
- package/lib/typescript/constants/apiConstants.d.ts +6 -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 +5 -0
- package/lib/typescript/events/EventListener.d.ts +5 -0
- package/lib/typescript/events/constants.d.ts +5 -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 +5 -4
- package/lib/typescript/manager/dispatch/DispatchStateContainer.d.ts +21 -8
- 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 +6 -0
- package/lib/typescript/manager/sdk/DispatchSdkCache.d.ts +2 -0
- package/lib/typescript/manager/syncmanager/AppSyncManager.d.ts +1 -0
- package/lib/typescript/manager/syncmanager/DBConfig.d.ts +22 -2
- package/lib/typescript/manager/syncmanager/database.d.ts +5 -0
- package/lib/typescript/manager/syncmanager/document/models.d.ts +1 -1
- package/lib/typescript/manager/syncmanager/events/ETEventsManager.d.ts +5 -1
- package/lib/typescript/manager/syncmanager/events/EventsSyncManager.d.ts +5 -1
- package/lib/typescript/manager/syncmanager/events/SyncHttpClient.d.ts +3 -1
- package/lib/typescript/models/DispatchModels.d.ts +56 -1
- 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 +27 -8
- package/lib/typescript/models/execTasks/ETConfig.d.ts +8 -4
- package/lib/typescript/models/sdk.d.ts +5 -0
- package/lib/typescript/native/signature/SignatureCapture.d.ts +1 -1
- package/lib/typescript/network/NetworkUtils.d.ts +1 -5
- package/lib/typescript/styles/SdkColors.d.ts +1 -0
- package/lib/typescript/styles/executionTasks/CommonStyles.d.ts +36 -0
- package/lib/typescript/ui/screens/ETScreensIndex.d.ts +3 -1
- package/lib/typescript/ui/screens/ScanScreen.d.ts +3 -0
- package/lib/typescript/ui/screens/ValidateOTPScreen.d.ts +3 -0
- package/lib/typescript/ui/uiConfig/RouteParams.d.ts +8 -0
- package/lib/typescript/utils/ApiUtils.d.ts +61 -0
- package/lib/typescript/utils/ExecTaskUtils.d.ts +7 -2
- package/lib/typescript/utils/NetworkUtil.d.ts +1 -1
- package/lib/typescript/utils/SyncManagerUtils.d.ts +3 -1
- package/lib/typescript/utils/hooks/useTimer.d.ts +5 -0
- package/lib/typescript/utils/storage.d.ts +17 -0
- package/package.json +23 -24
- package/tsconfig.json +9 -8
- package/file_unzip.js +0 -5
- package/mobile-execution-lib-0.6.4.tgz +0 -0
|
@@ -3,7 +3,6 @@ import Network from './../resources/network';
|
|
|
3
3
|
*
|
|
4
4
|
* @class Helper
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
6
|
class Helper {
|
|
8
7
|
/**
|
|
9
8
|
* Check the availability of a network for an app.
|
|
@@ -19,9 +18,7 @@ class Helper {
|
|
|
19
18
|
return false;
|
|
20
19
|
}
|
|
21
20
|
}
|
|
22
|
-
|
|
23
21
|
}
|
|
24
|
-
|
|
25
22
|
const helper = new Helper();
|
|
26
23
|
export default helper;
|
|
27
24
|
//# sourceMappingURL=helper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Network","Helper","checkNetwork","heartBeat","e","helper"],"sources":["helper.ts"],"sourcesContent":["import Network from './../resources/network';\n/**\n *\n * @class Helper\n */\nclass Helper {\n /**\n * Check the availability of a network for an app.\n *\n * @returns {Promise<boolean>}\n */\n async checkNetwork(): Promise<boolean> {\n try {\n await Network.heartBeat();\n return true;\n } catch (e: any) {\n // console.log('checkNetwork catch', e);\n return false;\n }\n }\n}\n\nconst helper = new Helper();\nexport default helper;\n"],"mappings":"AAAA,OAAOA,
|
|
1
|
+
{"version":3,"names":["Network","Helper","checkNetwork","heartBeat","e","helper"],"sources":["helper.ts"],"sourcesContent":["import Network from './../resources/network';\n/**\n *\n * @class Helper\n */\nclass Helper {\n /**\n * Check the availability of a network for an app.\n *\n * @returns {Promise<boolean>}\n */\n async checkNetwork(): Promise<boolean> {\n try {\n await Network.heartBeat();\n return true;\n } catch (e: any) {\n // console.log('checkNetwork catch', e);\n return false;\n }\n }\n}\n\nconst helper = new Helper();\nexport default helper;\n"],"mappings":"AAAA,OAAOA,OAAO,MAAM,wBAAwB;AAC5C;AACA;AACA;AACA;AACA,MAAMC,MAAM,CAAC;EACX;AACF;AACA;AACA;AACA;EACE,MAAMC,YAAYA,CAAA,EAAqB;IACrC,IAAI;MACF,MAAMF,OAAO,CAACG,SAAS,EAAE;MACzB,OAAO,IAAI;IACb,CAAC,CAAC,OAAOC,CAAM,EAAE;MACf;MACA,OAAO,KAAK;IACd;EACF;AACF;AAEA,MAAMC,MAAM,GAAG,IAAIJ,MAAM,EAAE;AAC3B,eAAeI,MAAM"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
|
+
const useTimer = props => {
|
|
3
|
+
const {
|
|
4
|
+
initialMinute = 0,
|
|
5
|
+
initialSeconds = 0
|
|
6
|
+
} = props;
|
|
7
|
+
const [minutes, setMinutes] = useState(initialMinute);
|
|
8
|
+
const [seconds, setSeconds] = useState(initialSeconds);
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
let myInterval = setInterval(() => {
|
|
11
|
+
if (seconds > 0) {
|
|
12
|
+
setSeconds(seconds - 1);
|
|
13
|
+
}
|
|
14
|
+
if (seconds === 0) {
|
|
15
|
+
if (minutes === 0) {
|
|
16
|
+
clearInterval(myInterval);
|
|
17
|
+
} else {
|
|
18
|
+
setMinutes(minutes - 1);
|
|
19
|
+
setSeconds(59);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}, 1000);
|
|
23
|
+
return () => {
|
|
24
|
+
clearInterval(myInterval);
|
|
25
|
+
};
|
|
26
|
+
});
|
|
27
|
+
const resetTimer = () => {
|
|
28
|
+
if (!minutes && !seconds) {
|
|
29
|
+
setMinutes(initialMinute);
|
|
30
|
+
setSeconds(initialSeconds);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
const timer = minutes === 0 && seconds === 0 ? null : `${minutes}: ${seconds < 10 ? `0${seconds}` : seconds}`;
|
|
34
|
+
return [timer, resetTimer];
|
|
35
|
+
};
|
|
36
|
+
export default useTimer;
|
|
37
|
+
//# sourceMappingURL=useTimer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useEffect","useState","useTimer","props","initialMinute","initialSeconds","minutes","setMinutes","seconds","setSeconds","myInterval","setInterval","clearInterval","resetTimer","timer"],"sources":["useTimer.ts"],"sourcesContent":["import { useEffect, useState } from 'react';\n\nconst useTimer = (props: {\n initialMinute: number;\n initialSeconds: number;\n}): [string | null, () => void] => {\n const { initialMinute = 0, initialSeconds = 0 } = props;\n const [minutes, setMinutes] = useState(initialMinute);\n const [seconds, setSeconds] = useState(initialSeconds);\n useEffect(() => {\n let myInterval = setInterval(() => {\n if (seconds > 0) {\n setSeconds(seconds - 1);\n }\n if (seconds === 0) {\n if (minutes === 0) {\n clearInterval(myInterval);\n } else {\n setMinutes(minutes - 1);\n setSeconds(59);\n }\n }\n }, 1000);\n return () => {\n clearInterval(myInterval);\n };\n });\n\n const resetTimer = () => {\n if (!minutes && !seconds) {\n setMinutes(initialMinute);\n setSeconds(initialSeconds);\n }\n };\n\n const timer =\n minutes === 0 && seconds === 0\n ? null\n : `${minutes}: ${seconds < 10 ? `0${seconds}` : seconds}`;\n\n return [timer, resetTimer];\n};\n\nexport default useTimer;\n"],"mappings":"AAAA,SAASA,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAE3C,MAAMC,QAAQ,GAAIC,KAGjB,IAAkC;EACjC,MAAM;IAAEC,aAAa,GAAG,CAAC;IAAEC,cAAc,GAAG;EAAE,CAAC,GAAGF,KAAK;EACvD,MAAM,CAACG,OAAO,EAAEC,UAAU,CAAC,GAAGN,QAAQ,CAACG,aAAa,CAAC;EACrD,MAAM,CAACI,OAAO,EAAEC,UAAU,CAAC,GAAGR,QAAQ,CAACI,cAAc,CAAC;EACtDL,SAAS,CAAC,MAAM;IACd,IAAIU,UAAU,GAAGC,WAAW,CAAC,MAAM;MACjC,IAAIH,OAAO,GAAG,CAAC,EAAE;QACfC,UAAU,CAACD,OAAO,GAAG,CAAC,CAAC;MACzB;MACA,IAAIA,OAAO,KAAK,CAAC,EAAE;QACjB,IAAIF,OAAO,KAAK,CAAC,EAAE;UACjBM,aAAa,CAACF,UAAU,CAAC;QAC3B,CAAC,MAAM;UACLH,UAAU,CAACD,OAAO,GAAG,CAAC,CAAC;UACvBG,UAAU,CAAC,EAAE,CAAC;QAChB;MACF;IACF,CAAC,EAAE,IAAI,CAAC;IACR,OAAO,MAAM;MACXG,aAAa,CAACF,UAAU,CAAC;IAC3B,CAAC;EACH,CAAC,CAAC;EAEF,MAAMG,UAAU,GAAGA,CAAA,KAAM;IACvB,IAAI,CAACP,OAAO,IAAI,CAACE,OAAO,EAAE;MACxBD,UAAU,CAACH,aAAa,CAAC;MACzBK,UAAU,CAACJ,cAAc,CAAC;IAC5B;EACF,CAAC;EAED,MAAMS,KAAK,GACTR,OAAO,KAAK,CAAC,IAAIE,OAAO,KAAK,CAAC,GAC1B,IAAI,GACH,GAAEF,OAAQ,KAAIE,OAAO,GAAG,EAAE,GAAI,IAAGA,OAAQ,EAAC,GAAGA,OAAQ,EAAC;EAE7D,OAAO,CAACM,KAAK,EAAED,UAAU,CAAC;AAC5B,CAAC;AAED,eAAeX,QAAQ"}
|
|
@@ -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;MAAM;MAEV;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,EAAE;AACrC,eAAekB,WAAW"}
|
|
@@ -1,24 +1,24 @@
|
|
|
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';
|
|
5
7
|
/**
|
|
6
8
|
* Creating a wrapper arround localstorage as https://reactnative.dev/docs/asyncstorage
|
|
7
9
|
* depreciated using communiity package instead https://github.com/react-native-async-storage/async-storage
|
|
8
10
|
*
|
|
9
11
|
* @class Storage
|
|
10
12
|
*/
|
|
11
|
-
|
|
12
13
|
class Storage {
|
|
13
14
|
// private prefixKey: string;
|
|
14
|
-
constructor() {}
|
|
15
15
|
|
|
16
|
+
constructor() {}
|
|
16
17
|
static getInstance() {
|
|
17
18
|
if (!this.classInstance) {
|
|
18
19
|
this.classInstance = new Storage();
|
|
19
20
|
Storage.prefixKey = LOCAL_STORAGE_KEY_PREFIX;
|
|
20
21
|
}
|
|
21
|
-
|
|
22
22
|
return this.classInstance;
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
@@ -27,38 +27,32 @@ class Storage {
|
|
|
27
27
|
* @param {string} key
|
|
28
28
|
* @returns {Promise<string | null>}
|
|
29
29
|
*/
|
|
30
|
-
|
|
31
|
-
|
|
32
30
|
async getItem(key) {
|
|
33
31
|
if (!key) {
|
|
34
32
|
throw new TypeError('In-valid params.');
|
|
35
33
|
}
|
|
36
|
-
|
|
37
34
|
return await AsyncStorage.getItem(Storage.prefixKey + key);
|
|
38
35
|
}
|
|
36
|
+
|
|
39
37
|
/**
|
|
40
38
|
* Save a single itema
|
|
41
39
|
*
|
|
42
40
|
* @param {string} key
|
|
43
41
|
* @returns {Promise<void>}
|
|
44
42
|
*/
|
|
45
|
-
|
|
46
|
-
|
|
47
43
|
async setItem(key, value) {
|
|
48
44
|
if (!(key && value)) {
|
|
49
45
|
throw TypeError('In-valid params.');
|
|
50
46
|
}
|
|
51
|
-
|
|
52
47
|
return await AsyncStorage.setItem(Storage.prefixKey + key, value);
|
|
53
48
|
}
|
|
49
|
+
|
|
54
50
|
/**
|
|
55
51
|
* Save a Object
|
|
56
52
|
*
|
|
57
53
|
* @param {string} key
|
|
58
54
|
* @returns {Promise<{}|[]>}
|
|
59
55
|
*/
|
|
60
|
-
|
|
61
|
-
|
|
62
56
|
async setObject(key, value) {
|
|
63
57
|
if (!key) {
|
|
64
58
|
throw TypeError('In-valid params.');
|
|
@@ -66,6 +60,27 @@ class Storage {
|
|
|
66
60
|
return await AsyncStorage.setItem(Storage.prefixKey + key, JSON.stringify(value));
|
|
67
61
|
}
|
|
68
62
|
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @param input: Array<MultiObject>
|
|
67
|
+
* @returns
|
|
68
|
+
*/
|
|
69
|
+
async setMultiObject(input) {
|
|
70
|
+
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)) {
|
|
71
|
+
throw TypeError(`In-valid params: ${input}`);
|
|
72
|
+
} else {
|
|
73
|
+
try {
|
|
74
|
+
return await AsyncStorage.multiSet(input.map(arg => {
|
|
75
|
+
const v = [Storage.prefixKey + arg.key, JSON.stringify(arg.value)];
|
|
76
|
+
return v;
|
|
77
|
+
}));
|
|
78
|
+
} catch (error) {
|
|
79
|
+
Logger.getInstance().logEvent('~ setMultiObject Async Storage', 'Unable to multiSet data in Async Storage', LOG_TYPE.SDK_ERROR);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
69
84
|
/**
|
|
70
85
|
* Get an Object
|
|
71
86
|
*
|
|
@@ -73,15 +88,11 @@ class Storage {
|
|
|
73
88
|
* @returns {Promise<void>}
|
|
74
89
|
*/
|
|
75
90
|
// the return type of the function could be made as Generic
|
|
76
|
-
|
|
77
|
-
|
|
78
91
|
async getObject(key) {
|
|
79
92
|
if (!key) {
|
|
80
93
|
throw new TypeError('In-valid params.');
|
|
81
94
|
}
|
|
82
|
-
|
|
83
95
|
let val = await AsyncStorage.getItem(Storage.prefixKey + key);
|
|
84
|
-
|
|
85
96
|
if (val !== null) {
|
|
86
97
|
const obj = JSON.parse(val);
|
|
87
98
|
return obj;
|
|
@@ -89,27 +100,43 @@ class Storage {
|
|
|
89
100
|
return null;
|
|
90
101
|
}
|
|
91
102
|
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Get an Object
|
|
106
|
+
*
|
|
107
|
+
* @param {string} keys
|
|
108
|
+
* @returns {Promise<void>}
|
|
109
|
+
*/
|
|
110
|
+
|
|
111
|
+
async getMultiObject(keys) {
|
|
112
|
+
if (!keys) {
|
|
113
|
+
throw new TypeError(`Read In-valid params: ${keys}`);
|
|
114
|
+
}
|
|
115
|
+
let items = await AsyncStorage.multiGet(keys.map(key => Storage.prefixKey + key));
|
|
116
|
+
if (items) {
|
|
117
|
+
return items.map(i => {
|
|
118
|
+
if (i[1]) return [i[0], JSON.parse(i[1])];else return [i[0], null];
|
|
119
|
+
});
|
|
120
|
+
} else {
|
|
121
|
+
return [[]];
|
|
122
|
+
}
|
|
123
|
+
}
|
|
92
124
|
/**
|
|
93
125
|
* Deletes a single item
|
|
94
126
|
* @param {string} key
|
|
95
127
|
* @returns {Promise<void>}
|
|
96
128
|
*/
|
|
97
129
|
// need to handle cases for wrongs keys
|
|
98
|
-
|
|
99
|
-
|
|
100
130
|
async deleteItem(key) {
|
|
101
131
|
if (!key) {
|
|
102
132
|
throw new TypeError('In-valid params.');
|
|
103
133
|
}
|
|
104
|
-
|
|
105
134
|
await AsyncStorage.removeItem(Storage.prefixKey + key);
|
|
106
135
|
}
|
|
107
|
-
|
|
108
136
|
async deleteMultiple(keys) {
|
|
109
137
|
if (!keys || keys.length === 0) {
|
|
110
138
|
throw new TypeError('In-valid params.');
|
|
111
139
|
}
|
|
112
|
-
|
|
113
140
|
const alteredKeys = keys.map(k => {
|
|
114
141
|
if (k.startsWith(Storage.prefixKey)) {
|
|
115
142
|
return k;
|
|
@@ -119,24 +146,19 @@ class Storage {
|
|
|
119
146
|
});
|
|
120
147
|
await AsyncStorage.multiRemove(alteredKeys);
|
|
121
148
|
}
|
|
122
|
-
|
|
123
149
|
async getAllKeys(prefix) {
|
|
124
150
|
if (!prefix) {
|
|
125
151
|
throw new TypeError('In-valid params.');
|
|
126
152
|
}
|
|
127
|
-
|
|
128
153
|
const keys = await AsyncStorage.getAllKeys();
|
|
129
154
|
return keys.filter(key => {
|
|
130
155
|
return key.startsWith(Storage.prefixKey + prefix);
|
|
131
156
|
});
|
|
132
157
|
}
|
|
158
|
+
}
|
|
133
159
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
160
|
+
// const storage = new Storage();
|
|
137
161
|
_defineProperty(Storage, "classInstance", void 0);
|
|
138
|
-
|
|
139
162
|
_defineProperty(Storage, "prefixKey", void 0);
|
|
140
|
-
|
|
141
163
|
export default Storage;
|
|
142
164
|
//# 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","
|
|
1
|
+
{"version":3,"names":["LOCAL_STORAGE_KEY_PREFIX","AsyncStorage","Logger","LOG_TYPE","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","_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';\n\ninterface MultiObject {\n key: string;\n value: {} | [];\n}\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 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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"}
|
|
@@ -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,EAAE,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
|
}
|
|
@@ -38,5 +38,9 @@ import ScanList from './scanner/returns/ScanList';
|
|
|
38
38
|
import CScanner from './scanner/CScanner';
|
|
39
39
|
import RTReasonSelection from './scanner/returns/RTReasonSelection';
|
|
40
40
|
import HttpRequestET from './httpRequest/HttpRequestET';
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
import ScanET from './scan/ScanET';
|
|
42
|
+
import ValidateOTPET from './validateOTP/ValidateOTPET';
|
|
43
|
+
import type { ScannerInput as SLScannerInput, ScannerOutput as SLScannerOutput } from './scan/ScanSchema';
|
|
44
|
+
import type { ValidateOTPInput, ValidateOTPOutput } from './validateOTP/ValidateOTPSchema';
|
|
45
|
+
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, ScannerInput, ScannerOutput, BaseETResponse, OtpInputSchema, OtpOutputSchema, CaptureTextInput, CaptureTextOutput, VerifyInput, VerifyInputResponse, DropCashInput, DropCashOutput, SLScannerInput, SLScannerOutput, ValidateOTPInput, ValidateOTPOutput, };
|
|
46
|
+
export { CancelET, DeliverET, DisplayModalET, SignatureET, FormGenerator, ImageCapture, VerifyLocationET, verifyLocation, PickupET, VerifyOtpET, CaptureText, InitPaymentET, ProcessPaymentET, DropCashET, CompletePaymentET, SLDeliverET, SLPickupET, SLDropCash, RTScan, ScanList, CScanner, RTReasonSelection, HttpRequestET, ScanET, ValidateOTPET, };
|
|
@@ -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;
|
|
@@ -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,19 @@ 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
36
|
};
|
|
37
|
-
export
|
|
37
|
+
export type DeliverOutput = BaseETResponse & {
|
|
38
38
|
/**
|
|
39
39
|
* Remark captured at time of delivery
|
|
40
40
|
*/
|
|
@@ -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;
|
|
@@ -2,24 +2,24 @@
|
|
|
2
2
|
* Length (in cm)
|
|
3
3
|
*/
|
|
4
4
|
import type { BaseETRequest, BaseETResponse } from '../../../models/execTasks/ETBaseModels';
|
|
5
|
-
export
|
|
5
|
+
export type Length = number;
|
|
6
6
|
/**
|
|
7
7
|
* Breadth (in cm)
|
|
8
8
|
*/
|
|
9
|
-
export
|
|
9
|
+
export type Breadth = number;
|
|
10
10
|
/**
|
|
11
11
|
* Maximum Size limit (in kb) of doodle image
|
|
12
12
|
*/
|
|
13
|
-
export
|
|
13
|
+
export type MaxFileSize = number;
|
|
14
14
|
/**
|
|
15
15
|
* Pen colour hex code
|
|
16
16
|
*/
|
|
17
|
-
export
|
|
17
|
+
export type PenColor = string;
|
|
18
18
|
/**
|
|
19
19
|
* Any manual instruction to display for the Operator
|
|
20
20
|
*/
|
|
21
|
-
export
|
|
22
|
-
export
|
|
21
|
+
export type Instruction = string;
|
|
22
|
+
export type SignatureInput = BaseETRequest & {
|
|
23
23
|
resolution: Dimension;
|
|
24
24
|
fileSizeLimit: MaxFileSize;
|
|
25
25
|
penColor?: PenColor;
|
|
@@ -45,4 +45,4 @@ export interface SignatureBaseResponse {
|
|
|
45
45
|
name: string;
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
|
-
export
|
|
48
|
+
export type SignatureOutput = BaseETResponse & SignatureBaseResponse;
|