@incodetech/core 0.0.0-dev-20260505-78432a2 → 0.0.0-dev-20260506-93eab22
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.
- package/dist/{BaseWasmProvider-BTKqWpeB.esm.js → BaseWasmProvider-CkIHbYdx.esm.js} +112 -60
- package/dist/{WasmUtilProvider-DqCiPXV6.esm.js → WasmUtilProvider-DsAa3yqJ.esm.js} +1 -1
- package/dist/ae-signature.d.ts +1 -1
- package/dist/authentication.esm.js +6 -6
- package/dist/{authenticationManager-32vStqcp.esm.js → authenticationManager-BlExOsgX.esm.js} +2 -2
- package/dist/{authenticationStateMachine-CrITAfcp.esm.js → authenticationStateMachine-B2KkS-0r.esm.js} +2 -2
- package/dist/consent.d.ts +50 -50
- package/dist/cpf-ocr.d.ts +17 -17
- package/dist/{deepsightLoader-BnMFKE9b.esm.js → deepsightLoader-nn8-Chjr.esm.js} +2 -2
- package/dist/document-capture.d.ts +71 -71
- package/dist/document-upload.d.ts +46 -46
- package/dist/ekyb.esm.js +3 -3
- package/dist/{ekybStateMachine-B_Hy_til.esm.js → ekybStateMachine-Cun9RDGi.esm.js} +1 -1
- package/dist/electronic-signature.d.ts +1 -1
- package/dist/extensibility.esm.js +11 -11
- package/dist/{faceCaptureSetup-DMDxVTF7.esm.js → faceCaptureSetup-GGxPo8Cc.esm.js} +1 -1
- package/dist/flow.d.ts +2 -2
- package/dist/flow.esm.js +2 -2
- package/dist/{flowServices-C888w7m0.esm.js → flowServices-D2IW9jFo.esm.js} +1 -1
- package/dist/home.d.ts +10 -10
- package/dist/id-ocr.d.ts +52 -52
- package/dist/id.esm.js +5 -5
- package/dist/{idCaptureManager-R-u_QwYp.esm.js → idCaptureManager-Ccp9FYmY.esm.js} +1 -1
- package/dist/{idCaptureStateMachine-VS6QlY1i.esm.js → idCaptureStateMachine-BcWeQTqi.esm.js} +4 -4
- package/dist/identity-reuse.d.ts +47 -47
- package/dist/{index-zCeaDx6H.d.ts → index-CIWfGYjG.d.ts} +119 -119
- package/dist/index.esm.js +4 -4
- package/dist/mandatory-consent.d.ts +50 -50
- package/dist/qe-signature.d.ts +1 -1
- package/dist/{recordingService-Xq_JbS3R.esm.js → recordingService-Nn-BBO6j.esm.js} +2 -2
- package/dist/selfie.esm.js +6 -6
- package/dist/{selfieManager-CC-e4wqv.esm.js → selfieManager-BI4smYEE.esm.js} +2 -2
- package/dist/{selfieStateMachine-C4PGfd-j.esm.js → selfieStateMachine-B-stjSD5.esm.js} +2 -2
- package/dist/{session-DvzV3QxE.esm.js → session-BSTtSyoE.esm.js} +1 -1
- package/dist/session.esm.js +1 -1
- package/dist/{setup-BEUx0p_-.esm.js → setup-CW9pf6Pz.esm.js} +3 -3
- package/dist/wasm.esm.js +4 -4
- package/dist/workflow.d.ts +82 -82
- package/dist/workflow.esm.js +9 -9
- package/package.json +3 -3
|
@@ -1,57 +1,111 @@
|
|
|
1
|
-
//#region ../infra/src/
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
//#region ../infra/src/providers/browser/SemaphoreProvider.ts
|
|
2
|
+
const DEFAULT_ACQUIRE_TIMEOUT_MS = 3e4;
|
|
3
|
+
/**
|
|
4
|
+
* Counting-semaphore implementation of {@link IConcurrencyCapability}.
|
|
5
|
+
*
|
|
6
|
+
* Default `maxConcurrent=1` makes it behave as a mutex; set higher for
|
|
7
|
+
* parallel-bounded access. Each acquire returns a numeric `threadId` for
|
|
8
|
+
* tracing — the slot index, in `[0, maxConcurrent)` — that must be passed back
|
|
9
|
+
* to `release`.
|
|
10
|
+
*
|
|
11
|
+
* If all slots stay occupied longer than `acquireTimeoutMs` (default 30s), the
|
|
12
|
+
* pending wait still resolves when a slot frees, but `console.error` is logged
|
|
13
|
+
* as a deadlock-watchdog signal. Misuse — out-of-range or double-released
|
|
14
|
+
* `threadId`s — is also logged and treated as a no-op rather than thrown.
|
|
15
|
+
*/
|
|
16
|
+
var SemaphoreProvider = class {
|
|
17
|
+
constructor(maxConcurrent = 1, acquireTimeoutMs = DEFAULT_ACQUIRE_TIMEOUT_MS) {
|
|
18
|
+
this.pending = [];
|
|
19
|
+
this.available = [];
|
|
20
|
+
this.processing = /* @__PURE__ */ new Set();
|
|
21
|
+
this.maxId = maxConcurrent - 1;
|
|
22
|
+
this.acquireTimeoutMs = acquireTimeoutMs;
|
|
23
|
+
for (let i = 0; i < maxConcurrent; i++) this.available.push(i);
|
|
16
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* Acquire a slot. Resolves immediately with the slot's `threadId` if one is
|
|
27
|
+
* free, otherwise queues FIFO and resolves when a holder releases.
|
|
28
|
+
*/
|
|
17
29
|
async acquire() {
|
|
18
|
-
if (this.
|
|
19
|
-
this.
|
|
20
|
-
|
|
30
|
+
if (this.available.length > 0) {
|
|
31
|
+
const threadId = this.available.shift();
|
|
32
|
+
this.processing.add(threadId);
|
|
33
|
+
return threadId;
|
|
21
34
|
}
|
|
22
|
-
return new Promise((resolve) => {
|
|
23
|
-
|
|
35
|
+
return new Promise((resolve, reject) => {
|
|
36
|
+
const entry = {
|
|
37
|
+
resolve: (threadId) => {
|
|
38
|
+
clearTimeout(entry.timer);
|
|
39
|
+
this.processing.add(threadId);
|
|
40
|
+
resolve(threadId);
|
|
41
|
+
},
|
|
42
|
+
reject: (error) => {
|
|
43
|
+
clearTimeout(entry.timer);
|
|
44
|
+
reject(error);
|
|
45
|
+
},
|
|
46
|
+
timer: setTimeout(() => {
|
|
47
|
+
console.error(`SemaphoreProvider: all slots occupied for ${this.acquireTimeoutMs}ms, ${this.pending.length} request(s) waiting`);
|
|
48
|
+
}, this.acquireTimeoutMs)
|
|
49
|
+
};
|
|
50
|
+
this.pending.push(entry);
|
|
24
51
|
});
|
|
25
52
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
53
|
+
/**
|
|
54
|
+
* Return a slot to the pool. The next pending waiter (if any) is resolved
|
|
55
|
+
* with this `threadId`; otherwise the slot is added back to `available`.
|
|
56
|
+
* Releasing an out-of-range or already-released `threadId` logs an error and
|
|
57
|
+
* is otherwise a no-op.
|
|
58
|
+
*/
|
|
59
|
+
release(threadId) {
|
|
60
|
+
if (threadId < 0 || threadId > this.maxId) {
|
|
61
|
+
console.error(`SemaphoreProvider: invalid threadId ${threadId}`);
|
|
62
|
+
return;
|
|
32
63
|
}
|
|
64
|
+
if (!this.processing.has(threadId)) {
|
|
65
|
+
console.error(`SemaphoreProvider: double-release of threadId ${threadId}`);
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
this.processing.delete(threadId);
|
|
69
|
+
if (this.pending.length > 0) this.pending.shift().resolve(threadId);
|
|
70
|
+
else this.available.unshift(threadId);
|
|
33
71
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
this.
|
|
72
|
+
/**
|
|
73
|
+
* Cancel all pending acquires with a reset error and replenish all slots.
|
|
74
|
+
* Existing holders are not contacted — a `release` after reset will log a
|
|
75
|
+
* double-release warning rather than disrupt the new pool.
|
|
76
|
+
*/
|
|
77
|
+
reset() {
|
|
78
|
+
const waiters = this.pending;
|
|
79
|
+
this.pending = [];
|
|
80
|
+
this.available = [];
|
|
81
|
+
this.processing = /* @__PURE__ */ new Set();
|
|
82
|
+
for (let i = 0; i <= this.maxId; i++) this.available.push(i);
|
|
83
|
+
for (const waiter of waiters) waiter.reject(/* @__PURE__ */ new Error("SemaphoreProvider reset: pending acquire cancelled"));
|
|
44
84
|
}
|
|
85
|
+
/**
|
|
86
|
+
* Acquire a slot, invoke `fn(threadId, ...args)`, then release the slot in a
|
|
87
|
+
* `finally` block. Errors thrown by `fn` propagate to the caller after the
|
|
88
|
+
* slot is released.
|
|
89
|
+
*/
|
|
45
90
|
async withLock(fn, ...args) {
|
|
46
|
-
await this.
|
|
91
|
+
const threadId = await this.acquire();
|
|
47
92
|
try {
|
|
48
|
-
return await fn(...args);
|
|
93
|
+
return await fn(threadId, ...args);
|
|
49
94
|
} finally {
|
|
50
|
-
this.
|
|
95
|
+
this.release(threadId);
|
|
51
96
|
}
|
|
52
97
|
}
|
|
53
98
|
};
|
|
54
99
|
|
|
100
|
+
//#endregion
|
|
101
|
+
//#region ../infra/src/wasm/IdCaptureModelType.ts
|
|
102
|
+
let IdCaptureModelType = /* @__PURE__ */ function(IdCaptureModelType$1) {
|
|
103
|
+
IdCaptureModelType$1[IdCaptureModelType$1["IdCaptureV1x"] = 0] = "IdCaptureV1x";
|
|
104
|
+
IdCaptureModelType$1[IdCaptureModelType$1["IdCaptureV2x"] = 1] = "IdCaptureV2x";
|
|
105
|
+
IdCaptureModelType$1[IdCaptureModelType$1["IdCaptureV3x"] = 2] = "IdCaptureV3x";
|
|
106
|
+
return IdCaptureModelType$1;
|
|
107
|
+
}({});
|
|
108
|
+
|
|
55
109
|
//#endregion
|
|
56
110
|
//#region ../infra/src/wasm/WasmPipelineType.ts
|
|
57
111
|
let WasmPipelineType = /* @__PURE__ */ function(WasmPipelineType$1) {
|
|
@@ -63,6 +117,22 @@ let WasmPipelineType = /* @__PURE__ */ function(WasmPipelineType$1) {
|
|
|
63
117
|
return WasmPipelineType$1;
|
|
64
118
|
}({});
|
|
65
119
|
|
|
120
|
+
//#endregion
|
|
121
|
+
//#region ../infra/src/wasm/wasmCallUtils.ts
|
|
122
|
+
async function wasmCallWrapper(concurrency, wasmMethod, useSemaphore = true, ...args) {
|
|
123
|
+
const innerCall = async () => {
|
|
124
|
+
while (true) {
|
|
125
|
+
if (wasmMethod(...args)) return;
|
|
126
|
+
await new Promise((resolve) => setTimeout(resolve, 0));
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
if (useSemaphore) {
|
|
130
|
+
await concurrency.withLock(innerCall);
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
await innerCall();
|
|
134
|
+
}
|
|
135
|
+
|
|
66
136
|
//#endregion
|
|
67
137
|
//#region ../infra/src/wasm/mlWasmJSApi.ts
|
|
68
138
|
window.wasmArrayBuffer = null;
|
|
@@ -81,7 +151,7 @@ var MlWasmJSApi = class MlWasmJSApi {
|
|
|
81
151
|
this.pipelines_ = null;
|
|
82
152
|
this.isInitialized_ = false;
|
|
83
153
|
this.inspectorOpened_ = false;
|
|
84
|
-
this.
|
|
154
|
+
this.wasmCallSemaphore = new SemaphoreProvider();
|
|
85
155
|
this.Module = null;
|
|
86
156
|
this.loadModule = async (glueCodePath) => {
|
|
87
157
|
this.Module = (await import(
|
|
@@ -412,15 +482,11 @@ var MlWasmJSApi = class MlWasmJSApi {
|
|
|
412
482
|
}
|
|
413
483
|
async prc() {
|
|
414
484
|
this.checkWasmInitialization("Unable to prc, cpp API hasn't been initialized");
|
|
415
|
-
|
|
485
|
+
await wasmCallWrapper(this.wasmCallSemaphore, () => this.utilityApi.prc(), true);
|
|
416
486
|
}
|
|
417
487
|
async poc(output) {
|
|
418
488
|
this.checkWasmInitialization("Unable to poc, cpp API hasn't been initialized");
|
|
419
|
-
await this.
|
|
420
|
-
}
|
|
421
|
-
async pc(deviceId) {
|
|
422
|
-
this.checkWasmInitialization("Unable to pc, cpp API hasn't been initialized");
|
|
423
|
-
await this.wasmCallWrapper(this.utilityApi.pc.bind(this.utilityApi), [deviceId]);
|
|
489
|
+
await wasmCallWrapper(this.wasmCallSemaphore, () => this.utilityApi.poc(output), true);
|
|
424
490
|
}
|
|
425
491
|
ckvcks(data) {
|
|
426
492
|
this.checkWasmInitialization("Unable to ckvcks, cpp API hasn't been initialized");
|
|
@@ -465,20 +531,6 @@ var MlWasmJSApi = class MlWasmJSApi {
|
|
|
465
531
|
checkWasmInitialization(message) {
|
|
466
532
|
if (!this.isInitialized()) throw new Error(message);
|
|
467
533
|
}
|
|
468
|
-
async wasmCallWrapper(wasmMethod, args = []) {
|
|
469
|
-
return await this.wasmCallMutex.withLock(async (...args$1) => {
|
|
470
|
-
let isFinished = false;
|
|
471
|
-
try {
|
|
472
|
-
while (true) {
|
|
473
|
-
isFinished = wasmMethod(...args$1);
|
|
474
|
-
if (isFinished) return;
|
|
475
|
-
await new Promise((resolve) => setTimeout(resolve, 0));
|
|
476
|
-
}
|
|
477
|
-
} catch (e) {
|
|
478
|
-
console.log("Error in wasmCallWrapper:", e);
|
|
479
|
-
}
|
|
480
|
-
}, ...args);
|
|
481
|
-
}
|
|
482
534
|
};
|
|
483
535
|
var mlWasmJSApi_default = MlWasmJSApi.getInstance();
|
|
484
536
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as mlWasmJSApi_default, t as BaseWasmProvider } from "./BaseWasmProvider-
|
|
1
|
+
import { r as mlWasmJSApi_default, t as BaseWasmProvider } from "./BaseWasmProvider-CkIHbYdx.esm.js";
|
|
2
2
|
|
|
3
3
|
//#region ../infra/src/providers/wasm/WasmUtilProvider.ts
|
|
4
4
|
var WasmUtilProvider = class WasmUtilProvider extends BaseWasmProvider {
|
package/dist/ae-signature.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as Manager } from "./Manager-CcbnIt3T.js";
|
|
2
2
|
import "./Actor-CazhiaK7.js";
|
|
3
|
-
import { a as AE_CONSENT_KEYS, c as ConsentKey, g as getDefaultConsentChecks, i as electronicSignatureMachine, l as ElectronicSignatureConfig, m as areAllConsented, n as ElectronicSignatureState, s as ConsentChecks, u as ElectronicSignatureDocument } from "./index-
|
|
3
|
+
import { a as AE_CONSENT_KEYS, c as ConsentKey, g as getDefaultConsentChecks, i as electronicSignatureMachine, l as ElectronicSignatureConfig, m as areAllConsented, n as ElectronicSignatureState, s as ConsentChecks, u as ElectronicSignatureDocument } from "./index-CIWfGYjG.js";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/ae-signature/index.d.ts
|
|
6
6
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import "./BaseWasmProvider-
|
|
2
|
-
import "./WasmUtilProvider-
|
|
1
|
+
import "./BaseWasmProvider-CkIHbYdx.esm.js";
|
|
2
|
+
import "./WasmUtilProvider-DsAa3yqJ.esm.js";
|
|
3
3
|
import "./api-3IquGyW5.esm.js";
|
|
4
4
|
import "./events-s0VL5FYh.esm.js";
|
|
5
5
|
import "./browserSimulation-DMJIC-23.esm.js";
|
|
6
6
|
import "./xstate.esm-cL1KdW6d.esm.js";
|
|
7
7
|
import "./faceCaptureManagerFactory-Dix0LYX3.esm.js";
|
|
8
8
|
import "./BrowserStorageProvider-DeByegPK.esm.js";
|
|
9
|
-
import "./recordingService-
|
|
9
|
+
import "./recordingService-Nn-BBO6j.esm.js";
|
|
10
10
|
import "./deepsightService-CU4xtxzz.esm.js";
|
|
11
11
|
import "./permissionServices-DiAThhLg.esm.js";
|
|
12
12
|
import "./camera-CSPAwp2o.esm.js";
|
|
@@ -17,8 +17,8 @@ import "./platform-BtdVAeAg.esm.js";
|
|
|
17
17
|
import "./ITimerCapability-r7XXQS6a.esm.js";
|
|
18
18
|
import "./backCameraStream-BIzYKDy2.esm.js";
|
|
19
19
|
import "./getDeviceClass-AjL3Pr7R.esm.js";
|
|
20
|
-
import "./faceCaptureSetup-
|
|
21
|
-
import { t as authenticationMachine } from "./authenticationStateMachine-
|
|
22
|
-
import { r as createAuthenticationActor, t as createAuthenticationManager } from "./authenticationManager-
|
|
20
|
+
import "./faceCaptureSetup-GGxPo8Cc.esm.js";
|
|
21
|
+
import { t as authenticationMachine } from "./authenticationStateMachine-B2KkS-0r.esm.js";
|
|
22
|
+
import { r as createAuthenticationActor, t as createAuthenticationManager } from "./authenticationManager-BlExOsgX.esm.js";
|
|
23
23
|
|
|
24
24
|
export { authenticationMachine, createAuthenticationActor, createAuthenticationManager };
|
package/dist/{authenticationManager-32vStqcp.esm.js → authenticationManager-BlExOsgX.esm.js}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as WasmUtilProvider } from "./WasmUtilProvider-
|
|
1
|
+
import { t as WasmUtilProvider } from "./WasmUtilProvider-DsAa3yqJ.esm.js";
|
|
2
2
|
import { n as eventModuleNames } from "./events-s0VL5FYh.esm.js";
|
|
3
3
|
import { a as createActor } from "./xstate.esm-cL1KdW6d.esm.js";
|
|
4
4
|
import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-Dix0LYX3.esm.js";
|
|
5
5
|
import { t as BrowserStorageProvider } from "./BrowserStorageProvider-DeByegPK.esm.js";
|
|
6
|
-
import { t as authenticationMachine } from "./authenticationStateMachine-
|
|
6
|
+
import { t as authenticationMachine } from "./authenticationStateMachine-B2KkS-0r.esm.js";
|
|
7
7
|
|
|
8
8
|
//#region src/modules/authentication/authenticationActor.ts
|
|
9
9
|
function createAuthenticationActor(options) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as api } from "./api-3IquGyW5.esm.js";
|
|
2
2
|
import { v as endpoints } from "./events-s0VL5FYh.esm.js";
|
|
3
3
|
import { i as fromPromise, n as assign } from "./xstate.esm-cL1KdW6d.esm.js";
|
|
4
|
-
import { v as FACE_ERROR_CODES } from "./recordingService-
|
|
4
|
+
import { v as FACE_ERROR_CODES } from "./recordingService-Nn-BBO6j.esm.js";
|
|
5
5
|
import { t as getDeviceClass } from "./getDeviceClass-AjL3Pr7R.esm.js";
|
|
6
|
-
import { t as faceCaptureMachine } from "./faceCaptureSetup-
|
|
6
|
+
import { t as faceCaptureMachine } from "./faceCaptureSetup-GGxPo8Cc.esm.js";
|
|
7
7
|
|
|
8
8
|
//#region src/modules/authentication/authenticationErrorUtils.ts
|
|
9
9
|
const AUTH_ERROR_MAP = {
|
package/dist/consent.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as Manager } from "./Manager-CcbnIt3T.js";
|
|
2
2
|
import "./Actor-CazhiaK7.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as xstate795 from "xstate";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/consent/types.d.ts
|
|
6
6
|
type ConsentConfig = {
|
|
@@ -36,7 +36,7 @@ type ConsentContext = {
|
|
|
36
36
|
type ConsentInput = {
|
|
37
37
|
config: ConsentConfig;
|
|
38
38
|
};
|
|
39
|
-
declare const consentMachine:
|
|
39
|
+
declare const consentMachine: xstate795.StateMachine<ConsentContext, {
|
|
40
40
|
type: "LOAD";
|
|
41
41
|
} | {
|
|
42
42
|
type: "TOGGLE_CHECKBOX";
|
|
@@ -48,53 +48,53 @@ declare const consentMachine: xstate259.StateMachine<ConsentContext, {
|
|
|
48
48
|
} | {
|
|
49
49
|
type: "RESET";
|
|
50
50
|
}, {
|
|
51
|
-
[x: string]:
|
|
51
|
+
[x: string]: xstate795.ActorRefFromLogic<xstate795.PromiseActorLogic<FetchCombinedConsentResponse, {
|
|
52
52
|
consentId: string;
|
|
53
|
-
},
|
|
53
|
+
}, xstate795.EventObject>> | xstate795.ActorRefFromLogic<xstate795.PromiseActorLogic<void, {
|
|
54
54
|
languageConsentId: string;
|
|
55
55
|
checkboxes: ConsentCheckbox[];
|
|
56
|
-
},
|
|
57
|
-
},
|
|
56
|
+
}, xstate795.EventObject>> | undefined;
|
|
57
|
+
}, xstate795.Values<{
|
|
58
58
|
fetchConsent: {
|
|
59
59
|
src: "fetchConsent";
|
|
60
|
-
logic:
|
|
60
|
+
logic: xstate795.PromiseActorLogic<FetchCombinedConsentResponse, {
|
|
61
61
|
consentId: string;
|
|
62
|
-
},
|
|
62
|
+
}, xstate795.EventObject>;
|
|
63
63
|
id: string | undefined;
|
|
64
64
|
};
|
|
65
65
|
submitConsent: {
|
|
66
66
|
src: "submitConsent";
|
|
67
|
-
logic:
|
|
67
|
+
logic: xstate795.PromiseActorLogic<void, {
|
|
68
68
|
languageConsentId: string;
|
|
69
69
|
checkboxes: ConsentCheckbox[];
|
|
70
|
-
},
|
|
70
|
+
}, xstate795.EventObject>;
|
|
71
71
|
id: string | undefined;
|
|
72
72
|
};
|
|
73
|
-
}>,
|
|
73
|
+
}>, xstate795.Values<{
|
|
74
74
|
setError: {
|
|
75
75
|
type: "setError";
|
|
76
|
-
params:
|
|
76
|
+
params: xstate795.NonReducibleUnknown;
|
|
77
77
|
};
|
|
78
78
|
clearError: {
|
|
79
79
|
type: "clearError";
|
|
80
|
-
params:
|
|
80
|
+
params: xstate795.NonReducibleUnknown;
|
|
81
|
+
};
|
|
82
|
+
resetContext: {
|
|
83
|
+
type: "resetContext";
|
|
84
|
+
params: xstate795.NonReducibleUnknown;
|
|
81
85
|
};
|
|
82
86
|
setConsentData: {
|
|
83
87
|
type: "setConsentData";
|
|
84
|
-
params:
|
|
88
|
+
params: xstate795.NonReducibleUnknown;
|
|
85
89
|
};
|
|
86
90
|
toggleCheckbox: {
|
|
87
91
|
type: "toggleCheckbox";
|
|
88
|
-
params:
|
|
89
|
-
};
|
|
90
|
-
resetContext: {
|
|
91
|
-
type: "resetContext";
|
|
92
|
-
params: xstate259.NonReducibleUnknown;
|
|
92
|
+
params: xstate795.NonReducibleUnknown;
|
|
93
93
|
};
|
|
94
94
|
}>, {
|
|
95
95
|
type: "canSubmit";
|
|
96
96
|
params: unknown;
|
|
97
|
-
}, never, "error" | "idle" | "finished" | "loading" | "
|
|
97
|
+
}, never, "error" | "idle" | "finished" | "loading" | "display" | "submitting", string, ConsentInput, xstate795.NonReducibleUnknown, xstate795.EventObject, xstate795.MetaObject, {
|
|
98
98
|
readonly id: "consent";
|
|
99
99
|
readonly initial: "idle";
|
|
100
100
|
readonly context: ({
|
|
@@ -103,70 +103,70 @@ declare const consentMachine: xstate259.StateMachine<ConsentContext, {
|
|
|
103
103
|
spawn: {
|
|
104
104
|
<TSrc extends "fetchConsent" | "submitConsent">(logic: TSrc, ...[options]: ({
|
|
105
105
|
src: "fetchConsent";
|
|
106
|
-
logic:
|
|
106
|
+
logic: xstate795.PromiseActorLogic<FetchCombinedConsentResponse, {
|
|
107
107
|
consentId: string;
|
|
108
|
-
},
|
|
108
|
+
}, xstate795.EventObject>;
|
|
109
109
|
id: string | undefined;
|
|
110
110
|
} extends infer T ? T extends {
|
|
111
111
|
src: "fetchConsent";
|
|
112
|
-
logic:
|
|
112
|
+
logic: xstate795.PromiseActorLogic<FetchCombinedConsentResponse, {
|
|
113
113
|
consentId: string;
|
|
114
|
-
},
|
|
114
|
+
}, xstate795.EventObject>;
|
|
115
115
|
id: string | undefined;
|
|
116
116
|
} ? T extends {
|
|
117
117
|
src: TSrc;
|
|
118
|
-
} ?
|
|
118
|
+
} ? xstate795.ConditionalRequired<[options?: ({
|
|
119
119
|
id?: T["id"] | undefined;
|
|
120
120
|
systemId?: string;
|
|
121
|
-
input?:
|
|
121
|
+
input?: xstate795.InputFrom<T["logic"]> | undefined;
|
|
122
122
|
syncSnapshot?: boolean;
|
|
123
|
-
} & { [K in
|
|
123
|
+
} & { [K in xstate795.RequiredActorOptions<T>]: unknown }) | undefined], xstate795.IsNotNever<xstate795.RequiredActorOptions<T>>> : never : never : never) | ({
|
|
124
124
|
src: "submitConsent";
|
|
125
|
-
logic:
|
|
125
|
+
logic: xstate795.PromiseActorLogic<void, {
|
|
126
126
|
languageConsentId: string;
|
|
127
127
|
checkboxes: ConsentCheckbox[];
|
|
128
|
-
},
|
|
128
|
+
}, xstate795.EventObject>;
|
|
129
129
|
id: string | undefined;
|
|
130
130
|
} extends infer T_1 ? T_1 extends {
|
|
131
131
|
src: "submitConsent";
|
|
132
|
-
logic:
|
|
132
|
+
logic: xstate795.PromiseActorLogic<void, {
|
|
133
133
|
languageConsentId: string;
|
|
134
134
|
checkboxes: ConsentCheckbox[];
|
|
135
|
-
},
|
|
135
|
+
}, xstate795.EventObject>;
|
|
136
136
|
id: string | undefined;
|
|
137
137
|
} ? T_1 extends {
|
|
138
138
|
src: TSrc;
|
|
139
|
-
} ?
|
|
139
|
+
} ? xstate795.ConditionalRequired<[options?: ({
|
|
140
140
|
id?: T_1["id"] | undefined;
|
|
141
141
|
systemId?: string;
|
|
142
|
-
input?:
|
|
142
|
+
input?: xstate795.InputFrom<T_1["logic"]> | undefined;
|
|
143
143
|
syncSnapshot?: boolean;
|
|
144
|
-
} & { [K_1 in
|
|
144
|
+
} & { [K_1 in xstate795.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate795.IsNotNever<xstate795.RequiredActorOptions<T_1>>> : never : never : never)): xstate795.ActorRefFromLogic<xstate795.GetConcreteByKey<xstate795.Values<{
|
|
145
145
|
fetchConsent: {
|
|
146
146
|
src: "fetchConsent";
|
|
147
|
-
logic:
|
|
147
|
+
logic: xstate795.PromiseActorLogic<FetchCombinedConsentResponse, {
|
|
148
148
|
consentId: string;
|
|
149
|
-
},
|
|
149
|
+
}, xstate795.EventObject>;
|
|
150
150
|
id: string | undefined;
|
|
151
151
|
};
|
|
152
152
|
submitConsent: {
|
|
153
153
|
src: "submitConsent";
|
|
154
|
-
logic:
|
|
154
|
+
logic: xstate795.PromiseActorLogic<void, {
|
|
155
155
|
languageConsentId: string;
|
|
156
156
|
checkboxes: ConsentCheckbox[];
|
|
157
|
-
},
|
|
157
|
+
}, xstate795.EventObject>;
|
|
158
158
|
id: string | undefined;
|
|
159
159
|
};
|
|
160
160
|
}>, "src", TSrc>["logic"]>;
|
|
161
|
-
<TLogic extends
|
|
161
|
+
<TLogic extends xstate795.AnyActorLogic>(src: TLogic, ...[options]: xstate795.ConditionalRequired<[options?: ({
|
|
162
162
|
id?: never;
|
|
163
163
|
systemId?: string;
|
|
164
|
-
input?:
|
|
164
|
+
input?: xstate795.InputFrom<TLogic> | undefined;
|
|
165
165
|
syncSnapshot?: boolean;
|
|
166
|
-
} & { [K in
|
|
166
|
+
} & { [K in xstate795.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate795.IsNotNever<xstate795.RequiredLogicInput<TLogic>>>): xstate795.ActorRefFromLogic<TLogic>;
|
|
167
167
|
};
|
|
168
168
|
input: ConsentInput;
|
|
169
|
-
self:
|
|
169
|
+
self: xstate795.ActorRef<xstate795.MachineSnapshot<ConsentContext, {
|
|
170
170
|
type: "LOAD";
|
|
171
171
|
} | {
|
|
172
172
|
type: "TOGGLE_CHECKBOX";
|
|
@@ -177,7 +177,7 @@ declare const consentMachine: xstate259.StateMachine<ConsentContext, {
|
|
|
177
177
|
type: "RETRY";
|
|
178
178
|
} | {
|
|
179
179
|
type: "RESET";
|
|
180
|
-
}, Record<string,
|
|
180
|
+
}, Record<string, xstate795.AnyActorRef | undefined>, xstate795.StateValue, string, unknown, any, any>, {
|
|
181
181
|
type: "LOAD";
|
|
182
182
|
} | {
|
|
183
183
|
type: "TOGGLE_CHECKBOX";
|
|
@@ -188,7 +188,7 @@ declare const consentMachine: xstate259.StateMachine<ConsentContext, {
|
|
|
188
188
|
type: "RETRY";
|
|
189
189
|
} | {
|
|
190
190
|
type: "RESET";
|
|
191
|
-
},
|
|
191
|
+
}, xstate795.AnyEventObject>;
|
|
192
192
|
}) => {
|
|
193
193
|
config: ConsentConfig;
|
|
194
194
|
title: string;
|
|
@@ -226,7 +226,7 @@ declare const consentMachine: xstate259.StateMachine<ConsentContext, {
|
|
|
226
226
|
} | {
|
|
227
227
|
type: "RESET";
|
|
228
228
|
};
|
|
229
|
-
self:
|
|
229
|
+
self: xstate795.ActorRef<xstate795.MachineSnapshot<ConsentContext, {
|
|
230
230
|
type: "LOAD";
|
|
231
231
|
} | {
|
|
232
232
|
type: "TOGGLE_CHECKBOX";
|
|
@@ -237,7 +237,7 @@ declare const consentMachine: xstate259.StateMachine<ConsentContext, {
|
|
|
237
237
|
type: "RETRY";
|
|
238
238
|
} | {
|
|
239
239
|
type: "RESET";
|
|
240
|
-
}, Record<string,
|
|
240
|
+
}, Record<string, xstate795.AnyActorRef>, xstate795.StateValue, string, unknown, any, any>, {
|
|
241
241
|
type: "LOAD";
|
|
242
242
|
} | {
|
|
243
243
|
type: "TOGGLE_CHECKBOX";
|
|
@@ -248,7 +248,7 @@ declare const consentMachine: xstate259.StateMachine<ConsentContext, {
|
|
|
248
248
|
type: "RETRY";
|
|
249
249
|
} | {
|
|
250
250
|
type: "RESET";
|
|
251
|
-
},
|
|
251
|
+
}, xstate795.AnyEventObject>;
|
|
252
252
|
}) => {
|
|
253
253
|
consentId: string;
|
|
254
254
|
};
|
|
@@ -297,7 +297,7 @@ declare const consentMachine: xstate259.StateMachine<ConsentContext, {
|
|
|
297
297
|
} | {
|
|
298
298
|
type: "RESET";
|
|
299
299
|
};
|
|
300
|
-
self:
|
|
300
|
+
self: xstate795.ActorRef<xstate795.MachineSnapshot<ConsentContext, {
|
|
301
301
|
type: "LOAD";
|
|
302
302
|
} | {
|
|
303
303
|
type: "TOGGLE_CHECKBOX";
|
|
@@ -308,7 +308,7 @@ declare const consentMachine: xstate259.StateMachine<ConsentContext, {
|
|
|
308
308
|
type: "RETRY";
|
|
309
309
|
} | {
|
|
310
310
|
type: "RESET";
|
|
311
|
-
}, Record<string,
|
|
311
|
+
}, Record<string, xstate795.AnyActorRef>, xstate795.StateValue, string, unknown, any, any>, {
|
|
312
312
|
type: "LOAD";
|
|
313
313
|
} | {
|
|
314
314
|
type: "TOGGLE_CHECKBOX";
|
|
@@ -319,7 +319,7 @@ declare const consentMachine: xstate259.StateMachine<ConsentContext, {
|
|
|
319
319
|
type: "RETRY";
|
|
320
320
|
} | {
|
|
321
321
|
type: "RESET";
|
|
322
|
-
},
|
|
322
|
+
}, xstate795.AnyEventObject>;
|
|
323
323
|
}) => {
|
|
324
324
|
languageConsentId: string;
|
|
325
325
|
checkboxes: ConsentCheckbox[];
|
package/dist/cpf-ocr.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as Manager } from "./Manager-CcbnIt3T.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as xstate936 from "xstate";
|
|
3
3
|
|
|
4
4
|
//#region src/modules/cpf-ocr/cpfOcrManager.d.ts
|
|
5
5
|
type CpfOcrIdleState = {
|
|
@@ -47,7 +47,7 @@ type CpfOcrContext = {
|
|
|
47
47
|
error: string | undefined;
|
|
48
48
|
};
|
|
49
49
|
type CpfOcrInput = Record<string, never>;
|
|
50
|
-
declare const cpfOcrMachine:
|
|
50
|
+
declare const cpfOcrMachine: xstate936.StateMachine<CpfOcrContext, {
|
|
51
51
|
type: "LOAD";
|
|
52
52
|
} | {
|
|
53
53
|
type: "SET_CPF";
|
|
@@ -57,43 +57,43 @@ declare const cpfOcrMachine: xstate234.StateMachine<CpfOcrContext, {
|
|
|
57
57
|
} | {
|
|
58
58
|
type: "RETRY";
|
|
59
59
|
}, {
|
|
60
|
-
[x: string]:
|
|
60
|
+
[x: string]: xstate936.ActorRefFromLogic<xstate936.PromiseActorLogic<CpfOcrDataResponse, void, xstate936.EventObject>> | xstate936.ActorRefFromLogic<xstate936.PromiseActorLogic<CpfOcrUpdateResponse, {
|
|
61
61
|
cpf: string;
|
|
62
|
-
},
|
|
63
|
-
},
|
|
62
|
+
}, xstate936.EventObject>> | undefined;
|
|
63
|
+
}, xstate936.Values<{
|
|
64
64
|
fetchCpfOcrData: {
|
|
65
65
|
src: "fetchCpfOcrData";
|
|
66
|
-
logic:
|
|
66
|
+
logic: xstate936.PromiseActorLogic<CpfOcrDataResponse, void, xstate936.EventObject>;
|
|
67
67
|
id: string | undefined;
|
|
68
68
|
};
|
|
69
69
|
submitCpfOcr: {
|
|
70
70
|
src: "submitCpfOcr";
|
|
71
|
-
logic:
|
|
71
|
+
logic: xstate936.PromiseActorLogic<CpfOcrUpdateResponse, {
|
|
72
72
|
cpf: string;
|
|
73
|
-
},
|
|
73
|
+
}, xstate936.EventObject>;
|
|
74
74
|
id: string | undefined;
|
|
75
75
|
};
|
|
76
|
-
}>,
|
|
76
|
+
}>, xstate936.Values<{
|
|
77
77
|
setError: {
|
|
78
78
|
type: "setError";
|
|
79
|
-
params:
|
|
79
|
+
params: xstate936.NonReducibleUnknown;
|
|
80
80
|
};
|
|
81
81
|
clearError: {
|
|
82
82
|
type: "clearError";
|
|
83
|
-
params:
|
|
83
|
+
params: xstate936.NonReducibleUnknown;
|
|
84
84
|
};
|
|
85
85
|
setPrefill: {
|
|
86
86
|
type: "setPrefill";
|
|
87
|
-
params:
|
|
87
|
+
params: xstate936.NonReducibleUnknown;
|
|
88
88
|
};
|
|
89
89
|
setCpf: {
|
|
90
90
|
type: "setCpf";
|
|
91
|
-
params:
|
|
91
|
+
params: xstate936.NonReducibleUnknown;
|
|
92
92
|
};
|
|
93
93
|
}>, {
|
|
94
94
|
type: "isValid";
|
|
95
95
|
params: unknown;
|
|
96
|
-
}, never, "error" | "idle" | "finished" | "loading" | "
|
|
96
|
+
}, never, "error" | "idle" | "finished" | "loading" | "submitting" | "inputting", string, CpfOcrInput, xstate936.NonReducibleUnknown, xstate936.EventObject, xstate936.MetaObject, {
|
|
97
97
|
readonly id: "cpfOcr";
|
|
98
98
|
readonly initial: "idle";
|
|
99
99
|
readonly context: {
|
|
@@ -148,7 +148,7 @@ declare const cpfOcrMachine: xstate234.StateMachine<CpfOcrContext, {
|
|
|
148
148
|
} | {
|
|
149
149
|
type: "RETRY";
|
|
150
150
|
};
|
|
151
|
-
self:
|
|
151
|
+
self: xstate936.ActorRef<xstate936.MachineSnapshot<CpfOcrContext, {
|
|
152
152
|
type: "LOAD";
|
|
153
153
|
} | {
|
|
154
154
|
type: "SET_CPF";
|
|
@@ -157,7 +157,7 @@ declare const cpfOcrMachine: xstate234.StateMachine<CpfOcrContext, {
|
|
|
157
157
|
type: "SUBMIT";
|
|
158
158
|
} | {
|
|
159
159
|
type: "RETRY";
|
|
160
|
-
}, Record<string,
|
|
160
|
+
}, Record<string, xstate936.AnyActorRef>, xstate936.StateValue, string, unknown, any, any>, {
|
|
161
161
|
type: "LOAD";
|
|
162
162
|
} | {
|
|
163
163
|
type: "SET_CPF";
|
|
@@ -166,7 +166,7 @@ declare const cpfOcrMachine: xstate234.StateMachine<CpfOcrContext, {
|
|
|
166
166
|
type: "SUBMIT";
|
|
167
167
|
} | {
|
|
168
168
|
type: "RETRY";
|
|
169
|
-
},
|
|
169
|
+
}, xstate936.AnyEventObject>;
|
|
170
170
|
}) => {
|
|
171
171
|
cpf: string;
|
|
172
172
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./BaseWasmProvider-
|
|
2
|
-
import { t as WasmUtilProvider } from "./WasmUtilProvider-
|
|
1
|
+
import "./BaseWasmProvider-CkIHbYdx.esm.js";
|
|
2
|
+
import { t as WasmUtilProvider } from "./WasmUtilProvider-DsAa3yqJ.esm.js";
|
|
3
3
|
import "./api-3IquGyW5.esm.js";
|
|
4
4
|
import { r as BrowserEnvironmentProvider, t as IpifyProvider } from "./IpifyProvider-CVIOst3c.esm.js";
|
|
5
5
|
import "./browserSimulation-DMJIC-23.esm.js";
|