@incodetech/core 0.0.0-dev-20260217-d3ca2b2 → 0.0.0-dev-20260217-42c4afa
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as Manager } from "./Manager-C647XkuZ.js";
|
|
2
2
|
|
|
3
|
-
//#region src/modules/
|
|
3
|
+
//#region src/modules/government-validation/types.d.ts
|
|
4
4
|
type GovernmentValidationConfig = {
|
|
5
5
|
validationCountries: string[];
|
|
6
6
|
facialValidation: boolean;
|
|
@@ -13,16 +13,16 @@ type GovernmentValidationConfig = {
|
|
|
13
13
|
maxOtpAttempts?: number;
|
|
14
14
|
};
|
|
15
15
|
//#endregion
|
|
16
|
-
//#region src/modules/
|
|
16
|
+
//#region src/modules/government-validation/governmentValidationStateMachine.d.ts
|
|
17
17
|
|
|
18
18
|
declare const governmentValidationMachine: any;
|
|
19
19
|
//#endregion
|
|
20
|
-
//#region src/modules/
|
|
20
|
+
//#region src/modules/government-validation/governmentValidationActor.d.ts
|
|
21
21
|
type CreateGovernmentValidationActorOptions = {
|
|
22
22
|
config: GovernmentValidationConfig;
|
|
23
23
|
};
|
|
24
24
|
//#endregion
|
|
25
|
-
//#region src/modules/
|
|
25
|
+
//#region src/modules/government-validation/governmentValidationManager.d.ts
|
|
26
26
|
type GovernmentValidationIdleState = {
|
|
27
27
|
status: 'idle';
|
|
28
28
|
};
|
|
@@ -2,7 +2,7 @@ import { E as createManager, p as BrowserTimerProvider } from "./src-BfSGepfs.es
|
|
|
2
2
|
import { a as fromPromise, i as fromCallback, n as setup, o as createActor, r as assign, t as endpoints } from "./endpoints-D8PkEWyi.esm.js";
|
|
3
3
|
import { t as api } from "./api-CmRbOLxk.esm.js";
|
|
4
4
|
|
|
5
|
-
//#region src/modules/
|
|
5
|
+
//#region src/modules/government-validation/governmentValidationServices.ts
|
|
6
6
|
async function processGovernmentValidation(signal) {
|
|
7
7
|
const res = await api.post(endpoints.governmentValidation, {}, { signal });
|
|
8
8
|
if (!res.ok) throw new Error(`POST ${endpoints.governmentValidation} failed: ${res.status} ${res.statusText}`);
|
|
@@ -15,7 +15,7 @@ async function submitGovernmentValidationOtp(params, signal) {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
//#endregion
|
|
18
|
-
//#region src/modules/
|
|
18
|
+
//#region src/modules/government-validation/governmentValidationStateMachine.ts
|
|
19
19
|
const RESEND_TIMER_SECONDS = 30;
|
|
20
20
|
const POLL_INTERVAL_MS = 2e3;
|
|
21
21
|
const MAX_POLL_COUNT = 60;
|
|
@@ -267,13 +267,13 @@ const governmentValidationMachine = setup({
|
|
|
267
267
|
});
|
|
268
268
|
|
|
269
269
|
//#endregion
|
|
270
|
-
//#region src/modules/
|
|
270
|
+
//#region src/modules/government-validation/governmentValidationActor.ts
|
|
271
271
|
function createGovernmentValidationActor(options) {
|
|
272
272
|
return createActor(governmentValidationMachine, { input: { config: options.config } }).start();
|
|
273
273
|
}
|
|
274
274
|
|
|
275
275
|
//#endregion
|
|
276
|
-
//#region src/modules/
|
|
276
|
+
//#region src/modules/government-validation/governmentValidationManager.ts
|
|
277
277
|
function mapState(snapshot) {
|
|
278
278
|
const typedSnapshot = snapshot;
|
|
279
279
|
const { context } = typedSnapshot;
|