@incodetech/core 0.0.0-dev-20260819-588cf821 → 0.0.0-dev-20260819-d97c25cd
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-CYEBHxM-.esm.js → BrowserDiagnosticsCryptoProvider-C1kB1eB6.esm.js} +1 -1
- package/dist/ae-signature.esm.js +1 -1
- package/dist/{apiError-DjfnJEmY.esm.js → apiError-DlY6lEte.esm.js} +1 -1
- package/dist/authentication.d.ts +3 -3
- package/dist/authentication.esm.js +2 -2
- package/dist/{authenticationManager-Djd5VRUN.esm.js → authenticationManager-C3Pdo3OC.esm.js} +2 -2
- package/dist/{authenticationManager-Bo5oW5Rh.d.ts → authenticationManager-CG7g38ad.d.ts} +1 -1
- package/dist/{authenticationStateMachine-CWI30EGE.esm.js → authenticationStateMachine-CpBOgS9i.esm.js} +2 -2
- package/dist/{backCameraStream-DtkmDQo7.esm.js → backCameraStream-D30zZBEZ.esm.js} +1 -1
- package/dist/consent.d.ts +1 -1
- package/dist/{consentManager-uhDPdU6i.d.ts → consentManager-3Pbtj-RV.d.ts} +4 -4
- package/dist/curp-validation.d.ts +1 -1
- package/dist/{curpValidationManager-BAE-uh7L.d.ts → curpValidationManager-DrMLHzVF.d.ts} +1 -1
- package/dist/{deepsightLoader-Cx7VIdZs.esm.js → deepsightLoader-Ct8Fmn7_.esm.js} +3 -3
- package/dist/device.d.ts +1 -1
- package/dist/device.esm.js +1 -1
- package/dist/document-capture.esm.js +2 -2
- package/dist/document-upload.d.ts +4 -4
- package/dist/document-upload.esm.js +1 -1
- package/dist/{documentCaptureManager-qEXTbJmQ.esm.js → documentCaptureManager-C1UC1WYh.esm.js} +1 -1
- package/dist/{documentCaptureStateMachine-DXfStru4.esm.js → documentCaptureStateMachine-CBHmgyM7.esm.js} +1 -1
- package/dist/dynamic-forms.esm.js +2 -2
- package/dist/{dynamicFormsManager-7O0OYLKC.esm.js → dynamicFormsManager-CWXstugw.esm.js} +1 -1
- package/dist/{dynamicFormsStateMachine-BhxBhuUG.esm.js → dynamicFormsStateMachine-BN5EojBS.esm.js} +1 -1
- package/dist/ekyb.d.ts +1 -1
- package/dist/ekyb.esm.js +3 -3
- package/dist/{ekybManager-DU3ehxwx.esm.js → ekybManager-CS2eKYaZ.esm.js} +1 -1
- package/dist/{ekybStateMachine-B5r4Ovj1.esm.js → ekybStateMachine-CUbUpf93.esm.js} +1 -1
- package/dist/electronic-signature.esm.js +1 -1
- package/dist/{electronicSignatureManager-eINhsO8o.esm.js → electronicSignatureManager-DAV5Qd7D.esm.js} +1 -1
- package/dist/extensibility.d.ts +10 -10
- package/dist/extensibility.esm.js +12 -12
- package/dist/{faceCaptureManagerFactory-CE-6YvEi.esm.js → faceCaptureManagerFactory-CA_aJRiS.esm.js} +1 -1
- package/dist/{faceCaptureManagerFactory-C8MlI6-0.d.ts → faceCaptureManagerFactory-D6qnBVUw.d.ts} +3 -3
- package/dist/{faceCaptureSetup-DlttCnYM.esm.js → faceCaptureSetup-q_Csi0hg.esm.js} +2 -2
- package/dist/{feature-management-Cd9XIX1T.esm.js → feature-management-Cl__Mk57.esm.js} +1 -1
- package/dist/feature-management.esm.js +1 -1
- package/dist/fiscal-qr.esm.js +1 -1
- package/dist/{fiscalQrManager-CP5XlFP0.esm.js → fiscalQrManager-7UH-ZMea.esm.js} +1 -1
- package/dist/flow-events.d.ts +1 -1
- package/dist/flow.d.ts +5 -5
- package/dist/flow.esm.js +3 -3
- package/dist/{flowCompletionService-CwmhqmA6.esm.js → flowCompletionService-B0iuFfdZ.esm.js} +1 -1
- package/dist/{flowServices-BtS-fOVI.esm.js → flowServices-D6lWadVX.esm.js} +4 -4
- package/dist/geolocation.esm.js +2 -2
- package/dist/{geolocationManager-BqsxPcAd.esm.js → geolocationManager-CZJwhj_d.esm.js} +1 -1
- package/dist/{geolocationStateMachine-BxXAG2Et.esm.js → geolocationStateMachine-BOH8p4nS.esm.js} +1 -1
- package/dist/{getBrowser-DNrQeL4T.esm.js → getBrowser-DmNprTMV.esm.js} +1 -0
- package/dist/government-validation.d.ts +1 -1
- package/dist/government-validation.esm.js +2 -2
- package/dist/{governmentValidationManager-DUzWUMjT.d.ts → governmentValidationManager-D02vT4yY.d.ts} +11 -44
- package/dist/governmentValidationManager-DnVUyppQ.esm.js +79 -0
- package/dist/governmentValidationStateMachine-CNzJ5UQb.esm.js +54 -0
- 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 +2 -2
- package/dist/id.esm.js +3 -3
- package/dist/{idCaptureManager-Bn1CF1jN.esm.js → idCaptureManager-CdJ5tIzZ.esm.js} +2 -2
- package/dist/{idCaptureManager-BfgptftY.d.ts → idCaptureManager-CfE4iEi0.d.ts} +2 -2
- package/dist/{idCaptureServices-CZwsPLMG.esm.js → idCaptureServices-DLNKi_EM.esm.js} +4 -4
- package/dist/{idCaptureStateMachine-CUZyF8Bl.esm.js → idCaptureStateMachine-C4UMP5JD.esm.js} +9 -9
- package/dist/{index-LHJIYIKJ.d.ts → index-LA6R9BLR.d.ts} +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/mandatory-consent.d.ts +2 -2
- package/dist/{mandatoryConsentManager-Cz98fh9O.d.ts → mandatoryConsentManager-DbGLEuuz.d.ts} +5 -5
- package/dist/{onDeviceFaceResults-B7628vP4.esm.js → onDeviceFaceResults-RJnRexzw.esm.js} +4 -4
- package/dist/personhood.d.ts +1 -1
- package/dist/personhood.esm.js +3 -3
- package/dist/qe-signature.esm.js +1 -1
- package/dist/{recordingService-D8KodYem.esm.js → recordingService-CLsBGwrX.esm.js} +1 -1
- package/dist/{runChildModule-CL2hhhUD.esm.js → runChildModule-btHrg-mD.esm.js} +1 -1
- package/dist/{sdkVersion-BHGhwczw.esm.js → sdkVersion-x6P2avb7.esm.js} +1 -1
- package/dist/selfie.d.ts +3 -3
- package/dist/selfie.esm.js +4 -4
- package/dist/{selfieManager-DDlagDor.esm.js → selfieManager-BNRQ9O-F.esm.js} +2 -2
- package/dist/{selfieManager-yz6zt2t0.d.ts → selfieManager-dki4G9tK.d.ts} +1 -1
- package/dist/{selfieStateMachine-CEZ0hvCQ.esm.js → selfieStateMachine-BCruqTSI.esm.js} +2 -2
- package/dist/{session-BDsfrJHD.esm.js → session-Bgkz0Bl9.esm.js} +4 -4
- package/dist/session.d.ts +1 -1
- package/dist/session.esm.js +4 -4
- package/dist/{sessionInitializer-BMj0ulTi.esm.js → sessionInitializer-BWxNWUni.esm.js} +4 -4
- package/dist/{setup-6Ab1eT8N.esm.js → setup-CXsJAvBD.esm.js} +5 -5
- package/dist/trueSight-CzaYWY8k.esm.js +1 -0
- package/dist/{trueSightService-CFXnK5HX.esm.js → trueSightService-C8mkify_.esm.js} +2 -2
- package/dist/{types-DNNUCM_n.d.ts → types-BqezaTnP.d.ts} +0 -2
- package/dist/{types-BNs7Klh_.d.ts → types-C6pPfQxo.d.ts} +1 -1
- package/dist/{types-DqtyPNWa.d.ts → types-D10PIjOT.d.ts} +1 -1
- package/dist/types-DQpi7nkW.d.ts +6 -0
- package/dist/{types-CaqgEfzk.d.ts → types-KeV54Tt6.d.ts} +1 -1
- package/dist/{types-rpRSIpv4.d.ts → types-isCyg__O.d.ts} +1 -1
- package/dist/video-selfie.d.ts +1 -1
- package/dist/video-selfie.esm.js +3 -3
- package/dist/{videoSelfieCameraWarmer-CEFb7dCk.esm.js → videoSelfieCameraWarmer-BwvCvHQQ.esm.js} +3 -3
- package/dist/{videoSelfieStepDetector-CcBSD8Gc.d.ts → videoSelfieStepDetector-tHovquP4.d.ts} +2 -2
- package/dist/wasm.esm.js +1 -1
- package/dist/workflow.d.ts +5 -5
- package/dist/workflow.esm.js +17 -17
- package/package.json +3 -3
- package/dist/governmentValidationManager-Dheo7fh_.esm.js +0 -123
- package/dist/governmentValidationStateMachine-BYKYUdza.esm.js +0 -226
- package/dist/trueSight-B-rervIk.esm.js +0 -1
- package/dist/types-Dm7dzIXw.d.ts +0 -6
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BXhgNxLt.esm.js";
|
|
2
|
-
import { t as api } from "./api-Bx3gKW_y.esm.js";
|
|
3
|
-
import { t as endpoints } from "./endpoints-CCzL3XD_.esm.js";
|
|
4
|
-
import { r as assign, t as setup } from "./xstate.esm-Cf4e0Cfd.esm.js";
|
|
5
|
-
import { n as fromPromise, t as fromCallback } from "./xstate-actors.esm-CtI5S0f4.esm.js";
|
|
6
|
-
import { n as isOtpComplete, t as computeOtpValidationErrors } from "./otp-D2k3PeSL.esm.js";
|
|
7
|
-
//#region src/modules/government-validation/governmentValidationServices.ts
|
|
8
|
-
async function processGovernmentValidation(signal) {
|
|
9
|
-
const res = await api.post(endpoints.governmentValidation, {}, { signal });
|
|
10
|
-
if (!res.ok) throw new Error(`POST ${endpoints.governmentValidation} failed: ${res.status} ${res.statusText}`);
|
|
11
|
-
return res.data;
|
|
12
|
-
}
|
|
13
|
-
async function submitGovernmentValidationOtp(params, signal) {
|
|
14
|
-
const res = await api.post(endpoints.governmentValidation, { otpCode: params.code }, { signal });
|
|
15
|
-
if (!res.ok) throw new Error(`POST ${endpoints.governmentValidation} (OTP) failed: ${res.status} ${res.statusText}`);
|
|
16
|
-
return res.data;
|
|
17
|
-
}
|
|
18
|
-
//#endregion
|
|
19
|
-
//#region src/modules/government-validation/governmentValidationStateMachine.ts
|
|
20
|
-
const RESEND_TIMER_SECONDS = 30;
|
|
21
|
-
const governmentValidationMachine = setup({
|
|
22
|
-
types: {
|
|
23
|
-
context: {},
|
|
24
|
-
events: {},
|
|
25
|
-
input: {}
|
|
26
|
-
},
|
|
27
|
-
delays: { AUTO_PROCEED: 3e3 },
|
|
28
|
-
actors: {
|
|
29
|
-
processValidation: fromPromise(async ({ signal }) => {
|
|
30
|
-
return processGovernmentValidation(signal);
|
|
31
|
-
}),
|
|
32
|
-
submitOtp: fromPromise(async ({ input, signal }) => {
|
|
33
|
-
return submitGovernmentValidationOtp({ code: input.code }, signal);
|
|
34
|
-
}),
|
|
35
|
-
resendTimer: fromCallback(({ sendBack }) => {
|
|
36
|
-
const timer = BrowserTimerProvider.getInstance();
|
|
37
|
-
let seconds = RESEND_TIMER_SECONDS;
|
|
38
|
-
const interval = timer.setInterval(() => {
|
|
39
|
-
seconds -= 1;
|
|
40
|
-
sendBack({ type: "TICK" });
|
|
41
|
-
if (seconds <= 0) timer.clearInterval(interval);
|
|
42
|
-
}, 1e3);
|
|
43
|
-
return () => timer.clearInterval(interval);
|
|
44
|
-
})
|
|
45
|
-
},
|
|
46
|
-
actions: {
|
|
47
|
-
setError: assign(({ event }) => ({ error: String(event.error) })),
|
|
48
|
-
setErrorFromResponse: assign({ error: () => "Government validation failed" }),
|
|
49
|
-
setUnknownError: assign({ error: () => "Unknown validation status" }),
|
|
50
|
-
clearError: assign({ error: () => void 0 }),
|
|
51
|
-
setOtpCode: assign(({ event }) => ({
|
|
52
|
-
otpCode: event.code,
|
|
53
|
-
otpError: void 0,
|
|
54
|
-
otpValidationErrors: void 0
|
|
55
|
-
})),
|
|
56
|
-
validateOtpField: assign(({ context }) => {
|
|
57
|
-
const errors = computeOtpValidationErrors(context.otpCode);
|
|
58
|
-
return { otpValidationErrors: errors.otp ? errors : void 0 };
|
|
59
|
-
}),
|
|
60
|
-
setOtpError: assign(({ context }) => ({
|
|
61
|
-
otpError: "Invalid OTP code",
|
|
62
|
-
attemptsRemaining: context.attemptsRemaining - 1
|
|
63
|
-
})),
|
|
64
|
-
clearOtpError: assign({
|
|
65
|
-
otpError: () => void 0,
|
|
66
|
-
otpCode: () => "",
|
|
67
|
-
otpValidationErrors: () => void 0
|
|
68
|
-
}),
|
|
69
|
-
startResendTimer: assign({
|
|
70
|
-
resendTimer: () => RESEND_TIMER_SECONDS,
|
|
71
|
-
resendTimerActive: () => true
|
|
72
|
-
}),
|
|
73
|
-
tickResendTimer: assign(({ context }) => {
|
|
74
|
-
const newTimer = Math.max(0, context.resendTimer - 1);
|
|
75
|
-
return {
|
|
76
|
-
resendTimer: newTimer,
|
|
77
|
-
resendTimerActive: newTimer > 0
|
|
78
|
-
};
|
|
79
|
-
}),
|
|
80
|
-
resetContext: assign(({ context }) => ({
|
|
81
|
-
config: context.config,
|
|
82
|
-
error: void 0,
|
|
83
|
-
otpCode: "",
|
|
84
|
-
otpError: void 0,
|
|
85
|
-
otpValidationErrors: void 0,
|
|
86
|
-
attemptsRemaining: context.config.maxOtpAttempts ?? 3,
|
|
87
|
-
resendTimer: 0,
|
|
88
|
-
resendTimerActive: false
|
|
89
|
-
}))
|
|
90
|
-
},
|
|
91
|
-
guards: {
|
|
92
|
-
isBackgroundExecution: ({ context }) => context.config.backgroundExecution,
|
|
93
|
-
isProcessing: (_, params) => params.response.statusCode === -1,
|
|
94
|
-
isSuccess: (_, params) => params.response.statusCode === 0 && params.response.governmentValidation?.validationStatus?.status === "OK",
|
|
95
|
-
isError: (_, params) => params.response.statusCode > 0 || params.response.governmentValidation?.validationStatus?.status === "FAIL",
|
|
96
|
-
isOtpRequested: (_, params) => params.response.otpResponse?.authBridge?.otpCodeRequested === true,
|
|
97
|
-
isUnknown: (_, params) => params.response.governmentValidation?.validationStatus?.status === "UNKNOWN",
|
|
98
|
-
hasAttemptsRemaining: ({ context }) => context.attemptsRemaining > 0,
|
|
99
|
-
hasCompleteOtp: ({ context }) => isOtpComplete(context.otpCode),
|
|
100
|
-
canResend: ({ context }) => !context.resendTimerActive
|
|
101
|
-
}
|
|
102
|
-
}).createMachine({
|
|
103
|
-
id: "governmentValidation",
|
|
104
|
-
initial: "idle",
|
|
105
|
-
context: ({ input }) => ({
|
|
106
|
-
config: input.config,
|
|
107
|
-
error: void 0,
|
|
108
|
-
otpCode: "",
|
|
109
|
-
otpError: void 0,
|
|
110
|
-
otpValidationErrors: void 0,
|
|
111
|
-
attemptsRemaining: input.config.maxOtpAttempts ?? 3,
|
|
112
|
-
resendTimer: 0,
|
|
113
|
-
resendTimerActive: false
|
|
114
|
-
}),
|
|
115
|
-
states: {
|
|
116
|
-
idle: { on: { LOAD: { target: "loading" } } },
|
|
117
|
-
loading: { invoke: {
|
|
118
|
-
id: "processValidation",
|
|
119
|
-
src: "processValidation",
|
|
120
|
-
onDone: [
|
|
121
|
-
{
|
|
122
|
-
target: "finished",
|
|
123
|
-
guard: "isBackgroundExecution"
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
target: "awaitingOtp",
|
|
127
|
-
guard: {
|
|
128
|
-
type: "isOtpRequested",
|
|
129
|
-
params: ({ event }) => ({ response: event.output })
|
|
130
|
-
}
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
target: "displaySuccess",
|
|
134
|
-
guard: {
|
|
135
|
-
type: "isSuccess",
|
|
136
|
-
params: ({ event }) => ({ response: event.output })
|
|
137
|
-
}
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
target: "displayProcessing",
|
|
141
|
-
guard: {
|
|
142
|
-
type: "isProcessing",
|
|
143
|
-
params: ({ event }) => ({ response: event.output })
|
|
144
|
-
}
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
target: "displayUnknown",
|
|
148
|
-
guard: {
|
|
149
|
-
type: "isUnknown",
|
|
150
|
-
params: ({ event }) => ({ response: event.output })
|
|
151
|
-
},
|
|
152
|
-
actions: "setUnknownError"
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
target: "displayError",
|
|
156
|
-
actions: "setErrorFromResponse"
|
|
157
|
-
}
|
|
158
|
-
],
|
|
159
|
-
onError: [{
|
|
160
|
-
target: "finished",
|
|
161
|
-
guard: "isBackgroundExecution"
|
|
162
|
-
}, {
|
|
163
|
-
target: "displayError",
|
|
164
|
-
actions: "setError"
|
|
165
|
-
}]
|
|
166
|
-
} },
|
|
167
|
-
awaitingOtp: {
|
|
168
|
-
entry: "startResendTimer",
|
|
169
|
-
invoke: {
|
|
170
|
-
id: "resendTimer",
|
|
171
|
-
src: "resendTimer"
|
|
172
|
-
},
|
|
173
|
-
on: {
|
|
174
|
-
TICK: { actions: "tickResendTimer" },
|
|
175
|
-
OTP_CHANGED: { actions: "setOtpCode" },
|
|
176
|
-
VALIDATE_OTP: { actions: "validateOtpField" },
|
|
177
|
-
SUBMIT_OTP: [{
|
|
178
|
-
guard: "hasCompleteOtp",
|
|
179
|
-
target: "verifyingOtp"
|
|
180
|
-
}, { actions: "validateOtpField" }],
|
|
181
|
-
RESEND_OTP: {
|
|
182
|
-
target: "loading",
|
|
183
|
-
guard: "canResend"
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
},
|
|
187
|
-
verifyingOtp: { invoke: {
|
|
188
|
-
id: "submitOtp",
|
|
189
|
-
src: "submitOtp",
|
|
190
|
-
input: ({ context }) => ({ code: context.otpCode }),
|
|
191
|
-
onDone: [
|
|
192
|
-
{
|
|
193
|
-
target: "displaySuccess",
|
|
194
|
-
guard: {
|
|
195
|
-
type: "isSuccess",
|
|
196
|
-
params: ({ event }) => ({ response: event.output })
|
|
197
|
-
}
|
|
198
|
-
},
|
|
199
|
-
{
|
|
200
|
-
target: "awaitingOtp",
|
|
201
|
-
guard: "hasAttemptsRemaining",
|
|
202
|
-
actions: "setOtpError"
|
|
203
|
-
},
|
|
204
|
-
{
|
|
205
|
-
target: "displayError",
|
|
206
|
-
actions: assign({ error: () => "Maximum OTP attempts exceeded" })
|
|
207
|
-
}
|
|
208
|
-
],
|
|
209
|
-
onError: [{
|
|
210
|
-
target: "awaitingOtp",
|
|
211
|
-
guard: "hasAttemptsRemaining",
|
|
212
|
-
actions: "setOtpError"
|
|
213
|
-
}, {
|
|
214
|
-
target: "displayError",
|
|
215
|
-
actions: "setError"
|
|
216
|
-
}]
|
|
217
|
-
} },
|
|
218
|
-
displaySuccess: { after: { AUTO_PROCEED: { target: "finished" } } },
|
|
219
|
-
displayProcessing: { after: { AUTO_PROCEED: { target: "finished" } } },
|
|
220
|
-
displayError: { after: { AUTO_PROCEED: { target: "finished" } } },
|
|
221
|
-
displayUnknown: { after: { AUTO_PROCEED: { target: "finished" } } },
|
|
222
|
-
finished: { type: "final" }
|
|
223
|
-
}
|
|
224
|
-
});
|
|
225
|
-
//#endregion
|
|
226
|
-
export { governmentValidationMachine as t };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./trueSightService-CFXnK5HX.esm.js";
|
package/dist/types-Dm7dzIXw.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { i as FlowModuleConfig } from "./types-DNNUCM_n.js";
|
|
2
|
-
import { t as BaseFaceCaptureConfig } from "./types-CaqgEfzk.js";
|
|
3
|
-
//#region src/modules/authentication/types.d.ts
|
|
4
|
-
type AuthenticationConfig = FlowModuleConfig['AUTHENTICATION'] & BaseFaceCaptureConfig;
|
|
5
|
-
//#endregion
|
|
6
|
-
export { AuthenticationConfig as t };
|