idmission-web-sdk 1.0.196 → 1.0.198

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.
@@ -1,8 +1,10 @@
1
1
  import React, { Dispatch, ReactNode } from 'react';
2
- import { CapturedDocumentType } from './CapturedDocuments';
2
+ import { CapturedDocument, CapturedDocuments, CapturedDocumentType } from './CapturedDocuments';
3
3
  import { IdCapturePrediction } from './IdCaptureModelsProvider';
4
4
  import { PDF417DetectionResult } from '../../lib/barcode/Native';
5
5
  import { DetectedObject, DocumentType } from '../../lib/models/DocumentDetection';
6
+ import { IdCaptureRequirementOption } from './IdCaptureRequirementOption';
7
+ export type CaptureState = 'capturing' | 'complete' | 'requestingFlip';
6
8
  export type IdCaptureState = {
7
9
  initialDrawComplete: boolean;
8
10
  redrawing: boolean;
@@ -52,9 +54,21 @@ export type IdCaptureState = {
52
54
  captured: boolean;
53
55
  captureFailed: boolean;
54
56
  imageUrl: string | null;
57
+ captureState: CaptureState;
58
+ capturedDocuments: CapturedDocuments;
59
+ captureRequirement: IdCaptureRequirementOption;
60
+ requestedDocumentType: CapturedDocumentType;
61
+ detectedDocumentType: DocumentType;
62
+ differentDocumentTypeDetections: number;
55
63
  };
56
64
  export type IdCaptureAction = {
57
- type: 'configure';
65
+ type: 'configureWizard';
66
+ payload: {
67
+ captureRequirement: IdCaptureRequirementOption;
68
+ precapturedDocuments?: CapturedDocuments;
69
+ };
70
+ } | {
71
+ type: 'configureCapture';
58
72
  payload: {
59
73
  requiredDocumentType?: CapturedDocumentType;
60
74
  goodFramesThreshold: number;
@@ -110,6 +124,21 @@ export type IdCaptureAction = {
110
124
  };
111
125
  } | {
112
126
  type: 'barcodeScanFailed';
127
+ } | {
128
+ type: 'predictionMade';
129
+ payload: IdCapturePrediction;
130
+ } | {
131
+ type: 'documentCaptured';
132
+ payload: CapturedDocument;
133
+ } | {
134
+ type: 'documentCapturedManually';
135
+ payload: {
136
+ imageData: string;
137
+ };
138
+ } | {
139
+ type: 'flipRequestCompleted';
140
+ } | {
141
+ type: 'resetWizard';
113
142
  };
114
143
  export type IdCaptureDispatch = Dispatch<IdCaptureAction>;
115
144
  export declare const IdCaptureStateContext: React.Context<IdCaptureState>;