@incodetech/web 0.0.0-dev-20260622-1afbb270 → 0.0.0-dev-20260623-132ddef6

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 (36) hide show
  1. package/dist/face-match/face-match.es.js +1 -1
  2. package/dist/{faceMatch-Dez_bq3n.js → faceMatch-BSrFwS4c.js} +1 -1
  3. package/dist/faceMatch-D_uyeaBt.js +2 -0
  4. package/dist/flow/flow.es.js +1 -1
  5. package/dist/types/ae-signature.d.ts +23 -1
  6. package/dist/types/antifraud.d.ts +23 -1
  7. package/dist/types/authentication.d.ts +23 -1
  8. package/dist/types/certificate-issuance.d.ts +23 -1
  9. package/dist/types/consent.d.ts +23 -1
  10. package/dist/types/cross-document-data-match.d.ts +23 -1
  11. package/dist/types/curp-validation.d.ts +23 -1
  12. package/dist/types/document-capture.d.ts +23 -1
  13. package/dist/types/ekyb.d.ts +23 -1
  14. package/dist/types/ekyc.d.ts +23 -1
  15. package/dist/types/electronic-signature.d.ts +23 -1
  16. package/dist/types/email.d.ts +23 -1
  17. package/dist/types/extensibility.d.ts +23 -1
  18. package/dist/types/face-match.d.ts +23 -1
  19. package/dist/types/field-comparison.d.ts +23 -1
  20. package/dist/types/fiscal-qr.d.ts +23 -1
  21. package/dist/types/flow.d.ts +23 -1
  22. package/dist/types/geolocation.d.ts +23 -1
  23. package/dist/types/governmentValidation.d.ts +23 -1
  24. package/dist/types/id-verification.d.ts +23 -1
  25. package/dist/types/id.d.ts +23 -1
  26. package/dist/types/identity-reuse.d.ts +23 -1
  27. package/dist/types/phone.d.ts +23 -1
  28. package/dist/types/qe-signature.d.ts +23 -1
  29. package/dist/types/selfie.d.ts +23 -1
  30. package/dist/types/signature.d.ts +23 -1
  31. package/dist/types/watchlist.d.ts +23 -1
  32. package/dist/types/workflow.d.ts +23 -1
  33. package/dist/{useModuleLoader-Kt78XfNR.js → useModuleLoader-BNE_xKwo.js} +1 -1
  34. package/dist/workflow/workflow.es.js +8 -6
  35. package/package.json +2 -2
  36. package/dist/faceMatch-C0-RPzrc.js +0 -2
@@ -1,2 +1,2 @@
1
- import { t as FaceMatch } from "../faceMatch-Dez_bq3n.js";
1
+ import { t as FaceMatch } from "../faceMatch-BSrFwS4c.js";
2
2
  export { FaceMatch };
@@ -291,7 +291,7 @@ var FaceMatchContent = ({ config, onFinish, onError }) => {
291
291
  className: "IncodeFaceMatchLivenessContainer IncodeFaceMatchLivenessVisible",
292
292
  children: /* @__PURE__ */ u(Snackbar, {
293
293
  variant: liveness ? "positive" : "negative",
294
- children: t(liveness ? "faceMatch.livenessSuccess" : "faceMatch.livenessFailed")
294
+ children: t(liveness ? "matchUser.livenessSuccess" : "matchUser.livenessFailed")
295
295
  })
296
296
  }),
