@incodetech/core 0.0.0-dev-20261029-ab9a031d → 0.0.0-dev-20261029-a725a1aa

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 (94) hide show
  1. package/dist/{FaceDetectionProvider-BPw6Sztf.esm.js → FaceDetectionProvider-DyPUMA8q.esm.js} +5 -5
  2. package/dist/{addressSearch-CBw55d_y.esm.js → addressSearch-B0cu1Cuf.esm.js} +6 -3
  3. package/dist/ae-signature.esm.js +1 -1
  4. package/dist/{apiError-DT3rvcZJ.esm.js → apiError-B30TKIvV.esm.js} +1 -1
  5. package/dist/authentication.d.ts +3 -3
  6. package/dist/authentication.esm.js +2 -2
  7. package/dist/{authenticationManager-BPpSImsv.d.ts → authenticationManager-CfD9LLbU.d.ts} +1 -1
  8. package/dist/{authenticationManager-SVrl1zgN.esm.js → authenticationManager-Cnixv5FG.esm.js} +3 -3
  9. package/dist/{authenticationStateMachine-BS1iPaFn.esm.js → authenticationStateMachine-vqX2IRlb.esm.js} +2 -2
  10. package/dist/consent.d.ts +1 -1
  11. package/dist/{consentManager-Cegv5Kth.d.ts → consentManager-sjhjBNVr.d.ts} +4 -4
  12. package/dist/curp-validation.d.ts +1 -1
  13. package/dist/{curpValidationManager-CpmlWHkv.d.ts → curpValidationManager-CXpFE-Mv.d.ts} +1 -1
  14. package/dist/{deepsightLoader-Dvcd1yov.esm.js → deepsightLoader-Bb-pXoX7.esm.js} +4 -4
  15. package/dist/{deepsightService-CXrhNb9c.esm.js → deepsightService-BZDzMNFo.esm.js} +1 -1
  16. package/dist/dynamic-forms.esm.js +2 -2
  17. package/dist/{dynamicFormsManager-CuxtO7jB.esm.js → dynamicFormsManager-D9dELeyW.esm.js} +1 -1
  18. package/dist/{dynamicFormsStateMachine-C4yVGxpH.esm.js → dynamicFormsStateMachine-D7_a2Zvz.esm.js} +1 -1
  19. package/dist/ekyb.d.ts +4 -4
  20. package/dist/ekyb.esm.js +3 -3
  21. package/dist/{ekybManager-DZ0ksIav.esm.js → ekybManager-B5tGjaVU.esm.js} +1 -1
  22. package/dist/{ekybManager-lZOHO33y.d.ts → ekybManager-TB6ZG5lX.d.ts} +2 -2
  23. package/dist/{ekybStateMachine-L7ZHcHvF.esm.js → ekybStateMachine-w6YNF3Ce.esm.js} +4 -3
  24. package/dist/ekyc.d.ts +3 -3
  25. package/dist/ekyc.esm.js +3 -3
  26. package/dist/{ekycManager-Ci7zQBP1.d.ts → ekycManager-BSQteIfC.d.ts} +1 -1
  27. package/dist/{ekycManager-DbF76iGU.esm.js → ekycManager-BnHD1My0.esm.js} +1 -1
  28. package/dist/{ekycStateMachine-16xp3B1E.esm.js → ekycStateMachine-DflJVAT5.esm.js} +1118 -434
  29. package/dist/ekycUtils-BFncpC4F.esm.js +1401 -0
  30. package/dist/electronic-signature.esm.js +1 -1
  31. package/dist/{electronicSignatureManager-ROM4Plhh.esm.js → electronicSignatureManager-BvZrv57e.esm.js} +1 -1
  32. package/dist/extensibility.d.ts +12 -12
  33. package/dist/extensibility.esm.js +11 -11
  34. package/dist/{faceCaptureManagerFactory-DER3G7QA.d.ts → faceCaptureManagerFactory-C3RG3oYt.d.ts} +3 -3
  35. package/dist/{faceCaptureManagerFactory-CUBuV__c.esm.js → faceCaptureManagerFactory-DEfqLONA.esm.js} +1 -1
  36. package/dist/{faceCaptureSetup-BrkJNhcx.esm.js → faceCaptureSetup-aTSEvqZn.esm.js} +3 -3
  37. package/dist/{feature-management-BqM3DDh5.esm.js → feature-management-CV5IUhP5.esm.js} +1 -1
  38. package/dist/feature-management.esm.js +1 -1
  39. package/dist/flow-events.d.ts +1 -1
  40. package/dist/flow.d.ts +7 -7
  41. package/dist/flow.esm.js +3 -3
  42. package/dist/{flowCompletionService-CCnpKFwV.esm.js → flowCompletionService-D-0YwWEk.esm.js} +1 -1
  43. package/dist/{flowServices-Bc07mt2O.esm.js → flowServices-DZ-ixWxT.esm.js} +5 -5
  44. package/dist/geolocation.esm.js +2 -2
  45. package/dist/{geolocationManager-BApTeGjv.esm.js → geolocationManager-DG88qNi5.esm.js} +1 -1
  46. package/dist/{geolocationStateMachine-BvJqeBfE.esm.js → geolocationStateMachine-C5Yc7tMy.esm.js} +1 -1
  47. package/dist/home.d.ts +1 -1
  48. package/dist/id-selfie-flow.d.ts +1 -1
  49. package/dist/id-selfie-flow.esm.js +6 -6
  50. package/dist/id.d.ts +2 -2
  51. package/dist/id.esm.js +3 -3
  52. package/dist/{idCaptureManager-C74EPLTw.d.ts → idCaptureManager-8w07suSB.d.ts} +2 -2
  53. package/dist/{idCaptureManager-C05md8rp.esm.js → idCaptureManager-CrgYoRoE.esm.js} +3 -3
  54. package/dist/{idCaptureServices-CBLzfhvC.esm.js → idCaptureServices-DQjG0h23.esm.js} +2 -2
  55. package/dist/{idCaptureStateMachine-BWjnqb5C.esm.js → idCaptureStateMachine-DjoIP_DU.esm.js} +9 -9
  56. package/dist/identity-reuse.d.ts +1 -1
  57. package/dist/{identityReuseManager-ooAbp6Kc.d.ts → identityReuseManager-BUNksfYU.d.ts} +8 -8
  58. package/dist/{index-BSf46iwq.d.ts → index-DMDAk85K.d.ts} +1 -1
  59. package/dist/index.esm.js +1 -1
  60. package/dist/mandatory-consent.d.ts +2 -2
  61. package/dist/{mandatoryConsentManager-CEOyGn4H.d.ts → mandatoryConsentManager-DXLb7wjM.d.ts} +5 -5
  62. package/dist/qe-signature.esm.js +1 -1
  63. package/dist/{runChildModule-BntL2Brs.esm.js → runChildModule-BK4Y9-7S.esm.js} +1 -1
  64. package/dist/{sdkVersion-BruWW52r.esm.js → sdkVersion-yNv61tP8.esm.js} +1 -1
  65. package/dist/selfie.d.ts +3 -3
  66. package/dist/selfie.esm.js +6 -6
  67. package/dist/{selfieErrorUtils-FzSnBvLY.esm.js → selfieErrorUtils-Cv4o_Pfj.esm.js} +1 -1
  68. package/dist/{selfieManager-vEXd5SHA.d.ts → selfieManager-CFgylJo7.d.ts} +1 -1
  69. package/dist/{selfieManager-DuOwQuxL.esm.js → selfieManager-Cn3sNT6-.esm.js} +3 -3
  70. package/dist/{selfieStateMachine-3s-ydjDp.esm.js → selfieStateMachine-DnL1VnNP.esm.js} +3 -3
  71. package/dist/{session-CHr7fZVV.esm.js → session-Bw8ubKxw.esm.js} +3 -3
  72. package/dist/session.d.ts +1 -1
  73. package/dist/session.esm.js +4 -4
  74. package/dist/{sessionInitializer-1QwlJLQ3.esm.js → sessionInitializer-D9AZfKtF.esm.js} +3 -3
  75. package/dist/{setup-DAOCrvRl.esm.js → setup-XyKmxnYs.esm.js} +4 -4
  76. package/dist/{trueSightService-D7F7hn4q.esm.js → trueSightService-CKRS-Zz7.esm.js} +1 -1
  77. package/dist/{types-D-cdiQD8.d.ts → types-B2FK_wYb.d.ts} +40 -1
  78. package/dist/{types-CjUSw9yM.d.ts → types-C397LhmN.d.ts} +1 -1
  79. package/dist/types-C3dgFVhg.d.ts +6 -0
  80. package/dist/{types-CK0dj_Vu.d.ts → types-DuD8TRJU.d.ts} +1 -1
  81. package/dist/{types-iF96ENvX.d.ts → types-O88kK1QD.d.ts} +1 -1
  82. package/dist/{types-Bqj4SDHk.d.ts → types-PTZHRhGX.d.ts} +1 -1
  83. package/dist/{types-CEuM1Qph.d.ts → types-e8fCsvvk.d.ts} +1 -1
  84. package/dist/{types-BzuFtfjm.d.ts → types-fNjgqdt2.d.ts} +1 -1
  85. package/dist/video-selfie.d.ts +1 -1
  86. package/dist/video-selfie.esm.js +3 -3
  87. package/dist/{videoSelfieCameraWarmer-D4exP4rK.esm.js → videoSelfieCameraWarmer-B0qpOvsI.esm.js} +3 -3
  88. package/dist/{videoSelfieStepDetector-B2bakrqI.d.ts → videoSelfieStepDetector-FJ0osSpU.d.ts} +2 -2
  89. package/dist/wasm.esm.js +1 -1
  90. package/dist/workflow.d.ts +5 -5
  91. package/dist/workflow.esm.js +16 -16
  92. package/package.json +1 -1
  93. package/dist/ekycUtils-tST1hG2_.esm.js +0 -478
  94. package/dist/types-qs9PgHtG.d.ts +0 -6
@@ -1,12 +1,94 @@
1
1
  import { t as getLocalIsoDate } from "./IBrowserEnvironmentCapability-D7JG7ML3.esm.js";
2
2
  import { t as api, u as endpoints } from "./api-BG98lkot.esm.js";
3
- import { _ as STATE_CODE_HINTS, a as toEkycConfig, c as CITY_SOURCES, d as EMAIL_SOURCES, f as HOUSE_NO_SOURCES, g as POSTAL_CODE_SOURCES, h as ONE_OF_REQUIRED_GROUPS, i as resolveEkycSource, l as COUNTRY_CODE_OMITTED_SOURCES, m as NAME_SOURCES, n as getEKYCFields, o as ADDRESS_STATE_SOURCES, p as MIDDLE_NAME_SOURCES, r as isFieldOptional, s as APARTMENT_SOURCES, t as getEKYCCountry, u as COUNTRY_SELECTOR_DISABLED_SOURCES, v as STREET_SOURCES, y as TAX_ID_SOURCES } from "./ekycUtils-tST1hG2_.esm.js";
3
+ import { C as VOCABULARY, S as TAX_ID_SOURCES, _ as NAME_SOURCES, a as isFieldOptional, b as STATE_CODE_HINTS, c as toEkycConfig, d as CITY_SOURCES, f as COUNTRY_CODE_OMITTED_SOURCES, g as MIDDLE_NAME_SOURCES, h as HOUSE_NO_SOURCES, i as getEKYCFields, l as ADDRESS_STATE_SOURCES, m as EMAIL_SOURCES, n as getEKYCCountry, o as mapToEKYCvalue, p as COUNTRY_SELECTOR_DISABLED_SOURCES, r as getEKYCDisplayModes, s as resolveEkycSource, t as EKYC_GROUP_KEYS, u as APARTMENT_SOURCES, v as ONE_OF_REQUIRED_GROUPS, x as STREET_SOURCES, y as POSTAL_CODE_SOURCES } from "./ekycUtils-BFncpC4F.esm.js";
4
4
  import { i as assign, t as setup } from "./xstate.esm-DSajW7CJ.esm.js";
5
5
  import { n as fromPromise } from "./xstate-actors.esm-8Gzepa_A.esm.js";
6
6
  import { a as isValidRut, i as isValidInDrivingLicenseNumber, n as isValidEsDni, r as isValidFiPersonalIdentityCode, t as isValidCurp } from "./nationalIds-B91f_RuB.esm.js";
7
- import { a as checkSupport, c as getPostalCodeErrorKey, d as DYNAMIC_REQUIRED_KEY, f as STREET_LEVEL_REQUIRED_ERROR, h as usStateOptions, i as createBundledDefinitionSource, l as getPostalCodeMaxLength, m as getStreetLevelErrorForSuggestion, n as isFormDefinitionsEnabled, o as FIXED_DIGIT_POSTAL_CODE_LENGTH, p as fillFromSuggestion, r as resolveForm, s as formatPostalCode, t as debounceSearchActor, u as validatePostalCode } from "./addressSearch-CBw55d_y.esm.js";
7
+ import { _ as usStates, a as createBundledDefinitionSource, c as formatPostalCode, d as validatePostalCode, f as DYNAMIC_REQUIRED_KEY, g as usStateOptions, h as getStreetLevelErrorForSuggestion, i as resolveForm, l as getPostalCodeErrorKey, m as fillFromSuggestion, n as searchAddress, o as checkSupport, p as STREET_LEVEL_REQUIRED_ERROR, r as isFormDefinitionsEnabled, s as FIXED_DIGIT_POSTAL_CODE_LENGTH, t as debounceSearchActor, u as getPostalCodeMaxLength } from "./addressSearch-B0cu1Cuf.esm.js";
8
8
  import { n as DateFormattingProvider, t as validateCPF } from "./cpf-uAZTPUBy.esm.js";
9
9
  import { n as loadPhoneValidation, t as getPhoneValidation } from "./phoneValidation-DCqyINbL.esm.js";
10
+ //#region src/internal/forms/resolvePrefill.ts
11
+ const DISPLAY_MODES = /* @__PURE__ */ new Set([
12
+ "editable",
13
+ "readOnly",
14
+ "hidden"
15
+ ]);
16
+ const ONE_OF_REQUIRED = "oneOfRequired";
17
+ const filled = (value) => value !== void 0 && value.trim() !== "";
18
+ function configuredMode(context, group) {
19
+ const mode = context.displayModes?.[group];
20
+ return mode !== void 0 && DISPLAY_MODES.has(mode) ? mode : "editable";
21
+ }
22
+ /** The field's prefill source for its group's origin, if it lists one. */
23
+ function sourceFor(field, context) {
24
+ const origin = context.origins?.[field.group];
25
+ if (!origin) return void 0;
26
+ return field.prefill?.find((id) => id.startsWith(`${origin}.`));
27
+ }
28
+ /**
29
+ * Decides each shown field's prefilled value and display mode, from the
30
+ * resolved form, module configuration's origins and display modes, and the
31
+ * values the module read. Pure and synchronous.
32
+ *
33
+ * A value that fails its field's checks is dropped. A group configured
34
+ * `hidden` or `readOnly` becomes `editable` as a whole when one of its
35
+ * required fields has no value, or when a `oneOfRequired` rule over it has
36
+ * none, so the user can always complete the form. An optional field without
37
+ * a value keeps its mode and sends nothing. An editable field filled from one
38
+ * of the context's `lockingOrigins` shows read-only.
39
+ */
40
+ function resolvePrefill(form, context, data, checks) {
41
+ const candidates = {};
42
+ for (const { field } of form.fields) {
43
+ const source = sourceFor(field, context);
44
+ const raw = source ? data[source] : void 0;
45
+ if (filled(raw)) candidates[field.name] = checks.format(field, raw);
46
+ }
47
+ const values = {};
48
+ for (const { field } of form.fields) {
49
+ const value = candidates[field.name];
50
+ if (filled(value) && checks.isValid(field, value, candidates)) values[field.name] = value;
51
+ }
52
+ const isRequired = (resolved) => resolved.required || resolved.requiredIfFilled.some((name) => filled(values[name]));
53
+ const promoted = /* @__PURE__ */ new Set();
54
+ const promote = (group) => {
55
+ if (configuredMode(context, group) !== "editable") promoted.add(group);
56
+ };
57
+ for (const resolved of form.fields) if (isRequired(resolved) && !filled(values[resolved.field.name])) promote(resolved.field.group);
58
+ const groupOf = new Map(form.fields.map(({ field }) => [field.name, field.group]));
59
+ for (const { rule, fields } of form.groupRules) {
60
+ if (rule.id !== ONE_OF_REQUIRED) continue;
61
+ if (fields.some((name) => filled(values[name]))) continue;
62
+ for (const name of fields) {
63
+ const group = groupOf.get(name);
64
+ if (group) promote(group);
65
+ }
66
+ }
67
+ return {
68
+ fields: form.fields.map((resolved) => {
69
+ const { group, name } = resolved.field;
70
+ if (promoted.has(group)) return {
71
+ ...resolved,
72
+ displayMode: "editable",
73
+ displayReason: "promoted"
74
+ };
75
+ const configured = configuredMode(context, group);
76
+ const origin = context.origins?.[group];
77
+ if (configured === "editable" && filled(values[name]) && origin !== void 0 && context.lockingOrigins?.includes(origin)) return {
78
+ ...resolved,
79
+ displayMode: "readOnly",
80
+ displayReason: "locked"
81
+ };
82
+ return {
83
+ ...resolved,
84
+ displayMode: configured,
85
+ displayReason: "configured"
86
+ };
87
+ }),
88
+ values
89
+ };
90
+ }
91
+ //#endregion
10
92
  //#region src/shared/validators/textRules.ts
11
93
  const CHARACTER_CLASSES = [
12
94
  "letter",
@@ -301,7 +383,7 @@ function validateEkycField(values, fieldName, fields) {
301
383
  const EKYC_DEFINITIONS = {
302
384
  "ekyc/AR/AR_CREDIT_BUR_1": {
303
385
  schemaVersion: 1,
304
- vocabulary: "1.0",
386
+ vocabulary: "1.2",
305
387
  id: "ekyc/AR/AR_CREDIT_BUR_1",
306
388
  module: "ekyc",
307
389
  country: "AR",
@@ -319,7 +401,8 @@ const EKYC_DEFINITIONS = {
319
401
  maxLength: 100,
320
402
  autofill: "givenName"
321
403
  },
322
- rules: [{ id: "nameCharacters" }]
404
+ rules: [{ id: "nameCharacters" }],
405
+ prefill: ["document.firstName", "poa.firstName"]
323
406
  },
324
407
  {
325
408
  name: "middleName",
@@ -331,7 +414,8 @@ const EKYC_DEFINITIONS = {
331
414
  maxLength: 100,
332
415
  autofill: "middleName"
333
416
  },
334
- rules: [{ id: "nameCharacters" }]
417
+ rules: [{ id: "nameCharacters" }],
418
+ prefill: ["document.middleName"]
335
419
  },
336
420
  {
337
421
  name: "surName",
@@ -344,7 +428,8 @@ const EKYC_DEFINITIONS = {
344
428
  maxLength: 100,
345
429
  autofill: "familyName"
346
430
  },
347
- rules: [{ id: "nameCharacters" }]
431
+ rules: [{ id: "nameCharacters" }],
432
+ prefill: ["document.paternalLastName", "poa.lastName"]
348
433
  },
349
434
  {
350
435
  name: "dateOfBirth",
@@ -353,7 +438,8 @@ const EKYC_DEFINITIONS = {
353
438
  required: true,
354
439
  label: { key: "verification.labels.dateOfBirth" },
355
440
  input: { autofill: "birthday" },
356
- rules: [{ id: "notFuture" }]
441
+ rules: [{ id: "notFuture" }],
442
+ prefill: ["document.birthDate"]
357
443
  },
358
444
  {
359
445
  name: "email",
@@ -366,7 +452,8 @@ const EKYC_DEFINITIONS = {
366
452
  keyboard: "email",
367
453
  autofill: "email"
368
454
  },
369
- rules: [{ id: "emailFormat" }]
455
+ rules: [{ id: "emailFormat" }],
456
+ prefill: ["emailModule.email"]
370
457
  },
371
458
  {
372
459
  name: "phone",
@@ -382,7 +469,8 @@ const EKYC_DEFINITIONS = {
382
469
  max: 10
383
470
  }
384
471
  }],
385
- payload: { transforms: [{ id: "e164" }] }
472
+ payload: { transforms: [{ id: "e164" }] },
473
+ prefill: ["phoneModule.phone"]
386
474
  },
387
475
  {
388
476
  name: "idNum",
@@ -396,7 +484,8 @@ const EKYC_DEFINITIONS = {
396
484
  rules: [{
397
485
  id: "digitCount",
398
486
  params: { lengths: [8] }
399
- }]
487
+ }],
488
+ prefill: ["document.documentNumber"]
400
489
  },
401
490
  {
402
491
  name: "idNum1",
@@ -410,7 +499,8 @@ const EKYC_DEFINITIONS = {
410
499
  rules: [{
411
500
  id: "digitCount",
412
501
  params: { lengths: [11] }
413
- }]
502
+ }],
503
+ prefill: ["document.personalNumber"]
414
504
  },
415
505
  {
416
506
  name: "gender",
@@ -434,14 +524,16 @@ const EKYC_DEFINITIONS = {
434
524
  widget: "addressSearch",
435
525
  label: { key: "verification.labels.street" },
436
526
  input: { autofill: "addressLine1" },
437
- rules: [{ id: "noPoBox" }]
527
+ rules: [{ id: "noPoBox" }],
528
+ prefill: ["document.street", "poa.street"]
438
529
  },
439
530
  {
440
531
  name: "houseNo",
441
532
  kind: "text",
442
533
  group: "address",
443
534
  section: "address",
444
- label: { key: "verification.labels.houseNo" }
535
+ label: { key: "verification.labels.houseNo" },
536
+ prefill: ["document.houseNumber", "poa.houseNumber"]
445
537
  },
446
538
  {
447
539
  name: "city",
@@ -449,7 +541,8 @@ const EKYC_DEFINITIONS = {
449
541
  group: "address",
450
542
  section: "address",
451
543
  label: { key: "verification.labels.city" },
452
- input: { autofill: "addressLevel2" }
544
+ input: { autofill: "addressLevel2" },
545
+ prefill: ["document.city", "poa.city"]
453
546
  },
454
547
  {
455
548
  name: "state",
@@ -462,7 +555,8 @@ const EKYC_DEFINITIONS = {
462
555
  params: { states: "" }
463
556
  },
464
557
  input: { autofill: "addressLevel1" },
465
- payload: { transforms: [{ id: "uppercase" }] }
558
+ payload: { transforms: [{ id: "uppercase" }] },
559
+ prefill: ["document.state", "poa.state"]
466
560
  },
467
561
  {
468
562
  name: "postalCode",
@@ -478,7 +572,8 @@ const EKYC_DEFINITIONS = {
478
572
  payload: { transforms: [{
479
573
  id: "stripSeparators",
480
574
  params: { chars: "- " }
481
- }] }
575
+ }] },
576
+ prefill: ["document.postalCode", "poa.postalCode"]
482
577
  }
483
578
  ],
