@transmitsecurity/platform-web-sdk 1.16.1 → 1.17.0

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 (77) hide show
  1. package/CHANGELOG.md +10 -2
  2. package/README.md +69 -41
  3. package/dist/drs.cjs +1 -1
  4. package/dist/drs.d.ts +1 -14
  5. package/dist/drs.js +1 -1
  6. package/dist/ido.cjs +2 -2
  7. package/dist/ido.d.ts +889 -6
  8. package/dist/ido.js +1 -1
  9. package/dist/idv.cjs +1 -1
  10. package/dist/idv.d.ts +1 -7
  11. package/dist/idv.js +1 -1
  12. package/dist/index.cjs +2 -2
  13. package/dist/index.esm.js +2 -2
  14. package/dist/index.umd.js +2 -2
  15. package/dist/ts-platform-websdk.js +2 -2
  16. package/dist/web-sdk-drs+idv+webauthn+ido.js +2 -2
  17. package/dist/web-sdk.d.ts +1 -1
  18. package/dist/webauthn.cjs +1 -1
  19. package/dist/webauthn.d.ts +1 -9
  20. package/dist/webauthn.js +1 -1
  21. package/package.json +13 -13
  22. package/build/drs-entry.d.ts +0 -20
  23. package/build/drs-entry.js +0 -19
  24. package/build/drs-only.d.ts +0 -22
  25. package/build/drs-only.js +0 -25
  26. package/build/drs.d.ts +0 -13
  27. package/build/drs.js +0 -45
  28. package/build/ido/idoImpl.d.ts +0 -2
  29. package/build/ido/idoImpl.js +0 -4
  30. package/build/ido/index.d.ts +0 -7
  31. package/build/ido/index.js +0 -9
  32. package/build/ido-entry.d.ts +0 -17
  33. package/build/ido-entry.js +0 -19
  34. package/build/ido.d.ts +0 -8
  35. package/build/ido.js +0 -27
  36. package/build/idv-entry.d.ts +0 -17
  37. package/build/idv-entry.js +0 -19
  38. package/build/idv.d.ts +0 -8
  39. package/build/idv.js +0 -27
  40. package/build/initialize-only.d.ts +0 -7
  41. package/build/initialize-only.js +0 -40
  42. package/build/initialize.d.ts +0 -1
  43. package/build/initialize.js +0 -2
  44. package/build/mainExport.d.ts +0 -16
  45. package/build/mainExport.js +0 -43
  46. package/build/sdk-factory.d.ts +0 -109
  47. package/build/sdk-factory.js +0 -108
  48. package/build/shared-state.d.ts +0 -4
  49. package/build/shared-state.js +0 -32
  50. package/build/webauthn-entry.d.ts +0 -19
  51. package/build/webauthn-entry.js +0 -19
  52. package/build/webauthn.d.ts +0 -12
  53. package/build/webauthn.js +0 -44
  54. package/bundler-config.json +0 -14
  55. package/dist/docs/.nojekyll +0 -1
  56. package/dist/docs/README.md +0 -72
  57. package/dist/docs/enums/ErrorCode.md +0 -113
  58. package/dist/docs/interfaces/ActionEventOptions.md +0 -44
  59. package/dist/docs/interfaces/ActionResponse.md +0 -9
  60. package/dist/docs/interfaces/AuthenticationAutofillActivateHandlers.md +0 -61
  61. package/dist/docs/interfaces/AutofillHandlers.md +0 -50
  62. package/dist/docs/interfaces/CrossDeviceController.md +0 -27
  63. package/dist/docs/interfaces/SdkError.md +0 -28
  64. package/dist/docs/interfaces/WebauthnApis.md +0 -73
  65. package/dist/docs/interfaces/WebauthnAuthenticationFlows.md +0 -52
  66. package/dist/docs/interfaces/WebauthnCrossDeviceFlows.md +0 -107
  67. package/dist/docs/interfaces/WebauthnCrossDeviceRegistrationOptions.md +0 -23
  68. package/dist/docs/interfaces/WebauthnRegistrationOptions.md +0 -55
  69. package/dist/docs/interfaces/initConfigParams.md +0 -7
  70. package/dist/docs/modules/drs.md +0 -92
  71. package/dist/docs/modules/idv.md +0 -106
  72. package/dist/docs/modules/webauthn.md +0 -197
  73. package/dist/docs/modules.md +0 -146
  74. package/scripts/make-semver-aliases.sh +0 -11
  75. package/scripts/upload-dist.sh +0 -9
  76. package/src/mainExport.ts +0 -75
  77. package/src/tsconfig.json +0 -14
