@tap-payments/auth-jsconnect 2.6.48-test → 2.6.49-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.
@@ -459,14 +459,16 @@ export var updateBrandActivities = createAsyncThunk('brandUpdateBrandActivities'
459
459
  if (!(!isActivitiesNonEditable && (removedActivities === null || removedActivities === void 0 ? void 0 : removedActivities.length) > 0)) return [3, 2];
460
460
  payload = {
461
461
  id: id,
462
- activities: removedActivities
462
+ activities: removedActivities.map(function (a) { return ({
463
+ id: a.id
464
+ }); })
463
465
  };
464
466
  return [4, API.brandService.removeBrandActivity(payload)];
465
467
  case 1:
466
468
  _j.sent();
467
469
  _j.label = 2;
468
470
  case 2:
469
- requestBody = __assign(__assign({ id: id, activities: isActivitiesNonEditable ? undefined : activities }, (isTermsAvailable && {
471
+ requestBody = __assign(__assign({ id: id, activities: isActivitiesNonEditable ? undefined : (activities || []).map(function (a) { return ({ id: a.id }); }) }, (isTermsAvailable && {
470
472
  term_by: (_f = notification === null || notification === void 0 ? void 0 : notification.recipient) === null || _f === void 0 ? void 0 : _f.id,
471
473
  term: ['general', 'refund', 'chargeback']
472
474
  })), { step_name: BRAND_STEP_NAMES.BRAND_ACTIVITIES });
@@ -609,7 +609,10 @@ export var updateActivitiesInfo = createAsyncThunk('updateActivitiesInfo', funct
609
609
  if (!(removedActivities === null || removedActivities === void 0 ? void 0 : removedActivities.length)) return [3, 2];
610
610
  payload = {
611
611
  id: id,
612
- activities: removedActivities
612
+ activities: removedActivities.map(function (_a) {
613
+ var id = _a.id;
614
+ return ({ id: id });
615
+ })
613
616
  };
614
617
  return [4, API.brandService.removeBrandActivity(payload)];
615
618
  case 1:
@@ -68,9 +68,9 @@ export var verifyLeadToken = createAsyncThunk('entityVerifyLeadToken', function
68
68
  var token = _a.token, isInternally = _a.isInternally;
69
69
  return __awaiter(void 0, void 0, void 0, function () {
70
70
  var payload, data, boardData, boardInfoData, entityData, entityTypes, individualData, countryIso2, publicKey, _b, board_id, board_info_id, _c, id_1, type_1, serviceCallBack, _d, boardRes, individualRes, entityId;
71
- var _e, _f, _g, _h, _j;
72
- return __generator(this, function (_k) {
73
- switch (_k.label) {
71
+ var _e, _f, _g, _h, _j, _k;
72
+ return __generator(this, function (_l) {
73
+ switch (_l.label) {
74
74
  case 0:
75
75
  payload = {
76
76
  service_name: 'tap_email',
@@ -78,7 +78,7 @@ export var verifyLeadToken = createAsyncThunk('entityVerifyLeadToken', function
78
78
  };
79
79
  return [4, API.leadService.verifyLeadToken(payload)];
80
80
  case 1:
81
- data = (_k.sent()).data;
81
+ data = (_l.sent()).data;
82
82
  countryIso2 = undefined;
83
83
  if (!(!(data === null || data === void 0 ? void 0 : data.errors) && !(data === null || data === void 0 ? void 0 : data.mw_error))) return [3, 10];
84
84
  if (isInternally)
@@ -97,39 +97,39 @@ export var verifyLeadToken = createAsyncThunk('entityVerifyLeadToken', function
97
97
  if (!board_id) return [3, 6];
98
98
  return [4, API.boardService.retrieveBoardDetails(board_id)];
99
99
  case 2:
100
- boardData = _k.sent();
100
+ boardData = _l.sent();
101
101
  if (!board_info_id) return [3, 4];
102
102
  return [4, API.boardService.retrieveBoardInfo({ id: board_id, infoId: board_info_id })];
103
103
  case 3:
104
- boardInfoData = _k.sent();
105
- _k.label = 4;
104
+ boardInfoData = _l.sent();
105
+ _l.label = 4;
106
106
  case 4:
107
107
  _c = ((_f = boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.notification) === null || _f === void 0 ? void 0 : _f.recipient) || {}, id_1 = _c.id, type_1 = _c.type;
108
108
  serviceCallBack = function () { return API.individualService.retrieveIndividual(id_1, type_1); };
109
109
  return [4, retrieveIndividualData(type_1, boardData, serviceCallBack)];
110
110
  case 5:
111
- _d = _k.sent(), boardRes = _d.boardRes, individualRes = _d.individualRes;
111
+ _d = _l.sent(), boardRes = _d.boardRes, individualRes = _d.individualRes;
112
112
  boardData = boardRes;
113
113
  individualData = individualRes;
114
- _k.label = 6;
114
+ _l.label = 6;
115
115
  case 6:
116
116
  entityId = (_g = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _g === void 0 ? void 0 : _g.id;
117
117
  if (!entityId) return [3, 8];
118
118
  return [4, API.entityService.retrieveEntity(entityId)];
119
119
  case 7:
120
- entityData = _k.sent();
121
- _k.label = 8;
120
+ entityData = _l.sent();
121
+ _l.label = 8;
122
122
  case 8:
123
123
  if (!countryIso2) {
124
- countryIso2 = entityData.country;
124
+ countryIso2 = (_h = entityData === null || entityData === void 0 ? void 0 : entityData.entity) === null || _h === void 0 ? void 0 : _h.country;
125
125
  if (countryIso2)
126
126
  thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
127
127
  }
128
128
  return [4, API.entityService.retrieveEntityType()];
129
129
  case 9:
130
- entityTypes = _k.sent();
130
+ entityTypes = _l.sent();
131
131
  thunkApi.dispatch(handleNextScreenStep('ENTITY_NAME_STEP'));
132
- _k.label = 10;
132
+ _l.label = 10;
133
133
  case 10: return [2, {
134
134
  data: data,
135
135
  individualData: individualData,
@@ -139,8 +139,8 @@ export var verifyLeadToken = createAsyncThunk('entityVerifyLeadToken', function
139
139
  bank_account: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account,
140
140
  entity: entityData === null || entityData === void 0 ? void 0 : entityData.entity,
141
141
  merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant,
142
- name: (_h = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _h === void 0 ? void 0 : _h.names,
143
- contact: (_j = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _j === void 0 ? void 0 : _j.contact,
142
+ name: (_j = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _j === void 0 ? void 0 : _j.names,
143
+ contact: (_k = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _k === void 0 ? void 0 : _k.contact,
144
144
  individuals: boardData === null || boardData === void 0 ? void 0 : boardData.individuals,
145
145
  business: boardData === null || boardData === void 0 ? void 0 : boardData.business,
146
146
  entityTypes: entityTypes,
@@ -395,7 +395,9 @@ export var updateEntityCapital = createAsyncThunk('entityUpdateEntityCapital', f
395
395
  if (!(!isActivitiesNonEditable && (removedActivities === null || removedActivities === void 0 ? void 0 : removedActivities.length) > 0)) return [3, 2];
396
396
  payload_1 = {
397
397
  id: id,
398
- activities: removedActivities
398
+ activities: removedActivities.map(function (a) { return ({
399
+ id: a.id
400
+ }); })
399
401
  };
400
402
  return [4, API.entityService.removeEntityActivities(payload_1)];
401
403
  case 1:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tap-payments/auth-jsconnect",
3
- "version": "2.6.48-test",
3
+ "version": "2.6.49-test",
4
4
  "description": "connect library, auth",
5
5
  "private": false,
6
6
  "main": "build/index.js",