lbfraud-sdk-web 0.1.4

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 (2) hide show
  1. package/README.md +53 -0
  2. package/package.json +29 -0
package/README.md ADDED
@@ -0,0 +1,53 @@
1
+ # LBFraud Web SDK
2
+
3
+ ## How to use?
4
+
5
+ ```js
6
+ //import the lbfraud_sdk library
7
+ import { LBFraudSDK,LBFraudSDKEnvironment } from 'lbfraud_sdk';
8
+
9
+ //Initialize the client the available environments are Development, Testing and Production(default)
10
+ const client = new LBFraudSDK({
11
+ apiKey: 'api-key',
12
+ environment: LBFraudSDKEnvironment.Testing,
13
+ });
14
+
15
+ //TransactionID (required,unique): transaction identifier request for fraud results
16
+ //UserID (required): User identifier
17
+
18
+ client.sendTransaction("transaction-id","user-id").then(() => {});
19
+ ```
20
+
21
+ ## Development
22
+
23
+ ### Build
24
+
25
+ To build the package and update the changes use the command
26
+
27
+ ```bash
28
+ npm install
29
+ npm run build
30
+ ```
31
+
32
+ ### Test
33
+
34
+ There is a package inside the repo to test the changes.
35
+
36
+ 1. If you want to test the changes without uploading to npm use
37
+
38
+ ```bash
39
+ npm link
40
+ ```
41
+
42
+ 2. On the test_client folder run
43
+
44
+ ```bash
45
+ npm install
46
+ npm run build
47
+ ```
48
+
49
+ ### Obfuscation
50
+
51
+ Before uploading the sdk to anywhere remember to obfuscate to make more complex to read the code.
52
+
53
+ We were using the https://obfuscator.io/ website
package/package.json ADDED
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "lbfraud-sdk-web",
3
+ "version": "0.1.4",
4
+ "description": "",
5
+ "type": "module",
6
+ "main": "dist/LBFraud-SDK-Web.js",
7
+ "module": "dist/LBFraud-SDK-Web.modern.js",
8
+ "unpkg": "dist/LBFraud-SDK-Web.umd.js",
9
+ "types": "dist/LBFraud-SDK-Web.d.ts",
10
+ "scripts": {
11
+ "prebuild": "node set-version.js",
12
+ "build": "npm run prebuild && rm -rf dist && microbundle --tsconfig tsconfig.json --no-sourcemap",
13
+ "dev": "microbundle watch"
14
+ },
15
+ "keywords": [],
16
+ "author": "",
17
+ "license": "ISC",
18
+ "devDependencies": {
19
+ "microbundle": "^0.15.1",
20
+ "user-agent-data-types": "^0.4.2"
21
+ },
22
+ "exports": {
23
+ "require": "./dist/LBFraud-SDK-Web.js",
24
+ "default": "./dist/LBFraud-SDK-Web.modern.js"
25
+ },
26
+ "files": [
27
+ "dist"
28
+ ]
29
+ }