@incodetech/core 2.0.1 → 2.1.0-rc.1
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/{BrowserStorageProvider-CuOW1Er2.esm.js → BrowserStorageProvider-BpJM-gIl.esm.js} +8 -1
- package/dist/{IpifyProvider-D7jx52AL.esm.js → IpifyProvider-D4LWD15E.esm.js} +28 -0
- package/dist/{MotionSensorProvider-4v7xkqAp.esm.js → MotionSensorProvider-Bx7Mpzt0.esm.js} +63 -13
- package/dist/{OpenViduRecordingProvider-CMu6XVdc.esm.js → OpenViduRecordingProvider-O4GjBseO.esm.js} +1 -1
- package/dist/StateMachine-BC_nGvrc.d.ts +2 -0
- package/dist/StreamCanvasCapture-ImiDQdVA.esm.js +118 -0
- package/dist/StreamCanvasCapture-yyl20qd9.d.ts +152 -0
- package/dist/{BaseWasmProvider-C_DLEI40.esm.js → WasmUtilProvider-BKWm8rSA.esm.js} +202 -11
- package/dist/{addressSearch-BpTbTWCa.esm.js → addressSearch-DvmWXKZg.esm.js} +63 -57
- package/dist/{ae-signature-DDDZmWXj.esm.js → ae-signature-BFZta3TZ.esm.js} +1 -1
- package/dist/ae-signature.d.ts +3 -3
- package/dist/ae-signature.esm.js +6 -5
- package/dist/antifraud.d.ts +5 -46
- package/dist/antifraud.esm.js +6 -43
- package/dist/antifraudManager-CkV4u-LE.esm.js +55 -0
- package/dist/antifraudManager-CznnhyvD.d.ts +63 -0
- package/dist/{antifraudStateMachine-O0TMf6yc.esm.js → antifraudStateMachine-Ccrb-Jxc.esm.js} +2 -2
- package/dist/apiError-B-j-gyDx.esm.js +51 -0
- package/dist/authentication.d.ts +13 -11
- package/dist/authentication.esm.js +26 -22
- package/dist/{authenticationManager-5M-fKzXx.esm.js → authenticationManager-BlR6mSaG.esm.js} +6 -6
- package/dist/{authenticationManager-C83GNIhl.d.ts → authenticationManager-CaiQbp-q.d.ts} +4 -4
- package/dist/{authenticationStateMachine-BMZqatiF.esm.js → authenticationStateMachine-DkcGUMw5.esm.js} +21 -9
- package/dist/{backCameraStream-DMdMeGk2.esm.js → backCameraStream-D7Wo4Nbx.esm.js} +95 -7
- package/dist/{session-CrkWAs-q.esm.js → browserSimulation-B1dWiXp7.esm.js} +61 -476
- package/dist/camera.d.ts +4 -3
- package/dist/camera.esm.js +4 -3
- package/dist/canvas-SKcRBxsk.esm.js +230 -0
- package/dist/consent.d.ts +4 -398
- package/dist/consent.esm.js +6 -77
- package/dist/consentManager-BYo9Nu1r.esm.js +90 -0
- package/dist/consentManager-Cg5Sk2tv.d.ts +419 -0
- package/dist/{consentStateMachine-CCT-B60O.esm.js → consentStateMachine-BG3yL8aC.esm.js} +9 -6
- package/dist/cpf-ocr.d.ts +4 -199
- package/dist/cpf-ocr.esm.js +8 -177
- package/dist/cpfOcrManager-Dg1s_TY5.d.ts +216 -0
- package/dist/cpfOcrManager-sSKegxox.esm.js +190 -0
- 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 +8 -158
- package/dist/curp-validation.esm.js +6 -108
- package/dist/curpValidationManager-CFem6zP9.esm.js +122 -0
- package/dist/curpValidationManager-RttixpIc.d.ts +184 -0
- package/dist/{curpValidationStateMachine-CitWLr2c.esm.js → curpValidationStateMachine-B7V_qp66.esm.js} +20 -13
- package/dist/custom-fields.d.ts +2 -2
- package/dist/custom-fields.esm.js +4 -4
- package/dist/custom-watchlist.d.ts +1 -1
- package/dist/custom-watchlist.esm.js +4 -41
- package/dist/customWatchlistStateMachine-HmFybXLX.esm.js +50 -0
- package/dist/{deepsightLoader-Cm4JIT_z.esm.js → deepsightLoader-8tnddNx-.esm.js} +19 -10
- package/dist/deepsightService-CrHmvx8X.esm.js +276 -0
- package/dist/{deepsightService-CEVxzehb.d.ts → deepsightService-Dh5P-hLf.d.ts} +13 -160
- package/dist/device.esm.js +4 -3
- package/dist/document-capture.d.ts +989 -80
- package/dist/document-capture.esm.js +34 -8
- package/dist/document-upload.d.ts +44 -44
- package/dist/document-upload.esm.js +7 -7
- package/dist/{documentCaptureStateMachine-BqzTDy9k.esm.js → documentCaptureStateMachine-CUTUzUw_.esm.js} +90 -6
- package/dist/dynamic-forms.d.ts +20 -5
- package/dist/dynamic-forms.esm.js +150 -61
- package/dist/ekyb.d.ts +32 -13
- package/dist/ekyb.esm.js +25 -15
- package/dist/{ekybStateMachine-CyMx_kg-.esm.js → ekybStateMachine-klc-AImJ.esm.js} +319 -207
- package/dist/ekyc.d.ts +10 -78
- package/dist/ekyc.esm.js +17 -12
- package/dist/{ekycStateMachine-oeO0Iekd.esm.js → ekycStateMachine-CXbpaJJn.esm.js} +201 -113
- package/dist/electronic-signature.d.ts +3 -3
- package/dist/electronic-signature.esm.js +5 -4
- package/dist/{electronicSignatureManager-D9OHzTpG.esm.js → electronicSignatureManager-BaECdJ1u.esm.js} +91 -23
- package/dist/email.d.ts +4 -3
- package/dist/email.esm.js +6 -5
- package/dist/{emailManager-wAV0LE-H.esm.js → emailManager--D5G3ChB.esm.js} +30 -7
- package/dist/{emailManager-DIfnS5g1.d.ts → emailManager-lAzDoQOs.d.ts} +66 -8
- package/dist/{emailStateMachine-DOf4j58N.esm.js → emailStateMachine-CxTOMAjC.esm.js} +46 -11
- package/dist/{endpoints-CnN3SyDa.esm.js → endpoints-BeTK0Mlt.esm.js} +6 -3
- package/dist/{events-D6-e4vok.esm.js → events-Dvvriq9l.esm.js} +3 -1
- package/dist/events.d.ts +2 -0
- package/dist/events.esm.js +1 -1
- package/dist/extensibility.d.ts +41 -16
- package/dist/extensibility.esm.js +55 -33
- package/dist/face-match.d.ts +21 -2
- package/dist/face-match.esm.js +5 -5
- package/dist/{faceCaptureManagerFactory-yqtpxjnN.d.ts → faceCaptureManagerFactory-CjdBUS6s.d.ts} +48 -17
- package/dist/{faceCaptureManagerFactory-Dh2PdGlF.esm.js → faceCaptureManagerFactory-ej2j1LMr.esm.js} +21 -5
- package/dist/{faceCaptureSetup-B3faSpYA.esm.js → faceCaptureSetup-B9t6bYze.esm.js} +68 -183
- package/dist/{faceMatchStateMachine-DNFrxTFS.esm.js → faceMatchStateMachine-DeXXzSuz.esm.js} +62 -6
- package/dist/field-comparison.d.ts +4 -0
- package/dist/field-comparison.esm.js +7 -0
- package/dist/fieldComparisonManager-Bu5TaSr3.d.ts +76 -0
- package/dist/fieldComparisonManager-COGI2ARD.esm.js +162 -0
- package/dist/fiscal-qr.d.ts +59 -0
- package/dist/fiscal-qr.esm.js +323 -0
- package/dist/flow-events.d.ts +6 -5
- package/dist/flow.d.ts +23 -15
- package/dist/flow.esm.js +56 -17
- package/dist/flowCompletionService-BdR2cGgB.d.ts +19 -0
- package/dist/flowCompletionService-DdGojV9K.esm.js +20 -0
- package/dist/{flowServices-PiNsxLfK.esm.js → flowServices-ChgTNggJ.esm.js} +10 -5
- package/dist/geolocation.d.ts +4 -4
- package/dist/geolocation.esm.js +6 -6
- package/dist/{geolocationStateMachine-asasuHY2.esm.js → geolocationStateMachine-Dvh7X0wF.esm.js} +5 -5
- package/dist/getBrowser-C8DP7oTB.esm.js +8 -0
- package/dist/{getBrowser-BSXUTWXw.esm.js → getDeviceClass-C0olyNFS.esm.js} +1 -8
- package/dist/{getDeviceClass-BSntT9_j.esm.js → getDeviceClass-C8Do2qYu.esm.js} +1 -1
- package/dist/government-validation.d.ts +28 -8
- package/dist/government-validation.esm.js +19 -8
- package/dist/{governmentValidationStateMachine-BDDYrJTo.esm.js → governmentValidationStateMachine-DcJ-BfsC.esm.js} +35 -77
- package/dist/home.d.ts +15 -14
- package/dist/home.esm.js +2 -2
- package/dist/http-Cai3IoLS.esm.js +0 -0
- package/dist/http.esm.js +1 -0
- package/dist/id-ocr.d.ts +54 -54
- package/dist/id-ocr.esm.js +5 -5
- package/dist/id-verification.d.ts +27 -27
- package/dist/id-verification.esm.js +4 -4
- package/dist/id.d.ts +12 -10
- package/dist/id.esm.js +70 -27
- package/dist/{idCaptureManager-Fyd0eam-.d.ts → idCaptureManager-ChCNmgBj.d.ts} +40 -20
- package/dist/{idCaptureManager-D0ktk7Hh.esm.js → idCaptureManager-D3pwWutw.esm.js} +22 -7
- package/dist/{idCaptureStateMachine-dwlBUjbC.esm.js → idCaptureStateMachine-B3AiDIsT.esm.js} +172 -123
- package/dist/{idOcrStateMachine-YbjjC_Gg.esm.js → idOcrStateMachine-CDQ5d_VM.esm.js} +4 -4
- package/dist/{idVerificationStateMachine-xbw9HP1Z.esm.js → idVerificationStateMachine-kRxwImzO.esm.js} +2 -2
- package/dist/identity-reuse.d.ts +4 -530
- package/dist/identity-reuse.esm.js +8 -274
- package/dist/identityReuseManager-C6n_97dw.esm.js +95 -0
- package/dist/identityReuseManager-Cww-NDtd.d.ts +428 -0
- package/dist/identityReuseStateMachine-BfE5YiEr.esm.js +148 -0
- package/dist/{index-BcRG8rtJ.d.ts → index-B5hPA0Bg.d.ts} +2 -2
- package/dist/{index-ChHWNH48.d.ts → index-B9NysVDB.d.ts} +469 -195
- package/dist/index.d.ts +2 -2
- package/dist/index.esm.js +10 -8
- package/dist/{invokeOnCaptureCallback-rc6kBHo5.esm.js → invokeOnCaptureCallback-ygByVdnn.esm.js} +1 -1
- package/dist/{lib-BB0B_qQX.esm.js → lib-BY67lgbq.esm.js} +1 -1
- package/dist/mandatory-consent.d.ts +8 -412
- package/dist/mandatory-consent.esm.js +6 -76
- package/dist/mandatoryConsentManager-Dq6WiOZh.d.ts +429 -0
- package/dist/mandatoryConsentManager-H6D18cZB.esm.js +89 -0
- package/dist/{mandatoryConsentStateMachine-Cnco1jvn.esm.js → mandatoryConsentStateMachine-DtQNW1ji.esm.js} +6 -6
- package/dist/openviduLazy-B8L--0oe.esm.js +3 -0
- package/dist/{openviduLazy-Cok70ZSg.esm.js → openviduLazy-Dh14JNJc.esm.js} +2 -2
- package/dist/otp-CGMdUzBC.esm.js +33 -0
- package/dist/otp-DF5A0sFx.d.ts +8 -0
- package/dist/permissionGuards-D0wGddy7.esm.js +23 -0
- package/dist/permissionServices-Doec4X5L.esm.js +130 -0
- package/dist/phone.d.ts +4 -3
- package/dist/phone.esm.js +6 -5
- package/dist/{phoneManager-DAJbGhlY.esm.js → phoneManager-BmF-0Ez4.esm.js} +30 -7
- package/dist/{phoneManager-B6M30hKE.d.ts → phoneManager-fPmIBYQK.d.ts} +65 -7
- package/dist/{phoneStateMachine-CuPARRaT.esm.js → phoneStateMachine-BiV0yoEx.esm.js} +46 -11
- package/dist/{qe-signature-DFo_Cc-I.esm.js → qe-signature-CUYPcHVo.esm.js} +1 -1
- package/dist/qe-signature.d.ts +3 -3
- package/dist/qe-signature.esm.js +6 -5
- package/dist/{recordingService-Ig2UgbLv.esm.js → recordingService-yRw7hfzU.esm.js} +197 -179
- package/dist/redirect-to-mobile.d.ts +6 -104
- package/dist/redirect-to-mobile.esm.js +6 -99
- package/dist/redirectToMobileManager-BNe3IzC_.d.ts +178 -0
- package/dist/redirectToMobileManager-Dy3t7o0C.esm.js +159 -0
- package/dist/{redirectToMobileStateMachine-BOEqe46A.esm.js → redirectToMobileStateMachine-DyAdRxfP.esm.js} +28 -19
- package/dist/{runChildModule-CqqwqAkW.esm.js → runChildModule-CuoHZ1cx.esm.js} +35 -3
- package/dist/selfie.d.ts +13 -11
- package/dist/selfie.esm.js +53 -24
- package/dist/{selfieManager-Duisl7qN.esm.js → selfieManager-BNuTIGAz.esm.js} +6 -6
- package/dist/{selfieManager-D0lSgd-J.d.ts → selfieManager-C2y_t6DG.d.ts} +4 -4
- package/dist/{selfieStateMachine-D76whWEf.esm.js → selfieStateMachine-Bv99bZJE.esm.js} +5 -3
- package/dist/session-DoVb-OcB.esm.js +152 -0
- package/dist/session.d.ts +37 -5
- package/dist/session.esm.js +12 -7
- package/dist/sessionInitializer-DRB-hgbV.esm.js +366 -0
- package/dist/{setup-C5AITV8m.d.ts → setup-BwCluiw3.d.ts} +86 -6
- package/dist/{setup-DPPAxmXf.esm.js → setup-CUO4mErT.esm.js} +175 -25
- package/dist/signature.d.ts +2 -2
- package/dist/signature.esm.js +4 -4
- package/dist/{signatureStateMachine-B5-QVUve.esm.js → signatureStateMachine-C5qqYLRz.esm.js} +3 -3
- package/dist/stats-BMNUG1AU.esm.js +41 -0
- package/dist/stats.d.ts +13 -2
- package/dist/stats.esm.js +3 -2
- package/dist/trust-graph.d.ts +33 -4
- package/dist/trust-graph.esm.js +21 -15
- package/dist/{types-CFV9G_7j.d.ts → types-Bj9hdFjU.d.ts} +1 -1
- package/dist/{types-BP1m8VRw.d.ts → types-DOUhndhT.d.ts} +14 -2
- package/dist/types-DsnEVMhr.esm.js +34 -0
- package/dist/types-DvGZI7BF.d.ts +131 -0
- package/dist/{types-B06Ypu2F.d.ts → types-NuT8ftBV.d.ts} +1 -1
- package/dist/types-ya0LN_MX.d.ts +5 -0
- package/dist/{warmup-CEcppFiS.d.ts → warmup-Dg8Lh-50.d.ts} +8 -0
- package/dist/wasm.d.ts +6 -4
- package/dist/wasm.esm.js +11 -9
- package/dist/watchlist-for-business.d.ts +1 -1
- package/dist/watchlist-for-business.esm.js +5 -73
- package/dist/watchlist.d.ts +1 -1
- package/dist/watchlist.esm.js +4 -41
- package/dist/watchlistForBusinessStateMachine-DMl8j2Ov.esm.js +74 -0
- package/dist/watchlistStateMachine-DmQlqI6L.esm.js +50 -0
- package/dist/workflow.d.ts +146 -100
- package/dist/workflow.esm.js +116 -66
- package/package.json +19 -1
- package/dist/StateMachine-BCQrZJhf.d.ts +0 -2
- package/dist/WasmUtilProvider-j98OJf-S.esm.js +0 -114
- package/dist/browserSimulation-gxD8cSpM.esm.js +0 -20
- package/dist/deepsightService-O74l4Y__.esm.js +0 -489
- package/dist/displayErrors-DqJ_IbsG.d.ts +0 -39
- package/dist/flowCompletionService-DhkT4SRY.d.ts +0 -10
- package/dist/flowCompletionService-P54yzGvA.esm.js +0 -13
- package/dist/openviduLazy-Cm0XFh_v.esm.js +0 -3
- package/dist/permissionServices-D_i6nzEw.esm.js +0 -50
- package/dist/stats-CIfiPzb1.esm.js +0 -16
- package/dist/types-CAD4va6a.d.ts +0 -5
- package/dist/watchlistServices-DMbUhkBX.esm.js +0 -12
- /package/dist/{Actor-CI32dTbG.d.ts → Actor-Y0_Fj-KL.d.ts} +0 -0
- /package/dist/{ITimerCapability-C67ZRskg.esm.js → ITimerCapability-CB0I1Uf2.esm.js} +0 -0
- /package/dist/{Manager-C8PrhBOx.d.ts → Manager-BHn8wH8K.d.ts} +0 -0
- /package/dist/{camera-PA2Ljri3.esm.js → camera-DJWm3V4g.esm.js} +0 -0
- /package/dist/{camera-DBSxa6ML.d.ts → camera-SRBpPq2X.d.ts} +0 -0
- /package/dist/{chunk-CRF6K_H_.esm.js → chunk-CMUKZ2uL.esm.js} +0 -0
- /package/dist/{cpf-PPz2Njto.esm.js → cpf-BRzggV8G.esm.js} +0 -0
- /package/dist/{dateUtils-UoN5xswP.esm.js → dateUtils-AksLQmgV.esm.js} +0 -0
- /package/dist/{platform-CfrjKhmi.esm.js → platform-SKvEfCBh.esm.js} +0 -0
- /package/dist/{xstate.esm-B70JrNqo.esm.js → xstate.esm-C9wncMQa.esm.js} +0 -0
package/dist/cpf-ocr.d.ts
CHANGED
|
@@ -1,204 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import "./Manager-BHn8wH8K.js";
|
|
2
|
+
import "./Actor-Y0_Fj-KL.js";
|
|
3
|
+
import { a as CpfOcrActor, i as createCpfOcrManagerFromActor, n as CpfOcrState, o as cpfOcrMachine, r as createCpfOcrManager, t as CpfOcrManager } from "./cpfOcrManager-Dg1s_TY5.js";
|
|
3
4
|
|
|
4
|
-
//#region src/modules/cpf-ocr/cpfOcrManager.d.ts
|
|
5
|
-
type CpfOcrIdleState = {
|
|
6
|
-
status: 'idle';
|
|
7
|
-
};
|
|
8
|
-
type CpfOcrLoadingState = {
|
|
9
|
-
status: 'loading';
|
|
10
|
-
};
|
|
11
|
-
type CpfOcrInputtingState = {
|
|
12
|
-
status: 'inputting';
|
|
13
|
-
cpf: string;
|
|
14
|
-
isValid: boolean;
|
|
15
|
-
};
|
|
16
|
-
type CpfOcrSubmittingState = {
|
|
17
|
-
status: 'submitting';
|
|
18
|
-
};
|
|
19
|
-
type CpfOcrErrorState = {
|
|
20
|
-
status: 'error';
|
|
21
|
-
error: string;
|
|
22
|
-
};
|
|
23
|
-
type CpfOcrFinishedState = {
|
|
24
|
-
status: 'finished';
|
|
25
|
-
};
|
|
26
|
-
type CpfOcrState = CpfOcrIdleState | CpfOcrLoadingState | CpfOcrInputtingState | CpfOcrSubmittingState | CpfOcrErrorState | CpfOcrFinishedState;
|
|
27
|
-
declare function createCpfOcrManager(): Manager<CpfOcrState> & {
|
|
28
|
-
load(): void;
|
|
29
|
-
setCpf(cpf: string): void;
|
|
30
|
-
submit(): void;
|
|
31
|
-
retry(): void;
|
|
32
|
-
};
|
|
33
|
-
type CpfOcrManager = ReturnType<typeof createCpfOcrManager>;
|
|
34
|
-
//#endregion
|
|
35
|
-
//#region src/modules/cpf-ocr/types.d.ts
|
|
36
|
-
type CpfOcrDataResponse = {
|
|
37
|
-
documentNumber?: string;
|
|
38
|
-
};
|
|
39
|
-
type CpfOcrUpdateResponse = {
|
|
40
|
-
success?: boolean;
|
|
41
|
-
};
|
|
42
|
-
//#endregion
|
|
43
|
-
//#region src/modules/cpf-ocr/cpfOcrStateMachine.d.ts
|
|
44
|
-
type CpfOcrContext = {
|
|
45
|
-
cpf: string;
|
|
46
|
-
isValid: boolean;
|
|
47
|
-
error: string | undefined;
|
|
48
|
-
};
|
|
49
|
-
type CpfOcrInput = Record<string, never>;
|
|
50
|
-
declare const cpfOcrMachine: xstate738.StateMachine<CpfOcrContext, {
|
|
51
|
-
type: "LOAD";
|
|
52
|
-
} | {
|
|
53
|
-
type: "SET_CPF";
|
|
54
|
-
cpf: string;
|
|
55
|
-
} | {
|
|
56
|
-
type: "SUBMIT";
|
|
57
|
-
} | {
|
|
58
|
-
type: "RETRY";
|
|
59
|
-
}, {
|
|
60
|
-
[x: string]: xstate738.ActorRefFromLogic<xstate738.PromiseActorLogic<CpfOcrDataResponse, void, xstate738.EventObject>> | xstate738.ActorRefFromLogic<xstate738.PromiseActorLogic<CpfOcrUpdateResponse, {
|
|
61
|
-
cpf: string;
|
|
62
|
-
}, xstate738.EventObject>> | undefined;
|
|
63
|
-
}, xstate738.Values<{
|
|
64
|
-
fetchCpfOcrData: {
|
|
65
|
-
src: "fetchCpfOcrData";
|
|
66
|
-
logic: xstate738.PromiseActorLogic<CpfOcrDataResponse, void, xstate738.EventObject>;
|
|
67
|
-
id: string | undefined;
|
|
68
|
-
};
|
|
69
|
-
submitCpfOcr: {
|
|
70
|
-
src: "submitCpfOcr";
|
|
71
|
-
logic: xstate738.PromiseActorLogic<CpfOcrUpdateResponse, {
|
|
72
|
-
cpf: string;
|
|
73
|
-
}, xstate738.EventObject>;
|
|
74
|
-
id: string | undefined;
|
|
75
|
-
};
|
|
76
|
-
}>, xstate738.Values<{
|
|
77
|
-
setError: {
|
|
78
|
-
type: "setError";
|
|
79
|
-
params: xstate738.NonReducibleUnknown;
|
|
80
|
-
};
|
|
81
|
-
clearError: {
|
|
82
|
-
type: "clearError";
|
|
83
|
-
params: xstate738.NonReducibleUnknown;
|
|
84
|
-
};
|
|
85
|
-
setPrefill: {
|
|
86
|
-
type: "setPrefill";
|
|
87
|
-
params: xstate738.NonReducibleUnknown;
|
|
88
|
-
};
|
|
89
|
-
setCpf: {
|
|
90
|
-
type: "setCpf";
|
|
91
|
-
params: xstate738.NonReducibleUnknown;
|
|
92
|
-
};
|
|
93
|
-
}>, {
|
|
94
|
-
type: "isValid";
|
|
95
|
-
params: unknown;
|
|
96
|
-
}, never, "error" | "idle" | "finished" | "loading" | "submitting" | "inputting", string, CpfOcrInput, xstate738.NonReducibleUnknown, xstate738.EventObject, xstate738.MetaObject, {
|
|
97
|
-
readonly id: "cpfOcr";
|
|
98
|
-
readonly initial: "idle";
|
|
99
|
-
readonly context: {
|
|
100
|
-
readonly cpf: "";
|
|
101
|
-
readonly isValid: false;
|
|
102
|
-
readonly error: undefined;
|
|
103
|
-
};
|
|
104
|
-
readonly states: {
|
|
105
|
-
readonly idle: {
|
|
106
|
-
readonly on: {
|
|
107
|
-
readonly LOAD: "loading";
|
|
108
|
-
};
|
|
109
|
-
};
|
|
110
|
-
readonly loading: {
|
|
111
|
-
readonly invoke: {
|
|
112
|
-
readonly src: "fetchCpfOcrData";
|
|
113
|
-
readonly onDone: {
|
|
114
|
-
readonly target: "inputting";
|
|
115
|
-
readonly actions: "setPrefill";
|
|
116
|
-
};
|
|
117
|
-
readonly onError: {
|
|
118
|
-
readonly target: "error";
|
|
119
|
-
readonly actions: "setError";
|
|
120
|
-
};
|
|
121
|
-
};
|
|
122
|
-
};
|
|
123
|
-
readonly inputting: {
|
|
124
|
-
readonly on: {
|
|
125
|
-
readonly SET_CPF: {
|
|
126
|
-
readonly actions: "setCpf";
|
|
127
|
-
};
|
|
128
|
-
readonly SUBMIT: {
|
|
129
|
-
readonly guard: "isValid";
|
|
130
|
-
readonly target: "submitting";
|
|
131
|
-
};
|
|
132
|
-
};
|
|
133
|
-
};
|
|
134
|
-
readonly submitting: {
|
|
135
|
-
readonly invoke: {
|
|
136
|
-
readonly src: "submitCpfOcr";
|
|
137
|
-
readonly input: ({
|
|
138
|
-
context
|
|
139
|
-
}: {
|
|
140
|
-
context: CpfOcrContext;
|
|
141
|
-
event: {
|
|
142
|
-
type: "LOAD";
|
|
143
|
-
} | {
|
|
144
|
-
type: "SET_CPF";
|
|
145
|
-
cpf: string;
|
|
146
|
-
} | {
|
|
147
|
-
type: "SUBMIT";
|
|
148
|
-
} | {
|
|
149
|
-
type: "RETRY";
|
|
150
|
-
};
|
|
151
|
-
self: xstate738.ActorRef<xstate738.MachineSnapshot<CpfOcrContext, {
|
|
152
|
-
type: "LOAD";
|
|
153
|
-
} | {
|
|
154
|
-
type: "SET_CPF";
|
|
155
|
-
cpf: string;
|
|
156
|
-
} | {
|
|
157
|
-
type: "SUBMIT";
|
|
158
|
-
} | {
|
|
159
|
-
type: "RETRY";
|
|
160
|
-
}, Record<string, xstate738.AnyActorRef>, xstate738.StateValue, string, unknown, any, any>, {
|
|
161
|
-
type: "LOAD";
|
|
162
|
-
} | {
|
|
163
|
-
type: "SET_CPF";
|
|
164
|
-
cpf: string;
|
|
165
|
-
} | {
|
|
166
|
-
type: "SUBMIT";
|
|
167
|
-
} | {
|
|
168
|
-
type: "RETRY";
|
|
169
|
-
}, xstate738.AnyEventObject>;
|
|
170
|
-
}) => {
|
|
171
|
-
cpf: string;
|
|
172
|
-
};
|
|
173
|
-
readonly onDone: {
|
|
174
|
-
readonly target: "finished";
|
|
175
|
-
};
|
|
176
|
-
readonly onError: {
|
|
177
|
-
readonly target: "error";
|
|
178
|
-
readonly actions: "setError";
|
|
179
|
-
};
|
|
180
|
-
};
|
|
181
|
-
};
|
|
182
|
-
readonly error: {
|
|
183
|
-
readonly on: {
|
|
184
|
-
readonly RETRY: {
|
|
185
|
-
readonly target: "loading";
|
|
186
|
-
readonly actions: "clearError";
|
|
187
|
-
};
|
|
188
|
-
readonly SET_CPF: {
|
|
189
|
-
readonly target: "inputting";
|
|
190
|
-
readonly actions: "setCpf";
|
|
191
|
-
};
|
|
192
|
-
};
|
|
193
|
-
};
|
|
194
|
-
readonly finished: {
|
|
195
|
-
readonly type: "final";
|
|
196
|
-
};
|
|
197
|
-
};
|
|
198
|
-
}>;
|
|
199
|
-
//#endregion
|
|
200
5
|
//#region src/modules/cpf-ocr/cpfOcrUtils.d.ts
|
|
201
6
|
declare function formatCPF(value: string): string;
|
|
202
7
|
declare function isValidCPF(value: string): boolean;
|
|
203
8
|
//#endregion
|
|
204
|
-
export { type CpfOcrManager, type CpfOcrState, cpfOcrMachine, createCpfOcrManager, formatCPF, isValidCPF };
|
|
9
|
+
export { type CpfOcrActor, type CpfOcrManager, type CpfOcrState, cpfOcrMachine, createCpfOcrManager, createCpfOcrManagerFromActor, formatCPF, isValidCPF };
|
package/dist/cpf-ocr.esm.js
CHANGED
|
@@ -1,177 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { t as
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const res = await api.get(endpoints.ocrData, { signal });
|
|
10
|
-
if (!res.ok) throw new Error(`GET ${endpoints.ocrData} failed: ${res.status} ${res.statusText}`);
|
|
11
|
-
return res.data;
|
|
12
|
-
}
|
|
13
|
-
async function submitCpfOcr(documentNumber, signal) {
|
|
14
|
-
const res = await api.put(endpoints.updateSession, { documentNumber }, { signal });
|
|
15
|
-
if (!res.ok) throw new Error(`PUT ${endpoints.updateSession} failed: ${res.status} ${res.statusText}`);
|
|
16
|
-
return res.data;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
//#endregion
|
|
20
|
-
//#region src/modules/cpf-ocr/cpfOcrUtils.ts
|
|
21
|
-
function formatCPF(value) {
|
|
22
|
-
const digits = value.replace(/\D/g, "").slice(0, 11);
|
|
23
|
-
const first = digits.slice(0, 3);
|
|
24
|
-
const second = digits.slice(3, 6);
|
|
25
|
-
const third = digits.slice(6, 9);
|
|
26
|
-
const verifier = digits.slice(9, 11);
|
|
27
|
-
if (digits.length > 9) return `${first}.${second}.${third}-${verifier}`;
|
|
28
|
-
if (digits.length > 6) return `${first}.${second}.${third}`;
|
|
29
|
-
if (digits.length > 3) return `${first}.${second}`;
|
|
30
|
-
return first;
|
|
31
|
-
}
|
|
32
|
-
function isValidCPF(value) {
|
|
33
|
-
return validateCPF(value);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
//#endregion
|
|
37
|
-
//#region src/modules/cpf-ocr/cpfOcrStateMachine.ts
|
|
38
|
-
const cpfOcrMachine = setup({
|
|
39
|
-
types: {
|
|
40
|
-
context: {},
|
|
41
|
-
events: {},
|
|
42
|
-
input: {}
|
|
43
|
-
},
|
|
44
|
-
actors: {
|
|
45
|
-
fetchCpfOcrData: fromPromise(async ({ signal }) => fetchCpfOcrData(signal)),
|
|
46
|
-
submitCpfOcr: fromPromise(async ({ input, signal }) => submitCpfOcr(input.cpf, signal))
|
|
47
|
-
},
|
|
48
|
-
actions: {
|
|
49
|
-
setPrefill: assign(({ event }) => {
|
|
50
|
-
const output = event.output;
|
|
51
|
-
const cpf = formatCPF(output.documentNumber ?? "");
|
|
52
|
-
return {
|
|
53
|
-
cpf,
|
|
54
|
-
isValid: isValidCPF(cpf),
|
|
55
|
-
error: void 0
|
|
56
|
-
};
|
|
57
|
-
}),
|
|
58
|
-
setCpf: assign(({ event }) => {
|
|
59
|
-
const cpf = formatCPF(event.cpf);
|
|
60
|
-
return {
|
|
61
|
-
cpf,
|
|
62
|
-
isValid: isValidCPF(cpf),
|
|
63
|
-
error: void 0
|
|
64
|
-
};
|
|
65
|
-
}),
|
|
66
|
-
setError: assign(({ event }) => ({ error: String(event.error) })),
|
|
67
|
-
clearError: assign({ error: () => void 0 })
|
|
68
|
-
},
|
|
69
|
-
guards: { isValid: ({ context }) => context.isValid }
|
|
70
|
-
}).createMachine({
|
|
71
|
-
id: "cpfOcr",
|
|
72
|
-
initial: "idle",
|
|
73
|
-
context: {
|
|
74
|
-
cpf: "",
|
|
75
|
-
isValid: false,
|
|
76
|
-
error: void 0
|
|
77
|
-
},
|
|
78
|
-
states: {
|
|
79
|
-
idle: { on: { LOAD: "loading" } },
|
|
80
|
-
loading: { invoke: {
|
|
81
|
-
src: "fetchCpfOcrData",
|
|
82
|
-
onDone: {
|
|
83
|
-
target: "inputting",
|
|
84
|
-
actions: "setPrefill"
|
|
85
|
-
},
|
|
86
|
-
onError: {
|
|
87
|
-
target: "error",
|
|
88
|
-
actions: "setError"
|
|
89
|
-
}
|
|
90
|
-
} },
|
|
91
|
-
inputting: { on: {
|
|
92
|
-
SET_CPF: { actions: "setCpf" },
|
|
93
|
-
SUBMIT: {
|
|
94
|
-
guard: "isValid",
|
|
95
|
-
target: "submitting"
|
|
96
|
-
}
|
|
97
|
-
} },
|
|
98
|
-
submitting: { invoke: {
|
|
99
|
-
src: "submitCpfOcr",
|
|
100
|
-
input: ({ context }) => ({ cpf: context.cpf }),
|
|
101
|
-
onDone: { target: "finished" },
|
|
102
|
-
onError: {
|
|
103
|
-
target: "error",
|
|
104
|
-
actions: "setError"
|
|
105
|
-
}
|
|
106
|
-
} },
|
|
107
|
-
error: { on: {
|
|
108
|
-
RETRY: {
|
|
109
|
-
target: "loading",
|
|
110
|
-
actions: "clearError"
|
|
111
|
-
},
|
|
112
|
-
SET_CPF: {
|
|
113
|
-
target: "inputting",
|
|
114
|
-
actions: "setCpf"
|
|
115
|
-
}
|
|
116
|
-
} },
|
|
117
|
-
finished: { type: "final" }
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
|
|
121
|
-
//#endregion
|
|
122
|
-
//#region src/modules/cpf-ocr/cpfOcrActor.ts
|
|
123
|
-
function createCpfOcrActor() {
|
|
124
|
-
return createActor(cpfOcrMachine, { input: {} }).start();
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
//#endregion
|
|
128
|
-
//#region src/modules/cpf-ocr/cpfOcrManager.ts
|
|
129
|
-
function mapState(snapshot) {
|
|
130
|
-
const { context } = snapshot;
|
|
131
|
-
if (snapshot.matches("idle")) return { status: "idle" };
|
|
132
|
-
if (snapshot.matches("loading")) return { status: "loading" };
|
|
133
|
-
if (snapshot.matches("inputting")) return {
|
|
134
|
-
status: "inputting",
|
|
135
|
-
cpf: context.cpf,
|
|
136
|
-
isValid: context.isValid
|
|
137
|
-
};
|
|
138
|
-
if (snapshot.matches("submitting")) return { status: "submitting" };
|
|
139
|
-
if (snapshot.matches("error")) return {
|
|
140
|
-
status: "error",
|
|
141
|
-
error: context.error ?? "Unknown error"
|
|
142
|
-
};
|
|
143
|
-
if (snapshot.matches("finished")) return { status: "finished" };
|
|
144
|
-
return { status: "idle" };
|
|
145
|
-
}
|
|
146
|
-
function createApi({ actor, trackElementClicked }) {
|
|
147
|
-
return {
|
|
148
|
-
load() {
|
|
149
|
-
actor.send({ type: "LOAD" });
|
|
150
|
-
},
|
|
151
|
-
setCpf(cpf) {
|
|
152
|
-
actor.send({
|
|
153
|
-
type: "SET_CPF",
|
|
154
|
-
cpf
|
|
155
|
-
});
|
|
156
|
-
},
|
|
157
|
-
submit() {
|
|
158
|
-
trackElementClicked?.("continue");
|
|
159
|
-
actor.send({ type: "SUBMIT" });
|
|
160
|
-
},
|
|
161
|
-
retry() {
|
|
162
|
-
trackElementClicked?.("retry");
|
|
163
|
-
actor.send({ type: "RETRY" });
|
|
164
|
-
}
|
|
165
|
-
};
|
|
166
|
-
}
|
|
167
|
-
function createCpfOcrManager() {
|
|
168
|
-
return createManager({
|
|
169
|
-
actor: createCpfOcrActor(),
|
|
170
|
-
mapState,
|
|
171
|
-
createApi,
|
|
172
|
-
instrumentation: createManagerInstrumentation(eventModuleNames.idOcr)
|
|
173
|
-
});
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
//#endregion
|
|
177
|
-
export { cpfOcrMachine, createCpfOcrManager, formatCPF, isValidCPF };
|
|
1
|
+
import "./api-CESGtpbH.esm.js";
|
|
2
|
+
import "./events-Dvvriq9l.esm.js";
|
|
3
|
+
import "./endpoints-BeTK0Mlt.esm.js";
|
|
4
|
+
import "./xstate.esm-C9wncMQa.esm.js";
|
|
5
|
+
import { a as isValidCPF, i as formatCPF, n as createCpfOcrManagerFromActor, r as cpfOcrMachine, t as createCpfOcrManager } from "./cpfOcrManager-sSKegxox.esm.js";
|
|
6
|
+
import "./cpf-BRzggV8G.esm.js";
|
|
7
|
+
|
|
8
|
+
export { cpfOcrMachine, createCpfOcrManager, createCpfOcrManagerFromActor, formatCPF, isValidCPF };
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import { t as Manager } from "./Manager-BHn8wH8K.js";
|
|
2
|
+
import { t as ActorRefFrom } from "./Actor-Y0_Fj-KL.js";
|
|
3
|
+
import * as xstate1087 from "xstate";
|
|
4
|
+
|
|
5
|
+
//#region src/modules/cpf-ocr/types.d.ts
|
|
6
|
+
type CpfOcrDataResponse = {
|
|
7
|
+
documentNumber?: string;
|
|
8
|
+
};
|
|
9
|
+
type CpfOcrUpdateResponse = {
|
|
10
|
+
success?: boolean;
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
//#region src/modules/cpf-ocr/cpfOcrStateMachine.d.ts
|
|
14
|
+
type CpfOcrContext = {
|
|
15
|
+
cpf: string;
|
|
16
|
+
isValid: boolean;
|
|
17
|
+
error: string | undefined;
|
|
18
|
+
};
|
|
19
|
+
type CpfOcrInput = Record<string, never>;
|
|
20
|
+
declare const cpfOcrMachine: xstate1087.StateMachine<CpfOcrContext, {
|
|
21
|
+
type: "LOAD";
|
|
22
|
+
} | {
|
|
23
|
+
type: "SET_CPF";
|
|
24
|
+
cpf: string;
|
|
25
|
+
} | {
|
|
26
|
+
type: "SUBMIT";
|
|
27
|
+
} | {
|
|
28
|
+
type: "RETRY";
|
|
29
|
+
}, {
|
|
30
|
+
[x: string]: xstate1087.ActorRefFromLogic<xstate1087.PromiseActorLogic<CpfOcrDataResponse, void, xstate1087.EventObject>> | xstate1087.ActorRefFromLogic<xstate1087.PromiseActorLogic<CpfOcrUpdateResponse, {
|
|
31
|
+
cpf: string;
|
|
32
|
+
}, xstate1087.EventObject>> | undefined;
|
|
33
|
+
}, xstate1087.Values<{
|
|
34
|
+
fetchCpfOcrData: {
|
|
35
|
+
src: "fetchCpfOcrData";
|
|
36
|
+
logic: xstate1087.PromiseActorLogic<CpfOcrDataResponse, void, xstate1087.EventObject>;
|
|
37
|
+
id: string | undefined;
|
|
38
|
+
};
|
|
39
|
+
submitCpfOcr: {
|
|
40
|
+
src: "submitCpfOcr";
|
|
41
|
+
logic: xstate1087.PromiseActorLogic<CpfOcrUpdateResponse, {
|
|
42
|
+
cpf: string;
|
|
43
|
+
}, xstate1087.EventObject>;
|
|
44
|
+
id: string | undefined;
|
|
45
|
+
};
|
|
46
|
+
}>, xstate1087.Values<{
|
|
47
|
+
setError: {
|
|
48
|
+
type: "setError";
|
|
49
|
+
params: xstate1087.NonReducibleUnknown;
|
|
50
|
+
};
|
|
51
|
+
clearError: {
|
|
52
|
+
type: "clearError";
|
|
53
|
+
params: xstate1087.NonReducibleUnknown;
|
|
54
|
+
};
|
|
55
|
+
setPrefill: {
|
|
56
|
+
type: "setPrefill";
|
|
57
|
+
params: xstate1087.NonReducibleUnknown;
|
|
58
|
+
};
|
|
59
|
+
setCpf: {
|
|
60
|
+
type: "setCpf";
|
|
61
|
+
params: xstate1087.NonReducibleUnknown;
|
|
62
|
+
};
|
|
63
|
+
}>, {
|
|
64
|
+
type: "isValid";
|
|
65
|
+
params: unknown;
|
|
66
|
+
}, never, "error" | "idle" | "finished" | "loading" | "submitting" | "inputting", string, CpfOcrInput, xstate1087.NonReducibleUnknown, xstate1087.EventObject, xstate1087.MetaObject, {
|
|
67
|
+
readonly id: "cpfOcr";
|
|
68
|
+
readonly initial: "idle";
|
|
69
|
+
readonly context: {
|
|
70
|
+
readonly cpf: "";
|
|
71
|
+
readonly isValid: false;
|
|
72
|
+
readonly error: undefined;
|
|
73
|
+
};
|
|
74
|
+
readonly states: {
|
|
75
|
+
readonly idle: {
|
|
76
|
+
readonly on: {
|
|
77
|
+
readonly LOAD: "loading";
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
readonly loading: {
|
|
81
|
+
readonly invoke: {
|
|
82
|
+
readonly src: "fetchCpfOcrData";
|
|
83
|
+
readonly onDone: {
|
|
84
|
+
readonly target: "inputting";
|
|
85
|
+
readonly actions: "setPrefill";
|
|
86
|
+
};
|
|
87
|
+
readonly onError: {
|
|
88
|
+
readonly target: "error";
|
|
89
|
+
readonly actions: "setError";
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
readonly inputting: {
|
|
94
|
+
readonly on: {
|
|
95
|
+
readonly SET_CPF: {
|
|
96
|
+
readonly actions: "setCpf";
|
|
97
|
+
};
|
|
98
|
+
readonly SUBMIT: {
|
|
99
|
+
readonly guard: "isValid";
|
|
100
|
+
readonly target: "submitting";
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
readonly submitting: {
|
|
105
|
+
readonly invoke: {
|
|
106
|
+
readonly src: "submitCpfOcr";
|
|
107
|
+
readonly input: ({
|
|
108
|
+
context
|
|
109
|
+
}: {
|
|
110
|
+
context: CpfOcrContext;
|
|
111
|
+
event: {
|
|
112
|
+
type: "LOAD";
|
|
113
|
+
} | {
|
|
114
|
+
type: "SET_CPF";
|
|
115
|
+
cpf: string;
|
|
116
|
+
} | {
|
|
117
|
+
type: "SUBMIT";
|
|
118
|
+
} | {
|
|
119
|
+
type: "RETRY";
|
|
120
|
+
};
|
|
121
|
+
self: xstate1087.ActorRef<xstate1087.MachineSnapshot<CpfOcrContext, {
|
|
122
|
+
type: "LOAD";
|
|
123
|
+
} | {
|
|
124
|
+
type: "SET_CPF";
|
|
125
|
+
cpf: string;
|
|
126
|
+
} | {
|
|
127
|
+
type: "SUBMIT";
|
|
128
|
+
} | {
|
|
129
|
+
type: "RETRY";
|
|
130
|
+
}, Record<string, xstate1087.AnyActorRef>, xstate1087.StateValue, string, unknown, any, any>, {
|
|
131
|
+
type: "LOAD";
|
|
132
|
+
} | {
|
|
133
|
+
type: "SET_CPF";
|
|
134
|
+
cpf: string;
|
|
135
|
+
} | {
|
|
136
|
+
type: "SUBMIT";
|
|
137
|
+
} | {
|
|
138
|
+
type: "RETRY";
|
|
139
|
+
}, xstate1087.AnyEventObject>;
|
|
140
|
+
}) => {
|
|
141
|
+
cpf: string;
|
|
142
|
+
};
|
|
143
|
+
readonly onDone: {
|
|
144
|
+
readonly target: "finished";
|
|
145
|
+
};
|
|
146
|
+
readonly onError: {
|
|
147
|
+
readonly target: "error";
|
|
148
|
+
readonly actions: "setError";
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
readonly error: {
|
|
153
|
+
readonly on: {
|
|
154
|
+
readonly RETRY: {
|
|
155
|
+
readonly target: "loading";
|
|
156
|
+
readonly actions: "clearError";
|
|
157
|
+
};
|
|
158
|
+
readonly SET_CPF: {
|
|
159
|
+
readonly target: "inputting";
|
|
160
|
+
readonly actions: "setCpf";
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
readonly finished: {
|
|
165
|
+
readonly type: "final";
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
}>;
|
|
169
|
+
type CpfOcrMachine = typeof cpfOcrMachine;
|
|
170
|
+
//#endregion
|
|
171
|
+
//#region src/modules/cpf-ocr/cpfOcrActor.d.ts
|
|
172
|
+
type CpfOcrActor = ActorRefFrom<CpfOcrMachine>;
|
|
173
|
+
//#endregion
|
|
174
|
+
//#region src/modules/cpf-ocr/cpfOcrManager.d.ts
|
|
175
|
+
type CpfOcrIdleState = {
|
|
176
|
+
status: 'idle';
|
|
177
|
+
};
|
|
178
|
+
type CpfOcrLoadingState = {
|
|
179
|
+
status: 'loading';
|
|
180
|
+
};
|
|
181
|
+
type CpfOcrInputtingState = {
|
|
182
|
+
status: 'inputting';
|
|
183
|
+
cpf: string;
|
|
184
|
+
isValid: boolean;
|
|
185
|
+
};
|
|
186
|
+
type CpfOcrSubmittingState = {
|
|
187
|
+
status: 'submitting';
|
|
188
|
+
};
|
|
189
|
+
type CpfOcrErrorState = {
|
|
190
|
+
status: 'error';
|
|
191
|
+
error: string;
|
|
192
|
+
};
|
|
193
|
+
type CpfOcrFinishedState = {
|
|
194
|
+
status: 'finished';
|
|
195
|
+
};
|
|
196
|
+
type CpfOcrState = CpfOcrIdleState | CpfOcrLoadingState | CpfOcrInputtingState | CpfOcrSubmittingState | CpfOcrErrorState | CpfOcrFinishedState;
|
|
197
|
+
declare function createCpfOcrManager(): Manager<CpfOcrState> & {
|
|
198
|
+
load(): void;
|
|
199
|
+
setCpf(cpf: string): void;
|
|
200
|
+
submit(): void;
|
|
201
|
+
retry(): void;
|
|
202
|
+
};
|
|
203
|
+
/**
|
|
204
|
+
* Creates a CPF-OCR manager from a pre-built actor.
|
|
205
|
+
* Use this when overriding the machine via `.provide()` for custom backends
|
|
206
|
+
* or for story-isolation testing.
|
|
207
|
+
*/
|
|
208
|
+
declare function createCpfOcrManagerFromActor(actor: CpfOcrActor): Manager<CpfOcrState> & {
|
|
209
|
+
load(): void;
|
|
210
|
+
setCpf(cpf: string): void;
|
|
211
|
+
submit(): void;
|
|
212
|
+
retry(): void;
|
|
213
|
+
};
|
|
214
|
+
type CpfOcrManager = ReturnType<typeof createCpfOcrManager>;
|
|
215
|
+
//#endregion
|
|
216
|
+
export { CpfOcrActor as a, createCpfOcrManagerFromActor as i, CpfOcrState as n, cpfOcrMachine as o, createCpfOcrManager as r, CpfOcrManager as t };
|