@incodetech/core 0.0.0-dev-20260729-9e7b030a → 0.0.0-dev-20260729-a31df3b7

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 (87) hide show
  1. package/dist/{FaceDetectionProvider-BHweGBEM.d.ts → FaceDetectionProvider-Mh6q3EbA.d.ts} +1 -2
  2. package/dist/IIdCaptureCapability-Cj_aceph.d.ts +231 -0
  3. package/dist/{IStorageCapability-B8IGxCwe.d.ts → IStorageCapability-ORkQfK3F.d.ts} +112 -1
  4. package/dist/ae-signature.esm.js +1 -1
  5. package/dist/{apiError-CzR7Y6Ua.esm.js → apiError-CS9ZMDr2.esm.js} +1 -1
  6. package/dist/authentication.d.ts +3 -3
  7. package/dist/authentication.esm.js +2 -2
  8. package/dist/{authenticationManager-CmkHvt7_.esm.js → authenticationManager-Cd4tefr2.esm.js} +2 -2
  9. package/dist/{authenticationManager-BGM8bpD0.d.ts → authenticationManager-Y2_MuGXy.d.ts} +1 -1
  10. package/dist/{authenticationStateMachine-O3acuOqq.esm.js → authenticationStateMachine-BnH1mizY.esm.js} +2 -2
  11. package/dist/consent.d.ts +1 -1
  12. package/dist/{consentManager-uhDPdU6i.d.ts → consentManager-5HWbGwOa.d.ts} +9 -9
  13. package/dist/{deepsightLoader-CaUpu0Dy.esm.js → deepsightLoader-CN4B5ugn.esm.js} +3 -3
  14. package/dist/{deepsightService-CR-CYdka.d.ts → deepsightService-DLVQS_RH.d.ts} +2 -112
  15. package/dist/document-capture.d.ts +1 -1
  16. package/dist/document-upload.d.ts +4 -4
  17. package/dist/{documentCaptureManager-pEqMY_Oo.d.ts → documentCaptureManager-DeSYkGWc.d.ts} +70 -70
  18. package/dist/dynamic-forms.esm.js +2 -2
  19. package/dist/{dynamicFormsManager-BxUgij0L.esm.js → dynamicFormsManager-B80PGYEF.esm.js} +1 -1
  20. package/dist/{dynamicFormsStateMachine-D0cEsDMH.esm.js → dynamicFormsStateMachine-B7R09HRI.esm.js} +1 -1
  21. package/dist/ekyb.esm.js +3 -3
  22. package/dist/{ekybManager-LicVPYug.esm.js → ekybManager-Cg_boKM5.esm.js} +1 -1
  23. package/dist/{ekybStateMachine-IgLa1nXx.esm.js → ekybStateMachine-CAXjJ2gA.esm.js} +1 -1
  24. package/dist/electronic-signature.esm.js +1 -1
  25. package/dist/{electronicSignatureManager-DqPJCXMG.esm.js → electronicSignatureManager-JuycNykG.esm.js} +1 -1
  26. package/dist/extensibility.d.ts +14 -14
  27. package/dist/extensibility.esm.js +8 -8
  28. package/dist/{faceCaptureManagerFactory-2W_XduCs.esm.js → faceCaptureManagerFactory-Cd1uQnGS.esm.js} +1 -1
  29. package/dist/{faceCaptureManagerFactory-B92LFT16.d.ts → faceCaptureManagerFactory-K8iLKaRl.d.ts} +5 -4
  30. package/dist/{faceCaptureSetup-D-9s0vUS.esm.js → faceCaptureSetup-CS7exiIh.esm.js} +3 -2
  31. package/dist/flow.d.ts +5 -5
  32. package/dist/flow.esm.js +3 -3
  33. package/dist/{flowCompletionService-D_DJ1dNA.esm.js → flowCompletionService-C77_-GvG.esm.js} +1 -1
  34. package/dist/{flowServices-ZgW3UGcz.esm.js → flowServices-BuSZYjB9.esm.js} +3 -3
  35. package/dist/geolocation.esm.js +2 -2
  36. package/dist/{geolocationManager-oLdeMbdy.esm.js → geolocationManager-D2ptN5BO.esm.js} +1 -1
  37. package/dist/{geolocationStateMachine-CSDKlrHE.esm.js → geolocationStateMachine-fOQUnMxw.esm.js} +1 -1
  38. package/dist/id-ocr.d.ts +1 -1
  39. package/dist/id-selfie-flow.d.ts +179 -0
  40. package/dist/id-selfie-flow.esm.js +917 -0
  41. package/dist/id.d.ts +3 -2
  42. package/dist/id.esm.js +3 -2
  43. package/dist/{idCaptureManager-DAsfVDWq.esm.js → idCaptureManager-BokR8KKO.esm.js} +2 -1
  44. package/dist/{idCaptureManager-B2w2CGuV.d.ts → idCaptureManager-wKz4MXR8.d.ts} +10 -2
  45. package/dist/idCaptureServices-C3nAZ64o.esm.js +353 -0
  46. package/dist/{idCaptureStateMachine-BMZCf9M7.esm.js → idCaptureStateMachine-CM8EP_MM.esm.js} +38 -374
  47. package/dist/{idOcrManager-DXc_xRN7.d.ts → idOcrManager-dLuxey6y.d.ts} +1 -1
  48. package/dist/identity-reuse.d.ts +1 -1
  49. package/dist/{identityReuseManager-v2TH5g7e.d.ts → identityReuseManager-D6pD4hcZ.d.ts} +1 -1
  50. package/dist/index.esm.js +1 -1
  51. package/dist/mandatory-consent.d.ts +2 -2
  52. package/dist/{mandatoryConsentManager-DOZSFZA2.d.ts → mandatoryConsentManager-DXlHM88Z.d.ts} +6 -6
  53. package/dist/manualReviewService-BnFXpAg9.esm.js +15 -0
  54. package/dist/{onDeviceFaceResults-D8FzOXsM.esm.js → onDeviceFaceResults-DFEU5wcC.esm.js} +3 -3
  55. package/dist/personhood.d.ts +4 -4
  56. package/dist/personhood.esm.js +3 -3
  57. package/dist/qe-signature.esm.js +1 -1
  58. package/dist/{recordingService-D6Hbc408.esm.js → recordingService-BwaHFQSV.esm.js} +2 -16
  59. package/dist/redirect-to-mobile.d.ts +2 -2
  60. package/dist/{redirectToMobileManager-BiVH2Ymm.d.ts → redirectToMobileManager-BD2PvT5B.d.ts} +1 -1
  61. package/dist/{runChildModule-CVKUUVl2.esm.js → runChildModule-1jsZfyb9.esm.js} +1 -1
  62. package/dist/selfie.d.ts +4 -4
  63. package/dist/selfie.esm.js +4 -4
  64. package/dist/{selfieManager-Cnw55Hp_.esm.js → selfieManager-hwv10r0j.esm.js} +2 -2
  65. package/dist/{selfieManager-CxeMb2tM.d.ts → selfieManager-tMxWiUk6.d.ts} +1 -1
  66. package/dist/{selfieStateMachine-D-wolitw.esm.js → selfieStateMachine-Cwb5y4OR.esm.js} +2 -2
  67. package/dist/{session-XugVyrIq.esm.js → session-DWfXLkyx.esm.js} +4 -4
  68. package/dist/session.esm.js +4 -4
  69. package/dist/{sessionInitializer-B3g2uAsl.esm.js → sessionInitializer-B58TmxdW.esm.js} +2 -2
  70. package/dist/{setup-BVuwm-QH.esm.js → setup-sxUVsl_J.esm.js} +4 -4
  71. package/dist/trueSight-D7YiTge6.esm.js +1 -0
  72. package/dist/{trueSightService-DGkNMx-E.esm.js → trueSightService-BIbE2pK1.esm.js} +1 -1
  73. package/dist/{types-4-pU2Nhm.d.ts → types-BsTkSXlg2.d.ts} +13 -232
  74. package/dist/{types-CrUhpMDP.d.ts → types-EELWyWpd.d.ts} +1 -1
  75. package/dist/{types-BBQjIaK4.d.ts → types-Hmd7U0JA.d.ts} +1 -1
  76. package/dist/video-selfie.d.ts +8 -100
  77. package/dist/video-selfie.esm.js +17 -608
  78. package/dist/videoSelfieCameraWarmer-lG-12ONu.esm.js +614 -0
  79. package/dist/videoSelfieStepDetector-144x423X.d.ts +117 -0
  80. package/dist/wasm.esm.js +1 -1
  81. package/dist/workflow.d.ts +1 -1
  82. package/dist/workflow.esm.js +14 -14
  83. package/package.json +8 -3
  84. package/dist/trueSight-DWfPmAL_.esm.js +0 -1
  85. /package/dist/{types-BX_XkMsQ.d.ts → types-BX_XkMsQ2.d.ts} +0 -0
  86. /package/dist/{types-BfgmV7s72.d.ts → types-BfgmV7s7.d.ts} +0 -0
  87. /package/dist/{types-DPIDuhut2.d.ts → types-DPIDuhut.d.ts} +0 -0