484
579
  submit: {
@@ -491,7 +586,7 @@ const EKYC_DEFINITIONS = {
491
586
  },
492
587
  "ekyc/AR/AR_RES_REGISTER": {
493
588
  schemaVersion: 1,
494
- vocabulary: "1.0",
589
+ vocabulary: "1.2",
495
590
  id: "ekyc/AR/AR_RES_REGISTER",
496
591
  module: "ekyc",
497
592
  country: "AR",
@@ -509,7 +604,8 @@ const EKYC_DEFINITIONS = {
509
604
  maxLength: 100,
510
605
  autofill: "givenName"
511
606
  },
512
- rules: [{ id: "nameCharacters" }]
607
+ rules: [{ id: "nameCharacters" }],
608
+ prefill: ["document.firstName", "poa.firstName"]
513
609
  },
514
610
  {
515
611
  name: "middleName",
@@ -521,7 +617,8 @@ const EKYC_DEFINITIONS = {
521
617
  maxLength: 100,
522
618
  autofill: "middleName"
523
619
  },
524
- rules: [{ id: "nameCharacters" }]
620
+ rules: [{ id: "nameCharacters" }],
621
+ prefill: ["document.middleName"]
525
622
  },
526
623
  {
527
624
  name: "surName",
@@ -534,7 +631,8 @@ const EKYC_DEFINITIONS = {
534
631
  maxLength: 100,
535
632
  autofill: "familyName"
536
633
  },
537
- rules: [{ id: "nameCharacters" }]
634
+ rules: [{ id: "nameCharacters" }],
635
+ prefill: ["document.paternalLastName", "poa.lastName"]
538
636
  },
539
637
  {
540
638
  name: "dateOfBirth",
@@ -542,7 +640,8 @@ const EKYC_DEFINITIONS = {
542
640
  group: "dateOfBirth",
543
641
  label: { key: "verification.labels.dateOfBirth" },
544
642
  input: { autofill: "birthday" },
545
- rules: [{ id: "notFuture" }]
643
+ rules: [{ id: "notFuture" }],
644
+ prefill: ["document.birthDate"]
546
645
  },
547
646
  {
548
647
  name: "email",
@@ -555,7 +654,8 @@ const EKYC_DEFINITIONS = {
555
654
  keyboard: "email",
556
655
  autofill: "email"
557
656
  },
558
- rules: [{ id: "emailFormat" }]
657
+ rules: [{ id: "emailFormat" }],
658
+ prefill: ["emailModule.email"]
559
659
  },
560
660
  {
561
661
  name: "phone",
@@ -566,7 +666,8 @@ const EKYC_DEFINITIONS = {
566
666
  input: { autofill: "phone" },
567
667
  phone: { lockCountry: "whenPhoneRisk" },
568
668
  rules: [{ id: "phoneFormat" }],
569
- payload: { transforms: [{ id: "e164" }] }
669
+ payload: { transforms: [{ id: "e164" }] },
670
+ prefill: ["phoneModule.phone"]
570
671
  },
571
672
  {
572
673
  name: "gender",
@@ -590,14 +691,16 @@ const EKYC_DEFINITIONS = {
590
691
  widget: "addressSearch",
591
692
  label: { key: "verification.labels.street" },
592
693
  input: { autofill: "addressLine1" },
593
- rules: [{ id: "noPoBox" }]
694
+ rules: [{ id: "noPoBox" }],
695
+ prefill: ["document.street", "poa.street"]
594
696
  },
595
697
  {
596
698
  name: "houseNo",
597
699
  kind: "text",
598
700
  group: "address",
599
701
  section: "address",
600
- label: { key: "verification.labels.houseNo" }
702
+ label: { key: "verification.labels.houseNo" },
703
+ prefill: ["document.houseNumber", "poa.houseNumber"]
601
704
  },
602
705
  {
603
706
  name: "city",
@@ -605,7 +708,8 @@ const EKYC_DEFINITIONS = {
605
708
  group: "address",
606
709
  section: "address",
607
710
  label: { key: "verification.labels.city" },
608
- input: { autofill: "addressLevel2" }
711
+ input: { autofill: "addressLevel2" },
712
+ prefill: ["document.city", "poa.city"]
609
713
  },
610
714
  {
611
715
  name: "state",
@@ -619,7 +723,8 @@ const EKYC_DEFINITIONS = {
619
723
  params: { states: "" }
620
724
  },
621
725
  input: { autofill: "addressLevel1" },
622
- payload: { transforms: [{ id: "uppercase" }] }
726
+ payload: { transforms: [{ id: "uppercase" }] },
727
+ prefill: ["document.state", "poa.state"]
623
728
  },
624
729
  {
625
730
  name: "postalCode",
@@ -635,7 +740,8 @@ const EKYC_DEFINITIONS = {
635
740
  payload: { transforms: [{
636
741
  id: "stripSeparators",
637
742
  params: { chars: "- " }
638
- }] }
743
+ }] },
744
+ prefill: ["document.postalCode", "poa.postalCode"]
639
745
  }
640
746
  ],
641
747
  submit: {
@@ -648,7 +754,7 @@ const EKYC_DEFINITIONS = {
648
754
  },
649
755
  "ekyc/BE/BE_CREDIT_TELCO": {
650
756
  schemaVersion: 1,
651
- vocabulary: "1.0",
757
+ vocabulary: "1.2",
652
758
  id: "ekyc/BE/BE_CREDIT_TELCO",
653
759
  module: "ekyc",
654
760
  country: "BE",
@@ -666,7 +772,8 @@ const EKYC_DEFINITIONS = {
666
772
  maxLength: 100,
667
773
  autofill: "givenName"
668
774
  },
669
- rules: [{ id: "nameCharacters" }]
775
+ rules: [{ id: "nameCharacters" }],
776
+ prefill: ["document.firstName", "poa.firstName"]
670
777
  },
671
778
  {
672
779
  name: "surName",
@@ -679,7 +786,8 @@ const EKYC_DEFINITIONS = {
679
786
  maxLength: 100,
680
787
  autofill: "familyName"
681
788
  },
682
- rules: [{ id: "nameCharacters" }]
789
+ rules: [{ id: "nameCharacters" }],
790
+ prefill: ["document.paternalLastName", "poa.lastName"]
683
791
  },
684
792
  {
685
793
  name: "dateOfBirth",
@@ -687,7 +795,8 @@ const EKYC_DEFINITIONS = {
687
795
  group: "dateOfBirth",
688
796
  label: { key: "verification.labels.dateOfBirth" },
689
797
  input: { autofill: "birthday" },
690
- rules: [{ id: "notFuture" }]
798
+ rules: [{ id: "notFuture" }],
799
+ prefill: ["document.birthDate"]
691
800
  },
692
801
  {
693
802
  name: "email",
@@ -700,7 +809,8 @@ const EKYC_DEFINITIONS = {
700
809
  keyboard: "email",
701
810
  autofill: "email"
702
811
  },
703
- rules: [{ id: "emailFormat" }]
812
+ rules: [{ id: "emailFormat" }],
813
+ prefill: ["emailModule.email"]
704
814
  },
705
815
  {
706
816
  name: "phone",
@@ -717,7 +827,8 @@ const EKYC_DEFINITIONS = {
717
827
  max: 9
718
828
  }
719
829
  }],
720
- payload: { transforms: [{ id: "nationalNumber" }] }
830
+ payload: { transforms: [{ id: "nationalNumber" }] },
831
+ prefill: ["phoneModule.phone"]
721
832
  },
722
833
  {
723
834
  name: "street",
@@ -727,14 +838,16 @@ const EKYC_DEFINITIONS = {
727
838
  widget: "addressSearch",
728
839
  label: { key: "verification.labels.street" },
729
840
  input: { autofill: "addressLine1" },
730
- rules: [{ id: "noPoBox" }]
841
+ rules: [{ id: "noPoBox" }],
842
+ prefill: ["document.street", "poa.street"]
731
843
  },
732
844
  {
733
845
  name: "houseNo",
734
846
  kind: "text",
735
847
  group: "address",
736
848
  section: "address",
737
- label: { key: "verification.labels.houseNo" }
849
+ label: { key: "verification.labels.houseNo" },
850
+ prefill: ["document.houseNumber", "poa.houseNumber"]
738
851
  },
739
852
  {
740
853
  name: "city",
@@ -742,7 +855,8 @@ const EKYC_DEFINITIONS = {
742
855
  group: "address",
743
856
  section: "address",
744
857
  label: { key: "verification.labels.city" },
745
- input: { autofill: "addressLevel2" }
858
+ input: { autofill: "addressLevel2" },
859
+ prefill: ["document.city", "poa.city"]
746
860
  },
747
861
  {
748
862
  name: "state",
@@ -755,7 +869,8 @@ const EKYC_DEFINITIONS = {
755
869
  params: { states: "" }
756
870
  },
757
871
  input: { autofill: "addressLevel1" },
758
- payload: { transforms: [{ id: "uppercase" }] }
872
+ payload: { transforms: [{ id: "uppercase" }] },
873
+ prefill: ["document.state", "poa.state"]
759
874
  },
760
875
  {
761
876
  name: "postalCode",
@@ -785,7 +900,8 @@ const EKYC_DEFINITIONS = {
785
900
  payload: { transforms: [{
786
901
  id: "stripSeparators",
787
902
  params: { chars: "- " }
788
- }] }
903
+ }] },
904
+ prefill: ["document.postalCode", "poa.postalCode"]
789
905
  }
790
906
  ],
791
907
  submit: {
@@ -798,7 +914,7 @@ const EKYC_DEFINITIONS = {
798
914
  },
799
915
  "ekyc/BR/BR_GOVT_1": {
800
916
  schemaVersion: 1,
801
- vocabulary: "1.0",
917
+ vocabulary: "1.2",
802
918
  id: "ekyc/BR/BR_GOVT_1",
803
919
  module: "ekyc",
804
920
  country: "BR",
@@ -816,7 +932,8 @@ const EKYC_DEFINITIONS = {
816
932
  maxLength: 100,
817
933
  autofill: "givenName"
818
934
  },
819
- rules: [{ id: "nameCharacters" }]
935
+ rules: [{ id: "nameCharacters" }],
936
+ prefill: ["document.firstName", "poa.firstName"]
820
937
  },
821
938
  {
822
939
  name: "surName",
@@ -829,7 +946,8 @@ const EKYC_DEFINITIONS = {
829
946
  maxLength: 100,
830
947
  autofill: "familyName"
831
948
  },
832
- rules: [{ id: "nameCharacters" }]
949
+ rules: [{ id: "nameCharacters" }],
950
+ prefill: ["document.paternalLastName", "poa.lastName"]
833
951
  },
834
952
  {
835
953
  name: "dateOfBirth",
@@ -838,7 +956,8 @@ const EKYC_DEFINITIONS = {
838
956
  required: true,
839
957
  label: { key: "verification.labels.dateOfBirth" },
840
958
  input: { autofill: "birthday" },
841
- rules: [{ id: "notFuture" }]
959
+ rules: [{ id: "notFuture" }],
960
+ prefill: ["document.birthDate"]
842
961
  },
843
962
  {
844
963
  name: "email",
@@ -851,7 +970,8 @@ const EKYC_DEFINITIONS = {
851
970
  keyboard: "email",
852
971
  autofill: "email"
853
972
  },
854
- rules: [{ id: "emailFormat" }]
973
+ rules: [{ id: "emailFormat" }],
974
+ prefill: ["emailModule.email"]
855
975
  },
856
976
  {
857
977
  name: "phone",
@@ -862,7 +982,8 @@ const EKYC_DEFINITIONS = {
862
982
  input: { autofill: "phone" },
863
983
  phone: { lockCountry: "whenPhoneRisk" },
864
984
  rules: [{ id: "phoneFormat" }],
865
- payload: { transforms: [{ id: "e164" }] }
985
+ payload: { transforms: [{ id: "e164" }] },
986
+ prefill: ["phoneModule.phone"]
866
987
  },
867
988
  {
868
989
  name: "taxId",
@@ -910,14 +1031,16 @@ const EKYC_DEFINITIONS = {
910
1031
  widget: "addressSearch",
911
1032
  label: { key: "verification.labels.street" },
912
1033
  input: { autofill: "addressLine1" },
913
- rules: [{ id: "noPoBox" }]
1034
+ rules: [{ id: "noPoBox" }],
1035
+ prefill: ["document.street", "poa.street"]
914
1036
  },
915
1037
  {
916
1038
  name: "houseNo",
917
1039
  kind: "text",
918
1040
  group: "address",
919
1041
  section: "address",
920
- label: { key: "verification.labels.houseNo" }
1042
+ label: { key: "verification.labels.houseNo" },
1043
+ prefill: ["document.houseNumber", "poa.houseNumber"]
921
1044
  },
922
1045
  {
923
1046
  name: "city",
@@ -925,7 +1048,8 @@ const EKYC_DEFINITIONS = {
925
1048
  group: "address",
926
1049
  section: "address",
927
1050
  label: { key: "verification.labels.city" },
928
- input: { autofill: "addressLevel2" }
1051
+ input: { autofill: "addressLevel2" },
1052
+ prefill: ["document.city", "poa.city"]
929
1053
  },
930
1054
  {
931
1055
  name: "state",
@@ -938,7 +1062,8 @@ const EKYC_DEFINITIONS = {
938
1062
  params: { states: "RJ, SP" }
939
1063
  },
940
1064
  input: { autofill: "addressLevel1" },
941
- payload: { transforms: [{ id: "uppercase" }] }
1065
+ payload: { transforms: [{ id: "uppercase" }] },
1066
+ prefill: ["document.state", "poa.state"]
942
1067
  },
943
1068
  {
944
1069
  name: "postalCode",
@@ -954,7 +1079,8 @@ const EKYC_DEFINITIONS = {
954
1079
  payload: { transforms: [{
955
1080
  id: "stripSeparators",
956
1081
  params: { chars: "- " }
957
- }] }
1082
+ }] },
1083
+ prefill: ["document.postalCode", "poa.postalCode"]
958
1084
  }
959
1085
  ],
960
1086
  submit: {
@@ -967,7 +1093,7 @@ const EKYC_DEFINITIONS = {
967
1093
  },
968
1094
  "ekyc/BR/BR_TAX_PHONE_REGISTER": {
969
1095
  schemaVersion: 1,
970
- vocabulary: "1.0",
1096
+ vocabulary: "1.2",
971
1097
  id: "ekyc/BR/BR_TAX_PHONE_REGISTER",
972
1098
  module: "ekyc",
973
1099
  country: "BR",
@@ -985,7 +1111,8 @@ const EKYC_DEFINITIONS = {
985
1111
  maxLength: 100,
986
1112
  autofill: "givenName"
987
1113
  },
988
- rules: [{ id: "nameCharacters" }]
1114
+ rules: [{ id: "nameCharacters" }],
1115
+ prefill: ["document.firstName", "poa.firstName"]
989
1116
  },
990
1117
  {
991
1118
  name: "middleName",
@@ -997,7 +1124,8 @@ const EKYC_DEFINITIONS = {
997
1124
  maxLength: 100,
998
1125
  autofill: "middleName"
999
1126
  },
1000
- rules: [{ id: "nameCharacters" }]
1127
+ rules: [{ id: "nameCharacters" }],
1128
+ prefill: ["document.middleName"]
1001
1129
  },
1002
1130
  {
1003
1131
  name: "surName",
@@ -1010,7 +1138,8 @@ const EKYC_DEFINITIONS = {
1010
1138
  maxLength: 100,
1011
1139
  autofill: "familyName"
1012
1140
  },
1013
- rules: [{ id: "nameCharacters" }]
1141
+ rules: [{ id: "nameCharacters" }],
1142
+ prefill: ["document.paternalLastName", "poa.lastName"]
1014
1143
  },
1015
1144
  {
1016
1145
  name: "dateOfBirth",
@@ -1018,7 +1147,8 @@ const EKYC_DEFINITIONS = {
1018
1147
  group: "dateOfBirth",
1019
1148
  label: { key: "verification.labels.dateOfBirth" },
1020
1149
  input: { autofill: "birthday" },
1021
- rules: [{ id: "notFuture" }]
1150
+ rules: [{ id: "notFuture" }],
1151
+ prefill: ["document.birthDate"]
1022
1152
  },
1023
1153
  {
1024
1154
  name: "email",
@@ -1030,7 +1160,8 @@ const EKYC_DEFINITIONS = {
1030
1160
  keyboard: "email",
1031
1161
  autofill: "email"
1032
1162
  },
1033
- rules: [{ id: "emailFormat" }]
1163
+ rules: [{ id: "emailFormat" }],
1164
+ prefill: ["emailModule.email"]
1034
1165
  },
1035
1166
  {
1036
1167
  name: "phone",
@@ -1046,7 +1177,8 @@ const EKYC_DEFINITIONS = {
1046
1177
  max: 11
1047
1178
  }
1048
1179
  }],
1049
- payload: { transforms: [{ id: "e164" }] }
1180
+ payload: { transforms: [{ id: "e164" }] },
1181
+ prefill: ["phoneModule.phone"]
1050
1182
  },
1051
1183
  {
1052
1184
  name: "taxId",
@@ -1081,14 +1213,16 @@ const EKYC_DEFINITIONS = {
1081
1213
  widget: "addressSearch",
1082
1214
  label: { key: "verification.labels.street" },
1083
1215
  input: { autofill: "addressLine1" },
1084
- rules: [{ id: "noPoBox" }]
1216
+ rules: [{ id: "noPoBox" }],
1217
+ prefill: ["document.street", "poa.street"]
1085
1218
  },
1086
1219
  {
1087
1220
  name: "houseNo",
1088
1221
  kind: "text",
1089
1222
  group: "address",
1090
1223
  section: "address",
1091
- label: { key: "verification.labels.houseNo" }
1224
+ label: { key: "verification.labels.houseNo" },
1225
+ prefill: ["document.houseNumber", "poa.houseNumber"]
1092
1226
  },
1093
1227
  {
1094
1228
  name: "city",
@@ -1097,7 +1231,8 @@ const EKYC_DEFINITIONS = {
1097
1231
  section: "address",
1098
1232
  required: true,
1099
1233
  label: { key: "verification.labels.city" },
1100
- input: { autofill: "addressLevel2" }
1234
+ input: { autofill: "addressLevel2" },
1235
+ prefill: ["document.city", "poa.city"]
1101
1236
  },
1102
1237
  {
1103
1238
  name: "state",
@@ -1110,7 +1245,8 @@ const EKYC_DEFINITIONS = {
1110
1245
  params: { states: "RJ, SP" }
1111
1246
  },
1112
1247
  input: { autofill: "addressLevel1" },
1113
- payload: { transforms: [{ id: "uppercase" }] }
1248
+ payload: { transforms: [{ id: "uppercase" }] },
1249
+ prefill: ["document.state", "poa.state"]
1114
1250
  },
1115
1251
  {
1116
1252
  name: "postalCode",
@@ -1126,7 +1262,8 @@ const EKYC_DEFINITIONS = {
1126
1262
  payload: { transforms: [{
1127
1263
  id: "stripSeparators",
1128
1264
  params: { chars: "- " }
1129
- }] }
1265
+ }] },
1266
+ prefill: ["document.postalCode", "poa.postalCode"]
1130
1267
  }
1131
1268
  ],
1132
1269
  submit: {
@@ -1139,7 +1276,7 @@ const EKYC_DEFINITIONS = {
1139
1276
  },
1140
1277
  "ekyc/CA/CA_CREDIT_FINTRAC": {
1141
1278
  schemaVersion: 1,
1142
- vocabulary: "1.0",
1279
+ vocabulary: "1.2",
1143
1280
  id: "ekyc/CA/CA_CREDIT_FINTRAC",
1144
1281
  module: "ekyc",
1145
1282
  country: "CA",
@@ -1157,7 +1294,8 @@ const EKYC_DEFINITIONS = {
1157
1294
  maxLength: 100,
1158
1295
  autofill: "givenName"
1159
1296
  },
1160
- rules: [{ id: "nameCharacters" }]
1297
+ rules: [{ id: "nameCharacters" }],
1298
+ prefill: ["document.firstName", "poa.firstName"]
1161
1299
  },
1162
1300
  {
1163
1301
  name: "middleName",
@@ -1169,7 +1307,8 @@ const EKYC_DEFINITIONS = {
1169
1307
  maxLength: 100,
1170
1308
  autofill: "middleName"
1171
1309
  },
1172
- rules: [{ id: "nameCharacters" }]
1310
+ rules: [{ id: "nameCharacters" }],
1311
+ prefill: ["document.middleName"]
1173
1312
  },
1174
1313
  {
1175
1314
  name: "surName",
@@ -1182,7 +1321,8 @@ const EKYC_DEFINITIONS = {
1182
1321
  maxLength: 100,
1183
1322
  autofill: "familyName"
1184
1323
  },
1185
- rules: [{ id: "nameCharacters" }]
1324
+ rules: [{ id: "nameCharacters" }],
1325
+ prefill: ["document.paternalLastName", "poa.lastName"]
1186
1326
  },
1187
1327
  {
1188
1328
  name: "dateOfBirth",
@@ -1191,7 +1331,8 @@ const EKYC_DEFINITIONS = {
1191
1331
  required: true,
1192
1332
  label: { key: "verification.labels.dateOfBirth" },
1193
1333
  input: { autofill: "birthday" },
1194
- rules: [{ id: "notFuture" }]
1334
+ rules: [{ id: "notFuture" }],
1335
+ prefill: ["document.birthDate"]
1195
1336
  },
1196
1337
  {
1197
1338
  name: "email",
@@ -1204,7 +1345,8 @@ const EKYC_DEFINITIONS = {
1204
1345
  keyboard: "email",
1205
1346
  autofill: "email"
1206
1347
  },
1207
- rules: [{ id: "emailFormat" }]
1348
+ rules: [{ id: "emailFormat" }],
1349
+ prefill: ["emailModule.email"]
1208
1350
  },
1209
1351
  {
1210
1352
  name: "phone",
@@ -1215,7 +1357,8 @@ const EKYC_DEFINITIONS = {
1215
1357
  input: { autofill: "phone" },
1216
1358
  phone: { lockCountry: "whenPhoneRisk" },
1217
1359
  rules: [{ id: "phoneFormat" }],
1218
- payload: { transforms: [{ id: "e164" }] }
1360
+ payload: { transforms: [{ id: "e164" }] },
1361
+ prefill: ["phoneModule.phone"]
1219
1362
  },
1220
1363
  {
1221
1364
  name: "street",
@@ -1226,7 +1369,8 @@ const EKYC_DEFINITIONS = {
1226
1369
  widget: "addressSearch",
1227
1370
  label: { key: "verification.labels.street" },
1228
1371
  input: { autofill: "addressLine1" },
1229
- rules: [{ id: "noPoBox" }]
1372
+ rules: [{ id: "noPoBox" }],
1373
+ prefill: ["document.street", "poa.street"]
1230
1374
  },
1231
1375
  {
1232
1376
  name: "houseNo",
@@ -1234,7 +1378,8 @@ const EKYC_DEFINITIONS = {
1234
1378
  group: "address",
1235
1379
  section: "address",
1236
1380
  required: true,
1237
- label: { key: "verification.labels.houseNo" }
1381
+ label: { key: "verification.labels.houseNo" },
1382
+ prefill: ["document.houseNumber", "poa.houseNumber"]
1238
1383
  },
1239
1384
  {
1240
1385
  name: "city",
@@ -1243,7 +1388,8 @@ const EKYC_DEFINITIONS = {
1243
1388
  section: "address",
1244
1389
  required: true,
1245
1390
  label: { key: "verification.labels.city" },
1246
- input: { autofill: "addressLevel2" }
1391
+ input: { autofill: "addressLevel2" },
1392
+ prefill: ["document.city", "poa.city"]
1247
1393
  },
1248
1394
  {
1249
1395
  name: "state",
@@ -1257,7 +1403,8 @@ const EKYC_DEFINITIONS = {
1257
1403
  params: { states: "" }
1258
1404
  },
1259
1405
  input: { autofill: "addressLevel1" },
1260
- payload: { transforms: [{ id: "uppercase" }] }
1406
+ payload: { transforms: [{ id: "uppercase" }] },
1407
+ prefill: ["document.state", "poa.state"]
1261
1408
  },
1262
1409
  {
1263
1410
  name: "postalCode",
@@ -1274,7 +1421,8 @@ const EKYC_DEFINITIONS = {
1274
1421
  payload: { transforms: [{
1275
1422
  id: "stripSeparators",
1276
1423
  params: { chars: "- " }
1277
- }] }
1424
+ }] },
1425
+ prefill: ["document.postalCode", "poa.postalCode"]
1278
1426
  }
1279
1427
  ],
1280
1428
  submit: {
@@ -1287,7 +1435,7 @@ const EKYC_DEFINITIONS = {
1287
1435
  },
1288
1436
  "ekyc/CA/CA_RES_CREDIT": {
1289
1437
  schemaVersion: 1,
1290
- vocabulary: "1.0",
1438
+ vocabulary: "1.2",
1291
1439
  id: "ekyc/CA/CA_RES_CREDIT",
1292
1440
  module: "ekyc",
1293
1441
  country: "CA",
@@ -1305,7 +1453,8 @@ const EKYC_DEFINITIONS = {
1305
1453
  maxLength: 100,
1306
1454
  autofill: "givenName"
1307
1455
  },
1308
- rules: [{ id: "nameCharacters" }]
1456
+ rules: [{ id: "nameCharacters" }],
1457
+ prefill: ["document.firstName", "poa.firstName"]
1309
1458
  },
1310
1459
  {
1311
1460
  name: "middleName",
@@ -1317,7 +1466,8 @@ const EKYC_DEFINITIONS = {
1317
1466
  maxLength: 100,
1318
1467
  autofill: "middleName"
1319
1468
  },
1320
- rules: [{ id: "nameCharacters" }]
1469
+ rules: [{ id: "nameCharacters" }],
1470
+ prefill: ["document.middleName"]
1321
1471
  },
1322
1472
  {
1323
1473
  name: "surName",
@@ -1330,7 +1480,8 @@ const EKYC_DEFINITIONS = {
1330
1480
  maxLength: 100,
1331
1481
  autofill: "familyName"
1332
1482
  },
1333
- rules: [{ id: "nameCharacters" }]
1483
+ rules: [{ id: "nameCharacters" }],
1484
+ prefill: ["document.paternalLastName", "poa.lastName"]
1334
1485
  },
1335
1486
  {
1336
1487
  name: "dateOfBirth",
@@ -1339,7 +1490,8 @@ const EKYC_DEFINITIONS = {
1339
1490
  required: true,
1340
1491
  label: { key: "verification.labels.dateOfBirth" },
1341
1492
  input: { autofill: "birthday" },
1342
- rules: [{ id: "notFuture" }]
1493
+ rules: [{ id: "notFuture" }],
1494
+ prefill: ["document.birthDate"]
1343
1495
  },
1344
1496
  {
1345
1497
  name: "email",
@@ -1352,7 +1504,8 @@ const EKYC_DEFINITIONS = {
1352
1504
  keyboard: "email",
1353
1505
  autofill: "email"
1354
1506
  },
1355
- rules: [{ id: "emailFormat" }]
1507
+ rules: [{ id: "emailFormat" }],
1508
+ prefill: ["emailModule.email"]
1356
1509
  },
1357
1510
  {
1358
1511
  name: "phone",
@@ -1368,7 +1521,8 @@ const EKYC_DEFINITIONS = {
1368
1521
  max: 10
1369
1522
  }
1370
1523
  }],
1371
- payload: { transforms: [{ id: "e164" }] }
1524
+ payload: { transforms: [{ id: "e164" }] },
1525
+ prefill: ["phoneModule.phone"]
1372
1526
  },
1373
1527
  {
1374
1528
  name: "street",
@@ -1379,7 +1533,8 @@ const EKYC_DEFINITIONS = {
1379
1533
  widget: "addressSearch",
1380
1534
  label: { key: "verification.labels.street" },
1381
1535
  input: { autofill: "addressLine1" },
1382
- rules: [{ id: "noPoBox" }]
1536
+ rules: [{ id: "noPoBox" }],
1537
+ prefill: ["document.street", "poa.street"]
1383
1538
  },
1384
1539
  {
1385
1540
  name: "houseNo",
@@ -1387,7 +1542,8 @@ const EKYC_DEFINITIONS = {
1387
1542
  group: "address",
1388
1543
  section: "address",
1389
1544
  required: true,
1390
- label: { key: "verification.labels.houseNo" }
1545
+ label: { key: "verification.labels.houseNo" },
1546
+ prefill: ["document.houseNumber", "poa.houseNumber"]
1391
1547
  },
1392
1548
  {
1393
1549
  name: "city",
@@ -1404,7 +1560,8 @@ const EKYC_DEFINITIONS = {
1404
1560
  "digit",
1405
1561
  "space"
1406
1562
  ] }
1407
- }]
1563
+ }],
1564
+ prefill: ["document.city", "poa.city"]
1408
1565
  },
1409
1566
  {
1410
1567
  name: "state",
@@ -1417,7 +1574,8 @@ const EKYC_DEFINITIONS = {
1417
1574
  placeholder: { key: "verification.placeholder.state" },
1418
1575
  input: { autofill: "addressLevel1" },
1419
1576
  optionsRef: "CA_PROVINCES",
1420
- payload: { transforms: [{ id: "uppercase" }] }
1577
+ payload: { transforms: [{ id: "uppercase" }] },
1578
+ prefill: ["document.state", "poa.state"]
1421
1579
  },
1422
1580
  {
1423
1581
  name: "postalCode",
@@ -1441,7 +1599,8 @@ const EKYC_DEFINITIONS = {
1441
1599
  payload: { transforms: [{
1442
1600
  id: "stripSeparators",
1443
1601
  params: { chars: "- " }
1444
- }] }
1602
+ }] },
1603
+ prefill: ["document.postalCode", "poa.postalCode"]
1445
1604
  }
1446
1605
  ],
