@tap-payments/auth-jsconnect 2.5.5 → 2.5.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/build/@types/app.d.ts +5 -1
  2. package/build/@types/redux.d.ts +1 -0
  3. package/build/api/data.d.ts +4 -17
  4. package/build/api/data.js +5 -45
  5. package/build/api/entity.d.ts +3 -2
  6. package/build/api/entity.js +12 -4
  7. package/build/api/index.d.ts +5 -21
  8. package/build/components/Providers/ThemeProvider.js +1 -1
  9. package/build/constants/api.d.ts +2 -7
  10. package/build/constants/api.js +5 -15
  11. package/build/constants/app.js +7 -1
  12. package/build/features/app/auth/authStore.js +24 -21
  13. package/build/features/app/bank/bankStore.d.ts +13 -19
  14. package/build/features/app/bank/bankStore.js +183 -165
  15. package/build/features/app/board/boardStore.js +16 -10
  16. package/build/features/app/brand/brandStore.d.ts +17 -31
  17. package/build/features/app/brand/brandStore.js +250 -261
  18. package/build/features/app/business/businessStore.js +16 -16
  19. package/build/features/app/connect/connectStore.js +7 -7
  20. package/build/features/app/connectExpress/connectExpressStore.d.ts +5 -1
  21. package/build/features/app/connectExpress/connectExpressStore.js +64 -27
  22. package/build/features/app/entity/entityStore.d.ts +20 -34
  23. package/build/features/app/entity/entityStore.js +204 -249
  24. package/build/features/app/individual/individualStore.d.ts +17 -36
  25. package/build/features/app/individual/individualStore.js +228 -270
  26. package/build/features/app/password/passwordStore.d.ts +21 -25
  27. package/build/features/app/password/passwordStore.js +203 -220
  28. package/build/features/app/tax/taxStore.d.ts +13 -7
  29. package/build/features/app/tax/taxStore.js +168 -147
  30. package/build/features/auth/Auth.d.ts +0 -2
  31. package/build/features/auth/Auth.js +7 -7
  32. package/build/features/auth/screens/AuthSwitch/AuthSwitch.js +1 -1
  33. package/build/features/bank/Bank.js +5 -3
  34. package/build/features/bank/screens/BankDetails/BankDetails.js +17 -4
  35. package/build/features/board/Board.d.ts +2 -0
  36. package/build/features/board/Board.js +13 -7
  37. package/build/features/board/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
  38. package/build/features/board/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
  39. package/build/features/board/screens/PrepareDataLoading/index.d.ts +2 -0
  40. package/build/features/board/screens/PrepareDataLoading/index.js +2 -0
  41. package/build/features/board/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +12 -2
  42. package/build/features/brand/Brand.js +5 -3
  43. package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +2 -2
  44. package/build/features/brand/screens/BrandActivities/BrandActivities.js +48 -11
  45. package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +3 -3
  46. package/build/features/brand/screens/BrandActivities/RefundPolicy.d.ts +2 -2
  47. package/build/features/brand/screens/BrandInfo/BrandInfo.js +22 -4
  48. package/build/features/brand/screens/BrandSegmentInfo/BrandSegmentInfo.js +22 -6
  49. package/build/features/business/Business.js +5 -3
  50. package/build/features/business/screens/Activities/Activities.js +9 -1
  51. package/build/features/business/screens/Activities/ActivitiesList.d.ts +2 -2
  52. package/build/features/business/screens/Activities/OperationStartDate.d.ts +1 -1
  53. package/build/features/business/screens/BrandDetails/SalesChannel.d.ts +1 -1
  54. package/build/features/business/screens/Customers/CustomerLocations.d.ts +3 -3
  55. package/build/features/business/screens/Customers/Customers.js +9 -1
  56. package/build/features/business/screens/Customers/RefundPolicy.d.ts +2 -2
  57. package/build/features/connect/Connect.js +5 -4
  58. package/build/features/connect/screens/BusinessCountry/BusinessCountry.js +7 -1
  59. package/build/features/connectExpress/ConnectExpress.js +5 -4
  60. package/build/features/entity/Entity.js +5 -3
  61. package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +2 -2
  62. package/build/features/entity/screens/EntityCapital/EntityCapital.js +33 -9
  63. package/build/features/entity/screens/EntityName/EntityName.js +31 -14
  64. package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +2 -2
  65. package/build/features/entity/screens/EntityName/ExpiryDate.d.ts +1 -1
  66. package/build/features/entity/screens/EntityName/IssuingDate.d.ts +1 -1
  67. package/build/features/featuresScreens.js +5 -0
  68. package/build/features/individual/Individual.js +5 -3
  69. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.d.ts +1 -1
  70. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +43 -10
  71. package/build/features/individual/screens/IndividualList/IndividualList.d.ts +2 -2
  72. package/build/features/individual/screens/IndividualList/IndividualList.js +7 -0
  73. package/build/features/individual/screens/IndividualList/UserList.js +3 -3
  74. package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.d.ts +1 -1
  75. package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +73 -18
  76. package/build/features/password/Password.js +6 -4
  77. package/build/features/shared/Address/CountryList.d.ts +2 -2
  78. package/build/features/shared/Address/InputSelect.d.ts +2 -2
  79. package/build/features/shared/Button/FlowsButtons.js +10 -2
  80. package/build/features/shared/Input/Input.d.ts +1 -1
  81. package/build/features/signIn/SignIn.js +15 -5
  82. package/build/features/tax/Tax.js +5 -3
  83. package/build/features/tax/screens/TaxDetails/TaxDetails.js +7 -2
  84. package/build/hooks/index.d.ts +1 -0
  85. package/build/hooks/index.js +1 -0
  86. package/build/hooks/useAppConfig.js +1 -1
  87. package/build/hooks/useAppTheme.js +4 -3
  88. package/build/hooks/useFormDirtyCheck.d.ts +10 -0
  89. package/build/hooks/useFormDirtyCheck.js +66 -0
  90. package/build/theme/theme.d.ts +1 -1
  91. package/build/theme/theme.js +2 -2
  92. package/package.json +1 -1