package/CHANGELOG.md CHANGED
@@ -1,4 +1,14 @@
1
1
  # Changelog
2
+ ## 1.16.4 - Aug. 3, 2025
3
+ * fix: Crypto binding - resolved initialization issue in Safari
4
+ * feat: Improved error handling - provide detailed reasons when the RiskID-SDK is disabled.
5
+
6
+ ## 1.16.3 - Jul. 13, 2025
7
+ * feat: Deploy a fix for Orchestration (ido) sdk
8
+
9
+ ## 1.16.2 - Jul. 13, 2025
10
+ * feat: Add NPM support for Platform SDK
11
+
2
12
  ## 1.15.0 - Jun. 29, 2025
3
13
  **Fraud Prevention**
4
14
  * feat: Add support for rotating crypto-binding keys
@@ -11,11 +21,9 @@
11
21
  **Fraud Prevention**
12
22
  * feat: Add support for passing custom attributes to the `triggerActionEvent`
13
23
 
14
-
15
24
  ## 1.13.7 - Jun. 8, 2025
16
25
  **Identity Verification**
17
26
  * Correct and update UI texts
18
- *
19
27
 
20
28
  ## 1.13.6 - May 25, 2025
21
29
  * fix: prevent race condition during crypto binding keys generation
package/README.md CHANGED
@@ -1,72 +1,100 @@
1
1
  # Transmit Security Platform Web SDK
2
2
 
3
- A comprehensive browser-based identity and security solution for integrating with Mosaic's Fraud Prevention, WebAuthn authentication, Identity Verification, and Orchestration capabilities.
3
+ A comprehensive browser-based identity and security solution with fraud prevention, WebAuthn authentication, identity verification, and orchestration capabilities.
4
4
 
5
5
  ## Installation
6
6
 
7
+ ### NPM Package (Recommended)
7
8
  ```bash
8
- npm install @transmitsecurity/platform-web-sdk@^1
9
+ npm install @transmitsecurity/platform-web-sdk
9
10
  ```
11
+ ## Usage Patterns
10
12
 
11
- ## Quick Start
13
+ #### Individual Module Imports (Recommended)
14
+ For optimal bundle sizes and performance, import only the modules you need:
12
15
 
13
- ### Individual Module Imports (Recommended)
16
+ ```javascript
17
+ // Option 1: Individual function imports (best for tree-shaking)
18
+ import { triggerActionEvent, setUser, clearUser, initialize } from '@transmitsecurity/platform-web-sdk/drs';
19
+ import { isPlatformAuthenticatorSupported, register } from '@transmitsecurity/platform-web-sdk/webauthn';
20
+ import { start } from '@transmitsecurity/platform-web-sdk/idv';
14
21
 
15
- **Recommended**: Import only the modules you need for optimal bundle size and faster loading.
22
+ // Use modules (syntax depends on import method)
23
+ // Option 1: Direct function calls
24
+ await triggerActionEvent('login', { correlationId: 'example' });
25
+ await setUser({ userId: 'user123' });
26
+ const isSupported = await isPlatformAuthenticatorSupported();
27
+
28
+ // Option 2: Namespace calls
29
+ await drs.triggerActionEvent('login', { correlationId: 'example' });
30
+ await drs.setUser({ userId: 'user123' });
31
+ const isSupported = await webauthn.isPlatformAuthenticatorSupported();
32
+ ```
16
33
 
17
- ```js
18
- import { drs, initialize } from '@transmitsecurity/platform-web-sdk/drs';
19
- import { webauthn } from '@transmitsecurity/platform-web-sdk/webauthn';
20
34
 
35
+ ```javascript
36
+ import { ido, ClientResponseOptionType } from '@transmitsecurity/platform-web-sdk/ido';
37
+ import { initialize } from '@transmitsecurity/platform-web-sdk';
38
+
39
+ // Initialize
21
40
  await initialize({
22
- clientId: 'your-client-id',
23
- drs: { serverPath: 'https://api.transmitsecurity.io/risk-collect/' },
24
- webauthn: { serverPath: 'https://api.transmitsecurity.io' }
41
+ clientId: 'your-client-id',
42
+ ido: { serverPath: 'https://api.transmitsecurity.io' }
25
43
  });
