@ahmed_hani/dot-document-auto-capture 7.7.0 → 8.0.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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ahmed_hani/dot-document-auto-capture",
3
3
  "private": false,
4
- "version": "7.7.0",
4
+ "version": "8.0.0",
5
5
  "license": "ahmed_hani proprietary license",
6
6
  "description": "Digital onboarding document capture",
7
7
  "keywords": [
@@ -23,9 +23,9 @@
23
23
  ],
24
24
  "repository": {
25
25
  "type": "git",
26
- "url": "https://github.com/innovatrics/dot-js-kit.git"
26
+ "url": "https://github.com/ahmed_hani/dot-js-kit.git"
27
27
  },
28
- "homepage": "https://developers.innovatrics.com/digital-onboarding/technical/remote/dot-web-document/latest/documentation/",
28
+ "homepage": "https://developers.ahmed_hani.com/digital-onboarding/technical/remote/dot-web-document/latest/documentation/",
29
29
  "dependencies": {
30
30
  "@preact/signals": "^2.0.4",
31
31
  "comlink": "^4.4.2",
@@ -1,9 +1,9 @@
1
- import type { CommonCustomEvent, ControlEventInstructionValues, DocumentCustomEvent, EyeGazeCustomEvent, FaceCustomEvent, MagnifEyeCustomEvent, PalmCustomEvent, RequestCaptureInstructionValues, SmileCustomEvent } from '../types/events';
1
+ import type { CommonCustomEvent, ControlEventInstructionValues, RequestCaptureInstructionValues } from '../types/events/common';
2
2
  /**
3
3
  * It dispatches a custom event with the given event name and event detail
4
- * @param {DocumentCustomEvent.CONTROL | FaceCustomEvent.CONTROL | PalmCustomEvent.CONTROL | SmileCustomEvent.CONTROL | EyeGazeCustomEvent.CONTROL | MagnifEyeCustomEvent.CONTROL} eventName - The name of the event to
4
+ * @param {CommonCustomEvent<string>['CONTROL']} eventName - The name of the event to
5
5
  * dispatch.
6
6
  * @param {ControlEventInstruction} instruction - ControlEventInstruction
7
7
  */
8
- export declare const dispatchControlEvent: (eventName: DocumentCustomEvent.CONTROL | FaceCustomEvent.CONTROL | PalmCustomEvent.CONTROL | SmileCustomEvent.CONTROL | EyeGazeCustomEvent.CONTROL | MagnifEyeCustomEvent.CONTROL | CommonCustomEvent<string>["CONTROL"], instruction: ControlEventInstructionValues) => void;
8
+ export declare const dispatchControlEvent: (eventName: CommonCustomEvent<string>["CONTROL"], instruction: ControlEventInstructionValues) => void;
9
9
  export declare function dispatchCaptureEvent(instruction: RequestCaptureInstructionValues): void;
@@ -16,28 +16,6 @@ export type RequireSome<T, K extends keyof T> = T & {
16
16
  [P in K]-?: T[P];
17
17
  };
18
18
  export type ObjectValues<T> = T[keyof T];
19
- export declare const FacingMode: {
20
- readonly FRONT: "user";
21
- readonly REAR: "environment";
22
- };
23
- export type FacingModeValues = ObjectValues<typeof FacingMode>;
24
- export declare const CaptureMode: {
25
- readonly AUTO_CAPTURE: "AUTO_CAPTURE";
26
- readonly WAIT_FOR_REQUEST: "WAIT_FOR_REQUEST";
27
- };
28
- export type CaptureModeValues = ObjectValues<typeof CaptureMode>;
29
- export type BaseCameraProps<TDetectedObject> = {
30
- assetsDirectoryPath?: string;
31
- cameraFacing?: FacingModeValues;
32
- candidateSelectionDurationMillis?: number;
33
- captureMode?: CaptureModeValues;
34
- isVideoCaptureEnabled?: boolean;
35
- onError: (e: Error) => void;
36
- onPhotoTaken: (imageData: CallbackImage<TDetectedObject>, content: Uint8Array) => void;
37
- sessionToken?: string;
38
- styleTarget?: HTMLElement;
39
- transactionCountingToken?: string;
40
- };
41
19
  export type ImageParameters = {
42
20
  brightness: number;
43
21
  sharpness: number;
@@ -54,21 +32,22 @@ export type Point = {
54
32
  y: number;
55
33
  };
56
34
  export declare const AppStateValues: {
57
- readonly LOADING: "LOADING";
58
- readonly ERROR: "ERROR";
59
- readonly WAITING: "WAITING";
60
- readonly RUNNING: "RUNNING";
61
- readonly COMPLETE: "COMPLETE";
35
+ readonly LOADING: "loading";
36
+ readonly ERROR: "error";
37
+ readonly WAITING: "waiting";
38
+ readonly RUNNING: "running";
39
+ readonly COMPLETE: "complete";
62
40
  };
63
41
  export declare const LivenessStateValues: {
64
- readonly DONE: "DONE";
65
- readonly LOADING: "LOADING";
66
- readonly ERROR: "ERROR";
67
- readonly WAITING: "WAITING";
68
- readonly RUNNING: "RUNNING";
69
- readonly COMPLETE: "COMPLETE";
42
+ readonly DONE: "done";
43
+ readonly LOADING: "loading";
44
+ readonly ERROR: "error";
45
+ readonly WAITING: "waiting";
46
+ readonly RUNNING: "running";
47
+ readonly COMPLETE: "complete";
70
48
  };
71
49
  export type AppState = ObjectValues<typeof AppStateValues>;
50
+ export type LivenessAppState = ObjectValues<typeof LivenessStateValues>;
72
51
  export type Crop = {
73
52
  height: number;
74
53
  shiftX: number;
@@ -89,9 +68,15 @@ export type DetectedCorners = {
89
68
  topLeft: Point;
90
69
  topRight: Point;
91
70
  };
92
- export type ThresholdInterval = {
93
- max: number;
94
- min: number;
71
+ export type MinOrMaxInterval = {
72
+ max?: number;
73
+ min?: number;
74
+ };
75
+ export type MinInterval = {
76
+ min?: number;
77
+ };
78
+ export type MaxInterval = {
79
+ max?: number;
95
80
  };
96
81
  export declare const EyeInstructionCodeValues: {
97
82
  readonly EYE_NOT_PRESENT: "eye_not_present";
@@ -1,4 +1,4 @@
1
- import type { DetectedCorners, ImageParameters, ObjectValues } from './common';
1
+ import type { ObjectValues } from './common';
2
2
  export declare const DocumentInstructionCodeValues: {
3
3
  readonly CANDIDATE_SELECTION: "candidate_selection";
4
4
  readonly DOCUMENT_CENTERING: "document_centering";
@@ -19,12 +19,4 @@ export declare const DocumentCheckToInstructionCodeMap: {
19
19
  noHotspots: "hotspots_present";
20
20
  };
21
21
  export type DocumentInstructionCode = ObjectValues<typeof DocumentInstructionCodeValues>;
22
- export type DetectedDocumentCorners = DetectedCorners;
23
- export type DocumentImageParameters = ImageParameters & {
24
- hotspots: number;
25
- };
26
- export type DetectedDocument = DocumentImageParameters & DetectedDocumentCorners & {
27
- confidence: number;
28
- smallestEdge: number;
29
- };
30
22
  export type DocumentEscalatedInstructionCodes = typeof DocumentInstructionCodeValues.DOCUMENT_TOO_FAR | typeof DocumentInstructionCodeValues.BRIGHTNESS_TOO_HIGH | typeof DocumentInstructionCodeValues.BRIGHTNESS_TOO_LOW | typeof DocumentInstructionCodeValues.SHARPNESS_TOO_LOW;
@@ -0,0 +1,20 @@
1
+ import type { DocumentCustomEvent } from './document';
2
+ import type { FaceCustomEvent } from './face';
3
+ import type { PalmCustomEvent } from './palm';
4
+ import type { DocumentInstructionCode } from '../document';
5
+ import type { FaceInstructionCode } from '../face';
6
+ import type { PalmInstructionCode } from '../palm';
7
+ /**
8
+ * @deprecated InstructionChangeEventCodeMap should be not used in new architecture (will be removed in 9.0.0 major version)
9
+ * Each component should have its own event dispatcher class with proper type definitions
10
+ */
11
+ export type InstructionChangeEventCodeMap = {
12
+ [DocumentCustomEvent.INSTRUCTION_CHANGED]: DocumentInstructionCode;
13
+ [FaceCustomEvent.INSTRUCTION_CHANGED]: FaceInstructionCode;
14
+ [PalmCustomEvent.INSTRUCTION_CHANGED]: PalmInstructionCode;
15
+ };
16
+ /**
17
+ * @deprecated CaptureCustomEvent should be not used in new architecture (will be removed in 9.0.0 major version)
18
+ * use-camera-control-events and use-capture will be removed by migration to new architecture
19
+ */
20
+ export type CaptureCustomEvent = typeof PalmCustomEvent | typeof DocumentCustomEvent | typeof FaceCustomEvent;
@@ -1,11 +1,5 @@
1
- import type { DocumentCustomEvent } from './document';
2
- import type { FaceCustomEvent } from './face';
3
- import type { PalmCustomEvent } from './palm';
4
1
  import type { AutoCaptureError } from '../../error/auto-capture-error';
5
2
  import type { AppState, ObjectValues, Resolution } from '../common';
6
- import type { DocumentInstructionCode } from '../document';
7
- import type { FaceInstructionCode } from '../face';
8
- import type { PalmInstructionCode } from '../palm';
9
3
  export declare const ControlEventInstruction: {
10
4
  readonly CONTINUE_DETECTION: "continue-detection";
11
5
  readonly SWITCH_CAMERA: "switch-camera";
@@ -54,12 +48,6 @@ export type InstructionEscalatedEvent<T> = {
54
48
  instructionCode: T;
55
49
  };
56
50
  } & Event;
57
- export type InstructionChangeEventCodeMap = {
58
- [DocumentCustomEvent.INSTRUCTION_CHANGED]: DocumentInstructionCode;
59
- [FaceCustomEvent.INSTRUCTION_CHANGED]: FaceInstructionCode;
60
- [PalmCustomEvent.INSTRUCTION_CHANGED]: PalmInstructionCode;
61
- };
62
- export type CaptureCustomEvent = typeof PalmCustomEvent | typeof DocumentCustomEvent | typeof FaceCustomEvent;
63
51
  export type VideoElementSizeChangeEvent = {
64
52
  detail?: {
65
53
  size: DOMRect;
@@ -99,7 +87,6 @@ export type DetectionChangedEvent<TDetectedObject, TInstructionCode> = {
99
87
  } & Event;
100
88
  export type CommonCustomEventKeys = {
101
89
  CAMERA_PROPS_CHANGED: string;
102
- CHALLENGE_VALUE_CHANGED: string;
103
90
  CONTROL: string;
104
91
  DETECTION_CHANGED: string;
105
92
  INSTRUCTION_CHANGED: string;
@@ -1,10 +1,10 @@
1
1
  import type { InstructionChangeEvent, InstructionEscalatedEvent } from './common';
2
- import type { DetectedDocument, DocumentInstructionCode } from '../document';
2
+ import type { DocumentInstructionCode } from '../document';
3
+ import type { DetectedDocument } from '../modality/detection/document';
3
4
  export declare enum DocumentCustomEvent {
4
5
  CAMERA_PROPS_CHANGED = "document-auto-capture:camera-props-changed",
5
6
  CONTROL = "document-auto-capture:control",
6
- DETECTED_DOCUMENT_CHANGED = "document-auto-capture:detected-document-changed",
7
- DOCUMENT_DETECTION = "document-auto-capture:document-detection",
7
+ DETECTION_CHANGED = "document-auto-capture:detection-changed",
8
8
  INSTRUCTION_CHANGED = "document-auto-capture:instruction-changed",
9
9
  INSTRUCTION_ESCALATED = "document-auto-capture:instruction-escalated",
10
10
  STATE_CHANGED = "document-auto-capture:state-changed",
@@ -16,8 +16,4 @@ export type DetectedDocumentChangeEvent = {
16
16
  };
17
17
  } & Event;
18
18
  export type DocumentInstructionChangeEvent = InstructionChangeEvent<DocumentInstructionCode>;
19
- export type DispatchDocumentDetectionEvent = {
20
- detection: DetectedDocument;
21
- eventName: DocumentCustomEvent.DOCUMENT_DETECTION;
22
- };
23
19
  export type DocumentInstructionEscalatedEvent = InstructionEscalatedEvent<DocumentInstructionCode>;
@@ -1,14 +1,21 @@
1
1
  import type { InstructionChangeEvent } from './common';
2
- import type { DetectedFace, FaceInstructionCode } from '../face';
2
+ import type { FaceInstructionCode } from '../face';
3
+ import type { DetectedFace } from '../modality/detection/face';
3
4
  export declare enum FaceCustomEvent {
4
5
  CAMERA_PROPS_CHANGED = "face-auto-capture:camera-props-changed",
5
6
  CONTROL = "face-auto-capture:control",
6
- DETECTED_FACE_CHANGED = "face-auto-capture:detected-face-changed",
7
+ DETECTION_CHANGED = "face-auto-capture:detection-changed",
8
+ /**
9
+ * @deprecated Use DETECTION_CHANGED instead (will be removed in 9.0.0 major version)
10
+ */
7
11
  FACE_DETECTION = "face-auto-capture:face-detection",
8
12
  INSTRUCTION_CHANGED = "face-auto-capture:instruction-changed",
9
13
  STATE_CHANGED = "face-auto-capture:state-changed",
10
14
  VIDEO_ELEMENT_SIZE = "face-auto-capture:video-element-size"
11
15
  }
16
+ /**
17
+ * @deprecated Use OnDetectionCallbackParams instead (will be removed in 9.0.0 major version)
18
+ */
12
19
  export type DetectedFaceChangeEvent = {
13
20
  detail?: {
14
21
  detectedObject: DetectedFace;
@@ -7,3 +7,4 @@ export * from './smile';
7
7
  export * from './palm';
8
8
  export * from './eye-gaze';
9
9
  export * from './multi-range';
10
+ export * from './common-deprecated';
@@ -1,9 +1,10 @@
1
1
  import type { InstructionChangeEvent } from './common';
2
- import type { DetectedPalm, PalmInstructionCode } from '../palm';
2
+ import type { DetectedPalm } from '../modality/detection/palm';
3
+ import type { PalmInstructionCode } from '../palm';
3
4
  export declare enum PalmCustomEvent {
4
5
  CAMERA_PROPS_CHANGED = "palm-capture:camera-props-changed",
5
6
  CONTROL = "palm-capture:control",
6
- DETECTED_PALM_CHANGED = "palm-capture:detected-palm-changed",
7
+ DETECTION_CHANGED = "palm-capture:detection-changed",
7
8
  INSTRUCTION_CHANGED = "palm-capture:instruction-changed",
8
9
  STATE_CHANGED = "palm-capture:state-changed",
9
10
  VIDEO_ELEMENT_SIZE = "palm-capture:video-element-size"
@@ -1,8 +1,13 @@
1
1
  import type { InstructionEscalatedEvent } from './common';
2
2
  import type { SmileInstructionCode } from '../smile';
3
- export declare enum SmileCustomEvent {
4
- CONTROL = "smile-auto-capture:control",
5
- INSTRUCTION_ESCALATED = "smile:instruction-escalated",
6
- STATUS_CHANGED = "smile-auto-capture:status-changed"
7
- }
3
+ export declare const SmileCustomEvent: {
4
+ readonly DETECTION_CHANGED: "smile-auto-capture:detection-changed";
5
+ readonly CAMERA_PROPS_CHANGED: "smile-auto-capture:camera-props-changed";
6
+ readonly CONTROL: "smile-auto-capture:control";
7
+ readonly INSTRUCTION_CHANGED: "smile-auto-capture:instruction-changed";
8
+ readonly INSTRUCTION_ESCALATED: "smile-auto-capture:instruction-escalated";
9
+ readonly VIDEO_ELEMENT_SIZE: "smile-auto-capture:video-element-size";
10
+ readonly STATE_CHANGED: "smile-auto-capture:state-changed";
11
+ readonly PHASE_CHANGED: "smile-auto-capture:phase-changed";
12
+ };
8
13
  export type SmileInstructionEscalatedEvent = InstructionEscalatedEvent<SmileInstructionCode>;
@@ -23,12 +23,12 @@ export declare const EyeGazePhaseValues: {
23
23
  };
24
24
  export type EyeGazePhase = ObjectValues<typeof EyeGazePhaseValues>;
25
25
  export declare const EyeGazeStateValues: {
26
- readonly DONE: "DONE";
27
- readonly LOADING: "LOADING";
28
- readonly ERROR: "ERROR";
29
- readonly WAITING: "WAITING";
30
- readonly RUNNING: "RUNNING";
31
- readonly COMPLETE: "COMPLETE";
26
+ readonly DONE: "done";
27
+ readonly LOADING: "loading";
28
+ readonly ERROR: "error";
29
+ readonly WAITING: "waiting";
30
+ readonly RUNNING: "running";
31
+ readonly COMPLETE: "complete";
32
32
  };
33
33
  export type EyeGazeState = ObjectValues<typeof EyeGazeStateValues>;
34
34
  export declare const Corner: {
@@ -1,4 +1,4 @@
1
- import type { ImageParameters, ObjectValues, Point } from './common';
1
+ import type { ObjectValues } from './common';
2
2
  export declare const FaceInstructionCodeValues: {
3
3
  readonly CANDIDATE_SELECTION: "candidate_selection";
4
4
  readonly FACE_TOO_CLOSE: "face_too_close";
@@ -31,22 +31,3 @@ export declare const FaceCheckToInstructionCodeMap: {
31
31
  isMouthScoreNotTooLow: "mouth_score_too_low";
32
32
  };
33
33
  export type FaceInstructionCode = ObjectValues<typeof FaceInstructionCodeValues>;
34
- export type DetectedFacePart = {
35
- center: Point;
36
- confidence: number;
37
- size: number;
38
- status: number;
39
- };
40
- export type DetectedFace = FaceImageParameters & DetectedFaceCorners & {
41
- confidence: number;
42
- faceSize: number;
43
- leftEye: DetectedFacePart;
44
- mouth: DetectedFacePart;
45
- rightEye: DetectedFacePart;
46
- };
47
- export type DetectedFaceCorners = {
48
- bottomRight: Point;
49
- faceCenter: Point;
50
- topLeft: Point;
51
- };
52
- export type FaceImageParameters = ImageParameters;
@@ -23,11 +23,11 @@ export declare enum MagnifEyePhase {
23
23
  MIDDLE = "MIDDLE"
24
24
  }
25
25
  export declare const MagnifEyeStateValues: {
26
- readonly DONE: "DONE";
27
- readonly LOADING: "LOADING";
28
- readonly ERROR: "ERROR";
29
- readonly WAITING: "WAITING";
30
- readonly RUNNING: "RUNNING";
31
- readonly COMPLETE: "COMPLETE";
26
+ readonly DONE: "done";
27
+ readonly LOADING: "loading";
28
+ readonly ERROR: "error";
29
+ readonly WAITING: "waiting";
30
+ readonly RUNNING: "running";
31
+ readonly COMPLETE: "complete";
32
32
  };
33
33
  export type MagnifEyeState = ObjectValues<typeof MagnifEyeStateValues>;
@@ -0,0 +1,9 @@
1
+ import type { DetectedCorners, ImageParameters } from '../../common';
2
+ export type DetectedDocumentCorners = DetectedCorners;
3
+ export type DocumentImageParameters = ImageParameters & {
4
+ hotspots: number;
5
+ };
6
+ export type DetectedDocument = DocumentImageParameters & DetectedDocumentCorners & {
7
+ confidence: number;
8
+ smallestEdge: number;
9
+ };
@@ -0,0 +1,20 @@
1
+ import type { ImageParameters, Point } from '../../common';
2
+ export type DetectedFace = FaceImageParameters & DetectedFaceCorners & {
3
+ confidence: number;
4
+ faceSize: number;
5
+ leftEye: DetectedFacePart;
6
+ mouth: DetectedFacePart;
7
+ rightEye: DetectedFacePart;
8
+ };
9
+ export type DetectedFacePart = {
10
+ center: Point;
11
+ confidence: number;
12
+ size: number;
13
+ status: number;
14
+ };
15
+ export type DetectedFaceCorners = {
16
+ bottomRight: Point;
17
+ faceCenter: Point;
18
+ topLeft: Point;
19
+ };
20
+ export type FaceImageParameters = ImageParameters;
@@ -0,0 +1,20 @@
1
+ import type { DetectedCorners, ImageParameters, ObjectValues } from '../../common';
2
+ export type DetectedPalmCorners = DetectedCorners;
3
+ export type PalmImageParameters = ImageParameters;
4
+ export type DetectedPalm = PalmQualityAttributes & PalmImageParameters & DetectedPalmCorners & {
5
+ confidence: number;
6
+ smallestEdge: number;
7
+ };
8
+ export type PalmQualityAttributes = {
9
+ handOrientation: ObjectValues<typeof PalmHandOrientation>;
10
+ handPosition: ObjectValues<typeof PalmHandPosition>;
11
+ templateExtractionQuality: number;
12
+ };
13
+ export declare const PalmHandPosition: {
14
+ readonly LEFT: "Left";
15
+ readonly RIGHT: "Right";
16
+ };
17
+ export declare const PalmHandOrientation: {
18
+ readonly PALMAR: "Palmar";
19
+ readonly DORSAL: "Dorsal";
20
+ };
@@ -1,4 +1,4 @@
1
- import type { DetectedCorners, ImageParameters, ObjectValues } from './common';
1
+ import type { ObjectValues } from './common';
2
2
  export declare const PalmInstructionCodeValues: {
3
3
  readonly CANDIDATE_SELECTION: "candidate_selection";
4
4
  readonly PALM_CENTERING: "palm_centering";
@@ -11,14 +11,6 @@ export declare const PalmInstructionCodeValues: {
11
11
  readonly DEVICE_PITCHED: "device_pitched";
12
12
  readonly TEMPLATE_EXTRACTION_QUALITY_TOO_LOW: "template_extraction_quality_too_low";
13
13
  };
14
- export declare const PalmHandPosition: {
15
- readonly LEFT: "Left";
16
- readonly RIGHT: "Right";
17
- };
18
- export declare const PalmHandOrientation: {
19
- readonly PALMAR: "Palmar";
20
- readonly DORSAL: "Dorsal";
21
- };
22
14
  export declare const PalmCheckToInstructionCodeMap: {
23
15
  isPresent: "palm_not_present";
24
16
  isNotPitched: "device_pitched";
@@ -31,14 +23,3 @@ export declare const PalmCheckToInstructionCodeMap: {
31
23
  isTemplateExtractionQualityHighEnough: "template_extraction_quality_too_low";
32
24
  };
33
25
  export type PalmInstructionCode = ObjectValues<typeof PalmInstructionCodeValues>;
34
- export type DetectedPalmCorners = DetectedCorners;
35
- export type PalmImageParameters = ImageParameters;
36
- export type PalmQualityAttributes = {
37
- handOrientation: ObjectValues<typeof PalmHandOrientation>;
38
- handPosition: ObjectValues<typeof PalmHandPosition>;
39
- templateExtractionQuality: number;
40
- };
41
- export type DetectedPalm = PalmQualityAttributes & PalmImageParameters & DetectedPalmCorners & {
42
- confidence: number;
43
- smallestEdge: number;
44
- };
@@ -1,8 +1,5 @@
1
- import type { ObjectValues } from './common';
1
+ import { type ObjectValues } from './common';
2
2
  export declare const SmileInstructionCodeValues: {
3
- readonly SMILE: "smile";
4
- readonly SMILE_CANDIDATE_SELECTION: "smile_candidate_selection";
5
- readonly KEEP_NEUTRAL_EXPRESSION: "keep_neutral_expression";
6
3
  readonly CANDIDATE_SELECTION: "candidate_selection";
7
4
  readonly FACE_TOO_CLOSE: "face_too_close";
8
5
  readonly FACE_TOO_FAR: "face_too_far";
@@ -17,21 +14,31 @@ export declare const SmileInstructionCodeValues: {
17
14
  readonly MOUTH_NOT_PRESENT: "mouth_not_present";
18
15
  readonly MOUTH_SCORE_TOO_HIGH: "mouth_score_too_high";
19
16
  readonly MOUTH_SCORE_TOO_LOW: "mouth_score_too_low";
17
+ readonly SMILE: "smile";
18
+ readonly SMILE_CANDIDATE_SELECTION: "smile_candidate_selection";
19
+ readonly KEEP_NEUTRAL_EXPRESSION: "keep_neutral_expression";
20
20
  };
21
21
  export type SmileInstructionCode = ObjectValues<typeof SmileInstructionCodeValues>;
22
22
  export type CustomizableSmileInstructionCode = Exclude<SmileInstructionCode, 'mouth_score_too_low' | 'mouth_score_too_high'>;
23
- export declare const SmilePhaseValues: {
23
+ export type SmileEscalatedInstructionCodes = typeof SmileInstructionCodeValues.SMILE | typeof SmileInstructionCodeValues.KEEP_NEUTRAL_EXPRESSION;
24
+ export declare const SmileCheckToInstructionCodeMap: {
25
+ isPresent: "face_not_present";
26
+ isNotPitched: "device_pitched";
27
+ isNotSmall: "face_too_far";
28
+ isNotLarge: "face_too_close";
29
+ isNotOutOfBounds: "face_centering";
30
+ isNotDim: "brightness_too_low";
31
+ isNotBright: "brightness_too_high";
32
+ isSharp: "sharpness_too_low";
33
+ isLeftEyePresent: "left_eye_not_present";
34
+ isRightEyePresent: "right_eye_not_present";
35
+ isMouthPresent: "mouth_not_present";
36
+ isMouthStatusNotTooHigh: "mouth_score_too_high";
37
+ isMouthStatusNotTooLow: "mouth_score_too_low";
38
+ };
39
+ export declare const SmileLivenessPhaseValues: {
24
40
  readonly NEUTRAL: "NEUTRAL";
25
41
  readonly SMILE: "SMILE";
42
+ readonly SMILE_MANUAL: "SMILE_MANUAL";
26
43
  };
27
- export type SmilePhase = ObjectValues<typeof SmilePhaseValues>;
28
- export declare const SmileStateValues: {
29
- readonly DONE: "DONE";
30
- readonly LOADING: "LOADING";
31
- readonly ERROR: "ERROR";
32
- readonly WAITING: "WAITING";
33
- readonly RUNNING: "RUNNING";
34
- readonly COMPLETE: "COMPLETE";
35
- };
36
- export type SmileState = ObjectValues<typeof SmileStateValues>;
37
- export type SmileEscalatedInstructionCodes = typeof SmileInstructionCodeValues.SMILE | typeof SmileInstructionCodeValues.KEEP_NEUTRAL_EXPRESSION;
44
+ export type SmileLivenessPhase = ObjectValues<typeof SmileLivenessPhaseValues>;