solution-plugin 1.3.0-alpha.2 → 1.3.1

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 +18 -42
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,65 +1,41 @@
1
1
  # liveness-plugin
2
2
 
3
- Guardian Liveness Detection SDK React Native plugin.
3
+ Guardian Solution SDK React Native plugin.
4
4
 
5
5
  ## Installation
6
6
 
7
7
  ```sh
8
- npm install liveness-plugin
8
+ npm install solution-plugin
9
9
  ```
10
10
 
11
11
  ## Usage
12
12
 
13
-
14
13
  ```js
15
14
  import {
16
15
  getSDKVersion,
17
- initSDKOfLicense,
18
- setLicenseAndCheck,
19
- startLivenessDetection,
20
- } from 'liveness-plugin';
16
+ setThemeARGBColor,
17
+ setDarkThemeType,
18
+ start,
19
+ type EndResult,
20
+ ThemeType,
21
+ } from 'solution-plugin';
21
22
 
22
23
  // ...
23
24
 
24
25
  // Get the SDK version
25
26
  const version = await getSDKVersion();
26
27
 
27
- // Initialize the SDK with market selection
28
- initSDKOfLicense(SELECTED_MARKET);
29
-
30
- // Set the license key and check if it's valid
31
- const checkResult = await setLicenseAndCheck(YOUR_LICENSE_KEY);
32
- if (checkResult === 'SUCCESS') {
33
- startLivenessDetection();
34
- }
35
-
36
- // Start the liveness detection process
37
- const livenessParams: LivenessParams = {
38
- cameraType: 'FRONT',
39
- detectOcclusion: false, // Whether to detect occlusion
40
- auditImageConfig: {
41
- enableCollectSwitch: true, // Whether to enable the collection switch
42
- imageWidth: 400, // Image width
43
- imageQuality: 30, // Image quality
44
- relativeSecondsCaptureAfterCameraLaunched: 3.0, // Capture at a relative number of seconds after the camera is launched
45
- },
46
- livenessType: 'test_more', // Liveness detection type
47
- signatureId: '', // Signature ID, if available
48
- distantNearTimeout: 50000, // Timeout for distant-near detection in milliseconds
49
- silentTimeout: 50000, // Timeout for silent detection in milliseconds
50
- actionTimeout: 10000, // Timeout for actions in milliseconds
51
- prepareMillSeconds: 0, // Preparation time in milliseconds
52
- resultPictureSize: 600, // Result picture size
53
- maxRecordVideoSeconds: 600, // Maximum video recording time in seconds
54
- userId: '', // User ID, in JSON string format
55
- maskColor: '#000000', // Mask color
56
- ovalColor: '#000000', // Oval color
57
- ovalNormalColor: '#000000', // Normal oval color
58
- };
59
- startLivenessDetection(livenessParams, (result) => {
60
- console.log('Liveness detection result received:', result);
61
- });
28
+ // Sets the appearance mode.
29
+ // Options: LIGHT, DARK, FOLLOW_SYSTEM. Default: LIGHT.
30
+ setDarkThemeType(ThemeType.FOLLOW_SYSTEM);
31
+
32
+ // Sets the loading color of the page for both light and dark appearance modes.The provided color value must be in ARGB or RGB format.
33
+ // This can be specified as an ARGB hex string:
34
+ setThemeARGBColor('#FF000000', '#FFFFFFFF');
62
35
 
36
+ // Starts the Solution flow. Call the start method, pass a url parameter, and receive an asynchronous return value.
37
+ const result = (await start('Your own url',)) as EndResult;
38
+ console.log('Solution result:', result);
63
39
  ```
64
40
 
65
41
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "solution-plugin",
3
- "version": "1.3.0-alpha.2",
3
+ "version": "1.3.1",
4
4
  "description": "Guardian Solution SDK React Native plugin.",
5
5
  "main": "./lib/module/index.js",
6
6
  "source": "src/index.tsx",