@incodetech/core 0.0.0-dev-20261105-edbf345c → 0.0.0-dev-20261105-d2b86119

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.
Files changed (104) hide show
  1. package/dist/{FaceDetectionProvider-DO7oJW8l.esm.js → FaceDetectionProvider-DMmVB1hj.esm.js} +4 -4
  2. package/dist/ae-signature.esm.js +1 -1
  3. package/dist/{apiError-CSvhul7M.esm.js → apiError-DsuCg1yn.esm.js} +1 -1
  4. package/dist/authentication.d.ts +3 -3
  5. package/dist/authentication.esm.js +2 -2
  6. package/dist/{authenticationManager-Ct0RgLuV.esm.js → authenticationManager-CCvF_eD4.esm.js} +3 -3
  7. package/dist/{authenticationManager-CdMlYeBT.d.ts → authenticationManager-DKLRA91K.d.ts} +1 -1
  8. package/dist/{authenticationStateMachine-DhzcNOBa.esm.js → authenticationStateMachine-D2dG9pgS.esm.js} +2 -2
  9. package/dist/consent.d.ts +1 -1
  10. package/dist/{consentManager-D8rgr5Dv.d.ts → consentManager-DXetSxcx.d.ts} +5 -5
  11. package/dist/curp-validation.d.ts +1 -1
  12. package/dist/{curpValidationManager-BwJi3F0x.d.ts → curpValidationManager-Crz3bnCo.d.ts} +1 -1
  13. package/dist/{deepsightLoader-B041ypqq.esm.js → deepsightLoader-m9rH-Qdj.esm.js} +3 -3
  14. package/dist/document-capture.d.ts +1 -1
  15. package/dist/{documentCaptureManager-DDfviFg0.d.ts → documentCaptureManager-YwPg7gOl.d.ts} +4 -4
  16. package/dist/dynamic-forms.esm.js +2 -2
  17. package/dist/{dynamicFormsManager-DXQ_pko7.esm.js → dynamicFormsManager-B2RKdYzW.esm.js} +1 -1
  18. package/dist/{dynamicFormsStateMachine-BljMnyNE.esm.js → dynamicFormsStateMachine-DUBLWhlp.esm.js} +1 -1
  19. package/dist/ekyb.d.ts +1 -1
  20. package/dist/ekyb.esm.js +2 -2
  21. package/dist/{ekybManager-zUrx0_qC.esm.js → ekybManager-DiMHt66M.esm.js} +1 -1
  22. package/dist/{ekybStateMachine-xAhQKxKW.esm.js → ekybStateMachine-UC0px15n.esm.js} +1 -1
  23. package/dist/ekyc-prefill.d.ts +3 -3
  24. package/dist/ekyc-prefill.esm.js +2 -2
  25. package/dist/ekyc.d.ts +2 -2
  26. package/dist/ekyc.esm.js +3 -3
  27. package/dist/{ekycManager-CI5xhnV9.esm.js → ekycManager-BtuTGKIG.esm.js} +1 -1
  28. package/dist/{ekycManager-Ck39UxiP.d.ts → ekycManager-CERRvIfg.d.ts} +1 -1
  29. package/dist/{ekycPrefillManager-Davw247j.esm.js → ekycPrefillManager-BMl5pK-m.esm.js} +1 -1
  30. package/dist/{ekycPrefillManager-DXrAgbc8.d.ts → ekycPrefillManager-CB1d6mt4.d.ts} +32 -32
  31. package/dist/{ekycPrefillStateMachine-bJF40zGT.esm.js → ekycPrefillStateMachine-B46wTO-Q.esm.js} +9 -5
  32. package/dist/{ekycRules-LnvbwaCu.esm.js → ekycRules-B7vXnbdg.esm.js} +10 -1
  33. package/dist/{ekycStateMachine-D8eI7aJF.esm.js → ekycStateMachine-DAJJG7NG.esm.js} +413 -233
  34. package/dist/{ekycUtils-CQaAb4DH.esm.js → ekycUtils-K6VJXnOg.esm.js} +10 -2
  35. package/dist/electronic-signature.esm.js +1 -1
  36. package/dist/{electronicSignatureManager-BL0c_xPz.esm.js → electronicSignatureManager-D5QSi2VH.esm.js} +1 -1
  37. package/dist/extensibility.d.ts +14 -14
  38. package/dist/extensibility.esm.js +13 -13
  39. package/dist/{faceCaptureManagerFactory-BRqhXsGM.esm.js → faceCaptureManagerFactory-D1QsPQrD.esm.js} +1 -1
  40. package/dist/{faceCaptureManagerFactory-CmCP8_Uc.d.ts → faceCaptureManagerFactory-ZudYP6Qp.d.ts} +3 -3
  41. package/dist/{faceCaptureSetup-DNiLgy4B.esm.js → faceCaptureSetup-BYMyUbS2.esm.js} +3 -3
  42. package/dist/{feature-management-Cw0dE7HH.esm.js → feature-management-C-1n44kI.esm.js} +1 -1
  43. package/dist/feature-management.esm.js +1 -1
  44. package/dist/flow-events.d.ts +1 -1
  45. package/dist/flow.d.ts +6 -6
  46. package/dist/flow.esm.js +3 -3
  47. package/dist/{flowCompletionService-B4ZuNcD9.esm.js → flowCompletionService-CBXpDhZO.esm.js} +1 -1
  48. package/dist/{flowServices-DonUUB5w.esm.js → flowServices-DzIifCBt.esm.js} +5 -5
  49. package/dist/geolocation.d.ts +1 -1
  50. package/dist/geolocation.esm.js +2 -2
  51. package/dist/{geolocationManager-AAmXvqWb.esm.js → geolocationManager-BsR6Hr52.esm.js} +1 -1
  52. package/dist/{geolocationManager-6e1i9UIR.d.ts → geolocationManager-CPhykMow.d.ts} +1 -1
  53. package/dist/{geolocationStateMachine-DKHrAjwB.esm.js → geolocationStateMachine-YspHycfB.esm.js} +1 -1
  54. package/dist/home.d.ts +1 -1
  55. package/dist/id-ocr.d.ts +1 -1
  56. package/dist/id-selfie-flow.d.ts +1 -1
  57. package/dist/id-selfie-flow.esm.js +6 -6
  58. package/dist/id.d.ts +2 -2
  59. package/dist/id.esm.js +3 -3
  60. package/dist/{idCaptureManager-B-J9DGHy.esm.js → idCaptureManager-BGyY2QJW.esm.js} +3 -3
  61. package/dist/{idCaptureManager-B6NvGCaA.d.ts → idCaptureManager-NRGuCVv2.d.ts} +2 -2
  62. package/dist/{idCaptureServices-03rNDnl9.esm.js → idCaptureServices-Rj8gQUN0.esm.js} +2 -2
  63. package/dist/{idCaptureStateMachine-DV-GAckz.esm.js → idCaptureStateMachine-CIYYm8ug.esm.js} +8 -8
  64. package/dist/{idOcrManager-BAf6O4OR.d.ts → idOcrManager-Bq2S6vYt.d.ts} +1 -1
  65. package/dist/{index-cztnq1Mz.d.ts → index-BGnYn_4J.d.ts} +1 -1
  66. package/dist/index.esm.js +1 -1
  67. package/dist/kyb-checks.esm.js +2 -2
  68. package/dist/{kybChecksManager-DT_8KJ1l.esm.js → kybChecksManager-CkPk9MYg.esm.js} +1 -1
  69. package/dist/{kybChecksStateMachine-BIFP5JOC.esm.js → kybChecksStateMachine-ZOZbWEvd.esm.js} +2 -2
  70. package/dist/mandatory-consent.d.ts +2 -2
  71. package/dist/{mandatoryConsentManager-CPE14L5F.d.ts → mandatoryConsentManager-MhZYQg10.d.ts} +6 -6
  72. package/dist/{phoneFormat-JJNaWthV.esm.js → phoneFormat-DEpESpz2.esm.js} +13 -1
  73. package/dist/qe-signature.esm.js +1 -1
  74. package/dist/{runChildModule-BlDp_kLq.esm.js → runChildModule-7LwsDQ6K.esm.js} +1 -1
  75. package/dist/{sdkVersion-y7I2heb5.esm.js → sdkVersion-CNJSh1Ig.esm.js} +1 -1
  76. package/dist/selfie.d.ts +3 -3
  77. package/dist/selfie.esm.js +6 -6
  78. package/dist/{selfieErrorUtils-7p5FO8X5.esm.js → selfieErrorUtils-CiDRunl3.esm.js} +1 -1
  79. package/dist/{selfieManager-B35R-IHI.d.ts → selfieManager-BPOlD-UN.d.ts} +1 -1
  80. package/dist/{selfieManager-3FU7sd-K.esm.js → selfieManager-DKy62UWd.esm.js} +3 -3
  81. package/dist/{selfieStateMachine-YXwFPhGw.esm.js → selfieStateMachine-BEFMDLyP.esm.js} +3 -3
  82. package/dist/{session-CNiDV4ZI.esm.js → session-DoW6RGn_.esm.js} +3 -3
  83. package/dist/session.d.ts +1 -1
  84. package/dist/session.esm.js +4 -4
  85. package/dist/{sessionInitializer-4H8zDMgr.esm.js → sessionInitializer-DKxXaZQG.esm.js} +3 -3
  86. package/dist/{setup-C0y0GW5V.esm.js → setup-BGbltXDV.esm.js} +4 -4
  87. package/dist/{trueSightService-DvEtriHz.esm.js → trueSightService-BD4dhHr-.esm.js} +1 -1
  88. package/dist/{types-CPJj6zPd.d.ts → types-0Rr7etmf.d.ts} +1 -1
  89. package/dist/types-B2M1IPZn.d.ts +6 -0
  90. package/dist/{types-DJECzwzr.d.ts → types-BD9sV5oG.d.ts} +1 -1
  91. package/dist/{types-DQz-8VnX.d.ts → types-BaDx6utW.d.ts} +3 -0
  92. package/dist/{types-bi3Zb1Ym.d.ts → types-BpJ21a4T.d.ts} +1 -1
  93. package/dist/{types-tPA9wGcC.d.ts → types-CquDWYfv.d.ts} +2 -2
  94. package/dist/{types-CS_wMpX1.d.ts → types-D9vIGFbl.d.ts} +1 -1
  95. package/dist/{types-98iaeg5N.d.ts → types-NMBsvLIN.d.ts} +1 -1
  96. package/dist/video-selfie.d.ts +1 -1
  97. package/dist/video-selfie.esm.js +3 -3
  98. package/dist/{videoSelfieCameraWarmer-DJJ0inxD.esm.js → videoSelfieCameraWarmer-BnGs4HrT.esm.js} +3 -3
  99. package/dist/{videoSelfieStepDetector-BhRYeWaD.d.ts → videoSelfieStepDetector-B78BE_x9.d.ts} +2 -2
  100. package/dist/wasm.esm.js +1 -1
  101. package/dist/workflow.d.ts +1 -1
  102. package/dist/workflow.esm.js +17 -17
  103. package/package.json +1 -1
  104. package/dist/types-bedZM6SH.d.ts +0 -6