1447
1606
  submit: {
@@ -1454,7 +1613,7 @@ const EKYC_DEFINITIONS = {
1454
1613
  },
1455
1614
  "ekyc/CA/CA_TELCO": {
1456
1615
  schemaVersion: 1,
1457
- vocabulary: "1.0",
1616
+ vocabulary: "1.2",
1458
1617
  id: "ekyc/CA/CA_TELCO",
1459
1618
  module: "ekyc",
1460
1619
  country: "CA",
@@ -1472,7 +1631,8 @@ const EKYC_DEFINITIONS = {
1472
1631
  maxLength: 100,
1473
1632
  autofill: "givenName"
1474
1633
  },
1475
- rules: [{ id: "nameCharacters" }]
1634
+ rules: [{ id: "nameCharacters" }],
1635
+ prefill: ["document.firstName", "poa.firstName"]
1476
1636
  },
1477
1637
  {
1478
1638
  name: "surName",
@@ -1485,7 +1645,8 @@ const EKYC_DEFINITIONS = {
1485
1645
  maxLength: 100,
1486
1646
  autofill: "familyName"
1487
1647
  },
1488
- rules: [{ id: "nameCharacters" }]
1648
+ rules: [{ id: "nameCharacters" }],
1649
+ prefill: ["document.paternalLastName", "poa.lastName"]
1489
1650
  },
1490
1651
  {
1491
1652
  name: "dateOfBirth",
@@ -1494,7 +1655,8 @@ const EKYC_DEFINITIONS = {
1494
1655
  required: true,
1495
1656
  label: { key: "verification.labels.dateOfBirth" },
1496
1657
  input: { autofill: "birthday" },
1497
- rules: [{ id: "notFuture" }]
1658
+ rules: [{ id: "notFuture" }],
1659
+ prefill: ["document.birthDate"]
1498
1660
  },
1499
1661
  {
1500
1662
  name: "email",
@@ -1507,7 +1669,8 @@ const EKYC_DEFINITIONS = {
1507
1669
  keyboard: "email",
1508
1670
  autofill: "email"
1509
1671
  },
1510
- rules: [{ id: "emailFormat" }]
1672
+ rules: [{ id: "emailFormat" }],
1673
+ prefill: ["emailModule.email"]
1511
1674
  },
1512
1675
  {
1513
1676
  name: "phone",
@@ -1524,7 +1687,8 @@ const EKYC_DEFINITIONS = {
1524
1687
  max: 10
1525
1688
  }
1526
1689
  }],
1527
- payload: { transforms: [{ id: "e164" }] }
1690
+ payload: { transforms: [{ id: "e164" }] },
1691
+ prefill: ["phoneModule.phone"]
1528
1692
  },
1529
1693
  {
1530
1694
  name: "street",
@@ -1534,14 +1698,16 @@ const EKYC_DEFINITIONS = {
1534
1698
  widget: "addressSearch",
1535
1699
  label: { key: "verification.labels.street" },
1536
1700
  input: { autofill: "addressLine1" },
1537
- rules: [{ id: "noPoBox" }]
1701
+ rules: [{ id: "noPoBox" }],
1702
+ prefill: ["document.street", "poa.street"]
1538
1703
  },
1539
1704
  {
1540
1705
  name: "houseNo",
1541
1706
  kind: "text",
1542
1707
  group: "address",
1543
1708
  section: "address",
1544
- label: { key: "verification.labels.houseNo" }
1709
+ label: { key: "verification.labels.houseNo" },
1710
+ prefill: ["document.houseNumber", "poa.houseNumber"]
1545
1711
  },
1546
1712
  {
1547
1713
  name: "city",
@@ -1549,7 +1715,8 @@ const EKYC_DEFINITIONS = {
1549
1715
  group: "address",
1550
1716
  section: "address",
1551
1717
  label: { key: "verification.labels.city" },
1552
- input: { autofill: "addressLevel2" }
1718
+ input: { autofill: "addressLevel2" },
1719
+ prefill: ["document.city", "poa.city"]
1553
1720
  },
1554
1721
  {
1555
1722
  name: "state",
@@ -1561,7 +1728,8 @@ const EKYC_DEFINITIONS = {
1561
1728
  placeholder: { key: "verification.placeholder.state" },
1562
1729
  input: { autofill: "addressLevel1" },
1563
1730
  optionsRef: "CA_PROVINCES",
1564
- payload: { transforms: [{ id: "uppercase" }] }
1731
+ payload: { transforms: [{ id: "uppercase" }] },
1732
+ prefill: ["document.state", "poa.state"]
1565
1733
  },
1566
1734
  {
1567
1735
  name: "postalCode",
@@ -1577,7 +1745,8 @@ const EKYC_DEFINITIONS = {
1577
1745
  payload: { transforms: [{
1578
1746
  id: "stripSeparators",
1579
1747
  params: { chars: "- " }
1580
- }] }
1748
+ }] },
1749
+ prefill: ["document.postalCode", "poa.postalCode"]
1581
1750
  }
1582
1751
  ],
