@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,14 +1,8 @@
1
- import { A as StateMachine, i as ActorRefFrom, l as AnyStateMachine } from "./spawn-D9jgw9pW.js";
2
- import "./StateMachine-EDpYWy0i.js";
3
- import { t as Manager } from "./Manager-CQQ99QOI.js";
4
- import "./Actor-iTq7YY48.js";
5
- import { t as IVisibilityObserverCapability } from "./IVisibilityObserverCapability-D4tvIB5v.js";
6
- import "./index-B8weJxmL.js";
7
1
  import { t as CameraStream } from "./camera-9wWD-pwg.js";
8
2
  import { n as StreamCanvasCapture, r as IncodeCanvas, t as DeepsightService } from "./deepsightService-CR-CYdka.js";
9
3
  import { a as MLProviderConfig, i as IMLProviderCapability, n as IRecordingCapability, r as RecordingConnection, t as IStorageCapability } from "./IStorageCapability-B8IGxCwe.js";
10
4
  import { a as RegulationTypes, n as Flow, o as TutorialIdConfig } from "./types-BjTTkLmd.js";
11
- import { n as PermissionStatus, t as PermissionResult } from "./types-BT-aiBYV.js";
5
+ import { t as PermissionResult } from "./types-BT-aiBYV.js";
12
6
  //#region ../infra/src/wasm/apiUtilities.d.ts
13
7
  /**
14
8
  * Shared WASM module loader.
@@ -520,12 +514,6 @@ type IdCaptureContext = {
520
514
  * submit path; cleared on side flip / retry.
521
515
  */
522
516
  decodedBarcode: Pdf417DecodeResult | null;
523
- /**
524
- * Whether the pre-capture barcode fast path has fired this attempt. One-shot:
525
- * once attempted, a repeat decode falls through to the best-frame submit
526
- * path. Reset on side flip / retry.
527
- */
528
- barcodeFastPathAttempted: boolean;
529
517
  recordingSession: RecordingSession | undefined;
530
518
  attemptsRemaining: number;