@@ -0,0 +1,117 @@
1
+ import { t as CameraStream } from "./camera-9wWD-pwg.js";
2
+ import { i as FlowModuleConfig } from "./types-KPvmag_B.js";
3
+ import { n as DetectionStatus } from "./types-Hmd7U0JA.js";
4
+ import { t as DetectionOrientation } from "./IIdCaptureCapability-Cj_aceph.js";
5
+ //#region src/modules/video-selfie/types.d.ts
6
+ /**
7
+ * The capture steps a Video Selfie session can run, in flow order. Which steps
8
+ * are active is derived from the module config (e.g. `checkIdScan` enables
9
+ * `frontId`/`backId`, `checkVoiceConsent` enables `speech`).
10
+ */
11
+ type VideoSelfieStep = 'selfie' | 'frontId' | 'backId' | 'poa' | 'questions' | 'speech';
12
+ /**
13
+ * Public Video Selfie configuration. Mirrors the backend `VIDEO_ONBOARDING`
14
+ * workflow module.
15
+ *
16
+ * The whole session is recorded on-device and streamed to the backend via S3
17
+ * multipart upload (`internal/recordings/multipartRecordingService`) — the
18
+ * client-side replacement for V1's server-side OpenVidu recording. See
19
+ * `docs/features/VIDEO_SELFIE.md`.
20
+ */
21
+ type VideoSelfieConfig = FlowModuleConfig['VIDEO_ONBOARDING'];
22
+ //#endregion
23
+ //#region ../infra/src/capabilities/ICameraCapability.d.ts
24
+ type FacingMode = 'user' | 'environment';
25
+ //#endregion
26
+ //#region ../infra/src/media/CameraCompositor.d.ts
27
+ type CameraCompositorOptions = {
28
+ fps?: number;
29
+ };
30
+ /**
31
+ * Composites the *active* camera into a canvas and exposes the canvas as a
32
+ * single, stable `MediaStream` to record. Switching cameras (front ↔ back)
33
+ * just repoints what the canvas draws — the output stream and its audio track
34
+ * are never replaced — so a single `MediaRecorder` produces one continuous
35
+ * video that follows the camera switches (V1 parity), instead of restarting
36
+ * per camera.
37
+ *
38
+ * The audio track from the initial stream is carried through unchanged across
39
+ * video switches, so there's no audio glitch when the camera flips.
40
+ */
41
+ declare class CameraCompositor {
42
+ private readonly fps;
43
+ private readonly frameIntervalMs;
44
+ private canvas;
45
+ private ctx;
46
+ private video;
47
+ private frameRequestId;
48
+ private frameRequestKind;
49
+ private lastDrawTimeMs;
50
+ private lastVideoTimeSeconds;
51
+ private audioTrack;
52
+ private videoTrack;
53
+ private composite;
54
+ constructor(options?: CameraCompositorOptions);
55
+ /**
56
+ * Begin compositing `stream` and return the composite stream to record. The
57
+ * stream's audio track (if any) is carried through unchanged across later
58
+ * `switchVideo` calls.
59
+ */
60
+ start(stream: CameraStream): MediaStream;
61
+ /**
62
+ * Swap the camera feeding the canvas without interrupting the composite
63
+ * stream. Pass a video-only stream (audio is kept from `start`). The previous
64
+ * video track is stopped.
65
+ */
66
+ switchVideo(stream: CameraStream): void;
67
+ /** The composite stream being recorded, if compositing is active. */
68
+ get stream(): MediaStream | undefined;
69
+ /** Stop compositing and release the canvas, audio, and video tracks. */
70
+ stop(): void;
71
+ private setVideoSource;
72
+ private startDrawLoop;
73
+ private scheduleNextFrame;
74
+ private cancelDrawLoop;
75
+ private drawCurrentFrame;
76
+ private getBoundedDimensions;
77
+ }
78
+ //#endregion
79
+ //#region src/modules/video-selfie/videoSelfieStepDetector.d.ts
80
+ type VideoSelfieDetectionStatus = DetectionStatus | 'wrongSide';
81
+ type VideoSelfieValidationFailure = 'selfieVerificationFailed' | 'nameVerificationFailed' | 'photoVerificationFailed' | 'idTypeMismatch' | 'idScanFailed';
82
+ type StepDetectionResult = {
83
+ outcome: 'success';
84
+ } | {
85
+ outcome: 'validationFailed';
86
+ failure: VideoSelfieValidationFailure;
87
+ } | {
88
+ outcome: 'retryableFailure';
89
+ failure: 'idScanFailed';
90
+ };
91
+ /**
92
+ * Runs the WASM detection + backend validation for a single capture step over
93
+ * the given camera stream. Returns either success or a typed validation
94
+ * failure, rejects on technical failures, and never settles for manual steps.
95
+ */
96
+ type StepDetector = (params: {
97
+ step: VideoSelfieStep;
98
+ stream: MediaStream;
99
+ signal: AbortSignal;
100
+ onStatus?: (status: VideoSelfieDetectionStatus) => void;
101
+ /**
102
+ * Live ID orientation from the detector (regular ID pipeline only), so the
103
+ * mask can follow a rotated document. The Video Selfie detector never emits
104
+ * it — its simplified ID pipeline reports no orientation.
105
+ */
106
+ onOrientation?: (orientation: DetectionOrientation) => void;
107
+ /**
108
+ * Hands the caller a trigger that captures + uploads the current frame
109
+ * (regular ID pipeline only). The detector reports `manualCapture` via
110
+ * `onStatus` when autocapture times out; the host then shows a capture
111
+ * button wired to this trigger. The Video Selfie detector never registers
112
+ * one.
113
+ */
114
+ registerManualCapture?: (trigger: () => void) => void;
115
+ }) => Promise<StepDetectionResult>;
116
+ //#endregion
117
+ export { FacingMode as a, CameraCompositor as i, VideoSelfieDetectionStatus as n, VideoSelfieConfig as o, VideoSelfieValidationFailure as r, VideoSelfieStep as s, StepDetector as t };
package/dist/wasm.esm.js CHANGED
@@ -1,4 +1,4 @@
1
1
  import { a as resolveWasmConfig, n as buildDefaultWasmConfig, r as buildWasmConfigFromBasePath, t as DEFAULT_WASM_VERSION } from "./wasmDefaults-DJiEvV7f.esm.js";
