idmission-web-sdk 0.0.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 (135) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +398 -0
  3. package/dist/components/CompositeWizard.d.ts +27 -0
  4. package/dist/components/Example.d.ts +2 -0
  5. package/dist/components/GuideOrientationProvider.d.ts +4 -0
  6. package/dist/components/additional_document_capture/AdditionalDocumentCapture.d.ts +17 -0
  7. package/dist/components/additional_document_capture/AdditionalDocumentCaptureWizard.d.ts +16 -0
  8. package/dist/components/additional_document_capture/CapturedDocuments.d.ts +8 -0
  9. package/dist/components/camera/CameraAccessDeniedOverlay.d.ts +4 -0
  10. package/dist/components/camera/CameraProvider.d.ts +9 -0
  11. package/dist/components/camera/CameraVideoTag.d.ts +5 -0
  12. package/dist/components/common/Page.d.ts +12 -0
  13. package/dist/components/common/cdn.d.ts +1 -0
  14. package/dist/components/common/overlay.d.ts +790 -0
  15. package/dist/components/common/spinner.d.ts +261 -0
  16. package/dist/components/customer_flows/CustomerBiometricsEnrollment.d.ts +29 -0
  17. package/dist/components/customer_flows/CustomerIdAndBiometricsEnrollment.d.ts +37 -0
  18. package/dist/components/customer_flows/CustomerIdentification.d.ts +23 -0
  19. package/dist/components/customer_flows/CustomerVerification.d.ts +22 -0
  20. package/dist/components/customer_flows/FaceValidation.d.ts +21 -0
  21. package/dist/components/customer_flows/IdAndFaceValidation.d.ts +36 -0
  22. package/dist/components/customer_flows/IdValidation.d.ts +33 -0
  23. package/dist/components/customer_flows/SignatureKYC.d.ts +14 -0
  24. package/dist/components/customer_identification/CustomerIdentificationCapture.d.ts +13 -0
  25. package/dist/components/customer_identification/CustomerIdentificationFailure.d.ts +11 -0
  26. package/dist/components/customer_identification/CustomerIdentificationSuccess.d.ts +10 -0
  27. package/dist/components/customer_identification/CustomerIdentificationWizard.d.ts +33 -0
  28. package/dist/components/customer_verification/CustomerVerificationCapture.d.ts +13 -0
  29. package/dist/components/customer_verification/CustomerVerificationFailure.d.ts +11 -0
  30. package/dist/components/customer_verification/CustomerVerificationSuccess.d.ts +10 -0
  31. package/dist/components/customer_verification/CustomerVerificationWizard.d.ts +33 -0
  32. package/dist/components/face_liveness/FaceCaptureGuideOverlay.d.ts +6 -0
  33. package/dist/components/face_liveness/FaceLivenessCapture.d.ts +16 -0
  34. package/dist/components/face_liveness/FaceLivenessFailure.d.ts +11 -0
  35. package/dist/components/face_liveness/FaceLivenessSuccess.d.ts +10 -0
  36. package/dist/components/face_liveness/FaceLivenessWizard.d.ts +33 -0
  37. package/dist/components/id_capture/DocumentCaptureGuideOverlay.d.ts +14 -0
  38. package/dist/components/id_capture/FlipIdPrompt.d.ts +9 -0
  39. package/dist/components/id_capture/IdCapture.d.ts +46 -0
  40. package/dist/components/id_capture/IdCaptureLoadingOverlay.d.ts +13 -0
  41. package/dist/components/id_capture/IdCaptureModelsProvider.d.ts +7 -0
  42. package/dist/components/id_capture/IdCaptureSubmitBtn.d.ts +7 -0
  43. package/dist/components/id_capture/IdCaptureSuccess.d.ts +18 -0
  44. package/dist/components/id_capture/IdCaptureWizard.d.ts +56 -0
  45. package/dist/components/selfie_capture/HighPerformanceSelfieGuidanceModelsProvider.d.ts +34 -0
  46. package/dist/components/selfie_capture/SelfieCapture.d.ts +20 -0
  47. package/dist/components/selfie_capture/SelfieCaptureLoadingOverlay.d.ts +12 -0
  48. package/dist/components/selfie_capture/SelfieGuidanceModelsProvider.d.ts +5 -0
  49. package/dist/components/signature_capture/SignatureCapture.d.ts +18 -0
  50. package/dist/components/signature_capture/VideoSignatureCapture.d.ts +9 -0
  51. package/dist/components/signature_capture/data.d.ts +9 -0
  52. package/dist/components/signature_kyc/SignatureKYCLoadingOverlay.d.ts +12 -0
  53. package/dist/components/signature_kyc/SignatureKYCWizard.d.ts +5 -0
  54. package/dist/components/submission/GeolocationAccessDeniedOverlay.d.ts +5 -0
  55. package/dist/components/submission/SubmissionProvider.d.ts +16 -0
  56. package/dist/components/submission/SubmissionSuccess.d.ts +2 -0
  57. package/dist/contexts/CameraStateContext.d.ts +18 -0
  58. package/dist/contexts/GuideOrientationContext.d.ts +15 -0
  59. package/dist/contexts/IdCaptureModelsContext.d.ts +11 -0
  60. package/dist/contexts/SelfieGuidanceModelsContext.d.ts +14 -0
  61. package/dist/contexts/SubmissionContext.d.ts +156 -0
  62. package/dist/index.d.ts +32 -0
  63. package/dist/index.js +7 -0
  64. package/dist/lib/barcode/Native.d.ts +1 -0
  65. package/dist/lib/barcode/Parse.d.ts +53 -0
  66. package/dist/lib/barcode/Scan.d.ts +3 -0
  67. package/dist/lib/barcode/ZXing.d.ts +1 -0
  68. package/dist/lib/camera/Camera.d.ts +59 -0
  69. package/dist/lib/camera/hooks.d.ts +9 -0
  70. package/dist/lib/camera/useVideoRecorder.d.ts +7 -0
  71. package/dist/lib/locales/en/translation.d.ts +2 -0
  72. package/dist/lib/locales/es/translation.d.ts +50 -0
  73. package/dist/lib/locales/index.d.ts +60 -0
  74. package/dist/lib/models/DocumentDetection.d.ts +27 -0
  75. package/dist/lib/models/FaceDetection.d.ts +5 -0
  76. package/dist/lib/models/Focus.d.ts +7 -0
  77. package/dist/lib/models/preloadModels.d.ts +5 -0
  78. package/dist/lib/tfworker/Actions.d.ts +29 -0
  79. package/dist/lib/tfworker/Client.d.ts +14 -0
  80. package/dist/lib/tfworker/TfWorker.d.ts +8 -0
  81. package/dist/lib/utils/OffscreenCanvasPolyfill.d.ts +0 -0
  82. package/dist/lib/utils/cropToShoulders.d.ts +2 -0
  83. package/dist/lib/utils/dataUrlToBase64.d.ts +3 -0
  84. package/dist/lib/utils/deviceDetection.d.ts +2 -0
  85. package/dist/lib/utils/getBlobDimensions.d.ts +1 -0
  86. package/dist/sdk2.cjs.development.js +13219 -0
  87. package/dist/sdk2.cjs.development.js.map +1 -0
  88. package/dist/sdk2.cjs.production.js +2 -0
  89. package/dist/sdk2.cjs.production.js.map +1 -0
  90. package/dist/sdk2.esm.js +13167 -0
  91. package/dist/sdk2.esm.js.map +1 -0
  92. package/dist/sdk2.umd.development.js +17456 -0
  93. package/dist/sdk2.umd.development.js.map +1 -0
  94. package/dist/sdk2.umd.production.js +2 -0
  95. package/dist/sdk2.umd.production.js.map +1 -0
  96. package/dist/stories/AdditionalDocumentCapture/AdditionalDocumentCapture.stories.d.ts +18 -0
  97. package/dist/stories/BarcodeReader.stories.d.ts +7 -0
  98. package/dist/stories/Camera.stories.d.ts +7 -0
  99. package/dist/stories/CompositeWizard/FaceLivenessAndIdCapture.stories.d.ts +24 -0
  100. package/dist/stories/CompositeWizard/IdCaptureAndFaceLiveness.stories.d.ts +24 -0
  101. package/dist/stories/CustomerFlows/CustomerBiometricsEnrollment.stories.d.ts +30 -0
  102. package/dist/stories/CustomerFlows/CustomerIdAndBiometricsEnrollment.stories.d.ts +29 -0
  103. package/dist/stories/CustomerFlows/CustomerIdentification.stories.d.ts +28 -0
  104. package/dist/stories/CustomerFlows/CustomerVerification.stories.d.ts +29 -0
  105. package/dist/stories/CustomerFlows/FaceValidation.stories.d.ts +29 -0
  106. package/dist/stories/CustomerFlows/IdAndFaceValidation.stories.d.ts +28 -0
  107. package/dist/stories/CustomerFlows/IdValidation.stories.d.ts +30 -0
  108. package/dist/stories/CustomerFlows/SignatureKYC.stories.d.ts +28 -0
  109. package/dist/stories/DocumentCaptureGuideOverlay/LicenseBack.stories.d.ts +14 -0
  110. package/dist/stories/DocumentCaptureGuideOverlay/LicenseFront.stories.d.ts +15 -0
  111. package/dist/stories/DocumentCaptureGuideOverlay/Passport.stories.d.ts +15 -0
  112. package/dist/stories/FaceLiveness/Capture.stories.d.ts +21 -0
  113. package/dist/stories/FaceLiveness/Wizard.stories.d.ts +23 -0
  114. package/dist/stories/FlipIdPrompt.stories.d.ts +15 -0
  115. package/dist/stories/FrameLoop.stories.d.ts +7 -0
  116. package/dist/stories/IdCapture/LicenseBackCapture.stories.d.ts +65 -0
  117. package/dist/stories/IdCapture/LicenseFrontCapture.stories.d.ts +65 -0
  118. package/dist/stories/IdCapture/PassportCapture.stories.d.ts +65 -0
  119. package/dist/stories/IdCapture/Wizard.stories.d.ts +89 -0
  120. package/dist/stories/MultiCamera.stories.d.ts +7 -0
  121. package/dist/stories/SignatureCapture/SignatureCapture.stories.d.ts +7 -0
  122. package/dist/stories/SignatureCapture/VideoSignatureCapture.stories.d.ts +7 -0
  123. package/dist/stories/TokenGeneration.stories.d.ts +7 -0
  124. package/dist/stories/VideoCapture.stories.d.ts +7 -0
  125. package/dist/stories/WebSdkExample.stories.d.ts +7 -0
  126. package/dist/stories/WebWorker.stories.d.ts +7 -0
  127. package/dist/stories/models/DocumentDetection.stories.d.ts +7 -0
  128. package/dist/stories/models/FaceDetection.stories.d.ts +9 -0
  129. package/dist/stories/models/FocusModel.stories.d.ts +7 -0
  130. package/dist/stories/models/HighPerformanceFaceDetectionMinimal.stories.d.ts +12 -0
  131. package/dist/stories/models/HighPerformanceFaceDetectionOriginal.stories.d.ts +7 -0
  132. package/dist/stories/utils/cdnUrl.d.ts +1 -0
  133. package/dist/stories/utils/getToken.d.ts +8 -0
  134. package/dist/stories/utils/makeRandomString.d.ts +1 -0
  135. package/package.json +130 -0
