@tap-payments/auth-jsconnect 2.6.2-test → 2.6.4-test
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 +84 -0
- package/build/@types/form.d.ts +7 -1
- package/build/api/entity.d.ts +3 -0
- package/build/api/entity.js +32 -1
- package/build/api/index.d.ts +6 -2
- package/build/api/operator.d.ts +5 -0
- package/build/api/operator.js +21 -1
- package/build/app/settings.d.ts +5 -1
- package/build/app/settings.js +43 -4
- package/build/assets/locales/ar.json +12 -1
- package/build/assets/locales/en.json +12 -1
- package/build/components/SimpleList/SimpleList.js +1 -1
- package/build/constants/api.d.ts +2 -0
- package/build/constants/api.js +5 -1
- package/build/constants/app.d.ts +1 -0
- package/build/constants/app.js +14 -2
- package/build/features/app/bank/bankStore.d.ts +1 -0
- package/build/features/app/bank/bankStore.js +28 -1
- package/build/features/app/brand/brandStore.d.ts +1 -0
- package/build/features/app/brand/brandStore.js +28 -1
- package/build/features/app/connectExpress/connectExpressStore.d.ts +15 -4
- package/build/features/app/connectExpress/connectExpressStore.js +248 -30
- package/build/features/app/entity/entityStore.d.ts +1 -0
- package/build/features/app/entity/entityStore.js +28 -1
- package/build/features/app/individual/individualStore.d.ts +1 -0
- package/build/features/app/individual/individualStore.js +28 -1
- package/build/features/app/password/passwordStore.d.ts +1 -0
- package/build/features/app/password/passwordStore.js +28 -1
- package/build/features/app/tax/taxStore.d.ts +1 -0
- package/build/features/app/tax/taxStore.js +28 -1
- package/build/features/bank/Bank.d.ts +1 -0
- package/build/features/bank/Bank.js +4 -4
- package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +14 -5
- package/build/features/brand/Brand.d.ts +1 -0
- package/build/features/brand/Brand.js +4 -4
- package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +14 -5
- package/build/features/connectExpress/ConnectExpress.d.ts +0 -1
- package/build/features/connectExpress/ConnectExpress.js +6 -9
- package/build/features/connectExpress/screens/AuthenticationList/AuthenticationList.d.ts +5 -0
- package/build/features/connectExpress/screens/AuthenticationList/AuthenticationList.js +93 -0
- package/build/features/connectExpress/screens/AuthenticationList/BrandList.d.ts +10 -0
- package/build/features/connectExpress/screens/AuthenticationList/BrandList.js +81 -0
- package/build/features/connectExpress/screens/AuthenticationList/EntityList.d.ts +11 -0
- package/build/features/connectExpress/screens/AuthenticationList/EntityList.js +96 -0
- package/build/features/connectExpress/screens/AuthenticationList/MerchantList.d.ts +10 -0
- package/build/features/connectExpress/screens/AuthenticationList/MerchantList.js +100 -0
- package/build/features/connectExpress/screens/AuthenticationList/TerminalList.d.ts +10 -0
- package/build/features/connectExpress/screens/AuthenticationList/TerminalList.js +101 -0
- package/build/features/connectExpress/screens/AuthenticationList/index.d.ts +3 -0
- package/build/features/connectExpress/screens/AuthenticationList/index.js +2 -0
- package/build/features/connectExpress/screens/AuthenticationList/validation.d.ts +17 -0
- package/build/features/connectExpress/screens/AuthenticationList/validation.js +9 -0
- package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +15 -6
- package/build/features/entity/Entity.d.ts +1 -0
- package/build/features/entity/Entity.js +4 -4
- package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +14 -5
- package/build/features/featuresScreens.js +5 -0
- package/build/features/individual/Individual.d.ts +1 -0
- package/build/features/individual/Individual.js +4 -4
- package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +14 -5
- package/build/features/password/Password.d.ts +1 -0
- package/build/features/password/Password.js +16 -4
- package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +14 -5
- package/build/features/shared/Button/FlowsButtons.d.ts +3 -1
- package/build/features/shared/Button/FlowsButtons.js +14 -11
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.d.ts +3 -1
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +2 -2
- package/build/features/tax/Tax.d.ts +1 -0
- package/build/features/tax/Tax.js +4 -4
- package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +14 -5
- package/build/hooks/useAppConfig.js +4 -3
- package/package.json +1 -1
package/build/@types/app.d.ts
CHANGED
|
@@ -116,6 +116,10 @@ export interface License {
|
|
|
116
116
|
export interface EntityLicense extends License {
|
|
117
117
|
id: string;
|
|
118
118
|
}
|
|
119
|
+
export interface EntityLicenseAuth extends EntityLicense {
|
|
120
|
+
id: string;
|
|
121
|
+
country: string;
|
|
122
|
+
}
|
|
119
123
|
export interface Activity {
|
|
120
124
|
id: string;
|
|
121
125
|
name: {
|
|
@@ -212,6 +216,10 @@ export interface LibConfig extends LibCallbacks {
|
|
|
212
216
|
appInfo: AppInfo;
|
|
213
217
|
businessCountryCode: string;
|
|
214
218
|
scope: string;
|
|
219
|
+
postURL?: string;
|
|
220
|
+
redirectUrl?: string;
|
|
221
|
+
data?: Array<string>;
|
|
222
|
+
authId?: string;
|
|
215
223
|
boardMaturity?: boolean;
|
|
216
224
|
}
|
|
217
225
|
export interface OSDetails {
|
|
@@ -640,9 +648,85 @@ export declare type ConfigExpressTokenParams = {
|
|
|
640
648
|
};
|
|
641
649
|
lead_id: string;
|
|
642
650
|
board: boolean;
|
|
651
|
+
platform_redirect_url: string;
|
|
652
|
+
data: Array<string>;
|
|
643
653
|
};
|
|
644
654
|
export declare enum MerchantStatus {
|
|
645
655
|
DISABLED = "disabled",
|
|
646
656
|
ENABLED = "enabled"
|
|
647
657
|
}
|
|
658
|
+
export interface AuthMerchantInfo {
|
|
659
|
+
id: string;
|
|
660
|
+
status: string;
|
|
661
|
+
created: number;
|
|
662
|
+
display_name: string;
|
|
663
|
+
business_id: string;
|
|
664
|
+
business_entity_id: string;
|
|
665
|
+
brand_id: string;
|
|
666
|
+
wallet_id: string;
|
|
667
|
+
base_currency: string;
|
|
668
|
+
charge_currenices: string[];
|
|
669
|
+
country: string;
|
|
670
|
+
is_acceptance_allowed: boolean;
|
|
671
|
+
is_payout_allowed: boolean;
|
|
672
|
+
legacy_id: string;
|
|
673
|
+
marketplace: boolean;
|
|
674
|
+
post: {
|
|
675
|
+
url: string;
|
|
676
|
+
};
|
|
677
|
+
metadata: {
|
|
678
|
+
MerchantRefrenceId: string;
|
|
679
|
+
};
|
|
680
|
+
terminal_id: string;
|
|
681
|
+
acceptance_status: string;
|
|
682
|
+
payout_status: string;
|
|
683
|
+
}
|
|
684
|
+
export interface AuthTerminalInfo {
|
|
685
|
+
id: string;
|
|
686
|
+
object: string;
|
|
687
|
+
live_mode: boolean;
|
|
688
|
+
api_version: string;
|
|
689
|
+
feature_version: string;
|
|
690
|
+
name: TerminalName;
|
|
691
|
+
merchant: TerminalMerchant;
|
|
692
|
+
authorizes: TerminalAuthorizes;
|
|
693
|
+
charges: TerminalAuthorizes;
|
|
694
|
+
refunds: TerminalAuthorizes;
|
|
695
|
+
wallet: TerminalWallet;
|
|
696
|
+
virtual: boolean;
|
|
697
|
+
operator: TerminalOperator;
|
|
698
|
+
acceptance_status: string;
|
|
699
|
+
data_status: TerminalDataStatus;
|
|
700
|
+
data_verification: TerminalDataStatus;
|
|
701
|
+
data_state: string;
|
|
702
|
+
brand: TerminalWallet;
|
|
703
|
+
}
|
|
704
|
+
interface TerminalDataStatus {
|
|
705
|
+
name: TerminalName;
|
|
706
|
+
charge_last_transaction: string;
|
|
707
|
+
charge_flag: string;
|
|
708
|
+
authorize_last_transaction: string;
|
|
709
|
+
refund_last_transaction: string;
|
|
710
|
+
acceptance_status: string;
|
|
711
|
+
}
|
|
712
|
+
interface TerminalName {
|
|
713
|
+
ar: string;
|
|
714
|
+
en: string;
|
|
715
|
+
}
|
|
716
|
+
interface TerminalWallet {
|
|
717
|
+
id: string;
|
|
718
|
+
}
|
|
719
|
+
interface TerminalOperator {
|
|
720
|
+
id: string;
|
|
721
|
+
is_merchant: boolean;
|
|
722
|
+
}
|
|
723
|
+
interface TerminalMerchant {
|
|
724
|
+
id: string;
|
|
725
|
+
base_currency: string;
|
|
726
|
+
country: string;
|
|
727
|
+
}
|
|
728
|
+
interface TerminalAuthorizes {
|
|
729
|
+
status: string;
|
|
730
|
+
status_message: string;
|
|
731
|
+
}
|
|
648
732
|
export {};
|
package/build/@types/form.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Activity, BrandInfo, CountryCode, CustomerLocation, ExpectedCustomer, ExpectedSaleRange, License, MonthlyIncome, Occupation, SaleChannel, Segment, SourceOfIncome, TeamSize, City, EntityLicense } from './app';
|
|
1
|
+
import { Activity, BrandInfo, CountryCode, CustomerLocation, ExpectedCustomer, ExpectedSaleRange, License, MonthlyIncome, Occupation, SaleChannel, Segment, SourceOfIncome, TeamSize, City, EntityLicense, EntityLicenseAuth, AuthMerchantInfo, AuthTerminalInfo } from './app';
|
|
2
2
|
export declare type MobileFormValues = {
|
|
3
3
|
mobile: string;
|
|
4
4
|
countryCode: CountryCode;
|
|
@@ -143,3 +143,9 @@ export declare type BusinessDataFormValues = {
|
|
|
143
143
|
selectedLicense?: License;
|
|
144
144
|
termAndConditionChecked?: boolean;
|
|
145
145
|
};
|
|
146
|
+
export declare type AuthenticationListFormValues = {
|
|
147
|
+
brandInfo?: BrandInfo;
|
|
148
|
+
entityInfo?: EntityLicenseAuth;
|
|
149
|
+
merchantInfo?: AuthMerchantInfo;
|
|
150
|
+
terminalInfo?: AuthTerminalInfo;
|
|
151
|
+
};
|
package/build/api/entity.d.ts
CHANGED
|
@@ -129,5 +129,8 @@ declare const entityService: {
|
|
|
129
129
|
updateEntityAOAFile: ({ id, ...data }: UpdateEntityAOAFileBody) => Promise<any>;
|
|
130
130
|
retrieveAllEntities: (id: string) => Promise<any>;
|
|
131
131
|
removeEntityActivities: ({ id, ...data }: RemoveEntityActivity) => Promise<any>;
|
|
132
|
+
getEntityListUsingIndividualId: (individualId: string) => Promise<any>;
|
|
133
|
+
getMerchantListUsingEntityId: (entityId: string) => Promise<any>;
|
|
134
|
+
getTerminalListUsingMerchantId: (merchantId: string) => Promise<any>;
|
|
132
135
|
};
|
|
133
136
|
export { entityService };
|
package/build/api/entity.js
CHANGED
|
@@ -97,6 +97,34 @@ var removeEntityActivities = function (_a) {
|
|
|
97
97
|
data: data
|
|
98
98
|
});
|
|
99
99
|
};
|
|
100
|
+
var getEntityListUsingIndividualId = function (individualId) {
|
|
101
|
+
return httpClient({
|
|
102
|
+
method: 'post',
|
|
103
|
+
url: "".concat(ENDPOINT_PATHS.ENTITY, "/list"),
|
|
104
|
+
data: {
|
|
105
|
+
individual_id: individualId
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
};
|
|
109
|
+
var getMerchantListUsingEntityId = function (entityId) {
|
|
110
|
+
return httpClient({
|
|
111
|
+
method: 'post',
|
|
112
|
+
url: "".concat(ENDPOINT_PATHS.MERCHANT, "/list"),
|
|
113
|
+
data: {
|
|
114
|
+
create_if_not_present: true,
|
|
115
|
+
business_entity_id: entityId
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
};
|
|
119
|
+
var getTerminalListUsingMerchantId = function (merchantId) {
|
|
120
|
+
return httpClient({
|
|
121
|
+
method: 'post',
|
|
122
|
+
url: "".concat(ENDPOINT_PATHS.TERMINAL, "/list"),
|
|
123
|
+
data: {
|
|
124
|
+
merchant_id: [merchantId]
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
};
|
|
100
128
|
var entityService = {
|
|
101
129
|
createEntityInfo: createEntityInfo,
|
|
102
130
|
updateEntityInfo: updateEntityInfo,
|
|
@@ -111,6 +139,9 @@ var entityService = {
|
|
|
111
139
|
updateEntityCapital: updateEntityCapital,
|
|
112
140
|
updateEntityAOAFile: updateEntityAOAFile,
|
|
113
141
|
retrieveAllEntities: retrieveAllEntities,
|
|
114
|
-
removeEntityActivities: removeEntityActivities
|
|
142
|
+
removeEntityActivities: removeEntityActivities,
|
|
143
|
+
getEntityListUsingIndividualId: getEntityListUsingIndividualId,
|
|
144
|
+
getMerchantListUsingEntityId: getMerchantListUsingEntityId,
|
|
145
|
+
getTerminalListUsingMerchantId: getTerminalListUsingMerchantId
|
|
115
146
|
};
|
|
116
147
|
export { entityService };
|
package/build/api/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import axiosInstance, { setAxiosGlobalHeaders, removeAxiosGlobalHeaders, getAxiosHeaders } from './axios';
|
|
2
|
-
import { ValidateOperatorBody } from './operator';
|
|
2
|
+
import { ValidateOperatorBody, UpdateOperatorBody } from './operator';
|
|
3
3
|
import { CreateAuthBody, VerifyAuthBody, CreatePasswordBody, VerifyOperationAuthBody, ResetPasswordVerifyAuthBody, VerifyAuthExpressOTPBody } from './auth';
|
|
4
4
|
import { UpdateLeadBody, LeadVerifyBody, CreateLeadBody, LeadOTPVerifyBody, LeadIdentityUpdateBody, ExpressLeadVerifyBody } from './lead';
|
|
5
5
|
import { CheckEmailBody, CheckBrandBody } from './availabilityServices';
|
|
@@ -20,6 +20,7 @@ declare const API: {
|
|
|
20
20
|
};
|
|
21
21
|
operatorService: {
|
|
22
22
|
validateOperator: (body: ValidateOperatorBody) => Promise<any>;
|
|
23
|
+
updateOperator: ({ id, ...data }: UpdateOperatorBody) => Promise<any>;
|
|
23
24
|
};
|
|
24
25
|
countryService: {
|
|
25
26
|
getCountries: (disableCountries?: boolean | undefined) => Promise<any> | {
|
|
@@ -66,6 +67,9 @@ declare const API: {
|
|
|
66
67
|
updateEntityAOAFile: ({ id, ...data }: UpdateEntityAOAFileBody) => Promise<any>;
|
|
67
68
|
retrieveAllEntities: (id: string) => Promise<any>;
|
|
68
69
|
removeEntityActivities: ({ id, ...data }: RemoveEntityActivity) => Promise<any>;
|
|
70
|
+
getEntityListUsingIndividualId: (individualId: string) => Promise<any>;
|
|
71
|
+
getMerchantListUsingEntityId: (entityId: string) => Promise<any>;
|
|
72
|
+
getTerminalListUsingMerchantId: (merchantId: string) => Promise<any>;
|
|
69
73
|
};
|
|
70
74
|
availabilityServices: {
|
|
71
75
|
checkEmail: (data: CheckEmailBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
@@ -165,6 +169,6 @@ declare const API: {
|
|
|
165
169
|
getInitialData: (body: InitBody) => Promise<any>;
|
|
166
170
|
};
|
|
167
171
|
};
|
|
168
|
-
export type { ValidateOperatorBody, CreateAuthBody, ExpressCreateAccountBody, VerifyAuthBody, CreateLeadBody, UpdateLeadBody, LeadVerifyBody, LeadOTPVerifyBody, CheckEmailBody, CheckBrandBody, LeadIdentityUpdateBody, EntityInfoBody, CreateAccountBody, EntityBankUpdateBody, CreatePasswordBody, BrandListBody, VerifyOperationAuthBody, ResetPasswordVerifyAuthBody, UpdateBoardBody, UpdateBrandBody, DataElementBody, UploadFileBody, UpdateEntityBody, DocumentUpdateBody, DocumentInfo, VerifyAuthExpressOTPBody, UpdateIndividualBody, UpdateEntityActivityBody, UpdateEntityCapitalBody, BankDocumentInfo, GetUserListBody, GetIndividualListBody, RequestEmailBody, DocumentBody, UpdateEntityAOAFileBody, InitBody, RemoveBrandActivity, RemoveEntityActivity, UpdateIndividualWithTypeBody, UpdateMultipleIndividualBody, ExpressLeadVerifyBody };
|
|
172
|
+
export type { ValidateOperatorBody, CreateAuthBody, ExpressCreateAccountBody, VerifyAuthBody, CreateLeadBody, UpdateLeadBody, LeadVerifyBody, LeadOTPVerifyBody, CheckEmailBody, CheckBrandBody, LeadIdentityUpdateBody, EntityInfoBody, CreateAccountBody, EntityBankUpdateBody, CreatePasswordBody, BrandListBody, VerifyOperationAuthBody, ResetPasswordVerifyAuthBody, UpdateBoardBody, UpdateBrandBody, DataElementBody, UploadFileBody, UpdateEntityBody, DocumentUpdateBody, DocumentInfo, VerifyAuthExpressOTPBody, UpdateIndividualBody, UpdateEntityActivityBody, UpdateEntityCapitalBody, BankDocumentInfo, GetUserListBody, GetIndividualListBody, RequestEmailBody, DocumentBody, UpdateEntityAOAFileBody, InitBody, RemoveBrandActivity, RemoveEntityActivity, UpdateIndividualWithTypeBody, UpdateMultipleIndividualBody, ExpressLeadVerifyBody, UpdateOperatorBody };
|
|
169
173
|
export { setAxiosGlobalHeaders, removeAxiosGlobalHeaders, axiosInstance, getAxiosHeaders };
|
|
170
174
|
export default API;
|
package/build/api/operator.d.ts
CHANGED
|
@@ -6,7 +6,12 @@ export declare type ValidateOperatorBody = {
|
|
|
6
6
|
locale: string;
|
|
7
7
|
connect_pkey?: string;
|
|
8
8
|
};
|
|
9
|
+
export declare type UpdateOperatorBody = {
|
|
10
|
+
id: string;
|
|
11
|
+
post_url: string;
|
|
12
|
+
};
|
|
9
13
|
declare const operatorService: {
|
|
10
14
|
validateOperator: (body: ValidateOperatorBody) => Promise<any>;
|
|
15
|
+
updateOperator: ({ id, ...data }: UpdateOperatorBody) => Promise<any>;
|
|
11
16
|
};
|
|
12
17
|
export { operatorService };
|
package/build/api/operator.js
CHANGED
|
@@ -34,6 +34,17 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
34
34
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
38
|
+
var t = {};
|
|
39
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
40
|
+
t[p] = s[p];
|
|
41
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
42
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
43
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
44
|
+
t[p[i]] = s[p[i]];
|
|
45
|
+
}
|
|
46
|
+
return t;
|
|
47
|
+
};
|
|
37
48
|
import { ENDPOINT_PATHS } from '../constants';
|
|
38
49
|
import { httpClient } from './axios';
|
|
39
50
|
var validateOperator = function (body) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -59,7 +70,16 @@ var validateOperator = function (body) { return __awaiter(void 0, void 0, void 0
|
|
|
59
70
|
}
|
|
60
71
|
});
|
|
61
72
|
}); };
|
|
73
|
+
var updateOperator = function (_a) {
|
|
74
|
+
var id = _a.id, data = __rest(_a, ["id"]);
|
|
75
|
+
return httpClient({
|
|
76
|
+
method: 'put',
|
|
77
|
+
url: "".concat(ENDPOINT_PATHS.OPERATOR, "/").concat(id),
|
|
78
|
+
data: data
|
|
79
|
+
});
|
|
80
|
+
};
|
|
62
81
|
var operatorService = {
|
|
63
|
-
validateOperator: validateOperator
|
|
82
|
+
validateOperator: validateOperator,
|
|
83
|
+
updateOperator: updateOperator
|
|
64
84
|
};
|
|
65
85
|
export { operatorService };
|
package/build/app/settings.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ interface SettingParams {
|
|
|
9
9
|
onVerifyConfigTokenSuccess?: (data: ConfigExpressTokenParams) => Promise<void>;
|
|
10
10
|
}
|
|
11
11
|
export declare const fetchAppSettingsSync: import("@reduxjs/toolkit").AsyncThunk<any, SettingParams, {}>;
|
|
12
|
+
export declare const onCloseComplete: import("@reduxjs/toolkit").AsyncThunk<void, string, {}>;
|
|
12
13
|
export interface SettingsData {
|
|
13
14
|
skin: ThemeMode;
|
|
14
15
|
language: LanguageMode;
|
|
@@ -27,8 +28,11 @@ export interface SettingsData {
|
|
|
27
28
|
isHijri: boolean;
|
|
28
29
|
}
|
|
29
30
|
export interface SettingsState extends SharedState<SettingsData> {
|
|
31
|
+
internalLoading: boolean;
|
|
30
32
|
}
|
|
31
33
|
export declare const settingsSlice: import("@reduxjs/toolkit").Slice<SettingsState, {
|
|
34
|
+
storeAuthId: (state: import("immer/dist/internal").WritableDraft<SettingsState>, action: ActionState<string>) => void;
|
|
35
|
+
updateInternalLoading: (state: import("immer/dist/internal").WritableDraft<SettingsState>, action: ActionState<boolean>) => void;
|
|
32
36
|
handelBoardMaturity: (state: import("immer/dist/internal").WritableDraft<SettingsState>, action: ActionState<boolean>) => void;
|
|
33
37
|
handleIsTapOrigin: (state: import("immer/dist/internal").WritableDraft<SettingsState>, action: ActionState<boolean>) => void;
|
|
34
38
|
handleOpen: (state: import("immer/dist/internal").WritableDraft<SettingsState>, action: ActionState<boolean>) => void;
|
|
@@ -43,7 +47,7 @@ export declare const settingsSlice: import("@reduxjs/toolkit").Slice<SettingsSta
|
|
|
43
47
|
handleSetAppConfig: (state: SettingsState, action: ActionState<LibConfig>) => void;
|
|
44
48
|
handleSetCountryByIso2: (state: SettingsState, action: ActionState<string>) => void;
|
|
45
49
|
}, "settings">;
|
|
46
|
-
export declare const handleSkin: import("@reduxjs/toolkit").ActionCreatorWithPayload<ThemeMode, string>, handleLanguage: import("@reduxjs/toolkit").ActionCreatorWithPayload<LanguageMode, string>, handleActiveFlowScreens: import("@reduxjs/toolkit").ActionCreatorWithPayload<ScreenStepNavigation[], string>, handleNextScreenStep: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<string | undefined, string>, handlePrevScreenStep: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<string | undefined, string>, handleCurrentActiveScreen: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, string>, handleSetAppConfig: import("@reduxjs/toolkit").ActionCreatorWithPayload<LibConfig, string>, handleOpen: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>, handleSetCountryByIso2: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, string>, handleIsTapOrigin: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>, handelBoardMaturity: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>, handlePublicKey: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, string>, handleSwitchCalender: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>;
|
|
50
|
+
export declare const storeAuthId: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, string>, updateInternalLoading: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>, handleSkin: import("@reduxjs/toolkit").ActionCreatorWithPayload<ThemeMode, string>, handleLanguage: import("@reduxjs/toolkit").ActionCreatorWithPayload<LanguageMode, string>, handleActiveFlowScreens: import("@reduxjs/toolkit").ActionCreatorWithPayload<ScreenStepNavigation[], string>, handleNextScreenStep: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<string | undefined, string>, handlePrevScreenStep: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<string | undefined, string>, handleCurrentActiveScreen: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, string>, handleSetAppConfig: import("@reduxjs/toolkit").ActionCreatorWithPayload<LibConfig, string>, handleOpen: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>, handleSetCountryByIso2: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, string>, handleIsTapOrigin: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>, handelBoardMaturity: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>, handlePublicKey: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, string>, handleSwitchCalender: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>;
|
|
47
51
|
declare const _default: import("redux").Reducer<SettingsState, import("redux").AnyAction>;
|
|
48
52
|
export default _default;
|
|
49
53
|
export declare const settingsSelector: (state: RootState) => SettingsState;
|
package/build/app/settings.js
CHANGED
|
@@ -53,7 +53,7 @@ import i18n from '../i18n';
|
|
|
53
53
|
import { updateLocale } from '../utils/locale';
|
|
54
54
|
import API, { getAxiosHeaders, setAxiosGlobalHeaders } from '../api';
|
|
55
55
|
export var fetchAppSettingsSync = createAsyncThunk('fetchAppSettingsSync', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
56
|
-
var settings, _a, appConfig, language, _b, client, device, os, disableLocale, maturity, disableCountries, configToken, onVerifyConfigTokenSuccess, _c, visitorId, locale, configInfo, matureData, lang, initPayload, _d, country_list, ip_info, merchant, operator, config, list, _e, ip, latitude, longitude, domain, language_1, country, scope, public_key, maturity_1, board_maturity, deviceInfo, isValidOperator, countries, countryCode, isKWOrSA, businessCountry;
|
|
56
|
+
var settings, _a, appConfig, language, _b, client, device, os, disableLocale, maturity, disableCountries, configToken, onVerifyConfigTokenSuccess, _c, visitorId, locale, configInfo, matureData, lang, initPayload, _d, country_list, ip_info, merchant, operator, config, list, _e, ip, latitude, longitude, domain, language_1, country, scope, public_key, maturity_1, board_maturity, post, platform_redirect_url, data, deviceInfo, isValidOperator, countries, countryCode, isKWOrSA, businessCountry;
|
|
57
57
|
return __generator(this, function (_f) {
|
|
58
58
|
switch (_f.label) {
|
|
59
59
|
case 0:
|
|
@@ -81,8 +81,8 @@ export var fetchAppSettingsSync = createAsyncThunk('fetchAppSettingsSync', funct
|
|
|
81
81
|
list = (country_list || { list: [] }).list;
|
|
82
82
|
_e = ip_info || {}, ip = _e.ip, latitude = _e.latitude, longitude = _e.longitude;
|
|
83
83
|
if (config) {
|
|
84
|
-
domain = config.domain, language_1 = config.language, country = config.country, scope = config.scope, public_key = config.public_key, maturity_1 = config.maturity, board_maturity = config.board_maturity;
|
|
85
|
-
configInfo = __assign(__assign(__assign(__assign(__assign(__assign({}, configInfo), (domain && { merchantDomain: domain })), (language_1 && { language: language_1 })), (country && { businessCountryCode: country })), (scope && { scope: scope })), (public_key && { publicKey: public_key }));
|
|
84
|
+
domain = config.domain, language_1 = config.language, country = config.country, scope = config.scope, public_key = config.public_key, maturity_1 = config.maturity, board_maturity = config.board_maturity, post = config.post, platform_redirect_url = config.platform_redirect_url, data = config.data;
|
|
85
|
+
configInfo = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, configInfo), (domain && { merchantDomain: domain })), (language_1 && { language: language_1 })), (country && { businessCountryCode: country })), (scope && { scope: scope })), (public_key && { publicKey: public_key })), ((post === null || post === void 0 ? void 0 : post.url) && { postURL: post === null || post === void 0 ? void 0 : post.url })), (platform_redirect_url && { redirectUrl: platform_redirect_url })), (data && { data: data }));
|
|
86
86
|
if (typeof maturity_1 === 'boolean')
|
|
87
87
|
matureData = maturity_1 ? 'full' : 'express';
|
|
88
88
|
thunkApi.dispatch(handleSetAppConfig(configInfo));
|
|
@@ -145,9 +145,39 @@ export var fetchAppSettingsSync = createAsyncThunk('fetchAppSettingsSync', funct
|
|
|
145
145
|
}
|
|
146
146
|
});
|
|
147
147
|
}); });
|
|
148
|
+
export var onCloseComplete = createAsyncThunk('settings/onCloseComplete', function (merchantId, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
149
|
+
var settings, _a, postURL, redirectUrl, authId, bi, list, id, body, data, urlQueryStart;
|
|
150
|
+
var _b, _c, _d, _e;
|
|
151
|
+
return __generator(this, function (_f) {
|
|
152
|
+
switch (_f.label) {
|
|
153
|
+
case 0:
|
|
154
|
+
settings = thunkApi.getState().settings;
|
|
155
|
+
_a = settings.data.appConfig, postURL = _a.postURL, redirectUrl = _a.redirectUrl, authId = _a.authId;
|
|
156
|
+
bi = settings.data.deviceInfo.browser.browser_id;
|
|
157
|
+
return [4, API.entityService.getTerminalListUsingMerchantId(merchantId)];
|
|
158
|
+
case 1:
|
|
159
|
+
list = (_f.sent()).list;
|
|
160
|
+
id = ((_c = (_b = list === null || list === void 0 ? void 0 : list[0]) === null || _b === void 0 ? void 0 : _b.operator) === null || _c === void 0 ? void 0 : _c.id) || '';
|
|
161
|
+
body = {
|
|
162
|
+
id: id,
|
|
163
|
+
post_url: postURL || ''
|
|
164
|
+
};
|
|
165
|
+
return [4, API.operatorService.updateOperator(body)];
|
|
166
|
+
case 2:
|
|
167
|
+
data = _f.sent();
|
|
168
|
+
(_e = (_d = settings.data.appConfig).onStepCompleted) === null || _e === void 0 ? void 0 : _e.call(_d, settings.data.activeScreen.name, data);
|
|
169
|
+
if (authId && redirectUrl) {
|
|
170
|
+
urlQueryStart = redirectUrl.includes('?') ? '&' : '?';
|
|
171
|
+
window.open("".concat(redirectUrl).concat(urlQueryStart, "authentication_id=").concat(authId, "&bi=").concat(bi), '_self');
|
|
172
|
+
}
|
|
173
|
+
return [2];
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
}); });
|
|
148
177
|
var initialState = {
|
|
149
178
|
error: null,
|
|
150
179
|
loading: true,
|
|
180
|
+
internalLoading: true,
|
|
151
181
|
data: {
|
|
152
182
|
boardMaturity: true,
|
|
153
183
|
open: true,
|
|
@@ -169,6 +199,12 @@ export var settingsSlice = createSlice({
|
|
|
169
199
|
name: 'settings',
|
|
170
200
|
initialState: initialState,
|
|
171
201
|
reducers: {
|
|
202
|
+
storeAuthId: function (state, action) {
|
|
203
|
+
state.data.appConfig.authId = action.payload;
|
|
204
|
+
},
|
|
205
|
+
updateInternalLoading: function (state, action) {
|
|
206
|
+
state.internalLoading = action.payload;
|
|
207
|
+
},
|
|
172
208
|
handelBoardMaturity: function (state, action) {
|
|
173
209
|
state.data.boardMaturity = action.payload;
|
|
174
210
|
},
|
|
@@ -279,6 +315,7 @@ export var settingsSlice = createSlice({
|
|
|
279
315
|
extraReducers: function (builder) {
|
|
280
316
|
builder.addCase(fetchAppSettingsSync.pending, function (state) {
|
|
281
317
|
state.loading = true;
|
|
318
|
+
state.internalLoading = false;
|
|
282
319
|
state.error = null;
|
|
283
320
|
});
|
|
284
321
|
builder.addCase(fetchAppSettingsSync.fulfilled, function (state, action) {
|
|
@@ -293,15 +330,17 @@ export var settingsSlice = createSlice({
|
|
|
293
330
|
if (locale)
|
|
294
331
|
updateLocale(locale, businessCountry.iso2);
|
|
295
332
|
state.loading = false;
|
|
333
|
+
state.internalLoading = false;
|
|
296
334
|
if (state.data.appConfig.onReady)
|
|
297
335
|
state.data.appConfig.onReady();
|
|
298
336
|
});
|
|
299
337
|
builder.addCase(fetchAppSettingsSync.rejected, function (state, action) {
|
|
300
338
|
state.loading = false;
|
|
339
|
+
state.internalLoading = false;
|
|
301
340
|
state.error = action.error.message;
|
|
302
341
|
});
|
|
303
342
|
}
|
|
304
343
|
});
|
|
305
|
-
export var
|
|
344
|
+
export var storeAuthId = (_a = settingsSlice.actions, _a.storeAuthId), updateInternalLoading = _a.updateInternalLoading, handleSkin = _a.handleSkin, handleLanguage = _a.handleLanguage, handleActiveFlowScreens = _a.handleActiveFlowScreens, handleNextScreenStep = _a.handleNextScreenStep, handlePrevScreenStep = _a.handlePrevScreenStep, handleCurrentActiveScreen = _a.handleCurrentActiveScreen, handleSetAppConfig = _a.handleSetAppConfig, handleOpen = _a.handleOpen, handleSetCountryByIso2 = _a.handleSetCountryByIso2, handleIsTapOrigin = _a.handleIsTapOrigin, handelBoardMaturity = _a.handelBoardMaturity, handlePublicKey = _a.handlePublicKey, handleSwitchCalender = _a.handleSwitchCalender;
|
|
306
345
|
export default settingsSlice.reducer;
|
|
307
346
|
export var settingsSelector = function (state) { return state.settings; };
|
|
@@ -417,5 +417,16 @@
|
|
|
417
417
|
"alert_choose_segment_tech": "الرجاء تحديد التقنية",
|
|
418
418
|
"switch_to_islamic_calendar": "التبديل إلى التقويم الهجرى",
|
|
419
419
|
"switch_to_gregorian_calendar": "التبديل إلى التقويم الميلادي",
|
|
420
|
-
"choose_any_monthly_income": "رجاءا اختر الدخل الشهرى"
|
|
420
|
+
"choose_any_monthly_income": "رجاءا اختر الدخل الشهرى",
|
|
421
|
+
"auth_brand_required": "العلامة التجارية مطلوبة",
|
|
422
|
+
"auth_entity_required": "المؤسسة مطلوب",
|
|
423
|
+
"auth_merchant_required": "التاجر مطلوب",
|
|
424
|
+
"auth_terminal_required": "ال Terminal مطلوبة",
|
|
425
|
+
"select_entity_label": "مؤسسة",
|
|
426
|
+
"select_entity_placeholder": "الرجاء تحديد مؤسسة",
|
|
427
|
+
"select_merchant_label": "التاجر",
|
|
428
|
+
"select_merchant_placeholder": "الرجاء تحديد تاجر",
|
|
429
|
+
"select_terminal_label": "Terminal",
|
|
430
|
+
"select_terminal_placeholder": "الرجاء تحديد محطة طرفية",
|
|
431
|
+
"close_and_complete_later": "اغلق الان و اكمل لاحقا"
|
|
421
432
|
}
|
|
@@ -447,5 +447,16 @@
|
|
|
447
447
|
"alert_choose_segment_tech": "Please select segment tech",
|
|
448
448
|
"switch_to_islamic_calendar": "Switch to Islamic Calendar",
|
|
449
449
|
"switch_to_gregorian_calendar": "Switch to Gregorian Calendar",
|
|
450
|
-
"choose_any_monthly_income": "Please choose monthly income"
|
|
450
|
+
"choose_any_monthly_income": "Please choose monthly income",
|
|
451
|
+
"auth_brand_required": "Brand is required",
|
|
452
|
+
"auth_entity_required": "Entity is required",
|
|
453
|
+
"auth_merchant_required": "Merchant is required",
|
|
454
|
+
"auth_terminal_required": "Terminal is required",
|
|
455
|
+
"select_entity_label": "Entity",
|
|
456
|
+
"select_entity_placeholder": "Please select a entity",
|
|
457
|
+
"select_merchant_label": "Merchant",
|
|
458
|
+
"select_merchant_placeholder": "Please select a merchant",
|
|
459
|
+
"select_terminal_label": "Terminal",
|
|
460
|
+
"select_terminal_placeholder": "Please select a terminal",
|
|
461
|
+
"close_and_complete_later": "Close and Complete Later"
|
|
451
462
|
}
|
|
@@ -123,7 +123,7 @@ function SimpleList(_a) {
|
|
|
123
123
|
setItems(list);
|
|
124
124
|
};
|
|
125
125
|
return (_jsxs(_Fragment, { children: [(searchValuePath === null || searchValuePath === void 0 ? void 0 : searchValuePath.length) && _jsx(Search, { onSearchValue: onSearch }), _jsx(ListStyled, __assign({ height: maxHeight }, rest, { children: children ||
|
|
126
|
-
mapSelectedItemBeginning.map(function (item, idx) {
|
|
126
|
+
(mapSelectedItemBeginning || []).map(function (item, idx) {
|
|
127
127
|
return (_createElement(ListItemStyled, __assign({}, listItemProps, { onClick: function (e) {
|
|
128
128
|
onSelectItem(item, e);
|
|
129
129
|
}, disableGutters: true, key: idx }), renderItem(item, idx)));
|
package/build/constants/api.d.ts
CHANGED
package/build/constants/api.js
CHANGED
|
@@ -49,6 +49,8 @@ var TEAM_SIZE_PATH = '/businessSegment/team/list';
|
|
|
49
49
|
var ADDRESS_PATH = '/address';
|
|
50
50
|
var INIT_PATH = 'init';
|
|
51
51
|
var BUSINESS_PATH = '/business';
|
|
52
|
+
var MERCHANT_PATH = '/merchant';
|
|
53
|
+
var TERMINAL_PATH = '/terminal';
|
|
52
54
|
var SEGMENT_LOCATION_PATH = "".concat(BRAND_PATH, "/segment/location");
|
|
53
55
|
var SEGMENT_PROFIT_PATH = "".concat(BRAND_PATH, "/segment/profit");
|
|
54
56
|
var SEGMENT_TECH_PATH = "".concat(BRAND_PATH, "/segment/tech");
|
|
@@ -106,5 +108,7 @@ export var ENDPOINT_PATHS = {
|
|
|
106
108
|
CONNECT: CONNECT_PATH,
|
|
107
109
|
SEGMENT_LOCATION: SEGMENT_LOCATION_PATH,
|
|
108
110
|
SEGMENT_PROFIT: SEGMENT_PROFIT_PATH,
|
|
109
|
-
SEGMENT_TECH: SEGMENT_TECH_PATH
|
|
111
|
+
SEGMENT_TECH: SEGMENT_TECH_PATH,
|
|
112
|
+
MERCHANT: MERCHANT_PATH,
|
|
113
|
+
TERMINAL: TERMINAL_PATH
|
|
110
114
|
};
|
package/build/constants/app.d.ts
CHANGED
package/build/constants/app.js
CHANGED
|
@@ -6,6 +6,7 @@ export var LOCAL_STORAGE_KEYS = {
|
|
|
6
6
|
themeMode: 'themeMode',
|
|
7
7
|
languageMode: 'languageMode'
|
|
8
8
|
};
|
|
9
|
+
export var SCOPE_AUTH = 'auth';
|
|
9
10
|
export var EXTERNAL_LINKS = {
|
|
10
11
|
TOS_EN: '/en/terms-conditions',
|
|
11
12
|
TOS_AR: '/ar/terms-conditions',
|
|
@@ -93,7 +94,11 @@ export var CONNECT_EXPRESS_SCREENS_NAVIGATION = [
|
|
|
93
94
|
},
|
|
94
95
|
{
|
|
95
96
|
name: 'CONNECT_EXPRESS_VERIFY_PACI_STEP',
|
|
96
|
-
next: [
|
|
97
|
+
next: [
|
|
98
|
+
'CONNECT_EXPRESS_COLLECT_INDIVIDUAL_INFO_STEP',
|
|
99
|
+
'CONNECT_EXPRESS_WAITING_FOR_CREATING_ACCOUNT_STEP',
|
|
100
|
+
'CONNECT_EXPRESS_AUTHENTICATION_LIST_STEP'
|
|
101
|
+
],
|
|
97
102
|
prev: 'CONNECT_EXPRESS_CIVIL_ID_STEP',
|
|
98
103
|
order: 2
|
|
99
104
|
},
|
|
@@ -103,11 +108,18 @@ export var CONNECT_EXPRESS_SCREENS_NAVIGATION = [
|
|
|
103
108
|
'CONNECT_EXPRESS_COLLECT_INDIVIDUAL_INFO_STEP',
|
|
104
109
|
'CONNECT_EXPRESS_WAITING_FOR_CREATING_ACCOUNT_STEP',
|
|
105
110
|
'CONNECT_EXPRESS_NID_MISSED_STEP',
|
|
106
|
-
'CONNECT_EXPRESS_CIVIL_ID_MISSED_STEP'
|
|
111
|
+
'CONNECT_EXPRESS_CIVIL_ID_MISSED_STEP',
|
|
112
|
+
'CONNECT_EXPRESS_AUTHENTICATION_LIST_STEP'
|
|
107
113
|
],
|
|
108
114
|
prev: ['CONNECT_EXPRESS_MOBILE_STEP', 'CONNECT_EXPRESS_NID_STEP'],
|
|
109
115
|
order: 2
|
|
110
116
|
},
|
|
117
|
+
{
|
|
118
|
+
name: 'CONNECT_EXPRESS_AUTHENTICATION_LIST_STEP',
|
|
119
|
+
next: 'CONNECT_EXPRESS_SUCCESS_WITH_FLOW_BUTTONS_STEP',
|
|
120
|
+
prev: ['CONNECT_EXPRESS_MOBILE_STEP', 'CONNECT_EXPRESS_NID_STEP', 'CONNECT_EXPRESS_CIVIL_ID_STEP'],
|
|
121
|
+
order: 3
|
|
122
|
+
},
|
|
111
123
|
{
|
|
112
124
|
name: 'CONNECT_EXPRESS_NID_MISSED_STEP',
|
|
113
125
|
next: 'CONNECT_EXPRESS_OTP_IDENTITY_STEP',
|
|
@@ -50,6 +50,7 @@ export declare const updateBoardSuccess: import("@reduxjs/toolkit").AsyncThunk<{
|
|
|
50
50
|
response: any;
|
|
51
51
|
formData: void;
|
|
52
52
|
} | undefined, void, {}>;
|
|
53
|
+
export declare const onCloseCompleteBank: import("@reduxjs/toolkit").AsyncThunk<void, void, {}>;
|
|
53
54
|
declare type VerifyData = {
|
|
54
55
|
token: string;
|
|
55
56
|
};
|
|
@@ -49,7 +49,7 @@ var _a;
|
|
|
49
49
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
50
50
|
import API from '../../../api';
|
|
51
51
|
import { DocumentPurpose, FlowsTypes } from '../../../@types';
|
|
52
|
-
import { handleCurrentActiveScreen, handleNextScreenStep, handlePrevScreenStep, handlePublicKey, handleSetCountryByIso2 } from '../../../app/settings';
|
|
52
|
+
import { handleCurrentActiveScreen, handleNextScreenStep, handlePrevScreenStep, handlePublicKey, handleSetCountryByIso2, onCloseComplete } from '../../../app/settings';
|
|
53
53
|
import { BANK_STEP_NAMES } from '../../../constants';
|
|
54
54
|
import { hasNoneEditableValue, isStringHasOneAsterisk, retrieveIndividualData, sleep } from '../../../utils';
|
|
55
55
|
export var verifyLeadToken = createAsyncThunk('bankVerifyLeadToken', function (_a, thunkApi) {
|
|
@@ -310,6 +310,21 @@ export var updateBoardSuccess = createAsyncThunk('updateBoardBankSuccess', funct
|
|
|
310
310
|
}
|
|
311
311
|
});
|
|
312
312
|
}); });
|
|
313
|
+
export var onCloseCompleteBank = createAsyncThunk('bank/onCloseCompleteBank', function (_, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
314
|
+
var bank, id;
|
|
315
|
+
var _a;
|
|
316
|
+
return __generator(this, function (_b) {
|
|
317
|
+
switch (_b.label) {
|
|
318
|
+
case 0:
|
|
319
|
+
bank = thunkApi.getState().bank;
|
|
320
|
+
id = (((_a = bank.data.verify.responseBody) === null || _a === void 0 ? void 0 : _a.merchant) || {}).id;
|
|
321
|
+
return [4, thunkApi.dispatch(onCloseComplete(id))];
|
|
322
|
+
case 1:
|
|
323
|
+
_b.sent();
|
|
324
|
+
return [2];
|
|
325
|
+
}
|
|
326
|
+
});
|
|
327
|
+
}); });
|
|
313
328
|
var initialState = {
|
|
314
329
|
error: null,
|
|
315
330
|
loading: false,
|
|
@@ -495,6 +510,18 @@ export var bankSlice = createSlice({
|
|
|
495
510
|
if (action.error.message === 'Aborted')
|
|
496
511
|
return;
|
|
497
512
|
state.error = action.error.message;
|
|
513
|
+
})
|
|
514
|
+
.addCase(onCloseCompleteBank.pending, function (state) {
|
|
515
|
+
state.loading = true;
|
|
516
|
+
state.error = null;
|
|
517
|
+
})
|
|
518
|
+
.addCase(onCloseCompleteBank.fulfilled, function (state) {
|
|
519
|
+
state.loading = false;
|
|
520
|
+
state.error = null;
|
|
521
|
+
})
|
|
522
|
+
.addCase(onCloseCompleteBank.rejected, function (state, action) {
|
|
523
|
+
state.loading = false;
|
|
524
|
+
state.error = action.error.message;
|
|
498
525
|
});
|
|
499
526
|
}
|
|
500
527
|
});
|
|
@@ -94,6 +94,7 @@ export declare const updateBoardSuccess: import("@reduxjs/toolkit").AsyncThunk<{
|
|
|
94
94
|
response: any;
|
|
95
95
|
formData: void;
|
|
96
96
|
} | undefined, void, {}>;
|
|
97
|
+
export declare const onCloseCompleteBrand: import("@reduxjs/toolkit").AsyncThunk<void, void, {}>;
|
|
97
98
|
declare type VerifyData = {
|
|
98
99
|
token: string;
|
|
99
100
|
};
|
|
@@ -60,7 +60,7 @@ var _a;
|
|
|
60
60
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
61
61
|
import API from '../../../api';
|
|
62
62
|
import { FlowsTypes } from '../../../@types';
|
|
63
|
-
import { handleNextScreenStep, handlePrevScreenStep, handlePublicKey, handleSetCountryByIso2 } from '../../../app/settings';
|
|
63
|
+
import { handleNextScreenStep, handlePrevScreenStep, handlePublicKey, handleSetCountryByIso2, onCloseComplete } from '../../../app/settings';
|
|
64
64
|
import { BRAND_STEP_NAMES } from '../../../constants';
|
|
65
65
|
import { hasNoneEditableValue, isKW, isTwitter, isWebsite, mapSalesChannel, retrieveIndividualData, sleep } from '../../../utils';
|
|
66
66
|
export var verifyLeadToken = createAsyncThunk('brandVerifyLeadToken', function (_a, thunkApi) {
|
|
@@ -549,6 +549,21 @@ export var updateBoardSuccess = createAsyncThunk('updateBoardBrandSuccess', func
|
|
|
549
549
|
}
|
|
550
550
|
});
|
|
551
551
|
}); });
|
|
552
|
+
export var onCloseCompleteBrand = createAsyncThunk('brand/onCloseCompleteBrand', function (_, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
553
|
+
var brand, id;
|
|
554
|
+
var _a;
|
|
555
|
+
return __generator(this, function (_b) {
|
|
556
|
+
switch (_b.label) {
|
|
557
|
+
case 0:
|
|
558
|
+
brand = thunkApi.getState().brand;
|
|
559
|
+
id = (((_a = brand.data.verify.responseBody) === null || _a === void 0 ? void 0 : _a.merchant) || {}).id;
|
|
560
|
+
return [4, thunkApi.dispatch(onCloseComplete(id))];
|
|
561
|
+
case 1:
|
|
562
|
+
_b.sent();
|
|
563
|
+
return [2];
|
|
564
|
+
}
|
|
565
|
+
});
|
|
566
|
+
}); });
|
|
552
567
|
var initialState = {
|
|
553
568
|
error: null,
|
|
554
569
|
loading: false,
|
|
@@ -844,6 +859,18 @@ export var brandSlice = createSlice({
|
|
|
844
859
|
.addCase(updateBoardSuccess.rejected, function (state, action) {
|
|
845
860
|
state.loading = false;
|
|
846
861
|
state.error = action.error.message;
|
|
862
|
+
})
|
|
863
|
+
.addCase(onCloseCompleteBrand.pending, function (state) {
|
|
864
|
+
state.loading = true;
|
|
865
|
+
state.error = null;
|
|
866
|
+
})
|
|
867
|
+
.addCase(onCloseCompleteBrand.fulfilled, function (state) {
|
|
868
|
+
state.loading = false;
|
|
869
|
+
state.error = null;
|
|
870
|
+
})
|
|
871
|
+
.addCase(onCloseCompleteBrand.rejected, function (state, action) {
|
|
872
|
+
state.loading = false;
|
|
873
|
+
state.error = action.error.message;
|
|
847
874
|
});
|
|
848
875
|
}
|
|
849
876
|
});
|