2
2
  import { a as warmupWasm } from "./WasmUtilProvider-D13sxEmA.esm.js";
3
- import { a as setWasmConfig, n as initializeWasmUtil, s as upgradeToWasmHttpClient, t as ensureWasmPipelines } from "./setup-BVuwm-QH.esm.js";
3
+ import { a as setWasmConfig, n as initializeWasmUtil, s as upgradeToWasmHttpClient, t as ensureWasmPipelines } from "./setup-sxUVsl_J.esm.js";
4
4
  export { DEFAULT_WASM_VERSION, buildDefaultWasmConfig, buildWasmConfigFromBasePath, ensureWasmPipelines, initializeWasmUtil, resolveWasmConfig, setWasmConfig, upgradeToWasmHttpClient, warmupWasm };
@@ -4,7 +4,7 @@ import "./StateMachine-EDpYWy0i.js";
4
4
  import { t as Manager } from "./Manager-CQQ99QOI.js";
5
5
  import { a as TotalScore, i as GetTotalScoreStatusFn, n as FinishStatus, r as GetFinishStatusFn } from "./flowCompletionService-BlAHsKyv.js";
6
6
  import { o as FlowEventSubscribable } from "./index-CLMF0QLQ.js";
7
- import { a as WorkflowModuleRegistry, i as RunChildModuleInput, r as RunChildModuleEvent, t as ModuleConfigMappers } from "./types-BfgmV7s72.js";
7
+ import { a as WorkflowModuleRegistry, i as RunChildModuleInput, r as RunChildModuleEvent, t as ModuleConfigMappers } from "./types-BfgmV7s7.js";
8
8
  //#region src/modules/workflow/types.d.ts
