@transmitsecurity/platform-web-sdk 1.16.0 → 1.16.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.
package/README.md CHANGED
@@ -10,14 +10,14 @@ npm install @transmitsecurity/platform-web-sdk@^1
10
10
 
11
11
  ## Quick Start
12
12
 
13
- ### Full SDK Import
13
+ ### Individual Module Imports (Recommended)
14
14
 
15
- Import the entire SDK or leverage tree-shaking capabilities to import individual modules.
15
+ ✅ **Recommended**: Import only the modules you need for optimal bundle size and faster loading.
16
16
 
17
17
  ```js
18
- import { drs, webauthn, idv, ido, initialize } from '@transmitsecurity/platform-web-sdk';
18
+ import { drs, initialize } from '@transmitsecurity/platform-web-sdk/drs';
19
+ import { webauthn } from '@transmitsecurity/platform-web-sdk/webauthn';
19
20
 
20
- // Single initialize call for all modules
21
21
  await initialize({
22
22
  clientId: 'your-client-id',
23
23
  drs: { serverPath: 'https://api.transmitsecurity.io/risk-collect/' },
@@ -29,27 +29,39 @@ await drs.triggerActionEvent('login', { correlationId: 'example' });
29
29
  const isSupported = await webauthn.isPlatformAuthenticatorSupported();
30
30
  ```
31
31
 
32
- ### Individual Module Imports (Limited Support)
32
+ **Available individual imports**:
33
+ ```js
34
+ // Fraud Prevention (DRS)
35
+ import { drs, initialize } from '@transmitsecurity/platform-web-sdk/drs';
36
+
37
+ // WebAuthn Authentication
38
+ import { webauthn, initialize } from '@transmitsecurity/platform-web-sdk/webauthn';
39
+
40
+ // Identity Verification (IDV)
41
+ import { idv, initialize } from '@transmitsecurity/platform-web-sdk/idv';
42
+
43
+ // Identity Orchestration (IDO)
44
+ import { ido, initialize } from '@transmitsecurity/platform-web-sdk/ido';
45
+ ```
46
+
47
+ ### Full SDK Import
33
48
 
34
- ⚠️ **Note**: Individual module imports have dependency resolution issues in some bundlers (like Vite). Use full SDK import for better compatibility.
49
+ Import the entire SDK if you need multiple modules or prefer a single import.
35
50
 
36
51
  ```js
37
- // May cause dependency resolution errors in some environments
38
- import { drs, initialize } from '@transmitsecurity/platform-web-sdk/drs';
39
- import { webauthn } from '@transmitsecurity/platform-web-sdk/webauthn';
52
+ import { drs, webauthn, idv, ido, initialize } from '@transmitsecurity/platform-web-sdk';
40
53
 
41
- // Single initialize call
54
+ // Single initialize call for all modules
42
55
  await initialize({
43
56
  clientId: 'your-client-id',
44
57
  drs: { serverPath: 'https://api.transmitsecurity.io/risk-collect/' },
45
58
  webauthn: { serverPath: 'https://api.transmitsecurity.io' }
46
59
  });
47
- ```
48
60
 
49
-
50
- ### Other Bundlers
51
-
52
- For webpack, Rollup, or other bundlers, the full SDK import should work without additional configuration.
61
+ // Use the modules
62
+ await drs.triggerActionEvent('login', { correlationId: 'example' });
63
+ const isSupported = await webauthn.isPlatformAuthenticatorSupported();
64
+ ```
53
65
 
54
66
  ## Documentation
55
67