@incodetech/core 2.0.0-alpha.9 → 2.0.0-rc.0
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/Actor-CI32dTbG.d.ts +2 -0
- package/dist/BaseWasmProvider-C_DLEI40.esm.js +1118 -0
- package/dist/BrowserStorageProvider-CuOW1Er2.esm.js +55 -0
- package/dist/BrowserTimerProvider-DhNc_x02.esm.js +22 -0
- package/dist/ITimerCapability-C67ZRskg.esm.js +7 -0
- package/dist/IpifyProvider-D7jx52AL.esm.js +139 -0
- package/dist/MotionSensorProvider-4v7xkqAp.esm.js +254 -0
- package/dist/OpenViduRecordingProvider-CMu6XVdc.esm.js +87 -0
- package/dist/StateMachine-BCQrZJhf.d.ts +2 -0
- package/dist/WasmUtilProvider-j98OJf-S.esm.js +114 -0
- package/dist/addressSearch-BpTbTWCa.esm.js +430 -0
- package/dist/ae-signature-DDDZmWXj.esm.js +12 -0
- package/dist/ae-signature.d.ts +25 -0
- package/dist/ae-signature.esm.js +8 -0
- package/dist/antifraud.d.ts +57 -0
- package/dist/antifraud.esm.js +45 -0
- package/dist/antifraudStateMachine-O0TMf6yc.esm.js +39 -0
- package/dist/api-CESGtpbH.esm.js +53 -0
- package/dist/authentication.d.ts +12 -0
- package/dist/authentication.esm.js +25 -0
- package/dist/authenticationManager-5M-fKzXx.esm.js +67 -0
- package/dist/authenticationManager-C83GNIhl.d.ts +66 -0
- package/dist/authenticationStateMachine-BMZqatiF.esm.js +139 -0
- package/dist/backCameraStream-DMdMeGk2.esm.js +346 -0
- package/dist/browserSimulation-gxD8cSpM.esm.js +20 -0
- package/dist/camera-DBSxa6ML.d.ts +4 -0
- package/dist/camera-PA2Ljri3.esm.js +22 -0
- package/dist/camera.d.ts +15 -0
- package/dist/camera.esm.js +5 -0
- package/dist/consent.d.ts +398 -0
- package/dist/consent.esm.js +79 -0
- package/dist/consentStateMachine-CCT-B60O.esm.js +151 -0
- package/dist/cpf-PPz2Njto.esm.js +38 -0
- package/dist/cpf-ocr.d.ts +204 -0
- package/dist/cpf-ocr.esm.js +177 -0
- package/dist/cross-document-data-match.d.ts +34 -0
- package/dist/cross-document-data-match.esm.js +71 -0
- package/dist/curp-validation.d.ts +188 -0
- package/dist/curp-validation.esm.js +110 -0
- package/dist/curpValidationStateMachine-CitWLr2c.esm.js +595 -0
- package/dist/custom-fields.d.ts +115 -0
- package/dist/custom-fields.esm.js +177 -0
- package/dist/custom-watchlist.d.ts +66 -0
- package/dist/custom-watchlist.esm.js +86 -0
- package/dist/dateUtils-UoN5xswP.esm.js +23 -0
- package/dist/deepsightLoader-Cm4JIT_z.esm.js +52 -0
- package/dist/deepsightService-CEVxzehb.d.ts +412 -0
- package/dist/deepsightService-O74l4Y__.esm.js +489 -0
- package/dist/device.d.ts +46 -0
- package/dist/device.esm.js +106 -0
- package/dist/displayErrors-DqJ_IbsG.d.ts +39 -0
- package/dist/document-capture.d.ts +906 -0
- package/dist/document-capture.esm.js +156 -0
- package/dist/document-upload.d.ts +331 -0
- package/dist/document-upload.esm.js +203 -0
- package/dist/documentCaptureStateMachine-BqzTDy9k.esm.js +394 -0
- package/dist/dynamic-forms.d.ts +178 -0
- package/dist/dynamic-forms.esm.js +323 -0
- package/dist/ekyb.d.ts +148 -0
- package/dist/ekyb.esm.js +127 -0
- package/dist/ekybStateMachine-B59rQjgj.esm.js +674 -0
- package/dist/ekyc.d.ts +164 -0
- package/dist/ekyc.esm.js +104 -0
- package/dist/ekycStateMachine-oeO0Iekd.esm.js +10626 -0
- package/dist/electronic-signature.d.ts +4 -0
- package/dist/electronic-signature.esm.js +7 -0
- package/dist/electronicSignatureManager-D9OHzTpG.esm.js +428 -0
- package/dist/email.d.ts +3 -263
- package/dist/email.esm.js +7 -477
- package/dist/emailManager-DIfnS5g1.d.ts +352 -0
- package/dist/emailManager-wAV0LE-H.esm.js +238 -0
- package/dist/emailStateMachine-DOf4j58N.esm.js +292 -0
- package/dist/endpoints-CnN3SyDa.esm.js +87 -0
- package/dist/events-D6-e4vok.esm.js +596 -0
- package/dist/events.d.ts +265 -0
- package/dist/events.esm.js +4 -0
- package/dist/extensibility.d.ts +122 -0
- package/dist/extensibility.esm.js +43 -0
- package/dist/face-match.d.ts +228 -0
- package/dist/face-match.esm.js +173 -0
- package/dist/faceCaptureManagerFactory-Dh2PdGlF.esm.js +290 -0
- package/dist/faceCaptureManagerFactory-yqtpxjnN.d.ts +690 -0
- package/dist/faceCaptureSetup-B3faSpYA.esm.js +873 -0
- package/dist/faceMatchStateMachine-DNFrxTFS.esm.js +127 -0
- package/dist/flow-events.d.ts +6 -0
- package/dist/flow-events.esm.js +0 -0
- package/dist/flow.d.ts +101 -321
- package/dist/flow.esm.js +370 -173
- package/dist/flowCompletionService-DhkT4SRY.d.ts +10 -0
- package/dist/flowCompletionService-P54yzGvA.esm.js +13 -0
- package/dist/flowServices-DTsm-Vf1.esm.js +188 -0
- package/dist/geolocation.d.ts +127 -0
- package/dist/geolocation.esm.js +89 -0
- package/dist/geolocationStateMachine-asasuHY2.esm.js +105 -0
- package/dist/getBrowser-BSXUTWXw.esm.js +41 -0
- package/dist/getDeviceClass-BSntT9_j.esm.js +14 -0
- package/dist/government-validation.d.ts +67 -0
- package/dist/government-validation.esm.js +81 -0
- package/dist/governmentValidationStateMachine-BDDYrJTo.esm.js +271 -0
- package/dist/home.d.ts +99 -0
- package/dist/home.esm.js +61 -0
- package/dist/http.d.ts +68 -0
- package/dist/http.esm.js +3 -0
- package/dist/id-ocr.d.ts +635 -0
- package/dist/id-ocr.esm.js +86 -0
- package/dist/id-verification.d.ts +190 -0
- package/dist/id-verification.esm.js +43 -0
- package/dist/id.d.ts +24 -0
- package/dist/id.esm.js +164 -0
- package/dist/idCaptureManager-B9TGA5dq.d.ts +956 -0
- package/dist/idCaptureManager-DMK0GIt3.esm.js +581 -0
- package/dist/idCaptureStateMachine-Bq0fVZXl.esm.js +2954 -0
- package/dist/idOcrStateMachine-YbjjC_Gg.esm.js +388 -0
- package/dist/idVerificationStateMachine-xbw9HP1Z.esm.js +71 -0
- package/dist/identity-reuse.d.ts +530 -0
- package/dist/identity-reuse.esm.js +274 -0
- package/dist/index-BLKtMA0g.d.ts +1177 -0
- package/dist/index-BcRG8rtJ.d.ts +97 -0
- package/dist/index.d.ts +3 -226
- package/dist/index.esm.js +11 -154
- package/dist/invokeOnCaptureCallback-rc6kBHo5.esm.js +30 -0
- package/dist/{lib-Bu9XGMBW.esm.js → lib-BB0B_qQX.esm.js} +801 -2
- package/dist/mandatory-consent.d.ts +412 -0
- package/dist/mandatory-consent.esm.js +78 -0
- package/dist/mandatoryConsentStateMachine-Cnco1jvn.esm.js +126 -0
- package/dist/openviduLazy-Cm0XFh_v.esm.js +3 -0
- package/dist/openviduLazy-Cok70ZSg.esm.js +12 -0
- package/dist/permissionServices-D_i6nzEw.esm.js +50 -0
- package/dist/phone.d.ts +3 -291
- package/dist/phone.esm.js +7 -548
- package/dist/phoneManager-B6M30hKE.d.ts +397 -0
- package/dist/phoneManager-DAJbGhlY.esm.js +256 -0
- package/dist/phoneStateMachine-CuPARRaT.esm.js +351 -0
- package/dist/platform-CfrjKhmi.esm.js +83 -0
- package/dist/qe-signature-DFo_Cc-I.esm.js +12 -0
- package/dist/qe-signature.d.ts +25 -0
- package/dist/qe-signature.esm.js +8 -0
- package/dist/recordingService-Ig2UgbLv.esm.js +1003 -0
- package/dist/redirect-to-mobile.d.ts +107 -0
- package/dist/redirect-to-mobile.esm.js +102 -0
- package/dist/redirectToMobileStateMachine-BOEqe46A.esm.js +249 -0
- package/dist/runChildModule-CqqwqAkW.esm.js +219 -0
- package/dist/selfie.d.ts +21 -754
- package/dist/selfie.esm.js +113 -962
- package/dist/selfieManager-D0lSgd-J.d.ts +68 -0
- package/dist/selfieManager-Duisl7qN.esm.js +60 -0
- package/dist/selfieStateMachine-D76whWEf.esm.js +68 -0
- package/dist/session-BS-d_vuE.esm.js +3206 -0
- package/dist/session.d.ts +217 -0
- package/dist/session.esm.js +9 -0
- package/dist/setup-Buy-hyj4.esm.js +887 -0
- package/dist/setup-C5AITV8m.d.ts +254 -0
- package/dist/signature.d.ts +94 -0
- package/dist/signature.esm.js +66 -0
- package/dist/signatureStateMachine-B5-QVUve.esm.js +132 -0
- package/dist/stats-CIfiPzb1.esm.js +16 -0
- package/dist/stats.d.ts +16 -0
- package/dist/stats.esm.js +4 -0
- package/dist/trust-graph.d.ts +54 -0
- package/dist/trust-graph.esm.js +56 -0
- package/dist/types-B06Ypu2F.d.ts +49 -0
- package/dist/types-BP1m8VRw.d.ts +340 -0
- package/dist/types-CFV9G_7j.d.ts +24 -0
- package/dist/{warmup-CEJTfxQr.d.ts → warmup-CEcppFiS.d.ts} +11 -3
- package/dist/wasm.d.ts +15 -0
- package/dist/wasm.esm.js +12 -0
- package/dist/watchlist-for-business.d.ts +79 -0
- package/dist/watchlist-for-business.esm.js +148 -0
- package/dist/watchlist.d.ts +62 -0
- package/dist/watchlist.esm.js +86 -0
- package/dist/watchlistServices-DMbUhkBX.esm.js +12 -0
- package/dist/workflow.d.ts +907 -0
- package/dist/workflow.esm.js +702 -0
- package/dist/{xstate.esm-B_rda9yU.esm.js → xstate.esm-B70JrNqo.esm.js} +144 -1
- package/package.json +203 -6
- package/dist/OpenViduLogger-BdPfiZO6.esm.js +0 -3
- package/dist/OpenViduLogger-CQyDxBvM.esm.js +0 -803
- package/dist/StateMachine-DRE1oH2B.d.ts +0 -2
- package/dist/addEvent-W0ORK0jT.esm.js +0 -16
- package/dist/endpoints-BSTFaHYo.esm.js +0 -1706
- package/dist/permissionServices-I6vX6DBy.esm.js +0 -72
- /package/dist/{Manager-BGfxEmyv.d.ts → Manager-C8PrhBOx.d.ts} +0 -0
- /package/dist/{chunk-C_Yo44FK.esm.js → chunk-CRF6K_H_.esm.js} +0 -0
- /package/dist/{types-iZi2rawo.d.ts → types-CAD4va6a.d.ts} +0 -0
package/dist/id-ocr.d.ts
ADDED
|
@@ -0,0 +1,635 @@
|
|
|
1
|
+
import { t as Manager } from "./Manager-C8PrhBOx.js";
|
|
2
|
+
import "./Actor-CI32dTbG.js";
|
|
3
|
+
import * as xstate601 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: xstate601.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: "RETRY";
|
|
193
|
+
}, {
|
|
194
|
+
[x: string]: xstate601.ActorRefFromLogic<xstate601.PromiseActorLogic<OcrData, {
|
|
195
|
+
isSecondId: boolean;
|
|
196
|
+
}, xstate601.EventObject>> | xstate601.ActorRefFromLogic<xstate601.PromiseActorLogic<UpdateOcrResponse, {
|
|
197
|
+
params: UpdateOcrDataParams;
|
|
198
|
+
isSecondId: boolean;
|
|
199
|
+
}, xstate601.EventObject>> | undefined;
|
|
200
|
+
}, xstate601.Values<{
|
|
201
|
+
getOcrData: {
|
|
202
|
+
src: "getOcrData";
|
|
203
|
+
logic: xstate601.PromiseActorLogic<OcrData, {
|
|
204
|
+
isSecondId: boolean;
|
|
205
|
+
}, xstate601.EventObject>;
|
|
206
|
+
id: string | undefined;
|
|
207
|
+
};
|
|
208
|
+
updateOcrData: {
|
|
209
|
+
src: "updateOcrData";
|
|
210
|
+
logic: xstate601.PromiseActorLogic<UpdateOcrResponse, {
|
|
211
|
+
params: UpdateOcrDataParams;
|
|
212
|
+
isSecondId: boolean;
|
|
213
|
+
}, xstate601.EventObject>;
|
|
214
|
+
id: string | undefined;
|
|
215
|
+
};
|
|
216
|
+
}>, xstate601.Values<{
|
|
217
|
+
setError: {
|
|
218
|
+
type: "setError";
|
|
219
|
+
params: xstate601.NonReducibleUnknown;
|
|
220
|
+
};
|
|
221
|
+
setInitialData: {
|
|
222
|
+
type: "setInitialData";
|
|
223
|
+
params: xstate601.NonReducibleUnknown;
|
|
224
|
+
};
|
|
225
|
+
updateField: {
|
|
226
|
+
type: "updateField";
|
|
227
|
+
params: xstate601.NonReducibleUnknown;
|
|
228
|
+
};
|
|
229
|
+
clearFieldValidationError: {
|
|
230
|
+
type: "clearFieldValidationError";
|
|
231
|
+
params: xstate601.NonReducibleUnknown;
|
|
232
|
+
};
|
|
233
|
+
setOcrValidationErrors: {
|
|
234
|
+
type: "setOcrValidationErrors";
|
|
235
|
+
params: xstate601.NonReducibleUnknown;
|
|
236
|
+
};
|
|
237
|
+
validateFormField: {
|
|
238
|
+
type: "validateFormField";
|
|
239
|
+
params: xstate601.NonReducibleUnknown;
|
|
240
|
+
};
|
|
241
|
+
beginSecondIdOcrPhase: {
|
|
242
|
+
type: "beginSecondIdOcrPhase";
|
|
243
|
+
params: xstate601.NonReducibleUnknown;
|
|
244
|
+
};
|
|
245
|
+
resetForRetry: {
|
|
246
|
+
type: "resetForRetry";
|
|
247
|
+
params: xstate601.NonReducibleUnknown;
|
|
248
|
+
};
|
|
249
|
+
computeValidationResult: {
|
|
250
|
+
type: "computeValidationResult";
|
|
251
|
+
params: xstate601.NonReducibleUnknown;
|
|
252
|
+
};
|
|
253
|
+
}>, xstate601.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" | "success" | "finished" | "loading" | "submitting" | "inputting" | "readonly" | "validatingContinue", string, IdOcrInput, xstate601.NonReducibleUnknown, xstate601.EventObject, xstate601.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: xstate601.PromiseActorLogic<OcrData, {
|
|
284
|
+
isSecondId: boolean;
|
|
285
|
+
}, xstate601.EventObject>;
|
|
286
|
+
id: string | undefined;
|
|
287
|
+
} extends infer T ? T extends {
|
|
288
|
+
src: "getOcrData";
|
|
289
|
+
logic: xstate601.PromiseActorLogic<OcrData, {
|
|
290
|
+
isSecondId: boolean;
|
|
291
|
+
}, xstate601.EventObject>;
|
|
292
|
+
id: string | undefined;
|
|
293
|
+
} ? T extends {
|
|
294
|
+
src: TSrc;
|
|
295
|
+
} ? xstate601.ConditionalRequired<[options?: ({
|
|
296
|
+
id?: T["id"] | undefined;
|
|
297
|
+
systemId?: string;
|
|
298
|
+
input?: xstate601.InputFrom<T["logic"]> | undefined;
|
|
299
|
+
syncSnapshot?: boolean;
|
|
300
|
+
} & { [K in xstate601.RequiredActorOptions<T>]: unknown }) | undefined], xstate601.IsNotNever<xstate601.RequiredActorOptions<T>>> : never : never : never) | ({
|
|
301
|
+
src: "updateOcrData";
|
|
302
|
+
logic: xstate601.PromiseActorLogic<UpdateOcrResponse, {
|
|
303
|
+
params: UpdateOcrDataParams;
|
|
304
|
+
isSecondId: boolean;
|
|
305
|
+
}, xstate601.EventObject>;
|
|
306
|
+
id: string | undefined;
|
|
307
|
+
} extends infer T_1 ? T_1 extends {
|
|
308
|
+
src: "updateOcrData";
|
|
309
|
+
logic: xstate601.PromiseActorLogic<UpdateOcrResponse, {
|
|
310
|
+
params: UpdateOcrDataParams;
|
|
311
|
+
isSecondId: boolean;
|
|
312
|
+
}, xstate601.EventObject>;
|
|
313
|
+
id: string | undefined;
|
|
314
|
+
} ? T_1 extends {
|
|
315
|
+
src: TSrc;
|
|
316
|
+
} ? xstate601.ConditionalRequired<[options?: ({
|
|
317
|
+
id?: T_1["id"] | undefined;
|
|
318
|
+
systemId?: string;
|
|
319
|
+
input?: xstate601.InputFrom<T_1["logic"]> | undefined;
|
|
320
|
+
syncSnapshot?: boolean;
|
|
321
|
+
} & { [K_1 in xstate601.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate601.IsNotNever<xstate601.RequiredActorOptions<T_1>>> : never : never : never)): xstate601.ActorRefFromLogic<xstate601.GetConcreteByKey<xstate601.Values<{
|
|
322
|
+
getOcrData: {
|
|
323
|
+
src: "getOcrData";
|
|
324
|
+
logic: xstate601.PromiseActorLogic<OcrData, {
|
|
325
|
+
isSecondId: boolean;
|
|
326
|
+
}, xstate601.EventObject>;
|
|
327
|
+
id: string | undefined;
|
|
328
|
+
};
|
|
329
|
+
updateOcrData: {
|
|
330
|
+
src: "updateOcrData";
|
|
331
|
+
logic: xstate601.PromiseActorLogic<UpdateOcrResponse, {
|
|
332
|
+
params: UpdateOcrDataParams;
|
|
333
|
+
isSecondId: boolean;
|
|
334
|
+
}, xstate601.EventObject>;
|
|
335
|
+
id: string | undefined;
|
|
336
|
+
};
|
|
337
|
+
}>, "src", TSrc>["logic"]>;
|
|
338
|
+
<TLogic extends xstate601.AnyActorLogic>(src: TLogic, ...[options]: xstate601.ConditionalRequired<[options?: ({
|
|
339
|
+
id?: never;
|
|
340
|
+
systemId?: string;
|
|
341
|
+
input?: xstate601.InputFrom<TLogic> | undefined;
|
|
342
|
+
syncSnapshot?: boolean;
|
|
343
|
+
} & { [K in xstate601.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate601.IsNotNever<xstate601.RequiredLogicInput<TLogic>>>): xstate601.ActorRefFromLogic<TLogic>;
|
|
344
|
+
};
|
|
345
|
+
input: IdOcrInput;
|
|
346
|
+
self: xstate601.ActorRef<xstate601.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: "RETRY";
|
|
359
|
+
}, Record<string, xstate601.AnyActorRef | undefined>, xstate601.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: "RETRY";
|
|
372
|
+
}, xstate601.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: "RETRY";
|
|
407
|
+
};
|
|
408
|
+
self: xstate601.ActorRef<xstate601.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: "RETRY";
|
|
421
|
+
}, Record<string, xstate601.AnyActorRef>, xstate601.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: "RETRY";
|
|
434
|
+
}, xstate601.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: "success";
|
|
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: "success";
|
|
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: "RETRY";
|
|
512
|
+
};
|
|
513
|
+
self: xstate601.ActorRef<xstate601.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: "RETRY";
|
|
526
|
+
}, Record<string, xstate601.AnyActorRef>, xstate601.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: "RETRY";
|
|
539
|
+
}, xstate601.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: "success";
|
|
550
|
+
}];
|
|
551
|
+
readonly onError: {
|
|
552
|
+
readonly target: "error";
|
|
553
|
+
readonly actions: "setError";
|
|
554
|
+
};
|
|
555
|
+
};
|
|
556
|
+
};
|
|
557
|
+
readonly error: {
|
|
558
|
+
readonly on: {
|
|
559
|
+
readonly RETRY: {
|
|
560
|
+
readonly target: "loading";
|
|
561
|
+
readonly actions: "resetForRetry";
|
|
562
|
+
};
|
|
563
|
+
};
|
|
564
|
+
};
|
|
565
|
+
readonly success: {
|
|
566
|
+
readonly after: {
|
|
567
|
+
readonly 3000: "finished";
|
|
568
|
+
};
|
|
569
|
+
};
|
|
570
|
+
readonly finished: {
|
|
571
|
+
readonly type: "final";
|
|
572
|
+
};
|
|
573
|
+
};
|
|
574
|
+
}>;
|
|
575
|
+
//#endregion
|
|
576
|
+
//#region src/modules/id-ocr/idOcrActor.d.ts
|
|
577
|
+
type CreateIdOcrActorOptions = {
|
|
578
|
+
config: IdOcrConfig;
|
|
579
|
+
};
|
|
580
|
+
//#endregion
|
|
581
|
+
//#region src/modules/id-ocr/idOcrManager.d.ts
|
|
582
|
+
type IdOcrIdleState = {
|
|
583
|
+
status: 'idle';
|
|
584
|
+
};
|
|
585
|
+
type IdOcrLoadingState = {
|
|
586
|
+
status: 'loading';
|
|
587
|
+
ocrDocument: IdOcrOcrDocument;
|
|
588
|
+
};
|
|
589
|
+
type IdOcrReadonlyState = {
|
|
590
|
+
status: 'readonly';
|
|
591
|
+
formData: UpdateOcrDataParams;
|
|
592
|
+
editableOcr: boolean;
|
|
593
|
+
ocrDocument: IdOcrOcrDocument;
|
|
594
|
+
};
|
|
595
|
+
type IdOcrInputtingState = {
|
|
596
|
+
status: 'inputting';
|
|
597
|
+
formData: UpdateOcrDataParams;
|
|
598
|
+
editedFields: UpdateOcrDataParams;
|
|
599
|
+
editableOcr: boolean;
|
|
600
|
+
ocrDocument: IdOcrOcrDocument;
|
|
601
|
+
validationErrors?: Partial<Record<keyof UpdateOcrDataParams, string>>;
|
|
602
|
+
};
|
|
603
|
+
type IdOcrSubmittingState = {
|
|
604
|
+
status: 'submitting';
|
|
605
|
+
ocrDocument: IdOcrOcrDocument;
|
|
606
|
+
};
|
|
607
|
+
type IdOcrFinishedState = {
|
|
608
|
+
status: 'finished';
|
|
609
|
+
};
|
|
610
|
+
type IdOcrErrorState = {
|
|
611
|
+
status: 'error';
|
|
612
|
+
error: string;
|
|
613
|
+
};
|
|
614
|
+
type IdOcrSuccessState = {
|
|
615
|
+
status: 'success';
|
|
616
|
+
};
|
|
617
|
+
type IdOcrState = IdOcrIdleState | IdOcrLoadingState | IdOcrReadonlyState | IdOcrInputtingState | IdOcrSubmittingState | IdOcrFinishedState | IdOcrErrorState | IdOcrSuccessState;
|
|
618
|
+
declare function createIdOcrManager(options: CreateIdOcrActorOptions): Manager<IdOcrState> & {
|
|
619
|
+
load(): void;
|
|
620
|
+
setField(field: keyof UpdateOcrDataParams, value: string): void;
|
|
621
|
+
validateField(field: keyof UpdateOcrDataParams): void;
|
|
622
|
+
continue(): void;
|
|
623
|
+
retry(): void;
|
|
624
|
+
};
|
|
625
|
+
type IdOcrManager = ReturnType<typeof createIdOcrManager>;
|
|
626
|
+
//#endregion
|
|
627
|
+
//#region src/modules/id-ocr/idOcrFields.d.ts
|
|
628
|
+
declare const OCR_FIELDS: OcrFieldConfig[];
|
|
629
|
+
declare const getOcrFields: (config: Pick<IdOcrConfig, "flowId">) => OcrFieldConfig[];
|
|
630
|
+
//#endregion
|
|
631
|
+
//#region src/modules/id-ocr/idOcrConsts.d.ts
|
|
632
|
+
declare const MIN_AGE = 18;
|
|
633
|
+
declare const CPFFlowIds: string[];
|
|
634
|
+
//#endregion
|
|
635
|
+
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 };
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import "./api-CESGtpbH.esm.js";
|
|
2
|
+
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-D6-e4vok.esm.js";
|
|
3
|
+
import "./endpoints-CnN3SyDa.esm.js";
|
|
4
|
+
import { c as createManager, s as createActor } from "./xstate.esm-B70JrNqo.esm.js";
|
|
5
|
+
import "./cpf-PPz2Njto.esm.js";
|
|
6
|
+
import { a as MIN_AGE, i as CPFFlowIds, n as OCR_FIELDS, r as getOcrFields, t as idOcrStateMachine } from "./idOcrStateMachine-YbjjC_Gg.esm.js";
|
|
7
|
+
|
|
8
|
+
//#region src/modules/id-ocr/idOcrActor.ts
|
|
9
|
+
function createIdOcrActor(options) {
|
|
10
|
+
return createActor(idOcrStateMachine, { input: { config: options.config } }).start();
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
14
|
+
//#region src/modules/id-ocr/idOcrManager.ts
|
|
15
|
+
function mapState(snapshot) {
|
|
16
|
+
const { context } = snapshot;
|
|
17
|
+
const editableOcr = context.config.editableOcr === true;
|
|
18
|
+
if (snapshot.matches("idle")) return { status: "idle" };
|
|
19
|
+
if (snapshot.matches("loading")) return {
|
|
20
|
+
status: "loading",
|
|
21
|
+
ocrDocument: context.activeOcrDocument
|
|
22
|
+
};
|
|
23
|
+
if (snapshot.matches("readonly")) return {
|
|
24
|
+
status: "readonly",
|
|
25
|
+
formData: context.formData,
|
|
26
|
+
editableOcr,
|
|
27
|
+
ocrDocument: context.activeOcrDocument
|
|
28
|
+
};
|
|
29
|
+
if (snapshot.matches("inputting")) return {
|
|
30
|
+
status: "inputting",
|
|
31
|
+
formData: context.formData,
|
|
32
|
+
editedFields: context.editedFields,
|
|
33
|
+
editableOcr,
|
|
34
|
+
ocrDocument: context.activeOcrDocument,
|
|
35
|
+
validationErrors: context.validationErrors
|
|
36
|
+
};
|
|
37
|
+
if (snapshot.matches("submitting")) return {
|
|
38
|
+
status: "submitting",
|
|
39
|
+
ocrDocument: context.activeOcrDocument
|
|
40
|
+
};
|
|
41
|
+
if (snapshot.matches("success")) return { status: "success" };
|
|
42
|
+
if (snapshot.matches("finished")) return { status: "finished" };
|
|
43
|
+
if (snapshot.matches("error")) return {
|
|
44
|
+
status: "error",
|
|
45
|
+
error: context.error ?? "Unknown error"
|
|
46
|
+
};
|
|
47
|
+
return { status: "idle" };
|
|
48
|
+
}
|
|
49
|
+
function createApi({ actor, trackElementClicked }) {
|
|
50
|
+
return {
|
|
51
|
+
load() {
|
|
52
|
+
actor.send({ type: "LOAD" });
|
|
53
|
+
},
|
|
54
|
+
setField(field, value) {
|
|
55
|
+
actor.send({
|
|
56
|
+
type: "DATA_CHANGED",
|
|
57
|
+
field,
|
|
58
|
+
value
|
|
59
|
+
});
|
|
60
|
+
},
|
|
61
|
+
validateField(field) {
|
|
62
|
+
actor.send({
|
|
63
|
+
type: "VALIDATE_FIELD",
|
|
64
|
+
field
|
|
65
|
+
});
|
|
66
|
+
},
|
|
67
|
+
continue() {
|
|
68
|
+
actor.send({ type: "CONTINUE" });
|
|
69
|
+
trackElementClicked?.("continue");
|
|
70
|
+
},
|
|
71
|
+
retry() {
|
|
72
|
+
actor.send({ type: "RETRY" });
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
function createIdOcrManager(options) {
|
|
77
|
+
return createManager({
|
|
78
|
+
actor: createIdOcrActor(options),
|
|
79
|
+
mapState,
|
|
80
|
+
createApi,
|
|
81
|
+
instrumentation: createManagerInstrumentation(eventModuleNames.idOcr)
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
//#endregion
|
|
86
|
+
export { CPFFlowIds, MIN_AGE, OCR_FIELDS, createIdOcrManager, getOcrFields, idOcrStateMachine };
|