9
9
  /** Possible node types returned by the workflow server. */
10
10
  type WorkflowNodeType = 'MODULE' | 'FINISH' | 'ASYNC_RESOLUTION';
@@ -1,41 +1,41 @@
1
1
  import { _ as updateFeatureManagementUser } from "./feature-management-CFRmD8Nr.esm.js";
2
2
  import { t as api } from "./api-Bx3gKW_y.esm.js";
3
- import { l as trueSightLog } from "./trueSightService-DGkNMx-E.esm.js";
3
+ import { l as trueSightLog } from "./trueSightService-BIbE2pK1.esm.js";
4
4
  import { n as eventModuleNames, o as createManagerInstrumentation, v as addEvent } from "./events-ethtfu2b.esm.js";
5
- import { i as initializeSession, r as getSessionFingerprintResult } from "./sessionInitializer-B3g2uAsl.esm.js";
5
+ import { i as initializeSession, r as getSessionFingerprintResult } from "./sessionInitializer-B58TmxdW.esm.js";
6
6
  import { t as endpoints } from "./endpoints-DOfmJylF.esm.js";
7
- import "./trueSight-DWfPmAL_.esm.js";
8
- import { r as toIncodeApiError } from "./apiError-CzR7Y6Ua.esm.js";
9
- import { g as toEkybConfig } from "./flowServices-ZgW3UGcz.esm.js";
7
+ import "./trueSight-D7YiTge6.esm.js";
8
+ import { r as toIncodeApiError } from "./apiError-CS9ZMDr2.esm.js";
9
+ import { g as toEkybConfig } from "./flowServices-BuSZYjB9.esm.js";
10
10
  import { i as toEkycConfig } from "./ekycUtils-Dew1rBG0.esm.js";
