@os1-platform/dispatch-mobile 3.0.3 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/build.gradle +38 -9
- package/android/gradle.properties +17 -2
- package/lib/commonjs/components/dispatch/DispatchExecNavigator.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js +467 -287
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPSchema.js +14 -1
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOtpStyles.js +272 -0
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOtpStyles.js.map +1 -0
- package/lib/commonjs/components/executiontasks/validateOTP/components/ContactListView.js +99 -0
- package/lib/commonjs/components/executiontasks/validateOTP/components/ContactListView.js.map +1 -0
- package/lib/commonjs/components/executiontasks/validateOTP/components/OTPView.js +195 -0
- package/lib/commonjs/components/executiontasks/validateOTP/components/OTPView.js.map +1 -0
- package/lib/commonjs/components/executiontasks/validateOTP/components/VerificationComplete.js +106 -0
- package/lib/commonjs/components/executiontasks/validateOTP/components/VerificationComplete.js.map +1 -0
- package/lib/commonjs/components/executiontasks/validateOTP/constants.js +12 -5
- package/lib/commonjs/components/executiontasks/validateOTP/constants.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/sub-components/ContactCard.js +68 -0
- package/lib/commonjs/components/executiontasks/validateOTP/sub-components/ContactCard.js.map +1 -0
- package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js +12 -5
- package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/sub-components/ResendOTPButton.js +61 -0
- package/lib/commonjs/components/executiontasks/validateOTP/sub-components/ResendOTPButton.js.map +1 -0
- package/lib/commonjs/components/executiontasks/validateOTP/utils.js +235 -114
- package/lib/commonjs/components/executiontasks/validateOTP/utils.js.map +1 -1
- package/lib/commonjs/components/utils/Scale.js +22 -0
- package/lib/commonjs/components/utils/Scale.js.map +1 -0
- package/lib/commonjs/components/widgets/ConfirmCancelModal.js +47 -0
- package/lib/commonjs/components/widgets/ConfirmCancelModal.js.map +1 -0
- package/lib/commonjs/components/widgets/SnackBarCustom.js +36 -4
- package/lib/commonjs/components/widgets/SnackBarCustom.js.map +1 -1
- package/lib/commonjs/components/widgets/SplitTextInput.js +48 -18
- package/lib/commonjs/components/widgets/SplitTextInput.js.map +1 -1
- package/lib/commonjs/constants/apiConstants.js +4 -1
- package/lib/commonjs/constants/apiConstants.js.map +1 -1
- package/lib/commonjs/constants/constants.js +2 -1
- package/lib/commonjs/constants/constants.js.map +1 -1
- package/lib/commonjs/icons/icExclamationcircleo_dark.svg +3 -0
- package/lib/commonjs/icons/icFailed.gif +0 -0
- package/lib/commonjs/icons/icRadioChecked.svg +4 -0
- package/lib/commonjs/icons/icRadioUnchecked.svg +4 -0
- package/lib/commonjs/icons/icSuccess.gif +0 -0
- package/lib/commonjs/icons/index.js +28 -0
- package/lib/commonjs/icons/index.js.map +1 -0
- package/lib/commonjs/index.js +19 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/manager/sdk/DispatchSDKManager.js +5 -4
- package/lib/commonjs/manager/sdk/DispatchSDKManager.js.map +1 -1
- package/lib/commonjs/manager/sdk/callbacksHandler.js +9 -2
- package/lib/commonjs/manager/sdk/callbacksHandler.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/AppSyncManager.js +1 -4
- package/lib/commonjs/manager/syncmanager/AppSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/constants.js +3 -1
- package/lib/commonjs/manager/syncmanager/constants.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js +3 -2
- package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js +70 -80
- package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
- package/lib/commonjs/models/sdk.js +1 -0
- package/lib/commonjs/models/sdk.js.map +1 -1
- package/lib/commonjs/ui/screens/ValidateOTPScreen.js +132 -12
- package/lib/commonjs/ui/screens/ValidateOTPScreen.js.map +1 -1
- package/lib/commonjs/utils/ApiUtils.js +122 -3
- package/lib/commonjs/utils/ApiUtils.js.map +1 -1
- package/lib/commonjs/utils/ExecTaskUtils.js +67 -7
- package/lib/commonjs/utils/ExecTaskUtils.js.map +1 -1
- package/lib/commonjs/utils/context/valdiateOTPContext.js +11 -0
- package/lib/commonjs/utils/context/valdiateOTPContext.js.map +1 -0
- package/lib/commonjs/utils/helper.js.map +1 -1
- package/lib/commonjs/utils/hooks/useTimer.js +68 -30
- package/lib/commonjs/utils/hooks/useTimer.js.map +1 -1
- package/lib/module/components/dispatch/DispatchExecNavigator.js.map +1 -1
- package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js +1 -1
- package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js +480 -290
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -1
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPSchema.js +14 -0
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPSchema.js.map +1 -1
- package/lib/module/components/executiontasks/validateOTP/ValidateOtpStyles.js +266 -0
- package/lib/module/components/executiontasks/validateOTP/ValidateOtpStyles.js.map +1 -0
- package/lib/module/components/executiontasks/validateOTP/components/ContactListView.js +88 -0
- package/lib/module/components/executiontasks/validateOTP/components/ContactListView.js.map +1 -0
- package/lib/module/components/executiontasks/validateOTP/components/OTPView.js +194 -0
- package/lib/module/components/executiontasks/validateOTP/components/OTPView.js.map +1 -0
- package/lib/module/components/executiontasks/validateOTP/components/VerificationComplete.js +96 -0
- package/lib/module/components/executiontasks/validateOTP/components/VerificationComplete.js.map +1 -0
- package/lib/module/components/executiontasks/validateOTP/constants.js +11 -4
- package/lib/module/components/executiontasks/validateOTP/constants.js.map +1 -1
- package/lib/module/components/executiontasks/validateOTP/sub-components/ContactCard.js +59 -0
- package/lib/module/components/executiontasks/validateOTP/sub-components/ContactCard.js.map +1 -0
- package/lib/module/components/executiontasks/validateOTP/sub-components/OTPInput.js +11 -5
- package/lib/module/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -1
- package/lib/module/components/executiontasks/validateOTP/sub-components/ResendOTPButton.js +52 -0
- package/lib/module/components/executiontasks/validateOTP/sub-components/ResendOTPButton.js.map +1 -0
- package/lib/module/components/executiontasks/validateOTP/utils.js +219 -108
- package/lib/module/components/executiontasks/validateOTP/utils.js.map +1 -1
- package/lib/module/components/utils/Scale.js +14 -0
- package/lib/module/components/utils/Scale.js.map +1 -0
- package/lib/module/components/widgets/ConfirmCancelModal.js +40 -0
- package/lib/module/components/widgets/ConfirmCancelModal.js.map +1 -0
- package/lib/module/components/widgets/SnackBarCustom.js +36 -4
- package/lib/module/components/widgets/SnackBarCustom.js.map +1 -1
- package/lib/module/components/widgets/SplitTextInput.js +48 -19
- package/lib/module/components/widgets/SplitTextInput.js.map +1 -1
- package/lib/module/constants/apiConstants.js +4 -1
- package/lib/module/constants/apiConstants.js.map +1 -1
- package/lib/module/constants/constants.js +1 -0
- package/lib/module/constants/constants.js.map +1 -1
- package/lib/module/icons/icExclamationcircleo_dark.svg +3 -0
- package/lib/module/icons/icFailed.gif +0 -0
- package/lib/module/icons/icRadioChecked.svg +4 -0
- package/lib/module/icons/icRadioUnchecked.svg +4 -0
- package/lib/module/icons/icSuccess.gif +0 -0
- package/lib/module/icons/index.js +5 -0
- package/lib/module/icons/index.js.map +1 -0
- package/lib/module/index.js +2 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/manager/sdk/DispatchSDKManager.js +5 -3
- package/lib/module/manager/sdk/DispatchSDKManager.js.map +1 -1
- package/lib/module/manager/sdk/callbacksHandler.js +12 -3
- package/lib/module/manager/sdk/callbacksHandler.js.map +1 -1
- package/lib/module/manager/syncmanager/AppSyncManager.js +1 -4
- package/lib/module/manager/syncmanager/AppSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/constants.js +2 -0
- package/lib/module/manager/syncmanager/constants.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentHttpClient.js +3 -2
- package/lib/module/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentSyncManager.js +70 -80
- package/lib/module/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
- package/lib/module/models/sdk.js +2 -0
- package/lib/module/models/sdk.js.map +1 -1
- package/lib/module/ui/screens/ValidateOTPScreen.js +139 -11
- package/lib/module/ui/screens/ValidateOTPScreen.js.map +1 -1
- package/lib/module/utils/ApiUtils.js +118 -2
- package/lib/module/utils/ApiUtils.js.map +1 -1
- package/lib/module/utils/ExecTaskUtils.js +66 -7
- package/lib/module/utils/ExecTaskUtils.js.map +1 -1
- package/lib/module/utils/context/valdiateOTPContext.js +4 -0
- package/lib/module/utils/context/valdiateOTPContext.js.map +1 -0
- package/lib/module/utils/helper.js +1 -0
- package/lib/module/utils/helper.js.map +1 -1
- package/lib/module/utils/hooks/useTimer.js +67 -30
- package/lib/module/utils/hooks/useTimer.js.map +1 -1
- package/lib/typescript/components/executiontasks/collectPayment/PaymentStyles.d.ts +3 -3
- package/lib/typescript/components/executiontasks/deliver/DeliverETInput.d.ts +0 -1
- package/lib/typescript/components/executiontasks/scan/modalConstant.d.ts +0 -1
- package/lib/typescript/components/executiontasks/validateOTP/ValidateOTPET.d.ts +3 -3
- package/lib/typescript/components/executiontasks/validateOTP/ValidateOTPSchema.d.ts +169 -5
- package/lib/typescript/components/executiontasks/validateOTP/ValidateOtpStyles.d.ts +257 -0
- package/lib/typescript/components/executiontasks/validateOTP/components/ContactListView.d.ts +3 -0
- package/lib/typescript/components/executiontasks/validateOTP/components/OTPView.d.ts +3 -0
- package/lib/typescript/components/executiontasks/validateOTP/components/VerificationComplete.d.ts +3 -0
- package/lib/typescript/components/executiontasks/validateOTP/constants.d.ts +11 -4
- package/lib/typescript/components/executiontasks/validateOTP/sub-components/ContactCard.d.ts +8 -0
- package/lib/typescript/components/executiontasks/validateOTP/sub-components/ResendOTPButton.d.ts +12 -0
- package/lib/typescript/components/executiontasks/validateOTP/utils.d.ts +31 -7
- package/lib/typescript/components/utils/Scale.d.ts +4 -0
- package/lib/typescript/components/widgets/ConfirmCancelModal.d.ts +9 -0
- package/lib/typescript/components/widgets/SnackBarCustom.d.ts +4 -8
- package/lib/typescript/components/widgets/SplitTextInput.d.ts +1 -1
- package/lib/typescript/components/widgets/Timer.d.ts +3 -3
- package/lib/typescript/constants/apiConstants.d.ts +3 -0
- package/lib/typescript/constants/constants.d.ts +1 -0
- package/lib/typescript/icons/index.d.ts +4 -0
- package/lib/typescript/index.d.ts +2 -0
- package/lib/typescript/manager/sdk/callbacksHandler.d.ts +4 -1
- package/lib/typescript/manager/syncmanager/constants.d.ts +2 -0
- package/lib/typescript/models/execTasks/ETConfig.d.ts +1 -1
- package/lib/typescript/models/sdk.d.ts +3 -0
- package/lib/typescript/network/GraphQLClient.d.ts +4 -4
- package/lib/typescript/styles/executionTasks/CommonStyles.d.ts +2 -2
- package/lib/typescript/ui/screens/HttpRequestScreen.d.ts +0 -1
- package/lib/typescript/utils/ApiUtils.d.ts +6 -2
- package/lib/typescript/utils/ExecTaskUtils.d.ts +1 -0
- package/lib/typescript/utils/context/paymentContext.d.ts +0 -1
- package/lib/typescript/utils/context/valdiateOTPContext.d.ts +6 -0
- package/lib/typescript/utils/hooks/useModal.d.ts +0 -2
- package/lib/typescript/utils/hooks/useTimer.d.ts +7 -5
- package/package.json +46 -44
- package/src/components/dispatch/DispatchExecNavigator.tsx +1 -1
- package/src/components/executiontasks/forms/widgets/DateTimeWidget.tsx +2 -2
- package/src/components/executiontasks/imageCapture/CaptureUtils.ts +1 -1
- package/src/components/executiontasks/validateOTP/ValidateOTPET.tsx +654 -381
- package/src/components/executiontasks/validateOTP/ValidateOTPSchema.ts +193 -8
- package/src/components/executiontasks/validateOTP/ValidateOtpStyles.ts +298 -0
- package/src/components/executiontasks/validateOTP/components/ContactListView.tsx +109 -0
- package/src/components/executiontasks/validateOTP/components/OTPView.tsx +216 -0
- package/src/components/executiontasks/validateOTP/components/VerificationComplete.tsx +124 -0
- package/src/components/executiontasks/validateOTP/constants.ts +11 -4
- package/src/components/executiontasks/validateOTP/sub-components/ContactCard.tsx +72 -0
- package/src/components/executiontasks/validateOTP/sub-components/OTPInput.tsx +13 -7
- package/src/components/executiontasks/validateOTP/sub-components/ResendOTPButton.tsx +86 -0
- package/src/components/executiontasks/validateOTP/utils.ts +313 -143
- package/src/components/utils/Scale.ts +13 -0
- package/src/components/widgets/ConfirmCancelModal.tsx +49 -0
- package/src/components/widgets/SnackBarCustom.tsx +37 -13
- package/src/components/widgets/SplitTextInput.tsx +58 -21
- package/src/constants/apiConstants.ts +3 -0
- package/src/constants/constants.ts +2 -2
- package/src/icons/icExclamationcircleo_dark.svg +3 -0
- package/src/icons/icFailed.gif +0 -0
- package/src/icons/icRadioChecked.svg +4 -0
- package/src/icons/icRadioUnchecked.svg +4 -0
- package/src/icons/icSuccess.gif +0 -0
- package/src/icons/index.ts +5 -0
- package/src/index.tsx +2 -0
- package/src/manager/sdk/DispatchSDKManager.ts +6 -5
- package/src/manager/sdk/callbacksHandler.ts +29 -12
- package/src/manager/syncmanager/AppSyncManager.ts +4 -7
- package/src/manager/syncmanager/constants.ts +2 -0
- package/src/manager/syncmanager/document/DocumentHttpClient.ts +29 -29
- package/src/manager/syncmanager/document/DocumentSyncManager.ts +75 -84
- package/src/models/sdk.ts +6 -0
- package/src/ui/screens/ValidateOTPScreen.tsx +194 -32
- package/src/utils/ApiUtils.ts +131 -3
- package/src/utils/ExecTaskUtils.ts +77 -15
- package/src/utils/context/valdiateOTPContext.ts +9 -0
- package/src/utils/helper.ts +0 -1
- package/src/utils/hooks/useTimer.ts +94 -36
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { HTTPRequestBody, PathParams, QueryParams } from '../../../utils/ApiUtils';
|
|
2
2
|
import type { BaseETRequest, BaseETResponse } from '../../../models/execTasks/ETBaseModels';
|
|
3
3
|
import type { Headers, HTTPMethod } from '../httpRequest/HttpRequestETSchema';
|
|
4
|
+
import { SnackBarType } from 'src/components/widgets/SnackBarCustom';
|
|
4
5
|
export interface API {
|
|
5
6
|
uri: string;
|
|
6
7
|
timeout?: number;
|
|
@@ -9,8 +10,10 @@ export interface API {
|
|
|
9
10
|
requestBody?: HTTPRequestBody;
|
|
10
11
|
queryParams?: QueryParams[];
|
|
11
12
|
pathParams?: PathParams[];
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
responseJsonPath: string | object;
|
|
14
|
+
errorJsonPath: string | object;
|
|
15
|
+
errorJsonLogic?: object | string;
|
|
16
|
+
responseJsonLogic?: object | string;
|
|
14
17
|
}
|
|
15
18
|
export type ValidationRegex = string;
|
|
16
19
|
export interface RetryConfig {
|
|
@@ -26,7 +29,8 @@ export interface GenerationLogic {
|
|
|
26
29
|
}
|
|
27
30
|
export declare enum InputType {
|
|
28
31
|
STRING = "string",
|
|
29
|
-
NUMBER = "number"
|
|
32
|
+
NUMBER = "number",
|
|
33
|
+
NUMERIC = "numeric"
|
|
30
34
|
}
|
|
31
35
|
export interface CaptureInput {
|
|
32
36
|
inputType: InputType;
|
|
@@ -45,10 +49,170 @@ export interface Validation {
|
|
|
45
49
|
selectedIndex: number;
|
|
46
50
|
logic: Logic;
|
|
47
51
|
}
|
|
48
|
-
export
|
|
52
|
+
export declare enum OtpDeliveryMethodTypes {
|
|
53
|
+
PHONE = "Phone",
|
|
54
|
+
EMAIL = "Email",
|
|
55
|
+
BOTH = "Both"
|
|
56
|
+
}
|
|
57
|
+
export interface ResendOTPConfigType {
|
|
58
|
+
buttonTitle?: string;
|
|
59
|
+
enableResends: boolean;
|
|
60
|
+
enableDelay: number;
|
|
61
|
+
maxResends: number;
|
|
62
|
+
}
|
|
63
|
+
export type GenerateOtpPayloadType = {
|
|
64
|
+
refId: string;
|
|
65
|
+
jobId: string;
|
|
66
|
+
objectiveId: string;
|
|
67
|
+
contactInfo: {
|
|
68
|
+
id: string;
|
|
69
|
+
mode: 'PHONE' | 'EMAIL' | string;
|
|
70
|
+
type: 'PRIMARY' | 'SECONDARY' | string;
|
|
71
|
+
index: number;
|
|
72
|
+
};
|
|
73
|
+
pathParams?: PathParams[];
|
|
74
|
+
meta: string | object;
|
|
75
|
+
};
|
|
76
|
+
export interface ResendOTPPayloadType {
|
|
77
|
+
refId: string;
|
|
78
|
+
meta: string | object;
|
|
79
|
+
contactInfo?: {
|
|
80
|
+
id: string;
|
|
81
|
+
mode: 'PHONE' | 'EMAIL' | string;
|
|
82
|
+
type: 'PRIMARY' | 'SECONDARY' | string;
|
|
83
|
+
index: number;
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
export type ResponseType = {
|
|
87
|
+
status: boolean;
|
|
88
|
+
data: {
|
|
89
|
+
result: {
|
|
90
|
+
resendCount: number;
|
|
91
|
+
retryCount: number;
|
|
92
|
+
message: string;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
export type ErrorResponseType = {
|
|
97
|
+
code: string;
|
|
98
|
+
description: string;
|
|
99
|
+
additionalInfo: {
|
|
100
|
+
resendCount: number;
|
|
101
|
+
retryCount: number;
|
|
102
|
+
message: string;
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
export type PhoneType = {
|
|
106
|
+
number: string | null;
|
|
107
|
+
countryCode: string | null;
|
|
108
|
+
isMobile: boolean | null;
|
|
109
|
+
muteNotif: boolean | null;
|
|
110
|
+
areaCode?: string | null;
|
|
111
|
+
};
|
|
112
|
+
export type EmailType = {
|
|
113
|
+
id: string | null;
|
|
114
|
+
muteNotif: boolean | null;
|
|
115
|
+
};
|
|
116
|
+
export type EmailAndPhoneResponse = {
|
|
117
|
+
id: string;
|
|
118
|
+
name: string;
|
|
119
|
+
phone: PhoneType;
|
|
120
|
+
email: string | null;
|
|
121
|
+
additionalPhone: PhoneType[] | null;
|
|
122
|
+
primaryEmail: EmailType | null;
|
|
123
|
+
additionalEmail: EmailType[] | null;
|
|
124
|
+
};
|
|
125
|
+
export interface ContactType {
|
|
126
|
+
id: string;
|
|
127
|
+
mode: 'PHONE' | 'EMAIL' | string;
|
|
128
|
+
type: 'PRIMARY' | 'SECONDARY' | string;
|
|
129
|
+
index: number;
|
|
130
|
+
value: string;
|
|
131
|
+
orderId?: string | undefined | null;
|
|
132
|
+
}
|
|
133
|
+
export type ContactTypes = ContactType & {
|
|
134
|
+
orderFrom?: string;
|
|
135
|
+
contactId?: string;
|
|
136
|
+
isSelected?: boolean;
|
|
137
|
+
};
|
|
138
|
+
export interface OtpInputConfigType {
|
|
139
|
+
inputType: InputType;
|
|
140
|
+
length: number;
|
|
141
|
+
validationRegex: string;
|
|
142
|
+
}
|
|
143
|
+
export interface SetSnackBarType {
|
|
144
|
+
show: boolean;
|
|
145
|
+
message: string;
|
|
146
|
+
type: SnackBarType;
|
|
147
|
+
}
|
|
148
|
+
export type OTPViewPropTypes = BaseETRequest & {
|
|
149
|
+
errorMessage: string;
|
|
150
|
+
handleBackNavigation: () => void;
|
|
151
|
+
setCurrentScreen: (screen: string) => void;
|
|
152
|
+
setPrevScreen: (screen: string) => void;
|
|
153
|
+
isContactVisited: boolean;
|
|
154
|
+
selectedContact: ContactTypes;
|
|
155
|
+
otpInputConfig: OtpInputConfigType;
|
|
156
|
+
otpCode: string;
|
|
157
|
+
setOTPCode: (otp: string) => void;
|
|
158
|
+
hasError: boolean;
|
|
159
|
+
setHasError: (value: boolean) => void;
|
|
160
|
+
setErrorMessage: (screen: string) => void;
|
|
161
|
+
loading: boolean;
|
|
162
|
+
setLoading: (value: boolean) => void;
|
|
163
|
+
setSnackBar: (values: SetSnackBarType) => void;
|
|
164
|
+
resendConfig: ResendOTPConfigType;
|
|
165
|
+
resendCount: number;
|
|
166
|
+
setResendCount: React.Dispatch<React.SetStateAction<number>>;
|
|
167
|
+
domain: string;
|
|
168
|
+
};
|
|
169
|
+
export type ContactListViewPropTypes = BaseETRequest & {
|
|
170
|
+
handleBackNavigation: () => boolean;
|
|
171
|
+
handleSelectContact: (contactDetails: ContactTypes) => void;
|
|
172
|
+
contactList: ContactTypes[];
|
|
173
|
+
setIsContactVisited: (value: boolean) => void;
|
|
174
|
+
domain: string;
|
|
175
|
+
};
|
|
176
|
+
export type OTP_CONFIG_TYPE = 'OS1 Configured API' | 'Custom';
|
|
177
|
+
export declare enum ValidationType {
|
|
178
|
+
ONLINE = "Online (from API)",
|
|
179
|
+
OFFLINE = "Offline (from Job)"
|
|
180
|
+
}
|
|
181
|
+
export type OTP_VALIDATION_TYPE = ValidationType.OFFLINE | ValidationType.ONLINE;
|
|
182
|
+
export type ValidateOTPInput = BaseETRequest & OTPViewPropTypes & ContactListViewPropTypes & {
|
|
49
183
|
generationLogic?: GenerationLogic;
|
|
50
184
|
captureInput: CaptureInput;
|
|
51
185
|
validation: Validation;
|
|
52
186
|
onSubmitET: (validateOTPOutput: ValidateOTPOutput) => void;
|
|
187
|
+
otpLength: number;
|
|
188
|
+
inputType: InputType;
|
|
189
|
+
generateMessage: string;
|
|
190
|
+
validateMessage: string;
|
|
191
|
+
allowCancel?: boolean;
|
|
192
|
+
restrictCancel?: boolean;
|
|
193
|
+
allowBack?: boolean;
|
|
194
|
+
doorstepOTP: boolean;
|
|
195
|
+
otpDeliveryMethod: OtpDeliveryMethodTypes;
|
|
196
|
+
resendOTP: ResendOTPConfigType;
|
|
197
|
+
contacts: ContactType[] | any[];
|
|
198
|
+
otpConfig: OTP_CONFIG_TYPE;
|
|
199
|
+
resendApi: API;
|
|
200
|
+
otpGeneration: API;
|
|
201
|
+
validationApi: API;
|
|
202
|
+
offlineOtpValue: string | number;
|
|
203
|
+
showSummary: boolean;
|
|
204
|
+
verifyFor: string;
|
|
205
|
+
validateFor: string;
|
|
206
|
+
jobId: string;
|
|
207
|
+
orderData: any[];
|
|
208
|
+
workflowId: string;
|
|
209
|
+
refId: string;
|
|
210
|
+
maxRetries: number;
|
|
211
|
+
otpValidation: OTP_VALIDATION_TYPE;
|
|
212
|
+
progressGroup: string;
|
|
213
|
+
reattemptId: number;
|
|
214
|
+
isSelfLoop: boolean;
|
|
215
|
+
};
|
|
216
|
+
export type ValidateOTPOutput = BaseETResponse & {
|
|
217
|
+
retryCount: number;
|
|
53
218
|
};
|
|
54
|
-
export type ValidateOTPOutput = BaseETResponse;
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
declare const styles: {
|
|
2
|
+
bottomView: {
|
|
3
|
+
padding: number;
|
|
4
|
+
gap: number;
|
|
5
|
+
flexDirection: "row-reverse";
|
|
6
|
+
justifyContent: "space-evenly";
|
|
7
|
+
backgroundColor: string;
|
|
8
|
+
borderTopWidth: number;
|
|
9
|
+
borderColor: string;
|
|
10
|
+
};
|
|
11
|
+
otpTitle: {
|
|
12
|
+
marginTop: number;
|
|
13
|
+
marginBottom: number;
|
|
14
|
+
fontFamily: string;
|
|
15
|
+
fontStyle: "normal";
|
|
16
|
+
fontSize: number;
|
|
17
|
+
lineHeight: number;
|
|
18
|
+
letterSpacing: number;
|
|
19
|
+
color: string;
|
|
20
|
+
alignItems: "center";
|
|
21
|
+
};
|
|
22
|
+
retryButton: {
|
|
23
|
+
alignItems: "flex-start";
|
|
24
|
+
marginVertical: number;
|
|
25
|
+
};
|
|
26
|
+
subText: {
|
|
27
|
+
justifyContent: "center";
|
|
28
|
+
fontFamily: string;
|
|
29
|
+
fontStyle: "normal";
|
|
30
|
+
fontSize: number;
|
|
31
|
+
letterSpacing: number;
|
|
32
|
+
lineHeight: number;
|
|
33
|
+
textAlign: "center";
|
|
34
|
+
color: string;
|
|
35
|
+
marginBottom: number;
|
|
36
|
+
};
|
|
37
|
+
modalContent: {
|
|
38
|
+
marginStart: number;
|
|
39
|
+
marginEnd: number;
|
|
40
|
+
flex: number;
|
|
41
|
+
marginBottom: number;
|
|
42
|
+
};
|
|
43
|
+
modalView: {
|
|
44
|
+
backgroundColor: string;
|
|
45
|
+
padding: number;
|
|
46
|
+
borderRadius: number;
|
|
47
|
+
};
|
|
48
|
+
titleContainer: {
|
|
49
|
+
backgroundColor: string;
|
|
50
|
+
padding: number;
|
|
51
|
+
};
|
|
52
|
+
titleText: {
|
|
53
|
+
fontFamily: string;
|
|
54
|
+
fontWeight: "400";
|
|
55
|
+
fontSize: number;
|
|
56
|
+
lineHeight: number;
|
|
57
|
+
color: string;
|
|
58
|
+
};
|
|
59
|
+
contactListContainer: {
|
|
60
|
+
marginTop: number;
|
|
61
|
+
gap: number;
|
|
62
|
+
marginHorizontal: number;
|
|
63
|
+
flex: number;
|
|
64
|
+
};
|
|
65
|
+
headingTitle: {
|
|
66
|
+
lineHeight: number;
|
|
67
|
+
};
|
|
68
|
+
contactCard: {
|
|
69
|
+
paddingHorizontal: number;
|
|
70
|
+
paddingVertical: number;
|
|
71
|
+
gap: number;
|
|
72
|
+
borderRadius: number;
|
|
73
|
+
backgroundColor: string;
|
|
74
|
+
borderWidth: number;
|
|
75
|
+
borderColor: string;
|
|
76
|
+
marginBottom: number;
|
|
77
|
+
shadowColor: string;
|
|
78
|
+
shadowOffset: {
|
|
79
|
+
width: number;
|
|
80
|
+
height: number;
|
|
81
|
+
};
|
|
82
|
+
shadowOpacity: number;
|
|
83
|
+
shadowRadius: number;
|
|
84
|
+
elevation: number;
|
|
85
|
+
};
|
|
86
|
+
selectedCard: {
|
|
87
|
+
borderWidth: number;
|
|
88
|
+
borderColor: string;
|
|
89
|
+
};
|
|
90
|
+
columnContainer: {
|
|
91
|
+
display: "flex";
|
|
92
|
+
flexDirection: "column";
|
|
93
|
+
alignContent: "center";
|
|
94
|
+
flex: number;
|
|
95
|
+
};
|
|
96
|
+
rowContainer: {
|
|
97
|
+
display: "flex";
|
|
98
|
+
flexDirection: "row";
|
|
99
|
+
alignContent: "center";
|
|
100
|
+
gap: number;
|
|
101
|
+
flex: number;
|
|
102
|
+
marginBottom: number;
|
|
103
|
+
};
|
|
104
|
+
contactTitle: {
|
|
105
|
+
fontFamily: string;
|
|
106
|
+
fontWeight: "500";
|
|
107
|
+
fontSize: number;
|
|
108
|
+
lineHeight: number;
|
|
109
|
+
color: string;
|
|
110
|
+
};
|
|
111
|
+
contactLabel: {
|
|
112
|
+
color: string;
|
|
113
|
+
lineHeight: number;
|
|
114
|
+
fontSize: number;
|
|
115
|
+
};
|
|
116
|
+
contactText: {
|
|
117
|
+
lineHeight: number;
|
|
118
|
+
fontSize: number;
|
|
119
|
+
};
|
|
120
|
+
radioIcon: {
|
|
121
|
+
height: number;
|
|
122
|
+
width: number;
|
|
123
|
+
marginTop: number;
|
|
124
|
+
};
|
|
125
|
+
contactList: {
|
|
126
|
+
paddingBottom: number;
|
|
127
|
+
};
|
|
128
|
+
otpContainer: {
|
|
129
|
+
marginTop: number;
|
|
130
|
+
marginHorizontal: number;
|
|
131
|
+
padding: number;
|
|
132
|
+
gap: number;
|
|
133
|
+
borderRadius: number;
|
|
134
|
+
borderWidth: number;
|
|
135
|
+
borderColor: string;
|
|
136
|
+
backgroundColor: string;
|
|
137
|
+
shadowColor: string;
|
|
138
|
+
shadowOffset: {
|
|
139
|
+
width: number;
|
|
140
|
+
height: number;
|
|
141
|
+
};
|
|
142
|
+
shadowOpacity: number;
|
|
143
|
+
shadowRadius: number;
|
|
144
|
+
elevation: number;
|
|
145
|
+
};
|
|
146
|
+
otpTextMsg: {
|
|
147
|
+
fontFamily: string;
|
|
148
|
+
fontWeight: "500";
|
|
149
|
+
fontSize: number;
|
|
150
|
+
lineHeight: number;
|
|
151
|
+
color: string;
|
|
152
|
+
};
|
|
153
|
+
resendOtpMsg: {
|
|
154
|
+
fontFamily: string;
|
|
155
|
+
fontWeight: "400";
|
|
156
|
+
fontSize: number;
|
|
157
|
+
lineHeight: number;
|
|
158
|
+
color: string;
|
|
159
|
+
};
|
|
160
|
+
resendOtpBtn: {
|
|
161
|
+
fontFamily: string;
|
|
162
|
+
fontWeight: "500";
|
|
163
|
+
fontSize: number;
|
|
164
|
+
lineHeight: number;
|
|
165
|
+
color: string;
|
|
166
|
+
};
|
|
167
|
+
errorMessage: {
|
|
168
|
+
color: string;
|
|
169
|
+
fontFamily: string;
|
|
170
|
+
fontWeight: "400";
|
|
171
|
+
fontSize: number;
|
|
172
|
+
lineHeight: number;
|
|
173
|
+
};
|
|
174
|
+
maxLimitReachBox: {
|
|
175
|
+
display: "flex";
|
|
176
|
+
flexDirection: "row";
|
|
177
|
+
gap: number;
|
|
178
|
+
justifyContent: "flex-start";
|
|
179
|
+
alignItems: "center";
|
|
180
|
+
marginTop: number;
|
|
181
|
+
};
|
|
182
|
+
maxLimitReachText: {
|
|
183
|
+
color: string;
|
|
184
|
+
fontFamily: string;
|
|
185
|
+
fontWeight: "400";
|
|
186
|
+
fontSize: number;
|
|
187
|
+
marginTop: number;
|
|
188
|
+
lineHeight: number;
|
|
189
|
+
};
|
|
190
|
+
responseCard: {
|
|
191
|
+
paddingVertical: number;
|
|
192
|
+
gap: number;
|
|
193
|
+
alignContent: "center";
|
|
194
|
+
alignItems: "center";
|
|
195
|
+
justifyContent: "center";
|
|
196
|
+
borderRadius: number;
|
|
197
|
+
borderColor: string;
|
|
198
|
+
borderWidth: number;
|
|
199
|
+
backgroundColor: string;
|
|
200
|
+
marginHorizontal: number;
|
|
201
|
+
};
|
|
202
|
+
loadingCard: {
|
|
203
|
+
paddingVertical: number;
|
|
204
|
+
paddingHorizontal: number;
|
|
205
|
+
gap: number;
|
|
206
|
+
alignItems: "center";
|
|
207
|
+
justifyContent: "center";
|
|
208
|
+
borderRadius: number;
|
|
209
|
+
borderColor: string;
|
|
210
|
+
borderWidth: number;
|
|
211
|
+
backgroundColor: string;
|
|
212
|
+
marginHorizontal: number;
|
|
213
|
+
};
|
|
214
|
+
otpResponseText: {
|
|
215
|
+
color: string;
|
|
216
|
+
fontFamily: string;
|
|
217
|
+
fontWeight: "500";
|
|
218
|
+
fontSize: number;
|
|
219
|
+
lineHeight: number;
|
|
220
|
+
};
|
|
221
|
+
loadingText: {
|
|
222
|
+
color: string;
|
|
223
|
+
fontFamily: string;
|
|
224
|
+
fontWeight: "400";
|
|
225
|
+
fontSize: number;
|
|
226
|
+
lineHeight: number;
|
|
227
|
+
letterSpacing: number;
|
|
228
|
+
};
|
|
229
|
+
mainBtnStyles: {
|
|
230
|
+
display: "flex";
|
|
231
|
+
flexDirection: "row";
|
|
232
|
+
justifyContent: "center";
|
|
233
|
+
alignItems: "center";
|
|
234
|
+
flex: number;
|
|
235
|
+
borderRadius: number;
|
|
236
|
+
width: "100%";
|
|
237
|
+
backgroundColor: string;
|
|
238
|
+
};
|
|
239
|
+
disableBtn: {
|
|
240
|
+
borderWidth: number;
|
|
241
|
+
borderColor: string;
|
|
242
|
+
};
|
|
243
|
+
cancelBtnText: {
|
|
244
|
+
fontSize: number;
|
|
245
|
+
fontFamily: string;
|
|
246
|
+
textAlign: "center";
|
|
247
|
+
fontWeight: "600";
|
|
248
|
+
};
|
|
249
|
+
activeBtnText: {
|
|
250
|
+
fontSize: number;
|
|
251
|
+
fontFamily: string;
|
|
252
|
+
fontWeight: "500";
|
|
253
|
+
color: string;
|
|
254
|
+
textAlign: "center";
|
|
255
|
+
};
|
|
256
|
+
};
|
|
257
|
+
export default styles;
|
|
@@ -1,10 +1,17 @@
|
|
|
1
|
-
export declare const INVALID_OTP = "
|
|
1
|
+
export declare const INVALID_OTP = "Entered incorrect OTP. <length> attempts left.";
|
|
2
|
+
export declare const INVALID_OTP_ONE_ATTEMPT_LEFT = "OTP verification failed! Please enter the correct OTP within 1 attempt.";
|
|
2
3
|
export declare const INVALID_OTP_LENGTH = "OTP should be of length <length>";
|
|
3
4
|
export declare const INVALID_REGEX = "Invalid OTP entered. Must match the expected pattern.";
|
|
4
|
-
export declare const ERROR_GENERATING_OTP = "
|
|
5
|
+
export declare const ERROR_GENERATING_OTP = "Unable to send OTP. Please try again.";
|
|
6
|
+
export declare const UNABLE_TO_SEND_OTP = "Unable to send new OTP as maximum limit reached.";
|
|
7
|
+
export declare const ERROR_RESEND_OTP = "Failed to resend OTP. Try again.";
|
|
8
|
+
export declare const ERROR_VALIDATE_OTP = "Failed to validate OTP. Try again.";
|
|
9
|
+
export declare const OTP_SENT_SUCCESSFULLY = "OTP sent to the customer!";
|
|
10
|
+
export declare const OTP_VERIFIED_SUCCESSFULLY = "OTP verified successfully!";
|
|
5
11
|
export declare const mobileSVG = "<svg width=\"164\" height=\"164\" viewBox=\"0 0 164 164\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n<mask id=\"mask0_3391_199849\" style=\"mask-type:alpha\" maskUnits=\"userSpaceOnUse\" x=\"0\" y=\"0\" width=\"164\" height=\"164\">\n<rect width=\"164\" height=\"164\" fill=\"url(#pattern0)\"/>\n</mask>\n<g mask=\"url(#mask0_3391_199849)\">\n<rect x=\"-28\" y=\"-29\" width=\"221\" height=\"221\" fill=\"#5B80F7\"/>\n</g>\n<defs>\n<pattern id=\"pattern0\" patternContentUnits=\"objectBoundingBox\" width=\"1\" height=\"1\">\n<use xlink:href=\"#image0_3391_199849\" transform=\"scale(0.0078125)\"/>\n</pattern>\n<image id=\"image0_3391_199849\" width=\"128\" height=\"128\" xlink:href=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACAEAQAAAA5p3UDAAAAIGNIUk0AAHom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vvhC7TE3AogN8s/uYbeJ/7MedcwJlLlpQsXL/e1fwm0+uvw/K4OEFbobG7u9vY0SFomR6C0/Nnme7Dh9GZtDTBLS+/dAkuXLuG6rkNBzjOywv+8OKLcHHZMsEboaawUHcuPV3wOnoATgVQXBMYqMi+cQN2+PmJ7eyE0NTfDxq1Wq8ncwjgdAJ1ScTatXiwqgoMwpxYLRnCWBb5JyXp5n30kdiuiAWn20Bdc3U18tZqYRH/WzfJ0tTfT3rwAXg8B9A1V1d7XVSr4VRREUT29IjtuMtE9vSgmsJC0KjVpAcfgOMQMJxcrFDMKJ4zR6mYPRvVP/202JXgAo578MDOdnV1Gzs68hDLiu0PhUKhUCgUCoVCoVAoIvB/0P+sQEfLYfkAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjItMTItMjFUMDg6NTg6MzUrMDA6MDCtf4QMAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIyLTEyLTIxVDA4OjU4OjM1KzAwOjAw3CI8sAAAACh0RVh0ZGF0ZTp0aW1lc3RhbXAAMjAyMi0xMi0yMVQwODo1ODozNSswMDowMIs3HW8AAAAASUVORK5CYII=\"/>\n</defs>\n</svg>\n";
|
|
6
12
|
export declare const DEFAULT_RETRY_CONFIG: {
|
|
7
13
|
buttonTitle: string;
|
|
8
|
-
|
|
9
|
-
|
|
14
|
+
enableResends: boolean;
|
|
15
|
+
enableDelay: number;
|
|
16
|
+
maxResends: number;
|
|
10
17
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ContactTypes } from '../ValidateOTPSchema';
|
|
3
|
+
interface ContactCardPropType {
|
|
4
|
+
handleSelectContact: (contactDetails: ContactTypes) => void;
|
|
5
|
+
contactDetails: ContactTypes;
|
|
6
|
+
}
|
|
7
|
+
export declare const ContactCard: (props: ContactCardPropType) => React.JSX.Element;
|
|
8
|
+
export {};
|
package/lib/typescript/components/executiontasks/validateOTP/sub-components/ResendOTPButton.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ResendOTPConfigType } from '../ValidateOTPSchema';
|
|
3
|
+
interface ResendOTPButtonPropType {
|
|
4
|
+
timer: number;
|
|
5
|
+
resendConfig: ResendOTPConfigType;
|
|
6
|
+
resendCount: number;
|
|
7
|
+
formattedTime: string;
|
|
8
|
+
handleResendOtp: () => void;
|
|
9
|
+
resendOTP?: any;
|
|
10
|
+
}
|
|
11
|
+
export declare const ResendOTPButton: (props: ResendOTPButtonPropType) => React.JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -1,7 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import type { ResendOTPConfigType, EmailAndPhoneResponse, ContactType, ValidateOTPInput, ResendOTPPayloadType, ResponseType, ErrorResponseType, GenerateOtpPayloadType } from './ValidateOTPSchema';
|
|
2
|
+
export declare enum OTP_CONFIG {
|
|
3
|
+
OS1 = "OTP_CONFIG",
|
|
4
|
+
CUSTOM = "Custom"
|
|
5
|
+
}
|
|
6
|
+
type PropType = ValidateOTPInput & {
|
|
7
|
+
domain: string;
|
|
8
|
+
};
|
|
9
|
+
export declare enum countType {
|
|
10
|
+
RETRY = 0,
|
|
11
|
+
RESEND = 1
|
|
12
|
+
}
|
|
13
|
+
export declare const VALIDATE_OTP_SCREENS: {
|
|
14
|
+
CONTACT_LIST: string;
|
|
15
|
+
OTP_VIEW: string;
|
|
16
|
+
VERIFICATION_COMPLETE: string;
|
|
17
|
+
};
|
|
18
|
+
export declare const generateOTP: (payload: GenerateOtpPayloadType, props: PropType) => Promise<any | ResponseType | ErrorResponseType>;
|
|
19
|
+
export declare const verifyOTP: (payload: any, props: PropType) => Promise<any | ResponseType | ErrorResponseType>;
|
|
20
|
+
export declare const resendOTP: (payload: ResendOTPPayloadType, props: PropType) => Promise<any | ResponseType | ErrorResponseType>;
|
|
21
|
+
export declare const parseResendConfig: (inputResendConfig: ResendOTPConfigType | undefined) => ResendOTPConfigType;
|
|
22
|
+
export declare function maskContactId(contactId: string): string;
|
|
23
|
+
export declare const truncateOrderId: (shipmentId: string) => string;
|
|
24
|
+
export declare const isNotNullOrEmpty: (value: any) => boolean;
|
|
25
|
+
export declare function generateContactList(response: EmailAndPhoneResponse, orderId?: string): ContactType[];
|
|
26
|
+
export declare const getUniqueRefId: (moId: string, progressGroupId?: string | null, attemptCount?: number | null) => string;
|
|
27
|
+
export declare const updateRetryCount: (retryCount: number) => Promise<void>;
|
|
28
|
+
export declare const updateResendCount: (retryCount: number) => Promise<void>;
|
|
29
|
+
export declare const getCount: (type: countType) => Promise<number>;
|
|
30
|
+
export declare const resetCount: () => Promise<void>;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ConfirmCancelProps {
|
|
3
|
+
showModal: boolean;
|
|
4
|
+
setShowModal: React.Dispatch<React.SetStateAction<boolean>>;
|
|
5
|
+
onSuccess: () => any;
|
|
6
|
+
onFailure: () => any;
|
|
7
|
+
}
|
|
8
|
+
declare const ConfirmCancelModal: (props: ConfirmCancelProps) => React.JSX.Element;
|
|
9
|
+
export default ConfirmCancelModal;
|
|
@@ -2,13 +2,7 @@ import React from 'react';
|
|
|
2
2
|
export interface SnackbarProps {
|
|
3
3
|
visible: boolean;
|
|
4
4
|
duration?: number;
|
|
5
|
-
/**
|
|
6
|
-
* Callback called when Snackbar is dismissed. The `visible` prop needs to be updated when this is called.
|
|
7
|
-
*/
|
|
8
5
|
onDismiss: () => void;
|
|
9
|
-
/**
|
|
10
|
-
* Text content of the Snackbar.
|
|
11
|
-
*/
|
|
12
6
|
message: string;
|
|
13
7
|
type?: SnackBarType;
|
|
14
8
|
theme: ReactNativePaper.Theme;
|
|
@@ -19,9 +13,11 @@ export declare enum SnackBarType {
|
|
|
19
13
|
SUCCESS = 0,
|
|
20
14
|
FAILURE = 1,
|
|
21
15
|
WARNING = 2,
|
|
22
|
-
PAYMENT_WARNING = 3
|
|
16
|
+
PAYMENT_WARNING = 3,
|
|
17
|
+
OTP_SUCCESS = 4,
|
|
18
|
+
OTP_FAILED = 5
|
|
23
19
|
}
|
|
24
|
-
declare const _default: React.ComponentType<Pick<SnackbarProps, "visible" | "
|
|
20
|
+
declare const _default: React.ComponentType<Pick<SnackbarProps, "visible" | "duration" | "onDismiss" | "message" | "type" | "customBottom" | "customTop"> & {
|
|
25
21
|
theme?: import("@callstack/react-theme-provider").$DeepPartial<ReactNativePaper.Theme> | undefined;
|
|
26
22
|
}> & import("@callstack/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<React.ComponentType<SnackbarProps> & (({ visible, duration, onDismiss, message, theme, type, customBottom, customTop, }: SnackbarProps) => React.JSX.Element | null), {}>;
|
|
27
23
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export declare const Timer: React.ForwardRefExoticComponent<Pick<{
|
|
3
3
|
ref: any;
|
|
4
|
-
singleValue?: boolean
|
|
5
|
-
timer?: number
|
|
6
|
-
onTimerEnd?: (
|
|
4
|
+
singleValue?: boolean;
|
|
5
|
+
timer?: number;
|
|
6
|
+
onTimerEnd?: () => void;
|
|
7
7
|
}, "timer" | "singleValue" | "onTimerEnd"> & React.RefAttributes<unknown>>;
|
|
@@ -4,6 +4,9 @@ export declare const ENDPOINTS: {
|
|
|
4
4
|
GENERATE_QR: string;
|
|
5
5
|
PAYMENT_STATUS: string;
|
|
6
6
|
PAYMENT_MODES: string;
|
|
7
|
+
GENERATE_OTP_ENDPOINT: string;
|
|
8
|
+
VERIFY_OTP_ENDPOINT: string;
|
|
9
|
+
RESEND_OTP_ENDPOINT: string;
|
|
7
10
|
};
|
|
8
11
|
export declare const API_CONFIG: {
|
|
9
12
|
timeout: number;
|
|
@@ -9,6 +9,7 @@ export declare const DEFAULT_DELIVER_MESSAGE = "Confirm Drop of $ orders";
|
|
|
9
9
|
export declare const DEFAULT_SIGN_ET_MESSAGE = "Please sign here";
|
|
10
10
|
export declare const REASON_NOT_USED = "NOT_TO_BE_USED";
|
|
11
11
|
export declare const GO_BACK_EVENT_CODE = "E-099";
|
|
12
|
+
export declare const RETRY_LIMIT_REACHED_CODE = "R-0066";
|
|
12
13
|
export declare const PAYMENT_NOTIFICATION = "PAYMENT_COMPLETED";
|
|
13
14
|
export declare const EMAIL_REGEX = "^([a-z0-9_.+-]+)@([da-z.-]+).([a-z.]{2,6})$";
|
|
14
15
|
export declare const PAYMENT_SUCCESS_DEFAULT_TIMEOUT = 3000;
|
|
@@ -25,6 +25,7 @@ import { fireEventWithScreenName } from './analytics/sentry/SentryAnalyticsUtils
|
|
|
25
25
|
import { ScreenNameSdkConstants, SentryEventNameSdkConstants, SeverityLevelValue } from './analytics/sentry/SentrySdkConstants';
|
|
26
26
|
import { DispatchAndUserData, SentryEvent } from './analytics/sentry/SentryModels';
|
|
27
27
|
import DocumentManager from './manager/syncmanager/document/DocumentManager';
|
|
28
|
+
import { PhoneType, EmailType, EmailAndPhoneResponse } from './components/executiontasks/validateOTP/ValidateOTPSchema';
|
|
28
29
|
export { DispatchExecutor, IDispatch, IDispatchExecutor };
|
|
29
30
|
export { Storage, DispatchExecNavigator };
|
|
30
31
|
export { ETSummary, CompleteSummary, ObjectiveSummary, DispatchSyncType };
|
|
@@ -37,3 +38,4 @@ export { DispatchSDKManager };
|
|
|
37
38
|
export { Helper };
|
|
38
39
|
export { SentryAnalyticsSingleton, fireEventWithScreenName, SeverityLevelValue, ScreenNameSdkConstants, SentryEventNameSdkConstants, DispatchAndUserData, SentryEvent };
|
|
39
40
|
export { DocumentManager };
|
|
41
|
+
export { PhoneType, EmailType, EmailAndPhoneResponse };
|