@transmitsecurity/platform-web-sdk 1.15.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 (74) hide show
  1. package/CHANGELOG.md +479 -0
  2. package/README.md +72 -0
  3. package/VITE_CONFIG.md +107 -0
  4. package/build/drs-entry.d.ts +20 -0
  5. package/build/drs-entry.js +19 -0
  6. package/build/drs-only.d.ts +22 -0
  7. package/build/drs-only.js +25 -0
  8. package/build/drs.d.ts +13 -0
  9. package/build/drs.js +45 -0
  10. package/build/ido-entry.d.ts +17 -0
  11. package/build/ido-entry.js +19 -0
  12. package/build/ido.d.ts +8 -0
  13. package/build/ido.js +27 -0
  14. package/build/idv-entry.d.ts +17 -0
  15. package/build/idv-entry.js +19 -0
  16. package/build/idv.d.ts +8 -0
  17. package/build/idv.js +27 -0
  18. package/build/initialize-only.d.ts +7 -0
  19. package/build/initialize-only.js +40 -0
  20. package/build/initialize.d.ts +1 -0
  21. package/build/initialize.js +2 -0
  22. package/build/mainExport.d.ts +16 -0
  23. package/build/mainExport.js +43 -0
  24. package/build/sdk-factory.d.ts +109 -0
  25. package/build/sdk-factory.js +108 -0
  26. package/build/shared-state.d.ts +4 -0
  27. package/build/shared-state.js +32 -0
  28. package/build/webauthn-entry.d.ts +19 -0
  29. package/build/webauthn-entry.js +19 -0
  30. package/build/webauthn.d.ts +12 -0
  31. package/build/webauthn.js +44 -0
  32. package/bundler-config.json +15 -0
  33. package/dist/docs/.nojekyll +1 -0
  34. package/dist/docs/README.md +72 -0
  35. package/dist/docs/enums/ErrorCode.md +113 -0
  36. package/dist/docs/interfaces/ActionEventOptions.md +44 -0
  37. package/dist/docs/interfaces/ActionResponse.md +9 -0
  38. package/dist/docs/interfaces/AuthenticationAutofillActivateHandlers.md +61 -0
  39. package/dist/docs/interfaces/AutofillHandlers.md +50 -0
  40. package/dist/docs/interfaces/CrossDeviceController.md +27 -0
  41. package/dist/docs/interfaces/SdkError.md +28 -0
  42. package/dist/docs/interfaces/WebauthnApis.md +73 -0
  43. package/dist/docs/interfaces/WebauthnAuthenticationFlows.md +52 -0
  44. package/dist/docs/interfaces/WebauthnCrossDeviceFlows.md +107 -0
  45. package/dist/docs/interfaces/WebauthnCrossDeviceRegistrationOptions.md +23 -0
  46. package/dist/docs/interfaces/WebauthnRegistrationOptions.md +55 -0
  47. package/dist/docs/interfaces/initConfigParams.md +7 -0
  48. package/dist/docs/modules/drs.md +92 -0
  49. package/dist/docs/modules/idv.md +106 -0
  50. package/dist/docs/modules/webauthn.md +197 -0
  51. package/dist/docs/modules.md +146 -0
  52. package/dist/drs.cjs +1 -0
  53. package/dist/drs.d.ts +241 -0
  54. package/dist/drs.js +1 -0
  55. package/dist/ido.cjs +1 -0
  56. package/dist/ido.d.ts +8 -0
  57. package/dist/ido.js +1 -0
  58. package/dist/idv.cjs +1 -0
  59. package/dist/idv.d.ts +68 -0
  60. package/dist/idv.js +1 -0
  61. package/dist/index.cjs +1 -0
  62. package/dist/index.esm.js +1 -0
  63. package/dist/index.umd.js +1 -0
  64. package/dist/ts-platform-websdk.js +1 -0
  65. package/dist/web-sdk-drs+idv+webauthn+ido.js +1 -0
  66. package/dist/web-sdk.d.ts +1737 -0
  67. package/dist/webauthn.cjs +1 -0
  68. package/dist/webauthn.d.ts +461 -0
  69. package/dist/webauthn.js +1 -0
  70. package/package.json +98 -0
  71. package/scripts/make-semver-aliases.sh +11 -0
  72. package/scripts/upload-dist.sh +6 -0
  73. package/src/mainExport.ts +75 -0
  74. package/src/tsconfig.json +14 -0