11
11
  import { c as createManager, o as createActor, r as assign, t as setup } from "./xstate.esm-Cf4e0Cfd.esm.js";
12
12
  import { n as fromPromise } from "./xstate-actors.esm-CtI5S0f4.esm.js";
13
- import { n as electronicSignatureMachine } from "./electronicSignatureManager-DqPJCXMG.esm.js";
13
+ import { n as electronicSignatureMachine } from "./electronicSignatureManager-JuycNykG.esm.js";
14
14
  import "./ae-signature.esm.js";
15
15
  import { t as antifraudMachine } from "./antifraudStateMachine-NuzlVVte.esm.js";
16
- import { t as authenticationMachine } from "./authenticationStateMachine-O3acuOqq.esm.js";
16
+ import { t as authenticationMachine } from "./authenticationStateMachine-BnH1mizY.esm.js";
17
17
  import { t as certificateIssuanceMachine } from "./certificateIssuanceStateMachine-N__sTAgu.esm.js";
18
18
  import { t as consentMachine } from "./consentStateMachine-DWL-X0Jb.esm.js";
19
19
  import { t as curpValidationMachine } from "./curpValidationStateMachine-42RbYcam.esm.js";
20
20
  import { t as customWatchlistMachine } from "./customWatchlistStateMachine-BbDtH5kk.esm.js";
21
21
  import { t as documentCaptureMachine } from "./documentCaptureStateMachine-DAR7pkTk.esm.js";
22
- import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-D0cEsDMH.esm.js";
23
- import { t as ekybMachine } from "./ekybStateMachine-IgLa1nXx.esm.js";
22
+ import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-B7R09HRI.esm.js";
23
+ import { t as ekybMachine } from "./ekybStateMachine-CAXjJ2gA.esm.js";
24
24
  import { t as ekycMachine } from "./ekycStateMachine-Yl3sQmhm.esm.js";
