@incodetech/core 0.0.0-dev-20260409-09dfd52 → 0.0.0-dev-20260409-73c2599
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-D_cVAwYQ.esm.js → OpenViduRecordingProvider-JatjSE3h.esm.js} +1 -1
- package/dist/{WasmUtilProvider-mWSXzp7b.esm.js → WasmUtilProvider-DRh0wrlm.esm.js} +1 -1
- package/dist/{addressSearch-C26OZIx0.esm.js → addressSearch-CDdN30un.esm.js} +4 -4
- package/dist/antifraud.d.ts +1 -1
- package/dist/antifraud.esm.js +4 -4
- package/dist/{antifraudStateMachine-B74mO8vr.esm.js → antifraudStateMachine-C1AgS0nL.esm.js} +3 -3
- package/dist/authentication.d.ts +11 -11
- package/dist/authentication.esm.js +22 -22
- package/dist/{authenticationManager-DOTo1EYF.d.ts → authenticationManager-DYFYx68i.d.ts} +2 -2
- package/dist/{authenticationManager-BBQHippG.esm.js → authenticationManager-UaO9UTN7.esm.js} +6 -6
- package/dist/{authenticationStateMachine-DCJ0ArAt.esm.js → authenticationStateMachine-DWI65EwK.esm.js} +6 -6
- package/dist/{backCameraStream-D9g2wyil.esm.js → backCameraStream-BihRmMzc.esm.js} +3 -3
- package/dist/camera.d.ts +1 -1
- package/dist/camera.esm.js +3 -3
- package/dist/consent.d.ts +52 -52
- package/dist/consent.esm.js +4 -4
- package/dist/{consentStateMachine-DIdJXJW0.esm.js → consentStateMachine-CpRu2hF0.esm.js} +3 -3
- package/dist/cross-document-data-match.d.ts +1 -1
- package/dist/cross-document-data-match.esm.js +4 -4
- package/dist/curp-validation.d.ts +5 -5
- package/dist/curp-validation.esm.js +4 -4
- package/dist/{curpValidationStateMachine-Dp5WB6__.esm.js → curpValidationStateMachine-Czzgv2W1.esm.js} +3 -3
- package/dist/{deepsightLoader-CaULV07H.esm.js → deepsightLoader-jIgoauFK.esm.js} +10 -10
- package/dist/{deepsightService-rPGLH8Xp.esm.js → deepsightService-D4mM8yJ2.esm.js} +5 -5
- package/dist/{deepsightService-S-tU77m-.d.ts → deepsightService-DAeakjDd.d.ts} +2 -2
- package/dist/device.esm.js +3 -3
- package/dist/document-capture.d.ts +70 -70
- package/dist/document-capture.esm.js +8 -8
- package/dist/document-upload.d.ts +4 -4
- package/dist/document-upload.esm.js +7 -7
- package/dist/{documentCaptureStateMachine-ByYOCKz5.esm.js → documentCaptureStateMachine-XbpsHzh5.esm.js} +5 -5
- package/dist/ekyb.d.ts +3 -3
- package/dist/ekyb.esm.js +10 -10
- package/dist/{ekybStateMachine-DRku_YmR.esm.js → ekybStateMachine-BDuCae6s.esm.js} +5 -5
- package/dist/ekyc.d.ts +3 -3
- package/dist/ekyc.esm.js +6 -6
- package/dist/{ekycStateMachine-CSWaaWVl.esm.js → ekycStateMachine-DCeUngwi.esm.js} +12 -5
- package/dist/email.d.ts +3 -3
- package/dist/email.esm.js +6 -6
- package/dist/{emailManager-DByjyeY8.esm.js → emailManager-CAeo59lD.esm.js} +3 -3
- package/dist/{emailManager-D6CHM2QO.d.ts → emailManager-CZYfcu0n.d.ts} +2 -2
- package/dist/{emailStateMachine-BoIkeCw5.esm.js → emailStateMachine-Bqwe_sQS.esm.js} +4 -4
- package/dist/{events-W91zLpx4.esm.js → events-CZ2ka3pu.esm.js} +4 -1
- package/dist/events.d.ts +1 -0
- package/dist/events.esm.js +2 -2
- package/dist/extensibility.d.ts +15 -15
- package/dist/extensibility.esm.js +33 -33
- package/dist/face-match.d.ts +1 -1
- package/dist/face-match.esm.js +4 -4
- package/dist/{faceCaptureManagerFactory-Bspg2Tyf.esm.js → faceCaptureManagerFactory-D8zlMTvd.esm.js} +2 -2
- package/dist/{faceCaptureManagerFactory-P2yy30KU.d.ts → faceCaptureManagerFactory-DS-6yCya.d.ts} +8 -8
- package/dist/{faceCaptureSetup-CQevz86q.esm.js → faceCaptureSetup-1M6uUEjK.esm.js} +4 -4
- package/dist/{faceMatchStateMachine-CLterVEC.esm.js → faceMatchStateMachine-D3DuP_ya.esm.js} +3 -3
- package/dist/flow.d.ts +8 -8
- package/dist/flow.esm.js +9 -9
- package/dist/{flowCompletionService-DZSDUXus.esm.js → flowCompletionService-W6bj7Xd3.esm.js} +2 -2
- package/dist/{flowServices-YATk0fgY.esm.js → flowServices-C4tjBD8q.esm.js} +3 -3
- package/dist/geolocation.d.ts +2 -2
- package/dist/geolocation.esm.js +5 -5
- package/dist/{geolocationStateMachine-CRRUCl9K.esm.js → geolocationStateMachine-Bj2LkGwy.esm.js} +4 -4
- package/dist/{getDeviceClass-DBF-ExLR.esm.js → getDeviceClass-BoiWvKAc.esm.js} +1 -1
- package/dist/government-validation.d.ts +2 -2
- package/dist/government-validation.esm.js +5 -5
- package/dist/{governmentValidationStateMachine-C_iPX9VE.esm.js → governmentValidationStateMachine-W1CzRjVw.esm.js} +4 -4
- package/dist/http.esm.js +1 -1
- package/dist/id.d.ts +10 -10
- package/dist/id.esm.js +22 -22
- package/dist/{idCaptureManager-CJfatzuY.esm.js → idCaptureManager-BcS8fgW4.esm.js} +4 -4
- package/dist/{idCaptureManager-CbZvdr9y.d.ts → idCaptureManager-oR6YPYHj.d.ts} +7 -7
- package/dist/{idCaptureStateMachine-gf-Q9piu.esm.js → idCaptureStateMachine-MAzfM_2O.esm.js} +16 -16
- package/dist/identity-reuse.d.ts +530 -0
- package/dist/identity-reuse.esm.js +273 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.esm.js +8 -8
- package/dist/{lib-BzVJ-zxG.esm.js → lib-CxDxnzRd.esm.js} +1 -1
- package/dist/mandatory-consent.d.ts +55 -55
- package/dist/mandatory-consent.esm.js +4 -4
- package/dist/{mandatoryConsentStateMachine-BZNBJ1fK.esm.js → mandatoryConsentStateMachine-BMKi26Re.esm.js} +3 -3
- package/dist/{openviduLazy-CLg_-u0m.esm.js → openviduLazy-B8tinh9W.esm.js} +2 -2
- package/dist/openviduLazy-CItjpMfL.esm.js +3 -0
- package/dist/{permissionServices-Cisv73eQ.esm.js → permissionServices-Cj120WaT.esm.js} +2 -2
- package/dist/phone.d.ts +3 -3
- package/dist/phone.esm.js +6 -6
- package/dist/{phoneManager-DhC4obPF.esm.js → phoneManager-Bvj6Jr4o.esm.js} +3 -3
- package/dist/{phoneManager-Zwr-qCnC.d.ts → phoneManager-CCMCkyYr.d.ts} +2 -2
- package/dist/{phoneStateMachine-Cc_w4tC0.esm.js → phoneStateMachine-B1t1Z-Dd.esm.js} +4 -4
- package/dist/{recordingService-CCfxUY7-.esm.js → recordingService-8I_-hhNI.esm.js} +13 -13
- package/dist/redirect-to-mobile.d.ts +2 -2
- package/dist/redirect-to-mobile.esm.js +5 -5
- package/dist/{redirectToMobileStateMachine-vOe27Ufw.esm.js → redirectToMobileStateMachine-BVP1KcoO.esm.js} +4 -4
- package/dist/{runChildModule-DVC4JEjp.esm.js → runChildModule-B5DEiOS7.esm.js} +1 -1
- package/dist/selfie.d.ts +11 -11
- package/dist/selfie.esm.js +22 -22
- package/dist/{selfieManager-CorEST5h.esm.js → selfieManager-B6x3O5Ns.esm.js} +6 -6
- package/dist/{selfieManager-DNwfxieF.d.ts → selfieManager-gizt3Zha.d.ts} +2 -2
- package/dist/{selfieStateMachine-3b19ON1z.esm.js → selfieStateMachine-DHPSBFj0.esm.js} +3 -3
- package/dist/{session-B_rKSRql.esm.js → session-DoI-X9FK.esm.js} +4 -4
- package/dist/session.d.ts +1 -1
- package/dist/session.esm.js +6 -6
- package/dist/{setup-DLvhsDol.esm.js → setup-Bh2S53NT.esm.js} +5 -5
- package/dist/{setup-BYqwVLiv.d.ts → setup-Bz3Ffaoc.d.ts} +1 -1
- package/dist/signature.d.ts +2 -2
- package/dist/signature.esm.js +4 -4
- package/dist/{signatureStateMachine-CU92zCXU.esm.js → signatureStateMachine-Cv7yPuEf.esm.js} +3 -3
- package/dist/{stats-gFD2351t.esm.js → stats-wkQyDFV3.esm.js} +1 -1
- package/dist/stats.esm.js +2 -2
- package/dist/{types-CjsEZRcz.d.ts → types-BdEM5Jj7.d.ts} +1 -1
- package/dist/{types-CYJ0Ish6.d.ts → types-CdlQrTiZ.d.ts} +1 -1
- package/dist/{types-DU8HmI5U.d.ts → types-m43DfiSx.d.ts} +1 -1
- package/dist/wasm.d.ts +2 -2
- package/dist/wasm.esm.js +8 -8
- package/dist/workflow.d.ts +116 -116
- package/dist/workflow.esm.js +41 -41
- package/package.json +7 -3
- package/dist/openviduLazy-rFXBtZVZ.esm.js +0 -3
- /package/dist/{Actor-DbWH1K6E.d.ts → Actor-BkPcZGke.d.ts} +0 -0
- /package/dist/{BaseWasmProvider-DoYDYH1z.esm.js → BaseWasmProvider-C73c2nV9.esm.js} +0 -0
- /package/dist/{BrowserEnvironmentProvider-BtKLxTx4.esm.js → BrowserEnvironmentProvider-lxn4oxXn.esm.js} +0 -0
- /package/dist/{BrowserStorageProvider-CXaS5Ooj.esm.js → BrowserStorageProvider-ByxoNfxC.esm.js} +0 -0
- /package/dist/{BrowserTimerProvider-v7bpbrAk.esm.js → BrowserTimerProvider-CSdm7__S.esm.js} +0 -0
- /package/dist/{ITimerCapability-BZO_FsCo.esm.js → ITimerCapability-DAIaq369.esm.js} +0 -0
- /package/dist/{Manager-DcPMRgTm.d.ts → Manager-Bcnemkyi.d.ts} +0 -0
- /package/dist/{MotionSensorProvider-D90R4qwV.esm.js → MotionSensorProvider-BLnFo6My.esm.js} +0 -0
- /package/dist/{StateMachine-BBuIgsHT.d.ts → StateMachine-DIeoDJ7r.d.ts} +0 -0
- /package/dist/{api-aa9Mx20l.esm.js → api-CqKwkjJ3.esm.js} +0 -0
- /package/dist/{browserSimulation-DFqGKQAD.esm.js → browserSimulation-7W5-A3RV.esm.js} +0 -0
- /package/dist/{camera-DpPQS_-5.esm.js → camera-B-5traWf.esm.js} +0 -0
- /package/dist/{camera-DATT31my.d.ts → camera-CgnuDuxy.d.ts} +0 -0
- /package/dist/{chunk-YGHKo4MY.esm.js → chunk-Qw4qVmMx.esm.js} +0 -0
- /package/dist/{displayErrors-xrg0ejaS.d.ts → displayErrors-C9-VaqmS.d.ts} +0 -0
- /package/dist/{flowCompletionService-gxt5reFV.d.ts → flowCompletionService-CPLdZxe-.d.ts} +0 -0
- /package/dist/{getBrowser-DCcD7H-M.esm.js → getBrowser-DJkbzQ5t.esm.js} +0 -0
- /package/dist/{platform-DctkySJU.esm.js → platform-BfoqeM61.esm.js} +0 -0
- /package/dist/{types-CIjb0FKu.d.ts → types-CxU9jTRl.d.ts} +0 -0
- /package/dist/{warmup-Ckb1hN85.d.ts → warmup-Cs0uqxUW.d.ts} +0 -0
- /package/dist/{xstate.esm-B7FPE6br.esm.js → xstate.esm-D7D6CGwY.esm.js} +0 -0
|
@@ -0,0 +1,530 @@
|
|
|
1
|
+
import { t as Manager } from "./Manager-Bcnemkyi.js";
|
|
2
|
+
import { t as ActorRefFrom } from "./Actor-BkPcZGke.js";
|
|
3
|
+
import * as xstate735 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
|
+
/** @internal Response from GET /omni/identity-reuse/candidates */
|
|
17
|
+
type FetchCandidatesResponse = {
|
|
18
|
+
currentOrganizationName: string;
|
|
19
|
+
candidateOrganizationNames: string[];
|
|
20
|
+
};
|
|
21
|
+
/** @internal Response from POST /omni/identity-reuse/submit — shape TBD */
|
|
22
|
+
type SubmitResponse = {};
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region src/modules/identity-reuse/identityReuseStateMachine.d.ts
|
|
25
|
+
type IdentityReuseContext = {
|
|
26
|
+
config: IdentityReuseConfig;
|
|
27
|
+
currentOrganizationName: string | undefined;
|
|
28
|
+
candidateOrganizationNames: string[];
|
|
29
|
+
selectedOrganizationName: string | undefined;
|
|
30
|
+
error: string | undefined;
|
|
31
|
+
};
|
|
32
|
+
type IdentityReuseInput = {
|
|
33
|
+
config: IdentityReuseConfig;
|
|
34
|
+
};
|
|
35
|
+
declare const identityReuseMachine: xstate735.StateMachine<IdentityReuseContext, {
|
|
36
|
+
type: "LOAD";
|
|
37
|
+
} | {
|
|
38
|
+
type: "START_SELECTION";
|
|
39
|
+
} | {
|
|
40
|
+
type: "CANDIDATE_CHOSEN";
|
|
41
|
+
organizationName: string;
|
|
42
|
+
} | {
|
|
43
|
+
type: "CHANGE_CANDIDATE";
|
|
44
|
+
} | {
|
|
45
|
+
type: "SUBMIT_CANDIDATE";
|
|
46
|
+
} | {
|
|
47
|
+
type: "SKIP";
|
|
48
|
+
} | {
|
|
49
|
+
type: "RETRY";
|
|
50
|
+
}, {
|
|
51
|
+
[x: string]: xstate735.ActorRefFromLogic<xstate735.PromiseActorLogic<FetchCandidatesResponse, void, xstate735.EventObject>> | xstate735.ActorRefFromLogic<xstate735.PromiseActorLogic<SubmitResponse, void, xstate735.EventObject>> | undefined;
|
|
52
|
+
}, xstate735.Values<{
|
|
53
|
+
fetchCandidates: {
|
|
54
|
+
src: "fetchCandidates";
|
|
55
|
+
logic: xstate735.PromiseActorLogic<FetchCandidatesResponse, void, xstate735.EventObject>;
|
|
56
|
+
id: string | undefined;
|
|
57
|
+
};
|
|
58
|
+
submitContinue: {
|
|
59
|
+
src: "submitContinue";
|
|
60
|
+
logic: xstate735.PromiseActorLogic<SubmitResponse, void, xstate735.EventObject>;
|
|
61
|
+
id: string | undefined;
|
|
62
|
+
};
|
|
63
|
+
submitSkip: {
|
|
64
|
+
src: "submitSkip";
|
|
65
|
+
logic: xstate735.PromiseActorLogic<SubmitResponse, void, xstate735.EventObject>;
|
|
66
|
+
id: string | undefined;
|
|
67
|
+
};
|
|
68
|
+
}>, xstate735.Values<{
|
|
69
|
+
setError: {
|
|
70
|
+
type: "setError";
|
|
71
|
+
params: xstate735.NonReducibleUnknown;
|
|
72
|
+
};
|
|
73
|
+
clearError: {
|
|
74
|
+
type: "clearError";
|
|
75
|
+
params: xstate735.NonReducibleUnknown;
|
|
76
|
+
};
|
|
77
|
+
setCandidates: {
|
|
78
|
+
type: "setCandidates";
|
|
79
|
+
params: xstate735.NonReducibleUnknown;
|
|
80
|
+
};
|
|
81
|
+
setSelectedCandidate: {
|
|
82
|
+
type: "setSelectedCandidate";
|
|
83
|
+
params: xstate735.NonReducibleUnknown;
|
|
84
|
+
};
|
|
85
|
+
autoSelectSingleCandidate: {
|
|
86
|
+
type: "autoSelectSingleCandidate";
|
|
87
|
+
params: xstate735.NonReducibleUnknown;
|
|
88
|
+
};
|
|
89
|
+
clearSelection: {
|
|
90
|
+
type: "clearSelection";
|
|
91
|
+
params: xstate735.NonReducibleUnknown;
|
|
92
|
+
};
|
|
93
|
+
}>, xstate735.Values<{
|
|
94
|
+
hasMultipleCandidates: {
|
|
95
|
+
type: "hasMultipleCandidates";
|
|
96
|
+
params: unknown;
|
|
97
|
+
};
|
|
98
|
+
hasOneCandidate: {
|
|
99
|
+
type: "hasOneCandidate";
|
|
100
|
+
params: unknown;
|
|
101
|
+
};
|
|
102
|
+
hasChosenCandidate: {
|
|
103
|
+
type: "hasChosenCandidate";
|
|
104
|
+
params: unknown;
|
|
105
|
+
};
|
|
106
|
+
}>, never, "error" | "idle" | "finished" | "loading" | "submitContinue" | "submitSkip" | "oneCandidateFound" | "noCandidatesFound" | {
|
|
107
|
+
multiCandidatesFound: "noCandidateSelected" | "choosingCandidate" | "candidateSelected";
|
|
108
|
+
}, string, IdentityReuseInput, xstate735.NonReducibleUnknown, xstate735.EventObject, xstate735.MetaObject, {
|
|
109
|
+
readonly id: "identityReuse";
|
|
110
|
+
readonly initial: "idle";
|
|
111
|
+
readonly context: ({
|
|
112
|
+
input
|
|
113
|
+
}: {
|
|
114
|
+
spawn: {
|
|
115
|
+
<TSrc extends "fetchCandidates" | "submitContinue" | "submitSkip">(logic: TSrc, ...[options]: ({
|
|
116
|
+
src: "fetchCandidates";
|
|
117
|
+
logic: xstate735.PromiseActorLogic<FetchCandidatesResponse, void, xstate735.EventObject>;
|
|
118
|
+
id: string | undefined;
|
|
119
|
+
} extends infer T ? T extends {
|
|
120
|
+
src: "fetchCandidates";
|
|
121
|
+
logic: xstate735.PromiseActorLogic<FetchCandidatesResponse, void, xstate735.EventObject>;
|
|
122
|
+
id: string | undefined;
|
|
123
|
+
} ? T extends {
|
|
124
|
+
src: TSrc;
|
|
125
|
+
} ? xstate735.ConditionalRequired<[options?: ({
|
|
126
|
+
id?: T["id"] | undefined;
|
|
127
|
+
systemId?: string;
|
|
128
|
+
input?: xstate735.InputFrom<T["logic"]> | undefined;
|
|
129
|
+
syncSnapshot?: boolean;
|
|
130
|
+
} & { [K in xstate735.RequiredActorOptions<T>]: unknown }) | undefined], xstate735.IsNotNever<xstate735.RequiredActorOptions<T>>> : never : never : never) | ({
|
|
131
|
+
src: "submitContinue";
|
|
132
|
+
logic: xstate735.PromiseActorLogic<SubmitResponse, void, xstate735.EventObject>;
|
|
133
|
+
id: string | undefined;
|
|
134
|
+
} extends infer T_1 ? T_1 extends {
|
|
135
|
+
src: "submitContinue";
|
|
136
|
+
logic: xstate735.PromiseActorLogic<SubmitResponse, void, xstate735.EventObject>;
|
|
137
|
+
id: string | undefined;
|
|
138
|
+
} ? T_1 extends {
|
|
139
|
+
src: TSrc;
|
|
140
|
+
} ? xstate735.ConditionalRequired<[options?: ({
|
|
141
|
+
id?: T_1["id"] | undefined;
|
|
142
|
+
systemId?: string;
|
|
143
|
+
input?: xstate735.InputFrom<T_1["logic"]> | undefined;
|
|
144
|
+
syncSnapshot?: boolean;
|
|
145
|
+
} & { [K_1 in xstate735.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate735.IsNotNever<xstate735.RequiredActorOptions<T_1>>> : never : never : never) | ({
|
|
146
|
+
src: "submitSkip";
|
|
147
|
+
logic: xstate735.PromiseActorLogic<SubmitResponse, void, xstate735.EventObject>;
|
|
148
|
+
id: string | undefined;
|
|
149
|
+
} extends infer T_2 ? T_2 extends {
|
|
150
|
+
src: "submitSkip";
|
|
151
|
+
logic: xstate735.PromiseActorLogic<SubmitResponse, void, xstate735.EventObject>;
|
|
152
|
+
id: string | undefined;
|
|
153
|
+
} ? T_2 extends {
|
|
154
|
+
src: TSrc;
|
|
155
|
+
} ? xstate735.ConditionalRequired<[options?: ({
|
|
156
|
+
id?: T_2["id"] | undefined;
|
|
157
|
+
systemId?: string;
|
|
158
|
+
input?: xstate735.InputFrom<T_2["logic"]> | undefined;
|
|
159
|
+
syncSnapshot?: boolean;
|
|
160
|
+
} & { [K_2 in xstate735.RequiredActorOptions<T_2>]: unknown }) | undefined], xstate735.IsNotNever<xstate735.RequiredActorOptions<T_2>>> : never : never : never)): xstate735.ActorRefFromLogic<xstate735.GetConcreteByKey<xstate735.Values<{
|
|
161
|
+
fetchCandidates: {
|
|
162
|
+
src: "fetchCandidates";
|
|
163
|
+
logic: xstate735.PromiseActorLogic<FetchCandidatesResponse, void, xstate735.EventObject>;
|
|
164
|
+
id: string | undefined;
|
|
165
|
+
};
|
|
166
|
+
submitContinue: {
|
|
167
|
+
src: "submitContinue";
|
|
168
|
+
logic: xstate735.PromiseActorLogic<SubmitResponse, void, xstate735.EventObject>;
|
|
169
|
+
id: string | undefined;
|
|
170
|
+
};
|
|
171
|
+
submitSkip: {
|
|
172
|
+
src: "submitSkip";
|
|
173
|
+
logic: xstate735.PromiseActorLogic<SubmitResponse, void, xstate735.EventObject>;
|
|
174
|
+
id: string | undefined;
|
|
175
|
+
};
|
|
176
|
+
}>, "src", TSrc>["logic"]>;
|
|
177
|
+
<TLogic extends xstate735.AnyActorLogic>(src: TLogic, ...[options]: xstate735.ConditionalRequired<[options?: ({
|
|
178
|
+
id?: never;
|
|
179
|
+
systemId?: string;
|
|
180
|
+
input?: xstate735.InputFrom<TLogic> | undefined;
|
|
181
|
+
syncSnapshot?: boolean;
|
|
182
|
+
} & { [K in xstate735.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate735.IsNotNever<xstate735.RequiredLogicInput<TLogic>>>): xstate735.ActorRefFromLogic<TLogic>;
|
|
183
|
+
};
|
|
184
|
+
input: IdentityReuseInput;
|
|
185
|
+
self: xstate735.ActorRef<xstate735.MachineSnapshot<IdentityReuseContext, {
|
|
186
|
+
type: "LOAD";
|
|
187
|
+
} | {
|
|
188
|
+
type: "START_SELECTION";
|
|
189
|
+
} | {
|
|
190
|
+
type: "CANDIDATE_CHOSEN";
|
|
191
|
+
organizationName: string;
|
|
192
|
+
} | {
|
|
193
|
+
type: "CHANGE_CANDIDATE";
|
|
194
|
+
} | {
|
|
195
|
+
type: "SUBMIT_CANDIDATE";
|
|
196
|
+
} | {
|
|
197
|
+
type: "SKIP";
|
|
198
|
+
} | {
|
|
199
|
+
type: "RETRY";
|
|
200
|
+
}, Record<string, xstate735.AnyActorRef | undefined>, xstate735.StateValue, string, unknown, any, any>, {
|
|
201
|
+
type: "LOAD";
|
|
202
|
+
} | {
|
|
203
|
+
type: "START_SELECTION";
|
|
204
|
+
} | {
|
|
205
|
+
type: "CANDIDATE_CHOSEN";
|
|
206
|
+
organizationName: string;
|
|
207
|
+
} | {
|
|
208
|
+
type: "CHANGE_CANDIDATE";
|
|
209
|
+
} | {
|
|
210
|
+
type: "SUBMIT_CANDIDATE";
|
|
211
|
+
} | {
|
|
212
|
+
type: "SKIP";
|
|
213
|
+
} | {
|
|
214
|
+
type: "RETRY";
|
|
215
|
+
}, xstate735.AnyEventObject>;
|
|
216
|
+
}) => {
|
|
217
|
+
config: IdentityReuseConfig;
|
|
218
|
+
currentOrganizationName: undefined;
|
|
219
|
+
candidateOrganizationNames: never[];
|
|
220
|
+
selectedOrganizationName: undefined;
|
|
221
|
+
error: undefined;
|
|
222
|
+
};
|
|
223
|
+
readonly states: {
|
|
224
|
+
readonly idle: {
|
|
225
|
+
readonly on: {
|
|
226
|
+
readonly LOAD: {
|
|
227
|
+
readonly target: "loading";
|
|
228
|
+
};
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
|
+
readonly loading: {
|
|
232
|
+
readonly invoke: {
|
|
233
|
+
readonly id: "fetchCandidates";
|
|
234
|
+
readonly src: "fetchCandidates";
|
|
235
|
+
readonly onDone: readonly [{
|
|
236
|
+
readonly target: "multiCandidatesFound";
|
|
237
|
+
readonly guard: "hasMultipleCandidates";
|
|
238
|
+
readonly actions: "setCandidates";
|
|
239
|
+
}, {
|
|
240
|
+
readonly target: "oneCandidateFound";
|
|
241
|
+
readonly guard: "hasOneCandidate";
|
|
242
|
+
readonly actions: "setCandidates";
|
|
243
|
+
}, {
|
|
244
|
+
readonly target: "noCandidatesFound";
|
|
245
|
+
readonly actions: "setCandidates";
|
|
246
|
+
}];
|
|
247
|
+
readonly onError: {
|
|
248
|
+
readonly target: "error";
|
|
249
|
+
readonly actions: "setError";
|
|
250
|
+
};
|
|
251
|
+
};
|
|
252
|
+
};
|
|
253
|
+
readonly multiCandidatesFound: {
|
|
254
|
+
readonly initial: "noCandidateSelected";
|
|
255
|
+
readonly states: {
|
|
256
|
+
readonly noCandidateSelected: {
|
|
257
|
+
readonly on: {
|
|
258
|
+
readonly START_SELECTION: {
|
|
259
|
+
readonly target: "choosingCandidate";
|
|
260
|
+
};
|
|
261
|
+
};
|
|
262
|
+
};
|
|
263
|
+
readonly choosingCandidate: {
|
|
264
|
+
readonly on: {
|
|
265
|
+
readonly CANDIDATE_CHOSEN: {
|
|
266
|
+
readonly target: "candidateSelected";
|
|
267
|
+
readonly actions: "setSelectedCandidate";
|
|
268
|
+
};
|
|
269
|
+
};
|
|
270
|
+
};
|
|
271
|
+
readonly candidateSelected: {
|
|
272
|
+
readonly on: {
|
|
273
|
+
readonly CHANGE_CANDIDATE: {
|
|
274
|
+
readonly target: "choosingCandidate";
|
|
275
|
+
readonly actions: "clearSelection";
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
};
|
|
279
|
+
};
|
|
280
|
+
readonly on: {
|
|
281
|
+
readonly SUBMIT_CANDIDATE: {
|
|
282
|
+
readonly target: "submitContinue";
|
|
283
|
+
readonly guard: "hasChosenCandidate";
|
|
284
|
+
};
|
|
285
|
+
readonly SKIP: {
|
|
286
|
+
readonly target: "submitSkip";
|
|
287
|
+
};
|
|
288
|
+
};
|
|
289
|
+
};
|
|
290
|
+
readonly oneCandidateFound: {
|
|
291
|
+
readonly entry: "autoSelectSingleCandidate";
|
|
292
|
+
readonly on: {
|
|
293
|
+
readonly SUBMIT_CANDIDATE: {
|
|
294
|
+
readonly target: "submitContinue";
|
|
295
|
+
};
|
|
296
|
+
readonly SKIP: {
|
|
297
|
+
readonly target: "submitSkip";
|
|
298
|
+
};
|
|
299
|
+
};
|
|
300
|
+
};
|
|
301
|
+
readonly noCandidatesFound: {
|
|
302
|
+
readonly on: {
|
|
303
|
+
readonly SKIP: {
|
|
304
|
+
readonly target: "submitSkip";
|
|
305
|
+
};
|
|
306
|
+
};
|
|
307
|
+
};
|
|
308
|
+
readonly submitContinue: {
|
|
309
|
+
readonly invoke: {
|
|
310
|
+
readonly id: "submitContinue";
|
|
311
|
+
readonly src: "submitContinue";
|
|
312
|
+
readonly onDone: {
|
|
313
|
+
readonly target: "finished";
|
|
314
|
+
};
|
|
315
|
+
readonly onError: {
|
|
316
|
+
readonly target: "error";
|
|
317
|
+
readonly actions: "setError";
|
|
318
|
+
};
|
|
319
|
+
};
|
|
320
|
+
};
|
|
321
|
+
readonly submitSkip: {
|
|
322
|
+
readonly invoke: {
|
|
323
|
+
readonly id: "submitSkip";
|
|
324
|
+
readonly src: "submitSkip";
|
|
325
|
+
readonly onDone: {
|
|
326
|
+
readonly target: "finished";
|
|
327
|
+
};
|
|
328
|
+
readonly onError: {
|
|
329
|
+
readonly target: "error";
|
|
330
|
+
readonly actions: "setError";
|
|
331
|
+
};
|
|
332
|
+
};
|
|
333
|
+
};
|
|
334
|
+
readonly finished: {
|
|
335
|
+
readonly type: "final";
|
|
336
|
+
};
|
|
337
|
+
readonly error: {
|
|
338
|
+
readonly on: {
|
|
339
|
+
readonly RETRY: {
|
|
340
|
+
readonly target: "loading";
|
|
341
|
+
readonly actions: "clearError";
|
|
342
|
+
};
|
|
343
|
+
readonly SKIP: {
|
|
344
|
+
readonly target: "submitSkip";
|
|
345
|
+
};
|
|
346
|
+
};
|
|
347
|
+
};
|
|
348
|
+
};
|
|
349
|
+
}>;
|
|
350
|
+
type IdentityReuseMachine = typeof identityReuseMachine;
|
|
351
|
+
//#endregion
|
|
352
|
+
//#region src/modules/identity-reuse/identityReuseActor.d.ts
|
|
353
|
+
/**
|
|
354
|
+
* Options for creating an IdentityReuse actor.
|
|
355
|
+
*/
|
|
356
|
+
type CreateIdentityReuseActorOptions = {
|
|
357
|
+
/** Module configuration */
|
|
358
|
+
config: IdentityReuseConfig;
|
|
359
|
+
};
|
|
360
|
+
/**
|
|
361
|
+
* Type representing a running IdentityReuse actor.
|
|
362
|
+
*/
|
|
363
|
+
type IdentityReuseActor = ActorRefFrom<IdentityReuseMachine>;
|
|
364
|
+
//#endregion
|
|
365
|
+
//#region src/modules/identity-reuse/identityReuseManager.d.ts
|
|
366
|
+
type SelectionPhase = 'noCandidateSelected' | 'choosingCandidate' | 'candidateSelected';
|
|
367
|
+
/** IdentityReuse manager is in initial state, waiting for `load()` */
|
|
368
|
+
type IdentityReuseIdleState = {
|
|
369
|
+
status: 'idle';
|
|
370
|
+
};
|
|
371
|
+
/** Fetching candidate organizations from the backend */
|
|
372
|
+
type IdentityReuseLoadingState = {
|
|
373
|
+
status: 'loading';
|
|
374
|
+
};
|
|
375
|
+
/**
|
|
376
|
+
* Multiple candidates available — user must select one
|
|
377
|
+
* @property currentOrganizationName - The organization the user is currently onboarding into
|
|
378
|
+
* @property candidateOrganizationNames - Organizations with reusable identity data
|
|
379
|
+
* @property selectedOrganizationName - The currently chosen candidate, if any
|
|
380
|
+
* @property selectionPhase - Which child state the selection is in
|
|
381
|
+
*/
|
|
382
|
+
type IdentityReuseMultiCandidatesState = {
|
|
383
|
+
status: 'multiCandidatesFound';
|
|
384
|
+
currentOrganizationName: string;
|
|
385
|
+
candidateOrganizationNames: string[];
|
|
386
|
+
selectedOrganizationName: string | undefined;
|
|
387
|
+
selectionPhase: SelectionPhase;
|
|
388
|
+
};
|
|
389
|
+
/**
|
|
390
|
+
* Exactly one candidate found — auto-selected on entry
|
|
391
|
+
* @property currentOrganizationName - The organization the user is currently onboarding into
|
|
392
|
+
* @property selectedOrganizationName - The single candidate, auto-selected
|
|
393
|
+
*/
|
|
394
|
+
type IdentityReuseOneCandidateState = {
|
|
395
|
+
status: 'oneCandidateFound';
|
|
396
|
+
currentOrganizationName: string;
|
|
397
|
+
selectedOrganizationName: string;
|
|
398
|
+
};
|
|
399
|
+
/**
|
|
400
|
+
* No candidate organizations found
|
|
401
|
+
* @property currentOrganizationName - The organization the user is currently onboarding into
|
|
402
|
+
*/
|
|
403
|
+
type IdentityReuseNoCandidatesState = {
|
|
404
|
+
status: 'noCandidatesFound';
|
|
405
|
+
currentOrganizationName: string;
|
|
406
|
+
};
|
|
407
|
+
/** Submitting final decision (reuse: true) */
|
|
408
|
+
type IdentityReuseSubmitContinueState = {
|
|
409
|
+
status: 'submitContinue';
|
|
410
|
+
};
|
|
411
|
+
/** Submitting final decision (reuse: false) */
|
|
412
|
+
type IdentityReuseSubmitSkipState = {
|
|
413
|
+
status: 'submitSkip';
|
|
414
|
+
};
|
|
415
|
+
/** Module completed successfully */
|
|
416
|
+
type IdentityReuseFinishedState = {
|
|
417
|
+
status: 'finished';
|
|
418
|
+
};
|
|
419
|
+
/**
|
|
420
|
+
* A recoverable error occurred — user can retry or skip
|
|
421
|
+
* @property error - Error message describing what went wrong
|
|
422
|
+
*/
|
|
423
|
+
type IdentityReuseErrorState = {
|
|
424
|
+
status: 'error';
|
|
425
|
+
error: string;
|
|
426
|
+
};
|
|
427
|
+
/**
|
|
428
|
+
* Union of all possible IdentityReuse manager states.
|
|
429
|
+
*
|
|
430
|
+
* @example
|
|
431
|
+
* ```typescript
|
|
432
|
+
* const state = manager.getState();
|
|
433
|
+
* if (state.status === 'multiCandidatesFound') {
|
|
434
|
+
* console.log(state.candidateOrganizationNames);
|
|
435
|
+
* }
|
|
436
|
+
* ```
|
|
437
|
+
*/
|
|
438
|
+
type IdentityReuseState = IdentityReuseIdleState | IdentityReuseLoadingState | IdentityReuseMultiCandidatesState | IdentityReuseOneCandidateState | IdentityReuseNoCandidatesState | IdentityReuseSubmitContinueState | IdentityReuseSubmitSkipState | IdentityReuseFinishedState | IdentityReuseErrorState;
|
|
439
|
+
/**
|
|
440
|
+
* Creates an IdentityReuse manager for headless or UI-driven usage.
|
|
441
|
+
*
|
|
442
|
+
* @example Headless usage
|
|
443
|
+
* ```typescript
|
|
444
|
+
* const manager = createIdentityReuseManager({ config: {} });
|
|
445
|
+
* manager.subscribe((state) => {
|
|
446
|
+
* if (state.status === 'oneCandidateFound') manager.submitCandidate();
|
|
447
|
+
* if (state.status === 'finished') console.log('Done!');
|
|
448
|
+
* });
|
|
449
|
+
* manager.load();
|
|
450
|
+
* ```
|
|
451
|
+
*/
|
|
452
|
+
declare function createIdentityReuseManager(options: CreateIdentityReuseActorOptions): Manager<IdentityReuseState> & {
|
|
453
|
+
/**
|
|
454
|
+
* Fetches candidate organizations from the backend.
|
|
455
|
+
* Transitions from 'idle' to 'loading'.
|
|
456
|
+
*/
|
|
457
|
+
load(): void;
|
|
458
|
+
/**
|
|
459
|
+
* Begins the candidate selection process.
|
|
460
|
+
* Transitions from 'noCandidateSelected' to 'choosingCandidate'.
|
|
461
|
+
*/
|
|
462
|
+
startSelection(): void;
|
|
463
|
+
/**
|
|
464
|
+
* Chooses a candidate organization.
|
|
465
|
+
* Transitions from 'choosingCandidate' to 'candidateSelected'.
|
|
466
|
+
*/
|
|
467
|
+
chooseCandidate(organizationName: string): void;
|
|
468
|
+
/**
|
|
469
|
+
* Goes back to choosing a different candidate.
|
|
470
|
+
* Transitions from 'candidateSelected' to 'choosingCandidate'.
|
|
471
|
+
*/
|
|
472
|
+
changeCandidate(): void;
|
|
473
|
+
/**
|
|
474
|
+
* Submits the chosen candidate for processing.
|
|
475
|
+
* Guarded by having a chosen candidate.
|
|
476
|
+
*/
|
|
477
|
+
submitCandidate(): void;
|
|
478
|
+
/**
|
|
479
|
+
* Skips identity reuse and proceeds with fresh onboarding.
|
|
480
|
+
* Sends /submit with reuse: false.
|
|
481
|
+
*/
|
|
482
|
+
skip(): void;
|
|
483
|
+
/**
|
|
484
|
+
* Retries loading candidates after an error.
|
|
485
|
+
*/
|
|
486
|
+
retry(): void;
|
|
487
|
+
};
|
|
488
|
+
/**
|
|
489
|
+
* Creates an IdentityReuse manager from a pre-built actor.
|
|
490
|
+
* Use this when overriding the machine via `.provide()` for custom backends or testing.
|
|
491
|
+
*/
|
|
492
|
+
declare function createIdentityReuseManagerFromActor(actor: IdentityReuseActor): Manager<IdentityReuseState> & {
|
|
493
|
+
/**
|
|
494
|
+
* Fetches candidate organizations from the backend.
|
|
495
|
+
* Transitions from 'idle' to 'loading'.
|
|
496
|
+
*/
|
|
497
|
+
load(): void;
|
|
498
|
+
/**
|
|
499
|
+
* Begins the candidate selection process.
|
|
500
|
+
* Transitions from 'noCandidateSelected' to 'choosingCandidate'.
|
|
501
|
+
*/
|
|
502
|
+
startSelection(): void;
|
|
503
|
+
/**
|
|
504
|
+
* Chooses a candidate organization.
|
|
505
|
+
* Transitions from 'choosingCandidate' to 'candidateSelected'.
|
|
506
|
+
*/
|
|
507
|
+
chooseCandidate(organizationName: string): void;
|
|
508
|
+
/**
|
|
509
|
+
* Goes back to choosing a different candidate.
|
|
510
|
+
* Transitions from 'candidateSelected' to 'choosingCandidate'.
|
|
511
|
+
*/
|
|
512
|
+
changeCandidate(): void;
|
|
513
|
+
/**
|
|
514
|
+
* Submits the chosen candidate for processing.
|
|
515
|
+
* Guarded by having a chosen candidate.
|
|
516
|
+
*/
|
|
517
|
+
submitCandidate(): void;
|
|
518
|
+
/**
|
|
519
|
+
* Skips identity reuse and proceeds with fresh onboarding.
|
|
520
|
+
* Sends /submit with reuse: false.
|
|
521
|
+
*/
|
|
522
|
+
skip(): void;
|
|
523
|
+
/**
|
|
524
|
+
* Retries loading candidates after an error.
|
|
525
|
+
*/
|
|
526
|
+
retry(): void;
|
|
527
|
+
};
|
|
528
|
+
type IdentityReuseManager = ReturnType<typeof createIdentityReuseManager>;
|
|
529
|
+
//#endregion
|
|
530
|
+
export { type FetchCandidatesResponse, type IdentityReuseConfig, type IdentityReuseManager, type IdentityReuseState, type SubmitResponse, createIdentityReuseManager, createIdentityReuseManagerFromActor, identityReuseMachine };
|