@bytexbyte/berifyme-react-sdk 1.0.10 → 1.0.11
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.
package/dist/api/api.js
CHANGED
|
@@ -513,14 +513,20 @@ function sendPhoneNumberCode(_a) {
|
|
|
513
513
|
});
|
|
514
514
|
});
|
|
515
515
|
}
|
|
516
|
+
export var VerificationStatus;
|
|
517
|
+
(function (VerificationStatus) {
|
|
518
|
+
VerificationStatus["PENDING"] = "PENDING";
|
|
519
|
+
VerificationStatus["ONBOARDING"] = "ONBOARDING";
|
|
520
|
+
VerificationStatus["LOGIN"] = "LOGIN";
|
|
521
|
+
})(VerificationStatus || (VerificationStatus = {}));
|
|
516
522
|
function getUserBySessionId(_a) {
|
|
517
523
|
return __awaiter(this, arguments, void 0, function (_b) {
|
|
518
524
|
var url, res;
|
|
519
|
-
var sessionId = _b.sessionId, token = _b.token;
|
|
525
|
+
var sessionId = _b.sessionId, verificationStatus = _b.verificationStatus, token = _b.token;
|
|
520
526
|
return __generator(this, function (_c) {
|
|
521
527
|
switch (_c.label) {
|
|
522
528
|
case 0:
|
|
523
|
-
url = "".concat(config.backendDomain, "/api/user/getUserByClearSessionId?id=").concat(sessionId).concat(token ? "&token=".concat(token) : '');
|
|
529
|
+
url = "".concat(config.backendDomain, "/api/user/getUserByClearSessionId?id=").concat(sessionId, "&verificationStatus=").concat(verificationStatus).concat(token ? "&token=".concat(token) : '');
|
|
524
530
|
console.log('UrlString: ', url);
|
|
525
531
|
return [4 /*yield*/, axios.get(url)];
|
|
526
532
|
case 1:
|
|
@@ -36,7 +36,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
36
|
};
|
|
37
37
|
import React from "react";
|
|
38
38
|
import { useEffect, useState } from "react";
|
|
39
|
-
import berifymeApi from "../../api/api";
|
|
39
|
+
import berifymeApi, { VerificationStatus } from "../../api/api";
|
|
40
40
|
import { Box, CircularProgress } from "@mui/material";
|
|
41
41
|
import AllSet from "../../components/AllSet";
|
|
42
42
|
import TryAgain from "../TryAgain";
|
|
@@ -51,7 +51,7 @@ var ClearLoginAllSet = function (_a) {
|
|
|
51
51
|
var sessionId = _b.sessionId, token = _b.token;
|
|
52
52
|
return __generator(this, function (_c) {
|
|
53
53
|
switch (_c.label) {
|
|
54
|
-
case 0: return [4 /*yield*/, berifymeApi.user.getUserBySessionId({ sessionId: sessionId, token: token })];
|
|
54
|
+
case 0: return [4 /*yield*/, berifymeApi.user.getUserBySessionId({ sessionId: sessionId, verificationStatus: VerificationStatus.LOGIN, token: token })];
|
|
55
55
|
case 1:
|
|
56
56
|
res = _c.sent();
|
|
57
57
|
createDeveloperLog({
|
|
@@ -36,7 +36,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
36
|
};
|
|
37
37
|
import React from "react";
|
|
38
38
|
import { useEffect, useState } from "react";
|
|
39
|
-
import berifymeApi from "../../../api/api";
|
|
39
|
+
import berifymeApi, { VerificationStatus } from "../../../api/api";
|
|
40
40
|
import { Box, CircularProgress } from "@mui/material";
|
|
41
41
|
import AllSet from "../../AllSet";
|
|
42
42
|
import TryAgain from "../../TryAgain";
|
|
@@ -67,7 +67,7 @@ var ClearOnboardingAllSet = function (_a) {
|
|
|
67
67
|
setError(approveRes.error);
|
|
68
68
|
return [2 /*return*/];
|
|
69
69
|
}
|
|
70
|
-
return [4 /*yield*/, berifymeApi.user.getUserBySessionId({ sessionId: sessionId, token: token })];
|
|
70
|
+
return [4 /*yield*/, berifymeApi.user.getUserBySessionId({ sessionId: sessionId, verificationStatus: VerificationStatus.ONBOARDING, token: token })];
|
|
71
71
|
case 2:
|
|
72
72
|
res = _c.sent();
|
|
73
73
|
createDeveloperLog({
|
package/dist/types/api/api.d.ts
CHANGED
|
@@ -260,8 +260,14 @@ declare function sendPhoneNumberCode({ phoneNumber, token }: {
|
|
|
260
260
|
success: boolean;
|
|
261
261
|
error?: string;
|
|
262
262
|
}>;
|
|
263
|
-
declare
|
|
263
|
+
export declare enum VerificationStatus {
|
|
264
|
+
PENDING = "PENDING",
|
|
265
|
+
ONBOARDING = "ONBOARDING",
|
|
266
|
+
LOGIN = "LOGIN"
|
|
267
|
+
}
|
|
268
|
+
declare function getUserBySessionId({ sessionId, verificationStatus, token }: {
|
|
264
269
|
sessionId: string;
|
|
270
|
+
verificationStatus: VerificationStatus;
|
|
265
271
|
token?: string;
|
|
266
272
|
}): Promise<{
|
|
267
273
|
user?: UserWithAgeAndFullName;
|