1583
1752
  submit: {
@@ -1590,7 +1759,7 @@ const EKYC_DEFINITIONS = {
1590
1759
  },
1591
1760
  "ekyc/CL/CL_CIVIL_REGISTER_2": {
1592
1761
  schemaVersion: 1,
1593
- vocabulary: "1.0",
1762
+ vocabulary: "1.2",
1594
1763
  id: "ekyc/CL/CL_CIVIL_REGISTER_2",
1595
1764
  module: "ekyc",
1596
1765
  country: "CL",
@@ -1607,7 +1776,8 @@ const EKYC_DEFINITIONS = {
1607
1776
  maxLength: 100,
1608
1777
  autofill: "givenName"
1609
1778
  },
1610
- rules: [{ id: "nameCharacters" }]
1779
+ rules: [{ id: "nameCharacters" }],
1780
+ prefill: ["document.firstName", "poa.firstName"]
1611
1781
  },
1612
1782
  {
1613
1783
  name: "surName",
@@ -1620,7 +1790,8 @@ const EKYC_DEFINITIONS = {
1620
1790
  maxLength: 100,
1621
1791
  autofill: "familyName"
1622
1792
  },
1623
- rules: [{ id: "nameCharacters" }]
1793
+ rules: [{ id: "nameCharacters" }],
1794
+ prefill: ["document.paternalLastName", "poa.lastName"]
1624
1795
  },
1625
1796
  {
1626
1797
  name: "email",
@@ -1633,7 +1804,8 @@ const EKYC_DEFINITIONS = {
1633
1804
  keyboard: "email",
1634
1805
  autofill: "email"
1635
1806
  },
1636
- rules: [{ id: "emailFormat" }]
1807
+ rules: [{ id: "emailFormat" }],
1808
+ prefill: ["emailModule.email"]
1637
1809
  },
1638
1810
  {
1639
1811
  name: "phone",
@@ -1644,7 +1816,8 @@ const EKYC_DEFINITIONS = {
1644
1816
  input: { autofill: "phone" },
1645
1817
  phone: { lockCountry: "whenPhoneRisk" },
1646
1818
  rules: [{ id: "phoneFormat" }],
1647
- payload: { transforms: [{ id: "e164" }] }
1819
+ payload: { transforms: [{ id: "e164" }] },
1820
+ prefill: ["phoneModule.phone"]
1648
1821
  },
1649
1822
  {
1650
1823
  name: "idNum",
@@ -1656,7 +1829,8 @@ const EKYC_DEFINITIONS = {
1656
1829
  maxLength: 12,
1657
1830
  format: [{ id: "stripSeparators" }, { id: "uppercase" }]
1658
1831
  },
1659
- rules: [{ id: "rut" }]
1832
+ rules: [{ id: "rut" }],
1833
+ prefill: ["document.documentNumber"]
1660
1834
  }
1661
1835
  ],
1662
1836
  submit: {
@@ -1669,11 +1843,15 @@ const EKYC_DEFINITIONS = {
1669
1843
  },
1670
1844
  "ekyc/CO/CO_CIVIL_REGISTER_1": {
1671
1845
  schemaVersion: 1,
1672
- vocabulary: "1.0",
1846
+ vocabulary: "1.2",
1673
1847
  id: "ekyc/CO/CO_CIVIL_REGISTER_1",
1674
1848
  module: "ekyc",
1675
1849
  country: "CO",
1676
1850
  source: "CO_CIVIL_REGISTER_1",
1851
+ groups: [{
1852
+ group: "issueDate",
1853
+ whenDisabled: "forceShow"
1854
+ }],
1677
1855
  fields: [
1678
1856
  {
1679
1857
  name: "firstName",
@@ -1686,7 +1864,8 @@ const EKYC_DEFINITIONS = {
1686
1864
  maxLength: 100,
1687
1865
  autofill: "givenName"
1688
1866
  },
1689
- rules: [{ id: "nameCharacters" }]
1867
+ rules: [{ id: "nameCharacters" }],
1868
+ prefill: ["document.firstName", "poa.firstName"]
1690
1869
  },
1691
1870
  {
1692
1871
  name: "middleName",
@@ -1698,7 +1877,8 @@ const EKYC_DEFINITIONS = {
1698
1877
  maxLength: 100,
1699
1878
  autofill: "middleName"
1700
1879
  },
1701
- rules: [{ id: "nameCharacters" }]
1880
+ rules: [{ id: "nameCharacters" }],
1881
+ prefill: ["document.middleName"]
1702
1882
  },
1703
1883
  {
1704
1884
  name: "surName",
@@ -1711,7 +1891,8 @@ const EKYC_DEFINITIONS = {
1711
1891
  maxLength: 100,
1712
1892
  autofill: "familyName"
1713
1893
  },
1714
- rules: [{ id: "nameCharacters" }]
1894
+ rules: [{ id: "nameCharacters" }],
1895
+ prefill: ["document.paternalLastName", "poa.lastName"]
1715
1896
  },
1716
1897
  {
1717
1898
  name: "dateOfBirth",
@@ -1719,7 +1900,8 @@ const EKYC_DEFINITIONS = {
1719
1900
  group: "dateOfBirth",
1720
1901
  label: { key: "verification.labels.dateOfBirth" },
1721
1902
  input: { autofill: "birthday" },
1722
- rules: [{ id: "notFuture" }]
1903
+ rules: [{ id: "notFuture" }],
1904
+ prefill: ["document.birthDate"]
1723
1905
  },
1724
1906
  {
1725
1907
  name: "email",
@@ -1732,7 +1914,8 @@ const EKYC_DEFINITIONS = {
1732
1914
  keyboard: "email",
1733
1915
  autofill: "email"
1734
1916
  },
1735
- rules: [{ id: "emailFormat" }]
1917
+ rules: [{ id: "emailFormat" }],
1918
+ prefill: ["emailModule.email"]
1736
1919
  },
1737
1920
  {
1738
1921
  name: "phone",
@@ -1743,7 +1926,8 @@ const EKYC_DEFINITIONS = {
1743
1926
  input: { autofill: "phone" },
1744
1927
  phone: { lockCountry: "whenPhoneRisk" },
1745
1928
  rules: [{ id: "phoneFormat" }],
1746
- payload: { transforms: [{ id: "e164" }] }
1929
+ payload: { transforms: [{ id: "e164" }] },
1930
+ prefill: ["phoneModule.phone"]
1747
1931
  },
1748
1932
  {
1749
1933
  name: "idNum",
@@ -1758,15 +1942,17 @@ const EKYC_DEFINITIONS = {
1758
1942
  rules: [{
1759
1943
  id: "digitCount",
1760
1944
  params: { lengths: [8, 10] }
1761
- }]
1945
+ }],
1946
+ prefill: ["document.documentNumber"]
1762
1947
  },
1763
1948
  {
1764
1949
  name: "issueDate",
1765
1950
  kind: "date",
1766
- group: "idNumber",
1951
+ group: "issueDate",
1767
1952
  required: true,
1768
1953
  label: { key: "verification.labels.issueDate" },
1769
- rules: [{ id: "notFuture" }]
1954
+ rules: [{ id: "notFuture" }],
1955
+ prefill: ["document.issueDate"]
1770
1956
  },
1771
1957
  {
1772
1958
  name: "gender",
@@ -1793,7 +1979,7 @@ const EKYC_DEFINITIONS = {
1793
1979
  },
1794
1980
  "ekyc/DE/DE_PHONE_MOBILE_REGISTER": {
1795
1981
  schemaVersion: 1,
1796
- vocabulary: "1.0",
1982
+ vocabulary: "1.2",
1797
1983
  id: "ekyc/DE/DE_PHONE_MOBILE_REGISTER",
1798
1984
  module: "ekyc",
1799
1985
  country: "DE",
@@ -1811,7 +1997,8 @@ const EKYC_DEFINITIONS = {
1811
1997
  maxLength: 100,
1812
1998
  autofill: "givenName"
1813
1999
  },
1814
- rules: [{ id: "nameCharacters" }]
2000
+ rules: [{ id: "nameCharacters" }],
2001
+ prefill: ["document.firstName", "poa.firstName"]
1815
2002
  },
1816
2003
  {
1817
2004
  name: "middleName",
@@ -1823,7 +2010,8 @@ const EKYC_DEFINITIONS = {
1823
2010
  maxLength: 100,
1824
2011
  autofill: "middleName"
1825
2012
  },
1826
- rules: [{ id: "nameCharacters" }]
2013
+ rules: [{ id: "nameCharacters" }],
2014
+ prefill: ["document.middleName"]
1827
2015
  },
1828
2016
  {
1829
2017
  name: "surName",
@@ -1836,7 +2024,8 @@ const EKYC_DEFINITIONS = {
1836
2024
  maxLength: 100,
1837
2025
  autofill: "familyName"
1838
2026
  },
1839
- rules: [{ id: "nameCharacters" }]
2027
+ rules: [{ id: "nameCharacters" }],
2028
+ prefill: ["document.paternalLastName", "poa.lastName"]
1840
2029
  },
1841
2030
  {
1842
2031
  name: "dateOfBirth",
@@ -1844,7 +2033,8 @@ const EKYC_DEFINITIONS = {
1844
2033
  group: "dateOfBirth",
1845
2034
  label: { key: "verification.labels.dateOfBirth" },
1846
2035
  input: { autofill: "birthday" },
1847
- rules: [{ id: "notFuture" }]
2036
+ rules: [{ id: "notFuture" }],
2037
+ prefill: ["document.birthDate"]
1848
2038
  },
1849
2039
  {
1850
2040
  name: "email",
@@ -1857,7 +2047,8 @@ const EKYC_DEFINITIONS = {
1857
2047
  keyboard: "email",
1858
2048
  autofill: "email"
1859
2049
  },
1860
- rules: [{ id: "emailFormat" }]
2050
+ rules: [{ id: "emailFormat" }],
2051
+ prefill: ["emailModule.email"]
1861
2052
  },
1862
2053
  {
1863
2054
  name: "phone",
@@ -1873,7 +2064,8 @@ const EKYC_DEFINITIONS = {
1873
2064
  max: 11
1874
2065
  }
1875
2066
  }],
1876
- payload: { transforms: [{ id: "e164NoPlus" }] }
2067
+ payload: { transforms: [{ id: "e164NoPlus" }] },
2068
+ prefill: ["phoneModule.phone"]
1877
2069
  },
1878
2070
  {
1879
2071
  name: "street",
@@ -1883,14 +2075,16 @@ const EKYC_DEFINITIONS = {
1883
2075
  widget: "addressSearch",
1884
2076
  label: { key: "verification.labels.street" },
1885
2077
  input: { autofill: "addressLine1" },
1886
- rules: [{ id: "noPoBox" }]
2078
+ rules: [{ id: "noPoBox" }],
2079
+ prefill: ["document.street", "poa.street"]
1887
2080
  },
1888
2081
  {
1889
2082
  name: "houseNo",
1890
2083
  kind: "text",
1891
2084
  group: "address",
1892
2085
  section: "address",
1893
- label: { key: "verification.labels.houseNo" }
2086
+ label: { key: "verification.labels.houseNo" },
2087
+ prefill: ["document.houseNumber", "poa.houseNumber"]
1894
2088
  },
1895
2089
  {
1896
2090
  name: "city",
@@ -1898,7 +2092,8 @@ const EKYC_DEFINITIONS = {
1898
2092
  group: "address",
1899
2093
  section: "address",
1900
2094
  label: { key: "verification.labels.city" },
1901
- input: { autofill: "addressLevel2" }
2095
+ input: { autofill: "addressLevel2" },
2096
+ prefill: ["document.city", "poa.city"]
1902
2097
  },
1903
2098
  {
1904
2099
  name: "postalCode",
@@ -1914,7 +2109,8 @@ const EKYC_DEFINITIONS = {
1914
2109
  payload: { transforms: [{
1915
2110
  id: "stripSeparators",
1916
2111
  params: { chars: "- " }
1917
- }] }
2112
+ }] },
2113
+ prefill: ["document.postalCode", "poa.postalCode"]
1918
2114
  }
1919
2115
  ],
1920
2116
  submit: {
@@ -1927,7 +2123,7 @@ const EKYC_DEFINITIONS = {
1927
2123
  },
1928
2124
  "ekyc/DK/DK_CIVIL_REG_CREDIT_TELCO": {
1929
2125
  schemaVersion: 1,
1930
- vocabulary: "1.0",
2126
+ vocabulary: "1.2",
1931
2127
  id: "ekyc/DK/DK_CIVIL_REG_CREDIT_TELCO",
1932
2128
  module: "ekyc",
1933
2129
  country: "DK",
@@ -1945,7 +2141,8 @@ const EKYC_DEFINITIONS = {
1945
2141
  maxLength: 100,
1946
2142
  autofill: "givenName"
1947
2143
  },
1948
- rules: [{ id: "nameCharacters" }]
2144
+ rules: [{ id: "nameCharacters" }],
2145
+ prefill: ["document.firstName", "poa.firstName"]
1949
2146
  },
1950
2147
  {
1951
2148
  name: "surName",
@@ -1958,7 +2155,8 @@ const EKYC_DEFINITIONS = {
1958
2155
  maxLength: 100,
1959
2156
  autofill: "familyName"
1960
2157
  },
1961
- rules: [{ id: "nameCharacters" }]
2158
+ rules: [{ id: "nameCharacters" }],
2159
+ prefill: ["document.paternalLastName", "poa.lastName"]
1962
2160
  },
1963
2161
  {
1964
2162
  name: "dateOfBirth",
@@ -1966,7 +2164,8 @@ const EKYC_DEFINITIONS = {
1966
2164
  group: "dateOfBirth",
1967
2165
  label: { key: "verification.labels.dateOfBirth" },
1968
2166
  input: { autofill: "birthday" },
1969
- rules: [{ id: "notFuture" }]
2167
+ rules: [{ id: "notFuture" }],
2168
+ prefill: ["document.birthDate"]
1970
2169
  },
1971
2170
  {
1972
2171
  name: "email",
@@ -1979,7 +2178,8 @@ const EKYC_DEFINITIONS = {
1979
2178
  keyboard: "email",
1980
2179
  autofill: "email"
1981
2180
  },
1982
- rules: [{ id: "emailFormat" }]
2181
+ rules: [{ id: "emailFormat" }],
2182
+ prefill: ["emailModule.email"]
1983
2183
  },
1984
2184
  {
1985
2185
  name: "phone",
@@ -1996,7 +2196,8 @@ const EKYC_DEFINITIONS = {
1996
2196
  max: 8
1997
2197
  }
1998
2198
  }],
1999
- payload: { transforms: [{ id: "e164" }] }
2199
+ payload: { transforms: [{ id: "e164" }] },
2200
+ prefill: ["phoneModule.phone"]
2000
2201
  },
2001
2202
  {
2002
2203
  name: "street",
@@ -2006,7 +2207,8 @@ const EKYC_DEFINITIONS = {
2006
2207
  widget: "addressSearch",
2007
2208
  label: { key: "verification.labels.streetAndHouseNumber" },
2008
2209
  input: { autofill: "addressLine1" },
2009
- rules: [{ id: "noPoBox" }]
2210
+ rules: [{ id: "noPoBox" }],
2211
+ prefill: ["document.street", "poa.street"]
2010
2212
  },
2011
2213
  {
2012
2214
  name: "city",
@@ -2014,7 +2216,8 @@ const EKYC_DEFINITIONS = {
2014
2216
  group: "address",
2015
2217
  section: "address",
2016
2218
  label: { key: "verification.labels.city" },
2017
- input: { autofill: "addressLevel2" }
2219
+ input: { autofill: "addressLevel2" },
2220
+ prefill: ["document.city", "poa.city"]
2018
2221
  },
2019
2222
  {
2020
2223
  name: "postalCode",
@@ -2030,7 +2233,8 @@ const EKYC_DEFINITIONS = {
2030
2233
  payload: { transforms: [{
2031
2234
  id: "stripSeparators",
2032
2235
  params: { chars: "- " }
2033
- }] }
2236
+ }] },
2237
+ prefill: ["document.postalCode", "poa.postalCode"]
2034
2238
  }
2035
2239
  ],
2036
2240
  submit: {
@@ -2043,7 +2247,7 @@ const EKYC_DEFINITIONS = {
2043
2247
  },
2044
2248
  "ekyc/ES/ES_PHONE_REGISTER_2": {
2045
2249
  schemaVersion: 1,
2046
- vocabulary: "1.0",
2250
+ vocabulary: "1.2",
2047
2251
  id: "ekyc/ES/ES_PHONE_REGISTER_2",
2048
2252
  module: "ekyc",
2049
2253
  country: "ES",
@@ -2061,7 +2265,8 @@ const EKYC_DEFINITIONS = {
2061
2265
  maxLength: 100,
2062
2266
  autofill: "givenName"
2063
2267
  },
2064
- rules: [{ id: "nameCharacters" }]
2268
+ rules: [{ id: "nameCharacters" }],
2269
+ prefill: ["document.firstName", "poa.firstName"]
2065
2270
  },
2066
2271
  {
2067
2272
  name: "middleName",
@@ -2073,7 +2278,8 @@ const EKYC_DEFINITIONS = {
2073
2278
  maxLength: 100,
2074
2279
  autofill: "middleName"
2075
2280
  },
2076
- rules: [{ id: "nameCharacters" }]
2281
+ rules: [{ id: "nameCharacters" }],
2282
+ prefill: ["document.middleName"]
2077
2283
  },
2078
2284
  {
2079
2285
  name: "surName",
@@ -2086,7 +2292,8 @@ const EKYC_DEFINITIONS = {
2086
2292
  maxLength: 100,
2087
2293
  autofill: "familyName"
2088
2294
  },
2089
- rules: [{ id: "nameCharacters" }]
2295
+ rules: [{ id: "nameCharacters" }],
2296
+ prefill: ["document.paternalLastName", "poa.lastName"]
2090
2297
  },
2091
2298
  {
2092
2299
  name: "dateOfBirth",
@@ -2094,7 +2301,8 @@ const EKYC_DEFINITIONS = {
2094
2301
  group: "dateOfBirth",
2095
2302
  label: { key: "verification.labels.dateOfBirth" },
2096
2303
  input: { autofill: "birthday" },
2097
- rules: [{ id: "notFuture" }]
2304
+ rules: [{ id: "notFuture" }],
2305
+ prefill: ["document.birthDate"]
2098
2306
  },
2099
2307
  {
2100
2308
  name: "email",
@@ -2107,7 +2315,8 @@ const EKYC_DEFINITIONS = {
2107
2315
  keyboard: "email",
2108
2316
  autofill: "email"
2109
2317
  },
2110
- rules: [{ id: "emailFormat" }]
2318
+ rules: [{ id: "emailFormat" }],
2319
+ prefill: ["emailModule.email"]
2111
2320
  },
2112
2321
  {
2113
2322
  name: "phone",
@@ -2123,7 +2332,8 @@ const EKYC_DEFINITIONS = {
2123
2332
  max: 9
2124
2333
  }
2125
2334
  }],
2126
- payload: { transforms: [{ id: "e164" }] }
2335
+ payload: { transforms: [{ id: "e164" }] },
2336
+ prefill: ["phoneModule.phone"]
2127
2337
  },
2128
2338
  {
2129
2339
  name: "idNum",
@@ -2135,7 +2345,8 @@ const EKYC_DEFINITIONS = {
2135
2345
  maxLength: 12,
2136
2346
  format: [{ id: "stripSeparators" }, { id: "uppercase" }]
2137
2347
  },
2138
- rules: [{ id: "esDni" }]
2348
+ rules: [{ id: "esDni" }],
2349
+ prefill: ["document.documentNumber"]
2139
2350
  },
2140
2351
  {
2141
2352
  name: "street",
@@ -2145,14 +2356,16 @@ const EKYC_DEFINITIONS = {
2145
2356
  widget: "addressSearch",
2146
2357
  label: { key: "verification.labels.street" },
2147
2358
  input: { autofill: "addressLine1" },
2148
- rules: [{ id: "noPoBox" }]
2359
+ rules: [{ id: "noPoBox" }],
2360
+ prefill: ["document.street", "poa.street"]
2149
2361
  },
2150
2362
  {
2151
2363
  name: "houseNo",
2152
2364
  kind: "text",
2153
2365
  group: "address",
2154
2366
  section: "address",
2155
- label: { key: "verification.labels.houseNo" }
2367
+ label: { key: "verification.labels.houseNo" },
2368
+ prefill: ["document.houseNumber", "poa.houseNumber"]
2156
2369
  },
2157
2370
  {
2158
2371
  name: "city",
@@ -2160,7 +2373,8 @@ const EKYC_DEFINITIONS = {
2160
2373
  group: "address",
2161
2374
  section: "address",
2162
2375
  label: { key: "verification.labels.city" },
2163
- input: { autofill: "addressLevel2" }
2376
+ input: { autofill: "addressLevel2" },
2377
+ prefill: ["document.city", "poa.city"]
2164
2378
  },
2165
2379
  {
2166
2380
  name: "state",
@@ -2173,7 +2387,8 @@ const EKYC_DEFINITIONS = {
2173
2387
  params: { states: "" }
2174
2388
  },
2175
2389
  input: { autofill: "addressLevel1" },
2176
- payload: { transforms: [{ id: "uppercase" }] }
2390
+ payload: { transforms: [{ id: "uppercase" }] },
2391
+ prefill: ["document.state", "poa.state"]
2177
2392
  },
2178
2393
  {
2179
2394
  name: "postalCode",
@@ -2193,7 +2408,8 @@ const EKYC_DEFINITIONS = {
2193
2408
  payload: { transforms: [{
2194
2409
  id: "stripSeparators",
2195
2410
  params: { chars: "- " }
2196
- }] }
2411
+ }] },
2412
+ prefill: ["document.postalCode", "poa.postalCode"]
2197
2413
  }
2198
2414
  ],
2199
2415
  submit: {
@@ -2206,7 +2422,7 @@ const EKYC_DEFINITIONS = {
2206
2422
  },
2207
2423
  "ekyc/FI/FI_CONSUMER_POP_REG_TELCO": {
2208
2424
  schemaVersion: 1,
2209
- vocabulary: "1.0",
2425
+ vocabulary: "1.2",
2210
2426
  id: "ekyc/FI/FI_CONSUMER_POP_REG_TELCO",
2211
2427
  module: "ekyc",
2212
2428
  country: "FI",
@@ -2224,7 +2440,8 @@ const EKYC_DEFINITIONS = {
2224
2440
  maxLength: 100,
2225
2441
  autofill: "givenName"
2226
2442
  },
2227
- rules: [{ id: "nameCharacters" }]
2443
+ rules: [{ id: "nameCharacters" }],
2444
+ prefill: ["document.firstName", "poa.firstName"]
2228
2445
  },
2229
2446
  {
2230
2447
  name: "surName",
@@ -2237,7 +2454,8 @@ const EKYC_DEFINITIONS = {
2237
2454
  maxLength: 100,
2238
2455
  autofill: "familyName"
2239
2456
  },
2240
- rules: [{ id: "nameCharacters" }]
2457
+ rules: [{ id: "nameCharacters" }],
2458
+ prefill: ["document.paternalLastName", "poa.lastName"]
2241
2459
  },
2242
2460
  {
2243
2461
  name: "dateOfBirth",
@@ -2245,7 +2463,8 @@ const EKYC_DEFINITIONS = {
2245
2463
  group: "dateOfBirth",
2246
2464
  label: { key: "verification.labels.dateOfBirth" },
2247
2465
  input: { autofill: "birthday" },
2248
- rules: [{ id: "notFuture" }]
2466
+ rules: [{ id: "notFuture" }],
2467
+ prefill: ["document.birthDate"]
2249
2468
  },
2250
2469
  {
2251
2470
  name: "email",
@@ -2257,7 +2476,8 @@ const EKYC_DEFINITIONS = {
2257
2476
  keyboard: "email",
2258
2477
  autofill: "email"
2259
2478
  },
2260
- rules: [{ id: "emailFormat" }]
2479
+ rules: [{ id: "emailFormat" }],
2480
+ prefill: ["emailModule.email"]
2261
2481
  },
2262
2482
  {
2263
2483
  name: "phone",
@@ -2274,7 +2494,8 @@ const EKYC_DEFINITIONS = {
2274
2494
  max: 9
2275
2495
  }
2276
2496
  }],
2277
- payload: { transforms: [{ id: "e164" }] }
2497
+ payload: { transforms: [{ id: "e164" }] },
2498
+ prefill: ["phoneModule.phone"]
2278
2499
  },
2279
2500
  {
2280
2501
  name: "gender",
@@ -2298,14 +2519,16 @@ const EKYC_DEFINITIONS = {
2298
2519
  widget: "addressSearch",
2299
2520
  label: { key: "verification.labels.street" },
2300
2521
  input: { autofill: "addressLine1" },
2301
- rules: [{ id: "noPoBox" }]
2522
+ rules: [{ id: "noPoBox" }],
2523
+ prefill: ["document.street", "poa.street"]
2302
2524
  },
2303
2525
  {
2304
2526
  name: "houseNo",
2305
2527
  kind: "text",
2306
2528
  group: "address",
2307
2529
  section: "address",
2308
- label: { key: "verification.labels.houseNo" }
2530
+ label: { key: "verification.labels.houseNo" },
2531
+ prefill: ["document.houseNumber", "poa.houseNumber"]
2309
2532
  },
2310
2533
  {
2311
2534
  name: "city",
@@ -2313,7 +2536,8 @@ const EKYC_DEFINITIONS = {
2313
2536
  group: "address",
2314
2537
  section: "address",
2315
2538
  label: { key: "verification.labels.city" },
2316
- input: { autofill: "addressLevel2" }
2539
+ input: { autofill: "addressLevel2" },
2540
+ prefill: ["document.city", "poa.city"]
2317
2541
  },
2318
2542
  {
2319
2543
  name: "postalCode",
@@ -2333,7 +2557,8 @@ const EKYC_DEFINITIONS = {
2333
2557
  payload: { transforms: [{
2334
2558
  id: "stripSeparators",
2335
2559
  params: { chars: "- " }
2336
- }] }
2560
+ }] },
2561
+ prefill: ["document.postalCode", "poa.postalCode"]
2337
2562
  }
2338
2563
  ],
2339
2564
  submit: {
@@ -2346,7 +2571,7 @@ const EKYC_DEFINITIONS = {
2346
2571
  },
2347
2572
  "ekyc/FI/FI_NATIONAL_ID": {
2348
2573
  schemaVersion: 1,
2349
- vocabulary: "1.0",
2574
+ vocabulary: "1.2",
2350
2575
  id: "ekyc/FI/FI_NATIONAL_ID",
2351
2576
  module: "ekyc",
2352
2577
  country: "FI",
@@ -2364,7 +2589,8 @@ const EKYC_DEFINITIONS = {
2364
2589
  maxLength: 100,
2365
2590
  autofill: "givenName"
2366
2591
  },
2367
- rules: [{ id: "nameCharacters" }]
2592
+ rules: [{ id: "nameCharacters" }],
2593
+ prefill: ["document.firstName", "poa.firstName"]
2368
2594
  },
2369
2595
  {
2370
2596
  name: "surName",
@@ -2377,7 +2603,8 @@ const EKYC_DEFINITIONS = {
2377
2603
  maxLength: 100,
2378
2604
  autofill: "familyName"
2379
2605
  },
2380
- rules: [{ id: "nameCharacters" }]
2606
+ rules: [{ id: "nameCharacters" }],
2607
+ prefill: ["document.paternalLastName", "poa.lastName"]
2381
2608
  },
2382
2609
  {
2383
2610
  name: "dateOfBirth",
@@ -2386,7 +2613,8 @@ const EKYC_DEFINITIONS = {
2386
2613
  required: true,
2387
2614
  label: { key: "verification.labels.dateOfBirth" },
2388
2615
  input: { autofill: "birthday" },
2389
- rules: [{ id: "notFuture" }]
2616
+ rules: [{ id: "notFuture" }],
2617
+ prefill: ["document.birthDate"]
2390
2618
  },
2391
2619
  {
2392
2620
  name: "email",
@@ -2399,7 +2627,8 @@ const EKYC_DEFINITIONS = {
2399
2627
  keyboard: "email",
2400
2628
  autofill: "email"
2401
2629
  },
2402
- rules: [{ id: "emailFormat" }]
2630
+ rules: [{ id: "emailFormat" }],
2631
+ prefill: ["emailModule.email"]
2403
2632
  },
2404
2633
  {
2405
2634
  name: "phone",
@@ -2410,7 +2639,8 @@ const EKYC_DEFINITIONS = {
2410
2639
  input: { autofill: "phone" },
2411
2640
  phone: { lockCountry: "whenPhoneRisk" },
2412
2641
  rules: [{ id: "phoneFormat" }],
2413
- payload: { transforms: [{ id: "e164" }] }
2642
+ payload: { transforms: [{ id: "e164" }] },
2643
+ prefill: ["phoneModule.phone"]
2414
2644
  },
2415
2645
  {
2416
2646
  name: "idNum",
@@ -2419,7 +2649,8 @@ const EKYC_DEFINITIONS = {
2419
2649
  required: true,
2420
2650
  label: { key: "verification.labels.idNum" },
2421
2651
  input: { maxLength: 11 },
2422
- rules: [{ id: "fiPersonalIdentityCode" }]
2652
+ rules: [{ id: "fiPersonalIdentityCode" }],
2653
+ prefill: ["document.documentNumber"]
2423
2654
  },
2424
2655
  {
2425
2656
  name: "street",
@@ -2429,7 +2660,8 @@ const EKYC_DEFINITIONS = {
2429
2660
  widget: "addressSearch",
2430
2661
  label: { key: "verification.labels.streetAndHouseNumber" },
2431
2662
  input: { autofill: "addressLine1" },
2432
- rules: [{ id: "noPoBox" }]
2663
+ rules: [{ id: "noPoBox" }],
2664
+ prefill: ["document.street", "poa.street"]
2433
2665
  },
2434
2666
  {
2435
2667
  name: "city",
@@ -2437,7 +2669,8 @@ const EKYC_DEFINITIONS = {
2437
2669
  group: "address",
2438
2670
  section: "address",
2439
2671
  label: { key: "verification.labels.city" },
2440
- input: { autofill: "addressLevel2" }
2672
+ input: { autofill: "addressLevel2" },
2673
+ prefill: ["document.city", "poa.city"]
2441
2674
  },
2442
2675
  {
2443
2676
  name: "state",
@@ -2450,7 +2683,8 @@ const EKYC_DEFINITIONS = {
2450
2683
  params: { states: "" }
2451
2684
  },
2452
2685
  input: { autofill: "addressLevel1" },
2453
- payload: { transforms: [{ id: "uppercase" }] }
2686
+ payload: { transforms: [{ id: "uppercase" }] },
2687
+ prefill: ["document.state", "poa.state"]
2454
2688
  },
2455
2689
  {
2456
2690
  name: "postalCode",
@@ -2470,7 +2704,8 @@ const EKYC_DEFINITIONS = {
2470
2704
  payload: { transforms: [{
2471
2705
  id: "stripSeparators",
2472
2706
  params: { chars: "- " }
2473
- }] }
2707
+ }] },
2708
+ prefill: ["document.postalCode", "poa.postalCode"]
2474
2709
  }
2475
2710
  ],
2476
2711
  submit: {
@@ -2483,7 +2718,7 @@ const EKYC_DEFINITIONS = {
2483
2718
  },
2484
2719
  "ekyc/GB/GB_2X2": {
2485
2720
  schemaVersion: 1,
2486
- vocabulary: "1.0",
2721
+ vocabulary: "1.2",
2487
2722
  id: "ekyc/GB/GB_2X2",
2488
2723
  module: "ekyc",
2489
2724
  country: "GB",
@@ -2501,7 +2736,8 @@ const EKYC_DEFINITIONS = {
2501
2736
  maxLength: 100,
2502
2737
  autofill: "givenName"
2503
2738
  },
2504
- rules: [{ id: "nameCharacters" }]
2739
+ rules: [{ id: "nameCharacters" }],
2740
+ prefill: ["document.firstName", "poa.firstName"]
2505
2741
  },
2506
2742
  {
2507
2743
  name: "surName",
@@ -2514,7 +2750,8 @@ const EKYC_DEFINITIONS = {
2514
2750
  maxLength: 100,
2515
2751
  autofill: "familyName"
2516
2752
  },
2517
- rules: [{ id: "nameCharacters" }]
2753
+ rules: [{ id: "nameCharacters" }],
2754
+ prefill: ["document.paternalLastName", "poa.lastName"]
2518
2755
  },
2519
2756
  {
2520
2757
  name: "dateOfBirth",
@@ -2523,7 +2760,8 @@ const EKYC_DEFINITIONS = {
2523
2760
  required: true,
2524
2761
  label: { key: "verification.labels.dateOfBirth" },
2525
2762
  input: { autofill: "birthday" },
2526
- rules: [{ id: "notFuture" }]
2763
+ rules: [{ id: "notFuture" }],
2764
+ prefill: ["document.birthDate"]
2527
2765
  },
2528
2766
  {
2529
2767
  name: "email",
@@ -2536,7 +2774,8 @@ const EKYC_DEFINITIONS = {
2536
2774
  keyboard: "email",
2537
2775
  autofill: "email"
2538
2776
  },
2539
- rules: [{ id: "emailFormat" }]
2777
+ rules: [{ id: "emailFormat" }],
2778
+ prefill: ["emailModule.email"]
2540
2779
  },
2541
2780
  {
2542
2781
  name: "phone",
@@ -2547,7 +2786,8 @@ const EKYC_DEFINITIONS = {
2547
2786
  input: { autofill: "phone" },
2548
2787
  phone: { lockCountry: "whenPhoneRisk" },
2549
2788
  rules: [{ id: "phoneFormat" }],
2550
- payload: { transforms: [{ id: "e164" }] }
2789
+ payload: { transforms: [{ id: "e164" }] },
2790
+ prefill: ["phoneModule.phone"]
2551
2791
  },
2552
2792
  {
2553
2793
  name: "street",
@@ -2558,7 +2798,8 @@ const EKYC_DEFINITIONS = {
2558
2798
  widget: "addressSearch",
2559
2799
  label: { key: "verification.labels.streetAndHouseNumber" },
2560
2800
  input: { autofill: "addressLine1" },
2561
- rules: [{ id: "noPoBox" }]
2801
+ rules: [{ id: "noPoBox" }],
2802
+ prefill: ["document.street", "poa.street"]
2562
2803
  },
2563
2804
  {
2564
2805
  name: "city",
@@ -2571,7 +2812,8 @@ const EKYC_DEFINITIONS = {
2571
2812
  rules: [{
2572
2813
  id: "allowedCharacters",
2573
2814
  params: { classes: ["letter", "space"] }
2574
- }]
2815
+ }],
2816
+ prefill: ["document.city", "poa.city"]
2575
2817
  },
2576
2818
  {
2577
2819
  name: "state",
@@ -2589,7 +2831,8 @@ const EKYC_DEFINITIONS = {
2589
2831
  id: "allowedCharacters",
2590
2832
  params: { classes: ["letter", "space"] }
2591
2833
  }],
2592
- payload: { transforms: [{ id: "uppercase" }] }
2834
+ payload: { transforms: [{ id: "uppercase" }] },
2835
+ prefill: ["document.state", "poa.state"]
2593
2836
  },
2594
2837
  {
2595
2838
  name: "postalCode",
@@ -2613,7 +2856,8 @@ const EKYC_DEFINITIONS = {
2613
2856
  payload: { transforms: [{
2614
2857
  id: "stripSeparators",
2615
2858
  params: { chars: "- " }
2616
- }] }
2859
+ }] },
2860
+ prefill: ["document.postalCode", "poa.postalCode"]
2617
2861
  }
2618
2862
  ],
2619
2863
  submit: {
@@ -2626,7 +2870,7 @@ const EKYC_DEFINITIONS = {
2626
2870
  },
2627
2871
  "ekyc/GB/UK_VOTER_REGISTER": {
2628
2872
  schemaVersion: 1,
2629
- vocabulary: "1.0",
2873
+ vocabulary: "1.2",
2630
2874
  id: "ekyc/GB/UK_VOTER_REGISTER",
2631
2875
  module: "ekyc",
2632
2876
  country: "GB",
@@ -2644,7 +2888,8 @@ const EKYC_DEFINITIONS = {
2644
2888
  maxLength: 100,
2645
2889
  autofill: "givenName"
2646
2890
  },
2647
- rules: [{ id: "nameCharacters" }]
2891
+ rules: [{ id: "nameCharacters" }],
2892
+ prefill: ["document.firstName", "poa.firstName"]
2648
2893
  },
2649
2894
  {
2650
2895
  name: "middleName",
@@ -2656,7 +2901,8 @@ const EKYC_DEFINITIONS = {
2656
2901
  maxLength: 100,
2657
2902
  autofill: "middleName"
2658
2903
  },
2659
- rules: [{ id: "nameCharacters" }]
2904
+ rules: [{ id: "nameCharacters" }],
2905
+ prefill: ["document.middleName"]
2660
2906
  },
2661
2907
  {
2662
2908
  name: "surName",
@@ -2669,7 +2915,8 @@ const EKYC_DEFINITIONS = {
2669
2915
  maxLength: 100,
2670
2916
  autofill: "familyName"
2671
2917
  },
2672
- rules: [{ id: "nameCharacters" }]
2918
+ rules: [{ id: "nameCharacters" }],
2919
+ prefill: ["document.paternalLastName", "poa.lastName"]
2673
2920
  },
2674
2921
  {
2675
2922
  name: "dateOfBirth",
@@ -2677,7 +2924,8 @@ const EKYC_DEFINITIONS = {
2677
2924
  group: "dateOfBirth",
2678
2925
  label: { key: "verification.labels.dateOfBirth" },
2679
2926
  input: { autofill: "birthday" },
2680
- rules: [{ id: "notFuture" }]
2927
+ rules: [{ id: "notFuture" }],
2928
+ prefill: ["document.birthDate"]
2681
2929
  },
2682
2930
  {
2683
2931
  name: "email",
@@ -2690,7 +2938,8 @@ const EKYC_DEFINITIONS = {
2690
2938
  keyboard: "email",
2691
2939
  autofill: "email"
2692
2940
  },
2693
- rules: [{ id: "emailFormat" }]
2941
+ rules: [{ id: "emailFormat" }],
2942
+ prefill: ["emailModule.email"]
2694
2943
  },
2695
2944
  {
2696
2945
  name: "phone",
@@ -2706,7 +2955,8 @@ const EKYC_DEFINITIONS = {
2706
2955
  max: 10
2707
2956
  }
2708
2957
  }],
2709
- payload: { transforms: [{ id: "e164" }] }
2958
+ payload: { transforms: [{ id: "e164" }] },
2959
+ prefill: ["phoneModule.phone"]
2710
2960
  },
2711
2961
  {
2712
2962
  name: "gender",
@@ -2730,14 +2980,16 @@ const EKYC_DEFINITIONS = {
2730
2980
  widget: "addressSearch",
2731
2981
  label: { key: "verification.labels.street" },
2732
2982
  input: { autofill: "addressLine1" },
2733
- rules: [{ id: "noPoBox" }]
2983
+ rules: [{ id: "noPoBox" }],
2984
+ prefill: ["document.street", "poa.street"]
2734
2985
  },
2735
2986
  {
2736
2987
  name: "houseNo",
2737
2988
  kind: "text",
2738
2989
  group: "address",
2739
2990
  section: "address",
2740
- label: { key: "verification.labels.houseNo" }
2991
+ label: { key: "verification.labels.houseNo" },
2992
+ prefill: ["document.houseNumber", "poa.houseNumber"]
2741
2993
  },
2742
2994
  {
2743
2995
  name: "city",
@@ -2745,7 +2997,8 @@ const EKYC_DEFINITIONS = {
2745
2997
  group: "address",
2746
2998
  section: "address",
2747
2999
  label: { key: "verification.labels.city" },
2748
- input: { autofill: "addressLevel2" }
3000
+ input: { autofill: "addressLevel2" },
3001
+ prefill: ["document.city", "poa.city"]
2749
3002
  },
2750
3003
  {
2751
3004
  name: "postalCode",
@@ -2761,7 +3014,8 @@ const EKYC_DEFINITIONS = {
2761
3014
  payload: { transforms: [{
2762
3015
  id: "stripSeparators",
2763
3016
  params: { chars: "- " }
2764
- }] }
3017
+ }] },
3018
+ prefill: ["document.postalCode", "poa.postalCode"]
2765
3019
  }
2766
3020
  ],
2767
3021
  submit: {
@@ -2774,7 +3028,7 @@ const EKYC_DEFINITIONS = {
2774
3028
  },
2775
3029
  "ekyc/GR/GR_1": {
2776
3030
  schemaVersion: 1,
2777
- vocabulary: "1.0",
3031
+ vocabulary: "1.2",
2778
3032
  id: "ekyc/GR/GR_1",
2779
3033
  module: "ekyc",
2780
3034
  country: "GR",
@@ -2792,7 +3046,8 @@ const EKYC_DEFINITIONS = {
2792
3046
  maxLength: 100,
2793
3047
  autofill: "givenName"
2794
3048
  },
2795
- rules: [{ id: "nameCharacters" }]
3049
+ rules: [{ id: "nameCharacters" }],
3050
+ prefill: ["document.firstName", "poa.firstName"]
2796
3051
  },
2797
3052
  {
2798
3053
  name: "middleName",
@@ -2804,7 +3059,8 @@ const EKYC_DEFINITIONS = {
2804
3059
  maxLength: 100,
2805
3060
  autofill: "middleName"
2806
3061
  },
2807
- rules: [{ id: "nameCharacters" }]
3062
+ rules: [{ id: "nameCharacters" }],
3063
+ prefill: ["document.middleName"]
2808
3064
  },
2809
3065
  {
2810
3066
  name: "surName",
@@ -2817,7 +3073,8 @@ const EKYC_DEFINITIONS = {
2817
3073
  maxLength: 100,
2818
3074
  autofill: "familyName"
2819
3075
  },
2820
- rules: [{ id: "nameCharacters" }]
3076
+ rules: [{ id: "nameCharacters" }],
3077
+ prefill: ["document.paternalLastName", "poa.lastName"]
2821
3078
  },
2822
3079
  {
2823
3080
  name: "dateOfBirth",
@@ -2825,7 +3082,8 @@ const EKYC_DEFINITIONS = {
2825
3082
  group: "dateOfBirth",
2826
3083
  label: { key: "verification.labels.dateOfBirth" },
2827
3084
  input: { autofill: "birthday" },
2828
- rules: [{ id: "notFuture" }]
3085
+ rules: [{ id: "notFuture" }],
3086
+ prefill: ["document.birthDate"]
2829
3087
  },
2830
3088
  {
2831
3089
  name: "email",
@@ -2838,7 +3096,8 @@ const EKYC_DEFINITIONS = {
2838
3096
  keyboard: "email",
2839
3097
  autofill: "email"
2840
3098
  },
2841
- rules: [{ id: "emailFormat" }]
3099
+ rules: [{ id: "emailFormat" }],
3100
+ prefill: ["emailModule.email"]
2842
3101
  },
2843
3102
  {
2844
3103
  name: "phone",
@@ -2854,7 +3113,8 @@ const EKYC_DEFINITIONS = {
2854
3113
  max: 10
2855
3114
  }
2856
3115
  }],
2857
- payload: { transforms: [{ id: "e164" }] }
3116
+ payload: { transforms: [{ id: "e164" }] },
3117
+ prefill: ["phoneModule.phone"]
2858
3118
  },
2859
3119
  {
2860
3120
  name: "idNum",
@@ -2869,7 +3129,8 @@ const EKYC_DEFINITIONS = {
2869
3129
  rules: [{
2870
3130
  id: "digitCount",
2871
3131
  params: { lengths: [9] }
2872
- }]
3132
+ }],
3133
+ prefill: ["document.documentNumber"]
2873
3134
  },
2874
3135
  {
2875
3136
  name: "gender",
@@ -2893,14 +3154,16 @@ const EKYC_DEFINITIONS = {
2893
3154
  widget: "addressSearch",
2894
3155
  label: { key: "verification.labels.street" },
2895
3156
  input: { autofill: "addressLine1" },
2896
- rules: [{ id: "noPoBox" }]
3157
+ rules: [{ id: "noPoBox" }],
3158
+ prefill: ["document.street", "poa.street"]
2897
3159
  },
2898
3160
  {
2899
3161
  name: "houseNo",
2900
3162
  kind: "text",
2901
3163
  group: "address",
2902
3164
  section: "address",
2903
- label: { key: "verification.labels.houseNo" }
3165
+ label: { key: "verification.labels.houseNo" },
3166
+ prefill: ["document.houseNumber", "poa.houseNumber"]
2904
3167
  },
2905
3168
  {
2906
3169
  name: "city",
@@ -2909,7 +3172,8 @@ const EKYC_DEFINITIONS = {
2909
3172
  section: "address",
2910
3173
  required: true,
2911
3174
  label: { key: "verification.labels.city" },
2912
- input: { autofill: "addressLevel2" }
3175
+ input: { autofill: "addressLevel2" },
3176
+ prefill: ["document.city", "poa.city"]
2913
3177
  },
2914
3178
  {
2915
3179
  name: "state",
@@ -2922,7 +3186,8 @@ const EKYC_DEFINITIONS = {
2922
3186
  params: { states: "" }
2923
3187
  },
2924
3188
  input: { autofill: "addressLevel1" },
2925
- payload: { transforms: [{ id: "uppercase" }] }
3189
+ payload: { transforms: [{ id: "uppercase" }] },
3190
+ prefill: ["document.state", "poa.state"]
2926
3191
  },
2927
3192
  {
2928
3193
  name: "postalCode",
@@ -2942,7 +3207,8 @@ const EKYC_DEFINITIONS = {
2942
3207
  payload: { transforms: [{
2943
3208
  id: "stripSeparators",
2944
3209
  params: { chars: "- " }
2945
- }] }
3210
+ }] },
3211
+ prefill: ["document.postalCode", "poa.postalCode"]
2946
3212
  }
2947
3213
  ],