25
25
  import { t as emailMachine } from "./emailStateMachine-CLtrh2Ot.esm.js";
26
- import { t as selfieMachine } from "./selfieStateMachine-D-wolitw.esm.js";
27
- import { t as idCaptureMachine } from "./idCaptureStateMachine-BMZCf9M7.esm.js";
26
+ import { t as selfieMachine } from "./selfieStateMachine-Cwb5y4OR.esm.js";
27
+ import { t as idCaptureMachine } from "./idCaptureStateMachine-CM8EP_MM.esm.js";
28
28
  import { t as phoneMachine } from "./phoneStateMachine-FJ-_x1G4.esm.js";
29
29
  import { t as watchlistMachine } from "./watchlistStateMachine-DZSOauwp.esm.js";
30
30
  import { n as identityReuseMachine } from "./identityReuseStateMachine-DG8kbKuy.esm.js";
31
31
  import { t as mandatoryConsentMachine } from "./mandatoryConsentStateMachine-CjKpOQXU.esm.js";
32
32
  import { t as idOcrStateMachine } from "./idOcrStateMachine-s08FLvEh.esm.js";
33
33
  import { n as redirectToMobileMachine } from "./redirectToMobileStateMachine-jI5XPtZJ.esm.js";
34
- import { t as geolocationMachine } from "./geolocationStateMachine-CSDKlrHE.esm.js";
34
+ import { t as geolocationMachine } from "./geolocationStateMachine-fOQUnMxw.esm.js";
35
35
  import { t as idVerificationMachine } from "./idVerificationStateMachine-tAF7pvC8.esm.js";
36
36
  import { t as faceMatchMachine } from "./faceMatchStateMachine-ubds4WlI.esm.js";
37
- import { n as getFinishStatus, r as getTotalScoreStatus } from "./flowCompletionService-D_DJ1dNA.esm.js";
38
- import { n as isAdvanceableError, r as attachFlowEventEmitter, t as runChildModule } from "./runChildModule-CVKUUVl2.esm.js";
37
+ import { n as getFinishStatus, r as getTotalScoreStatus } from "./flowCompletionService-C77_-GvG.esm.js";
38
+ import { n as isAdvanceableError, r as attachFlowEventEmitter, t as runChildModule } from "./runChildModule-1jsZfyb9.esm.js";
39
39
  import { t as governmentValidationMachine } from "./governmentValidationStateMachine-CtG3bIdM.esm.js";
40
40
  import "./qe-signature.esm.js";
41
41
  import { t as signatureMachine } from "./signatureStateMachine-Dx92l8pR.esm.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@incodetech/core",
3
- "version": "0.0.0-dev-20260729-9e7b030a",
3
+ "version": "0.0.0-dev-20260729-a31df3b7",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/IncodeTechnologies/incode-web-sdk.git"
@@ -44,6 +44,11 @@
44
44
  "types": "./dist/video-selfie.d.ts",
45
45
  "import": "./dist/video-selfie.esm.js"
46
46
  },
47
+ "./id-selfie-flow": {
48
+ "source": "./src/modules/id-selfie-flow/index.ts",
49
+ "types": "./dist/id-selfie-flow.d.ts",
50
+ "import": "./dist/id-selfie-flow.esm.js"
51
+ },
47
52
  "./personhood": {
48
53
  "source": "./src/modules/personhood/index.ts",
49
54
  "types": "./dist/personhood.d.ts",
@@ -276,8 +281,8 @@
276
281
  "tsdown": "^0.22.8",
277
282
  "typescript": "^5.9.3",
278
283
  "vitest": "4.1.4",
279
- "@incodetech/config": "1.0.2",
280
- "@incodetech/infra": "1.2.0"
284
+ "@incodetech/infra": "1.2.0",
285
+ "@incodetech/config": "1.0.2"
281
286
  },
282
287
  "scripts": {
283
288
  "build": "tsdown -c tsdown.config.ts",
@@ -1 +0,0 @@
1
- import "./trueSightService-DGkNMx-E.esm.js";