@incodetech/core 2.0.0-alpha.8 → 2.0.0-rc.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.
Files changed (184) hide show
  1. package/dist/Actor-CI32dTbG.d.ts +2 -0
  2. package/dist/BaseWasmProvider-C_DLEI40.esm.js +1118 -0
  3. package/dist/BrowserStorageProvider-CuOW1Er2.esm.js +55 -0
  4. package/dist/BrowserTimerProvider-DhNc_x02.esm.js +22 -0
  5. package/dist/ITimerCapability-C67ZRskg.esm.js +7 -0
  6. package/dist/IpifyProvider-D7jx52AL.esm.js +139 -0
  7. package/dist/MotionSensorProvider-4v7xkqAp.esm.js +254 -0
  8. package/dist/OpenViduRecordingProvider-CMu6XVdc.esm.js +87 -0
  9. package/dist/StateMachine-BCQrZJhf.d.ts +2 -0
  10. package/dist/WasmUtilProvider-j98OJf-S.esm.js +114 -0
  11. package/dist/addressSearch-BpTbTWCa.esm.js +430 -0
  12. package/dist/ae-signature-DDDZmWXj.esm.js +12 -0
  13. package/dist/ae-signature.d.ts +25 -0
  14. package/dist/ae-signature.esm.js +8 -0
  15. package/dist/antifraud.d.ts +57 -0
  16. package/dist/antifraud.esm.js +45 -0
  17. package/dist/antifraudStateMachine-O0TMf6yc.esm.js +39 -0
  18. package/dist/api-CESGtpbH.esm.js +53 -0
  19. package/dist/authentication.d.ts +12 -0
  20. package/dist/authentication.esm.js +25 -0
  21. package/dist/authenticationManager-5M-fKzXx.esm.js +67 -0
  22. package/dist/authenticationManager-C83GNIhl.d.ts +66 -0
  23. package/dist/authenticationStateMachine-BMZqatiF.esm.js +139 -0
  24. package/dist/backCameraStream-DMdMeGk2.esm.js +346 -0
  25. package/dist/browserSimulation-gxD8cSpM.esm.js +20 -0
  26. package/dist/camera-DBSxa6ML.d.ts +4 -0
  27. package/dist/camera-PA2Ljri3.esm.js +22 -0
  28. package/dist/camera.d.ts +15 -0
  29. package/dist/camera.esm.js +5 -0
  30. package/dist/consent.d.ts +398 -0
  31. package/dist/consent.esm.js +79 -0
  32. package/dist/consentStateMachine-CCT-B60O.esm.js +151 -0
  33. package/dist/cpf-PPz2Njto.esm.js +38 -0
  34. package/dist/cpf-ocr.d.ts +204 -0
  35. package/dist/cpf-ocr.esm.js +177 -0
  36. package/dist/cross-document-data-match.d.ts +34 -0
  37. package/dist/cross-document-data-match.esm.js +71 -0
  38. package/dist/curp-validation.d.ts +188 -0
  39. package/dist/curp-validation.esm.js +110 -0
  40. package/dist/curpValidationStateMachine-CitWLr2c.esm.js +595 -0
  41. package/dist/custom-fields.d.ts +115 -0
  42. package/dist/custom-fields.esm.js +177 -0
  43. package/dist/custom-watchlist.d.ts +66 -0
  44. package/dist/custom-watchlist.esm.js +86 -0
  45. package/dist/dateUtils-UoN5xswP.esm.js +23 -0
  46. package/dist/deepsightLoader-Cm4JIT_z.esm.js +52 -0
  47. package/dist/deepsightService-CEVxzehb.d.ts +412 -0
  48. package/dist/deepsightService-O74l4Y__.esm.js +489 -0
  49. package/dist/device.d.ts +46 -0
  50. package/dist/device.esm.js +106 -0
  51. package/dist/displayErrors-DqJ_IbsG.d.ts +39 -0
  52. package/dist/document-capture.d.ts +906 -0
  53. package/dist/document-capture.esm.js +156 -0
  54. package/dist/document-upload.d.ts +331 -0
  55. package/dist/document-upload.esm.js +203 -0
  56. package/dist/documentCaptureStateMachine-BqzTDy9k.esm.js +394 -0
  57. package/dist/dynamic-forms.d.ts +178 -0
  58. package/dist/dynamic-forms.esm.js +323 -0
  59. package/dist/ekyb.d.ts +148 -0
  60. package/dist/ekyb.esm.js +127 -0
  61. package/dist/ekybStateMachine-B59rQjgj.esm.js +674 -0
  62. package/dist/ekyc.d.ts +164 -0
  63. package/dist/ekyc.esm.js +104 -0
  64. package/dist/ekycStateMachine-oeO0Iekd.esm.js +10626 -0
  65. package/dist/electronic-signature.d.ts +4 -0
  66. package/dist/electronic-signature.esm.js +7 -0
  67. package/dist/electronicSignatureManager-D9OHzTpG.esm.js +428 -0
  68. package/dist/email.d.ts +3 -263
  69. package/dist/email.esm.js +7 -477
  70. package/dist/emailManager-DIfnS5g1.d.ts +352 -0
  71. package/dist/emailManager-wAV0LE-H.esm.js +238 -0
  72. package/dist/emailStateMachine-DOf4j58N.esm.js +292 -0
  73. package/dist/endpoints-CnN3SyDa.esm.js +87 -0
  74. package/dist/events-D6-e4vok.esm.js +596 -0
  75. package/dist/events.d.ts +265 -0
  76. package/dist/events.esm.js +4 -0
  77. package/dist/extensibility.d.ts +122 -0
  78. package/dist/extensibility.esm.js +43 -0
  79. package/dist/face-match.d.ts +228 -0
  80. package/dist/face-match.esm.js +173 -0
  81. package/dist/faceCaptureManagerFactory-Dh2PdGlF.esm.js +290 -0
  82. package/dist/faceCaptureManagerFactory-yqtpxjnN.d.ts +690 -0
  83. package/dist/faceCaptureSetup-B3faSpYA.esm.js +873 -0
  84. package/dist/faceMatchStateMachine-DNFrxTFS.esm.js +127 -0
  85. package/dist/flow-events.d.ts +6 -0
  86. package/dist/flow-events.esm.js +0 -0
  87. package/dist/flow.d.ts +101 -321
  88. package/dist/flow.esm.js +370 -173
  89. package/dist/flowCompletionService-DhkT4SRY.d.ts +10 -0
  90. package/dist/flowCompletionService-P54yzGvA.esm.js +13 -0
  91. package/dist/flowServices-DTsm-Vf1.esm.js +188 -0
  92. package/dist/geolocation.d.ts +127 -0
  93. package/dist/geolocation.esm.js +89 -0
  94. package/dist/geolocationStateMachine-asasuHY2.esm.js +105 -0
  95. package/dist/getBrowser-BSXUTWXw.esm.js +41 -0
  96. package/dist/getDeviceClass-BSntT9_j.esm.js +14 -0
  97. package/dist/government-validation.d.ts +67 -0
  98. package/dist/government-validation.esm.js +81 -0
  99. package/dist/governmentValidationStateMachine-BDDYrJTo.esm.js +271 -0
  100. package/dist/home.d.ts +99 -0
  101. package/dist/home.esm.js +61 -0
  102. package/dist/http.d.ts +68 -0
  103. package/dist/http.esm.js +3 -0
  104. package/dist/id-ocr.d.ts +635 -0
  105. package/dist/id-ocr.esm.js +86 -0
  106. package/dist/id-verification.d.ts +190 -0
  107. package/dist/id-verification.esm.js +43 -0
  108. package/dist/id.d.ts +24 -0
  109. package/dist/id.esm.js +164 -0
  110. package/dist/idCaptureManager-B9TGA5dq.d.ts +956 -0
  111. package/dist/idCaptureManager-DMK0GIt3.esm.js +581 -0
  112. package/dist/idCaptureStateMachine-Bq0fVZXl.esm.js +2954 -0
  113. package/dist/idOcrStateMachine-YbjjC_Gg.esm.js +388 -0
  114. package/dist/idVerificationStateMachine-xbw9HP1Z.esm.js +71 -0
  115. package/dist/identity-reuse.d.ts +530 -0
  116. package/dist/identity-reuse.esm.js +274 -0
  117. package/dist/index-BLKtMA0g.d.ts +1177 -0
  118. package/dist/index-BcRG8rtJ.d.ts +97 -0
  119. package/dist/index.d.ts +3 -226
  120. package/dist/index.esm.js +11 -154
  121. package/dist/invokeOnCaptureCallback-rc6kBHo5.esm.js +30 -0
  122. package/dist/{lib-Bu9XGMBW.esm.js → lib-BB0B_qQX.esm.js} +801 -2
  123. package/dist/mandatory-consent.d.ts +412 -0
  124. package/dist/mandatory-consent.esm.js +78 -0
  125. package/dist/mandatoryConsentStateMachine-Cnco1jvn.esm.js +126 -0
  126. package/dist/openviduLazy-Cm0XFh_v.esm.js +3 -0
  127. package/dist/openviduLazy-Cok70ZSg.esm.js +12 -0
  128. package/dist/permissionServices-D_i6nzEw.esm.js +50 -0
  129. package/dist/phone.d.ts +3 -291
  130. package/dist/phone.esm.js +7 -548
  131. package/dist/phoneManager-B6M30hKE.d.ts +397 -0
  132. package/dist/phoneManager-DAJbGhlY.esm.js +256 -0
  133. package/dist/phoneStateMachine-CuPARRaT.esm.js +351 -0
  134. package/dist/platform-CfrjKhmi.esm.js +83 -0
  135. package/dist/qe-signature-DFo_Cc-I.esm.js +12 -0
  136. package/dist/qe-signature.d.ts +25 -0
  137. package/dist/qe-signature.esm.js +8 -0
  138. package/dist/recordingService-Ig2UgbLv.esm.js +1003 -0
  139. package/dist/redirect-to-mobile.d.ts +107 -0
  140. package/dist/redirect-to-mobile.esm.js +102 -0
  141. package/dist/redirectToMobileStateMachine-BOEqe46A.esm.js +249 -0
  142. package/dist/runChildModule-CqqwqAkW.esm.js +219 -0
  143. package/dist/selfie.d.ts +21 -754
  144. package/dist/selfie.esm.js +113 -962
  145. package/dist/selfieManager-D0lSgd-J.d.ts +68 -0
  146. package/dist/selfieManager-Duisl7qN.esm.js +60 -0
  147. package/dist/selfieStateMachine-D76whWEf.esm.js +68 -0
  148. package/dist/session-BS-d_vuE.esm.js +3206 -0
  149. package/dist/session.d.ts +217 -0
  150. package/dist/session.esm.js +9 -0
  151. package/dist/setup-Buy-hyj4.esm.js +887 -0
  152. package/dist/setup-C5AITV8m.d.ts +254 -0
  153. package/dist/signature.d.ts +94 -0
  154. package/dist/signature.esm.js +66 -0
  155. package/dist/signatureStateMachine-B5-QVUve.esm.js +132 -0
  156. package/dist/stats-CIfiPzb1.esm.js +16 -0
  157. package/dist/stats.d.ts +16 -0
  158. package/dist/stats.esm.js +4 -0
  159. package/dist/trust-graph.d.ts +54 -0
  160. package/dist/trust-graph.esm.js +56 -0
  161. package/dist/types-B06Ypu2F.d.ts +49 -0
  162. package/dist/types-BP1m8VRw.d.ts +340 -0
  163. package/dist/types-CFV9G_7j.d.ts +24 -0
  164. package/dist/{warmup-CEJTfxQr.d.ts → warmup-CEcppFiS.d.ts} +11 -3
  165. package/dist/wasm.d.ts +15 -0
  166. package/dist/wasm.esm.js +12 -0
  167. package/dist/watchlist-for-business.d.ts +79 -0
  168. package/dist/watchlist-for-business.esm.js +148 -0
  169. package/dist/watchlist.d.ts +62 -0
  170. package/dist/watchlist.esm.js +86 -0
  171. package/dist/watchlistServices-DMbUhkBX.esm.js +12 -0
  172. package/dist/workflow.d.ts +907 -0
  173. package/dist/workflow.esm.js +702 -0
  174. package/dist/{xstate.esm-B_rda9yU.esm.js → xstate.esm-B70JrNqo.esm.js} +144 -1
  175. package/package.json +203 -6
  176. package/dist/OpenViduLogger-BdPfiZO6.esm.js +0 -3
  177. package/dist/OpenViduLogger-CQyDxBvM.esm.js +0 -803
  178. package/dist/StateMachine-DRE1oH2B.d.ts +0 -2
  179. package/dist/addEvent-W0ORK0jT.esm.js +0 -16
  180. package/dist/endpoints-BSTFaHYo.esm.js +0 -1706
  181. package/dist/permissionServices-I6vX6DBy.esm.js +0 -72
  182. /package/dist/{Manager-BGfxEmyv.d.ts → Manager-C8PrhBOx.d.ts} +0 -0
  183. /package/dist/{chunk-C_Yo44FK.esm.js → chunk-CRF6K_H_.esm.js} +0 -0
  184. /package/dist/{types-iZi2rawo.d.ts → types-CAD4va6a.d.ts} +0 -0
