@transmitsecurity/platform-web-sdk 1.16.0 → 1.16.2
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 +37 -18
- package/build/drs.d.ts +15 -0
- package/build/ido.d.ts +10 -0
- package/build/idv.d.ts +10 -0
- package/build/webauthn.d.ts +12 -0
- package/dist/docs/README.md +32 -32
- package/dist/docs/modules.md +1 -1
- package/dist/drs.cjs +1 -1
- package/dist/drs.js +1 -1
- package/dist/ido.cjs +1 -1
- package/dist/ido.js +1 -1
- package/dist/idv.cjs +1 -1
- package/dist/idv.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/ts-platform-websdk.js +1 -1
- package/dist/web-sdk-drs+idv+webauthn+ido.js +1 -1
- package/dist/web-sdk.d.ts +1 -1
- package/dist/webauthn.cjs +1 -1
- package/dist/webauthn.js +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -10,50 +10,69 @@ npm install @transmitsecurity/platform-web-sdk@^1
|
|
|
10
10
|
|
|
11
11
|
## Quick Start
|
|
12
12
|
|
|
13
|
-
###
|
|
13
|
+
### Individual Module Imports (Recommended)
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
For optimal tree-shaking and performance, import only the modules you need using the recommended namespace import pattern:
|
|
16
16
|
|
|
17
17
|
```js
|
|
18
|
-
import {
|
|
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';
|
|
19
22
|
|
|
20
|
-
// Single initialize call
|
|
21
|
-
await initialize({
|
|
23
|
+
// Single global initialize call with all module configurations
|
|
24
|
+
await drs.initialize({
|
|
22
25
|
clientId: 'your-client-id',
|
|
23
26
|
drs: { serverPath: 'https://api.transmitsecurity.io/risk-collect/' },
|
|
24
|
-
webauthn: { serverPath: 'https://api.transmitsecurity.io' }
|
|
27
|
+
webauthn: { serverPath: 'https://api.transmitsecurity.io' },
|
|
28
|
+
idv: { serverPath: 'https://api.transmitsecurity.io' },
|
|
29
|
+
ido: { serverPath: 'https://api.transmitsecurity.io' }
|
|
25
30
|
});
|
|
26
31
|
|
|
27
|
-
//
|
|
32
|
+
// Now all modules are initialized and ready to use
|
|
28
33
|
await drs.triggerActionEvent('login', { correlationId: 'example' });
|
|
29
34
|
const isSupported = await webauthn.isPlatformAuthenticatorSupported();
|
|
30
35
|
```
|
|
31
36
|
|
|
32
|
-
###
|
|
37
|
+
### Full SDK Import
|
|
33
38
|
|
|
34
|
-
|
|
39
|
+
Import the entire SDK using namespace import pattern (larger bundle size but simpler initialization):
|
|
35
40
|
|
|
36
41
|
```js
|
|
37
|
-
|
|
38
|
-
import { drs, initialize } from '@transmitsecurity/platform-web-sdk/drs';
|
|
39
|
-
import { webauthn } from '@transmitsecurity/platform-web-sdk/webauthn';
|
|
42
|
+
import { * as sdk } from '@transmitsecurity/platform-web-sdk';
|
|
40
43
|
|
|
41
|
-
// Single initialize call
|
|
42
|
-
await initialize({
|
|
44
|
+
// Single initialize call for all modules
|
|
45
|
+
await sdk.initialize({
|
|
43
46
|
clientId: 'your-client-id',
|
|
44
47
|
drs: { serverPath: 'https://api.transmitsecurity.io/risk-collect/' },
|
|
45
48
|
webauthn: { serverPath: 'https://api.transmitsecurity.io' }
|
|
46
49
|
});
|
|
50
|
+
|
|
51
|
+
// Use the modules
|
|
52
|
+
await sdk.drs.triggerActionEvent('login', { correlationId: 'example' });
|
|
53
|
+
const isSupported = await sdk.webauthn.isPlatformAuthenticatorSupported();
|
|
47
54
|
```
|
|
48
55
|
|
|
56
|
+
### Alternative: Named Imports
|
|
57
|
+
|
|
58
|
+
If your bundler supports it, you can use destructuring imports (though namespace imports are recommended for better TypeScript compatibility):
|
|
49
59
|
|
|
50
|
-
|
|
60
|
+
```js
|
|
61
|
+
import { drs, webauthn, idv, ido, initialize } from '@transmitsecurity/platform-web-sdk';
|
|
51
62
|
|
|
52
|
-
|
|
63
|
+
// Single initialize call for all modules
|
|
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
|
+
});
|
|
53
69
|
|
|
54
|
-
|
|
70
|
+
// Use the modules
|
|
71
|
+
await drs.triggerActionEvent('login', { correlationId: 'example' });
|
|
72
|
+
const isSupported = await webauthn.isPlatformAuthenticatorSupported();
|
|
73
|
+
```
|
|
55
74
|
|
|
56
|
-
|
|
75
|
+
⚠️ **Note**: The namespace import syntax `import { * as moduleName }` provides the best compatibility across different bundlers and avoids TypeScript typing issues.
|
|
57
76
|
|
|
58
77
|
## License
|
|
59
78
|
|
package/build/drs.d.ts
CHANGED
|
@@ -11,3 +11,18 @@ export declare const setUser: (...args: any[]) => any;
|
|
|
11
11
|
export declare const setAuthenticatedUser: (...args: any[]) => any;
|
|
12
12
|
export declare const clearUser: (...args: any[]) => any;
|
|
13
13
|
export type { ActionEventOptions, ActionResponse } from "@transmit-security/riskid_sdk";
|
|
14
|
+
|
|
15
|
+
// Default export for better TypeScript support
|
|
16
|
+
declare const drs: {
|
|
17
|
+
initialize: typeof initialize;
|
|
18
|
+
triggerActionEvent: (...args: any[]) => any;
|
|
19
|
+
setUser: (...args: any[]) => any;
|
|
20
|
+
setAuthenticatedUser: (...args: any[]) => any;
|
|
21
|
+
clearUser: (...args: any[]) => any;
|
|
22
|
+
getSessionToken: (...args: any[]) => any;
|
|
23
|
+
getActions: (...args: any[]) => any;
|
|
24
|
+
identifyUser: (...args: any[]) => any;
|
|
25
|
+
unidentifiedUser: (...args: any[]) => any;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export default drs;
|
package/build/ido.d.ts
CHANGED
|
@@ -6,3 +6,13 @@ declare global {
|
|
|
6
6
|
}
|
|
7
7
|
export { initialize } from './initialize-only';
|
|
8
8
|
export * from '@transmit-security/ido-web-sdk';
|
|
9
|
+
|
|
10
|
+
// Default export for better TypeScript support
|
|
11
|
+
declare const ido: {
|
|
12
|
+
initialize: typeof initialize;
|
|
13
|
+
startJourney: (...args: any[]) => any;
|
|
14
|
+
completeStep: (...args: any[]) => any;
|
|
15
|
+
getJourneyState: (...args: any[]) => any;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export default ido;
|
package/build/idv.d.ts
CHANGED
|
@@ -6,3 +6,13 @@ declare global {
|
|
|
6
6
|
}
|
|
7
7
|
export { initialize } from './initialize-only';
|
|
8
8
|
export * from '@transmit-security/ts-identity-verification';
|
|
9
|
+
|
|
10
|
+
// Default export for better TypeScript support
|
|
11
|
+
declare const idv: {
|
|
12
|
+
initialize: typeof initialize;
|
|
13
|
+
startDocumentCapture: (...args: any[]) => any;
|
|
14
|
+
startFaceCapture: (...args: any[]) => any;
|
|
15
|
+
startSelfieCapture: (...args: any[]) => any;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export default idv;
|
package/build/webauthn.d.ts
CHANGED
|
@@ -10,3 +10,15 @@ export declare const authenticate: (...args: any[]) => any;
|
|
|
10
10
|
export declare const register: (...args: any[]) => any;
|
|
11
11
|
export declare const crossDevice: (...args: any[]) => any;
|
|
12
12
|
export type { authenticate as authenticateType, WebauthnApis, WebauthnAuthenticationFlows, AutofillHandlers, AuthenticationAutofillActivateHandlers, WebauthnRegistrationOptions, isAutofillSupported, SdkError, ErrorCode, isPlatformAuthenticatorSupported, register as registerType, crossDevice as crossDeviceType, CrossDeviceController, WebauthnCrossDeviceRegistrationOptions, WebauthnCrossDeviceFlows, getDefaultPaths } from '@transmit-security/authentication-sdk';
|
|
13
|
+
|
|
14
|
+
// Default export for better TypeScript support
|
|
15
|
+
declare const webauthn: {
|
|
16
|
+
initialize: typeof initialize;
|
|
17
|
+
authenticate: (...args: any[]) => any;
|
|
18
|
+
register: (...args: any[]) => any;
|
|
19
|
+
crossDevice: (...args: any[]) => any;
|
|
20
|
+
isPlatformAuthenticatorSupported: (...args: any[]) => any;
|
|
21
|
+
isAutofillSupported: (...args: any[]) => any;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default webauthn;
|
package/dist/docs/README.md
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
# Transmit Security Platform Web SDK
|
|
2
2
|
|
|
3
|
-
A comprehensive browser-based identity and security solution with
|
|
3
|
+
A comprehensive browser-based identity and security solution for integrating with Mosaic's Fraud Prevention, WebAuthn authentication, Identity Verification, and Orchestration capabilities.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm install @transmitsecurity/platform-web-sdk
|
|
8
|
+
npm install @transmitsecurity/platform-web-sdk@^1
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## Quick Start
|
|
12
12
|
|
|
13
|
-
###
|
|
13
|
+
### Individual Module Imports (Recommended)
|
|
14
|
+
|
|
15
|
+
✅ **Recommended**: Import only the modules you need for optimal bundle size and faster loading.
|
|
14
16
|
|
|
15
17
|
```js
|
|
16
|
-
import { drs,
|
|
18
|
+
import { drs, initialize } from '@transmitsecurity/platform-web-sdk/drs';
|
|
19
|
+
import { webauthn } from '@transmitsecurity/platform-web-sdk/webauthn';
|
|
17
20
|
|
|
18
|
-
// Single initialize call for all modules
|
|
19
21
|
await initialize({
|
|
20
22
|
clientId: 'your-client-id',
|
|
21
23
|
drs: { serverPath: 'https://api.transmitsecurity.io/risk-collect/' },
|
|
@@ -27,46 +29,44 @@ await drs.triggerActionEvent('login', { correlationId: 'example' });
|
|
|
27
29
|
const isSupported = await webauthn.isPlatformAuthenticatorSupported();
|
|
28
30
|
```
|
|
29
31
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
⚠️ **Note**: Individual module imports have dependency resolution issues in some bundlers (like Vite). Use full SDK import for better compatibility.
|
|
33
|
-
|
|
32
|
+
**Available individual imports**:
|
|
34
33
|
```js
|
|
35
|
-
//
|
|
34
|
+
// Fraud Prevention (DRS)
|
|
36
35
|
import { drs, initialize } from '@transmitsecurity/platform-web-sdk/drs';
|
|
37
|
-
import { webauthn } from '@transmitsecurity/platform-web-sdk/webauthn';
|
|
38
|
-
|
|
39
|
-
// Single initialize call
|
|
40
|
-
await initialize({
|
|
41
|
-
clientId: 'your-client-id',
|
|
42
|
-
drs: { serverPath: 'https://api.transmitsecurity.io/risk-collect/' },
|
|
43
|
-
webauthn: { serverPath: 'https://api.transmitsecurity.io' }
|
|
44
|
-
});
|
|
45
|
-
```
|
|
46
36
|
|
|
47
|
-
|
|
37
|
+
// WebAuthn Authentication
|
|
38
|
+
import { webauthn, initialize } from '@transmitsecurity/platform-web-sdk/webauthn';
|
|
48
39
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
- **Uncompressed**: ~565KB
|
|
52
|
-
- **Tree-shaking**: Modern bundlers eliminate unused code automatically
|
|
40
|
+
// Identity Verification (IDV)
|
|
41
|
+
import { idv, initialize } from '@transmitsecurity/platform-web-sdk/idv';
|
|
53
42
|
|
|
54
|
-
|
|
43
|
+
// Identity Orchestration (IDO)
|
|
44
|
+
import { ido, initialize } from '@transmitsecurity/platform-web-sdk/ido';
|
|
45
|
+
```
|
|
55
46
|
|
|
56
|
-
###
|
|
47
|
+
### Full SDK Import
|
|
57
48
|
|
|
58
|
-
|
|
49
|
+
Import the entire SDK if you need multiple modules or prefer a single import.
|
|
59
50
|
|
|
60
|
-
|
|
51
|
+
```js
|
|
52
|
+
import { drs, webauthn, idv, ido, initialize } from '@transmitsecurity/platform-web-sdk';
|
|
61
53
|
|
|
62
|
-
|
|
54
|
+
// Single initialize call for all modules
|
|
55
|
+
await initialize({
|
|
56
|
+
clientId: 'your-client-id',
|
|
57
|
+
drs: { serverPath: 'https://api.transmitsecurity.io/risk-collect/' },
|
|
58
|
+
webauthn: { serverPath: 'https://api.transmitsecurity.io' }
|
|
59
|
+
});
|
|
63
60
|
|
|
64
|
-
|
|
61
|
+
// Use the modules
|
|
62
|
+
await drs.triggerActionEvent('login', { correlationId: 'example' });
|
|
63
|
+
const isSupported = await webauthn.isPlatformAuthenticatorSupported();
|
|
64
|
+
```
|
|
65
65
|
|
|
66
66
|
## Documentation
|
|
67
67
|
|
|
68
|
-
For complete documentation, visit: https://
|
|
68
|
+
For complete documentation, visit: https://developer.transmitsecurity.com/sdk-ref/sdk_ref_intro/
|
|
69
69
|
|
|
70
|
-
## License
|
|
70
|
+
I## License
|
|
71
71
|
|
|
72
72
|
SEE LICENSE IN LICENSE
|