@incodetech/core 0.0.0-dev-20260723-e73d5099 → 0.0.0-dev-20260723-397b76d8

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 (89) hide show
  1. package/dist/ae-signature.d.ts +2 -1
  2. package/dist/ae-signature.esm.js +1 -1
  3. package/dist/authentication.d.ts +3 -2
  4. package/dist/authentication.esm.js +2 -2
  5. package/dist/{authenticationManager-BCm7eGoK.d.ts → authenticationManager-Ce1nLm5y.d.ts} +1 -1
  6. package/dist/{authenticationManager-Cmio9w7i.esm.js → authenticationManager-DW449fW3.esm.js} +2 -2
  7. package/dist/{authenticationStateMachine-CrkXvIhE.esm.js → authenticationStateMachine-CrvxMmoJ.esm.js} +2 -2
  8. package/dist/consent.d.ts +1 -1
  9. package/dist/{consentManager-3Pbtj-RV.d.ts → consentManager-uhDPdU6i.d.ts} +4 -4
  10. package/dist/{deepsightLoader-Be2xONxN.esm.js → deepsightLoader-BCxEZjuI.esm.js} +1 -1
  11. package/dist/document-capture.d.ts +2 -1
  12. package/dist/document-upload.d.ts +4 -4
  13. package/dist/{documentCaptureManager-CBP2DkPr.d.ts → documentCaptureManager-pEqMY_Oo.d.ts} +2 -104
  14. package/dist/dynamic-forms.d.ts +2 -1
  15. package/dist/dynamic-forms.esm.js +2 -2
  16. package/dist/{dynamicFormsManager-Dposae2l.d.ts → dynamicFormsManager-BYac2uEY.d.ts} +2 -48
  17. package/dist/{dynamicFormsManager-Fi2O2RUM.esm.js → dynamicFormsManager-DI0sCyVB.esm.js} +1 -1
  18. package/dist/ekyb.d.ts +2 -1
  19. package/dist/ekyb.esm.js +3 -2
  20. package/dist/{ekybManager-CObZ7foB.esm.js → ekybManager-D46NN7cx.esm.js} +1 -1
  21. package/dist/{ekybManager-CBX0tM04.d.ts → ekybManager-Dzswb_b8.d.ts} +3 -48
  22. package/dist/{ekybStateMachine-Cw4pz_hf.esm.js → ekybStateMachine-DX7KeqlM.esm.js} +2 -170
  23. package/dist/ekyc.esm.js +3 -2
  24. package/dist/{ekycManager-CI7sN4Ln.esm.js → ekycManager-DRrG5I6e.esm.js} +1 -1
  25. package/dist/{ekycStateMachine-DFQdmBXl.esm.js → ekycStateMachine-DRbbavZy.esm.js} +2 -223
  26. package/dist/ekycUtils-Dew1rBG0.esm.js +223 -0
  27. package/dist/electronic-signature.d.ts +2 -1
  28. package/dist/electronic-signature.esm.js +1 -1
  29. package/dist/extensibility.d.ts +12 -11
  30. package/dist/extensibility.esm.js +9 -9
  31. package/dist/{faceCaptureManagerFactory-DPf1rRsd.d.ts → faceCaptureManagerFactory-BUE6z9iY.d.ts} +2 -4
  32. package/dist/{faceCaptureManagerFactory-CeUzH_6U.esm.js → faceCaptureManagerFactory-BcntOvvC.esm.js} +1 -1
  33. package/dist/{faceCaptureSetup-CtiVwaPe.esm.js → faceCaptureSetup-BUAw6zY_.esm.js} +2 -2
  34. package/dist/flow.d.ts +44 -1
  35. package/dist/flow.esm.js +4 -11
  36. package/dist/flowServices-BU1mMxoQ.esm.js +596 -0
  37. package/dist/geolocation.esm.js +2 -2
  38. package/dist/{geolocationManager-bZDyI0gy.esm.js → geolocationManager-zeqAcVHC.esm.js} +1 -1
  39. package/dist/id-ocr.d.ts +2 -1
  40. package/dist/id.d.ts +2 -1
  41. package/dist/id.esm.js +2 -2
  42. package/dist/{idCaptureManager-Dqn6U25Q.esm.js → idCaptureManager-BqmmPXFm.esm.js} +3 -4
  43. package/dist/idCaptureManager-CtsYvX-Z.d.ts +405 -0
  44. package/dist/{idCaptureStateMachine-B7atraNp.esm.js → idCaptureStateMachine-CnKkMNrI.esm.js} +8 -50
  45. package/dist/{idOcrManager-B-JyjyPb.d.ts → idOcrManager-DlYG277_.d.ts} +2 -163
  46. package/dist/{index-CKbmDFNq.d.ts → index-DGcdhk8Y.d.ts} +2 -64
  47. package/dist/index.d.ts +1 -1
  48. package/dist/index.esm.js +1 -1
  49. package/dist/mandatory-consent.d.ts +2 -1
  50. package/dist/{mandatoryConsentManager-Bc9AKBft.d.ts → mandatoryConsentManager-Ck2e2W4o.d.ts} +6 -25
  51. package/dist/{onDeviceFaceResults-CbO3AqMC.esm.js → onDeviceFaceResults-CWMT6JTR.esm.js} +1 -1
  52. package/dist/personhood.esm.js +2 -2
  53. package/dist/qe-signature.d.ts +2 -1
  54. package/dist/qe-signature.esm.js +1 -1
  55. package/dist/{recordingService-YhyXG0Ch.esm.js → recordingService-CfT3nmFO.esm.js} +1 -1
  56. package/dist/redirect-to-mobile.d.ts +2 -1
  57. package/dist/{redirectToMobileManager-NVQM3o5P.d.ts → redirectToMobileManager-DZlJhqvq.d.ts} +2 -40
  58. package/dist/selfie.d.ts +2 -2
  59. package/dist/selfie.esm.js +4 -4
  60. package/dist/{selfieManager-CgmJu62N.esm.js → selfieManager-D-QJUh3X.esm.js} +2 -2
  61. package/dist/{selfieManager-Dq9wNlcg.d.ts → selfieManager-LabfZln4.d.ts} +1 -1
  62. package/dist/{selfieStateMachine-C_piZ4gb.esm.js → selfieStateMachine-BH-U-y6R.esm.js} +2 -2
  63. package/dist/session-BU4MkUEc.esm.js +1 -0
  64. package/dist/session.d.ts +2 -0
  65. package/dist/session.esm.js +2 -2
  66. package/dist/{sessionInitializer-B5tU3IQv.esm.js → sessionInitializer-DT7IYwRx.esm.js} +58 -11
  67. package/dist/{setup-BBfVpTog.d.ts → setup-B1WTXTQV.d.ts} +15 -0
  68. package/dist/{setup-Cx9IY17e.esm.js → setup-DXdKnXXf.esm.js} +21 -7
  69. package/dist/types-B4BObr_7.d.ts +105 -0
  70. package/dist/types-BAvkiv6L.d.ts +6 -0
  71. package/dist/types-BQgIv5p8.d.ts +21 -0
  72. package/dist/types-BfHiko5D.d.ts +48 -0
  73. package/dist/types-CBJI9n6h.d.ts +163 -0
  74. package/dist/{idCaptureManager-DTe_5dcI.d.ts → types-D0ohdBDu.d.ts} +2 -407
  75. package/dist/types-DPIDuhut2.d.ts +40 -0
  76. package/dist/types-DWaEoU0I.d.ts +64 -0
  77. package/dist/types-xIEGXWk8.d.ts +48 -0
  78. package/dist/video-selfie.esm.js +3 -3
  79. package/dist/wasm.d.ts +1 -1
  80. package/dist/wasm.esm.js +1 -1
  81. package/dist/workflow.d.ts +4 -4
  82. package/dist/workflow.esm.js +16 -11
  83. package/package.json +1 -1
  84. package/dist/flowServices-Caz-Bdol.esm.js +0 -209
  85. package/dist/session-CoL4WBRi.esm.js +0 -1
  86. package/dist/videoSelfieSteps-DHcibfYH.esm.js +0 -57
  87. package/dist/{dynamicFormsStateMachine-DiPpuHgF.esm.js → dynamicFormsStateMachine-BQqAwNQ-.esm.js} +1 -1
  88. package/dist/{electronicSignatureManager-DGFwHdro.esm.js → electronicSignatureManager-BXIpAJ5m.esm.js} +1 -1
  89. package/dist/{geolocationStateMachine-ByU6-nbM.esm.js → geolocationStateMachine-DxSETS9_.esm.js} +1 -1
