@incodetech/core 0.0.0-dev-20260309-970aa39 → 0.0.0-dev-20260309-4e885f1

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,6 +1,6 @@
1
1
  import { t as Manager } from "./Manager-CVog-etk.js";
2
2
  import { t as CameraStream } from "./camera-HI2fNiV5.js";
3
- import * as xstate276 from "xstate";
3
+ import * as xstate63 from "xstate";
4
4
 
5
5
  //#region src/modules/document-capture/types.d.ts
6
6
  type DocumentType = 'addressStatement' | 'otherDocument1' | 'otherDocument2' | 'otherDocument3' | 'v5cMultiPageLogbook' | 'circulationCard' | 'financeSettlement' | 'carInvoice' | 'capture' | 'processPoaOcr' | 'processLoaOcr' | 'processAsylumSeekerVisaZaf' | 'processBankStatementOCR' | 'processBankCheck' | 'processV5CLogbook' | 'processCarInvoice' | 'processCirculationCard' | 'processFinanceSettlement';
@@ -72,7 +72,7 @@ type DocumentCaptureInput = {
72
72
  };
73
73
  //#endregion
74
74
  //#region src/modules/document-capture/documentCaptureStateMachine.d.ts
75
- declare const documentCaptureMachine: xstate276.StateMachine<DocumentCaptureContext, {
75
+ declare const documentCaptureMachine: xstate63.StateMachine<DocumentCaptureContext, {
76
76
  type: "CAPTURE";
77
77
  } | {
78
78
  type: "FILE_SELECTED";
@@ -95,27 +95,27 @@ declare const documentCaptureMachine: xstate276.StateMachine<DocumentCaptureCont
95
95
  } | {
96
96
  type: "CLOSE";
97
97
  }, {
98
- [x: string]: xstate276.ActorRefFromLogic<xstate276.PromiseActorLogic<MediaStream, void, xstate276.EventObject>> | xstate276.ActorRefFromLogic<xstate276.PromiseActorLogic<DocumentUploadResponse, {
98
+ [x: string]: xstate63.ActorRefFromLogic<xstate63.PromiseActorLogic<MediaStream, void, xstate63.EventObject>> | xstate63.ActorRefFromLogic<xstate63.PromiseActorLogic<DocumentUploadResponse, {
99
99
  capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
100
100
  processingType: string;
101
101
  onProgress: (progress: number) => void;
102
- }, xstate276.EventObject>> | undefined;
103
- }, xstate276.Values<{
102
+ }, xstate63.EventObject>> | undefined;
103
+ }, xstate63.Values<{
104
104
  initCamera: {
105
105
  src: "initCamera";
106
- logic: xstate276.PromiseActorLogic<MediaStream, void, xstate276.EventObject>;
106
+ logic: xstate63.PromiseActorLogic<MediaStream, void, xstate63.EventObject>;
107
107
  id: string | undefined;
108
108
  };
109
109
  uploadDocument: {
110
110
  src: "uploadDocument";
111
- logic: xstate276.PromiseActorLogic<DocumentUploadResponse, {
111
+ logic: xstate63.PromiseActorLogic<DocumentUploadResponse, {
112
112
  capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
113
113
  processingType: string;
114
114
  onProgress: (progress: number) => void;
115
- }, xstate276.EventObject>;
115
+ }, xstate63.EventObject>;
116
116
  id: string | undefined;
117
117
  };
118
- }>, xstate276.Values<{
118
+ }>, xstate63.Values<{
119
119
  setStream: {
120
120
  type: "setStream";
121
121
  params: unknown;
@@ -196,7 +196,7 @@ declare const documentCaptureMachine: xstate276.StateMachine<DocumentCaptureCont
196
196
  type: "trackFailure";
197
197
  params: unknown;
198
198
  };
199
- }>, xstate276.Values<{
199
+ }>, xstate63.Values<{
200
200
  allowSkip: {
201
201
  type: "allowSkip";
202
202
  params: unknown;
@@ -229,7 +229,7 @@ declare const documentCaptureMachine: xstate276.StateMachine<DocumentCaptureCont
229
229
  type: "isPendingNextPage";
230
230
  params: unknown;
231
231
  };
232
- }>, never, "initCamera" | "capturing" | "closed" | "uploading" | "finished" | "tutorial" | "preview" | "failure" | "success", string, DocumentCaptureInput, xstate276.NonReducibleUnknown, xstate276.EventObject, xstate276.MetaObject, {
232
+ }>, never, "initCamera" | "capturing" | "closed" | "uploading" | "finished" | "tutorial" | "preview" | "failure" | "success", string, DocumentCaptureInput, xstate63.NonReducibleUnknown, xstate63.EventObject, xstate63.MetaObject, {
233
233
  readonly id: "documentCapture";
234
234
  readonly initial: "tutorial";
235
235
  readonly context: ({
@@ -238,67 +238,67 @@ declare const documentCaptureMachine: xstate276.StateMachine<DocumentCaptureCont
238
238
  spawn: {
239
239
  <TSrc extends "initCamera" | "uploadDocument">(logic: TSrc, ...[options]: ({
240
240
  src: "initCamera";
241
- logic: xstate276.PromiseActorLogic<MediaStream, void, xstate276.EventObject>;
241
+ logic: xstate63.PromiseActorLogic<MediaStream, void, xstate63.EventObject>;
242
242
  id: string | undefined;
243
243
  } extends infer T ? T extends {
244
244
  src: "initCamera";
245
- logic: xstate276.PromiseActorLogic<MediaStream, void, xstate276.EventObject>;
245
+ logic: xstate63.PromiseActorLogic<MediaStream, void, xstate63.EventObject>;
246
246
  id: string | undefined;
247
247
  } ? T extends {
248
248
  src: TSrc;
249
- } ? xstate276.ConditionalRequired<[options?: ({
249
+ } ? xstate63.ConditionalRequired<[options?: ({
250
250
  id?: T["id"] | undefined;
251
251
  systemId?: string;
252
- input?: xstate276.InputFrom<T["logic"]> | undefined;
252
+ input?: xstate63.InputFrom<T["logic"]> | undefined;
253
253
  syncSnapshot?: boolean;
254
- } & { [K in xstate276.RequiredActorOptions<T>]: unknown }) | undefined], xstate276.IsNotNever<xstate276.RequiredActorOptions<T>>> : never : never : never) | ({
254
+ } & { [K in xstate63.RequiredActorOptions<T>]: unknown }) | undefined], xstate63.IsNotNever<xstate63.RequiredActorOptions<T>>> : never : never : never) | ({
255
255
  src: "uploadDocument";
256
- logic: xstate276.PromiseActorLogic<DocumentUploadResponse, {
256
+ logic: xstate63.PromiseActorLogic<DocumentUploadResponse, {
257
257
  capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
258
258
  processingType: string;
259
259
  onProgress: (progress: number) => void;
260
- }, xstate276.EventObject>;
260
+ }, xstate63.EventObject>;
261
261
  id: string | undefined;
262
262
  } extends infer T_1 ? T_1 extends {
263
263
  src: "uploadDocument";
264
- logic: xstate276.PromiseActorLogic<DocumentUploadResponse, {
264
+ logic: xstate63.PromiseActorLogic<DocumentUploadResponse, {
265
265
  capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
266
266
  processingType: string;
267
267
  onProgress: (progress: number) => void;
268
- }, xstate276.EventObject>;
268
+ }, xstate63.EventObject>;
269
269
  id: string | undefined;
270
270
  } ? T_1 extends {
271
271
  src: TSrc;
272
- } ? xstate276.ConditionalRequired<[options?: ({
272
+ } ? xstate63.ConditionalRequired<[options?: ({
273
273
  id?: T_1["id"] | undefined;
274
274
  systemId?: string;
275
- input?: xstate276.InputFrom<T_1["logic"]> | undefined;
275
+ input?: xstate63.InputFrom<T_1["logic"]> | undefined;
276
276
  syncSnapshot?: boolean;
277
- } & { [K_1 in xstate276.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate276.IsNotNever<xstate276.RequiredActorOptions<T_1>>> : never : never : never)): xstate276.ActorRefFromLogic<xstate276.GetConcreteByKey<xstate276.Values<{
277
+ } & { [K_1 in xstate63.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate63.IsNotNever<xstate63.RequiredActorOptions<T_1>>> : never : never : never)): xstate63.ActorRefFromLogic<xstate63.GetConcreteByKey<xstate63.Values<{
278
278
  initCamera: {
279
279
  src: "initCamera";
280
- logic: xstate276.PromiseActorLogic<MediaStream, void, xstate276.EventObject>;
280
+ logic: xstate63.PromiseActorLogic<MediaStream, void, xstate63.EventObject>;
281
281
  id: string | undefined;
282
282
  };
283
283
  uploadDocument: {
284
284
  src: "uploadDocument";
285
- logic: xstate276.PromiseActorLogic<DocumentUploadResponse, {
285
+ logic: xstate63.PromiseActorLogic<DocumentUploadResponse, {
286
286
  capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
287
287
  processingType: string;
288
288
  onProgress: (progress: number) => void;
289
- }, xstate276.EventObject>;
289
+ }, xstate63.EventObject>;
290
290
  id: string | undefined;
291
291
  };
292
292
  }>, "src", TSrc>["logic"]>;
293
- <TLogic extends xstate276.AnyActorLogic>(src: TLogic, ...[options]: xstate276.ConditionalRequired<[options?: ({
293
+ <TLogic extends xstate63.AnyActorLogic>(src: TLogic, ...[options]: xstate63.ConditionalRequired<[options?: ({
294
294
  id?: never;
295
295
  systemId?: string;
296
- input?: xstate276.InputFrom<TLogic> | undefined;
296
+ input?: xstate63.InputFrom<TLogic> | undefined;
297
297
  syncSnapshot?: boolean;
298
- } & { [K in xstate276.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate276.IsNotNever<xstate276.RequiredLogicInput<TLogic>>>): xstate276.ActorRefFromLogic<TLogic>;
298
+ } & { [K in xstate63.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate63.IsNotNever<xstate63.RequiredLogicInput<TLogic>>>): xstate63.ActorRefFromLogic<TLogic>;
299
299
  };
300
300
  input: DocumentCaptureInput;
301
- self: xstate276.ActorRef<xstate276.MachineSnapshot<DocumentCaptureContext, {
301
+ self: xstate63.ActorRef<xstate63.MachineSnapshot<DocumentCaptureContext, {
302
302
  type: "CAPTURE";
303
303
  } | {
304
304
  type: "FILE_SELECTED";
@@ -320,7 +320,7 @@ declare const documentCaptureMachine: xstate276.StateMachine<DocumentCaptureCont
320
320
  type: "SKIP";
321
321
  } | {
322
322
  type: "CLOSE";
323
- }, Record<string, xstate276.AnyActorRef | undefined>, xstate276.StateValue, string, unknown, any, any>, {
323
+ }, Record<string, xstate63.AnyActorRef | undefined>, xstate63.StateValue, string, unknown, any, any>, {
324
324
  type: "CAPTURE";
325
325
  } | {
326
326
  type: "FILE_SELECTED";
@@ -342,7 +342,7 @@ declare const documentCaptureMachine: xstate276.StateMachine<DocumentCaptureCont
342
342
  type: "SKIP";
343
343
  } | {
344
344
  type: "CLOSE";
345
- }, xstate276.AnyEventObject>;
345
+ }, xstate63.AnyEventObject>;
346
346
  }) => {
347
347
  config: {
348
348
  processingType: DocumentType;
@@ -479,7 +479,7 @@ declare const documentCaptureMachine: xstate276.StateMachine<DocumentCaptureCont
479
479
  } | {
480
480
  type: "CLOSE";
481
481
  };
482
- self: xstate276.ActorRef<xstate276.MachineSnapshot<DocumentCaptureContext, {
482
+ self: xstate63.ActorRef<xstate63.MachineSnapshot<DocumentCaptureContext, {
483
483
  type: "CAPTURE";
484
484
  } | {
485
485
  type: "FILE_SELECTED";
@@ -501,7 +501,7 @@ declare const documentCaptureMachine: xstate276.StateMachine<DocumentCaptureCont
501
501
  type: "SKIP";
502
502
  } | {
503
503
  type: "CLOSE";
504
- }, Record<string, xstate276.AnyActorRef>, xstate276.StateValue, string, unknown, any, any>, {
504
+ }, Record<string, xstate63.AnyActorRef>, xstate63.StateValue, string, unknown, any, any>, {
505
505
  type: "CAPTURE";
506
506
  } | {
507
507
  type: "FILE_SELECTED";
@@ -523,7 +523,7 @@ declare const documentCaptureMachine: xstate276.StateMachine<DocumentCaptureCont
523
523
  type: "SKIP";
524
524
  } | {
525
525
  type: "CLOSE";
526
- }, xstate276.AnyEventObject>;
526
+ }, xstate63.AnyEventObject>;
527
527
  }) => {
528
528
  capturedDocument: CapturedDocument;
529
529
  processingType: DocumentType;
@@ -1244,7 +1244,8 @@ const _idCaptureMachine = setup({
1244
1244
  frameRect: void 0,
1245
1245
  previewImageUrl: void 0,
1246
1246
  uploadProgress: void 0,
1247
- manualCaptureTriggered: false
1247
+ manualCaptureTriggered: false,
1248
+ attemptsRemaining: context.config.captureAttempts
1248
1249
  };
1249
1250
  }),
1250
1251
  resetForFrontCapture: assign(({ context }) => {
@@ -1262,7 +1263,8 @@ const _idCaptureMachine = setup({
1262
1263
  frameRect: void 0,
1263
1264
  previewImageUrl: void 0,
1264
1265
  uploadProgress: void 0,
1265
- manualCaptureTriggered: false
1266
+ manualCaptureTriggered: false,
1267
+ attemptsRemaining: context.config.captureAttempts
1266
1268
  };
1267
1269
  }),
1268
1270
  prepareForBackCapture: assign(({ context }) => {
@@ -1278,7 +1280,8 @@ const _idCaptureMachine = setup({
1278
1280
  frameRect: void 0,
1279
1281
  previewImageUrl: void 0,
1280
1282
  uploadProgress: void 0,
1281
- manualCaptureTriggered: false
1283
+ manualCaptureTriggered: false,
1284
+ attemptsRemaining: context.config.captureAttempts
1282
1285
  };
1283
1286
  }),
1284
1287
  setStreamAndCapturer: assign({
package/dist/id.esm.js CHANGED
@@ -6,7 +6,7 @@ import "./streamingEvents-t3E89TmG.esm.js";
6
6
  import "./deepsightService-D2rnPj53.esm.js";
7
7
  import "./api-CdJjfxTX.esm.js";
8
8
  import "./endpoints-PMCuQkqs.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-CC0_Y0Qo.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-aQ6PcfVo.esm.js";
10
10
  import "./stats-De--Z9N5.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 createScreenOrientationObserver, l as getDeviceClass, o as checkPe
6
6
  import "./deepsightService-D2rnPj53.esm.js";
7
7
  import { a as resetApi, n as getApi, o as setClient, s as setToken, t as api } from "./api-CdJjfxTX.esm.js";
8
8
  import "./endpoints-PMCuQkqs.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-CC0_Y0Qo.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-aQ6PcfVo.esm.js";
10
10
  import "./stats-De--Z9N5.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-20260309-970aa39",
3
+ "version": "0.0.0-dev-20260309-4e885f1",
4
4
  "type": "module",
5
5
  "main": "./dist/index.esm.js",
6
6
  "types": "./dist/index.d.ts",