531
519
  /**
@@ -779,397 +767,4 @@ type IdCaptureOutput = {
779
767
  skipFaceMatch: boolean;
780
768
  } | undefined;
781
769
  //#endregion
782
- //#region src/modules/id/idCaptureStateMachine.d.ts
783
- declare const idCaptureMachine: AnyStateMachine;
784
- type IdCaptureMachine = StateMachine<IdCaptureContext, IdCaptureEvent, any, any, any, any, any, any, any, IdCaptureInput, any, any, any, any>;
785
- //#endregion
786
- //#region src/modules/id/idCaptureActor.d.ts
787
- type CreateIdCaptureActorOptions = {
788
- config: IdCaptureConfig;
789
- dependencies?: IdCaptureDependencies;
790
- };
791
- type IdCaptureActor = ActorRefFrom<IdCaptureMachine>;
792
- declare function createIdCaptureActor(options: CreateIdCaptureActorOptions): IdCaptureActor;
793
- //#endregion
794
- //#region src/modules/id/idCaptureOnlyStateMachine.d.ts
795
- type IdCaptureOnlyContext = IdCaptureContext;
796
- type IdCaptureOnlyEvent = IdCaptureEvent;
797
- type IdCaptureOnlyInput = IdCaptureInput;
798
- /**
799
- * ID capture state machine variant for the captureOnly flow. Shares the full
800
- * base ID-capture state tree (chooser, tutorial, permissions, capture,
801
- * front/back finished, processing, finished); only the upload, process, and
802
- * recording steps are local instead of remote.
803
- */
804
- declare const idCaptureOnlyMachine: AnyStateMachine;
805
- type IdCaptureOnlyMachine = StateMachine<IdCaptureOnlyContext, IdCaptureOnlyEvent, any, any, any, any, any, any, any, IdCaptureOnlyInput, any, any, any, any>;
806
- //#endregion
807
- //#region src/modules/id/idCaptureOnlyActor.d.ts
808
- type CreateIdCaptureOnlyActorOptions = {
809
- config: IdCaptureOnlyConfig;
810
- dependencies?: IdCaptureDependencies;
811
- };
812
- type IdCaptureOnlyActor = ActorRefFrom<IdCaptureOnlyMachine>;
813
- declare function createIdCaptureOnlyActor(options: CreateIdCaptureOnlyActorOptions): IdCaptureOnlyActor;
814
- //#endregion
815
- //#region src/modules/id/idCaptureServices.d.ts
816
- type IdCaptureInitResult = {
817
- stream: CameraStream;
818
- provider: IIdCaptureCapability;
819
- captureResolution?: string;
820
- cameraFallbackLevel?: number;
821
- };
822
- type InitializeIdCaptureParams = {
823
- config: IdCaptureConfig;
824
- deepsightService?: DeepsightService;
825
- };
826
- declare function initializeIdCapture(params: InitializeIdCaptureParams): Promise<IdCaptureInitResult>;
827
- declare function stopStream(stream: CameraStream): void;
828
- type UploadIdImageParams = {
829
- image: string;
830
- type: 'front' | 'back';
831
- sendBase64?: boolean;
832
- isSecondId?: boolean;
833
- onlyFront?: boolean;
834
- glare?: number;
835
- sharpness?: number;
836
- shouldSkipGlareBack?: boolean;
837
- shouldSkipGlareFront?: boolean;
838
- captureType?: string;
839
- ageAssurance?: boolean;
840
- onProgress?: (progress: number) => void;
841
- metadata?: string;
842
- signal?: AbortSignal;
843
- analyticsProvider?: IAnalyticsCapability;
844
- imageData?: ImageData;
845
- /**
846
- * [ENG-44176] When `false`, attaches `extractIdFace=false` as a query param
847
- * to `POST /omni/add/front-id/v2` so the backend skips biometric face
848
- * extraction. Forwarded only for `type === 'front'`. Omitted / `true` is a
849
- * no-op on the wire (backend default is extraction on).
850
- */
851
- extractIdFace?: boolean;
852
- };
853
- type ValidationError = {
854
- error: boolean;
855
- message: string;
856
- messageDescription?: string;
857
- errorKey: IdErrorCode;
858
- };
859
- declare function validateUploadResponse(response: UploadIdResponse & {
860
- failReason?: string;
861
- side?: 'front' | 'back';
862
- }, sessionState?: {
863
- skipGlareFront?: boolean;
864
- skipGlareBack?: boolean;
865
- }): ValidationError | undefined;
866
- declare function uploadIdImage(params: UploadIdImageParams): Promise<CaptureIdResponse>;
867
- type StartRecordingParams = {
868
- config: IdCaptureConfig;
869
- stream: CameraStream;
870
- existing?: RecordingSession;
871
- type: 'frontId' | 'backId';
872
- };
873
- declare function preloadIdRecordingProvider(config: IdCaptureConfig): void;
874
- declare function startRecordingSession(params: StartRecordingParams): Promise<RecordingSession | undefined>;
875
- declare function stopRecording(session: RecordingSession): void;
876
- declare function processId(isSecondId?: boolean, queueName?: string, signal?: AbortSignal): Promise<{
877
- isDocumentExpired: boolean;
878
- }>;
879
- type UploadManualIdFileParams = {
880
- side: 'front' | 'back' | 'passport';
881
- /**
882
- * Raw base64 payload (no `data:<mime>;base64,` prefix). Callers must strip
883
- * the data-URL prefix — the v2 backend rejects data URLs with
884
- * `IllegalArgumentException: Illegal base64 character 3a`.
885
- */
886
- base64Image: string;
887
- retry?: boolean;
888
- onlyFront?: boolean;
889
- signal?: AbortSignal;
890
- isSecondId?: boolean;
891
- /**
892
- * [ENG-44176] When `false`, attaches `extractIdFace=false` to the upload
893
- * so the backend skips biometric face extraction. Forwarded only for the
894
- * `front` and `passport` sides; back uploads ignore it. Omitted / `true`
895
- * is a no-op on the wire.
896
- */
897
- extractIdFace?: boolean;
898
- };
899
- /**
900
- * Upload a user-selected image as front / back / passport ID.
901
- *
902
- * Uses the same request shape as the live-camera path (`uploadIdImage`):
903
- * JSON body `{ base64Image }` with default application/json Content-Type,
904
- * `captureType=UPLOAD` query param, `retry=true` when retrying.
905
- * Back is POSTed to `/omni/add/back-id/v2` (or `/omni/add/back-second-id/v2`
906
- * when `isSecondId`); front and passport go to `/omni/add/front-id/v2` (or
907
- * `/omni/add/front-second-id/v2` when `isSecondId`).
908
- *
909
- * The v2 endpoints reject raw `image/jpeg` bodies with 415, so the caller
910
- * must convert the File to base64 before calling this service.
911
- */
912
- declare function uploadManualIdFile(params: UploadManualIdFileParams): Promise<UploadIdResponse>;
913
- /**
914
- * UTF-8-safe base64 encoding of a decoded barcode payload. Uses the browser
915
- * `TextEncoder` + `btoa` (always available in the SDK's target environment) so
916
- * non-ASCII payloads survive `btoa`, which only accepts Latin-1.
917
- */
918
- declare function barcodeToBase64(raw: string): string;
919
- type AddBarcodeParams = {
920
- rawBarcode: string;
921
- /** When true (default), the server processes the ID from the barcode. */
922
- processId?: boolean;
923
- /** PDF417 decode-quality metrics forwarded to the server (best-effort). */
924
- metrics?: Pdf417DecodeResult | null;
925
- signal?: AbortSignal;
926
- };
927
- /**
928
- * US Smart Capture: submits a decoded PDF417 barcode to
929
- * `POST /omni/add/barcode/v3`. The response drives the downstream front-capture
930
- * and Process ID skips (`forceFrontIdCapture` / `idValidationCompleted`).
931
- * Mirrors SDK 1's `addBarcode`. Throws (carrying `status`/`data`) on a non-OK
932
- * response so the caller can fall back to a full-frame upload. The
933
- * hardware-id token is injected by the shared `api` layer, as in `uploadIdImage`.
934
- */
935
- declare function addBarcode(params: AddBarcodeParams): Promise<AddBarcodeV3Response>;
936
- //#endregion
937
- //#region src/modules/id/digitalUpload/types.d.ts
938
- type DigitalUploadFailReason = 'DIGITAL_ID_REQUESTED_BUT_OTHER_PROVIDED' | 'ID_TYPE_UNACCEPTABLE' | 'FILE_CHANGED_ERROR' | 'INVALID_FILE_TYPE' | 'NETWORK_ERROR' | 'GENERIC';
939
- //#endregion
940
- //#region src/internal/idCapture/idCaptureManagerFactory.d.ts
941
- type CaptureStatus = 'initializing' | 'detecting' | 'capturing' | 'uploading' | 'uploadError' | 'success';
942
- type IdCaptureIdleState = {
943
- status: 'idle';
944
- };
945
- type IdCaptureChooserState = {
946
- status: 'chooser';
947
- availableDocumentTypes: IdDocumentType[];
948
- };
949
- type IdCaptureLoadingState = {
950
- status: 'loading';
951
- };
952
- type IdCaptureTutorialState = {
953
- status: 'tutorial';
954
- selectedDocumentType: IdDocumentType | undefined;
955
- currentMode: IdCaptureMode;
956
- };
957
- type IdCaptureAgeVerificationState = {
958
- status: 'ageVerification';
959
- };
960
- type IdCapturePermissionsState = {
961
- status: 'permissions';
962
- permissionStatus: PermissionStatus;
963
- };
964
- type IdCaptureCaptureState = {
965
- status: 'capture';
966
- captureStatus: CaptureStatus;
967
- stream: CameraStream | undefined;
968
- detectionStatus: DetectionStatus;
969
- debugFrame: ImageData | undefined;
970
- attemptsRemaining: number;
971
- uploadError: IdErrorCode | undefined;
972
- currentMode: IdCaptureMode;
973
- counterValue: number;
974
- orientation: DetectionOrientation | undefined;
975
- idType: string | undefined;
976
- previewImageUrl?: string;
977
- uploadProgress?: number;
978
- ageAssurance: boolean;
979
- uploadErrorMessage?: string;
980
- uploadErrorDescription?: string;
981
- /** Whether back capture is needed after front capture completes */
982
- needsBackCapture: boolean;
983
- /** Whether front capture is needed after back capture (usSmartCapture + forceFrontIdCapture) */
984
- needsFrontCapture: boolean;
985
- showCaptureButtonInAuto: boolean;
986
- /** Whether retry is available (attemptsRemaining > 0) */
987
- canRetry: boolean;
988
- };
989
- type IdCaptureMandatoryConsentState = {
990
- status: 'mandatoryConsent';
991
- regulationType: RegulationTypes;
992
- };
993
- type IdCaptureFrontFinishedState = {
994
- status: 'frontFinished';
995
- };
996
- type IdCaptureBackFinishedState = {
997
- status: 'backFinished';
998
- };
999
- type IdCaptureProcessingState = {
1000
- status: 'processing';
1001
- };
1002
- type IdCaptureExpiredState = {
1003
- status: 'expired';
1004
- /**
1005
- * Remaining attempts after this expired result. Mirrors V1's
1006
- * `idv2.capture.processing.attemptsRemainingLabel` counter and Figma's
1007
- * "X attempts remaining" line on `1-9-11-id-documenterror`.
1008
- */
1009
- attemptsRemaining: number;
1010
- /** Which side just expired — drives the back-specific subtitle in the UI. */
1011
- currentMode: IdCaptureMode;
1012
- };
1013
- type IdCaptureExpiredExhaustedState = {
1014
- status: 'expiredExhausted';
1015
- };
1016
- type IdCaptureFinishedState = {
1017
- status: 'finished';
1018
- /**
1019
- * Terminal output of the ID machine — the downstream module-skip signal
1020
- * (e.g. `skipFaceMatch` for the US Smart Capture "no front, no match" path).
1021
- * UI-driven modules don't auto-propagate machine output to the orchestrator,
1022
- * so the UI forwards this to `flowManager.completeModule(output)` on finish.
1023
- */
1024
- output?: IdCaptureOutput;
1025
- };
1026
- type IdCaptureClosedState = {
1027
- status: 'closed';
1028
- };
1029
- type IdCaptureErrorState = {
1030
- status: 'error';
1031
- error: string;
1032
- };
1033
- type ManualUploadUploadingSide = ManualUploadSide;
1034
- type IdCaptureManualUploadState = {
1035
- status: 'manualUpload';
1036
- phase: 'selecting' | 'uploading' | 'exhausted';
1037
- /** Which side is currently uploading (undefined in `selecting`/`exhausted`). */
1038
- uploadingSide: ManualUploadUploadingSide | undefined;
1039
- activeTab: ManualUploadTab;
1040
- showIdTab: boolean;
1041
- showPassportTab: boolean;
1042
- /** Whether the ID tab should render a back-of-ID slot. */
1043
- showBackSlot: boolean;
1044
- frontFileName: string | undefined;
1045
- backFileName: string | undefined;
1046
- passportFileName: string | undefined;
1047
- frontUploaded: boolean;
1048
- backUploaded: boolean;
1049
- passportUploaded: boolean;
1050
- canContinue: boolean;
1051
- retriesLeft: number;
1052
- /** i18n key for the current error message, if any. */
1053
- errorKey: string | null;
1054
- errorSide: ManualUploadSide | null;
1055
- };
1056
- type IdCaptureDigitalUploadState = {
1057
- status: 'digitalIdUpload';
1058
- phase: 'tutorial' | 'selecting' | 'reviewing' | 'uploading' | 'holding' | 'success' | 'error' | 'fileTooLarge' | 'exhausted';
1059
- file: File | null;
1060
- fileName: string | undefined;
1061
- failReason: DigitalUploadFailReason | null;
1062
- attemptsRemaining: number;
1063
- uploadProgress: number;
1064
- pickerRequestId: number;
1065
- };
1066
- type IdCaptureState = IdCaptureIdleState | IdCaptureChooserState | IdCaptureLoadingState | IdCaptureTutorialState | IdCaptureAgeVerificationState | IdCapturePermissionsState | IdCaptureCaptureState | IdCaptureMandatoryConsentState | IdCaptureFrontFinishedState | IdCaptureBackFinishedState | IdCaptureProcessingState | IdCaptureExpiredState | IdCaptureExpiredExhaustedState | IdCaptureFinishedState | IdCaptureClosedState | IdCaptureErrorState | IdCaptureManualUploadState | IdCaptureDigitalUploadState;
1067
- /**
1068
- * Union of all `idCaptureMachine` variants' actor types. Variants share the
1069
- * same state tree and context shape, so the manager helpers
1070
- * (`mapState`, `createApi`) work uniformly for either flavor at runtime.
1071
- */
1072
- type AnyIdCaptureActor = IdCaptureActor | IdCaptureOnlyActor;
1073
- /**
1074
- * Builds the public ID capture manager from an already-created actor.
1075
- * Used by both `createIdCaptureManager` and `createIdCaptureOnlyManager`.
1076
- *
1077
- * The internal cast to `IdCaptureActor` narrows the union for `createManager`,
1078
- * which is typed against the regular machine. Variants produced via
1079
- * `idCaptureMachine.provide({...})` share the same context and event types,
1080
- * so the cast is sound at runtime — only the actor implementation differs.
1081
- *
1082
- * `visibilityObserver` defaults to the browser `document.visibilitychange`
1083
- * provider so first-party and BYO-actor callers get foreground/background
1084
- * events without extra wiring. Construction lives here — a documented,
1085
- * narrow deviation from "never `new` a provider inside Core" (see
1086
- * `docs/patterns/CAPABILITY.md`). Pass a fake/no-op to override (tests do).
1087
- */
1088
- declare function createIdCaptureManagerFromActor(actor: AnyIdCaptureActor, visibilityObserver?: IVisibilityObserverCapability): Manager<IdCaptureState> & {
1089
- load(): void;
1090
- selectDocument(documentType: IdDocumentType): void;
1091
- nextStep(): Promise<void>;
1092
- requestPermission(): void;
1093
- goToLearnMore(): void;
1094
- back(): void;
1095
- close(): void;
1096
- reset(): void;
1097
- retryCapture(): void;
1098
- continueExhausted(): void;
1099
- continueFromError(): void;
1100
- capture(): void;
1101
- switchToManualCapture(): void;
1102
- continueToBack(): void;
1103
- continueToFront(): void;
1104
- skipBack(): void;
1105
- acceptMandatoryConsent(): void;
1106
- cancelMandatoryConsent(): void;
1107
- /**
1108
- * Updates the detection area used for WASM geometry calculation.
1109
- * Call this when the UI detection area dimensions change (e.g., on resize or orientation change).
1110
- */
1111
- updateDetectionArea(detectionArea: DetectionArea): void;
1112
- /**
1113
- * Manual upload: tab change (ID / Passport). Resets per-tab file selections.
1114
- * Note: there is intentionally no `switchToManualUpload` method — entry to
1115
- * the manual-upload flow is gated by config + Chooser to prevent a
1116
- * dev-console bypass of live camera capture.
1117
- */
1118
- manualUploadChangeTab(tab: ManualUploadTab): void;
1119
- manualUploadSelectFile(side: ManualUploadSide, file: File): void;
1120
- manualUploadContinue(): void;
1121
- manualUploadReset(): void;
1122
- digitalUploadNextStep(): void;
1123
- digitalUploadPickFile(file: File): void;
1124
- digitalUploadConfirm(): void;
1125
- digitalUploadReplace(): void;
1126
- digitalUploadRetry(): void;
1127
- digitalUploadScanInstead(): void;
1128
- digitalUploadChooseAnother(): void;
1129
- };
1130
- type IdCaptureManager = ReturnType<typeof createIdCaptureManagerFromActor>;
1131
- //#endregion
1132
- //#region src/modules/id/idCaptureManager.d.ts
1133
- /**
1134
- * Creates a manager for the regular ID capture flow. The shared
1135
- * `mapState`/`createApi`/state-types live in
1136
- * `internal/idCapture/idCaptureManagerFactory.ts`; this file is a thin
1137
- * wrapper that creates the actor and delegates to the factory.
1138
- *
1139
- * For the captureOnly flow (rich payload delivered locally via `onCapture`),
1140
- * use `createIdCaptureOnlyManager`.
1141
- */
1142
- declare function createIdCaptureManager(options: CreateIdCaptureActorOptions): Manager<IdCaptureState> & {
1143
- load(): void;
1144
- selectDocument(documentType: IdDocumentType): void;
1145
- nextStep(): Promise<void>;
1146
- requestPermission(): void;
1147
- goToLearnMore(): void;
1148
- back(): void;
1149
- close(): void;
1150
- reset(): void;
1151
- retryCapture(): void;
1152
- continueExhausted(): void;
1153
- continueFromError(): void;
1154
- capture(): void;
1155
- switchToManualCapture(): void;
1156
- continueToBack(): void;
1157
- continueToFront(): void;
1158
- skipBack(): void;
1159
- acceptMandatoryConsent(): void;
1160
- cancelMandatoryConsent(): void;
1161
- updateDetectionArea(detectionArea: DetectionArea): void;
1162
- manualUploadChangeTab(tab: ManualUploadTab): void;
1163
- manualUploadSelectFile(side: ManualUploadSide, file: File): void;
1164
- manualUploadContinue(): void;
1165
- manualUploadReset(): void;
1166
- digitalUploadNextStep(): void;
1167
- digitalUploadPickFile(file: File): void;
1168
- digitalUploadConfirm(): void;
1169
- digitalUploadReplace(): void;
1170
- digitalUploadRetry(): void;
1171
- digitalUploadScanInstead(): void;
1172
- digitalUploadChooseAnother(): void;
1173
- };
1174
- //#endregion
1175
- export { IdErrorCode as $, createIdCaptureActor as A, IdCaptureConfig as B, CreateIdCaptureOnlyActorOptions as C, idCaptureOnlyMachine as D, IdCaptureOnlyMachine as E, CaptureOnlyResponse as F, IdCaptureInput as G, IdCaptureDependencies as H, CapturedImage as I, IdCaptureOutput as J, IdCaptureMode as K, DetectionArea as L, idCaptureMachine as M, AddBarcodeV3Response as N, CreateIdCaptureActorOptions as O, CaptureIdResponse as P, IdError as Q, DetectionStatus as R, validateUploadResponse as S, createIdCaptureOnlyActor as T, IdCaptureEvent as U, IdCaptureContext as V, IdCaptureGeometry as W, IdCapturedImageData as X, IdCaptureThresholds as Y, IdDocumentType as Z, startRecordingSession as _, AddBarcodeParams as a, MANUAL_UPLOAD_MAX_RETRIES as at, uploadIdImage as b, StartRecordingParams as c, ManualUploadTab as ct, ValidationError as d, IdFlowStep as et, addBarcode as f, processId as g, preloadIdRecordingProvider as h, createIdCaptureManagerFromActor as i, MANUAL_UPLOAD_MAX_FILE_SIZE_BYTES as it, IdCaptureMachine as j, IdCaptureActor as k, UploadIdImageParams as l, DetectionOrientation as lt, initializeIdCapture as m, IdCaptureManager as n, UploadIdResponse as nt, IdCaptureInitResult as o, ManualUploadContext as ot, barcodeToBase64 as p, IdCaptureOnlyConfig as q, IdCaptureState as r, MANUAL_UPLOAD_EXHAUSTION_FORWARD_MS as rt, InitializeIdCaptureParams as s, ManualUploadSide as st, createIdCaptureManager as t, RecordingSession as tt, UploadManualIdFileParams as u, IdCaptureSettings as ut, stopRecording as v, IdCaptureOnlyActor as w, uploadManualIdFile as x, stopStream as y, ID_ERROR_CODES as z };
770
+ export { ManualUploadSide as A, RecordingSession as C, MANUAL_UPLOAD_MAX_FILE_SIZE_BYTES as D, MANUAL_UPLOAD_EXHAUSTION_FORWARD_MS as E, Pdf417DecodeResult as F, DetectionOrientation as M, IIdCaptureCapability as N, MANUAL_UPLOAD_MAX_RETRIES as O, IdCaptureSettings as P, IdFlowStep as S, IAnalyticsCapability as T, IdCaptureThresholds as _, DetectionArea as a, IdError as b, IdCaptureConfig as c, IdCaptureEvent as d, IdCaptureGeometry as f, IdCaptureOutput as g, IdCaptureOnlyConfig as h, CapturedImage as i, ManualUploadTab as j, ManualUploadContext as k, IdCaptureContext as l, IdCaptureMode as m, CaptureIdResponse as n, DetectionStatus as o, IdCaptureInput as p, CaptureOnlyResponse as r, ID_ERROR_CODES as s, AddBarcodeV3Response as t, IdCaptureDependencies as u, IdCapturedImageData as v, UploadIdResponse as w, IdErrorCode as x, IdDocumentType as y };
@@ -0,0 +1,40 @@
1
+ //#region src/modules/redirect-to-mobile/types.d.ts
2
+ type RedirectToMobileConfig = {
3
+ flowId?: string;
4
+ url?: string;
5
+ disableSmsOption?: boolean;
6
+ addContinueToDesktop?: boolean;
7
+ qrPhishingResistance?: boolean;
8
+ authHint?: string;
9
+ externalId?: string;
10
+ lang?: string;
11
+ };
12
+ type OnboardingStatus = 'ONBOARDING_FINISHED' | 'ONBOARDING_IN_PROGRESS' | 'ONBOARDING_NOT_STARTED';
13
+ type OnboardingStatusResponse = {
14
+ onboardingStatus: OnboardingStatus;
15
+ };
16
+ type RedirectUrlResponse = {
17
+ url: string;
18
+ };
19
+ type QrRefreshResponse = {
20
+ urlUuid: string;
21
+ };
22
+ type StartInfoResponse = {
23
+ phonePrefix: string;
24
+ ipIsoCode: string;
25
+ };
26
+ type SendRedirectSmsParams = {
27
+ smsType: 'DESKTOP_ONBOARDING';
28
+ uuid: string;
29
+ params?: string[];
30
+ };
31
+ type RedirectToMobileServices = {
32
+ fetchRedirectUrl: (signal?: AbortSignal) => Promise<RedirectUrlResponse>;
33
+ fetchOnboardingStatus: (signal?: AbortSignal) => Promise<OnboardingStatusResponse>;
34
+ sendRedirectSms: (params: SendRedirectSmsParams, signal?: AbortSignal) => Promise<void>;
35
+ addPhoneForRedirect: (phone: string, signal?: AbortSignal) => Promise<void>;
36
+ refreshQrUuid: (onboardingId: string, signal?: AbortSignal) => Promise<QrRefreshResponse>;
37
+ fetchStartInfo: (signal?: AbortSignal) => Promise<StartInfoResponse>;
38
+ };
39
+ //#endregion
40
+ export { RedirectToMobileServices as n, RedirectToMobileConfig as t };
@@ -0,0 +1,64 @@
1
+ //#region src/modules/electronic-signature/types.d.ts
2
+ type ElectronicSignatureVariant = 'ae' | 'qe';
3
+ type ElectronicSignatureConfig = {
4
+ variant?: ElectronicSignatureVariant;
5
+ uploadDocument?: boolean;
6
+ downloadDocument?: boolean;
7
+ };
8
+ type ElectronicSignatureDocument = {
9
+ documentRef: string;
10
+ documentUrl: string;
11
+ };
12
+ type SignedDocument = {
13
+ /**
14
+ * Whether the signing endpoint acknowledged this document as signed. Set from
15
+ * either the AES signed-PDF URL or the QES `{ success: true }` acknowledgment.
16
+ */
17
+ signed: boolean;
18
+ /**
19
+ * URL of the signed PDF when the endpoint returns one (AES `/process/sign`).
20
+ * QES `/process/signQes` returns only `{ success: true }` with no document
21
+ * URL, so this is absent for the QE variant.
22
+ */
23
+ signedDocumentUrl?: string;
24
+ };
25
+ declare const AE_CONSENT_KEYS: readonly ["terms", "signElectronically", "signDisplayed"];
26
+ declare const QE_CONSENT_KEYS: readonly ["issuance", "qesAcknowledgement", "qscdConfirmation", "termsAgreement", "documentsReviewed"];
27
+ type AeConsentKey = (typeof AE_CONSENT_KEYS)[number];
28
+ type QeConsentKey = (typeof QE_CONSENT_KEYS)[number];
29
+ type ConsentKey = AeConsentKey | QeConsentKey;
30
+ type ConsentChecks = Partial<Record<ConsentKey, boolean>>;
31
+ declare function getConsentKeys(variant: ElectronicSignatureVariant): readonly ConsentKey[];
32
+ declare function getDefaultConsentChecks(variant: ElectronicSignatureVariant): ConsentChecks;
33
+ declare function areAllConsented(checks: ConsentChecks): boolean;
34
+ type UnsignedDocsResponse = {
35
+ documents: ElectronicSignatureDocument[];
36
+ };
37
+ type ElectronicSignatureErrorSource = 'upload' | 'fetchDocs' | 'signing';
38
+ type ElectronicSignatureContext = {
39
+ config: ElectronicSignatureConfig;
40
+ getFileData: () => ArrayBuffer | null;
41
+ documents: ElectronicSignatureDocument[];
42
+ signedDocuments: SignedDocument[];
43
+ fileName: string | null;
44
+ fileSize: number | null;
45
+ fileUrl: string | null;
46
+ /**
47
+ * Upload destination for the single document this session may hold.
48
+ * Generated exactly once (`POST /generateDocumentUploadUrl` creates a
49
+ * server-side document) and reused across upload retries so a session can
50
+ * never accumulate more than one document — see the AES "two documents"
51
+ * bug where a retry created a second, unremovable document.
52
+ */
53
+ preSignedUrl: string | null;
54
+ consentChecks: ConsentChecks;
55
+ viewingDocumentUrl: string | null;
56
+ errorMessage: string;
57
+ errorSource: ElectronicSignatureErrorSource | null;
58
+ };
59
+ type ElectronicSignatureInput = {
60
+ config: ElectronicSignatureConfig;
61
+ getFileData: () => ArrayBuffer | null;
62
+ };
63
+ //#endregion
64
+ export { ElectronicSignatureConfig as a, ElectronicSignatureInput as c, QeConsentKey as d, SignedDocument as f, getDefaultConsentChecks as g, getConsentKeys as h, ConsentKey as i, ElectronicSignatureVariant as l, areAllConsented as m, AeConsentKey as n, ElectronicSignatureContext as o, UnsignedDocsResponse as p, ConsentChecks as r, ElectronicSignatureDocument as s, AE_CONSENT_KEYS as t, QE_CONSENT_KEYS as u };
@@ -0,0 +1,48 @@
1
+ //#region src/modules/dynamic-forms/types.d.ts
2
+ /**
3
+ * Input types supported by dynamic form questions.
4
+ * `inputType` on `Question` is optional so unknown future API values degrade
5
+ * gracefully to the text fallback rather than requiring this union to be widened.
6
+ */
7
+ type InputType = 'TEXT' | 'DATE' | 'COUNTRY' | 'NATIONALITY' | 'NUMBER' | 'EMAIL' | 'PHONE' | 'CPF' | 'NAME' | 'YESNO' | 'SELECT' | 'MULTISELECT';
8
+ /**
9
+ * A single question within a dynamic form screen.
10
+ */
11
+ type Question = {
12
+ questionId: string;
13
+ /** Display label shown to the user */
14
+ question: string;
15
+ inputType?: InputType;
16
+ /** Fallback type used when `inputType` is absent */
17
+ overrides?: InputType;
18
+ isPredefined?: boolean;
19
+ isOptional?: boolean;
20
+ options?: string[];
21
+ };
22
+ /**
23
+ * A single screen within the dynamic form flow.
24
+ */
25
+ type Screen = {
26
+ title?: string;
27
+ hideTitle?: boolean;
28
+ questions: Question[];
29
+ };
30
+ /**
31
+ * Configuration for the dynamic forms module.
32
+ * Provide either `screens` (pre-loaded) or `flowId` (fetched from API).
33
+ */
34
+ type DynamicFormsConfig = {
35
+ /** Flow ID used to fetch screens from the API when `screens` is not provided */
36
+ flowId?: string;
37
+ /** Pre-loaded screens — skips the API fetch when provided */
38
+ screens?: Screen[];
39
+ /**
40
+ * Value used to prefill the sole answer of a single-question first screen (e.g.
41
+ * a login hint read from a URL param by the host). Applied only when the form
42
+ * is exactly one screen with one question; ignored otherwise. The field stays
43
+ * editable. The host reads the value — core never touches the URL.
44
+ */
45
+ prefillValue?: string;
46
+ };
47
+ //#endregion
48
+ export { Screen as i, InputType as n, Question as r, DynamicFormsConfig as t };
@@ -1,20 +1,20 @@
1
1
  import { t as WasmUtilProvider } from "./WasmUtilProvider-BrWOTaVG.esm.js";
