@incodetech/core 2.0.0-rc.0 → 2.0.0

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.
Files changed (178) hide show
  1. package/package.json +3 -3
  2. package/dist/Actor-CI32dTbG.d.ts +0 -2
  3. package/dist/BaseWasmProvider-C_DLEI40.esm.js +0 -1118
  4. package/dist/BrowserStorageProvider-CuOW1Er2.esm.js +0 -55
  5. package/dist/BrowserTimerProvider-DhNc_x02.esm.js +0 -22
  6. package/dist/ITimerCapability-C67ZRskg.esm.js +0 -7
  7. package/dist/IpifyProvider-D7jx52AL.esm.js +0 -139
  8. package/dist/Manager-C8PrhBOx.d.ts +0 -19
  9. package/dist/MotionSensorProvider-4v7xkqAp.esm.js +0 -254
  10. package/dist/OpenViduRecordingProvider-CMu6XVdc.esm.js +0 -87
  11. package/dist/StateMachine-BCQrZJhf.d.ts +0 -2
  12. package/dist/WasmUtilProvider-j98OJf-S.esm.js +0 -114
  13. package/dist/addressSearch-BpTbTWCa.esm.js +0 -430
  14. package/dist/ae-signature-DDDZmWXj.esm.js +0 -12
  15. package/dist/ae-signature.d.ts +0 -25
  16. package/dist/ae-signature.esm.js +0 -8
  17. package/dist/antifraud.d.ts +0 -57
  18. package/dist/antifraud.esm.js +0 -45
  19. package/dist/antifraudStateMachine-O0TMf6yc.esm.js +0 -39
  20. package/dist/api-CESGtpbH.esm.js +0 -53
  21. package/dist/authentication.d.ts +0 -12
  22. package/dist/authentication.esm.js +0 -25
  23. package/dist/authenticationManager-5M-fKzXx.esm.js +0 -67
  24. package/dist/authenticationManager-C83GNIhl.d.ts +0 -66
  25. package/dist/authenticationStateMachine-BMZqatiF.esm.js +0 -139
  26. package/dist/backCameraStream-DMdMeGk2.esm.js +0 -346
  27. package/dist/browserSimulation-gxD8cSpM.esm.js +0 -20
  28. package/dist/camera-DBSxa6ML.d.ts +0 -4
  29. package/dist/camera-PA2Ljri3.esm.js +0 -22
  30. package/dist/camera.d.ts +0 -15
  31. package/dist/camera.esm.js +0 -5
  32. package/dist/chunk-CRF6K_H_.esm.js +0 -49
  33. package/dist/consent.d.ts +0 -398
  34. package/dist/consent.esm.js +0 -79
  35. package/dist/consentStateMachine-CCT-B60O.esm.js +0 -151
  36. package/dist/cpf-PPz2Njto.esm.js +0 -38
  37. package/dist/cpf-ocr.d.ts +0 -204
  38. package/dist/cpf-ocr.esm.js +0 -177
  39. package/dist/cross-document-data-match.d.ts +0 -34
  40. package/dist/cross-document-data-match.esm.js +0 -71
  41. package/dist/curp-validation.d.ts +0 -188
  42. package/dist/curp-validation.esm.js +0 -110
  43. package/dist/curpValidationStateMachine-CitWLr2c.esm.js +0 -595
  44. package/dist/custom-fields.d.ts +0 -115
  45. package/dist/custom-fields.esm.js +0 -177
  46. package/dist/custom-watchlist.d.ts +0 -66
  47. package/dist/custom-watchlist.esm.js +0 -86
  48. package/dist/dateUtils-UoN5xswP.esm.js +0 -23
  49. package/dist/deepsightLoader-Cm4JIT_z.esm.js +0 -52
  50. package/dist/deepsightService-CEVxzehb.d.ts +0 -412
  51. package/dist/deepsightService-O74l4Y__.esm.js +0 -489
  52. package/dist/device.d.ts +0 -46
  53. package/dist/device.esm.js +0 -106
  54. package/dist/displayErrors-DqJ_IbsG.d.ts +0 -39
  55. package/dist/document-capture.d.ts +0 -906
  56. package/dist/document-capture.esm.js +0 -156
  57. package/dist/document-upload.d.ts +0 -331
  58. package/dist/document-upload.esm.js +0 -203
  59. package/dist/documentCaptureStateMachine-BqzTDy9k.esm.js +0 -394
  60. package/dist/dynamic-forms.d.ts +0 -178
  61. package/dist/dynamic-forms.esm.js +0 -323
  62. package/dist/ekyb.d.ts +0 -148
  63. package/dist/ekyb.esm.js +0 -127
  64. package/dist/ekybStateMachine-B59rQjgj.esm.js +0 -674
  65. package/dist/ekyc.d.ts +0 -164
  66. package/dist/ekyc.esm.js +0 -104
  67. package/dist/ekycStateMachine-oeO0Iekd.esm.js +0 -10626
  68. package/dist/electronic-signature.d.ts +0 -4
  69. package/dist/electronic-signature.esm.js +0 -7
  70. package/dist/electronicSignatureManager-D9OHzTpG.esm.js +0 -428
  71. package/dist/email.d.ts +0 -4
  72. package/dist/email.esm.js +0 -9
  73. package/dist/emailManager-DIfnS5g1.d.ts +0 -352
  74. package/dist/emailManager-wAV0LE-H.esm.js +0 -238
  75. package/dist/emailStateMachine-DOf4j58N.esm.js +0 -292
  76. package/dist/endpoints-CnN3SyDa.esm.js +0 -87
  77. package/dist/events-D6-e4vok.esm.js +0 -596
  78. package/dist/events.d.ts +0 -265
  79. package/dist/events.esm.js +0 -4
  80. package/dist/extensibility.d.ts +0 -122
  81. package/dist/extensibility.esm.js +0 -43
  82. package/dist/face-match.d.ts +0 -228
  83. package/dist/face-match.esm.js +0 -173
  84. package/dist/faceCaptureManagerFactory-Dh2PdGlF.esm.js +0 -290
  85. package/dist/faceCaptureManagerFactory-yqtpxjnN.d.ts +0 -690
  86. package/dist/faceCaptureSetup-B3faSpYA.esm.js +0 -873
  87. package/dist/faceMatchStateMachine-DNFrxTFS.esm.js +0 -127
  88. package/dist/flow-events.d.ts +0 -6
  89. package/dist/flow-events.esm.js +0 -0
  90. package/dist/flow.d.ts +0 -358
  91. package/dist/flow.esm.js +0 -825
  92. package/dist/flowCompletionService-DhkT4SRY.d.ts +0 -10
  93. package/dist/flowCompletionService-P54yzGvA.esm.js +0 -13
  94. package/dist/flowServices-DTsm-Vf1.esm.js +0 -188
  95. package/dist/geolocation.d.ts +0 -127
  96. package/dist/geolocation.esm.js +0 -89
  97. package/dist/geolocationStateMachine-asasuHY2.esm.js +0 -105
  98. package/dist/getBrowser-BSXUTWXw.esm.js +0 -41
  99. package/dist/getDeviceClass-BSntT9_j.esm.js +0 -14
  100. package/dist/government-validation.d.ts +0 -67
  101. package/dist/government-validation.esm.js +0 -81
  102. package/dist/governmentValidationStateMachine-BDDYrJTo.esm.js +0 -271
  103. package/dist/home.d.ts +0 -99
  104. package/dist/home.esm.js +0 -61
  105. package/dist/http.d.ts +0 -68
  106. package/dist/http.esm.js +0 -3
  107. package/dist/id-ocr.d.ts +0 -635
  108. package/dist/id-ocr.esm.js +0 -86
  109. package/dist/id-verification.d.ts +0 -190
  110. package/dist/id-verification.esm.js +0 -43
  111. package/dist/id.d.ts +0 -24
  112. package/dist/id.esm.js +0 -164
  113. package/dist/idCaptureManager-B9TGA5dq.d.ts +0 -956
  114. package/dist/idCaptureManager-DMK0GIt3.esm.js +0 -581
  115. package/dist/idCaptureStateMachine-Bq0fVZXl.esm.js +0 -2954
  116. package/dist/idOcrStateMachine-YbjjC_Gg.esm.js +0 -388
  117. package/dist/idVerificationStateMachine-xbw9HP1Z.esm.js +0 -71
  118. package/dist/identity-reuse.d.ts +0 -530
  119. package/dist/identity-reuse.esm.js +0 -274
  120. package/dist/index-BLKtMA0g.d.ts +0 -1177
  121. package/dist/index-BcRG8rtJ.d.ts +0 -97
  122. package/dist/index.d.ts +0 -3
  123. package/dist/index.esm.js +0 -12
  124. package/dist/invokeOnCaptureCallback-rc6kBHo5.esm.js +0 -30
  125. package/dist/lib-BB0B_qQX.esm.js +0 -12499
  126. package/dist/mandatory-consent.d.ts +0 -412
  127. package/dist/mandatory-consent.esm.js +0 -78
  128. package/dist/mandatoryConsentStateMachine-Cnco1jvn.esm.js +0 -126
  129. package/dist/openviduLazy-Cm0XFh_v.esm.js +0 -3
  130. package/dist/openviduLazy-Cok70ZSg.esm.js +0 -12
  131. package/dist/permissionServices-D_i6nzEw.esm.js +0 -50
  132. package/dist/phone.d.ts +0 -4
  133. package/dist/phone.esm.js +0 -9
  134. package/dist/phoneManager-B6M30hKE.d.ts +0 -397
  135. package/dist/phoneManager-DAJbGhlY.esm.js +0 -256
  136. package/dist/phoneStateMachine-CuPARRaT.esm.js +0 -351
  137. package/dist/platform-CfrjKhmi.esm.js +0 -83
  138. package/dist/qe-signature-DFo_Cc-I.esm.js +0 -12
  139. package/dist/qe-signature.d.ts +0 -25
  140. package/dist/qe-signature.esm.js +0 -8
  141. package/dist/recordingService-Ig2UgbLv.esm.js +0 -1003
  142. package/dist/redirect-to-mobile.d.ts +0 -107
  143. package/dist/redirect-to-mobile.esm.js +0 -102
  144. package/dist/redirectToMobileStateMachine-BOEqe46A.esm.js +0 -249
  145. package/dist/runChildModule-CqqwqAkW.esm.js +0 -219
  146. package/dist/selfie.d.ts +0 -26
  147. package/dist/selfie.esm.js +0 -146
  148. package/dist/selfieManager-D0lSgd-J.d.ts +0 -68
  149. package/dist/selfieManager-Duisl7qN.esm.js +0 -60
  150. package/dist/selfieStateMachine-D76whWEf.esm.js +0 -68
  151. package/dist/session-BS-d_vuE.esm.js +0 -3206
  152. package/dist/session.d.ts +0 -217
  153. package/dist/session.esm.js +0 -9
  154. package/dist/setup-Buy-hyj4.esm.js +0 -887
  155. package/dist/setup-C5AITV8m.d.ts +0 -254
  156. package/dist/signature.d.ts +0 -94
  157. package/dist/signature.esm.js +0 -66
  158. package/dist/signatureStateMachine-B5-QVUve.esm.js +0 -132
  159. package/dist/stats-CIfiPzb1.esm.js +0 -16
  160. package/dist/stats.d.ts +0 -16
  161. package/dist/stats.esm.js +0 -4
  162. package/dist/trust-graph.d.ts +0 -54
  163. package/dist/trust-graph.esm.js +0 -56
  164. package/dist/types-B06Ypu2F.d.ts +0 -49
  165. package/dist/types-BP1m8VRw.d.ts +0 -340
  166. package/dist/types-CAD4va6a.d.ts +0 -5
  167. package/dist/types-CFV9G_7j.d.ts +0 -24
  168. package/dist/warmup-CEcppFiS.d.ts +0 -63
  169. package/dist/wasm.d.ts +0 -15
  170. package/dist/wasm.esm.js +0 -12
  171. package/dist/watchlist-for-business.d.ts +0 -79
  172. package/dist/watchlist-for-business.esm.js +0 -148
  173. package/dist/watchlist.d.ts +0 -62
  174. package/dist/watchlist.esm.js +0 -86
  175. package/dist/watchlistServices-DMbUhkBX.esm.js +0 -12
  176. package/dist/workflow.d.ts +0 -907
  177. package/dist/workflow.esm.js +0 -702
  178. package/dist/xstate.esm-B70JrNqo.esm.js +0 -3404