@@ -0,0 +1,89 @@
1
+ import * as React from 'react';
2
+ import { IdCaptureWizardProps } from '../../components/id_capture/IdCaptureWizard';
3
+ declare const _default: {
4
+ title: string;
5
+ component: (args: IdCaptureWizardProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
6
+ };
7
+ export default _default;
8
+ export declare const Wizard: {
9
+ args: {
10
+ assets: {
11
+ documentDetectionModelUrl: string;
12
+ focusModelUrl: string;
13
+ };
14
+ documentDetectionNonMaxSuppressionEnabled: boolean;
15
+ autoCaptureEnabled: boolean;
16
+ idCardAutoCaptureScoreThreshold: number;
17
+ passportAutoCaptureScoreThreshold: number;
18
+ mrzDetectionScoreThreshold: number;
19
+ idCardFocusScoreThreshold: number;
20
+ passportFocusScoreThreshold: number;
21
+ autoCaptureBarcodeRequired: string;
22
+ barcodeScanningEnabled: boolean;
23
+ submissionEnvironment: string;
24
+ };
25
+ argTypes: {
26
+ submissionEnvironment: {
27
+ control: {
28
+ type: string;
29
+ };
30
+ options: string[];
31
+ };
32
+ autoCaptureEnabled: {
33
+ control: {
34
+ type: string;
35
+ };
36
+ };
37
+ autoCaptureBarcodeRequired: {
38
+ control: {
39
+ type: string;
40
+ };
41
+ options: (string | boolean)[];
42
+ };
43
+ barcodeScanningEnabled: {
44
+ control: {
45
+ type: string;
46
+ };
47
+ };
48
+ idCardAutoCaptureScoreThreshold: {
49
+ control: {
50
+ type: string;
51
+ min: number;
52
+ max: number;
53
+ step: number;
54
+ };
55
+ };
56
+ passportAutoCaptureScoreThreshold: {
57
+ control: {
58
+ type: string;
59
+ min: number;
60
+ max: number;
61
+ step: number;
62
+ };
63
+ };
64
+ mrzDetectionScoreThreshold: {
65
+ control: {
66
+ type: string;
67
+ min: number;
68
+ max: number;
69
+ step: number;
70
+ };
71
+ };
72
+ idCardFocusScoreThreshold: {
73
+ control: {
74
+ type: string;
75
+ min: number;
76
+ max: number;
77
+ step: number;
78
+ };
79
+ };
80
+ passportFocusScoreThreshold: {
81
+ control: {
82
+ type: string;
83
+ min: number;
84
+ max: number;
85
+ step: number;
86
+ };
87
+ };
88
+ };
89
+ };
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ component: ({}: {}) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
5
+ };
6
+ export default _default;
7
+ export declare const MultiCameraTest: {};
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ component: () => React.ReactElement;
5
+ };
6
+ export default _default;
7
+ export declare const SignatureCapture: {};
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ component: () => React.ReactElement;
5
+ };
6
+ export default _default;
7
+ export declare const VideoSignatureCapture: {};
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ declare const _default: {
3
+ title: string;
4
+ component: ({}: {}) => JSX.Element;
5
+ };
6
+ export default _default;
7
+ export declare const TokenGeneration: {};
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ component: ({}: {}) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
5
+ };
6
+ export default _default;
7
+ export declare const VideoCaptureTest: {};
@@ -0,0 +1,7 @@
1
+ import { Example } from '../components/Example';
2
+ declare const _default: {
3
+ title: string;
4
+ component: typeof Example;
5
+ };
6
+ export default _default;
7
+ export declare const ExampleComponent: {};
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ declare const _default: {
3
+ title: string;
4
+ component: () => JSX.Element;
5
+ };
6
+ export default _default;
7
+ export declare const WebWorkerTest: {};
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ declare const _default: {
3
+ title: string;
4
+ component: ({}: {}) => JSX.Element;
5
+ };
6
+ export default _default;
7
+ export declare const DocumentDetection: {};
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ declare const _default: {
3
+ title: string;
4
+ component: () => JSX.Element;
5
+ };
6
+ export default _default;
7
+ export declare const FaceDetection: {
8
+ args: {};
9
+ };
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ declare const _default: {
3
+ title: string;
4
+ component: ({}: {}) => JSX.Element;
5
+ };
6
+ export default _default;
7
+ export declare const Focus: {};
@@ -0,0 +1,12 @@
1
+ declare namespace _default {
2
+ const title: string;
3
+ function component({ throttleMs }: {
4
+ throttleMs: any;
5
+ }): JSX.Element;
6
+ }
7
+ export default _default;
8
+ export namespace Minimal {
9
+ namespace args {
10
+ const throttleMs: number;
11
+ }
12
+ }
@@ -0,0 +1,7 @@
1
+ declare namespace _default {
2
+ export const title: string;
3
+ export { Component as component };
4
+ }
5
+ export default _default;
6
+ export const Original: {};
7
+ declare function Component(): JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const cdnUrl: any;
@@ -0,0 +1,8 @@
1
+ export declare function getToken({ authUrl, clientId, clientSecret, username, password, }: {
2
+ authUrl: string;
3
+ clientId: string;
4
+ clientSecret: string;
5
+ username: string;
6
+ password: string;
7
+ }): Promise<string>;
8
+ export declare function useToken(): string | undefined;
@@ -0,0 +1 @@
1
+ export declare function makeRandomString(length: number): string;
package/package.json ADDED
@@ -0,0 +1,130 @@
1
+ {
2
+ "name": "idmission-web-sdk",
3
+ "version": "0.0.1",
4
+ "description": "",
5
+ "main": "dist/index.js",
6
+ "module": "dist/sdk2.esm.js",
7
+ "jsnext:main": "dist/sdk2.esm.js",
8
+ "typings": "dist/index.d.ts",
9
+ "files": [
10
+ "dist"
11
+ ],
12
+ "scripts": {
13
+ "build": "run-s clean compile bundle",
14
+ "bundle": "rollup -c",
15
+ "check:format": "prettier --list-different \"**/*.{js,ts,tsx}\"",
16
+ "check:types": "tsc --noEmit",
17
+ "clean": "run-p clean:*",
18
+ "clean:compiled": "shx rm -rf compiled",
19
+ "clean:coverage": "shx rm -rf coverage",
20
+ "clean:dist": "shx rm -rf dist",
21
+ "compile": "tsc -p tsconfig.base.json",
22
+ "format": "prettier --write \"**/*.{js,ts,tsx}\"",
23
+ "lint": "eslint . --ext .js,.ts",
24
+ "postbundle": "npm run clean:compiled && shx cp ./index.js ./dist/index.js",
25
+ "release": "tanem-scripts release",
26
+ "test": "run-s check:* lint build test:*",
27
+ "test:cjs": "jest --config ./scripts/jest/config.cjs.js",
28
+ "test:cjsprod": "cross-env NODE_ENV=production jest --config ./scripts/jest/config.cjs.js",
29
+ "test:es": "jest --config ./scripts/jest/config.es.js",
30
+ "test:src": "jest --config ./scripts/jest/config.src.js",
31
+ "test:umd": "jest --config ./scripts/jest/config.umd.js",
32
+ "test:umdprod": "jest --config ./scripts/jest/config.umdprod.js",
33
+ "storybook": "storybook dev -p 6006",
34
+ "build-storybook": "storybook build"
35
+ },
36
+ "repository": {
37
+ "type": "git",
38
+ "url": "github:mackinleysmith/sdk2"
39
+ },
40
+ "keywords": [
41
+ "javascript",
42
+ "react",
43
+ "typescript"
44
+ ],
45
+ "author": "MacKinley Smith <smithmackinley@gmail.com>",
46
+ "license": "MIT",
47
+ "bugs": {
48
+ "url": "github:mackinleysmith/sdk2/issues"
49
+ },
50
+ "homepage": "websdk2test.idmission.com",
51
+ "peerDependencies": {
52
+ "@sentry/react": "^7.50.0",
53
+ "@tensorflow-models/face-detection": "^1.0.2",
54
+ "@tensorflow/tfjs": "^4.6.0",
55
+ "@tensorflow/tfjs-backend-wasm": "^4.6.0",
56
+ "react": "^18.2.0",
57
+ "react-dom": "^18.2.0",
58
+ "styled-components": "^6.0.7"
59
+ },
60
+ "dependencies": {
61
+ "@babel/runtime": "^7.14.6",
62
+ "@mediapipe/tasks-vision": "^0.10.6",
63
+ "@sentry/react": "^7.50.0",
64
+ "i18next": "^23.5.1",
65
+ "i18next-browser-languagedetector": "^7.1.0",
66
+ "ladda": "^2.0.3",
67
+ "prop-types": "^15.7.2",
68
+ "react-i18next": "^13.2.2",
69
+ "react-signature-canvas": "^1.0.6",
70
+ "seedrandom": "^3.0.5",
71
+ "tslib": "^2.3.0",
72
+ "use-resize-observer": "^9.1.0"
73
+ },
74
+ "devDependencies": {
75
+ "@babel/core": "7.14.6",
76
+ "@babel/plugin-proposal-class-properties": "7.14.5",
77
+ "@babel/plugin-transform-runtime": "7.14.5",
78
+ "@babel/preset-env": "7.14.7",
79
+ "@babel/preset-react": "7.14.5",
80
+ "@sentry/vite-plugin": "^2.2.0",
81
+ "@storybook/addon-essentials": "^7.4.6",
82
+ "@storybook/addon-interactions": "^7.4.6",
83
+ "@storybook/addon-links": "^7.4.6",
84
+ "@storybook/blocks": "^7.4.6",
85
+ "@storybook/react": "^7.4.6",
86
+ "@storybook/react-vite": "^7.4.6",
87
+ "@storybook/testing-library": "^0.2.2",
88
+ "@testing-library/jest-dom": "5.14.1",
89
+ "@testing-library/react": "12.0.0",
90
+ "@testing-library/user-event": "13.1.9",
91
+ "@types/jest": "26.0.24",
92
+ "@types/prop-types": "15.7.4",
93
+ "@types/react": "17.0.14",
94
+ "@types/react-dom": "17.0.9",
95
+ "@types/react-signature-canvas": "^1.0.2",
96
+ "@types/w3c-image-capture": "^1.0.7",
97
+ "@typescript-eslint/eslint-plugin": "4.28.3",
98
+ "@typescript-eslint/parser": "4.28.3",
99
+ "babel-core": "6.26.3",
100
+ "babel-plugin-transform-react-remove-prop-types": "0.4.24",
101
+ "cross-env": "7.0.3",
102
+ "eslint": "7.30.0",
103
+ "eslint-config-prettier": "8.3.0",
104
+ "eslint-plugin-react": "7.24.0",
105
+ "eslint-plugin-react-hooks": "4.2.0",
106
+ "eslint-plugin-storybook": "^0.6.14",
107
+ "i18next-scanner": "^4.4.0",
108
+ "jest": "29.1.0",
109
+ "npm-run-all": "4.1.5",
110
+ "prettier": "2.3.2",
111
+ "react": "^18.2.0",
112
+ "react-dom": "^18.2.0",
113
+ "react-test-renderer": "^18.2.0",
114
+ "regenerator-runtime": "0.13.7",
115
+ "rollup": "2.53.2",
116
+ "rollup-plugin-babel": "4.4.0",
117
+ "rollup-plugin-commonjs": "10.1.0",
118
+ "rollup-plugin-filesize": "9.1.1",
119
+ "rollup-plugin-node-resolve": "5.2.0",
120
+ "rollup-plugin-replace": "2.2.0",
121
+ "rollup-plugin-size-snapshot": "0.12.0",
122
+ "rollup-plugin-sourcemaps": "0.6.3",
123
+ "rollup-plugin-terser": "7.0.2",
124
+ "shx": "0.3.3",
125
+ "storybook": "^7.4.6",
126
+ "tanem-scripts": "7.0.0",
127
+ "ts-jest": "29.1.0",
128
+ "typescript": "^5.0.4"
129
+ }
130
+ }