@incodetech/core 2.0.0-rc.0 → 2.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 +3 -3
- package/dist/Actor-CI32dTbG.d.ts +0 -2
- package/dist/BaseWasmProvider-C_DLEI40.esm.js +0 -1118
- package/dist/BrowserStorageProvider-CuOW1Er2.esm.js +0 -55
- package/dist/BrowserTimerProvider-DhNc_x02.esm.js +0 -22
- package/dist/ITimerCapability-C67ZRskg.esm.js +0 -7
- package/dist/IpifyProvider-D7jx52AL.esm.js +0 -139
- package/dist/Manager-C8PrhBOx.d.ts +0 -19
- package/dist/MotionSensorProvider-4v7xkqAp.esm.js +0 -254
- package/dist/OpenViduRecordingProvider-CMu6XVdc.esm.js +0 -87
- package/dist/StateMachine-BCQrZJhf.d.ts +0 -2
- package/dist/WasmUtilProvider-j98OJf-S.esm.js +0 -114
- package/dist/addressSearch-BpTbTWCa.esm.js +0 -430
- package/dist/ae-signature-DDDZmWXj.esm.js +0 -12
- package/dist/ae-signature.d.ts +0 -25
- package/dist/ae-signature.esm.js +0 -8
- package/dist/antifraud.d.ts +0 -57
- package/dist/antifraud.esm.js +0 -45
- package/dist/antifraudStateMachine-O0TMf6yc.esm.js +0 -39
- package/dist/api-CESGtpbH.esm.js +0 -53
- package/dist/authentication.d.ts +0 -12
- package/dist/authentication.esm.js +0 -25
- package/dist/authenticationManager-5M-fKzXx.esm.js +0 -67
- package/dist/authenticationManager-C83GNIhl.d.ts +0 -66
- package/dist/authenticationStateMachine-BMZqatiF.esm.js +0 -139
- package/dist/backCameraStream-DMdMeGk2.esm.js +0 -346
- package/dist/browserSimulation-gxD8cSpM.esm.js +0 -20
- package/dist/camera-DBSxa6ML.d.ts +0 -4
- package/dist/camera-PA2Ljri3.esm.js +0 -22
- package/dist/camera.d.ts +0 -15
- package/dist/camera.esm.js +0 -5
- package/dist/chunk-CRF6K_H_.esm.js +0 -49
- package/dist/consent.d.ts +0 -398
- package/dist/consent.esm.js +0 -79
- package/dist/consentStateMachine-CCT-B60O.esm.js +0 -151
- package/dist/cpf-PPz2Njto.esm.js +0 -38
- package/dist/cpf-ocr.d.ts +0 -204
- package/dist/cpf-ocr.esm.js +0 -177
- package/dist/cross-document-data-match.d.ts +0 -34
- package/dist/cross-document-data-match.esm.js +0 -71
- package/dist/curp-validation.d.ts +0 -188
- package/dist/curp-validation.esm.js +0 -110
- package/dist/curpValidationStateMachine-CitWLr2c.esm.js +0 -595
- package/dist/custom-fields.d.ts +0 -115
- package/dist/custom-fields.esm.js +0 -177
- package/dist/custom-watchlist.d.ts +0 -66
- package/dist/custom-watchlist.esm.js +0 -86
- package/dist/dateUtils-UoN5xswP.esm.js +0 -23
- package/dist/deepsightLoader-Cm4JIT_z.esm.js +0 -52
- package/dist/deepsightService-CEVxzehb.d.ts +0 -412
- package/dist/deepsightService-O74l4Y__.esm.js +0 -489
- package/dist/device.d.ts +0 -46
- package/dist/device.esm.js +0 -106
- package/dist/displayErrors-DqJ_IbsG.d.ts +0 -39
- package/dist/document-capture.d.ts +0 -906
- package/dist/document-capture.esm.js +0 -156
- package/dist/document-upload.d.ts +0 -331
- package/dist/document-upload.esm.js +0 -203
- package/dist/documentCaptureStateMachine-BqzTDy9k.esm.js +0 -394
- package/dist/dynamic-forms.d.ts +0 -178
- package/dist/dynamic-forms.esm.js +0 -323
- package/dist/ekyb.d.ts +0 -148
- package/dist/ekyb.esm.js +0 -127
- package/dist/ekybStateMachine-B59rQjgj.esm.js +0 -674
- package/dist/ekyc.d.ts +0 -164
- package/dist/ekyc.esm.js +0 -104
- package/dist/ekycStateMachine-oeO0Iekd.esm.js +0 -10626
- package/dist/electronic-signature.d.ts +0 -4
- package/dist/electronic-signature.esm.js +0 -7
- package/dist/electronicSignatureManager-D9OHzTpG.esm.js +0 -428
- package/dist/email.d.ts +0 -4
- package/dist/email.esm.js +0 -9
- package/dist/emailManager-DIfnS5g1.d.ts +0 -352
- package/dist/emailManager-wAV0LE-H.esm.js +0 -238
- package/dist/emailStateMachine-DOf4j58N.esm.js +0 -292
- package/dist/endpoints-CnN3SyDa.esm.js +0 -87
- package/dist/events-D6-e4vok.esm.js +0 -596
- package/dist/events.d.ts +0 -265
- package/dist/events.esm.js +0 -4
- package/dist/extensibility.d.ts +0 -122
- package/dist/extensibility.esm.js +0 -43
- package/dist/face-match.d.ts +0 -228
- package/dist/face-match.esm.js +0 -173
- package/dist/faceCaptureManagerFactory-Dh2PdGlF.esm.js +0 -290
- package/dist/faceCaptureManagerFactory-yqtpxjnN.d.ts +0 -690
- package/dist/faceCaptureSetup-B3faSpYA.esm.js +0 -873
- package/dist/faceMatchStateMachine-DNFrxTFS.esm.js +0 -127
- package/dist/flow-events.d.ts +0 -6
- package/dist/flow-events.esm.js +0 -0
- package/dist/flow.d.ts +0 -358
- package/dist/flow.esm.js +0 -825
- package/dist/flowCompletionService-DhkT4SRY.d.ts +0 -10
- package/dist/flowCompletionService-P54yzGvA.esm.js +0 -13
- package/dist/flowServices-DTsm-Vf1.esm.js +0 -188
- package/dist/geolocation.d.ts +0 -127
- package/dist/geolocation.esm.js +0 -89
- package/dist/geolocationStateMachine-asasuHY2.esm.js +0 -105
- package/dist/getBrowser-BSXUTWXw.esm.js +0 -41
- package/dist/getDeviceClass-BSntT9_j.esm.js +0 -14
- package/dist/government-validation.d.ts +0 -67
- package/dist/government-validation.esm.js +0 -81
- package/dist/governmentValidationStateMachine-BDDYrJTo.esm.js +0 -271
- package/dist/home.d.ts +0 -99
- package/dist/home.esm.js +0 -61
- package/dist/http.d.ts +0 -68
- package/dist/http.esm.js +0 -3
- package/dist/id-ocr.d.ts +0 -635
- package/dist/id-ocr.esm.js +0 -86
- package/dist/id-verification.d.ts +0 -190
- package/dist/id-verification.esm.js +0 -43
- package/dist/id.d.ts +0 -24
- package/dist/id.esm.js +0 -164
- package/dist/idCaptureManager-B9TGA5dq.d.ts +0 -956
- package/dist/idCaptureManager-DMK0GIt3.esm.js +0 -581
- package/dist/idCaptureStateMachine-Bq0fVZXl.esm.js +0 -2954
- package/dist/idOcrStateMachine-YbjjC_Gg.esm.js +0 -388
- package/dist/idVerificationStateMachine-xbw9HP1Z.esm.js +0 -71
- package/dist/identity-reuse.d.ts +0 -530
- package/dist/identity-reuse.esm.js +0 -274
- package/dist/index-BLKtMA0g.d.ts +0 -1177
- package/dist/index-BcRG8rtJ.d.ts +0 -97
- package/dist/index.d.ts +0 -3
- package/dist/index.esm.js +0 -12
- package/dist/invokeOnCaptureCallback-rc6kBHo5.esm.js +0 -30
- package/dist/lib-BB0B_qQX.esm.js +0 -12499
- package/dist/mandatory-consent.d.ts +0 -412
- package/dist/mandatory-consent.esm.js +0 -78
- package/dist/mandatoryConsentStateMachine-Cnco1jvn.esm.js +0 -126
- package/dist/openviduLazy-Cm0XFh_v.esm.js +0 -3
- package/dist/openviduLazy-Cok70ZSg.esm.js +0 -12
- package/dist/permissionServices-D_i6nzEw.esm.js +0 -50
- package/dist/phone.d.ts +0 -4
- package/dist/phone.esm.js +0 -9
- package/dist/phoneManager-B6M30hKE.d.ts +0 -397
- package/dist/phoneManager-DAJbGhlY.esm.js +0 -256
- package/dist/phoneStateMachine-CuPARRaT.esm.js +0 -351
- package/dist/platform-CfrjKhmi.esm.js +0 -83
- package/dist/qe-signature-DFo_Cc-I.esm.js +0 -12
- package/dist/qe-signature.d.ts +0 -25
- package/dist/qe-signature.esm.js +0 -8
- package/dist/recordingService-Ig2UgbLv.esm.js +0 -1003
- package/dist/redirect-to-mobile.d.ts +0 -107
- package/dist/redirect-to-mobile.esm.js +0 -102
- package/dist/redirectToMobileStateMachine-BOEqe46A.esm.js +0 -249
- package/dist/runChildModule-CqqwqAkW.esm.js +0 -219
- package/dist/selfie.d.ts +0 -26
- package/dist/selfie.esm.js +0 -146
- package/dist/selfieManager-D0lSgd-J.d.ts +0 -68
- package/dist/selfieManager-Duisl7qN.esm.js +0 -60
- package/dist/selfieStateMachine-D76whWEf.esm.js +0 -68
- package/dist/session-BS-d_vuE.esm.js +0 -3206
- package/dist/session.d.ts +0 -217
- package/dist/session.esm.js +0 -9
- package/dist/setup-Buy-hyj4.esm.js +0 -887
- package/dist/setup-C5AITV8m.d.ts +0 -254
- package/dist/signature.d.ts +0 -94
- package/dist/signature.esm.js +0 -66
- package/dist/signatureStateMachine-B5-QVUve.esm.js +0 -132
- package/dist/stats-CIfiPzb1.esm.js +0 -16
- package/dist/stats.d.ts +0 -16
- package/dist/stats.esm.js +0 -4
- package/dist/trust-graph.d.ts +0 -54
- package/dist/trust-graph.esm.js +0 -56
- package/dist/types-B06Ypu2F.d.ts +0 -49
- package/dist/types-BP1m8VRw.d.ts +0 -340
- package/dist/types-CAD4va6a.d.ts +0 -5
- package/dist/types-CFV9G_7j.d.ts +0 -24
- package/dist/warmup-CEcppFiS.d.ts +0 -63
- package/dist/wasm.d.ts +0 -15
- package/dist/wasm.esm.js +0 -12
- package/dist/watchlist-for-business.d.ts +0 -79
- package/dist/watchlist-for-business.esm.js +0 -148
- package/dist/watchlist.d.ts +0 -62
- package/dist/watchlist.esm.js +0 -86
- package/dist/watchlistServices-DMbUhkBX.esm.js +0 -12
- package/dist/workflow.d.ts +0 -907
- package/dist/workflow.esm.js +0 -702
- package/dist/xstate.esm-B70JrNqo.esm.js +0 -3404
package/dist/events.d.ts
DELETED
|
@@ -1,265 +0,0 @@
|
|
|
1
|
-
//#region src/internal/events/types.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* Raw SDK analytics event used by dashboard tracking and custom analytics.
|
|
4
|
-
*
|
|
5
|
-
* This event stream can include detailed/noisy tracking such as screen opens,
|
|
6
|
-
* element clicks, capture attempts, and errors. For curated flow milestones,
|
|
7
|
-
* use `FlowEvent` from `@incodetech/core/flow-events`.
|
|
8
|
-
*/
|
|
9
|
-
type Event = {
|
|
10
|
-
code: string;
|
|
11
|
-
module?: string;
|
|
12
|
-
screen?: string;
|
|
13
|
-
payload?: Record<string, unknown>;
|
|
14
|
-
clientTimestamp?: number;
|
|
15
|
-
};
|
|
16
|
-
declare const eventModuleNames: {
|
|
17
|
-
readonly selfie: "SELFIE";
|
|
18
|
-
readonly faceCapture: "faceCapture";
|
|
19
|
-
readonly authentication: "AUTHENTICATION";
|
|
20
|
-
readonly authFace: "authFace";
|
|
21
|
-
readonly mlConsent: "ML_CONSENT";
|
|
22
|
-
readonly combinedConsent: "COMBINED_CONSENT";
|
|
23
|
-
readonly curpValidation: "CURP_VALIDATION";
|
|
24
|
-
readonly faceMatch: "FACE_MATCH";
|
|
25
|
-
readonly qr: "QR";
|
|
26
|
-
readonly videoSelfie: "VIDEO_ONBOARDING";
|
|
27
|
-
readonly passport: "ID";
|
|
28
|
-
readonly front: "ID";
|
|
29
|
-
readonly back: "ID";
|
|
30
|
-
readonly id: "ID";
|
|
31
|
-
readonly idCapture: "idCapture";
|
|
32
|
-
readonly idOcr: "ID_OCR";
|
|
33
|
-
readonly document: "DOCUMENT_CAPTURE";
|
|
34
|
-
readonly creditCard: "CREDIT_CARD_FRONT";
|
|
35
|
-
readonly creditCardBack: "CREDIT_CARD_BACK";
|
|
36
|
-
readonly conference: "CONFERENCE";
|
|
37
|
-
readonly otp: "OTP";
|
|
38
|
-
readonly signature: "SIGNATURE";
|
|
39
|
-
readonly ekyc: "EXTERNAL_VERIFICATION";
|
|
40
|
-
readonly watchlist: "WATCHLIST";
|
|
41
|
-
readonly globalWatchList: "GLOBAL_WATCHLIST";
|
|
42
|
-
readonly customWatchList: "CUSTOM_WATCHLIST";
|
|
43
|
-
readonly email: "EMAIL";
|
|
44
|
-
readonly phone: "PHONE";
|
|
45
|
-
readonly instantVerifyEmail: "INSTANT_VERIFY_EMAIL";
|
|
46
|
-
readonly instantVerifyConsent: "INSTANT_VERIFY_CONSENT";
|
|
47
|
-
readonly forms: "FORMS";
|
|
48
|
-
readonly customModule: "CUSTOM_MODULE";
|
|
49
|
-
readonly geolocation: "GEOLOCATION";
|
|
50
|
-
readonly ekyb: "EKYB";
|
|
51
|
-
readonly identityReuse: "IDENTITY_REUSE";
|
|
52
|
-
readonly antifraud: "ANTIFRAUD";
|
|
53
|
-
readonly aeSignature: "AE_SIGNATURE";
|
|
54
|
-
readonly qeSignature: "QE_SIGNATURE";
|
|
55
|
-
readonly crossDocumentDataMatch: "CROSS_DOCUMENT_DATA_MATCH";
|
|
56
|
-
readonly customFields: "CUSTOM_FIELDS";
|
|
57
|
-
readonly watchlistForBusiness: "WATCHLIST_FOR_BUSINESS";
|
|
58
|
-
readonly trustGraph: "TRUST_GRAPH";
|
|
59
|
-
};
|
|
60
|
-
declare const eventScreenNames: {
|
|
61
|
-
readonly faceMatch: "FACE_MATCH";
|
|
62
|
-
readonly faceCaptureTutorial: "SELFIE_CAPTURE_TUTORIAL";
|
|
63
|
-
readonly faceCaptureCamera: "SELFIE_CAMERA_CAPTURE";
|
|
64
|
-
readonly faceCaptureError: "SELFIE_ATTEMPT_FAILED";
|
|
65
|
-
readonly faceCaptureSuccess: "SELFIE_UPLOAD_SUCCEEDED";
|
|
66
|
-
readonly faceCaptureUpload: "SELFIE_UPLOAD_PROGRESS";
|
|
67
|
-
readonly mlConsent: "MACHINE_LEARNING_CONSENT";
|
|
68
|
-
readonly combinedConsent: "COMBINED_CONSENT";
|
|
69
|
-
readonly curpEnter: "ENTER_CURP";
|
|
70
|
-
readonly curpValidate: "VALIDATE_CURP";
|
|
71
|
-
readonly curpGenerate: "GENERATE_CURP";
|
|
72
|
-
readonly curpValidation: "CURP_VALIDATION_PROGRESS";
|
|
73
|
-
readonly curpValidationFailed: "CURP_VALIDATION_FAILED";
|
|
74
|
-
readonly curpValidationSuccess: "CURP_VALIDATION_SUCCEEDED";
|
|
75
|
-
readonly qrTutorial: "QR_TUTORIAL";
|
|
76
|
-
readonly qrScan: "QR_SCAN";
|
|
77
|
-
readonly smsOtp: "OTP";
|
|
78
|
-
readonly simpleOTP: "OTP";
|
|
79
|
-
readonly signatureInput: "SIGNATURE_INPUT";
|
|
80
|
-
readonly frontTutorial: "FRONT_ID_CAPTURE_TUTORIAL";
|
|
81
|
-
readonly frontCameraCapture: "FRONT_ID_CAMERA_CAPTURE";
|
|
82
|
-
readonly frontHelp: "FRONT_ID_HELP";
|
|
83
|
-
readonly frontReviewPhoto: "FRONT_ID_REVIEW_PHOTO";
|
|
84
|
-
readonly frontUploadProgress: "FRONT_ID_UPLOAD_PROGRESS";
|
|
85
|
-
readonly frontAttemptFailed: "FRONT_ID_ATTEMPT_FAILED";
|
|
86
|
-
readonly frontUploadSuccess: "FRONT_ID_UPLOAD_SUCCEEDED";
|
|
87
|
-
readonly backTutorial: "BACK_ID_CAPTURE_TUTORIAL";
|
|
88
|
-
readonly backCameraCapture: "BACK_ID_CAMERA_CAPTURE";
|
|
89
|
-
readonly backReviewPhoto: "BACK_ID_REVIEW_PHOTO";
|
|
90
|
-
readonly backUploadProgress: "BACK_ID_UPLOAD_PROGRESS";
|
|
91
|
-
readonly backAttemptFailed: "BACK_ID_ATTEMPT_FAILED";
|
|
92
|
-
readonly backUploadSuccess: "BACK_ID_UPLOAD_SUCCEEDED";
|
|
93
|
-
readonly backHelp: "BACK_ID_HELP";
|
|
94
|
-
readonly passportTutorial: "TUTORIAL_PASSPORT";
|
|
95
|
-
readonly documentTutorial: "DOCUMENT_CAPTURE_TUTORIAL";
|
|
96
|
-
readonly documentCameraCapture: "DOCUMENT_CAMERA_CAPTURE";
|
|
97
|
-
readonly documentHelp: "DOCUMENT_HELP";
|
|
98
|
-
readonly documentReviewPhoto: "DOCUMENT_REVIEW_PHOTO";
|
|
99
|
-
readonly documentUploadProgress: "DOCUMENT_UPLOAD_IN_PROGRESS";
|
|
100
|
-
readonly documentAttemptFailed: "DOCUMENT_ATTEMPT_FAILED";
|
|
101
|
-
readonly documentUploadSuccess: "DOCUMENT_UPLOAD_SUCCEEDED";
|
|
102
|
-
readonly conferenceWait: "CONFERENCE_WAIT";
|
|
103
|
-
readonly conferenceVideoChat: "CONFERENCE_VIDEO_CHAT";
|
|
104
|
-
readonly conferenceMessageChat: "CONFERENCE_MESSAGE_CHAT";
|
|
105
|
-
readonly videoSelfieTutorial: "VIDEO_SELFIE_TUTORIAL";
|
|
106
|
-
readonly videoSelfie: "VIDEO_SELFIE";
|
|
107
|
-
readonly videoSelfieFaceCapture: "VIDEO_SELFIE_FACE_CAPTURE";
|
|
108
|
-
readonly videoSelfieFaceUploadProgress: "VIDEO_SELFIE_FACE_UPLOAD_PROGRESS";
|
|
109
|
-
readonly videoSelfieFaceAttemptFailed: "VIDEO_SELFIE_FACE_ATTEMPT_FAILED";
|
|
110
|
-
readonly videoSelfieFaceUploadSucceeded: "VIDEO_SELFIE_FACE_UPLOAD_SUCCEEDED";
|
|
111
|
-
readonly videoSelfieFrontIdCapture: "VIDEO_SELFIE_FRONT_ID_CAPTURE";
|
|
112
|
-
readonly videoSelfieFrontIdUploadProgress: "VIDEO_SELFIE_FRONT_ID_UPLOAD_PROGRESS";
|
|
113
|
-
readonly videoSelfieFrontIdAttemptFailed: "VIDEO_SELFIE_FRONT_ID_ATTEMPT_FAILED";
|
|
114
|
-
readonly videoSelfieFrontIdUploadSucceeded: "VIDEO_SELFIE_FRONT_ID_UPLOAD_SUCCEEDED";
|
|
115
|
-
readonly videoSelfieBackIdCapture: "VIDEO_SELFIE_BACK_ID_CAPTURE";
|
|
116
|
-
readonly videoSelfieBackIdUploadProgress: "VIDEO_SELFIE_BACK_ID_UPLOAD_PROGRESS";
|
|
117
|
-
readonly videoSelfieBackIdAttemptFailed: "VIDEO_SELFIE_BACK_ID_ATTEMPT_FAILED";
|
|
118
|
-
readonly videoSelfieBackIdUploadSucceeded: "VIDEO_SELFIE_BACK_ID_UPLOAD_SUCCEEDED";
|
|
119
|
-
readonly videoSelfieDocumentCapture: "VIDEO_SELFIE_DOCUMENT_CAPTURE";
|
|
120
|
-
readonly videoSelfieVoiceQuestion: "VIDEO_SELFIE_VOICE_QUESTION";
|
|
121
|
-
readonly videoSelfieVoiceFinalQuestion: "VIDEO_SELFIE_VOICE_FINAL_QUESTION";
|
|
122
|
-
readonly videoSelfieVideoUpload: "VIDEO SELFIE VIDEO UPLOAD";
|
|
123
|
-
readonly ekycInput: "EKYC_INPUT";
|
|
124
|
-
readonly ekycProgress: "EKYC_PROGRESS";
|
|
125
|
-
readonly ekycSucceeded: "EKYC_SUCCEEDED";
|
|
126
|
-
readonly ekycFailed: "EKYC_FAILED";
|
|
127
|
-
readonly forms: "FORMS";
|
|
128
|
-
readonly globalWatchListInput: "GLOBAL_WATCHLIST_INPUT";
|
|
129
|
-
readonly globalWatchListProgress: "GLOBAL_WATCHLIST_PROGRESS";
|
|
130
|
-
readonly globalWatchListSuccess: "GLOBAL_WATCHLIST_SUCCEEDED";
|
|
131
|
-
readonly globalWatchListFailed: "GLOBAL_WATCHLIST_FAILED";
|
|
132
|
-
readonly customWatchListInput: "CUSTOM_WATCHLIST_INPUT";
|
|
133
|
-
readonly customWatchListProgress: "CUSTOM_WATCHLIST_PROGRESS";
|
|
134
|
-
readonly customWatchListSuccess: "CUSTOM_WATCHLIST_SUCCEEDED";
|
|
135
|
-
readonly customWatchListFailed: "CUSTOM_WATCHLIST_FAILED";
|
|
136
|
-
readonly emailInput: "EMAIL_INPUT";
|
|
137
|
-
readonly phoneInput: "PHONE_INPUT";
|
|
138
|
-
readonly instantVerify: "INSTANT_VERIFY";
|
|
139
|
-
readonly authFace: "AUTH_FACE";
|
|
140
|
-
readonly authFaceError: "AUTH_FACE_ATTEMPT_FAILED";
|
|
141
|
-
readonly authFaceUpload: "AUTH_FACE_UPLOAD_PROGRESS";
|
|
142
|
-
readonly authFaceUploadSuccess: "AUTH_FACE_UPLOAD_SUCCEEDED";
|
|
143
|
-
readonly authFaceUploadFailed: "AUTH_FACE_UPLOAD_FAILED";
|
|
144
|
-
readonly authFaceTutorial: "AUTH_FACE_TUTORIAL";
|
|
145
|
-
readonly customModuleCallback: "CUSTOM_MODULE_CALLBACK";
|
|
146
|
-
readonly customModuleProcessing: "CUSTOM_MODULE_PROCESSING";
|
|
147
|
-
readonly digitalIdFileSelection: "DIGITAL_ID_FILE_SELECTION";
|
|
148
|
-
readonly digitalIdFileReview: "DIGITAL_ID_FILE_REVIEW";
|
|
149
|
-
readonly digitalIdUploadProgress: "DIGITAL_ID_UPLOAD_PROGRESS";
|
|
150
|
-
readonly digitalIdUploadSuccess: "DIGITAL_ID_UPLOAD_SUCCEEDED";
|
|
151
|
-
readonly digitalIdUploadFailed: "DIGITAL_ID_UPLOAD_FAILED";
|
|
152
|
-
readonly digitalIdAnalysisProgress: "DIGITAL_ID_ANALYSIS_PROGRESS";
|
|
153
|
-
readonly digitalIdVerificationSuccess: "DIGITAL_ID_VERIFICATION_SUCCESS";
|
|
154
|
-
readonly digitalIdVerificationFailed: "DIGITAL_ID_VERIFICATION_FAILED";
|
|
155
|
-
readonly ekybForm: "EKYB_FORM";
|
|
156
|
-
};
|
|
157
|
-
declare const videoSelfieEvents: {
|
|
158
|
-
readonly imageTooBlurry: "imageTooBlurry";
|
|
159
|
-
readonly fillFrame: "fillFrame";
|
|
160
|
-
readonly checkCameraOrLighting: "checkCameraOrLighting";
|
|
161
|
-
readonly frontIdCaptureStarted: "frontIdCaptureStarted";
|
|
162
|
-
readonly lookAtCamera: "lookAtCamera";
|
|
163
|
-
readonly moveCloser: "moveCloser";
|
|
164
|
-
readonly lookingForFrontId: "lookingForFrontId";
|
|
165
|
-
readonly lookingForBackId: "lookingForBackId";
|
|
166
|
-
readonly cameraSwitchToBack: "cameraSwitchToBack";
|
|
167
|
-
readonly cameraSwitchToFront: "cameraSwitchToFront";
|
|
168
|
-
readonly audioStreamOpened: "audioStreamOpened";
|
|
169
|
-
readonly audioStreamClosed: "audioStreamClosed";
|
|
170
|
-
readonly videoSelfieVideoUploadInProgress: "videoSelfieVideoUploadInProgress";
|
|
171
|
-
readonly videoSelfieTosNotAccepted: "videoSelfieTosNotAccepted";
|
|
172
|
-
readonly videoSelfieTosAccepted: "videoSelfieTosAccepted";
|
|
173
|
-
readonly videoSelfieStreamCreated: "videoSelfieStreamCreated";
|
|
174
|
-
readonly videoSelfieStreamDestroyed: "videoSelfieStreamDestroyed";
|
|
175
|
-
readonly videoSelfieReconnecting: "videoSelfieReconnecting";
|
|
176
|
-
readonly videoSelfieReconnected: "videoSelfieReconnected";
|
|
177
|
-
};
|
|
178
|
-
declare const tutorialScreenNamesMapper: {
|
|
179
|
-
readonly passport: "TUTORIAL_PASSPORT";
|
|
180
|
-
readonly front: "FRONT_ID_CAPTURE_TUTORIAL";
|
|
181
|
-
readonly back: "BACK_ID_CAPTURE_TUTORIAL";
|
|
182
|
-
readonly selfie: "SELFIE_CAPTURE_TUTORIAL";
|
|
183
|
-
};
|
|
184
|
-
declare const cameraScreenNamesMapper: {
|
|
185
|
-
readonly front: "front";
|
|
186
|
-
readonly back: "back";
|
|
187
|
-
readonly passport: "passport";
|
|
188
|
-
readonly creditCard: "front";
|
|
189
|
-
readonly creditCardBack: "back";
|
|
190
|
-
readonly document: "document";
|
|
191
|
-
};
|
|
192
|
-
type EventModule = (typeof eventModuleNames)[keyof typeof eventModuleNames];
|
|
193
|
-
type EventScreen = (typeof eventScreenNames)[keyof typeof eventScreenNames];
|
|
194
|
-
//#endregion
|
|
195
|
-
//#region src/internal/events/addEvent.d.ts
|
|
196
|
-
type EventSubscriber = (event: Event) => void;
|
|
197
|
-
/**
|
|
198
|
-
* Registers the analytics batcher used by `addEvent` to ship events to the
|
|
199
|
-
* interview-events API. Disposes any previously-registered instance and drains
|
|
200
|
-
* any events queued before registration into the new batcher's buffer (FIFO).
|
|
201
|
-
*
|
|
202
|
-
* Returns the registered service so the caller can drive its lifecycle
|
|
203
|
-
* (e.g. call `.start()` after session initialization completes).
|
|
204
|
-
*/
|
|
205
|
-
|
|
206
|
-
/**
|
|
207
|
-
* Subscribes to raw SDK analytics events.
|
|
208
|
-
*
|
|
209
|
-
* This stream includes noisy tracking events such as `screenOpened`,
|
|
210
|
-
* `elementClicked`, and `captureAttemptFinished`. These events are also used by
|
|
211
|
-
* the SDK analytics pipeline and may be queued or posted to the interview-events
|
|
212
|
-
* API.
|
|
213
|
-
*
|
|
214
|
-
* For curated flow milestones such as `flow.started`, `flow.ready`, and
|
|
215
|
-
* `flow.completed`, use `manager.subscribeFlowEvent()`. The `FlowEvent` type is
|
|
216
|
-
* exported from `@incodetech/core/flow-events`.
|
|
217
|
-
*
|
|
218
|
-
* @param listener - Callback function that receives each event
|
|
219
|
-
* @returns Unsubscribe function to remove the listener
|
|
220
|
-
*
|
|
221
|
-
* @example
|
|
222
|
-
* ```typescript
|
|
223
|
-
* const unsubscribe = subscribeEvent((event) => {
|
|
224
|
-
* console.log('[Event]', event.code, event.module);
|
|
225
|
-
* });
|
|
226
|
-
*
|
|
227
|
-
* // Later
|
|
228
|
-
* unsubscribe();
|
|
229
|
-
* ```
|
|
230
|
-
*/
|
|
231
|
-
declare function subscribeEvent(listener: EventSubscriber): () => void;
|
|
232
|
-
/**
|
|
233
|
-
* Sends an event to the dashboard for tracking.
|
|
234
|
-
* Fire-and-forget: never blocks, never throws.
|
|
235
|
-
* Subscribers always receive the event at emit time. When a batcher is
|
|
236
|
-
* registered, the event is enqueued for batched delivery. Before any batcher
|
|
237
|
-
* is registered (events fired pre-`setup()`), the event is buffered in a
|
|
238
|
-
* one-shot pending queue and drained into the batcher when it's registered.
|
|
239
|
-
*/
|
|
240
|
-
declare function addEvent(event: Event): void;
|
|
241
|
-
//#endregion
|
|
242
|
-
//#region src/internal/events/helpers.d.ts
|
|
243
|
-
type ScreenEventParams = {
|
|
244
|
-
module: EventModule | string;
|
|
245
|
-
screen?: EventScreen | string;
|
|
246
|
-
code: string;
|
|
247
|
-
payload?: Record<string, unknown>;
|
|
248
|
-
};
|
|
249
|
-
type ElementClickedPayload = {
|
|
250
|
-
element: string;
|
|
251
|
-
action?: string;
|
|
252
|
-
metadata?: Record<string, unknown>;
|
|
253
|
-
};
|
|
254
|
-
type CaptureAttemptFinishedPayload = {
|
|
255
|
-
logs: string;
|
|
256
|
-
};
|
|
257
|
-
declare function screenEvent(params: ScreenEventParams): void;
|
|
258
|
-
declare function moduleOpened(module: EventModule | string, screen?: EventScreen | string, payload?: Record<string, unknown>): void;
|
|
259
|
-
declare function moduleClosed(module: EventModule | string, screen?: EventScreen | string, payload?: Record<string, unknown>): void;
|
|
260
|
-
declare function screenOpened(module: EventModule | string, screen: EventScreen | string, payload?: Record<string, unknown>): void;
|
|
261
|
-
declare function screenClosed(module: EventModule | string, screen: EventScreen | string, payload?: Record<string, unknown>): void;
|
|
262
|
-
declare function elementClicked(module: EventModule | string, screen: EventScreen | string | undefined, payload: ElementClickedPayload): void;
|
|
263
|
-
declare function captureAttemptFinished(module: EventModule | string, screen: EventScreen | string | undefined, payload: CaptureAttemptFinishedPayload): void;
|
|
264
|
-
//#endregion
|
|
265
|
-
export { type CaptureAttemptFinishedPayload, type ElementClickedPayload, type Event, type EventModule, type EventScreen, addEvent, cameraScreenNamesMapper, captureAttemptFinished, elementClicked, eventModuleNames, eventScreenNames, moduleClosed, moduleOpened, screenClosed, screenEvent, screenOpened, subscribeEvent, tutorialScreenNamesMapper, videoSelfieEvents };
|
package/dist/events.esm.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import "./api-CESGtpbH.esm.js";
|
|
2
|
-
import { a as videoSelfieEvents, c as elementClicked, d as screenClosed, f as screenEvent, h as addEvent, i as tutorialScreenNamesMapper, l as moduleClosed, n as eventModuleNames, p as screenOpened, r as eventScreenNames, s as captureAttemptFinished, t as cameraScreenNamesMapper, u as moduleOpened, y as subscribeEvent } from "./events-D6-e4vok.esm.js";
|
|
3
|
-
|
|
4
|
-
export { addEvent, cameraScreenNamesMapper, captureAttemptFinished, elementClicked, eventModuleNames, eventScreenNames, moduleClosed, moduleOpened, screenClosed, screenEvent, screenOpened, subscribeEvent, tutorialScreenNamesMapper, videoSelfieEvents };
|
package/dist/extensibility.d.ts
DELETED
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import "./warmup-CEcppFiS.js";
|
|
2
|
-
import "./Manager-C8PrhBOx.js";
|
|
3
|
-
import { n as createActor } from "./Actor-CI32dTbG.js";
|
|
4
|
-
import { r as fromPromise } from "./StateMachine-BCQrZJhf.js";
|
|
5
|
-
import { _ as SendFaceImageResponse, d as FaceCaptureContext, f as FaceCaptureEvent, m as faceCaptureMachine, n as FaceCaptureManagerState, p as FaceCaptureInput, t as FaceCaptureManager, v as BaseWasmProvider } from "./faceCaptureManagerFactory-yqtpxjnN.js";
|
|
6
|
-
import "./camera-DBSxa6ML.js";
|
|
7
|
-
import "./types-CFV9G_7j.js";
|
|
8
|
-
import "./types-BP1m8VRw.js";
|
|
9
|
-
import { a as IWasmUtilCapability, o as VirtualCameraCheckOutput, s as WasmUtilConfig, u as IStorageCapability } from "./deepsightService-CEVxzehb.js";
|
|
10
|
-
import "./types-CAD4va6a.js";
|
|
11
|
-
import { a as ProcessFaceResponse, i as createSelfieManagerFromActor, n as SelfieState, t as SelfieManager } from "./selfieManager-D0lSgd-J.js";
|
|
12
|
-
import { i as createAuthenticationManagerFromActor, n as AuthenticationState, t as AuthenticationManager } from "./authenticationManager-C83GNIhl.js";
|
|
13
|
-
import { i as createEmailManagerFromActor, n as EmailState, t as EmailManager } from "./emailManager-DIfnS5g1.js";
|
|
14
|
-
import { A as CaptureIdResponse, i as createIdCaptureManagerFromActor, n as IdCaptureManager, r as IdCaptureState } from "./idCaptureManager-B9TGA5dq.js";
|
|
15
|
-
import { i as createPhoneManagerFromActor, n as PhoneState, t as PhoneManager } from "./phoneManager-B6M30hKE.js";
|
|
16
|
-
|
|
17
|
-
//#region src/modules/authentication/authenticationUploadService.d.ts
|
|
18
|
-
type AuthenticationUploadResponse = {
|
|
19
|
-
overallStatus: 'PASS' | 'FAIL';
|
|
20
|
-
captureAttemptsLimit: {
|
|
21
|
-
max: number;
|
|
22
|
-
remaining: number;
|
|
23
|
-
};
|
|
24
|
-
candidate: string;
|
|
25
|
-
error: {
|
|
26
|
-
name: string;
|
|
27
|
-
message: string;
|
|
28
|
-
};
|
|
29
|
-
imageBase64?: string;
|
|
30
|
-
selfieEncryptedBase64?: string;
|
|
31
|
-
metadata?: string;
|
|
32
|
-
};
|
|
33
|
-
//#endregion
|
|
34
|
-
//#region ../infra/src/providers/browser/BrowserStorageProvider.d.ts
|
|
35
|
-
/**
|
|
36
|
-
* Browser-based storage provider wrapping localStorage.
|
|
37
|
-
* Handles JSON serialization/deserialization automatically.
|
|
38
|
-
*/
|
|
39
|
-
declare class BrowserStorageProvider implements IStorageCapability {
|
|
40
|
-
/**
|
|
41
|
-
* Retrieves a value from localStorage.
|
|
42
|
-
* @param key - The storage key
|
|
43
|
-
* @returns The stored value or null if not found
|
|
44
|
-
* @throws Error if stored value is invalid JSON
|
|
45
|
-
*/
|
|
46
|
-
get<T>(key: string): Promise<T | null>;
|
|
47
|
-
/**
|
|
48
|
-
* Stores a value in localStorage.
|
|
49
|
-
* @param key - The storage key
|
|
50
|
-
* @param value - The value to store (will be serialized as JSON)
|
|
51
|
-
* @throws Error if value cannot be serialized or quota is exceeded
|
|
52
|
-
*/
|
|
53
|
-
set<T>(key: string, value: T): Promise<void>;
|
|
54
|
-
/**
|
|
55
|
-
* Removes a value from localStorage.
|
|
56
|
-
* @param key - The storage key to remove
|
|
57
|
-
*/
|
|
58
|
-
remove(key: string): Promise<void>;
|
|
59
|
-
/**
|
|
60
|
-
* Clears all values from localStorage.
|
|
61
|
-
*/
|
|
62
|
-
clear(): Promise<void>;
|
|
63
|
-
}
|
|
64
|
-
//#endregion
|
|
65
|
-
//#region ../infra/src/providers/wasm/WasmUtilProvider.d.ts
|
|
66
|
-
declare class WasmUtilProvider extends BaseWasmProvider implements IWasmUtilCapability {
|
|
67
|
-
private static instance;
|
|
68
|
-
private static initPromise;
|
|
69
|
-
static getInstance(): Promise<WasmUtilProvider>;
|
|
70
|
-
static resetInstance(): void;
|
|
71
|
-
constructor();
|
|
72
|
-
initialize(config: WasmUtilConfig): Promise<void>;
|
|
73
|
-
processFrame(_image: ImageData): Promise<void>;
|
|
74
|
-
encryptImage(image: string): string;
|
|
75
|
-
setSdkVersion(version: string): void;
|
|
76
|
-
setSdkPlatform(platform: string): void;
|
|
77
|
-
setDeviceInfo(deviceInfo: object, overrideExisting?: boolean): void;
|
|
78
|
-
setBrowserInfo(browserInfo: object, overrideExisting?: boolean): void;
|
|
79
|
-
setCameraInfo(cameraInfo: object, overrideExisting?: boolean): void;
|
|
80
|
-
setMotionStatus(status: string): void;
|
|
81
|
-
setBackgroundMode(backgroundMode: boolean): void;
|
|
82
|
-
setZc(zc: string): void;
|
|
83
|
-
setInspectorOpened(opened: boolean): void;
|
|
84
|
-
getMetadata(): string;
|
|
85
|
-
analyzeFrame(image: ImageData): Promise<void>;
|
|
86
|
-
getCheck(): string;
|
|
87
|
-
getPipelineState(): string;
|
|
88
|
-
estimatePerformance(): string;
|
|
89
|
-
isVirtualCamera(label: string | null): boolean;
|
|
90
|
-
prc(): Promise<void>;
|
|
91
|
-
poc(output: VirtualCameraCheckOutput): Promise<void>;
|
|
92
|
-
ckvcks(data: ArrayBuffer): void;
|
|
93
|
-
getVersions(): Promise<unknown>;
|
|
94
|
-
}
|
|
95
|
-
//#endregion
|
|
96
|
-
//#region ../infra/src/capabilities/IFingerprintCapability.d.ts
|
|
97
|
-
type DeviceFingerprintInfo = {
|
|
98
|
-
device: {
|
|
99
|
-
model?: string;
|
|
100
|
-
};
|
|
101
|
-
os: {
|
|
102
|
-
name?: string;
|
|
103
|
-
version?: string;
|
|
104
|
-
};
|
|
105
|
-
browser: {
|
|
106
|
-
name?: string;
|
|
107
|
-
version?: string;
|
|
108
|
-
};
|
|
109
|
-
};
|
|
110
|
-
type FingerprintResult = {
|
|
111
|
-
visitorId: string;
|
|
112
|
-
ip: string;
|
|
113
|
-
deviceInfo: DeviceFingerprintInfo;
|
|
114
|
-
};
|
|
115
|
-
//#endregion
|
|
116
|
-
//#region ../infra/src/device/getDeviceData.d.ts
|
|
117
|
-
declare function getDeviceFingerprintInfo(): Promise<DeviceFingerprintInfo>;
|
|
118
|
-
//#endregion
|
|
119
|
-
//#region src/internal/fingerprint/fingerprintApi.d.ts
|
|
120
|
-
declare function getFingerprint(disableIpify?: boolean): Promise<FingerprintResult>;
|
|
121
|
-
//#endregion
|
|
122
|
-
export { type AuthenticationManager, type AuthenticationState, type AuthenticationUploadResponse, BrowserStorageProvider, type CaptureIdResponse, type DeviceFingerprintInfo, type EmailManager, type EmailState, type FaceCaptureContext, type FaceCaptureEvent, type FaceCaptureInput, type FaceCaptureManager, type FaceCaptureManagerState, type FingerprintResult, type IdCaptureManager, type IdCaptureState, type PhoneManager, type PhoneState, type ProcessFaceResponse, type SelfieManager, type SelfieState, type SendFaceImageResponse, WasmUtilProvider, createActor, createAuthenticationManagerFromActor, createEmailManagerFromActor, createIdCaptureManagerFromActor, createPhoneManagerFromActor, createSelfieManagerFromActor, faceCaptureMachine, fromPromise, getDeviceFingerprintInfo, getFingerprint };
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import "./BaseWasmProvider-C_DLEI40.esm.js";
|
|
2
|
-
import { t as WasmUtilProvider } from "./WasmUtilProvider-j98OJf-S.esm.js";
|
|
3
|
-
import "./BrowserTimerProvider-DhNc_x02.esm.js";
|
|
4
|
-
import "./api-CESGtpbH.esm.js";
|
|
5
|
-
import "./events-D6-e4vok.esm.js";
|
|
6
|
-
import "./endpoints-CnN3SyDa.esm.js";
|
|
7
|
-
import { a as FingerprintProvider, o as getDeviceFingerprintInfo, t as getDisableIpify } from "./session-BS-d_vuE.esm.js";
|
|
8
|
-
import { t as IpifyProvider } from "./IpifyProvider-D7jx52AL.esm.js";
|
|
9
|
-
import "./browserSimulation-gxD8cSpM.esm.js";
|
|
10
|
-
import { a as fromPromise, s as createActor } from "./xstate.esm-B70JrNqo.esm.js";
|
|
11
|
-
import "./faceCaptureManagerFactory-Dh2PdGlF.esm.js";
|
|
12
|
-
import { t as BrowserStorageProvider } from "./BrowserStorageProvider-CuOW1Er2.esm.js";
|
|
13
|
-
import { t as faceCaptureMachine } from "./faceCaptureSetup-B3faSpYA.esm.js";
|
|
14
|
-
import "./ITimerCapability-C67ZRskg.esm.js";
|
|
15
|
-
import "./camera-PA2Ljri3.esm.js";
|
|
16
|
-
import "./deepsightService-O74l4Y__.esm.js";
|
|
17
|
-
import "./recordingService-Ig2UgbLv.esm.js";
|
|
18
|
-
import "./platform-CfrjKhmi.esm.js";
|
|
19
|
-
import "./backCameraStream-DMdMeGk2.esm.js";
|
|
20
|
-
import "./getBrowser-BSXUTWXw.esm.js";
|
|
21
|
-
import "./stats-CIfiPzb1.esm.js";
|
|
22
|
-
import "./getDeviceClass-BSntT9_j.esm.js";
|
|
23
|
-
import "./MotionSensorProvider-4v7xkqAp.esm.js";
|
|
24
|
-
import "./permissionServices-D_i6nzEw.esm.js";
|
|
25
|
-
import "./authenticationStateMachine-BMZqatiF.esm.js";
|
|
26
|
-
import { n as createAuthenticationManagerFromActor } from "./authenticationManager-5M-fKzXx.esm.js";
|
|
27
|
-
import "./emailStateMachine-DOf4j58N.esm.js";
|
|
28
|
-
import { n as createEmailManagerFromActor } from "./emailManager-wAV0LE-H.esm.js";
|
|
29
|
-
import "./selfieStateMachine-D76whWEf.esm.js";
|
|
30
|
-
import { n as createSelfieManagerFromActor } from "./selfieManager-Duisl7qN.esm.js";
|
|
31
|
-
import "./idCaptureStateMachine-Bq0fVZXl.esm.js";
|
|
32
|
-
import { r as createIdCaptureManagerFromActor } from "./idCaptureManager-DMK0GIt3.esm.js";
|
|
33
|
-
import "./phoneStateMachine-CuPARRaT.esm.js";
|
|
34
|
-
import { n as createPhoneManagerFromActor } from "./phoneManager-DAJbGhlY.esm.js";
|
|
35
|
-
|
|
36
|
-
//#region src/internal/fingerprint/fingerprintApi.ts
|
|
37
|
-
async function getFingerprint(disableIpify) {
|
|
38
|
-
const shouldDisableIpify = disableIpify ?? getDisableIpify();
|
|
39
|
-
return new FingerprintProvider(new IpifyProvider()).getFingerprint(shouldDisableIpify);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
//#endregion
|
|
43
|
-
export { BrowserStorageProvider, WasmUtilProvider, createActor, createAuthenticationManagerFromActor, createEmailManagerFromActor, createIdCaptureManagerFromActor, createPhoneManagerFromActor, createSelfieManagerFromActor, faceCaptureMachine, fromPromise, getDeviceFingerprintInfo, getFingerprint };
|
package/dist/face-match.d.ts
DELETED
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
import { t as Manager } from "./Manager-C8PrhBOx.js";
|
|
2
|
-
|
|
3
|
-
//#region src/modules/face-match/types.d.ts
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Face match comparison variant.
|
|
7
|
-
* Determines which images are compared in the face match flow.
|
|
8
|
-
*/
|
|
9
|
-
type FaceMatchVariant = 'selfieVsId' | 'selfieVsNfc' | 'idVsNfc' | 'nfc3Way' | 'secondId';
|
|
10
|
-
/**
|
|
11
|
-
* Configuration options for face match module.
|
|
12
|
-
*
|
|
13
|
-
* @example Standard face match with animation
|
|
14
|
-
* ```typescript
|
|
15
|
-
* const config: FaceMatchConfig = {
|
|
16
|
-
* matchingType: 'selfieVsId',
|
|
17
|
-
* disableFaceMatchAnimation: false,
|
|
18
|
-
* };
|
|
19
|
-
* ```
|
|
20
|
-
*
|
|
21
|
-
* @example Auto-skip mode (headless)
|
|
22
|
-
* ```typescript
|
|
23
|
-
* const config: FaceMatchConfig = {
|
|
24
|
-
* matchingType: 'selfieVsId',
|
|
25
|
-
* disableFaceMatchAnimation: true,
|
|
26
|
-
* };
|
|
27
|
-
* ```
|
|
28
|
-
*/
|
|
29
|
-
type FaceMatchConfig = {
|
|
30
|
-
/**
|
|
31
|
-
* Which images to compare in the face match flow.
|
|
32
|
-
* Backend field name: `matchingType`.
|
|
33
|
-
* @default 'selfieVsId'
|
|
34
|
-
*/
|
|
35
|
-
matchingType?: FaceMatchVariant;
|
|
36
|
-
/**
|
|
37
|
-
* When true, skips the animation UI and auto-completes immediately after fetching data.
|
|
38
|
-
* Useful for headless integrations or silent verification flows.
|
|
39
|
-
* @default false
|
|
40
|
-
*/
|
|
41
|
-
disableFaceMatchAnimation?: boolean;
|
|
42
|
-
};
|
|
43
|
-
/**
|
|
44
|
-
* Cropped face images fetched from the backend.
|
|
45
|
-
*/
|
|
46
|
-
type FaceMatchImages = {
|
|
47
|
-
/**
|
|
48
|
-
* Cropped face from ID document.
|
|
49
|
-
*/
|
|
50
|
-
idFace: string | null;
|
|
51
|
-
/**
|
|
52
|
-
* Cropped selfie image (from face capture).
|
|
53
|
-
*/
|
|
54
|
-
selfie: string | null;
|
|
55
|
-
/**
|
|
56
|
-
* Cropped face from second ID document (only for 'secondId' variant).
|
|
57
|
-
*/
|
|
58
|
-
secondIdFace?: string | null;
|
|
59
|
-
};
|
|
60
|
-
/**
|
|
61
|
-
* Face match result parsed from score response.
|
|
62
|
-
*/
|
|
63
|
-
type FaceMatchResult = {
|
|
64
|
-
/**
|
|
65
|
-
* Whether faces matched (OK = true, FAIL = false, null = unknown).
|
|
66
|
-
*/
|
|
67
|
-
matched: boolean | null;
|
|
68
|
-
/**
|
|
69
|
-
* Whether liveness check passed.
|
|
70
|
-
*/
|
|
71
|
-
liveness: boolean | null;
|
|
72
|
-
};
|
|
73
|
-
//#endregion
|
|
74
|
-
//#region src/modules/face-match/faceMatchActor.d.ts
|
|
75
|
-
type CreateFaceMatchActorOptions = {
|
|
76
|
-
config: FaceMatchConfig;
|
|
77
|
-
};
|
|
78
|
-
//#endregion
|
|
79
|
-
//#region src/modules/face-match/faceMatchManager.d.ts
|
|
80
|
-
/** Face match manager is in initial state, waiting for `load()` to be called */
|
|
81
|
-
type FaceMatchIdleState = {
|
|
82
|
-
status: 'idle';
|
|
83
|
-
};
|
|
84
|
-
/** Fetching images and score from backend */
|
|
85
|
-
type FaceMatchLoadingState = {
|
|
86
|
-
status: 'loading';
|
|
87
|
-
};
|
|
88
|
-
/**
|
|
89
|
-
* Animation is playing - images are animating.
|
|
90
|
-
* @property images - Cropped face images fetched from backend
|
|
91
|
-
* @property result - Face match result (matched, liveness)
|
|
92
|
-
*/
|
|
93
|
-
type FaceMatchAnimatingState = {
|
|
94
|
-
status: 'animating';
|
|
95
|
-
images: {
|
|
96
|
-
idFace: string | null;
|
|
97
|
-
selfie: string | null;
|
|
98
|
-
secondIdFace?: string | null;
|
|
99
|
-
};
|
|
100
|
-
result: {
|
|
101
|
-
matched: boolean | null;
|
|
102
|
-
liveness: boolean | null;
|
|
103
|
-
};
|
|
104
|
-
};
|
|
105
|
-
/**
|
|
106
|
-
* Showing match result - waiting for user to click continue.
|
|
107
|
-
* @property images - Cropped face images
|
|
108
|
-
* @property result - Face match result
|
|
109
|
-
* @property matched - Whether faces matched (true/false/null)
|
|
110
|
-
*/
|
|
111
|
-
type FaceMatchResultState = {
|
|
112
|
-
status: 'result';
|
|
113
|
-
images: {
|
|
114
|
-
idFace: string | null;
|
|
115
|
-
selfie: string | null;
|
|
116
|
-
secondIdFace?: string | null;
|
|
117
|
-
};
|
|
118
|
-
result: {
|
|
119
|
-
matched: boolean | null;
|
|
120
|
-
liveness: boolean | null;
|
|
121
|
-
};
|
|
122
|
-
matched: boolean | null;
|
|
123
|
-
};
|
|
124
|
-
/** Face match completed successfully */
|
|
125
|
-
type FaceMatchFinishedState = {
|
|
126
|
-
status: 'finished';
|
|
127
|
-
matched: boolean | null;
|
|
128
|
-
};
|
|
129
|
-
/**
|
|
130
|
-
* Fatal error occurred - call `reset()` to start over
|
|
131
|
-
* @property error - Error message describing what went wrong
|
|
132
|
-
*/
|
|
133
|
-
type FaceMatchErrorState = {
|
|
134
|
-
status: 'error';
|
|
135
|
-
error: string;
|
|
136
|
-
};
|
|
137
|
-
/**
|
|
138
|
-
* Union of all possible face match manager states.
|
|
139
|
-
* Use discriminated union pattern to narrow the type:
|
|
140
|
-
*
|
|
141
|
-
* @example
|
|
142
|
-
* ```typescript
|
|
143
|
-
* const state = faceMatchManager.getState();
|
|
144
|
-
* if (state.status === 'animating') {
|
|
145
|
-
* // TypeScript knows state has images and result
|
|
146
|
-
* console.log(state.images.idFace);
|
|
147
|
-
* }
|
|
148
|
-
* ```
|
|
149
|
-
*/
|
|
150
|
-
type FaceMatchState = FaceMatchIdleState | FaceMatchLoadingState | FaceMatchAnimatingState | FaceMatchResultState | FaceMatchFinishedState | FaceMatchErrorState;
|
|
151
|
-
/**
|
|
152
|
-
* Creates a face match manager for headless or UI-driven usage.
|
|
153
|
-
*
|
|
154
|
-
* The manager provides a state machine-based API for face comparison
|
|
155
|
-
* with optional animation display.
|
|
156
|
-
*
|
|
157
|
-
* @param options - Configuration options
|
|
158
|
-
* @param options.config - Face match configuration
|
|
159
|
-
* @param options.config.matchingType - Which images to compare (default: 'selfieVsId')
|
|
160
|
-
* @param options.config.disableFaceMatchAnimation - Skip animation and auto-complete (default: false)
|
|
161
|
-
*
|
|
162
|
-
* @returns Face match manager with state, API methods, and subscription
|
|
163
|
-
*
|
|
164
|
-
* @example Headless usage
|
|
165
|
-
* ```typescript
|
|
166
|
-
* const manager = createFaceMatchManager({
|
|
167
|
-
* config: { matchingType: 'selfieVsId', disableFaceMatchAnimation: true },
|
|
168
|
-
* });
|
|
169
|
-
*
|
|
170
|
-
* manager.subscribe((state) => console.log(state.status));
|
|
171
|
-
* manager.load();
|
|
172
|
-
* // Auto-completes when disableFaceMatchAnimation is true
|
|
173
|
-
* manager.stop();
|
|
174
|
-
* ```
|
|
175
|
-
*
|
|
176
|
-
* @example With React/Preact UI hook
|
|
177
|
-
* ```tsx
|
|
178
|
-
* const [state, manager] = useManager(() => createFaceMatchManager({ config }));
|
|
179
|
-
*
|
|
180
|
-
* if (state.status === 'animating') {
|
|
181
|
-
* return <Animation images={state.images} />;
|
|
182
|
-
* }
|
|
183
|
-
* ```
|
|
184
|
-
*/
|
|
185
|
-
declare function createFaceMatchManager(options: CreateFaceMatchActorOptions): Manager<FaceMatchState> & {
|
|
186
|
-
/**
|
|
187
|
-
* Initializes the face match flow.
|
|
188
|
-
* Transitions from 'idle' to 'loading'.
|
|
189
|
-
* Must be called before any other method.
|
|
190
|
-
*/
|
|
191
|
-
load(): void;
|
|
192
|
-
/**
|
|
193
|
-
* Signals that the animation has completed.
|
|
194
|
-
* Should be called when state is 'animating' and your UI animation finishes.
|
|
195
|
-
* Transitions to 'result' state.
|
|
196
|
-
*/
|
|
197
|
-
animationComplete(): void;
|
|
198
|
-
/**
|
|
199
|
-
* User clicked continue button.
|
|
200
|
-
* Should be called when state is 'result'.
|
|
201
|
-
* Transitions to 'finished' state.
|
|
202
|
-
*/
|
|
203
|
-
continue(): void;
|
|
204
|
-
/**
|
|
205
|
-
* Resets the manager to initial state.
|
|
206
|
-
* Can be called from 'error' state to start over.
|
|
207
|
-
* Clears all stored data including images and result.
|
|
208
|
-
*/
|
|
209
|
-
reset(): void;
|
|
210
|
-
};
|
|
211
|
-
/**
|
|
212
|
-
* Type representing a face match manager instance.
|
|
213
|
-
* Includes state access, API methods, and lifecycle management.
|
|
214
|
-
*
|
|
215
|
-
* @property getState - Returns the current FaceMatchState
|
|
216
|
-
* @property subscribe - Subscribes to state changes, returns unsubscribe function
|
|
217
|
-
* @property stop - Stops the manager and cleans up resources
|
|
218
|
-
* @property load - Initializes the face match flow
|
|
219
|
-
* @property animationComplete - Signals animation finished
|
|
220
|
-
* @property continue - User clicked continue button
|
|
221
|
-
* @property reset - Resets to initial state
|
|
222
|
-
*/
|
|
223
|
-
type FaceMatchManager = ReturnType<typeof createFaceMatchManager>;
|
|
224
|
-
//#endregion
|
|
225
|
-
//#region src/modules/face-match/faceMatchStateMachine.d.ts
|
|
226
|
-
declare const faceMatchMachine: any;
|
|
227
|
-
//#endregion
|
|
228
|
-
export { type FaceMatchConfig, type FaceMatchImages, type FaceMatchManager, type FaceMatchResult, type FaceMatchState, type FaceMatchVariant, createFaceMatchManager, faceMatchMachine };
|