2
- import { t as ensureWasmPipelines } from "./setup-Cx9IY17e.esm.js";
2
+ import { t as ensureWasmPipelines } from "./setup-DXdKnXXf.esm.js";
3
3
  import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BXhgNxLt.esm.js";
4
4
  import { t as api } from "./api-BDTZNnca.esm.js";
5
5
  import { t as endpoints } from "./endpoints-CfRg7iAr.esm.js";
6
+ import { d as videoSelfieWasmPipelines, l as facingModeForStep, u as resolveVideoSelfieSteps } from "./flowServices-BU1mMxoQ.esm.js";
6
7
  import { c as createManager, o as createActor, r as assign, t as setup } from "./xstate.esm-Cf4e0Cfd.esm.js";
7
8
  import { n as fromPromise, t as fromCallback } from "./xstate-actors.esm-CtI5S0f4.esm.js";
8
9
  import { t as checkPermission } from "./permissionServices-CkHL1BjH.esm.js";
9
10
  import { i as requestCameraWithFallback, r as requestCameraAccess } from "./camera-BmFEyPP_.esm.js";
10
- import { _ as StreamCanvasProcessingSession, a as encryptSelfieImage, l as startDetection, v as FaceDetectionProvider } from "./onDeviceFaceResults-CbO3AqMC.esm.js";
11
+ import { _ as StreamCanvasProcessingSession, a as encryptSelfieImage, l as startDetection, v as FaceDetectionProvider } from "./onDeviceFaceResults-CWMT6JTR.esm.js";
11
12
  import { n as getBackCameraStream } from "./backCameraStream-6XQp9RxG.esm.js";
