@incodetech/core 0.0.0-dev-20260303-3dab9f2 → 0.0.0-dev-20260304-4c68279

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-WfeWDo3j.js";
2
2
  import { n as DocumentUploadContext, r as DocumentUploadInput, t as DocumentUploadConfig } from "./types-Cd8ODk69.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;
@@ -1501,7 +1501,7 @@ const _idCaptureMachine = setup({
1501
1501
  }]
1502
1502
  },
1503
1503
  on: { NEXT_STEP: {
1504
- target: "initializingCamera",
1504
+ target: "#idCapture.capture",
1505
1505
  actions: "trackContinue"
1506
1506
  } }
1507
1507
  },
@@ -1557,31 +1557,15 @@ const _idCaptureMachine = setup({
1557
1557
  userIntent: {
1558
1558
  initial: "booting",
1559
1559
  states: {
1560
- booting: {
1561
- always: [{
1562
- target: "clicked",
1563
- guard: "hasStream"
1564
- }],
1565
- on: { NEXT_STEP: {
1566
- target: "clicked",
1567
- actions: "trackContinue"
1568
- } }
1569
- },
1560
+ booting: { on: { NEXT_STEP: {
1561
+ target: "clicked",
1562
+ actions: "trackContinue"
1563
+ } } },
1570
1564
  clicked: { type: "final" }
1571
1565
  }
1572
1566
  }
1573
1567
  },
1574
- onDone: [{
1575
- target: "#tutorialCameraReady",
1576
- guard: "hasStream"
1577
- }, { target: "#idCapture.capture" }]
1578
- },
1579
- cameraReady: {
1580
- id: "tutorialCameraReady",
1581
- on: { NEXT_STEP: {
1582
- target: "#idCapture.capture",
1583
- actions: "trackContinue"
1584
- } }
1568
+ onDone: { target: "#idCapture.capture" }
1585
1569
  },
1586
1570
  ready: { on: { NEXT_STEP: {
1587
1571
  target: "waitingForPermission",
package/dist/id.esm.js CHANGED
@@ -6,7 +6,7 @@ import "./streamingEvents-evH8YUFP.esm.js";
6
6
  import "./deepsightService-nqR8Q7AS.esm.js";
7
7
  import "./api-utDuOVDZ.esm.js";
8
8
  import "./endpoints-DZ8tQH8V.esm.js";
9
- 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-C1xB8Evt.esm.js";
9
+ 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-B_LxGdTF.esm.js";
10
10
  import "./stats-CIdlLJwO.esm.js";
11
11
 
12
12
  export { ID_ERROR_CODES, createIdCaptureActor, createIdCaptureManager, idCaptureMachine, initializeIdCapture, processId, startRecordingSession, stopRecording, stopStream, uploadIdImage, validateUploadResponse };
package/dist/index.esm.js CHANGED
@@ -6,7 +6,7 @@ import { c as getDeviceClass, l as getBrowser, o as checkPermission, s as reques
6
6
  import "./deepsightService-nqR8Q7AS.esm.js";
7
7
  import { a as resetApi, n as getApi, o as setClient, s as setToken, t as api } from "./api-utDuOVDZ.esm.js";
8
8
  import "./endpoints-DZ8tQH8V.esm.js";
9
- 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-C1xB8Evt.esm.js";
9
+ 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-B_LxGdTF.esm.js";
10
10
  import "./stats-CIdlLJwO.esm.js";
11
11
 
12
12
  //#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-20260303-3dab9f2",
3
+ "version": "0.0.0-dev-20260304-4c68279",
4
4
  "type": "module",
5
5
  "main": "./dist/index.esm.js",
6
6
  "types": "./dist/index.d.ts",