@@ -1,530 +0,0 @@
1
- import { t as Manager } from "./Manager-C8PrhBOx.js";
2
- import { t as ActorRefFrom } from "./Actor-CI32dTbG.js";
3
- import * as xstate826 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: xstate826.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]: xstate826.ActorRefFromLogic<xstate826.PromiseActorLogic<FetchCandidatesResponse, void, xstate826.EventObject>> | xstate826.ActorRefFromLogic<xstate826.PromiseActorLogic<SubmitResponse, void, xstate826.EventObject>> | undefined;
52
- }, xstate826.Values<{
53
- fetchCandidates: {
54
- src: "fetchCandidates";
55
- logic: xstate826.PromiseActorLogic<FetchCandidatesResponse, void, xstate826.EventObject>;
56
- id: string | undefined;
57
- };
58
- submitContinue: {
59
- src: "submitContinue";
60
- logic: xstate826.PromiseActorLogic<SubmitResponse, void, xstate826.EventObject>;
61
- id: string | undefined;
62
- };
63
- submitSkip: {
64
- src: "submitSkip";
65
- logic: xstate826.PromiseActorLogic<SubmitResponse, void, xstate826.EventObject>;
66
- id: string | undefined;
67
- };
68
- }>, xstate826.Values<{
69
- setError: {
70
- type: "setError";
71
- params: xstate826.NonReducibleUnknown;
72
- };
73
- clearError: {
74
- type: "clearError";
75
- params: xstate826.NonReducibleUnknown;
76
- };
77
- setCandidates: {
78
- type: "setCandidates";
79
- params: xstate826.NonReducibleUnknown;
80
- };
81
- setSelectedCandidate: {
82
- type: "setSelectedCandidate";
83
- params: xstate826.NonReducibleUnknown;
84
- };
85
- autoSelectSingleCandidate: {
86
- type: "autoSelectSingleCandidate";
87
- params: xstate826.NonReducibleUnknown;
88
- };
89
- clearSelection: {
90
- type: "clearSelection";
91
- params: xstate826.NonReducibleUnknown;
92
- };
93
- }>, xstate826.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, xstate826.NonReducibleUnknown, xstate826.EventObject, xstate826.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: xstate826.PromiseActorLogic<FetchCandidatesResponse, void, xstate826.EventObject>;
118
- id: string | undefined;
119
- } extends infer T ? T extends {
120
- src: "fetchCandidates";
121
- logic: xstate826.PromiseActorLogic<FetchCandidatesResponse, void, xstate826.EventObject>;
122
- id: string | undefined;
123
- } ? T extends {
124
- src: TSrc;
125
- } ? xstate826.ConditionalRequired<[options?: ({
126
- id?: T["id"] | undefined;
127
- systemId?: string;
128
- input?: xstate826.InputFrom<T["logic"]> | undefined;
129
- syncSnapshot?: boolean;
130
- } & { [K in xstate826.RequiredActorOptions<T>]: unknown }) | undefined], xstate826.IsNotNever<xstate826.RequiredActorOptions<T>>> : never : never : never) | ({
131
- src: "submitContinue";
132
- logic: xstate826.PromiseActorLogic<SubmitResponse, void, xstate826.EventObject>;
133
- id: string | undefined;
134
- } extends infer T_1 ? T_1 extends {
135
- src: "submitContinue";
136
- logic: xstate826.PromiseActorLogic<SubmitResponse, void, xstate826.EventObject>;
137
- id: string | undefined;
138
- } ? T_1 extends {
139
- src: TSrc;
140
- } ? xstate826.ConditionalRequired<[options?: ({
141
- id?: T_1["id"] | undefined;
142
- systemId?: string;
143
- input?: xstate826.InputFrom<T_1["logic"]> | undefined;
144
- syncSnapshot?: boolean;
145
- } & { [K_1 in xstate826.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate826.IsNotNever<xstate826.RequiredActorOptions<T_1>>> : never : never : never) | ({
146
- src: "submitSkip";
147
- logic: xstate826.PromiseActorLogic<SubmitResponse, void, xstate826.EventObject>;
148
- id: string | undefined;
149
- } extends infer T_2 ? T_2 extends {
150
- src: "submitSkip";
151
- logic: xstate826.PromiseActorLogic<SubmitResponse, void, xstate826.EventObject>;
152
- id: string | undefined;
153
- } ? T_2 extends {
154
- src: TSrc;
155
- } ? xstate826.ConditionalRequired<[options?: ({
156
- id?: T_2["id"] | undefined;
157
- systemId?: string;
158
- input?: xstate826.InputFrom<T_2["logic"]> | undefined;
159
- syncSnapshot?: boolean;
160
- } & { [K_2 in xstate826.RequiredActorOptions<T_2>]: unknown }) | undefined], xstate826.IsNotNever<xstate826.RequiredActorOptions<T_2>>> : never : never : never)): xstate826.ActorRefFromLogic<xstate826.GetConcreteByKey<xstate826.Values<{
161
- fetchCandidates: {
162
- src: "fetchCandidates";
163
- logic: xstate826.PromiseActorLogic<FetchCandidatesResponse, void, xstate826.EventObject>;
164
- id: string | undefined;
165
- };
166
- submitContinue: {
167
- src: "submitContinue";
168
- logic: xstate826.PromiseActorLogic<SubmitResponse, void, xstate826.EventObject>;
169
- id: string | undefined;
170
- };
171
- submitSkip: {
172
- src: "submitSkip";
173
- logic: xstate826.PromiseActorLogic<SubmitResponse, void, xstate826.EventObject>;
174
- id: string | undefined;
175
- };
176
- }>, "src", TSrc>["logic"]>;
177
- <TLogic extends xstate826.AnyActorLogic>(src: TLogic, ...[options]: xstate826.ConditionalRequired<[options?: ({
178
- id?: never;
179
- systemId?: string;
180
- input?: xstate826.InputFrom<TLogic> | undefined;
181
- syncSnapshot?: boolean;
182
- } & { [K in xstate826.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate826.IsNotNever<xstate826.RequiredLogicInput<TLogic>>>): xstate826.ActorRefFromLogic<TLogic>;
183
- };
184
- input: IdentityReuseInput;
185
- self: xstate826.ActorRef<xstate826.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, xstate826.AnyActorRef | undefined>, xstate826.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
- }, xstate826.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 };