@os1-platform/dispatch-mobile 2.1.5 → 2.1.6
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 +15 -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 +79 -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 +75 -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 +33 -3
- 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/CaptureUtils.js +18 -6
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js +62 -5
- 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 +46 -0
- package/lib/commonjs/index.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/models/execTasks/ETBaseModels.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/module/analytics/firebase/FirebaseLogging.js +8 -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 +70 -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 +69 -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 +33 -3
- 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/CaptureUtils.js +18 -6
- package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/ImageCapture.js +63 -6
- 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 +9 -0
- package/lib/module/index.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/models/execTasks/ETBaseModels.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/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 +63 -0
- package/lib/typescript/index.d.ts +5 -0
- package/lib/typescript/manager/dispatch/DispatchStateContainer.d.ts +2 -0
- package/lib/typescript/manager/sdk/DispatchSdkCache.d.ts +2 -0
- package/lib/typescript/models/execTasks/ETBaseModels.d.ts +25 -6
- package/lib/typescript/styles/executionTasks/CommonStyles.d.ts +4 -4
- package/lib/typescript/utils/Logger.d.ts +0 -3
- package/package.json +5 -3
- package/src/analytics/firebase/FirebaseLogging.ts +13 -0
- package/src/analytics/sentry/SentryAnalyticsSingleton.ts +35 -0
- package/src/analytics/sentry/SentryAnalyticsUtils.ts +71 -0
- package/src/analytics/sentry/SentryModels.ts +18 -0
- package/src/analytics/sentry/SentrySdkConstants.ts +74 -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 +23 -3
- 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/CaptureUtils.ts +17 -5
- package/src/components/executiontasks/imageCapture/ImageCapture.tsx +32 -5
- 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 +8 -3
- package/src/manager/sdk/DispatchSdkCache.ts +2 -1
- package/src/models/execTasks/ETBaseModels.ts +20 -7
- 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
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
2
|
import { View, TextInput, TouchableOpacity, StyleSheet } from 'react-native';
|
|
3
3
|
import { EvilIcons, MaterialIcons } from '@expo/vector-icons';
|
|
4
|
-
|
|
4
|
+
import { ScreenNameSdkConstants, SentryEventNameSdkConstants, SeverityLevelValue } from '../../analytics/sentry/SentrySdkConstants';
|
|
5
|
+
import { fireEventWithScreenName } from '../../analytics/sentry/SentryAnalyticsUtils';
|
|
6
|
+
|
|
5
7
|
interface SearchBarProps {
|
|
6
8
|
searchText: string;
|
|
7
9
|
setSearchText: (searchText: string) => void;
|
|
@@ -18,6 +20,9 @@ const SearchBar = (props: SearchBarProps) => {
|
|
|
18
20
|
const handleClear = () => {
|
|
19
21
|
props.onClear();
|
|
20
22
|
setSearchText('');
|
|
23
|
+
const cta = "Clear";
|
|
24
|
+
fireEventWithScreenName({ severityLevel: SeverityLevelValue.LOG, eventName: SentryEventNameSdkConstants.BUTTON_CLICKED, screenName: ScreenNameSdkConstants.SEARCH_BAR_SCREEN, cta: cta });
|
|
25
|
+
|
|
21
26
|
};
|
|
22
27
|
|
|
23
28
|
return (
|
|
@@ -12,6 +12,8 @@ import {
|
|
|
12
12
|
import { Surface, withTheme } from 'react-native-paper';
|
|
13
13
|
import { AntDesign } from '@expo/vector-icons';
|
|
14
14
|
import { Fonts } from '../../styles/executionTasks/CommonStyles';
|
|
15
|
+
import { ScreenNameSdkConstants, SentryEventNameSdkConstants, SeverityLevelValue } from '../../analytics/sentry/SentrySdkConstants';
|
|
16
|
+
import { fireEventWithScreenName } from '../../analytics/sentry/SentryAnalyticsUtils';
|
|
15
17
|
|
|
16
18
|
export interface SnackbarProps {
|
|
17
19
|
visible: boolean;
|
|
@@ -152,6 +154,8 @@ const SnackbarCustom = ({
|
|
|
152
154
|
color="white"
|
|
153
155
|
onPress={() => {
|
|
154
156
|
setHidden(true);
|
|
157
|
+
const cta = "Close";
|
|
158
|
+
fireEventWithScreenName({ severityLevel: SeverityLevelValue.LOG, eventName: SentryEventNameSdkConstants.BUTTON_CLICKED, screenName: ScreenNameSdkConstants.SCAN_BAR_CUSTOM_SCREEN, cta: cta });
|
|
155
159
|
}}
|
|
156
160
|
/>
|
|
157
161
|
</View>
|
|
@@ -7,6 +7,8 @@ import {
|
|
|
7
7
|
KeyboardTypeOptions,
|
|
8
8
|
} from 'react-native';
|
|
9
9
|
import React, { useRef, useState } from 'react';
|
|
10
|
+
import { ScreenNameSdkConstants, SentryEventNameSdkConstants, SeverityLevelValue } from '../../analytics/sentry/SentrySdkConstants';
|
|
11
|
+
import { fireEventWithScreenName } from '../../analytics/sentry/SentryAnalyticsUtils';
|
|
10
12
|
|
|
11
13
|
export interface SplitTextInputProps {
|
|
12
14
|
styles: any;
|
|
@@ -30,11 +32,15 @@ const SplitTextInput = ({
|
|
|
30
32
|
const [isInputBoxFocused, setIsInputBoxFocused] = useState(false);
|
|
31
33
|
|
|
32
34
|
const handleOnPress = () => {
|
|
35
|
+
const cta = "Split Text Input";
|
|
36
|
+
fireEventWithScreenName({ severityLevel: SeverityLevelValue.LOG, eventName: SentryEventNameSdkConstants.BUTTON_CLICKED, screenName: ScreenNameSdkConstants.SPLIT_TEXT_INPUT_SCREEN, cta: cta });
|
|
37
|
+
|
|
33
38
|
setIsInputBoxFocused(true);
|
|
34
39
|
inputRef.current.focus();
|
|
35
40
|
};
|
|
36
41
|
|
|
37
42
|
const handleOnBlur = () => {
|
|
43
|
+
|
|
38
44
|
setIsInputBoxFocused(false);
|
|
39
45
|
};
|
|
40
46
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
2
|
import { View, TouchableOpacity, StyleSheet, ScrollView } from 'react-native';
|
|
3
|
+
import { ScreenNameSdkConstants, SentryEventNameSdkConstants, SeverityLevelValue } from '../../analytics/sentry/SentrySdkConstants';
|
|
4
|
+
import { fireEventWithScreenName } from '../../analytics/sentry/SentryAnalyticsUtils';
|
|
3
5
|
|
|
4
6
|
export interface Tab {
|
|
5
7
|
title: string;
|
|
@@ -40,7 +42,12 @@ const TabsComponent = (props: TabsComponentProps) => {
|
|
|
40
42
|
activeTab === tab.title && styles.activeTab,
|
|
41
43
|
tab.titleStyle ? tab.titleStyle : {},
|
|
42
44
|
]}
|
|
43
|
-
onPress={() =>
|
|
45
|
+
onPress={() => {
|
|
46
|
+
handleTabPress(tab.title)
|
|
47
|
+
const cta = tab.title;
|
|
48
|
+
fireEventWithScreenName({ severityLevel: SeverityLevelValue.LOG, eventName: SentryEventNameSdkConstants.BUTTON_CLICKED, screenName: ScreenNameSdkConstants.TAB_COMPONENT_SCREEN, cta: cta });
|
|
49
|
+
}
|
|
50
|
+
}
|
|
44
51
|
>
|
|
45
52
|
{props.renderTabItem(tab)}
|
|
46
53
|
</TouchableOpacity>
|
package/src/index.tsx
CHANGED
|
@@ -46,7 +46,10 @@ import {
|
|
|
46
46
|
IDispatchExecutor,
|
|
47
47
|
} from '@os1-platform/platform-coreos-execution-engine-sdk';
|
|
48
48
|
import Helper from './utils/helper';
|
|
49
|
-
|
|
49
|
+
import SentryAnalyticsSingleton from './analytics/sentry/SentryAnalyticsSingleton';
|
|
50
|
+
import { fireEventWithScreenName } from './analytics/sentry/SentryAnalyticsUtils';
|
|
51
|
+
import { ScreenNameSdkConstants, SentryEventNameSdkConstants, SeverityLevelValue } from './analytics/sentry/SentrySdkConstants';
|
|
52
|
+
import { DispatchAndUserData, SentryEvent } from './analytics/sentry/SentryModels';
|
|
50
53
|
export { DispatchExecutor, IDispatch, IDispatchExecutor };
|
|
51
54
|
export { Storage, DispatchExecNavigator };
|
|
52
55
|
export { ETSummary, CompleteSummary, ObjectiveSummary, DispatchSyncType };
|
|
@@ -71,12 +74,14 @@ export {
|
|
|
71
74
|
LOG_TYPE,
|
|
72
75
|
EventListener,
|
|
73
76
|
};
|
|
74
|
-
|
|
77
|
+
//
|
|
75
78
|
export { SyncMethod, JobObjectiveType };
|
|
76
79
|
export type { ETaskSchema };
|
|
77
80
|
export { ExecutionTask, CancelOrderDialog };
|
|
78
81
|
export { DispatchSDKManager };
|
|
79
|
-
|
|
82
|
+
//
|
|
80
83
|
export type { MTSStartRequest, MTSInitRequest };
|
|
81
84
|
export { MtsSdk };
|
|
82
85
|
export { Helper };
|
|
86
|
+
//sentry function export
|
|
87
|
+
export { SentryAnalyticsSingleton, fireEventWithScreenName, SeverityLevelValue, ScreenNameSdkConstants, SentryEventNameSdkConstants, DispatchAndUserData, SentryEvent};
|
|
@@ -17,7 +17,8 @@ export default class DispatchSdkCache {
|
|
|
17
17
|
FIREBASE_REGISTRATION_TOKEN: 'dsc_firebase_token',
|
|
18
18
|
REASON_FETCH_TIME: 'dsc_reasons_fetch_time',
|
|
19
19
|
CURRENT_WORKING_TASK_ID: 'current_working_task_id',
|
|
20
|
-
|
|
20
|
+
TASK_START_TIME: 'task_start_time',
|
|
21
|
+
TASK_START_LOCATION: 'task_start_location',
|
|
21
22
|
};
|
|
22
23
|
public async setObjectInCache(keyName: string, obj: any) {
|
|
23
24
|
await this.storage.setObject(keyName, obj);
|
|
@@ -23,25 +23,38 @@ export type BaseETResponse = {
|
|
|
23
23
|
/**
|
|
24
24
|
* Epoch timestamp for the start of task
|
|
25
25
|
*/
|
|
26
|
-
|
|
26
|
+
startTime?: number;
|
|
27
27
|
/**
|
|
28
28
|
* Epoch timestamp for the end of task
|
|
29
29
|
*/
|
|
30
|
-
|
|
30
|
+
endTime?: number;
|
|
31
31
|
/**
|
|
32
32
|
* Location at start of task
|
|
33
33
|
*/
|
|
34
|
-
|
|
34
|
+
startLocation?: {
|
|
35
35
|
/**
|
|
36
36
|
* Latitude
|
|
37
37
|
*/
|
|
38
|
-
|
|
38
|
+
latitude?: string;
|
|
39
39
|
/**
|
|
40
40
|
* Longitude
|
|
41
41
|
*/
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
longitude?: string;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Location at end of task
|
|
46
|
+
*/
|
|
47
|
+
endLocation?: {
|
|
48
|
+
/**
|
|
49
|
+
* Latitude
|
|
50
|
+
*/
|
|
51
|
+
latitude?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Longitude
|
|
54
|
+
*/
|
|
55
|
+
longitude?: string;
|
|
56
|
+
};
|
|
57
|
+
/**\\\
|
|
45
58
|
* Unique identifier of user performing the action
|
|
46
59
|
*/
|
|
47
60
|
userDetails: UserData;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StyleSheet } from 'react-native';
|
|
1
|
+
import { StyleSheet,Platform } from 'react-native';
|
|
2
2
|
import SdkColors, { ColorTheme } from '../SdkColors';
|
|
3
3
|
|
|
4
4
|
export enum Fonts {
|
|
@@ -66,7 +66,7 @@ export const CommonStyles = StyleSheet.create({
|
|
|
66
66
|
},
|
|
67
67
|
nextButtonLabel: {
|
|
68
68
|
color: '#ffffff',
|
|
69
|
-
fontFamily: Fonts.IBMPlexSans_500Medium,
|
|
69
|
+
fontFamily: Platform.OS === 'android' ? Fonts.IBMPlexSans_500Medium : 'IBMPlexSans-Medium',
|
|
70
70
|
fontSize: 14,
|
|
71
71
|
lineHeight: 20,
|
|
72
72
|
textAlign: 'center',
|
|
@@ -79,7 +79,7 @@ export const CommonStyles = StyleSheet.create({
|
|
|
79
79
|
},
|
|
80
80
|
cancelButtonLabel: {
|
|
81
81
|
color: SdkColors[ColorTheme.LIGHT].defaultColor,
|
|
82
|
-
fontFamily: Fonts.IBMPlexSans_500Medium,
|
|
82
|
+
fontFamily: Platform.OS === 'android' ? Fonts.IBMPlexSans_500Medium : 'IBMPlexSans-Medium',
|
|
83
83
|
fontSize: 14,
|
|
84
84
|
fontWeight: '500',
|
|
85
85
|
lineHeight: 20,
|
|
@@ -92,7 +92,7 @@ export const CommonStyles = StyleSheet.create({
|
|
|
92
92
|
},
|
|
93
93
|
mainExitButtonLabel: {
|
|
94
94
|
color: '#ffffff',
|
|
95
|
-
fontFamily: Fonts.IBMPlexSans_500Medium,
|
|
95
|
+
fontFamily: Platform.OS === 'android' ? Fonts.IBMPlexSans_500Medium : 'IBMPlexSans-Medium',
|
|
96
96
|
fontSize: 14,
|
|
97
97
|
fontWeight: '500',
|
|
98
98
|
lineHeight: 20,
|
|
@@ -105,7 +105,7 @@ export const CommonStyles = StyleSheet.create({
|
|
|
105
105
|
},
|
|
106
106
|
exitButtonLabel: {
|
|
107
107
|
color: SdkColors[ColorTheme.LIGHT].exitButton,
|
|
108
|
-
fontFamily: Fonts.IBMPlexSans_500Medium,
|
|
108
|
+
fontFamily: Platform.OS === 'android' ? Fonts.IBMPlexSans_500Medium : 'IBMPlexSans-Medium',
|
|
109
109
|
fontSize: 14,
|
|
110
110
|
fontWeight: '500',
|
|
111
111
|
lineHeight: 20,
|
|
@@ -16,6 +16,8 @@ import {
|
|
|
16
16
|
} from '../../manager/syncmanager/constants';
|
|
17
17
|
import { GO_BACK_EVENT_CODE } from '../../constants/constants';
|
|
18
18
|
import Helper from '../../utils/helper';
|
|
19
|
+
import { ScreenNameSdkConstants, SentryEventNameSdkConstants, SeverityLevelValue } from '../../analytics/sentry/SentrySdkConstants';
|
|
20
|
+
import { fireEventWithScreenName } from '../../analytics/sentry/SentryAnalyticsUtils';
|
|
19
21
|
|
|
20
22
|
const DeliverScreen = ({
|
|
21
23
|
navigation,
|
|
@@ -38,6 +40,13 @@ const DeliverScreen = ({
|
|
|
38
40
|
|
|
39
41
|
useEffect(() => {
|
|
40
42
|
(async () => {
|
|
43
|
+
//fire sentry event
|
|
44
|
+
if(input?.title != null && input?.title?.toString()?.length > 0 && input?.title?.toString()?.toLowerCase()?.includes("return")){
|
|
45
|
+
fireEventWithScreenName({severityLevel:SeverityLevelValue.LOG, eventName:SentryEventNameSdkConstants.RETURN_ORDER_ET_OPENED, screenName:ScreenNameSdkConstants.RETURN_ORDER_ET_SCREEN});
|
|
46
|
+
}else{
|
|
47
|
+
fireEventWithScreenName({severityLevel:SeverityLevelValue.LOG, eventName:SentryEventNameSdkConstants.DELIVER_ET_OPENED, screenName:ScreenNameSdkConstants.DELIVER_ET_SCREEN});
|
|
48
|
+
}
|
|
49
|
+
//
|
|
41
50
|
onTaskStart(
|
|
42
51
|
nextState,
|
|
43
52
|
route.params[RouteParams.ROOT_META_DATA].customEventsData
|
|
@@ -10,6 +10,8 @@ import CancelOrderDialog from '../../components/widgets/CancelOrderDialog';
|
|
|
10
10
|
import { onTaskStart } from '../../utils/ExecTaskUtils';
|
|
11
11
|
import { GO_BACK_EVENT_CODE } from '../../constants/constants';
|
|
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 DoodleScreen = ({
|
|
15
17
|
route,
|
|
@@ -36,6 +38,9 @@ const DoodleScreen = ({
|
|
|
36
38
|
|
|
37
39
|
useEffect(() => {
|
|
38
40
|
(async () => {
|
|
41
|
+
//fire sentry event
|
|
42
|
+
fireEventWithScreenName({severityLevel:SeverityLevelValue.LOG, eventName:SentryEventNameSdkConstants.SIGNATURE_ET_OPENED, screenName:ScreenNameSdkConstants.SIGNATURE_ET_SCREEN});
|
|
43
|
+
//
|
|
39
44
|
await getSelfLoopBool();
|
|
40
45
|
})();
|
|
41
46
|
}, [])
|
|
@@ -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;
|