@os1-platform/dispatch-mobile 2.1.5 → 2.1.7
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/lib/commonjs/analytics/firebase/FirebaseLogging.js +24 -0
- package/lib/commonjs/analytics/firebase/FirebaseLogging.js.map +1 -0
- package/lib/commonjs/analytics/sentry/SentryAnalyticsSingleton.js +44 -0
- package/lib/commonjs/analytics/sentry/SentryAnalyticsSingleton.js.map +1 -0
- package/lib/commonjs/analytics/sentry/SentryAnalyticsUtils.js +83 -0
- package/lib/commonjs/analytics/sentry/SentryAnalyticsUtils.js.map +1 -0
- package/lib/commonjs/analytics/sentry/SentryModels.js +6 -0
- package/lib/commonjs/analytics/sentry/SentryModels.js.map +1 -0
- package/lib/commonjs/analytics/sentry/SentrySdkConstants.js +78 -0
- package/lib/commonjs/analytics/sentry/SentrySdkConstants.js.map +1 -0
- package/lib/commonjs/components/executiontasks/cancellation/CancelET.js +51 -0
- package/lib/commonjs/components/executiontasks/cancellation/CancelET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js +23 -0
- package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js.map +1 -1
- package/lib/commonjs/components/executiontasks/deliver/DeliverET.js +16 -0
- package/lib/commonjs/components/executiontasks/deliver/DeliverET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js +52 -2
- package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/display/DisplayModalET.js +16 -0
- package/lib/commonjs/components/executiontasks/display/DisplayModalET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/doodle/SignatureET.js +41 -4
- package/lib/commonjs/components/executiontasks/doodle/SignatureET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js +16 -0
- package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js +23 -0
- package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/FormGenerator.js +41 -18
- package/lib/commonjs/components/executiontasks/forms/FormGenerator.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js +14 -3
- package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +12 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js +29 -16
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js +71 -6
- package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js +23 -0
- package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js +37 -0
- package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js +23 -0
- package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/pickup/PickupET.js +16 -0
- package/lib/commonjs/components/executiontasks/pickup/PickupET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js +44 -0
- package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/ScanET.js +40 -1
- package/lib/commonjs/components/executiontasks/scan/ScanET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/sub_components/SummaryPage.js +23 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/SummaryPage.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js +30 -0
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -1
- package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js +9 -0
- package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
- package/lib/commonjs/components/widgets/CancelOrderDialog.js +16 -0
- package/lib/commonjs/components/widgets/CancelOrderDialog.js.map +1 -1
- package/lib/commonjs/components/widgets/Card.js +17 -1
- package/lib/commonjs/components/widgets/Card.js.map +1 -1
- package/lib/commonjs/components/widgets/ModalWidget.js +22 -2
- package/lib/commonjs/components/widgets/ModalWidget.js.map +1 -1
- package/lib/commonjs/components/widgets/SearchBar.js +9 -0
- package/lib/commonjs/components/widgets/SearchBar.js.map +1 -1
- package/lib/commonjs/components/widgets/SnackBarCustom.js +9 -0
- package/lib/commonjs/components/widgets/SnackBarCustom.js.map +1 -1
- package/lib/commonjs/components/widgets/SplitTextInput.js +9 -0
- package/lib/commonjs/components/widgets/SplitTextInput.js.map +1 -1
- package/lib/commonjs/components/widgets/TabsComponent.js +12 -1
- package/lib/commonjs/components/widgets/TabsComponent.js.map +1 -1
- package/lib/commonjs/index.js +53 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/manager/location/LocationManager.js +9 -2
- package/lib/commonjs/manager/location/LocationManager.js.map +1 -1
- package/lib/commonjs/manager/sdk/DispatchSDKManager.js +3 -3
- package/lib/commonjs/manager/sdk/DispatchSDKManager.js.map +1 -1
- package/lib/commonjs/manager/sdk/DispatchSdkCache.js +3 -2
- package/lib/commonjs/manager/sdk/DispatchSdkCache.js.map +1 -1
- package/lib/commonjs/manager/sdk/callbacksHandler.js +8 -1
- package/lib/commonjs/manager/sdk/callbacksHandler.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/DBConfig.js +3 -1
- package/lib/commonjs/manager/syncmanager/DBConfig.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js +77 -3
- package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentManager.js +17 -3
- package/lib/commonjs/manager/syncmanager/document/DocumentManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js +206 -6
- package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
- package/lib/commonjs/models/execTasks/ETBaseModels.js.map +1 -1
- package/lib/commonjs/models/sdk.js.map +1 -1
- package/lib/commonjs/styles/executionTasks/CommonStyles.js +4 -4
- package/lib/commonjs/styles/executionTasks/CommonStyles.js.map +1 -1
- package/lib/commonjs/ui/screens/DeliverScreen.js +18 -1
- package/lib/commonjs/ui/screens/DeliverScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DoodleScreen.js +9 -0
- package/lib/commonjs/ui/screens/DoodleScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DropCashScreen.js +10 -1
- package/lib/commonjs/ui/screens/DropCashScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FormsScreen.js +7 -0
- package/lib/commonjs/ui/screens/FormsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/GeofenceScreen.js +12 -0
- package/lib/commonjs/ui/screens/GeofenceScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ImageCaptureScreen.js +9 -0
- package/lib/commonjs/ui/screens/ImageCaptureScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentScreen.js +9 -0
- package/lib/commonjs/ui/screens/PaymentScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PickupScreen.js +9 -0
- package/lib/commonjs/ui/screens/PickupScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ValidateOTPScreen.js +12 -0
- package/lib/commonjs/ui/screens/ValidateOTPScreen.js.map +1 -1
- package/lib/commonjs/utils/ExecTaskUtils.js +30 -13
- package/lib/commonjs/utils/ExecTaskUtils.js.map +1 -1
- package/lib/commonjs/utils/Logger.js +54 -41
- package/lib/commonjs/utils/Logger.js.map +1 -1
- package/lib/commonjs/utils/SyncManagerUtils.js +12 -2
- package/lib/commonjs/utils/SyncManagerUtils.js.map +1 -1
- package/lib/commonjs/utils/utils.js +24 -0
- package/lib/commonjs/utils/utils.js.map +1 -1
- package/lib/module/analytics/firebase/FirebaseLogging.js +17 -0
- package/lib/module/analytics/firebase/FirebaseLogging.js.map +1 -0
- package/lib/module/analytics/sentry/SentryAnalyticsSingleton.js +37 -0
- package/lib/module/analytics/sentry/SentryAnalyticsSingleton.js.map +1 -0
- package/lib/module/analytics/sentry/SentryAnalyticsUtils.js +74 -0
- package/lib/module/analytics/sentry/SentryAnalyticsUtils.js.map +1 -0
- package/lib/module/analytics/sentry/SentryModels.js +2 -0
- package/lib/module/analytics/sentry/SentryModels.js.map +1 -0
- package/lib/module/analytics/sentry/SentrySdkConstants.js +72 -0
- package/lib/module/analytics/sentry/SentrySdkConstants.js.map +1 -0
- package/lib/module/components/executiontasks/cancellation/CancelET.js +51 -0
- package/lib/module/components/executiontasks/cancellation/CancelET.js.map +1 -1
- package/lib/module/components/executiontasks/captureInput/CaptureText.js +23 -0
- package/lib/module/components/executiontasks/captureInput/CaptureText.js.map +1 -1
- package/lib/module/components/executiontasks/deliver/DeliverET.js +16 -0
- package/lib/module/components/executiontasks/deliver/DeliverET.js.map +1 -1
- package/lib/module/components/executiontasks/deliver/SLDeliverET.js +52 -2
- package/lib/module/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
- package/lib/module/components/executiontasks/display/DisplayModalET.js +16 -0
- package/lib/module/components/executiontasks/display/DisplayModalET.js.map +1 -1
- package/lib/module/components/executiontasks/doodle/SignatureET.js +41 -4
- package/lib/module/components/executiontasks/doodle/SignatureET.js.map +1 -1
- package/lib/module/components/executiontasks/dropCash/DropCashET.js +16 -0
- package/lib/module/components/executiontasks/dropCash/DropCashET.js.map +1 -1
- package/lib/module/components/executiontasks/dropCash/SLDropCash.js +23 -0
- package/lib/module/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
- package/lib/module/components/executiontasks/forms/FormGenerator.js +41 -18
- package/lib/module/components/executiontasks/forms/FormGenerator.js.map +1 -1
- package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js +14 -3
- package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
- package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +12 -1
- package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/CaptureSchema.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js +29 -16
- package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/ImageCapture.js +72 -7
- package/lib/module/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
- package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js +23 -0
- package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/payments/init/InitPaymentET.js +37 -0
- package/lib/module/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js +23 -0
- package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/pickup/PickupET.js +16 -0
- package/lib/module/components/executiontasks/pickup/PickupET.js.map +1 -1
- package/lib/module/components/executiontasks/pickup/SLPickupET.js +44 -0
- package/lib/module/components/executiontasks/pickup/SLPickupET.js.map +1 -1
- package/lib/module/components/executiontasks/scan/ScanET.js +40 -1
- package/lib/module/components/executiontasks/scan/ScanET.js.map +1 -1
- package/lib/module/components/executiontasks/scan/sub_components/SummaryPage.js +23 -0
- package/lib/module/components/executiontasks/scan/sub_components/SummaryPage.js.map +1 -1
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js +30 -0
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -1
- package/lib/module/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -1
- package/lib/module/components/executiontasks/verifyOtp/VerifyOtpET.js +9 -0
- package/lib/module/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
- package/lib/module/components/widgets/CancelOrderDialog.js +16 -0
- package/lib/module/components/widgets/CancelOrderDialog.js.map +1 -1
- package/lib/module/components/widgets/Card.js +17 -1
- package/lib/module/components/widgets/Card.js.map +1 -1
- package/lib/module/components/widgets/ModalWidget.js +22 -2
- package/lib/module/components/widgets/ModalWidget.js.map +1 -1
- package/lib/module/components/widgets/SearchBar.js +9 -0
- package/lib/module/components/widgets/SearchBar.js.map +1 -1
- package/lib/module/components/widgets/SnackBarCustom.js +9 -0
- package/lib/module/components/widgets/SnackBarCustom.js.map +1 -1
- package/lib/module/components/widgets/SplitTextInput.js +9 -0
- package/lib/module/components/widgets/SplitTextInput.js.map +1 -1
- package/lib/module/components/widgets/TabsComponent.js +12 -1
- package/lib/module/components/widgets/TabsComponent.js.map +1 -1
- package/lib/module/index.js +11 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/manager/location/LocationManager.js +9 -2
- package/lib/module/manager/location/LocationManager.js.map +1 -1
- package/lib/module/manager/sdk/DispatchSDKManager.js +3 -3
- package/lib/module/manager/sdk/DispatchSDKManager.js.map +1 -1
- package/lib/module/manager/sdk/DispatchSdkCache.js +3 -2
- package/lib/module/manager/sdk/DispatchSdkCache.js.map +1 -1
- package/lib/module/manager/sdk/callbacksHandler.js +8 -1
- package/lib/module/manager/sdk/callbacksHandler.js.map +1 -1
- package/lib/module/manager/syncmanager/DBConfig.js +3 -1
- package/lib/module/manager/syncmanager/DBConfig.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentHttpClient.js +77 -3
- package/lib/module/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentManager.js +17 -3
- package/lib/module/manager/syncmanager/document/DocumentManager.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentSyncManager.js +207 -7
- package/lib/module/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
- package/lib/module/models/execTasks/ETBaseModels.js.map +1 -1
- package/lib/module/models/sdk.js.map +1 -1
- package/lib/module/styles/executionTasks/CommonStyles.js +5 -5
- package/lib/module/styles/executionTasks/CommonStyles.js.map +1 -1
- package/lib/module/ui/screens/DeliverScreen.js +18 -1
- package/lib/module/ui/screens/DeliverScreen.js.map +1 -1
- package/lib/module/ui/screens/DoodleScreen.js +9 -0
- package/lib/module/ui/screens/DoodleScreen.js.map +1 -1
- package/lib/module/ui/screens/DropCashScreen.js +10 -0
- package/lib/module/ui/screens/DropCashScreen.js.map +1 -1
- package/lib/module/ui/screens/FormsScreen.js +7 -0
- package/lib/module/ui/screens/FormsScreen.js.map +1 -1
- package/lib/module/ui/screens/GeofenceScreen.js +12 -0
- package/lib/module/ui/screens/GeofenceScreen.js.map +1 -1
- package/lib/module/ui/screens/ImageCaptureScreen.js +9 -0
- package/lib/module/ui/screens/ImageCaptureScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentScreen.js +9 -0
- package/lib/module/ui/screens/PaymentScreen.js.map +1 -1
- package/lib/module/ui/screens/PickupScreen.js +9 -0
- package/lib/module/ui/screens/PickupScreen.js.map +1 -1
- package/lib/module/ui/screens/ValidateOTPScreen.js +12 -0
- package/lib/module/ui/screens/ValidateOTPScreen.js.map +1 -1
- package/lib/module/utils/ExecTaskUtils.js +30 -13
- package/lib/module/utils/ExecTaskUtils.js.map +1 -1
- package/lib/module/utils/Logger.js +54 -39
- package/lib/module/utils/Logger.js.map +1 -1
- package/lib/module/utils/SyncManagerUtils.js +12 -2
- package/lib/module/utils/SyncManagerUtils.js.map +1 -1
- package/lib/module/utils/utils.js +22 -0
- package/lib/module/utils/utils.js.map +1 -1
- package/lib/typescript/analytics/firebase/FirebaseLogging.d.ts +2 -0
- package/lib/typescript/analytics/sentry/SentryAnalyticsSingleton.d.ts +11 -0
- package/lib/typescript/analytics/sentry/SentryAnalyticsUtils.d.ts +2 -0
- package/lib/typescript/analytics/sentry/SentryModels.d.ts +15 -0
- package/lib/typescript/analytics/sentry/SentrySdkConstants.d.ts +66 -0
- package/lib/typescript/components/executiontasks/imageCapture/CaptureSchema.d.ts +4 -0
- package/lib/typescript/components/executiontasks/imageCapture/CaptureUtils.d.ts +7 -1
- package/lib/typescript/index.d.ts +7 -0
- package/lib/typescript/manager/dispatch/DispatchStateContainer.d.ts +2 -0
- package/lib/typescript/manager/location/LocationManager.d.ts +1 -0
- package/lib/typescript/manager/sdk/DispatchSdkCache.d.ts +2 -0
- package/lib/typescript/manager/sdk/callbacksHandler.d.ts +3 -1
- package/lib/typescript/manager/syncmanager/DBConfig.d.ts +4 -0
- package/lib/typescript/manager/syncmanager/document/DocumentManager.d.ts +3 -1
- package/lib/typescript/manager/syncmanager/document/DocumentSyncManager.d.ts +5 -1
- package/lib/typescript/models/execTasks/ETBaseModels.d.ts +25 -6
- package/lib/typescript/models/sdk.d.ts +1 -0
- package/lib/typescript/styles/executionTasks/CommonStyles.d.ts +4 -4
- package/lib/typescript/utils/Logger.d.ts +0 -3
- package/lib/typescript/utils/SyncManagerUtils.d.ts +1 -1
- package/lib/typescript/utils/utils.d.ts +4 -0
- package/package.json +10 -7
- package/src/analytics/firebase/FirebaseLogging.ts +25 -0
- package/src/analytics/sentry/SentryAnalyticsSingleton.ts +35 -0
- package/src/analytics/sentry/SentryAnalyticsUtils.ts +77 -0
- package/src/analytics/sentry/SentryModels.ts +18 -0
- package/src/analytics/sentry/SentrySdkConstants.ts +77 -0
- package/src/components/executiontasks/cancellation/CancelET.tsx +25 -2
- package/src/components/executiontasks/captureInput/CaptureText.tsx +15 -2
- package/src/components/executiontasks/deliver/DeliverET.tsx +8 -0
- package/src/components/executiontasks/deliver/SLDeliverET.tsx +22 -5
- package/src/components/executiontasks/display/DisplayModalET.tsx +8 -0
- package/src/components/executiontasks/doodle/SignatureET.tsx +37 -4
- package/src/components/executiontasks/dropCash/DropCashET.tsx +9 -0
- package/src/components/executiontasks/dropCash/SLDropCash.tsx +11 -0
- package/src/components/executiontasks/forms/FormGenerator.tsx +46 -29
- package/src/components/executiontasks/forms/widgets/DateTimeWidget.tsx +10 -3
- package/src/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.tsx +8 -1
- package/src/components/executiontasks/imageCapture/CaptureSchema.ts +4 -0
- package/src/components/executiontasks/imageCapture/CaptureUtils.ts +45 -18
- package/src/components/executiontasks/imageCapture/ImageCapture.tsx +42 -7
- package/src/components/executiontasks/payments/completePayment/CompletePaymentET.tsx +11 -0
- package/src/components/executiontasks/payments/init/InitPaymentET.tsx +17 -0
- package/src/components/executiontasks/payments/processPayment/ProcessPaymentET.tsx +11 -0
- package/src/components/executiontasks/pickup/PickupET.tsx +8 -0
- package/src/components/executiontasks/pickup/SLPickupET.tsx +19 -0
- package/src/components/executiontasks/scan/ScanET.tsx +19 -1
- package/src/components/executiontasks/scan/sub_components/SummaryPage.tsx +11 -0
- package/src/components/executiontasks/validateOTP/ValidateOTPET.tsx +14 -0
- package/src/components/executiontasks/validateOTP/sub-components/OTPInput.tsx +2 -0
- package/src/components/executiontasks/verifyOtp/VerifyOtpET.tsx +5 -0
- package/src/components/widgets/CancelOrderDialog.tsx +7 -0
- package/src/components/widgets/Card.tsx +9 -1
- package/src/components/widgets/ModalWidget.tsx +16 -2
- package/src/components/widgets/SearchBar.tsx +6 -1
- package/src/components/widgets/SnackBarCustom.tsx +4 -0
- package/src/components/widgets/SplitTextInput.tsx +6 -0
- package/src/components/widgets/TabsComponent.tsx +8 -1
- package/src/index.tsx +10 -3
- package/src/manager/location/LocationManager.ts +8 -1
- package/src/manager/sdk/DispatchSDKManager.ts +8 -2
- package/src/manager/sdk/DispatchSdkCache.ts +2 -1
- package/src/manager/sdk/callbacksHandler.ts +12 -1
- package/src/manager/syncmanager/DBConfig.ts +4 -0
- package/src/manager/syncmanager/document/DocumentHttpClient.ts +105 -5
- package/src/manager/syncmanager/document/DocumentManager.ts +28 -2
- package/src/manager/syncmanager/document/DocumentSyncManager.ts +230 -5
- package/src/models/execTasks/ETBaseModels.ts +20 -7
- package/src/models/sdk.ts +1 -0
- package/src/styles/executionTasks/CommonStyles.ts +5 -5
- package/src/ui/screens/DeliverScreen.tsx +9 -0
- package/src/ui/screens/DoodleScreen.tsx +5 -0
- package/src/ui/screens/DropCashScreen.tsx +6 -0
- package/src/ui/screens/FormsScreen.tsx +3 -0
- package/src/ui/screens/GeofenceScreen.tsx +11 -1
- package/src/ui/screens/ImageCaptureScreen.tsx +5 -0
- package/src/ui/screens/PaymentScreen.tsx +5 -0
- package/src/ui/screens/PickupScreen.tsx +7 -1
- package/src/ui/screens/ValidateOTPScreen.tsx +10 -0
- package/src/utils/ExecTaskUtils.ts +36 -10
- package/src/utils/Logger.ts +50 -51
- package/src/utils/SyncManagerUtils.ts +20 -2
- package/src/utils/utils.ts +23 -0
|
@@ -13,6 +13,9 @@ import { onTaskStart } from '../../utils/ExecTaskUtils';
|
|
|
13
13
|
import { DispatchExecutor } from '@os1-platform/platform-coreos-execution-engine-sdk';
|
|
14
14
|
import { GO_BACK_EVENT_CODE } from '../../constants/constants';
|
|
15
15
|
import Helper from '../../utils/helper';
|
|
16
|
+
//{ fireEventWithScreenName } from 'src/analytics/sentry/SentryAnalyticsUtils';
|
|
17
|
+
import { ScreenNameSdkConstants, SentryEventNameSdkConstants, SeverityLevelValue } from '../../analytics/sentry/SentrySdkConstants';
|
|
18
|
+
import { fireEventWithScreenName } from '../../analytics/sentry/SentryAnalyticsUtils';
|
|
16
19
|
|
|
17
20
|
// OLD CODE
|
|
18
21
|
// function getTotalExpected(nextStates: any[]): ETAmount {
|
|
@@ -51,6 +54,9 @@ const DropCashScreen = ({
|
|
|
51
54
|
|
|
52
55
|
useEffect(() => {
|
|
53
56
|
(async () => {
|
|
57
|
+
//fire sentry event
|
|
58
|
+
fireEventWithScreenName({severityLevel:SeverityLevelValue.LOG, eventName:SentryEventNameSdkConstants.RETURN_CASH_ET_OPENED, screenName:ScreenNameSdkConstants.RETURN_CASH_ET_SCREEN});
|
|
59
|
+
//
|
|
54
60
|
onTaskStart(
|
|
55
61
|
nextState,
|
|
56
62
|
route.params[RouteParams.ROOT_META_DATA].customEventsData
|
|
@@ -14,6 +14,8 @@ import callbackHandler from '../../manager/sdk/callbacksHandler';
|
|
|
14
14
|
import { DispatchExecutor as dispatchExecutor } from '@os1-platform/platform-coreos-execution-engine-sdk';
|
|
15
15
|
import { AjvError } from '@rjsf/core';
|
|
16
16
|
import Helper from '../../utils/helper';
|
|
17
|
+
import { ScreenNameSdkConstants, SentryEventNameSdkConstants, SeverityLevelValue } from '../../analytics/sentry/SentrySdkConstants';
|
|
18
|
+
import { fireEventWithScreenName } from '../../analytics/sentry/SentryAnalyticsUtils';
|
|
17
19
|
|
|
18
20
|
const FormsScreen = ({
|
|
19
21
|
route,
|
|
@@ -38,6 +40,7 @@ const FormsScreen = ({
|
|
|
38
40
|
|
|
39
41
|
useEffect(() => {
|
|
40
42
|
(async () => {
|
|
43
|
+
fireEventWithScreenName({severityLevel:SeverityLevelValue.LOG, eventName:SentryEventNameSdkConstants.FORM_ET_OPENED, screenName:ScreenNameSdkConstants.FORM_ET_SCREEN});
|
|
41
44
|
onTaskStart(
|
|
42
45
|
route.params[RouteParams.NEXT_STATES],
|
|
43
46
|
route.params[RouteParams.ROOT_META_DATA].customEventsData
|
|
@@ -7,6 +7,8 @@ import type { BaseETProps } from '../../models/DispatchModels';
|
|
|
7
7
|
import DispatchStateContainer from '../../manager/dispatch/DispatchStateContainer';
|
|
8
8
|
import { RouteParams, getDataFromNextState } from '../uiConfig/RouteParams';
|
|
9
9
|
import { onTaskStart } from '../../utils/ExecTaskUtils';
|
|
10
|
+
import { ScreenNameSdkConstants, SentryEventNameSdkConstants, SeverityLevelValue } from '../../analytics/sentry/SentrySdkConstants';
|
|
11
|
+
import { fireEventWithScreenName } from '../../analytics/sentry/SentryAnalyticsUtils';
|
|
10
12
|
|
|
11
13
|
const GeofenceScreen = ({
|
|
12
14
|
route,
|
|
@@ -20,7 +22,15 @@ const GeofenceScreen = ({
|
|
|
20
22
|
const nextState = route.params[RouteParams.NEXT_STATES];
|
|
21
23
|
const { taskMeta, mergedObjectiveId, input, wfMeta } =
|
|
22
24
|
getDataFromNextState(nextState);
|
|
23
|
-
|
|
25
|
+
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
(async () => {
|
|
28
|
+
//fire sentry event
|
|
29
|
+
fireEventWithScreenName({severityLevel:SeverityLevelValue.LOG, eventName:SentryEventNameSdkConstants.VERIFY_LOCATION_ET_OPENED, screenName:ScreenNameSdkConstants.VERIFY_LOCATION_ET_SCREEN});
|
|
30
|
+
})();
|
|
31
|
+
}, []);
|
|
32
|
+
|
|
33
|
+
useEffect(() => {
|
|
24
34
|
onTaskStart(
|
|
25
35
|
nextState,
|
|
26
36
|
route.params[RouteParams.ROOT_META_DATA].customEventsData
|
|
@@ -8,6 +8,8 @@ import { RouteParams, getDataFromNextState } from '../uiConfig/RouteParams';
|
|
|
8
8
|
import { onTaskStart } from '../../utils/ExecTaskUtils';
|
|
9
9
|
import { DispatchExecutor } from '@os1-platform/platform-coreos-execution-engine-sdk';
|
|
10
10
|
import Helper from '../../utils/helper';
|
|
11
|
+
import { ScreenNameSdkConstants, SentryEventNameSdkConstants, SeverityLevelValue } from '../../analytics/sentry/SentrySdkConstants';
|
|
12
|
+
import { fireEventWithScreenName } from '../../analytics/sentry/SentryAnalyticsUtils';
|
|
11
13
|
|
|
12
14
|
|
|
13
15
|
const ImageCaptureScreen = ({
|
|
@@ -30,6 +32,9 @@ const ImageCaptureScreen = ({
|
|
|
30
32
|
|
|
31
33
|
useEffect(() => {
|
|
32
34
|
(async () => {
|
|
35
|
+
//fire sentry event
|
|
36
|
+
fireEventWithScreenName({severityLevel:SeverityLevelValue.LOG, eventName:SentryEventNameSdkConstants.CAPTURE_IMAGE_ET_OPENED, screenName:ScreenNameSdkConstants.CAPTURE_IMAGE_ET_SCREEN});
|
|
37
|
+
//
|
|
33
38
|
onTaskStart(
|
|
34
39
|
route.params[RouteParams.NEXT_STATES],
|
|
35
40
|
route.params[RouteParams.ROOT_META_DATA].customEventsData
|
|
@@ -21,6 +21,8 @@ import { useEffect } from 'react';
|
|
|
21
21
|
import { IDispatch } from '@os1-platform/platform-coreos-execution-engine-sdk';
|
|
22
22
|
import { GO_BACK_EVENT_CODE } from '../../constants/constants';
|
|
23
23
|
import Helper from '../../utils/helper';
|
|
24
|
+
import { ScreenNameSdkConstants, SentryEventNameSdkConstants, SeverityLevelValue } from '../../analytics/sentry/SentrySdkConstants';
|
|
25
|
+
import { fireEventWithScreenName } from '../../analytics/sentry/SentryAnalyticsUtils';
|
|
24
26
|
|
|
25
27
|
const PaymentScreen = ({
|
|
26
28
|
navigation,
|
|
@@ -45,6 +47,9 @@ const PaymentScreen = ({
|
|
|
45
47
|
|
|
46
48
|
useEffect(() => {
|
|
47
49
|
(async () => {
|
|
50
|
+
//fire sentry event
|
|
51
|
+
fireEventWithScreenName({severityLevel:SeverityLevelValue.LOG, eventName:SentryEventNameSdkConstants.COLLECT_CASH_ET_OPENED, screenName:ScreenNameSdkConstants.COLLECT_CASH_ET_SCREEN});
|
|
52
|
+
//
|
|
48
53
|
onTaskStart(
|
|
49
54
|
route.params[RouteParams.NEXT_STATES],
|
|
50
55
|
route.params[RouteParams.ROOT_META_DATA].customEventsData
|
|
@@ -10,6 +10,8 @@ import { onTaskStart } from '../../utils/ExecTaskUtils';
|
|
|
10
10
|
import { DispatchExecutor } from '@os1-platform/platform-coreos-execution-engine-sdk';
|
|
11
11
|
import SLPickupET from '../../components/executiontasks/pickup/SLPickupET';
|
|
12
12
|
import Helper from '../../utils/helper';
|
|
13
|
+
import { ScreenNameSdkConstants, SentryEventNameSdkConstants, SeverityLevelValue } from '../../analytics/sentry/SentrySdkConstants';
|
|
14
|
+
import { fireEventWithScreenName } from '../../analytics/sentry/SentryAnalyticsUtils';
|
|
13
15
|
|
|
14
16
|
const PickupScreen = ({
|
|
15
17
|
route,
|
|
@@ -21,7 +23,6 @@ const PickupScreen = ({
|
|
|
21
23
|
baseETProps: BaseETProps;
|
|
22
24
|
}) => {
|
|
23
25
|
const helperInstance = Helper.getInstance();
|
|
24
|
-
|
|
25
26
|
const nextState = route.params[RouteParams.NEXT_STATES];
|
|
26
27
|
const { taskMeta, mergedObjectiveId, input, wfMeta, taskName } =
|
|
27
28
|
getDataFromNextState(nextState);
|
|
@@ -31,8 +32,13 @@ const PickupScreen = ({
|
|
|
31
32
|
const [items, setItems] = useState([]);
|
|
32
33
|
const [isSelfLoopTrue, setSelfLoop] = useState(false);
|
|
33
34
|
|
|
35
|
+
|
|
36
|
+
|
|
34
37
|
useEffect(() => {
|
|
35
38
|
(async () => {
|
|
39
|
+
//fire sentry event
|
|
40
|
+
fireEventWithScreenName({severityLevel:SeverityLevelValue.LOG, eventName:SentryEventNameSdkConstants.PICKUP_ET_OPENED, screenName:ScreenNameSdkConstants.PICKUP_ET_SCREEN});
|
|
41
|
+
//
|
|
36
42
|
onTaskStart(
|
|
37
43
|
nextState,
|
|
38
44
|
route.params[RouteParams.ROOT_META_DATA].customEventsData
|
|
@@ -6,6 +6,8 @@ import DispatchStateContainer from '../../manager/dispatch/DispatchStateContaine
|
|
|
6
6
|
import { RouteParams, getDataFromNextState } from '../uiConfig/RouteParams';
|
|
7
7
|
import ValidateOTPET from '../../components/executiontasks/validateOTP/ValidateOTPET';
|
|
8
8
|
import { handleDynamicValues, onTaskStart } from '../../utils/ExecTaskUtils';
|
|
9
|
+
import { ScreenNameSdkConstants, SentryEventNameSdkConstants, SeverityLevelValue } from '../../analytics/sentry/SentrySdkConstants';
|
|
10
|
+
import { fireEventWithScreenName } from '../../analytics/sentry/SentryAnalyticsUtils';
|
|
9
11
|
|
|
10
12
|
const ValidateOTPScreen = ({
|
|
11
13
|
route,
|
|
@@ -37,6 +39,14 @@ const ValidateOTPScreen = ({
|
|
|
37
39
|
}
|
|
38
40
|
}, []);
|
|
39
41
|
|
|
42
|
+
useEffect(() => {
|
|
43
|
+
(async () => {
|
|
44
|
+
//fire sentry event
|
|
45
|
+
fireEventWithScreenName({severityLevel:SeverityLevelValue.LOG, eventName:SentryEventNameSdkConstants.VERIFY_OTP_ET_OPENED, screenName:ScreenNameSdkConstants.VERIFY_OTP_ET_SCREEN});
|
|
46
|
+
})();
|
|
47
|
+
}, []);
|
|
48
|
+
|
|
49
|
+
|
|
40
50
|
return (
|
|
41
51
|
<ValidateOTPET
|
|
42
52
|
{..._input}
|
|
@@ -9,6 +9,7 @@ import dispatchEvent from '../events/EventDispatcher';
|
|
|
9
9
|
import type { startEvent } from '../models/DispatchModels';
|
|
10
10
|
import { JSONPath } from 'jsonpath-plus';
|
|
11
11
|
import { IDispatch } from '@os1-platform/platform-coreos-execution-engine-sdk';
|
|
12
|
+
import { last } from 'lodash';
|
|
12
13
|
|
|
13
14
|
export async function getBaseETResponse(
|
|
14
15
|
entityCode: string,
|
|
@@ -18,14 +19,20 @@ export async function getBaseETResponse(
|
|
|
18
19
|
mergedObjectiveIds: Array<string>,
|
|
19
20
|
taskId: ExecutionTaskID
|
|
20
21
|
): Promise<BaseETResponse> {
|
|
21
|
-
|
|
22
|
+
let lastLocation = LocationManager.getInstance().getLastLocation();
|
|
23
|
+
console.log("getBaseETResponse:lastLocation:",JSON.stringify(lastLocation))
|
|
24
|
+
|
|
22
25
|
let cache = DispatchSdkCache.getInstance();
|
|
23
26
|
const sdkConfig = (await cache.getObjectFromCache(
|
|
24
27
|
DispatchSdkCache.KEYS.SDK_CONFIG
|
|
25
28
|
)) as DispatchSDKConfig;
|
|
26
|
-
|
|
29
|
+
const startTime = await cache.getObjectFromCache(
|
|
27
30
|
DispatchSdkCache.KEYS.TASK_START_TIME
|
|
28
|
-
);
|
|
31
|
+
);
|
|
32
|
+
const startLocation = await cache.getObjectFromCache(
|
|
33
|
+
DispatchSdkCache.KEYS.TASK_START_LOCATION
|
|
34
|
+
);
|
|
35
|
+
console.log("getBaseETResponse:startLocation:",startLocation);
|
|
29
36
|
let baseResponse: BaseETResponse = {
|
|
30
37
|
entityCode: entityCode,
|
|
31
38
|
success: success,
|
|
@@ -33,19 +40,29 @@ export async function getBaseETResponse(
|
|
|
33
40
|
reasonCode: reasonCode,
|
|
34
41
|
id: taskId,
|
|
35
42
|
meta: {
|
|
36
|
-
|
|
37
|
-
latitude:
|
|
38
|
-
longitude:
|
|
39
|
-
}
|
|
43
|
+
startLocation:{
|
|
44
|
+
latitude:startLocation.latitude,
|
|
45
|
+
longitude:startLocation.longitude
|
|
46
|
+
},
|
|
47
|
+
endLocation:{
|
|
48
|
+
latitude:lastLocation.latitude,
|
|
49
|
+
longitude:lastLocation.longitude
|
|
50
|
+
},
|
|
51
|
+
// location: {
|
|
52
|
+
// latitude: location.latitude,
|
|
53
|
+
// longitude: location.longitude,
|
|
54
|
+
// },
|
|
40
55
|
userDetails: {
|
|
41
56
|
id: sdkConfig?.userID ?? '',
|
|
42
57
|
name: sdkConfig?.userName ?? '',
|
|
43
58
|
},
|
|
44
|
-
|
|
45
|
-
endTime: Date.now(),
|
|
59
|
+
startTime: startTime ? parseInt(startTime) : Date.now(),
|
|
60
|
+
endTime: Date.now(),
|
|
46
61
|
},
|
|
47
62
|
mergedObjectiveIds,
|
|
48
63
|
};
|
|
64
|
+
console.log("getBaseETResponse:baseResponse:",JSON.stringify(baseResponse));
|
|
65
|
+
|
|
49
66
|
return baseResponse;
|
|
50
67
|
}
|
|
51
68
|
|
|
@@ -129,8 +146,17 @@ export function onTaskStart(
|
|
|
129
146
|
const keys = DispatchSdkCache.KEYS;
|
|
130
147
|
const cache = DispatchSdkCache.getInstance();
|
|
131
148
|
(async () => {
|
|
132
|
-
|
|
149
|
+
let lastLocation = LocationManager.getInstance().getLastLocation();
|
|
150
|
+
let location = {
|
|
151
|
+
latitude: lastLocation.latitude,
|
|
152
|
+
longitude: lastLocation.longitude,
|
|
153
|
+
}
|
|
154
|
+
console.log("onTaskStart:lastLocation:",location)
|
|
155
|
+
await cache.setKeyInCache(keys.TASK_START_TIME, Date.now().toString());
|
|
133
156
|
await cache.setKeyInCache(keys.CURRENT_WORKING_TASK_ID, eventData.taskId);
|
|
157
|
+
await cache.setObjectInCache(keys.TASK_START_LOCATION, location);
|
|
158
|
+
|
|
159
|
+
|
|
134
160
|
})();
|
|
135
161
|
if (triggerEvent) {
|
|
136
162
|
const customEtName = eventData.taskName;
|
package/src/utils/Logger.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import DispatchSdkCache from '../manager/sdk/DispatchSdkCache';
|
|
2
2
|
import type { DispatchSDKConfig } from '../models/sdk';
|
|
3
3
|
import * as Sentry from '@sentry/react-native';
|
|
4
|
-
import { Severity } from '@sentry/react-native';
|
|
5
4
|
import crashlytics from '@react-native-firebase/crashlytics';
|
|
6
5
|
|
|
7
6
|
export const enum LOG_TYPE {
|
|
@@ -43,7 +42,7 @@ class Logger {
|
|
|
43
42
|
logType === LOG_TYPE.APP_WARNING
|
|
44
43
|
) {
|
|
45
44
|
crashlytics().recordError(new Error(message), TAG);
|
|
46
|
-
this.sendSentryException(new Error(message), TAG, logType);
|
|
45
|
+
//this.sendSentryException(new Error(message), TAG, logType);
|
|
47
46
|
}
|
|
48
47
|
}
|
|
49
48
|
|
|
@@ -54,57 +53,57 @@ class Logger {
|
|
|
54
53
|
return Logger.instance;
|
|
55
54
|
}
|
|
56
55
|
|
|
57
|
-
public sendSentryException(exception: any, logTag: string, logType: string) {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
56
|
+
// public sendSentryException(exception: any, logTag: string, logType: string) {
|
|
57
|
+
// // (async () => {
|
|
58
|
+
// // try {
|
|
59
|
+
// // Sentry.captureException(
|
|
60
|
+
// // exception,
|
|
61
|
+
// // await this.getUserConfig(Severity.Error, logType, logTag)
|
|
62
|
+
// // );
|
|
63
|
+
// // } catch (error: any) {}
|
|
64
|
+
// // })();
|
|
65
|
+
// }
|
|
67
66
|
|
|
68
|
-
public sendSentryMessage(message: string, logTag: string, logType: string) {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}
|
|
67
|
+
// public sendSentryMessage(message: string, logTag: string, logType: string) {
|
|
68
|
+
// // (async () => {
|
|
69
|
+
// // try {
|
|
70
|
+
// // Sentry.captureMessage(
|
|
71
|
+
// // message,
|
|
72
|
+
// // await this.getUserConfig(Severity.Warning, logType, logTag)
|
|
73
|
+
// // );
|
|
74
|
+
// // } catch (error: any) {}
|
|
75
|
+
// // })();
|
|
76
|
+
// }
|
|
78
77
|
|
|
79
|
-
private async getUserConfig(
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
) {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}
|
|
78
|
+
// private async getUserConfig(
|
|
79
|
+
// logLevel: Severity,
|
|
80
|
+
// logType: string,
|
|
81
|
+
// logTag: string
|
|
82
|
+
// ) {
|
|
83
|
+
// try {
|
|
84
|
+
// const config = (await DispatchSdkCache.getInstance().getObjectFromCache(
|
|
85
|
+
// DispatchSdkCache.KEYS.SDK_CONFIG
|
|
86
|
+
// )) as DispatchSDKConfig;
|
|
87
|
+
// const dspId = await DispatchSdkCache.getInstance().getKeyFromCache(
|
|
88
|
+
// DispatchSdkCache.KEYS.DISPATCH_ID
|
|
89
|
+
// );
|
|
90
|
+
// return {
|
|
91
|
+
// user: {
|
|
92
|
+
// id: config?.userID,
|
|
93
|
+
// username: config?.userName,
|
|
94
|
+
// },
|
|
95
|
+
// tags: {
|
|
96
|
+
// dispatchId: dspId,
|
|
97
|
+
// errorTime: Date.now(),
|
|
98
|
+
// logType: logType,
|
|
99
|
+
// logTag: logTag,
|
|
100
|
+
// },
|
|
101
|
+
// level: logLevel,
|
|
102
|
+
// };
|
|
103
|
+
// } catch (error: any) {
|
|
104
|
+
// return undefined;
|
|
105
|
+
// }
|
|
106
|
+
// }
|
|
108
107
|
}
|
|
109
108
|
|
|
110
109
|
export default Logger;
|
|
@@ -14,6 +14,7 @@ import type {
|
|
|
14
14
|
ExecEngineSyncType,
|
|
15
15
|
} from '../manager/syncmanager/DBConfig';
|
|
16
16
|
import Storage from './storage';
|
|
17
|
+
import LocationManager from '../manager/location/LocationManager';
|
|
17
18
|
|
|
18
19
|
const keys = DispatchSdkCache.KEYS;
|
|
19
20
|
const cache = DispatchSdkCache.getInstance();
|
|
@@ -135,8 +136,23 @@ export async function insertDocumentInDB(
|
|
|
135
136
|
// objRef: string,
|
|
136
137
|
base64Image: string | null,
|
|
137
138
|
imageDesc: string,
|
|
138
|
-
filePath: string | null
|
|
139
|
+
filePath: string | null,
|
|
140
|
+
dateTime: string | null,
|
|
141
|
+
lat: string,
|
|
142
|
+
lng: string,
|
|
143
|
+
accuracy: string
|
|
139
144
|
): Promise<number | undefined> {
|
|
145
|
+
let geoTimeStamp = {
|
|
146
|
+
dateTime: dateTime,
|
|
147
|
+
lat: lat,
|
|
148
|
+
lng: lng,
|
|
149
|
+
accuracy: accuracy,
|
|
150
|
+
};
|
|
151
|
+
let geoTimeStampStr = JSON.stringify(geoTimeStamp);
|
|
152
|
+
console.log('geoTimeStampStr:', geoTimeStampStr);
|
|
153
|
+
console.log('insertDocumentInDB1:', fmsFolderName);
|
|
154
|
+
|
|
155
|
+
let processedFilePath = '';
|
|
140
156
|
try {
|
|
141
157
|
const dspID = await cache.getKeyFromCache(keys.DISPATCH_ID);
|
|
142
158
|
let response = await DocumentSyncManager.getInstance().insertDocument(
|
|
@@ -149,7 +165,9 @@ export async function insertDocumentInDB(
|
|
|
149
165
|
// objRef,
|
|
150
166
|
filePath,
|
|
151
167
|
'image',
|
|
152
|
-
fileName
|
|
168
|
+
fileName,
|
|
169
|
+
geoTimeStampStr,
|
|
170
|
+
processedFilePath
|
|
153
171
|
);
|
|
154
172
|
AppSyncManager.getInstance().startSDKSyncManager();
|
|
155
173
|
return response.insertId;
|
package/src/utils/utils.ts
CHANGED
|
@@ -28,3 +28,26 @@ export function isTokenExpired(accessToken: string) {
|
|
|
28
28
|
let decodedData: any = jwtDecode(accessToken);
|
|
29
29
|
return !(decodedData && decodedData.exp * 1000 > Date.now());
|
|
30
30
|
}
|
|
31
|
+
|
|
32
|
+
export function flattenObject(obj: Record<string, any>, prefix = ''): string {
|
|
33
|
+
return JSON.stringify(obj);
|
|
34
|
+
// return Object.keys(obj).reduce((acc, key) => {
|
|
35
|
+
// const flatKey = prefix ? `${prefix}.${key}` : key;
|
|
36
|
+
// if (typeof obj[key] === 'object' && !Array.isArray(obj[key])) {
|
|
37
|
+
// return acc ?? '' + flattenObject(obj[key], flatKey);
|
|
38
|
+
// } else {
|
|
39
|
+
// return acc ?? '' + `${flatKey}: ${JSON.stringify(obj[key])}\n`;
|
|
40
|
+
// }
|
|
41
|
+
// }, '');
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
export function createObjectWithoutNullValues<T extends { [key: string]: any }>(obj: T): Partial<T> {
|
|
46
|
+
const newObj: Partial<T> = {};
|
|
47
|
+
for (const key in obj) {
|
|
48
|
+
if (Object.prototype.hasOwnProperty.call(obj, key) && obj[key] !== null && obj[key] !== 'request' && obj[key] !== 'headers') {
|
|
49
|
+
newObj[key] = obj[key];
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return newObj;
|
|
53
|
+
}
|