@@ -1,14 +1,15 @@
1
1
  import { t as api, u as endpoints } from "./api-C_P9YXbL.esm.js";
2
+ import { t as getPhoneValidation } from "./phoneValidation-OggtfjRt.esm.js";
2
3
  import { i as assign, t as setup } from "./xstate.esm-DSajW7CJ.esm.js";
3
4
  import { n as fromPromise } from "./xstate-actors.esm-8Gzepa_A.esm.js";
4
5
  import { n as usStates, t as usStateOptions } from "./usStates-CwOQ2kAx.esm.js";
5
6
  import { a as getPostalCodeMaxLength, c as fillFromSuggestion, l as getStreetLevelErrorForSuggestion, r as formatPostalCode, t as createBundledDefinitionSource } from "./definitionSource-1vPLtuXE.esm.js";
6
7
  import { n as checkSupport, t as resolveForm } from "./resolveForm-f9PhUo9j.esm.js";
7
8
  import { n as searchAddress, r as isFormDefinitionsEnabled, t as debounceSearchActor } from "./addressSearch-CQeZFjYF.esm.js";
8
- import { C as TAX_ID_SOURCES, S as STREET_SOURCES, _ as MIDDLE_NAME_SOURCES, a as getEKYCFields, b as POSTAL_CODE_SOURCES, c as resolveEkycSource, d as APARTMENT_SOURCES, f as CITY_SOURCES, g as HOUSE_NO_SOURCES, h as EMAIL_SOURCES, i as getEKYCDisplayModes, l as toEkycConfig, m as COUNTRY_SELECTOR_DISABLED_SOURCES, o as isFieldOptional, p as COUNTRY_CODE_OMITTED_SOURCES, r as getEKYCCountry, s as mapToEKYCvalue, t as EKYC_GROUP_KEYS, u as ADDRESS_STATE_SOURCES, v as NAME_SOURCES, w as VOCABULARY, x as STATE_CODE_HINTS, y as ONE_OF_REQUIRED_GROUPS } from "./ekycUtils-CQaAb4DH.esm.js";
9
+ import { C as TAX_ID_SOURCES, S as STREET_SOURCES, _ as MIDDLE_NAME_SOURCES, a as getEKYCFields, b as POSTAL_CODE_SOURCES, c as resolveEkycSource, d as APARTMENT_SOURCES, f as CITY_SOURCES, g as HOUSE_NO_SOURCES, h as EMAIL_SOURCES, i as getEKYCDisplayModes, l as toEkycConfig, m as COUNTRY_SELECTOR_DISABLED_SOURCES, o as isFieldOptional, p as COUNTRY_CODE_OMITTED_SOURCES, r as getEKYCCountry, s as mapToEKYCvalue, t as EKYC_GROUP_KEYS, u as ADDRESS_STATE_SOURCES, v as NAME_SOURCES, w as VOCABULARY, x as STATE_CODE_HINTS, y as ONE_OF_REQUIRED_GROUPS } from "./ekycUtils-K6VJXnOg.esm.js";
9
10
  import { t as DateFormattingProvider } from "./DateFormattingProvider-DPq9zco-.esm.js";
10
- import { n as CHARACTER_CLASSES, t as formatPhoneE164 } from "./phoneFormat-JJNaWthV.esm.js";
11
- import { a as formatPhoneNational, c as oneOfRequiredErrorKey, i as cleanName, l as validateEkycField, n as projectRules, o as formatSSN, s as loadPhoneValidator, t as RULES, u as validateEkycForm } from "./ekycRules-LnvbwaCu.esm.js";
11
+ import { n as CHARACTER_CLASSES, t as formatPhoneE164 } from "./phoneFormat-DEpESpz2.esm.js";
12
+ import { a as formatPhoneNational, c as oneOfRequiredErrorKey, i as cleanName, l as validateEkycField, n as projectRules, o as formatSSN, s as loadPhoneValidator, t as RULES, u as validateEkycForm } from "./ekycRules-B7vXnbdg.esm.js";
12
13
  //#region src/internal/forms/resolvePrefill.ts
