@tap-payments/auth-jsconnect 2.0.21-test → 2.0.23-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.
@@ -158,9 +158,9 @@ export var retrieveBoardDetails = createAsyncThunk('retrieveBankEntityInfo', fun
158
158
  }); });
159
159
  export var createBankAccount = createAsyncThunk('createBankAccount', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
160
160
  var _a, settings, bank, iban, beneficiaryName, bank_name, fileResponse, uploadPayload, requestBody, data;
161
- var _b, _c, _d, _e, _f, _g, _h;
162
- return __generator(this, function (_j) {
163
- switch (_j.label) {
161
+ var _b, _c, _d, _e, _f, _g, _h, _j;
162
+ return __generator(this, function (_k) {
163
+ switch (_k.label) {
164
164
  case 0:
165
165
  _a = thunkApi.getState(), settings = _a.settings, bank = _a.bank;
166
166
  iban = params.iban;
@@ -176,11 +176,11 @@ export var createBankAccount = createAsyncThunk('createBankAccount', function (p
176
176
  if (!params.bankStatementFile) return [3, 2];
177
177
  return [4, API.entityService.uploadFileInfo(uploadPayload)];
178
178
  case 1:
179
- fileResponse = _j.sent();
180
- _j.label = 2;
179
+ fileResponse = _k.sent();
180
+ _k.label = 2;
181
181
  case 2:
182
182
  requestBody = {
183
- wallet_id: (_f = (_e = (_d = (_c = bank.data.verify.responseBody) === null || _c === void 0 ? void 0 : _c.entity) === null || _d === void 0 ? void 0 : _d.merchant) === null || _e === void 0 ? void 0 : _e.wallet) === null || _f === void 0 ? void 0 : _f.id,
183
+ wallet_id: (_g = (_f = (_e = (_d = (_c = bank.data.verify.responseBody) === null || _c === void 0 ? void 0 : _c.business) === null || _d === void 0 ? void 0 : _d.entity) === null || _e === void 0 ? void 0 : _e.merchant) === null || _f === void 0 ? void 0 : _f.wallet) === null || _g === void 0 ? void 0 : _g.id,
184
184
  bank_account: {
185
185
  iban: iban,
186
186
  beneficiary_name: beneficiaryName,
@@ -193,10 +193,10 @@ export var createBankAccount = createAsyncThunk('createBankAccount', function (p
193
193
  };
194
194
  return [4, API.entityService.createBankAccount(requestBody)];
195
195
  case 3:
196
- data = (_j.sent()).data;
196
+ data = (_k.sent()).data;
197
197
  if (!data.errors) {
198
198
  thunkApi.dispatch(handleNextScreenStep());
199
- (_h = (_g = settings.data.appConfig).onStepCompleted) === null || _h === void 0 ? void 0 : _h.call(_g, settings.data.activeScreen.name, requestBody);
199
+ (_j = (_h = settings.data.appConfig).onStepCompleted) === null || _j === void 0 ? void 0 : _j.call(_h, settings.data.activeScreen.name, requestBody);
200
200
  }
201
201
  return [2, { data: data, formData: params }];
202
202
  }
@@ -171,9 +171,9 @@ export var resendOTP = createAsyncThunk('resendOTPBusiness', function (params, t
171
171
  }); });
172
172
  export var verifyLeadOTP = createAsyncThunk('verifyLeadOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
173
173
  var _a, business, settings, isNID, responseBody, verifyResponse, stepName, brandID, payload, data, brandInfo, steps, hasBusinessCompleted, hasBusinessCRInfoCompleted, hasBusinessCRActivitiesCompleted, hasBusinessCustomersCompleted;
174
- var _b, _c, _d, _e, _f, _g, _h;
175
- return __generator(this, function (_j) {
176
- switch (_j.label) {
174
+ var _b, _c, _d, _e, _f, _g, _h, _j;
175
+ return __generator(this, function (_k) {
176
+ switch (_k.label) {
177
177
  case 0:
178
178
  _a = thunkApi.getState(), business = _a.business, settings = _a.settings;
179
179
  isNID = business.data.otpData.isNID;
@@ -183,21 +183,21 @@ export var verifyLeadOTP = createAsyncThunk('verifyLeadOTP', function (params, t
183
183
  brandID = (_c = (_b = business.data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.brand) === null || _c === void 0 ? void 0 : _c.id;
184
184
  payload = {
185
185
  data: params.otp,
186
- service_name: (_e = (_d = responseBody === null || responseBody === void 0 ? void 0 : responseBody.verification_token) === null || _d === void 0 ? void 0 : _d.verification_by) === null || _e === void 0 ? void 0 : _e.service_name,
187
- verify_token: (_f = responseBody === null || responseBody === void 0 ? void 0 : responseBody.verification_token) === null || _f === void 0 ? void 0 : _f.verify_token,
186
+ service_name: ((_e = (_d = responseBody === null || responseBody === void 0 ? void 0 : responseBody.verification_token) === null || _d === void 0 ? void 0 : _d.verification_by) === null || _e === void 0 ? void 0 : _e.service_name) || ((_f = responseBody === null || responseBody === void 0 ? void 0 : responseBody.verification_by) === null || _f === void 0 ? void 0 : _f.service_name),
187
+ verify_token: ((_g = responseBody === null || responseBody === void 0 ? void 0 : responseBody.verification_token) === null || _g === void 0 ? void 0 : _g.verify_token) || (responseBody === null || responseBody === void 0 ? void 0 : responseBody.verify_token),
188
188
  step_name: stepName,
189
189
  encryption_contract: ['data']
190
190
  };
191
191
  return [4, API.leadService.verifyLeadOTP(payload)];
192
192
  case 1:
193
- data = (_j.sent()).data;
193
+ data = (_k.sent()).data;
194
194
  brandInfo = undefined;
195
195
  if (!!data.errors) return [3, 13];
196
196
  thunkApi.dispatch(updateStepName(stepName));
197
197
  return [4, thunkApi.dispatch(retrieveEntityList({ leadId: data === null || data === void 0 ? void 0 : data.id }))];
198
198
  case 2:
199
- _j.sent();
200
- (_h = (_g = settings.data.appConfig).onStepCompleted) === null || _h === void 0 ? void 0 : _h.call(_g, settings.data.activeScreen.name, { otp: params.otp });
199
+ _k.sent();
200
+ (_j = (_h = settings.data.appConfig).onStepCompleted) === null || _j === void 0 ? void 0 : _j.call(_h, settings.data.activeScreen.name, { otp: params.otp });
201
201
  steps = responseBody === null || responseBody === void 0 ? void 0 : responseBody.steps;
202
202
  hasBusinessCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_SUCCESS);
203
203
  hasBusinessCRInfoCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CR_INFO);
@@ -210,7 +210,7 @@ export var verifyLeadOTP = createAsyncThunk('verifyLeadOTP', function (params, t
210
210
  if (!hasBusinessCompleted) return [3, 5];
211
211
  return [4, thunkApi.dispatch(retrieveBoardDetails(verifyResponse === null || verifyResponse === void 0 ? void 0 : verifyResponse.board_id))];
212
212
  case 4:
213
- _j.sent();
213
+ _k.sent();
214
214
  thunkApi.dispatch(handleNextScreenStep('BUSINESS_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
215
215
  return [3, 13];
216
216
  case 5:
@@ -228,21 +228,21 @@ export var verifyLeadOTP = createAsyncThunk('verifyLeadOTP', function (params, t
228
228
  thunkApi.dispatch(handleNextScreenStep('BUSINESS_CUSTOMERS_STEP'));
229
229
  return [4, API.brandService.retrieveBrand(brandID)];
230
230
  case 8:
231
- brandInfo = _j.sent();
231
+ brandInfo = _k.sent();
232
232
  return [3, 13];
233
233
  case 9:
234
234
  if (!hasBusinessCRInfoCompleted) return [3, 12];
235
235
  return [4, thunkApi.dispatch(retrieveChannels())];
236
236
  case 10:
237
- _j.sent();
237
+ _k.sent();
238
238
  return [4, API.brandService.retrieveBrand(brandID)];
239
239
  case 11:
240
- brandInfo = _j.sent();
240
+ brandInfo = _k.sent();
241
241
  thunkApi.dispatch(handleNextScreenStep('BUSINESS_ACTIVITIES_STEP'));
242
242
  return [3, 13];
243
243
  case 12:
244
244
  thunkApi.dispatch(handleNextScreenStep('BUSINESS_BUSINESS_TYPE_STEP'));
245
- _j.label = 13;
245
+ _k.label = 13;
246
246
  case 13: return [2, { data: data, formData: __assign(__assign({}, params), { isNID: isNID }), brandInfo: brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.brand }];
247
247
  }
248
248
  });
@@ -24,7 +24,7 @@ export declare const TextStyled: import("@emotion/styled").StyledComponent<impor
24
24
  export declare const LinkStyled: import("@emotion/styled").StyledComponent<Omit<import("@mui/material/Link").LinkBaseProps, "classes"> & {
25
25
  children?: React.ReactNode;
26
26
  classes?: Partial<import("@mui/material/Link").LinkClasses> | undefined;
27
- color?: import("@mui/system/styleFunctionSx").ResponsiveStyleValue<string[] | import("csstype").Property.Color | undefined> | ((theme: import("@mui/material/styles").Theme) => import("@mui/system/styleFunctionSx").ResponsiveStyleValue<string[] | import("csstype").Property.Color | undefined>);
27
+ color?: import("@mui/system/styleFunctionSx").ResponsiveStyleValue<import("csstype").Property.Color | import("csstype").Property.Color[] | undefined> | ((theme: import("@mui/material/styles").Theme) => import("@mui/system/styleFunctionSx").ResponsiveStyleValue<import("csstype").Property.Color | import("csstype").Property.Color[] | undefined>);
28
28
  sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
29
29
  TypographyClasses?: (Partial<import("@mui/material").TypographyClasses> & Partial<import("@mui/material/styles").ClassNameMap<never>>) | undefined;
30
30
  underline?: "none" | "always" | "hover" | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tap-payments/auth-jsconnect",
3
- "version": "2.0.21-test",
3
+ "version": "2.0.23-test",
4
4
  "description": "connect library, auth",
5
5
  "private": false,
6
6
  "main": "build/index.js",