@tap-payments/auth-jsconnect 2.0.21-test → 2.0.21

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 (46) hide show
  1. package/build/api/availabilityServices.d.ts +1 -0
  2. package/build/components/SocialMediaGroup/SocialMediaGroup.js +2 -2
  3. package/build/constants/app.d.ts +5 -0
  4. package/build/constants/app.js +1 -0
  5. package/build/constants/assets.js +1 -1
  6. package/build/constants/validation.d.ts +1 -1
  7. package/build/constants/validation.js +1 -1
  8. package/build/features/app/bank/bankStore.d.ts +5 -1
  9. package/build/features/app/bank/bankStore.js +13 -12
  10. package/build/features/app/business/businessStore.d.ts +1 -3
  11. package/build/features/app/business/businessStore.js +136 -106
  12. package/build/features/app/connect/connectStore.js +9 -5
  13. package/build/features/app/individual/individualStore.d.ts +5 -1
  14. package/build/features/app/individual/individualStore.js +3 -3
  15. package/build/features/app/password/passwordStore.d.ts +10 -2
  16. package/build/features/app/password/passwordStore.js +4 -4
  17. package/build/features/app/signIn/signInStore.js +2 -2
  18. package/build/features/app/tax/taxStore.js +3 -3
  19. package/build/features/bank/screens/BankDetails/BankDetails.js +6 -2
  20. package/build/features/bank/screens/BankDetails/BankStatement.js +6 -3
  21. package/build/features/bank/screens/BankDetails/validation.js +4 -2
  22. package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +1 -1
  23. package/build/features/bank/screens/Verify/Verify.js +2 -2
  24. package/build/features/business/screens/Activities/OperationStartDate.js +6 -0
  25. package/build/features/business/screens/Activities/SalesChannels.js +8 -4
  26. package/build/features/business/screens/Customers/CustomerLocations.js +6 -3
  27. package/build/features/business/screens/Customers/ExpectedCustomers.js +6 -3
  28. package/build/features/business/screens/Customers/ExpectedSalesRange.js +6 -3
  29. package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +1 -1
  30. package/build/features/business/screens/Verify/Verify.js +2 -2
  31. package/build/features/connect/screens/Merchant/SocialMediaCopy.d.ts +9 -0
  32. package/build/features/connect/screens/Merchant/SocialMediaCopy.js +117 -0
  33. package/build/features/connect/screens/Merchant/validationCopy.d.ts +133 -0
  34. package/build/features/connect/screens/Merchant/validationCopy.js +185 -0
  35. package/build/features/connect/screens/ThankYou/ThankYou.js +0 -6
  36. package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +1 -1
  37. package/build/features/individual/screens/Verify/Verify.js +2 -2
  38. package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +1 -1
  39. package/build/features/password/screens/Verify/Verify.js +2 -2
  40. package/build/features/shared/Button/Button.d.ts +2 -1
  41. package/build/features/shared/Button/Button.js +2 -2
  42. package/build/features/shared/Button/SuccessButton.js +1 -1
  43. package/build/features/shared/UploadFile/UploadFile.js +2 -3
  44. package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +1 -1
  45. package/build/features/tax/screens/Verify/Verify.js +2 -2
  46. package/package.json +1 -1
@@ -59,7 +59,7 @@ import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
59
59
  import moment from 'moment';
60
60
  import API from '../../../api';
61
61
  import { BusinessType, FlowsTypes } from '../../../@types';
62
- import { BUSINESS_STEP_NAMES, IDENTIFICATION_TYPE, OTHER_CR_LICENSE, OTHER_FL_LICENSE } from '../../../constants';
62
+ import { BUSINESS_FLOW_SUCCESS, BUSINESS_STEP_NAMES, IDENTIFICATION_TYPE, OTHER_CR_LICENSE, OTHER_FL_LICENSE } from '../../../constants';
63
63
  import { convertNumbers2English, getEighteenYearsAgo, hasKey } from '../../../utils';
64
64
  import { handleNextScreenStep } from '../../../app/settings';
65
65
  export var verifyLeadToken = createAsyncThunk('businessVerifyLeadToken', function (token, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
@@ -97,7 +97,7 @@ export var verifyLeadToken = createAsyncThunk('businessVerifyLeadToken', functio
97
97
  steps = (_c = leadResponse === null || leadResponse === void 0 ? void 0 : leadResponse.data) === null || _c === void 0 ? void 0 : _c.steps;
98
98
  brandID = (_e = (_d = leadResponse === null || leadResponse === void 0 ? void 0 : leadResponse.data) === null || _d === void 0 ? void 0 : _d.brand) === null || _e === void 0 ? void 0 : _e.id;
99
99
  hasBusinessCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_SUCCESS);
100
- hasBusinessCRInfoCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CR_INFO);
100
+ hasBusinessCRInfoCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CR_INFO) && hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_INFO_CONFIRM);
101
101
  hasBusinessCRActivitiesCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CR_ACTIVITIES);
102
102
  hasBusinessCustomersCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CUSTOMERS);
103
103
  if (!hasBusinessCompleted) return [3, 6];