@@ -0,0 +1,127 @@
1
+ import { t as api } from "./api-CESGtpbH.esm.js";
2
+ import { t as endpoints } from "./endpoints-CnN3SyDa.esm.js";
3
+ import { a as fromPromise, r as assign, t as setup } from "./xstate.esm-B70JrNqo.esm.js";
4
+
5
+ //#region src/modules/face-match/faceMatchServices.ts
6
+ /**
7
+ * Fetches cropped face images from the backend.
8
+ */
9
+ async function fetchFaceMatchImages(signal) {
10
+ const res = await api.post(endpoints.getImagesV2, { images: [
11
+ "croppedFace",
12
+ "croppedIDFace",
13
+ "croppedAuthenticationSelfie"
14
+ ] }, { signal });
15
+ if (!res.ok) throw new Error(`POST ${endpoints.getImagesV2} failed: ${res.status} ${res.statusText}`);
16
+ const data = res.data;
17
+ return {
18
+ idFace: data.croppedIDFace ?? null,
19
+ selfie: data.croppedFace ?? data.croppedAuthenticationSelfie ?? null,
20
+ secondIdFace: void 0
21
+ };
22
+ }
23
+ /**
24
+ * Fetches face recognition score from the backend.
25
+ */
26
+ async function fetchScore(signal) {
27
+ const res = await api.get(endpoints.getScore, { signal });
28
+ if (!res.ok) throw new Error(`GET ${endpoints.getScore} failed: ${res.status} ${res.statusText}`);
29
+ const data = res.data;
30
+ return {
31
+ matched: data.faceRecognition?.overall?.status === "OK" ? true : data.faceRecognition?.overall?.status === "FAIL" ? false : null,
32
+ liveness: data.deepsight ? data.deepsight.multimodalIntelligence?.overall?.status === "OK" : data.liveness?.overall?.status === "OK"
33
+ };
34
+ }
35
+ /**
36
+ * Fetches second ID face images from the backend.
37
+ */
38
+ async function fetchSecondIdImages(signal) {
39
+ const res = await api.post(endpoints.getImagesSecondId, { images: ["croppedIDFace"] }, { signal });
40
+ if (!res.ok) throw new Error(`POST ${endpoints.getImagesSecondId} failed: ${res.status} ${res.statusText}`);
41
+ return { secondIdFace: res.data.croppedIDFace ?? null };
42
+ }
43
+ /**
44
+ * Fetches all face match data in parallel (images, score, and optionally second ID images).
45
+ */
46
+ async function fetchFaceMatchData(config, signal) {
47
+ const promises = [fetchFaceMatchImages(signal), fetchScore(signal)];
48
+ if (config.matchingType === "secondId") promises.push(fetchSecondIdImages(signal));
49
+ const [imagesRes, resultRes, secondIdRes] = await Promise.all(promises);
50
+ return {
51
+ images: {
52
+ ...imagesRes,
53
+ secondIdFace: secondIdRes?.secondIdFace ?? null
54
+ },
55
+ result: resultRes
56
+ };
57
+ }
58
+
59
+ //#endregion
60
+ //#region src/modules/face-match/faceMatchStateMachine.ts
61
+ const faceMatchMachine = setup({
62
+ types: {
63
+ context: {},
64
+ events: {},
65
+ input: {}
66
+ },
67
+ actors: { fetchData: fromPromise(async ({ input, signal }) => {
68
+ return fetchFaceMatchData(input.config, signal);
69
+ }) },
70
+ actions: {
71
+ setData: assign(({ event }) => {
72
+ const output = event.output;
73
+ return {
74
+ images: output.images,
75
+ result: output.result
76
+ };
77
+ }),
78
+ setError: assign(({ event }) => ({ error: String(event.error) })),
79
+ clearError: assign({ error: () => void 0 }),
80
+ resetContext: assign(({ context }) => ({
81
+ config: context.config,
82
+ images: null,
83
+ result: null,
84
+ error: void 0
85
+ }))
86
+ },
87
+ guards: { isAnimationDisabled: ({ context }) => context.config.disableFaceMatchAnimation === true }
88
+ }).createMachine({
89
+ id: "faceMatch",
90
+ initial: "idle",
91
+ context: ({ input }) => ({
92
+ config: input.config,
93
+ images: null,
94
+ result: null,
95
+ error: void 0
96
+ }),
97
+ states: {
98
+ idle: { on: { LOAD: { target: "loading" } } },
99
+ loading: { invoke: {
100
+ id: "fetchData",
101
+ src: "fetchData",
102
+ input: ({ context }) => ({ config: context.config }),
103
+ onDone: [{
104
+ target: "finished",
105
+ guard: "isAnimationDisabled",
106
+ actions: "setData"
107
+ }, {
108
+ target: "animating",
109
+ actions: "setData"
110
+ }],
111
+ onError: {
112
+ target: "error",
113
+ actions: "setError"
114
+ }
115
+ } },
116
+ animating: { on: { ANIMATION_COMPLETE: { target: "result" } } },
117
+ result: { on: { CONTINUE: { target: "finished" } } },
118
+ finished: { type: "final" },
119
+ error: { on: { RESET: {
120
+ target: "idle",
121
+ actions: "resetContext"
122
+ } } }
123
+ }
124
+ });
125
+
126
+ //#endregion
127
+ export { faceMatchMachine as t };
@@ -0,0 +1,6 @@
1
+ import "./camera-DBSxa6ML.js";
2
+ import "./types-CFV9G_7j.js";
3
+ import "./types-BP1m8VRw.js";
4
+ import "./flowCompletionService-DhkT4SRY.js";
5
+ import { a as FlowEventListener, c as FlowModuleStartedEvent, i as FlowEvent, l as FlowReadyEvent, n as FlowCompletedEvent, o as FlowEventSubscribable, r as FlowErrorEvent, s as FlowModuleCompletedEvent, t as FlowClosedEvent, u as FlowStartedEvent } from "./index-BcRG8rtJ.js";
6
+ export { FlowClosedEvent, FlowCompletedEvent, FlowErrorEvent, FlowEvent, FlowEventListener, FlowEventSubscribable, FlowModuleCompletedEvent, FlowModuleStartedEvent, FlowReadyEvent, FlowStartedEvent };
File without changes
package/dist/flow.d.ts CHANGED
@@ -1,312 +1,30 @@
1
- import { t as WasmPipeline } from "./warmup-CEJTfxQr.js";
2
- import { t as Manager } from "./Manager-BGfxEmyv.js";
3
- import { t as AnyStateMachine } from "./StateMachine-DRE1oH2B.js";
1
+ import { n as WasmPipeline } from "./warmup-CEcppFiS.js";
2
+ import { t as Manager } from "./Manager-C8PrhBOx.js";
3
+ import { t as AnyStateMachine } from "./StateMachine-BCQrZJhf.js";
4
+ import "./camera-DBSxa6ML.js";
5
+ import "./types-CFV9G_7j.js";
6
+ import { i as FlowModuleConfig, n as Flow, r as FlowModule } from "./types-BP1m8VRw.js";
7
+ import { n as GetFinishStatusFn, t as FinishStatus } from "./flowCompletionService-DhkT4SRY.js";
8
+ import { o as FlowEventSubscribable } from "./index-BcRG8rtJ.js";
9
+ import { n as ModuleRegistry } from "./types-B06Ypu2F.js";
10
+ import * as xstate1002 from "xstate";
4
11
 