@@ -1,5 +1,6 @@
1
1
  import { t as Manager } from "./Manager-CQQ99QOI.js";
2
- import { a as AE_CONSENT_KEYS, c as ConsentKey, g as getDefaultConsentChecks, i as electronicSignatureMachine, l as ElectronicSignatureConfig, m as areAllConsented, n as ElectronicSignatureState, s as ConsentChecks, u as ElectronicSignatureDocument } from "./index-CKbmDFNq.js";
2
+ import { a as ElectronicSignatureConfig, g as getDefaultConsentChecks, i as ConsentKey, m as areAllConsented, r as ConsentChecks, s as ElectronicSignatureDocument, t as AE_CONSENT_KEYS } from "./types-DWaEoU0I.js";
3
+ import { i as electronicSignatureMachine, n as ElectronicSignatureState } from "./index-DGcdhk8Y.js";
3
4
  //#region src/modules/ae-signature/index.d.ts
4
5
  type AeSignatureConfig = Omit<ElectronicSignatureConfig, 'variant'>;
5
6
  declare function createAeSignatureManager(options: {
@@ -1,4 +1,4 @@
1
- import { a as areAllConsented, n as electronicSignatureMachine, r as AE_CONSENT_KEYS, s as getDefaultConsentChecks, t as createElectronicSignatureManager } from "./electronicSignatureManager-DGFwHdro.esm.js";
1
+ import { a as areAllConsented, n as electronicSignatureMachine, r as AE_CONSENT_KEYS, s as getDefaultConsentChecks, t as createElectronicSignatureManager } from "./electronicSignatureManager-BXIpAJ5m.esm.js";
2
2
  //#region src/modules/ae-signature/index.ts
3
3
  function createAeSignatureManager(options) {
4
4
  return createElectronicSignatureManager({ config: {
@@ -1,3 +1,4 @@
1
- import { S as authenticationMachine, b as createAuthenticationActor, v as AuthenticationActor, x as AuthenticationConfig, y as CreateAuthenticationActorOptions } from "./faceCaptureManagerFactory-DPf1rRsd.js";
2
- import { n as AuthenticationState, r as createAuthenticationManager, t as AuthenticationManager } from "./authenticationManager-BCm7eGoK.js";
1
+ import { b as createAuthenticationActor, v as AuthenticationActor, x as authenticationMachine, y as CreateAuthenticationActorOptions } from "./faceCaptureManagerFactory-BUE6z9iY.js";
2
+ import { t as AuthenticationConfig } from "./types-BAvkiv6L.js";
3
+ import { n as AuthenticationState, r as createAuthenticationManager, t as AuthenticationManager } from "./authenticationManager-Ce1nLm5y.js";
3
4
  export { type AuthenticationActor, type AuthenticationConfig, type AuthenticationManager, type AuthenticationState, type CreateAuthenticationActorOptions, authenticationMachine, createAuthenticationActor, createAuthenticationManager };
@@ -1,3 +1,3 @@
1
- import { t as authenticationMachine } from "./authenticationStateMachine-CrkXvIhE.esm.js";
2
- import { r as createAuthenticationActor, t as createAuthenticationManager } from "./authenticationManager-Cmio9w7i.esm.js";
1
+ import { t as authenticationMachine } from "./authenticationStateMachine-CrvxMmoJ.esm.js";
2
+ import { r as createAuthenticationActor, t as createAuthenticationManager } from "./authenticationManager-DW449fW3.esm.js";
3
3
  export { authenticationMachine, createAuthenticationActor, createAuthenticationManager };
@@ -1,6 +1,6 @@
1
1
  import { t as Manager } from "./Manager-CQQ99QOI.js";
2
2
  import { t as IVisibilityObserverCapability } from "./IVisibilityObserverCapability-D4tvIB5v.js";
3
- import { n as FaceCaptureManagerState, t as FaceCaptureManager, v as AuthenticationActor, y as CreateAuthenticationActorOptions } from "./faceCaptureManagerFactory-DPf1rRsd.js";
3
+ import { n as FaceCaptureManagerState, t as FaceCaptureManager, v as AuthenticationActor, y as CreateAuthenticationActorOptions } from "./faceCaptureManagerFactory-BUE6z9iY.js";
4
4
  //#region src/modules/authentication/authenticationManager.d.ts
5
5
  type AuthenticationState = FaceCaptureManagerState;
6
6
  /**
@@ -1,9 +1,9 @@
1
1
  import { t as WasmUtilProvider } from "./WasmUtilProvider-BrWOTaVG.esm.js";
2
2
  import { n as eventModuleNames } from "./events-Dy8PyVO5.esm.js";
3
3
  import { o as createActor } from "./xstate.esm-Cf4e0Cfd.esm.js";
4
- import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-CeUzH_6U.esm.js";
4
+ import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-BcntOvvC.esm.js";
5
5
  import { t as BrowserStorageProvider } from "./BrowserStorageProvider-P6aUarE9.esm.js";
6
- import { t as authenticationMachine } from "./authenticationStateMachine-CrkXvIhE.esm.js";
6
+ import { t as authenticationMachine } from "./authenticationStateMachine-CrvxMmoJ.esm.js";
7
7
  //#region src/modules/authentication/authenticationActor.ts
8
8
  function createAuthenticationActor(options) {
9
9
  const dependencies = options.dependencies ?? {
@@ -3,8 +3,8 @@ import { t as endpoints } from "./endpoints-CfRg7iAr.esm.js";
3
3
  import { t as addDeviceStats } from "./stats-4DAk7TYl.esm.js";
4
4
  import { r as assign } from "./xstate.esm-Cf4e0Cfd.esm.js";
5
5
  import { n as fromPromise } from "./xstate-actors.esm-CtI5S0f4.esm.js";
6
- import { t as faceCaptureMachine } from "./faceCaptureSetup-CtiVwaPe.esm.js";
7
- import { i as prepareOnDeviceFaceUpload, n as isOnDeviceMode, r as postOnDeviceFaceResults, t as defaultPrepareFaceUpload } from "./onDeviceFaceResults-CbO3AqMC.esm.js";
6
+ import { t as faceCaptureMachine } from "./faceCaptureSetup-BUAw6zY_.esm.js";
7
+ import { i as prepareOnDeviceFaceUpload, n as isOnDeviceMode, r as postOnDeviceFaceResults, t as defaultPrepareFaceUpload } from "./onDeviceFaceResults-CWMT6JTR.esm.js";
8
8
  import { t as getDeviceClass } from "./getDeviceClass-BGmoQmjj.esm.js";
9
9
  import { t as FACE_ERROR_CODES } from "./types-BN5RPPIZ.esm.js";
10
10
  //#region src/modules/authentication/authenticationErrorUtils.ts
package/dist/consent.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { a as ConsentActor, c as ConsentConfig, i as createConsentManagerFromActor, n as ConsentState, o as consentMachine, r as createConsentManager, s as ConsentCheckbox, t as ConsentManager } from "./consentManager-3Pbtj-RV.js";
1
+ import { a as ConsentActor, c as ConsentConfig, i as createConsentManagerFromActor, n as ConsentState, o as consentMachine, r as createConsentManager, s as ConsentCheckbox, t as ConsentManager } from "./consentManager-uhDPdU6i.js";
2
2
  export { type ConsentActor, type ConsentCheckbox, type ConsentConfig, type ConsentManager, type ConsentState, consentMachine, createConsentManager, createConsentManagerFromActor };
@@ -82,6 +82,10 @@ declare const consentMachine: StateMachine<ConsentContext, {
82
82
  type: "clearError";
83
83
  params: NonReducibleUnknown;
84
84
  };
85
+ resetContext: {
86
+ type: "resetContext";
87
+ params: NonReducibleUnknown;
88
+ };
85
89
  setConsentData: {
86
90
  type: "setConsentData";
87
91
  params: NonReducibleUnknown;
@@ -90,10 +94,6 @@ declare const consentMachine: StateMachine<ConsentContext, {
90
94
  type: "toggleCheckbox";
91
95
  params: NonReducibleUnknown;
92
96
  };
93
- resetContext: {
94
- type: "resetContext";
95
- params: NonReducibleUnknown;
96
- };
97
97
  }>, {
98
98
  type: "canSubmit";
99
99
  params: unknown;
@@ -1,7 +1,7 @@
1
1
  import { t as WasmUtilProvider } from "./WasmUtilProvider-BrWOTaVG.esm.js";
2
2
  import { t as api } from "./api-BDTZNnca.esm.js";
3
3
  import { t as addDeviceStats } from "./stats-4DAk7TYl.esm.js";
4
- import { c as isBrowserSimulation, d as getThumbmarkId, l as IpifyProvider, n as getFingerprintEnabled, p as BrowserEnvironmentProvider, t as getDisableIpify } from "./sessionInitializer-B5tU3IQv.esm.js";
4
+ import { g as getThumbmarkId, m as IpifyProvider, n as getFingerprintEnabled, p as isBrowserSimulation, t as getDisableIpify, v as BrowserEnvironmentProvider } from "./sessionInitializer-DT7IYwRx.esm.js";
5
5
  import { t as getParsedUserAgent } from "./getParsedUserAgent-pJjATANs.esm.js";
6
6
  import { t as getUserAgent } from "./getBrowser-Cb8Zgrgp.esm.js";
7
7
  import { t as MotionSensorProvider } from "./MotionSensorProvider-DYvM90IX.esm.js";
@@ -1,2 +1,3 @@
1
- import { a as DocumentCaptureActor, c as DocumentCaptureConfig, d as DocumentType, i as createDocumentCaptureManagerFromActor, l as DocumentCaptureErrorCode, n as DocumentCaptureState, o as documentCaptureMachine, r as createDocumentCaptureManager, s as DOCUMENT_CAPTURE_ERROR_CODES, t as DocumentCaptureManager, u as DocumentCaptureNextPageType } from "./documentCaptureManager-CBP2DkPr.js";
1
+ import { a as DocumentCaptureErrorCode, c as DocumentType, n as DOCUMENT_CAPTURE_ERROR_CODES, r as DocumentCaptureConfig, s as DocumentCaptureNextPageType } from "./types-B4BObr_7.js";
2
+ import { a as DocumentCaptureActor, i as createDocumentCaptureManagerFromActor, n as DocumentCaptureState, o as documentCaptureMachine, r as createDocumentCaptureManager, t as DocumentCaptureManager } from "./documentCaptureManager-pEqMY_Oo.js";
2
3
  export { DOCUMENT_CAPTURE_ERROR_CODES, type DocumentCaptureActor, type DocumentCaptureConfig, type DocumentCaptureErrorCode, type DocumentCaptureManager, type DocumentCaptureNextPageType, type DocumentCaptureState, type DocumentType, createDocumentCaptureManager, createDocumentCaptureManagerFromActor, documentCaptureMachine };
@@ -38,10 +38,6 @@ declare const documentUploadMachine: StateMachine<DocumentUploadContext, {
38
38
  id: string | undefined;
39
39
  };
40
40
  }>, Values<{
41
- setError: {
42
- type: "setError";
43
- params: NonReducibleUnknown;
44
- };
45
41
  setStream: {
46
42
  type: "setStream";
47
43
  params: NonReducibleUnknown;
@@ -54,6 +50,10 @@ declare const documentUploadMachine: StateMachine<DocumentUploadContext, {
54
50
  type: "setProgress";
55
51
  params: NonReducibleUnknown;
56
52
  };
53
+ setError: {
54
+ type: "setError";
55
+ params: NonReducibleUnknown;
56
+ };
57
57
  clearError: {
58
58
  type: "clearError";
59
59
  params: NonReducibleUnknown;
@@ -2,110 +2,8 @@ import { A as StateMachine, C as StateValue, D as PromiseActorLogic, a as ActorR
2
2
  import "./StateMachine-EDpYWy0i.js";
3
3
  import { t as Manager } from "./Manager-CQQ99QOI.js";
4
4
  import "./Actor-iTq7YY48.js";
5
- import { t as CameraStream } from "./camera-9wWD-pwg.js";
6
5
  import { n as PermissionStatus, t as PermissionResult } from "./types-BT-aiBYV.js";
7
- //#region src/modules/document-capture/types.d.ts
8
- type DocumentType = 'addressStatement' | 'otherDocument1' | 'otherDocument2' | 'otherDocument3' | 'v5cMultiPageLogbook' | 'circulationCard' | 'financeSettlement' | 'carInvoice' | 'capture' | 'processPoaOcr' | 'processLoaOcr' | 'processAsylumSeekerVisaZaf' | 'processBankStatementOCR' | 'processBankCheck' | 'processV5CLogbook' | 'processCarInvoice' | 'processCirculationCard' | 'processFinanceSettlement';
9
- declare const DOCUMENT_CAPTURE_ERROR_CODES: {
10
- readonly FILE_TOO_LARGE: "FILE_TOO_LARGE";
11
- readonly UPLOAD_FAILED: "UPLOAD_FAILED";
12
- };
13
- declare const DOCUMENT_CAPTURE_FINALIZE_ERROR_CODES: {
14
- readonly UNEXPECTED_ERROR: "UNEXPECTED_ERROR";
15
- };
16
- type DocumentCaptureErrorCode = (typeof DOCUMENT_CAPTURE_ERROR_CODES)[keyof typeof DOCUMENT_CAPTURE_ERROR_CODES];
17
- type DocumentCaptureFinalizeErrorCode = (typeof DOCUMENT_CAPTURE_FINALIZE_ERROR_CODES)[keyof typeof DOCUMENT_CAPTURE_FINALIZE_ERROR_CODES];
18
- /**
19
- * Configuration for the document capture module.
20
- * Parameterized to support both DOCUMENT_CAPTURE and ADDRESS flows.
21
- */
22
- type DocumentCaptureConfig = {
23
- /** Processing type for API endpoint routing. @default 'addressStatement' */
24
- processingType?: DocumentType;
25
- /**
26
- * Restricts the capture method, selecting the Figma "3 cases" flow:
27
- * - `'camera'` → capture only (upload hidden)
28
- * - `'file'` → upload only (camera hidden)
29
- * - absent → capture + upload (method selection) — the default
30
- */
31
- captureMode?: 'file' | 'camera';
32
- /** Allow user to skip this step. @default false */
33
- allowSkipDocumentCapture?: boolean;
34
- /** Backend ADDRESS config field. Inverted: `disableSkipPoa: true` → skip disabled. If both are set, `allowSkipDocumentCapture` takes precedence. */
35
- disableSkipPoa?: boolean;
36
- /** Tutorial screen title override */
37
- title?: string;
38
- /** Tutorial screen text override */
39
- text?: string;
40
- /** Title override for the second-page tutorial (multi-page flows). Falls back to `title`. */
41
- step2Title?: string;
42
- /** Text override for the second-page tutorial (multi-page flows). Falls back to `text`. */
43
- step2Text?: string;
44
- /** Number of capture/upload attempts before auto-advancing. @default 3 */
45
- captureAttempts?: number;
46
- /** Send image as base64 instead of raw file. @default false */
47
- sendBase64?: boolean;
48
- /** Maximum file size in bytes. @default 10485760 (10MB) */
49
- maxFileSize?: number;
50
- /** Restrict uploads to PDF files only (camera capture is unaffected). @default false */
51
- onlyPdf?: boolean;
52
- };
53
- type CapturedDocument = {
54
- imageBase64: string;
55
- file: File;
56
- fileType: string;
57
- };
58
- type DocumentUploadResponse = {
59
- success: boolean;
60
- status?: 'ADD_NEXT_PAGE' | 'OPTIONAL_PAGE_CAPTURE' | 'SUCCESS';
61
- };
62
- type FinalizeDocumentResponse = {
63
- status?: string;
64
- success?: boolean;
65
- };
66
- type DocumentCaptureResolvedConfig = {
67
- processingType: DocumentType;
68
- /** Resolved: restrict to camera capture only (upload hidden). */
69
- onlyCapture: boolean;
70
- /** Resolved: restrict to file / photo-library upload only (camera hidden). */
71
- onlyUpload: boolean;
72
- allowSkipDocumentCapture: boolean;
73
- captureAttempts: number;
74
- sendBase64: boolean;
75
- maxFileSize: number;
76
- /** Resolved: restrict uploads to PDF files only. */
77
- onlyPdf: boolean;
78
- title: string | undefined;
79
- text: string | undefined;
80
- step2Title: string | undefined;
81
- step2Text: string | undefined;
82
- };
83
- type DocumentCaptureNextPageType = 'none' | 'required' | 'optional';
84
- type DocumentCaptureContext = {
85
- config: DocumentCaptureResolvedConfig;
86
- stream: CameraStream | undefined;
87
- permissionResult: PermissionResult | 'refresh' | undefined;
88
- capturedDocument: CapturedDocument | undefined;
89
- captureMethod: 'camera' | 'file' | 'gallery' | undefined;
90
- /**
91
- * Whether the capture-method selection surface (bottom sheet on mobile web,
92
- * modal on desktop, upload-only selector) is open. Modeled in context — not
93
- * as a discrete state — so the analytics mapper can name the selector screen
94
- * while the machine stays in `tutorial`.
95
- */
96
- methodSelectionOpen: boolean;
97
- /** Whether the "common issues" help overlay is open over the camera view. */
98
- helpOpen: boolean;
99
- progress: number;
100
- error: DocumentCaptureErrorCode | DocumentCaptureFinalizeErrorCode | undefined;
101
- attemptsRemaining: number;
102
- pageNumber: number;
103
- nextPageType: DocumentCaptureNextPageType;
104
- };
105
- type DocumentCaptureInput = {
106
- config: DocumentCaptureConfig;
107
- };
108
- //#endregion
6
+ import { a as DocumentCaptureErrorCode, c as DocumentType, i as DocumentCaptureContext, l as DocumentUploadResponse, o as DocumentCaptureInput, r as DocumentCaptureConfig, s as DocumentCaptureNextPageType, t as CapturedDocument, u as FinalizeDocumentResponse } from "./types-B4BObr_7.js";
109
7
  //#region src/modules/document-capture/documentCaptureStateMachine.d.ts
110
8
  declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
111
9
  type: "CAPTURE";
@@ -2161,4 +2059,4 @@ declare function createDocumentCaptureManagerFromActor(actor: DocumentCaptureAct
2161
2059
  };
2162
2060
  type DocumentCaptureManager = ReturnType<typeof createDocumentCaptureManager>;
2163
2061
  //#endregion
2164
- export { DocumentCaptureActor as a, DocumentCaptureConfig as c, DocumentType as d, createDocumentCaptureManagerFromActor as i, DocumentCaptureErrorCode as l, DocumentCaptureState as n, documentCaptureMachine as o, createDocumentCaptureManager as r, DOCUMENT_CAPTURE_ERROR_CODES as s, DocumentCaptureManager as t, DocumentCaptureNextPageType as u };
2062
+ export { DocumentCaptureActor as a, createDocumentCaptureManagerFromActor as i, DocumentCaptureState as n, documentCaptureMachine as o, createDocumentCaptureManager as r, DocumentCaptureManager as t };
@@ -1,2 +1,3 @@
1
- import { c as DynamicFormsValidationErrors, d as Question, f as Screen, l as DynamicFormsConfig, n as DynamicFormsState, o as DynamicFormsResult, r as createDynamicFormsManager, s as dynamicFormsMachine, t as DynamicFormsManager, u as InputType } from "./dynamicFormsManager-Dposae2l.js";
1
+ import { i as Screen, n as InputType, r as Question, t as DynamicFormsConfig } from "./types-xIEGXWk8.js";
2
+ import { c as DynamicFormsValidationErrors, n as DynamicFormsState, o as DynamicFormsResult, r as createDynamicFormsManager, s as dynamicFormsMachine, t as DynamicFormsManager } from "./dynamicFormsManager-BYac2uEY.js";
2
3
  export { type DynamicFormsConfig, type DynamicFormsManager, type DynamicFormsResult, type DynamicFormsState, type DynamicFormsValidationErrors, type InputType, type Question, type Screen, createDynamicFormsManager, dynamicFormsMachine };
@@ -1,3 +1,3 @@
1
- import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-DiPpuHgF.esm.js";
2
- import { t as createDynamicFormsManager } from "./dynamicFormsManager-Fi2O2RUM.esm.js";
1
+ import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-BQqAwNQ-.esm.js";
2
+ import { t as createDynamicFormsManager } from "./dynamicFormsManager-DI0sCyVB.esm.js";
3
3
  export { createDynamicFormsManager, dynamicFormsMachine };
@@ -1,53 +1,7 @@
1
1
  import { i as ActorRefFrom } from "./spawn-D9jgw9pW.js";
2
2
  import { t as Manager } from "./Manager-CQQ99QOI.js";
3
3
  import "./Actor-iTq7YY48.js";
4
- //#region src/modules/dynamic-forms/types.d.ts
5
- /**
6
- * Input types supported by dynamic form questions.
7
- * `inputType` on `Question` is optional so unknown future API values degrade
8
- * gracefully to the text fallback rather than requiring this union to be widened.
9
- */
10
- type InputType = 'TEXT' | 'DATE' | 'COUNTRY' | 'NATIONALITY' | 'NUMBER' | 'EMAIL' | 'PHONE' | 'CPF' | 'NAME' | 'YESNO' | 'SELECT' | 'MULTISELECT';
11
- /**
12
- * A single question within a dynamic form screen.
13
- */
14
- type Question = {
15
- questionId: string;
16
- /** Display label shown to the user */
17
- question: string;
18
- inputType?: InputType;
19
- /** Fallback type used when `inputType` is absent */
20
- overrides?: InputType;
21
- isPredefined?: boolean;
22
- isOptional?: boolean;
23
- options?: string[];
24
- };
25
- /**
26
- * A single screen within the dynamic form flow.
27
- */
28
- type Screen = {
29
- title?: string;
30
- hideTitle?: boolean;
31
- questions: Question[];
32
- };
33
- /**
34
- * Configuration for the dynamic forms module.
35
- * Provide either `screens` (pre-loaded) or `flowId` (fetched from API).
36
- */
37
- type DynamicFormsConfig = {
38
- /** Flow ID used to fetch screens from the API when `screens` is not provided */
39
- flowId?: string;
40
- /** Pre-loaded screens — skips the API fetch when provided */
41
- screens?: Screen[];
42
- /**
43
- * Value used to prefill the sole answer of a single-question first screen (e.g.
44
- * a login hint read from a URL param by the host). Applied only when the form
45
- * is exactly one screen with one question; ignored otherwise. The field stays
46
- * editable. The host reads the value — core never touches the URL.
47
- */
48
- prefillValue?: string;
49
- };
50
- //#endregion
4
+ import { i as Screen, t as DynamicFormsConfig } from "./types-xIEGXWk8.js";
51
5
  //#region src/modules/dynamic-forms/dynamicFormsFields.d.ts
52
6
  /** Map of `questionId` → currently-displayed i18n error key. */
53
7
  type DynamicFormsValidationErrors = Partial<Record<string, string>>;
@@ -250,4 +204,4 @@ declare function createDynamicFormsManagerFromActor(actor: DynamicFormsActor): M
250
204
  /** Type representing a dynamic forms manager instance. */
251
205
  type DynamicFormsManager = ReturnType<typeof createDynamicFormsManager>;
252
206
  //#endregion
253
- export { DynamicFormsActor as a, DynamicFormsValidationErrors as c, Question as d, Screen as f, createDynamicFormsManagerFromActor as i, DynamicFormsConfig as l, DynamicFormsState as n, DynamicFormsResult as o, createDynamicFormsManager as r, dynamicFormsMachine as s, DynamicFormsManager as t, InputType as u };
207
+ export { DynamicFormsActor as a, DynamicFormsValidationErrors as c, createDynamicFormsManagerFromActor as i, DynamicFormsState as n, DynamicFormsResult as o, createDynamicFormsManager as r, dynamicFormsMachine as s, DynamicFormsManager as t };
@@ -1,7 +1,7 @@
1
1
  import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-Dy8PyVO5.esm.js";
2
2
  import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
3
3
  import { c as createManager, o as createActor } from "./xstate.esm-Cf4e0Cfd.esm.js";
4
- import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-DiPpuHgF.esm.js";
4
+ import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-BQqAwNQ-.esm.js";
5
5
  //#region src/modules/dynamic-forms/dynamicFormsActor.ts
6
6
  function createDynamicFormsActor(options) {
7
7
  return createActor(dynamicFormsMachine, { input: { config: options.config } }).start();
package/dist/ekyb.d.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  import "./StateMachine-EDpYWy0i.js";
2
2
  import { c as AddressSuggestion } from "./types-Bk_6dmDa.js";
3
3
  import { i as FlowModuleConfig } from "./types-BjTTkLmd.js";
4
- import { c as EkybCountry, d as EkybValidationErrors, f as UboEntry, l as EkybFieldDef, n as EkybState, o as ekybMachine, r as createEkybManager, s as EkybConfig, t as EkybManager, u as EkybValidationError } from "./ekybManager-CBX0tM04.js";
4
+ import { a as EkybValidationError, n as EkybCountry, o as EkybValidationErrors, r as EkybFieldDef, s as UboEntry, t as EkybConfig } from "./types-BfHiko5D.js";
5
+ import { n as EkybState, o as ekybMachine, r as createEkybManager, t as EkybManager } from "./ekybManager-Dzswb_b8.js";
5
6
  //#region src/modules/ekyb/ekybServices.d.ts
6
7
  type EkybFlowConfig = FlowModuleConfig['EKYB'];
7
8
  //#endregion
package/dist/ekyb.esm.js CHANGED
@@ -1,3 +1,4 @@
1
- import { a as SUPPORTED_COUNTRIES, i as DEV_ONLY_COUNTRIES, n as toEkybConfig, o as isSupportedCountry, r as ALL_COUNTRIES, t as ekybMachine } from "./ekybStateMachine-Cw4pz_hf.esm.js";
2
- import { t as createEkybManager } from "./ekybManager-CObZ7foB.esm.js";
1
+ import { E as SUPPORTED_COUNTRIES, O as isSupportedCountry, S as DEV_ONLY_COUNTRIES, g as toEkybConfig, v as ALL_COUNTRIES } from "./flowServices-BU1mMxoQ.esm.js";
2
+ import { t as ekybMachine } from "./ekybStateMachine-DX7KeqlM.esm.js";
3
+ import { t as createEkybManager } from "./ekybManager-D46NN7cx.esm.js";
3
4
  export { ALL_COUNTRIES, DEV_ONLY_COUNTRIES, SUPPORTED_COUNTRIES, createEkybManager, ekybMachine, isSupportedCountry, toEkybConfig };
@@ -1,7 +1,7 @@
1
1
  import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-Dy8PyVO5.esm.js";
2
2
  import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
3
3
  import { c as createManager, o as createActor } from "./xstate.esm-Cf4e0Cfd.esm.js";
4
- import { t as ekybMachine } from "./ekybStateMachine-Cw4pz_hf.esm.js";
4
+ import { t as ekybMachine } from "./ekybStateMachine-DX7KeqlM.esm.js";
5
5
  //#region src/modules/ekyb/ekybActor.ts
6
6
  /**
7
7
  * Creates and starts an eKYB actor.
@@ -1,53 +1,8 @@
1
1
  import { i as ActorRefFrom } from "./spawn-D9jgw9pW.js";
2
2
  import { t as Manager } from "./Manager-CQQ99QOI.js";
3
3
  import "./Actor-iTq7YY48.js";
4
- import { c as AddressSuggestion, l as FieldDef } from "./types-Bk_6dmDa.js";
5
- //#region src/modules/ekyb/types.d.ts
6
- type UboEntry = {
7
- id: string;
8
- name: string;
9
- surname: string;
10
- };
11
- type EkybFormValues = {
12
- country: string;
13
- businessName?: string;
14
- street?: string;
15
- houseNo?: string;
16
- addressLine2?: string;
17
- city?: string;
18
- state?: string;
19
- postalCode?: string;
20
- taxId?: string;
21
- };
22
- type EkybConfig = {
23
- flowId?: string;
24
- verificationFields?: string[];
25
- checkBusinessName?: boolean;
26
- checkAddress?: boolean;
27
- checkTaxId?: boolean;
28
- checkUniqueBeneficialOwner?: boolean;
29
- };
30
- type EkybValidationRule = {
31
- type: 'required';
32
- } | {
33
- type: 'streetLevelRequired';
34
- } | {
35
- type: 'cnpj';
36
- } | {
37
- type: 'postalCodeFormat';
38
- country: string;
39
- };
40
- type EkybValidationError = {
41
- key: string;
42
- params?: Record<string, string | number>;
43
- };
44
- type EkybValidationErrors = Partial<Record<string, EkybValidationError>>;
45
- type EkybFieldDef = FieldDef & {
46
- optionalForCountries?: string[];
47
- validation?: EkybValidationRule[];
48
- };
49
- type EkybCountry = 'BR' | 'US' | 'GB' | 'ES' | 'IT' | 'FR' | 'DE' | 'IL' | 'MX' | 'CN' | 'NG' | 'CM' | 'KE';
50
- //#endregion
4
+ import { c as AddressSuggestion } from "./types-Bk_6dmDa.js";
5
+ import { i as EkybFormValues, o as EkybValidationErrors, r as EkybFieldDef, s as UboEntry, t as EkybConfig } from "./types-BfHiko5D.js";
51
6
  //#region src/modules/ekyb/ekybStateMachine.d.ts
52
7
  declare const ekybMachine: any;
53
8
  type EkybMachine = typeof ekybMachine;
@@ -156,4 +111,4 @@ declare function createEkybManager(options: CreateEkybActorOptions): Manager<Eky
156
111
  };
157
112
  type EkybManager = ReturnType<typeof createEkybManager>;
158
113
  //#endregion
159
- export { EkybActor as a, EkybCountry as c, EkybValidationErrors as d, UboEntry as f, createEkybManagerFromActor as i, EkybFieldDef as l, EkybState as n, ekybMachine as o, createEkybManager as r, EkybConfig as s, EkybManager as t, EkybValidationError as u };
114
+ export { EkybActor as a, createEkybManagerFromActor as i, EkybState as n, ekybMachine as o, createEkybManager as r, EkybManager as t };
@@ -1,177 +1,9 @@
1
1
  import { t as api } from "./api-BDTZNnca.esm.js";
2
2
  import { t as endpoints } from "./endpoints-CfRg7iAr.esm.js";
3
+ import { C as FIELD_NAME_MAPPING, D as UBO_FIELD_LABELS, O as isSupportedCountry, T as INVALID_CNPJ_PATTERNS, _ as ADDRESS_FIELDS, b as CNPJ_SECOND_DIGIT_FACTORS, f as hasAtLeastOneAddressField, g as toEkybConfig, h as sortModulesByOrder, m as requiresAddressValidation, p as isFieldOptional, t as getFlow, v as ALL_COUNTRIES, w as FIELD_ORDER, x as COUNTRIES_WITH_CNPJ_VALIDATION, y as CNPJ_FIRST_DIGIT_FACTORS } from "./flowServices-BU1mMxoQ.esm.js";
3
4
  import { r as assign, t as setup } from "./xstate.esm-Cf4e0Cfd.esm.js";
4
5
  import { n as fromPromise } from "./xstate-actors.esm-CtI5S0f4.esm.js";
5
6
  import { a as getPostalCodeMaxLength, c as STREET_LEVEL_REQUIRED_ERROR, d as usStateOptions, i as getPostalCodeErrorKey, l as fillFromSuggestion, n as FIXED_DIGIT_POSTAL_CODE_LENGTH, o as validatePostalCode, r as formatPostalCode, s as DYNAMIC_REQUIRED_KEY, t as debounceSearchActor, u as getStreetLevelErrorForSuggestion } from "./addressSearch-DEYnZoez.esm.js";
6
- import { t as getFlow } from "./flowServices-Caz-Bdol.esm.js";
7
- //#region src/modules/ekyb/ekybConstants.ts
8
- /**
9
- * Countries available in all environments.
10
- * Sorted alphabetically by display name.
11
- */
12
- const SUPPORTED_COUNTRIES = [
13
- "BR",
14
- "CN",
15
- "FR",
16
- "DE",
17
- "IL",
18
- "IT",
19
- "MX",
20
- "ES",
21
- "GB",
22
- "US"
23
- ];
24
- /**
25
- * Additional countries available only in dev/staging environments.
26
- */
27
- const DEV_ONLY_COUNTRIES = [
28
- "CM",
29
- "KE",
30
- "NG"
31
- ];
32
- /**
33
- * Union of all recognized country codes (prod + dev).
34
- */
35
- const ALL_COUNTRIES = [...SUPPORTED_COUNTRIES, ...DEV_ONLY_COUNTRIES];
36
- const ALL_COUNTRIES_SET = new Set(ALL_COUNTRIES);
37
- function isSupportedCountry(code) {
38
- return ALL_COUNTRIES_SET.has(code);
39
- }
40
- const FIELD_ORDER = [
41
- "name-user_input",
42
- "taxId-user_input",
43
- "street-user_input",
44
- "houseNo-user_input",
45
- "address2-user_input",
46
- "city-user_input",
47
- "state-user_input",
48
- "postalCode-user_input"
49
- ];
50
- const FIELD_NAME_MAPPING = {
51
- "name-user_input": "businessName",
52
- "street-user_input": "street",
53
- "houseNo-user_input": "houseNo",
54
- "address2-user_input": "addressLine2",
55
- "city-user_input": "city",
56
- "state-user_input": "state",
57
- "postalCode-user_input": "postalCode",
58
- "taxId-user_input": "taxId"
59
- };
60
- const COUNTRIES_WITH_CNPJ_VALIDATION = ["BR"];
61
- const BUSINESS_NAME_OPTIONAL_COUNTRIES = [];
62
- const ADDRESS_FULLY_OPTIONAL_COUNTRIES = [
63
- "BR",
64
- "GB",
65
- "FR"
66
- ];
67
- const ADDRESS_FIELDS = [
68
- "street",
69
- "houseNo",
70
- "addressLine2",
71
- "city",
72
- "state",
73
- "postalCode"
74
- ];
75
- const ALL_COUNTRIES_OPTIONAL_FIELDS = ["ubo"];
76
- const UBO_FIELD_LABELS = {
77
- name: "ekyb.uboName",
78
- surname: "ekyb.uboSurname"
79
- };
80
- const INVALID_CNPJ_PATTERNS = [
81
- "00000000000000",
82
- "11111111111111",
83
- "22222222222222",
84
- "33333333333333",
85
- "44444444444444",
86
- "55555555555555",
87
- "66666666666666",
88
- "77777777777777",
89
- "88888888888888",
90
- "99999999999999"
91
- ];
92
- const CNPJ_FIRST_DIGIT_FACTORS = [
93
- 5,
94
- 4,
95
- 3,
96
- 2,
97
- 9,
98
- 8,
99
- 7,
100
- 6,
101
- 5,
102
- 4,
103
- 3,
104
- 2
105
- ];
106
- const CNPJ_SECOND_DIGIT_FACTORS = [
107
- 6,
108
- 5,
109
- 4,
110
- 3,
111
- 2,
112
- 9,
113
- 8,
114
- 7,
115
- 6,
116
- 5,
117
- 4,
118
- 3,
119
- 2
120
- ];
121
- //#endregion
122
- //#region src/modules/ekyb/ekybUtils.ts
123
- /**
124
- * Normalizes any supported eKYB config input into a manager-ready `EkybConfig`.
125
- *
126
- * Accepts either:
127
- * - A manager-ready `EkybConfig` (with `flowId` or `verificationFields`) →
128
- * returned unchanged.
129
- * - A raw backend `EkybFlowConfig` (with `*Source` companions) → stripped to
130
- * the four `check*` fields the manager consumes.
131
- *
132
- * Idempotent: `toEkybConfig(toEkybConfig(x))` equals `toEkybConfig(x)`.
133
- */
134
- function toEkybConfig(config) {
135
- if (config.flowId || config.verificationFields) return config;
136
- return {
137
- checkBusinessName: config.checkBusinessName,
138
- checkAddress: config.checkAddress,
139
- checkTaxId: config.checkTaxId,
140
- checkUniqueBeneficialOwner: config.checkUniqueBeneficialOwner
141
- };
142
- }
143
- /** Sorts modules based on a custom order; items not in order maintain relative position */
144
- function sortModulesByOrder(modules, customOrder) {
145
- return [...modules].sort((a, b) => {
146
- const indexA = customOrder.indexOf(a);
147
- const indexB = customOrder.indexOf(b);
148
- if (indexA !== -1 && indexB !== -1) return indexA - indexB;
149
- if (indexA !== -1) return -1;
150
- if (indexB !== -1) return 1;
151
- return 0;
152
- });
153
- }
154
- /** Determines if a field is optional for the given country */
155
- function isFieldOptional(fieldName, countryCode) {
156
- if (ALL_COUNTRIES_OPTIONAL_FIELDS.includes(fieldName)) return true;
157
- if (fieldName === "businessName") return BUSINESS_NAME_OPTIONAL_COUNTRIES.includes(countryCode);
158
- if (fieldName === "addressLine2") return true;
159
- if (ADDRESS_FIELDS.includes(fieldName)) return false;
160
- if (fieldName === "taxId") return false;
161
- return false;
162
- }
163
- /** Checks if at least one address field has a non-empty value */
164
- function hasAtLeastOneAddressField(formData) {
165
- return ADDRESS_FIELDS.some((field) => {
166
- const value = formData[field];
167
- return value !== void 0 && value.trim() !== "";
168
- });
169
- }
170
- /** Returns false for countries where address is fully optional */
171
- function requiresAddressValidation(countryCode) {
172
- return !ADDRESS_FULLY_OPTIONAL_COUNTRIES.includes(countryCode);
173
- }
174
- //#endregion
175
7
  //#region src/modules/ekyb/ekybValidators.ts
176
8
  function cleanCnpjString(cnpj) {
177
9
  return cnpj.replace(/\./g, "").replace(/\//g, "").replace(/-/g, "");
@@ -774,4 +606,4 @@ const ekybMachine = setup({
774
606
  }
775
607
  });
776
608
  //#endregion
777
- export { SUPPORTED_COUNTRIES as a, DEV_ONLY_COUNTRIES as i, toEkybConfig as n, isSupportedCountry as o, ALL_COUNTRIES as r, ekybMachine as t };
609
+ export { ekybMachine as t };
package/dist/ekyc.esm.js CHANGED
@@ -1,3 +1,4 @@
1
- import { n as toEkycConfig, t as ekycMachine } from "./ekycStateMachine-DFQdmBXl.esm.js";
2
- import { t as createEkycManager } from "./ekycManager-CI7sN4Ln.esm.js";
1
+ import { i as toEkycConfig } from "./ekycUtils-Dew1rBG0.esm.js";
2
+ import { t as ekycMachine } from "./ekycStateMachine-DRbbavZy.esm.js";
3
+ import { t as createEkycManager } from "./ekycManager-DRrG5I6e.esm.js";
3
4
  export { createEkycManager, ekycMachine, toEkycConfig };
@@ -1,7 +1,7 @@
1
1
  import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-Dy8PyVO5.esm.js";
2
2
  import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
3
3
  import { c as createManager, o as createActor } from "./xstate.esm-Cf4e0Cfd.esm.js";
4
- import { t as ekycMachine } from "./ekycStateMachine-DFQdmBXl.esm.js";
4
+ import { t as ekycMachine } from "./ekycStateMachine-DRbbavZy.esm.js";
5
5
  //#region src/modules/ekyc/ekycActor.ts
6
6
  /**
7
7
  * Creates and starts an eKYC actor.