@transmitsecurity/platform-web-sdk 1.16.2 → 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 -48
  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 +11 -12
  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 -28
  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 -18
  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 -18
  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 -24
  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,79 +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
- For optimal tree-shaking and performance, import only the modules you need using the recommended namespace import pattern:
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();
16
27
 
17
- ```js
18
- import { * as drs } from '@transmitsecurity/platform-web-sdk/drs';
19
- import { * as webauthn } from '@transmitsecurity/platform-web-sdk/webauthn';
20
- import { * as idv } from '@transmitsecurity/platform-web-sdk/idv';
21
- import { * as ido } from '@transmitsecurity/platform-web-sdk/ido';
22
-
23
- // Single global initialize call with all module configurations
24
- await drs.initialize({
25
- clientId: 'your-client-id',
26
- drs: { serverPath: 'https://api.transmitsecurity.io/risk-collect/' },
27
- webauthn: { serverPath: 'https://api.transmitsecurity.io' },
28
- idv: { serverPath: 'https://api.transmitsecurity.io' },
29
- ido: { serverPath: 'https://api.transmitsecurity.io' }
30
- });
31
-
32
- // Now all modules are initialized and ready to use
28
+ // Option 2: Namespace calls
33
29
  await drs.triggerActionEvent('login', { correlationId: 'example' });
30
+ await drs.setUser({ userId: 'user123' });
34
31
  const isSupported = await webauthn.isPlatformAuthenticatorSupported();
35
32
  ```
36
33
 
37
- ### Full SDK Import
38
-
39
- Import the entire SDK using namespace import pattern (larger bundle size but simpler initialization):
40
34
 
41
- ```js
42
- import { * as sdk } from '@transmitsecurity/platform-web-sdk';
35
+ ```javascript
36
+ import { ido, ClientResponseOptionType } from '@transmitsecurity/platform-web-sdk/ido';
37
+ import { initialize } from '@transmitsecurity/platform-web-sdk';
43
38
 
44
- // Single initialize call for all modules
45
- await sdk.initialize({
46
- clientId: 'your-client-id',
47
- drs: { serverPath: 'https://api.transmitsecurity.io/risk-collect/' },
48
- webauthn: { serverPath: 'https://api.transmitsecurity.io' }
39
+ // Initialize
40
+ await initialize({
41
+ clientId: 'your-client-id',
42
+ ido: { serverPath: 'https://api.transmitsecurity.io' }
49
43
  });
50
44
 
51
- // Use the modules
52
- await sdk.drs.triggerActionEvent('login', { correlationId: 'example' });
53
- const isSupported = await sdk.webauthn.isPlatformAuthenticatorSupported();
45
+ // IDO usage
46
+ await ido.startJourney('journey-id');
47
+ await ido.submitClientResponse(
48
+ ClientResponseOptionType.ClientInput,
49
+ { userEmail: 'user@example.com' }
50
+ );
54
51
  ```
55
52
 
56
- ### Alternative: Named Imports
53
+ #### TypeScript Support
54
+ Full TypeScript support with individual module imports:
55
+
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';
62
+
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
+ });
73
+
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
+ );
81
+ ```
57
82
 
58
- If your bundler supports it, you can use destructuring imports (though namespace imports are recommended for better TypeScript compatibility):
83
+ #### Full SDK Import (Alternative)
84
+ If you need multiple modules, you can also import the full SDK:
59
85
 
60
- ```js
86
+ ```javascript
61
87
  import { drs, webauthn, idv, ido, initialize } from '@transmitsecurity/platform-web-sdk';
62
88
 
63
89
  // Single initialize call for all modules
64
90
  await initialize({
65
- clientId: 'your-client-id',
66
- drs: { serverPath: 'https://api.transmitsecurity.io/risk-collect/' },
67
- 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' }
68
96
  });
69
97
 
70
- // Use the modules
98
+ // Use modules through the main object
71
99
  await drs.triggerActionEvent('login', { correlationId: 'example' });
72
- const isSupported = await webauthn.isPlatformAuthenticatorSupported();
73
100
  ```
74
-
75
- ⚠️ **Note**: The namespace import syntax `import { * as moduleName }` provides the best compatibility across different bundlers and avoids TypeScript typing issues.
76
-
77
- ## License
78
-
79
- SEE LICENSE IN LICENSE