idmission-web-sdk 1.0.12 → 1.0.14

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.
@@ -0,0 +1,24 @@
1
+ import { ReactElement } from 'react';
2
+ import { CustomerSuppliedVerbiage } from '../../lib/locales';
3
+ import { LoaderButtonColors } from '../common/LoaderButton';
4
+ export type IdCaptureFallbackColors = {
5
+ captureBtn?: LoaderButtonColors;
6
+ captureMoreBtn?: LoaderButtonColors;
7
+ doneBtn?: LoaderButtonColors;
8
+ };
9
+ export type IdCaptureFallbackVerbiage = {
10
+ headingText?: CustomerSuppliedVerbiage;
11
+ descriptionText?: CustomerSuppliedVerbiage;
12
+ firstInstructionText?: CustomerSuppliedVerbiage;
13
+ secondInstructionText?: CustomerSuppliedVerbiage;
14
+ captureBtnText?: CustomerSuppliedVerbiage;
15
+ captureMoreBtnText?: CustomerSuppliedVerbiage;
16
+ doneBtnText?: CustomerSuppliedVerbiage;
17
+ };
18
+ export type IdCaptureFallbackProps = {
19
+ onCapture?: (imageData: string) => void;
20
+ onFinished?: (images: string[]) => void;
21
+ colors?: IdCaptureFallbackColors;
22
+ verbiage?: IdCaptureFallbackVerbiage;
23
+ };
24
+ export declare const IdCaptureFallback: ({ onCapture, onFinished, colors, verbiage: rawVerbiage, }: IdCaptureFallbackProps) => ReactElement;
@@ -0,0 +1,21 @@
1
+ import { ReactElement } from 'react';
2
+ import { CustomerSuppliedVerbiage } from '../../lib/locales';
3
+ import { LoaderButtonColors } from '../common/LoaderButton';
4
+ export type SelfieCaptureFallbackColors = {
5
+ captureBtn?: LoaderButtonColors;
6
+ doneBtn?: LoaderButtonColors;
7
+ };
8
+ export type SelfieCaptureFallbackVerbiage = {
9
+ headingText?: CustomerSuppliedVerbiage;
10
+ descriptionText?: CustomerSuppliedVerbiage;
11
+ captureBtnText?: CustomerSuppliedVerbiage;
12
+ doneBtnText?: CustomerSuppliedVerbiage;
13
+ doneBtnLoadingText?: CustomerSuppliedVerbiage;
14
+ };
15
+ export type SelfieCaptureFallbackProps = {
16
+ onFinished?: (imageData: string) => void;
17
+ onCapture?: (imageData: string) => void;
18
+ colors?: SelfieCaptureFallbackColors;
19
+ verbiage?: SelfieCaptureFallbackVerbiage;
20
+ };
21
+ export declare const SelfieCaptureFallback: ({ onFinished, onCapture, colors, verbiage: rawVerbiage, }: SelfieCaptureFallbackProps) => ReactElement;
@@ -21,6 +21,7 @@ export type IdCapturePrediction = {
21
21
  focusPredictionTime: number;
22
22
  frameWidth: number;
23
23
  frameHeight: number;
24
+ allZero: boolean;
24
25
  };
25
26
  export type IdCaptureThresholds = {
26
27
  document?: number;
@@ -37,6 +38,7 @@ export declare const PREDICTION_POSITIONS: {
37
38
  export type IdCaptureModelsState = {
38
39
  ready: boolean;
39
40
  working: MutableRefObject<boolean>;
41
+ error: Error | null;
40
42
  thresholds: IdCaptureThresholds;
41
43
  setThresholds: (value: IdCaptureThresholds) => void;
42
44
  makePrediction: (frame: Frame) => void;
@@ -3,6 +3,7 @@ import { IdCaptureAssets, IdCaptureColors, IdCaptureVerbiage } from './IdCapture
3
3
  import { IdCaptureLoadingOverlayAssets, IdCaptureLoadingOverlayColors, IdCaptureLoadingOverlayVerbiage } from './IdCaptureLoadingOverlay';
4
4
  import { FlipIdPromptAssets, FlipIdPromptVerbiage } from './FlipIdPrompt';
5
5
  import { IdCaptureSuccessColors, IdCaptureSuccessVerbiage } from './IdCaptureSuccess';
6
+ import { IdCaptureFallbackColors, IdCaptureFallbackVerbiage } from '../fallback_flows/IdCapture';
6
7
  export type IdCaptureWizardAssets = {
7
8
  documentDetectionModelUrl?: string;
8
9
  focusModelUrl?: string;
@@ -15,6 +16,7 @@ export type IdCaptureWizardAssets = {
15
16
  export type IdCaptureWizardColors = IdCaptureColors & {
16
17
  loadingOverlay?: IdCaptureLoadingOverlayColors;
17
18
  success?: IdCaptureSuccessColors;
19
+ fallback?: IdCaptureFallbackColors;
18
20
  };
19
21
  export type IdCaptureWizardVerbiage = {
20
22
  loadingOverlay?: IdCaptureLoadingOverlayVerbiage;
@@ -23,6 +25,7 @@ export type IdCaptureWizardVerbiage = {
23
25
  passport?: IdCaptureVerbiage;
24
26
  flipIdPrompt?: FlipIdPromptVerbiage;
25
27
  success?: IdCaptureSuccessVerbiage;
28
+ fallback?: IdCaptureFallbackVerbiage;
26
29
  };
27
30
  export type IdCaptureSubmission = {
28
31
  idFrontImage: string | null;
@@ -25,6 +25,7 @@ type HighPerformanceSelfieGuidanceModelsState = {
25
25
  onPredictionMade: (handler: PredictionHandler) => void;
26
26
  canvasRef: MutableRefObject<HTMLCanvasElement | null>;
27
27
  ready: boolean;
28
+ error: Error | null;
28
29
  };
29
30
  export declare const HighPerformanceSelfieGuidanceModelsContext: React.Context<HighPerformanceSelfieGuidanceModelsState>;
30
31
  export declare const HighPerformanceSelfieGuidanceModelsProvider: ({ autoStart, children, throttleMs, }: {