@incodetech/core 0.0.0-dev-20260423-427a341 → 0.0.0-dev-20260423-672ea74
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/{OpenViduRecordingProvider-3SvbmWdi.esm.js → OpenViduRecordingProvider-7PqRexCU.esm.js} +1 -1
- package/dist/{WasmUtilProvider-DmbBSMl1.esm.js → WasmUtilProvider-3sS7TzsG.esm.js} +1 -1
- package/dist/{addressSearch-BvpzLWr4.esm.js → addressSearch-CMO_-Isa.esm.js} +4 -4
- package/dist/{ae-signature-21vUGDha.esm.js → ae-signature-C07fpdHw.esm.js} +1 -1
- package/dist/ae-signature.d.ts +3 -3
- package/dist/ae-signature.esm.js +5 -5
- package/dist/antifraud.d.ts +1 -1
- package/dist/antifraud.esm.js +4 -4
- package/dist/{antifraudStateMachine-CIa-IPvP.esm.js → antifraudStateMachine-BOUj16Hj.esm.js} +3 -3
- package/dist/authentication.d.ts +11 -11
- package/dist/authentication.esm.js +22 -22
- package/dist/{authenticationManager-Bv9qL5fe.d.ts → authenticationManager-CGn-1c-V.d.ts} +2 -2
- package/dist/{authenticationManager-WLXkr-r0.esm.js → authenticationManager-URLydvU9.esm.js} +6 -6
- package/dist/{authenticationStateMachine-BifJqMei.esm.js → authenticationStateMachine-D8N6ERZa.esm.js} +6 -6
- package/dist/{backCameraStream-DSwtYHuO.esm.js → backCameraStream-CrljCJ-Q.esm.js} +3 -3
- package/dist/camera.d.ts +1 -1
- package/dist/camera.esm.js +3 -3
- package/dist/consent.d.ts +55 -55
- package/dist/consent.esm.js +4 -4
- package/dist/{consentStateMachine-DqiR30gw.esm.js → consentStateMachine-Fa4KYzzn.esm.js} +3 -3
- package/dist/cpf-DEcHUluo.esm.js +38 -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 +5 -5
- package/dist/curp-validation.esm.js +4 -4
- package/dist/{curpValidationStateMachine-Bp-V13CB.esm.js → curpValidationStateMachine-oXdccErv.esm.js} +3 -3
- package/dist/custom-fields.d.ts +2 -2
- package/dist/custom-fields.esm.js +3 -3
- package/dist/custom-watchlist.d.ts +1 -1
- package/dist/custom-watchlist.esm.js +4 -4
- package/dist/{deepsightLoader-BTrehKGp.esm.js → deepsightLoader-QMFaZ2jE.esm.js} +10 -10
- package/dist/{deepsightService-BknZgccc.d.ts → deepsightService-BAbwxVdZ.d.ts} +2 -2
- package/dist/{deepsightService-B0Z-9gmQ.esm.js → deepsightService-BFLmC3ua.esm.js} +5 -5
- package/dist/device.esm.js +3 -3
- package/dist/document-capture.d.ts +70 -70
- package/dist/document-capture.esm.js +8 -8
- package/dist/document-upload.d.ts +44 -44
- package/dist/document-upload.esm.js +7 -7
- package/dist/{documentCaptureStateMachine-CtMhD27q.esm.js → documentCaptureStateMachine-B8bi2Kh4.esm.js} +5 -5
- package/dist/ekyb.d.ts +3 -3
- package/dist/ekyb.esm.js +10 -10
- package/dist/{ekybStateMachine-Bn-pLTcp.esm.js → ekybStateMachine-DruS8yRg.esm.js} +5 -5
- package/dist/ekyc.d.ts +3 -3
- package/dist/ekyc.esm.js +7 -6
- package/dist/{ekycStateMachine-Nmn0Alq9.esm.js → ekycStateMachine-U3ivS4-5.esm.js} +5 -38
- package/dist/electronic-signature.d.ts +3 -3
- package/dist/electronic-signature.esm.js +4 -4
- package/dist/{electronicSignatureManager-DAkg8MF6.esm.js → electronicSignatureManager-CWJyes3f.esm.js} +3 -3
- package/dist/email.d.ts +3 -3
- package/dist/email.esm.js +6 -6
- package/dist/{emailManager-q2qVoNbM.d.ts → emailManager-CCrXrAU3.d.ts} +2 -2
- package/dist/{emailManager-o6B6AYuE.esm.js → emailManager-y8HVFngo.esm.js} +3 -3
- package/dist/{emailStateMachine-B5M_HlVm.esm.js → emailStateMachine-bLpj4LRr.esm.js} +4 -4
- package/dist/{events-Deg_qfet.esm.js → events-BYuumPiB.esm.js} +6 -2
- package/dist/events.d.ts +1 -0
- package/dist/events.esm.js +2 -2
- package/dist/extensibility.d.ts +15 -15
- package/dist/extensibility.esm.js +33 -33
- package/dist/face-match.d.ts +1 -1
- package/dist/face-match.esm.js +4 -4
- package/dist/{faceCaptureManagerFactory-Bq_skXK4.esm.js → faceCaptureManagerFactory-0bTuXnNo.esm.js} +2 -2
- package/dist/{faceCaptureManagerFactory-DAQqd0EL.d.ts → faceCaptureManagerFactory-B9SCeUbN.d.ts} +8 -8
- package/dist/{faceCaptureSetup-C9RqcwR9.esm.js → faceCaptureSetup-BLsm9VU9.esm.js} +4 -4
- package/dist/{faceMatchStateMachine-DCh79GWp.esm.js → faceMatchStateMachine-CB5JYxiV.esm.js} +3 -3
- package/dist/flow.d.ts +8 -8
- package/dist/flow.esm.js +9 -9
- package/dist/{flowCompletionService-BnZC_DV0.esm.js → flowCompletionService-B0ua9_Oo.esm.js} +2 -2
- package/dist/{flowServices-s0CiH0WO.esm.js → flowServices-ngHx2Tal.esm.js} +3 -3
- package/dist/geolocation.d.ts +2 -2
- package/dist/geolocation.esm.js +5 -5
- package/dist/{geolocationStateMachine-CxQCX2NJ.esm.js → geolocationStateMachine-Cc2eFVZU.esm.js} +4 -4
- package/dist/{getDeviceClass-DStKSj3Q.esm.js → getDeviceClass-B_Y-Y-zj.esm.js} +1 -1
- package/dist/government-validation.d.ts +2 -2
- package/dist/government-validation.esm.js +5 -5
- package/dist/{governmentValidationStateMachine-L7nwlJPw.esm.js → governmentValidationStateMachine-wvZ5ysEM.esm.js} +4 -4
- package/dist/home.d.ts +14 -14
- package/dist/home.esm.js +3 -3
- package/dist/http.esm.js +1 -1
- package/dist/id-ocr.d.ts +627 -0
- package/dist/id-ocr.esm.js +459 -0
- package/dist/id.d.ts +10 -10
- package/dist/id.esm.js +22 -22
- package/dist/{idCaptureManager-C2L4R8rT.d.ts → idCaptureManager-B_dajBGr.d.ts} +7 -7
- package/dist/{idCaptureManager-Cuq1R8jW.esm.js → idCaptureManager-DvJEDPBW.esm.js} +4 -4
- package/dist/{idCaptureStateMachine-B1eBofuq.esm.js → idCaptureStateMachine-CgddydGJ.esm.js} +16 -16
- package/dist/identity-reuse.d.ts +49 -49
- package/dist/identity-reuse.esm.js +3 -3
- package/dist/{index-DMN6Upfk.d.ts → index-BbYUSiBn.d.ts} +120 -120
- package/dist/index.d.ts +2 -2
- package/dist/index.esm.js +8 -8
- package/dist/{lib-DP0jsq7O.esm.js → lib-Db1XxJuS.esm.js} +1 -1
- package/dist/mandatory-consent.d.ts +52 -52
- package/dist/mandatory-consent.esm.js +4 -4
- package/dist/{mandatoryConsentStateMachine-Bjqy6QyQ.esm.js → mandatoryConsentStateMachine-0bZm4vNr.esm.js} +3 -3
- package/dist/openviduLazy-ClEZ-Z5M.esm.js +3 -0
- package/dist/{openviduLazy-CYviBULf.esm.js → openviduLazy-sruV5sxi.esm.js} +2 -2
- package/dist/{permissionServices-BJJE4sgW.esm.js → permissionServices-BdE8_Evq.esm.js} +2 -2
- package/dist/phone.d.ts +3 -3
- package/dist/phone.esm.js +6 -6
- package/dist/{phoneManager-C4QrFxRg.esm.js → phoneManager-CfoEpjeM.esm.js} +3 -3
- package/dist/{phoneManager-DBwE-qB0.d.ts → phoneManager-Da8QkPv7.d.ts} +2 -2
- package/dist/{phoneStateMachine-CMbJx57_.esm.js → phoneStateMachine-u-A2hOxu.esm.js} +4 -4
- package/dist/{qe-signature-D7Ou3WtG.esm.js → qe-signature-DhBKlGUH.esm.js} +1 -1
- package/dist/qe-signature.d.ts +3 -3
- package/dist/qe-signature.esm.js +5 -5
- package/dist/{recordingService-CtcIvA3E.esm.js → recordingService-CpbeUNqo.esm.js} +13 -13
- package/dist/redirect-to-mobile.d.ts +2 -2
- package/dist/redirect-to-mobile.esm.js +5 -5
- package/dist/{redirectToMobileStateMachine-CtWjarUj.esm.js → redirectToMobileStateMachine-BMXJRSAC.esm.js} +4 -4
- package/dist/{runChildModule-DM84wxzE.esm.js → runChildModule-DHxT1RV0.esm.js} +1 -1
- package/dist/selfie.d.ts +11 -11
- package/dist/selfie.esm.js +22 -22
- package/dist/{selfieManager-CoyIn3Zl.esm.js → selfieManager-CkmC58-2.esm.js} +6 -6
- package/dist/{selfieManager-Cfp4MKMu.d.ts → selfieManager-dLehZvQm.d.ts} +2 -2
- package/dist/{selfieStateMachine-CsI9YnHz.esm.js → selfieStateMachine-BusOHMBN.esm.js} +3 -3
- package/dist/{session-CrOl1xma.esm.js → session-CEsW15cJ.esm.js} +4 -4
- package/dist/session.d.ts +1 -1
- package/dist/session.esm.js +6 -6
- package/dist/{setup-BFXhW7cP.esm.js → setup-BvlIJVhZ.esm.js} +5 -5
- package/dist/{setup-VJbRmBIU.d.ts → setup-v-TAsAN2.d.ts} +1 -1
- package/dist/signature.d.ts +2 -2
- package/dist/signature.esm.js +4 -4
- package/dist/{signatureStateMachine-yaoE2OEY.esm.js → signatureStateMachine-D6E5ZdHV.esm.js} +3 -3
- package/dist/{stats-BEwRvZG4.esm.js → stats-DE05K1o9.esm.js} +1 -1
- package/dist/stats.esm.js +2 -2
- package/dist/{types-CgZVig-j.d.ts → types-BelKmTqU.d.ts} +5 -1
- package/dist/{types-BINKuP3l.d.ts → types-BxjVn8Ry.d.ts} +1 -1
- package/dist/{types-BmHAVvm0.d.ts → types-DZ7Qw6Yc.d.ts} +1 -1
- package/dist/wasm.d.ts +2 -2
- package/dist/wasm.esm.js +8 -8
- package/dist/watchlist-for-business.d.ts +1 -1
- package/dist/watchlist-for-business.esm.js +3 -3
- package/dist/watchlist.d.ts +1 -1
- package/dist/watchlist.esm.js +4 -4
- package/dist/{watchlistServices-D2I0AZb-.esm.js → watchlistServices-BW1w845W.esm.js} +2 -2
- package/dist/workflow.d.ts +116 -116
- package/dist/workflow.esm.js +45 -44
- package/package.json +5 -1
- package/dist/openviduLazy-7pgMhjPB.esm.js +0 -3
- /package/dist/{Actor-B-9T-DlO.d.ts → Actor-gwS4PQSi.d.ts} +0 -0
- /package/dist/{BaseWasmProvider-Cf3MNlAN.esm.js → BaseWasmProvider-DsxKeFBt.esm.js} +0 -0
- /package/dist/{BrowserStorageProvider-Drw72wvG.esm.js → BrowserStorageProvider-D99-O_Kf.esm.js} +0 -0
- /package/dist/{BrowserTimerProvider-Dav3_fFy.esm.js → BrowserTimerProvider-Dl6dq0R8.esm.js} +0 -0
- /package/dist/{ITimerCapability-BriAkEyj.esm.js → ITimerCapability-DUFfKzTs.esm.js} +0 -0
- /package/dist/{IpifyProvider-j8lI27Fq.esm.js → IpifyProvider-BRMpdf22.esm.js} +0 -0
- /package/dist/{Manager-BCd4NBhe.d.ts → Manager-BmmucBrC.d.ts} +0 -0
- /package/dist/{MotionSensorProvider-DYYBm_bL.esm.js → MotionSensorProvider-Qfs1LN2o.esm.js} +0 -0
- /package/dist/{StateMachine-BNiyEj7J.d.ts → StateMachine-B1c7OspS.d.ts} +0 -0
- /package/dist/{api-CzVamIBG.esm.js → api-Bv7xXuMw.esm.js} +0 -0
- /package/dist/{browserSimulation-C4a2KVIY.esm.js → browserSimulation-CB1iKoSy.esm.js} +0 -0
- /package/dist/{camera-DaD3X_7m.esm.js → camera-BEKg9OFz.esm.js} +0 -0
- /package/dist/{camera-BZfRhPh2.d.ts → camera-CXfeCsaz.d.ts} +0 -0
- /package/dist/{chunk-DZf7laLq.esm.js → chunk-BPmmK_1R.esm.js} +0 -0
- /package/dist/{displayErrors-YTUUYe7G.d.ts → displayErrors-DT-jBLuo.d.ts} +0 -0
- /package/dist/{flowCompletionService-MFzwlktR.d.ts → flowCompletionService-BxOJeebo.d.ts} +0 -0
- /package/dist/{getBrowser-DxB_n8-W.esm.js → getBrowser-COVIk8a4.esm.js} +0 -0
- /package/dist/{platform-CTBj7PrA.esm.js → platform-bAk6j4kV.esm.js} +0 -0
- /package/dist/{types-CZwSG43_.d.ts → types-nURQ3pMv.d.ts} +0 -0
- /package/dist/{warmup-BR9x_9iz.d.ts → warmup-SnxLgQsT.d.ts} +0 -0
- /package/dist/{xstate.esm-BXNheqIe.esm.js → xstate.esm-DGcAhoQP.esm.js} +0 -0
package/dist/id-ocr.d.ts
ADDED
|
@@ -0,0 +1,627 @@
|
|
|
1
|
+
import { t as Manager } from "./Manager-BmmucBrC.js";
|
|
2
|
+
import "./Actor-gwS4PQSi.js";
|
|
3
|
+
import * as xstate648 from "xstate";
|
|
4
|
+
|
|
5
|
+
//#region src/modules/id-ocr/types.d.ts
|
|
6
|
+
type IdOcrConfig = {
|
|
7
|
+
/** Allows user to edit OCR information @default false */
|
|
8
|
+
editableOcr?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* When true (from flow/onboarding), after the first ID OCR step completes the
|
|
11
|
+
* machine loads and optionally edits OCR for the second captured ID.
|
|
12
|
+
*/
|
|
13
|
+
secondId?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Session flow id (injected by orchestrated flow UI). When listed in `CPFFlowIds`
|
|
16
|
+
* (`idOcrConsts`), only the CPF field is shown and validated; it maps to `documentNumber` on OCR.
|
|
17
|
+
*/
|
|
18
|
+
flowId?: string;
|
|
19
|
+
};
|
|
20
|
+
type NameBean = {
|
|
21
|
+
fullName?: string;
|
|
22
|
+
firstName?: string;
|
|
23
|
+
middleName?: string;
|
|
24
|
+
givenName?: string;
|
|
25
|
+
nameSuffix?: string;
|
|
26
|
+
paternalLastName?: string;
|
|
27
|
+
maternalLastName?: string;
|
|
28
|
+
lastNameMrz?: string;
|
|
29
|
+
};
|
|
30
|
+
type AddressBean = {
|
|
31
|
+
street?: string;
|
|
32
|
+
colony?: string;
|
|
33
|
+
postalCode?: string;
|
|
34
|
+
city?: string;
|
|
35
|
+
state?: string;
|
|
36
|
+
label?: string;
|
|
37
|
+
confidentGeolocation?: boolean;
|
|
38
|
+
};
|
|
39
|
+
type AddressStatements = {
|
|
40
|
+
_id: string;
|
|
41
|
+
dateType: string;
|
|
42
|
+
addressStatementTimestamp: number;
|
|
43
|
+
};
|
|
44
|
+
type OcrData = {
|
|
45
|
+
name: NameBean;
|
|
46
|
+
givenName?: string;
|
|
47
|
+
firstName?: string;
|
|
48
|
+
middleName?: string;
|
|
49
|
+
nameSuffix?: string;
|
|
50
|
+
mothersSurname?: string;
|
|
51
|
+
fathersSurname?: string;
|
|
52
|
+
nickName?: string;
|
|
53
|
+
address?: string;
|
|
54
|
+
street?: string;
|
|
55
|
+
colony?: string;
|
|
56
|
+
postalCode?: string;
|
|
57
|
+
city?: string;
|
|
58
|
+
state?: string;
|
|
59
|
+
stateCode?: string;
|
|
60
|
+
countryCode?: string;
|
|
61
|
+
addressFields?: AddressBean;
|
|
62
|
+
fullAddress?: boolean;
|
|
63
|
+
invalidAddress?: boolean;
|
|
64
|
+
checkedAddress?: string;
|
|
65
|
+
checkedAddressBean?: AddressBean;
|
|
66
|
+
exteriorNumber?: string;
|
|
67
|
+
interiorNumber?: string;
|
|
68
|
+
addressFromStatement?: string;
|
|
69
|
+
addressFieldsFromStatement?: AddressBean;
|
|
70
|
+
invalidAddressFromStatement?: boolean;
|
|
71
|
+
addressStatementEmissionDate?: number;
|
|
72
|
+
documentType?: string;
|
|
73
|
+
addressStatementTimestamps?: AddressStatements[];
|
|
74
|
+
poaName?: string;
|
|
75
|
+
typeOfId?: string;
|
|
76
|
+
documentFrontSubtype?: string;
|
|
77
|
+
documentBackSubtype?: string;
|
|
78
|
+
birthDate?: number | string;
|
|
79
|
+
gender?: string;
|
|
80
|
+
claveDeElector?: string;
|
|
81
|
+
curp?: string;
|
|
82
|
+
numeroEmisionCredencial?: string;
|
|
83
|
+
cic?: string;
|
|
84
|
+
ocr?: string;
|
|
85
|
+
documentNumber?: string;
|
|
86
|
+
personalNumber?: string;
|
|
87
|
+
refNumber?: string;
|
|
88
|
+
nue?: string;
|
|
89
|
+
externalId?: string;
|
|
90
|
+
issuedAt?: string;
|
|
91
|
+
expireAt?: string;
|
|
92
|
+
expirationDate?: number;
|
|
93
|
+
issueDate?: number;
|
|
94
|
+
registrationDate?: number;
|
|
95
|
+
issuingCountry?: string;
|
|
96
|
+
issuingState?: string;
|
|
97
|
+
birthPlace?: string;
|
|
98
|
+
issuingAuthority?: string;
|
|
99
|
+
height?: string;
|
|
100
|
+
weight?: string;
|
|
101
|
+
eyeColor?: string;
|
|
102
|
+
hairColor?: string;
|
|
103
|
+
bloodType?: string;
|
|
104
|
+
maritalStatus?: string;
|
|
105
|
+
nationality?: string;
|
|
106
|
+
nationalityMrz?: string;
|
|
107
|
+
classes?: string;
|
|
108
|
+
cond?: string;
|
|
109
|
+
mentions?: string;
|
|
110
|
+
restrictions?: string;
|
|
111
|
+
mrz1?: string;
|
|
112
|
+
mrz2?: string;
|
|
113
|
+
mrz3?: string;
|
|
114
|
+
fullNameMrz?: string;
|
|
115
|
+
documentNumberCheckDigit?: string;
|
|
116
|
+
dateOfBirthCheckDigit?: string;
|
|
117
|
+
expirationDateCheckDigit?: string;
|
|
118
|
+
fathersName?: string;
|
|
119
|
+
mothersName?: string;
|
|
120
|
+
federalRevenueNumber?: string;
|
|
121
|
+
originDocumentId?: string;
|
|
122
|
+
driversLicenseCategory?: string;
|
|
123
|
+
controlNumber?: string;
|
|
124
|
+
renach?: string;
|
|
125
|
+
ocrReliabilityConfidence?: number;
|
|
126
|
+
ocrDataConfidence?: unknown;
|
|
127
|
+
};
|
|
128
|
+
type UpdateOcrDataParams = {
|
|
129
|
+
address?: string;
|
|
130
|
+
documentNumber?: string;
|
|
131
|
+
name?: string;
|
|
132
|
+
firstName?: string;
|
|
133
|
+
lastName?: string;
|
|
134
|
+
paternalLastName?: string;
|
|
135
|
+
maternalLastName?: string;
|
|
136
|
+
personalNumber?: string;
|
|
137
|
+
curp?: string;
|
|
138
|
+
email?: string;
|
|
139
|
+
birthDate?: string;
|
|
140
|
+
expireAt?: string;
|
|
141
|
+
gender?: string;
|
|
142
|
+
issuingCountry?: string;
|
|
143
|
+
};
|
|
144
|
+
type ValidationRule = {
|
|
145
|
+
type: 'required';
|
|
146
|
+
} | {
|
|
147
|
+
type: 'minAge';
|
|
148
|
+
years: number;
|
|
149
|
+
} | {
|
|
150
|
+
type: 'cpf';
|
|
151
|
+
};
|
|
152
|
+
type OcrFieldConfig = {
|
|
153
|
+
key: keyof UpdateOcrDataParams;
|
|
154
|
+
labelKey: string;
|
|
155
|
+
type: 'text' | 'date' | 'radio';
|
|
156
|
+
options?: {
|
|
157
|
+
label: string;
|
|
158
|
+
value: string;
|
|
159
|
+
}[];
|
|
160
|
+
validation?: ValidationRule[];
|
|
161
|
+
required: boolean;
|
|
162
|
+
};
|
|
163
|
+
type UpdateOcrResponse = {
|
|
164
|
+
success: boolean;
|
|
165
|
+
};
|
|
166
|
+
//#endregion
|
|
167
|
+
//#region src/modules/id-ocr/idOcrStateMachine.d.ts
|
|
168
|
+
type IdOcrOcrDocument = 'first' | 'second';
|
|
169
|
+
type IdOcrContext = {
|
|
170
|
+
config: IdOcrConfig;
|
|
171
|
+
error?: string;
|
|
172
|
+
formData: UpdateOcrDataParams;
|
|
173
|
+
editedFields: UpdateOcrDataParams;
|
|
174
|
+
activeOcrDocument: IdOcrOcrDocument;
|
|
175
|
+
validationErrors?: Partial<Record<keyof UpdateOcrDataParams, string>>;
|
|
176
|
+
};
|
|
177
|
+
type IdOcrInput = {
|
|
178
|
+
config: IdOcrConfig;
|
|
179
|
+
};
|
|
180
|
+
declare const idOcrStateMachine: xstate648.StateMachine<IdOcrContext, {
|
|
181
|
+
type: "LOAD";
|
|
182
|
+
} | {
|
|
183
|
+
type: "DATA_CHANGED";
|
|
184
|
+
field: keyof UpdateOcrDataParams;
|
|
185
|
+
value: string;
|
|
186
|
+
} | {
|
|
187
|
+
type: "VALIDATE_FIELD";
|
|
188
|
+
field: keyof UpdateOcrDataParams;
|
|
189
|
+
} | {
|
|
190
|
+
type: "CONTINUE";
|
|
191
|
+
} | {
|
|
192
|
+
type: "RESET";
|
|
193
|
+
}, {
|
|
194
|
+
[x: string]: xstate648.ActorRefFromLogic<xstate648.PromiseActorLogic<OcrData, {
|
|
195
|
+
isSecondId: boolean;
|
|
196
|
+
}, xstate648.EventObject>> | xstate648.ActorRefFromLogic<xstate648.PromiseActorLogic<UpdateOcrResponse, {
|
|
197
|
+
params: UpdateOcrDataParams;
|
|
198
|
+
isSecondId: boolean;
|
|
199
|
+
}, xstate648.EventObject>> | undefined;
|
|
200
|
+
}, xstate648.Values<{
|
|
201
|
+
getOcrData: {
|
|
202
|
+
src: "getOcrData";
|
|
203
|
+
logic: xstate648.PromiseActorLogic<OcrData, {
|
|
204
|
+
isSecondId: boolean;
|
|
205
|
+
}, xstate648.EventObject>;
|
|
206
|
+
id: string | undefined;
|
|
207
|
+
};
|
|
208
|
+
updateOcrData: {
|
|
209
|
+
src: "updateOcrData";
|
|
210
|
+
logic: xstate648.PromiseActorLogic<UpdateOcrResponse, {
|
|
211
|
+
params: UpdateOcrDataParams;
|
|
212
|
+
isSecondId: boolean;
|
|
213
|
+
}, xstate648.EventObject>;
|
|
214
|
+
id: string | undefined;
|
|
215
|
+
};
|
|
216
|
+
}>, xstate648.Values<{
|
|
217
|
+
setError: {
|
|
218
|
+
type: "setError";
|
|
219
|
+
params: xstate648.NonReducibleUnknown;
|
|
220
|
+
};
|
|
221
|
+
setInitialData: {
|
|
222
|
+
type: "setInitialData";
|
|
223
|
+
params: xstate648.NonReducibleUnknown;
|
|
224
|
+
};
|
|
225
|
+
updateField: {
|
|
226
|
+
type: "updateField";
|
|
227
|
+
params: xstate648.NonReducibleUnknown;
|
|
228
|
+
};
|
|
229
|
+
clearFieldValidationError: {
|
|
230
|
+
type: "clearFieldValidationError";
|
|
231
|
+
params: xstate648.NonReducibleUnknown;
|
|
232
|
+
};
|
|
233
|
+
setOcrValidationErrors: {
|
|
234
|
+
type: "setOcrValidationErrors";
|
|
235
|
+
params: xstate648.NonReducibleUnknown;
|
|
236
|
+
};
|
|
237
|
+
validateFormField: {
|
|
238
|
+
type: "validateFormField";
|
|
239
|
+
params: xstate648.NonReducibleUnknown;
|
|
240
|
+
};
|
|
241
|
+
beginSecondIdOcrPhase: {
|
|
242
|
+
type: "beginSecondIdOcrPhase";
|
|
243
|
+
params: xstate648.NonReducibleUnknown;
|
|
244
|
+
};
|
|
245
|
+
resetForRetry: {
|
|
246
|
+
type: "resetForRetry";
|
|
247
|
+
params: xstate648.NonReducibleUnknown;
|
|
248
|
+
};
|
|
249
|
+
computeValidationResult: {
|
|
250
|
+
type: "computeValidationResult";
|
|
251
|
+
params: xstate648.NonReducibleUnknown;
|
|
252
|
+
};
|
|
253
|
+
}>, xstate648.Values<{
|
|
254
|
+
isOcrEditable: {
|
|
255
|
+
type: "isOcrEditable";
|
|
256
|
+
params: unknown;
|
|
257
|
+
};
|
|
258
|
+
shouldLoadSecondOcrAfterFirst: {
|
|
259
|
+
type: "shouldLoadSecondOcrAfterFirst";
|
|
260
|
+
params: unknown;
|
|
261
|
+
};
|
|
262
|
+
isOcrFormValid: {
|
|
263
|
+
type: "isOcrFormValid";
|
|
264
|
+
params: unknown;
|
|
265
|
+
};
|
|
266
|
+
shouldSubmit: {
|
|
267
|
+
type: "shouldSubmit";
|
|
268
|
+
params: unknown;
|
|
269
|
+
};
|
|
270
|
+
shouldProceedWithoutSubmitToSecondId: {
|
|
271
|
+
type: "shouldProceedWithoutSubmitToSecondId";
|
|
272
|
+
params: unknown;
|
|
273
|
+
};
|
|
274
|
+
}>, never, "error" | "idle" | "finished" | "loading" | "submitting" | "inputting" | "readonly" | "validatingContinue", string, IdOcrInput, xstate648.NonReducibleUnknown, xstate648.EventObject, xstate648.MetaObject, {
|
|
275
|
+
readonly id: "idOcr";
|
|
276
|
+
readonly initial: "idle";
|
|
277
|
+
readonly context: ({
|
|
278
|
+
input
|
|
279
|
+
}: {
|
|
280
|
+
spawn: {
|
|
281
|
+
<TSrc extends "getOcrData" | "updateOcrData">(logic: TSrc, ...[options]: ({
|
|
282
|
+
src: "getOcrData";
|
|
283
|
+
logic: xstate648.PromiseActorLogic<OcrData, {
|
|
284
|
+
isSecondId: boolean;
|
|
285
|
+
}, xstate648.EventObject>;
|
|
286
|
+
id: string | undefined;
|
|
287
|
+
} extends infer T ? T extends {
|
|
288
|
+
src: "getOcrData";
|
|
289
|
+
logic: xstate648.PromiseActorLogic<OcrData, {
|
|
290
|
+
isSecondId: boolean;
|
|
291
|
+
}, xstate648.EventObject>;
|
|
292
|
+
id: string | undefined;
|
|
293
|
+
} ? T extends {
|
|
294
|
+
src: TSrc;
|
|
295
|
+
} ? xstate648.ConditionalRequired<[options?: ({
|
|
296
|
+
id?: T["id"] | undefined;
|
|
297
|
+
systemId?: string;
|
|
298
|
+
input?: xstate648.InputFrom<T["logic"]> | undefined;
|
|
299
|
+
syncSnapshot?: boolean;
|
|
300
|
+
} & { [K in xstate648.RequiredActorOptions<T>]: unknown }) | undefined], xstate648.IsNotNever<xstate648.RequiredActorOptions<T>>> : never : never : never) | ({
|
|
301
|
+
src: "updateOcrData";
|
|
302
|
+
logic: xstate648.PromiseActorLogic<UpdateOcrResponse, {
|
|
303
|
+
params: UpdateOcrDataParams;
|
|
304
|
+
isSecondId: boolean;
|
|
305
|
+
}, xstate648.EventObject>;
|
|
306
|
+
id: string | undefined;
|
|
307
|
+
} extends infer T_1 ? T_1 extends {
|
|
308
|
+
src: "updateOcrData";
|
|
309
|
+
logic: xstate648.PromiseActorLogic<UpdateOcrResponse, {
|
|
310
|
+
params: UpdateOcrDataParams;
|
|
311
|
+
isSecondId: boolean;
|
|
312
|
+
}, xstate648.EventObject>;
|
|
313
|
+
id: string | undefined;
|
|
314
|
+
} ? T_1 extends {
|
|
315
|
+
src: TSrc;
|
|
316
|
+
} ? xstate648.ConditionalRequired<[options?: ({
|
|
317
|
+
id?: T_1["id"] | undefined;
|
|
318
|
+
systemId?: string;
|
|
319
|
+
input?: xstate648.InputFrom<T_1["logic"]> | undefined;
|
|
320
|
+
syncSnapshot?: boolean;
|
|
321
|
+
} & { [K_1 in xstate648.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate648.IsNotNever<xstate648.RequiredActorOptions<T_1>>> : never : never : never)): xstate648.ActorRefFromLogic<xstate648.GetConcreteByKey<xstate648.Values<{
|
|
322
|
+
getOcrData: {
|
|
323
|
+
src: "getOcrData";
|
|
324
|
+
logic: xstate648.PromiseActorLogic<OcrData, {
|
|
325
|
+
isSecondId: boolean;
|
|
326
|
+
}, xstate648.EventObject>;
|
|
327
|
+
id: string | undefined;
|
|
328
|
+
};
|
|
329
|
+
updateOcrData: {
|
|
330
|
+
src: "updateOcrData";
|
|
331
|
+
logic: xstate648.PromiseActorLogic<UpdateOcrResponse, {
|
|
332
|
+
params: UpdateOcrDataParams;
|
|
333
|
+
isSecondId: boolean;
|
|
334
|
+
}, xstate648.EventObject>;
|
|
335
|
+
id: string | undefined;
|
|
336
|
+
};
|
|
337
|
+
}>, "src", TSrc>["logic"]>;
|
|
338
|
+
<TLogic extends xstate648.AnyActorLogic>(src: TLogic, ...[options]: xstate648.ConditionalRequired<[options?: ({
|
|
339
|
+
id?: never;
|
|
340
|
+
systemId?: string;
|
|
341
|
+
input?: xstate648.InputFrom<TLogic> | undefined;
|
|
342
|
+
syncSnapshot?: boolean;
|
|
343
|
+
} & { [K in xstate648.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate648.IsNotNever<xstate648.RequiredLogicInput<TLogic>>>): xstate648.ActorRefFromLogic<TLogic>;
|
|
344
|
+
};
|
|
345
|
+
input: IdOcrInput;
|
|
346
|
+
self: xstate648.ActorRef<xstate648.MachineSnapshot<IdOcrContext, {
|
|
347
|
+
type: "LOAD";
|
|
348
|
+
} | {
|
|
349
|
+
type: "DATA_CHANGED";
|
|
350
|
+
field: keyof UpdateOcrDataParams;
|
|
351
|
+
value: string;
|
|
352
|
+
} | {
|
|
353
|
+
type: "VALIDATE_FIELD";
|
|
354
|
+
field: keyof UpdateOcrDataParams;
|
|
355
|
+
} | {
|
|
356
|
+
type: "CONTINUE";
|
|
357
|
+
} | {
|
|
358
|
+
type: "RESET";
|
|
359
|
+
}, Record<string, xstate648.AnyActorRef | undefined>, xstate648.StateValue, string, unknown, any, any>, {
|
|
360
|
+
type: "LOAD";
|
|
361
|
+
} | {
|
|
362
|
+
type: "DATA_CHANGED";
|
|
363
|
+
field: keyof UpdateOcrDataParams;
|
|
364
|
+
value: string;
|
|
365
|
+
} | {
|
|
366
|
+
type: "VALIDATE_FIELD";
|
|
367
|
+
field: keyof UpdateOcrDataParams;
|
|
368
|
+
} | {
|
|
369
|
+
type: "CONTINUE";
|
|
370
|
+
} | {
|
|
371
|
+
type: "RESET";
|
|
372
|
+
}, xstate648.AnyEventObject>;
|
|
373
|
+
}) => {
|
|
374
|
+
config: IdOcrConfig;
|
|
375
|
+
formData: UpdateOcrDataParams;
|
|
376
|
+
editedFields: {};
|
|
377
|
+
activeOcrDocument: IdOcrOcrDocument;
|
|
378
|
+
};
|
|
379
|
+
readonly states: {
|
|
380
|
+
readonly idle: {
|
|
381
|
+
readonly on: {
|
|
382
|
+
readonly LOAD: readonly [{
|
|
383
|
+
readonly target: "loading";
|
|
384
|
+
}];
|
|
385
|
+
};
|
|
386
|
+
};
|
|
387
|
+
readonly loading: {
|
|
388
|
+
readonly invoke: {
|
|
389
|
+
readonly src: "getOcrData";
|
|
390
|
+
readonly input: ({
|
|
391
|
+
context
|
|
392
|
+
}: {
|
|
393
|
+
context: IdOcrContext;
|
|
394
|
+
event: {
|
|
395
|
+
type: "LOAD";
|
|
396
|
+
} | {
|
|
397
|
+
type: "DATA_CHANGED";
|
|
398
|
+
field: keyof UpdateOcrDataParams;
|
|
399
|
+
value: string;
|
|
400
|
+
} | {
|
|
401
|
+
type: "VALIDATE_FIELD";
|
|
402
|
+
field: keyof UpdateOcrDataParams;
|
|
403
|
+
} | {
|
|
404
|
+
type: "CONTINUE";
|
|
405
|
+
} | {
|
|
406
|
+
type: "RESET";
|
|
407
|
+
};
|
|
408
|
+
self: xstate648.ActorRef<xstate648.MachineSnapshot<IdOcrContext, {
|
|
409
|
+
type: "LOAD";
|
|
410
|
+
} | {
|
|
411
|
+
type: "DATA_CHANGED";
|
|
412
|
+
field: keyof UpdateOcrDataParams;
|
|
413
|
+
value: string;
|
|
414
|
+
} | {
|
|
415
|
+
type: "VALIDATE_FIELD";
|
|
416
|
+
field: keyof UpdateOcrDataParams;
|
|
417
|
+
} | {
|
|
418
|
+
type: "CONTINUE";
|
|
419
|
+
} | {
|
|
420
|
+
type: "RESET";
|
|
421
|
+
}, Record<string, xstate648.AnyActorRef>, xstate648.StateValue, string, unknown, any, any>, {
|
|
422
|
+
type: "LOAD";
|
|
423
|
+
} | {
|
|
424
|
+
type: "DATA_CHANGED";
|
|
425
|
+
field: keyof UpdateOcrDataParams;
|
|
426
|
+
value: string;
|
|
427
|
+
} | {
|
|
428
|
+
type: "VALIDATE_FIELD";
|
|
429
|
+
field: keyof UpdateOcrDataParams;
|
|
430
|
+
} | {
|
|
431
|
+
type: "CONTINUE";
|
|
432
|
+
} | {
|
|
433
|
+
type: "RESET";
|
|
434
|
+
}, xstate648.AnyEventObject>;
|
|
435
|
+
}) => {
|
|
436
|
+
isSecondId: boolean;
|
|
437
|
+
};
|
|
438
|
+
readonly onDone: readonly [{
|
|
439
|
+
readonly target: "inputting";
|
|
440
|
+
readonly guard: "isOcrEditable";
|
|
441
|
+
readonly actions: "setInitialData";
|
|
442
|
+
}, {
|
|
443
|
+
readonly target: "readonly";
|
|
444
|
+
readonly actions: "setInitialData";
|
|
445
|
+
}];
|
|
446
|
+
readonly onError: {
|
|
447
|
+
readonly target: "error";
|
|
448
|
+
readonly actions: "setError";
|
|
449
|
+
};
|
|
450
|
+
};
|
|
451
|
+
};
|
|
452
|
+
readonly readonly: {
|
|
453
|
+
readonly on: {
|
|
454
|
+
readonly CONTINUE: readonly [{
|
|
455
|
+
readonly target: "loading";
|
|
456
|
+
readonly guard: "shouldLoadSecondOcrAfterFirst";
|
|
457
|
+
readonly actions: "beginSecondIdOcrPhase";
|
|
458
|
+
}, {
|
|
459
|
+
readonly target: "finished";
|
|
460
|
+
}];
|
|
461
|
+
};
|
|
462
|
+
};
|
|
463
|
+
readonly inputting: {
|
|
464
|
+
readonly on: {
|
|
465
|
+
readonly DATA_CHANGED: {
|
|
466
|
+
readonly actions: readonly ["updateField", "clearFieldValidationError"];
|
|
467
|
+
};
|
|
468
|
+
readonly VALIDATE_FIELD: {
|
|
469
|
+
readonly actions: "validateFormField";
|
|
470
|
+
};
|
|
471
|
+
readonly CONTINUE: {
|
|
472
|
+
readonly target: "validatingContinue";
|
|
473
|
+
};
|
|
474
|
+
};
|
|
475
|
+
};
|
|
476
|
+
readonly validatingContinue: {
|
|
477
|
+
readonly entry: "computeValidationResult";
|
|
478
|
+
readonly always: readonly [{
|
|
479
|
+
readonly guard: "shouldSubmit";
|
|
480
|
+
readonly target: "submitting";
|
|
481
|
+
}, {
|
|
482
|
+
readonly guard: "shouldProceedWithoutSubmitToSecondId";
|
|
483
|
+
readonly target: "loading";
|
|
484
|
+
readonly actions: "beginSecondIdOcrPhase";
|
|
485
|
+
}, {
|
|
486
|
+
readonly guard: "isOcrFormValid";
|
|
487
|
+
readonly target: "finished";
|
|
488
|
+
}, {
|
|
489
|
+
readonly target: "inputting";
|
|
490
|
+
}];
|
|
491
|
+
};
|
|
492
|
+
readonly submitting: {
|
|
493
|
+
readonly invoke: {
|
|
494
|
+
readonly src: "updateOcrData";
|
|
495
|
+
readonly input: ({
|
|
496
|
+
context
|
|
497
|
+
}: {
|
|
498
|
+
context: IdOcrContext;
|
|
499
|
+
event: {
|
|
500
|
+
type: "LOAD";
|
|
501
|
+
} | {
|
|
502
|
+
type: "DATA_CHANGED";
|
|
503
|
+
field: keyof UpdateOcrDataParams;
|
|
504
|
+
value: string;
|
|
505
|
+
} | {
|
|
506
|
+
type: "VALIDATE_FIELD";
|
|
507
|
+
field: keyof UpdateOcrDataParams;
|
|
508
|
+
} | {
|
|
509
|
+
type: "CONTINUE";
|
|
510
|
+
} | {
|
|
511
|
+
type: "RESET";
|
|
512
|
+
};
|
|
513
|
+
self: xstate648.ActorRef<xstate648.MachineSnapshot<IdOcrContext, {
|
|
514
|
+
type: "LOAD";
|
|
515
|
+
} | {
|
|
516
|
+
type: "DATA_CHANGED";
|
|
517
|
+
field: keyof UpdateOcrDataParams;
|
|
518
|
+
value: string;
|
|
519
|
+
} | {
|
|
520
|
+
type: "VALIDATE_FIELD";
|
|
521
|
+
field: keyof UpdateOcrDataParams;
|
|
522
|
+
} | {
|
|
523
|
+
type: "CONTINUE";
|
|
524
|
+
} | {
|
|
525
|
+
type: "RESET";
|
|
526
|
+
}, Record<string, xstate648.AnyActorRef>, xstate648.StateValue, string, unknown, any, any>, {
|
|
527
|
+
type: "LOAD";
|
|
528
|
+
} | {
|
|
529
|
+
type: "DATA_CHANGED";
|
|
530
|
+
field: keyof UpdateOcrDataParams;
|
|
531
|
+
value: string;
|
|
532
|
+
} | {
|
|
533
|
+
type: "VALIDATE_FIELD";
|
|
534
|
+
field: keyof UpdateOcrDataParams;
|
|
535
|
+
} | {
|
|
536
|
+
type: "CONTINUE";
|
|
537
|
+
} | {
|
|
538
|
+
type: "RESET";
|
|
539
|
+
}, xstate648.AnyEventObject>;
|
|
540
|
+
}) => {
|
|
541
|
+
params: UpdateOcrDataParams;
|
|
542
|
+
isSecondId: boolean;
|
|
543
|
+
};
|
|
544
|
+
readonly onDone: readonly [{
|
|
545
|
+
readonly target: "loading";
|
|
546
|
+
readonly guard: "shouldLoadSecondOcrAfterFirst";
|
|
547
|
+
readonly actions: "beginSecondIdOcrPhase";
|
|
548
|
+
}, {
|
|
549
|
+
readonly target: "finished";
|
|
550
|
+
}];
|
|
551
|
+
readonly onError: {
|
|
552
|
+
readonly target: "error";
|
|
553
|
+
readonly actions: "setError";
|
|
554
|
+
};
|
|
555
|
+
};
|
|
556
|
+
};
|
|
557
|
+
readonly finished: {
|
|
558
|
+
readonly type: "final";
|
|
559
|
+
};
|
|
560
|
+
readonly error: {
|
|
561
|
+
readonly on: {
|
|
562
|
+
readonly RESET: {
|
|
563
|
+
readonly target: "idle";
|
|
564
|
+
readonly actions: "resetForRetry";
|
|
565
|
+
};
|
|
566
|
+
};
|
|
567
|
+
};
|
|
568
|
+
};
|
|
569
|
+
}>;
|
|
570
|
+
//#endregion
|
|
571
|
+
//#region src/modules/id-ocr/idOcrActor.d.ts
|
|
572
|
+
type CreateIdOcrActorOptions = {
|
|
573
|
+
config: IdOcrConfig;
|
|
574
|
+
};
|
|
575
|
+
//#endregion
|
|
576
|
+
//#region src/modules/id-ocr/idOcrManager.d.ts
|
|
577
|
+
type IdOcrIdleState = {
|
|
578
|
+
status: 'idle';
|
|
579
|
+
};
|
|
580
|
+
type IdOcrLoadingState = {
|
|
581
|
+
status: 'loading';
|
|
582
|
+
ocrDocument: IdOcrOcrDocument;
|
|
583
|
+
};
|
|
584
|
+
type IdOcrReadonlyState = {
|
|
585
|
+
status: 'readonly';
|
|
586
|
+
formData: UpdateOcrDataParams;
|
|
587
|
+
editableOcr: boolean;
|
|
588
|
+
ocrDocument: IdOcrOcrDocument;
|
|
589
|
+
};
|
|
590
|
+
type IdOcrInputtingState = {
|
|
591
|
+
status: 'inputting';
|
|
592
|
+
formData: UpdateOcrDataParams;
|
|
593
|
+
diff: UpdateOcrDataParams;
|
|
594
|
+
editableOcr: boolean;
|
|
595
|
+
ocrDocument: IdOcrOcrDocument;
|
|
596
|
+
validationErrors?: Partial<Record<keyof UpdateOcrDataParams, string>>;
|
|
597
|
+
};
|
|
598
|
+
type IdOcrSubmittingState = {
|
|
599
|
+
status: 'submitting';
|
|
600
|
+
ocrDocument: IdOcrOcrDocument;
|
|
601
|
+
};
|
|
602
|
+
type IdOcrFinishedState = {
|
|
603
|
+
status: 'finished';
|
|
604
|
+
};
|
|
605
|
+
type IdOcrErrorState = {
|
|
606
|
+
status: 'error';
|
|
607
|
+
error: string;
|
|
608
|
+
};
|
|
609
|
+
type IdOcrState = IdOcrIdleState | IdOcrLoadingState | IdOcrReadonlyState | IdOcrInputtingState | IdOcrSubmittingState | IdOcrFinishedState | IdOcrErrorState;
|
|
610
|
+
declare function createIdOcrManager(options: CreateIdOcrActorOptions): Manager<IdOcrState> & {
|
|
611
|
+
load(): void;
|
|
612
|
+
setField(field: keyof UpdateOcrDataParams, value: string): void;
|
|
613
|
+
validateField(field: keyof UpdateOcrDataParams): void;
|
|
614
|
+
continue(): void;
|
|
615
|
+
reset(): void;
|
|
616
|
+
};
|
|
617
|
+
type IdOcrManager = ReturnType<typeof createIdOcrManager>;
|
|
618
|
+
//#endregion
|
|
619
|
+
//#region src/modules/id-ocr/idOcrFields.d.ts
|
|
620
|
+
declare const OCR_FIELDS: OcrFieldConfig[];
|
|
621
|
+
declare const getOcrFields: (config: Pick<IdOcrConfig, "flowId">) => OcrFieldConfig[];
|
|
622
|
+
//#endregion
|
|
623
|
+
//#region src/modules/id-ocr/idOcrConsts.d.ts
|
|
624
|
+
declare const MIN_AGE = 18;
|
|
625
|
+
declare const CPFFlowIds: string[];
|
|
626
|
+
//#endregion
|
|
627
|
+
export { CPFFlowIds, type IdOcrConfig, type IdOcrManager, type IdOcrOcrDocument, type IdOcrState, MIN_AGE, OCR_FIELDS, type OcrData, type OcrFieldConfig, type UpdateOcrDataParams, type ValidationRule, createIdOcrManager, getOcrFields, idOcrStateMachine };
|