@incodetech/core 0.0.0-dev-20260528-e63e949b → 0.0.0-dev-20260529-ab174ea7
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/{OpenViduRecordingProvider-DIxtwgBG.esm.js → OpenViduRecordingProvider-dfIfvJdz.esm.js} +1 -1
- package/dist/StateMachine-Nl-Jtl1w.d.ts +2 -0
- package/dist/ae-signature.d.ts +3 -3
- package/dist/antifraud.d.ts +5 -46
- package/dist/antifraud.esm.js +4 -41
- package/dist/antifraudManager-C-_he11c.d.ts +63 -0
- package/dist/antifraudManager-DaUfoGLZ.esm.js +55 -0
- package/dist/authentication.d.ts +12 -12
- package/dist/authentication.esm.js +14 -14
- package/dist/{authenticationManager-BCsIiOKP.d.ts → authenticationManager-BCa2KJ3W.d.ts} +2 -2
- package/dist/{authenticationManager-D-GBF4AL.esm.js → authenticationManager-BjpnO88T.esm.js} +3 -3
- package/dist/{authenticationStateMachine-DQ5lhFHa.esm.js → authenticationStateMachine-CB_FVKRQ.esm.js} +3 -3
- package/dist/{backCameraStream-BX6CRqIA.esm.js → backCameraStream-sqXIvxpl.esm.js} +2 -2
- package/dist/camera.d.ts +1 -1
- package/dist/camera.esm.js +3 -3
- package/dist/consent.d.ts +54 -54
- package/dist/consent.esm.js +1 -1
- package/dist/cpf-ocr.d.ts +21 -21
- package/dist/cpf-ocr.esm.js +1 -1
- package/dist/cross-document-data-match.d.ts +1 -1
- package/dist/cross-document-data-match.esm.js +1 -1
- package/dist/curp-validation.d.ts +6 -6
- package/dist/curp-validation.esm.js +1 -1
- package/dist/custom-fields.d.ts +2 -2
- package/dist/custom-fields.esm.js +1 -1
- package/dist/custom-watchlist.d.ts +1 -1
- package/dist/custom-watchlist.esm.js +1 -1
- package/dist/{deepsightLoader-BoDdkLc0.esm.js → deepsightLoader-D2ZhUfMt.esm.js} +4 -4
- package/dist/{deepsightService-DY9BYuEQ.esm.js → deepsightService-BxIcYEvD.esm.js} +2 -2
- package/dist/{deepsightService-C0keQ-h6.d.ts → deepsightService-X2FAWn_3.d.ts} +2 -2
- package/dist/device.esm.js +2 -2
- package/dist/document-capture.d.ts +80 -80
- package/dist/document-capture.esm.js +4 -4
- package/dist/document-upload.d.ts +53 -53
- package/dist/document-upload.esm.js +3 -3
- package/dist/{documentCaptureStateMachine-BexpI_wB.esm.js → documentCaptureStateMachine-dyL-UmQE.esm.js} +2 -2
- package/dist/dynamic-forms.d.ts +2 -2
- package/dist/dynamic-forms.esm.js +1 -1
- package/dist/ekyb.d.ts +6 -6
- package/dist/ekyb.esm.js +5 -5
- package/dist/{ekybStateMachine-C5ltktXS.esm.js → ekybStateMachine-BXNOQWue.esm.js} +2 -2
- package/dist/ekyc.d.ts +3 -3
- package/dist/ekyc.esm.js +3 -3
- package/dist/{ekycStateMachine-DNCCUEb5.esm.js → ekycStateMachine-p7gsAtZl.esm.js} +2 -2
- package/dist/electronic-signature.d.ts +3 -3
- package/dist/email.d.ts +3 -3
- package/dist/email.esm.js +2 -2
- package/dist/{emailManager-B-E4rOjR.d.ts → emailManager-BAWgEfYH.d.ts} +3 -3
- package/dist/{emailManager-BMzZmJwd.esm.js → emailManager-IHCJvZiz.esm.js} +1 -1
- package/dist/extensibility.d.ts +19 -17
- package/dist/extensibility.esm.js +30 -26
- package/dist/face-match.d.ts +1 -1
- package/dist/face-match.esm.js +1 -1
- package/dist/{faceCaptureManagerFactory-QYq_vNnX.d.ts → faceCaptureManagerFactory-BNTr8hCe.d.ts} +8 -8
- package/dist/{faceCaptureManagerFactory-qY6w1odA.esm.js → faceCaptureManagerFactory-qc68qvPB.esm.js} +2 -2
- package/dist/{faceCaptureSetup-DVdxJdeK.esm.js → faceCaptureSetup-CCmBB4Yj.esm.js} +2 -2
- package/dist/field-comparison.d.ts +2 -2
- package/dist/flow-events.d.ts +6 -6
- package/dist/flow.d.ts +12 -12
- package/dist/flow.esm.js +5 -5
- package/dist/{flowServices-COymzUKZ.esm.js → flowServices-CRcAscXZ.esm.js} +1 -1
- package/dist/geolocation.d.ts +2 -2
- package/dist/geolocation.esm.js +1 -1
- package/dist/{getDeviceClass-CQITWgsp.esm.js → getDeviceClass-cJ-TvND7.esm.js} +1 -1
- package/dist/government-validation.d.ts +2 -2
- package/dist/government-validation.esm.js +1 -1
- package/dist/home.d.ts +15 -15
- package/dist/id-ocr.d.ts +54 -54
- package/dist/id-ocr.esm.js +2 -2
- package/dist/id-verification.d.ts +27 -27
- package/dist/id-verification.esm.js +1 -1
- package/dist/id.d.ts +11 -11
- package/dist/id.esm.js +15 -15
- package/dist/{idCaptureManager-nxl5oVU4.esm.js → idCaptureManager-oDrkvGaC.esm.js} +3 -3
- package/dist/{idCaptureManager-DWS1KkOC.d.ts → idCaptureManager-wjb9Go10.d.ts} +7 -7
- package/dist/{idCaptureStateMachine-DgFRxPVY.esm.js → idCaptureStateMachine-BwB1pm_z.esm.js} +9 -9
- package/dist/{idOcrStateMachine-CkQ20i5m.esm.js → idOcrStateMachine-CKlLOgNU.esm.js} +1 -1
- package/dist/identity-reuse.d.ts +3 -427
- package/dist/identity-reuse.esm.js +4 -93
- package/dist/identityReuseManager-DE_BcpZm.d.ts +428 -0
- package/dist/identityReuseManager-cG0dhENk.esm.js +95 -0
- package/dist/{index-DJ3x-352.d.ts → index-B77Z2Fk-.d.ts} +127 -127
- package/dist/{index-EwOt-Z6h.d.ts → index-Dc_XoGha.d.ts} +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.esm.js +2 -2
- package/dist/mandatory-consent.d.ts +58 -58
- package/dist/mandatory-consent.esm.js +1 -1
- package/dist/{openviduLazy-DGTRNmgt.esm.js → openviduLazy-CgN_e8V6.esm.js} +1 -1
- package/dist/openviduLazy-_lSYT11z.esm.js +3 -0
- package/dist/{permissionServices-W8BBXqr9.esm.js → permissionServices-CYSReeaA.esm.js} +2 -2
- package/dist/phone.d.ts +3 -3
- package/dist/phone.esm.js +2 -2
- package/dist/{phoneManager-BaD4_vew.esm.js → phoneManager-CJLJidX1.esm.js} +1 -1
- package/dist/{phoneManager-DOqnuxiZ.d.ts → phoneManager-loG1R4et.d.ts} +3 -3
- package/dist/qe-signature.d.ts +3 -3
- package/dist/qe-signature.esm.js +1 -1
- package/dist/{recordingService-BHgwOJ_m.esm.js → recordingService-5juvEHjh.esm.js} +10 -10
- package/dist/redirect-to-mobile.d.ts +2 -2
- package/dist/redirect-to-mobile.esm.js +1 -1
- package/dist/selfie.d.ts +12 -12
- package/dist/selfie.esm.js +15 -15
- package/dist/{selfieManager-xtGHqMAC.esm.js → selfieManager-DHxLF4ja.esm.js} +3 -3
- package/dist/{selfieManager-xGj-77Nm.d.ts → selfieManager-DWDfY17n.d.ts} +2 -2
- package/dist/{selfieStateMachine-8EcLSe0G.esm.js → selfieStateMachine-DoXEHqqT.esm.js} +2 -2
- package/dist/session.d.ts +5 -5
- package/dist/session.esm.js +3 -3
- package/dist/{sessionInitializer-M0Y3g4Eo.esm.js → sessionInitializer-B-QzVOEM.esm.js} +1 -1
- package/dist/{setup-BxbaIs-k.d.ts → setup-D8yN1pvy.d.ts} +1 -1
- package/dist/{setup-DvAreQVf.esm.js → setup-DzV5ie85.esm.js} +1 -1
- package/dist/signature.d.ts +2 -2
- package/dist/signature.esm.js +1 -1
- package/dist/trust-graph.d.ts +1 -1
- package/dist/{types-CU1g8keq.d.ts → types-B-YHRn8Q.d.ts} +1 -1
- package/dist/{types-Csl38fHI.d.ts → types-D4ZTL8-s.d.ts} +1 -1
- package/dist/{types-DFW7rqck.d.ts → types-f4D2sn3g.d.ts} +2 -2
- package/dist/wasm.d.ts +2 -2
- package/dist/wasm.esm.js +2 -2
- package/dist/watchlist-for-business.d.ts +1 -1
- package/dist/watchlist-for-business.esm.js +1 -1
- package/dist/watchlist.d.ts +1 -1
- package/dist/watchlist.esm.js +1 -1
- package/dist/workflow.d.ts +93 -93
- package/dist/workflow.esm.js +40 -40
- package/package.json +3 -3
- package/dist/StateMachine-DhTgreIF.d.ts +0 -2
- package/dist/openviduLazy-LuOtGg6Y.esm.js +0 -3
- /package/dist/{Actor-C8MYPMPo.d.ts → Actor-LDyqfWZV.d.ts} +0 -0
- /package/dist/{BrowserStorageProvider-Dgem4aW-.esm.js → BrowserStorageProvider-BrJver0U.esm.js} +0 -0
- /package/dist/{ITimerCapability-Bs6czuIv.esm.js → ITimerCapability-gIlcIrAX.esm.js} +0 -0
- /package/dist/{Manager-1C7epU1z.d.ts → Manager-Li1pXOFC.d.ts} +0 -0
- /package/dist/{MotionSensorProvider-BBuuAwD1.esm.js → MotionSensorProvider-DAFArfKO.esm.js} +0 -0
- /package/dist/{addressSearch-CibChdCl.esm.js → addressSearch-BmANIaSq.esm.js} +0 -0
- /package/dist/{camera-CNP8dDBl.d.ts → camera-BgyHeDdc.d.ts} +0 -0
- /package/dist/{camera-CIJDNUuJ.esm.js → camera-P7dse339.esm.js} +0 -0
- /package/dist/{consentStateMachine-O92z9rto.esm.js → consentStateMachine-DKLONjEH.esm.js} +0 -0
- /package/dist/{cpf-Br2axAnk.esm.js → cpf-Wwu9VLfA.esm.js} +0 -0
- /package/dist/{curpValidationStateMachine-BuUxLtXm.esm.js → curpValidationStateMachine-DRa9npZV.esm.js} +0 -0
- /package/dist/{customWatchlistStateMachine-B6lfBuUE.esm.js → customWatchlistStateMachine-I3gP0TDW.esm.js} +0 -0
- /package/dist/{dateUtils-BMYnARx4.esm.js → dateUtils-iJujdoEB.esm.js} +0 -0
- /package/dist/{emailStateMachine-Bd8iLNfU.esm.js → emailStateMachine-BE-VaJp3.esm.js} +0 -0
- /package/dist/{faceMatchStateMachine-Z_QDTsIx.esm.js → faceMatchStateMachine-Bd4mRtgq.esm.js} +0 -0
- /package/dist/{flowCompletionService-B3C-J9a1.d.ts → flowCompletionService-7NEI1i7g.d.ts} +0 -0
- /package/dist/{flowCompletionService-CWFG9510.esm.js → flowCompletionService-Cshgj0gV.esm.js} +0 -0
- /package/dist/{geolocationStateMachine-q4Lqg2Uf.esm.js → geolocationStateMachine-DW_g556o.esm.js} +0 -0
- /package/dist/{getDeviceClass-DE2GMvvh.esm.js → getDeviceClass-C5yT6K2e.esm.js} +0 -0
- /package/dist/{governmentValidationStateMachine-Dk_cmeHf.esm.js → governmentValidationStateMachine-Bhfg7-kH.esm.js} +0 -0
- /package/dist/{idVerificationStateMachine-CbthaJN7.esm.js → idVerificationStateMachine-BicmjAoY.esm.js} +0 -0
- /package/dist/{identityReuseStateMachine-DUCOpe0t.esm.js → identityReuseStateMachine-BmBxUiRQ.esm.js} +0 -0
- /package/dist/{invokeOnCaptureCallback-D_EWxqSU.esm.js → invokeOnCaptureCallback-CH7T3THr.esm.js} +0 -0
- /package/dist/{lib-DtY8aw1R.esm.js → lib-WqARpotm.esm.js} +0 -0
- /package/dist/{mandatoryConsentStateMachine-9QVdu5y9.esm.js → mandatoryConsentStateMachine-Bu2GwgIo.esm.js} +0 -0
- /package/dist/{phoneStateMachine-BntOEKN1.esm.js → phoneStateMachine-B3a-RKHn.esm.js} +0 -0
- /package/dist/{qe-signature-BFRMDOsL.esm.js → qe-signature-CYSZszZ7.esm.js} +0 -0
- /package/dist/{redirectToMobileStateMachine-CWCq02ea.esm.js → redirectToMobileStateMachine-C5-FB896.esm.js} +0 -0
- /package/dist/{runChildModule-DXnCvv9l.esm.js → runChildModule-D3uaw05g.esm.js} +0 -0
- /package/dist/{session-U3dA33EZ.esm.js → session-CKUCSZHC.esm.js} +0 -0
- /package/dist/{signatureStateMachine-CCXjDQVG.esm.js → signatureStateMachine-D7aDVITq.esm.js} +0 -0
- /package/dist/{types-CalxunYf.d.ts → types-B9hcs5GV.d.ts} +0 -0
- /package/dist/{types-BR5zXpWs.d.ts → types-CA1a_172.d.ts} +0 -0
- /package/dist/{warmup-_dDHpp72.d.ts → warmup-BXBDbhKe.d.ts} +0 -0
- /package/dist/{watchlistForBusinessStateMachine-DnFUKl_E.esm.js → watchlistForBusinessStateMachine-DgH3Zlv2.esm.js} +0 -0
- /package/dist/{watchlistStateMachine-B1KRHF9x.esm.js → watchlistStateMachine-DfipYi32.esm.js} +0 -0
|
@@ -1,97 +1,8 @@
|
|
|
1
1
|
import "./api-YxPMtty2.esm.js";
|
|
2
|
-
import
|
|
2
|
+
import "./events-Bsw1l0pH.esm.js";
|
|
3
3
|
import "./endpoints-BPHddOTi.esm.js";
|
|
4
|
-
import
|
|
5
|
-
import { n as identityReuseMachine, t as SCAN_NEW_DOCUMENT } from "./identityReuseStateMachine-
|
|
4
|
+
import "./xstate.esm-CWoFJOio.esm.js";
|
|
5
|
+
import { n as identityReuseMachine, t as SCAN_NEW_DOCUMENT } from "./identityReuseStateMachine-BmBxUiRQ.esm.js";
|
|
6
|
+
import { n as createIdentityReuseManagerFromActor, t as createIdentityReuseManager } from "./identityReuseManager-cG0dhENk.esm.js";
|
|
6
7
|
|
|
7
|
-
//#region src/modules/identity-reuse/identityReuseActor.ts
|
|
8
|
-
/**
|
|
9
|
-
* Creates and starts an IdentityReuse actor.
|
|
10
|
-
*
|
|
11
|
-
* The actor begins in 'idle' state, ready to receive events.
|
|
12
|
-
*/
|
|
13
|
-
function createIdentityReuseActor(options) {
|
|
14
|
-
return createActor(identityReuseMachine, { input: { config: options.config } }).start();
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
//#endregion
|
|
18
|
-
//#region src/modules/identity-reuse/identityReuseManager.ts
|
|
19
|
-
function mapState(snapshot) {
|
|
20
|
-
const { context } = snapshot;
|
|
21
|
-
if (snapshot.matches("idle")) return { status: "idle" };
|
|
22
|
-
if (snapshot.matches("loading")) return { status: "loading" };
|
|
23
|
-
if (snapshot.matches("documentsFound")) return {
|
|
24
|
-
status: "documentsFound",
|
|
25
|
-
documents: context.documents,
|
|
26
|
-
selectedDocumentId: context.selectedDocumentId
|
|
27
|
-
};
|
|
28
|
-
if (snapshot.matches("submitting")) return { status: "submitting" };
|
|
29
|
-
if (snapshot.matches("finished")) return { status: "finished" };
|
|
30
|
-
if (snapshot.matches("error")) return {
|
|
31
|
-
status: "error",
|
|
32
|
-
error: context.error ?? "An error occurred"
|
|
33
|
-
};
|
|
34
|
-
return { status: "idle" };
|
|
35
|
-
}
|
|
36
|
-
function createApi({ actor, trackElementClicked }) {
|
|
37
|
-
return {
|
|
38
|
-
load() {
|
|
39
|
-
actor.send({ type: "LOAD" });
|
|
40
|
-
},
|
|
41
|
-
chooseDocument(documentId) {
|
|
42
|
-
trackElementClicked?.("chooseDocument");
|
|
43
|
-
actor.send({
|
|
44
|
-
type: "DOCUMENT_CHOSEN",
|
|
45
|
-
documentId
|
|
46
|
-
});
|
|
47
|
-
},
|
|
48
|
-
submit() {
|
|
49
|
-
trackElementClicked?.("submit");
|
|
50
|
-
actor.send({ type: "SUBMIT" });
|
|
51
|
-
},
|
|
52
|
-
skip() {
|
|
53
|
-
trackElementClicked?.("skip");
|
|
54
|
-
actor.send({ type: "SKIP" });
|
|
55
|
-
},
|
|
56
|
-
retry() {
|
|
57
|
-
trackElementClicked?.("retry");
|
|
58
|
-
actor.send({ type: "RETRY" });
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Creates an IdentityReuse manager for headless or UI-driven usage.
|
|
64
|
-
*
|
|
65
|
-
* @example Headless usage
|
|
66
|
-
* ```typescript
|
|
67
|
-
* const manager = createIdentityReuseManager({ config: {} });
|
|
68
|
-
* manager.subscribe((state) => {
|
|
69
|
-
* if (state.status === 'documentsFound') manager.submit();
|
|
70
|
-
* if (state.status === 'finished') console.log('Done!');
|
|
71
|
-
* });
|
|
72
|
-
* manager.load();
|
|
73
|
-
* ```
|
|
74
|
-
*/
|
|
75
|
-
function createIdentityReuseManager(options) {
|
|
76
|
-
return createManager({
|
|
77
|
-
actor: createIdentityReuseActor(options),
|
|
78
|
-
mapState,
|
|
79
|
-
createApi,
|
|
80
|
-
instrumentation: createManagerInstrumentation(eventModuleNames.identityReuse)
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Creates an IdentityReuse manager from a pre-built actor.
|
|
85
|
-
* Use this when overriding the machine via `.provide()` for custom backends or testing.
|
|
86
|
-
*/
|
|
87
|
-
function createIdentityReuseManagerFromActor(actor) {
|
|
88
|
-
return createManager({
|
|
89
|
-
actor,
|
|
90
|
-
mapState,
|
|
91
|
-
createApi,
|
|
92
|
-
instrumentation: createManagerInstrumentation(eventModuleNames.identityReuse)
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
//#endregion
|
|
97
8
|
export { SCAN_NEW_DOCUMENT, createIdentityReuseManager, createIdentityReuseManagerFromActor, identityReuseMachine };
|
|
@@ -0,0 +1,428 @@
|
|
|
1
|
+
import { t as Manager } from "./Manager-Li1pXOFC.js";
|
|
2
|
+
import { t as ActorRefFrom } from "./Actor-LDyqfWZV.js";
|
|
3
|
+
import * as xstate1120 from "xstate";
|
|
4
|
+
|
|
5
|
+
//#region src/modules/identity-reuse/types.d.ts
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Configuration options for the IdentityReuse module.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* const config: IdentityReuseConfig = {};
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
type IdentityReuseConfig = {};
|
|
16
|
+
/**
|
|
17
|
+
* A reusable identity document previously verified with a partner organization.
|
|
18
|
+
* Internal shape consumed by the state machine, manager, and UI; the service
|
|
19
|
+
* layer adapts the raw backend payload to this shape.
|
|
20
|
+
*
|
|
21
|
+
* Backend orders the array — the first entry is the best match. The
|
|
22
|
+
* "Recommended" tag in the UI is purely positional; no backend field for it.
|
|
23
|
+
*/
|
|
24
|
+
type ReusableDocument = {
|
|
25
|
+
/** Stable document identifier (uuid). Used as `documentId` in submit. */
|
|
26
|
+
id: string;
|
|
27
|
+
/** Document category, normalized to camelCase (e.g. "driversLicense"). */
|
|
28
|
+
documentType: string;
|
|
29
|
+
/** Masked identifier shown to the user (e.g. "00*****29"). */
|
|
30
|
+
maskedNumber: string;
|
|
31
|
+
/**
|
|
32
|
+
* Country code as returned by the backend (ISO 3166-1 alpha-3, e.g. "SRB").
|
|
33
|
+
* UI is responsible for any presentation transforms (flag emoji, etc.).
|
|
34
|
+
*/
|
|
35
|
+
countryCode: string;
|
|
36
|
+
/**
|
|
37
|
+
* Verification timestamp as a Unix epoch in seconds (may include fractional
|
|
38
|
+
* milliseconds). Pass-through from the backend's `validatedAt`; the UI layer
|
|
39
|
+
* is responsible for any Date construction or formatting.
|
|
40
|
+
*/
|
|
41
|
+
verifiedAt: number;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Documents returned by the service layer after adapting the backend payload.
|
|
45
|
+
* Always an array; ordered by backend with the best match first.
|
|
46
|
+
*/
|
|
47
|
+
type FetchDocumentsResponse = ReusableDocument[];
|
|
48
|
+
/**
|
|
49
|
+
* @internal Request body for POST /omni/identity-reuse/submit.
|
|
50
|
+
*
|
|
51
|
+
* - `{ accepted: true, documentId }` — user is reusing the selected document.
|
|
52
|
+
* - `{ accepted: false }` — user opted to scan a new document instead.
|
|
53
|
+
*/
|
|
54
|
+
type SubmitParams = {
|
|
55
|
+
accepted: true;
|
|
56
|
+
documentId: string;
|
|
57
|
+
} | {
|
|
58
|
+
accepted: false;
|
|
59
|
+
};
|
|
60
|
+
/** @internal Response from POST /omni/identity-reuse/submit — shape TBD */
|
|
61
|
+
type SubmitResponse = {};
|
|
62
|
+
//#endregion
|
|
63
|
+
//#region src/modules/identity-reuse/identityReuseStateMachine.d.ts
|
|
64
|
+
/**
|
|
65
|
+
* Sentinel selection value for the "Scan a new document" row in the picker.
|
|
66
|
+
* Picked + SUBMIT calls /submit with `{ accepted: false }`, then finishes.
|
|
67
|
+
*/
|
|
68
|
+
declare const SCAN_NEW_DOCUMENT: "scanNew";
|
|
69
|
+
type SelectedDocumentId = string | typeof SCAN_NEW_DOCUMENT;
|
|
70
|
+
type IdentityReuseContext = {
|
|
71
|
+
config: IdentityReuseConfig;
|
|
72
|
+
documents: ReusableDocument[];
|
|
73
|
+
selectedDocumentId: SelectedDocumentId | undefined;
|
|
74
|
+
error: string | undefined;
|
|
75
|
+
};
|
|
76
|
+
type IdentityReuseInput = {
|
|
77
|
+
config: IdentityReuseConfig;
|
|
78
|
+
};
|
|
79
|
+
declare const identityReuseMachine: xstate1120.StateMachine<IdentityReuseContext, {
|
|
80
|
+
type: "LOAD";
|
|
81
|
+
} | {
|
|
82
|
+
type: "DOCUMENT_CHOSEN";
|
|
83
|
+
documentId: SelectedDocumentId;
|
|
84
|
+
} | {
|
|
85
|
+
type: "SUBMIT";
|
|
86
|
+
} | {
|
|
87
|
+
type: "SKIP";
|
|
88
|
+
} | {
|
|
89
|
+
type: "RETRY";
|
|
90
|
+
}, {
|
|
91
|
+
[x: string]: xstate1120.ActorRefFromLogic<xstate1120.PromiseActorLogic<FetchDocumentsResponse, void, xstate1120.EventObject>> | xstate1120.ActorRefFromLogic<xstate1120.PromiseActorLogic<SubmitResponse, SubmitParams, xstate1120.EventObject>> | undefined;
|
|
92
|
+
}, xstate1120.Values<{
|
|
93
|
+
fetchDocuments: {
|
|
94
|
+
src: "fetchDocuments";
|
|
95
|
+
logic: xstate1120.PromiseActorLogic<FetchDocumentsResponse, void, xstate1120.EventObject>;
|
|
96
|
+
id: string | undefined;
|
|
97
|
+
};
|
|
98
|
+
submitDocument: {
|
|
99
|
+
src: "submitDocument";
|
|
100
|
+
logic: xstate1120.PromiseActorLogic<SubmitResponse, SubmitParams, xstate1120.EventObject>;
|
|
101
|
+
id: string | undefined;
|
|
102
|
+
};
|
|
103
|
+
}>, xstate1120.Values<{
|
|
104
|
+
setDocuments: {
|
|
105
|
+
type: "setDocuments";
|
|
106
|
+
params: xstate1120.NonReducibleUnknown;
|
|
107
|
+
};
|
|
108
|
+
setError: {
|
|
109
|
+
type: "setError";
|
|
110
|
+
params: xstate1120.NonReducibleUnknown;
|
|
111
|
+
};
|
|
112
|
+
clearError: {
|
|
113
|
+
type: "clearError";
|
|
114
|
+
params: xstate1120.NonReducibleUnknown;
|
|
115
|
+
};
|
|
116
|
+
setSelectedDocument: {
|
|
117
|
+
type: "setSelectedDocument";
|
|
118
|
+
params: xstate1120.NonReducibleUnknown;
|
|
119
|
+
};
|
|
120
|
+
}>, xstate1120.Values<{
|
|
121
|
+
hasDocuments: {
|
|
122
|
+
type: "hasDocuments";
|
|
123
|
+
params: unknown;
|
|
124
|
+
};
|
|
125
|
+
hasSelection: {
|
|
126
|
+
type: "hasSelection";
|
|
127
|
+
params: unknown;
|
|
128
|
+
};
|
|
129
|
+
}>, never, "error" | "idle" | "finished" | "loading" | "submitting" | "documentsFound", string, IdentityReuseInput, xstate1120.NonReducibleUnknown, xstate1120.EventObject, xstate1120.MetaObject, {
|
|
130
|
+
readonly id: "identityReuse";
|
|
131
|
+
readonly initial: "idle";
|
|
132
|
+
readonly context: ({
|
|
133
|
+
input
|
|
134
|
+
}: {
|
|
135
|
+
spawn: {
|
|
136
|
+
<TSrc extends "fetchDocuments" | "submitDocument">(logic: TSrc, ...[options]: ({
|
|
137
|
+
src: "fetchDocuments";
|
|
138
|
+
logic: xstate1120.PromiseActorLogic<FetchDocumentsResponse, void, xstate1120.EventObject>;
|
|
139
|
+
id: string | undefined;
|
|
140
|
+
} extends infer T ? T extends {
|
|
141
|
+
src: "fetchDocuments";
|
|
142
|
+
logic: xstate1120.PromiseActorLogic<FetchDocumentsResponse, void, xstate1120.EventObject>;
|
|
143
|
+
id: string | undefined;
|
|
144
|
+
} ? T extends {
|
|
145
|
+
src: TSrc;
|
|
146
|
+
} ? xstate1120.ConditionalRequired<[options?: ({
|
|
147
|
+
id?: T["id"] | undefined;
|
|
148
|
+
systemId?: string;
|
|
149
|
+
input?: xstate1120.InputFrom<T["logic"]> | undefined;
|
|
150
|
+
syncSnapshot?: boolean;
|
|
151
|
+
} & { [K in xstate1120.RequiredActorOptions<T>]: unknown }) | undefined], xstate1120.IsNotNever<xstate1120.RequiredActorOptions<T>>> : never : never : never) | ({
|
|
152
|
+
src: "submitDocument";
|
|
153
|
+
logic: xstate1120.PromiseActorLogic<SubmitResponse, SubmitParams, xstate1120.EventObject>;
|
|
154
|
+
id: string | undefined;
|
|
155
|
+
} extends infer T_1 ? T_1 extends {
|
|
156
|
+
src: "submitDocument";
|
|
157
|
+
logic: xstate1120.PromiseActorLogic<SubmitResponse, SubmitParams, xstate1120.EventObject>;
|
|
158
|
+
id: string | undefined;
|
|
159
|
+
} ? T_1 extends {
|
|
160
|
+
src: TSrc;
|
|
161
|
+
} ? xstate1120.ConditionalRequired<[options?: ({
|
|
162
|
+
id?: T_1["id"] | undefined;
|
|
163
|
+
systemId?: string;
|
|
164
|
+
input?: xstate1120.InputFrom<T_1["logic"]> | undefined;
|
|
165
|
+
syncSnapshot?: boolean;
|
|
166
|
+
} & { [K_1 in xstate1120.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate1120.IsNotNever<xstate1120.RequiredActorOptions<T_1>>> : never : never : never)): xstate1120.ActorRefFromLogic<xstate1120.GetConcreteByKey<xstate1120.Values<{
|
|
167
|
+
fetchDocuments: {
|
|
168
|
+
src: "fetchDocuments";
|
|
169
|
+
logic: xstate1120.PromiseActorLogic<FetchDocumentsResponse, void, xstate1120.EventObject>;
|
|
170
|
+
id: string | undefined;
|
|
171
|
+
};
|
|
172
|
+
submitDocument: {
|
|
173
|
+
src: "submitDocument";
|
|
174
|
+
logic: xstate1120.PromiseActorLogic<SubmitResponse, SubmitParams, xstate1120.EventObject>;
|
|
175
|
+
id: string | undefined;
|
|
176
|
+
};
|
|
177
|
+
}>, "src", TSrc>["logic"]>;
|
|
178
|
+
<TLogic extends xstate1120.AnyActorLogic>(src: TLogic, ...[options]: xstate1120.ConditionalRequired<[options?: ({
|
|
179
|
+
id?: never;
|
|
180
|
+
systemId?: string;
|
|
181
|
+
input?: xstate1120.InputFrom<TLogic> | undefined;
|
|
182
|
+
syncSnapshot?: boolean;
|
|
183
|
+
} & { [K in xstate1120.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate1120.IsNotNever<xstate1120.RequiredLogicInput<TLogic>>>): xstate1120.ActorRefFromLogic<TLogic>;
|
|
184
|
+
};
|
|
185
|
+
input: IdentityReuseInput;
|
|
186
|
+
self: xstate1120.ActorRef<xstate1120.MachineSnapshot<IdentityReuseContext, {
|
|
187
|
+
type: "LOAD";
|
|
188
|
+
} | {
|
|
189
|
+
type: "DOCUMENT_CHOSEN";
|
|
190
|
+
documentId: SelectedDocumentId;
|
|
191
|
+
} | {
|
|
192
|
+
type: "SUBMIT";
|
|
193
|
+
} | {
|
|
194
|
+
type: "SKIP";
|
|
195
|
+
} | {
|
|
196
|
+
type: "RETRY";
|
|
197
|
+
}, Record<string, xstate1120.AnyActorRef | undefined>, xstate1120.StateValue, string, unknown, any, any>, {
|
|
198
|
+
type: "LOAD";
|
|
199
|
+
} | {
|
|
200
|
+
type: "DOCUMENT_CHOSEN";
|
|
201
|
+
documentId: SelectedDocumentId;
|
|
202
|
+
} | {
|
|
203
|
+
type: "SUBMIT";
|
|
204
|
+
} | {
|
|
205
|
+
type: "SKIP";
|
|
206
|
+
} | {
|
|
207
|
+
type: "RETRY";
|
|
208
|
+
}, xstate1120.AnyEventObject>;
|
|
209
|
+
}) => {
|
|
210
|
+
config: IdentityReuseConfig;
|
|
211
|
+
documents: never[];
|
|
212
|
+
selectedDocumentId: undefined;
|
|
213
|
+
error: undefined;
|
|
214
|
+
};
|
|
215
|
+
readonly states: {
|
|
216
|
+
readonly idle: {
|
|
217
|
+
readonly on: {
|
|
218
|
+
readonly LOAD: {
|
|
219
|
+
readonly target: "loading";
|
|
220
|
+
};
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
readonly loading: {
|
|
224
|
+
readonly invoke: {
|
|
225
|
+
readonly id: "fetchDocuments";
|
|
226
|
+
readonly src: "fetchDocuments";
|
|
227
|
+
readonly onDone: readonly [{
|
|
228
|
+
readonly target: "documentsFound";
|
|
229
|
+
readonly guard: "hasDocuments";
|
|
230
|
+
readonly actions: "setDocuments";
|
|
231
|
+
}, {
|
|
232
|
+
readonly target: "finished";
|
|
233
|
+
}];
|
|
234
|
+
readonly onError: {
|
|
235
|
+
readonly target: "error";
|
|
236
|
+
readonly actions: "setError";
|
|
237
|
+
};
|
|
238
|
+
};
|
|
239
|
+
};
|
|
240
|
+
readonly documentsFound: {
|
|
241
|
+
readonly on: {
|
|
242
|
+
readonly DOCUMENT_CHOSEN: {
|
|
243
|
+
readonly actions: "setSelectedDocument";
|
|
244
|
+
};
|
|
245
|
+
readonly SUBMIT: {
|
|
246
|
+
readonly target: "submitting";
|
|
247
|
+
readonly guard: "hasSelection";
|
|
248
|
+
};
|
|
249
|
+
readonly SKIP: {
|
|
250
|
+
readonly target: "finished";
|
|
251
|
+
};
|
|
252
|
+
};
|
|
253
|
+
};
|
|
254
|
+
readonly submitting: {
|
|
255
|
+
readonly invoke: {
|
|
256
|
+
readonly id: "submitDocument";
|
|
257
|
+
readonly src: "submitDocument";
|
|
258
|
+
readonly input: ({
|
|
259
|
+
context
|
|
260
|
+
}: {
|
|
261
|
+
context: IdentityReuseContext;
|
|
262
|
+
}) => SubmitParams;
|
|
263
|
+
readonly onDone: {
|
|
264
|
+
readonly target: "finished";
|
|
265
|
+
};
|
|
266
|
+
readonly onError: {
|
|
267
|
+
readonly target: "error";
|
|
268
|
+
readonly actions: "setError";
|
|
269
|
+
};
|
|
270
|
+
};
|
|
271
|
+
};
|
|
272
|
+
readonly finished: {
|
|
273
|
+
readonly type: "final";
|
|
274
|
+
};
|
|
275
|
+
readonly error: {
|
|
276
|
+
readonly on: {
|
|
277
|
+
readonly RETRY: {
|
|
278
|
+
readonly target: "loading";
|
|
279
|
+
readonly actions: "clearError";
|
|
280
|
+
};
|
|
281
|
+
readonly SKIP: {
|
|
282
|
+
readonly target: "finished";
|
|
283
|
+
};
|
|
284
|
+
};
|
|
285
|
+
};
|
|
286
|
+
};
|
|
287
|
+
}>;
|
|
288
|
+
type IdentityReuseMachine = typeof identityReuseMachine;
|
|
289
|
+
//#endregion
|
|
290
|
+
//#region src/modules/identity-reuse/identityReuseActor.d.ts
|
|
291
|
+
/**
|
|
292
|
+
* Options for creating an IdentityReuse actor.
|
|
293
|
+
*/
|
|
294
|
+
type CreateIdentityReuseActorOptions = {
|
|
295
|
+
/** Module configuration */
|
|
296
|
+
config: IdentityReuseConfig;
|
|
297
|
+
};
|
|
298
|
+
/**
|
|
299
|
+
* Type representing a running IdentityReuse actor.
|
|
300
|
+
*/
|
|
301
|
+
type IdentityReuseActor = ActorRefFrom<IdentityReuseMachine>;
|
|
302
|
+
//#endregion
|
|
303
|
+
//#region src/modules/identity-reuse/identityReuseManager.d.ts
|
|
304
|
+
/** IdentityReuse manager is in initial state, waiting for `load()` */
|
|
305
|
+
type IdentityReuseIdleState = {
|
|
306
|
+
status: 'idle';
|
|
307
|
+
};
|
|
308
|
+
/** Fetching reusable documents from the backend */
|
|
309
|
+
type IdentityReuseLoadingState = {
|
|
310
|
+
status: 'loading';
|
|
311
|
+
};
|
|
312
|
+
/**
|
|
313
|
+
* Documents are available — user picks one (or "scan new") and confirms.
|
|
314
|
+
* The first document in the list is the recommended one; the UI surfaces a
|
|
315
|
+
* "Recommended" tag based on position alone.
|
|
316
|
+
*
|
|
317
|
+
* @property documents - Ordered documents; index 0 is the best match.
|
|
318
|
+
* @property selectedDocumentId - Currently selected document id, or
|
|
319
|
+
* `'scanNew'` if the user picked the scan-new row. Auto-populated to
|
|
320
|
+
* `documents[0].id` on entry.
|
|
321
|
+
*/
|
|
322
|
+
type IdentityReuseDocumentsFoundState = {
|
|
323
|
+
status: 'documentsFound';
|
|
324
|
+
documents: ReusableDocument[];
|
|
325
|
+
selectedDocumentId: SelectedDocumentId | undefined;
|
|
326
|
+
};
|
|
327
|
+
/** Submitting the chosen document for reuse */
|
|
328
|
+
type IdentityReuseSubmittingState = {
|
|
329
|
+
status: 'submitting';
|
|
330
|
+
};
|
|
331
|
+
/** Module completed successfully */
|
|
332
|
+
type IdentityReuseFinishedState = {
|
|
333
|
+
status: 'finished';
|
|
334
|
+
};
|
|
335
|
+
/**
|
|
336
|
+
* A recoverable error occurred — user can retry or skip
|
|
337
|
+
* @property error - Error message describing what went wrong
|
|
338
|
+
*/
|
|
339
|
+
type IdentityReuseErrorState = {
|
|
340
|
+
status: 'error';
|
|
341
|
+
error: string;
|
|
342
|
+
};
|
|
343
|
+
/**
|
|
344
|
+
* Union of all possible IdentityReuse manager states.
|
|
345
|
+
*
|
|
346
|
+
* @example
|
|
347
|
+
* ```typescript
|
|
348
|
+
* const state = manager.getState();
|
|
349
|
+
* if (state.status === 'documentsFound') {
|
|
350
|
+
* console.log(state.documents);
|
|
351
|
+
* }
|
|
352
|
+
* ```
|
|
353
|
+
*/
|
|
354
|
+
type IdentityReuseState = IdentityReuseIdleState | IdentityReuseLoadingState | IdentityReuseDocumentsFoundState | IdentityReuseSubmittingState | IdentityReuseFinishedState | IdentityReuseErrorState;
|
|
355
|
+
/**
|
|
356
|
+
* Creates an IdentityReuse manager for headless or UI-driven usage.
|
|
357
|
+
*
|
|
358
|
+
* @example Headless usage
|
|
359
|
+
* ```typescript
|
|
360
|
+
* const manager = createIdentityReuseManager({ config: {} });
|
|
361
|
+
* manager.subscribe((state) => {
|
|
362
|
+
* if (state.status === 'documentsFound') manager.submit();
|
|
363
|
+
* if (state.status === 'finished') console.log('Done!');
|
|
364
|
+
* });
|
|
365
|
+
* manager.load();
|
|
366
|
+
* ```
|
|
367
|
+
*/
|
|
368
|
+
declare function createIdentityReuseManager(options: CreateIdentityReuseActorOptions): Manager<IdentityReuseState> & {
|
|
369
|
+
/**
|
|
370
|
+
* Fetches reusable documents from the backend.
|
|
371
|
+
* Transitions from 'idle' to 'loading'.
|
|
372
|
+
*/
|
|
373
|
+
load(): void;
|
|
374
|
+
/**
|
|
375
|
+
* Selects a document by id, or the `'scanNew'` sentinel to indicate the
|
|
376
|
+
* user prefers to scan a new document instead of reusing one.
|
|
377
|
+
*/
|
|
378
|
+
chooseDocument(documentId: SelectedDocumentId): void;
|
|
379
|
+
/**
|
|
380
|
+
* Confirms the current selection. If a document is selected, submits it
|
|
381
|
+
* for reuse; if the scan-new row is selected, finishes the module without
|
|
382
|
+
* submitting (orchestration will load the next node).
|
|
383
|
+
*/
|
|
384
|
+
submit(): void;
|
|
385
|
+
/**
|
|
386
|
+
* Skips identity reuse entirely. Finishes the module without submitting;
|
|
387
|
+
* orchestration moves on to the next node.
|
|
388
|
+
*/
|
|
389
|
+
skip(): void;
|
|
390
|
+
/**
|
|
391
|
+
* Retries loading documents after an error.
|
|
392
|
+
*/
|
|
393
|
+
retry(): void;
|
|
394
|
+
};
|
|
395
|
+
/**
|
|
396
|
+
* Creates an IdentityReuse manager from a pre-built actor.
|
|
397
|
+
* Use this when overriding the machine via `.provide()` for custom backends or testing.
|
|
398
|
+
*/
|
|
399
|
+
declare function createIdentityReuseManagerFromActor(actor: IdentityReuseActor): Manager<IdentityReuseState> & {
|
|
400
|
+
/**
|
|
401
|
+
* Fetches reusable documents from the backend.
|
|
402
|
+
* Transitions from 'idle' to 'loading'.
|
|
403
|
+
*/
|
|
404
|
+
load(): void;
|
|
405
|
+
/**
|
|
406
|
+
* Selects a document by id, or the `'scanNew'` sentinel to indicate the
|
|
407
|
+
* user prefers to scan a new document instead of reusing one.
|
|
408
|
+
*/
|
|
409
|
+
chooseDocument(documentId: SelectedDocumentId): void;
|
|
410
|
+
/**
|
|
411
|
+
* Confirms the current selection. If a document is selected, submits it
|
|
412
|
+
* for reuse; if the scan-new row is selected, finishes the module without
|
|
413
|
+
* submitting (orchestration will load the next node).
|
|
414
|
+
*/
|
|
415
|
+
submit(): void;
|
|
416
|
+
/**
|
|
417
|
+
* Skips identity reuse entirely. Finishes the module without submitting;
|
|
418
|
+
* orchestration moves on to the next node.
|
|
419
|
+
*/
|
|
420
|
+
skip(): void;
|
|
421
|
+
/**
|
|
422
|
+
* Retries loading documents after an error.
|
|
423
|
+
*/
|
|
424
|
+
retry(): void;
|
|
425
|
+
};
|
|
426
|
+
type IdentityReuseManager = ReturnType<typeof createIdentityReuseManager>;
|
|
427
|
+
//#endregion
|
|
428
|
+
export { IdentityReuseActor as a, identityReuseMachine as c, ReusableDocument as d, SubmitResponse as f, createIdentityReuseManagerFromActor as i, FetchDocumentsResponse as l, IdentityReuseState as n, SCAN_NEW_DOCUMENT as o, createIdentityReuseManager as r, SelectedDocumentId as s, IdentityReuseManager as t, IdentityReuseConfig as u };
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-Bsw1l0pH.esm.js";
|
|
2
|
+
import { c as createManager, s as createActor } from "./xstate.esm-CWoFJOio.esm.js";
|
|
3
|
+
import { n as identityReuseMachine } from "./identityReuseStateMachine-BmBxUiRQ.esm.js";
|
|
4
|
+
|
|
5
|
+
//#region src/modules/identity-reuse/identityReuseActor.ts
|
|
6
|
+
/**
|
|
7
|
+
* Creates and starts an IdentityReuse actor.
|
|
8
|
+
*
|
|
9
|
+
* The actor begins in 'idle' state, ready to receive events.
|
|
10
|
+
*/
|
|
11
|
+
function createIdentityReuseActor(options) {
|
|
12
|
+
return createActor(identityReuseMachine, { input: { config: options.config } }).start();
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region src/modules/identity-reuse/identityReuseManager.ts
|
|
17
|
+
function mapState(snapshot) {
|
|
18
|
+
const { context } = snapshot;
|
|
19
|
+
if (snapshot.matches("idle")) return { status: "idle" };
|
|
20
|
+
if (snapshot.matches("loading")) return { status: "loading" };
|
|
21
|
+
if (snapshot.matches("documentsFound")) return {
|
|
22
|
+
status: "documentsFound",
|
|
23
|
+
documents: context.documents,
|
|
24
|
+
selectedDocumentId: context.selectedDocumentId
|
|
25
|
+
};
|
|
26
|
+
if (snapshot.matches("submitting")) return { status: "submitting" };
|
|
27
|
+
if (snapshot.matches("finished")) return { status: "finished" };
|
|
28
|
+
if (snapshot.matches("error")) return {
|
|
29
|
+
status: "error",
|
|
30
|
+
error: context.error ?? "An error occurred"
|
|
31
|
+
};
|
|
32
|
+
return { status: "idle" };
|
|
33
|
+
}
|
|
34
|
+
function createApi({ actor, trackElementClicked }) {
|
|
35
|
+
return {
|
|
36
|
+
load() {
|
|
37
|
+
actor.send({ type: "LOAD" });
|
|
38
|
+
},
|
|
39
|
+
chooseDocument(documentId) {
|
|
40
|
+
trackElementClicked?.("chooseDocument");
|
|
41
|
+
actor.send({
|
|
42
|
+
type: "DOCUMENT_CHOSEN",
|
|
43
|
+
documentId
|
|
44
|
+
});
|
|
45
|
+
},
|
|
46
|
+
submit() {
|
|
47
|
+
trackElementClicked?.("submit");
|
|
48
|
+
actor.send({ type: "SUBMIT" });
|
|
49
|
+
},
|
|
50
|
+
skip() {
|
|
51
|
+
trackElementClicked?.("skip");
|
|
52
|
+
actor.send({ type: "SKIP" });
|
|
53
|
+
},
|
|
54
|
+
retry() {
|
|
55
|
+
trackElementClicked?.("retry");
|
|
56
|
+
actor.send({ type: "RETRY" });
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Creates an IdentityReuse manager for headless or UI-driven usage.
|
|
62
|
+
*
|
|
63
|
+
* @example Headless usage
|
|
64
|
+
* ```typescript
|
|
65
|
+
* const manager = createIdentityReuseManager({ config: {} });
|
|
66
|
+
* manager.subscribe((state) => {
|
|
67
|
+
* if (state.status === 'documentsFound') manager.submit();
|
|
68
|
+
* if (state.status === 'finished') console.log('Done!');
|
|
69
|
+
* });
|
|
70
|
+
* manager.load();
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
73
|
+
function createIdentityReuseManager(options) {
|
|
74
|
+
return createManager({
|
|
75
|
+
actor: createIdentityReuseActor(options),
|
|
76
|
+
mapState,
|
|
77
|
+
createApi,
|
|
78
|
+
instrumentation: createManagerInstrumentation(eventModuleNames.identityReuse)
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Creates an IdentityReuse manager from a pre-built actor.
|
|
83
|
+
* Use this when overriding the machine via `.provide()` for custom backends or testing.
|
|
84
|
+
*/
|
|
85
|
+
function createIdentityReuseManagerFromActor(actor) {
|
|
86
|
+
return createManager({
|
|
87
|
+
actor,
|
|
88
|
+
mapState,
|
|
89
|
+
createApi,
|
|
90
|
+
instrumentation: createManagerInstrumentation(eventModuleNames.identityReuse)
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
//#endregion
|
|
95
|
+
export { createIdentityReuseManagerFromActor as n, createIdentityReuseManager as t };
|