297
297
  showResult && /* @__PURE__ */ u("div", {
@@ -0,0 +1,2 @@
1
+ import { t as FaceMatch } from "./faceMatch-BSrFwS4c.js";
2
+ export { FaceMatch };
@@ -5,7 +5,7 @@ import { c as useManager } from "../hooks-Da_yP_Dr.js";
5
5
  import { t as IncodeComponent } from "../incodeComponent-Cmi1rlWs.js";
6
6
  import { t as TransitionSpinner } from "../transitionSpinner-4rPkt-KM.js";
7
7
  import { t as registerIncodeModuleElement } from "../incodeModule-M8DszCee.js";
8
- import { _ as warmupWasmIfNeeded, a as resolveApiKey, c as HEADLESS_FLOW_MODULE_KEYS, d as fetchTheme, f as initializeFlowManager, h as preloadRedirectToMobile, l as LAZY_UI_MODULES, m as preloadHomeScreen, n as useModulePreloader, o as extractIncodeStatus, p as preloadFirstModule, r as usePrefetchNextModule, s as UnsupportedModule, t as useModuleLoader, u as createFlowManager, y as TerminalErrorPage } from "../useModuleLoader-Kt78XfNR.js";
8
+ import { _ as warmupWasmIfNeeded, a as resolveApiKey, c as HEADLESS_FLOW_MODULE_KEYS, d as fetchTheme, f as initializeFlowManager, h as preloadRedirectToMobile, l as LAZY_UI_MODULES, m as preloadHomeScreen, n as useModulePreloader, o as extractIncodeStatus, p as preloadFirstModule, r as usePrefetchNextModule, s as UnsupportedModule, t as useModuleLoader, u as createFlowManager, y as TerminalErrorPage } from "../useModuleLoader-BNE_xKwo.js";
9
9
  import { getDeviceClass } from "@incodetech/core/device";
10
10
  import { getRequiredWasmPipelines } from "@incodetech/core/flow";
11
11
  import { bootstrapSession, refreshQrUrlUuid } from "@incodetech/core/session";
@@ -5,6 +5,26 @@ export declare const AeSignature: FC<AeSignatureModuleProps>;
5
5
 
6
6
  declare type AeSignatureModuleProps = IncodeModuleProps<AeSignatureConfig>;
7
7
 
8
+ /**
9
+ * Extra context passed to `onFinish` alongside the result. Lets a host decide
10
+ * how to react to the terminal state without inspecting the DOM. Only the
11
+ * workflow module sets these fields today.
12
+ */
13
+ declare type IncodeFinishMeta = {
14
+ /**
15
+ * True when the SDK owns the terminal screen — it has already rendered its
16
+ * own finish UI (today, the workflow's `showFinishScreenBySessionStatus`
17
+ * screen), so the host should not render its own completion screen on top.
18
+ * `onFinish` still fires so the host can run side effects (e.g. notify an
19
+ * OAuth parent).
20
+ *
21
+ * Advisory only: the SDK cannot stop a host from rendering. This works solely
22
+ * because the host reads this flag — a host that ignores it will still
23
+ * replace the SDK screen. Not a guarantee.
24
+ */
25
+ sdkOwnsTerminalScreen?: boolean;
26
+ };
27
+
8
28
  declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
9
29
  /**
10
30
  * Module configuration required to render the flow.
@@ -18,8 +38,10 @@ declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
18
38
  /**
19
39
  * Callback invoked when the module completes successfully.
20
40
  * @param result - Optional result data from the module completion
41
+ * @param meta - Optional context about how the module resolved (e.g. whether
42
+ * the SDK rendered its own terminal finish screen). See {@link IncodeFinishMeta}.
21
43
  */
22
- onFinish?: (result?: TResult) => void;
44
+ onFinish?: (result?: TResult, meta?: IncodeFinishMeta) => void;
23
45
  /**
24
46
  * Callback invoked when a fatal module error occurs.
25
47
  *
@@ -6,6 +6,26 @@ export declare const Antifraud: FC<AntifraudProps>;
6
6
 
7
7
  declare type AntifraudProps = IncodeModuleProps<AntifraudConfig, void, AntifraudManager>;
8
8
 
9
+ /**
10
+ * Extra context passed to `onFinish` alongside the result. Lets a host decide
11
+ * how to react to the terminal state without inspecting the DOM. Only the
12
+ * workflow module sets these fields today.
13
+ */
14
+ declare type IncodeFinishMeta = {
15
+ /**
16
+ * True when the SDK owns the terminal screen — it has already rendered its
17
+ * own finish UI (today, the workflow's `showFinishScreenBySessionStatus`
18
+ * screen), so the host should not render its own completion screen on top.
19
+ * `onFinish` still fires so the host can run side effects (e.g. notify an
20
+ * OAuth parent).
21
+ *
22
+ * Advisory only: the SDK cannot stop a host from rendering. This works solely
23
+ * because the host reads this flag — a host that ignores it will still
24
+ * replace the SDK screen. Not a guarantee.
25
+ */
26
+ sdkOwnsTerminalScreen?: boolean;
27
+ };
28
+
9
29
  declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
10
30
  /**
11
31
  * Module configuration required to render the flow.
@@ -19,8 +39,10 @@ declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
19
39
  /**
20
40
  * Callback invoked when the module completes successfully.
21
41
  * @param result - Optional result data from the module completion
42
+ * @param meta - Optional context about how the module resolved (e.g. whether
43
+ * the SDK rendered its own terminal finish screen). See {@link IncodeFinishMeta}.
22
44
  */
23
- onFinish?: (result?: TResult) => void;
45
+ onFinish?: (result?: TResult, meta?: IncodeFinishMeta) => void;
24
46
  /**
25
47
  * Callback invoked when a fatal module error occurs.
26
48
  *
@@ -8,6 +8,26 @@ declare type AuthenticationProps = IncodeModuleProps<AuthenticationConfig & {
8
8
  authHint?: string;
9
9
  }, void, AuthenticationManager>;
10
10
 
11
+ /**
12
+ * Extra context passed to `onFinish` alongside the result. Lets a host decide
13
+ * how to react to the terminal state without inspecting the DOM. Only the
14
+ * workflow module sets these fields today.
15
+ */
16
+ declare type IncodeFinishMeta = {
17
+ /**
18
+ * True when the SDK owns the terminal screen — it has already rendered its
19
+ * own finish UI (today, the workflow's `showFinishScreenBySessionStatus`
20
+ * screen), so the host should not render its own completion screen on top.
21
+ * `onFinish` still fires so the host can run side effects (e.g. notify an
22
+ * OAuth parent).
23
+ *
24
+ * Advisory only: the SDK cannot stop a host from rendering. This works solely
25
+ * because the host reads this flag — a host that ignores it will still
26
+ * replace the SDK screen. Not a guarantee.
27
+ */
28
+ sdkOwnsTerminalScreen?: boolean;
29
+ };
30
+
11
31
  declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
12
32
  /**
13
33
  * Module configuration required to render the flow.
@@ -21,8 +41,10 @@ declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
21
41
  /**
22
42
  * Callback invoked when the module completes successfully.
23
43
  * @param result - Optional result data from the module completion
44
+ * @param meta - Optional context about how the module resolved (e.g. whether
45
+ * the SDK rendered its own terminal finish screen). See {@link IncodeFinishMeta}.
24
46
  */
25
- onFinish?: (result?: TResult) => void;
47
+ onFinish?: (result?: TResult, meta?: IncodeFinishMeta) => void;
26
48
  /**
27
49
  * Callback invoked when a fatal module error occurs.
28
50
  *
@@ -8,6 +8,26 @@ declare type CertificateIssuanceProps = IncodeModuleProps<CertificateIssuanceCon
8
8
  manager?: CertificateIssuanceManager;
9
9
  };
10
10
 
11
+ /**
12
+ * Extra context passed to `onFinish` alongside the result. Lets a host decide
13
+ * how to react to the terminal state without inspecting the DOM. Only the
14
+ * workflow module sets these fields today.
15
+ */
16
+ declare type IncodeFinishMeta = {
17
+ /**
18
+ * True when the SDK owns the terminal screen — it has already rendered its
19
+ * own finish UI (today, the workflow's `showFinishScreenBySessionStatus`
20
+ * screen), so the host should not render its own completion screen on top.
21
+ * `onFinish` still fires so the host can run side effects (e.g. notify an
22
+ * OAuth parent).
23
+ *
24
+ * Advisory only: the SDK cannot stop a host from rendering. This works solely
25
+ * because the host reads this flag — a host that ignores it will still
26
+ * replace the SDK screen. Not a guarantee.
27
+ */
28
+ sdkOwnsTerminalScreen?: boolean;
29
+ };
30
+
11
31
  declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
12
32
  /**
13
33
  * Module configuration required to render the flow.
@@ -21,8 +41,10 @@ declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
21
41
  /**
22
42
  * Callback invoked when the module completes successfully.
23
43
  * @param result - Optional result data from the module completion
44
+ * @param meta - Optional context about how the module resolved (e.g. whether
45
+ * the SDK rendered its own terminal finish screen). See {@link IncodeFinishMeta}.
24
46
  */
25
- onFinish?: (result?: TResult) => void;
47
+ onFinish?: (result?: TResult, meta?: IncodeFinishMeta) => void;
26
48
  /**
27
49
  * Callback invoked when a fatal module error occurs.
28
50
  *
@@ -6,6 +6,26 @@ export declare const Consent: FC<ConsentProps>;
6
6
 
7
7
  declare type ConsentProps = IncodeModuleProps<ConsentConfig, void, ConsentManager>;
8
8
 
9
+ /**
10
+ * Extra context passed to `onFinish` alongside the result. Lets a host decide
11
+ * how to react to the terminal state without inspecting the DOM. Only the
12
+ * workflow module sets these fields today.
13
+ */
14
+ declare type IncodeFinishMeta = {
15
+ /**
16
+ * True when the SDK owns the terminal screen — it has already rendered its
17
+ * own finish UI (today, the workflow's `showFinishScreenBySessionStatus`
18
+ * screen), so the host should not render its own completion screen on top.
19
+ * `onFinish` still fires so the host can run side effects (e.g. notify an
20
+ * OAuth parent).
21
+ *
22
+ * Advisory only: the SDK cannot stop a host from rendering. This works solely
23
+ * because the host reads this flag — a host that ignores it will still
24
+ * replace the SDK screen. Not a guarantee.
25
+ */
26
+ sdkOwnsTerminalScreen?: boolean;
27
+ };
28
+
9
29
  declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
10
30
  /**
11
31
  * Module configuration required to render the flow.
@@ -19,8 +39,10 @@ declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
19
39
  /**
20
40
  * Callback invoked when the module completes successfully.
21
41
  * @param result - Optional result data from the module completion
42
+ * @param meta - Optional context about how the module resolved (e.g. whether
43
+ * the SDK rendered its own terminal finish screen). See {@link IncodeFinishMeta}.
22
44
  */
23
- onFinish?: (result?: TResult) => void;
45
+ onFinish?: (result?: TResult, meta?: IncodeFinishMeta) => void;
24
46
  /**
25
47
  * Callback invoked when a fatal module error occurs.
26
48
  *
@@ -5,6 +5,26 @@ export declare const CrossDocumentDataMatch: FC<CrossDocumentDataMatchProps>;
5
5
 
6
6
  declare type CrossDocumentDataMatchProps = IncodeModuleProps<CrossDocumentDataMatchConfig>;
7
7
 
8
+ /**
9
+ * Extra context passed to `onFinish` alongside the result. Lets a host decide
10
+ * how to react to the terminal state without inspecting the DOM. Only the
11
+ * workflow module sets these fields today.
12
+ */
13
+ declare type IncodeFinishMeta = {
14
+ /**
15
+ * True when the SDK owns the terminal screen — it has already rendered its
16
+ * own finish UI (today, the workflow's `showFinishScreenBySessionStatus`
17
+ * screen), so the host should not render its own completion screen on top.
18
+ * `onFinish` still fires so the host can run side effects (e.g. notify an
19
+ * OAuth parent).
20
+ *
21
+ * Advisory only: the SDK cannot stop a host from rendering. This works solely
22
+ * because the host reads this flag — a host that ignores it will still
23
+ * replace the SDK screen. Not a guarantee.
24
+ */
25
+ sdkOwnsTerminalScreen?: boolean;
26
+ };
27
+
8
28
  declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
9
29
  /**
10
30
  * Module configuration required to render the flow.
@@ -18,8 +38,10 @@ declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
18
38
  /**
19
39
  * Callback invoked when the module completes successfully.
20
40
  * @param result - Optional result data from the module completion
41
+ * @param meta - Optional context about how the module resolved (e.g. whether
42
+ * the SDK rendered its own terminal finish screen). See {@link IncodeFinishMeta}.
21
43
  */
22
- onFinish?: (result?: TResult) => void;
44
+ onFinish?: (result?: TResult, meta?: IncodeFinishMeta) => void;
23
45
  /**
24
46
  * Callback invoked when a fatal module error occurs.
25
47
  *
@@ -6,6 +6,26 @@ export declare const CurpValidation: FC<CurpValidationProps>;
6
6
 
7
7
  declare type CurpValidationProps = IncodeModuleProps<CurpValidationConfig, void, CurpValidationManager>;
8
8
 
9
+ /**
10
+ * Extra context passed to `onFinish` alongside the result. Lets a host decide
11
+ * how to react to the terminal state without inspecting the DOM. Only the
12
+ * workflow module sets these fields today.
13
+ */
14
+ declare type IncodeFinishMeta = {
15
+ /**
16
+ * True when the SDK owns the terminal screen — it has already rendered its
17
+ * own finish UI (today, the workflow's `showFinishScreenBySessionStatus`
18
+ * screen), so the host should not render its own completion screen on top.
19
+ * `onFinish` still fires so the host can run side effects (e.g. notify an
20
+ * OAuth parent).
21
+ *
22
+ * Advisory only: the SDK cannot stop a host from rendering. This works solely
23
+ * because the host reads this flag — a host that ignores it will still
24
+ * replace the SDK screen. Not a guarantee.
25
+ */
26
+ sdkOwnsTerminalScreen?: boolean;
27
+ };
28
+
9
29
  declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
10
30
  /**
11
31
  * Module configuration required to render the flow.
@@ -19,8 +39,10 @@ declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
19
39
  /**
20
40
  * Callback invoked when the module completes successfully.
21
41
  * @param result - Optional result data from the module completion
42
+ * @param meta - Optional context about how the module resolved (e.g. whether
43
+ * the SDK rendered its own terminal finish screen). See {@link IncodeFinishMeta}.
22
44
  */
23
- onFinish?: (result?: TResult) => void;
45
+ onFinish?: (result?: TResult, meta?: IncodeFinishMeta) => void;
24
46
  /**
25
47
  * Callback invoked when a fatal module error occurs.
26
48
  *
@@ -5,6 +5,26 @@ export declare const DocumentCapture: FC<DocumentCaptureProps>;
5
5
 
6
6
  declare type DocumentCaptureProps = IncodeModuleProps<DocumentCaptureConfig>;
7
7
 
8
+ /**
9
+ * Extra context passed to `onFinish` alongside the result. Lets a host decide
10
+ * how to react to the terminal state without inspecting the DOM. Only the
11
+ * workflow module sets these fields today.
12
+ */
13
+ declare type IncodeFinishMeta = {
14
+ /**
15
+ * True when the SDK owns the terminal screen — it has already rendered its
16
+ * own finish UI (today, the workflow's `showFinishScreenBySessionStatus`
17
+ * screen), so the host should not render its own completion screen on top.
18
+ * `onFinish` still fires so the host can run side effects (e.g. notify an
19
+ * OAuth parent).
20
+ *
21
+ * Advisory only: the SDK cannot stop a host from rendering. This works solely
22
+ * because the host reads this flag — a host that ignores it will still
23
+ * replace the SDK screen. Not a guarantee.
24
+ */
25
+ sdkOwnsTerminalScreen?: boolean;
26
+ };
27
+
8
28
  declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
9
29
  /**
10
30
  * Module configuration required to render the flow.
@@ -18,8 +38,10 @@ declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
18
38
  /**
19
39
  * Callback invoked when the module completes successfully.
20
40
  * @param result - Optional result data from the module completion
41
+ * @param meta - Optional context about how the module resolved (e.g. whether
42
+ * the SDK rendered its own terminal finish screen). See {@link IncodeFinishMeta}.
21
43
  */
22
- onFinish?: (result?: TResult) => void;
44
+ onFinish?: (result?: TResult, meta?: IncodeFinishMeta) => void;
23
45
  /**
24
46
  * Callback invoked when a fatal module error occurs.
25
47
  *
@@ -5,6 +5,26 @@ export declare const EkybModule: FC<EkybModuleProps>;
5
5
 
6
6
  declare type EkybModuleProps = IncodeModuleProps<EkybConfig>;
7
7
 
8
+ /**
9
+ * Extra context passed to `onFinish` alongside the result. Lets a host decide
10
+ * how to react to the terminal state without inspecting the DOM. Only the
11
+ * workflow module sets these fields today.
12
+ */
13
+ declare type IncodeFinishMeta = {
14
+ /**
15
+ * True when the SDK owns the terminal screen — it has already rendered its
16
+ * own finish UI (today, the workflow's `showFinishScreenBySessionStatus`
17
+ * screen), so the host should not render its own completion screen on top.
18
+ * `onFinish` still fires so the host can run side effects (e.g. notify an
19
+ * OAuth parent).
20
+ *
21
+ * Advisory only: the SDK cannot stop a host from rendering. This works solely
22
+ * because the host reads this flag — a host that ignores it will still
23
+ * replace the SDK screen. Not a guarantee.
24
+ */
25
+ sdkOwnsTerminalScreen?: boolean;
26
+ };
27
+
8
28
  declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
9
29
  /**
10
30
  * Module configuration required to render the flow.
@@ -18,8 +38,10 @@ declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
18
38
  /**
19
39
  * Callback invoked when the module completes successfully.
20
40
  * @param result - Optional result data from the module completion
41
+ * @param meta - Optional context about how the module resolved (e.g. whether
42
+ * the SDK rendered its own terminal finish screen). See {@link IncodeFinishMeta}.
21
43
  */
22
- onFinish?: (result?: TResult) => void;
44
+ onFinish?: (result?: TResult, meta?: IncodeFinishMeta) => void;
23
45
  /**
24
46
  * Callback invoked when a fatal module error occurs.
25
47
  *
@@ -5,6 +5,26 @@ export declare const EkycModule: FC<EkycModuleProps>;
5
5
 
6
6
  declare type EkycModuleProps = IncodeModuleProps<EkycConfig>;
7
7
 
8
+ /**
9
+ * Extra context passed to `onFinish` alongside the result. Lets a host decide
10
+ * how to react to the terminal state without inspecting the DOM. Only the
11
+ * workflow module sets these fields today.
12
+ */
13
+ declare type IncodeFinishMeta = {
14
+ /**
15
+ * True when the SDK owns the terminal screen — it has already rendered its
16
+ * own finish UI (today, the workflow's `showFinishScreenBySessionStatus`
17
+ * screen), so the host should not render its own completion screen on top.
18
+ * `onFinish` still fires so the host can run side effects (e.g. notify an
19
+ * OAuth parent).
20
+ *
21
+ * Advisory only: the SDK cannot stop a host from rendering. This works solely
22
+ * because the host reads this flag — a host that ignores it will still
23
+ * replace the SDK screen. Not a guarantee.
24
+ */
25
+ sdkOwnsTerminalScreen?: boolean;
26
+ };
27
+
8
28
  declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
9
29
  /**
10
30
  * Module configuration required to render the flow.
@@ -18,8 +38,10 @@ declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
18
38
  /**
19
39
  * Callback invoked when the module completes successfully.
20
40
  * @param result - Optional result data from the module completion
41
+ * @param meta - Optional context about how the module resolved (e.g. whether
42
+ * the SDK rendered its own terminal finish screen). See {@link IncodeFinishMeta}.
21
43
  */
22
- onFinish?: (result?: TResult) => void;
44
+ onFinish?: (result?: TResult, meta?: IncodeFinishMeta) => void;
23
45
  /**
24
46
  * Callback invoked when a fatal module error occurs.
25
47
  *
@@ -8,6 +8,26 @@ export declare const ElectronicSignature: FC<ElectronicSignatureModuleProps>;
8
8
 
9
9
  declare type ElectronicSignatureModuleProps = IncodeModuleProps<ElectronicSignatureConfig>;
10
10
 
11
+ /**
12
+ * Extra context passed to `onFinish` alongside the result. Lets a host decide
13
+ * how to react to the terminal state without inspecting the DOM. Only the
14
+ * workflow module sets these fields today.
15
+ */
16
+ declare type IncodeFinishMeta = {
17
+ /**
18
+ * True when the SDK owns the terminal screen — it has already rendered its
19
+ * own finish UI (today, the workflow's `showFinishScreenBySessionStatus`
20
+ * screen), so the host should not render its own completion screen on top.
21
+ * `onFinish` still fires so the host can run side effects (e.g. notify an
22
+ * OAuth parent).
23
+ *
24
+ * Advisory only: the SDK cannot stop a host from rendering. This works solely
25
+ * because the host reads this flag — a host that ignores it will still
26
+ * replace the SDK screen. Not a guarantee.
27
+ */
28
+ sdkOwnsTerminalScreen?: boolean;
29
+ };
30
+
11
31
  declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
12
32
  /**
13
33
  * Module configuration required to render the flow.
@@ -21,8 +41,10 @@ declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
21
41
  /**
22
42
  * Callback invoked when the module completes successfully.
23
43
  * @param result - Optional result data from the module completion
44
+ * @param meta - Optional context about how the module resolved (e.g. whether
45
+ * the SDK rendered its own terminal finish screen). See {@link IncodeFinishMeta}.
24
46
  */
25
- onFinish?: (result?: TResult) => void;
47
+ onFinish?: (result?: TResult, meta?: IncodeFinishMeta) => void;
26
48
  /**
27
49
  * Callback invoked when a fatal module error occurs.
28
50
  *
@@ -32,6 +32,26 @@ export declare const Email: FC<EmailProps>;
32
32
  */
33
33
  declare type EmailProps = IncodeModuleProps<EmailConfig, void, EmailManager>;
34
34
 
35
+ /**
36
+ * Extra context passed to `onFinish` alongside the result. Lets a host decide
37
+ * how to react to the terminal state without inspecting the DOM. Only the
38
+ * workflow module sets these fields today.
39
+ */
40
+ declare type IncodeFinishMeta = {
41
+ /**
42
+ * True when the SDK owns the terminal screen — it has already rendered its
43
+ * own finish UI (today, the workflow's `showFinishScreenBySessionStatus`
44
+ * screen), so the host should not render its own completion screen on top.
45
+ * `onFinish` still fires so the host can run side effects (e.g. notify an
46
+ * OAuth parent).
47
+ *
48
+ * Advisory only: the SDK cannot stop a host from rendering. This works solely
49
+ * because the host reads this flag — a host that ignores it will still
50
+ * replace the SDK screen. Not a guarantee.
51
+ */
52
+ sdkOwnsTerminalScreen?: boolean;
53
+ };
54
+
35
55
  declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
36
56
  /**
37
57
  * Module configuration required to render the flow.
@@ -45,8 +65,10 @@ declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
45
65
  /**
46
66
  * Callback invoked when the module completes successfully.
47
67
  * @param result - Optional result data from the module completion
68
+ * @param meta - Optional context about how the module resolved (e.g. whether
69
+ * the SDK rendered its own terminal finish screen). See {@link IncodeFinishMeta}.
48
70
  */
49
- onFinish?: (result?: TResult) => void;
71
+ onFinish?: (result?: TResult, meta?: IncodeFinishMeta) => void;
50
72
  /**
51
73
  * Callback invoked when a fatal module error occurs.
52
74
  *
@@ -428,6 +428,26 @@ declare type IncodeComponentProps = {
428
428
  children?: ComponentChildren;
429
429
  };
430
430
 
431
+ /**
432
+ * Extra context passed to `onFinish` alongside the result. Lets a host decide
433
+ * how to react to the terminal state without inspecting the DOM. Only the
434
+ * workflow module sets these fields today.
435
+ */
436
+ declare type IncodeFinishMeta = {
437
+ /**
438
+ * True when the SDK owns the terminal screen — it has already rendered its
439
+ * own finish UI (today, the workflow's `showFinishScreenBySessionStatus`
440
+ * screen), so the host should not render its own completion screen on top.
441
+ * `onFinish` still fires so the host can run side effects (e.g. notify an
442
+ * OAuth parent).
443
+ *
444
+ * Advisory only: the SDK cannot stop a host from rendering. This works solely
445
+ * because the host reads this flag — a host that ignores it will still
446
+ * replace the SDK screen. Not a guarantee.
447
+ */
448
+ sdkOwnsTerminalScreen?: boolean;
449
+ };
450
+
431
451
  export declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
432
452
  /**
433
453
  * Module configuration required to render the flow.
@@ -441,8 +461,10 @@ export declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknow
441
461
  /**
442
462
  * Callback invoked when the module completes successfully.
443
463
  * @param result - Optional result data from the module completion
464
+ * @param meta - Optional context about how the module resolved (e.g. whether
465
+ * the SDK rendered its own terminal finish screen). See {@link IncodeFinishMeta}.
444
466
  */
445
- onFinish?: (result?: TResult) => void;
467
+ onFinish?: (result?: TResult, meta?: IncodeFinishMeta) => void;
446
468
  /**
447
469
  * Callback invoked when a fatal module error occurs.
448
470
  *
@@ -30,6 +30,26 @@ export declare const FaceMatch: FC<FaceMatchProps>;
30
30
  */
31
31
  declare type FaceMatchProps = IncodeModuleProps<FaceMatchConfig>;
32
32
 
33
+ /**
34
+ * Extra context passed to `onFinish` alongside the result. Lets a host decide
35
+ * how to react to the terminal state without inspecting the DOM. Only the
36
+ * workflow module sets these fields today.
37
+ */
38
+ declare type IncodeFinishMeta = {
39
+ /**
40
+ * True when the SDK owns the terminal screen — it has already rendered its
41
+ * own finish UI (today, the workflow's `showFinishScreenBySessionStatus`
42
+ * screen), so the host should not render its own completion screen on top.
43
+ * `onFinish` still fires so the host can run side effects (e.g. notify an
44
+ * OAuth parent).
45
+ *
46
+ * Advisory only: the SDK cannot stop a host from rendering. This works solely
47
+ * because the host reads this flag — a host that ignores it will still
48
+ * replace the SDK screen. Not a guarantee.
49
+ */
50
+ sdkOwnsTerminalScreen?: boolean;
51
+ };
52
+
33
53
  declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
34
54
  /**
35
55
  * Module configuration required to render the flow.
@@ -43,8 +63,10 @@ declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
43
63
  /**
44
64
  * Callback invoked when the module completes successfully.
45
65
  * @param result - Optional result data from the module completion
66
+ * @param meta - Optional context about how the module resolved (e.g. whether
67
+ * the SDK rendered its own terminal finish screen). See {@link IncodeFinishMeta}.
46
68
  */
47
- onFinish?: (result?: TResult) => void;
69
+ onFinish?: (result?: TResult, meta?: IncodeFinishMeta) => void;
48
70
  /**
49
71
  * Callback invoked when a fatal module error occurs.
50
72
  *
@@ -6,6 +6,26 @@ export declare const FieldComparison: FC<FieldComparisonProps>;
6
6
 
7
7
  declare type FieldComparisonProps = IncodeModuleProps<FieldComparisonConfig, void, FieldComparisonManager>;
8
8
 
9
+ /**
10
+ * Extra context passed to `onFinish` alongside the result. Lets a host decide
11
+ * how to react to the terminal state without inspecting the DOM. Only the
12
+ * workflow module sets these fields today.
13
+ */
14
+ declare type IncodeFinishMeta = {
15
+ /**
16
+ * True when the SDK owns the terminal screen — it has already rendered its
17
+ * own finish UI (today, the workflow's `showFinishScreenBySessionStatus`
18
+ * screen), so the host should not render its own completion screen on top.
19
+ * `onFinish` still fires so the host can run side effects (e.g. notify an
20
+ * OAuth parent).
21
+ *
22
+ * Advisory only: the SDK cannot stop a host from rendering. This works solely
23
+ * because the host reads this flag — a host that ignores it will still
24
+ * replace the SDK screen. Not a guarantee.
25
+ */
26
+ sdkOwnsTerminalScreen?: boolean;
27
+ };
28
+
9
29
  declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
10
30
  /**
11
31
  * Module configuration required to render the flow.
@@ -19,8 +39,10 @@ declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
19
39
  /**
20
40
  * Callback invoked when the module completes successfully.
21
41
  * @param result - Optional result data from the module completion
42
+ * @param meta - Optional context about how the module resolved (e.g. whether
43
+ * the SDK rendered its own terminal finish screen). See {@link IncodeFinishMeta}.
22
44
  */
23
- onFinish?: (result?: TResult) => void;
45
+ onFinish?: (result?: TResult, meta?: IncodeFinishMeta) => void;
24
46
  /**
25
47
  * Callback invoked when a fatal module error occurs.
26
48
  *
@@ -5,6 +5,26 @@ export declare const FiscalQr: FC<FiscalQrProps>;
5
5
 
6
6
  declare type FiscalQrProps = IncodeModuleProps<FiscalQrConfig>;
7
7
 
8
+ /**
9
+ * Extra context passed to `onFinish` alongside the result. Lets a host decide
10
+ * how to react to the terminal state without inspecting the DOM. Only the
11
+ * workflow module sets these fields today.
12
+ */
13
+ declare type IncodeFinishMeta = {
14
+ /**
15
+ * True when the SDK owns the terminal screen — it has already rendered its
16
+ * own finish UI (today, the workflow's `showFinishScreenBySessionStatus`
17
+ * screen), so the host should not render its own completion screen on top.
18
+ * `onFinish` still fires so the host can run side effects (e.g. notify an
19
+ * OAuth parent).
20
+ *
21
+ * Advisory only: the SDK cannot stop a host from rendering. This works solely
22
+ * because the host reads this flag — a host that ignores it will still
23
+ * replace the SDK screen. Not a guarantee.
24
+ */
25
+ sdkOwnsTerminalScreen?: boolean;
26
+ };
27
+
8
28
  declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
9
29
  /**
10
30
  * Module configuration required to render the flow.
@@ -18,8 +38,10 @@ declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
18
38
  /**
19
39
  * Callback invoked when the module completes successfully.
20
40
  * @param result - Optional result data from the module completion
41
+ * @param meta - Optional context about how the module resolved (e.g. whether
42
+ * the SDK rendered its own terminal finish screen). See {@link IncodeFinishMeta}.
21
43
  */
22
- onFinish?: (result?: TResult) => void;
44
+ onFinish?: (result?: TResult, meta?: IncodeFinishMeta) => void;
23
45
  /**
24
46
  * Callback invoked when a fatal module error occurs.
25
47
  *
@@ -45,6 +45,26 @@ declare type FlowUiConfig = {
45
45
  spinnerConfig?: SpinnerConfig;
46
46
  };
47
47
 
48
+ /**
49
+ * Extra context passed to `onFinish` alongside the result. Lets a host decide
50
+ * how to react to the terminal state without inspecting the DOM. Only the
51
+ * workflow module sets these fields today.
52
+ */
53
+ declare type IncodeFinishMeta = {
54
+ /**
55
+ * True when the SDK owns the terminal screen — it has already rendered its
56
+ * own finish UI (today, the workflow's `showFinishScreenBySessionStatus`
57
+ * screen), so the host should not render its own completion screen on top.
58
+ * `onFinish` still fires so the host can run side effects (e.g. notify an
59
+ * OAuth parent).
60
+ *
61
+ * Advisory only: the SDK cannot stop a host from rendering. This works solely
62
+ * because the host reads this flag — a host that ignores it will still
63
+ * replace the SDK screen. Not a guarantee.
64
+ */
65
+ sdkOwnsTerminalScreen?: boolean;
66
+ };
67
+
48
68
  export declare const IncodeFlow: FC<IncodeFlowProps>;
49
69
 
50
70
  declare type IncodeFlowProps = IncodeModuleProps<FlowConfig, FinishStatus>;
@@ -62,8 +82,10 @@ declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
62
82
  /**
63
83
  * Callback invoked when the module completes successfully.
64
84
  * @param result - Optional result data from the module completion
85
+ * @param meta - Optional context about how the module resolved (e.g. whether
86
+ * the SDK rendered its own terminal finish screen). See {@link IncodeFinishMeta}.
65
87
  */
66
- onFinish?: (result?: TResult) => void;
88
+ onFinish?: (result?: TResult, meta?: IncodeFinishMeta) => void;
67
89
  /**
68
90
  * Callback invoked when a fatal module error occurs.
69
91
  *
@@ -6,6 +6,26 @@ export { Geolocation_2 as Geolocation }
6
6
 
7
7
  declare type GeolocationProps = IncodeModuleProps<GeolocationConfig>;
8
8
 
9
+ /**
10
+ * Extra context passed to `onFinish` alongside the result. Lets a host decide
11
+ * how to react to the terminal state without inspecting the DOM. Only the
12
+ * workflow module sets these fields today.
13
+ */
14
+ declare type IncodeFinishMeta = {
15
+ /**
16
+ * True when the SDK owns the terminal screen — it has already rendered its
17
+ * own finish UI (today, the workflow's `showFinishScreenBySessionStatus`
18
+ * screen), so the host should not render its own completion screen on top.
19
+ * `onFinish` still fires so the host can run side effects (e.g. notify an
20
+ * OAuth parent).
21
+ *
22
+ * Advisory only: the SDK cannot stop a host from rendering. This works solely
23
+ * because the host reads this flag — a host that ignores it will still
24
+ * replace the SDK screen. Not a guarantee.
25
+ */
26
+ sdkOwnsTerminalScreen?: boolean;
27
+ };
28
+
9
29
  declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
10
30
  /**
11
31
  * Module configuration required to render the flow.
@@ -19,8 +39,10 @@ declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
19
39
  /**
20
40
  * Callback invoked when the module completes successfully.
21
41
  * @param result - Optional result data from the module completion
42
+ * @param meta - Optional context about how the module resolved (e.g. whether
43
+ * the SDK rendered its own terminal finish screen). See {@link IncodeFinishMeta}.
22
44
  */
23
- onFinish?: (result?: TResult) => void;
45
+ onFinish?: (result?: TResult, meta?: IncodeFinishMeta) => void;
24
46
  /**
25
47
  * Callback invoked when a fatal module error occurs.
26
48
  *
@@ -5,6 +5,26 @@ export declare const GovernmentValidation: FC<GovernmentValidationProps>;
5
5
 
6
6
  declare type GovernmentValidationProps = IncodeModuleProps<GovernmentValidationConfig>;
7
7
 
8
+ /**
9
+ * Extra context passed to `onFinish` alongside the result. Lets a host decide
10
+ * how to react to the terminal state without inspecting the DOM. Only the
11
+ * workflow module sets these fields today.
12
+ */
13
+ declare type IncodeFinishMeta = {
14
+ /**
15
+ * True when the SDK owns the terminal screen — it has already rendered its
16
+ * own finish UI (today, the workflow's `showFinishScreenBySessionStatus`
17
+ * screen), so the host should not render its own completion screen on top.
18
+ * `onFinish` still fires so the host can run side effects (e.g. notify an
19
+ * OAuth parent).
20
+ *
21
+ * Advisory only: the SDK cannot stop a host from rendering. This works solely
22
+ * because the host reads this flag — a host that ignores it will still
23
+ * replace the SDK screen. Not a guarantee.
24
+ */
25
+ sdkOwnsTerminalScreen?: boolean;
26
+ };
27
+
8
28
  declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
9
29
  /**
10
30
  * Module configuration required to render the flow.
@@ -18,8 +38,10 @@ declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
18
38
  /**
19
39
  * Callback invoked when the module completes successfully.
20
40
  * @param result - Optional result data from the module completion
41
+ * @param meta - Optional context about how the module resolved (e.g. whether
42
+ * the SDK rendered its own terminal finish screen). See {@link IncodeFinishMeta}.
21
43
  */
22
- onFinish?: (result?: TResult) => void;
44
+ onFinish?: (result?: TResult, meta?: IncodeFinishMeta) => void;
23
45
  /**
24
46
  * Callback invoked when a fatal module error occurs.
25
47
  *
@@ -5,6 +5,26 @@ export declare const IdVerification: FC<IdVerificationProps>;
5
5
 
6
6
  declare type IdVerificationProps = IncodeModuleProps<IdVerificationConfig>;
7
7
 
8
+ /**
9
+ * Extra context passed to `onFinish` alongside the result. Lets a host decide
10
+ * how to react to the terminal state without inspecting the DOM. Only the
11
+ * workflow module sets these fields today.
12
+ */
13
+ declare type IncodeFinishMeta = {
14
+ /**
15
+ * True when the SDK owns the terminal screen — it has already rendered its
16
+ * own finish UI (today, the workflow's `showFinishScreenBySessionStatus`
17
+ * screen), so the host should not render its own completion screen on top.
18
+ * `onFinish` still fires so the host can run side effects (e.g. notify an
19
+ * OAuth parent).
20
+ *
21
+ * Advisory only: the SDK cannot stop a host from rendering. This works solely
22
+ * because the host reads this flag — a host that ignores it will still
23
+ * replace the SDK screen. Not a guarantee.
24
+ */
25
+ sdkOwnsTerminalScreen?: boolean;
26
+ };
27
+
8
28
  declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
9
29
  /**
10
30
  * Module configuration required to render the flow.
@@ -18,8 +38,10 @@ declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
18
38
  /**
19
39
  * Callback invoked when the module completes successfully.
20
40
  * @param result - Optional result data from the module completion
41
+ * @param meta - Optional context about how the module resolved (e.g. whether
42
+ * the SDK rendered its own terminal finish screen). See {@link IncodeFinishMeta}.
21
43
  */
22
- onFinish?: (result?: TResult) => void;
44
+ onFinish?: (result?: TResult, meta?: IncodeFinishMeta) => void;
23
45
  /**
24
46
  * Callback invoked when a fatal module error occurs.
25
47
  *
@@ -6,6 +6,26 @@ export declare const Id: FC<IdProps>;
6
6
 
7
7
  declare type IdProps = IncodeModuleProps<IdCaptureConfig, void, IdCaptureManager>;
8
8
 
9
+ /**
10
+ * Extra context passed to `onFinish` alongside the result. Lets a host decide
11
+ * how to react to the terminal state without inspecting the DOM. Only the
12
+ * workflow module sets these fields today.
13
+ */
14
+ declare type IncodeFinishMeta = {
15
+ /**
16
+ * True when the SDK owns the terminal screen — it has already rendered its
17
+ * own finish UI (today, the workflow's `showFinishScreenBySessionStatus`
18
+ * screen), so the host should not render its own completion screen on top.
19
+ * `onFinish` still fires so the host can run side effects (e.g. notify an
20
+ * OAuth parent).
21
+ *
22
+ * Advisory only: the SDK cannot stop a host from rendering. This works solely
23
+ * because the host reads this flag — a host that ignores it will still
24
+ * replace the SDK screen. Not a guarantee.
25
+ */
26
+ sdkOwnsTerminalScreen?: boolean;
27
+ };
28
+
9
29
  declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
10
30
  /**
11
31
  * Module configuration required to render the flow.
@@ -19,8 +39,10 @@ declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
19
39
  /**
20
40
  * Callback invoked when the module completes successfully.
21
41
  * @param result - Optional result data from the module completion
42
+ * @param meta - Optional context about how the module resolved (e.g. whether
43
+ * the SDK rendered its own terminal finish screen). See {@link IncodeFinishMeta}.
22
44
  */
23
- onFinish?: (result?: TResult) => void;
45
+ onFinish?: (result?: TResult, meta?: IncodeFinishMeta) => void;
24
46
  /**
25
47
  * Callback invoked when a fatal module error occurs.
26
48
  *
@@ -6,6 +6,26 @@ export declare const IdentityReuse: FC<IdentityReuseProps>;
6
6
 
7
7
  declare type IdentityReuseProps = IncodeModuleProps<IdentityReuseConfig, void, IdentityReuseManager>;
8
8
 
9
+ /**
10
+ * Extra context passed to `onFinish` alongside the result. Lets a host decide
11
+ * how to react to the terminal state without inspecting the DOM. Only the
12
+ * workflow module sets these fields today.
13
+ */
14
+ declare type IncodeFinishMeta = {
15
+ /**
16
+ * True when the SDK owns the terminal screen — it has already rendered its
17
+ * own finish UI (today, the workflow's `showFinishScreenBySessionStatus`
18
+ * screen), so the host should not render its own completion screen on top.
19
+ * `onFinish` still fires so the host can run side effects (e.g. notify an
20
+ * OAuth parent).
21
+ *
22
+ * Advisory only: the SDK cannot stop a host from rendering. This works solely
23
+ * because the host reads this flag — a host that ignores it will still
24
+ * replace the SDK screen. Not a guarantee.
25
+ */
26
+ sdkOwnsTerminalScreen?: boolean;
27
+ };
28
+
9
29
  declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
10
30
  /**
11
31
  * Module configuration required to render the flow.
@@ -19,8 +39,10 @@ declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
19
39
  /**
20
40
  * Callback invoked when the module completes successfully.
21
41
  * @param result - Optional result data from the module completion
42
+ * @param meta - Optional context about how the module resolved (e.g. whether
43
+ * the SDK rendered its own terminal finish screen). See {@link IncodeFinishMeta}.
22
44
  */
23
- onFinish?: (result?: TResult) => void;
45
+ onFinish?: (result?: TResult, meta?: IncodeFinishMeta) => void;
24
46
  /**
25
47
  * Callback invoked when a fatal module error occurs.
26
48
  *
@@ -2,6 +2,26 @@ import { FC } from 'preact/compat';
2
2
  import { PhoneConfig } from '@incodetech/core/phone';
3
3
  import { PhoneManager } from '@incodetech/core/phone';
4
4
 
5
+ /**
6
+ * Extra context passed to `onFinish` alongside the result. Lets a host decide
7
+ * how to react to the terminal state without inspecting the DOM. Only the
8
+ * workflow module sets these fields today.
9
+ */
10
+ declare type IncodeFinishMeta = {
11
+ /**
12
+ * True when the SDK owns the terminal screen — it has already rendered its
13
+ * own finish UI (today, the workflow's `showFinishScreenBySessionStatus`
14
+ * screen), so the host should not render its own completion screen on top.
15
+ * `onFinish` still fires so the host can run side effects (e.g. notify an
16
+ * OAuth parent).
17
+ *
18
+ * Advisory only: the SDK cannot stop a host from rendering. This works solely
19
+ * because the host reads this flag — a host that ignores it will still
20
+ * replace the SDK screen. Not a guarantee.
21
+ */
22
+ sdkOwnsTerminalScreen?: boolean;
23
+ };
24
+
5
25
  declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
6
26
  /**
7
27
  * Module configuration required to render the flow.
@@ -15,8 +35,10 @@ declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
15
35
  /**
16
36
  * Callback invoked when the module completes successfully.
17
37
  * @param result - Optional result data from the module completion
38
+ * @param meta - Optional context about how the module resolved (e.g. whether
39
+ * the SDK rendered its own terminal finish screen). See {@link IncodeFinishMeta}.
18
40
  */
19
- onFinish?: (result?: TResult) => void;
41
+ onFinish?: (result?: TResult, meta?: IncodeFinishMeta) => void;
20
42
  /**
21
43
  * Callback invoked when a fatal module error occurs.
22
44
  *
@@ -1,6 +1,26 @@
1
1
  import { FC } from 'preact/compat';
2
2
  import { QeSignatureConfig } from '@incodetech/core/qe-signature';
3
3
 
4
+ /**
5
+ * Extra context passed to `onFinish` alongside the result. Lets a host decide
6
+ * how to react to the terminal state without inspecting the DOM. Only the
7
+ * workflow module sets these fields today.
8
+ */
9
+ declare type IncodeFinishMeta = {
10
+ /**
11
+ * True when the SDK owns the terminal screen — it has already rendered its
12
+ * own finish UI (today, the workflow's `showFinishScreenBySessionStatus`
13
+ * screen), so the host should not render its own completion screen on top.
14
+ * `onFinish` still fires so the host can run side effects (e.g. notify an
15
+ * OAuth parent).
16
+ *
17
+ * Advisory only: the SDK cannot stop a host from rendering. This works solely
18
+ * because the host reads this flag — a host that ignores it will still
19
+ * replace the SDK screen. Not a guarantee.
20
+ */
21
+ sdkOwnsTerminalScreen?: boolean;
22
+ };
23
+
4
24
  declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
5
25
  /**
6
26
  * Module configuration required to render the flow.
@@ -14,8 +34,10 @@ declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
14
34
  /**
15
35
  * Callback invoked when the module completes successfully.
16
36
  * @param result - Optional result data from the module completion
37
+ * @param meta - Optional context about how the module resolved (e.g. whether
38
+ * the SDK rendered its own terminal finish screen). See {@link IncodeFinishMeta}.
17
39
  */
18
- onFinish?: (result?: TResult) => void;
40
+ onFinish?: (result?: TResult, meta?: IncodeFinishMeta) => void;
19
41
  /**
20
42
  * Callback invoked when a fatal module error occurs.
21
43
  *
@@ -2,6 +2,26 @@ import { FC } from 'preact/compat';
2
2
  import { SelfieConfig } from '@incodetech/core/selfie';
3
3
  import { SelfieManager } from '@incodetech/core/selfie';
4
4
 
5
+ /**
6
+ * Extra context passed to `onFinish` alongside the result. Lets a host decide
7
+ * how to react to the terminal state without inspecting the DOM. Only the
8
+ * workflow module sets these fields today.
9
+ */
10
+ declare type IncodeFinishMeta = {
11
+ /**
12
+ * True when the SDK owns the terminal screen — it has already rendered its
13
+ * own finish UI (today, the workflow's `showFinishScreenBySessionStatus`
14
+ * screen), so the host should not render its own completion screen on top.
15
+ * `onFinish` still fires so the host can run side effects (e.g. notify an
16
+ * OAuth parent).
17
+ *
18
+ * Advisory only: the SDK cannot stop a host from rendering. This works solely
19
+ * because the host reads this flag — a host that ignores it will still
20
+ * replace the SDK screen. Not a guarantee.
21
+ */
22
+ sdkOwnsTerminalScreen?: boolean;
23
+ };
24
+
5
25
  declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
6
26
  /**
7
27
  * Module configuration required to render the flow.
@@ -15,8 +35,10 @@ declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
15
35
  /**
16
36
  * Callback invoked when the module completes successfully.
17
37
  * @param result - Optional result data from the module completion
38
+ * @param meta - Optional context about how the module resolved (e.g. whether
39
+ * the SDK rendered its own terminal finish screen). See {@link IncodeFinishMeta}.
18
40
  */
19
- onFinish?: (result?: TResult) => void;
41
+ onFinish?: (result?: TResult, meta?: IncodeFinishMeta) => void;
20
42
  /**
21
43
  * Callback invoked when a fatal module error occurs.
22
44
  *
@@ -1,6 +1,26 @@
1
1
  import { FC } from 'preact/compat';
2
2
  import { SignatureConfig } from '@incodetech/core/signature';
3
3
 
4
+ /**
5
+ * Extra context passed to `onFinish` alongside the result. Lets a host decide
6
+ * how to react to the terminal state without inspecting the DOM. Only the
7
+ * workflow module sets these fields today.
8
+ */
9
+ declare type IncodeFinishMeta = {
10
+ /**
11
+ * True when the SDK owns the terminal screen — it has already rendered its
12
+ * own finish UI (today, the workflow's `showFinishScreenBySessionStatus`
13
+ * screen), so the host should not render its own completion screen on top.
14
+ * `onFinish` still fires so the host can run side effects (e.g. notify an
15
+ * OAuth parent).
16
+ *
17
+ * Advisory only: the SDK cannot stop a host from rendering. This works solely
18
+ * because the host reads this flag — a host that ignores it will still
19
+ * replace the SDK screen. Not a guarantee.
20
+ */
21
+ sdkOwnsTerminalScreen?: boolean;
22
+ };
23
+
4
24
  declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
5
25
  /**
6
26
  * Module configuration required to render the flow.
@@ -14,8 +34,10 @@ declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
14
34
  /**
15
35
  * Callback invoked when the module completes successfully.
16
36
  * @param result - Optional result data from the module completion
37
+ * @param meta - Optional context about how the module resolved (e.g. whether
38
+ * the SDK rendered its own terminal finish screen). See {@link IncodeFinishMeta}.
17
39
  */
18
- onFinish?: (result?: TResult) => void;
40
+ onFinish?: (result?: TResult, meta?: IncodeFinishMeta) => void;
19
41
  /**
20
42
  * Callback invoked when a fatal module error occurs.
21
43
  *
@@ -1,6 +1,26 @@
1
1
  import { FC } from 'preact/compat';
2
2
  import { WatchlistConfig } from '@incodetech/core/watchlist';
3
3
 
4
+ /**
5
+ * Extra context passed to `onFinish` alongside the result. Lets a host decide
6
+ * how to react to the terminal state without inspecting the DOM. Only the
7
+ * workflow module sets these fields today.
8
+ */
9
+ declare type IncodeFinishMeta = {
10
+ /**
11
+ * True when the SDK owns the terminal screen — it has already rendered its
12
+ * own finish UI (today, the workflow's `showFinishScreenBySessionStatus`
13
+ * screen), so the host should not render its own completion screen on top.
14
+ * `onFinish` still fires so the host can run side effects (e.g. notify an
15
+ * OAuth parent).
16
+ *
17
+ * Advisory only: the SDK cannot stop a host from rendering. This works solely
18
+ * because the host reads this flag — a host that ignores it will still
19
+ * replace the SDK screen. Not a guarantee.
20
+ */
21
+ sdkOwnsTerminalScreen?: boolean;
22
+ };
23
+
4
24
  declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
5
25
  /**
6
26
  * Module configuration required to render the flow.
@@ -14,8 +34,10 @@ declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
14
34
  /**
15
35
  * Callback invoked when the module completes successfully.
16
36
  * @param result - Optional result data from the module completion
37
+ * @param meta - Optional context about how the module resolved (e.g. whether
38
+ * the SDK rendered its own terminal finish screen). See {@link IncodeFinishMeta}.
17
39
  */
18
- onFinish?: (result?: TResult) => void;
40
+ onFinish?: (result?: TResult, meta?: IncodeFinishMeta) => void;
19
41
  /**
20
42
  * Callback invoked when a fatal module error occurs.
21
43
  *
@@ -14,6 +14,26 @@ declare type ClientIdSessionBootstrap = {
14
14
  clientId: string;
15
15
  };
16
16
 
17
+ /**
18
+ * Extra context passed to `onFinish` alongside the result. Lets a host decide
19
+ * how to react to the terminal state without inspecting the DOM. Only the
20
+ * workflow module sets these fields today.
21
+ */
22
+ export declare type IncodeFinishMeta = {
23
+ /**
24
+ * True when the SDK owns the terminal screen — it has already rendered its
25
+ * own finish UI (today, the workflow's `showFinishScreenBySessionStatus`
26
+ * screen), so the host should not render its own completion screen on top.
27
+ * `onFinish` still fires so the host can run side effects (e.g. notify an
28
+ * OAuth parent).
29
+ *
30
+ * Advisory only: the SDK cannot stop a host from rendering. This works solely
31
+ * because the host reads this flag — a host that ignores it will still
32
+ * replace the SDK screen. Not a guarantee.
33
+ */
34
+ sdkOwnsTerminalScreen?: boolean;
35
+ };
36
+
17
37
  declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
18
38
  /**
19
39
  * Module configuration required to render the flow.
@@ -27,8 +47,10 @@ declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
27
47
  /**
28
48
  * Callback invoked when the module completes successfully.
29
49
  * @param result - Optional result data from the module completion
50
+ * @param meta - Optional context about how the module resolved (e.g. whether
51
+ * the SDK rendered its own terminal finish screen). See {@link IncodeFinishMeta}.
30
52
  */
31
- onFinish?: (result?: TResult) => void;
53
+ onFinish?: (result?: TResult, meta?: IncodeFinishMeta) => void;
32
54
  /**
33
55
  * Callback invoked when a fatal module error occurs.
34
56
  *
@@ -289,7 +289,7 @@ var LAZY_UI_MODULES = {
289
289
  ID_CAPTURE: lazyIdModule,
290
290
  TUTORIAL_ID: lazyIdModule,
291
291
  SECOND_ID: lazyIdModule,
292
- FACE_MATCH: () => import("./faceMatch-C0-RPzrc.js").then((m) => m.FaceMatch),
292
+ FACE_MATCH: () => import("./faceMatch-D_uyeaBt.js").then((m) => m.FaceMatch),
293
293
  CURP_VALIDATION: () => import("./curp-validation/curp-validation.es.js").then((m) => m.CurpValidation),
294
294
  GOVT_VALIDATION_PROVISIONING: () => import("./governmentValidation/governmentValidation.es.js").then((m) => m.GovernmentValidation),
295
295
  INE_VALIDATION: () => import("./governmentValidation/governmentValidation.es.js").then((m) => m.GovernmentValidation),
@@ -7,7 +7,7 @@ import { t as Page } from "../page-DidH_RkX.js";
7
7
  import { t as TransitionSpinner } from "../transitionSpinner-4rPkt-KM.js";
8
8
  import { t as AutoFocusTitle } from "../autoFocusTitle-CuRu2lPg.js";
9
9
  import { t as registerIncodeModuleElement } from "../incodeModule-M8DszCee.js";
10
- import { a as resolveApiKey, g as setupSDK, i as HEADLESS_WORKFLOW_MODULE_KEYS, l as LAZY_UI_MODULES, o as extractIncodeStatus, s as UnsupportedModule, t as useModuleLoader, v as fetchAndApplyTheme, y as TerminalErrorPage } from "../useModuleLoader-Kt78XfNR.js";
10
+ import { a as resolveApiKey, g as setupSDK, i as HEADLESS_WORKFLOW_MODULE_KEYS, l as LAZY_UI_MODULES, o as extractIncodeStatus, s as UnsupportedModule, t as useModuleLoader, v as fetchAndApplyTheme, y as TerminalErrorPage } from "../useModuleLoader-BNE_xKwo.js";
11
11
  import { resolveWasmConfig, upgradeToWasmHttpClient, warmupWasm } from "@incodetech/core/wasm";
12
12
  import { getDeviceClass } from "@incodetech/core/device";
13
13
  import { classifyScoreStatus, getTotalScoreStatus } from "@incodetech/core/flow";
@@ -321,8 +321,10 @@ var IncodeWorkflowReady = ({ config, workflowManager: initialManager, onFinish,
321
321
  autoLoad: false,
322
322
  manageLifecycle: false
323
323
  });
324
+ const moduleKey = workflowState?.status === "ready" ? workflowState.currentNode.moduleKey : void 0;
325
+ const showFinishScreen = workflowState?.status === "finished" && workflowState.workflowConfig.showFinishScreenBySessionStatus === true;
324
326
  const moduleLoaderState = useModuleLoader({
325
- moduleKey: workflowState?.status === "ready" ? workflowState.currentNode.moduleKey : void 0,
327
+ moduleKey,
326
328
  modules: LAZY_WORKFLOW_MODULES,
327
329
  headlessModuleKeys: HEADLESS_WORKFLOW_MODULE_KEYS,
328
330
  onModuleLoading: config.onModuleLoading,
@@ -335,7 +337,7 @@ var IncodeWorkflowReady = ({ config, workflowManager: initialManager, onFinish,
335
337
  if (workflowState?.status === "finished") {
336
338
  terminalFiredRef.current = true;
337
339
  const finishStatus = workflowState.finishStatus;
338
- queueMicrotask(() => onFinish?.(finishStatus));
340
+ queueMicrotask(() => onFinish?.(finishStatus, { sdkOwnsTerminalScreen: showFinishScreen }));
339
341
  return;
340
342
  }
341
343
  if (workflowState?.status === "asyncResolution") {
@@ -349,10 +351,10 @@ var IncodeWorkflowReady = ({ config, workflowManager: initialManager, onFinish,
349
351
  queueMicrotask(() => onError(error, errorCode, moduleErrorCode));
350
352
  }
351
353
  }, [
352
- workflowState?.status,
354
+ workflowState,
353
355
  onFinish,
354
356
  onError,
355
- workflowState
357
+ showFinishScreen
356
358
  ]);
357
359
  const hideSpinnerText = !(config.spinnerConfig?.title || config.spinnerConfig?.subtitle);
358
360
  const renderSpinner = () => /* @__PURE__ */ u("div", {
@@ -381,7 +383,7 @@ var IncodeWorkflowReady = ({ config, workflowManager: initialManager, onFinish,
381
383
  children: /* @__PURE__ */ u(TerminalErrorPage, { message: workflowState.error })
382
384
  });
383
385
  if (workflowState.status === "finished") {
384
- if (workflowState.workflowConfig.showFinishScreenBySessionStatus) return /* @__PURE__ */ u("div", {
386
+ if (showFinishScreen) return /* @__PURE__ */ u("div", {
385
387
  class: "IncodeWorkflow",
386
388
  children: /* @__PURE__ */ u(FinishScreenBySessionStatus, {
387
389
  scoreStatus: workflowState.finishStatus.scoreStatus,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@incodetech/web",
3
- "version": "0.0.0-dev-20260622-1afbb270",
3
+ "version": "0.0.0-dev-20260623-132ddef6",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/IncodeTechnologies/incode-web-sdk.git"
@@ -264,7 +264,7 @@
264
264
  "qrcode": "^1.5.4",
265
265
  "signature_pad": "^5.1.3",
266
266
  "tailwindcss": "^4.1.17",
267
- "@incodetech/core": "0.0.0-dev-20260622-1afbb270"
267
+ "@incodetech/core": "0.0.0-dev-20260623-132ddef6"
268
268
  },
269
269
  "devDependencies": {
270
270
  "@microsoft/api-extractor": "^7.53.3",
@@ -1,2 +0,0 @@
1
- import { t as FaceMatch } from "./faceMatch-Dez_bq3n.js";
2
- export { FaceMatch };