@incodetech/core 0.0.0-dev-20260226-4cb58f5 → 0.0.0-dev-20260227-bd6b490

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.
@@ -1,9 +1,9 @@
1
1
  import { t as Manager } from "./Manager-C647XkuZ.js";
2
2
  import { n as DocumentUploadContext, r as DocumentUploadInput, t as DocumentUploadConfig } from "./types-B3jgq_IJ.js";
3
- import * as xstate212 from "xstate";
3
+ import * as xstate0 from "xstate";
4
4
 
5
5
  //#region src/modules/document-upload/documentUploadStateMachine.d.ts
6
- declare const documentUploadMachine: xstate212.StateMachine<DocumentUploadContext, {
6
+ declare const documentUploadMachine: xstate0.StateMachine<DocumentUploadContext, {
7
7
  type: "START";
8
8
  } | {
9
9
  type: "CAPTURE";
@@ -16,52 +16,52 @@ declare const documentUploadMachine: xstate212.StateMachine<DocumentUploadContex
16
16
  } | {
17
17
  type: "CLOSE";
18
18
  }, {
19
- [x: string]: xstate212.ActorRefFromLogic<xstate212.PromiseActorLogic<MediaStream, void, xstate212.EventObject>> | xstate212.ActorRefFromLogic<xstate212.PromiseActorLogic<void, {
19
+ [x: string]: xstate0.ActorRefFromLogic<xstate0.PromiseActorLogic<MediaStream, void, xstate0.EventObject>> | xstate0.ActorRefFromLogic<xstate0.PromiseActorLogic<void, {
20
20
  imageBase64: string;
21
21
  documentType: string;
22
22
  onProgress: (progress: number) => void;
23
- }, xstate212.EventObject>> | undefined;
24
- }, xstate212.Values<{
23
+ }, xstate0.EventObject>> | undefined;
24
+ }, xstate0.Values<{
25
25
  initCamera: {
26
26
  src: "initCamera";
27
- logic: xstate212.PromiseActorLogic<MediaStream, void, xstate212.EventObject>;
27
+ logic: xstate0.PromiseActorLogic<MediaStream, void, xstate0.EventObject>;
28
28
  id: string | undefined;
29
29
  };
30
30
  uploadDocument: {
31
31
  src: "uploadDocument";
32
- logic: xstate212.PromiseActorLogic<void, {
32
+ logic: xstate0.PromiseActorLogic<void, {
33
33
  imageBase64: string;
34
34
  documentType: string;
35
35
  onProgress: (progress: number) => void;
36
- }, xstate212.EventObject>;
36
+ }, xstate0.EventObject>;
37
37
  id: string | undefined;
38
38
  };
39
- }>, xstate212.Values<{
40
- setError: {
41
- type: "setError";
42
- params: xstate212.NonReducibleUnknown;
43
- };
39
+ }>, xstate0.Values<{
44
40
  setStream: {
45
41
  type: "setStream";
46
- params: xstate212.NonReducibleUnknown;
42
+ params: xstate0.NonReducibleUnknown;
47
43
  };
48
44
  setImageAndClearError: {
49
45
  type: "setImageAndClearError";
50
- params: xstate212.NonReducibleUnknown;
46
+ params: xstate0.NonReducibleUnknown;
51
47
  };
52
48
  setProgress: {
53
49
  type: "setProgress";
54
- params: xstate212.NonReducibleUnknown;
50
+ params: xstate0.NonReducibleUnknown;
51
+ };
52
+ setError: {
53
+ type: "setError";
54
+ params: xstate0.NonReducibleUnknown;
55
55
  };
56
56
  clearError: {
57
57
  type: "clearError";
58
- params: xstate212.NonReducibleUnknown;
58
+ params: xstate0.NonReducibleUnknown;
59
59
  };
60
60
  stopStream: {
61
61
  type: "stopStream";
62
- params: xstate212.NonReducibleUnknown;
62
+ params: xstate0.NonReducibleUnknown;
63
63
  };
64
- }>, never, never, "error" | "idle" | "finished" | "initCamera" | "capturing" | "closed" | "uploading", string, DocumentUploadInput, xstate212.NonReducibleUnknown, xstate212.EventObject, xstate212.MetaObject, {
64
+ }>, never, never, "error" | "initCamera" | "idle" | "capturing" | "closed" | "uploading" | "finished", string, DocumentUploadInput, xstate0.NonReducibleUnknown, xstate0.EventObject, xstate0.MetaObject, {
65
65
  readonly id: "documentUpload";
66
66
  readonly initial: "idle";
67
67
  readonly context: ({
@@ -70,67 +70,67 @@ declare const documentUploadMachine: xstate212.StateMachine<DocumentUploadContex
70
70
  spawn: {
71
71
  <TSrc extends "initCamera" | "uploadDocument">(logic: TSrc, ...[options]: ({
72
72
  src: "initCamera";
73
- logic: xstate212.PromiseActorLogic<MediaStream, void, xstate212.EventObject>;
73
+ logic: xstate0.PromiseActorLogic<MediaStream, void, xstate0.EventObject>;
74
74
  id: string | undefined;
75
75
  } extends infer T ? T extends {
76
76
  src: "initCamera";
77
- logic: xstate212.PromiseActorLogic<MediaStream, void, xstate212.EventObject>;
77
+ logic: xstate0.PromiseActorLogic<MediaStream, void, xstate0.EventObject>;
78
78
  id: string | undefined;
79
79
  } ? T extends {
80
80
  src: TSrc;
81
- } ? xstate212.ConditionalRequired<[options?: ({
81
+ } ? xstate0.ConditionalRequired<[options?: ({
82
82
  id?: T["id"] | undefined;
83
83
  systemId?: string;
84
- input?: xstate212.InputFrom<T["logic"]> | undefined;
84
+ input?: xstate0.InputFrom<T["logic"]> | undefined;
85
85
  syncSnapshot?: boolean;
86
- } & { [K in xstate212.RequiredActorOptions<T>]: unknown }) | undefined], xstate212.IsNotNever<xstate212.RequiredActorOptions<T>>> : never : never : never) | ({
86
+ } & { [K in xstate0.RequiredActorOptions<T>]: unknown }) | undefined], xstate0.IsNotNever<xstate0.RequiredActorOptions<T>>> : never : never : never) | ({
87
87
  src: "uploadDocument";
88
- logic: xstate212.PromiseActorLogic<void, {
88
+ logic: xstate0.PromiseActorLogic<void, {
89
89
  imageBase64: string;
90
90
  documentType: string;
91
91
  onProgress: (progress: number) => void;
92
- }, xstate212.EventObject>;
92
+ }, xstate0.EventObject>;
93
93
  id: string | undefined;
94
94
  } extends infer T_1 ? T_1 extends {
95
95
  src: "uploadDocument";
96
- logic: xstate212.PromiseActorLogic<void, {
96
+ logic: xstate0.PromiseActorLogic<void, {
97
97
  imageBase64: string;
98
98
  documentType: string;
99
99
  onProgress: (progress: number) => void;
100
- }, xstate212.EventObject>;
100
+ }, xstate0.EventObject>;
101
101
  id: string | undefined;
102
102
  } ? T_1 extends {
103
103
  src: TSrc;
104
- } ? xstate212.ConditionalRequired<[options?: ({
104
+ } ? xstate0.ConditionalRequired<[options?: ({
105
105
  id?: T_1["id"] | undefined;
106
106
  systemId?: string;
107
- input?: xstate212.InputFrom<T_1["logic"]> | undefined;
107
+ input?: xstate0.InputFrom<T_1["logic"]> | undefined;
108
108
  syncSnapshot?: boolean;
109
- } & { [K_1 in xstate212.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate212.IsNotNever<xstate212.RequiredActorOptions<T_1>>> : never : never : never)): xstate212.ActorRefFromLogic<xstate212.GetConcreteByKey<xstate212.Values<{
109
+ } & { [K_1 in xstate0.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate0.IsNotNever<xstate0.RequiredActorOptions<T_1>>> : never : never : never)): xstate0.ActorRefFromLogic<xstate0.GetConcreteByKey<xstate0.Values<{
110
110
  initCamera: {
111
111
  src: "initCamera";
112
- logic: xstate212.PromiseActorLogic<MediaStream, void, xstate212.EventObject>;
112
+ logic: xstate0.PromiseActorLogic<MediaStream, void, xstate0.EventObject>;
113
113
  id: string | undefined;
114
114
  };
115
115
  uploadDocument: {
116
116
  src: "uploadDocument";
117
- logic: xstate212.PromiseActorLogic<void, {
117
+ logic: xstate0.PromiseActorLogic<void, {
118
118
  imageBase64: string;
119
119
  documentType: string;
120
120
  onProgress: (progress: number) => void;
121
- }, xstate212.EventObject>;
121
+ }, xstate0.EventObject>;
122
122
  id: string | undefined;
123
123
  };
124
124
  }>, "src", TSrc>["logic"]>;
125
- <TLogic extends xstate212.AnyActorLogic>(src: TLogic, ...[options]: xstate212.ConditionalRequired<[options?: ({
125
+ <TLogic extends xstate0.AnyActorLogic>(src: TLogic, ...[options]: xstate0.ConditionalRequired<[options?: ({
126
126
  id?: never;
127
127
  systemId?: string;
128
- input?: xstate212.InputFrom<TLogic> | undefined;
128
+ input?: xstate0.InputFrom<TLogic> | undefined;
129
129
  syncSnapshot?: boolean;
130
- } & { [K in xstate212.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate212.IsNotNever<xstate212.RequiredLogicInput<TLogic>>>): xstate212.ActorRefFromLogic<TLogic>;
130
+ } & { [K in xstate0.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate0.IsNotNever<xstate0.RequiredLogicInput<TLogic>>>): xstate0.ActorRefFromLogic<TLogic>;
131
131
  };
132
132
  input: DocumentUploadInput;
133
- self: xstate212.ActorRef<xstate212.MachineSnapshot<DocumentUploadContext, {
133
+ self: xstate0.ActorRef<xstate0.MachineSnapshot<DocumentUploadContext, {
134
134
  type: "START";
135
135
  } | {
136
136
  type: "CAPTURE";
@@ -142,7 +142,7 @@ declare const documentUploadMachine: xstate212.StateMachine<DocumentUploadContex
142
142
  type: "RETRY";
143
143
  } | {
144
144
  type: "CLOSE";
145
- }, Record<string, xstate212.AnyActorRef | undefined>, xstate212.StateValue, string, unknown, any, any>, {
145
+ }, Record<string, xstate0.AnyActorRef | undefined>, xstate0.StateValue, string, unknown, any, any>, {
146
146
  type: "START";
147
147
  } | {
148
148
  type: "CAPTURE";
@@ -154,7 +154,7 @@ declare const documentUploadMachine: xstate212.StateMachine<DocumentUploadContex
154
154
  type: "RETRY";
155
155
  } | {
156
156
  type: "CLOSE";
157
- }, xstate212.AnyEventObject>;
157
+ }, xstate0.AnyEventObject>;
158
158
  }) => {
159
159
  config: DocumentUploadConfig;
160
160
  stream: undefined;
@@ -224,7 +224,7 @@ declare const documentUploadMachine: xstate212.StateMachine<DocumentUploadContex
224
224
  } | {
225
225
  type: "CLOSE";
226
226
  };
227
- self: xstate212.ActorRef<xstate212.MachineSnapshot<DocumentUploadContext, {
227
+ self: xstate0.ActorRef<xstate0.MachineSnapshot<DocumentUploadContext, {
228
228
  type: "START";
229
229
  } | {
230
230
  type: "CAPTURE";
@@ -236,7 +236,7 @@ declare const documentUploadMachine: xstate212.StateMachine<DocumentUploadContex
236
236
  type: "RETRY";
237
237
  } | {
238
238
  type: "CLOSE";
239
- }, Record<string, xstate212.AnyActorRef>, xstate212.StateValue, string, unknown, any, any>, {
239
+ }, Record<string, xstate0.AnyActorRef>, xstate0.StateValue, string, unknown, any, any>, {
240
240
  type: "START";
241
241
  } | {
242
242
  type: "CAPTURE";
@@ -248,7 +248,7 @@ declare const documentUploadMachine: xstate212.StateMachine<DocumentUploadContex
248
248
  type: "RETRY";
249
249
  } | {
250
250
  type: "CLOSE";
251
- }, xstate212.AnyEventObject>;
251
+ }, xstate0.AnyEventObject>;
252
252
  }) => {
253
253
  imageBase64: string;
254
254
  documentType: string;
@@ -1854,11 +1854,7 @@ const _idCaptureMachine = setup({
1854
1854
  {
1855
1855
  target: "detecting",
1856
1856
  guard: "hasAttemptsRemaining",
1857
- actions: [
1858
- "resetDetection",
1859
- "clearUploadFailure",
1860
- assign({ manualCaptureTriggered: () => false })
1861
- ]
1857
+ actions: ["resetDetection", "clearUploadFailure"]
1862
1858
  },
1863
1859
  {
1864
1860
  target: "#idCapture.frontFinished",
@@ -1868,7 +1864,7 @@ const _idCaptureMachine = setup({
1868
1864
  target: "#idCapture.backFinished",
1869
1865
  guard: "shouldContinueToFront"
1870
1866
  },
1871
- { target: "#idCapture.finished" }
1867
+ { target: "#idCapture.processing" }
1872
1868
  ] } },
1873
1869
  success: { on: { NEXT_STEP: [
1874
1870
  {
package/dist/id.esm.js CHANGED
@@ -5,7 +5,7 @@ import "./endpoints-BK1EjE1H.esm.js";
5
5
  import "./streamingEvents-BrVlVGe7.esm.js";
6
6
  import "./deepsightService-CpmpXOnj.esm.js";
7
7
  import "./api-J0YE3G-C.esm.js";
8
- import { a as processId, c as stopStream, d as ID_ERROR_CODES, i as initializeIdCapture, l as uploadIdImage, n as createIdCaptureActor, o as startRecordingSession, r as idCaptureMachine, s as stopRecording, t as createIdCaptureManager, u as validateUploadResponse } from "./id-Dc5SneKA.esm.js";
8
+ import { a as processId, c as stopStream, d as ID_ERROR_CODES, i as initializeIdCapture, l as uploadIdImage, n as createIdCaptureActor, o as startRecordingSession, r as idCaptureMachine, s as stopRecording, t as createIdCaptureManager, u as validateUploadResponse } from "./id-D-cS-Z6o.esm.js";
9
9
  import "./stats-Baxc8J0w.esm.js";
10
10
 
11
11
  export { ID_ERROR_CODES, createIdCaptureActor, createIdCaptureManager, idCaptureMachine, initializeIdCapture, processId, startRecordingSession, stopRecording, stopStream, uploadIdImage, validateUploadResponse };
package/dist/index.esm.js CHANGED
@@ -5,7 +5,7 @@ import "./endpoints-BK1EjE1H.esm.js";
5
5
  import { c as getDeviceClass, l as getBrowser, o as checkPermission, s as requestPermission } from "./streamingEvents-BrVlVGe7.esm.js";
6
6
  import "./deepsightService-CpmpXOnj.esm.js";
7
7
  import { a as resetApi, n as getApi, o as setClient, s as setToken, t as api } from "./api-J0YE3G-C.esm.js";
8
- import { _ as createSession, a as processId, c as stopStream, d as ID_ERROR_CODES, f as getDisableIpify, g as resetSessionInit, h as isSessionInitialized, i as initializeIdCapture, l as uploadIdImage, m as initializeSession, n as createIdCaptureActor, o as startRecordingSession, p as getSessionFeatures, r as idCaptureMachine, s as stopRecording, t as createIdCaptureManager, u as validateUploadResponse } from "./id-Dc5SneKA.esm.js";
8
+ import { _ as createSession, a as processId, c as stopStream, d as ID_ERROR_CODES, f as getDisableIpify, g as resetSessionInit, h as isSessionInitialized, i as initializeIdCapture, l as uploadIdImage, m as initializeSession, n as createIdCaptureActor, o as startRecordingSession, p as getSessionFeatures, r as idCaptureMachine, s as stopRecording, t as createIdCaptureManager, u as validateUploadResponse } from "./id-D-cS-Z6o.esm.js";
9
9
  import "./stats-Baxc8J0w.esm.js";
10
10
 
11
11
  //#region src/setup.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@incodetech/core",
3
- "version": "0.0.0-dev-20260226-4cb58f5",
3
+ "version": "0.0.0-dev-20260227-bd6b490",
4
4
  "type": "module",
5
5
  "main": "./dist/index.esm.js",
6
6
  "types": "./dist/index.d.ts",