idmission-web-sdk 2.0.4 → 2.1.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 (32) hide show
  1. package/README.md +36 -28
  2. package/dist/components/customer_flows/CustomerIdAndBiometricsEnrollment.d.ts +3 -12
  3. package/dist/components/customer_flows/IdAndFaceValidation.d.ts +3 -12
  4. package/dist/components/customer_flows/IdValidation.d.ts +3 -12
  5. package/dist/components/customer_flows/VideoIdValidation.d.ts +3 -12
  6. package/dist/components/id_capture/CapturedDocuments.d.ts +2 -0
  7. package/dist/components/id_capture/FocusModelProvider.d.ts +2 -1
  8. package/dist/components/id_capture/IdCapture.d.ts +5 -14
  9. package/dist/components/id_capture/IdCaptureModelsProvider.d.ts +7 -22
  10. package/dist/components/id_capture/IdCaptureStateProvider.d.ts +12 -38
  11. package/dist/components/id_capture/IdCaptureSuccess.d.ts +2 -3
  12. package/dist/components/id_capture/IdCaptureWizard.d.ts +3 -9
  13. package/dist/components/video_id/IdVideoCapture.d.ts +12 -7
  14. package/dist/components/video_id/IdVideoCaptureWizard.d.ts +3 -8
  15. package/dist/lib/models/DocumentDetection.d.ts +15 -12
  16. package/dist/lib/models/Focus.d.ts +6 -2
  17. package/dist/sdk2.cjs.development.js +774 -926
  18. package/dist/sdk2.cjs.development.js.map +1 -1
  19. package/dist/sdk2.cjs.production.js +1 -1
  20. package/dist/sdk2.cjs.production.js.map +1 -1
  21. package/dist/sdk2.esm.js +774 -926
  22. package/dist/sdk2.esm.js.map +1 -1
  23. package/dist/sdk2.umd.development.js +774 -926
  24. package/dist/sdk2.umd.development.js.map +1 -1
  25. package/dist/sdk2.umd.production.js +1 -1
  26. package/dist/sdk2.umd.production.js.map +1 -1
  27. package/dist/stories/Components/IdCapture/LicenseBackCapture.stories.d.ts +0 -48
  28. package/dist/stories/Components/IdCapture/LicenseFrontCapture.stories.d.ts +0 -45
  29. package/dist/stories/Components/IdCapture/PassportCapture.stories.d.ts +0 -47
  30. package/dist/stories/Components/IdCapture/Wizard.stories.d.ts +1 -77
  31. package/dist/version.d.ts +1 -1
  32. package/package.json +1 -1
@@ -1,11 +1,17 @@
1
1
  /// <reference types="react" />
2
2
  import { ObjectDetector, ObjectDetectorResult } from '@mediapipe/tasks-vision';
3
- export declare const defaultDocumentDetectorModelPath = "https://websdk-cdn-dev.idmission.com/assets/models/docdetectmp20240611/model_fp16.tflite";
3
+ export declare const defaultDocumentDetectorModelPath = "https://websdk-cdn-dev.idmission.com/assets/models/docdetectmp20240614/model_fp16.tflite";
4
4
  export declare const defaultDocumentDetectionScoreThreshold = 0.1;
5
5
  export declare const defaultDocumentDetectionModelLoadTimeoutMs = 45000;
6
6
  export declare const defaultDocumentDetectionThresholds: DocumentDetectionThresholds;
7
- export type DocumentType = 'none' | 'idCard' | 'passport';
8
- export type Label = 'Document' | 'MRZ' | 'PDF417' | 'Primary face' | 'Secondary face' | 'Glare' | 'Punch Hole' | 'Passport page';
7
+ export type DocumentType = 'none' | 'idCardFront' | 'idCardBack' | 'passport';
8
+ export declare const documentTypeDisplayNames: {
9
+ idCardFront: string;
10
+ idCardBack: string;
11
+ passport: string;
12
+ none: string;
13
+ };
14
+ export type Label = 'Document' | 'Document back' | 'MRZ' | 'PDF417' | 'Primary face' | 'Secondary face' | 'Glare' | 'Punch Hole' | 'Passport page';
9
15
  export type DetectedObjectBox = {
10
16
  xMin: number;
11
17
  xMax: number;
@@ -20,10 +26,9 @@ export type DetectedObject = {
20
26
  score: number;
21
27
  };
22
28
  export type DocumentDetectionThresholds = {
23
- idCard?: number;
29
+ idCardFront?: number;
30
+ idCardBack?: number;
24
31
  passport?: number;
25
- mrz?: number;
26
- pdf417?: number;
27
32
  };
28
33
  export declare function loadDocumentDetector(modelAssetPath?: string, scoreThreshold?: number): Promise<ObjectDetector>;
29
34
  export declare function useLoadDocumentDetector({ modelPath, modelLoadTimeoutMs, scoreThreshold, onModelError, }: {
@@ -44,15 +49,13 @@ export type DocumentDetectionPrediction = {
44
49
  detectionScore: number;
45
50
  detectionThresholdMet: boolean;
46
51
  detectedDocumentType: DocumentType;
52
+ idCardFrontDetectionScore: number;
53
+ idCardFrontDetectionThresholdMet: boolean;
54
+ idCardBackDetectionScore: number;
55
+ idCardBackDetectionThresholdMet: boolean;
47
56
  passportDetectionScore: number;
48
57
  passportDetectionThresholdMet: boolean;
49
- mrzDetectionScore: number;
50
- mrzDetectionThresholdMet: boolean;
51
- pdf417DetectionScore: number;
52
- pdf417DetectionThresholdMet: boolean;
53
58
  bestDocument: DetectedObject | undefined;
54
- bestMrz: DetectedObject | undefined;
55
- bestPdf417: DetectedObject | undefined;
56
59
  documentInBounds: boolean;
57
60
  documentTooClose: boolean;
58
61
  frameWidth: number;
@@ -2,14 +2,18 @@
2
2
  import { ImageClassifier } from '@mediapipe/tasks-vision';
3
3
  import { Frame } from '../utils/getFrameDimensions';
4
4
  import { DetectedObjectBox } from './DocumentDetection';
5
- export declare const defaultFocusModelPath = "https://websdk-cdn-dev.idmission.com/assets/models/focusmp20240523/model_float16.tflite";
5
+ export declare const defaultFocusModelPath = "https://websdk-cdn-dev.idmission.com/assets/models/focusmp20240619/model_fp16.tflite";
6
6
  export declare const defaultFocusModelLoadTimeoutMs = 45000;
7
7
  export type FocusPrediction = {
8
8
  score: number;
9
9
  predictionTime: number;
10
10
  };
11
11
  export type FocusThresholds = {
12
- idCard?: {
12
+ idCardFront?: {
13
+ desktop?: number;
14
+ mobile?: number;
15
+ };
16
+ idCardBack?: {
13
17
  desktop?: number;
14
18
  mobile?: number;
15
19
  };