2948
3214
  submit: {
@@ -2955,7 +3221,7 @@ const EKYC_DEFINITIONS = {
2955
3221
  },
2956
3222
  "ekyc/GT/GT_1": {
2957
3223
  schemaVersion: 1,
2958
- vocabulary: "1.0",
3224
+ vocabulary: "1.2",
2959
3225
  id: "ekyc/GT/GT_1",
2960
3226
  module: "ekyc",
2961
3227
  country: "GT",
@@ -2971,7 +3237,8 @@ const EKYC_DEFINITIONS = {
2971
3237
  maxLength: 100,
2972
3238
  autofill: "givenName"
2973
3239
  },
2974
- rules: [{ id: "nameCharacters" }]
3240
+ rules: [{ id: "nameCharacters" }],
3241
+ prefill: ["document.firstName", "poa.firstName"]
2975
3242
  },
2976
3243
  {
2977
3244
  name: "surName",
@@ -2983,7 +3250,8 @@ const EKYC_DEFINITIONS = {
2983
3250
  maxLength: 100,
2984
3251
  autofill: "familyName"
2985
3252
  },
2986
- rules: [{ id: "nameCharacters" }]
3253
+ rules: [{ id: "nameCharacters" }],
3254
+ prefill: ["document.paternalLastName", "poa.lastName"]
2987
3255
  },
2988
3256
  {
2989
3257
  name: "dateOfBirth",
@@ -2992,7 +3260,8 @@ const EKYC_DEFINITIONS = {
2992
3260
  required: true,
2993
3261
  label: { key: "verification.labels.dateOfBirth" },
2994
3262
  input: { autofill: "birthday" },
2995
- rules: [{ id: "notFuture" }]
3263
+ rules: [{ id: "notFuture" }],
3264
+ prefill: ["document.birthDate"]
2996
3265
  },
2997
3266
  {
2998
3267
  name: "email",
@@ -3005,7 +3274,8 @@ const EKYC_DEFINITIONS = {
3005
3274
  keyboard: "email",
3006
3275
  autofill: "email"
3007
3276
  },
3008
- rules: [{ id: "emailFormat" }]
3277
+ rules: [{ id: "emailFormat" }],
3278
+ prefill: ["emailModule.email"]
3009
3279
  },
3010
3280
  {
3011
3281
  name: "phone",
@@ -3016,7 +3286,8 @@ const EKYC_DEFINITIONS = {
3016
3286
  input: { autofill: "phone" },
3017
3287
  phone: { lockCountry: "whenPhoneRisk" },
3018
3288
  rules: [{ id: "phoneFormat" }],
3019
- payload: { transforms: [{ id: "e164" }] }
3289
+ payload: { transforms: [{ id: "e164" }] },
3290
+ prefill: ["phoneModule.phone"]
3020
3291
  },
3021
3292
  {
3022
3293
  name: "idNum",
@@ -3031,7 +3302,8 @@ const EKYC_DEFINITIONS = {
3031
3302
  rules: [{
3032
3303
  id: "digitCount",
3033
3304
  params: { lengths: [13] }
3034
- }]
3305
+ }],
3306
+ prefill: ["document.documentNumber"]
3035
3307
  }
3036
3308
  ],
3037
3309
  submit: {
@@ -3044,7 +3316,7 @@ const EKYC_DEFINITIONS = {
3044
3316
  },
3045
3317
  "ekyc/IN/IN_DMV": {
3046
3318
  schemaVersion: 1,
3047
- vocabulary: "1.0",
3319
+ vocabulary: "1.2",
3048
3320
  id: "ekyc/IN/IN_DMV",
3049
3321
  module: "ekyc",
3050
3322
  country: "IN",
@@ -3062,7 +3334,8 @@ const EKYC_DEFINITIONS = {
3062
3334
  maxLength: 100,
3063
3335
  autofill: "givenName"
3064
3336
  },
3065
- rules: [{ id: "nameCharacters" }]
3337
+ rules: [{ id: "nameCharacters" }],
3338
+ prefill: ["document.firstName", "poa.firstName"]
3066
3339
  },
3067
3340
  {
3068
3341
  name: "middleName",
@@ -3074,7 +3347,8 @@ const EKYC_DEFINITIONS = {
3074
3347
  maxLength: 100,
3075
3348
  autofill: "middleName"
3076
3349
  },
3077
- rules: [{ id: "nameCharacters" }]
3350
+ rules: [{ id: "nameCharacters" }],
3351
+ prefill: ["document.middleName"]
3078
3352
  },
3079
3353
  {
3080
3354
  name: "surName",
@@ -3087,7 +3361,8 @@ const EKYC_DEFINITIONS = {
3087
3361
  maxLength: 100,
3088
3362
  autofill: "familyName"
3089
3363
  },
3090
- rules: [{ id: "nameCharacters" }]
3364
+ rules: [{ id: "nameCharacters" }],
3365
+ prefill: ["document.paternalLastName", "poa.lastName"]
3091
3366
  },
3092
3367
  {
3093
3368
  name: "dateOfBirth",
@@ -3096,7 +3371,8 @@ const EKYC_DEFINITIONS = {
3096
3371
  required: true,
3097
3372
  label: { key: "verification.labels.dateOfBirth" },
3098
3373
  input: { autofill: "birthday" },
3099
- rules: [{ id: "notFuture" }]
3374
+ rules: [{ id: "notFuture" }],
3375
+ prefill: ["document.birthDate"]
3100
3376
  },
3101
3377
  {
3102
3378
  name: "email",
@@ -3109,7 +3385,8 @@ const EKYC_DEFINITIONS = {
3109
3385
  keyboard: "email",
3110
3386
  autofill: "email"
3111
3387
  },
3112
- rules: [{ id: "emailFormat" }]
3388
+ rules: [{ id: "emailFormat" }],
3389
+ prefill: ["emailModule.email"]
3113
3390
  },
3114
3391
  {
3115
3392
  name: "phone",
@@ -3120,7 +3397,8 @@ const EKYC_DEFINITIONS = {
3120
3397
  input: { autofill: "phone" },
3121
3398
  phone: { lockCountry: "whenPhoneRisk" },
3122
3399
  rules: [{ id: "phoneFormat" }],
3123
- payload: { transforms: [{ id: "e164" }] }
3400
+ payload: { transforms: [{ id: "e164" }] },
3401
+ prefill: ["phoneModule.phone"]
3124
3402
  },
3125
3403
  {
3126
3404
  name: "idNum",
@@ -3129,7 +3407,8 @@ const EKYC_DEFINITIONS = {
3129
3407
  required: true,
3130
3408
  label: { key: "verification.labels.idNum" },
3131
3409
  input: { maxLength: 20 },
3132
- rules: [{ id: "inDrivingLicenseNumber" }]
3410
+ rules: [{ id: "inDrivingLicenseNumber" }],
3411
+ prefill: ["document.documentNumber"]
3133
3412
  },
3134
3413
  {
3135
3414
  name: "street",
@@ -3139,7 +3418,8 @@ const EKYC_DEFINITIONS = {
3139
3418
  widget: "addressSearch",
3140
3419
  label: { key: "verification.labels.street" },
3141
3420
  input: { autofill: "addressLine1" },
3142
- rules: [{ id: "noPoBox" }]
3421
+ rules: [{ id: "noPoBox" }],
3422
+ prefill: ["document.street", "poa.street"]
3143
3423
  },
3144
3424
  {
3145
3425
  name: "houseNo",
@@ -3157,7 +3437,8 @@ const EKYC_DEFINITIONS = {
3157
3437
  ],
3158
3438
  extra: "/-"
3159
3439
  }
3160
- }]
3440
+ }],
3441
+ prefill: ["document.houseNumber", "poa.houseNumber"]
3161
3442
  },
3162
3443
  {
3163
3444
  name: "city",
@@ -3165,7 +3446,8 @@ const EKYC_DEFINITIONS = {
3165
3446
  group: "address",
3166
3447
  section: "address",
3167
3448
  label: { key: "verification.labels.city" },
3168
- input: { autofill: "addressLevel2" }
3449
+ input: { autofill: "addressLevel2" },
3450
+ prefill: ["document.city", "poa.city"]
3169
3451
  },
3170
3452
  {
3171
3453
  name: "state",
@@ -3177,7 +3459,8 @@ const EKYC_DEFINITIONS = {
3177
3459
  placeholder: { key: "verification.placeholder.state" },
3178
3460
  input: { autofill: "addressLevel1" },
3179
3461
  optionsRef: "IN_STATES",
3180
- payload: { transforms: [{ id: "uppercase" }] }
3462
+ payload: { transforms: [{ id: "uppercase" }] },
3463
+ prefill: ["document.state", "poa.state"]
3181
3464
  },
3182
3465
  {
3183
3466
  name: "postalCode",
@@ -3197,7 +3480,8 @@ const EKYC_DEFINITIONS = {
3197
3480
  payload: { transforms: [{
3198
3481
  id: "stripSeparators",
3199
3482
  params: { chars: "- " }
3200
- }] }
3483
+ }] },
3484
+ prefill: ["document.postalCode", "poa.postalCode"]
3201
3485
  }
3202
3486
  ],
3203
3487
  submit: {
@@ -3210,7 +3494,7 @@ const EKYC_DEFINITIONS = {
3210
3494
  },
3211
3495
  "ekyc/IN/INDIA_PAN_1": {
3212
3496
  schemaVersion: 1,
3213
- vocabulary: "1.0",
3497
+ vocabulary: "1.2",
3214
3498
  id: "ekyc/IN/INDIA_PAN_1",
3215
3499
  module: "ekyc",
3216
3500
  country: "IN",
@@ -3227,7 +3511,8 @@ const EKYC_DEFINITIONS = {
3227
3511
  maxLength: 100,
3228
3512
  autofill: "givenName"
3229
3513
  },
3230
- rules: [{ id: "nameCharacters" }]
3514
+ rules: [{ id: "nameCharacters" }],
3515
+ prefill: ["document.firstName", "poa.firstName"]
3231
3516
  },
3232
3517
  {
3233
3518
  name: "surName",
@@ -3240,7 +3525,8 @@ const EKYC_DEFINITIONS = {
3240
3525
  maxLength: 100,
3241
3526
  autofill: "familyName"
3242
3527
  },
3243
- rules: [{ id: "nameCharacters" }]
3528
+ rules: [{ id: "nameCharacters" }],
3529
+ prefill: ["document.paternalLastName", "poa.lastName"]
3244
3530
  },
3245
3531
  {
3246
3532
  name: "dateOfBirth",
@@ -3249,7 +3535,8 @@ const EKYC_DEFINITIONS = {
3249
3535
  required: true,
3250
3536
  label: { key: "verification.labels.dateOfBirth" },
3251
3537
  input: { autofill: "birthday" },
3252
- rules: [{ id: "notFuture" }]
3538
+ rules: [{ id: "notFuture" }],
3539
+ prefill: ["document.birthDate"]
3253
3540
  },
3254
3541
  {
3255
3542
  name: "panNumber",
@@ -3266,7 +3553,8 @@ const EKYC_DEFINITIONS = {
3266
3553
  params: { templates: ["AAAAA9999A"] },
3267
3554
  message: { key: "verification.errors.panNumberFormat" }
3268
3555
  }],
3269
- payload: { key: "idNumber" }
3556
+ payload: { key: "idNumber" },
3557
+ prefill: ["document.documentNumber"]
3270
3558
  }
3271
3559
  ],
3272
3560
  submit: {
@@ -3279,11 +3567,18 @@ const EKYC_DEFINITIONS = {
3279
3567
  },
3280
3568
  "ekyc/IN/INDIA_PASSPORT_1": {
3281
3569
  schemaVersion: 1,
3282
- vocabulary: "1.0",
3570
+ vocabulary: "1.2",
3283
3571
  id: "ekyc/IN/INDIA_PASSPORT_1",
3284
3572
  module: "ekyc",
3285
3573
  country: "IN",
3286
3574
  source: "INDIA_PASSPORT_1",
3575
+ groups: [{
3576
+ group: "fileNumber",
3577
+ whenDisabled: "forceShow"
3578
+ }, {
3579
+ group: "issueDate",
3580
+ whenDisabled: "forceShow"
3581
+ }],
3287
3582
  fields: [
3288
3583
  {
3289
3584
  name: "firstName",
@@ -3296,7 +3591,8 @@ const EKYC_DEFINITIONS = {
3296
3591
  maxLength: 100,
3297
3592
  autofill: "givenName"
3298
3593
  },
3299
- rules: [{ id: "nameCharacters" }]
3594
+ rules: [{ id: "nameCharacters" }],
3595
+ prefill: ["document.firstName", "poa.firstName"]
3300
3596
  },
3301
3597
  {
3302
3598
  name: "surName",
@@ -3309,7 +3605,8 @@ const EKYC_DEFINITIONS = {
3309
3605
  maxLength: 100,
3310
3606
  autofill: "familyName"
3311
3607
  },
3312
- rules: [{ id: "nameCharacters" }]
3608
+ rules: [{ id: "nameCharacters" }],
3609
+ prefill: ["document.paternalLastName", "poa.lastName"]
3313
3610
  },
3314
3611
  {
3315
3612
  name: "dateOfBirth",
@@ -3318,7 +3615,8 @@ const EKYC_DEFINITIONS = {
3318
3615
  required: true,
3319
3616
  label: { key: "verification.labels.dateOfBirth" },
3320
3617
  input: { autofill: "birthday" },
3321
- rules: [{ id: "notFuture" }]
3618
+ rules: [{ id: "notFuture" }],
3619
+ prefill: ["document.birthDate"]
3322
3620
  },
3323
3621
  {
3324
3622
  name: "idNum",
@@ -3337,20 +3635,22 @@ const EKYC_DEFINITIONS = {
3337
3635
  ignoreCase: true
3338
3636
  },
3339
3637
  message: { key: "verification.errors.passportNumberFormat" }
3340
- }]
3638
+ }],
3639
+ prefill: ["document.documentNumber"]
3341
3640
  },
3342
3641
  {
3343
3642
  name: "issueDate",
3344
3643
  kind: "date",
3345
- group: "idNumber",
3644
+ group: "issueDate",
3346
3645
  label: { key: "verification.labels.issueDate" },
3347
3646
  rules: [{ id: "notFuture" }],
3348
- payload: { key: "dateOfIssue" }
3647
+ payload: { key: "dateOfIssue" },
3648
+ prefill: ["document.issueDate"]
3349
3649
  },
3350
3650
  {
3351
3651
  name: "fileNumber",
3352
3652
  kind: "text",
3353
- group: "idNumber",
3653
+ group: "fileNumber",
3354
3654
  required: true,
3355
3655
  label: { key: "verification.labels.fileNumber" },
3356
3656
  input: {
@@ -3377,7 +3677,7 @@ const EKYC_DEFINITIONS = {
3377
3677
  },
3378
3678
  "ekyc/IT/IT_CIVIL_REG_CREDIT_TELCO": {
3379
3679
  schemaVersion: 1,
3380
- vocabulary: "1.0",
3680
+ vocabulary: "1.2",
3381
3681
  id: "ekyc/IT/IT_CIVIL_REG_CREDIT_TELCO",
3382
3682
  module: "ekyc",
3383
3683
  country: "IT",
@@ -3395,7 +3695,8 @@ const EKYC_DEFINITIONS = {
3395
3695
  maxLength: 100,
3396
3696
  autofill: "givenName"
3397
3697
  },
3398
- rules: [{ id: "nameCharacters" }]
3698
+ rules: [{ id: "nameCharacters" }],
3699
+ prefill: ["document.firstName", "poa.firstName"]
3399
3700
  },
3400
3701
  {
3401
3702
  name: "surName",
@@ -3408,7 +3709,8 @@ const EKYC_DEFINITIONS = {
3408
3709
  maxLength: 100,
3409
3710
  autofill: "familyName"
3410
3711
  },
3411
- rules: [{ id: "nameCharacters" }]
3712
+ rules: [{ id: "nameCharacters" }],
3713
+ prefill: ["document.paternalLastName", "poa.lastName"]
3412
3714
  },
3413
3715
  {
3414
3716
  name: "dateOfBirth",
@@ -3416,7 +3718,8 @@ const EKYC_DEFINITIONS = {
3416
3718
  group: "dateOfBirth",
3417
3719
  label: { key: "verification.labels.dateOfBirth" },
3418
3720
  input: { autofill: "birthday" },
3419
- rules: [{ id: "notFuture" }]
3721
+ rules: [{ id: "notFuture" }],
3722
+ prefill: ["document.birthDate"]
3420
3723
  },
3421
3724
  {
3422
3725
  name: "email",
@@ -3429,7 +3732,8 @@ const EKYC_DEFINITIONS = {
3429
3732
  keyboard: "email",
3430
3733
  autofill: "email"
3431
3734
  },
3432
- rules: [{ id: "emailFormat" }]
3735
+ rules: [{ id: "emailFormat" }],
3736
+ prefill: ["emailModule.email"]
3433
3737
  },
3434
3738
  {
3435
3739
  name: "phone",
@@ -3446,7 +3750,8 @@ const EKYC_DEFINITIONS = {
3446
3750
  max: 10
3447
3751
  }
3448
3752
  }],
3449
- payload: { transforms: [{ id: "e164" }] }
3753
+ payload: { transforms: [{ id: "e164" }] },
3754
+ prefill: ["phoneModule.phone"]
3450
3755
  },
3451
3756
  {
3452
3757
  name: "street",
@@ -3456,7 +3761,8 @@ const EKYC_DEFINITIONS = {
3456
3761
  widget: "addressSearch",
3457
3762
  label: { key: "verification.labels.streetAndHouseNumber" },
3458
3763
  input: { autofill: "addressLine1" },
3459
- rules: [{ id: "noPoBox" }]
3764
+ rules: [{ id: "noPoBox" }],
3765
+ prefill: ["document.street", "poa.street"]
3460
3766
  },
3461
3767
  {
3462
3768
  name: "city",
@@ -3464,7 +3770,8 @@ const EKYC_DEFINITIONS = {
3464
3770
  group: "address",
3465
3771
  section: "address",
3466
3772
  label: { key: "verification.labels.city" },
3467
- input: { autofill: "addressLevel2" }
3773
+ input: { autofill: "addressLevel2" },
3774
+ prefill: ["document.city", "poa.city"]
3468
3775
  },
3469
3776
  {
3470
3777
  name: "postalCode",
@@ -3484,7 +3791,8 @@ const EKYC_DEFINITIONS = {
3484
3791
  payload: { transforms: [{
3485
3792
  id: "stripSeparators",
3486
3793
  params: { chars: "- " }
3487
- }] }
3794
+ }] },
3795
+ prefill: ["document.postalCode", "poa.postalCode"]
3488
3796
  }
3489
3797
  ],
3490
3798
  submit: {
@@ -3497,7 +3805,7 @@ const EKYC_DEFINITIONS = {
3497
3805
  },
3498
3806
  "ekyc/MX/MX_CIVIL_REGISTER_2": {
3499
3807
  schemaVersion: 1,
3500
- vocabulary: "1.1",
3808
+ vocabulary: "1.2",
3501
3809
  id: "ekyc/MX/MX_CIVIL_REGISTER_2",
3502
3810
  module: "ekyc",
3503
3811
  country: "MX",
@@ -3514,7 +3822,8 @@ const EKYC_DEFINITIONS = {
3514
3822
  maxLength: 100,
3515
3823
  autofill: "givenName"
3516
3824
  },
3517
- rules: [{ id: "nameCharacters" }]
3825
+ rules: [{ id: "nameCharacters" }],
3826
+ prefill: ["document.firstName", "poa.firstName"]
3518
3827
  },
3519
3828
  {
3520
3829
  name: "middleName",
@@ -3526,7 +3835,8 @@ const EKYC_DEFINITIONS = {
3526
3835
  maxLength: 100,
3527
3836
  autofill: "middleName"
3528
3837
  },
3529
- rules: [{ id: "nameCharacters" }]
3838
+ rules: [{ id: "nameCharacters" }],
3839
+ prefill: ["document.middleName"]
3530
3840
  },
3531
3841
  {
3532
3842
  name: "surName",
@@ -3539,7 +3849,8 @@ const EKYC_DEFINITIONS = {
3539
3849
  maxLength: 100,
3540
3850
  autofill: "familyName"
3541
3851
  },
3542
- rules: [{ id: "nameCharacters" }]
3852
+ rules: [{ id: "nameCharacters" }],
3853
+ prefill: ["document.paternalLastName", "poa.lastName"]
3543
3854
  },
3544
3855
  {
3545
3856
  name: "dateOfBirth",
@@ -3547,7 +3858,8 @@ const EKYC_DEFINITIONS = {
3547
3858
  group: "dateOfBirth",
3548
3859
  label: { key: "verification.labels.dateOfBirth" },
3549
3860
  input: { autofill: "birthday" },
3550
- rules: [{ id: "notFuture" }]
3861
+ rules: [{ id: "notFuture" }],
3862
+ prefill: ["document.birthDate"]
3551
3863
  },
3552
3864
  {
3553
3865
  name: "email",
@@ -3560,7 +3872,8 @@ const EKYC_DEFINITIONS = {
3560
3872
  keyboard: "email",
3561
3873
  autofill: "email"
3562
3874
  },
3563
- rules: [{ id: "emailFormat" }]
3875
+ rules: [{ id: "emailFormat" }],
3876
+ prefill: ["emailModule.email"]
3564
3877
  },
3565
3878
  {
3566
3879
  name: "phone",
@@ -3571,7 +3884,8 @@ const EKYC_DEFINITIONS = {
3571
3884
  input: { autofill: "phone" },
3572
3885
  phone: { lockCountry: "whenPhoneRisk" },
3573
3886
  rules: [{ id: "phoneFormat" }],
3574
- payload: { transforms: [{ id: "e164" }] }
3887
+ payload: { transforms: [{ id: "e164" }] },
3888
+ prefill: ["phoneModule.phone"]
3575
3889
  },
3576
3890
  {
3577
3891
  name: "idNum",
@@ -3590,7 +3904,8 @@ const EKYC_DEFINITIONS = {
3590
3904
  rules: [{
3591
3905
  id: "curp",
3592
3906
  message: { key: "verification.errors.curp" }
3593
- }]
3907
+ }],
3908
+ prefill: ["document.documentNumber"]
3594
3909
  },
3595
3910
  {
3596
3911
  name: "gender",
@@ -3617,7 +3932,7 @@ const EKYC_DEFINITIONS = {
3617
3932
  },
3618
3933
  "ekyc/NL/NL_CIVIL_REG_CREDIT_TELCO": {
3619
3934
  schemaVersion: 1,
3620
- vocabulary: "1.0",
3935
+ vocabulary: "1.2",
3621
3936
  id: "ekyc/NL/NL_CIVIL_REG_CREDIT_TELCO",
3622
3937
  module: "ekyc",
3623
3938
  country: "NL",
@@ -3635,7 +3950,8 @@ const EKYC_DEFINITIONS = {
3635
3950
  maxLength: 100,
3636
3951
  autofill: "givenName"
3637
3952
  },
3638
- rules: [{ id: "nameCharacters" }]
3953
+ rules: [{ id: "nameCharacters" }],
3954
+ prefill: ["document.firstName", "poa.firstName"]
3639
3955
  },
3640
3956
  {
3641
3957
  name: "surName",
@@ -3648,7 +3964,8 @@ const EKYC_DEFINITIONS = {
3648
3964
  maxLength: 100,
3649
3965
  autofill: "familyName"
3650
3966
  },
3651
- rules: [{ id: "nameCharacters" }]
3967
+ rules: [{ id: "nameCharacters" }],
3968
+ prefill: ["document.paternalLastName", "poa.lastName"]
3652
3969
  },
3653
3970
  {
3654
3971
  name: "dateOfBirth",
@@ -3656,7 +3973,8 @@ const EKYC_DEFINITIONS = {
3656
3973
  group: "dateOfBirth",
3657
3974
  label: { key: "verification.labels.dateOfBirth" },
3658
3975
  input: { autofill: "birthday" },
3659
- rules: [{ id: "notFuture" }]
3976
+ rules: [{ id: "notFuture" }],
3977
+ prefill: ["document.birthDate"]
3660
3978
  },
3661
3979
  {
3662
3980
  name: "email",
@@ -3669,7 +3987,8 @@ const EKYC_DEFINITIONS = {
3669
3987
  keyboard: "email",
3670
3988
  autofill: "email"
3671
3989
  },
3672
- rules: [{ id: "emailFormat" }]
3990
+ rules: [{ id: "emailFormat" }],
3991
+ prefill: ["emailModule.email"]
3673
3992
  },
3674
3993
  {
3675
3994
  name: "phone",
@@ -3686,7 +4005,8 @@ const EKYC_DEFINITIONS = {
3686
4005
  max: 9
3687
4006
  }
3688
4007
  }],
3689
- payload: { transforms: [{ id: "e164" }] }
4008
+ payload: { transforms: [{ id: "e164" }] },
4009
+ prefill: ["phoneModule.phone"]
3690
4010
  },
3691
4011
  {
3692
4012
  name: "street",
@@ -3696,7 +4016,8 @@ const EKYC_DEFINITIONS = {
3696
4016
  widget: "addressSearch",
3697
4017
  label: { key: "verification.labels.streetAndHouseNumber" },
3698
4018
  input: { autofill: "addressLine1" },
3699
- rules: [{ id: "noPoBox" }]
4019
+ rules: [{ id: "noPoBox" }],
4020
+ prefill: ["document.street", "poa.street"]
3700
4021
  },
3701
4022
  {
3702
4023
  name: "city",
@@ -3704,7 +4025,8 @@ const EKYC_DEFINITIONS = {
3704
4025
  group: "address",
3705
4026
  section: "address",
3706
4027
  label: { key: "verification.labels.city" },
3707
- input: { autofill: "addressLevel2" }
4028
+ input: { autofill: "addressLevel2" },
4029
+ prefill: ["document.city", "poa.city"]
3708
4030
  },
3709
4031
  {
3710
4032
  name: "postalCode",
@@ -3720,7 +4042,8 @@ const EKYC_DEFINITIONS = {
3720
4042
  payload: { transforms: [{
3721
4043
  id: "stripSeparators",
3722
4044
  params: { chars: "- " }
3723
- }] }
4045
+ }] },
4046
+ prefill: ["document.postalCode", "poa.postalCode"]
3724
4047
  }
3725
4048
  ],
3726
4049
  submit: {
@@ -3733,7 +4056,7 @@ const EKYC_DEFINITIONS = {
3733
4056
  },
3734
4057
  "ekyc/NL/NL_CONSUMER_POP_REG_TELCO": {
3735
4058
  schemaVersion: 1,
3736
- vocabulary: "1.0",
4059
+ vocabulary: "1.2",
3737
4060
  id: "ekyc/NL/NL_CONSUMER_POP_REG_TELCO",
3738
4061
  module: "ekyc",
3739
4062
  country: "NL",
@@ -3751,7 +4074,8 @@ const EKYC_DEFINITIONS = {
3751
4074
  maxLength: 100,
3752
4075
  autofill: "givenName"
3753
4076
  },
3754
- rules: [{ id: "nameCharacters" }]
4077
+ rules: [{ id: "nameCharacters" }],
4078
+ prefill: ["document.firstName", "poa.firstName"]
3755
4079
  },
3756
4080
  {
3757
4081
  name: "surName",
@@ -3764,7 +4088,8 @@ const EKYC_DEFINITIONS = {
3764
4088
  maxLength: 100,
3765
4089
  autofill: "familyName"
3766
4090
  },
3767
- rules: [{ id: "nameCharacters" }]
4091
+ rules: [{ id: "nameCharacters" }],
4092
+ prefill: ["document.paternalLastName", "poa.lastName"]
3768
4093
  },
3769
4094
  {
3770
4095
  name: "dateOfBirth",
@@ -3772,7 +4097,8 @@ const EKYC_DEFINITIONS = {
3772
4097
  group: "dateOfBirth",
3773
4098
  label: { key: "verification.labels.dateOfBirth" },
3774
4099
  input: { autofill: "birthday" },
3775
- rules: [{ id: "notFuture" }]
4100
+ rules: [{ id: "notFuture" }],
4101
+ prefill: ["document.birthDate"]
3776
4102
  },
3777
4103
  {
3778
4104
  name: "email",
@@ -3784,7 +4110,8 @@ const EKYC_DEFINITIONS = {
3784
4110
  keyboard: "email",
3785
4111
  autofill: "email"
3786
4112
  },
3787
- rules: [{ id: "emailFormat" }]
4113
+ rules: [{ id: "emailFormat" }],
4114
+ prefill: ["emailModule.email"]
3788
4115
  },
3789
4116
  {
3790
4117
  name: "phone",
@@ -3801,7 +4128,8 @@ const EKYC_DEFINITIONS = {
3801
4128
  max: 9
3802
4129
  }
3803
4130
  }],
3804
- payload: { transforms: [{ id: "e164" }] }
4131
+ payload: { transforms: [{ id: "e164" }] },
4132
+ prefill: ["phoneModule.phone"]
3805
4133
  },
3806
4134
  {
3807
4135
  name: "gender",
@@ -3825,14 +4153,16 @@ const EKYC_DEFINITIONS = {
3825
4153
  widget: "addressSearch",
3826
4154
  label: { key: "verification.labels.street" },
3827
4155
  input: { autofill: "addressLine1" },
3828
- rules: [{ id: "noPoBox" }]
4156
+ rules: [{ id: "noPoBox" }],
4157
+ prefill: ["document.street", "poa.street"]
3829
4158
  },
3830
4159
  {
3831
4160
  name: "houseNo",
3832
4161
  kind: "text",
3833
4162
  group: "address",
3834
4163
  section: "address",
3835
- label: { key: "verification.labels.houseNo" }
4164
+ label: { key: "verification.labels.houseNo" },
4165
+ prefill: ["document.houseNumber", "poa.houseNumber"]
3836
4166
  },
3837
4167
  {
3838
4168
  name: "city",
@@ -3840,7 +4170,8 @@ const EKYC_DEFINITIONS = {
3840
4170
  group: "address",
3841
4171
  section: "address",
3842
4172
  label: { key: "verification.labels.city" },
3843
- input: { autofill: "addressLevel2" }
4173
+ input: { autofill: "addressLevel2" },
4174
+ prefill: ["document.city", "poa.city"]
3844
4175
  },
3845
4176
  {
3846
4177
  name: "postalCode",
@@ -3856,7 +4187,8 @@ const EKYC_DEFINITIONS = {
3856
4187
  payload: { transforms: [{
3857
4188
  id: "stripSeparators",
3858
4189
  params: { chars: "- " }
3859
- }] }
4190
+ }] },
4191
+ prefill: ["document.postalCode", "poa.postalCode"]
3860
4192
  }
3861
4193
  ],