@@ -144,7 +144,7 @@ export var verifyLeadToken = createAsyncThunk('businessVerifyLeadToken', functio
144
144
  _g.label = 17;
145
145
  case 17: return [2, {
146
146
  data: data,
147
- leadData: __assign(__assign({}, leadResponse === null || leadResponse === void 0 ? void 0 : leadResponse.data), { flows: boardResponse === null || boardResponse === void 0 ? void 0 : boardResponse.info }),
147
+ leadData: __assign(__assign({}, leadResponse === null || leadResponse === void 0 ? void 0 : leadResponse.data), { flows: BUSINESS_FLOW_SUCCESS.concat(boardResponse === null || boardResponse === void 0 ? void 0 : boardResponse.info) }),
148
148
  token: token,
149
149
  brandInfo: brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.brand,
150
150
  boardId: (_f = leadResponse === null || leadResponse === void 0 ? void 0 : leadResponse.data) === null || _f === void 0 ? void 0 : _f.board_id
@@ -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,24 +183,24 @@ 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
- hasBusinessCRInfoCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CR_INFO);
203
+ hasBusinessCRInfoCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CR_INFO) && hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_INFO_CONFIRM);
204
204
  hasBusinessCRActivitiesCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CR_ACTIVITIES);
205
205
  hasBusinessCustomersCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CUSTOMERS);
206
206
  if (!isNID) return [3, 3];
@@ -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
  });
@@ -338,10 +338,10 @@ export var retrieveBoardDetails = createAsyncThunk('retrieveBoardDetails', funct
338
338
  });
339
339
  }); });
340
340
  export var updateLeadBusinessType = createAsyncThunk('updateLeadBusinessType', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
341
- var _a, settings, business, payload, data;
342
- var _b, _c, _d, _e, _f;
343
- return __generator(this, function (_g) {
344
- switch (_g.label) {
341
+ var _a, settings, business, payload, data, accountBody, accountData;
342
+ var _b, _c, _d, _e, _f, _g;
343
+ return __generator(this, function (_h) {
344
+ switch (_h.label) {
345
345
  case 0:
346
346
  _a = thunkApi.getState(), settings = _a.settings, business = _a.business;
347
347
  payload = {
@@ -354,24 +354,9 @@ export var updateLeadBusinessType = createAsyncThunk('updateLeadBusinessType', f
354
354
  };
355
355
  return [4, API.leadService.updateLead(payload)];
356
356
  case 1:
357
- data = _g.sent();
358
- return [4, thunkApi.dispatch(createAccount())];
359
- case 2:
360
- _g.sent();
361
- (_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, params);
362
- return [2, { data: data, formData: params }];
363
- }
364
- });
365
- }); });
366
- export var createAccount = createAsyncThunk('createAccount', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
367
- var _a, settings, business, requestBody, data;
368
- var _b, _c, _d;
369
- return __generator(this, function (_e) {
370
- switch (_e.label) {
371
- case 0:
372
- _a = thunkApi.getState(), settings = _a.settings, business = _a.business;
373
- requestBody = {
374
- lead_id: (_b = business.data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.id,
357
+ data = _h.sent();
358
+ accountBody = {
359
+ lead_id: (_e = business.data.verify.responseBody) === null || _e === void 0 ? void 0 : _e.id,
375
360
  notify: {
376
361
  email: false,
377
362
  phone: false
@@ -380,17 +365,15 @@ export var createAccount = createAsyncThunk('createAccount', function (params, t
380
365
  is_acknowledged: true,
381
366
  step_name: BUSINESS_STEP_NAMES.BUSINESS_INFO_CONFIRM
382
367
  };
383
- return [4, API.accountService.createAccount(requestBody)];
384
- case 1:
385
- data = _e.sent();
386
- if (!!data.errors) return [3, 3];
387
- return [4, thunkApi.dispatch(retrieveChannels())];
368
+ return [4, API.accountService.createAccount(accountBody)];
388
369
  case 2:
389
- _e.sent();
370
+ accountData = _h.sent();
371
+ return [4, thunkApi.dispatch(retrieveChannels())];
372
+ case 3:
373
+ _h.sent();
390
374
  thunkApi.dispatch(handleNextScreenStep());
391
- (_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, requestBody);
392
- _e.label = 3;
393
- case 3: return [2, { data: data }];
375
+ (_g = (_f = settings.data.appConfig).onStepCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, settings.data.activeScreen.name, params);
376
+ return [2, { data: data, formData: params, accountData: accountData }];
394
377
  }
395
378
  });
396
379
  }); });
@@ -518,7 +501,10 @@ export var updateLeadSuccess = createAsyncThunk('businessUpdateLeadSuccess', fun
518
501
  (_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, params);
519
502
  (_f = (_e = settings.data.appConfig).onFlowCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, { data: data });
520
503
  thunkApi.dispatch(handleNextScreenStep());
521
- return [2, { response: __assign(__assign({}, data), { flows: boardResponse === null || boardResponse === void 0 ? void 0 : boardResponse.info }), formData: params }];
504
+ return [2, {
505
+ response: __assign(__assign({}, data), { flows: BUSINESS_FLOW_SUCCESS.concat(boardResponse === null || boardResponse === void 0 ? void 0 : boardResponse.info) }),
506
+ formData: params
507
+ }];
522
508
  }
523
509
  });
524
510
  }); });
