@incodetech/core 0.0.0-dev-20260416-8fd0b75 → 0.0.0-dev-20260416-bf5b221

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.
@@ -2,10 +2,10 @@ import { t as Manager } from "./Manager-C1r-74H0.js";
2
2
  import "./Actor-Cqaw-2DF.js";
3
3
  import "./camera-C1Lz6NFz.js";
4
4
  import { n as DocumentUploadContext, r as DocumentUploadInput, t as DocumentUploadConfig } from "./types-DGwsRYfm.js";
5
- import * as xstate0 from "xstate";
5
+ import * as xstate1087 from "xstate";
6
6
 
7
7
  //#region src/modules/document-upload/documentUploadStateMachine.d.ts
8
- declare const documentUploadMachine: xstate0.StateMachine<DocumentUploadContext, {
8
+ declare const documentUploadMachine: xstate1087.StateMachine<DocumentUploadContext, {
9
9
  type: "START";
10
10
  } | {
11
11
  type: "CAPTURE";
@@ -18,52 +18,52 @@ declare const documentUploadMachine: xstate0.StateMachine<DocumentUploadContext,
18
18
  } | {
19
19
  type: "CLOSE";
20
20
  }, {
21
- [x: string]: xstate0.ActorRefFromLogic<xstate0.PromiseActorLogic<void, {
21
+ [x: string]: xstate1087.ActorRefFromLogic<xstate1087.PromiseActorLogic<MediaStream, void, xstate1087.EventObject>> | xstate1087.ActorRefFromLogic<xstate1087.PromiseActorLogic<void, {
22
22
  imageBase64: string;
23
23
  documentType: string;
24
24
  onProgress: (progress: number) => void;
25
- }, xstate0.EventObject>> | xstate0.ActorRefFromLogic<xstate0.PromiseActorLogic<MediaStream, void, xstate0.EventObject>> | undefined;
26
- }, xstate0.Values<{
25
+ }, xstate1087.EventObject>> | undefined;
26
+ }, xstate1087.Values<{
27
27
  uploadDocument: {
28
28
  src: "uploadDocument";
29
- logic: xstate0.PromiseActorLogic<void, {
29
+ logic: xstate1087.PromiseActorLogic<void, {
30
30
  imageBase64: string;
31
31
  documentType: string;
32
32
  onProgress: (progress: number) => void;
33
- }, xstate0.EventObject>;
33
+ }, xstate1087.EventObject>;
34
34
  id: string | undefined;
35
35
  };
36
36
  initCamera: {
37
37
  src: "initCamera";
38
- logic: xstate0.PromiseActorLogic<MediaStream, void, xstate0.EventObject>;
38
+ logic: xstate1087.PromiseActorLogic<MediaStream, void, xstate1087.EventObject>;
39
39
  id: string | undefined;
40
40
  };
41
- }>, xstate0.Values<{
41
+ }>, xstate1087.Values<{
42
+ setError: {
43
+ type: "setError";
44
+ params: xstate1087.NonReducibleUnknown;
45
+ };
42
46
  setStream: {
43
47
  type: "setStream";
44
- params: xstate0.NonReducibleUnknown;
45
- };
46
- setImageAndClearError: {
47
- type: "setImageAndClearError";
48
- params: xstate0.NonReducibleUnknown;
48
+ params: xstate1087.NonReducibleUnknown;
49
49
  };
50
50
  setProgress: {
51
51
  type: "setProgress";
52
- params: xstate0.NonReducibleUnknown;
53
- };
54
- setError: {
55
- type: "setError";
56
- params: xstate0.NonReducibleUnknown;
52
+ params: xstate1087.NonReducibleUnknown;
57
53
  };
58
54
  clearError: {
59
55
  type: "clearError";
60
- params: xstate0.NonReducibleUnknown;
56
+ params: xstate1087.NonReducibleUnknown;
61
57
  };
62
58
  stopStream: {
63
59
  type: "stopStream";
64
- params: xstate0.NonReducibleUnknown;
60
+ params: xstate1087.NonReducibleUnknown;
61
+ };
62
+ setImageAndClearError: {
63
+ type: "setImageAndClearError";
64
+ params: xstate1087.NonReducibleUnknown;
65
65
  };
66
- }>, never, never, "error" | "idle" | "uploading" | "closed" | "finished" | "initCamera" | "capturing", string, DocumentUploadInput, xstate0.NonReducibleUnknown, xstate0.EventObject, xstate0.MetaObject, {
66
+ }>, never, never, "error" | "idle" | "uploading" | "closed" | "finished" | "initCamera" | "capturing", string, DocumentUploadInput, xstate1087.NonReducibleUnknown, xstate1087.EventObject, xstate1087.MetaObject, {
67
67
  readonly id: "documentUpload";
68
68
  readonly initial: "idle";
69
69
  readonly context: ({
@@ -72,67 +72,67 @@ declare const documentUploadMachine: xstate0.StateMachine<DocumentUploadContext,
72
72
  spawn: {
73
73
  <TSrc extends "uploadDocument" | "initCamera">(logic: TSrc, ...[options]: ({
74
74
  src: "uploadDocument";
75
- logic: xstate0.PromiseActorLogic<void, {
75
+ logic: xstate1087.PromiseActorLogic<void, {
76
76
  imageBase64: string;
77
77
  documentType: string;
78
78
  onProgress: (progress: number) => void;
79
- }, xstate0.EventObject>;
79
+ }, xstate1087.EventObject>;
80
80
  id: string | undefined;
81
81
  } extends infer T ? T extends {
82
82
  src: "uploadDocument";
83
- logic: xstate0.PromiseActorLogic<void, {
83
+ logic: xstate1087.PromiseActorLogic<void, {
84
84
  imageBase64: string;
85
85
  documentType: string;
86
86
  onProgress: (progress: number) => void;
87
- }, xstate0.EventObject>;
87
+ }, xstate1087.EventObject>;
88
88
  id: string | undefined;
89
89
  } ? T extends {
90
90
  src: TSrc;
91
- } ? xstate0.ConditionalRequired<[options?: ({
91
+ } ? xstate1087.ConditionalRequired<[options?: ({
92
92
  id?: T["id"] | undefined;
93
93
  systemId?: string;
94
- input?: xstate0.InputFrom<T["logic"]> | undefined;
94
+ input?: xstate1087.InputFrom<T["logic"]> | undefined;
95
95
  syncSnapshot?: boolean;
96
- } & { [K in xstate0.RequiredActorOptions<T>]: unknown }) | undefined], xstate0.IsNotNever<xstate0.RequiredActorOptions<T>>> : never : never : never) | ({
96
+ } & { [K in xstate1087.RequiredActorOptions<T>]: unknown }) | undefined], xstate1087.IsNotNever<xstate1087.RequiredActorOptions<T>>> : never : never : never) | ({
97
97
  src: "initCamera";
98
- logic: xstate0.PromiseActorLogic<MediaStream, void, xstate0.EventObject>;
98
+ logic: xstate1087.PromiseActorLogic<MediaStream, void, xstate1087.EventObject>;
99
99
  id: string | undefined;
100
100
  } extends infer T_1 ? T_1 extends {
101
101
  src: "initCamera";
102
- logic: xstate0.PromiseActorLogic<MediaStream, void, xstate0.EventObject>;
102
+ logic: xstate1087.PromiseActorLogic<MediaStream, void, xstate1087.EventObject>;
103
103
  id: string | undefined;
104
104
  } ? T_1 extends {
105
105
  src: TSrc;
106
- } ? xstate0.ConditionalRequired<[options?: ({
106
+ } ? xstate1087.ConditionalRequired<[options?: ({
107
107
  id?: T_1["id"] | undefined;
108
108
  systemId?: string;
109
- input?: xstate0.InputFrom<T_1["logic"]> | undefined;
109
+ input?: xstate1087.InputFrom<T_1["logic"]> | undefined;
110
110
  syncSnapshot?: boolean;
111
- } & { [K_1 in xstate0.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate0.IsNotNever<xstate0.RequiredActorOptions<T_1>>> : never : never : never)): xstate0.ActorRefFromLogic<xstate0.GetConcreteByKey<xstate0.Values<{
111
+ } & { [K_1 in xstate1087.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate1087.IsNotNever<xstate1087.RequiredActorOptions<T_1>>> : never : never : never)): xstate1087.ActorRefFromLogic<xstate1087.GetConcreteByKey<xstate1087.Values<{
112
112
  uploadDocument: {
113
113
  src: "uploadDocument";
114
- logic: xstate0.PromiseActorLogic<void, {
114
+ logic: xstate1087.PromiseActorLogic<void, {
115
115
  imageBase64: string;
116
116
  documentType: string;
117
117
  onProgress: (progress: number) => void;
118
- }, xstate0.EventObject>;
118
+ }, xstate1087.EventObject>;
119
119
  id: string | undefined;
120
120
  };
121
121
  initCamera: {
122
122
  src: "initCamera";
123
- logic: xstate0.PromiseActorLogic<MediaStream, void, xstate0.EventObject>;
123
+ logic: xstate1087.PromiseActorLogic<MediaStream, void, xstate1087.EventObject>;
124
124
  id: string | undefined;
125
125
  };
126
126
  }>, "src", TSrc>["logic"]>;
127
- <TLogic extends xstate0.AnyActorLogic>(src: TLogic, ...[options]: xstate0.ConditionalRequired<[options?: ({
127
+ <TLogic extends xstate1087.AnyActorLogic>(src: TLogic, ...[options]: xstate1087.ConditionalRequired<[options?: ({
128
128
  id?: never;
129
129
  systemId?: string;
130
- input?: xstate0.InputFrom<TLogic> | undefined;
130
+ input?: xstate1087.InputFrom<TLogic> | undefined;
131
131
  syncSnapshot?: boolean;
132
- } & { [K in xstate0.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate0.IsNotNever<xstate0.RequiredLogicInput<TLogic>>>): xstate0.ActorRefFromLogic<TLogic>;
132
+ } & { [K in xstate1087.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate1087.IsNotNever<xstate1087.RequiredLogicInput<TLogic>>>): xstate1087.ActorRefFromLogic<TLogic>;
133
133
  };
134
134
  input: DocumentUploadInput;
135
- self: xstate0.ActorRef<xstate0.MachineSnapshot<DocumentUploadContext, {
135
+ self: xstate1087.ActorRef<xstate1087.MachineSnapshot<DocumentUploadContext, {
136
136
  type: "START";
137
137
  } | {
138
138
  type: "CAPTURE";
@@ -144,7 +144,7 @@ declare const documentUploadMachine: xstate0.StateMachine<DocumentUploadContext,
144
144
  type: "RETRY";
145
145
  } | {
146
146
  type: "CLOSE";
147
- }, Record<string, xstate0.AnyActorRef | undefined>, xstate0.StateValue, string, unknown, any, any>, {
147
+ }, Record<string, xstate1087.AnyActorRef | undefined>, xstate1087.StateValue, string, unknown, any, any>, {
148
148
  type: "START";
149
149
  } | {
150
150
  type: "CAPTURE";
@@ -156,7 +156,7 @@ declare const documentUploadMachine: xstate0.StateMachine<DocumentUploadContext,
156
156
  type: "RETRY";
157
157
  } | {
158
158
  type: "CLOSE";
159
- }, xstate0.AnyEventObject>;
159
+ }, xstate1087.AnyEventObject>;
160
160
  }) => {
161
161
  config: DocumentUploadConfig;
162
162
  stream: undefined;
@@ -226,7 +226,7 @@ declare const documentUploadMachine: xstate0.StateMachine<DocumentUploadContext,
226
226
  } | {
227
227
  type: "CLOSE";
228
228
  };
229
- self: xstate0.ActorRef<xstate0.MachineSnapshot<DocumentUploadContext, {
229
+ self: xstate1087.ActorRef<xstate1087.MachineSnapshot<DocumentUploadContext, {
230
230
  type: "START";
231
231
  } | {
232
232
  type: "CAPTURE";
@@ -238,7 +238,7 @@ declare const documentUploadMachine: xstate0.StateMachine<DocumentUploadContext,
238
238
  type: "RETRY";
239
239
  } | {
240
240
  type: "CLOSE";
241
- }, Record<string, xstate0.AnyActorRef>, xstate0.StateValue, string, unknown, any, any>, {
241
+ }, Record<string, xstate1087.AnyActorRef>, xstate1087.StateValue, string, unknown, any, any>, {
242
242
  type: "START";
243
243
  } | {
244
244
  type: "CAPTURE";
@@ -250,7 +250,7 @@ declare const documentUploadMachine: xstate0.StateMachine<DocumentUploadContext,
250
250
  type: "RETRY";
251
251
  } | {
252
252
  type: "CLOSE";
253
- }, xstate0.AnyEventObject>;
253
+ }, xstate1087.AnyEventObject>;
254
254
  }) => {
255
255
  imageBase64: string;
256
256
  documentType: string;
@@ -1,4 +1,4 @@
1
1
  import "./Manager-C1r-74H0.js";
2
2
  import "./Actor-Cqaw-2DF.js";
3
- import { a as AE_CONSENT_KEYS, c as ConsentKey, d as ElectronicSignatureVariant, f as QE_CONSENT_KEYS, g as getDefaultConsentChecks, h as getConsentKeys, i as electronicSignatureMachine, l as ElectronicSignatureConfig, m as areAllConsented, n as ElectronicSignatureState, o as AeConsentKey, p as QeConsentKey, r as createElectronicSignatureManager, s as ConsentChecks, t as ElectronicSignatureManager, u as ElectronicSignatureDocument } from "./index-CK2pNq58.js";
3
+ import { a as AE_CONSENT_KEYS, c as ConsentKey, d as ElectronicSignatureVariant, f as QE_CONSENT_KEYS, g as getDefaultConsentChecks, h as getConsentKeys, i as electronicSignatureMachine, l as ElectronicSignatureConfig, m as areAllConsented, n as ElectronicSignatureState, o as AeConsentKey, p as QeConsentKey, r as createElectronicSignatureManager, s as ConsentChecks, t as ElectronicSignatureManager, u as ElectronicSignatureDocument } from "./index-D91wFwyA.js";
4
4
  export { AE_CONSENT_KEYS, AeConsentKey, ConsentChecks, ConsentKey, ElectronicSignatureConfig, ElectronicSignatureDocument, ElectronicSignatureManager, ElectronicSignatureState, ElectronicSignatureVariant, QE_CONSENT_KEYS, QeConsentKey, areAllConsented, createElectronicSignatureManager, electronicSignatureMachine, getConsentKeys, getDefaultConsentChecks };
@@ -2,16 +2,16 @@ import "./warmup-BoNCXpou.js";
2
2
  import "./Manager-C1r-74H0.js";
3
3
  import { n as createActor } from "./Actor-Cqaw-2DF.js";
4
4
  import { r as fromPromise } from "./StateMachine-sxIjYRWS.js";
5
- import { c as FaceCaptureEvent, f as SendFaceImageResponse, l as FaceCaptureInput, n as FaceCaptureManagerState, p as BaseWasmProvider, s as FaceCaptureContext, t as FaceCaptureManager, u as faceCaptureMachine } from "./faceCaptureManagerFactory-CV5lfQZg.js";
5
+ import { c as FaceCaptureEvent, f as SendFaceImageResponse, l as FaceCaptureInput, n as FaceCaptureManagerState, p as BaseWasmProvider, s as FaceCaptureContext, t as FaceCaptureManager, u as faceCaptureMachine } from "./faceCaptureManagerFactory-XQOqroTM.js";
6
6
  import "./camera-C1Lz6NFz.js";
7
7
  import "./types-DGwsRYfm.js";
8
- import "./types-Bk2AoUFA.js";
8
+ import "./types-x6tue2ld.js";
9
9
  import { a as IWasmUtilCapability, o as VirtualCameraCheckOutput, s as WasmUtilConfig, u as IStorageCapability } from "./deepsightService-D8Kbc-41.js";
10
10
  import "./types-B-JXmW0H.js";
11
- import { a as ProcessFaceResponse, i as createSelfieManagerFromActor, n as SelfieState, t as SelfieManager } from "./selfieManager-J9vh9MZ6.js";
12
- import { i as createAuthenticationManagerFromActor, n as AuthenticationState, t as AuthenticationManager } from "./authenticationManager-DxWVcbnl.js";
11
+ import { a as ProcessFaceResponse, i as createSelfieManagerFromActor, n as SelfieState, t as SelfieManager } from "./selfieManager-Bsag2fr3.js";
12
+ import { i as createAuthenticationManagerFromActor, n as AuthenticationState, t as AuthenticationManager } from "./authenticationManager-C75RqUmN.js";
13
13
  import { i as createEmailManagerFromActor, n as EmailState, t as EmailManager } from "./emailManager-DXdv0T1X.js";
14
- import { C as CaptureIdResponse, i as createIdCaptureManagerFromActor, n as IdCaptureState, t as IdCaptureManager } from "./idCaptureManager-BF-9O4pN.js";
14
+ import { C as CaptureIdResponse, i as createIdCaptureManagerFromActor, n as IdCaptureState, t as IdCaptureManager } from "./idCaptureManager-eoc0PvFh.js";
15
15
  import { i as createPhoneManagerFromActor, n as PhoneState, t as PhoneManager } from "./phoneManager-CZkwAnZA.js";
16
16
 
17
17
  //#region src/modules/authentication/authenticationUploadService.d.ts
@@ -27,8 +27,8 @@ import "./emailStateMachine-s7890k9s.esm.js";
27
27
  import { n as createEmailManagerFromActor } from "./emailManager-rQAZJqi6.esm.js";
28
28
  import "./selfieStateMachine-BkYFIb_x.esm.js";
29
29
  import { n as createSelfieManagerFromActor } from "./selfieManager-Cvixzq_O.esm.js";
30
- import "./idCaptureStateMachine-DndyW7Rc.esm.js";
31
- import { n as createIdCaptureManagerFromActor } from "./idCaptureManager-Cxuy_f9Q.esm.js";
30
+ import "./idCaptureStateMachine-hELTmJQc.esm.js";
31
+ import { n as createIdCaptureManagerFromActor } from "./idCaptureManager-Bvv0ssj8.esm.js";
32
32
  import "./phoneStateMachine-B2GLKrTW.esm.js";
33
33
  import { n as createPhoneManagerFromActor } from "./phoneManager-CPVBmE6I.esm.js";
34
34
 
@@ -3,7 +3,7 @@ import { t as Manager } from "./Manager-C1r-74H0.js";
3
3
  import { t as ActorRefFrom } from "./Actor-Cqaw-2DF.js";
4
4
  import { n as StateMachine, t as AnyStateMachine } from "./StateMachine-sxIjYRWS.js";
5
5
  import { t as CameraStream } from "./camera-C1Lz6NFz.js";
6
- import { i as FlowModuleConfig, n as Flow } from "./types-Bk2AoUFA.js";
6
+ import { i as FlowModuleConfig, n as Flow } from "./types-x6tue2ld.js";
7
7
  import { a as IWasmUtilCapability, c as IMLProviderCapability, d as IRecordingCapability, i as IncodeCanvas, l as MLProviderConfig, r as StreamCanvasCapture, t as DeepsightService, u as IStorageCapability } from "./deepsightService-D8Kbc-41.js";
8
8
  import { n as PermissionStatus, t as PermissionResult } from "./types-B-JXmW0H.js";
9
9
 
package/dist/flow.d.ts CHANGED
@@ -3,7 +3,7 @@ import { t as Manager } from "./Manager-C1r-74H0.js";
3
3
  import { t as AnyStateMachine } from "./StateMachine-sxIjYRWS.js";
4
4
  import "./camera-C1Lz6NFz.js";
5
5
  import "./types-DGwsRYfm.js";
6
- import { i as FlowModuleConfig, n as Flow, r as FlowModule } from "./types-Bk2AoUFA.js";
6
+ import { i as FlowModuleConfig, n as Flow, r as FlowModule } from "./types-x6tue2ld.js";
7
7
  import { n as GetFinishStatusFn, t as FinishStatus } from "./flowCompletionService-D1DGDmXn.js";
8
8
  import { t as ModuleRegistry } from "./types-DH_kbvQH.js";
9
9
 
package/dist/home.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { t as Manager } from "./Manager-C1r-74H0.js";
2
2
  import "./camera-C1Lz6NFz.js";
3
3
  import "./types-DGwsRYfm.js";
4
- import { t as EmptyConfig } from "./types-Bk2AoUFA.js";
5
- import * as xstate204 from "xstate";
4
+ import { t as EmptyConfig } from "./types-x6tue2ld.js";
5
+ import * as xstate149 from "xstate";
6
6
 
7
7
  //#region src/modules/home/types.d.ts
8
8
  type HomeConfig = EmptyConfig;
@@ -34,41 +34,41 @@ type HomeContext = {
34
34
  type HomeInput = {
35
35
  config: EmptyConfig;
36
36
  };
37
- declare const homeMachine: xstate204.StateMachine<HomeContext, {
37
+ declare const homeMachine: xstate149.StateMachine<HomeContext, {
38
38
  type: "LOAD";
39
39
  } | {
40
40
  type: "COMPLETE";
41
41
  } | {
42
42
  type: "RESET";
43
- }, {}, never, never, never, never, "idle" | "finished" | "main", string, HomeInput, xstate204.NonReducibleUnknown, xstate204.EventObject, xstate204.MetaObject, {
43
+ }, {}, never, never, never, never, "idle" | "finished" | "main", string, HomeInput, xstate149.NonReducibleUnknown, xstate149.EventObject, xstate149.MetaObject, {
44
44
  readonly id: "home";
45
45
  readonly initial: "idle";
46
46
  readonly context: ({
47
47
  input
48
48
  }: {
49
49
  spawn: {
50
- <TSrc extends never>(logic: TSrc, ...[options]: never): xstate204.ActorRefFromLogic<never>;
51
- <TLogic extends xstate204.AnyActorLogic>(src: TLogic, ...[options]: xstate204.ConditionalRequired<[options?: ({
50
+ <TSrc extends never>(logic: TSrc, ...[options]: never): xstate149.ActorRefFromLogic<never>;
51
+ <TLogic extends xstate149.AnyActorLogic>(src: TLogic, ...[options]: xstate149.ConditionalRequired<[options?: ({
52
52
  id?: never;
53
53
  systemId?: string;
54
- input?: xstate204.InputFrom<TLogic> | undefined;
54
+ input?: xstate149.InputFrom<TLogic> | undefined;
55
55
  syncSnapshot?: boolean;
56
- } & { [K in xstate204.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate204.IsNotNever<xstate204.RequiredLogicInput<TLogic>>>): xstate204.ActorRefFromLogic<TLogic>;
56
+ } & { [K in xstate149.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate149.IsNotNever<xstate149.RequiredLogicInput<TLogic>>>): xstate149.ActorRefFromLogic<TLogic>;
57
57
  };
58
58
  input: HomeInput;
59
- self: xstate204.ActorRef<xstate204.MachineSnapshot<HomeContext, {
59
+ self: xstate149.ActorRef<xstate149.MachineSnapshot<HomeContext, {
60
60
  type: "LOAD";
61
61
  } | {
62
62
  type: "COMPLETE";
63
63
  } | {
64
64
  type: "RESET";
65
- }, Record<string, xstate204.AnyActorRef | undefined>, xstate204.StateValue, string, unknown, any, any>, {
65
+ }, Record<string, xstate149.AnyActorRef | undefined>, xstate149.StateValue, string, unknown, any, any>, {
66
66
  type: "LOAD";
67
67
  } | {
68
68
  type: "COMPLETE";
69
69
  } | {
70
70
  type: "RESET";
71
- }, xstate204.AnyEventObject>;
71
+ }, xstate149.AnyEventObject>;
72
72
  }) => {
73
73
  config: EmptyConfig;
74
74
  };
package/dist/id.d.ts CHANGED
@@ -4,8 +4,8 @@ import "./Actor-Cqaw-2DF.js";
4
4
  import "./StateMachine-sxIjYRWS.js";
5
5
  import { t as CameraStream } from "./camera-C1Lz6NFz.js";
6
6
  import "./types-DGwsRYfm.js";
7
- import "./types-Bk2AoUFA.js";
7
+ import "./types-x6tue2ld.js";
8
8
  import "./deepsightService-D8Kbc-41.js";
9
9
  import { n as PermissionStatus, t as PermissionResult } from "./types-B-JXmW0H.js";
10
- import { A as IdCaptureDependencies, B as RecordingSession, C as CaptureIdResponse, D as ID_ERROR_CODES, E as DetectionStatus, F as IdCaptureThresholds, H as DetectionOrientation, I as IdDocumentType, L as IdError, M as IdCaptureGeometry, N as IdCaptureInput, O as IdCaptureConfig, P as IdCaptureMode, R as IdErrorCode, S as idCaptureMachine, T as DetectionArea, U as IdCaptureSettings, V as UploadIdResponse, _ as validateUploadResponse, a as IdCaptureInitResult, b as createIdCaptureActor, c as UploadIdImageParams, d as preloadIdRecordingProvider, f as processId, g as uploadIdImage, h as stopStream, j as IdCaptureEvent, k as IdCaptureContext, l as ValidationError, m as stopRecording, n as IdCaptureState, o as InitializeIdCaptureParams, p as startRecordingSession, r as createIdCaptureManager, s as StartRecordingParams, t as IdCaptureManager, u as initializeIdCapture, v as CreateIdCaptureActorOptions, w as CapturedImage, x as IdCaptureMachine, y as IdCaptureActor, z as IdFlowStep } from "./idCaptureManager-BF-9O4pN.js";
10
+ import { A as IdCaptureDependencies, B as RecordingSession, C as CaptureIdResponse, D as ID_ERROR_CODES, E as DetectionStatus, F as IdCaptureThresholds, H as DetectionOrientation, I as IdDocumentType, L as IdError, M as IdCaptureGeometry, N as IdCaptureInput, O as IdCaptureConfig, P as IdCaptureMode, R as IdErrorCode, S as idCaptureMachine, T as DetectionArea, U as IdCaptureSettings, V as UploadIdResponse, _ as validateUploadResponse, a as IdCaptureInitResult, b as createIdCaptureActor, c as UploadIdImageParams, d as preloadIdRecordingProvider, f as processId, g as uploadIdImage, h as stopStream, j as IdCaptureEvent, k as IdCaptureContext, l as ValidationError, m as stopRecording, n as IdCaptureState, o as InitializeIdCaptureParams, p as startRecordingSession, r as createIdCaptureManager, s as StartRecordingParams, t as IdCaptureManager, u as initializeIdCapture, v as CreateIdCaptureActorOptions, w as CapturedImage, x as IdCaptureMachine, y as IdCaptureActor, z as IdFlowStep } from "./idCaptureManager-eoc0PvFh.js";
11
11
  export { CameraStream, CaptureIdResponse, CapturedImage, type CreateIdCaptureActorOptions, DetectionArea, DetectionOrientation, DetectionStatus, ID_ERROR_CODES, type IdCaptureActor, IdCaptureConfig, type IdCaptureContext, IdCaptureDependencies, type IdCaptureEvent, IdCaptureGeometry, IdCaptureInitResult, type IdCaptureInput, type IdCaptureMachine, type IdCaptureManager, IdCaptureMode, IdCaptureSettings, type IdCaptureState, IdCaptureThresholds, IdDocumentType, IdError, IdErrorCode, IdFlowStep, InitializeIdCaptureParams, PermissionResult, PermissionStatus, RecordingSession, StartRecordingParams, UploadIdImageParams, UploadIdResponse, ValidationError, createIdCaptureActor, createIdCaptureManager, idCaptureMachine, initializeIdCapture, preloadIdRecordingProvider, processId, startRecordingSession, stopRecording, stopStream, uploadIdImage, validateUploadResponse };
package/dist/id.esm.js CHANGED
@@ -18,7 +18,7 @@ import "./ITimerCapability-6rqYcRcc.esm.js";
18
18
  import "./backCameraStream-BgZ58W73.esm.js";
19
19
  import "./getDeviceClass-DEQ0Ko8p.esm.js";
20
20
  import "./BrowserTimerProvider-DDCqhG2g.esm.js";
21
- import { a as startRecordingSession, c as uploadIdImage, i as processId, l as validateUploadResponse, n as initializeIdCapture, o as stopRecording, r as preloadIdRecordingProvider, s as stopStream, t as idCaptureMachine, u as ID_ERROR_CODES } from "./idCaptureStateMachine-DndyW7Rc.esm.js";
22
- import { r as createIdCaptureActor, t as createIdCaptureManager } from "./idCaptureManager-Cxuy_f9Q.esm.js";
21
+ import { a as startRecordingSession, c as uploadIdImage, i as processId, l as validateUploadResponse, n as initializeIdCapture, o as stopRecording, r as preloadIdRecordingProvider, s as stopStream, t as idCaptureMachine, u as ID_ERROR_CODES } from "./idCaptureStateMachine-hELTmJQc.esm.js";
22
+ import { r as createIdCaptureActor, t as createIdCaptureManager } from "./idCaptureManager-Bvv0ssj8.esm.js";
23
23
 
24
24
  export { ID_ERROR_CODES, createIdCaptureActor, createIdCaptureManager, idCaptureMachine, initializeIdCapture, preloadIdRecordingProvider, processId, startRecordingSession, stopRecording, stopStream, uploadIdImage, validateUploadResponse };
@@ -1,7 +1,7 @@
1
1
  import { n as eventModuleNames, o as createManagerInstrumentation, r as eventScreenNames } from "./events-GaZE-J-6.esm.js";
2
2
  import { a as createActor, o as createManager } from "./xstate.esm-BlgyVBVv.esm.js";
3
3
  import { t as BrowserStorageProvider } from "./BrowserStorageProvider-DOp7HlOV.esm.js";
4
- import { t as idCaptureMachine } from "./idCaptureStateMachine-DndyW7Rc.esm.js";
4
+ import { t as idCaptureMachine } from "./idCaptureStateMachine-hELTmJQc.esm.js";
5
5
 
6
6
  //#region src/modules/id/idCaptureActor.ts
7
7
  function createIdCaptureActor(options) {
@@ -80,6 +80,42 @@ function getErrorDescription(errorCode, uploadResponse) {
80
80
  SERVER_ERROR: "Please try again later"
81
81
  }[errorCode];
82
82
  }
83
+ function shouldCaptureBack(context) {
84
+ if (!(context.currentMode === "front" || context.currentMode === "passport")) return false;
85
+ if (context.config.onlyFront || context.config.onlyBack) return false;
86
+ if (context.config.usSmartCapture && context.currentMode === "front") return false;
87
+ const serverSkipped = context.uploadResponse?.skipBackIdCapture === true;
88
+ const forceBackForNonPassport = context.config.alwaysCaptureBackOfId === true && context.currentMode !== "passport";
89
+ return !serverSkipped || forceBackForNonPassport;
90
+ }
91
+ function shouldCaptureFront(context) {
92
+ return context.config.usSmartCapture === true && context.currentMode === "back" && context.uploadResponse?.forceFrontIdCapture === true;
93
+ }
94
+ function mapCaptureState(snapshot, context) {
95
+ const captureStatus = getCaptureStatus(snapshot) ?? "initializing";
96
+ const { uploadError, uploadResponse } = context;
97
+ return {
98
+ status: "capture",
99
+ captureStatus,
100
+ stream: context.stream,
101
+ detectionStatus: context.detectionStatus,
102
+ debugFrame: void 0,
103
+ attemptsRemaining: context.attemptsRemaining,
104
+ uploadError,
105
+ currentMode: context.currentMode,
106
+ counterValue: context.counterValue,
107
+ orientation: context.orientation,
108
+ idType: context.idType,
109
+ previewImageUrl: context.previewImageUrl,
110
+ uploadProgress: context.uploadProgress ?? 0,
111
+ uploadErrorMessage: uploadError ? getErrorMessage(uploadError) : void 0,
112
+ uploadErrorDescription: uploadError ? getErrorDescription(uploadError, uploadResponse) : void 0,
113
+ needsBackCapture: shouldCaptureBack(context),
114
+ needsFrontCapture: shouldCaptureFront(context),
115
+ showCaptureButtonInAuto: context.config.showCaptureButtonInAuto ?? false,
116
+ canRetry: context.attemptsRemaining > 0
117
+ };
118
+ }
83
119
  function mapState(snapshot) {
84
120
  const { context } = snapshot;
85
121
  if (snapshot.matches("idle")) return { status: "idle" };
@@ -105,32 +141,7 @@ function mapState(snapshot) {
105
141
  permissionStatus
106
142
  };
107
143
  }
108
- if (snapshot.matches("capture")) {
109
- const captureStatus = getCaptureStatus(snapshot);
110
- const needsBackCapture = (context.currentMode === "front" || context.currentMode === "passport") && !context.config.onlyFront && !context.config.onlyBack && !context.uploadResponse?.skipBackIdCapture && !(context.config.usSmartCapture && context.currentMode === "front");
111
- const needsFrontCapture = context.config.usSmartCapture === true && context.currentMode === "back" && context.uploadResponse?.forceFrontIdCapture === true;
112
- return {
113
- status: "capture",
114
- captureStatus: captureStatus ?? "initializing",
115
- stream: context.stream,
116
- detectionStatus: context.detectionStatus,
117
- debugFrame: void 0,
118
- attemptsRemaining: context.attemptsRemaining,
119
- uploadError: context.uploadError,
120
- currentMode: context.currentMode,
121
- counterValue: context.counterValue,
122
- orientation: context.orientation,
123
- idType: context.idType,
124
- previewImageUrl: context.previewImageUrl,
125
- uploadProgress: context.uploadProgress ?? 0,
126
- uploadErrorMessage: context.uploadError ? getErrorMessage(context.uploadError) : void 0,
127
- uploadErrorDescription: context.uploadError ? getErrorDescription(context.uploadError, context.uploadResponse) : void 0,
128
- needsBackCapture,
129
- needsFrontCapture,
130
- showCaptureButtonInAuto: context.config.showCaptureButtonInAuto ?? false,
131
- canRetry: context.attemptsRemaining > 0
132
- };
133
- }
144
+ if (snapshot.matches("capture")) return mapCaptureState(snapshot, context);
134
145
  if (snapshot.matches("mandatoryConsent")) return {
135
146
  status: "mandatoryConsent",
136
147
  regulationType: context.uploadResponse?.regulationType ?? "Other"
@@ -2,7 +2,7 @@ import { t as Manager } from "./Manager-C1r-74H0.js";
2
2
  import { t as ActorRefFrom } from "./Actor-Cqaw-2DF.js";
3
3
  import { n as StateMachine, t as AnyStateMachine } from "./StateMachine-sxIjYRWS.js";
4
4
  import { t as CameraStream } from "./camera-C1Lz6NFz.js";
5
- import { a as RegulationTypes, n as Flow, o as TutorialIdConfig } from "./types-Bk2AoUFA.js";
5
+ import { a as RegulationTypes, n as Flow, o as TutorialIdConfig } from "./types-x6tue2ld.js";
6
6
  import { c as IMLProviderCapability, d as IRecordingCapability, f as RecordingConnection, i as IncodeCanvas, l as MLProviderConfig, n as IMotionSensorCapability, r as StreamCanvasCapture, t as DeepsightService, u as IStorageCapability } from "./deepsightService-D8Kbc-41.js";
7
7
  import { n as PermissionStatus, t as PermissionResult } from "./types-B-JXmW0H.js";
8
8
 
@@ -1079,7 +1079,9 @@ const shouldContinueToBackGuard = ({ context }) => {
1079
1079
  if (context.config.onlyFront) return false;
1080
1080
  if (context.config.onlyBack) return false;
1081
1081
  if (context.config.usSmartCapture) return false;
1082
- if (context.uploadResponse?.skipBackIdCapture) return false;
1082
+ if (context.uploadResponse?.skipBackIdCapture) {
1083
+ if (!(context.config.alwaysCaptureBackOfId === true && context.currentMode !== "passport")) return false;
1084
+ }
1083
1085
  return true;
1084
1086
  };
1085
1087
  const shouldContinueToFrontGuard = ({ context }) => context.config.usSmartCapture === true && context.currentMode === "back" && context.uploadResponse?.forceFrontIdCapture === true;