@tap-payments/connect 1.3.4 → 2.5.3-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.
package/README.md
CHANGED
|
@@ -109,7 +109,7 @@ const ConnectFullComponent = () => {
|
|
|
109
109
|
content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no,shrink-to-fit=no"
|
|
110
110
|
/>
|
|
111
111
|
<title>Auth-JsConnect</title>
|
|
112
|
-
<script src="https://connect-auth.b-cdn.net/build-
|
|
112
|
+
<script src="https://connect-auth.b-cdn.net/build-2.5.2-test/main.js"></script>
|
|
113
113
|
</head>
|
|
114
114
|
<body>
|
|
115
115
|
<div id="root"></div>
|
package/build/api/index.d.ts
CHANGED
package/build/api/index.js
CHANGED
|
@@ -35,27 +35,51 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
37
|
import axios from 'axios';
|
|
38
|
+
import FingerprintJS from '@fingerprintjs/fingerprintjs';
|
|
38
39
|
import { CONNECT_MW_URL } from '../constants';
|
|
40
|
+
export var getFingerPrint = function () {
|
|
41
|
+
return FingerprintJS.load().then(function (fp) {
|
|
42
|
+
return fp.get().then(function (result) {
|
|
43
|
+
return result;
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
};
|
|
39
47
|
export var generateConfigToken = function (data) { return __awaiter(void 0, void 0, void 0, function () {
|
|
40
|
-
var response, error_1;
|
|
48
|
+
var visitorId, response, error_1;
|
|
41
49
|
return __generator(this, function (_a) {
|
|
42
50
|
switch (_a.label) {
|
|
43
51
|
case 0:
|
|
44
|
-
_a.trys.push([0,
|
|
52
|
+
_a.trys.push([0, 4, , 5]);
|
|
53
|
+
return [4, getFingerPrint()];
|
|
54
|
+
case 1:
|
|
55
|
+
visitorId = (_a.sent()).visitorId;
|
|
56
|
+
return [4, axios.post("".concat(CONNECT_MW_URL, "init"), data, {
|
|
57
|
+
headers: {
|
|
58
|
+
'Content-Type': 'application/json',
|
|
59
|
+
'Access-Control-Allow-Headers': true,
|
|
60
|
+
authorization: data.public_key,
|
|
61
|
+
bi: visitorId || '',
|
|
62
|
+
mdn: window.location.origin
|
|
63
|
+
}
|
|
64
|
+
})];
|
|
65
|
+
case 2:
|
|
66
|
+
_a.sent();
|
|
45
67
|
return [4, axios.post("".concat(CONNECT_MW_URL, "connect"), data, {
|
|
46
68
|
headers: {
|
|
47
69
|
'Content-Type': 'application/json',
|
|
48
70
|
'Access-Control-Allow-Headers': true,
|
|
49
|
-
authorization: data.public_key
|
|
71
|
+
authorization: data.public_key,
|
|
72
|
+
bi: visitorId || '',
|
|
73
|
+
mdn: window.location.origin
|
|
50
74
|
}
|
|
51
75
|
})];
|
|
52
|
-
case
|
|
76
|
+
case 3:
|
|
53
77
|
response = _a.sent();
|
|
54
78
|
return [2, response.data];
|
|
55
|
-
case
|
|
79
|
+
case 4:
|
|
56
80
|
error_1 = _a.sent();
|
|
57
81
|
return [2, { error: error_1 }];
|
|
58
|
-
case
|
|
82
|
+
case 5: return [2];
|
|
59
83
|
}
|
|
60
84
|
});
|
|
61
85
|
}); };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const CDN_LIBRARY_BASE_URL = "https://auth-jsconnect.b-cdn.net/build-2.
|
|
1
|
+
export declare const CDN_LIBRARY_BASE_URL = "https://auth-jsconnect.b-cdn.net/build-2.5.2-test/";
|
|
2
2
|
export declare const Maturity: {
|
|
3
3
|
readonly FULL: "full";
|
|
4
4
|
readonly EXPRESS: "express";
|
|
@@ -7,5 +7,5 @@ export declare const Language: {
|
|
|
7
7
|
readonly EN: "en";
|
|
8
8
|
readonly AR: "ar";
|
|
9
9
|
};
|
|
10
|
-
export declare const CONNECT_URL = "https://connect.tap.company/";
|
|
11
|
-
export declare const CONNECT_MW_URL = "https://connect-mw.tap.company/middleware/";
|
|
10
|
+
export declare const CONNECT_URL = "https://connect.dev.tap.company/";
|
|
11
|
+
export declare const CONNECT_MW_URL = "https://connect-mw.dev.tap.company/middleware/";
|
package/build/constants/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export var CDN_LIBRARY_BASE_URL = 'https://auth-jsconnect.b-cdn.net/build-2.
|
|
1
|
+
export var CDN_LIBRARY_BASE_URL = 'https://auth-jsconnect.b-cdn.net/build-2.5.2-test/';
|
|
2
2
|
export var Maturity = {
|
|
3
3
|
FULL: 'full',
|
|
4
4
|
EXPRESS: 'express'
|
|
@@ -7,5 +7,5 @@ export var Language = {
|
|
|
7
7
|
EN: 'en',
|
|
8
8
|
AR: 'ar'
|
|
9
9
|
};
|
|
10
|
-
export var CONNECT_URL = 'https://connect.tap.company/';
|
|
11
|
-
export var CONNECT_MW_URL = 'https://connect-mw.tap.company/middleware/';
|
|
10
|
+
export var CONNECT_URL = 'https://connect.dev.tap.company/';
|
|
11
|
+
export var CONNECT_MW_URL = 'https://connect-mw.dev.tap.company/middleware/';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ConnectProps as ConnectAttrs } from '../../@types';
|
|
3
3
|
export type ConnectProps = Omit<ConnectAttrs, 'elementId'>;
|
|
4
|
-
export declare const TapConnect: React.MemoExoticComponent<(props: ConnectAttrs) => JSX.Element>;
|
|
4
|
+
export declare const TapConnect: React.MemoExoticComponent<(props: ConnectAttrs) => import("react/jsx-runtime").JSX.Element>;
|
|
5
5
|
export declare const renderTapConnect: (props: ConnectProps, elementId: string) => Promise<any>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tap-payments/connect",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.5.3-test",
|
|
4
4
|
"description": "Tap Connect",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"module": "build/index.js",
|
|
@@ -33,7 +33,6 @@
|
|
|
33
33
|
"@babel/preset-env": "^7.18.6",
|
|
34
34
|
"@babel/preset-react": "^7.18.6",
|
|
35
35
|
"@babel/preset-typescript": "^7.18.6",
|
|
36
|
-
"@types/axios": "^0.14.0",
|
|
37
36
|
"@types/crypto-js": "^4.1.1",
|
|
38
37
|
"@types/react": "^18.0.15",
|
|
39
38
|
"@types/react-dom": "^18.0.6",
|
|
@@ -73,8 +72,10 @@
|
|
|
73
72
|
"webpack-merge": "^5.8.0"
|
|
74
73
|
},
|
|
75
74
|
"dependencies": {
|
|
76
|
-
"
|
|
77
|
-
"
|
|
75
|
+
"@fingerprintjs/fingerprintjs": "^3.4.1",
|
|
76
|
+
"axios": "^1.4.0",
|
|
77
|
+
"react": "^18.2.0",
|
|
78
|
+
"react-dom": "^18.2.0"
|
|
78
79
|
},
|
|
79
80
|
"peerDependencies": {
|
|
80
81
|
"@types/react": ">=18.0.15",
|