@@ -597,10 +583,10 @@ export var businessSlice = createSlice({
597
583
  state.customLoading = true;
598
584
  })
599
585
  .addCase(verifyLeadToken.fulfilled, function (state, action) {
600
- var _a, _b, _c, _d;
586
+ var _a, _b, _c, _d, _e, _f;
601
587
  state.error = null;
602
588
  state.customLoading = false;
603
- var _e = action.payload, data = _e.data, token = _e.token, leadData = _e.leadData, brandInfo = _e.brandInfo, boardId = _e.boardId;
589
+ var _g = action.payload, data = _g.data, token = _g.token, leadData = _g.leadData, brandInfo = _g.brandInfo, boardId = _g.boardId;
604
590
  var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
605
591
  if (description) {
606
592
  state.error = description;
@@ -609,7 +595,7 @@ export var businessSlice = createSlice({
609
595
  state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, data), leadData), state.data.verify.responseBody), { board_id: boardId });
610
596
  state.data.verify.token = token;
611
597
  state.data.otpData.isNID = false;
612
- var _f = state.data.verify.responseBody || {}, entity = _f.entity, entity_activities = _f.entity_activities, business_type = _f.business_type;
598
+ var _h = state.data.verify.responseBody || {}, entity = _h.entity, entity_activities = _h.entity_activities, business_type = _h.business_type, brand = _h.brand;
613
599
  var issuingDate = (brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.business_operation_start_at)
614
600
  ? brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.business_operation_start_at
615
601
  : (_b = entity === null || entity === void 0 ? void 0 : entity.license) === null || _b === void 0 ? void 0 : _b.issuing_date;
@@ -618,11 +604,26 @@ export var businessSlice = createSlice({
618
604
  state.data.activitiesData.operationStartDate = convertNumbers2English(formattedDate);
619
605
  }
620
606
  var channels = (_c = state.data.businessTypeData.responseBody) === null || _c === void 0 ? void 0 : _c.channelList;
621
- var selectedChannels = channels === null || channels === void 0 ? void 0 : channels.filter(function (channel) {
622
- var _a;
623
- return (_a = brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.channel_services) === null || _a === void 0 ? void 0 : _a.find(function (storedChannel) { return channel.name_en.toLowerCase() === storedChannel.toLowerCase(); });
624
- });
625
- state.data.activitiesData.salesChannels = (selectedChannels === null || selectedChannels === void 0 ? void 0 : selectedChannels.length) > 0 ? selectedChannels : [channels === null || channels === void 0 ? void 0 : channels[0]];
607
+ var selectedChannels = (!!(channels === null || channels === void 0 ? void 0 : channels[0]) && [channels === null || channels === void 0 ? void 0 : channels[0]]) || [];
608
+ var _j = brand || {}, website = _j.website, social = _j.social;
609
+ var isHasWebsite = (website === null || website === void 0 ? void 0 : website.length) > 0;
610
+ var isHasTwitter = social === null || social === void 0 ? void 0 : social.find(function (s) { return s.includes('twitter.com'); });
611
+ var isHasInstagram = social === null || social === void 0 ? void 0 : social.find(function (s) { return s.includes('instagram.com'); });
612
+ var websiteData = channels === null || channels === void 0 ? void 0 : channels.find(function (c) { return c.name_en.toLocaleLowerCase() === 'website'; });
613
+ var socialData = channels === null || channels === void 0 ? void 0 : channels.find(function (c) { return c.name_en.toLocaleLowerCase() === 'social'; });
614
+ if (isHasWebsite && (isHasTwitter || isHasInstagram))
615
+ selectedChannels = [websiteData, socialData];
616
+ else if (isHasTwitter || isHasInstagram)
617
+ selectedChannels = [socialData];
618
+ else if (isHasWebsite)
619
+ selectedChannels = [websiteData];
620
+ if (((_d = brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.channel_services) === null || _d === void 0 ? void 0 : _d.length) > 0) {
621
+ selectedChannels = channels === null || channels === void 0 ? void 0 : channels.filter(function (channel) {
622
+ var _a;
623
+ return (_a = brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.channel_services) === null || _a === void 0 ? void 0 : _a.find(function (storedChannel) { return channel.name_en.toLowerCase() === storedChannel.toLowerCase(); });
624
+ });
625
+ }
626
+ state.data.activitiesData.salesChannels = selectedChannels;
626
627
  var activities = entity_activities || [];
627
628
  var selectedActivity = activities === null || activities === void 0 ? void 0 : activities.filter(function (activity) {
628
629
  var _a;
@@ -631,11 +632,21 @@ export var businessSlice = createSlice({
631
632
  state.data.activitiesData.activities = (selectedActivity === null || selectedActivity === void 0 ? void 0 : selectedActivity.length) > 0 ? selectedActivity : [activities === null || activities === void 0 ? void 0 : activities[0]];
632
633
  state.data.businessTypeData.responseBody = __assign(__assign({}, state.data.businessTypeData.responseBody), { entity_id: entity === null || entity === void 0 ? void 0 : entity.id, activities: activities });
633
634
  if (!!(entity === null || entity === void 0 ? void 0 : entity.license)) {
634
- state.data.businessTypeData.selectedLicense = {
635
- legal_name: entity === null || entity === void 0 ? void 0 : entity.legal_name,
636
- license: { number: (_d = entity === null || entity === void 0 ? void 0 : entity.license) === null || _d === void 0 ? void 0 : _d.number },
637
- type: business_type
638
- };
635
+ var licenseNumber_1 = (_e = entity === null || entity === void 0 ? void 0 : entity.license) === null || _e === void 0 ? void 0 : _e.number;
636
+ var _k = state.data.businessTypeData || {}, responseBody = _k.responseBody, selectedLicense = _k.selectedLicense;
637
+ var licenseList = (responseBody || {}).licenseList;
638
+ var selectedLicenseData = selectedLicense;
639
+ if (!!licenseNumber_1) {
640
+ selectedLicenseData =
641
+ ((_f = licenseList === null || licenseList === void 0 ? void 0 : licenseList.find) === null || _f === void 0 ? void 0 : _f.call(licenseList, function (_a) {
642
+ var license = _a.license;
643
+ return (license === null || license === void 0 ? void 0 : license.number) === licenseNumber_1;
644
+ })) ||
645
+ business_type === BusinessType.CR
646
+ ? __assign(__assign({}, OTHER_CR_LICENSE), { license: { number: licenseNumber_1 } }) : __assign(__assign({}, OTHER_FL_LICENSE), { license: { number: licenseNumber_1 } });
647
+ state.data.businessTypeData.licenseNumber = licenseNumber_1 || '';
648
+ }
649
+ state.data.businessTypeData.selectedLicense = __assign(__assign({}, selectedLicenseData), { type: business_type });
639
650
  }
640
651
  })
641
652
  .addCase(verifyLeadToken.rejected, function (state, action) {
@@ -664,10 +675,10 @@ export var businessSlice = createSlice({
664
675
  state.error = null;
665
676
  })
666
677
  .addCase(verifyLeadOTP.fulfilled, function (state, action) {
667
- var _a, _b, _c, _d;
678
+ var _a, _b, _c, _d, _e, _f;
668
679
  state.loading = false;
669
680
  state.error = null;
670
- var _e = action.payload, data = _e.data, formData = _e.formData, brandInfo = _e.brandInfo;
681
+ var _g = action.payload, data = _g.data, formData = _g.formData, brandInfo = _g.brandInfo;
671
682
  var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
672
683
  if (description) {
673
684
  state.error = description;
@@ -675,7 +686,7 @@ export var businessSlice = createSlice({
675
686
  }
676
687
  state.data.otpData = formData;
677
688
  state.data.otpData.responseBody = data;
678
- var _f = state.data.verify.responseBody || {}, entity = _f.entity, entity_activities = _f.entity_activities, business_type = _f.business_type;
689
+ var _h = state.data.verify.responseBody || {}, entity = _h.entity, entity_activities = _h.entity_activities, business_type = _h.business_type, brand = _h.brand;
679
690
  var issuingDate = (brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.business_operation_start_at)
680
691
  ? brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.business_operation_start_at
681
692
  : (_b = entity === null || entity === void 0 ? void 0 : entity.license) === null || _b === void 0 ? void 0 : _b.issuing_date;
@@ -684,11 +695,26 @@ export var businessSlice = createSlice({
684
695
  state.data.activitiesData.operationStartDate = convertNumbers2English(formattedDate);
685
696
  }
686
697
  var channels = (_c = state.data.businessTypeData.responseBody) === null || _c === void 0 ? void 0 : _c.channelList;
687
- var selectedChannels = channels === null || channels === void 0 ? void 0 : channels.filter(function (channel) {
688
- var _a;
689
- return (_a = brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.channel_services) === null || _a === void 0 ? void 0 : _a.find(function (storedChannel) { return channel.name_en.toLowerCase() === storedChannel.toLowerCase(); });
690
- });
691
- state.data.activitiesData.salesChannels = (selectedChannels === null || selectedChannels === void 0 ? void 0 : selectedChannels.length) > 0 ? selectedChannels : [channels === null || channels === void 0 ? void 0 : channels[0]];
698
+ var selectedChannels = (!!(channels === null || channels === void 0 ? void 0 : channels[0]) && [channels === null || channels === void 0 ? void 0 : channels[0]]) || [];
699
+ var _j = brand || {}, website = _j.website, social = _j.social;
700
+ var isHasWebsite = (website === null || website === void 0 ? void 0 : website.length) > 0;
701
+ var isHasTwitter = social === null || social === void 0 ? void 0 : social.find(function (s) { return s.includes('twitter.com'); });
702
+ var isHasInstagram = social === null || social === void 0 ? void 0 : social.find(function (s) { return s.includes('instagram.com'); });
703
+ var websiteData = channels === null || channels === void 0 ? void 0 : channels.find(function (c) { return c.name_en.toLocaleLowerCase() === 'website'; });
704
+ var socialData = channels === null || channels === void 0 ? void 0 : channels.find(function (c) { return c.name_en.toLocaleLowerCase() === 'social'; });
705
+ if (isHasWebsite && (isHasTwitter || isHasInstagram))
706
+ selectedChannels = [websiteData, socialData];
707
+ else if (isHasTwitter || isHasInstagram)
708
+ selectedChannels = [socialData];
709
+ else if (isHasWebsite)
710
+ selectedChannels = [websiteData];
711
+ if (((_d = brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.channel_services) === null || _d === void 0 ? void 0 : _d.length) > 0) {
712
+ selectedChannels = channels === null || channels === void 0 ? void 0 : channels.filter(function (channel) {
713
+ var _a;
714
+ return (_a = brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.channel_services) === null || _a === void 0 ? void 0 : _a.find(function (storedChannel) { return channel.name_en.toLowerCase() === storedChannel.toLowerCase(); });
715
+ });
716
+ }
717
+ state.data.activitiesData.salesChannels = selectedChannels;
692
718
  var activities = entity_activities || [];
693
719
  var selectedActivity = activities === null || activities === void 0 ? void 0 : activities.filter(function (activity) {
694
720
  var _a;
@@ -697,11 +723,21 @@ export var businessSlice = createSlice({
697
723
  state.data.activitiesData.activities = (selectedActivity === null || selectedActivity === void 0 ? void 0 : selectedActivity.length) > 0 ? selectedActivity : [activities === null || activities === void 0 ? void 0 : activities[0]];
698
724
  state.data.businessTypeData.responseBody = __assign(__assign({}, state.data.businessTypeData.responseBody), { entity_id: entity === null || entity === void 0 ? void 0 : entity.id, activities: activities });
699
725
  if (!!(entity === null || entity === void 0 ? void 0 : entity.license)) {
700
- state.data.businessTypeData.selectedLicense = {
701
- legal_name: entity === null || entity === void 0 ? void 0 : entity.legal_name,
702
- license: { number: (_d = entity === null || entity === void 0 ? void 0 : entity.license) === null || _d === void 0 ? void 0 : _d.number },
703
- type: business_type
704
- };
726
+ var licenseNumber_2 = (_e = entity === null || entity === void 0 ? void 0 : entity.license) === null || _e === void 0 ? void 0 : _e.number;
727
+ var _k = state.data.businessTypeData || {}, responseBody = _k.responseBody, selectedLicense = _k.selectedLicense;
728
+ var licenseList = (responseBody || {}).licenseList;
729
+ var selectedLicenseData = selectedLicense;
730
+ if (!!licenseNumber_2) {
731
+ selectedLicenseData =
732
+ ((_f = licenseList === null || licenseList === void 0 ? void 0 : licenseList.find) === null || _f === void 0 ? void 0 : _f.call(licenseList, function (_a) {
733
+ var license = _a.license;
734
+ return (license === null || license === void 0 ? void 0 : license.number) === licenseNumber_2;
735
+ })) ||
736
+ business_type === BusinessType.CR
737
+ ? __assign(__assign({}, OTHER_CR_LICENSE), { license: { number: licenseNumber_2 } }) : __assign(__assign({}, OTHER_FL_LICENSE), { license: { number: licenseNumber_2 } });
738
+ state.data.businessTypeData.licenseNumber = licenseNumber_2 || '';
739
+ }
740
+ state.data.businessTypeData.selectedLicense = __assign(__assign({}, selectedLicenseData), { type: business_type });
705
741
  }
706
742
  })
707
743
  .addCase(verifyLeadOTP.rejected, function (state, action) {
@@ -755,7 +791,7 @@ export var businessSlice = createSlice({
755
791
  state.loading = true;
756
792
  })
757
793
  .addCase(retrieveEntityList.fulfilled, function (state, action) {
758
- var _a, _b, _c, _d, _e, _f, _g;
794
+ var _a, _b, _c, _d;
759
795
  state.error = null;
760
796
  state.loading = false;
761
797
  var data = action.payload;
@@ -777,15 +813,11 @@ export var businessSlice = createSlice({
777
813
  }
778
814
  licenseList = __spreadArray(__spreadArray([], licenseList, true), [OTHER_CR_LICENSE, OTHER_FL_LICENSE], false);
779
815
  state.data.businessTypeData.responseBody = __assign(__assign({}, state.data.businessTypeData.responseBody), { licenseList: licenseList });
780
- var licenseNumber = (((_c = (_b = state.data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.entity) === null || _c === void 0 ? void 0 : _c.license) || {}).number;
781
- var selectedLicense = ((_d = licenseList === null || licenseList === void 0 ? void 0 : licenseList.find) === null || _d === void 0 ? void 0 : _d.call(licenseList, function (_a) {
782
- var license = _a.license;
783
- return (license === null || license === void 0 ? void 0 : license.number) === licenseNumber;
784
- })) || (licenseList === null || licenseList === void 0 ? void 0 : licenseList[0]);
816
+ var selectedLicense = licenseList === null || licenseList === void 0 ? void 0 : licenseList[0];
817
+ var isOtherLicense = ((_b = selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.license) === null || _b === void 0 ? void 0 : _b.number) === 'other_fl' || ((_c = selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.license) === null || _c === void 0 ? void 0 : _c.number) === 'other_cr';
785
818
  state.data.businessTypeData.selectedLicense = selectedLicense;
786
- var isOtherLicense = ((_e = selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.license) === null || _e === void 0 ? void 0 : _e.number) === 'other_fl' || ((_f = selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.license) === null || _f === void 0 ? void 0 : _f.number) === 'other_cr';
787
819
  if (!isOtherLicense)
788
- state.data.businessTypeData.licenseNumber = ((_g = selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.license) === null || _g === void 0 ? void 0 : _g.number) || '';
820
+ state.data.businessTypeData.licenseNumber = ((_d = selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.license) === null || _d === void 0 ? void 0 : _d.number) || '';
789
821
  })
790
822
  .addCase(retrieveEntityList.rejected, function (state, action) {
791
823
  state.error = action.error.message;
@@ -821,9 +853,21 @@ export var businessSlice = createSlice({
821
853
  }
822
854
  var channels = data || [];
823
855
  state.data.businessTypeData.responseBody = __assign(__assign({}, state.data.businessTypeData.responseBody), { channelList: channels });
824
- var selectedChannel = channels === null || channels === void 0 ? void 0 : channels[0];
825
- if (!!selectedChannel)
826
- state.data.activitiesData.salesChannels = [selectedChannel];
856
+ var brand = (state.data.verify.responseBody || {}).brand;
857
+ var selectedChannels = (!!(channels === null || channels === void 0 ? void 0 : channels[0]) && [channels === null || channels === void 0 ? void 0 : channels[0]]) || [];
858
+ var _b = brand || {}, website = _b.website, social = _b.social;
859
+ var isHasWebsite = (website === null || website === void 0 ? void 0 : website.length) > 0;
860
+ var isHasTwitter = social === null || social === void 0 ? void 0 : social.find(function (s) { return s.includes('twitter.com'); });
861
+ var isHasInstagram = social === null || social === void 0 ? void 0 : social.find(function (s) { return s.includes('instagram.com'); });
862
+ var websiteData = channels === null || channels === void 0 ? void 0 : channels.find(function (c) { return c.name_en.toLocaleLowerCase() === 'website'; });
863
+ var socialData = channels === null || channels === void 0 ? void 0 : channels.find(function (c) { return c.name_en.toLocaleLowerCase() === 'social'; });
864
+ if (isHasWebsite && (isHasTwitter || isHasInstagram))
865
+ selectedChannels = [websiteData, socialData];
866
+ else if (isHasTwitter || isHasInstagram)
867
+ selectedChannels = [socialData];
868
+ else if (isHasWebsite)
869
+ selectedChannels = [websiteData];
870
+ state.data.activitiesData.salesChannels = selectedChannels;
827
871
  })
828
872
  .addCase(retrieveChannels.rejected, function (state, action) {
829
873
  state.error = action.error.message;
@@ -837,10 +881,14 @@ export var businessSlice = createSlice({
837
881
  var _a;
838
882
  state.loading = false;
839
883
  state.error = null;
840
- var _b = action.payload, data = _b.data, formData = _b.formData;
884
+ var _b = action.payload, data = _b.data, formData = _b.formData, accountData = _b.accountData;
841
885
  state.data.businessTypeData = __assign(__assign({}, state.data.businessTypeData), formData);
842
886
  var entity = data.entity, entity_activities = data.entity_activities;
843
887
  var issuingDate = (_a = entity === null || entity === void 0 ? void 0 : entity.license) === null || _a === void 0 ? void 0 : _a.issuing_date;
888
+ if ((accountData === null || accountData === void 0 ? void 0 : accountData.status) === 'ALREADY_TAKEN') {
889
+ state.error = 'signup_user_exists_error';
890
+ return;
891
+ }
844
892
  if (!!issuingDate) {
845
893
  var formattedDate = moment(issuingDate).format('YYYY-MM-DD');
846
894
  state.data.activitiesData.operationStartDate = convertNumbers2English(formattedDate);
@@ -849,30 +897,12 @@ export var businessSlice = createSlice({
849
897
  var selectedActivity = activities === null || activities === void 0 ? void 0 : activities[0];
850
898
  if (!!selectedActivity)
851
899
  state.data.activitiesData.activities = [selectedActivity];
852
- state.data.businessTypeData.responseBody = __assign(__assign(__assign({}, data), state.data.businessTypeData.responseBody), { activities: activities });
900
+ state.data.businessTypeData.responseBody = __assign(__assign(__assign(__assign({}, data), state.data.businessTypeData.responseBody), { activities: activities }), accountData);
853
901
  state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { entity: entity });
854
902
  })
855
903
  .addCase(updateLeadBusinessType.rejected, function (state, action) {
856
904
  state.loading = false;
857
905
  state.error = action.error.message;
858
- })
859
- .addCase(createAccount.pending, function (state) {
860
- state.loading = true;
861
- state.error = null;
862
- })
863
- .addCase(createAccount.fulfilled, function (state, action) {
864
- state.loading = false;
865
- state.error = null;
866
- var data = action.payload.data;
867
- if ((data === null || data === void 0 ? void 0 : data.status) === 'ALREADY_TAKEN') {
868
- state.error = 'signup_user_exists_error';
869
- return;
870
- }
871
- state.data.businessTypeData.responseBody = __assign(__assign({}, state.data.businessTypeData.responseBody), data);
872
- })
873
- .addCase(createAccount.rejected, function (state, action) {
874
- state.loading = false;
875
- state.error = action.error.message;
876
906
  })
877
907
  .addCase(updateActivitiesInfo.pending, function (state) {
878
908
  state.loading = true;
@@ -362,6 +362,7 @@ export var updateLeadBrand = createAsyncThunk('updateLeadBrand', function (param
362
362
  return [4, API.leadService.updateLead(payload)];
363
363
  case 1:
364
364
  data = _q.sent();
365
+ thunkApi.dispatch(updateLeadSuccess());
365
366
  thunkApi.dispatch(handleNextScreenStep());
366
367
  (_p = (_o = settings.data.appConfig).onStepCompleted) === null || _p === void 0 ? void 0 : _p.call(_o, settings.data.activeScreen.name, params);
367
368
  return [2, { response: data, formData: params }];
@@ -390,20 +391,23 @@ export var checkEmailAvailability = createAsyncThunk('checkEmailAvailability', f
390
391
  });
391
392
  });
392
393
  });
393
- export var checkBrandNameAvailability = createAsyncThunk('checkBrandNameAvailability', function (_a) {
394
+ export var checkBrandNameAvailability = createAsyncThunk('checkBrandNameAvailability', function (_a, thunkApi) {
394
395
  var cancelToken = _a.cancelToken, name = _a.name, onSuccess = _a.onSuccess;
395
396
  return __awaiter(void 0, void 0, void 0, function () {
396
- var requestBody, data;
397
- return __generator(this, function (_b) {
398
- switch (_b.label) {
397
+ var settings, requestBody, data;
398
+ var _b;
399
+ return __generator(this, function (_c) {
400
+ switch (_c.label) {
399
401
  case 0:
402
+ settings = thunkApi.getState().settings;
400
403
  requestBody = {
401
404
  profile_name: name,
405
+ country_code: (_b = settings.data.businessCountry) === null || _b === void 0 ? void 0 : _b.iso2,
402
406
  encryption_contract: ['profile_name']
403
407
  };
404
408
  return [4, API.availabilityServices.checkBrand(requestBody, { cancelToken: cancelToken })];
405
409
  case 1:
406
- data = (_b.sent()).data;
410
+ data = (_c.sent()).data;
407
411
  onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess();
408
412
  if (!data.errors)
409
413
  return [2, { response: data, formData: { name: name } }];
@@ -12,7 +12,11 @@ export declare const verifyLeadToken: import("@reduxjs/toolkit").AsyncThunk<{
12
12
  contact: any;
13
13
  countries: CountryCode[];
14
14
  countryCode: any;
15
- flows: any;
15
+ flows: {
16
+ name: string;
17
+ status: string;
18
+ url: string;
19
+ }[];
16
20
  };
17
21
  token: string;
18
22
  }, string, {}>;
@@ -50,7 +50,7 @@ import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
50
50
  import API from '../../../api';
51
51
  import { FlowsTypes } from '../../../@types';
52
52
  import { handleCurrentActiveScreen, handleNextScreenStep } from '../../../app/settings';
53
- import { INDIVIDUAl_STEP_NAMES } from '../../../constants';
53
+ import { BUSINESS_FLOW_SUCCESS, INDIVIDUAl_STEP_NAMES } from '../../../constants';
54
54
  export var verifyLeadToken = createAsyncThunk('individualVerifyLeadToken', function (token, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
55
55
  var payload, settings, data, boardData, countryCode, boardInfoData, countries, board_id, board_info_id, entity, info, hasIndividualCompleted;
56
56
  var _a, _b, _c;
@@ -107,7 +107,7 @@ export var verifyLeadToken = createAsyncThunk('individualVerifyLeadToken', funct
107
107
  contact: (_c = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _c === void 0 ? void 0 : _c.contact,
108
108
  countries: countries,
109
109
  countryCode: countryCode,
110
- flows: boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info
110
+ flows: BUSINESS_FLOW_SUCCESS.concat(boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info)
111
111
  },
112
112
  token: token
113
113
  }];
@@ -252,7 +252,7 @@ export var updateBoardSuccess = createAsyncThunk('individualUpdateBoardSuccess',
252
252
  (_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, params);
253
253
  (_f = (_e = settings.data.appConfig).onFlowCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, { data: data });
254
254
  thunkApi.dispatch(handleNextScreenStep());
255
- return [2, { response: __assign(__assign({}, data), { flows: data === null || data === void 0 ? void 0 : data.info }), formData: params }];
255
+ return [2, { response: __assign(__assign({}, data), { flows: BUSINESS_FLOW_SUCCESS.concat(data === null || data === void 0 ? void 0 : data.info) }), formData: params }];
256
256
  }
257
257
  });
258
258
  }); });
@@ -3,7 +3,11 @@ import { FlowsTypes, OTPFormValues, PasswordCreateFormValues, ResponseData, Shar
3
3
  export declare const verifyLeadToken: import("@reduxjs/toolkit").AsyncThunk<{
4
4
  data: any;
5
5
  boardResponse: {
6
- flows: any;
6
+ flows: {
7
+ name: string;
8
+ status: string;
9
+ url: string;
10
+ }[];
7
11
  };
8
12
  token: string;
9
13
  }, string, {}>;
@@ -31,7 +35,11 @@ export declare const verifyOperationToken: import("@reduxjs/toolkit").AsyncThunk
31
35
  data: any;
32
36
  token: string;
33
37
  boardId: string;
34
- flows: any;
38
+ flows: {
39
+ name: string;
40
+ status: string;
41
+ url: string;
42
+ }[];
35
43
  }, {
36
44
  token: string;
37
45
  boardId: string;
@@ -50,7 +50,7 @@ import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
50
50
  import API from '../../../api';
51
51
  import { FlowsTypes } from '../../../@types';
52
52
  import { handleCurrentActiveScreen, handleNextScreenStep } from '../../../app/settings';
53
- import { PASSWORD_OPERATION_TYPE, PASSWORD_STEP_NAMES } from '../../../constants';
53
+ import { BUSINESS_FLOW_SUCCESS, PASSWORD_OPERATION_TYPE, PASSWORD_STEP_NAMES } from '../../../constants';
54
54
  export var verifyLeadToken = createAsyncThunk('passwordVerifyLeadToken', function (token, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
55
55
  var payload, data, boardInfoData, board_id, board_info_id, info, hasPasswordCompleted;
56
56
  var _a;
@@ -88,7 +88,7 @@ export var verifyLeadToken = createAsyncThunk('passwordVerifyLeadToken', functio
88
88
  thunkApi.dispatch(handleNextScreenStep('PASSWORD_CREATE_PASSWORD_STEP'));
89
89
  }
90
90
  _b.label = 5;
91
- case 5: return [2, { data: data, boardResponse: { flows: boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info }, token: token }];
91
+ case 5: return [2, { data: data, boardResponse: { flows: BUSINESS_FLOW_SUCCESS.concat(boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) }, token: token }];
92
92
  }
93
93
  });
94
94
  }); });
@@ -202,7 +202,7 @@ export var updateBoardSuccess = createAsyncThunk('passwordUpdateBoardSuccess', f
202
202
  (_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, params);
203
203
  (_f = (_e = settings.data.appConfig).onFlowCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, { data: data });
204
204
  thunkApi.dispatch(handleNextScreenStep());
205
- return [2, { response: __assign(__assign({}, data), { flows: data === null || data === void 0 ? void 0 : data.info }), formData: params }];
205
+ return [2, { response: __assign(__assign({}, data), { flows: BUSINESS_FLOW_SUCCESS.concat(data === null || data === void 0 ? void 0 : data.info) }), formData: params }];
206
206
  }
207
207
  });
208
208
  }); });
@@ -227,7 +227,7 @@ export var verifyOperationToken = createAsyncThunk('verifyOperationToken', funct
227
227
  _a.label = 3;
228
228
  case 3:
229
229
  thunkApi.dispatch(handleNextScreenStep('PASSWORD_CREATE_PASSWORD_STEP'));
230
- return [2, { data: data, token: token, boardId: boardId, flows: boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info }];
230
+ return [2, { data: data, token: token, boardId: boardId, flows: BUSINESS_FLOW_SUCCESS.concat(boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) }];
231
231
  }
232
232
  });
233
233
  }); });
@@ -177,7 +177,7 @@ export var verifyAuthOTP = createAsyncThunk('signIn/verifyAuthOTP', function (pa
177
177
  new_user: responseBody === null || responseBody === void 0 ? void 0 : responseBody.new_user,
178
178
  sign_in: responseBody === null || responseBody === void 0 ? void 0 : responseBody.sign_in,
179
179
  remember_me: responseBody === null || responseBody === void 0 ? void 0 : responseBody.remember_me,
180
- scopes: responseBody === null || responseBody === void 0 ? void 0 : responseBody.scopes,
180
+ scopes: (responseBody === null || responseBody === void 0 ? void 0 : responseBody.scopes) || settings.data.appConfig.scope,
181
181
  step_name: mobile ? SignIn_STEP_NAMES.VERIFY_AUTH_MOBILE_OTP : SignIn_STEP_NAMES.VERIFY_AUTH_EMAIL_OTP,
182
182
  encryption_contract: ['data']
183
183
  };
@@ -210,7 +210,7 @@ export var verifyAuthPassword = createAsyncThunk('signIn/verifyAuthPassword', fu
210
210
  new_user: responseBody === null || responseBody === void 0 ? void 0 : responseBody.new_user,
211
211
  sign_in: responseBody === null || responseBody === void 0 ? void 0 : responseBody.sign_in,
212
212
  remember_me: responseBody === null || responseBody === void 0 ? void 0 : responseBody.remember_me,
213
- scopes: responseBody === null || responseBody === void 0 ? void 0 : responseBody.scopes,
213
+ scopes: (responseBody === null || responseBody === void 0 ? void 0 : responseBody.scopes) || settings.data.appConfig.scope,
214
214
  step_name: mobile ? SignIn_STEP_NAMES.VERIFY_AUTH_MOBILE : SignIn_STEP_NAMES.VERIFY_AUTH_EMAIL,
215
215
  encryption_contract: ['data']
216
216
  };