3862
4194
  submit: {
@@ -3869,7 +4201,7 @@ const EKYC_DEFINITIONS = {
3869
4201
  },
3870
4202
  "ekyc/NO/NO_CONS_POP_REG": {
3871
4203
  schemaVersion: 1,
3872
- vocabulary: "1.0",
4204
+ vocabulary: "1.2",
3873
4205
  id: "ekyc/NO/NO_CONS_POP_REG",
3874
4206
  module: "ekyc",
3875
4207
  country: "NO",
@@ -3887,7 +4219,8 @@ const EKYC_DEFINITIONS = {
3887
4219
  maxLength: 100,
3888
4220
  autofill: "givenName"
3889
4221
  },
3890
- rules: [{ id: "nameCharacters" }]
4222
+ rules: [{ id: "nameCharacters" }],
4223
+ prefill: ["document.firstName", "poa.firstName"]
3891
4224
  },
3892
4225
  {
3893
4226
  name: "surName",
@@ -3900,7 +4233,8 @@ const EKYC_DEFINITIONS = {
3900
4233
  maxLength: 100,
3901
4234
  autofill: "familyName"
3902
4235
  },
3903
- rules: [{ id: "nameCharacters" }]
4236
+ rules: [{ id: "nameCharacters" }],
4237
+ prefill: ["document.paternalLastName", "poa.lastName"]
3904
4238
  },
3905
4239
  {
3906
4240
  name: "dateOfBirth",
@@ -3909,7 +4243,8 @@ const EKYC_DEFINITIONS = {
3909
4243
  required: true,
3910
4244
  label: { key: "verification.labels.dateOfBirth" },
3911
4245
  input: { autofill: "birthday" },
3912
- rules: [{ id: "notFuture" }]
4246
+ rules: [{ id: "notFuture" }],
4247
+ prefill: ["document.birthDate"]
3913
4248
  },
3914
4249
  {
3915
4250
  name: "email",
@@ -3921,7 +4256,8 @@ const EKYC_DEFINITIONS = {
3921
4256
  keyboard: "email",
3922
4257
  autofill: "email"
3923
4258
  },
3924
- rules: [{ id: "emailFormat" }]
4259
+ rules: [{ id: "emailFormat" }],
4260
+ prefill: ["emailModule.email"]
3925
4261
  },
3926
4262
  {
3927
4263
  name: "phone",
@@ -3937,7 +4273,8 @@ const EKYC_DEFINITIONS = {
3937
4273
  max: 8
3938
4274
  }
3939
4275
  }],
3940
- payload: { transforms: [{ id: "e164" }] }
4276
+ payload: { transforms: [{ id: "e164" }] },
4277
+ prefill: ["phoneModule.phone"]
3941
4278
  },
3942
4279
  {
3943
4280
  name: "gender",
@@ -3961,14 +4298,16 @@ const EKYC_DEFINITIONS = {
3961
4298
  widget: "addressSearch",
3962
4299
  label: { key: "verification.labels.street" },
3963
4300
  input: { autofill: "addressLine1" },
3964
- rules: [{ id: "noPoBox" }]
4301
+ rules: [{ id: "noPoBox" }],
4302
+ prefill: ["document.street", "poa.street"]
3965
4303
  },
3966
4304
  {
3967
4305
  name: "houseNo",
3968
4306
  kind: "text",
3969
4307
  group: "address",
3970
4308
  section: "address",
3971
- label: { key: "verification.labels.houseNo" }
4309
+ label: { key: "verification.labels.houseNo" },
4310
+ prefill: ["document.houseNumber", "poa.houseNumber"]
3972
4311
  },
3973
4312
  {
3974
4313
  name: "city",
@@ -3976,7 +4315,8 @@ const EKYC_DEFINITIONS = {
3976
4315
  group: "address",
3977
4316
  section: "address",
3978
4317
  label: { key: "verification.labels.city" },
3979
- input: { autofill: "addressLevel2" }
4318
+ input: { autofill: "addressLevel2" },
4319
+ prefill: ["document.city", "poa.city"]
3980
4320
  },
3981
4321
  {
3982
4322
  name: "postalCode",
@@ -3992,7 +4332,8 @@ const EKYC_DEFINITIONS = {
3992
4332
  payload: { transforms: [{
3993
4333
  id: "stripSeparators",
3994
4334
  params: { chars: "- " }
3995
- }] }
4335
+ }] },
4336
+ prefill: ["document.postalCode", "poa.postalCode"]
3996
4337
  }
3997
4338
  ],
