@incodetech/core 0.0.0-dev-20260515-a07df20 → 0.0.0-dev-20260515-5ea50d5

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/ae-signature.d.ts +1 -1
  2. package/dist/consent.d.ts +47 -47
  3. package/dist/cpf-ocr.d.ts +17 -17
  4. package/dist/document-capture.d.ts +68 -68
  5. package/dist/document-upload.d.ts +40 -40
  6. package/dist/ekyb.esm.js +3 -3
  7. package/dist/{ekybStateMachine-BihTKkNC.esm.js → ekybStateMachine-CQyZTMF0.esm.js} +1 -1
  8. package/dist/electronic-signature.d.ts +1 -1
  9. package/dist/extensibility.d.ts +1 -1
  10. package/dist/extensibility.esm.js +3 -3
  11. package/dist/flow.d.ts +2 -2
  12. package/dist/flow.esm.js +2 -2
  13. package/dist/{flowServices-DZAOYIFW.esm.js → flowServices-jTW-yhzr.esm.js} +5 -1
  14. package/dist/home.d.ts +10 -10
  15. package/dist/id-ocr.d.ts +52 -52
  16. package/dist/id-verification.d.ts +25 -25
  17. package/dist/id.d.ts +1 -1
  18. package/dist/id.esm.js +3 -3
  19. package/dist/{idCaptureManager-Dzaillra.d.ts → idCaptureManager-B9TGA5dq.d.ts} +15 -0
  20. package/dist/{idCaptureManager-Ch64CD8w.esm.js → idCaptureManager-DFk3Tytl.esm.js} +1 -1
  21. package/dist/{idCaptureStateMachine-KxWTQqcZ.esm.js → idCaptureStateMachine-DAO1IbBO.esm.js} +49 -10
  22. package/dist/identity-reuse.d.ts +40 -40
  23. package/dist/{index-CNUtzsRO.d.ts → index-CoVWTOZj.d.ts} +119 -119
  24. package/dist/index.d.ts +1 -1
  25. package/dist/index.esm.js +2 -2
  26. package/dist/qe-signature.d.ts +1 -1
  27. package/dist/{session-CONcSjo_.esm.js → session-DwRz_09p.esm.js} +20 -13
  28. package/dist/session.d.ts +78 -1
  29. package/dist/session.esm.js +2 -2
  30. package/dist/{setup-FpVUZIRi.d.ts → setup-C5AITV8m.d.ts} +48 -14
  31. package/dist/{setup-BWHiqu6S.esm.js → setup-Ewnwm56p.esm.js} +47 -25
  32. package/dist/wasm.d.ts +1 -1
  33. package/dist/wasm.esm.js +2 -2
  34. package/dist/workflow.d.ts +84 -84
  35. package/dist/workflow.esm.js +4 -4
  36. package/package.json +1 -1
@@ -3,7 +3,7 @@ import { t as BrowserTimerProvider } from "./BrowserTimerProvider-DhNc_x02.esm.j
3
3
  import { r as getToken, t as api } from "./api-CESGtpbH.esm.js";
4
4
  import { S as revokeObjectURL } from "./events-D6-e4vok.esm.js";
5
5
  import { t as endpoints } from "./endpoints-CnN3SyDa.esm.js";
6
- import { t as getDisableIpify } from "./session-CONcSjo_.esm.js";
6
+ import { t as getDisableIpify } from "./session-DwRz_09p.esm.js";
7
7
  import { a as fromPromise, i as fromCallback, n as sendTo, o as and, r as assign, t as setup } from "./xstate.esm-B70JrNqo.esm.js";
8
8
  import { n as IncodeCanvas } from "./deepsightService-O74l4Y__.esm.js";
9
9
  import { _ as stopRecording$1, a as StreamCanvasCapture, g as startRecording, h as createRecordingSession, i as flagIdManualReview, n as preloadOpenViduProvider, v as StreamCanvasProcessingSession } from "./recordingService-Ig2UgbLv.esm.js";