13
14
  const DISPLAY_MODES = /* @__PURE__ */ new Set([
14
15
  "editable",
@@ -90,12 +91,125 @@ function resolvePrefill(form, context, data, checks) {
90
91
  values
91
92
  };
92
93
  }
94
+ const brStateOptions = Object.values({
95
+ AC: {
96
+ code: "AC",
97
+ name: "Acre"
98
+ },
99
+ AL: {
100
+ code: "AL",
101
+ name: "Alagoas"
102
+ },
103
+ AP: {
104
+ code: "AP",
105
+ name: "Amapá"
106
+ },
107
+ AM: {
108
+ code: "AM",
109
+ name: "Amazonas"
110
+ },
111
+ BA: {
112
+ code: "BA",
113
+ name: "Bahia"
114
+ },
115
+ CE: {
116
+ code: "CE",
117
+ name: "Ceará"
118
+ },
119
+ DF: {
120
+ code: "DF",
121
+ name: "Distrito Federal"
122
+ },
123
+ ES: {
124
+ code: "ES",
125
+ name: "Espírito Santo"
126
+ },
127
+ GO: {
128
+ code: "GO",
129
+ name: "Goiás"
130
+ },
131
+ MA: {
132
+ code: "MA",
133
+ name: "Maranhão"
134
+ },
135
+ MT: {
136
+ code: "MT",
137
+ name: "Mato Grosso"
138
+ },
139
+ MS: {
140
+ code: "MS",
141
+ name: "Mato Grosso do Sul"
142
+ },
143
+ MG: {
144
+ code: "MG",
145
+ name: "Minas Gerais"
146
+ },
147
+ PA: {
148
+ code: "PA",
149
+ name: "Pará"
150
+ },
151
+ PB: {
152
+ code: "PB",
153
+ name: "Paraíba"
154
+ },
155
+ PR: {
156
+ code: "PR",
157
+ name: "Paraná"
158
+ },
159
+ PE: {
160
+ code: "PE",
161
+ name: "Pernambuco"
162
+ },
163
+ PI: {
164
+ code: "PI",
165
+ name: "Piauí"
166
+ },
167
+ RJ: {
168
+ code: "RJ",
169
+ name: "Rio de Janeiro"
170
+ },
171
+ RN: {
172
+ code: "RN",
173
+ name: "Rio Grande do Norte"
174
+ },
175
+ RS: {
176
+ code: "RS",
177
+ name: "Rio Grande do Sul"
178
+ },
179
+ RO: {
180
+ code: "RO",
181
+ name: "Rondônia"
182
+ },
183
+ RR: {
184
+ code: "RR",
185
+ name: "Roraima"
186
+ },
187
+ SC: {
188
+ code: "SC",
189
+ name: "Santa Catarina"
190
+ },
191
+ SP: {
192
+ code: "SP",
193
+ name: "São Paulo"
194
+ },
195
+ SE: {
196
+ code: "SE",
197
+ name: "Sergipe"
198
+ },
199
+ TO: {
200
+ code: "TO",
201
+ name: "Tocantins"
202
+ }
203
+ }).map((state) => ({
204
+ value: state.code,
205
+ label: state.name
206
+ }));
93
207
  //#endregion
94
208
  //#region ../form-definitions/generated/ekyc.ts
95
209
  const EKYC_DEFINITIONS = {
96
210
  "ekyc/AR/AR_CREDIT_BUR_1": {
97
211
  schemaVersion: 1,
98
- vocabulary: "1.2",
212
+ vocabulary: "1.3",
99
213
  id: "ekyc/AR/AR_CREDIT_BUR_1",
100
214
  module: "ekyc",
101
215
  country: "AR",
@@ -150,7 +264,10 @@ const EKYC_DEFINITIONS = {
150
264
  required: true,
151
265
  label: { key: "verification.labels.dateOfBirth" },
152
266
  input: { autofill: "birthday" },
153
- rules: [{ id: "notFuture" }],
267
+ rules: [{
268
+ id: "maxAge",
269
+ params: { years: 120 }
270
+ }, { id: "notFuture" }],
154
271
  prefill: ["document.birthDate"]
155
272
  },
156
273
  {
@@ -197,6 +314,7 @@ const EKYC_DEFINITIONS = {
197
314
  id: "digitCount",
198
315
  params: { lengths: [8] }
199
316
  }],
317
+ payload: { key: "idNumber" },
200
318
  prefill: ["document.documentNumber"]
201
319
  },
202
320
  {
@@ -212,6 +330,7 @@ const EKYC_DEFINITIONS = {
212
330
  id: "digitCount",
213
331
  params: { lengths: [11] }
214
332
  }],
333
+ payload: { key: "idNumber1" },
215
334
  prefill: ["document.personalNumber"]
216
335
  },
217
336
  {
@@ -298,7 +417,7 @@ const EKYC_DEFINITIONS = {
298
417
  },
299
418
  "ekyc/AR/AR_RES_REGISTER": {
300
419
  schemaVersion: 1,
301
- vocabulary: "1.2",
420
+ vocabulary: "1.3",
302
421
  id: "ekyc/AR/AR_RES_REGISTER",
303
422
  module: "ekyc",
304
423
  country: "AR",
@@ -352,7 +471,10 @@ const EKYC_DEFINITIONS = {
352
471
  group: "dateOfBirth",
353
472
  label: { key: "verification.labels.dateOfBirth" },
354
473
  input: { autofill: "birthday" },
355
- rules: [{ id: "notFuture" }],
474
+ rules: [{
475
+ id: "maxAge",
476
+ params: { years: 120 }
477
+ }, { id: "notFuture" }],
356
478
  prefill: ["document.birthDate"]
357
479
  },
358
480
  {
@@ -466,7 +588,7 @@ const EKYC_DEFINITIONS = {
466
588
  },
467
589
  "ekyc/BE/BE_CREDIT_TELCO": {
468
590
  schemaVersion: 1,
469
- vocabulary: "1.2",
591
+ vocabulary: "1.3",
470
592
  id: "ekyc/BE/BE_CREDIT_TELCO",
471
593
  module: "ekyc",
472
594
  country: "BE",
@@ -507,7 +629,10 @@ const EKYC_DEFINITIONS = {
507
629
  group: "dateOfBirth",
508
630
  label: { key: "verification.labels.dateOfBirth" },
509
631
  input: { autofill: "birthday" },
510
- rules: [{ id: "notFuture" }],
632
+ rules: [{
633
+ id: "maxAge",
634
+ params: { years: 120 }
635
+ }, { id: "notFuture" }],
511
636
  prefill: ["document.birthDate"]
512
637
  },
513
638
  {
@@ -626,7 +751,7 @@ const EKYC_DEFINITIONS = {
626
751
  },
627
752
  "ekyc/BR/BR_GOVT_1": {
628
753
  schemaVersion: 1,
629
- vocabulary: "1.2",
754
+ vocabulary: "1.3",
630
755
  id: "ekyc/BR/BR_GOVT_1",
631
756
  module: "ekyc",
632
757
  country: "BR",
@@ -668,7 +793,10 @@ const EKYC_DEFINITIONS = {
668
793
  required: true,
669
794
  label: { key: "verification.labels.dateOfBirth" },
670
795
  input: { autofill: "birthday" },
671
- rules: [{ id: "notFuture" }],
796
+ rules: [{
797
+ id: "maxAge",
798
+ params: { years: 120 }
799
+ }, { id: "notFuture" }],
672
800
  prefill: ["document.birthDate"]
673
801
  },
674
802
  {
@@ -765,15 +893,14 @@ const EKYC_DEFINITIONS = {
765
893
  },
766
894
  {
767
895
  name: "state",
768
- kind: "text",
896
+ kind: "choice",
769
897
  group: "address",
770
898
  section: "address",
771
- label: { key: "verification.labels.state" },
772
- placeholder: {
773
- key: "verification.placeholder.stateCode",
774
- params: { states: "RJ, SP" }
775
- },
899
+ widget: "select",
900
+ label: { key: "verification.labels.chooseState" },
901
+ placeholder: { key: "verification.placeholder.state" },
776
902
  input: { autofill: "addressLevel1" },
903
+ optionsRef: "BR_STATES",
777
904
  payload: { transforms: [{ id: "uppercase" }] },
778
905
  prefill: ["document.state", "poa.state"]
779
906
  },
@@ -805,7 +932,7 @@ const EKYC_DEFINITIONS = {
805
932
  },
806
933
  "ekyc/BR/BR_TAX_PHONE_REGISTER": {
807
934
  schemaVersion: 1,
808
- vocabulary: "1.2",
935
+ vocabulary: "1.3",
809
936
  id: "ekyc/BR/BR_TAX_PHONE_REGISTER",
810
937
  module: "ekyc",
811
938
  country: "BR",
@@ -859,7 +986,10 @@ const EKYC_DEFINITIONS = {
859
986
  group: "dateOfBirth",
860
987
  label: { key: "verification.labels.dateOfBirth" },
861
988
  input: { autofill: "birthday" },
862
- rules: [{ id: "notFuture" }],
989
+ rules: [{
990
+ id: "maxAge",
991
+ params: { years: 120 }
992
+ }, { id: "notFuture" }],
863
993
  prefill: ["document.birthDate"]
864
994
  },
865
995
  {
@@ -948,15 +1078,14 @@ const EKYC_DEFINITIONS = {
948
1078
  },
949
1079
  {
950
1080
  name: "state",
951
- kind: "text",
1081
+ kind: "choice",
952
1082
  group: "address",
953
1083
  section: "address",
954
- label: { key: "verification.labels.state" },
955
- placeholder: {
956
- key: "verification.placeholder.stateCode",
957
- params: { states: "RJ, SP" }
958
- },
1084
+ widget: "select",
1085
+ label: { key: "verification.labels.chooseState" },
1086
+ placeholder: { key: "verification.placeholder.state" },
959
1087
  input: { autofill: "addressLevel1" },
1088
+ optionsRef: "BR_STATES",
960
1089
  payload: { transforms: [{ id: "uppercase" }] },
961
1090
  prefill: ["document.state", "poa.state"]
962
1091
  },
@@ -988,7 +1117,7 @@ const EKYC_DEFINITIONS = {
988
1117
  },
989
1118
  "ekyc/CA/CA_CREDIT_FINTRAC": {
990
1119
  schemaVersion: 1,
991
- vocabulary: "1.2",
1120
+ vocabulary: "1.3",
992
1121
  id: "ekyc/CA/CA_CREDIT_FINTRAC",
993
1122
  module: "ekyc",
994
1123
  country: "CA",
@@ -1043,7 +1172,10 @@ const EKYC_DEFINITIONS = {
1043
1172
  required: true,
1044
1173
  label: { key: "verification.labels.dateOfBirth" },
1045
1174
  input: { autofill: "birthday" },
1046
- rules: [{ id: "notFuture" }],
1175
+ rules: [{
1176
+ id: "maxAge",
1177
+ params: { years: 120 }
1178
+ }, { id: "notFuture" }],
1047
1179
  prefill: ["document.birthDate"]
1048
1180
  },
1049
1181
  {
@@ -1147,7 +1279,7 @@ const EKYC_DEFINITIONS = {
1147
1279
  },
1148
1280
  "ekyc/CA/CA_RES_CREDIT": {
1149
1281
  schemaVersion: 1,
1150
- vocabulary: "1.2",
1282
+ vocabulary: "1.3",
1151
1283
  id: "ekyc/CA/CA_RES_CREDIT",
1152
1284
  module: "ekyc",
1153
1285
  country: "CA",
@@ -1202,7 +1334,10 @@ const EKYC_DEFINITIONS = {
1202
1334
  required: true,
1203
1335
  label: { key: "verification.labels.dateOfBirth" },
1204
1336
  input: { autofill: "birthday" },
1205
- rules: [{ id: "notFuture" }],
1337
+ rules: [{
1338
+ id: "maxAge",
1339
+ params: { years: 120 }
1340
+ }, { id: "notFuture" }],
1206
1341
  prefill: ["document.birthDate"]
1207
1342
  },
1208
1343
  {
@@ -1325,7 +1460,7 @@ const EKYC_DEFINITIONS = {
1325
1460
  },
1326
1461
  "ekyc/CA/CA_TELCO": {
1327
1462
  schemaVersion: 1,
1328
- vocabulary: "1.2",
1463
+ vocabulary: "1.3",
1329
1464
  id: "ekyc/CA/CA_TELCO",
1330
1465
  module: "ekyc",
1331
1466
  country: "CA",
@@ -1367,7 +1502,10 @@ const EKYC_DEFINITIONS = {
1367
1502
  required: true,
1368
1503
  label: { key: "verification.labels.dateOfBirth" },
1369
1504
  input: { autofill: "birthday" },
1370
- rules: [{ id: "notFuture" }],
1505
+ rules: [{
1506
+ id: "maxAge",
1507
+ params: { years: 120 }
1508
+ }, { id: "notFuture" }],
1371
1509
  prefill: ["document.birthDate"]
1372
1510
  },
1373
1511
  {
@@ -1542,6 +1680,7 @@ const EKYC_DEFINITIONS = {
1542
1680
  format: [{ id: "stripSeparators" }, { id: "uppercase" }]
1543
1681
  },
1544
1682
  rules: [{ id: "rut" }],
1683
+ payload: { key: "idNumber" },
1545
1684
  prefill: ["document.documentNumber"]
1546
1685
  }
1547
1686
  ],
@@ -1555,7 +1694,7 @@ const EKYC_DEFINITIONS = {
1555
1694
  },
1556
1695
  "ekyc/CO/CO_CIVIL_REGISTER_1": {
1557
1696
  schemaVersion: 1,
1558
- vocabulary: "1.2",
1697
+ vocabulary: "1.3",
1559
1698
  id: "ekyc/CO/CO_CIVIL_REGISTER_1",
1560
1699
  module: "ekyc",
1561
1700
  country: "CO",
@@ -1612,7 +1751,10 @@ const EKYC_DEFINITIONS = {
1612
1751
  group: "dateOfBirth",
1613
1752
  label: { key: "verification.labels.dateOfBirth" },
1614
1753
  input: { autofill: "birthday" },
1615
- rules: [{ id: "notFuture" }],
1754
+ rules: [{
1755
+ id: "maxAge",
1756
+ params: { years: 120 }
1757
+ }, { id: "notFuture" }],
1616
1758
  prefill: ["document.birthDate"]
1617
1759
  },
1618
1760
  {
@@ -1655,6 +1797,7 @@ const EKYC_DEFINITIONS = {
1655
1797
  id: "digitCount",
1656
1798
  params: { lengths: [8, 10] }
1657
1799
  }],
1800
+ payload: { key: "idNumber" },
1658
1801
  prefill: ["document.documentNumber"]
1659
1802
  },
1660
1803
  {
@@ -1691,7 +1834,7 @@ const EKYC_DEFINITIONS = {
1691
1834
  },
1692
1835
  "ekyc/DE/DE_PHONE_MOBILE_REGISTER": {
1693
1836
  schemaVersion: 1,
1694
- vocabulary: "1.2",
1837
+ vocabulary: "1.3",
1695
1838
  id: "ekyc/DE/DE_PHONE_MOBILE_REGISTER",
1696
1839
  module: "ekyc",
1697
1840
  country: "DE",
@@ -1745,7 +1888,10 @@ const EKYC_DEFINITIONS = {
1745
1888
  group: "dateOfBirth",
1746
1889
  label: { key: "verification.labels.dateOfBirth" },
1747
1890
  input: { autofill: "birthday" },
1748
- rules: [{ id: "notFuture" }],
1891
+ rules: [{
1892
+ id: "maxAge",
1893
+ params: { years: 120 }
1894
+ }, { id: "notFuture" }],
1749
1895
  prefill: ["document.birthDate"]
1750
1896
  },
1751
1897
  {
@@ -1835,7 +1981,7 @@ const EKYC_DEFINITIONS = {
1835
1981
  },
1836
1982
  "ekyc/DK/DK_CIVIL_REG_CREDIT_TELCO": {
1837
1983
  schemaVersion: 1,
1838
- vocabulary: "1.2",
1984
+ vocabulary: "1.3",
1839
1985
  id: "ekyc/DK/DK_CIVIL_REG_CREDIT_TELCO",
1840
1986
  module: "ekyc",
1841
1987
  country: "DK",
@@ -1876,7 +2022,10 @@ const EKYC_DEFINITIONS = {
1876
2022
  group: "dateOfBirth",
1877
2023
  label: { key: "verification.labels.dateOfBirth" },
1878
2024
  input: { autofill: "birthday" },
1879
- rules: [{ id: "notFuture" }],
2025
+ rules: [{
2026
+ id: "maxAge",
2027
+ params: { years: 120 }
2028
+ }, { id: "notFuture" }],
1880
2029
  prefill: ["document.birthDate"]
1881
2030
  },
1882
2031
  {
@@ -1959,7 +2108,7 @@ const EKYC_DEFINITIONS = {
1959
2108
  },
1960
2109
  "ekyc/ES/ES_PHONE_REGISTER_2": {
1961
2110
  schemaVersion: 1,
1962
- vocabulary: "1.2",
2111
+ vocabulary: "1.3",
1963
2112
  id: "ekyc/ES/ES_PHONE_REGISTER_2",
1964
2113
  module: "ekyc",
1965
2114
  country: "ES",
@@ -2013,7 +2162,10 @@ const EKYC_DEFINITIONS = {
2013
2162
  group: "dateOfBirth",
2014
2163
  label: { key: "verification.labels.dateOfBirth" },
2015
2164
  input: { autofill: "birthday" },
2016
- rules: [{ id: "notFuture" }],
2165
+ rules: [{
2166
+ id: "maxAge",
2167
+ params: { years: 120 }
2168
+ }, { id: "notFuture" }],
2017
2169
  prefill: ["document.birthDate"]
2018
2170
  },
2019
2171
  {
@@ -2058,6 +2210,7 @@ const EKYC_DEFINITIONS = {
2058
2210
  format: [{ id: "stripSeparators" }, { id: "uppercase" }]
2059
2211
  },
2060
2212
  rules: [{ id: "esDni" }],
2213
+ payload: { key: "idNumber" },
2061
2214
  prefill: ["document.documentNumber"]
2062
2215
  },
2063
2216
  {
@@ -2134,7 +2287,7 @@ const EKYC_DEFINITIONS = {
2134
2287
  },
2135
2288
  "ekyc/FI/FI_CONSUMER_POP_REG_TELCO": {
2136
2289
  schemaVersion: 1,
2137
- vocabulary: "1.2",
2290
+ vocabulary: "1.3",
2138
2291
  id: "ekyc/FI/FI_CONSUMER_POP_REG_TELCO",
2139
2292
  module: "ekyc",
2140
2293
  country: "FI",
@@ -2175,7 +2328,10 @@ const EKYC_DEFINITIONS = {
2175
2328
  group: "dateOfBirth",
2176
2329
  label: { key: "verification.labels.dateOfBirth" },
2177
2330
  input: { autofill: "birthday" },
2178
- rules: [{ id: "notFuture" }],
2331
+ rules: [{
2332
+ id: "maxAge",
2333
+ params: { years: 120 }
2334
+ }, { id: "notFuture" }],
2179
2335
  prefill: ["document.birthDate"]
2180
2336
  },
2181
2337
  {
@@ -2283,7 +2439,7 @@ const EKYC_DEFINITIONS = {
2283
2439
  },
2284
2440
  "ekyc/FI/FI_NATIONAL_ID": {
2285
2441
  schemaVersion: 1,
2286
- vocabulary: "1.2",
2442
+ vocabulary: "1.3",
2287
2443
  id: "ekyc/FI/FI_NATIONAL_ID",
2288
2444
  module: "ekyc",
2289
2445
  country: "FI",
@@ -2325,7 +2481,10 @@ const EKYC_DEFINITIONS = {
2325
2481
  required: true,
2326
2482
  label: { key: "verification.labels.dateOfBirth" },
2327
2483
  input: { autofill: "birthday" },
2328
- rules: [{ id: "notFuture" }],
2484
+ rules: [{
2485
+ id: "maxAge",
2486
+ params: { years: 120 }
2487
+ }, { id: "notFuture" }],
2329
2488
  prefill: ["document.birthDate"]
2330
2489
  },
2331
2490
  {
@@ -2362,6 +2521,7 @@ const EKYC_DEFINITIONS = {
2362
2521
  label: { key: "verification.labels.idNum" },
2363
2522
  input: { maxLength: 11 },
2364
2523
  rules: [{ id: "fiPersonalIdentityCode" }],
2524
+ payload: { key: "idNumber" },
2365
2525
  prefill: ["document.documentNumber"]
2366
2526
  },
2367
2527
  {
@@ -2430,7 +2590,7 @@ const EKYC_DEFINITIONS = {
2430
2590
  },
2431
2591
  "ekyc/GB/GB_2X2": {
2432
2592
  schemaVersion: 1,
2433
- vocabulary: "1.2",
2593
+ vocabulary: "1.3",
2434
2594
  id: "ekyc/GB/GB_2X2",
2435
2595
  module: "ekyc",
2436
2596
  country: "GB",
@@ -2472,7 +2632,10 @@ const EKYC_DEFINITIONS = {
2472
2632
  required: true,
2473
2633
  label: { key: "verification.labels.dateOfBirth" },
2474
2634
  input: { autofill: "birthday" },
2475
- rules: [{ id: "notFuture" }],
2635
+ rules: [{
2636
+ id: "maxAge",
2637
+ params: { years: 120 }
2638
+ }, { id: "notFuture" }],
2476
2639
  prefill: ["document.birthDate"]
2477
2640
  },
2478
2641
  {
@@ -2582,7 +2745,7 @@ const EKYC_DEFINITIONS = {
2582
2745
  },
2583
2746
  "ekyc/GB/UK_VOTER_REGISTER": {
2584
2747
  schemaVersion: 1,
2585
- vocabulary: "1.2",
2748
+ vocabulary: "1.3",
2586
2749
  id: "ekyc/GB/UK_VOTER_REGISTER",
2587
2750
  module: "ekyc",
2588
2751
  country: "GB",
@@ -2636,7 +2799,10 @@ const EKYC_DEFINITIONS = {
2636
2799
  group: "dateOfBirth",
2637
2800
  label: { key: "verification.labels.dateOfBirth" },
2638
2801
  input: { autofill: "birthday" },
2639
- rules: [{ id: "notFuture" }],
2802
+ rules: [{
2803
+ id: "maxAge",
2804
+ params: { years: 120 }
2805
+ }, { id: "notFuture" }],
2640
2806
  prefill: ["document.birthDate"]
2641
2807
  },
2642
2808
  {
@@ -2740,7 +2906,7 @@ const EKYC_DEFINITIONS = {
2740
2906
  },
2741
2907
  "ekyc/GR/GR_1": {
2742
2908
  schemaVersion: 1,
2743
- vocabulary: "1.2",
2909
+ vocabulary: "1.3",
2744
2910
  id: "ekyc/GR/GR_1",
2745
2911
  module: "ekyc",
2746
2912
  country: "GR",
@@ -2794,7 +2960,10 @@ const EKYC_DEFINITIONS = {
2794
2960
  group: "dateOfBirth",
2795
2961
  label: { key: "verification.labels.dateOfBirth" },
2796
2962
  input: { autofill: "birthday" },
2797
- rules: [{ id: "notFuture" }],
2963
+ rules: [{
2964
+ id: "maxAge",
2965
+ params: { years: 120 }
2966
+ }, { id: "notFuture" }],
2798
2967
  prefill: ["document.birthDate"]
2799
2968
  },
2800
2969
  {
@@ -2842,6 +3011,7 @@ const EKYC_DEFINITIONS = {
2842
3011
  id: "digitCount",
2843
3012
  params: { lengths: [9] }
2844
3013
  }],
3014
+ payload: { key: "idNumber" },
2845
3015
  prefill: ["document.documentNumber"]
2846
3016
  },
2847
3017
  {
@@ -2933,7 +3103,7 @@ const EKYC_DEFINITIONS = {
2933
3103
  },
2934
3104
  "ekyc/GT/GT_1": {
2935
3105
  schemaVersion: 1,
2936
- vocabulary: "1.2",
3106
+ vocabulary: "1.3",
2937
3107
  id: "ekyc/GT/GT_1",
2938
3108
  module: "ekyc",
2939
3109
  country: "GT",
@@ -2972,7 +3142,10 @@ const EKYC_DEFINITIONS = {
2972
3142
  required: true,
2973
3143
  label: { key: "verification.labels.dateOfBirth" },
2974
3144
  input: { autofill: "birthday" },
2975
- rules: [{ id: "notFuture" }],
3145
+ rules: [{
3146
+ id: "maxAge",
3147
+ params: { years: 120 }
3148
+ }, { id: "notFuture" }],
2976
3149
  prefill: ["document.birthDate"]
2977
3150
  },
2978
3151
  {
@@ -3015,6 +3188,7 @@ const EKYC_DEFINITIONS = {
3015
3188
  id: "digitCount",
3016
3189
  params: { lengths: [13] }
3017
3190
  }],
3191
+ payload: { key: "idNumber" },
3018
3192
  prefill: ["document.documentNumber"]
3019
3193
  }
3020
3194
  ],
@@ -3028,7 +3202,7 @@ const EKYC_DEFINITIONS = {
3028
3202
  },
3029
3203
  "ekyc/IN/IN_DMV": {
3030
3204
  schemaVersion: 1,
3031
- vocabulary: "1.2",
3205
+ vocabulary: "1.3",
3032
3206
  id: "ekyc/IN/IN_DMV",
3033
3207
  module: "ekyc",
3034
3208
  country: "IN",
@@ -3083,7 +3257,10 @@ const EKYC_DEFINITIONS = {
3083
3257
  required: true,
3084
3258
  label: { key: "verification.labels.dateOfBirth" },
3085
3259
  input: { autofill: "birthday" },
3086
- rules: [{ id: "notFuture" }],
3260
+ rules: [{
3261
+ id: "maxAge",
3262
+ params: { years: 120 }
3263
+ }, { id: "notFuture" }],
3087
3264
  prefill: ["document.birthDate"]
3088
3265
  },
3089
3266
  {
@@ -3120,6 +3297,7 @@ const EKYC_DEFINITIONS = {
3120
3297
  label: { key: "verification.labels.idNum" },
3121
3298
  input: { maxLength: 20 },
3122
3299
  rules: [{ id: "inDrivingLicenseNumber" }],
3300
+ payload: { key: "idNumber" },
3123
3301
  prefill: ["document.documentNumber"]
3124
3302
  },
3125
3303
  {
@@ -3206,7 +3384,7 @@ const EKYC_DEFINITIONS = {
3206
3384
  },
3207
3385
  "ekyc/IN/INDIA_PAN_1": {
3208
3386
  schemaVersion: 1,
3209
- vocabulary: "1.2",
3387
+ vocabulary: "1.3",
3210
3388
  id: "ekyc/IN/INDIA_PAN_1",
3211
3389
  module: "ekyc",
3212
3390
  country: "IN",
@@ -3247,7 +3425,10 @@ const EKYC_DEFINITIONS = {
3247
3425
  required: true,
3248
3426
  label: { key: "verification.labels.dateOfBirth" },
3249
3427
  input: { autofill: "birthday" },
3250
- rules: [{ id: "notFuture" }],
3428
+ rules: [{
3429
+ id: "maxAge",
3430
+ params: { years: 120 }
3431
+ }, { id: "notFuture" }],
3251
3432
  prefill: ["document.birthDate"]
3252
3433
  },
3253
3434
  {
@@ -3279,7 +3460,7 @@ const EKYC_DEFINITIONS = {
3279
3460
  },
3280
3461
  "ekyc/IN/INDIA_PASSPORT_1": {
3281
3462
  schemaVersion: 1,
3282
- vocabulary: "1.2",
3463
+ vocabulary: "1.3",
3283
3464
  id: "ekyc/IN/INDIA_PASSPORT_1",
3284
3465
  module: "ekyc",
3285
3466
  country: "IN",
@@ -3327,7 +3508,10 @@ const EKYC_DEFINITIONS = {
3327
3508
  required: true,
3328
3509
  label: { key: "verification.labels.dateOfBirth" },
3329
3510
  input: { autofill: "birthday" },
3330
- rules: [{ id: "notFuture" }],
3511
+ rules: [{
3512
+ id: "maxAge",
3513
+ params: { years: 120 }
3514
+ }, { id: "notFuture" }],
3331
3515
  prefill: ["document.birthDate"]
3332
3516
  },
3333
3517
  {
@@ -3348,6 +3532,7 @@ const EKYC_DEFINITIONS = {
3348
3532
  },
3349
3533
  message: { key: "verification.errors.passportNumberFormat" }
3350
3534
  }],
3535
+ payload: { key: "idNumber" },
3351
3536
  prefill: ["document.documentNumber"]
3352
3537
  },
3353
3538
  {
@@ -3389,7 +3574,7 @@ const EKYC_DEFINITIONS = {
3389
3574
  },
3390
3575
  "ekyc/IT/IT_CIVIL_REG_CREDIT_TELCO": {
3391
3576
  schemaVersion: 1,
3392
- vocabulary: "1.2",
3577
+ vocabulary: "1.3",
3393
3578
  id: "ekyc/IT/IT_CIVIL_REG_CREDIT_TELCO",
3394
3579
  module: "ekyc",
3395
3580
  country: "IT",
@@ -3430,7 +3615,10 @@ const EKYC_DEFINITIONS = {
3430
3615
  group: "dateOfBirth",
3431
3616
  label: { key: "verification.labels.dateOfBirth" },
3432
3617
  input: { autofill: "birthday" },
3433
- rules: [{ id: "notFuture" }],
3618
+ rules: [{
3619
+ id: "maxAge",
3620
+ params: { years: 120 }
3621
+ }, { id: "notFuture" }],
3434
3622
  prefill: ["document.birthDate"]
3435
3623
  },
3436
3624
  {
@@ -3604,6 +3792,7 @@ const EKYC_DEFINITIONS = {
3604
3792
  id: "digitCount",
3605
3793
  params: { lengths: [14] }
3606
3794
  }],
3795
+ payload: { key: "idNumber" },
3607
3796
  prefill: ["document.documentNumber"]
3608
3797
  },
3609
3798
  {
@@ -3652,7 +3841,7 @@ const EKYC_DEFINITIONS = {
3652
3841
  },
3653
3842
  "ekyc/MX/MX_CIVIL_REGISTER_2": {
3654
3843
  schemaVersion: 1,
3655
- vocabulary: "1.2",
3844
+ vocabulary: "1.3",
3656
3845
  id: "ekyc/MX/MX_CIVIL_REGISTER_2",
3657
3846
  module: "ekyc",
3658
3847
  country: "MX",
@@ -3705,7 +3894,10 @@ const EKYC_DEFINITIONS = {
3705
3894
  group: "dateOfBirth",
3706
3895
  label: { key: "verification.labels.dateOfBirth" },
3707
3896
  input: { autofill: "birthday" },
3708
- rules: [{ id: "notFuture" }],
3897
+ rules: [{
3898
+ id: "maxAge",
3899
+ params: { years: 120 }
3900
+ }, { id: "notFuture" }],
3709
3901
  prefill: ["document.birthDate"]
3710
3902
  },
3711
3903
  {
@@ -3752,6 +3944,7 @@ const EKYC_DEFINITIONS = {
3752
3944
  id: "curp",
3753
3945
  message: { key: "verification.errors.curp" }
3754
3946
  }],
3947
+ payload: { key: "idNumber" },
3755
3948
  prefill: ["document.documentNumber"]
3756
3949
  },
3757
3950
  {
@@ -3779,7 +3972,7 @@ const EKYC_DEFINITIONS = {
3779
3972
  },
3780
3973
  "ekyc/NL/NL_CIVIL_REG_CREDIT_TELCO": {
3781
3974
  schemaVersion: 1,
3782
- vocabulary: "1.2",
3975
+ vocabulary: "1.3",
3783
3976
  id: "ekyc/NL/NL_CIVIL_REG_CREDIT_TELCO",
3784
3977
  module: "ekyc",
3785
3978
  country: "NL",
@@ -3820,7 +4013,10 @@ const EKYC_DEFINITIONS = {
3820
4013
  group: "dateOfBirth",
3821
4014
  label: { key: "verification.labels.dateOfBirth" },
3822
4015
  input: { autofill: "birthday" },
3823
- rules: [{ id: "notFuture" }],
4016
+ rules: [{
4017
+ id: "maxAge",
4018
+ params: { years: 120 }
4019
+ }, { id: "notFuture" }],
3824
4020
  prefill: ["document.birthDate"]
3825
4021
  },
3826
4022
  {
@@ -3903,7 +4099,7 @@ const EKYC_DEFINITIONS = {
3903
4099
  },
3904
4100
  "ekyc/NL/NL_CONSUMER_POP_REG_TELCO": {
3905
4101
  schemaVersion: 1,
3906
- vocabulary: "1.2",
4102
+ vocabulary: "1.3",
3907
4103
  id: "ekyc/NL/NL_CONSUMER_POP_REG_TELCO",
3908
4104
  module: "ekyc",
3909
4105
  country: "NL",
@@ -3944,7 +4140,10 @@ const EKYC_DEFINITIONS = {
3944
4140
  group: "dateOfBirth",
3945
4141
  label: { key: "verification.labels.dateOfBirth" },
3946
4142
  input: { autofill: "birthday" },
3947
- rules: [{ id: "notFuture" }],
4143
+ rules: [{
4144
+ id: "maxAge",
4145
+ params: { years: 120 }
4146
+ }, { id: "notFuture" }],
3948
4147
  prefill: ["document.birthDate"]
3949
4148
  },
3950
4149
  {
@@ -4048,7 +4247,7 @@ const EKYC_DEFINITIONS = {
4048
4247
  },
4049
4248
  "ekyc/NO/NO_CONS_POP_REG": {
4050
4249
  schemaVersion: 1,
4051
- vocabulary: "1.2",
4250
+ vocabulary: "1.3",
4052
4251
  id: "ekyc/NO/NO_CONS_POP_REG",
4053
4252
  module: "ekyc",
4054
4253
  country: "NO",
@@ -4090,7 +4289,10 @@ const EKYC_DEFINITIONS = {
4090
4289
  required: true,
4091
4290
  label: { key: "verification.labels.dateOfBirth" },
4092
4291
  input: { autofill: "birthday" },
4093
- rules: [{ id: "notFuture" }],
4292
+ rules: [{
4293
+ id: "maxAge",
4294
+ params: { years: 120 }
4295
+ }, { id: "notFuture" }],
4094
4296
  prefill: ["document.birthDate"]
4095
4297
  },
4096
4298
  {
@@ -4193,7 +4395,7 @@ const EKYC_DEFINITIONS = {
4193
4395
  },
4194
4396
  "ekyc/PE/PE_CIVIL_REGISTER_2": {
4195
4397
  schemaVersion: 1,
4196
- vocabulary: "1.2",
4398
+ vocabulary: "1.3",
4197
4399
  id: "ekyc/PE/PE_CIVIL_REGISTER_2",
4198
4400
  module: "ekyc",
4199
4401
  country: "PE",
@@ -4247,7 +4449,10 @@ const EKYC_DEFINITIONS = {
4247
4449
  group: "dateOfBirth",
4248
4450
  label: { key: "verification.labels.dateOfBirth" },
4249
4451
  input: { autofill: "birthday" },
4250
- rules: [{ id: "notFuture" }],
4452
+ rules: [{
4453
+ id: "maxAge",
4454
+ params: { years: 120 }
4455
+ }, { id: "notFuture" }],
4251
4456
  prefill: ["document.birthDate"]
4252
4457
  },
4253
4458
  {
@@ -4290,6 +4495,7 @@ const EKYC_DEFINITIONS = {
4290
4495
  id: "digitCount",
4291
4496
  params: { lengths: [8] }
4292
4497
  }],
4498
+ payload: { key: "idNumber" },
4293
4499
  prefill: ["document.documentNumber"]
4294
4500
  },
4295
4501
  {
@@ -4328,7 +4534,7 @@ const EKYC_DEFINITIONS = {
4328
4534
  },
4329
4535
  "ekyc/PH/PH_RES_CREDIT": {
4330
4536
  schemaVersion: 1,
4331
- vocabulary: "1.2",
4537
+ vocabulary: "1.3",
4332
4538
  id: "ekyc/PH/PH_RES_CREDIT",
4333
4539
  module: "ekyc",
4334
4540
  country: "PH",
@@ -4387,7 +4593,10 @@ const EKYC_DEFINITIONS = {
4387
4593
  required: true,
4388
4594
  label: { key: "verification.labels.dateOfBirth" },
4389
4595
  input: { autofill: "birthday" },
4390
- rules: [{ id: "notFuture" }],
4596
+ rules: [{
4597
+ id: "maxAge",
4598
+ params: { years: 120 }
4599
+ }, { id: "notFuture" }],
4391
4600
  prefill: ["document.birthDate"]
4392
4601
  },
4393
4602
  {
@@ -4439,6 +4648,7 @@ const EKYC_DEFINITIONS = {
4439
4648
  extra: "-"
4440
4649
  }
4441
4650
  }],
4651
+ payload: { key: "idNumber" },
4442
4652
  prefill: ["document.documentNumber"]
4443
4653
  },
4444
4654
  {
@@ -4541,7 +4751,7 @@ const EKYC_DEFINITIONS = {
4541
4751
  },
4542
4752
  "ekyc/PT/PT_CIVIL_REG_CREDIT_TELCO": {
4543
4753
  schemaVersion: 1,
4544
- vocabulary: "1.2",
4754
+ vocabulary: "1.3",
4545
4755
  id: "ekyc/PT/PT_CIVIL_REG_CREDIT_TELCO",
4546
4756
  module: "ekyc",
4547
4757
  country: "PT",
@@ -4582,7 +4792,10 @@ const EKYC_DEFINITIONS = {
4582
4792
  group: "dateOfBirth",
4583
4793
  label: { key: "verification.labels.dateOfBirth" },
4584
4794
  input: { autofill: "birthday" },
4585
- rules: [{ id: "notFuture" }],
4795
+ rules: [{
4796
+ id: "maxAge",
4797
+ params: { years: 120 }
4798
+ }, { id: "notFuture" }],
4586
4799
  prefill: ["document.birthDate"]
4587
4800
  },
4588
4801
  {
@@ -4666,7 +4879,7 @@ const EKYC_DEFINITIONS = {
4666
4879
  },
4667
4880
  "ekyc/SG/SG_PHONE_REGISTER": {
4668
4881
  schemaVersion: 1,
4669
- vocabulary: "1.2",
4882
+ vocabulary: "1.3",
4670
4883
  id: "ekyc/SG/SG_PHONE_REGISTER",
4671
4884
  module: "ekyc",
4672
4885
  country: "SG",
@@ -4720,7 +4933,10 @@ const EKYC_DEFINITIONS = {
4720
4933
  group: "dateOfBirth",
4721
4934
  label: { key: "verification.labels.dateOfBirth" },
4722
4935
  input: { autofill: "birthday" },
4723
- rules: [{ id: "notFuture" }],
4936
+ rules: [{
4937
+ id: "maxAge",
4938
+ params: { years: 120 }
4939
+ }, { id: "notFuture" }],
4724
4940
  prefill: ["document.birthDate"]
4725
4941
  },
4726
4942
  {
@@ -4824,7 +5040,7 @@ const EKYC_DEFINITIONS = {
4824
5040
  },
4825
5041
  "ekyc/US/US_CREDIT_BUREAU_1": {
4826
5042
  schemaVersion: 1,
4827
- vocabulary: "1.2",
5043
+ vocabulary: "1.3",
4828
5044
  id: "ekyc/US/US_CREDIT_BUREAU_1",
4829
5045
  module: "ekyc",
4830
5046
  country: "US",
@@ -4878,7 +5094,10 @@ const EKYC_DEFINITIONS = {
4878
5094
  group: "dateOfBirth",
4879
5095
  label: { key: "verification.labels.dateOfBirth" },
4880
5096
  input: { autofill: "birthday" },
4881
- rules: [{ id: "notFuture" }],
5097
+ rules: [{
5098
+ id: "maxAge",
5099
+ params: { years: 120 }
5100
+ }, { id: "notFuture" }],
4882
5101
  prefill: ["document.birthDate"]
4883
5102
  },
4884
5103
  {
@@ -4993,7 +5212,7 @@ const EKYC_DEFINITIONS = {
4993
5212
  },
4994
5213
  "ekyc/US/US_CREDIT_BUREAU_3": {
4995
5214
  schemaVersion: 1,
4996
- vocabulary: "1.2",
5215
+ vocabulary: "1.3",
4997
5216
  id: "ekyc/US/US_CREDIT_BUREAU_3",
4998
5217
  module: "ekyc",
4999
5218
  country: "US",
@@ -5047,7 +5266,10 @@ const EKYC_DEFINITIONS = {
5047
5266
  group: "dateOfBirth",
5048
5267
  label: { key: "verification.labels.dateOfBirth" },
5049
5268
  input: { autofill: "birthday" },
5050
- rules: [{ id: "notFuture" }],
5269
+ rules: [{
5270
+ id: "maxAge",
5271
+ params: { years: 120 }
5272
+ }, { id: "notFuture" }],
5051
5273
  prefill: ["document.birthDate"]
5052
5274
  },
5053
5275
  {
@@ -5173,7 +5395,7 @@ const EKYC_DEFINITIONS = {
5173
5395
  },
5174
5396
  "ekyc/US/US_CREDIT_TELCO": {
5175
5397
  schemaVersion: 1,
5176
- vocabulary: "1.2",
5398
+ vocabulary: "1.3",
5177
5399
  id: "ekyc/US/US_CREDIT_TELCO",
5178
5400
  module: "ekyc",
5179
5401
  country: "US",
@@ -5218,7 +5440,10 @@ const EKYC_DEFINITIONS = {
5218
5440
  group: "dateOfBirth",
5219
5441
  label: { key: "verification.labels.dateOfBirth" },
5220
5442
  input: { autofill: "birthday" },
5221
- rules: [{ id: "notFuture" }],
5443
+ rules: [{
5444
+ id: "maxAge",
5445
+ params: { years: 120 }
5446
+ }, { id: "notFuture" }],
5222
5447
  prefill: ["document.birthDate"]
5223
5448
  },
5224
5449
  {
@@ -5343,7 +5568,7 @@ const EKYC_DEFINITIONS = {
5343
5568
  },
5344
5569
  "ekyc/US/US_TELCO_1": {
5345
5570
  schemaVersion: 1,
5346
- vocabulary: "1.2",
5571
+ vocabulary: "1.3",
5347
5572
  id: "ekyc/US/US_TELCO_1",
5348
5573
  module: "ekyc",
5349
5574
  country: "US",
@@ -5384,7 +5609,10 @@ const EKYC_DEFINITIONS = {
5384
5609
  group: "dateOfBirth",
5385
5610
  label: { key: "verification.labels.dateOfBirth" },
5386
5611
  input: { autofill: "birthday" },
5387
- rules: [{ id: "notFuture" }],
5612
+ rules: [{
5613
+ id: "maxAge",
5614
+ params: { years: 120 }
5615
+ }, { id: "notFuture" }],
5388
5616
  prefill: ["document.birthDate"]
5389
5617
  },
5390
5618
  {
@@ -5512,7 +5740,7 @@ const EKYC_DEFINITIONS = {
5512
5740
  },
5513
5741
  "ekyc/US/US_TELCO_2": {
5514
5742
  schemaVersion: 1,
5515
- vocabulary: "1.2",
5743
+ vocabulary: "1.3",
5516
5744
  id: "ekyc/US/US_TELCO_2",
5517
5745
  module: "ekyc",
5518
5746
  country: "US",
@@ -5551,7 +5779,10 @@ const EKYC_DEFINITIONS = {
5551
5779
  group: "dateOfBirth",
5552
5780
  label: { key: "verification.labels.dateOfBirth" },
5553
5781
  input: { autofill: "birthday" },
5554
- rules: [{ id: "notFuture" }],
5782
+ rules: [{
5783
+ id: "maxAge",
5784
+ params: { years: 120 }
5785
+ }, { id: "notFuture" }],
5555
5786
  prefill: ["document.birthDate"]
5556
5787
  },
5557
5788
  {
@@ -5647,7 +5878,7 @@ const EKYC_DEFINITIONS = {
5647
5878
  },
5648
5879
  "ekyc/VE/VE_CIVIL_REGISTER": {
5649
5880
  schemaVersion: 1,
5650
- vocabulary: "1.2",
5881
+ vocabulary: "1.3",
5651
5882
  id: "ekyc/VE/VE_CIVIL_REGISTER",
5652
5883
  module: "ekyc",
5653
5884
  country: "VE",
@@ -5700,7 +5931,10 @@ const EKYC_DEFINITIONS = {
5700
5931
  group: "dateOfBirth",
5701
5932
  label: { key: "verification.labels.dateOfBirth" },
5702
5933
  input: { autofill: "birthday" },
5703
- rules: [{ id: "notFuture" }],
5934
+ rules: [{
5935
+ id: "maxAge",
5936
+ params: { years: 120 }
5937
+ }, { id: "notFuture" }],
5704
5938
  prefill: ["document.birthDate"]
5705
5939
  },
5706
5940
  {
@@ -5746,6 +5980,7 @@ const EKYC_DEFINITIONS = {
5746
5980
  max: 9
5747
5981
  }
5748
5982
  }],
5983
+ payload: { key: "idNumber" },
5749
5984
  prefill: ["document.documentNumber"]
5750
5985
  }
5751
5986
  ],
@@ -5758,119 +5993,6 @@ const EKYC_DEFINITIONS = {
5758
5993
  }
5759
5994
  }
5760
5995
  };
5761
- const brStateOptions = Object.values({
5762
- AC: {
5763
- code: "AC",
5764
- name: "Acre"
5765
- },
5766
- AL: {
5767
- code: "AL",
5768
- name: "Alagoas"
5769
- },
5770
- AP: {
5771
- code: "AP",
5772
- name: "Amapá"
5773
- },
5774
- AM: {
5775
- code: "AM",
5776
- name: "Amazonas"
5777
- },
5778
- BA: {
5779
- code: "BA",
5780
- name: "Bahia"
5781
- },
5782
- CE: {
5783
- code: "CE",
5784
- name: "Ceará"
5785
- },
5786
- DF: {
5787
- code: "DF",
5788
- name: "Distrito Federal"
5789
- },
5790
- ES: {
5791
- code: "ES",
5792
- name: "Espírito Santo"
5793
- },
5794
- GO: {
5795
- code: "GO",
5796
- name: "Goiás"
5797
- },
5798
- MA: {
5799
- code: "MA",
5800
- name: "Maranhão"
5801
- },
5802
- MT: {
5803
- code: "MT",
5804
- name: "Mato Grosso"
5805
- },
5806
- MS: {
5807
- code: "MS",
5808
- name: "Mato Grosso do Sul"
5809
- },
5810
- MG: {
5811
- code: "MG",
5812
- name: "Minas Gerais"
5813
- },
5814
- PA: {
5815
- code: "PA",
5816
- name: "Pará"
5817
- },
5818
- PB: {
5819
- code: "PB",
5820
- name: "Paraíba"
5821
- },
5822
- PR: {
5823
- code: "PR",
5824
- name: "Paraná"
5825
- },
5826
- PE: {
5827
- code: "PE",
5828
- name: "Pernambuco"
5829
- },
5830
- PI: {
5831
- code: "PI",
5832
- name: "Piauí"
5833
- },
5834
- RJ: {
5835
- code: "RJ",
5836
- name: "Rio de Janeiro"
5837
- },
5838
- RN: {
5839
- code: "RN",
5840
- name: "Rio Grande do Norte"
5841
- },
5842
- RS: {
5843
- code: "RS",
5844
- name: "Rio Grande do Sul"
5845
- },
5846
- RO: {
5847
- code: "RO",
5848
- name: "Rondônia"
5849
- },
5850
- RR: {
5851
- code: "RR",
5852
- name: "Roraima"
5853
- },
5854
- SC: {
5855
- code: "SC",
5856
- name: "Santa Catarina"
5857
- },
5858
- SP: {
5859
- code: "SP",
5860
- name: "São Paulo"
5861
- },
5862
- SE: {
5863
- code: "SE",
5864
- name: "Sergipe"
5865
- },
5866
- TO: {
5867
- code: "TO",
5868
- name: "Tocantins"
5869
- }
5870
- }).map((state) => ({
5871
- value: state.code,
5872
- label: state.name
5873
- }));
5874
5996
  const caProvinceOptions = Object.values({
5875
5997
  AB: {
5876
5998
  code: "AB",
@@ -6225,7 +6347,8 @@ const RULE_PARAMS = {
6225
6347
  digitCount: ({ lengths, min, max }) => lengths !== void 0 ? isNonEmptyArrayOf(lengths, isCount) && min === void 0 && max === void 0 : isCount(min) && isCount(max) && min <= max,
6226
6348
  allowedCharacters: ({ classes, extra }) => isNonEmptyArrayOf(classes, isCharacterClass) && (extra === void 0 || isString(extra)),
6227
6349
  charTemplate: ({ templates, ignoreCase }) => isNonEmptyArrayOf(templates, (t) => isString(t) && t !== "") && (ignoreCase === void 0 || typeof ignoreCase === "boolean"),
6228
- numericRange: ({ min, max }) => isInteger(min) && isInteger(max) && min <= max
6350
+ numericRange: ({ min, max }) => isInteger(min) && isInteger(max) && min <= max,
6351
+ maxAge: ({ years }) => isCount(years)
6229
6352
  };
6230
6353
  /**
6231
6354
  * What the projection can express today. Request-body transforms are listed
@@ -6235,7 +6358,7 @@ const RULE_PARAMS = {
6235
6358
  */
6236
6359
  const EKYC_SUPPORTED_IDS = {
6237
6360
  schemaVersions: [1],
6238
- vocabulary: "1.2",
6361
+ vocabulary: "1.3",
6239
6362
  kinds: /* @__PURE__ */ new Set([
6240
6363
  "text",
6241
6364
  "date",
@@ -6530,6 +6653,11 @@ function projectEkycFields(form, verificationFields, country) {
6530
6653
  //#endregion
6531
6654
  //#region src/modules/ekyc/ekycActions.ts
6532
6655
  const dateFormattingInstance = new DateFormattingProvider();
6656
+ /** Countries whose state is picked from a list, sent as the two-letter code. */
6657
+ const STATE_OPTIONS_BY_COUNTRY = {
6658
+ US: usStateOptions,
6659
+ BR: brStateOptions
6660
+ };
6533
6661
  function buildValidationRules(field, country, configSource) {
6534
6662
  const rules = [];
6535
6663
  if (field.required) rules.push({ type: "required" });
@@ -6550,6 +6678,10 @@ function buildValidationRules(field, country, configSource) {
6550
6678
  type: "exactLength",
6551
6679
  length: 10
6552
6680
  });
6681
+ if (field.name === "dateOfBirth") rules.push({
6682
+ type: "maxAge",
6683
+ years: 120
6684
+ });
6553
6685
  return rules;
6554
6686
  }
6555
6687
  function applyOneOfRequiredGroups(defs, configSource) {
@@ -6641,8 +6773,11 @@ function legacyBuildFieldDefs(fields, configSource, country, enablePhoneRisk = f
6641
6773
  ] });
6642
6774
  else add("nationality", "text", "verification.labels.nationality", fields.nationality);
6643
6775
  if (fields.last4SSN) add("last4SSN", "text", "verification.labels.last4SSN", fields.last4SSN, { maxLength: 4 });
6644
- if (fields.idNum) add("idNum", "text", "verification.labels.idNum", fields.idNum, { maxLength: 13 });
6645
- if (fields.idNum1) add("idNum1", "text", "verification.labels.idNum1", fields.idNum1);
6776
+ if (fields.idNum) add("idNum", "text", "verification.labels.idNum", fields.idNum, {
6777
+ maxLength: 13,
6778
+ payloadKey: "idNumber"
6779
+ });
6780
+ if (fields.idNum1) add("idNum1", "text", "verification.labels.idNum1", fields.idNum1, { payloadKey: "idNumber1" });
6646
6781
  if (fields.gender) add("gender", "radio", "verification.labels.gender", fields.gender, { options: [{
6647
6782
  value: "F",
6648
6783
  label: "common.female"
@@ -6654,23 +6789,26 @@ function legacyBuildFieldDefs(fields, configSource, country, enablePhoneRisk = f
6654
6789
  const addAddressFields = () => {
6655
6790
  const addrSource = fields.address;
6656
6791
  if (!addrSource) return;
6657
- if (HOUSE_NO_SOURCES.includes(configSource)) add("houseNo", "text", "verification.labels.houseNo", addrSource, { section: "address" });
6658
6792
  if (STREET_SOURCES.includes(configSource)) add("street", "text", "verification.labels.street", addrSource, { section: "address" });
6793
+ if (HOUSE_NO_SOURCES.includes(configSource)) add("houseNo", "text", "verification.labels.houseNo", addrSource, { section: "address" });
6659
6794
  if (APARTMENT_SOURCES.includes(configSource)) add("apartment", "text", "verification.labels.apartment", addrSource, {
6660
6795
  section: "address",
6661
6796
  placeholder: "verification.placeholder.apartment"
6662
6797
  });
6663
6798
  if (CITY_SOURCES.includes(configSource)) add("city", "text", "verification.labels.city", addrSource, { section: "address" });
6664
- if (ADDRESS_STATE_SOURCES.includes(configSource)) add("state", country === "US" ? "dropdown" : "text", country === "US" ? "verification.labels.chooseState" : "verification.labels.state", addrSource, {
6665
- section: "address",
6666
- ...country === "US" ? {
6667
- options: usStateOptions,
6668
- placeholder: "verification.placeholder.state"
6669
- } : {
6670
- placeholder: "verification.placeholder.stateCode",
6671
- placeholderParams: { states: STATE_CODE_HINTS[country] ?? "" }
6672
- }
6673
- });
6799
+ if (ADDRESS_STATE_SOURCES.includes(configSource)) {
6800
+ const stateOptions = STATE_OPTIONS_BY_COUNTRY[country];
6801
+ add("state", stateOptions ? "dropdown" : "text", stateOptions ? "verification.labels.chooseState" : "verification.labels.state", addrSource, {
6802
+ section: "address",
6803
+ ...stateOptions ? {
6804
+ options: stateOptions,
6805
+ placeholder: "verification.placeholder.state"
6806
+ } : {
6807
+ placeholder: "verification.placeholder.stateCode",
6808
+ placeholderParams: { states: STATE_CODE_HINTS[country] ?? "" }
6809
+ }
6810
+ });
6811
+ }
6674
6812
  if (POSTAL_CODE_SOURCES.includes(configSource)) add("postalCode", "text", country === "US" ? "verification.labels.zipCode" : "verification.labels.postalCode", addrSource, {
6675
6813
  section: "address",
6676
6814
  maxLength: getPostalCodeMaxLength(country)
@@ -6920,6 +7058,10 @@ async function submitEkyc(data, signal) {
6920
7058
  //#region src/modules/ekyc/ekycGuards.ts
6921
7059
  const hasNoValidationErrorsGuard = ({ context }) => Object.keys(context.validationErrors ?? {}).length === 0;
6922
7060
  const hasFlowIdGuard = ({ context }) => !!context.config.flowId;
7061
+ /** A `flowId` config whose module config never arrived (its load failed). */
7062
+ const needsModuleConfigGuard = ({ context }) => !!context.config.flowId && context.moduleConfig === void 0;
7063
+ /** A form with a phone field whose phone rules haven't loaded. */
7064
+ const needsPhoneRulesGuard = ({ context }) => context.fields.some((field) => field.type === "phone") && getPhoneValidation() === void 0;
6923
7065
  const hasVerificationFieldsGuard = ({ context }) => !!context.config.verificationFields;
6924
7066
  const COUNTRY_NOT_SUPPORTED_MSG = "Request unsuccessful. Country not supported for EKYC.";
6925
7067
  const isCountryNotSupportedGuard = ({ event }) => {
@@ -6935,6 +7077,14 @@ const fetchModuleConfigActor = fromPromise(async ({ input, signal }) => {
6935
7077
  if (getEKYCFields(config).phone !== false) await phoneRules;
6936
7078
  return config;
6937
7079
  });
7080
+ /**
7081
+ * Loads the phone validation rules for a config that arrived already resolved
7082
+ * (a workflow node, or `verificationFields`), which skips
7083
+ * `fetchModuleConfigActor`. Only a form with a phone field waits for them.
7084
+ */
7085
+ const loadPhoneRulesActor = fromPromise(async ({ input }) => {
7086
+ if (input.hasPhone) await loadPhoneValidator();
7087
+ });
6938
7088
  /** The first address suggestion for the first query that has one. */
6939
7089
  async function firstSuggestion(queries, signal) {
6940
7090
  for (const query of queries) try {
@@ -6997,6 +7147,7 @@ const ekycMachine = setup({
6997
7147
  },
6998
7148
  actors: {
6999
7149
  fetchModuleConfig: fetchModuleConfigActor,
7150
+ loadPhoneRules: loadPhoneRulesActor,
7000
7151
  fetchPrefillData: fetchPrefillDataActor,
7001
7152
  submitEkyc: submitEkycActor,
7002
7153
  debounceSearch: debounceSearchActor
@@ -7112,6 +7263,8 @@ const ekycMachine = setup({
7112
7263
  hasNoValidationErrors: hasNoValidationErrorsGuard,
7113
7264
  hasFlowId: hasFlowIdGuard,
7114
7265
  hasVerificationFields: hasVerificationFieldsGuard,
7266
+ needsModuleConfig: needsModuleConfigGuard,
7267
+ needsPhoneRules: needsPhoneRulesGuard,
7115
7268
  isCountryNotSupported: isCountryNotSupportedGuard,
7116
7269
  shouldAutoSubmit: ({ context }) => !context.autoSubmitted && showsNoFields(context),
7117
7270
  showsNoFields: ({ context }) => showsNoFields(context)
@@ -7143,11 +7296,11 @@ const ekycMachine = setup({
7143
7296
  states: {
7144
7297
  idle: { on: { LOAD: [
7145
7298
  {
7146
- target: "loading",
7299
+ target: "loading.moduleConfig",
7147
7300
  guard: "hasFlowId"
7148
7301
  },
7149
7302
  {
7150
- target: "prefilling",
7303
+ target: "loading.phoneRules",
7151
7304
  guard: "hasVerificationFields",
7152
7305
  actions: assign(({ context }) => {
7153
7306
  const vFields = context.config.verificationFields;
@@ -7163,19 +7316,34 @@ const ekycMachine = setup({
7163
7316
  },
7164
7317
  { target: "misconfigured" }
7165
7318
  ] } },
7166
- loading: { invoke: {
7167
- id: "fetchModuleConfig",
7168
- src: "fetchModuleConfig",
7169
- input: ({ context }) => ({ flowId: context.config.flowId }),
7170
- onDone: {
7171
- target: "prefilling",
7172
- actions: "setModuleConfig"
7173
- },
7174
- onError: {
7175
- target: "error",
7176
- actions: "setErrorMessage"
7319
+ loading: {
7320
+ initial: "moduleConfig",
7321
+ states: {
7322
+ moduleConfig: { invoke: {
7323
+ id: "fetchModuleConfig",
7324
+ src: "fetchModuleConfig",
7325
+ input: ({ context }) => ({ flowId: context.config.flowId }),
7326
+ onDone: {
7327
+ target: "#ekyc.prefilling",
7328
+ actions: "setModuleConfig"
7329
+ },
7330
+ onError: {
7331
+ target: "#ekyc.error",
7332
+ actions: "setErrorMessage"
7333
+ }
7334
+ } },
7335
+ phoneRules: { invoke: {
7336
+ id: "loadPhoneRules",
7337
+ src: "loadPhoneRules",
7338
+ input: ({ context }) => ({ hasPhone: context.fields.some((field) => field.type === "phone") }),
7339
+ onDone: { target: "#ekyc.prefilling" },
7340
+ onError: {
7341
+ target: "#ekyc.error",
7342
+ actions: "setErrorMessage"
7343
+ }
7344
+ } }
7177
7345
  }
7178
- } },
7346
+ },
7179
7347
  prefilling: { invoke: {
7180
7348
  id: "fetchPrefillData",
7181
7349
  src: "fetchPrefillData",
@@ -7267,10 +7435,22 @@ const ekycMachine = setup({
7267
7435
  } },
7268
7436
  success: { after: { 3e3: "finished" } },
7269
7437
  error: { on: {
7270
- RETRY: {
7271
- target: "form",
7272
- actions: ["clearErrorMessage", assign({ autoSubmitted: () => false })]
7273
- },
7438
+ RETRY: [
7439
+ {
7440
+ target: "loading.moduleConfig",
7441
+ guard: "needsModuleConfig",
7442
+ actions: "clearErrorMessage"
7443
+ },
7444
+ {
7445
+ target: "loading.phoneRules",
7446
+ guard: "needsPhoneRules",
7447
+ actions: "clearErrorMessage"
7448
+ },
7449
+ {
7450
+ target: "form",
7451
+ actions: ["clearErrorMessage", assign({ autoSubmitted: () => false })]
7452
+ }
7453
+ ],
7274
7454
  SKIP: { target: "finished" },
7275
7455
  CLOSE: { target: "closed" }
7276
7456
  } },