@incodetech/core 0.0.0-dev-20260819-d97c25cd → 0.0.0-dev-20260820-6f816e8f
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/{BrowserDiagnosticsCryptoProvider-C1kB1eB6.esm.js → BrowserDiagnosticsCryptoProvider-tDCuEK44.esm.js} +1 -1
- package/dist/ae-signature.esm.js +1 -1
- package/dist/{apiError-DlY6lEte.esm.js → apiError-CxJjYnCp.esm.js} +1 -1
- package/dist/authentication.d.ts +3 -3
- package/dist/authentication.esm.js +2 -2
- package/dist/{authenticationManager-CG7g38ad.d.ts → authenticationManager-BdJ566eB.d.ts} +1 -1
- package/dist/{authenticationManager-C3Pdo3OC.esm.js → authenticationManager-CrBReplX.esm.js} +2 -2
- package/dist/{authenticationStateMachine-CpBOgS9i.esm.js → authenticationStateMachine-D_L2mpmc.esm.js} +2 -2
- package/dist/curp-validation.d.ts +1 -1
- package/dist/{curpValidationManager-DrMLHzVF.d.ts → curpValidationManager-B9kKccLg.d.ts} +1 -1
- package/dist/{deepsightLoader-Ct8Fmn7_.esm.js → deepsightLoader-Dyxhphz0.esm.js} +3 -3
- package/dist/{deepsightService-Dr7sNZ5r.d.ts → deepsightService-Cr6ns2kj.d.ts} +1 -1
- package/dist/document-capture.d.ts +2 -2
- package/dist/{documentCaptureManager-B3t0ydtg.d.ts → documentCaptureManager-DD0qtFdE.d.ts} +83 -83
- package/dist/dynamic-forms.d.ts +2 -2
- package/dist/dynamic-forms.esm.js +2 -2
- package/dist/{dynamicFormsManager-CWXstugw.esm.js → dynamicFormsManager-4tX9p_AR.esm.js} +1 -1
- package/dist/{dynamicFormsManager-DhveFHPS.d.ts → dynamicFormsManager-fhK0yINk.d.ts} +1 -1
- package/dist/{dynamicFormsStateMachine-BN5EojBS.esm.js → dynamicFormsStateMachine-CD-hCCWJ.esm.js} +1 -1
- package/dist/ekyb.d.ts +1 -1
- package/dist/ekyb.esm.js +3 -3
- package/dist/{ekybManager-CS2eKYaZ.esm.js → ekybManager-BY4LnUm4.esm.js} +1 -1
- package/dist/{ekybStateMachine-CUbUpf93.esm.js → ekybStateMachine-uSJIhzLU.esm.js} +1 -1
- package/dist/electronic-signature.esm.js +1 -1
- package/dist/{electronicSignatureManager-DAV5Qd7D.esm.js → electronicSignatureManager-Chb8QeFD.esm.js} +1 -1
- package/dist/extensibility.d.ts +14 -13
- package/dist/extensibility.esm.js +11 -10
- package/dist/{faceCaptureManagerFactory-CA_aJRiS.esm.js → faceCaptureManagerFactory-CAW9WNUz.esm.js} +1 -1
- package/dist/{faceCaptureManagerFactory-D6qnBVUw.d.ts → faceCaptureManagerFactory-Crm7rmV-.d.ts} +5 -5
- package/dist/{faceCaptureSetup-q_Csi0hg.esm.js → faceCaptureSetup-B-N5fin9.esm.js} +2 -2
- package/dist/{feature-management-Cl__Mk57.esm.js → feature-management-COvemSkM.esm.js} +1 -1
- package/dist/feature-management.esm.js +1 -1
- package/dist/flow-events.d.ts +1 -1
- package/dist/flow.d.ts +7 -7
- package/dist/flow.esm.js +3 -3
- package/dist/{flowCompletionService-B0iuFfdZ.esm.js → flowCompletionService-Brp6bkMc.esm.js} +1 -1
- package/dist/{flowServices-D6lWadVX.esm.js → flowServices-9HbZB6VW.esm.js} +4 -4
- package/dist/geolocation.esm.js +2 -2
- package/dist/{geolocationManager-CZJwhj_d.esm.js → geolocationManager-CwAF2Ycc.esm.js} +1 -1
- package/dist/{geolocationStateMachine-BOH8p4nS.esm.js → geolocationStateMachine-Clkf_lbg.esm.js} +1 -1
- package/dist/home.d.ts +1 -1
- package/dist/id-selfie-flow.d.ts +1 -1
- package/dist/id-selfie-flow.esm.js +6 -6
- package/dist/id.d.ts +3 -3
- package/dist/id.esm.js +3 -3
- package/dist/{idCaptureManager-CdJ5tIzZ.esm.js → idCaptureManager-CttWuT7D.esm.js} +2 -2
- package/dist/{idCaptureManager-CfE4iEi0.d.ts → idCaptureManager-DQEUuleg.d.ts} +4 -4
- package/dist/{idCaptureServices-DLNKi_EM.esm.js → idCaptureServices-CBiU_PlE.esm.js} +3 -3
- package/dist/{idCaptureStateMachine-C4UMP5JD.esm.js → idCaptureStateMachine-BLyOQZJn.esm.js} +8 -8
- package/dist/identity-reuse.d.ts +1 -1
- package/dist/{identityReuseManager-v2TH5g7e.d.ts → identityReuseManager-DoyR7YC5.d.ts} +4 -4
- package/dist/{index-LA6R9BLR.d.ts → index-B_-QIi8y.d.ts} +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/mandatory-consent.d.ts +2 -2
- package/dist/{mandatoryConsentManager-DbGLEuuz.d.ts → mandatoryConsentManager-CaTcQLK6.d.ts} +1 -1
- package/dist/{onDeviceFaceResults-RJnRexzw.esm.js → onDeviceFaceResults--kTy4auH.esm.js} +3 -3
- package/dist/personhood.d.ts +3 -3
- package/dist/personhood.esm.js +3 -3
- package/dist/qe-signature.esm.js +1 -1
- package/dist/{recordingService-CLsBGwrX.esm.js → recordingService-C1tQcDCc.esm.js} +1 -1
- package/dist/{runChildModule-btHrg-mD.esm.js → runChildModule-C7FLYTy_.esm.js} +1 -1
- package/dist/{sdkVersion-x6P2avb7.esm.js → sdkVersion-dtU4mowt.esm.js} +1 -1
- package/dist/selfie.d.ts +5 -5
- package/dist/selfie.esm.js +4 -4
- package/dist/{selfieManager-BNRQ9O-F.esm.js → selfieManager-CGmVvPTy.esm.js} +2 -2
- package/dist/{selfieManager-dki4G9tK.d.ts → selfieManager-D03ce0Eq.d.ts} +1 -1
- package/dist/{selfieStateMachine-BCruqTSI.esm.js → selfieStateMachine-B-VG5ona.esm.js} +2 -2
- package/dist/{session-Bgkz0Bl9.esm.js → session-BU3_u0rM.esm.js} +4 -4
- package/dist/session.d.ts +1 -1
- package/dist/session.esm.js +4 -4
- package/dist/{sessionInitializer-BWxNWUni.esm.js → sessionInitializer-BRBkV3AN.esm.js} +4 -4
- package/dist/{setup-CXsJAvBD.esm.js → setup-Bs8LIDpu.esm.js} +5 -5
- package/dist/trueSight-C-nMi8FV.esm.js +1 -0
- package/dist/{trueSightService-C8mkify_.esm.js → trueSightService-C5TjU8TL.esm.js} +2 -2
- package/dist/types-BMa0ZqAi.d.ts +6 -0
- package/dist/{types-isCyg__O.d.ts → types-B_PW_0Wq2.d.ts} +3 -3
- package/dist/{types-C6pPfQxo.d.ts → types-BaDB52_j.d.ts} +1 -1
- package/dist/{types-DelMqZLe.d.ts → types-BjSly8cp.d.ts} +1 -1
- package/dist/{types-BqezaTnP.d.ts → types-CkrawdOy.d.ts} +3 -2
- package/dist/{types-D10PIjOT.d.ts → types-R1jpOcvl.d.ts} +1 -1
- package/dist/{types-KeV54Tt6.d.ts → types-jBSE34JY.d.ts} +1 -1
- package/dist/video-selfie.d.ts +1 -1
- package/dist/video-selfie.esm.js +3 -3
- package/dist/{videoSelfieCameraWarmer-BwvCvHQQ.esm.js → videoSelfieCameraWarmer-er0qGFV9.esm.js} +2 -2
- package/dist/{videoSelfieStepDetector-tHovquP4.d.ts → videoSelfieStepDetector-g3PJIqyq.d.ts} +3 -3
- package/dist/wasm.esm.js +1 -1
- package/dist/watchlist-for-business.d.ts +2 -78
- package/dist/watchlist-for-business.esm.js +3 -102
- package/dist/watchlistForBusinessManager-Bo08PkKo.esm.js +107 -0
- package/dist/watchlistForBusinessManager-CsnJnG-C.d.ts +99 -0
- package/dist/{watchlistForBusinessStateMachine-BcBMkMvV.esm.js → watchlistForBusinessStateMachine-BAg1B4HF.esm.js} +12 -5
- package/dist/workflow.d.ts +1 -1
- package/dist/workflow.esm.js +16 -16
- package/package.json +3 -8
- package/dist/document-upload.d.ts +0 -325
- package/dist/document-upload.esm.js +0 -197
- package/dist/trueSight-CzaYWY8k.esm.js +0 -1
- package/dist/types-DQpi7nkW.d.ts +0 -6
- package/dist/types-Vb4P9ovf.d.ts +0 -22
- /package/dist/{types-BSBzhHRH2.d.ts → types-BSBzhHRH.d.ts} +0 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-DYiyoSlx.esm.js";
|
|
2
|
+
import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
|
|
3
|
+
import { c as createManager, o as createActor } from "./xstate.esm-Cf4e0Cfd.esm.js";
|
|
4
|
+
import { t as watchlistForBusinessMachine } from "./watchlistForBusinessStateMachine-BAg1B4HF.esm.js";
|
|
5
|
+
//#region src/modules/watchlist-for-business/watchlistForBusinessActor.ts
|
|
6
|
+
function createWatchlistForBusinessActor() {
|
|
7
|
+
return createActor(watchlistForBusinessMachine).start();
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region src/modules/watchlist-for-business/watchlistForBusinessManager.ts
|
|
11
|
+
/**
|
|
12
|
+
* Maps a Watchlist-for-Business state-machine snapshot to the exact Figma
|
|
13
|
+
* "Tracked Events" screen name. Source: Watchlist for Business Figma
|
|
14
|
+
* file (`https://www.figma.com/design/BfHifNPAvPTpBlnMEDfg4J/Watchlist-for-Business---Latest-Design?node-id=3031-82920`).
|
|
15
|
+
* Family is `watchlist.*`, shared with global watchlist and custom
|
|
16
|
+
* watchlist — each manager keeps its own module token per the
|
|
17
|
+
* AdSign/QSign precedent.
|
|
18
|
+
*
|
|
19
|
+
* `idle` and `finished` are intentionally unmapped — the Figma canvas does
|
|
20
|
+
* not define screens for them; `finished` collapses into `moduleClosed`.
|
|
21
|
+
*/
|
|
22
|
+
function getWatchlistForBusinessScreenName(snapshot) {
|
|
23
|
+
const stateName = topLevelStateName(snapshot.value);
|
|
24
|
+
if (stateName === void 0) return void 0;
|
|
25
|
+
switch (stateName) {
|
|
26
|
+
case "form": return snapshot.context.isValid ? "watchlist.filled" : "watchlist.default";
|
|
27
|
+
case "submitting": return "watchlist.processing";
|
|
28
|
+
case "success": return "watchlist.success";
|
|
29
|
+
default: return;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function mapState(snapshot) {
|
|
33
|
+
const typedSnapshot = snapshot;
|
|
34
|
+
const { context } = typedSnapshot;
|
|
35
|
+
if (typedSnapshot.matches("form")) return {
|
|
36
|
+
status: "form",
|
|
37
|
+
country: context.country,
|
|
38
|
+
businessName: context.businessName,
|
|
39
|
+
isValid: context.isValid,
|
|
40
|
+
validationErrors: context.validationErrors,
|
|
41
|
+
canSubmit: Object.keys(context.validationErrors ?? {}).length === 0
|
|
42
|
+
};
|
|
43
|
+
if (typedSnapshot.matches("submitting")) return { status: "submitting" };
|
|
44
|
+
if (typedSnapshot.matches("success")) return { status: "success" };
|
|
45
|
+
if (typedSnapshot.matches("finished")) return { status: "finished" };
|
|
46
|
+
return { status: "idle" };
|
|
47
|
+
}
|
|
48
|
+
function createApi({ actor, trackElementClicked }) {
|
|
49
|
+
return {
|
|
50
|
+
/** Transitions from `idle` to the form. Must be called before any other method. */
|
|
51
|
+
load() {
|
|
52
|
+
actor.send({ type: "LOAD" });
|
|
53
|
+
},
|
|
54
|
+
/** Updates the selected country code (ISO 3166-1 alpha-2). */
|
|
55
|
+
setCountry(country) {
|
|
56
|
+
actor.send({
|
|
57
|
+
type: "SET_COUNTRY",
|
|
58
|
+
country
|
|
59
|
+
});
|
|
60
|
+
},
|
|
61
|
+
/** Updates the business name field and recomputes validity. */
|
|
62
|
+
setBusinessName(value) {
|
|
63
|
+
actor.send({
|
|
64
|
+
type: "SET_BUSINESS_NAME",
|
|
65
|
+
value
|
|
66
|
+
});
|
|
67
|
+
},
|
|
68
|
+
/** Submits the form. Only transitions when `isValid` is true. */
|
|
69
|
+
submit() {
|
|
70
|
+
trackElementClicked?.("submit");
|
|
71
|
+
actor.send({ type: "SUBMIT" });
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Creates a watchlist-for-business manager for headless or UI-driven usage.
|
|
77
|
+
*
|
|
78
|
+
* On API error the module completes silently (fire-and-forget).
|
|
79
|
+
*
|
|
80
|
+
* @example Headless usage
|
|
81
|
+
* ```typescript
|
|
82
|
+
* import { createWatchlistForBusinessManager } from '@incodetech/core/watchlist-for-business';
|
|
83
|
+
*
|
|
84
|
+
* const manager = createWatchlistForBusinessManager();
|
|
85
|
+
* manager.subscribe((state) => {
|
|
86
|
+
* if (state.status === 'finished') console.log('Done');
|
|
87
|
+
* });
|
|
88
|
+
* manager.load();
|
|
89
|
+
* manager.setCountry('MX');
|
|
90
|
+
* manager.setBusinessName('Acme Corp');
|
|
91
|
+
* manager.submit();
|
|
92
|
+
* manager.stop();
|
|
93
|
+
* ```
|
|
94
|
+
*/
|
|
95
|
+
function createWatchlistForBusinessManager() {
|
|
96
|
+
return createWatchlistForBusinessManagerFromActor(createWatchlistForBusinessActor());
|
|
97
|
+
}
|
|
98
|
+
function createWatchlistForBusinessManagerFromActor(actor) {
|
|
99
|
+
return createManager({
|
|
100
|
+
actor,
|
|
101
|
+
mapState,
|
|
102
|
+
createApi,
|
|
103
|
+
instrumentation: createManagerInstrumentation(eventModuleNames.watchlistForBusiness, { getEventScreenName: getWatchlistForBusinessScreenName })
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
//#endregion
|
|
107
|
+
export { createWatchlistForBusinessManagerFromActor as n, createWatchlistForBusinessManager as t };
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { i as ActorRefFrom } from "./spawn-D9jgw9pW.js";
|
|
2
|
+
import { t as Manager } from "./Manager-CQQ99QOI.js";
|
|
3
|
+
import "./Actor-iTq7YY48.js";
|
|
4
|
+
//#region src/modules/watchlist-for-business/watchlistForBusinessStateMachine.d.ts
|
|
5
|
+
declare const watchlistForBusinessMachine: any;
|
|
6
|
+
type WatchlistForBusinessMachine = typeof watchlistForBusinessMachine;
|
|
7
|
+
//#endregion
|
|
8
|
+
//#region src/modules/watchlist-for-business/watchlistForBusinessActor.d.ts
|
|
9
|
+
type WatchlistForBusinessActor = ActorRefFrom<WatchlistForBusinessMachine>;
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region src/modules/watchlist-for-business/types.d.ts
|
|
12
|
+
/**
|
|
13
|
+
* Configuration for the watchlist-for-business module.
|
|
14
|
+
*
|
|
15
|
+
* No server-side configuration is required — the module collects
|
|
16
|
+
* country and business name from the user and submits them to the
|
|
17
|
+
* business watchlist endpoint.
|
|
18
|
+
*/
|
|
19
|
+
type WatchlistForBusinessConfig = Record<string, never>;
|
|
20
|
+
type WatchlistForBusinessValidationErrors = {
|
|
21
|
+
businessName?: string;
|
|
22
|
+
};
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region src/modules/watchlist-for-business/watchlistForBusinessManager.d.ts
|
|
25
|
+
/** Waiting for `load()` to be called. */
|
|
26
|
+
type WatchlistForBusinessIdleState = {
|
|
27
|
+
status: 'idle';
|
|
28
|
+
};
|
|
29
|
+
/** Form is ready — use `setCountry()`, `setBusinessName()`, and `submit()`. */
|
|
30
|
+
type WatchlistForBusinessFormState = {
|
|
31
|
+
status: 'form';
|
|
32
|
+
country: string;
|
|
33
|
+
businessName: string;
|
|
34
|
+
isValid: boolean;
|
|
35
|
+
validationErrors?: WatchlistForBusinessValidationErrors;
|
|
36
|
+
canSubmit: boolean;
|
|
37
|
+
};
|
|
38
|
+
/** API request in flight. */
|
|
39
|
+
type WatchlistForBusinessSubmittingState = {
|
|
40
|
+
status: 'submitting';
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* API succeeded — success screen visible for ~3 s before transitioning
|
|
44
|
+
* to `finished`.
|
|
45
|
+
*/
|
|
46
|
+
type WatchlistForBusinessSuccessState = {
|
|
47
|
+
status: 'success';
|
|
48
|
+
};
|
|
49
|
+
/** Module complete. Fires regardless of API outcome (fire-and-forget). */
|
|
50
|
+
type WatchlistForBusinessFinishedState = {
|
|
51
|
+
status: 'finished';
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Discriminated union of all possible watchlist-for-business manager states.
|
|
55
|
+
*/
|
|
56
|
+
type WatchlistForBusinessState = WatchlistForBusinessIdleState | WatchlistForBusinessFormState | WatchlistForBusinessSubmittingState | WatchlistForBusinessSuccessState | WatchlistForBusinessFinishedState;
|
|
57
|
+
/**
|
|
58
|
+
* Creates a watchlist-for-business manager for headless or UI-driven usage.
|
|
59
|
+
*
|
|
60
|
+
* On API error the module completes silently (fire-and-forget).
|
|
61
|
+
*
|
|
62
|
+
* @example Headless usage
|
|
63
|
+
* ```typescript
|
|
64
|
+
* import { createWatchlistForBusinessManager } from '@incodetech/core/watchlist-for-business';
|
|
65
|
+
*
|
|
66
|
+
* const manager = createWatchlistForBusinessManager();
|
|
67
|
+
* manager.subscribe((state) => {
|
|
68
|
+
* if (state.status === 'finished') console.log('Done');
|
|
69
|
+
* });
|
|
70
|
+
* manager.load();
|
|
71
|
+
* manager.setCountry('MX');
|
|
72
|
+
* manager.setBusinessName('Acme Corp');
|
|
73
|
+
* manager.submit();
|
|
74
|
+
* manager.stop();
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
declare function createWatchlistForBusinessManager(): Manager<WatchlistForBusinessState> & {
|
|
78
|
+
/** Transitions from `idle` to the form. Must be called before any other method. */
|
|
79
|
+
load(): void;
|
|
80
|
+
/** Updates the selected country code (ISO 3166-1 alpha-2). */
|
|
81
|
+
setCountry(country: string): void;
|
|
82
|
+
/** Updates the business name field and recomputes validity. */
|
|
83
|
+
setBusinessName(value: string): void;
|
|
84
|
+
/** Submits the form. Only transitions when `isValid` is true. */
|
|
85
|
+
submit(): void;
|
|
86
|
+
};
|
|
87
|
+
declare function createWatchlistForBusinessManagerFromActor(actor: WatchlistForBusinessActor): Manager<WatchlistForBusinessState> & {
|
|
88
|
+
/** Transitions from `idle` to the form. Must be called before any other method. */
|
|
89
|
+
load(): void;
|
|
90
|
+
/** Updates the selected country code (ISO 3166-1 alpha-2). */
|
|
91
|
+
setCountry(country: string): void;
|
|
92
|
+
/** Updates the business name field and recomputes validity. */
|
|
93
|
+
setBusinessName(value: string): void;
|
|
94
|
+
/** Submits the form. Only transitions when `isValid` is true. */
|
|
95
|
+
submit(): void;
|
|
96
|
+
};
|
|
97
|
+
type WatchlistForBusinessManager = ReturnType<typeof createWatchlistForBusinessManager>;
|
|
98
|
+
//#endregion
|
|
99
|
+
export { createWatchlistForBusinessManager as a, WatchlistForBusinessValidationErrors as c, WatchlistForBusinessState as i, WatchlistForBusinessActor as l, WatchlistForBusinessFormState as n, createWatchlistForBusinessManagerFromActor as o, WatchlistForBusinessManager as r, WatchlistForBusinessConfig as s, WatchlistForBusinessFinishedState as t, watchlistForBusinessMachine as u };
|
|
@@ -14,6 +14,7 @@ const DEFAULT_COUNTRY = "US";
|
|
|
14
14
|
function computeIsValid(businessName) {
|
|
15
15
|
return businessName.trim().length > 0;
|
|
16
16
|
}
|
|
17
|
+
const BUSINESS_NAME_REQUIRED_ERROR = "dynamicForms.fieldRequired";
|
|
17
18
|
const watchlistForBusinessMachine = setup({
|
|
18
19
|
types: {
|
|
19
20
|
context: {},
|
|
@@ -33,7 +34,12 @@ const watchlistForBusinessMachine = setup({
|
|
|
33
34
|
businessName: value,
|
|
34
35
|
isValid: computeIsValid(value)
|
|
35
36
|
};
|
|
36
|
-
})
|
|
37
|
+
}),
|
|
38
|
+
clearBusinessNameValidationError: assign(({ context, event }) => {
|
|
39
|
+
if (event.type !== "SET_BUSINESS_NAME" || !context.validationErrors?.businessName) return {};
|
|
40
|
+
return { validationErrors: void 0 };
|
|
41
|
+
}),
|
|
42
|
+
setValidationErrors: assign(({ context }) => ({ validationErrors: computeIsValid(context.businessName) ? void 0 : { businessName: BUSINESS_NAME_REQUIRED_ERROR } }))
|
|
37
43
|
},
|
|
38
44
|
guards: { isValid: ({ context }) => context.isValid }
|
|
39
45
|
}).createMachine({
|
|
@@ -42,17 +48,18 @@ const watchlistForBusinessMachine = setup({
|
|
|
42
48
|
context: {
|
|
43
49
|
country: DEFAULT_COUNTRY,
|
|
44
50
|
businessName: "",
|
|
45
|
-
isValid: false
|
|
51
|
+
isValid: false,
|
|
52
|
+
validationErrors: void 0
|
|
46
53
|
},
|
|
47
54
|
states: {
|
|
48
55
|
idle: { on: { LOAD: { target: "form" } } },
|
|
49
56
|
form: { on: {
|
|
50
57
|
SET_COUNTRY: { actions: "setCountry" },
|
|
51
|
-
SET_BUSINESS_NAME: { actions: "setBusinessName" },
|
|
52
|
-
SUBMIT: {
|
|
58
|
+
SET_BUSINESS_NAME: { actions: ["setBusinessName", "clearBusinessNameValidationError"] },
|
|
59
|
+
SUBMIT: [{
|
|
53
60
|
target: "submitting",
|
|
54
61
|
guard: "isValid"
|
|
55
|
-
}
|
|
62
|
+
}, { actions: "setValidationErrors" }]
|
|
56
63
|
} },
|
|
57
64
|
submitting: { invoke: {
|
|
58
65
|
id: "submitWatchlistForBusiness",
|
package/dist/workflow.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { t as CallbackActorLogic } from "./callback-645_omgz.js";
|
|
|
3
3
|
import "./StateMachine-EDpYWy0i.js";
|
|
4
4
|
import { t as Manager } from "./Manager-CQQ99QOI.js";
|
|
5
5
|
import { a as TotalScore, i as GetTotalScoreStatusFn, n as FinishStatus, r as GetFinishStatusFn } from "./flowCompletionService-BlAHsKyv.js";
|
|
6
|
-
import { o as FlowEventSubscribable } from "./index-
|
|
6
|
+
import { o as FlowEventSubscribable } from "./index-B_-QIi8y.js";
|
|
7
7
|
import { a as WorkflowModuleRegistry, i as RunChildModuleInput, r as RunChildModuleEvent, t as ModuleConfigMappers } from "./types-BfgmV7s7.js";
|
|
8
8
|
//#region src/modules/workflow/types.d.ts
|
|
9
9
|
/** Possible node types returned by the workflow server. */
|
package/dist/workflow.esm.js
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import { E as updateFeatureManagementUser } from "./feature-management-
|
|
1
|
+
import { E as updateFeatureManagementUser } from "./feature-management-COvemSkM.esm.js";
|
|
2
2
|
import { t as api } from "./api-Bx3gKW_y.esm.js";
|
|
3
|
-
import { l as trueSightLog } from "./trueSightService-
|
|
3
|
+
import { l as trueSightLog } from "./trueSightService-C5TjU8TL.esm.js";
|
|
4
4
|
import { n as eventModuleNames, o as createManagerInstrumentation, v as addEvent } from "./events-DYiyoSlx.esm.js";
|
|
5
|
-
import { i as initializeSession, r as getSessionFingerprintResult } from "./sessionInitializer-
|
|
5
|
+
import { i as initializeSession, r as getSessionFingerprintResult } from "./sessionInitializer-BRBkV3AN.esm.js";
|
|
6
6
|
import { t as endpoints } from "./endpoints-CCzL3XD_.esm.js";
|
|
7
|
-
import "./trueSight-
|
|
8
|
-
import { r as toIncodeApiError } from "./apiError-
|
|
9
|
-
import { g as toEkybConfig } from "./flowServices-
|
|
7
|
+
import "./trueSight-C-nMi8FV.esm.js";
|
|
8
|
+
import { r as toIncodeApiError } from "./apiError-CxJjYnCp.esm.js";
|
|
9
|
+
import { g as toEkybConfig } from "./flowServices-9HbZB6VW.esm.js";
|
|
10
10
|
import { i as toEkycConfig } from "./ekycUtils-Dew1rBG0.esm.js";
|
|
11
11
|
import { c as createManager, o as createActor, r as assign, t as setup } from "./xstate.esm-Cf4e0Cfd.esm.js";
|
|
12
12
|
import { n as fromPromise } from "./xstate-actors.esm-CtI5S0f4.esm.js";
|
|
13
|
-
import { r as electronicSignatureMachine } from "./electronicSignatureManager-
|
|
13
|
+
import { r as electronicSignatureMachine } from "./electronicSignatureManager-Chb8QeFD.esm.js";
|
|
14
14
|
import "./ae-signature.esm.js";
|
|
15
15
|
import { t as antifraudMachine } from "./antifraudStateMachine-r4VxSBS4.esm.js";
|
|
16
|
-
import { t as authenticationMachine } from "./authenticationStateMachine-
|
|
16
|
+
import { t as authenticationMachine } from "./authenticationStateMachine-D_L2mpmc.esm.js";
|
|
17
17
|
import { t as certificateIssuanceMachine } from "./certificateIssuanceStateMachine-COd7_l2T.esm.js";
|
|
18
18
|
import { t as consentMachine } from "./consentStateMachine-WD-S-Yhs.esm.js";
|
|
19
19
|
import { t as curpValidationMachine } from "./curpValidationStateMachine-9KwnqeoB.esm.js";
|
|
20
20
|
import { t as customWatchlistMachine } from "./customWatchlistStateMachine-B_ey3TFj.esm.js";
|
|
21
21
|
import { t as documentCaptureMachine } from "./documentCaptureStateMachine-CBHmgyM7.esm.js";
|
|
22
|
-
import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-
|
|
23
|
-
import { t as ekybMachine } from "./ekybStateMachine-
|
|
22
|
+
import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-CD-hCCWJ.esm.js";
|
|
23
|
+
import { t as ekybMachine } from "./ekybStateMachine-uSJIhzLU.esm.js";
|
|
24
24
|
import { t as ekycMachine } from "./ekycStateMachine-DHvksnrr.esm.js";
|
|
25
25
|
import { t as emailMachine } from "./emailStateMachine-Bm894MHB.esm.js";
|
|
26
|
-
import { t as selfieMachine } from "./selfieStateMachine-
|
|
27
|
-
import { t as idCaptureMachine } from "./idCaptureStateMachine-
|
|
26
|
+
import { t as selfieMachine } from "./selfieStateMachine-B-VG5ona.esm.js";
|
|
27
|
+
import { t as idCaptureMachine } from "./idCaptureStateMachine-BLyOQZJn.esm.js";
|
|
28
28
|
import { t as phoneMachine } from "./phoneStateMachine-E1fUUcNM.esm.js";
|
|
29
29
|
import { t as watchlistMachine } from "./watchlistStateMachine-Bl7Wy9Cm.esm.js";
|
|
30
|
+
import { t as watchlistForBusinessMachine } from "./watchlistForBusinessStateMachine-BAg1B4HF.esm.js";
|
|
30
31
|
import { n as identityReuseMachine } from "./identityReuseStateMachine-AubRPhIi.esm.js";
|
|
31
32
|
import { t as mandatoryConsentMachine } from "./mandatoryConsentStateMachine-zroQGzwb.esm.js";
|
|
32
33
|
import { t as idOcrStateMachine } from "./idOcrStateMachine-Bq_e3l4E.esm.js";
|
|
33
34
|
import { n as redirectToMobileMachine } from "./redirectToMobileStateMachine-C9SYCJcH.esm.js";
|
|
34
35
|
import { t as signatureMachine } from "./signatureStateMachine-Cf73DGWO.esm.js";
|
|
35
|
-
import { t as geolocationMachine } from "./geolocationStateMachine-
|
|
36
|
+
import { t as geolocationMachine } from "./geolocationStateMachine-Clkf_lbg.esm.js";
|
|
36
37
|
import { t as governmentValidationMachine } from "./governmentValidationStateMachine-CNzJ5UQb.esm.js";
|
|
37
38
|
import { t as idVerificationMachine } from "./idVerificationStateMachine-GEQWUPU2.esm.js";
|
|
38
39
|
import { t as faceMatchMachine } from "./faceMatchStateMachine-CJiO2yLO.esm.js";
|
|
39
|
-
import { n as getFinishStatus, r as getTotalScoreStatus } from "./flowCompletionService-
|
|
40
|
-
import { n as isAdvanceableError, r as attachFlowEventEmitter, t as runChildModule } from "./runChildModule-
|
|
40
|
+
import { n as getFinishStatus, r as getTotalScoreStatus } from "./flowCompletionService-Brp6bkMc.esm.js";
|
|
41
|
+
import { n as isAdvanceableError, r as attachFlowEventEmitter, t as runChildModule } from "./runChildModule-C7FLYTy_.esm.js";
|
|
41
42
|
import "./qe-signature.esm.js";
|
|
42
|
-
import { t as watchlistForBusinessMachine } from "./watchlistForBusinessStateMachine-BcBMkMvV.esm.js";
|
|
43
43
|
//#region src/internal/orchestration/defaultModules.ts
|
|
44
44
|
/**
|
|
45
45
|
* Shared default module registry — single source of truth for module key → machine mappings.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@incodetech/core",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20260820-6f816e8f",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -140,11 +140,6 @@
|
|
|
140
140
|
"types": "./dist/home.d.ts",
|
|
141
141
|
"import": "./dist/home.esm.js"
|
|
142
142
|
},
|
|
143
|
-
"./document-upload": {
|
|
144
|
-
"source": "./src/modules/document-upload/index.ts",
|
|
145
|
-
"types": "./dist/document-upload.d.ts",
|
|
146
|
-
"import": "./dist/document-upload.esm.js"
|
|
147
|
-
},
|
|
148
143
|
"./document-capture": {
|
|
149
144
|
"source": "./src/modules/document-capture/index.ts",
|
|
150
145
|
"types": "./dist/document-capture.d.ts",
|
|
@@ -282,8 +277,8 @@
|
|
|
282
277
|
"tsdown": "^0.22.8",
|
|
283
278
|
"typescript": "^5.9.3",
|
|
284
279
|
"vitest": "4.1.10",
|
|
285
|
-
"@incodetech/
|
|
286
|
-
"@incodetech/
|
|
280
|
+
"@incodetech/config": "1.0.2",
|
|
281
|
+
"@incodetech/infra": "1.2.1"
|
|
287
282
|
},
|
|
288
283
|
"scripts": {
|
|
289
284
|
"build": "tsdown -c tsdown.config.ts",
|
|
@@ -1,325 +0,0 @@
|
|
|
1
|
-
import { A as StateMachine, C as StateValue, D as PromiseActorLogic, a as ActorRefFromLogic, b as RequiredActorOptions, c as AnyEventObject, g as IsNotNever, h as InputFrom, k as MachineSnapshot, m as GetConcreteByKey, o as AnyActorLogic, p as EventObject, r as ActorRef, s as AnyActorRef, u as ConditionalRequired, v as MetaObject, w as Values, x as RequiredLogicInput, y as NonReducibleUnknown } from "./spawn-D9jgw9pW.js";
|
|
2
|
-
import "./StateMachine-EDpYWy0i.js";
|
|
3
|
-
import { t as Manager } from "./Manager-CQQ99QOI.js";
|
|
4
|
-
import "./Actor-iTq7YY48.js";
|
|
5
|
-
import { n as DocumentUploadContext, r as DocumentUploadInput, t as DocumentUploadConfig } from "./types-Vb4P9ovf.js";
|
|
6
|
-
//#region src/modules/document-upload/documentUploadStateMachine.d.ts
|
|
7
|
-
declare const documentUploadMachine: StateMachine<DocumentUploadContext, {
|
|
8
|
-
type: "START";
|
|
9
|
-
} | {
|
|
10
|
-
type: "CAPTURE";
|
|
11
|
-
imageBase64: string;
|
|
12
|
-
} | {
|
|
13
|
-
type: "UPLOAD_PROGRESS";
|
|
14
|
-
progress: number;
|
|
15
|
-
} | {
|
|
16
|
-
type: "RETRY";
|
|
17
|
-
} | {
|
|
18
|
-
type: "CLOSE";
|
|
19
|
-
}, {
|
|
20
|
-
[x: string]: ActorRefFromLogic<PromiseActorLogic<void, {
|
|
21
|
-
imageBase64: string;
|
|
22
|
-
documentType: string;
|
|
23
|
-
onProgress: (progress: number) => void;
|
|
24
|
-
}, EventObject>> | ActorRefFromLogic<PromiseActorLogic<MediaStream, void, EventObject>> | undefined;
|
|
25
|
-
}, Values<{
|
|
26
|
-
uploadDocument: {
|
|
27
|
-
src: "uploadDocument";
|
|
28
|
-
logic: PromiseActorLogic<void, {
|
|
29
|
-
imageBase64: string;
|
|
30
|
-
documentType: string;
|
|
31
|
-
onProgress: (progress: number) => void;
|
|
32
|
-
}, EventObject>;
|
|
33
|
-
id: string | undefined;
|
|
34
|
-
};
|
|
35
|
-
initCamera: {
|
|
36
|
-
src: "initCamera";
|
|
37
|
-
logic: PromiseActorLogic<MediaStream, void, EventObject>;
|
|
38
|
-
id: string | undefined;
|
|
39
|
-
};
|
|
40
|
-
}>, Values<{
|
|
41
|
-
setStream: {
|
|
42
|
-
type: "setStream";
|
|
43
|
-
params: NonReducibleUnknown;
|
|
44
|
-
};
|
|
45
|
-
setImageAndClearError: {
|
|
46
|
-
type: "setImageAndClearError";
|
|
47
|
-
params: NonReducibleUnknown;
|
|
48
|
-
};
|
|
49
|
-
setProgress: {
|
|
50
|
-
type: "setProgress";
|
|
51
|
-
params: NonReducibleUnknown;
|
|
52
|
-
};
|
|
53
|
-
setError: {
|
|
54
|
-
type: "setError";
|
|
55
|
-
params: NonReducibleUnknown;
|
|
56
|
-
};
|
|
57
|
-
clearError: {
|
|
58
|
-
type: "clearError";
|
|
59
|
-
params: NonReducibleUnknown;
|
|
60
|
-
};
|
|
61
|
-
stopStream: {
|
|
62
|
-
type: "stopStream";
|
|
63
|
-
params: NonReducibleUnknown;
|
|
64
|
-
};
|
|
65
|
-
}>, never, never, "error" | "idle" | "uploading" | "closed" | "finished" | "initCamera" | "capturing", string, DocumentUploadInput, NonReducibleUnknown, EventObject, MetaObject, {
|
|
66
|
-
readonly id: "documentUpload";
|
|
67
|
-
readonly initial: "idle";
|
|
68
|
-
readonly context: ({ input }: {
|
|
69
|
-
spawn: {
|
|
70
|
-
<TSrc extends "uploadDocument" | "initCamera">(logic: TSrc, ...[options]: ({
|
|
71
|
-
src: "uploadDocument";
|
|
72
|
-
logic: PromiseActorLogic<void, {
|
|
73
|
-
imageBase64: string;
|
|
74
|
-
documentType: string;
|
|
75
|
-
onProgress: (progress: number) => void;
|
|
76
|
-
}, EventObject>;
|
|
77
|
-
id: string | undefined;
|
|
78
|
-
} extends (infer T) ? T extends {
|
|
79
|
-
src: "uploadDocument";
|
|
80
|
-
logic: PromiseActorLogic<void, {
|
|
81
|
-
imageBase64: string;
|
|
82
|
-
documentType: string;
|
|
83
|
-
onProgress: (progress: number) => void;
|
|
84
|
-
}, EventObject>;
|
|
85
|
-
id: string | undefined;
|
|
86
|
-
} ? T extends {
|
|
87
|
-
src: TSrc;
|
|
88
|
-
} ? ConditionalRequired<[options?: ({
|
|
89
|
-
id?: T["id"] | undefined;
|
|
90
|
-
systemId?: string;
|
|
91
|
-
input?: InputFrom<T["logic"]> | undefined;
|
|
92
|
-
syncSnapshot?: boolean;
|
|
93
|
-
} & { [K in RequiredActorOptions<T>]: unknown; }) | undefined], IsNotNever<RequiredActorOptions<T>>> : never : never : never) | ({
|
|
94
|
-
src: "initCamera";
|
|
95
|
-
logic: PromiseActorLogic<MediaStream, void, EventObject>;
|
|
96
|
-
id: string | undefined;
|
|
97
|
-
} extends (infer T_1) ? T_1 extends {
|
|
98
|
-
src: "initCamera";
|
|
99
|
-
logic: PromiseActorLogic<MediaStream, void, EventObject>;
|
|
100
|
-
id: string | undefined;
|
|
101
|
-
} ? T_1 extends {
|
|
102
|
-
src: TSrc;
|
|
103
|
-
} ? ConditionalRequired<[options?: ({
|
|
104
|
-
id?: T_1["id"] | undefined;
|
|
105
|
-
systemId?: string;
|
|
106
|
-
input?: InputFrom<T_1["logic"]> | undefined;
|
|
107
|
-
syncSnapshot?: boolean;
|
|
108
|
-
} & { [K_1 in RequiredActorOptions<T_1>]: unknown; }) | undefined], IsNotNever<RequiredActorOptions<T_1>>> : never : never : never)): ActorRefFromLogic<GetConcreteByKey<Values<{
|
|
109
|
-
uploadDocument: {
|
|
110
|
-
src: "uploadDocument";
|
|
111
|
-
logic: PromiseActorLogic<void, {
|
|
112
|
-
imageBase64: string;
|
|
113
|
-
documentType: string;
|
|
114
|
-
onProgress: (progress: number) => void;
|
|
115
|
-
}, EventObject>;
|
|
116
|
-
id: string | undefined;
|
|
117
|
-
};
|
|
118
|
-
initCamera: {
|
|
119
|
-
src: "initCamera";
|
|
120
|
-
logic: PromiseActorLogic<MediaStream, void, EventObject>;
|
|
121
|
-
id: string | undefined;
|
|
122
|
-
};
|
|
123
|
-
}>, "src", TSrc>["logic"]>;
|
|
124
|
-
<TLogic extends AnyActorLogic>(src: TLogic, ...[options]: ConditionalRequired<[options?: ({
|
|
125
|
-
id?: never;
|
|
126
|
-
systemId?: string;
|
|
127
|
-
input?: InputFrom<TLogic> | undefined;
|
|
128
|
-
syncSnapshot?: boolean;
|
|
129
|
-
} & { [K in RequiredLogicInput<TLogic>]: unknown; }) | undefined], IsNotNever<RequiredLogicInput<TLogic>>>): ActorRefFromLogic<TLogic>;
|
|
130
|
-
};
|
|
131
|
-
input: DocumentUploadInput;
|
|
132
|
-
self: ActorRef<MachineSnapshot<DocumentUploadContext, {
|
|
133
|
-
type: "START";
|
|
134
|
-
} | {
|
|
135
|
-
type: "CAPTURE";
|
|
136
|
-
imageBase64: string;
|
|
137
|
-
} | {
|
|
138
|
-
type: "UPLOAD_PROGRESS";
|
|
139
|
-
progress: number;
|
|
140
|
-
} | {
|
|
141
|
-
type: "RETRY";
|
|
142
|
-
} | {
|
|
143
|
-
type: "CLOSE";
|
|
144
|
-
}, Record<string, AnyActorRef | undefined>, StateValue, string, unknown, any, any>, {
|
|
145
|
-
type: "START";
|
|
146
|
-
} | {
|
|
147
|
-
type: "CAPTURE";
|
|
148
|
-
imageBase64: string;
|
|
149
|
-
} | {
|
|
150
|
-
type: "UPLOAD_PROGRESS";
|
|
151
|
-
progress: number;
|
|
152
|
-
} | {
|
|
153
|
-
type: "RETRY";
|
|
154
|
-
} | {
|
|
155
|
-
type: "CLOSE";
|
|
156
|
-
}, AnyEventObject>;
|
|
157
|
-
}) => {
|
|
158
|
-
config: DocumentUploadConfig;
|
|
159
|
-
stream: undefined;
|
|
160
|
-
imageBase64: undefined;
|
|
161
|
-
progress: number;
|
|
162
|
-
error: undefined;
|
|
163
|
-
};
|
|
164
|
-
readonly states: {
|
|
165
|
-
readonly idle: {
|
|
166
|
-
readonly on: {
|
|
167
|
-
readonly START: {
|
|
168
|
-
readonly target: "initCamera";
|
|
169
|
-
};
|
|
170
|
-
};
|
|
171
|
-
};
|
|
172
|
-
readonly initCamera: {
|
|
173
|
-
readonly invoke: {
|
|
174
|
-
readonly id: "initCamera";
|
|
175
|
-
readonly src: "initCamera";
|
|
176
|
-
readonly input: undefined;
|
|
177
|
-
readonly onDone: {
|
|
178
|
-
readonly target: "capturing";
|
|
179
|
-
readonly actions: "setStream";
|
|
180
|
-
};
|
|
181
|
-
readonly onError: {
|
|
182
|
-
readonly target: "error";
|
|
183
|
-
readonly actions: "setError";
|
|
184
|
-
};
|
|
185
|
-
};
|
|
186
|
-
readonly on: {
|
|
187
|
-
readonly CLOSE: {
|
|
188
|
-
readonly target: "closed";
|
|
189
|
-
};
|
|
190
|
-
};
|
|
191
|
-
};
|
|
192
|
-
readonly capturing: {
|
|
193
|
-
readonly on: {
|
|
194
|
-
readonly CAPTURE: {
|
|
195
|
-
readonly target: "uploading";
|
|
196
|
-
readonly actions: "setImageAndClearError";
|
|
197
|
-
};
|
|
198
|
-
readonly CLOSE: {
|
|
199
|
-
readonly target: "closed";
|
|
200
|
-
readonly actions: "stopStream";
|
|
201
|
-
};
|
|
202
|
-
};
|
|
203
|
-
};
|
|
204
|
-
readonly uploading: {
|
|
205
|
-
readonly invoke: {
|
|
206
|
-
readonly id: "uploadDocument";
|
|
207
|
-
readonly src: "uploadDocument";
|
|
208
|
-
readonly input: ({ context, self }: {
|
|
209
|
-
context: DocumentUploadContext;
|
|
210
|
-
event: {
|
|
211
|
-
type: "START";
|
|
212
|
-
} | {
|
|
213
|
-
type: "CAPTURE";
|
|
214
|
-
imageBase64: string;
|
|
215
|
-
} | {
|
|
216
|
-
type: "UPLOAD_PROGRESS";
|
|
217
|
-
progress: number;
|
|
218
|
-
} | {
|
|
219
|
-
type: "RETRY";
|
|
220
|
-
} | {
|
|
221
|
-
type: "CLOSE";
|
|
222
|
-
};
|
|
223
|
-
self: ActorRef<MachineSnapshot<DocumentUploadContext, {
|
|
224
|
-
type: "START";
|
|
225
|
-
} | {
|
|
226
|
-
type: "CAPTURE";
|
|
227
|
-
imageBase64: string;
|
|
228
|
-
} | {
|
|
229
|
-
type: "UPLOAD_PROGRESS";
|
|
230
|
-
progress: number;
|
|
231
|
-
} | {
|
|
232
|
-
type: "RETRY";
|
|
233
|
-
} | {
|
|
234
|
-
type: "CLOSE";
|
|
235
|
-
}, Record<string, AnyActorRef>, StateValue, string, unknown, any, any>, {
|
|
236
|
-
type: "START";
|
|
237
|
-
} | {
|
|
238
|
-
type: "CAPTURE";
|
|
239
|
-
imageBase64: string;
|
|
240
|
-
} | {
|
|
241
|
-
type: "UPLOAD_PROGRESS";
|
|
242
|
-
progress: number;
|
|
243
|
-
} | {
|
|
244
|
-
type: "RETRY";
|
|
245
|
-
} | {
|
|
246
|
-
type: "CLOSE";
|
|
247
|
-
}, AnyEventObject>;
|
|
248
|
-
}) => {
|
|
249
|
-
imageBase64: string;
|
|
250
|
-
documentType: string;
|
|
251
|
-
onProgress: (progress: number) => void;
|
|
252
|
-
};
|
|
253
|
-
readonly onDone: {
|
|
254
|
-
readonly target: "finished";
|
|
255
|
-
readonly actions: "stopStream";
|
|
256
|
-
};
|
|
257
|
-
readonly onError: {
|
|
258
|
-
readonly target: "error";
|
|
259
|
-
readonly actions: readonly ["setError", "stopStream"];
|
|
260
|
-
};
|
|
261
|
-
};
|
|
262
|
-
readonly on: {
|
|
263
|
-
readonly UPLOAD_PROGRESS: {
|
|
264
|
-
readonly actions: "setProgress";
|
|
265
|
-
};
|
|
266
|
-
};
|
|
267
|
-
};
|
|
268
|
-
readonly error: {
|
|
269
|
-
readonly on: {
|
|
270
|
-
readonly RETRY: {
|
|
271
|
-
readonly target: "initCamera";
|
|
272
|
-
readonly actions: "clearError";
|
|
273
|
-
};
|
|
274
|
-
readonly CLOSE: {
|
|
275
|
-
readonly target: "closed";
|
|
276
|
-
readonly actions: "stopStream";
|
|
277
|
-
};
|
|
278
|
-
};
|
|
279
|
-
};
|
|
280
|
-
readonly finished: {
|
|
281
|
-
readonly type: "final";
|
|
282
|
-
};
|
|
283
|
-
readonly closed: {
|
|
284
|
-
readonly type: "final";
|
|
285
|
-
};
|
|
286
|
-
};
|
|
287
|
-
}>;
|
|
288
|
-
//#endregion
|
|
289
|
-
//#region src/modules/document-upload/documentUploadActor.d.ts
|
|
290
|
-
type CreateDocumentUploadActorOptions = {
|
|
291
|
-
config: DocumentUploadConfig;
|
|
292
|
-
};
|
|
293
|
-
//#endregion
|
|
294
|
-
//#region src/modules/document-upload/documentUploadManager.d.ts
|
|
295
|
-
type DocumentUploadInitializingState = {
|
|
296
|
-
status: 'initializing';
|
|
297
|
-
};
|
|
298
|
-
type DocumentUploadCapturingState = {
|
|
299
|
-
status: 'capturing';
|
|
300
|
-
stream: MediaStream;
|
|
301
|
-
};
|
|
302
|
-
type DocumentUploadUploadingState = {
|
|
303
|
-
status: 'uploading';
|
|
304
|
-
progress: number;
|
|
305
|
-
};
|
|
306
|
-
type DocumentUploadErrorState = {
|
|
307
|
-
status: 'error';
|
|
308
|
-
error: string;
|
|
309
|
-
};
|
|
310
|
-
type DocumentUploadFinishedState = {
|
|
311
|
-
status: 'finished';
|
|
312
|
-
};
|
|
313
|
-
type DocumentUploadClosedState = {
|
|
314
|
-
status: 'closed';
|
|
315
|
-
};
|
|
316
|
-
type DocumentUploadState = DocumentUploadInitializingState | DocumentUploadCapturingState | DocumentUploadUploadingState | DocumentUploadErrorState | DocumentUploadFinishedState | DocumentUploadClosedState;
|
|
317
|
-
declare function createDocumentUploadManager(options: CreateDocumentUploadActorOptions): Manager<DocumentUploadState> & {
|
|
318
|
-
load(): void;
|
|
319
|
-
capture(imageBase64: string): void;
|
|
320
|
-
retry(): void;
|
|
321
|
-
close(): void;
|
|
322
|
-
};
|
|
323
|
-
type DocumentUploadManager = ReturnType<typeof createDocumentUploadManager>;
|
|
324
|
-
//#endregion
|
|
325
|
-
export { type DocumentUploadConfig, type DocumentUploadManager, type DocumentUploadState, createDocumentUploadManager, documentUploadMachine };
|