@transmitsecurity/platform-web-sdk 1.16.2 → 1.17.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 (77) hide show
  1. package/CHANGELOG.md +23 -2
  2. package/README.md +69 -48
  3. package/dist/web-sdk-drs+idv+webauthn+ido.js +2 -2
  4. package/dist/web-sdk.d.ts +4 -16
  5. package/package.json +12 -13
  6. package/build/drs-entry.d.ts +0 -20
  7. package/build/drs-entry.js +0 -19
  8. package/build/drs-only.d.ts +0 -22
  9. package/build/drs-only.js +0 -25
  10. package/build/drs.d.ts +0 -28
  11. package/build/drs.js +0 -45
  12. package/build/ido/idoImpl.d.ts +0 -2
  13. package/build/ido/idoImpl.js +0 -4
  14. package/build/ido/index.d.ts +0 -7
  15. package/build/ido/index.js +0 -9
  16. package/build/ido-entry.d.ts +0 -17
  17. package/build/ido-entry.js +0 -19
  18. package/build/ido.d.ts +0 -18
  19. package/build/ido.js +0 -27
  20. package/build/idv-entry.d.ts +0 -17
  21. package/build/idv-entry.js +0 -19
  22. package/build/idv.d.ts +0 -18
  23. package/build/idv.js +0 -27
  24. package/build/initialize-only.d.ts +0 -7
  25. package/build/initialize-only.js +0 -40
  26. package/build/initialize.d.ts +0 -1
  27. package/build/initialize.js +0 -2
  28. package/build/mainExport.d.ts +0 -16
  29. package/build/mainExport.js +0 -43
  30. package/build/sdk-factory.d.ts +0 -109
  31. package/build/sdk-factory.js +0 -108
  32. package/build/shared-state.d.ts +0 -4
  33. package/build/shared-state.js +0 -32
  34. package/build/webauthn-entry.d.ts +0 -19
  35. package/build/webauthn-entry.js +0 -19
  36. package/build/webauthn.d.ts +0 -24
  37. package/build/webauthn.js +0 -44
  38. package/bundler-config.json +0 -14
  39. package/dist/docs/.nojekyll +0 -1
  40. package/dist/docs/README.md +0 -72
  41. package/dist/docs/enums/ErrorCode.md +0 -113
  42. package/dist/docs/interfaces/ActionEventOptions.md +0 -44
  43. package/dist/docs/interfaces/ActionResponse.md +0 -9
  44. package/dist/docs/interfaces/AuthenticationAutofillActivateHandlers.md +0 -61
  45. package/dist/docs/interfaces/AutofillHandlers.md +0 -50
  46. package/dist/docs/interfaces/CrossDeviceController.md +0 -27
  47. package/dist/docs/interfaces/SdkError.md +0 -28
  48. package/dist/docs/interfaces/WebauthnApis.md +0 -73
  49. package/dist/docs/interfaces/WebauthnAuthenticationFlows.md +0 -52
  50. package/dist/docs/interfaces/WebauthnCrossDeviceFlows.md +0 -107
  51. package/dist/docs/interfaces/WebauthnCrossDeviceRegistrationOptions.md +0 -23
  52. package/dist/docs/interfaces/WebauthnRegistrationOptions.md +0 -55
  53. package/dist/docs/interfaces/initConfigParams.md +0 -7
  54. package/dist/docs/modules/drs.md +0 -92
  55. package/dist/docs/modules/idv.md +0 -106
  56. package/dist/docs/modules/webauthn.md +0 -197
  57. package/dist/docs/modules.md +0 -146
  58. package/dist/drs.cjs +0 -1
  59. package/dist/drs.d.ts +0 -248
  60. package/dist/drs.js +0 -1
  61. package/dist/ido.cjs +0 -3
  62. package/dist/ido.d.ts +0 -57
  63. package/dist/ido.js +0 -3
  64. package/dist/idv.cjs +0 -1
  65. package/dist/idv.d.ts +0 -69
  66. package/dist/idv.js +0 -1
  67. package/dist/index.cjs +0 -3
  68. package/dist/index.esm.js +0 -3
  69. package/dist/index.umd.js +0 -3
  70. package/dist/ts-platform-websdk.js +0 -3
  71. package/dist/webauthn.cjs +0 -1
  72. package/dist/webauthn.d.ts +0 -463
  73. package/dist/webauthn.js +0 -1
  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,27 @@
1
1
  # Changelog
2
+
3
+ ## 1.17.1 – Sep. 14, 2025
4
+ **Fraud Prevention**
5
+ * feat: Improve resilience of building encrypted request's body.
6
+ * feat: Add `missing_config` disabled reason for when the configuration or `sdkEnabled` flag is missing.
7
+
8
+ **Identity Verification**
9
+ * fix: Add translation for approve and retake buttons on selfie capture
10
+
11
+ ## 1.17.0 – Aug. 3, 2025
12
+ * feat: Support installing SDK via npm install @transmitsecurity/platform-web-sdk
13
+
14
+ ## 1.16.4 - Aug. 3, 2025
15
+ * feat: Provide detailed reasons when the RiskID-SDK is disabled.
16
+ * fix: Improved error handling in device attributes collection
17
+ * fix: Crypto binding - resolved initialization issue in Safari
18
+
19
+ ## 1.16.3 - Jul. 13, 2025
20
+ * feat: Deploy a fix for Orchestration (ido) sdk
21
+
22
+ ## 1.16.2 - Jul. 13, 2025
23
+ * feat: Add NPM support for Platform SDK
24
+
2
25
  ## 1.15.0 - Jun. 29, 2025
3
26
  **Fraud Prevention**
4
27
  * feat: Add support for rotating crypto-binding keys
@@ -11,11 +34,9 @@
11
34
  **Fraud Prevention**
12
35
  * feat: Add support for passing custom attributes to the `triggerActionEvent`
13
36
 
14
-
15
37
  ## 1.13.7 - Jun. 8, 2025
16
38
  **Identity Verification**
17
39
  * Correct and update UI texts
18
- *
19
40
 
20
41
  ## 1.13.6 - May 25, 2025
21
42
  * 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