3998
4339
  submit: {
@@ -4005,7 +4346,7 @@ const EKYC_DEFINITIONS = {
4005
4346
  },
4006
4347
  "ekyc/PE/PE_CIVIL_REGISTER_2": {
4007
4348
  schemaVersion: 1,
4008
- vocabulary: "1.0",
4349
+ vocabulary: "1.2",
4009
4350
  id: "ekyc/PE/PE_CIVIL_REGISTER_2",
4010
4351
  module: "ekyc",
4011
4352
  country: "PE",
@@ -4023,7 +4364,8 @@ const EKYC_DEFINITIONS = {
4023
4364
  maxLength: 100,
4024
4365
  autofill: "givenName"
4025
4366
  },
4026
- rules: [{ id: "nameCharacters" }]
4367
+ rules: [{ id: "nameCharacters" }],
4368
+ prefill: ["document.firstName", "poa.firstName"]
4027
4369
  },
4028
4370
  {
4029
4371
  name: "middleName",
@@ -4035,7 +4377,8 @@ const EKYC_DEFINITIONS = {
4035
4377
  maxLength: 100,
4036
4378
  autofill: "middleName"
4037
4379
  },
4038
- rules: [{ id: "nameCharacters" }]
4380
+ rules: [{ id: "nameCharacters" }],
4381
+ prefill: ["document.middleName"]
4039
4382
  },
4040
4383
  {
4041
4384
  name: "surName",
@@ -4048,7 +4391,8 @@ const EKYC_DEFINITIONS = {
4048
4391
  maxLength: 100,
4049
4392
  autofill: "familyName"
4050
4393
  },
4051
- rules: [{ id: "nameCharacters" }]
4394
+ rules: [{ id: "nameCharacters" }],
4395
+ prefill: ["document.paternalLastName", "poa.lastName"]
4052
4396
  },
4053
4397
  {
4054
4398
  name: "dateOfBirth",
@@ -4056,7 +4400,8 @@ const EKYC_DEFINITIONS = {
4056
4400
  group: "dateOfBirth",
4057
4401
  label: { key: "verification.labels.dateOfBirth" },
4058
4402
  input: { autofill: "birthday" },
4059
- rules: [{ id: "notFuture" }]
4403
+ rules: [{ id: "notFuture" }],
4404
+ prefill: ["document.birthDate"]
4060
4405
  },
4061
4406
  {
4062
4407
  name: "email",
@@ -4069,7 +4414,8 @@ const EKYC_DEFINITIONS = {
4069
4414
  keyboard: "email",
4070
4415
  autofill: "email"
4071
4416
  },
4072
- rules: [{ id: "emailFormat" }]
4417
+ rules: [{ id: "emailFormat" }],
4418
+ prefill: ["emailModule.email"]
4073
4419
  },
4074
4420
  {
4075
4421
  name: "phone",
@@ -4080,7 +4426,8 @@ const EKYC_DEFINITIONS = {
4080
4426
  input: { autofill: "phone" },
4081
4427
  phone: { lockCountry: "whenPhoneRisk" },
4082
4428
  rules: [{ id: "phoneFormat" }],
4083
- payload: { transforms: [{ id: "e164" }] }
4429
+ payload: { transforms: [{ id: "e164" }] },
4430
+ prefill: ["phoneModule.phone"]
4084
4431
  },
4085
4432
  {
4086
4433
  name: "idNum",
@@ -4095,7 +4442,8 @@ const EKYC_DEFINITIONS = {
4095
4442
  rules: [{
4096
4443
  id: "digitCount",
4097
4444
  params: { lengths: [8] }
4098
- }]
4445
+ }],
4446
+ prefill: ["document.documentNumber"]
4099
4447
  },
4100
4448
  {
4101
4449
  name: "gender",
@@ -4119,7 +4467,8 @@ const EKYC_DEFINITIONS = {
4119
4467
  widget: "addressSearch",
4120
4468
  label: { key: "verification.labels.streetAndHouseNumber" },
4121
4469
  input: { autofill: "addressLine1" },
4122
- rules: [{ id: "noPoBox" }]
4470
+ rules: [{ id: "noPoBox" }],
4471
+ prefill: ["document.street", "poa.street"]
4123
4472
  }
4124
4473
  ],
4125
4474
  submit: {
@@ -4132,12 +4481,16 @@ const EKYC_DEFINITIONS = {
4132
4481
  },
4133
4482
  "ekyc/PH/PH_RES_CREDIT": {
4134
4483
  schemaVersion: 1,
4135
- vocabulary: "1.0",
4484
+ vocabulary: "1.2",
4136
4485
  id: "ekyc/PH/PH_RES_CREDIT",
4137
4486
  module: "ekyc",
4138
4487
  country: "PH",
4139
4488
  source: "PH_RES_CREDIT",
4140
4489
  sections: [{ id: "address" }],
4490
+ groups: [{
4491
+ group: "idType",
4492
+ whenDisabled: "forceShow"
4493
+ }],
4141
4494
  fields: [
4142
4495
  {
4143
4496
  name: "firstName",
@@ -4150,7 +4503,8 @@ const EKYC_DEFINITIONS = {
4150
4503
  maxLength: 100,
4151
4504
  autofill: "givenName"
4152
4505
  },
4153
- rules: [{ id: "nameCharacters" }]
4506
+ rules: [{ id: "nameCharacters" }],
4507
+ prefill: ["document.firstName", "poa.firstName"]
4154
4508
  },
4155
4509
  {
4156
4510
  name: "middleName",
@@ -4162,7 +4516,8 @@ const EKYC_DEFINITIONS = {
4162
4516
  maxLength: 100,
4163
4517
  autofill: "middleName"
4164
4518
  },
4165
- rules: [{ id: "nameCharacters" }]
4519
+ rules: [{ id: "nameCharacters" }],
4520
+ prefill: ["document.middleName"]
4166
4521
  },
4167
4522
  {
4168
4523
  name: "surName",
@@ -4175,7 +4530,8 @@ const EKYC_DEFINITIONS = {
4175
4530
  maxLength: 100,
4176
4531
  autofill: "familyName"
4177
4532
  },
4178
- rules: [{ id: "nameCharacters" }]
4533
+ rules: [{ id: "nameCharacters" }],
4534
+ prefill: ["document.paternalLastName", "poa.lastName"]
4179
4535
  },
4180
4536
  {
4181
4537
  name: "dateOfBirth",
@@ -4184,7 +4540,8 @@ const EKYC_DEFINITIONS = {
4184
4540
  required: true,
4185
4541
  label: { key: "verification.labels.dateOfBirth" },
4186
4542
  input: { autofill: "birthday" },
4187
- rules: [{ id: "notFuture" }]
4543
+ rules: [{ id: "notFuture" }],
4544
+ prefill: ["document.birthDate"]
4188
4545
  },
4189
4546
  {
4190
4547
  name: "email",
@@ -4197,7 +4554,8 @@ const EKYC_DEFINITIONS = {
4197
4554
  keyboard: "email",
4198
4555
  autofill: "email"
4199
4556
  },
4200
- rules: [{ id: "emailFormat" }]
4557
+ rules: [{ id: "emailFormat" }],
4558
+ prefill: ["emailModule.email"]
4201
4559
  },
4202
4560
  {
4203
4561
  name: "phone",
@@ -4208,12 +4566,13 @@ const EKYC_DEFINITIONS = {
4208
4566
  input: { autofill: "phone" },
4209
4567
  phone: { lockCountry: "whenPhoneRisk" },
4210
4568
  rules: [{ id: "phoneFormat" }],
4211
- payload: { transforms: [{ id: "e164" }] }
4569
+ payload: { transforms: [{ id: "e164" }] },
4570
+ prefill: ["phoneModule.phone"]
4212
4571
  },
4213
4572
  {
4214
4573
  name: "idType",
4215
4574
  kind: "choice",
4216
- group: "idNumber",
4575
+ group: "idType",
4217
4576
  requiredWhen: [{ fieldFilled: "idNum" }],
4218
4577
  widget: "select",
4219
4578
  label: { key: "verification.labels.idType" },
@@ -4232,7 +4591,8 @@ const EKYC_DEFINITIONS = {
4232
4591
  classes: ["digit"],
4233
4592
  extra: "-"
4234
4593
  }
4235
- }]
4594
+ }],
4595
+ prefill: ["document.documentNumber"]
4236
4596
  },
4237
4597
  {
4238
4598
  name: "street",
@@ -4242,7 +4602,8 @@ const EKYC_DEFINITIONS = {
4242
4602
  widget: "addressSearch",
4243
4603
  label: { key: "verification.labels.streetAndHouseNumber" },
4244
4604
  input: { autofill: "addressLine1" },
4245
- rules: [{ id: "noPoBox" }]
4605
+ rules: [{ id: "noPoBox" }],
4606
+ prefill: ["document.street", "poa.street"]
4246
4607
  },
4247
4608
  {
4248
4609
  name: "district",
@@ -4257,7 +4618,8 @@ const EKYC_DEFINITIONS = {
4257
4618
  group: "address",
4258
4619
  section: "address",
4259
4620
  label: { key: "verification.labels.city" },
4260
- input: { autofill: "addressLevel2" }
4621
+ input: { autofill: "addressLevel2" },
4622
+ prefill: ["document.city", "poa.city"]
4261
4623
  },
4262
4624
  {
4263
4625
  name: "state",
@@ -4270,7 +4632,8 @@ const EKYC_DEFINITIONS = {
4270
4632
  params: { states: "" }
4271
4633
  },
4272
4634
  input: { autofill: "addressLevel1" },
4273
- payload: { transforms: [{ id: "uppercase" }] }
4635
+ payload: { transforms: [{ id: "uppercase" }] },
4636
+ prefill: ["document.state", "poa.state"]
4274
4637
  },
4275
4638
  {
4276
4639
  name: "postalCode",
@@ -4290,7 +4653,8 @@ const EKYC_DEFINITIONS = {
4290
4653
  payload: { transforms: [{
4291
4654
  id: "stripSeparators",
4292
4655
  params: { chars: "- " }
4293
- }] }
4656
+ }] },
4657
+ prefill: ["document.postalCode", "poa.postalCode"]
4294
4658
  }
4295
4659
  ],
4296
4660
  groupRules: [{
@@ -4330,7 +4694,7 @@ const EKYC_DEFINITIONS = {
4330
4694
  },
4331
4695
  "ekyc/PT/PT_CIVIL_REG_CREDIT_TELCO": {
4332
4696
  schemaVersion: 1,
4333
- vocabulary: "1.0",
4697
+ vocabulary: "1.2",
4334
4698
  id: "ekyc/PT/PT_CIVIL_REG_CREDIT_TELCO",
4335
4699
  module: "ekyc",
4336
4700
  country: "PT",
@@ -4348,7 +4712,8 @@ const EKYC_DEFINITIONS = {
4348
4712
  maxLength: 100,
4349
4713
  autofill: "givenName"
4350
4714
  },
4351
- rules: [{ id: "nameCharacters" }]
4715
+ rules: [{ id: "nameCharacters" }],
4716
+ prefill: ["document.firstName", "poa.firstName"]
4352
4717
  },
4353
4718
  {
4354
4719
  name: "surName",
@@ -4361,7 +4726,8 @@ const EKYC_DEFINITIONS = {
4361
4726
  maxLength: 100,
4362
4727
  autofill: "familyName"
4363
4728
  },
4364
- rules: [{ id: "nameCharacters" }]
4729
+ rules: [{ id: "nameCharacters" }],
4730
+ prefill: ["document.paternalLastName", "poa.lastName"]
4365
4731
  },
4366
4732
  {
4367
4733
  name: "dateOfBirth",
@@ -4369,7 +4735,8 @@ const EKYC_DEFINITIONS = {
4369
4735
  group: "dateOfBirth",
4370
4736
  label: { key: "verification.labels.dateOfBirth" },
4371
4737
  input: { autofill: "birthday" },
4372
- rules: [{ id: "notFuture" }]
4738
+ rules: [{ id: "notFuture" }],
4739
+ prefill: ["document.birthDate"]
4373
4740
  },
4374
4741
  {
4375
4742
  name: "email",
@@ -4382,7 +4749,8 @@ const EKYC_DEFINITIONS = {
4382
4749
  keyboard: "email",
4383
4750
  autofill: "email"
4384
4751
  },
4385
- rules: [{ id: "emailFormat" }]
4752
+ rules: [{ id: "emailFormat" }],
4753
+ prefill: ["emailModule.email"]
4386
4754
  },
4387
4755
  {
4388
4756
  name: "phone",
@@ -4399,7 +4767,8 @@ const EKYC_DEFINITIONS = {
4399
4767
  max: 9
4400
4768
  }
4401
4769
  }],
4402
- payload: { transforms: [{ id: "e164" }] }
4770
+ payload: { transforms: [{ id: "e164" }] },
4771
+ prefill: ["phoneModule.phone"]
4403
4772
  },
4404
4773
  {
4405
4774
  name: "street",
@@ -4409,7 +4778,8 @@ const EKYC_DEFINITIONS = {
4409
4778
  widget: "addressSearch",
4410
4779
  label: { key: "verification.labels.streetAndHouseNumber" },
4411
4780
  input: { autofill: "addressLine1" },
4412
- rules: [{ id: "noPoBox" }]
4781
+ rules: [{ id: "noPoBox" }],
4782
+ prefill: ["document.street", "poa.street"]
4413
4783
  },
4414
4784
  {
4415
4785
  name: "city",
@@ -4417,7 +4787,8 @@ const EKYC_DEFINITIONS = {
4417
4787
  group: "address",
4418
4788
  section: "address",
4419
4789
  label: { key: "verification.labels.city" },
4420
- input: { autofill: "addressLevel2" }
4790
+ input: { autofill: "addressLevel2" },
4791
+ prefill: ["document.city", "poa.city"]
4421
4792
  },
4422
4793
  {
4423
4794
  name: "postalCode",
@@ -4434,7 +4805,8 @@ const EKYC_DEFINITIONS = {
4434
4805
  payload: { transforms: [{
4435
4806
  id: "stripSeparators",
4436
4807
  params: { chars: "- " }
4437
- }] }
4808
+ }] },
4809
+ prefill: ["document.postalCode", "poa.postalCode"]
4438
4810
  }
4439
4811
  ],
4440
4812
  submit: {
@@ -4447,7 +4819,7 @@ const EKYC_DEFINITIONS = {
4447
4819
  },
4448
4820
  "ekyc/SG/SG_PHONE_REGISTER": {
4449
4821
  schemaVersion: 1,
4450
- vocabulary: "1.0",
4822
+ vocabulary: "1.2",
4451
4823
  id: "ekyc/SG/SG_PHONE_REGISTER",
4452
4824
  module: "ekyc",
4453
4825
  country: "SG",
@@ -4465,7 +4837,8 @@ const EKYC_DEFINITIONS = {
4465
4837
  maxLength: 100,
4466
4838
  autofill: "givenName"
4467
4839
  },
4468
- rules: [{ id: "nameCharacters" }]
4840
+ rules: [{ id: "nameCharacters" }],
4841
+ prefill: ["document.firstName", "poa.firstName"]
4469
4842
  },
4470
4843
  {
4471
4844
  name: "middleName",
@@ -4477,7 +4850,8 @@ const EKYC_DEFINITIONS = {
4477
4850
  maxLength: 100,
4478
4851
  autofill: "middleName"
4479
4852
  },
4480
- rules: [{ id: "nameCharacters" }]
4853
+ rules: [{ id: "nameCharacters" }],
4854
+ prefill: ["document.middleName"]
4481
4855
  },
4482
4856
  {
4483
4857
  name: "surName",
@@ -4490,7 +4864,8 @@ const EKYC_DEFINITIONS = {
4490
4864
  maxLength: 100,
4491
4865
  autofill: "familyName"
4492
4866
  },
4493
- rules: [{ id: "nameCharacters" }]
4867
+ rules: [{ id: "nameCharacters" }],
4868
+ prefill: ["document.paternalLastName", "poa.lastName"]
4494
4869
  },
4495
4870
  {
4496
4871
  name: "dateOfBirth",
@@ -4498,7 +4873,8 @@ const EKYC_DEFINITIONS = {
4498
4873
  group: "dateOfBirth",
4499
4874
  label: { key: "verification.labels.dateOfBirth" },
4500
4875
  input: { autofill: "birthday" },
4501
- rules: [{ id: "notFuture" }]
4876
+ rules: [{ id: "notFuture" }],
4877
+ prefill: ["document.birthDate"]
4502
4878
  },
4503
4879
  {
4504
4880
  name: "email",
@@ -4510,7 +4886,8 @@ const EKYC_DEFINITIONS = {
4510
4886
  keyboard: "email",
4511
4887
  autofill: "email"
4512
4888
  },
4513
- rules: [{ id: "emailFormat" }]
4889
+ rules: [{ id: "emailFormat" }],
4890
+ prefill: ["emailModule.email"]
4514
4891
  },
4515
4892
  {
4516
4893
  name: "phone",
@@ -4527,7 +4904,8 @@ const EKYC_DEFINITIONS = {
4527
4904
  max: 8
4528
4905
  }
4529
4906
  }],
4530
- payload: { transforms: [{ id: "e164NoPlus" }] }
4907
+ payload: { transforms: [{ id: "e164NoPlus" }] },
4908
+ prefill: ["phoneModule.phone"]
4531
4909
  },
4532
4910
  {
4533
4911
  name: "gender",
@@ -4551,14 +4929,16 @@ const EKYC_DEFINITIONS = {
4551
4929
  widget: "addressSearch",
4552
4930
  label: { key: "verification.labels.street" },
4553
4931
  input: { autofill: "addressLine1" },
4554
- rules: [{ id: "noPoBox" }]
4932
+ rules: [{ id: "noPoBox" }],
4933
+ prefill: ["document.street", "poa.street"]
4555
4934
  },
4556
4935
  {
4557
4936
  name: "houseNo",
4558
4937
  kind: "text",
4559
4938
  group: "address",
4560
4939
  section: "address",
4561
- label: { key: "verification.labels.houseNo" }
4940
+ label: { key: "verification.labels.houseNo" },
4941
+ prefill: ["document.houseNumber", "poa.houseNumber"]
4562
4942
  },
4563
4943
  {
4564
4944
  name: "city",
@@ -4566,7 +4946,8 @@ const EKYC_DEFINITIONS = {
4566
4946
  group: "address",
4567
4947
  section: "address",
4568
4948
  label: { key: "verification.labels.city" },
4569
- input: { autofill: "addressLevel2" }
4949
+ input: { autofill: "addressLevel2" },
4950
+ prefill: ["document.city", "poa.city"]
4570
4951
  },
4571
4952
  {
4572
4953
  name: "postalCode",
@@ -4582,7 +4963,8 @@ const EKYC_DEFINITIONS = {
4582
4963
  payload: { transforms: [{
4583
4964
  id: "stripSeparators",
4584
4965
  params: { chars: "- " }
4585
- }] }
4966
+ }] },
4967
+ prefill: ["document.postalCode", "poa.postalCode"]
4586
4968
  }
4587
4969
  ],
4588
4970
  submit: {
@@ -4595,7 +4977,7 @@ const EKYC_DEFINITIONS = {
4595
4977
  },
4596
4978
  "ekyc/US/US_CREDIT_BUREAU_1": {
4597
4979
  schemaVersion: 1,
4598
- vocabulary: "1.0",
4980
+ vocabulary: "1.2",
4599
4981
  id: "ekyc/US/US_CREDIT_BUREAU_1",
4600
4982
  module: "ekyc",
4601
4983
  country: "US",
@@ -4613,7 +4995,8 @@ const EKYC_DEFINITIONS = {
4613
4995
  maxLength: 100,
4614
4996
  autofill: "givenName"
4615
4997
  },
4616
- rules: [{ id: "nameCharacters" }]
4998
+ rules: [{ id: "nameCharacters" }],
4999
+ prefill: ["document.firstName", "poa.firstName"]
4617
5000
  },
4618
5001
  {
4619
5002
  name: "middleName",
@@ -4625,7 +5008,8 @@ const EKYC_DEFINITIONS = {
4625
5008
  maxLength: 100,
4626
5009
  autofill: "middleName"
4627
5010
  },
4628
- rules: [{ id: "nameCharacters" }]
5011
+ rules: [{ id: "nameCharacters" }],
5012
+ prefill: ["document.middleName"]
4629
5013
  },
4630
5014
  {
4631
5015
  name: "surName",
@@ -4638,7 +5022,8 @@ const EKYC_DEFINITIONS = {
4638
5022
  maxLength: 100,
4639
5023
  autofill: "familyName"
4640
5024
  },
4641
- rules: [{ id: "nameCharacters" }]
5025
+ rules: [{ id: "nameCharacters" }],
5026
+ prefill: ["document.paternalLastName", "poa.lastName"]
4642
5027
  },
4643
5028
  {
4644
5029
  name: "dateOfBirth",
@@ -4646,7 +5031,8 @@ const EKYC_DEFINITIONS = {
4646
5031
  group: "dateOfBirth",
4647
5032
  label: { key: "verification.labels.dateOfBirth" },
4648
5033
  input: { autofill: "birthday" },
4649
- rules: [{ id: "notFuture" }]
5034
+ rules: [{ id: "notFuture" }],
5035
+ prefill: ["document.birthDate"]
4650
5036
  },
4651
5037
  {
4652
5038
  name: "email",
@@ -4658,7 +5044,8 @@ const EKYC_DEFINITIONS = {
4658
5044
  keyboard: "email",
4659
5045
  autofill: "email"
4660
5046
  },
4661
- rules: [{ id: "emailFormat" }]
5047
+ rules: [{ id: "emailFormat" }],
5048
+ prefill: ["emailModule.email"]
4662
5049
  },
4663
5050
  {
4664
5051
  name: "phone",
@@ -4674,7 +5061,8 @@ const EKYC_DEFINITIONS = {
4674
5061
  max: 10
4675
5062
  }
4676
5063
  }],
4677
- payload: { transforms: [{ id: "e164" }] }
5064
+ payload: { transforms: [{ id: "e164" }] },
5065
+ prefill: ["phoneModule.phone"]
4678
5066
  },
4679
5067
  {
4680
5068
  name: "ssn",
@@ -4702,7 +5090,8 @@ const EKYC_DEFINITIONS = {
4702
5090
  widget: "addressSearch",
4703
5091
  label: { key: "verification.labels.street" },
4704
5092
  input: { autofill: "addressLine1" },
4705
- rules: [{ id: "noPoBox" }]
5093
+ rules: [{ id: "noPoBox" }],
5094
+ prefill: ["document.street", "poa.street"]
4706
5095
  },
4707
5096
  {
4708
5097
  name: "city",
@@ -4711,7 +5100,8 @@ const EKYC_DEFINITIONS = {
4711
5100
  section: "address",
4712
5101
  required: true,
4713
5102
  label: { key: "verification.labels.city" },
4714
- input: { autofill: "addressLevel2" }
5103
+ input: { autofill: "addressLevel2" },
5104
+ prefill: ["document.city", "poa.city"]
4715
5105
  },
4716
5106
  {
4717
5107
  name: "state",
@@ -4724,7 +5114,8 @@ const EKYC_DEFINITIONS = {
4724
5114
  placeholder: { key: "verification.placeholder.state" },
4725
5115
  input: { autofill: "addressLevel1" },
4726
5116
  optionsRef: "US_STATES",
4727
- payload: { transforms: [{ id: "uppercase" }] }
5117
+ payload: { transforms: [{ id: "uppercase" }] },
5118
+ prefill: ["document.state", "poa.state"]
4728
5119
  },
4729
5120
  {
4730
5121
  name: "postalCode",
@@ -4741,7 +5132,8 @@ const EKYC_DEFINITIONS = {
4741
5132
  payload: { transforms: [{
4742
5133
  id: "stripSeparators",
4743
5134
  params: { chars: "- " }
4744
- }] }
5135
+ }] },
5136
+ prefill: ["document.postalCode", "poa.postalCode"]
4745
5137
  }
4746
5138
  ],
4747
5139
  submit: {
@@ -4754,7 +5146,7 @@ const EKYC_DEFINITIONS = {
4754
5146
  },
4755
5147
  "ekyc/US/US_CREDIT_BUREAU_3": {
4756
5148
  schemaVersion: 1,
4757
- vocabulary: "1.0",
5149
+ vocabulary: "1.2",
4758
5150
  id: "ekyc/US/US_CREDIT_BUREAU_3",
4759
5151
  module: "ekyc",
4760
5152
  country: "US",
@@ -4772,7 +5164,8 @@ const EKYC_DEFINITIONS = {
4772
5164
  maxLength: 100,
4773
5165
  autofill: "givenName"
4774
5166
  },
4775
- rules: [{ id: "nameCharacters" }]
5167
+ rules: [{ id: "nameCharacters" }],
5168
+ prefill: ["document.firstName", "poa.firstName"]
4776
5169
  },
4777
5170
  {
4778
5171
  name: "middleName",
@@ -4784,7 +5177,8 @@ const EKYC_DEFINITIONS = {
4784
5177
  maxLength: 100,
4785
5178
  autofill: "middleName"
4786
5179
  },
4787
- rules: [{ id: "nameCharacters" }]
5180
+ rules: [{ id: "nameCharacters" }],
5181
+ prefill: ["document.middleName"]
4788
5182
  },
4789
5183
  {
4790
5184
  name: "surName",
@@ -4797,7 +5191,8 @@ const EKYC_DEFINITIONS = {
4797
5191
  maxLength: 100,
4798
5192
  autofill: "familyName"
4799
5193
  },
4800
- rules: [{ id: "nameCharacters" }]
5194
+ rules: [{ id: "nameCharacters" }],
5195
+ prefill: ["document.paternalLastName", "poa.lastName"]
4801
5196
  },
4802
5197
  {
4803
5198
  name: "dateOfBirth",
@@ -4805,7 +5200,8 @@ const EKYC_DEFINITIONS = {
4805
5200
  group: "dateOfBirth",
4806
5201
  label: { key: "verification.labels.dateOfBirth" },
4807
5202
  input: { autofill: "birthday" },
4808
- rules: [{ id: "notFuture" }]
5203
+ rules: [{ id: "notFuture" }],
5204
+ prefill: ["document.birthDate"]
4809
5205
  },
4810
5206
  {
4811
5207
  name: "email",
@@ -4817,7 +5213,8 @@ const EKYC_DEFINITIONS = {
4817
5213
  keyboard: "email",
4818
5214
  autofill: "email"
4819
5215
  },
4820
- rules: [{ id: "emailFormat" }]
5216
+ rules: [{ id: "emailFormat" }],
5217
+ prefill: ["emailModule.email"]
4821
5218
  },
4822
5219
  {
4823
5220
  name: "phone",
@@ -4833,7 +5230,8 @@ const EKYC_DEFINITIONS = {
4833
5230
  max: 10
4834
5231
  }
4835
5232
  }],
4836
- payload: { transforms: [{ id: "nationalNumber" }] }
5233
+ payload: { transforms: [{ id: "nationalNumber" }] },
5234
+ prefill: ["phoneModule.phone"]
4837
5235
  },
4838
5236
  {
4839
5237
  name: "ssn",
@@ -4859,14 +5257,16 @@ const EKYC_DEFINITIONS = {
4859
5257
  widget: "addressSearch",
4860
5258
  label: { key: "verification.labels.street" },
4861
5259
  input: { autofill: "addressLine1" },
4862
- rules: [{ id: "noPoBox" }]
5260
+ rules: [{ id: "noPoBox" }],
5261
+ prefill: ["document.street", "poa.street"]
4863
5262
  },
4864
5263
  {
4865
5264
  name: "houseNo",
4866
5265
  kind: "text",
4867
5266
  group: "address",
4868
5267
  section: "address",
4869
- label: { key: "verification.labels.houseNo" }
5268
+ label: { key: "verification.labels.houseNo" },
5269
+ prefill: ["document.houseNumber", "poa.houseNumber"]
4870
5270
  },
4871
5271
  {
4872
5272
  name: "city",
@@ -4874,7 +5274,8 @@ const EKYC_DEFINITIONS = {
4874
5274
  group: "address",
4875
5275
  section: "address",
4876
5276
  label: { key: "verification.labels.city" },
4877
- input: { autofill: "addressLevel2" }
5277
+ input: { autofill: "addressLevel2" },
5278
+ prefill: ["document.city", "poa.city"]
4878
5279
  },
4879
5280
  {
4880
5281
  name: "state",
@@ -4886,7 +5287,8 @@ const EKYC_DEFINITIONS = {
4886
5287
  placeholder: { key: "verification.placeholder.state" },
4887
5288
  input: { autofill: "addressLevel1" },
4888
5289
  optionsRef: "US_STATES",
4889
- payload: { transforms: [{ id: "uppercase" }] }
5290
+ payload: { transforms: [{ id: "uppercase" }] },
5291
+ prefill: ["document.state", "poa.state"]
4890
5292
  },
4891
5293
  {
4892
5294
  name: "postalCode",
@@ -4902,7 +5304,8 @@ const EKYC_DEFINITIONS = {
4902
5304
  payload: { transforms: [{
4903
5305
  id: "stripSeparators",
4904
5306
  params: { chars: "- " }
4905
- }] }
5307
+ }] },
5308
+ prefill: ["document.postalCode", "poa.postalCode"]
4906
5309
  }
4907
5310
  ],
4908
5311
  groupRules: [{
@@ -4923,7 +5326,7 @@ const EKYC_DEFINITIONS = {
4923
5326
  },
4924
5327
  "ekyc/US/US_CREDIT_TELCO": {
4925
5328
  schemaVersion: 1,
4926
- vocabulary: "1.0",
5329
+ vocabulary: "1.2",
4927
5330
  id: "ekyc/US/US_CREDIT_TELCO",
4928
5331
  module: "ekyc",
4929
5332
  country: "US",
@@ -4945,7 +5348,8 @@ const EKYC_DEFINITIONS = {
4945
5348
  maxLength: 100,
4946
5349
  autofill: "givenName"
4947
5350
  },
4948
- rules: [{ id: "nameCharacters" }]
5351
+ rules: [{ id: "nameCharacters" }],
5352
+ prefill: ["document.firstName", "poa.firstName"]
4949
5353
  },
4950
5354
  {
4951
5355
  name: "surName",
@@ -4958,7 +5362,8 @@ const EKYC_DEFINITIONS = {
4958
5362
  maxLength: 100,
4959
5363
  autofill: "familyName"
4960
5364
  },
4961
- rules: [{ id: "nameCharacters" }]
5365
+ rules: [{ id: "nameCharacters" }],
5366
+ prefill: ["document.paternalLastName", "poa.lastName"]
4962
5367
  },
4963
5368
  {
4964
5369
  name: "dateOfBirth",
@@ -4966,7 +5371,8 @@ const EKYC_DEFINITIONS = {
4966
5371
  group: "dateOfBirth",
4967
5372
  label: { key: "verification.labels.dateOfBirth" },
4968
5373
  input: { autofill: "birthday" },
4969
- rules: [{ id: "notFuture" }]
5374
+ rules: [{ id: "notFuture" }],
5375
+ prefill: ["document.birthDate"]
4970
5376
  },
4971
5377
  {
4972
5378
  name: "email",
@@ -4979,7 +5385,8 @@ const EKYC_DEFINITIONS = {
4979
5385
  keyboard: "email",
4980
5386
  autofill: "email"
4981
5387
  },
4982
- rules: [{ id: "emailFormat" }]
5388
+ rules: [{ id: "emailFormat" }],
5389
+ prefill: ["emailModule.email"]
4983
5390
  },
4984
5391
  {
4985
5392
  name: "phone",
@@ -4995,7 +5402,8 @@ const EKYC_DEFINITIONS = {
4995
5402
  max: 10
4996
5403
  }
4997
5404
  }],
4998
- payload: { transforms: [{ id: "e164" }] }
5405
+ payload: { transforms: [{ id: "e164" }] },
5406
+ prefill: ["phoneModule.phone"]
4999
5407
  },
5000
5408
  {
5001
5409
  name: "ssn",
@@ -5021,7 +5429,8 @@ const EKYC_DEFINITIONS = {
5021
5429
  widget: "addressSearch",
5022
5430
  label: { key: "verification.labels.street" },
5023
5431
  input: { autofill: "addressLine1" },
5024
- rules: [{ id: "noPoBox" }]
5432
+ rules: [{ id: "noPoBox" }],
5433
+ prefill: ["document.street", "poa.street"]
5025
5434
  },
5026
5435
  {
5027
5436
  name: "apartment",
@@ -5038,7 +5447,8 @@ const EKYC_DEFINITIONS = {
5038
5447
  group: "address",
5039
5448
  section: "address",
5040
5449
  label: { key: "verification.labels.city" },
5041
- input: { autofill: "addressLevel2" }
5450
+ input: { autofill: "addressLevel2" },
5451
+ prefill: ["document.city", "poa.city"]
5042
5452
  },
5043
5453
  {
5044
5454
  name: "state",
@@ -5050,7 +5460,8 @@ const EKYC_DEFINITIONS = {
5050
5460
  placeholder: { key: "verification.placeholder.state" },
5051
5461
  input: { autofill: "addressLevel1" },
5052
5462
  optionsRef: "US_STATES",
5053
- payload: { transforms: [{ id: "uppercase" }] }
5463
+ payload: { transforms: [{ id: "uppercase" }] },
5464
+ prefill: ["document.state", "poa.state"]
5054
5465
  },
5055
5466
  {
5056
5467
  name: "postalCode",
@@ -5066,7 +5477,8 @@ const EKYC_DEFINITIONS = {
5066
5477
  payload: { transforms: [{
5067
5478
  id: "stripSeparators",
5068
5479
  params: { chars: "- " }
5069
- }] }
5480
+ }] },
5481
+ prefill: ["document.postalCode", "poa.postalCode"]
5070
5482
  }
5071
5483
  ],
5072
5484
  groupRules: [{
@@ -5084,7 +5496,7 @@ const EKYC_DEFINITIONS = {
5084
5496
  },
5085
5497
  "ekyc/US/US_TELCO_1": {
5086
5498
  schemaVersion: 1,
5087
- vocabulary: "1.0",
5499
+ vocabulary: "1.2",
5088
5500
  id: "ekyc/US/US_TELCO_1",
5089
5501
  module: "ekyc",
5090
5502
  country: "US",
@@ -5102,7 +5514,8 @@ const EKYC_DEFINITIONS = {
5102
5514
  maxLength: 100,
5103
5515
  autofill: "givenName"
5104
5516
  },
5105
- rules: [{ id: "nameCharacters" }]
5517
+ rules: [{ id: "nameCharacters" }],
5518
+ prefill: ["document.firstName", "poa.firstName"]
5106
5519
  },
5107
5520
  {
5108
5521
  name: "surName",
@@ -5115,7 +5528,8 @@ const EKYC_DEFINITIONS = {
5115
5528
  maxLength: 100,
5116
5529
  autofill: "familyName"
5117
5530
  },
5118
- rules: [{ id: "nameCharacters" }]
5531
+ rules: [{ id: "nameCharacters" }],
5532
+ prefill: ["document.paternalLastName", "poa.lastName"]
5119
5533
  },
5120
5534
  {
5121
5535
  name: "dateOfBirth",
@@ -5123,7 +5537,8 @@ const EKYC_DEFINITIONS = {
5123
5537
  group: "dateOfBirth",
5124
5538
  label: { key: "verification.labels.dateOfBirth" },
5125
5539
  input: { autofill: "birthday" },
5126
- rules: [{ id: "notFuture" }]
5540
+ rules: [{ id: "notFuture" }],
5541
+ prefill: ["document.birthDate"]
5127
5542
  },
5128
5543
  {
5129
5544
  name: "email",
@@ -5135,7 +5550,8 @@ const EKYC_DEFINITIONS = {
5135
5550
  keyboard: "email",
5136
5551
  autofill: "email"
5137
5552
  },
5138
- rules: [{ id: "emailFormat" }]
5553
+ rules: [{ id: "emailFormat" }],
5554
+ prefill: ["emailModule.email"]
5139
5555
  },
5140
5556
  {
5141
5557
  name: "phone",
@@ -5152,7 +5568,8 @@ const EKYC_DEFINITIONS = {
5152
5568
  max: 10
5153
5569
  }
5154
5570
  }],
5155
- payload: { transforms: [{ id: "e164" }] }
5571
+ payload: { transforms: [{ id: "e164" }] },
5572
+ prefill: ["phoneModule.phone"]
5156
5573
  },
5157
5574
  {
5158
5575
  name: "last4SSN",
@@ -5176,7 +5593,8 @@ const EKYC_DEFINITIONS = {
5176
5593
  widget: "addressSearch",
5177
5594
  label: { key: "verification.labels.street" },
5178
5595
  input: { autofill: "addressLine1" },
5179
- rules: [{ id: "noPoBox" }]
5596
+ rules: [{ id: "noPoBox" }],
5597
+ prefill: ["document.street", "poa.street"]
5180
5598
  },
5181
5599
  {
5182
5600
  name: "city",
@@ -5184,7 +5602,8 @@ const EKYC_DEFINITIONS = {
5184
5602
  group: "address",
5185
5603
  section: "address",
5186
5604
  label: { key: "verification.labels.city" },
5187
- input: { autofill: "addressLevel2" }
5605
+ input: { autofill: "addressLevel2" },
5606
+ prefill: ["document.city", "poa.city"]
5188
5607
  },
5189
5608
  {
5190
5609
  name: "state",
@@ -5196,7 +5615,8 @@ const EKYC_DEFINITIONS = {
5196
5615
  placeholder: { key: "verification.placeholder.state" },
5197
5616
  input: { autofill: "addressLevel1" },
5198
5617
  optionsRef: "US_STATES",
5199
- payload: { transforms: [{ id: "uppercase" }] }
5618
+ payload: { transforms: [{ id: "uppercase" }] },
5619
+ prefill: ["document.state", "poa.state"]
5200
5620
  },
5201
5621
  {
5202
5622
  name: "postalCode",
@@ -5212,14 +5632,16 @@ const EKYC_DEFINITIONS = {
5212
5632
  payload: { transforms: [{
5213
5633
  id: "stripSeparators",
5214
5634
  params: { chars: "- " }
5215
- }] }
5635
+ }] },
5636
+ prefill: ["document.postalCode", "poa.postalCode"]
5216
5637
  },
5217
5638
  {
5218
5639
  name: "dlNumber",
5219
5640
  kind: "text",
5220
5641
  group: "dlNumber",
5221
5642
  section: "driverLicense",
5222
- label: { key: "verification.labels.dlNumber" }
5643
+ label: { key: "verification.labels.dlNumber" },
5644
+ prefill: ["document.driversLicenseNumber"]
5223
5645
  },
5224
5646
  {
5225
5647
  name: "dlState",
@@ -5229,7 +5651,8 @@ const EKYC_DEFINITIONS = {
5229
5651
  widget: "select",
5230
5652
  label: { key: "verification.labels.dlState" },
5231
5653
  placeholder: { key: "verification.placeholder.state" },
5232
- optionsRef: "US_STATES"
5654
+ optionsRef: "US_STATES",
5655
+ prefill: ["document.driversLicenseState"]
5233
5656
  }
5234
5657
  ],
5235
5658
  submit: {
@@ -5242,7 +5665,7 @@ const EKYC_DEFINITIONS = {
5242
5665
  },
5243
5666
  "ekyc/US/US_TELCO_2": {
5244
5667
  schemaVersion: 1,
5245
- vocabulary: "1.0",
5668
+ vocabulary: "1.2",
5246
5669
  id: "ekyc/US/US_TELCO_2",
5247
5670
  module: "ekyc",
5248
5671
  country: "US",
@@ -5259,7 +5682,8 @@ const EKYC_DEFINITIONS = {
5259
5682
  maxLength: 100,
5260
5683
  autofill: "givenName"
5261
5684
  },
5262
- rules: [{ id: "nameCharacters" }]
5685
+ rules: [{ id: "nameCharacters" }],
5686
+ prefill: ["document.firstName", "poa.firstName"]
5263
5687
  },
5264
5688
  {
5265
5689
  name: "surName",
@@ -5271,7 +5695,8 @@ const EKYC_DEFINITIONS = {
5271
5695
  maxLength: 100,
5272
5696
  autofill: "familyName"
5273
5697
  },
5274
- rules: [{ id: "nameCharacters" }]
5698
+ rules: [{ id: "nameCharacters" }],
5699
+ prefill: ["document.paternalLastName", "poa.lastName"]
5275
5700
  },
5276
5701
  {
5277
5702
  name: "dateOfBirth",
@@ -5279,7 +5704,8 @@ const EKYC_DEFINITIONS = {
5279
5704
  group: "dateOfBirth",
5280
5705
  label: { key: "verification.labels.dateOfBirth" },
5281
5706
  input: { autofill: "birthday" },
5282
- rules: [{ id: "notFuture" }]
5707
+ rules: [{ id: "notFuture" }],
5708
+ prefill: ["document.birthDate"]
5283
5709
  },
5284
5710
  {
5285
5711
  name: "email",
@@ -5292,7 +5718,8 @@ const EKYC_DEFINITIONS = {
5292
5718
  keyboard: "email",
5293
5719
  autofill: "email"
5294
5720
  },
5295
- rules: [{ id: "emailFormat" }]
5721
+ rules: [{ id: "emailFormat" }],
5722
+ prefill: ["emailModule.email"]
5296
5723
  },
5297
5724
  {
5298
5725
  name: "phone",
@@ -5309,7 +5736,8 @@ const EKYC_DEFINITIONS = {
5309
5736
  max: 10
5310
5737
  }
5311
5738
  }],
5312
- payload: { transforms: [{ id: "e164" }] }
5739
+ payload: { transforms: [{ id: "e164" }] },
5740
+ prefill: ["phoneModule.phone"]
5313
5741
  },
5314
5742
  {
5315
5743
  name: "street",
@@ -5319,7 +5747,8 @@ const EKYC_DEFINITIONS = {
5319
5747
  widget: "addressSearch",
5320
5748
  label: { key: "verification.labels.street" },
5321
5749
  input: { autofill: "addressLine1" },
5322
- rules: [{ id: "noPoBox" }]
5750
+ rules: [{ id: "noPoBox" }],
5751
+ prefill: ["document.street", "poa.street"]
5323
5752
  },
5324
5753
  {
5325
5754
  name: "city",
@@ -5327,7 +5756,8 @@ const EKYC_DEFINITIONS = {
5327
5756
  group: "address",
5328
5757
  section: "address",
5329
5758
  label: { key: "verification.labels.city" },
5330
- input: { autofill: "addressLevel2" }
5759
+ input: { autofill: "addressLevel2" },
5760
+ prefill: ["document.city", "poa.city"]
5331
5761
  },
5332
5762
  {
5333
5763
  name: "state",
@@ -5339,7 +5769,8 @@ const EKYC_DEFINITIONS = {
5339
5769
  placeholder: { key: "verification.placeholder.state" },
5340
5770
  input: { autofill: "addressLevel1" },
5341
5771
  optionsRef: "US_STATES",
5342
- payload: { transforms: [{ id: "uppercase" }] }
5772
+ payload: { transforms: [{ id: "uppercase" }] },
5773
+ prefill: ["document.state", "poa.state"]
5343
5774
  },
5344
5775
  {
5345
5776
  name: "postalCode",
@@ -5355,7 +5786,8 @@ const EKYC_DEFINITIONS = {
5355
5786
  payload: { transforms: [{
5356
5787
  id: "stripSeparators",
5357
5788
  params: { chars: "- " }
5358
- }] }
5789
+ }] },
5790
+ prefill: ["document.postalCode", "poa.postalCode"]
5359
5791
  }
5360
5792
  ],
5361
5793
  submit: {
@@ -5368,7 +5800,7 @@ const EKYC_DEFINITIONS = {
5368
5800
  },
5369
5801
  "ekyc/VE/VE_CIVIL_REGISTER": {
5370
5802
  schemaVersion: 1,
5371
- vocabulary: "1.0",
5803
+ vocabulary: "1.2",
5372
5804
  id: "ekyc/VE/VE_CIVIL_REGISTER",
5373
5805
  module: "ekyc",
5374
5806
  country: "VE",
@@ -5385,7 +5817,8 @@ const EKYC_DEFINITIONS = {
5385
5817
  maxLength: 100,
5386
5818
  autofill: "givenName"
5387
5819
  },
5388
- rules: [{ id: "nameCharacters" }]
5820
+ rules: [{ id: "nameCharacters" }],
5821
+ prefill: ["document.firstName", "poa.firstName"]
5389
5822
  },
5390
5823
  {
5391
5824
  name: "middleName",
@@ -5397,7 +5830,8 @@ const EKYC_DEFINITIONS = {
5397
5830
  maxLength: 100,
5398
5831
  autofill: "middleName"
5399
5832
  },
5400
- rules: [{ id: "nameCharacters" }]
5833
+ rules: [{ id: "nameCharacters" }],
5834
+ prefill: ["document.middleName"]
5401
5835
  },
5402
5836
  {
5403
5837
  name: "surName",
@@ -5410,7 +5844,8 @@ const EKYC_DEFINITIONS = {
5410
5844
  maxLength: 100,
5411
5845
  autofill: "familyName"
5412
5846
  },
5413
- rules: [{ id: "nameCharacters" }]
5847
+ rules: [{ id: "nameCharacters" }],
5848
+ prefill: ["document.paternalLastName", "poa.lastName"]
5414
5849
  },
5415
5850
  {
5416
5851
  name: "dateOfBirth",
@@ -5418,7 +5853,8 @@ const EKYC_DEFINITIONS = {
5418
5853
  group: "dateOfBirth",
5419
5854
  label: { key: "verification.labels.dateOfBirth" },
5420
5855
  input: { autofill: "birthday" },
5421
- rules: [{ id: "notFuture" }]
5856
+ rules: [{ id: "notFuture" }],
5857
+ prefill: ["document.birthDate"]
5422
5858
  },
5423
5859
  {
5424
5860
  name: "email",
@@ -5431,7 +5867,8 @@ const EKYC_DEFINITIONS = {
5431
5867
  keyboard: "email",
5432
5868
  autofill: "email"
5433
5869
  },
5434
- rules: [{ id: "emailFormat" }]
5870
+ rules: [{ id: "emailFormat" }],
5871
+ prefill: ["emailModule.email"]
5435
5872
  },
5436
5873
  {
5437
5874
  name: "phone",
@@ -5442,7 +5879,8 @@ const EKYC_DEFINITIONS = {
5442
5879
  input: { autofill: "phone" },
5443
5880
  phone: { lockCountry: "whenPhoneRisk" },
5444
5881
  rules: [{ id: "phoneFormat" }],
5445
- payload: { transforms: [{ id: "e164" }] }
5882
+ payload: { transforms: [{ id: "e164" }] },
5883
+ prefill: ["phoneModule.phone"]
5446
5884
  },
5447
5885
  {
5448
5886
  name: "idNum",
@@ -5460,7 +5898,8 @@ const EKYC_DEFINITIONS = {
5460
5898
  min: 7,
5461
5899
  max: 9
5462
5900
  }
5463
- }]
5901
+ }],
5902
+ prefill: ["document.documentNumber"]
5464
5903
  }
5465
5904
  ],
5466
5905
  submit: {
@@ -5792,6 +6231,101 @@ const inStateOptions = Object.values({
5792
6231
  label: state.name
5793
6232
  }));
5794
6233
  //#endregion
6234
+ //#region src/modules/ekyc/ekycPrefill.ts
6235
+ /**
6236
+ * eKYC prefill data for form definitions: turns the `ocr-data` and
6237
+ * `otp-status` responses into values keyed by the vocabulary's prefill source
6238
+ * ids (`document.firstName`, `phoneModule.phone`, …). The forms kernel then
6239
+ * decides which of them a field uses and how it shows (`resolvePrefill`).
6240
+ */
6241
+ const dateFormatting = new DateFormattingProvider();
6242
+ const fromSuggestion = (suggestion) => ({
6243
+ street: suggestion.street,
6244
+ houseNumber: suggestion.houseNumber,
6245
+ city: suggestion.city,
6246
+ state: suggestion.stateCode,
6247
+ postalCode: suggestion.postalCode
6248
+ });
6249
+ const DRIVERS_LICENSE = "DriversLicense";
6250
+ /** OCR sends some dates as epoch milliseconds in a string, such as `issuedAt`. */
6251
+ const epochMs = (value) => typeof value === "string" && /^\d+$/.test(value) ? Number(value) : value;
6252
+ const US_STATE_CODES = Object.fromEntries(Object.values(usStates).flatMap(({ code, name }) => [[code, code], [name.toUpperCase(), code]]));
6253
+ /** A US state code or name as its code, such as `California` → `CA`. */
6254
+ function usStateCode(value) {
6255
+ return value ? US_STATE_CODES[value.trim().toUpperCase()] : void 0;
6256
+ }
6257
+ /** The proof-of-address statement address, whichever shape it came in. */
6258
+ function statementAddress(ocr) {
6259
+ const fromStatement = ocr.addressFromStatement;
6260
+ const parsed = typeof fromStatement === "object" ? fromStatement : void 0;
6261
+ const fields = ocr.addressFieldsFromStatement;
6262
+ return {
6263
+ label: parsed?.address ?? (typeof fromStatement === "string" ? fromStatement : void 0) ?? fields?.label,
6264
+ street: parsed?.street ?? fields?.street,
6265
+ houseNumber: parsed?.houseNumber ?? fields?.houseNumber,
6266
+ city: parsed?.city ?? fields?.city,
6267
+ state: parsed?.state ?? fields?.state,
6268
+ postalCode: parsed?.postalCode ?? fields?.postalCode
6269
+ };
6270
+ }
6271
+ /** The address search queries to try for each origin, in order. */
6272
+ function prefillAddressQueries(ocr) {
6273
+ if (!ocr) return {
6274
+ document: [],
6275
+ poa: []
6276
+ };
6277
+ const documentQueries = ocr.addressFields || ocr.checkedAddressBean ? [ocr.address, ocr.checkedAddress] : [];
6278
+ return {
6279
+ document: [...new Set(documentQueries.filter((q) => Boolean(q)))],
6280
+ poa: [statementAddress(ocr).label].filter((q) => Boolean(q))
6281
+ };
6282
+ }
6283
+ function addressEntries(origin, parts) {
6284
+ return [
6285
+ [`${origin}.street`, parts.street],
6286
+ [`${origin}.houseNumber`, parts.houseNumber],
6287
+ [`${origin}.city`, parts.city],
6288
+ [`${origin}.state`, parts.state],
6289
+ [`${origin}.postalCode`, parts.postalCode]
6290
+ ];
6291
+ }
6292
+ /** Each prefill source id this module can fill, and how. */
6293
+ const SOURCES = {
6294
+ "document.firstName": (ocr) => ocr.name?.firstName,
6295
+ "document.middleName": (ocr) => ocr.name?.middleName,
6296
+ "document.paternalLastName": (ocr) => ocr.name?.paternalLastName,
6297
+ "document.maternalLastName": (ocr) => ocr.name?.maternalLastName,
6298
+ "document.birthDate": (ocr) => dateFormatting.utcToIsoDateString(ocr.birthDate),
6299
+ "document.issueDate": (ocr) => dateFormatting.utcToIsoDateString(epochMs(ocr.issuedAt)),
6300
+ "document.documentNumber": (ocr) => ocr.documentNumber,
6301
+ "document.personalNumber": (ocr) => ocr.personalNumber,
6302
+ "document.driversLicenseNumber": (ocr) => ocr.typeOfId === DRIVERS_LICENSE ? ocr.documentNumber : void 0,
6303
+ "document.driversLicenseState": (ocr) => ocr.typeOfId === DRIVERS_LICENSE ? usStateCode(ocr.issuingState) : void 0,
6304
+ "poa.firstName": (ocr) => ocr.poaName?.trim().split(/\s+/)[0],
6305
+ "poa.lastName": (ocr) => ocr.poaName?.trim().split(/\s+/).slice(1).join(" ") || void 0,
6306
+ "phoneModule.phone": (_ocr, otp) => otp.phone,
6307
+ "emailModule.email": (_ocr, otp) => otp.email
6308
+ };
6309
+ const ADDRESS_SOURCES = [...addressEntries("document", {}), ...addressEntries("poa", {})].map(([id]) => id);
6310
+ /** Every prefill source id eKYC can fill, for `EKYC_SUPPORTED_IDS`. */
6311
+ const EKYC_PREFILL_SOURCES = [...Object.keys(SOURCES), ...ADDRESS_SOURCES];
6312
+ /**
6313
+ * The session's prefill values by source id. An address comes from its
6314
+ * suggestion when one was found, otherwise from the OCR address fields.
6315
+ */
6316
+ function buildPrefillData(ocr, otp, matches = {}) {
6317
+ const ocrData = ocr ?? {};
6318
+ const otpData = otp ?? {};
6319
+ const documentAddress = matches.document ? fromSuggestion(matches.document) : ocrData.addressFields ?? ocrData.checkedAddressBean ?? {};
6320
+ const poaAddress = matches.poa ? fromSuggestion(matches.poa) : statementAddress(ocrData);
6321
+ const entries = [
6322
+ ...Object.entries(SOURCES).map(([id, read]) => [id, read(ocrData, otpData, matches)]),
6323
+ ...addressEntries("document", documentAddress),
6324
+ ...addressEntries("poa", poaAddress)
6325
+ ];
6326
+ return Object.fromEntries(entries.filter(([, value]) => Boolean(value)));
6327
+ }
6328
+ //#endregion
5795
6329
  //#region src/modules/ekyc/ekycForm.ts
5796
6330
  /**
5797
6331
  * eKYC adapter for form definitions.
@@ -5803,24 +6337,6 @@ const inStateOptions = Object.values({
5803
6337
  * express keeps the current builder, and so does a source today's builder
5804
6338
  * knows while the form definitions rollout is off.
5805
6339
  */
5806
- /** eKYC group id → the key `getEKYCFields` sets in `EkycVerificationFields`. */
5807
- const EKYC_GROUP_KEYS = {
5808
- name: "name",
5809
- dateOfBirth: "date of birth",
5810
- email: "email",
5811
- phone: "phone",
5812
- address: "address",
5813
- ssn: "SSN",
5814
- last4SSN: "last4SSN",
5815
- idNumber: "idNum",
5816
- idNumber1: "idNum1",
5817
- nationality: "nationality",
5818
- gender: "gender",
5819
- panNumber: "panNumber",
5820
- dlNumber: "dlNumber",
5821
- dlState: "dlState",
5822
- dlExpireAt: "dlExpireAt"
5823
- };
5824
6340
  /**
5825
6341
  * The option lists definitions reference by `optionsRef`. Their values must
5826
6342
  * match the `values` vocabulary.json declares, which the compiler checks
@@ -5926,7 +6442,7 @@ const RULE_PARAMS = {
5926
6442
  */
5927
6443
  const EKYC_SUPPORTED_IDS = {
5928
6444
  schemaVersions: [1],
5929
- vocabulary: "1.1",
6445
+ vocabulary: "1.2",
5930
6446
  kinds: /* @__PURE__ */ new Set([
5931
6447
  "text",
5932
6448
  "date",
@@ -5944,7 +6460,8 @@ const EKYC_SUPPORTED_IDS = {
5944
6460
  ]),
5945
6461
  groupRules: /* @__PURE__ */ new Set(["oneOfRequired", "rulesByOption"]),
5946
6462
  optionLists: new Set(Object.keys(OPTION_LISTS)),
5947
- conditions: /* @__PURE__ */ new Set(["fieldFilled"])
6463
+ conditions: /* @__PURE__ */ new Set(["fieldFilled"]),
6464
+ prefillSources: new Set(EKYC_PREFILL_SOURCES)
5948
6465
  };
5949
6466
  /** Today's field shape only flags `middleName` as optional. */
5950
6467
  const LEGACY_OPTIONAL_FLAG = /* @__PURE__ */ new Set(["middleName"]);
@@ -6095,10 +6612,46 @@ function selectEkycDefinition(source, country, useDefinitions = isFormDefinition
6095
6612
  });
6096
6613
  return definition && isProjectableEkycDefinition(definition) ? definition : void 0;
6097
6614
  }
6098
- function toEkycResolveContext(verificationFields, enablePhoneRisk) {
6615
+ const PREFILL_ORIGIN_ENTRIES = VOCABULARY.entries.filter((entry) => entry.type === "prefillOrigin");
6616
+ /**
6617
+ * A verification field's source → the vocabulary's prefill origin, through
6618
+ * the module configuration values each origin lists (`configValues`).
6619
+ */
6620
+ const PREFILL_ORIGINS = new Map(PREFILL_ORIGIN_ENTRIES.flatMap((origin) => (origin.configValues ?? []).map((value) => [mapToEKYCvalue(value), origin.id])));
6621
+ /**
6622
+ * Risk add-ons whose earlier module already captured a group's value, so the
6623
+ * group fills from that module whatever its source says (as in Web SDK 1):
6624
+ * each origin's `riskAddons` and `groups`.
6625
+ */
6626
+ const RISK_ADDON_ORIGINS = new Map(PREFILL_ORIGIN_ENTRIES.flatMap((origin) => (origin.riskAddons ?? []).map((addon) => [addon, {
6627
+ groups: origin.groups ?? [],
6628
+ origin: origin.id
6629
+ }])));
6630
+ /** Origins whose values another module verified (`locks`). */
6631
+ const LOCKING_ORIGINS = PREFILL_ORIGIN_ENTRIES.filter((origin) => origin.locks).map((origin) => origin.id);
6632
+ function toEkycResolveContext(verificationFields, enablePhoneRisk, displayModes = {}, riskAddons = []) {
6633
+ const groups = Object.entries(EKYC_GROUP_KEYS);
6634
+ const origins = {};
6635
+ const modes = {};
6636
+ for (const [group, key] of groups) {
6637
+ const source = verificationFields[key];
6638
+ const origin = source ? PREFILL_ORIGINS.get(source) : void 0;
6639
+ if (origin) origins[group] = origin;
6640
+ const mode = displayModes[key];
6641
+ if (mode) modes[group] = mode;
6642
+ }
6643
+ const addons = enablePhoneRisk ? [...riskAddons, "phoneCheck"] : riskAddons;
6644
+ for (const addon of addons) {
6645
+ const entry = RISK_ADDON_ORIGINS.get(addon);
6646
+ if (!entry) continue;
6647
+ for (const group of entry.groups) origins[group] = entry.origin;
6648
+ }
6099
6649
  return {
6100
- groups: Object.fromEntries(Object.entries(EKYC_GROUP_KEYS).map(([group, key]) => [group, Boolean(verificationFields[key])])),
6101
- phoneRisk: enablePhoneRisk
6650
+ groups: Object.fromEntries(groups.map(([group, key]) => [group, Boolean(verificationFields[key])])),
6651
+ phoneRisk: enablePhoneRisk,
6652
+ origins,
6653
+ displayModes: modes,
6654
+ lockingOrigins: LOCKING_ORIGINS
6102
6655
  };
6103
6656
  }
6104
6657
  function fieldType(field) {
@@ -6235,11 +6788,11 @@ function applyOneOfRequiredGroups(defs, configSource) {
6235
6788
  * Builds the form's field defs. A source with a form definition for exactly
6236
6789
  * this country reads it (`packages/form-definitions/catalog/ekyc`) when the
6237
6790
  * rollout allows (`selectEkycDefinition`); any other pair keeps the current
6238
- * builder. The machine builds them once per module instance, on LOAD, so the
6239
- * rollout answer can't change mid-session.
6791
+ * builder. `useDefinitions` is the rollout answer the machine read once, when
6792
+ * it was created, so it can't change mid-session.
6240
6793
  */
6241
- function buildFieldDefs(fields, configSource, country, enablePhoneRisk = false) {
6242
- const definition = selectEkycDefinition(configSource, country);
6794
+ function buildFieldDefs(fields, configSource, country, enablePhoneRisk = false, useDefinitions) {
6795
+ const definition = selectEkycDefinition(configSource, country, useDefinitions);
6243
6796
  if (definition) return projectEkycFields(resolveForm(definition, toEkycResolveContext(fields, enablePhoneRisk)), fields, country);
6244
6797
  return legacyBuildFieldDefs(fields, configSource, country, enablePhoneRisk);
6245
6798
  }
@@ -6435,6 +6988,63 @@ function applyPrefill(fields, ocrData, otpStatus, _country) {
6435
6988
  readonlyFields
6436
6989
  };
6437
6990
  }
6991
+ /**
6992
+ * The address origin to look up an address suggestion for, when the source
6993
+ * has a form definition and its address comes from a document. Sources on
6994
+ * the current builder never look one up.
6995
+ */
6996
+ function prefillAddressOrigin(config) {
6997
+ if (!selectEkycDefinition(config.configSource, config.country, config.useDefinitions)) return;
6998
+ const source = config.verificationFields.address;
6999
+ if (source === "document_scan") return "document";
7000
+ if (source === "poa_document") return "poa";
7001
+ }
7002
+ /**
7003
+ * Checks a prefilled value the way eKYC checks a typed one: the same input
7004
+ * formatting, then the projected field's validation.
7005
+ */
7006
+ function ekycPrefillChecks(defs, country) {
7007
+ const list = [...defs];
7008
+ const byName = new Map(list.map((def) => [def.name, def]));
7009
+ return {
7010
+ format: (field, value) => processFieldValue(field.name, value, country, byName.get(field.name)?.inputFormat),
7011
+ isValid: (field, value, values) => validateEkycField({
7012
+ ...values,
7013
+ [field.name]: value
7014
+ }, field.name, list) === void 0
7015
+ };
7016
+ }
7017
+ /**
7018
+ * Prefills a source that has a form definition: the forms kernel picks each
7019
+ * field's value and display mode, checking each value with the same input
7020
+ * formatting and validation as typed input. Undefined for a source on the
7021
+ * current builder, which keeps `applyPrefill`.
7022
+ */
7023
+ function prefillFromDefinition(config, data) {
7024
+ const { verificationFields, configSource, country } = config;
7025
+ const definition = selectEkycDefinition(configSource, country, config.useDefinitions);
7026
+ if (!definition) return void 0;
7027
+ const context = toEkycResolveContext(verificationFields, config.enablePhoneRisk ?? false, config.displayModes, config.riskAddons);
7028
+ const form = resolveForm(definition, context);
7029
+ const defs = projectEkycFields(form, verificationFields, country);
7030
+ const result = resolvePrefill(form, context, data, ekycPrefillChecks(defs, country));
7031
+ const modes = new Map(result.fields.map((prefilled) => [prefilled.field.name, prefilled.displayMode]));
7032
+ return {
7033
+ fields: defs.map((def) => {
7034
+ const displayMode = modes.get(def.name) ?? "editable";
7035
+ return displayMode === "readOnly" ? {
7036
+ ...def,
7037
+ displayMode,
7038
+ readonly: true
7039
+ } : {
7040
+ ...def,
7041
+ displayMode
7042
+ };
7043
+ }),
7044
+ values: { ...result.values },
7045
+ prefilled: Object.fromEntries(Object.keys(result.values).map((name) => [name, true]))
7046
+ };
7047
+ }
6438
7048
  /** How a phone with a `phoneFormat` is sent. Phones without one go as E.164. */
6439
7049
  const PHONE_FORMATTERS = {
6440
7050
  nationalNumber: formatPhoneNational,
@@ -6547,12 +7157,30 @@ const fetchModuleConfigActor = fromPromise(async ({ input, signal }) => {
6547
7157
  if (getEKYCFields(config).phone !== false) await phoneRules;
6548
7158
  return config;
6549
7159
  });
6550
- const fetchPrefillDataActor = fromPromise(async ({ signal }) => {
7160
+ /** The first address suggestion for the first query that has one. */
7161
+ async function firstSuggestion(queries, signal) {
7162
+ for (const query of queries) try {
7163
+ const suggestion = (await searchAddress(query, signal))?.apiResponse?.items[0];
7164
+ if (suggestion) return suggestion;
7165
+ } catch {}
7166
+ }
7167
+ /**
7168
+ * Fetches OCR and OTP data. With `addressOrigin`, it also looks up an address
7169
+ * suggestion for that address, which prefills it in a normalized form.
7170
+ */
7171
+ const fetchPrefillDataActor = fromPromise(async ({ input, signal }) => {
6551
7172
  const [ocrData, otpStatus] = await Promise.all([fetchOcrData(signal).catch(() => void 0), fetchOtpStatus(signal).catch(() => void 0)]);
6552
- return {
7173
+ const origin = input?.addressOrigin;
7174
+ if (!origin) return {
6553
7175
  ocrData,
6554
7176
  otpStatus
6555
7177
  };
7178
+ const suggestion = await firstSuggestion(prefillAddressQueries(ocrData)[origin], signal);
7179
+ return {
7180
+ ocrData,
7181
+ otpStatus,
7182
+ addressMatches: suggestion ? { [origin]: suggestion } : {}
7183
+ };
6556
7184
  });
6557
7185
  const submitEkycActor = fromPromise(async ({ input, signal }) => submitEkyc(input, signal));
6558
7186
  //#endregion
@@ -6564,6 +7192,19 @@ const ADDRESS_AUTOCOMPLETE_KEYS = [
6564
7192
  "postalCode",
6565
7193
  "houseNo"
6566
7194
  ];
7195
+ /** A field the user can't change: read-only, or hidden from the form. */
7196
+ const isLocked = (field) => field?.readonly === true || field?.displayMode === "hidden";
7197
+ /** Every field is hidden, so the form has nothing to show. */
7198
+ const showsNoFields = (context) => context.fields.length > 0 && context.fields.every((field) => field.displayMode === "hidden");
7199
+ const prefillConfig = (context) => ({
7200
+ verificationFields: context.verificationFields,
7201
+ displayModes: context.displayModes,
7202
+ configSource: context.configSource,
7203
+ country: context.fieldsCountry,
7204
+ enablePhoneRisk: context.moduleConfig?.enablePhoneRisk ?? context.config.enablePhoneRisk,
7205
+ riskAddons: context.moduleConfig?.riskAddons,
7206
+ useDefinitions: context._formDefinitions
7207
+ });
6567
7208
  const omitKeys = (errors, keys) => {
6568
7209
  if (!errors) return void 0;
6569
7210
  const next = { ...errors };
@@ -6593,11 +7234,19 @@ const ekycMachine = setup({
6593
7234
  verificationFields: vFields,
6594
7235
  configSource: source,
6595
7236
  fieldsCountry: country,
6596
- fields: buildFieldDefs(vFields, source, country, config.enablePhoneRisk)
7237
+ fields: buildFieldDefs(vFields, source, country, config.enablePhoneRisk, context._formDefinitions),
7238
+ displayModes: getEKYCDisplayModes(config)
6597
7239
  };
6598
7240
  }),
6599
7241
  applyPrefillData: assign(({ context, event }) => {
6600
- const { ocrData, otpStatus } = event.output;
7242
+ const { ocrData, otpStatus, addressMatches } = event.output;
7243
+ const fromDefinition = prefillFromDefinition(prefillConfig(context), buildPrefillData(ocrData, otpStatus, addressMatches));
7244
+ if (fromDefinition) return {
7245
+ values: fromDefinition.values,
7246
+ prefilled: fromDefinition.prefilled,
7247
+ hideEmail: false,
7248
+ fields: fromDefinition.fields
7249
+ };
6601
7250
  const { values, prefilled, hideEmail, readonlyFields } = applyPrefill(context.verificationFields, ocrData, otpStatus, context.fieldsCountry);
6602
7251
  return {
6603
7252
  values,
@@ -6609,8 +7258,19 @@ const ekycMachine = setup({
6609
7258
  }))
6610
7259
  };
6611
7260
  }),
7261
+ applyEmptyPrefill: assign(({ context }) => {
7262
+ const fromDefinition = prefillFromDefinition(prefillConfig(context), buildPrefillData(void 0, void 0));
7263
+ if (!fromDefinition) return {};
7264
+ return {
7265
+ values: fromDefinition.values,
7266
+ prefilled: fromDefinition.prefilled,
7267
+ fields: fromDefinition.fields
7268
+ };
7269
+ }),
6612
7270
  updateField: assign(({ context, event }) => {
6613
7271
  if (event.type !== "DATA_CHANGED") return {};
7272
+ const field = context.fields.find((f) => f.name === event.name);
7273
+ if (isLocked(field)) return {};
6614
7274
  const processedValue = processFieldValue(event.name, event.value, context.fieldsCountry, context.fields.find((field) => field.name === event.name)?.inputFormat);
6615
7275
  return {
6616
7276
  values: {
@@ -6648,7 +7308,7 @@ const ekycMachine = setup({
6648
7308
  }),
6649
7309
  fillAddressFields: assign(({ context, event }) => {
6650
7310
  const { suggestion } = event;
6651
- const activeFields = new Set(context.fields.map((f) => f.name));
7311
+ const activeFields = new Set(context.fields.filter((f) => !isLocked(f)).map((f) => f.name));
6652
7312
  const { values: newValues } = fillFromSuggestion(context.values, {}, suggestion, activeFields);
6653
7313
  const clearedErrors = omitKeys(context.validationErrors, ADDRESS_AUTOCOMPLETE_KEYS);
6654
7314
  const streetError = getStreetLevelErrorForSuggestion(suggestion, activeFields);
@@ -6674,7 +7334,9 @@ const ekycMachine = setup({
6674
7334
  hasNoValidationErrors: hasNoValidationErrorsGuard,
6675
7335
  hasFlowId: hasFlowIdGuard,
6676
7336
  hasVerificationFields: hasVerificationFieldsGuard,
6677
- isCountryNotSupported: isCountryNotSupportedGuard
7337
+ isCountryNotSupported: isCountryNotSupportedGuard,
7338
+ shouldAutoSubmit: ({ context }) => !context.autoSubmitted && showsNoFields(context),
7339
+ showsNoFields: ({ context }) => showsNoFields(context)
6678
7340
  }
6679
7341
  }).createMachine({
6680
7342
  id: "ekyc",
@@ -6692,8 +7354,11 @@ const ekycMachine = setup({
6692
7354
  addressSuggestions: [],
6693
7355
  prefilled: {},
6694
7356
  hideEmail: false,
7357
+ displayModes: config.displayModes ?? {},
7358
+ autoSubmitted: false,
6695
7359
  errorMessage: "",
6696
7360
  submitError: "",
7361
+ _formDefinitions: isFormDefinitionsEnabled(),
6697
7362
  _searchQuery: ""
6698
7363
  };
6699
7364
  },
@@ -6714,7 +7379,7 @@ const ekycMachine = setup({
6714
7379
  verificationFields: vFields,
6715
7380
  configSource: source,
6716
7381
  fieldsCountry: country,
6717
- fields: buildFieldDefs(vFields, source, country, context.config.enablePhoneRisk)
7382
+ fields: buildFieldDefs(vFields, source, country, context.config.enablePhoneRisk, context._formDefinitions)
6718
7383
  };
6719
7384
  })
6720
7385
  },
@@ -6736,20 +7401,31 @@ const ekycMachine = setup({
6736
7401
  prefilling: { invoke: {
6737
7402
  id: "fetchPrefillData",
6738
7403
  src: "fetchPrefillData",
7404
+ input: ({ context }) => ({ addressOrigin: prefillAddressOrigin(prefillConfig(context)) }),
6739
7405
  onDone: {
6740
7406
  target: "form",
6741
7407
  actions: "applyPrefillData"
6742
7408
  },
6743
- onError: { target: "form" }
7409
+ onError: {
7410
+ target: "form",
7411
+ actions: "applyEmptyPrefill"
7412
+ }
6744
7413
  } },
6745
7414
  form: {
6746
7415
  initial: "inputting",
6747
7416
  states: {
6748
- inputting: { on: {
6749
- DATA_CHANGED: { actions: ["updateField", "clearFieldValidationError"] },
6750
- VALIDATE_FIELD: { actions: "validateFormField" },
6751
- SUBMIT: { target: "validatingSubmit" }
6752
- } },
7417
+ inputting: {
7418
+ always: {
7419
+ guard: "shouldAutoSubmit",
7420
+ target: "validatingSubmit",
7421
+ actions: assign({ autoSubmitted: () => true })
7422
+ },
7423
+ on: {
7424
+ DATA_CHANGED: { actions: ["updateField", "clearFieldValidationError"] },
7425
+ VALIDATE_FIELD: { actions: "validateFormField" },
7426
+ SUBMIT: { target: "validatingSubmit" }
7427
+ }
7428
+ },
6753
7429
  searching: {
6754
7430
  invoke: {
6755
7431
  id: "debounceSearch",
@@ -6794,20 +7470,28 @@ const ekycMachine = setup({
6794
7470
  src: "submitEkyc",
6795
7471
  input: ({ context }) => buildSubmitPayload(context),
6796
7472
  onDone: { target: "success" },
6797
- onError: [{
6798
- target: "form",
6799
- guard: "isCountryNotSupported",
6800
- actions: "setSubmitError"
6801
- }, {
6802
- target: "error",
6803
- actions: "setErrorMessage"
6804
- }]
7473
+ onError: [
7474
+ {
7475
+ target: "error",
7476
+ guard: "showsNoFields",
7477
+ actions: "setErrorMessage"
7478
+ },
7479
+ {
7480
+ target: "form",
7481
+ guard: "isCountryNotSupported",
7482
+ actions: "setSubmitError"
7483
+ },
7484
+ {
7485
+ target: "error",
7486
+ actions: "setErrorMessage"
7487
+ }
7488
+ ]
6805
7489
  } },
6806
7490
  success: { after: { 3e3: "finished" } },
6807
7491
  error: { on: {
6808
7492
  RETRY: {
6809
7493
  target: "form",
6810
- actions: "clearErrorMessage"
7494
+ actions: ["clearErrorMessage", assign({ autoSubmitted: () => false })]
6811
7495
  },
6812
7496
  SKIP: { target: "finished" },
6813
7497
  CLOSE: { target: "closed" }