@@ -211,7 +211,7 @@ interface LibCallbacks {
211
211
  onCreated?: (res: Record<string, any>) => void;
212
212
  onBoardCompleted?: () => void;
213
213
  onMaturityChanged?: (maturity: 'full' | 'express') => void;
214
- storeBoardId?: (boardId: string) => void;
214
+ onSwitchToBoard?: (boardId: string, authId: string) => void;
215
215
  }
216
216
  export interface LibConfig extends LibCallbacks {
217
217
  publicKey: string;
@@ -233,6 +233,8 @@ export interface LibConfig extends LibCallbacks {
233
233
  loaderOverlay?: boolean;
234
234
  tapTextLogo?: boolean;
235
235
  closeButton?: boolean;
236
+ dialogStartTransition?: 'left' | 'right' | 'up' | 'down';
237
+ dialogEndTransition?: 'left' | 'right' | 'up' | 'down';
236
238
  };
237
239
  postURL?: string;
238
240
  redirectUrl?: string;
@@ -707,6 +709,8 @@ export interface AuthMerchantInfo {
707
709
  terminal_id: string;
708
710
  acceptance_status: string;
709
711
  payout_status: string;
712
+ board_id: string;
713
+ board_info_id: string;
710
714
  }
711
715
  export interface AuthTerminalInfo {
712
716
  id: string;
@@ -15,4 +15,5 @@ export interface ResponseData {
15
15
  export interface AsyncThunkParams<T> {
16
16
  formData: T;
17
17
  originalFormData: T;
18
+ isDirty: boolean;
18
19
  }
@@ -4,14 +4,11 @@ type GetOccupationBody = {
4
4
  };
5
5
  type GetSegmentsBody = {
6
6
  page: number;
7
+ limit: number;
7
8
  };
8
9
  type GetTeamSizeBody = {
9
10
  page: number;
10
11
  };
11
- type SegmentDataListBody = {
12
- page: number;
13
- limit: number;
14
- };
15
12
  type GetMonthlyIncomeBody = {
16
13
  page: number;
17
14
  country_code: Array<string>;
@@ -23,14 +20,9 @@ export type DataElementBody = {
23
20
  ar: string;
24
21
  };
25
22
  };
26
- type GetCustomerBasesBody = {
27
- page: number;
28
- };
29
- type GetExpectedSalesBody = {
30
- page: number;
31
- };
32
- type GetExpectedCustomerSalesBody = {
23
+ type GetBrandOperationsBody = {
33
24
  page: number;
25
+ country_code: string[];
34
26
  };
35
27
  type GetSourceOfIncomeBody = {
36
28
  page: number;
@@ -40,9 +32,7 @@ type GetChannelsOfServicesBody = {
40
32
  };
41
33
  declare const dataService: {
42
34
  getChannelsOfServices: (data: GetChannelsOfServicesBody) => Promise<any>;
43
- getCustomerBases: (data: GetCustomerBasesBody) => Promise<any>;
44
- getExpectedSales: (data: GetExpectedSalesBody) => Promise<any>;
45
- getExpectedCustomerSales: (data: GetExpectedCustomerSalesBody) => Promise<any>;
35
+ getBrandOperations: (data: GetBrandOperationsBody) => Promise<any>;
46
36
  getSourceOfIncome: (data: GetSourceOfIncomeBody) => Promise<any>;
47
37
  getMonthlyIncome: (data: GetMonthlyIncomeBody) => Promise<any>;
48
38
  getOccupation: (data: GetOccupationBody) => Promise<any>;
@@ -50,8 +40,5 @@ declare const dataService: {
50
40
  getTeamSize: (data: GetTeamSizeBody) => Promise<any>;
51
41
  getActivities: (config?: AxiosRequestConfig) => Promise<any>;
52
42
  getActivitiesIsIc: () => Promise<any>;
53
- getSegmentLocation: (data: SegmentDataListBody) => Promise<any>;
54
- getSegmentProfit: (data: SegmentDataListBody) => Promise<any>;
55
- getSegmentTech: (data: SegmentDataListBody) => Promise<any>;
56
43
  };
57
44
  export { dataService };
package/build/api/data.js CHANGED
@@ -18,24 +18,10 @@ var getChannelsOfServices = function (data) {
18
18
  data: data
19
19
  });
20
20
  };
21
- var getCustomerBases = function (data) {
21
+ var getBrandOperations = function (data) {
22
22
  return httpClient({
23
23
  method: 'post',
24
- url: "".concat(ENDPOINT_PATHS.CUSTOMER_BASES),
25
- data: data
26
- });
27
- };
28
- var getExpectedSales = function (data) {
29
- return httpClient({
30
- method: 'post',
31
- url: "".concat(ENDPOINT_PATHS.SALES),
32
- data: data
33
- });
34
- };
35
- var getExpectedCustomerSales = function (data) {
36
- return httpClient({
37
- method: 'post',
38
- url: "".concat(ENDPOINT_PATHS.EXPECTED_CUSTOMERS),
24
+ url: "".concat(ENDPOINT_PATHS.BRAND_OPERATIONS),
39
25
  data: data
40
26
  });
41
27
  };
@@ -73,7 +59,7 @@ var getActivitiesIsIc = function () {
73
59
  var getSegments = function (data) {
74
60
  return httpClient({
75
61
  method: 'post',
76
- url: "".concat(ENDPOINT_PATHS.SEGMENTS_PATH),
62
+ url: "".concat(ENDPOINT_PATHS.SEGMENT_LIST),
77
63
  data: data
78
64
  });
79
65
  };
@@ -84,41 +70,15 @@ var getTeamSize = function (data) {
84
70
  data: data
85
71
  });
86
72
  };
87
- var getSegmentLocation = function (data) {
88
- return httpClient({
89
- method: 'post',
90
- url: "".concat(ENDPOINT_PATHS.SEGMENT_LOCATION, "/list"),
91
- data: data
92
- });
93
- };
94
- var getSegmentProfit = function (data) {
95
- return httpClient({
96
- method: 'post',
97
- url: "".concat(ENDPOINT_PATHS.SEGMENT_PROFIT, "/list"),
98
- data: data
99
- });
100
- };
101
- var getSegmentTech = function (data) {
102
- return httpClient({
103
- method: 'post',
104
- url: "".concat(ENDPOINT_PATHS.SEGMENT_TECH, "/list"),
105
- data: data
106
- });
107
- };
108
73
  var dataService = {
109
74
  getChannelsOfServices: getChannelsOfServices,
110
- getCustomerBases: getCustomerBases,
111
- getExpectedSales: getExpectedSales,
112
- getExpectedCustomerSales: getExpectedCustomerSales,
75
+ getBrandOperations: getBrandOperations,
113
76
  getSourceOfIncome: getSourceOfIncome,
114
77
  getMonthlyIncome: getMonthlyIncome,
115
78
  getOccupation: getOccupation,
116
79
  getSegments: getSegments,
117
80
  getTeamSize: getTeamSize,
118
81
  getActivities: getActivities,
119
- getActivitiesIsIc: getActivitiesIsIc,
120
- getSegmentLocation: getSegmentLocation,
121
- getSegmentProfit: getSegmentProfit,
122
- getSegmentTech: getSegmentTech
82
+ getActivitiesIsIc: getActivitiesIsIc
123
83
  };
124
84
  export { dataService };
@@ -118,6 +118,7 @@ export type RemoveEntityActivity = {
118
118
  export type MerchantListBody = {
119
119
  business_entity_id: string;
120
120
  brand_id: string;
121
+ lead_id?: string;
121
122
  create_if_not_present: boolean;
122
123
  platforms?: Array<string>;
123
124
  payment_provider?: PaymentProvider;
@@ -139,8 +140,8 @@ export type CreateEntityBody = {
139
140
  };
140
141
  declare const entityService: {
141
142
  createEntityInfo: ({ id, ...data }: EntityInfoBody, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
142
- updateEntityInfo: ({ id, ...data }: EntityInfoBody, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
143
- createBankAccount: (data: EntityBankUpdateBody, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
143
+ updateEntityInfo: ({ id, ...data }: EntityInfoBody) => Promise<any>;
144
+ createBankAccount: (data: EntityBankUpdateBody) => Promise<any>;
144
145
  retrieveBankAccount: (id: string) => Promise<any>;
145
146
  retrieveEntityInfo: (entity_id: string, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
146
147
  updateIndividualInfo: ({ id, ...data }: EntityInfoBody) => Promise<any>;
@@ -18,9 +18,13 @@ var createEntityInfo = function (_a, config) {
18
18
  var id = _a.id, data = __rest(_a, ["id"]);
19
19
  return instance.post("".concat(ENDPOINT_PATHS.ENTITY, "/").concat(id, "/info"), data, config);
20
20
  };
21
- var updateEntityInfo = function (_a, config) {
21
+ var updateEntityInfo = function (_a) {
22
22
  var id = _a.id, data = __rest(_a, ["id"]);
23
- return instance.put("".concat(ENDPOINT_PATHS.ENTITY, "/").concat(id), data, config);
23
+ return httpClient({
24
+ method: 'put',
25
+ url: "".concat(ENDPOINT_PATHS.ENTITY, "/").concat(id),
26
+ data: data
27
+ });
24
28
  };
25
29
  var retrieveEntity = function (entity_id) {
26
30
  return httpClient({
@@ -52,8 +56,12 @@ var updateEntityCapital = function (_a) {
52
56
  data: data
53
57
  });
54
58
  };
55
- var createBankAccount = function (data, config) {
56
- return instance.put("".concat(ENDPOINT_PATHS.BANK), data, config);
59
+ var createBankAccount = function (data) {
60
+ return httpClient({
61
+ method: 'put',
62
+ url: "".concat(ENDPOINT_PATHS.BANK),
63
+ data: data
64
+ });
57
65
  };
58
66
  var retrieveBankAccount = function (id) {
59
67
  return httpClient({
@@ -59,8 +59,8 @@ declare const API: {
59
59
  };
60
60
  entityService: {
61
61
  createEntityInfo: ({ id, ...data }: EntityInfoBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
62
- updateEntityInfo: ({ id, ...data }: EntityInfoBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
63
- createBankAccount: (data: EntityBankUpdateBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
62
+ updateEntityInfo: ({ id, ...data }: EntityInfoBody) => Promise<any>;
63
+ createBankAccount: (data: EntityBankUpdateBody) => Promise<any>;
64
64
  retrieveBankAccount: (id: string) => Promise<any>;
65
65
  retrieveEntityInfo: (entity_id: string, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
66
66
  updateIndividualInfo: ({ id, ...data }: EntityInfoBody) => Promise<any>;
@@ -95,14 +95,9 @@ declare const API: {
95
95
  getChannelsOfServices: (data: {
96
96
  page: number;
97
97
  }) => Promise<any>;
98
- getCustomerBases: (data: {
99
- page: number;
100
- }) => Promise<any>;
101
- getExpectedSales: (data: {
102
- page: number;
103
- }) => Promise<any>;
104
- getExpectedCustomerSales: (data: {
98
+ getBrandOperations: (data: {
105
99
  page: number;
100
+ country_code: string[];
106
101
  }) => Promise<any>;
107
102
  getSourceOfIncome: (data: {
108
103
  page: number;
@@ -116,24 +111,13 @@ declare const API: {
116
111
  }) => Promise<any>;
117
112
  getSegments: (data: {
118
113
  page: number;
114
+ limit: number;
119
115
  }) => Promise<any>;
120
116
  getTeamSize: (data: {
121
117
  page: number;
122
118
  }) => Promise<any>;
123
119
  getActivities: (config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<any>;
124
120
  getActivitiesIsIc: () => Promise<any>;
125
- getSegmentLocation: (data: {
126
- page: number;
127
- limit: number;
128
- }) => Promise<any>;
129
- getSegmentProfit: (data: {
130
- page: number;
131
- limit: number;
132
- }) => Promise<any>;
133
- getSegmentTech: (data: {
134
- page: number;
135
- limit: number;
136
- }) => Promise<any>;
137
121
  };
138
122
  individualService: {
139
123
  retrieveIndividualInfo: (id: string) => Promise<any>;
@@ -18,5 +18,5 @@ export default function ThemeProvider(_a) {
18
18
  if (!theme) {
19
19
  return _jsx(Fragment, {});
20
20
  }
21
- return (_jsx(ScopedCssBaseline, { children: _jsx(MUIThemeProvider, __assign({ theme: theme }, { children: children })) }));
21
+ return (_jsx(ScopedCssBaseline, __assign({ sx: { background: 'inherit' } }, { children: _jsx(MUIThemeProvider, __assign({ theme: theme }, { children: children })) })));
22
22
  }
@@ -26,9 +26,7 @@ export declare const ENDPOINT_PATHS: {
26
26
  FIREBASE_URL: string;
27
27
  CREATE_ACCOUNT: string;
28
28
  CHANNEL: string;
29
- CUSTOMER_BASES: string;
30
- SALES: string;
31
- EXPECTED_CUSTOMERS: string;
29
+ BRAND_OPERATIONS: string;
32
30
  SIGNUP: string;
33
31
  SOURCE_INCOME: string;
34
32
  MONTHLY_INCOME: string;
@@ -48,7 +46,6 @@ export declare const ENDPOINT_PATHS: {
48
46
  RETRIEVE_ACTIVITIES_LIST_PATH: string;
49
47
  DOCUMENT: string;
50
48
  CREATE_AUTH_NID: string;
51
- SEGMENTS_PATH: string;
52
49
  TEAM_SIZE_PATH: string;
53
50
  CITIES: string;
54
51
  INIT: string;
@@ -56,10 +53,8 @@ export declare const ENDPOINT_PATHS: {
56
53
  RETRIEVE_ACTIVITIES_ISIC: string;
57
54
  CONNECT: string;
58
55
  CREATE_CONNECT: string;
59
- SEGMENT_LOCATION: string;
60
- SEGMENT_PROFIT: string;
61
- SEGMENT_TECH: string;
62
56
  MERCHANT: string;
63
57
  TERMINAL: string;
64
58
  CURRENCY: string;
59
+ SEGMENT_LIST: string;
65
60
  };
@@ -22,9 +22,7 @@ var CHECK_EMAIL = '/individual/email/availability';
22
22
  var CHECK_BRAND = '/brand/name/check';
23
23
  var CREATE_ACCOUNT_PATH = '/account';
24
24
  var CHANNEL_PATH = '/v2/channel';
25
- var CUSTOMER_BASES_PATH = '/v2/customerBases';
26
- var SALES_PATH = '/v2/sales';
27
- var EXPECTED_CUSTOMERS_PATH = '/v2/expectedCustomers';
25
+ var BRAND_OPERATIONS = 'v2/operations';
28
26
  var SIGNUP_PATH = '/signup';
29
27
  var SOURCE_INCOME_PATH = '/v2/sourceOfIncome';
30
28
  var MONTHLY_INCOME_PATH = '/v2/monthlyIncome';
@@ -49,16 +47,13 @@ var CREATE_CONNECT = '/v3/connect';
49
47
  var CREATE_AUTH_NID_PATH = "".concat(CONNECT_PATH, "/auth");
50
48
  var VERIFY_AUTH_OTP_PATH = "".concat(CONNECT_PATH, "/auth");
51
49
  var DOCUMENT_PATH = '/document';
52
- var SEGMENTS_PATH = '/businessSegment/list';
53
50
  var TEAM_SIZE_PATH = '/businessSegment/team/list';
54
51
  var ADDRESS_PATH = '/address';
55
52
  var INIT_PATH = 'init';
56
53
  var BUSINESS_PATH = '/business';
57
54
  var MERCHANT_PATH = '/merchant';
58
55
  var TERMINAL_PATH = '/terminal';
59
- var SEGMENT_LOCATION_PATH = "".concat(BRAND_PATH, "/segment/location");
60
- var SEGMENT_PROFIT_PATH = "".concat(BRAND_PATH, "/segment/profit");
61
- var SEGMENT_TECH_PATH = "".concat(BRAND_PATH, "/segment/tech");
56
+ var SEGMENT_LIST = "v2".concat(BRAND_PATH, "/segment");
62
57
  var CREATE_TOKEN_PATH = '/token';
63
58
  var MIGRATION_STATUS = '/migration';
64
59
  export var ENDPOINT_PATHS = {
@@ -89,9 +84,7 @@ export var ENDPOINT_PATHS = {
89
84
  FIREBASE_URL: FIREBASE_URL,
90
85
  CREATE_ACCOUNT: CREATE_ACCOUNT_PATH,
91
86
  CHANNEL: CHANNEL_PATH,
92
- CUSTOMER_BASES: CUSTOMER_BASES_PATH,
93
- SALES: SALES_PATH,
94
- EXPECTED_CUSTOMERS: EXPECTED_CUSTOMERS_PATH,
87
+ BRAND_OPERATIONS: BRAND_OPERATIONS,
95
88
  SIGNUP: SIGNUP_PATH,
96
89
  SOURCE_INCOME: SOURCE_INCOME_PATH,
97
90
  MONTHLY_INCOME: MONTHLY_INCOME_PATH,
@@ -111,7 +104,6 @@ export var ENDPOINT_PATHS = {
111
104
  RETRIEVE_ACTIVITIES_LIST_PATH: RETRIEVE_ACTIVITIES_LIST_PATH,
112
105
  DOCUMENT: DOCUMENT_PATH,
113
106
  CREATE_AUTH_NID: CREATE_AUTH_NID_PATH,
114
- SEGMENTS_PATH: SEGMENTS_PATH,
115
107
  TEAM_SIZE_PATH: TEAM_SIZE_PATH,
116
108
  CITIES: CITIES_PATH,
117
109
  INIT: INIT_PATH,
@@ -119,10 +111,8 @@ export var ENDPOINT_PATHS = {
119
111
  RETRIEVE_ACTIVITIES_ISIC: RETRIEVE_ACTIVITIES_ISIC_PATH,
120
112
  CONNECT: CONNECT_PATH,
121
113
  CREATE_CONNECT: CREATE_CONNECT,
122
- SEGMENT_LOCATION: SEGMENT_LOCATION_PATH,
123
- SEGMENT_PROFIT: SEGMENT_PROFIT_PATH,
124
- SEGMENT_TECH: SEGMENT_TECH_PATH,
125
114
  MERCHANT: MERCHANT_PATH,
126
115
  TERMINAL: TERMINAL_PATH,
127
- CURRENCY: CURRENCY_PATH
116
+ CURRENCY: CURRENCY_PATH,
117
+ SEGMENT_LIST: SEGMENT_LIST
128
118
  };
@@ -163,7 +163,7 @@ export var CONNECT_EXPRESS_SCREENS_NAVIGATION = [
163
163
  },
164
164
  {
165
165
  name: 'CONNECT_EXPRESS_AUTH_ACCOUNT_CREATED_STEP',
166
- next: '',
166
+ next: 'CONNECT_EXPRESS_SUCCESS_WITH_FLOW_BUTTONS_STEP',
167
167
  prev: 'CONNECT_EXPRESS_AUTHENTICATION_LIST_STEP',
168
168
  order: 4
169
169
  },
@@ -596,6 +596,12 @@ export var BOARD_SCREENS_NAVIGATION = [
596
596
  prev: '',
597
597
  order: 1
598
598
  },
599
+ {
600
+ name: 'BOARD_LOADING_DATA_STEP',
601
+ next: 'BOARD_SUCCESS_FLOWS_BUTTONS_STEP',
602
+ prev: '',
603
+ order: 1
604
+ },
599
605
  {
600
606
  name: 'BOARD_OPERATOR_ERROR_STEP',
601
607
  next: '',
@@ -57,7 +57,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
57
57
  var _a;
58
58
  import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
59
59
  import { AuthForType, AuthTypeNumber, FlowsTypes, MigrationStatus } from '../../../@types';
60
- import { ADD_NEW_ENTITY, AUTH_STEP_NAMES, IDENTIFICATION_TYPE, defaultCountry } from '../../../constants';
60
+ import { ADD_NEW_ENTITY, AUTH_STEP_NAMES, IDENTIFICATION_TYPE, SCOPE_AUTH, defaultCountry } from '../../../constants';
61
61
  import API from '../../../api';
62
62
  import { handleCurrentActiveScreen, handleNextScreenStep, handleOpen, handlePrevScreenStep, handleSetCountryByIso2 } from '../../../app/settings';
63
63
  import { findCountryByIddPrefix, openConnect, sendCustomEventToGTM, sleep } from '../../../utils';
@@ -650,24 +650,22 @@ export var checkAccountAvailability = createAsyncThunk('auth/checkAccountAvailab
650
650
  export var getMerchantList = createAsyncThunk('auth/getMerchantList', function (_a, thunkApi) {
651
651
  var brandInfo = _a.brandInfo, entityInfo = _a.entityInfo;
652
652
  return __awaiter(void 0, void 0, void 0, function () {
653
- var _b, settings, auth, platforms, payment_provider, payload, merchants, list;
654
- var _c, _d, _e, _f, _g, _h;
655
- return __generator(this, function (_j) {
656
- switch (_j.label) {
653
+ var _b, settings, auth, platforms, payment_provider, isScopeAuthentication, leadId, payload, merchants, list;
654
+ var _c, _d, _e, _f, _g, _h, _j, _k;
655
+ return __generator(this, function (_l) {
656
+ switch (_l.label) {
657
657
  case 0:
658
658
  _b = thunkApi.getState(), settings = _b.settings, auth = _b.auth;
659
659
  platforms = (_e = (_d = (_c = auth.data.responseData) === null || _c === void 0 ? void 0 : _c.leadResponse) === null || _d === void 0 ? void 0 : _d.platforms) !== null && _e !== void 0 ? _e : settings.data.appConfig.platforms;
660
660
  payment_provider = (_h = (_g = (_f = auth.data.responseData) === null || _f === void 0 ? void 0 : _f.leadResponse) === null || _g === void 0 ? void 0 : _g.payment_provider) !== null && _h !== void 0 ? _h : settings.data.appConfig.paymentProvider;
661
- payload = {
662
- business_entity_id: (entityInfo === null || entityInfo === void 0 ? void 0 : entityInfo.id) || '',
663
- brand_id: (brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.id) || '',
664
- create_if_not_present: true,
665
- platforms: platforms,
666
- payment_provider: payment_provider
667
- };
661
+ isScopeAuthentication = settings.data.appConfig.scope === SCOPE_AUTH;
662
+ leadId = (_k = (_j = auth.data.responseData) === null || _j === void 0 ? void 0 : _j.authResponse) === null || _k === void 0 ? void 0 : _k.lead_id;
663
+ payload = __assign({ business_entity_id: (entityInfo === null || entityInfo === void 0 ? void 0 : entityInfo.id) || '', brand_id: (brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.id) || '', create_if_not_present: true, platforms: platforms, payment_provider: payment_provider }, (isScopeAuthentication && {
664
+ lead_id: leadId
665
+ }));
668
666
  return [4, API.entityService.getMerchantListUsingEntityId(payload)];
669
667
  case 1:
670
- merchants = (_j.sent()).merchants;
668
+ merchants = (_l.sent()).merchants;
671
669
  list = merchants || [];
672
670
  if ((list === null || list === void 0 ? void 0 : list.length) > 1) {
673
671
  thunkApi.dispatch(handleNextScreenStep('AUTH_MERCHANT_LIST_STEP'));
@@ -711,16 +709,16 @@ export var createEntity = createAsyncThunk('auth/createEntity', function (params
711
709
  export var confirmInfo = createAsyncThunk('auth/confirmInfo', function (_a, thunkApi) {
712
710
  var brandInfo = _a.brandInfo, entityInfo = _a.entityInfo, merchantInfo = _a.merchantInfo, authId = _a.authId;
713
711
  return __awaiter(void 0, void 0, void 0, function () {
714
- var _b, auth, settings, authResponse, _c, postURL, redirectUrl, bi, authenticationId, body, data, urlQueryStart;
715
- var _d, _e, _f;
716
- return __generator(this, function (_g) {
717
- switch (_g.label) {
712
+ var _b, auth, settings, authResponse, _c, postURL, redirectUrl, showBoard, bi, authenticationId, body, data, urlQueryStart;
713
+ var _d, _e, _f, _g, _h, _j;
714
+ return __generator(this, function (_k) {
715
+ switch (_k.label) {
718
716
  case 0:
719
717
  _b = thunkApi.getState(), auth = _b.auth, settings = _b.settings;
720
718
  authResponse = ((_d = auth.data.responseData) !== null && _d !== void 0 ? _d : {}).authResponse;
721
- _c = settings.data.appConfig, postURL = _c.postURL, redirectUrl = _c.redirectUrl;
719
+ _c = settings.data.appConfig, postURL = _c.postURL, redirectUrl = _c.redirectUrl, showBoard = _c.showBoard;
722
720
  bi = settings.data.deviceInfo.browser.browser_id;
723
- authenticationId = authId || (authResponse === null || authResponse === void 0 ? void 0 : authResponse.id);
721
+ authenticationId = (_e = authId !== null && authId !== void 0 ? authId : authResponse === null || authResponse === void 0 ? void 0 : authResponse.id) !== null && _e !== void 0 ? _e : '';
724
722
  body = {
725
723
  post_url: postURL || '',
726
724
  authentication_id: authenticationId,
@@ -732,8 +730,13 @@ export var confirmInfo = createAsyncThunk('auth/confirmInfo', function (_a, thun
732
730
  };
733
731
  return [4, API.operatorService.confirm(body)];
734
732
  case 1:
735
- data = _g.sent();
736
- (_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, data);
733
+ data = _k.sent();
734
+ (_g = (_f = settings.data.appConfig).onStepCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, settings.data.activeScreen.name, data);
735
+ if (showBoard && (merchantInfo === null || merchantInfo === void 0 ? void 0 : merchantInfo.board_id)) {
736
+ settings.data.appConfig.onFlowCompleted({ auth_id: authenticationId, bi: bi });
737
+ (_j = (_h = settings.data.appConfig).onSwitchToBoard) === null || _j === void 0 ? void 0 : _j.call(_h, (merchantInfo === null || merchantInfo === void 0 ? void 0 : merchantInfo.board_id) || '', authenticationId);
738
+ return [2];
739
+ }
737
740
  if (authenticationId) {
738
741
  if (settings.data.appConfig.mode === 'popup') {
739
742
  settings.data.appConfig.onFlowCompleted({ auth_id: authenticationId, bi: bi });
@@ -7,20 +7,7 @@ interface VerifyLeadTokenProps {
7
7
  }
8
8
  export declare const verifyLeadToken: import("@reduxjs/toolkit").AsyncThunk<{
9
9
  data: any;
10
- individualData: any;
11
- boardResponse: {
12
- user: any;
13
- brand: any;
14
- bank_account: any;
15
- entity: any;
16
- merchant: any;
17
- name: any;
18
- contact: any;
19
- business: any;
20
- individuals: any;
21
- notification: any;
22
- board_status: any;
23
- };
10
+ bankData: any;
24
11
  token: string;
25
12
  }, VerifyLeadTokenProps, {
26
13
  state?: unknown;
@@ -46,6 +33,7 @@ export declare const resendOTP: import("@reduxjs/toolkit").AsyncThunk<{
46
33
  }>;
47
34
  export declare const verifyBankLeadOTP: import("@reduxjs/toolkit").AsyncThunk<{
48
35
  data: any;
36
+ bankData: any;
49
37
  formData: OTPFormValues;
50
38
  }, OTPFormValues, {
51
39
  state?: unknown;
@@ -69,9 +57,12 @@ export declare const retrieveBoardStatus: import("@reduxjs/toolkit").AsyncThunk<
69
57
  fulfilledMeta?: unknown;
70
58
  rejectedMeta?: unknown;
71
59
  }>;
72
- export declare const retrieveBoardDetails: import("@reduxjs/toolkit").AsyncThunk<{
73
- data: any;
74
- }, string, {
60
+ type RetrieveBoardProps = {
61
+ boardId: string;
62
+ individualId: string;
63
+ individualType: string;
64
+ };
65
+ export declare const retrieveBoardDetails: import("@reduxjs/toolkit").AsyncThunk<any, RetrieveBoardProps, {
75
66
  state?: unknown;
76
67
  dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
77
68
  extra?: unknown;
@@ -111,8 +102,11 @@ export declare const checkIbanBank: import("@reduxjs/toolkit").AsyncThunk<{
111
102
  rejectedMeta?: unknown;
112
103
  }>;
113
104
  export declare const updateBoardSuccess: import("@reduxjs/toolkit").AsyncThunk<{
114
- response: any;
115
- formData: void;
105
+ data: any;
106
+ flows?: undefined;
107
+ } | {
108
+ data: any;
109
+ flows: any;
116
110
  } | undefined, void, {
117
111
  state?: unknown;
118
112
  dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;