@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
@@ -1,146 +0,0 @@
1
- # Transmit Security Web SDK API Reference
2
-
3
- ## Interfaces
4
-
5
- - [ActionResponse](interfaces/ActionResponse.md)
6
- - [ActionEventOptions](interfaces/ActionEventOptions.md)
7
- - [WebauthnApis](interfaces/WebauthnApis.md)
8
- - [CrossDeviceController](interfaces/CrossDeviceController.md)
9
- - [WebauthnCrossDeviceRegistrationOptions](interfaces/WebauthnCrossDeviceRegistrationOptions.md)
10
- - [WebauthnRegistrationOptions](interfaces/WebauthnRegistrationOptions.md)
11
- - [WebauthnCrossDeviceFlows](interfaces/WebauthnCrossDeviceFlows.md)
12
- - [SdkError](interfaces/SdkError.md)
13
- - [AuthenticationAutofillActivateHandlers](interfaces/AuthenticationAutofillActivateHandlers.md)
14
- - [AutofillHandlers](interfaces/AutofillHandlers.md)
15
- - [WebauthnAuthenticationFlows](interfaces/WebauthnAuthenticationFlows.md)
16
- - [initConfigParams](interfaces/initConfigParams.md)
17
-
18
- ## Namespaces
19
-
20
- - [drs](modules/drs.md)
21
- - [idv](modules/idv.md)
22
- - [webauthn](modules/webauthn.md)
23
-
24
- ## Enumerations
25
-
26
- - [ErrorCode](enums/ErrorCode.md)
27
-
28
- ## Variables
29
-
30
- ### authenticate
31
-
32
- • `Const` **authenticate**: [`WebauthnAuthenticationFlows`](interfaces/WebauthnAuthenticationFlows.md)
33
-
34
- Returns the authentication flows for webauthn
35
-
36
- ___
37
-
38
- ### crossDevice
39
-
40
- • `Const` **crossDevice**: [`WebauthnCrossDeviceFlows`](interfaces/WebauthnCrossDeviceFlows.md)
41
-
42
- Returns webauthn cross device flows
43
-
44
- ___
45
-
46
- ### ido
47
-
48
- • `Const` **ido**: `IdoSdk`
49
-
50
- ___
51
-
52
- ### default
53
-
54
- • `Const` **default**: `TSWebSDK`
55
-
56
- ___
57
-
58
- ### PACKAGE\_VERSION
59
-
60
- • `Const` **PACKAGE\_VERSION**: ``"1.16.1"``
61
-
62
- ## Functions
63
-
64
- ### register
65
-
66
- ▸ **register**(`username`, `options?`): `Promise`<`string`\>
67
-
68
- Invokes a WebAuthn credential registration for the specified user, including prompting the user for biometrics.
69
- If registration is completed successfully, this call will return a promise that resolves to the credential result, which is an object encoded as a base64 string. This encoded result should then be passed to the relevant backend registration endpoint to complete the registration for either a [logged-in user](/openapi/user/backend-webauthn/#operation/webauthn-registration) or [logged-out user](/openapi/user/backend-webauthn/#operation/webauthn-registration-external).
70
-
71
- If registration fails, an SdkError will be thrown.
72
-
73
- **`Throws`**
74
-
75
- [NotInitialized](enums/ErrorCode.md#notinitialized)
76
-
77
- **`Throws`**
78
-
79
- [RegistrationFailed](enums/ErrorCode.md#registrationfailed)
80
-
81
- **`Throws`**
82
-
83
- [RegistrationCanceled](enums/ErrorCode.md#registrationcanceled)
84
-
85
- #### Parameters
86
-
87
- | Name | Type | Description |
88
- | :------ | :------ | :------ |
89
- | `username` | `string` | WebAuthn username to register |
90
- | `options?` | [`WebauthnRegistrationOptions`](interfaces/WebauthnRegistrationOptions.md) | Additional configuration for registration flow |
91
-
92
- #### Returns
93
-
94
- `Promise`<`string`\>
95
-
96
- ___
97
-
98
- ### isPlatformAuthenticatorSupported
99
-
100
- ▸ **isPlatformAuthenticatorSupported**(): `Promise`<`boolean`\>
101
-
102
- Indicates whether this browser supports WebAuthn, and has a platform authenticator
103
-
104
- #### Returns
105
-
106
- `Promise`<`boolean`\>
107
-
108
- ___
109
-
110
- ### isAutofillSupported
111
-
112
- ▸ **isAutofillSupported**(): `Promise`<`boolean`\>
113
-
114
- Indicates whether this browser supports Passkey Autofill
115
-
116
- #### Returns
117
-
118
- `Promise`<`boolean`\>
119
-
120
- ___
121
-
122
- ### getDefaultPaths
123
-
124
- ▸ **getDefaultPaths**(): [`WebauthnApis`](interfaces/WebauthnApis.md)
125
-
126
- Returns the default API paths for webauthn
127
-
128
- #### Returns
129
-
130
- [`WebauthnApis`](interfaces/WebauthnApis.md)
131
-
132
- ___
133
-
134
- ### initialize
135
-
136
- ▸ **initialize**(`params`): `void`
137
-
138
- #### Parameters
139
-
140
- | Name | Type |
141
- | :------ | :------ |
142
- | `params` | [`initConfigParams`](interfaces/initConfigParams.md) |
143
-
144
- #### Returns
145
-
146
- `void`
@@ -1,11 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- cdn_path=gs://$platform_sdk_cdn/platform-websdk
4
-
5
- for version in \
6
- latest \
7
- ${npm_package_version%.*}.x \
8
- ${npm_package_version%.*.*}.x
9
- do
10
- gsutil cp $cdn_path/$npm_package_version/* $cdn_path/$version/
11
- done
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- # Set default CDN bucket if not provided
4
- platform_sdk_cdn=${platform_sdk_cdn:-"platform-websdk.idsec-dev.com"}
5
-
6
- cdn_dir=gs://$platform_sdk_cdn/platform-websdk/$npm_package_version
7
-
8
- gsutil cp dist/web-sdk-*.js $cdn_dir/ts-platform-websdk.js
9
- gsutil cp dist/web-sdk.d.ts $cdn_dir/ts-platform-websdk.d.ts
package/src/mainExport.ts DELETED
@@ -1,75 +0,0 @@
1
- // Browser Environment Validation
2
- (function validateBrowserEnvironment() {
3
- const isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined';
4
- const isNode = typeof globalThis !== 'undefined' &&
5
- typeof (globalThis as any).process !== 'undefined' &&
6
- (globalThis as any).process?.versions?.node;
7
-
8
- if (isNode && !isBrowser) {
9
- throw new Error(
10
- '\n🚫 @TransmitSecurity/web-sdk is a BROWSER-ONLY package.\n\n' +
11
- '❌ Node.js environments are not supported.\n' +
12
- '✅ Use this package in web browsers only.\n\n' +
13
- 'For more information, visit: https://github.com/transmitsecurity-dev/ciam-web-sdk#browser-only\n'
14
- );
15
- }
16
-
17
- if (!isBrowser) {
18
- console.warn(
19
- '⚠️ @TransmitSecurity/web-sdk: Browser environment not detected. ' +
20
- 'Some features may not work correctly.'
21
- );
22
- }
23
- })();
24
-
25
- // Export common SDK functionality (initialize, etc.)
26
- export * from '@transmit-security/web-sdk-common/dist/main-entry';
27
-
28
- // Import individual modules
29
- import * as drsMod from '@transmit-security/riskid_sdk';
30
- import * as idvMod from '@transmit-security/ts-identity-verification';
31
-
32
- // Export TypeScript types for better developer experience
33
- export type { ActionEventOptions, ActionResponse } from "@transmit-security/riskid_sdk";
34
- export type {
35
- authenticate,
36
- WebauthnApis,
37
- WebauthnAuthenticationFlows,
38
- AutofillHandlers,
39
- AuthenticationAutofillActivateHandlers,
40
- WebauthnRegistrationOptions,
41
- isAutofillSupported,
42
- SdkError,
43
- ErrorCode,
44
- isPlatformAuthenticatorSupported,
45
- register,
46
- crossDevice,
47
- CrossDeviceController,
48
- WebauthnCrossDeviceRegistrationOptions,
49
- WebauthnCrossDeviceFlows,
50
- getDefaultPaths
51
- } from '@transmit-security/authentication-sdk';
52
-
53
- // Module factories for dynamic loading
54
- const factories = {
55
- drs: drsMod as unknown as () => Record<string, any>,
56
- idv: idvMod as unknown as () => Record<string, any>,
57
- };
58
-
59
- /**
60
- * Main SDK class for CDN usage (window.tsPlatform)
61
- * Provides access to all modules and common functionality
62
- */
63
- class TSWebSDK {
64
- factories = factories;
65
-
66
- constructor() {
67
- // Attach DRS module functions
68
- Object.assign(this, drsMod);
69
- // Attach IDV module functions
70
- Object.assign(this, idvMod);
71
- }
72
- }
73
-
74
- // Export default instance for CDN usage
75
- export default new TSWebSDK();
package/src/tsconfig.json DELETED
@@ -1,14 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2018",
4
- "module": "ESNext",
5
- "strict": true,
6
- "skipLibCheck": true,
7
- "declaration": true,
8
- "typeRoots": [
9
- "./node_modules/@typescript/lib-dom"
10
- ],
11
- "outDir": "../build",
12
- "moduleResolution": "node"
13
- }
14
- }