5
- //#region src/modules/flow/types.d.ts
6
- type EmptyConfig = Record<string, never>;
7
- type RegulationTypes = 'US' | 'Worldwide' | 'Other' | 'US_Illinois' | 'US_Texas' | 'US_California' | 'US_Washington';
8
- type TutorialIdConfig = {
9
- showTutorial: boolean;
10
- enableId: boolean;
11
- enablePassport: boolean;
12
- onlyFront: boolean;
13
- onlyBack: boolean;
14
- barcodeCapture: boolean;
15
- fetchAdditionalPage: boolean;
16
- secondId: boolean;
17
- thirdId: boolean;
18
- autoCaptureTimeout: number;
19
- deviceIdleTimeout: number;
20
- captureAttempts: number;
21
- manualUploadIdCapture: boolean;
22
- digitalIdsUpload: boolean;
23
- showDocumentChooserScreen: boolean;
24
- enableIdRecording: boolean;
25
- usSmartCapture: boolean;
26
- perCountryPerDocOverrides: Record<string, Record<string, {
27
- onlyFront: boolean;
28
- onlyBack: boolean;
29
- fetchAdditionalPage: boolean;
30
- }>>;
12
+ //#region src/modules/flow/flowUtils.d.ts
13
+ type NormalizeFlowModulesOptions = {
14
+ isDesktop?: boolean;
15
+ authHint?: string;
16
+ lang?: string;
17
+ useCPF?: boolean;
31
18
  };
32
- type FlowModuleConfig = {
33
- AUTHENTICATION: {
34
- showTutorial: boolean;
35
- autoCaptureTimeout: number;
36
- numberOfAttempts: number;
37
- type: 'ONE_TO_ONE';
38
- deepsightLiveness: 'SINGLE_FRAME' | 'MULTIMODAL' | 'VIDEOLIVENESS';
39
- validateClosedEyes: boolean;
40
- validateFaceMask: boolean;
41
- validateHeadCover: boolean;
42
- validateLenses: boolean;
43
- };
44
- ADDRESS: {
45
- disableSkipPoa: boolean;
46
- title: string;
47
- text: string;
48
- };
49
- AE_SIGNATURE: {
50
- uploadDocument: boolean;
51
- downloadDocument: boolean;
52
- issuePermanentCertificate: boolean;
53
- allowWithoutScoreValidation: boolean;
54
- validationsToSkip: ('ID' | 'FACE_RECOGNITION' | 'OTP' | 'TOTAL_SCORE')[];
55
- };
56
- CURP_VALIDATION: {
57
- curpDataMatch: boolean;
58
- deceasedStatusVerification: boolean;
59
- };
60
- CUSTOM_FIELDS: {
61
- title: string;
62
- customFields: {
63
- name: string;
64
- alias: string;
65
- type: 'INTEGER' | 'DOUBLE' | 'BOOLEAN' | 'STRING';
66
- }[];
67
- };
68
- DOCUMENT_CAPTURE: {
69
- processingType: 'capture' | 'processPoaOcr' | 'processLoaOcr' | 'processAsylumSeekerVisaZaf' | 'processBankStatementOCR' | 'processBankCheck' | 'processV5CLogbook' | 'processCarInvoice' | 'processCirculationCard' | 'processFinanceSettlement';
70
- title: string;
71
- text: string;
72
- allowSkipDocumentCapture: boolean;
73
- };
74
- EKYB: {
75
- checkBusinessName: boolean;
76
- businessNameSource: 'userInput';
77
- checkAddress: boolean;
78
- address: 'userInput';
79
- checkTaxId: boolean;
80
- taxIdSource: 'userInput';
81
- checkUniqueBeneficialOwner: boolean;
82
- uniqueBeneficialOwnerSource: 'userInput';
83
- };
84
- EXTERNAL_VERIFICATION: {
85
- source: 'US_DRIVERS_LICENSE_1' | 'US_TELCO_1' | 'US_TELCO_2' | 'US_CONSUMER_1' | 'US_CREDIT_BUREAU_1' | 'MX_CONSUMER_1' | 'BR_GOVT_1' | 'CA_RES_CREDIT' | 'UK_CREDIT_BUREAU_1' | 'ES_1' | 'CL_1' | 'AR_1' | 'GR_1' | 'GT_1' | 'BR_CPF_1';
86
- checkName: boolean;
87
- nameSource: 'userInput' | 'document' | 'poa' | 'phoneModuleInput' | 'emailModuleInput';
88
- checkEmail: boolean;
89
- emailSource: 'userInput' | 'document' | 'poa' | 'phoneModuleInput' | 'emailModuleInput';
90
- checkAddress: boolean;
91
- addressSource: 'userInput' | 'document' | 'poa' | 'phoneModuleInput' | 'emailModuleInput';
92
- checkPhone: boolean;
93
- phoneSource: 'userInput' | 'document' | 'poa' | 'phoneModuleInput' | 'emailModuleInput';
94
- checkSsn: boolean;
95
- ssnSource: 'userInput' | 'document' | 'poa' | 'phoneModuleInput' | 'emailModuleInput';
96
- checkDob: boolean;
97
- dobSource: 'userInput' | 'document' | 'poa' | 'phoneModuleInput' | 'emailModuleInput';
98
- checkNationality: boolean;
99
- nationalitySource: 'userInput' | 'document' | 'poa' | 'phoneModuleInput' | 'emailModuleInput';
100
- checkDlNumber: boolean;
101
- dlNumberSource: 'userInput' | 'document' | 'poa' | 'phoneModuleInput' | 'emailModuleInput';
102
- checkDlState: boolean;
103
- dlStateSource: 'userInput' | 'document' | 'poa' | 'phoneModuleInput' | 'emailModuleInput';
104
- checkDlExpireAt: boolean;
105
- dlExpireAtSource: 'userInput' | 'document' | 'poa' | 'phoneModuleInput' | 'emailModuleInput';
106
- checkLast4SSN: boolean;
107
- last4SSNSource: 'userInput' | 'document' | 'poa' | 'phoneModuleInput' | 'emailModuleInput';
108
- checkIdNum: boolean;
109
- idNumSource: 'userInput' | 'document' | 'poa' | 'phoneModuleInput' | 'emailModuleInput';
110
- checkIdNum1: boolean;
111
- idNum1Source: 'userInput' | 'document' | 'poa' | 'phoneModuleInput' | 'emailModuleInput';
112
- checkGender: boolean;
113
- genderSource: 'userInput' | 'document' | 'poa' | 'phoneModuleInput' | 'emailModuleInput';
114
- };
115
- EMAIL: {
116
- otpVerification: boolean;
117
- otpExpirationInMinutes: number;
118
- prefill?: boolean;
119
- };
120
- FACE_MATCH: {
121
- matchingType: 'selfieVsId' | 'selfieVsNfc' | 'idVsNfc' | 'nfc3Way';
122
- disableFaceMatchAnimation: boolean;
123
- };
124
- FINISH_GPT: {
125
- finishgptCompanyName: string;
126
- };
127
- GEOLOCATION: {
128
- allowUserToSkipGeolocation: boolean;
129
- };
130
- INE_VALIDATION: {
131
- facialValidation: boolean;
132
- alternativeFacialValidation: boolean;
133
- fallbackEnabled: boolean;
134
- scrapingMethod: boolean;
135
- scrapingV2: boolean;
136
- scrapingV3: boolean;
137
- failUnsupportedId: boolean;
138
- dataValidation: boolean;
139
- backgroundExecution: boolean;
140
- mockConnectionError: boolean;
141
- mockUserNotFoundError: boolean;
142
- mockOK: boolean;
143
- };
144
- GOVT_VALIDATION_PROVISIONING: {
145
- validationCountries: string[];
146
- facialValidation: boolean;
147
- dataValidation: boolean;
148
- faceAndDataValidation: boolean;
149
- addressValidation: boolean;
150
- backgroundExecution: boolean;
151
- faceMatchOverrideDataScore: boolean;
152
- useCroppedIdFacePhoto: boolean;
153
- };
154
- TUTORIAL_ID: TutorialIdConfig;
155
- ID: TutorialIdConfig;
156
- SECOND_ID: TutorialIdConfig;
157
- THIRD_ID: TutorialIdConfig;
158
- ID_OCR: {
159
- editableOcr: boolean;
160
- };
161
- INCODE_WATCHLIST: {
162
- failIfFaceOnBlocklist: boolean;
163
- addSuspectedFraudAutomatically: boolean;
164
- autoExecution: boolean;
165
- };
166
- INSTANT_BAV: {
167
- bavVendorCountry: 'US' | 'CA' | 'AU' | 'NZ' | 'BR' | 'MX' | 'CO' | 'UK' | 'EU';
168
- bavNumberOfRetries: number;
169
- };
170
- ML_CONSENT: {
171
- consentType: RegulationTypes;
172
- };
173
- NFC_SCAN: {
174
- nfcAvailability: boolean;
175
- nfcValidation: boolean;
176
- showInitialDataConfirmationScreen: boolean;
177
- };
178
- PHONE: {
179
- otpVerification: boolean;
180
- otpExpirationInMinutes: number;
181
- prefill: boolean;
182
- };
183
- SELFIE: {
184
- showTutorial: boolean;
185
- showPreview: boolean;
186
- assistedOnboarding: boolean;
187
- enableFaceRecording: boolean;
188
- autoCaptureTimeout: number;
189
- captureAttempts: number;
190
- validateLenses: boolean;
191
- validateFaceMask: boolean;
192
- validateHeadCover: boolean;
193
- validateClosedEyes: boolean;
194
- validateBrightness: boolean;
195
- deepsightLiveness: 'SINGLE_FRAME' | 'MULTIMODAL' | 'VIDEOLIVENESS';
196
- };
197
- SIGNATURE: {
198
- title: string;
199
- subTitle: string;
200
- };
201
- USER_CONSENT: {
202
- title: string;
203
- text: string;
204
- };
205
- CONFERENCE: {
206
- enableConferenceOtp: boolean;
207
- };
208
- VIDEO_ONBOARDING: {
209
- useAsSelfie: boolean;
210
- showTutorials: boolean;
211
- companyName: string;
212
- checkLiveness: boolean;
213
- checkIdScan: boolean;
214
- checkDocumentScan: boolean;
215
- compareIdEnabled: boolean;
216
- compareOcrEnabled: boolean;
217
- compareBackIdEnabled: boolean;
218
- compareBackOcrEnabled: boolean;
219
- checkVoiceConsent: boolean;
220
- voiceConsentQuestions: number;
221
- selfieQualityAffectsScore: boolean;
222
- maxWaitingVideoSelfieFile: number;
223
- lastSecondsVideoQualityCheck: boolean;
224
- lastSecondsVideoQualityCheckDuration: number;
225
- validateClosedEyes: boolean;
226
- validateFaceMask: boolean;
227
- validateHeadCover: boolean;
228
- validateLenses: boolean;
229
- };
230
- DYNAMIC_FORMS: {
231
- screens: {
232
- title: string;
233
- hideTitle: boolean;
234
- questions: {
235
- questionId: string;
236
- overrides: string | null;
237
- isPredefined: boolean;
238
- predefinedQuestionType: string | null;
239
- question: string;
240
- inputType: 'NUMBER' | 'CPF' | 'COUNTRY' | 'NATIONALITY' | 'DATE' | 'PHONE' | 'EMAIL' | 'TEXT' | 'MULTISELECT' | 'YESNO' | 'SELECT';
241
- options: string[];
242
- }[];
243
- }[];
244
- };
245
- COMBINED_CONSENT: {
246
- combinedConsents: string;
247
- };
248
- QE_SIGNATURE: {
249
- uploadDocument: boolean;
250
- downloadDocument: boolean;
251
- };
252
- CERTIFICATE_ISSUANCE: {
253
- region: string;
254
- type: 'ONE_TIME' | 'SHORT_TERM' | 'LONG_TERM';
255
- };
256
- ANTIFRAUD: EmptyConfig;
257
- CHECKBOX_SIGNATURE: EmptyConfig;
258
- CROSS_DOCUMENT_DATA_MATCH: EmptyConfig;
259
- DEVICE_FINGERPRINT: EmptyConfig;
260
- FACE_ONBOARDING: EmptyConfig;
261
- FIELD_COMPARISON: EmptyConfig;
262
- FISCAL_QR: EmptyConfig;
263
- GENERATE_QR: EmptyConfig;
264
- INSTANT_VERIFY: EmptyConfig;
265
- IP_ADDRESS: EmptyConfig;
266
- NAME_CAPTURE: EmptyConfig;
267
- SHOW_RESULTS: EmptyConfig;
268
- STADIUM_SELECTOR: EmptyConfig;
269
- UNIVERSAL_IDENTITY: EmptyConfig;
270
- WATCHLIST: EmptyConfig;
271
- TRUST_GRAPH: EmptyConfig;
272
- WATCHLIST_BUSINESS: EmptyConfig;
273
- };
274
- type FlowModule = { [K in keyof FlowModuleConfig]: {
275
- key: K;
276
- configuration: FlowModuleConfig[K];
277
- } }[keyof FlowModuleConfig];
278
- type Flow = {
279
- flowId: string;
280
- name: string;
281
- autoApproveEnabled?: boolean;
282
- autoApproveLevel?: 'LOW' | 'MEDIUM' | 'HIGH';
283
- checkTutorials?: boolean;
284
- checkAuthorization?: boolean;
285
- redirectDesktopToMobile?: boolean;
286
- disableUnsupportedBrowserScreen?: boolean;
287
- qrPhishingResistance?: boolean;
288
- addContinueToDesktop?: boolean;
289
- redirectOriginOnly?: boolean;
290
- displayOnboardingResultOnDesktop?: boolean;
291
- enableMultipleOnboardings?: boolean;
292
- disableLaunchScreen?: boolean;
293
- enableSardineRisk?: boolean;
294
- mandatoryConsentCheck?: boolean;
295
- disableSmsOption?: boolean;
296
- mergeSessionRecordings?: boolean;
297
- ageAssurance?: boolean;
298
- flowModules: FlowModule[];
299
- enforceCaptureAttemptLimits?: boolean;
300
- enableFraudAi?: boolean;
301
- getEnableIdOnlyIdentity?: boolean;
302
- ds?: boolean;
303
- };
304
- //#endregion
305
- //#region src/modules/flow/flowAnalyzer.d.ts
19
+ type FlowForNormalization = Pick<Flow, 'flowId' | 'flowModules' | 'redirectDesktopToMobile' | 'disableSmsOption' | 'addContinueToDesktop' | 'qrPhishingResistance'>;
306
20
  /**
307
21
  * Analyzes a flow configuration and returns the WASM pipelines needed.
308
22
  * Use this to conditionally warmup WASM only when required by the flow.
309
23
  *
24
+ * Modules with `onDeviceFaceResultsSubmissionEnabled: true` (currently SELFIE
25
+ * and AUTHENTICATION) select the 6-model `'onDeviceSelfie'` bundle instead of
26
+ * the default 4-model `'selfie'` bundle.
27
+ *
310
28
  * @param flow - The flow configuration from /omni/onboarding/flow
311
29
  * @returns Array of WASM pipelines needed (e.g., ['selfie', 'idCapture'])
312
30
  *
@@ -319,17 +37,37 @@ type Flow = {
319
37
  * ```
320
38
  */
321
39
  declare function getRequiredWasmPipelines(flow: Flow): WasmPipeline[];
40
+ /**
41
+ * Normalizes flow modules by expanding TUTORIAL_ID into ID + SECOND_ID
42
+ * based on configuration flags. Matches legacy flowService behavior.
43
+ *
44
+ * - TUTORIAL_ID becomes ID (with same config)
45
+ * - If secondId: true, adds SECOND_ID module with isSecondId: true
46
+ * - thirdId is deprecated and ignored; the flow continues to the next step
47
+ * - Bare ID following TUTORIAL_ID is dropped (already merged)
48
+ */
49
+ declare function normalizeFlowModules(flow: FlowForNormalization, options?: NormalizeFlowModulesOptions): FlowModule[];
322
50
  //#endregion
323
- //#region src/modules/flow/flowCompletionService.d.ts
324
- type FinishStatus = {
325
- redirectionUrl: string;
326
- action: 'approved' | 'rejected' | 'none';
327
- scoreStatus: 'OK' | 'WARN' | 'MANUAL_OK' | 'FAIL' | 'UNKNOWN' | 'MANUAL_FAIL';
51
+ //#region src/modules/flow/flowServices.d.ts
52
+ type GetFlowOptions = {
53
+ isDesktop?: boolean;
54
+ authHint?: string;
55
+ lang?: string;
56
+ useCPF?: boolean;
328
57
  };
329
- type GetFinishStatusFn = (flowId: string | undefined | null, signal?: AbortSignal) => Promise<FinishStatus>;
58
+ type GetFlow = (signal: AbortSignal, options?: GetFlowOptions) => Promise<Flow>;
59
+ declare const getFlow: GetFlow;
330
60
  //#endregion
331
- //#region src/modules/flow/flowServices.d.ts
332
- type GetFlow = (signal: AbortSignal) => Promise<Flow>;
61
+ //#region src/modules/flow/noOpFlowModuleMachine.d.ts
62
+ declare const noOpFlowModuleMachine: xstate1002.StateMachine<xstate1002.MachineContext, xstate1002.AnyEventObject, {}, never, never, never, never, "finished", string, xstate1002.NonReducibleUnknown, xstate1002.NonReducibleUnknown, xstate1002.EventObject, xstate1002.MetaObject, {
63
+ readonly id: "noOpFlowModule";
64
+ readonly initial: "finished";
65
+ readonly states: {
66
+ readonly finished: {
67
+ readonly type: "final";
68
+ };
69
+ };
70
+ }>;
333
71
  //#endregion
334
72
  //#region src/modules/flow/flowActor.d.ts
335
73
  type CreateFlowActorOptions = {
@@ -451,7 +189,7 @@ declare function createFlowManager(options?: CreateFlowActorOptions): Manager<Fl
451
189
  * @returns `true` if the module exists in the flow, `false` otherwise or if not in `ready` state
452
190
  */
453
191
  isModuleEnabled: (moduleKey: string) => boolean;
454
- };
192
+ } & FlowEventSubscribable;
455
193
  //#endregion
456
194
  //#region src/modules/flow/moduleLoader.d.ts
457
195
  type LazyModule<T$1> = () => Promise<T$1>;
@@ -469,16 +207,17 @@ declare function createModuleLoader(registry: ModuleLoaderRegistry): ModuleLoade
469
207
  //#endregion
470
208
  //#region src/modules/flow/orchestratedFlowStateMachine.d.ts
471
209
  type GetFlowFn = (signal: AbortSignal) => Promise<Flow>;
472
- type ModuleRegistry = {
473
- PHONE?: AnyStateMachine;
474
- EMAIL?: AnyStateMachine;
475
- SELFIE?: AnyStateMachine;
476
- [key: string]: AnyStateMachine | undefined;
210
+ type LazyModuleRegistry = {
211
+ [key: string]: (() => Promise<AnyStateMachine | {
212
+ default: AnyStateMachine;
213
+ }>) | undefined;
477
214
  };
478
215
  type OrchestratedFlowInput = {
479
216
  getFlow: GetFlowFn;
480
- modules: ModuleRegistry;
217
+ modules?: ModuleRegistry;
218
+ lazyModules?: LazyModuleRegistry;
481
219
  getFinishStatus?: GetFinishStatusFn;
220
+ enableHome?: boolean;
482
221
  };
483
222
  type OrchestratedFlowEvent = {
484
223
  type: 'LOAD';
@@ -488,6 +227,10 @@ type OrchestratedFlowEvent = {
488
227
  type: 'RESET';
489
228
  } | {
490
229
  type: 'MODULE_COMPLETE';
230
+ } | {
231
+ type: 'COMPLETE_FLOW';
232
+ } | {
233
+ type: 'HOME_CONTINUE';
491
234
  } | {
492
235
  type: '*';
493
236
  [key: string]: unknown;
@@ -497,11 +240,24 @@ type OrchestratedFlowEvent = {
497
240
  };
498
241
  //#endregion
499
242
  //#region src/modules/flow/orchestratedFlowManager.d.ts
243
+ type OrchestratedFlowHomeScreen = {
244
+ visible: boolean;
245
+ isContinueLoading: boolean;
246
+ };
247
+ type OrchestratedFlowPresentation = {
248
+ isAwaitingReady: boolean;
249
+ lazyModuleKey: string | undefined;
250
+ shouldPrefetchHome: boolean;
251
+ };
500
252
  type OrchestratedFlowIdleState = {
501
253
  status: 'idle';
254
+ homeScreen: OrchestratedFlowHomeScreen;
255
+ presentation: OrchestratedFlowPresentation;
502
256
  };
503
257
  type OrchestratedFlowLoadingState = {
504
258
  status: 'loading';
259
+ homeScreen: OrchestratedFlowHomeScreen;
260
+ presentation: OrchestratedFlowPresentation;
505
261
  };
506
262
  type OrchestratedFlowReadyState = {
507
263
  status: 'ready';
@@ -511,6 +267,8 @@ type OrchestratedFlowReadyState = {
511
267
  currentStep: string | undefined;
512
268
  config: unknown;
513
269
  moduleState: unknown;
270
+ homeScreen: OrchestratedFlowHomeScreen;
271
+ presentation: OrchestratedFlowPresentation;
514
272
  };
515
273
  type OrchestratedFlowFinishedState = {
516
274
  status: 'finished';
@@ -520,16 +278,23 @@ type OrchestratedFlowFinishedState = {
520
278
  action: 'approved' | 'rejected' | 'none';
521
279
  scoreStatus: 'OK' | 'WARN' | 'MANUAL_OK' | 'FAIL' | 'UNKNOWN' | 'MANUAL_FAIL';
522
280
  };
281
+ homeScreen: OrchestratedFlowHomeScreen;
282
+ presentation: OrchestratedFlowPresentation;
523
283
  };
524
284
  type OrchestratedFlowErrorState = {
525
285
  status: 'error';
526
286
  error: string;
287
+ errorCode?: number;
288
+ homeScreen: OrchestratedFlowHomeScreen;
289
+ presentation: OrchestratedFlowPresentation;
527
290
  };
528
291
  type OrchestratedFlowState = OrchestratedFlowIdleState | OrchestratedFlowLoadingState | OrchestratedFlowReadyState | OrchestratedFlowFinishedState | OrchestratedFlowErrorState;
529
292
  type CreateOrchestratedFlowActorOptions = {
530
293
  getFlow?: GetFlowFn;
531
- modules: ModuleRegistry;
294
+ modules?: ModuleRegistry;
295
+ lazyModules?: LazyModuleRegistry;
532
296
  getFinishStatus?: OrchestratedFlowInput['getFinishStatus'];
297
+ enableHome?: boolean;
533
298
  };
534
299
  declare function createOrchestratedFlowManager(options: CreateOrchestratedFlowActorOptions): Manager<OrchestratedFlowState> & {
535
300
  /**
@@ -557,6 +322,11 @@ declare function createOrchestratedFlowManager(options: CreateOrchestratedFlowAc
557
322
  * ```
558
323
  */
559
324
  completeModule(): void;
325
+ /**
326
+ * Skip all remaining modules and go straight to the completion step.
327
+ * Used when the flow was completed externally (e.g. via redirect to mobile).
328
+ */
329
+ completeFlow(): void;
560
330
  /**
561
331
  * Signal that the current module encountered an error.
562
332
  * Call this from your UI component's `onError` callback if you want
@@ -573,6 +343,16 @@ declare function createOrchestratedFlowManager(options: CreateOrchestratedFlowAc
573
343
  readonly canNext: boolean;
574
344
  getModuleConfig: <T$1 = unknown>(moduleKey: string) => T$1 | undefined;
575
345
  isModuleEnabled: (moduleKey: string) => boolean;
576
- };
346
+ isAwaitingOrchestratorReady(): boolean;
347
+ /**
348
+ * Resolve once the orchestrator has finished loading the flow and the first
349
+ * module is ready to render. Useful for gating an initialization spinner
350
+ * alongside other parallel async work (e.g. theme fetching).
351
+ */
352
+ waitForReady(): Promise<void>;
353
+ getLazyModuleKey(): string | undefined;
354
+ shouldRenderHomeScreen(): boolean;
355
+ continueFromHome(): Promise<void>;
356
+ } & FlowEventSubscribable;
577
357
  //#endregion
578
- export { type FinishStatus, type Flow, type FlowModule, type FlowModuleConfig, type FlowReadyState, type FlowState, type LazyModule, type ModuleLoader, type ModuleLoaderRegistry, type ModuleRegistry, type OrchestratedFlowFinishedState, type OrchestratedFlowInput, type OrchestratedFlowReadyState, type OrchestratedFlowState, createFlowManager, createModuleLoader, createOrchestratedFlowManager, getRequiredWasmPipelines };
358
+ export { type FinishStatus, type Flow, type FlowModule, type FlowModuleConfig, type FlowReadyState, type FlowState, type LazyModule, type LazyModuleRegistry, type ModuleLoader, type ModuleLoaderRegistry, type ModuleRegistry, type OrchestratedFlowFinishedState, type OrchestratedFlowHomeScreen, type OrchestratedFlowInput, type OrchestratedFlowPresentation, type OrchestratedFlowReadyState, type OrchestratedFlowState, createFlowManager, createModuleLoader, createOrchestratedFlowManager, getFlow, getRequiredWasmPipelines, noOpFlowModuleMachine, normalizeFlowModules };