package/package.json ADDED
@@ -0,0 +1,98 @@
1
+ {
2
+ "name": "@transmitsecurity/platform-web-sdk",
3
+ "version": "1.15.0",
4
+ "license": "SEE LICENSE IN LICENSE",
5
+ "private": false,
6
+ "main": "dist/index.cjs",
7
+ "module": "dist/index.esm.js",
8
+ "browser": "dist/ts-platform-websdk.js",
9
+ "types": "dist/web-sdk.d.ts",
10
+ "sideEffects": false,
11
+ "files": [
12
+ "dist/**/*",
13
+ "build/**/*",
14
+ "src/**/*",
15
+ "CHANGELOG.md",
16
+ "bundler-config.json",
17
+ "scripts/**/*",
18
+ "README.md",
19
+ "VITE_CONFIG.md"
20
+ ],
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "https://github.com/transmitsecurity-dev/ciam-web-sdk.git"
24
+ },
25
+ "homepage": "https://github.com/transmitsecurity-dev/ciam-web-sdk#readme",
26
+ "bugs": {
27
+ "url": "https://github.com/transmitsecurity-dev/ciam-web-sdk/issues"
28
+ },
29
+ "author": "Transmit Security Dev Team <dev@transmitsecurity.com>",
30
+ "publishConfig": {
31
+ "access": "public",
32
+ "registry": "https://registry.npmjs.org/"
33
+ },
34
+ "exports": {
35
+ ".": {
36
+ "import": "./dist/index.esm.js",
37
+ "require": "./dist/index.cjs",
38
+ "browser": "./dist/ts-platform-websdk.js",
39
+ "types": "./dist/web-sdk.d.ts",
40
+ "default": "./dist/ts-platform-websdk.js"
41
+ },
42
+ "./drs": {
43
+ "import": "./dist/drs.js",
44
+ "require": "./dist/drs.cjs",
45
+ "types": "./dist/drs.d.ts",
46
+ "default": "./dist/drs.js"
47
+ },
48
+ "./webauthn": {
49
+ "import": "./dist/webauthn.js",
50
+ "require": "./dist/webauthn.cjs",
51
+ "types": "./dist/webauthn.d.ts",
52
+ "default": "./dist/webauthn.js"
53
+ },
54
+ "./idv": {
55
+ "import": "./dist/idv.js",
56
+ "require": "./dist/idv.cjs",
57
+ "types": "./dist/idv.d.ts",
58
+ "default": "./dist/idv.js"
59
+ },
60
+ "./ido": {
61
+ "import": "./dist/ido.js",
62
+ "require": "./dist/ido.cjs",
63
+ "types": "./dist/ido.d.ts",
64
+ "default": "./dist/ido.js"
65
+ }
66
+ },
67
+ "scripts": {
68
+ "prebuild": "yarn tsc -p ./src",
69
+ "build": "web-sdk-bundler \"`cat bundler-config.json`\"",
70
+ "prepare": "yarn build",
71
+ "distribute": "bash scripts/upload-dist.sh",
72
+ "publish:npm": "npm publish --access public"
73
+ },
74
+ "devDependencies": {
75
+ "@rollup/plugin-json": "6.1.0",
76
+ "@transmit-security/web-sdk-bundler": "0.1.14",
77
+ "@types/node": "20.3.3",
78
+ "@transmit-security/authentication-sdk": "4.12.0",
79
+ "@transmit-security/ido-web-sdk": "0.0.72",
80
+ "@transmit-security/riskid_sdk": "1.51.0",
81
+ "@transmit-security/ts-identity-verification": "1.4.8",
82
+ "@transmit-security/web-sdk-common": "1.1.6",
83
+ "vite": "^5.0.0"
84
+ },
85
+ "engines": {
86
+ "node": ">=20"
87
+ },
88
+ "keywords": [
89
+ "web",
90
+ "browser",
91
+ "authentication",
92
+ "webauthn",
93
+ "security",
94
+ "identity"
95
+ ],
96
+ "description": "Transmit Security Web SDK - Browser-only authentication and identity verification",
97
+ "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
98
+ }
@@ -0,0 +1,11 @@
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
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env bash
2
+
3
+ cdn_dir=gs://$platform_sdk_cdn/platform-websdk/$npm_package_version
4
+
5
+ gsutil cp dist/web-sdk-*.js $cdn_dir/ts-platform-websdk.js
6
+ gsutil cp dist/web-sdk.d.ts $cdn_dir/ts-platform-websdk.d.ts
@@ -0,0 +1,75 @@
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();
@@ -0,0 +1,14 @@
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
+ }