@tap-payments/auth-jsconnect 2.0.48 → 2.0.49
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/build/@types/app.d.ts +8 -6
- package/build/@types/form.d.ts +23 -22
- package/build/@types/theme.d.ts +1 -1
- package/build/api/account.d.ts +2 -2
- package/build/api/auth.d.ts +11 -11
- package/build/api/availabilityServices.d.ts +3 -3
- package/build/api/axios.js +1 -1
- package/build/api/board.d.ts +3 -3
- package/build/api/country.d.ts +1 -1
- package/build/api/data.d.ts +10 -10
- package/build/api/document.d.ts +25 -0
- package/build/api/document.js +38 -0
- package/build/api/entity.d.ts +10 -20
- package/build/api/entity.js +6 -5
- package/build/api/file.d.ts +2 -1
- package/build/api/file.js +14 -1
- package/build/api/index.d.ts +10 -3
- package/build/api/index.js +3 -1
- package/build/api/individual.d.ts +8 -8
- package/build/api/lead.d.ts +10 -10
- package/build/api/operator.d.ts +1 -1
- package/build/api/operator.js +1 -1
- package/build/api/user.d.ts +2 -2
- package/build/app/settings.d.ts +11 -2
- package/build/app/settings.js +1 -1
- package/build/app/store.d.ts +4 -4
- package/build/assets/locales/ar.json +3 -1
- package/build/assets/locales/en.json +3 -1
- package/build/components/Lottie/Lottie.d.ts +1 -2
- package/build/components/Lottie/Lottie.js +1 -1
- package/build/components/Lottie/index.d.ts +2 -2
- package/build/components/Lottie/index.js +2 -2
- package/build/components/Slide/Slide.d.ts +1 -1
- package/build/constants/app.d.ts +31 -0
- package/build/constants/app.js +43 -1
- package/build/features/app/bank/bankStore.d.ts +73 -10
- package/build/features/app/bank/bankStore.js +29 -15
- package/build/features/app/brand/brandStore.d.ts +104 -12
- package/build/features/app/brand/brandStore.js +65 -66
- package/build/features/app/business/businessStore.d.ts +163 -19
- package/build/features/app/business/businessStore.js +3 -3
- package/build/features/app/connect/connectStore.d.ts +121 -13
- package/build/features/app/connect/connectStore.js +1 -1
- package/build/features/app/connectExpress/connectExpressStore.d.ts +181 -19
- package/build/features/app/connectExpress/connectExpressStore.js +1 -1
- package/build/features/app/entity/entityStore.d.ts +76 -20
- package/build/features/app/entity/entityStore.js +67 -93
- package/build/features/app/individual/individualStore.d.ts +182 -20
- package/build/features/app/individual/individualStore.js +278 -135
- package/build/features/app/password/passwordStore.d.ts +102 -12
- package/build/features/app/password/passwordStore.js +1 -1
- package/build/features/app/signIn/signInStore.d.ts +61 -7
- package/build/features/app/signIn/signInStore.js +1 -1
- package/build/features/app/tax/taxStore.d.ts +62 -8
- package/build/features/app/tax/taxStore.js +25 -12
- package/build/features/bank/screens/BankDetails/BankStatement.d.ts +1 -1
- package/build/features/bank/screens/BankDetails/BankStatement.js +4 -3
- package/build/features/bank/screens/BankDetails/IBAN.js +1 -1
- package/build/features/bank/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +1 -1
- package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +13 -13
- package/build/features/brand/screens/BrandActivities/ActivitiesList.js +6 -7
- package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +11 -11
- package/build/features/brand/screens/BrandActivities/CustomerBase.js +5 -7
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +5 -7
- package/build/features/brand/screens/BrandActivities/OperationStartDate.d.ts +2 -2
- package/build/features/brand/screens/BrandActivities/RefundPolicy.d.ts +5 -5
- package/build/features/brand/screens/BrandInfo/BrandName.js +1 -1
- package/build/features/brand/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +1 -1
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +13 -13
- package/build/features/business/screens/Activities/OperationStartDate.d.ts +2 -2
- package/build/features/business/screens/BusinessType/Article.d.ts +1 -1
- package/build/features/business/screens/BusinessType/Article.js +1 -1
- package/build/features/business/screens/BusinessType/LicenseCertificate.js +2 -1
- package/build/features/business/screens/BusinessType/LicenseType.d.ts +5 -5
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +11 -11
- package/build/features/business/screens/Customers/RefundPolicy.d.ts +5 -5
- package/build/features/business/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +1 -1
- package/build/features/connect/screens/Individual/Email.js +1 -1
- package/build/features/connect/screens/Merchant/BrandName.js +1 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.js +1 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.d.ts +5 -5
- package/build/features/connectExpress/screens/CollectIndividualInfo/Email.js +1 -1
- package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +13 -13
- package/build/features/entity/screens/EntityCapital/ActivityList.js +7 -7
- package/build/features/entity/screens/EntityCapital/CapitalPaid.js +3 -4
- package/build/features/entity/screens/EntityCapital/CapitalShareCount.js +3 -4
- package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +3 -4
- package/build/features/entity/screens/EntityName/Article.d.ts +1 -1
- package/build/features/entity/screens/EntityName/Article.js +16 -53
- package/build/features/entity/screens/EntityName/EntityName.js +2 -3
- package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +13 -13
- package/build/features/entity/screens/EntityName/EntityTypeList.js +4 -6
- package/build/features/entity/screens/EntityName/ExpiryDate.d.ts +2 -2
- package/build/features/entity/screens/EntityName/ExpiryDate.js +6 -6
- package/build/features/entity/screens/EntityName/IssuingDate.d.ts +2 -2
- package/build/features/entity/screens/EntityName/IssuingDate.js +4 -5
- package/build/features/entity/screens/EntityName/LegalName.js +2 -4
- package/build/features/entity/screens/EntityName/LicenseCertificate.js +4 -3
- package/build/features/entity/screens/EntityName/LicenseNumber.js +4 -4
- package/build/features/entity/screens/EntityName/UnifiedNumber.js +3 -4
- package/build/features/entity/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +1 -1
- package/build/features/featuresScreens.js +5 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.d.ts +2 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/CivilIDFile.js +4 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.js +2 -4
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +5 -6
- package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.js +5 -6
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +4 -4
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.js +2 -4
- package/build/features/individual/screens/AdditionalIndividualInfo/SignatureFile.js +4 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +5 -6
- package/build/features/individual/screens/IndividualList/CollectPhoneEmail.d.ts +2 -0
- package/build/features/individual/screens/IndividualList/CollectPhoneEmail.js +3 -2
- package/build/features/individual/screens/IndividualList/Email.d.ts +5 -1
- package/build/features/individual/screens/IndividualList/Email.js +73 -8
- package/build/features/individual/screens/IndividualList/IndividualList.d.ts +4 -4
- package/build/features/individual/screens/IndividualList/UserList.js +36 -19
- package/build/features/individual/screens/IndividualList/validation.js +2 -1
- package/build/features/individual/screens/IndividualPersonalInfo/Email.js +2 -3
- package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.js +3 -4
- package/build/features/individual/screens/IndividualPersonalInfo/Gender.d.ts +5 -5
- package/build/features/individual/screens/IndividualPersonalInfo/ID.js +2 -3
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.d.ts +2 -2
- package/build/features/individual/screens/IndividualPersonalInfo/IssuedCountry.js +6 -7
- package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.js +5 -6
- package/build/features/individual/screens/IndividualPersonalInfo/Name.js +2 -3
- package/build/features/individual/screens/IndividualPersonalInfo/Nationality.js +6 -7
- package/build/features/individual/screens/IndividualPhoneInfo/MobileNumber.d.ts +12 -0
- package/build/features/individual/screens/IndividualPhoneInfo/MobileNumber.js +143 -0
- package/build/features/individual/screens/IndividualPhoneInfo/PhoneInfo.d.ts +5 -0
- package/build/features/individual/screens/IndividualPhoneInfo/PhoneInfo.js +60 -0
- package/build/features/individual/screens/IndividualPhoneInfo/index.d.ts +3 -0
- package/build/features/individual/screens/IndividualPhoneInfo/index.js +2 -0
- package/build/features/individual/screens/IndividualPhoneInfo/validation.d.ts +8 -0
- package/build/features/individual/screens/IndividualPhoneInfo/validation.js +31 -0
- package/build/features/individual/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +1 -1
- package/build/features/password/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +1 -1
- package/build/features/shared/Address/CountryList.d.ts +9 -9
- package/build/features/shared/Address/InputSelect.d.ts +9 -9
- package/build/features/shared/Address/InputSelect.js +1 -1
- package/build/features/shared/Button/Button.js +1 -1
- package/build/features/shared/Button/EmailProvidersButtons.d.ts +1 -1
- package/build/features/shared/Button/FlowsButtons.d.ts +1 -1
- package/build/features/shared/Button/FlowsButtons.js +1 -1
- package/build/features/shared/Button/{ListButton.d.ts → IndividualActionButtons.d.ts} +5 -4
- package/build/features/shared/Button/IndividualActionButtons.js +132 -0
- package/build/features/shared/Button/index.d.ts +1 -1
- package/build/features/shared/Button/index.js +1 -1
- package/build/features/shared/Containers/FeatureContainer.d.ts +1 -1
- package/build/features/shared/Containers/ScreenContainer.d.ts +1 -1
- package/build/features/shared/Input/Input.d.ts +3 -3
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +11 -1
- package/build/features/shared/UploadFile/FileUpload.d.ts +29 -0
- package/build/features/shared/UploadFile/FileUpload.js +263 -0
- package/build/features/shared/UploadFile/UploadFile.d.ts +2 -2
- package/build/features/shared/UploadFile/UploadWrapper.d.ts +33 -0
- package/build/features/shared/UploadFile/UploadWrapper.js +114 -0
- package/build/features/shared/UploadFile/index.d.ts +2 -1
- package/build/features/shared/UploadFile/index.js +2 -1
- package/build/features/shared/UploadMultipleFile/UploadFile.d.ts +9 -20
- package/build/features/shared/UploadMultipleFile/UploadFile.js +109 -24
- package/build/features/shared/UploadMultipleFile/UploadMultipleFile.d.ts +6 -4
- package/build/features/shared/UploadMultipleFile/UploadMultipleFile.js +26 -19
- package/build/features/tax/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +1 -1
- package/build/features/tax/screens/TaxDetails/TaxDocument.js +4 -3
- package/build/features/tax/screens/TaxDetails/VATId.js +3 -4
- package/build/index.d.ts +2 -2
- package/build/index.js +4 -3
- package/build/utils/array.d.ts +3 -1
- package/build/utils/array.js +35 -6
- package/package.json +1 -1
- package/build/features/shared/Button/ListButton.js +0 -125
|
@@ -16,16 +16,35 @@ export declare const verifyLeadToken: import("@reduxjs/toolkit").AsyncThunk<{
|
|
|
16
16
|
name: any;
|
|
17
17
|
contact: any;
|
|
18
18
|
individuals: any;
|
|
19
|
+
business: any;
|
|
19
20
|
flows: any;
|
|
20
21
|
};
|
|
21
22
|
salesChannels: any;
|
|
22
23
|
segmentsList: any;
|
|
23
24
|
teamSizeList: any;
|
|
24
25
|
token: string;
|
|
25
|
-
}, VerifyLeadTokenProps, {
|
|
26
|
+
}, VerifyLeadTokenProps, {
|
|
27
|
+
state?: unknown;
|
|
28
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
29
|
+
extra?: unknown;
|
|
30
|
+
rejectValue?: unknown;
|
|
31
|
+
serializedErrorType?: unknown;
|
|
32
|
+
pendingMeta?: unknown;
|
|
33
|
+
fulfilledMeta?: unknown;
|
|
34
|
+
rejectedMeta?: unknown;
|
|
35
|
+
}>;
|
|
26
36
|
export declare const resendOTP: import("@reduxjs/toolkit").AsyncThunk<{
|
|
27
37
|
data: any;
|
|
28
|
-
}, void, {
|
|
38
|
+
}, void, {
|
|
39
|
+
state?: unknown;
|
|
40
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
41
|
+
extra?: unknown;
|
|
42
|
+
rejectValue?: unknown;
|
|
43
|
+
serializedErrorType?: unknown;
|
|
44
|
+
pendingMeta?: unknown;
|
|
45
|
+
fulfilledMeta?: unknown;
|
|
46
|
+
rejectedMeta?: unknown;
|
|
47
|
+
}>;
|
|
29
48
|
export declare const verifyBrandLeadOTP: import("@reduxjs/toolkit").AsyncThunk<{
|
|
30
49
|
data: any;
|
|
31
50
|
boardResponse: {
|
|
@@ -37,16 +56,35 @@ export declare const verifyBrandLeadOTP: import("@reduxjs/toolkit").AsyncThunk<{
|
|
|
37
56
|
name: any;
|
|
38
57
|
contact: any;
|
|
39
58
|
individuals: any;
|
|
59
|
+
business: any;
|
|
40
60
|
flows: any;
|
|
41
61
|
};
|
|
42
62
|
salesChannels: any;
|
|
43
63
|
segmentsList: any;
|
|
44
64
|
teamSizeList: any;
|
|
45
65
|
formData: OTPFormValues;
|
|
46
|
-
}, OTPFormValues, {
|
|
66
|
+
}, OTPFormValues, {
|
|
67
|
+
state?: unknown;
|
|
68
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
69
|
+
extra?: unknown;
|
|
70
|
+
rejectValue?: unknown;
|
|
71
|
+
serializedErrorType?: unknown;
|
|
72
|
+
pendingMeta?: unknown;
|
|
73
|
+
fulfilledMeta?: unknown;
|
|
74
|
+
rejectedMeta?: unknown;
|
|
75
|
+
}>;
|
|
47
76
|
export declare const retrieveBoardDetails: import("@reduxjs/toolkit").AsyncThunk<{
|
|
48
77
|
data: any;
|
|
49
|
-
}, string, {
|
|
78
|
+
}, string, {
|
|
79
|
+
state?: unknown;
|
|
80
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
81
|
+
extra?: unknown;
|
|
82
|
+
rejectValue?: unknown;
|
|
83
|
+
serializedErrorType?: unknown;
|
|
84
|
+
pendingMeta?: unknown;
|
|
85
|
+
fulfilledMeta?: unknown;
|
|
86
|
+
rejectedMeta?: unknown;
|
|
87
|
+
}>;
|
|
50
88
|
export declare const checkBrandNameAvailability: import("@reduxjs/toolkit").AsyncThunk<{
|
|
51
89
|
response: any;
|
|
52
90
|
formData: {
|
|
@@ -56,29 +94,83 @@ export declare const checkBrandNameAvailability: import("@reduxjs/toolkit").Asyn
|
|
|
56
94
|
name: string;
|
|
57
95
|
cancelToken: CancelToken;
|
|
58
96
|
onSuccess?: (() => void) | undefined;
|
|
59
|
-
}, {
|
|
97
|
+
}, {
|
|
98
|
+
state?: unknown;
|
|
99
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
100
|
+
extra?: unknown;
|
|
101
|
+
rejectValue?: unknown;
|
|
102
|
+
serializedErrorType?: unknown;
|
|
103
|
+
pendingMeta?: unknown;
|
|
104
|
+
fulfilledMeta?: unknown;
|
|
105
|
+
rejectedMeta?: unknown;
|
|
106
|
+
}>;
|
|
60
107
|
export declare const updateBrand: import("@reduxjs/toolkit").AsyncThunk<{
|
|
61
108
|
data: any;
|
|
62
109
|
formData: BrandFormValues;
|
|
63
|
-
}, BrandFormValues, {
|
|
110
|
+
}, BrandFormValues, {
|
|
111
|
+
state?: unknown;
|
|
112
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
113
|
+
extra?: unknown;
|
|
114
|
+
rejectValue?: unknown;
|
|
115
|
+
serializedErrorType?: unknown;
|
|
116
|
+
pendingMeta?: unknown;
|
|
117
|
+
fulfilledMeta?: unknown;
|
|
118
|
+
rejectedMeta?: unknown;
|
|
119
|
+
}>;
|
|
64
120
|
export declare const retrieveEntityList: import("@reduxjs/toolkit").AsyncThunk<any, {
|
|
65
121
|
leadId: string;
|
|
66
|
-
}, {
|
|
122
|
+
}, {
|
|
123
|
+
state?: unknown;
|
|
124
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
125
|
+
extra?: unknown;
|
|
126
|
+
rejectValue?: unknown;
|
|
127
|
+
serializedErrorType?: unknown;
|
|
128
|
+
pendingMeta?: unknown;
|
|
129
|
+
fulfilledMeta?: unknown;
|
|
130
|
+
rejectedMeta?: unknown;
|
|
131
|
+
}>;
|
|
67
132
|
export declare const updateBrandActivities: import("@reduxjs/toolkit").AsyncThunk<{
|
|
68
133
|
data: any;
|
|
69
134
|
formData: BrandActivitiesFormValues;
|
|
70
|
-
}, BrandActivitiesFormValues, {
|
|
135
|
+
}, BrandActivitiesFormValues, {
|
|
136
|
+
state?: unknown;
|
|
137
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
138
|
+
extra?: unknown;
|
|
139
|
+
rejectValue?: unknown;
|
|
140
|
+
serializedErrorType?: unknown;
|
|
141
|
+
pendingMeta?: unknown;
|
|
142
|
+
fulfilledMeta?: unknown;
|
|
143
|
+
rejectedMeta?: unknown;
|
|
144
|
+
}>;
|
|
71
145
|
export declare const retrieveDataList: import("@reduxjs/toolkit").AsyncThunk<{
|
|
72
146
|
customerBases: any;
|
|
73
147
|
expectedSales: any;
|
|
74
148
|
expectedCustomerSales: any;
|
|
75
149
|
countryISO2: string;
|
|
76
|
-
}, void, {
|
|
150
|
+
}, void, {
|
|
151
|
+
state?: unknown;
|
|
152
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
153
|
+
extra?: unknown;
|
|
154
|
+
rejectValue?: unknown;
|
|
155
|
+
serializedErrorType?: unknown;
|
|
156
|
+
pendingMeta?: unknown;
|
|
157
|
+
fulfilledMeta?: unknown;
|
|
158
|
+
rejectedMeta?: unknown;
|
|
159
|
+
}>;
|
|
77
160
|
export declare const updateBoardSuccess: import("@reduxjs/toolkit").AsyncThunk<{
|
|
78
161
|
response: any;
|
|
79
162
|
formData: void;
|
|
80
|
-
} | undefined, void, {
|
|
81
|
-
|
|
163
|
+
} | undefined, void, {
|
|
164
|
+
state?: unknown;
|
|
165
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
166
|
+
extra?: unknown;
|
|
167
|
+
rejectValue?: unknown;
|
|
168
|
+
serializedErrorType?: unknown;
|
|
169
|
+
pendingMeta?: unknown;
|
|
170
|
+
fulfilledMeta?: unknown;
|
|
171
|
+
rejectedMeta?: unknown;
|
|
172
|
+
}>;
|
|
173
|
+
type VerifyData = {
|
|
82
174
|
token: string;
|
|
83
175
|
};
|
|
84
176
|
export interface BrandData {
|
|
@@ -97,7 +189,7 @@ export declare const brandSlice: import("@reduxjs/toolkit").Slice<BrandState, {
|
|
|
97
189
|
stopLoader: (state: BrandState) => void;
|
|
98
190
|
resetOTPScreen: (state: BrandState) => void;
|
|
99
191
|
}, "brand/store">;
|
|
100
|
-
export declare const clearError: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<
|
|
192
|
+
export declare const clearError: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"brand/store/clearError">, stopLoader: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"brand/store/stopLoader">, resetOTPScreen: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"brand/store/resetOTPScreen">;
|
|
101
193
|
declare const _default: import("redux").Reducer<BrandState, import("redux").AnyAction>;
|
|
102
194
|
export default _default;
|
|
103
195
|
export declare const brandSelector: (state: RootState) => BrandState;
|
|
@@ -24,7 +24,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
24
24
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
25
25
|
function step(op) {
|
|
26
26
|
if (f) throw new TypeError("Generator is already executing.");
|
|
27
|
-
while (_) try {
|
|
27
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
28
28
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
29
29
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
30
30
|
switch (op[0]) {
|
|
@@ -45,13 +45,24 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
45
45
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
49
|
+
var t = {};
|
|
50
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
51
|
+
t[p] = s[p];
|
|
52
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
53
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
54
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
55
|
+
t[p[i]] = s[p[i]];
|
|
56
|
+
}
|
|
57
|
+
return t;
|
|
58
|
+
};
|
|
48
59
|
var _a;
|
|
49
60
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
50
61
|
import API from '../../../api';
|
|
51
|
-
import {
|
|
62
|
+
import { FlowsTypes } from '../../../@types';
|
|
52
63
|
import { handleNextScreenStep, handleSetCountryByIso2 } from '../../../app/settings';
|
|
53
64
|
import { BRAND_STEP_NAMES } from '../../../constants';
|
|
54
|
-
import { isKW,
|
|
65
|
+
import { isKW, isTwitter, isWebsite, sleep } from '../../../utils';
|
|
55
66
|
export var verifyLeadToken = createAsyncThunk('brandVerifyLeadToken', function (_a, thunkApi) {
|
|
56
67
|
var token = _a.token, isInternally = _a.isInternally;
|
|
57
68
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -114,6 +125,7 @@ export var verifyLeadToken = createAsyncThunk('brandVerifyLeadToken', function (
|
|
|
114
125
|
name: (_c = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _c === void 0 ? void 0 : _c.names,
|
|
115
126
|
contact: (_d = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _d === void 0 ? void 0 : _d.contact,
|
|
116
127
|
individuals: boardData === null || boardData === void 0 ? void 0 : boardData.individuals,
|
|
128
|
+
business: boardData === null || boardData === void 0 ? void 0 : boardData.business,
|
|
117
129
|
flows: (boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) || []
|
|
118
130
|
},
|
|
119
131
|
salesChannels: salesChannels,
|
|
@@ -194,6 +206,7 @@ export var verifyBrandLeadOTP = createAsyncThunk('verifyBrandLeadOTP', function
|
|
|
194
206
|
name: (_f = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _f === void 0 ? void 0 : _f.names,
|
|
195
207
|
contact: (_g = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _g === void 0 ? void 0 : _g.contact,
|
|
196
208
|
individuals: boardData === null || boardData === void 0 ? void 0 : boardData.individuals,
|
|
209
|
+
business: boardData === null || boardData === void 0 ? void 0 : boardData.business,
|
|
197
210
|
flows: (boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) || []
|
|
198
211
|
},
|
|
199
212
|
salesChannels: salesChannels,
|
|
@@ -245,15 +258,15 @@ export var checkBrandNameAvailability = createAsyncThunk('checkBrandNameAvailabi
|
|
|
245
258
|
});
|
|
246
259
|
export var updateBrand = createAsyncThunk('brandUpdateBrand', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
247
260
|
var _a, settings, brand, responseBody, id, isNameEditable, isChannelServicesEditable, salesChannels, brandName, segment, teamSize, segmentId, teamSizeId, getAddress, channel_services, requestBody, brandData, activities, activityList;
|
|
248
|
-
var _b, _c, _d, _e
|
|
249
|
-
return __generator(this, function (
|
|
250
|
-
switch (
|
|
261
|
+
var _b, _c, _d, _e;
|
|
262
|
+
return __generator(this, function (_f) {
|
|
263
|
+
switch (_f.label) {
|
|
251
264
|
case 0:
|
|
252
265
|
_a = thunkApi.getState(), settings = _a.settings, brand = _a.brand;
|
|
253
266
|
responseBody = brand.data.verify.responseBody;
|
|
254
267
|
id = (_b = responseBody === null || responseBody === void 0 ? void 0 : responseBody.brand) === null || _b === void 0 ? void 0 : _b.id;
|
|
255
|
-
isNameEditable =
|
|
256
|
-
isChannelServicesEditable =
|
|
268
|
+
isNameEditable = true;
|
|
269
|
+
isChannelServicesEditable = true;
|
|
257
270
|
salesChannels = params.salesChannels, brandName = params.brandName, segment = params.segment, teamSize = params.teamSize;
|
|
258
271
|
segmentId = segment && { id: segment.id };
|
|
259
272
|
teamSizeId = teamSize && { id: teamSize.id };
|
|
@@ -284,23 +297,23 @@ export var updateBrand = createAsyncThunk('brandUpdateBrand', function (params,
|
|
|
284
297
|
};
|
|
285
298
|
return [4, API.brandService.updateBrandInfo(requestBody)];
|
|
286
299
|
case 1:
|
|
287
|
-
brandData = (
|
|
288
|
-
activities = (((
|
|
300
|
+
brandData = (_f.sent()).brand;
|
|
301
|
+
activities = (((_c = brand.data.verify.responseBody) === null || _c === void 0 ? void 0 : _c.entity) || {}).activities;
|
|
289
302
|
return [4, thunkApi.dispatch(retrieveDataList())];
|
|
290
303
|
case 2:
|
|
291
|
-
|
|
304
|
+
_f.sent();
|
|
292
305
|
if (activities) {
|
|
293
|
-
brandData = __assign(__assign({}, brandData), {
|
|
306
|
+
brandData = __assign(__assign({}, brandData), { entity_activities: activities || {} });
|
|
294
307
|
}
|
|
295
308
|
if (!!activities) return [3, 4];
|
|
296
309
|
return [4, API.dataService.getActivities()];
|
|
297
310
|
case 3:
|
|
298
|
-
activityList = (
|
|
299
|
-
brandData = __assign(__assign({}, brandData), {
|
|
300
|
-
|
|
311
|
+
activityList = (_f.sent()).list;
|
|
312
|
+
brandData = __assign(__assign({}, brandData), { entity_activities: activityList || {} });
|
|
313
|
+
_f.label = 4;
|
|
301
314
|
case 4:
|
|
302
315
|
thunkApi.dispatch(handleNextScreenStep());
|
|
303
|
-
(
|
|
316
|
+
(_e = (_d = settings.data.appConfig).onStepCompleted) === null || _e === void 0 ? void 0 : _e.call(_d, settings.data.activeScreen.name, id);
|
|
304
317
|
return [2, { data: __assign({}, brandData), formData: params }];
|
|
305
318
|
}
|
|
306
319
|
});
|
|
@@ -317,44 +330,40 @@ export var retrieveEntityList = createAsyncThunk('retrieveEntityList', function
|
|
|
317
330
|
});
|
|
318
331
|
}); });
|
|
319
332
|
export var updateBrandActivities = createAsyncThunk('brandUpdateBrandActivities', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
320
|
-
var _a, settings, brand, brandResponse, id, isActivitiesEditable, isCustomerLocationEditable, isSalesRangeEditable, activities, customerLocations, expectedCustomer, expectedSale,
|
|
321
|
-
var _b, _c
|
|
322
|
-
return __generator(this, function (
|
|
323
|
-
switch (
|
|
333
|
+
var _a, settings, brand, brandResponse, id, isActivitiesEditable, isCustomerLocationEditable, isSalesRangeEditable, activities, customerLocations, expectedCustomer, expectedSale, requestBody, customerLocation, customerBaseId, salesId, customerBase, brandData;
|
|
334
|
+
var _b, _c;
|
|
335
|
+
return __generator(this, function (_d) {
|
|
336
|
+
switch (_d.label) {
|
|
324
337
|
case 0:
|
|
325
338
|
_a = thunkApi.getState(), settings = _a.settings, brand = _a.brand;
|
|
326
339
|
brandResponse = (brand.data.verify.responseBody || {}).brand;
|
|
327
340
|
id = brandResponse === null || brandResponse === void 0 ? void 0 : brandResponse.id;
|
|
328
|
-
isActivitiesEditable =
|
|
329
|
-
isCustomerLocationEditable =
|
|
330
|
-
isSalesRangeEditable =
|
|
341
|
+
isActivitiesEditable = true;
|
|
342
|
+
isCustomerLocationEditable = true;
|
|
343
|
+
isSalesRangeEditable = true;
|
|
331
344
|
activities = params.activities, customerLocations = params.customerLocations, expectedCustomer = params.expectedCustomer, expectedSale = params.expectedSale;
|
|
332
|
-
customerLocation = isCustomerLocationEditable
|
|
333
|
-
? customerLocations.map(function (location) { return ({
|
|
334
|
-
id: location === null || location === void 0 ? void 0 : location.id
|
|
335
|
-
}); })
|
|
336
|
-
: undefined;
|
|
337
|
-
customerBase = { id: (expectedCustomer === null || expectedCustomer === void 0 ? void 0 : expectedCustomer.id) || '', period: 'monthly', locations: customerLocation };
|
|
338
|
-
sales = isSalesRangeEditable ? { id: (expectedSale === null || expectedSale === void 0 ? void 0 : expectedSale.id) || '', period: 'monthly' } : undefined;
|
|
339
|
-
stepName = BRAND_STEP_NAMES.BRAND_ACTIVITIES;
|
|
340
345
|
requestBody = {
|
|
341
346
|
id: id,
|
|
342
|
-
activities: isActivitiesEditable
|
|
343
|
-
operations: {
|
|
344
|
-
customer_base: customerBase,
|
|
345
|
-
sales: sales
|
|
346
|
-
},
|
|
347
|
+
activities: isActivitiesEditable && activities,
|
|
347
348
|
term: ['general', 'refund', 'chargeback'],
|
|
348
|
-
step_name:
|
|
349
|
+
step_name: BRAND_STEP_NAMES.BRAND_ACTIVITIES
|
|
349
350
|
};
|
|
351
|
+
customerLocation = customerLocations.map(function (location) { return ({
|
|
352
|
+
id: location.id
|
|
353
|
+
}); });
|
|
354
|
+
customerBaseId = (expectedCustomer === null || expectedCustomer === void 0 ? void 0 : expectedCustomer.id) && { id: expectedCustomer.id, period: 'monthly' };
|
|
355
|
+
salesId = (expectedSale === null || expectedSale === void 0 ? void 0 : expectedSale.id) && { id: expectedSale.id, period: 'monthly' };
|
|
356
|
+
customerBase = (customerBaseId || customerLocation.length) && __assign(__assign({}, (customerBaseId && { id: expectedCustomer.id, period: 'monthly' })), (customerLocation.length && { locations: customerLocation }));
|
|
357
|
+
if (customerBase)
|
|
358
|
+
requestBody = __assign(__assign({}, requestBody), { operations: __assign(__assign({}, requestBody.operations), { customer_base: customerBase }) });
|
|
359
|
+
if (salesId && isSalesRangeEditable) {
|
|
360
|
+
requestBody = __assign(__assign({}, requestBody), { operations: __assign(__assign({}, requestBody.operations), { sales: salesId }) });
|
|
361
|
+
}
|
|
350
362
|
return [4, API.brandService.updateBrandInfo(requestBody)];
|
|
351
363
|
case 1:
|
|
352
|
-
brandData = (
|
|
353
|
-
return [4, thunkApi.dispatch(retrieveDataList())];
|
|
354
|
-
case 2:
|
|
355
|
-
_j.sent();
|
|
364
|
+
brandData = (_d.sent()).data;
|
|
356
365
|
thunkApi.dispatch(handleNextScreenStep());
|
|
357
|
-
(
|
|
366
|
+
(_c = (_b = settings.data.appConfig).onStepCompleted) === null || _c === void 0 ? void 0 : _c.call(_b, settings.data.activeScreen.name, id);
|
|
358
367
|
return [2, { data: __assign({}, brandData), formData: params }];
|
|
359
368
|
}
|
|
360
369
|
});
|
|
@@ -410,7 +419,7 @@ export var updateBoardSuccess = createAsyncThunk('updateBoardBrandSuccess', func
|
|
|
410
419
|
return [4, API.boardService.retrieveBoardInfoStatus(id)];
|
|
411
420
|
case 2:
|
|
412
421
|
boardInfoData = _g.sent();
|
|
413
|
-
return [4, thunkApi.dispatch(retrieveBoardDetails(id))];
|
|
422
|
+
return [4, thunkApi.dispatch(retrieveBoardDetails(id)).unwrap()];
|
|
414
423
|
case 3:
|
|
415
424
|
_g.sent();
|
|
416
425
|
(_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, {});
|
|
@@ -579,14 +588,20 @@ export var brandSlice = createSlice({
|
|
|
579
588
|
state.loading = false;
|
|
580
589
|
state.error = null;
|
|
581
590
|
var _a = action.payload, data = _a.data, formData = _a.formData;
|
|
582
|
-
var
|
|
583
|
-
var
|
|
584
|
-
var selectedActivity = activities === null || activities === void 0 ? void 0 : activities.filter(function (activity) {
|
|
585
|
-
var activities = (brand || {}).activities;
|
|
591
|
+
var entity_activities = data.entity_activities, activities = data.activities, operations = data.operations;
|
|
592
|
+
var selectedActivity = entity_activities === null || entity_activities === void 0 ? void 0 : entity_activities.filter(function (activity) {
|
|
586
593
|
return activities === null || activities === void 0 ? void 0 : activities.find(function (value) { return activity.id === value.id; });
|
|
587
594
|
});
|
|
588
595
|
state.data.brandData = formData;
|
|
589
596
|
state.data.brandActivities.activities = (selectedActivity === null || selectedActivity === void 0 ? void 0 : selectedActivity.length) > 0 ? selectedActivity : [];
|
|
597
|
+
var _b = operations || {}, customer_base = _b.customer_base, sales = _b.sales;
|
|
598
|
+
var _c = customer_base || {}, locations = _c.locations, customerBase = __rest(_c, ["locations"]);
|
|
599
|
+
if (locations && locations.length)
|
|
600
|
+
state.data.brandActivities.customerLocations = locations;
|
|
601
|
+
if (!!sales)
|
|
602
|
+
state.data.brandActivities.expectedSale = sales;
|
|
603
|
+
if (!!customerBase)
|
|
604
|
+
state.data.brandActivities.expectedCustomer = customerBase;
|
|
590
605
|
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { activities: data === null || data === void 0 ? void 0 : data.brand_activities });
|
|
591
606
|
})
|
|
592
607
|
.addCase(updateBrandActivities.rejected, function (state, action) {
|
|
@@ -610,23 +625,13 @@ export var brandSlice = createSlice({
|
|
|
610
625
|
state.error = null;
|
|
611
626
|
})
|
|
612
627
|
.addCase(retrieveDataList.fulfilled, function (state, action) {
|
|
613
|
-
var _a, _b;
|
|
614
628
|
state.loading = false;
|
|
615
629
|
state.error = null;
|
|
616
|
-
var
|
|
617
|
-
var regional = customerBases.at(1);
|
|
630
|
+
var _a = action.payload, customerBases = _a.customerBases, expectedSales = _a.expectedSales, expectedCustomerSales = _a.expectedCustomerSales, countryISO2 = _a.countryISO2;
|
|
618
631
|
var local = customerBases.at(0);
|
|
619
|
-
var expectedSale = (_b = (_a = expectedSales.at(0)) === null || _a === void 0 ? void 0 : _a.sub) === null || _b === void 0 ? void 0 : _b.at(4);
|
|
620
|
-
var expectedCustomerSale = expectedCustomerSales.at(3);
|
|
621
|
-
state.data.brandActivities.responseBody = __assign(__assign({}, state.data.brandActivities.responseBody), { customerBases: customerBases, expectedSales: expectedSales, expectedCustomerSales: expectedCustomerSales });
|
|
622
632
|
if (local && isKW(countryISO2))
|
|
623
633
|
state.data.brandActivities.customerLocations = [local];
|
|
624
|
-
|
|
625
|
-
state.data.brandActivities.customerLocations = [regional, local];
|
|
626
|
-
if (!!expectedSale)
|
|
627
|
-
state.data.brandActivities.expectedSale = expectedSale;
|
|
628
|
-
if (!!expectedCustomerSale)
|
|
629
|
-
state.data.brandActivities.expectedCustomer = expectedCustomerSale;
|
|
634
|
+
state.data.brandActivities.responseBody = __assign(__assign({}, state.data.brandActivities.responseBody), { customerBases: customerBases, expectedSales: expectedSales, expectedCustomerSales: expectedCustomerSales });
|
|
630
635
|
})
|
|
631
636
|
.addCase(retrieveDataList.rejected, function (state, action) {
|
|
632
637
|
state.loading = false;
|
|
@@ -650,13 +655,7 @@ export var brandSlice = createSlice({
|
|
|
650
655
|
var _a;
|
|
651
656
|
state.loading = false;
|
|
652
657
|
state.error = null;
|
|
653
|
-
var
|
|
654
|
-
var description = (((_a = response === null || response === void 0 ? void 0 : response.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
|
|
655
|
-
if (description) {
|
|
656
|
-
state.error = description;
|
|
657
|
-
return;
|
|
658
|
-
}
|
|
659
|
-
var flows = response.flows;
|
|
658
|
+
var flows = (((_a = action.payload) === null || _a === void 0 ? void 0 : _a.response) || {}).flows;
|
|
660
659
|
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { flows: flows });
|
|
661
660
|
})
|
|
662
661
|
.addCase(updateBoardSuccess.pending, function (state) {
|