12
13
  import { n as getWindowDimensions } from "./getDeviceClass-CeBiEayS.esm.js";
13
14
  import { t as FACE_ERROR_CODES } from "./types-BN5RPPIZ.esm.js";
14
15
  import { i as uploadSelfie, r as processFace, t as getFaceErrorCodeFromUnknown } from "./selfieErrorUtils-BAEYvNVr.esm.js";
15
16
  import { t as StreamCanvasCapture } from "./StreamCanvasCapture-D2XcXCZ4.esm.js";
16
17
  import { n as getSupportedMediaRecorderMimeType } from "./mediaRecorderOptions-CUsftWlH.esm.js";
17
- import { n as resolveVideoSelfieSteps, r as videoSelfieWasmPipelines, t as facingModeForStep } from "./videoSelfieSteps-DHcibfYH.esm.js";
18
18
  import { n as DEFAULT_ID_CAPTURE_THRESHOLDS, r as IdCaptureProvider, t as DEFAULT_ID_CAPTURE_GEOMETRY } from "./idCaptureDefaults-DCrjeNl5.esm.js";
19
19
  //#region src/modules/video-selfie/videoSelfieCompareService.ts
20
20
  async function postVideoSelfieCompare(endpoint, base64Image) {
package/dist/wasm.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { n as WasmPipeline, r as warmupWasm, t as WarmupConfig } from "./warmup-Dv2alr2-.js";
2
- import { i as initializeWasmUtil, l as upgradeToWasmHttpClient, n as WasmConfig, r as ensureWasmPipelines, s as setWasmConfig } from "./setup-BBfVpTog.js";
2
+ import { i as initializeWasmUtil, l as upgradeToWasmHttpClient, n as WasmConfig, r as ensureWasmPipelines, s as setWasmConfig } from "./setup-B1WTXTQV.js";
3
3
  //#region ../infra/src/wasm/wasmDefaults.d.ts
4
4
  /** The WASM version bundled and tested with this SDK release. */
5
5
  declare const DEFAULT_WASM_VERSION = "v2.14.07-post7-post1";
package/dist/wasm.esm.js CHANGED
@@ -1,4 +1,4 @@
1
1
  import { a as warmupWasm } from "./WasmUtilProvider-BrWOTaVG.esm.js";
2
2
  import { a as resolveWasmConfig, n as buildDefaultWasmConfig, r as buildWasmConfigFromBasePath, t as DEFAULT_WASM_VERSION } from "./wasmDefaults-B4DUtYET.esm.js";
3
- import { a as setWasmConfig, n as initializeWasmUtil, s as upgradeToWasmHttpClient, t as ensureWasmPipelines } from "./setup-Cx9IY17e.esm.js";
3
+ import { a as setWasmConfig, n as initializeWasmUtil, s as upgradeToWasmHttpClient, t as ensureWasmPipelines } from "./setup-DXdKnXXf.esm.js";
4
4
  export { DEFAULT_WASM_VERSION, buildDefaultWasmConfig, buildWasmConfigFromBasePath, ensureWasmPipelines, initializeWasmUtil, resolveWasmConfig, setWasmConfig, upgradeToWasmHttpClient, warmupWasm };
@@ -320,6 +320,10 @@ declare const workflowMachine: StateMachine<WorkflowContext, {
320
320
  id: string | undefined;
321
321
  };
322
322
  }>, Values<{
323
+ setError: {
324
+ type: "setError";
325
+ params: NonReducibleUnknown;
326
+ };
323
327
  setLoadingResult: {
324
328
  type: "setLoadingResult";
325
329
  params: NonReducibleUnknown;
@@ -348,10 +352,6 @@ declare const workflowMachine: StateMachine<WorkflowContext, {
348
352
  type: "setFinishStatusFailed";
349
353
  params: NonReducibleUnknown;
350
354
  };
351
- setError: {
352
- type: "setError";
353
- params: NonReducibleUnknown;
354
- };
355
355
  setModuleError: {
356
356
  type: "setModuleError";
357
357
  params: NonReducibleUnknown;