@tap-payments/auth-jsconnect 2.8.86-development → 2.8.87-development
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.
|
@@ -366,16 +366,17 @@ export var verifyEmailOtp = createAsyncThunk('auth/verifyEmailOtp', function (pa
|
|
|
366
366
|
});
|
|
367
367
|
}); });
|
|
368
368
|
export var createNafathAuth = createAsyncThunk('auth/createNafathAuth', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
369
|
-
var settings, requestBody, data;
|
|
370
|
-
var
|
|
371
|
-
return __generator(this, function (
|
|
372
|
-
switch (
|
|
369
|
+
var _a, settings, auth, requestBody, data;
|
|
370
|
+
var _b, _c;
|
|
371
|
+
return __generator(this, function (_d) {
|
|
372
|
+
switch (_d.label) {
|
|
373
373
|
case 0:
|
|
374
|
-
|
|
374
|
+
_a = thunkApi.getState(), settings = _a.settings, auth = _a.auth;
|
|
375
375
|
requestBody = {
|
|
376
376
|
country: settings.data.businessCountry.iso2,
|
|
377
377
|
scope: settings.data.appConfig.scope,
|
|
378
378
|
lang: settings.data.language,
|
|
379
|
+
lead_id: auth.data.leadId,
|
|
379
380
|
user_credentail: {
|
|
380
381
|
identification_id: params.nid,
|
|
381
382
|
identification_id_type: IDENTIFICATION_TYPE.NAFATH,
|
|
@@ -388,9 +389,9 @@ export var createNafathAuth = createAsyncThunk('auth/createNafathAuth', function
|
|
|
388
389
|
};
|
|
389
390
|
return [4, API.authService.createAuthKitNID(requestBody)];
|
|
390
391
|
case 1:
|
|
391
|
-
data =
|
|
392
|
+
data = _d.sent();
|
|
392
393
|
thunkApi.dispatch(handleNextScreenStep());
|
|
393
|
-
(
|
|
394
|
+
(_c = (_b = settings.data.appConfig).onStepCompleted) === null || _c === void 0 ? void 0 : _c.call(_b, settings.data.activeScreen.name, requestBody);
|
|
394
395
|
return [2, { response: data, formData: params }];
|
|
395
396
|
}
|
|
396
397
|
});
|
|
@@ -444,17 +445,18 @@ export var verifyNafath = createAsyncThunk('auth/verifyNafath', function (params
|
|
|
444
445
|
});
|
|
445
446
|
}); });
|
|
446
447
|
export var createCivilIdAuth = createAsyncThunk('auth/createCivilAuth', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
447
|
-
var settings, countryCode, requestBody, data;
|
|
448
|
-
var
|
|
449
|
-
return __generator(this, function (
|
|
450
|
-
switch (
|
|
448
|
+
var _a, settings, auth, countryCode, requestBody, data;
|
|
449
|
+
var _b, _c;
|
|
450
|
+
return __generator(this, function (_d) {
|
|
451
|
+
switch (_d.label) {
|
|
451
452
|
case 0:
|
|
452
|
-
|
|
453
|
+
_a = thunkApi.getState(), settings = _a.settings, auth = _a.auth;
|
|
453
454
|
countryCode = settings.data.businessCountry.iso2;
|
|
454
455
|
requestBody = {
|
|
455
456
|
country: settings.data.businessCountry.iso2,
|
|
456
457
|
scope: settings.data.appConfig.scope,
|
|
457
458
|
lang: settings.data.language,
|
|
459
|
+
lead_id: auth.data.leadId,
|
|
458
460
|
user_credentail: {
|
|
459
461
|
identification_id: params.civilId,
|
|
460
462
|
country_code: countryCode
|
|
@@ -466,9 +468,9 @@ export var createCivilIdAuth = createAsyncThunk('auth/createCivilAuth', function
|
|
|
466
468
|
};
|
|
467
469
|
return [4, API.authService.createAuth(requestBody)];
|
|
468
470
|
case 1:
|
|
469
|
-
data =
|
|
471
|
+
data = _d.sent();
|
|
470
472
|
thunkApi.dispatch(handleNextScreenStep());
|
|
471
|
-
(
|
|
473
|
+
(_c = (_b = settings.data.appConfig).onStepCompleted) === null || _c === void 0 ? void 0 : _c.call(_b, settings.data.activeScreen.name, requestBody.user_credentail);
|
|
472
474
|
return [2, { response: data, formData: params }];
|
|
473
475
|
}
|
|
474
476
|
});
|
|
@@ -310,16 +310,17 @@ export var resendMobileAuthOTP = createAsyncThunk('connectExpress/resendMobileAu
|
|
|
310
310
|
});
|
|
311
311
|
}); });
|
|
312
312
|
export var createNafathAuth = createAsyncThunk('connectExpress/createNafathAuth', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
313
|
-
var settings, requestBody, data;
|
|
314
|
-
var
|
|
315
|
-
return __generator(this, function (
|
|
316
|
-
switch (
|
|
313
|
+
var _a, settings, connectExpress, requestBody, data;
|
|
314
|
+
var _b, _c;
|
|
315
|
+
return __generator(this, function (_d) {
|
|
316
|
+
switch (_d.label) {
|
|
317
317
|
case 0:
|
|
318
|
-
|
|
318
|
+
_a = thunkApi.getState(), settings = _a.settings, connectExpress = _a.connectExpress;
|
|
319
319
|
requestBody = {
|
|
320
320
|
country: settings.data.businessCountry.iso2,
|
|
321
321
|
scope: settings.data.appConfig.scope,
|
|
322
322
|
lang: settings.data.language,
|
|
323
|
+
lead_id: connectExpress.data.leadId,
|
|
323
324
|
user_credentail: {
|
|
324
325
|
identification_id: params.nid,
|
|
325
326
|
identification_id_type: IDENTIFICATION_TYPE.NAFATH,
|
|
@@ -332,9 +333,9 @@ export var createNafathAuth = createAsyncThunk('connectExpress/createNafathAuth'
|
|
|
332
333
|
};
|
|
333
334
|
return [4, API.authService.createAuthKitNID(requestBody)];
|
|
334
335
|
case 1:
|
|
335
|
-
data =
|
|
336
|
+
data = _d.sent();
|
|
336
337
|
thunkApi.dispatch(handleNextScreenStep());
|
|
337
|
-
(
|
|
338
|
+
(_c = (_b = settings.data.appConfig).onStepCompleted) === null || _c === void 0 ? void 0 : _c.call(_b, settings.data.activeScreen.name, requestBody);
|
|
338
339
|
return [2, { response: data, formData: __assign(__assign({}, params), { type: IDENTIFICATION_TYPE.NAFATH }) }];
|
|
339
340
|
}
|
|
340
341
|
});
|