26
44
 
27
- // Use the modules
28
- await drs.triggerActionEvent('login', { correlationId: 'example' });
29
- const isSupported = await webauthn.isPlatformAuthenticatorSupported();
45
+ // IDO usage
46
+ await ido.startJourney('journey-id');
47
+ await ido.submitClientResponse(
48
+ ClientResponseOptionType.ClientInput,
49
+ { userEmail: 'user@example.com' }
50
+ );
30
51
  ```
31
52
 
32
- **Available individual imports**:
33
- ```js
34
- // Fraud Prevention (DRS)
35
- import { drs, initialize } from '@transmitsecurity/platform-web-sdk/drs';
53
+ #### TypeScript Support
54
+ Full TypeScript support with individual module imports:
36
55
 
37
- // WebAuthn Authentication
38
- import { webauthn, initialize } from '@transmitsecurity/platform-web-sdk/webauthn';
56
+ ```typescript
57
+ import { triggerActionEvent, setUser } from '@transmitsecurity/platform-web-sdk/drs';
58
+ import { isPlatformAuthenticatorSupported } from '@transmitsecurity/platform-web-sdk/webauthn';
59
+ import { start } from '@transmitsecurity/platform-web-sdk/idv';
60
+ import { ido } from '@transmitsecurity/platform-web-sdk/ido';
61
+ import { initialize } from '@transmitsecurity/platform-web-sdk';
39
62
 
40
- // Identity Verification (IDV)
41
- import { idv, initialize } from '@transmitsecurity/platform-web-sdk/idv';
63
+ // Initialize with TypeScript types
64
+ await initialize({
65
+ clientId: 'your-client-id',
66
+ drs: { serverPath: 'https://api.transmitsecurity.io/risk-collect/' },
67
+ webauthn: { serverPath: 'https://api.transmitsecurity.io' },
68
+ idv: { serverPath: 'https://api.transmitsecurity.io' },
69
+ ido: {
70
+ serverPath: 'https://api.transmitsecurity.io',
71
+ }
72
+ });
42
73
 
43
- // Identity Orchestration (IDO)
44
- import { ido, initialize } from '@transmitsecurity/platform-web-sdk/ido';
74
+ // Use with proper TypeScript types
75
+ await triggerActionEvent('login', { correlationId: 'example' });
76
+ const isSupported: boolean = await isPlatformAuthenticatorSupported();
77
+ await ido.default.submitClientResponse(
78
+ ClientResponseOptionType.ClientInput,
79
+ { userEmail: 'user@example.com' }
80
+ );
45
81
  ```
46
82
 
47
- ### Full SDK Import
48
-
49
- Import the entire SDK if you need multiple modules or prefer a single import.
83
+ #### Full SDK Import (Alternative)
84
+ If you need multiple modules, you can also import the full SDK:
50
85
 
51
- ```js
86
+ ```javascript
52
87
  import { drs, webauthn, idv, ido, initialize } from '@transmitsecurity/platform-web-sdk';
53
88
 
54
89
  // Single initialize call for all modules
55
90
  await initialize({
56
- clientId: 'your-client-id',
57
- drs: { serverPath: 'https://api.transmitsecurity.io/risk-collect/' },
58
- webauthn: { serverPath: 'https://api.transmitsecurity.io' }
91
+ clientId: 'your-client-id',
92
+ drs: { serverPath: 'https://api.transmitsecurity.io/risk-collect/' },
93
+ webauthn: { serverPath: 'https://api.transmitsecurity.io' },
94
+ idv: { serverPath: 'https://api.transmitsecurity.io' },
95
+ ido: { serverPath: 'https://api.transmitsecurity.io' }
59
96
  });
60
97
 
61
- // Use the modules
98
+ // Use modules through the main object
62
99
  await drs.triggerActionEvent('login', { correlationId: 'example' });
63
- const isSupported = await webauthn.isPlatformAuthenticatorSupported();
64
100
  ```
65
-
66
- ## Documentation
67
-
68
- For complete documentation, visit: https://developer.transmitsecurity.com/sdk-ref/sdk_ref_intro/
69
-
70
- ## License
71
-
72
- SEE LICENSE IN LICENSE