@@ -1552,6 +1552,8 @@ function getResetContextValues(context) {
1552
1552
  skipProcessId: false,
1553
1553
  expiredFromUpload: false,
1554
1554
  isDigitalUpload: false,
1555
+ exhaustedFromUpload: false,
1556
+ forceFinishAfterProcessing: false,
1555
1557
  uploadError: void 0,
1556
1558
  permissionResult: void 0,
1557
1559
  resetDetection: void 0,
@@ -1804,6 +1806,21 @@ const shouldForceBackOnExpiredGuard = ({ context }) => context.currentMode === "
1804
1806
  const wasExpiredFromUploadGuard = ({ context }) => context.expiredFromUpload === true;
1805
1807
  const shouldSkipProcessIdGuard = ({ context }) => context.skipProcessId === true;
1806
1808
  /**
1809
+ * Bug 4 fix: when `expiredExhausted` is reached via the per-upload-expired
1810
+ * exhaustion path with a back side captured (or the entire single-side back
1811
+ * flow), we want `processId` to run once on Continue so the backend
1812
+ * processes whatever sides were uploaded. Front-only exhaustion (no back to
1813
+ * process) and the force-back V1 path keep using `setSkipProcessId` instead.
1814
+ */
1815
+ const shouldProcessAfterExhaustionGuard = ({ context }) => context.exhaustedFromUpload === true && context.currentMode === "back";
1816
+ /**
1817
+ * `processing.onDone` reads this to short-circuit straight to `finished`
1818
+ * after the post-exhaustion `processId` call returns — without it, an
1819
+ * `isDocumentExpired:true` response would loop back to the Expired screen
1820
+ * we just terminated.
1821
+ */
1822
+ const forceFinishAfterProcessingGuard = ({ context }) => context.forceFinishAfterProcessing === true;
1823
+ /**
1807
1824
  * Cap on the end-of-flow expired path. All capture types (camera, digital,
1808
1825
  * manual) share `config.captureAttempts` for consistency — the user-visible
1809
1826
  * "X attempts remaining" counter is the same regardless of how the document
@@ -1875,6 +1892,8 @@ const _idCaptureMachine = setup({
1875
1892
  attemptsRemaining: context.config.captureAttempts,
1876
1893
  expiredAttempts: 0,
1877
1894
  expiredFromUpload: false,
1895
+ exhaustedFromUpload: false,
1896
+ forceFinishAfterProcessing: false,
1878
1897
  captureResolution: void 0,
1879
1898
  cameraFallbackLevel: void 0
1880
1899
  };
@@ -1898,6 +1917,8 @@ const _idCaptureMachine = setup({
1898
1917
  attemptsRemaining: context.config.captureAttempts,
1899
1918
  expiredAttempts: 0,
1900
1919
  expiredFromUpload: false,
1920
+ exhaustedFromUpload: false,
1921
+ forceFinishAfterProcessing: false,
1901
1922
  captureResolution: void 0,
1902
1923
  cameraFallbackLevel: void 0
1903
1924
  };
@@ -2006,6 +2027,8 @@ const _idCaptureMachine = setup({
2006
2027
  incrementProcessingExpiredAttempts: assign(({ context }) => ({ processingExpiredAttempts: context.processingExpiredAttempts + 1 })),
2007
2028
  setSkipProcessId: assign({ skipProcessId: () => true }),
2008
2029
  setExpiredFromUpload: assign({ expiredFromUpload: () => true }),
2030
+ setExhaustedFromUpload: assign({ exhaustedFromUpload: () => true }),
2031
+ setForceFinishAfterProcessing: assign({ forceFinishAfterProcessing: () => true }),
2009
2032
  clearExpiredFromUpload: assign({ expiredFromUpload: () => false })
2010
2033
  },
2011
2034
  guards: {
@@ -2036,6 +2059,8 @@ const _idCaptureMachine = setup({
2036
2059
  wasExpiredFromUpload: wasExpiredFromUploadGuard,
2037
2060
  shouldSkipProcessId: shouldSkipProcessIdGuard,
2038
2061
  isProcessingExpiredExhausted: isProcessingExpiredExhaustedGuard,
2062
+ shouldProcessAfterExhaustion: shouldProcessAfterExhaustionGuard,
2063
+ forceFinishAfterProcessing: forceFinishAfterProcessingGuard,
2039
2064
  isManualUploadExhausted: ({ event }) => event.output?.result === "exhausted",
2040
2065
  isDigitalUploadExhausted: ({ event }) => event.output?.result === "exhausted",
2041
2066
  isDigitalUploadClosed: ({ event }) => event.output?.result === "closed",
@@ -2067,6 +2092,8 @@ const _idCaptureMachine = setup({
2067
2092
  skipProcessId: input.config.skipProcessId === true,
2068
2093
  expiredFromUpload: false,
2069
2094
  isDigitalUpload: false,
2095
+ exhaustedFromUpload: false,
2096
+ forceFinishAfterProcessing: false,
2070
2097
  uploadError: void 0,
2071
2098
  permissionResult: void 0,
2072
2099
  resetDetection: void 0,
@@ -2580,7 +2607,7 @@ const _idCaptureMachine = setup({
2580
2607
  "isUploadExpired",
2581
2608
  "isExpiredAttemptsExhausted"
2582
2609
  ]),
2583
- actions: ["incrementExpiredAttempts"]
2610
+ actions: ["incrementExpiredAttempts", "setExhaustedFromUpload"]
2584
2611
  },
2585
2612
  {
2586
2613
  target: "#idCapture.expired",
@@ -2752,6 +2779,10 @@ const _idCaptureMachine = setup({
2752
2779
  src: "processId",
2753
2780
  input: ({ context }) => ({ isSecondId: context.config.isSecondId ?? false }),
2754
2781
  onDone: [
2782
+ {
2783
+ target: "finished",
2784
+ guard: "forceFinishAfterProcessing"
2785
+ },
2755
2786
  {
2756
2787
  target: "expiredExhausted",
2757
2788
  guard: and([({ event }) => event.output.isDocumentExpired, "isProcessingExpiredExhausted"]),
@@ -2797,14 +2828,22 @@ const _idCaptureMachine = setup({
2797
2828
  actions: "resetContext"
2798
2829
  }
2799
2830
  ] } },
2800
- expiredExhausted: { on: { CONTINUE_EXHAUSTED: [{
2801
- target: "#idCapture.frontFinished",
2802
- guard: "shouldForceBackOnExpired",
2803
- actions: ["setSkipProcessId"]
2804
- }, {
2805
- target: "#idCapture.finished",
2806
- actions: ["setSkipProcessId"]
2807
- }] } },
2831
+ expiredExhausted: { on: { CONTINUE_EXHAUSTED: [
2832
+ {
2833
+ target: "#idCapture.frontFinished",
2834
+ guard: "shouldForceBackOnExpired",
2835
+ actions: ["setSkipProcessId"]
2836
+ },
2837
+ {
2838
+ target: "#idCapture.processing",
2839
+ guard: "shouldProcessAfterExhaustion",
2840
+ actions: ["setForceFinishAfterProcessing"]
2841
+ },
2842
+ {
2843
+ target: "#idCapture.finished",
2844
+ actions: ["setSkipProcessId"]
2845
+ }
2846
+ ] } },
2808
2847
  finished: {
2809
2848
  entry: [
2810
2849
  "stopMediaRecording",
@@ -1,6 +1,6 @@
1
1
  import { t as Manager } from "./Manager-C8PrhBOx.js";
2
2
  import { t as ActorRefFrom } from "./Actor-CI32dTbG.js";
3
- import * as xstate140 from "xstate";
3
+ import * as xstate165 from "xstate";
4
4
 
5
5
  //#region src/modules/identity-reuse/types.d.ts
6
6
 
@@ -32,7 +32,7 @@ type IdentityReuseContext = {
32
32
  type IdentityReuseInput = {
33
33
  config: IdentityReuseConfig;
34
34
  };
35
- declare const identityReuseMachine: xstate140.StateMachine<IdentityReuseContext, {
35
+ declare const identityReuseMachine: xstate165.StateMachine<IdentityReuseContext, {
36
36
  type: "LOAD";
37
37
  } | {
38
38
  type: "START_SELECTION";
@@ -48,49 +48,49 @@ declare const identityReuseMachine: xstate140.StateMachine<IdentityReuseContext,
48
48
  } | {
49
49
  type: "RETRY";
50
50
  }, {
51
- [x: string]: xstate140.ActorRefFromLogic<xstate140.PromiseActorLogic<FetchCandidatesResponse, void, xstate140.EventObject>> | xstate140.ActorRefFromLogic<xstate140.PromiseActorLogic<SubmitResponse, void, xstate140.EventObject>> | undefined;
52
- }, xstate140.Values<{
51
+ [x: string]: xstate165.ActorRefFromLogic<xstate165.PromiseActorLogic<FetchCandidatesResponse, void, xstate165.EventObject>> | xstate165.ActorRefFromLogic<xstate165.PromiseActorLogic<SubmitResponse, void, xstate165.EventObject>> | undefined;
52
+ }, xstate165.Values<{
53
53
  fetchCandidates: {
54
54
  src: "fetchCandidates";
55
- logic: xstate140.PromiseActorLogic<FetchCandidatesResponse, void, xstate140.EventObject>;
55
+ logic: xstate165.PromiseActorLogic<FetchCandidatesResponse, void, xstate165.EventObject>;
56
56
  id: string | undefined;
57
57
  };
58
58
  submitContinue: {
59
59
  src: "submitContinue";
60
- logic: xstate140.PromiseActorLogic<SubmitResponse, void, xstate140.EventObject>;
60
+ logic: xstate165.PromiseActorLogic<SubmitResponse, void, xstate165.EventObject>;
61
61
  id: string | undefined;
62
62
  };
63
63
  submitSkip: {
64
64
  src: "submitSkip";
65
- logic: xstate140.PromiseActorLogic<SubmitResponse, void, xstate140.EventObject>;
65
+ logic: xstate165.PromiseActorLogic<SubmitResponse, void, xstate165.EventObject>;
66
66
  id: string | undefined;
67
67
  };
68
- }>, xstate140.Values<{
68
+ }>, xstate165.Values<{
69
69
  setError: {
70
70
  type: "setError";
71
- params: xstate140.NonReducibleUnknown;
71
+ params: xstate165.NonReducibleUnknown;
72
72
  };
73
73
  clearError: {
74
74
  type: "clearError";
75
- params: xstate140.NonReducibleUnknown;
75
+ params: xstate165.NonReducibleUnknown;
76
76
  };
77
77
  setCandidates: {
78
78
  type: "setCandidates";
79
- params: xstate140.NonReducibleUnknown;
79
+ params: xstate165.NonReducibleUnknown;
80
80
  };
81
81
  setSelectedCandidate: {
82
82
  type: "setSelectedCandidate";
83
- params: xstate140.NonReducibleUnknown;
83
+ params: xstate165.NonReducibleUnknown;
84
84
  };
85
85
  autoSelectSingleCandidate: {
86
86
  type: "autoSelectSingleCandidate";
87
- params: xstate140.NonReducibleUnknown;
87
+ params: xstate165.NonReducibleUnknown;
88
88
  };
89
89
  clearSelection: {
90
90
  type: "clearSelection";
91
- params: xstate140.NonReducibleUnknown;
91
+ params: xstate165.NonReducibleUnknown;
92
92
  };
93
- }>, xstate140.Values<{
93
+ }>, xstate165.Values<{
94
94
  hasMultipleCandidates: {
95
95
  type: "hasMultipleCandidates";
96
96
  params: unknown;
@@ -105,7 +105,7 @@ declare const identityReuseMachine: xstate140.StateMachine<IdentityReuseContext,
105
105
  };
106
106
  }>, never, "error" | "idle" | "finished" | "loading" | "submitContinue" | "submitSkip" | "oneCandidateFound" | "noCandidatesFound" | {
107
107
  multiCandidatesFound: "noCandidateSelected" | "choosingCandidate" | "candidateSelected";
108
- }, string, IdentityReuseInput, xstate140.NonReducibleUnknown, xstate140.EventObject, xstate140.MetaObject, {
108
+ }, string, IdentityReuseInput, xstate165.NonReducibleUnknown, xstate165.EventObject, xstate165.MetaObject, {
109
109
  readonly id: "identityReuse";
110
110
  readonly initial: "idle";
111
111
  readonly context: ({
@@ -114,75 +114,75 @@ declare const identityReuseMachine: xstate140.StateMachine<IdentityReuseContext,
114
114
  spawn: {
115
115
  <TSrc extends "fetchCandidates" | "submitContinue" | "submitSkip">(logic: TSrc, ...[options]: ({
116
116
  src: "fetchCandidates";
117
- logic: xstate140.PromiseActorLogic<FetchCandidatesResponse, void, xstate140.EventObject>;
117
+ logic: xstate165.PromiseActorLogic<FetchCandidatesResponse, void, xstate165.EventObject>;
118
118
  id: string | undefined;
119
119
  } extends infer T ? T extends {
120
120
  src: "fetchCandidates";
121
- logic: xstate140.PromiseActorLogic<FetchCandidatesResponse, void, xstate140.EventObject>;
121
+ logic: xstate165.PromiseActorLogic<FetchCandidatesResponse, void, xstate165.EventObject>;
122
122
  id: string | undefined;
123
123
  } ? T extends {
124
124
  src: TSrc;
125
- } ? xstate140.ConditionalRequired<[options?: ({
125
+ } ? xstate165.ConditionalRequired<[options?: ({
126
126
  id?: T["id"] | undefined;
127
127
  systemId?: string;
128
- input?: xstate140.InputFrom<T["logic"]> | undefined;
128
+ input?: xstate165.InputFrom<T["logic"]> | undefined;
129
129
  syncSnapshot?: boolean;
130
- } & { [K in xstate140.RequiredActorOptions<T>]: unknown }) | undefined], xstate140.IsNotNever<xstate140.RequiredActorOptions<T>>> : never : never : never) | ({
130
+ } & { [K in xstate165.RequiredActorOptions<T>]: unknown }) | undefined], xstate165.IsNotNever<xstate165.RequiredActorOptions<T>>> : never : never : never) | ({
131
131
  src: "submitContinue";
132
- logic: xstate140.PromiseActorLogic<SubmitResponse, void, xstate140.EventObject>;
132
+ logic: xstate165.PromiseActorLogic<SubmitResponse, void, xstate165.EventObject>;
133
133
  id: string | undefined;
134
134
  } extends infer T_1 ? T_1 extends {
135
135
  src: "submitContinue";
136
- logic: xstate140.PromiseActorLogic<SubmitResponse, void, xstate140.EventObject>;
136
+ logic: xstate165.PromiseActorLogic<SubmitResponse, void, xstate165.EventObject>;
137
137
  id: string | undefined;
138
138
  } ? T_1 extends {
139
139
  src: TSrc;
140
- } ? xstate140.ConditionalRequired<[options?: ({
140
+ } ? xstate165.ConditionalRequired<[options?: ({
141
141
  id?: T_1["id"] | undefined;
142
142
  systemId?: string;
143
- input?: xstate140.InputFrom<T_1["logic"]> | undefined;
143
+ input?: xstate165.InputFrom<T_1["logic"]> | undefined;
144
144
  syncSnapshot?: boolean;
145
- } & { [K_1 in xstate140.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate140.IsNotNever<xstate140.RequiredActorOptions<T_1>>> : never : never : never) | ({
145
+ } & { [K_1 in xstate165.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate165.IsNotNever<xstate165.RequiredActorOptions<T_1>>> : never : never : never) | ({
146
146
  src: "submitSkip";
147
- logic: xstate140.PromiseActorLogic<SubmitResponse, void, xstate140.EventObject>;
147
+ logic: xstate165.PromiseActorLogic<SubmitResponse, void, xstate165.EventObject>;
148
148
  id: string | undefined;
149
149
  } extends infer T_2 ? T_2 extends {
150
150
  src: "submitSkip";
151
- logic: xstate140.PromiseActorLogic<SubmitResponse, void, xstate140.EventObject>;
151
+ logic: xstate165.PromiseActorLogic<SubmitResponse, void, xstate165.EventObject>;
152
152
  id: string | undefined;
153
153
  } ? T_2 extends {
154
154
  src: TSrc;
155
- } ? xstate140.ConditionalRequired<[options?: ({
155
+ } ? xstate165.ConditionalRequired<[options?: ({
156
156
  id?: T_2["id"] | undefined;
157
157
  systemId?: string;
158
- input?: xstate140.InputFrom<T_2["logic"]> | undefined;
158
+ input?: xstate165.InputFrom<T_2["logic"]> | undefined;
159
159
  syncSnapshot?: boolean;
160
- } & { [K_2 in xstate140.RequiredActorOptions<T_2>]: unknown }) | undefined], xstate140.IsNotNever<xstate140.RequiredActorOptions<T_2>>> : never : never : never)): xstate140.ActorRefFromLogic<xstate140.GetConcreteByKey<xstate140.Values<{
160
+ } & { [K_2 in xstate165.RequiredActorOptions<T_2>]: unknown }) | undefined], xstate165.IsNotNever<xstate165.RequiredActorOptions<T_2>>> : never : never : never)): xstate165.ActorRefFromLogic<xstate165.GetConcreteByKey<xstate165.Values<{
161
161
  fetchCandidates: {
162
162
  src: "fetchCandidates";
163
- logic: xstate140.PromiseActorLogic<FetchCandidatesResponse, void, xstate140.EventObject>;
163
+ logic: xstate165.PromiseActorLogic<FetchCandidatesResponse, void, xstate165.EventObject>;
164
164
  id: string | undefined;
165
165
  };
166
166
  submitContinue: {
167
167
  src: "submitContinue";
168
- logic: xstate140.PromiseActorLogic<SubmitResponse, void, xstate140.EventObject>;
168
+ logic: xstate165.PromiseActorLogic<SubmitResponse, void, xstate165.EventObject>;
169
169
  id: string | undefined;
170
170
  };
171
171
  submitSkip: {
172
172
  src: "submitSkip";
173
- logic: xstate140.PromiseActorLogic<SubmitResponse, void, xstate140.EventObject>;
173
+ logic: xstate165.PromiseActorLogic<SubmitResponse, void, xstate165.EventObject>;
174
174
  id: string | undefined;
175
175
  };
176
176
  }>, "src", TSrc>["logic"]>;
177
- <TLogic extends xstate140.AnyActorLogic>(src: TLogic, ...[options]: xstate140.ConditionalRequired<[options?: ({
177
+ <TLogic extends xstate165.AnyActorLogic>(src: TLogic, ...[options]: xstate165.ConditionalRequired<[options?: ({
178
178
  id?: never;
179
179
  systemId?: string;
180
- input?: xstate140.InputFrom<TLogic> | undefined;
180
+ input?: xstate165.InputFrom<TLogic> | undefined;
181
181
  syncSnapshot?: boolean;
182
- } & { [K in xstate140.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate140.IsNotNever<xstate140.RequiredLogicInput<TLogic>>>): xstate140.ActorRefFromLogic<TLogic>;
182
+ } & { [K in xstate165.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate165.IsNotNever<xstate165.RequiredLogicInput<TLogic>>>): xstate165.ActorRefFromLogic<TLogic>;
183
183
  };
184
184
  input: IdentityReuseInput;
185
- self: xstate140.ActorRef<xstate140.MachineSnapshot<IdentityReuseContext, {
185
+ self: xstate165.ActorRef<xstate165.MachineSnapshot<IdentityReuseContext, {
186
186
  type: "LOAD";
187
187
  } | {
188
188
  type: "START_SELECTION";
@@ -197,7 +197,7 @@ declare const identityReuseMachine: xstate140.StateMachine<IdentityReuseContext,
197
197
  type: "SKIP";
198
198
  } | {
199
199
  type: "RETRY";
200
- }, Record<string, xstate140.AnyActorRef | undefined>, xstate140.StateValue, string, unknown, any, any>, {
200
+ }, Record<string, xstate165.AnyActorRef | undefined>, xstate165.StateValue, string, unknown, any, any>, {
201
201
  type: "LOAD";
202
202
  } | {
203
203
  type: "START_SELECTION";
@@ -212,7 +212,7 @@ declare const identityReuseMachine: xstate140.StateMachine<IdentityReuseContext,
212
212
  type: "SKIP";
213
213
  } | {
214
214
  type: "RETRY";
215
- }, xstate140.AnyEventObject>;
215
+ }, xstate165.AnyEventObject>;
216
216
  }) => {
217
217
  config: IdentityReuseConfig;
218
218
  currentOrganizationName: undefined;