@adyen/kyc-components 3.0.0-beta.8 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (362) hide show
  1. package/dist/es/{HK-0561cac3.mjs → HK-675b8651.mjs} +0 -6
  2. package/dist/es/NZ-d7a003bc.mjs +24 -0
  3. package/dist/es/adyen-kyc-components.es.js +17921 -11986
  4. package/dist/style.css +11406 -1958
  5. package/dist/types/components/BusinessTypeSelection/BusinessTypeSelection.d.ts +16 -0
  6. package/dist/types/components/BusinessTypeSelection/types.d.ts +38 -0
  7. package/dist/types/components/BusinessTypeSelection/utils.d.ts +25 -0
  8. package/dist/types/components/Company/rules.d.ts +21 -1
  9. package/dist/types/components/Company/types.d.ts +1 -0
  10. package/dist/types/components/CompanyBasics/component/CompanyBasicsComponent.d.ts +8 -0
  11. package/dist/types/components/CompanyBasics/index.d.ts +1 -0
  12. package/dist/types/components/CompanyBasics/types.d.ts +20 -0
  13. package/dist/types/components/CompanyBasics/validate.d.ts +4 -0
  14. package/dist/types/components/CompanyLookup/CompanyLookupResultsHeader.d.ts +2 -0
  15. package/dist/types/components/CompanyLookup/CompanyLookupResultsList.d.ts +2 -0
  16. package/dist/types/components/CompanyLookup/LookupResult.d.ts +3 -0
  17. package/dist/types/components/CompanyLookup/component/CompanyLookupComponent.d.ts +5 -0
  18. package/dist/types/components/CompanyLookup/index.d.ts +1 -0
  19. package/dist/types/components/CompanyLookup/types.d.ts +67 -0
  20. package/dist/types/components/CompanyNameAndCountry/types.d.ts +1 -0
  21. package/dist/types/components/CompanyOtherDetails/component/CompanyOtherDetailsComponent.d.ts +8 -0
  22. package/dist/types/components/CompanyOtherDetails/index.d.ts +1 -0
  23. package/dist/types/components/CompanyOtherDetails/types.d.ts +17 -0
  24. package/dist/types/components/CompanyOtherDetails/validate.d.ts +8 -0
  25. package/dist/types/components/CompanyRegistrationDetails/component/labels.d.ts +6 -0
  26. package/dist/types/components/CompanySearch/component/CompanySearchComponent.d.ts +2 -0
  27. package/dist/types/components/CompanySearch/forms.d.ts +38 -0
  28. package/dist/types/components/CompanySearch/index.d.ts +1 -0
  29. package/dist/types/components/CompanySearch/types.d.ts +29 -0
  30. package/dist/types/components/CompanyStructure/component/CompanyStructureComponent.d.ts +8 -0
  31. package/dist/types/components/CompanyStructure/index.d.ts +1 -0
  32. package/dist/types/components/CompanyStructure/types.d.ts +6 -0
  33. package/dist/types/components/CompanyStructure/validate.d.ts +3 -0
  34. package/dist/types/components/ConstitutionalDocument/ConstitutionalDocumentComponent.d.ts +4 -10
  35. package/dist/types/components/ConstitutionalDocument/types.d.ts +4 -0
  36. package/dist/types/components/ContactDetails/component/ContactDetailsComponent.d.ts +7 -1
  37. package/dist/types/components/DocumentUpload/types.d.ts +2 -1
  38. package/dist/types/components/Dropins/CompanyDropin/types.d.ts +3 -3
  39. package/dist/types/components/Dropins/CompanySearchDropin/components/CompanySearchDropinComponent.d.ts +2 -0
  40. package/dist/types/components/Dropins/CompanySearchDropin/index.d.ts +1 -0
  41. package/dist/types/components/Dropins/CompanySearchDropin/types.d.ts +10 -0
  42. package/dist/types/components/Dropins/CompanySearchDropin/utils.d.ts +8 -0
  43. package/dist/types/components/Dropins/FormWrapper/FormWrapper.d.ts +1 -1
  44. package/dist/types/components/Dropins/IndividualDropin/components/IndividualDropinComponent.d.ts +1 -1
  45. package/dist/types/components/Dropins/PayoutDetailsDropin/components/PayoutDetailsDropinComponent.d.ts +2 -2
  46. package/dist/types/components/Dropins/PciDropin/types.d.ts +1 -1
  47. package/dist/types/components/Dropins/RoleAndTypeDropin/components/RoleAndTypeDropinComponent.d.ts +1 -1
  48. package/dist/types/components/Dropins/RoleAndTypeDropin/types.d.ts +3 -0
  49. package/dist/types/components/Dropins/ServiceAgreementDropinComponent/components/useServiceAgreement.d.ts +2 -2
  50. package/dist/types/components/Dropins/ServiceAgreementDropinComponent/types.d.ts +1 -1
  51. package/dist/types/components/Dropins/types.d.ts +8 -1
  52. package/dist/types/components/EmbeddedDropins/CreateIndividualComponent/CreateIndividualComponent.d.ts +16 -0
  53. package/dist/types/components/EmbeddedDropins/CreateTransferInstrumentComponent/CreateTransferInstrumentComponent.d.ts +12 -0
  54. package/dist/types/components/EmbeddedDropins/ManageTransferInstrumentComponent/ManageTransferInstrumentComponent.d.ts +1 -1
  55. package/dist/types/components/EmbeddedDropins/ManageTransferInstrumentComponent/ManageTransferInstrumentOverview/ManageTransferInstrumentOverview.d.ts +12 -0
  56. package/dist/types/components/EmbeddedDropins/ManageTransferInstrumentComponent/ManageTransferInstrumentOverviewItem/ManageTransferInstrumentOverviewItem.d.ts +12 -0
  57. package/dist/types/components/EmbeddedDropins/ManageTransferInstrumentComponent/ManageTransferInstrumentOverviewItemSummary/ManageTransferInstrumentOverviewItemSummary.d.ts +8 -0
  58. package/dist/types/components/IdDocumentUpload/types.d.ts +4 -3
  59. package/dist/types/components/IdentityNumber/component/IdentityNumberComponent.d.ts +3 -1
  60. package/dist/types/components/IdentityNumber/formats.d.ts +3 -0
  61. package/dist/types/components/IdentityNumber/type.d.ts +2 -0
  62. package/dist/types/components/IdentityNumber/validate.d.ts +2 -1
  63. package/dist/types/components/IdentityNumber/validate.helper.d.ts +3 -5
  64. package/dist/types/components/Individual/types.d.ts +4 -3
  65. package/dist/types/components/Introduction/Introduction.d.ts +10 -0
  66. package/dist/types/components/Introduction/IntroductionScreen.d.ts +8 -0
  67. package/dist/types/components/Introduction/constants.d.ts +3 -0
  68. package/dist/types/components/Introduction/copy.d.ts +14 -0
  69. package/dist/types/components/Introduction/types.d.ts +12 -0
  70. package/dist/types/components/LegalEntityTypeSwitcher/type.d.ts +5 -2
  71. package/dist/types/components/PayoutAccount/helpers/mapPayoutAccountSchemaToApiBankAccount.d.ts +2 -0
  72. package/dist/types/components/PayoutAccount/types.d.ts +3 -2
  73. package/dist/types/components/PayoutBankStatement/component/BankDocumentRequirements.d.ts +3 -1
  74. package/dist/types/components/PayoutBankStatement/types.d.ts +4 -2
  75. package/dist/types/components/PayoutDetails/component/PayoutDetailsComponent.d.ts +2 -2
  76. package/dist/types/components/PayoutDetails/types.d.ts +5 -3
  77. package/dist/types/components/PayoutVerificationMethod/component/AccountHolderDescriptionFragment.d.ts +7 -0
  78. package/dist/types/components/PayoutVerificationMethod/types.d.ts +2 -2
  79. package/dist/types/components/PersonalDetails/component/IdentityComponent/identityUS/component/IdentityUSComponent.d.ts +1 -1
  80. package/dist/types/components/PersonalDetails/component/labels.d.ts +4 -0
  81. package/dist/types/components/PersonalDetails/types.d.ts +4 -0
  82. package/dist/types/components/RegistrationAddress/types.d.ts +1 -0
  83. package/dist/types/components/SoleProp/types.d.ts +2 -2
  84. package/dist/types/components/TaskList/component/PayoutAccountTaskListItem.d.ts +2 -2
  85. package/dist/types/components/TaskList/component/TaskItemStatus.d.ts +1 -1
  86. package/dist/types/components/TaskList/component/TaskListItem.d.ts +1 -1
  87. package/dist/types/components/TaskList/types.d.ts +10 -1
  88. package/dist/types/components/Trust/types.d.ts +2 -2
  89. package/dist/types/components/TrustMembers/component/RootTrusteeTaskItem.d.ts +2 -1
  90. package/dist/types/components/TrustMembers/types.d.ts +7 -3
  91. package/dist/types/components/TrustRoleAndEntityType/convertExistingTrustMember.d.ts +2 -1
  92. package/dist/types/components/TrustRoleAndEntityType/getAvailableRoles.d.ts +2 -0
  93. package/dist/types/components/TrustRoleAndEntityType/types.d.ts +10 -0
  94. package/dist/types/components/index.d.ts +6 -2
  95. package/dist/types/components/internal/Accordion/types.d.ts +1 -1
  96. package/dist/types/components/internal/AccordionItem/AccordionItem.d.ts +1 -1
  97. package/dist/types/components/internal/AccordionItem/types.d.ts +3 -2
  98. package/dist/types/components/internal/AccountHolder/types.d.ts +2 -1
  99. package/dist/types/components/internal/Address/components/SearchAddress.d.ts +1 -1
  100. package/dist/types/components/internal/Address/types.d.ts +5 -3
  101. package/dist/types/components/internal/Address/utils.d.ts +1 -1
  102. package/dist/types/components/internal/Alert/Alert.d.ts +1 -3
  103. package/dist/types/components/internal/Alert/components/VerificationErrorAlert.d.ts +1 -1
  104. package/dist/types/components/internal/Alert/index.d.ts +1 -1
  105. package/dist/types/components/internal/Alert/types.d.ts +2 -0
  106. package/dist/types/components/internal/BankAccountNumber/types.d.ts +4 -1
  107. package/dist/types/components/internal/BusinessRegistrationNumber/fieldConfig.d.ts +12 -0
  108. package/dist/types/components/internal/BusinessRegistrationNumber/types.d.ts +5 -3
  109. package/dist/types/components/internal/BusinessRegistrationNumberField/BusinessRegistrationNumberField.d.ts +3 -0
  110. package/dist/types/components/internal/BusinessRegistrationNumberField/index.d.ts +1 -0
  111. package/dist/types/components/internal/BusinessRegistrationNumberField/types.d.ts +8 -0
  112. package/dist/types/components/internal/Button/types.d.ts +2 -2
  113. package/dist/types/components/internal/Card/Card.d.ts +1 -1
  114. package/dist/types/components/internal/Card/types.d.ts +2 -0
  115. package/dist/types/components/internal/ContractViewer/ContractViewer.d.ts +1 -0
  116. package/dist/types/components/internal/ContractViewer/types.d.ts +4 -83
  117. package/dist/types/components/internal/CountryField/CountryField.d.ts +2 -2
  118. package/dist/types/components/internal/CountryField/types.d.ts +1 -1
  119. package/dist/types/components/internal/CountryField/validate.d.ts +3 -0
  120. package/dist/types/components/internal/DateOfIncorporationField/DateOfIncorporationField.d.ts +3 -0
  121. package/dist/types/components/internal/DateOfIncorporationField/index.d.ts +1 -0
  122. package/dist/types/components/internal/DateOfIncorporationField/types.d.ts +5 -0
  123. package/dist/types/components/internal/DateOfIncorporationField/validate.d.ts +3 -0
  124. package/dist/types/components/internal/ErrorPanel/components/NavigateToFieldLink.d.ts +5 -4
  125. package/dist/types/components/internal/FormFields/Dropzone/FilePicker.d.ts +3 -2
  126. package/dist/types/components/internal/FormFields/Dropzone/types.d.ts +3 -7
  127. package/dist/types/components/internal/FormFields/Dropzone/validate.d.ts +2 -1
  128. package/dist/types/components/internal/FormFields/Field/Field.d.ts +2 -3
  129. package/dist/types/components/internal/FormFields/Field/types.d.ts +5 -2
  130. package/dist/types/components/internal/FormFields/InputBase.d.ts +2 -2
  131. package/dist/types/components/internal/FormFields/InputDate/utils.d.ts +1 -1
  132. package/dist/types/components/internal/FormFields/InputEmail.d.ts +2 -1
  133. package/dist/types/components/internal/FormFields/InputTelephone.d.ts +2 -1
  134. package/dist/types/components/internal/FormFields/InputText.d.ts +1 -1
  135. package/dist/types/components/internal/FormFields/MaskedInputText/MaskedInputText.d.ts +22 -0
  136. package/dist/types/components/internal/FormFields/RadioGroup/RadioGroup.d.ts +1 -8
  137. package/dist/types/components/internal/FormFields/RadioGroup/types.d.ts +3 -2
  138. package/dist/types/components/internal/FormFields/RadioGroupCard/RadioCard.d.ts +1 -1
  139. package/dist/types/components/internal/FormFields/RadioGroupCard/RadioCardSelect.d.ts +1 -1
  140. package/dist/types/components/internal/FormFields/RadioGroupCard/types.d.ts +5 -4
  141. package/dist/types/components/internal/FormFields/utils.d.ts +6 -1
  142. package/dist/types/components/internal/Iban/ibanValidator.d.ts +4 -2
  143. package/dist/types/components/internal/Iban/types.d.ts +2 -1
  144. package/dist/types/components/internal/IdFieldTypeSelector/CompanyRegistrationNumberTypeSelector.d.ts +11 -0
  145. package/dist/types/components/internal/IdFieldTypeSelector/IndividualIdNumberTypeSelector.d.ts +9 -0
  146. package/dist/types/components/internal/IdFieldTypeSelector/VatNumberTypeSelector.d.ts +9 -0
  147. package/dist/types/components/internal/IdFieldTypeSelector/countryIdNumberTypes.d.ts +90 -0
  148. package/dist/types/components/internal/LegalCompanyNameField/LegalCompanyNameField.d.ts +2 -3
  149. package/dist/types/components/internal/LegalCompanyNameField/types.d.ts +1 -1
  150. package/dist/types/components/internal/LegalCompanyNameField/validate.d.ts +3 -0
  151. package/dist/types/components/internal/Name/Name.d.ts +13 -1
  152. package/dist/types/components/internal/Remove/Remove.d.ts +1 -1
  153. package/dist/types/components/internal/Remove/types.d.ts +6 -4
  154. package/dist/types/components/internal/StateField/StateField.d.ts +2 -2
  155. package/dist/types/components/internal/StateField/types.d.ts +3 -1
  156. package/dist/types/components/internal/StateField/validate.d.ts +3 -0
  157. package/dist/types/components/internal/Status/Status.d.ts +1 -1
  158. package/dist/types/components/internal/Status/types.d.ts +2 -0
  159. package/dist/types/components/internal/StockExchangeMICField/StockExchangeMICField.d.ts +3 -0
  160. package/dist/types/components/internal/StockExchangeMICField/index.d.ts +1 -0
  161. package/dist/types/components/internal/StockExchangeMICField/types.d.ts +5 -0
  162. package/dist/types/components/internal/StockExchangeMICField/validate.d.ts +3 -0
  163. package/dist/types/components/internal/StockISINField/StockISINField.d.ts +3 -0
  164. package/dist/types/components/internal/StockISINField/index.d.ts +1 -0
  165. package/dist/types/components/internal/StockISINField/types.d.ts +5 -0
  166. package/dist/types/components/internal/StockISINField/validate.d.ts +3 -0
  167. package/dist/types/components/internal/Summary/Summary.d.ts +1 -1
  168. package/dist/types/components/internal/Summary/index.d.ts +1 -0
  169. package/dist/types/components/internal/Summary/types.d.ts +3 -1
  170. package/dist/types/components/internal/TaxId/rules.d.ts +2 -1
  171. package/dist/types/components/internal/TaxInformationField/TaxInformationField.d.ts +4 -0
  172. package/dist/types/components/internal/TaxInformationField/index.d.ts +1 -0
  173. package/dist/types/components/internal/TaxInformationField/types.d.ts +13 -0
  174. package/dist/types/components/internal/TaxInformationField/validate.d.ts +4 -0
  175. package/dist/types/components/internal/TradingNameField/TradingNameField.d.ts +3 -0
  176. package/dist/types/components/internal/TradingNameField/index.d.ts +1 -0
  177. package/dist/types/components/internal/TradingNameField/types.d.ts +8 -0
  178. package/dist/types/components/internal/TradingNameField/validate.d.ts +3 -0
  179. package/dist/types/components/internal/VatNumber/types.d.ts +3 -6
  180. package/dist/types/components/internal/VatNumber/validate.d.ts +2 -1
  181. package/dist/types/components/internal/VatNumber/vatNumberValidation.d.ts +4 -0
  182. package/dist/types/components/internal/VatNumberField/VatNumberField.d.ts +3 -0
  183. package/dist/types/components/internal/VatNumberField/index.d.ts +1 -0
  184. package/dist/types/components/internal/VatNumberField/types.d.ts +11 -0
  185. package/dist/types/components/internal/VatNumberField/validate.d.ts +4 -0
  186. package/dist/types/core/Context/AuthContext/AuthContext.d.ts +0 -1
  187. package/dist/types/core/Context/AuthContext/AuthProvider.d.ts +5 -2
  188. package/dist/types/core/Context/ConfigurationApiContext/ConfigurationApiContext.d.ts +3 -7
  189. package/dist/types/core/Context/ConfigurationApiContext/getEmbeddedApi.d.ts +1 -2
  190. package/dist/types/core/Context/CoreProvider.d.ts +2 -1
  191. package/dist/types/core/Context/ExperimentContext/types.d.ts +15 -3
  192. package/dist/types/core/Context/SettingsContext/types.d.ts +20 -12
  193. package/dist/types/core/Context/StateContext/StateProvider.d.ts +8 -4
  194. package/dist/types/core/Context/StateContext/types.d.ts +9 -7
  195. package/dist/types/core/Context/StateContext/useGlobalData.d.ts +7 -5
  196. package/dist/types/core/SDKValidation/index.d.ts +1 -1
  197. package/dist/types/core/Services/componentApi/create-legal-entity.d.ts +3 -0
  198. package/dist/types/core/Services/componentApi/delete-transferInstrument.d.ts +3 -0
  199. package/dist/types/core/Services/componentApi/get-address.d.ts +3 -0
  200. package/dist/types/core/Services/componentApi/get-bankVerification-vendor.d.ts +1 -1
  201. package/dist/types/core/Services/componentApi/get-idverification-token.d.ts +3 -0
  202. package/dist/types/core/Services/componentApi/get-supported-countries.d.ts +3 -0
  203. package/dist/types/core/Services/componentApi/idVerification-startcheck.d.ts +3 -0
  204. package/dist/types/core/Services/componentApi/index.d.ts +4 -1
  205. package/dist/types/core/Services/componentApi/search-address.d.ts +3 -0
  206. package/dist/types/core/Services/componentApi/update-legal-entity.d.ts +3 -0
  207. package/dist/types/core/Services/componentApi/validate-phone-number.d.ts +3 -0
  208. package/dist/types/core/Services/componentApi/verify-id-number.d.ts +3 -0
  209. package/dist/types/core/Services/http.d.ts +1 -0
  210. package/dist/types/core/Services/kycExternalApi/account-identification.d.ts +4 -0
  211. package/dist/types/core/Services/kycExternalApi/index.d.ts +1 -5
  212. package/dist/types/core/Services/session.d.ts +5 -0
  213. package/dist/types/core/Services/types.d.ts +1 -2
  214. package/dist/types/core/Services/utils.d.ts +3 -0
  215. package/dist/types/core/constants.d.ts +1 -0
  216. package/dist/types/core/core.d.ts +2 -1
  217. package/dist/types/core/errorMapping.d.ts +3 -1
  218. package/dist/types/core/hooks/introduction/useCanSeeIntroduction.d.ts +5 -0
  219. package/dist/types/core/hooks/introduction/useHasSeenIntroduction.d.ts +7 -0
  220. package/dist/types/core/hooks/introduction/useIntroductionScreens.d.ts +8 -0
  221. package/dist/types/core/hooks/introduction/useShouldShowIntroduction.d.ts +5 -0
  222. package/dist/types/core/hooks/types.d.ts +1 -0
  223. package/dist/types/core/hooks/useAccountHolder.d.ts +2 -0
  224. package/dist/types/core/hooks/useAllowedCountries.d.ts +2 -0
  225. package/dist/types/core/hooks/useAsyncAccountDetailsValidationRules.d.ts +3 -0
  226. package/dist/types/core/hooks/useBankConfigurationHandlers.d.ts +1 -1
  227. package/dist/types/core/hooks/useBusinessSetup.d.ts +22 -0
  228. package/dist/types/core/hooks/useBusinessTypeSelection.d.ts +2 -0
  229. package/dist/types/core/hooks/useCompanySearch/index.d.ts +1 -0
  230. package/dist/types/core/hooks/useCompanySearch/types.d.ts +42 -0
  231. package/dist/types/core/hooks/useCompanySearch/useCompanySearch.d.ts +5 -0
  232. package/dist/types/core/hooks/useCompanySearchTaskSubmit.d.ts +33 -0
  233. package/dist/types/core/hooks/useComponentApi.d.ts +7 -0
  234. package/dist/types/core/hooks/useDataMissingRemediations.d.ts +18 -0
  235. package/dist/types/core/hooks/useEnableNewEntryFlow.d.ts +1 -0
  236. package/dist/types/core/hooks/useExemptSettlor.d.ts +1 -1
  237. package/dist/types/core/hooks/useForm/types.d.ts +34 -10
  238. package/dist/types/core/hooks/useForm/useForm.d.ts +2 -1
  239. package/dist/types/core/hooks/useForm/utils.d.ts +12 -1
  240. package/dist/types/core/hooks/useFormComposer.d.ts +4 -5
  241. package/dist/types/core/hooks/useInterval.d.ts +4 -0
  242. package/dist/types/core/hooks/useIsElementVisible.d.ts +1 -0
  243. package/dist/types/core/hooks/useLegalEntityType.d.ts +6 -0
  244. package/dist/types/core/hooks/useLocalStorage.d.ts +5 -2
  245. package/dist/types/core/hooks/useScenarioConfiguration.d.ts +3 -1
  246. package/dist/types/core/models/api/accountIdentification.d.ts +1 -1
  247. package/dist/types/core/models/api/attachment.d.ts +3 -2
  248. package/dist/types/core/models/api/capability.d.ts +1 -1
  249. package/dist/types/core/models/api/company-search.d.ts +17 -35
  250. package/dist/types/core/models/api/individual.d.ts +1 -0
  251. package/dist/types/core/models/api/legal-entity.d.ts +3 -2
  252. package/dist/types/core/models/api/organization.d.ts +8 -8
  253. package/dist/types/core/models/api/transfer-instrument-reference.d.ts +2 -2
  254. package/dist/types/core/models/api/transfer-instrument.d.ts +5 -0
  255. package/dist/types/core/models/api/trusted-transferInstrument.d.ts +1 -0
  256. package/dist/types/core/models/api/verification-error.d.ts +2 -2
  257. package/dist/types/core/models/company.d.ts +7 -0
  258. package/dist/types/core/models/country-code.d.ts +1 -1
  259. package/dist/types/core/models/country-config.d.ts +9 -5
  260. package/dist/types/core/models/currency.d.ts +6 -3
  261. package/dist/types/core/models/decision-maker.d.ts +1 -1
  262. package/dist/types/core/models/errors/entity-problems.d.ts +4 -4
  263. package/dist/types/core/models/errors/validation-error.d.ts +4 -0
  264. package/dist/types/core/models/field-configurations.d.ts +5 -3
  265. package/dist/types/core/models/file.d.ts +8 -0
  266. package/dist/types/core/models/form-rules.d.ts +1 -0
  267. package/dist/types/core/models/form.d.ts +1 -0
  268. package/dist/types/core/models/identity.d.ts +3 -1
  269. package/dist/types/core/models/payout-account.d.ts +1 -1
  270. package/dist/types/core/models/province-code.d.ts +47 -0
  271. package/dist/types/core/models/state-code.d.ts +32 -1
  272. package/dist/types/core/process-field-configurations.d.ts +4 -2
  273. package/dist/types/core/types.d.ts +2 -1
  274. package/dist/types/core/user-events.d.ts +7 -6
  275. package/dist/types/language/Language.d.ts +3 -5
  276. package/dist/types/language/config.d.ts +221 -73
  277. package/dist/types/language/types.d.ts +5 -0
  278. package/dist/types/utils/accountHolderUtils.d.ts +4 -2
  279. package/dist/types/utils/api/documentUtils.d.ts +6 -4
  280. package/dist/types/utils/api/processCapabilitites.d.ts +3 -1
  281. package/dist/types/utils/company-util.d.ts +2 -1
  282. package/dist/types/utils/decision-maker-roles.d.ts +10 -19
  283. package/dist/types/utils/dropin-utils.d.ts +6 -6
  284. package/dist/types/utils/entity-association-util.d.ts +23 -17
  285. package/dist/types/utils/entity-status-util.d.ts +1 -3
  286. package/dist/types/utils/entriesOf.d.ts +1 -0
  287. package/dist/types/utils/file.d.ts +3 -3
  288. package/dist/types/utils/formUtils.d.ts +16 -8
  289. package/dist/types/utils/genUtils.d.ts +13 -10
  290. package/dist/types/utils/get-name.d.ts +2 -2
  291. package/dist/types/utils/get-task-status.d.ts +3 -3
  292. package/dist/types/utils/getFieldsWithExistingData.d.ts +2 -1
  293. package/dist/types/utils/makeArrayOfRepeatedObjects.d.ts +1 -0
  294. package/dist/types/utils/makeSelectItemForRole.d.ts +4 -0
  295. package/dist/types/utils/mapping/companySearch/index.d.ts +3 -0
  296. package/dist/types/utils/mapping/companySearch/mapCompanyDataResponseToFormSchema.d.ts +3 -0
  297. package/dist/types/utils/mapping/companySearch/mapCompanySearchSchemaToLegalEntity.d.ts +5 -0
  298. package/dist/types/utils/mapping/companySearch/mapLegalEntityToCompanySearchSchema.d.ts +4 -0
  299. package/dist/types/utils/mapping/componentApiMapping.d.ts +576 -14
  300. package/dist/types/utils/mapping/documentGuidanceMap.d.ts +1 -1
  301. package/dist/types/utils/mapping/mapping.d.ts +7 -3
  302. package/dist/types/utils/mapping/trustMembers/getTrustMembers.d.ts +1 -0
  303. package/dist/types/utils/masking/displayValueToPureValue.d.ts +10 -0
  304. package/dist/types/utils/masking/maskHelpers.d.ts +6 -0
  305. package/dist/types/utils/masking/maskTypes.d.ts +15 -0
  306. package/dist/types/utils/masking/masks/businessRegistrationNumberMasks.d.ts +256 -0
  307. package/dist/types/utils/masking/masks/vatNumberMasks.d.ts +4 -0
  308. package/dist/types/utils/masking/matchAgainstMask.d.ts +28 -0
  309. package/dist/types/utils/masking/transformers/types.d.ts +1 -0
  310. package/dist/types/utils/masking/transformers/uppercase.d.ts +2 -0
  311. package/dist/types/utils/payout-account-util.d.ts +9 -0
  312. package/dist/types/utils/perCountry.d.ts +5 -0
  313. package/dist/types/utils/regex/basePatterns.d.ts +1 -2
  314. package/dist/types/utils/regex/businessRegistrationNumberPatterns.d.ts +160 -2
  315. package/dist/types/utils/regex/countryIdNumberPatterns.d.ts +3 -0
  316. package/dist/types/utils/regex/index.d.ts +0 -2
  317. package/dist/types/utils/regex/patternValidators.d.ts +3 -0
  318. package/dist/types/utils/regex/vatNumberPatterns.d.ts +5 -3
  319. package/dist/types/utils/remove-object-empty-values.d.ts +1 -1
  320. package/dist/types/utils/roleMetadata.d.ts +13 -0
  321. package/dist/types/utils/sanitizeHtml.d.ts +3 -0
  322. package/dist/types/utils/scroll.d.ts +1 -1
  323. package/dist/types/utils/trust-util.d.ts +4 -25
  324. package/dist/types/utils/trustMembers/handlers/addOrUpdateAssociatedTrustMember.d.ts +6 -1
  325. package/dist/types/utils/trustMembers/handlers/createExemptSettlor.d.ts +4 -0
  326. package/dist/types/utils/trustMembers/handlers/updateExemptSettlorName.d.ts +4 -0
  327. package/dist/types/utils/useForwardRef.d.ts +2 -1
  328. package/dist/types/utils/validation/types.d.ts +10 -13
  329. package/dist/types/utils/validatorUtils.d.ts +6 -0
  330. package/package.json +8 -5
  331. package/dist/es/NZ-12ed2cb9.mjs +0 -47
  332. package/dist/types/components/EmbeddedDropins/TransferInstrumentComponent/TransferInstrumentComponent.d.ts +0 -10
  333. package/dist/types/components/PersonalDetails/component/IdentityComponent/IdentityAu/component/ProofOfIdentityCard.d.ts +0 -15
  334. package/dist/types/components/TaskIntros/TaskIntro.d.ts +0 -8
  335. package/dist/types/components/TaskIntros/TaskIntros.d.ts +0 -10
  336. package/dist/types/components/TaskIntros/copy.d.ts +0 -14
  337. package/dist/types/components/TaskIntros/types.d.ts +0 -8
  338. package/dist/types/components/internal/BusinessRegistrationNumber/formatters.d.ts +0 -4
  339. package/dist/types/components/internal/BusinessRegistrationNumber/validate.d.ts +0 -20
  340. package/dist/types/components/internal/ContractViewer/components/Chapter/Chapter.d.ts +0 -2
  341. package/dist/types/components/internal/ContractViewer/components/ContentElements/ContentElements.d.ts +0 -2
  342. package/dist/types/components/internal/ContractViewer/components/InternalReference/InternalReference.d.ts +0 -2
  343. package/dist/types/components/internal/ContractViewer/components/List/List.d.ts +0 -2
  344. package/dist/types/components/internal/ContractViewer/components/Paragraph/Paragraph.d.ts +0 -3
  345. package/dist/types/components/internal/ContractViewer/components/Section/Section.d.ts +0 -3
  346. package/dist/types/components/internal/ContractViewer/components/Table/Table.d.ts +0 -3
  347. package/dist/types/components/internal/ContractViewer/components/Text/Text.d.ts +0 -3
  348. package/dist/types/components/internal/ContractViewer/components/Weblink/Weblink.d.ts +0 -3
  349. package/dist/types/core/Services/auth/refresh-sdkToken.d.ts +0 -6
  350. package/dist/types/core/Services/kycExternalApi/company-deep-search.d.ts +0 -5
  351. package/dist/types/core/Services/kycExternalApi/company-index-search.d.ts +0 -5
  352. package/dist/types/core/Services/kycExternalApi/get-company-data.d.ts +0 -5
  353. package/dist/types/core/Services/kycExternalApi/refresh-company-data.d.ts +0 -5
  354. package/dist/types/core/Services/kycExternalApi/verify-tin.d.ts +0 -5
  355. package/dist/types/core/hooks/taskIntros.d.ts +0 -10
  356. package/dist/types/core/hooks/useSdkToken.d.ts +0 -5
  357. package/dist/types/openbankingsdk/OpenBankingSDK.d.ts +0 -14
  358. package/dist/types/openbankingsdk/types.d.ts +0 -22
  359. package/dist/types/utils/escapeHtml.d.ts +0 -3
  360. package/dist/types/utils/regex/trustRegistrationNumberPatterns.d.ts +0 -2
  361. package/dist/types/utils/regex/types.d.ts +0 -30
  362. /package/dist/types/core/Services/componentApi/{get-transfer-intsrument.d.ts → get-transfer-instrument.d.ts} +0 -0
@@ -5,8 +5,11 @@ export declare const getRequestUrl: (loadingContext: string, path: string, clien
5
5
  export declare const logFetchError: (message: string, level: FetchErrorLevel) => void;
6
6
  export declare const handleFetchResponse: (response: Response, responseType: XMLHttpRequestResponseType) => Promise<any>;
7
7
  export declare const isValidationErrorResponse: (response: any) => boolean;
8
+ export declare const isSessionExpiredResponse: (response: any) => boolean;
9
+ export declare const processValidationErrors: (response: Response) => Promise<never>;
8
10
  export declare class ValidationError extends Error {
9
11
  invalidFields: InvalidField[];
10
12
  errorCode: string;
13
+ sourceError: unknown;
11
14
  constructor(message: string, validationDetails: ValidationResponse);
12
15
  }
@@ -6,6 +6,7 @@ export declare const KEYBOARD_KEYS: {
6
6
  readonly escape: "Escape";
7
7
  readonly space: " ";
8
8
  readonly tab: "Tab";
9
+ readonly backspace: "Backspace";
9
10
  };
10
11
  export type KeyboardKeyLabel = keyof typeof KEYBOARD_KEYS;
11
12
  export type KeyboardKey = (typeof KEYBOARD_KEYS)[KeyboardKeyLabel];
@@ -8,7 +8,7 @@ export declare class Core {
8
8
  };
9
9
  components: UIElement[];
10
10
  constructor(coreOptions: CoreOptions);
11
- create: <Name extends "payoutAccount" | "taskList" | "pci" | "individualDropin" | "companyDropin" | "trustDropin" | "soleProprietorDropin" | "transferInstrumentComponent" | "manageTransferInstrumentComponent">(componentName: Name, componentOptions: ComponentOptions<Name>) => UIElement;
11
+ create: <Name extends "payoutAccount" | "taskList" | "pci" | "individualDropin" | "companyDropin" | "companySearchDropin" | "trustDropin" | "soleProprietorDropin" | "createTransferInstrumentComponent" | "createIndividualComponent" | "manageTransferInstrumentComponent">(componentName: Name, componentOptions: ComponentOptions<Name>) => UIElement;
12
12
  /**
13
13
  * Updates global configurations, resets the internal state and remounts each element.
14
14
  * @param options - props to update
@@ -23,4 +23,5 @@ export declare class Core {
23
23
  */
24
24
  remove: (component: BaseElement<object>) => this;
25
25
  private getUpdatedOptions;
26
+ private initializeSession;
26
27
  }
@@ -1,7 +1,9 @@
1
+ import { ErrorCode } from './models/errors/error-message';
1
2
  import { RemediationCode } from './models/errors/remediation';
2
3
  import { RemediationActionContext } from './models/errors/remediation-action-context';
3
4
  /**
4
5
  * Mapping of remediation code to impacted api field path
5
6
  */
6
- export declare const remediationActionMappings: Partial<Record<RemediationCode, RemediationActionContext[]>>;
7
+ export declare const invalidInputRemediationActionMappings: Partial<Record<RemediationCode, RemediationActionContext[]>>;
7
8
  export declare const dataMissingRemediationsToFieldsMap: Partial<Record<RemediationCode, string[]>>;
9
+ export declare const DATA_MISSING_DECISION_MAKER_ERROR_CODE_MAPPING: Partial<Record<ErrorCode, RemediationCode>>;
@@ -0,0 +1,5 @@
1
+ import { ExistingLegalEntity } from '../../models/api/legal-entity';
2
+ export interface UseCanSeeIntroductionProps {
3
+ legalEntity: ExistingLegalEntity;
4
+ }
5
+ export declare const useCanSeeIntroduction: ({ legalEntity }: UseCanSeeIntroductionProps) => boolean;
@@ -0,0 +1,7 @@
1
+ export interface UseHasSeenIntroductionProps {
2
+ legalEntityId: string;
3
+ }
4
+ export declare const useHasSeenIntroduction: ({ legalEntityId }: UseHasSeenIntroductionProps) => {
5
+ hasSeenIntroduction: boolean;
6
+ setHasSeenIntroduction: import("preact/hooks").StateUpdater<boolean>;
7
+ };
@@ -0,0 +1,8 @@
1
+ import { IntroductionScreens } from '../../../components/Introduction/types';
2
+ import { TaskTypes } from '../../../components/TaskList/types';
3
+ import { ExistingLegalEntity } from '../../models/api/legal-entity';
4
+ export interface UseIntroductionScreensProps {
5
+ legalEntity: ExistingLegalEntity;
6
+ tasks: TaskTypes[];
7
+ }
8
+ export declare const useIntroductionScreens: ({ legalEntity, tasks }: UseIntroductionScreensProps) => IntroductionScreens[];
@@ -0,0 +1,5 @@
1
+ import { ExistingLegalEntity } from '../../models/api/legal-entity';
2
+ export interface UseShouldShowIntroductionProps {
3
+ legalEntity: ExistingLegalEntity;
4
+ }
5
+ export declare const useShouldShowIntroduction: ({ legalEntity, }: UseShouldShowIntroductionProps) => boolean;
@@ -0,0 +1 @@
1
+ export type HookStatus = 'loading' | 'loaded' | 'error' | 'success' | 'idle';
@@ -0,0 +1,2 @@
1
+ import { AccountHolderOption } from '../../components/internal/AccountHolder/types';
2
+ export declare const useAccountHolder: (enableNewEntryFlow: boolean) => [accountHolder: AccountHolderOption, setAccountHolder: (accountHolder: AccountHolderOption | null) => void];
@@ -0,0 +1,2 @@
1
+ import { CountryCode } from '../models/country-code';
2
+ export declare const useAllowedCountries: () => CountryCode[] | undefined;
@@ -0,0 +1,3 @@
1
+ import { AccountIdentification } from '../models/api/accountIdentification';
2
+ import { AccountValidationResponse } from '../models/errors/validation-error';
3
+ export declare const useAsyncAccountDetailsValidationRules: (payload: AccountIdentification, hasEmptyFields: boolean, isAccountNumberMasked: boolean) => AccountValidationResponse;
@@ -19,6 +19,6 @@ interface UseBankConfigurationHandlersProps {
19
19
  */
20
20
  export declare const useBankConfigurationHandlers: ({ isEmbeddedDropin, handleGetBankVerificationVendors, bankAccountCountry, getConfiguration, legalEntityType, capabilities, }: UseBankConfigurationHandlersProps) => {
21
21
  getConfigurationData: () => Promise<GetConfigurationResponse>;
22
- getBankVerificationVendorsHandler: (data: string) => Promise<BankVerificationVendorsResponse>;
22
+ getBankVerificationVendorsHandler: (country: "AF" | "AX" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AI" | "AQ" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BM" | "BT" | "BO" | "BQ" | "BA" | "BW" | "BV" | "BR" | "IO" | "BN" | "BG" | "BF" | "BI" | "KH" | "CM" | "CA" | "CV" | "KY" | "CF" | "TD" | "CL" | "CN" | "CX" | "CC" | "CO" | "KM" | "CG" | "CD" | "CK" | "CR" | "CI" | "HR" | "CU" | "CW" | "CY" | "CZ" | "DK" | "DJ" | "DM" | "DO" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FK" | "FO" | "FJ" | "FI" | "FR" | "GF" | "PF" | "TF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GI" | "GR" | "EL" | "GL" | "GD" | "GP" | "GU" | "GT" | "GG" | "GN" | "GW" | "GY" | "HT" | "HM" | "VA" | "HN" | "HK" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IM" | "IL" | "IT" | "JM" | "JP" | "JE" | "JO" | "KZ" | "KE" | "KI" | "KR" | "KP" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LY" | "LI" | "LT" | "LU" | "MO" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MH" | "MQ" | "MR" | "MU" | "YT" | "MX" | "FM" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "MM" | "NA" | "NR" | "NP" | "NL" | "NC" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "MP" | "NO" | "OM" | "PK" | "PW" | "PS" | "PA" | "PG" | "PY" | "PE" | "PH" | "PN" | "PL" | "PT" | "PR" | "QA" | "RE" | "RO" | "RU" | "RW" | "SH" | "KN" | "LC" | "PM" | "VC" | "WS" | "SM" | "ST" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SK" | "SI" | "SB" | "SO" | "ZA" | "GS" | "ES" | "LK" | "SD" | "SR" | "SJ" | "SZ" | "SE" | "CH" | "SY" | "TW" | "TJ" | "TZ" | "TH" | "TL" | "TG" | "TK" | "TO" | "TT" | "TN" | "TR" | "TM" | "TC" | "TV" | "UG" | "UA" | "AE" | "GB" | "US" | "UM" | "UY" | "UZ" | "VU" | "VE" | "VN" | "VG" | "VI" | "WF" | "EH" | "YE" | "ZM" | "ZW", openBankingPartnerConfigId?: string) => Promise<BankVerificationVendorsResponse>;
23
23
  };
24
24
  export {};
@@ -0,0 +1,22 @@
1
+ import { AccountHolderOption } from '../../components/internal/AccountHolder/types';
2
+ import { CompanyTypesValue } from '../models/api/company-types-value';
3
+ import { ExistingLegalEntity } from '../models/api/legal-entity';
4
+ import { LegalEntityType } from '../models/api/legal-entity-type';
5
+ export declare enum BusinessType {
6
+ INDIVIDUAL = "individual",
7
+ COMPANY = "company",
8
+ INCORPORATED_PARTNERSHIP = "incorporatedPartnership",
9
+ UNINCORPORATED_PARTNERSHIP = "unincorporatedPartnership",
10
+ INDIVIDUAL_TRUSTEE = "individualTrustee",
11
+ COMPANY_TRUSTEE = "companyTrustee",
12
+ SOLE_PROPRIETORSHIP = "soleProprietorship"
13
+ }
14
+ export declare const businessTypeMapping: {
15
+ [key in AccountHolderOption]?: Partial<Record<LegalEntityType, BusinessType>>;
16
+ };
17
+ export declare const companyTypesMapping: {
18
+ [key in CompanyTypesValue]?: BusinessType;
19
+ };
20
+ export declare const useBusinessSetup: (legalEntityResponse: ExistingLegalEntity) => {
21
+ businessSetup: BusinessType | AccountHolderOption | null | undefined;
22
+ };
@@ -0,0 +1,2 @@
1
+ import { AccountHolderOption } from '../../components/internal/AccountHolder/types';
2
+ export declare const useShouldShowBusinessTypeSelection: (accountHolder: AccountHolderOption) => boolean;
@@ -0,0 +1 @@
1
+ export * from './useCompanySearch';
@@ -0,0 +1,42 @@
1
+ import type { AxiosError } from 'axios';
2
+ import { CompanyBasicsSchema } from '../../../components/CompanyBasics/types';
3
+ import { DropinAPIHandlers } from '../../../components/Dropins/types';
4
+ import { ValidatorMode } from '../../../utils/validation/types';
5
+ import { CompanyDatasetResponse, CompanySearchResult } from '../../models/api/company-search';
6
+ import { CountryCode } from '../../models/country-code';
7
+ import { ProvinceCode } from '../../models/province-code';
8
+ import { StateCode, StateCodeUS } from '../../models/state-code';
9
+ import { HookStatus } from '../types';
10
+ export interface SearchCompaniesOptions {
11
+ companyName: string;
12
+ companyCountry: CountryCode;
13
+ companyState: StateCodeUS;
14
+ resultsLimit?: number;
15
+ indexSearch: DropinAPIHandlers['handleCompanyIndexSearch'];
16
+ deepSearch: DropinAPIHandlers['handleCompanyDeepSearch'];
17
+ }
18
+ export interface UseCompanySearchOptions {
19
+ defaultData: CompanyBasicsSchema | undefined;
20
+ legalCompanyName: string | undefined;
21
+ country: CountryCode | undefined;
22
+ stateOrProvince: StateCode | ProvinceCode | undefined;
23
+ taxIdentificationNumber: string | undefined;
24
+ canVerify: boolean;
25
+ limit?: number;
26
+ handleChangeFor: (key: keyof CompanyBasicsSchema, mode?: ValidatorMode) => (e: any) => void;
27
+ handleCompanyIndexSearch: DropinAPIHandlers['handleCompanyIndexSearch'];
28
+ handleCompanyDeepSearch: DropinAPIHandlers['handleCompanyDeepSearch'];
29
+ handleGetCompanyDataset: DropinAPIHandlers['handleGetCompanyDataset'];
30
+ handleRefreshCompanyDataset: DropinAPIHandlers['handleRefreshCompanyDataset'];
31
+ handleVerifyTin: DropinAPIHandlers['handleVerifyTin'];
32
+ }
33
+ export type UseCompanySearch = {
34
+ results: readonly CompanySearchResult[];
35
+ selectedCompanyId: string | undefined;
36
+ status: HookStatus;
37
+ error: AxiosError | undefined;
38
+ verifiedCompany: CompanyDatasetResponse | undefined;
39
+ retrySearch: () => Promise<void>;
40
+ verify: (tin: string, company: CompanySearchResult) => Promise<void>;
41
+ reset: () => void;
42
+ };
@@ -0,0 +1,5 @@
1
+ import type { UseCompanySearch, UseCompanySearchOptions } from './types';
2
+ export declare const LOW_RISK_COMPANY_DATA_COMPLIANCE_WINDOW = 157766400000;
3
+ export declare const MED_RISK_COMPANY_DATA_COMPLIANCE_WINDOW = 94694400000;
4
+ export declare const HIGH_RISK_COMPANY_DATA_COMPLIANCE_WINDOW = 31536000000;
5
+ export declare function useCompanySearch({ defaultData, legalCompanyName, country, stateOrProvince, taxIdentificationNumber, canVerify, limit, handleChangeFor, handleCompanyIndexSearch, handleCompanyDeepSearch, handleGetCompanyDataset, handleRefreshCompanyDataset, handleVerifyTin, }: UseCompanySearchOptions): UseCompanySearch;
@@ -0,0 +1,33 @@
1
+ import { StateUpdater } from 'preact/hooks';
2
+ import { CompanySearchSchema } from '../../components/CompanySearch/types';
3
+ import { DropinAPIHandlers } from '../../components/Dropins/types';
4
+ import { LoadingStatus } from '../../components/internal/LoaderWrapper/constants';
5
+ import { TaskTypes } from '../../components/TaskList/types';
6
+ import { DocumentApiUtils } from '../../utils/api/documentUtils';
7
+ import { ExistingLegalEntity } from '../models/api/legal-entity';
8
+ import { EntityProblems } from '../models/errors/entity-problems';
9
+ import { FormModelWithValidity } from '../models/form';
10
+ import { BaseTrackingPayload } from '../utils';
11
+ export interface SubmitOptions<FormTaskSchema> {
12
+ data: FormTaskSchema;
13
+ }
14
+ export interface SubmitDocumentsOptions<FormTaskSchema> extends SubmitOptions<FormTaskSchema> {
15
+ legalEntity: ExistingLegalEntity;
16
+ currentForms: FormModelWithValidity[];
17
+ }
18
+ export interface FormTaskSubmitOptions {
19
+ task: TaskTypes;
20
+ forms: FormModelWithValidity[];
21
+ legalEntityResponse: ExistingLegalEntity;
22
+ problems?: EntityProblems;
23
+ baseTrackingPayload: BaseTrackingPayload;
24
+ documentUtils: DocumentApiUtils;
25
+ setProblems: StateUpdater<EntityProblems | undefined>;
26
+ setLoadingStatus: StateUpdater<LoadingStatus>;
27
+ onExternalSubmit?: (company: CompanySearchSchema) => void;
28
+ handleUpdateLegalEntity: Required<DropinAPIHandlers>['handleUpdateLegalEntity'];
29
+ }
30
+ export type FormTaskSubmit<FormTaskSchema> = {
31
+ submit: (options: SubmitOptions<FormTaskSchema>) => Promise<void>;
32
+ };
33
+ export declare function useCompanySearchTaskSubmit<FormTaskSchema extends CompanySearchSchema>({ task, forms, legalEntityResponse, problems, baseTrackingPayload, documentUtils, setProblems, setLoadingStatus, onExternalSubmit, handleUpdateLegalEntity, }: FormTaskSubmitOptions): FormTaskSubmit<FormTaskSchema>;
@@ -3,6 +3,8 @@ import { TransferInstrumentReference } from '../models/api/transfer-instrument-r
3
3
  import { BankVerificationErrorResponse, CreateTrustedTransferInstrumentResponse } from '../models/api/trusted-transferInstrument';
4
4
  export type ComponentApi = {
5
5
  getLegalEntity: Required<DropinAPIHandlers>['handleGetLegalEntity'];
6
+ updateLegalEntity: Required<DropinAPIHandlers>['handleUpdateLegalEntity'];
7
+ createLegalEntity: Required<DropinAPIHandlers>['handleCreateLegalEntity'];
6
8
  getTransferInstrument: Required<DropinAPIHandlers>['handleGetTransferInstrument'];
7
9
  getBankVerificationVendor: Required<DropinAPIHandlers>['handleGetBankVerificationVendors'];
8
10
  getDocument: Required<DropinAPIHandlers>['handleGetDocument'];
@@ -10,6 +12,11 @@ export type ComponentApi = {
10
12
  updateDocument: Required<DropinAPIHandlers>['handleUpdateDocument'];
11
13
  createTransferInstrument: Required<DropinAPIHandlers>['handleCreateTransferInstrument'];
12
14
  updateTransferInstrument: Required<DropinAPIHandlers>['handleUpdateTransferInstrument'];
15
+ deleteTransferInstrument: Required<DropinAPIHandlers>['handleDeleteTransferInstrument'];
16
+ getIdVerificationToken: Required<DropinAPIHandlers>['handleGetIdVerificationToken'];
17
+ idVerificationStartCheck: Required<DropinAPIHandlers>['handleGetIdVerificationStartCheck'];
18
+ getAddress: Required<DropinAPIHandlers>['handleFindAddress'];
19
+ searchAddress: Required<DropinAPIHandlers>['handleAddressSearch'];
13
20
  createTrustedTransferInstrument(code: string, state: string): Promise<CreateTrustedTransferInstrumentResponse>;
14
21
  handleBankVerificationError(errorCode: string, errorMessage: string, state: string, metadata?: Map<string, string>): Promise<BankVerificationErrorResponse>;
15
22
  getTransferInstruments(): Promise<TransferInstrumentReference[]>;
@@ -0,0 +1,18 @@
1
+ import { TaskTypes } from '../../components/TaskList/types';
2
+ import type { CapabilityProblems } from '../models/errors/capability-problems';
3
+ interface UseDataMissingRemediationsProps {
4
+ legalEntityId: string;
5
+ problems: CapabilityProblems;
6
+ }
7
+ interface DataMissingRemediations {
8
+ remediationMessages: Partial<Record<TaskTypes, string | undefined>>;
9
+ }
10
+ /**
11
+ * @description A hook that parses a legal entities capability problems and maps its verification error codes to task specific remediation messages
12
+ *
13
+ * @param legalEntityId - ID of an exisiting LegalEntity
14
+ * @param problems - Capability problems on exisiting LegalEntity
15
+ * @returns A record of TaskTypes to a remediation message
16
+ */
17
+ export declare function useDataMissingRemediations({ legalEntityId, problems, }: UseDataMissingRemediationsProps): DataMissingRemediations;
18
+ export {};
@@ -0,0 +1 @@
1
+ export declare const useEnableNewEntryFlow: () => boolean;
@@ -1,7 +1,7 @@
1
1
  import { DropinAPIHandlers } from '../../components/Dropins/types';
2
2
  import { ExistingLegalEntity } from '../models/api/legal-entity';
3
3
  interface UseExemptSettlorArgs {
4
- trust: ExistingLegalEntity;
4
+ trust: ExistingLegalEntity | null;
5
5
  handleGetLegalEntity: NonNullable<DropinAPIHandlers['handleGetLegalEntity']>;
6
6
  }
7
7
  export declare const useExemptSettlor: ({ trust, handleGetLegalEntity, }: UseExemptSettlorArgs) => ExistingLegalEntity | undefined;
@@ -1,22 +1,43 @@
1
1
  import { StateUpdater } from 'preact/hooks';
2
- import type { TranslationKey } from '../../../language/types';
2
+ import type { Translatable, TranslationKey } from '../../../language/types';
3
+ import { Mask } from '../../../utils/masking/maskTypes';
3
4
  import type { ValidationRuleResult, ValidatorMode, ValidatorRules } from '../../../utils/validation/types';
5
+ import type { AnyFormIdOfTLDS } from '../../Context/StateContext/types';
4
6
  import type { CountryCode } from '../../models/country-code';
5
7
  import type { EntityProblems } from '../../models/errors/entity-problems';
6
8
  import type { FormVerificationErrors } from '../../models/errors/form-verification-errors';
7
9
  import type { FormModel } from '../../models/form';
8
- export type FieldValue<FormSchema> = FormSchema[keyof FormSchema];
9
- export interface BaseFormFieldProps<FormSchema> {
10
- data: FieldValue<FormSchema>;
11
- valid: boolean;
12
- error: string | boolean;
13
- label: string;
10
+ export type FieldData<FieldSchema> = {
11
+ [fieldData in keyof FieldSchema]: FieldSchema[fieldData];
12
+ };
13
+ export type FieldValid<FieldSchema> = {
14
+ [fieldValid in keyof FieldSchema]: boolean;
15
+ };
16
+ export type FieldErrors<FieldSchema> = {
17
+ [fieldError in keyof FieldSchema]: string | boolean;
18
+ };
19
+ export type FieldLabels<FieldSchema> = {
20
+ [fieldLabel in keyof FieldSchema]?: string;
21
+ };
22
+ export interface MaskSettings {
23
+ mask?: Mask;
24
+ transformOnType?: (val: string) => string;
25
+ guidanceText?: Translatable;
26
+ }
27
+ export interface BaseFormFieldProps<FieldSchema> {
28
+ data: FieldData<FieldSchema>;
29
+ valid: FieldValid<FieldSchema>;
30
+ errors: FieldErrors<FieldSchema>;
31
+ labels: FieldLabels<FieldSchema>;
14
32
  readonly: boolean;
33
+ helperText?: Partial<Record<keyof FieldSchema, string>>;
34
+ placeholders?: Partial<Record<keyof FieldSchema, string>>;
15
35
  className?: string;
16
36
  classNameModifiers?: string[];
17
- helperText?: string;
18
- handleChangeFor: (key: keyof FormSchema, mode?: ValidatorMode) => (e: any) => void;
37
+ stateSliceId?: AnyFormIdOfTLDS;
38
+ handleChangeFor: (key: keyof FieldSchema, mode?: ValidatorMode) => (e: any) => void;
19
39
  }
40
+ export type FieldValue<FormSchema> = FormSchema[keyof FormSchema];
20
41
  export interface FormState<FormSchema> {
21
42
  schema: Array<keyof FormSchema>;
22
43
  data: FormSchema;
@@ -45,7 +66,10 @@ export interface BaseFormProps<FormSchema> {
45
66
  [Field in keyof FormSchema]: TranslationKey;
46
67
  };
47
68
  helperText?: {
48
- [Field in keyof FormSchema]: TranslationKey;
69
+ [Field in keyof FormSchema]: Translatable;
70
+ };
71
+ masks?: {
72
+ [Field in keyof FormSchema]: MaskSettings;
49
73
  };
50
74
  data?: FormSchema;
51
75
  validators?: ValidatorRules<FormSchema>;
@@ -9,5 +9,6 @@ export interface UseFormOptions<FormSchema> {
9
9
  shouldValidate?: boolean;
10
10
  fieldProblems?: Record<keyof FormSchema, boolean>;
11
11
  maskedFields?: (keyof FormSchema)[];
12
+ optionalFields?: (keyof FormSchema)[];
12
13
  }
13
- export declare function useForm<FormSchema>({ schema, defaultData, rules, asyncRules, fieldProblems, maskedFields, formatters, shouldValidate, }: UseFormOptions<FormSchema>): Form<FormSchema>;
14
+ export declare function useForm<FormSchema>({ schema, defaultData, rules, asyncRules, fieldProblems, maskedFields, optionalFields, formatters, shouldValidate, }: UseFormOptions<FormSchema>): Form<FormSchema>;
@@ -1,2 +1,13 @@
1
- export declare const omitKeys: (obj: any, omit: any) => {};
1
+ import { FieldData } from './types';
2
+ export declare const omitKeys: (obj: any, omit: any) => any;
2
3
  export declare const addKeys: (obj: any, add: any, initialValue: any, defaultData: any, pendingData: any) => any;
4
+ /**
5
+ * @description Extracts the field schema data from the form schema using the field component
6
+ *
7
+ * @param formData The data of the form using the field component
8
+ * @param fieldKeys The keys in the field schema
9
+ * @returns An object containing only the field schemas form data
10
+ */
11
+ export declare function getDataByFields<FormSchema, Fields extends Array<keyof FormSchema>, FieldSchema extends {
12
+ [field in keyof FormSchema]: FormSchema[field];
13
+ }>(formData: FormSchema, fieldKeys: Fields): FieldData<FieldSchema>;
@@ -5,20 +5,19 @@ import { FormModelWithValidity } from '../models/form';
5
5
  import { BaseTrackingPayload } from '../utils';
6
6
  export interface FormComposer {
7
7
  handleNextClick(): void;
8
- handleBackClick(): void;
8
+ handleBackClick?(): void;
9
9
  nextButtonLabel: string;
10
10
  gotoFormByFormIndex(index: number): void;
11
11
  activeForm: FormModelWithValidity;
12
12
  shouldValidate: boolean;
13
13
  setShouldValidate: StateUpdater<boolean>;
14
14
  }
15
- export declare const useFormComposer: ({ problems, baseTrackingPayload, forms, formRef, submitButtonLabel, onSubmit, skipSubmit, onSkipSubmit, }: {
16
- problems: EntityProblems;
15
+ export declare const useFormComposer: ({ problems, baseTrackingPayload, forms, formRef, submitButtonLabel, externalBackClick, onSubmit, }: {
16
+ problems?: EntityProblems;
17
17
  baseTrackingPayload: BaseTrackingPayload;
18
18
  forms: FormModelWithValidity[];
19
19
  formRef?: any;
20
20
  submitButtonLabel?: TranslationKey;
21
+ externalBackClick?(): void;
21
22
  onSubmit(): void;
22
- skipSubmit?: boolean;
23
- onSkipSubmit?(): void;
24
23
  }) => FormComposer;
@@ -0,0 +1,4 @@
1
+ /// <reference types="node" />
2
+ type IntervalFunction = () => unknown | void;
3
+ export declare function useInterval(callback: IntervalFunction, initialDelay?: number): NodeJS.Timeout;
4
+ export {};
@@ -0,0 +1 @@
1
+ export declare function useIsElementVisible(element: Element | undefined): boolean;
@@ -0,0 +1,6 @@
1
+ import { ExistingLegalEntity } from '../models/api/legal-entity';
2
+ import { LegalEntityType } from '../models/api/legal-entity-type';
3
+ export interface UseLegalEntityTypeProps {
4
+ legalEntity: ExistingLegalEntity;
5
+ }
6
+ export declare const useLegalEntityType: ({ legalEntity, }: UseLegalEntityTypeProps) => LegalEntityType | undefined;
@@ -1,11 +1,14 @@
1
1
  import { StateUpdater } from 'preact/hooks';
2
2
  type Serializer<T> = (object: T | undefined) => string;
3
3
  type Parser<T> = (val: string) => T | undefined;
4
- type Setter<T> = StateUpdater<T | undefined>;
5
4
  type Options<T> = Partial<{
6
5
  serializer: Serializer<T>;
7
6
  parser: Parser<T>;
8
7
  syncData: boolean;
9
8
  }>;
10
- export declare function useLocalStorage<T>(key: string, defaultValue: T, options?: Options<T>): [T, Setter<T>];
9
+ export declare const useLocalStorage: <T>(key: string, defaultValue: T, options?: Partial<{
10
+ serializer: Serializer<T>;
11
+ parser: Parser<T>;
12
+ syncData: boolean;
13
+ }>) => [T, StateUpdater<T>];
11
14
  export {};
@@ -1,4 +1,5 @@
1
1
  import { CountryBankVerificationVendors } from '../../components/BankVerification/types';
2
+ import { BankAccountFormatType } from '../../components/internal/BankAccountFormat/types';
2
3
  import { LoadingStatus } from '../../components/internal/LoaderWrapper/constants';
3
4
  import { GetPayoutAccountFormatResponse } from '../models/api/get-account-format';
4
5
  import { GetConfigurationResponse, PayoutRequiredFields } from '../models/api/get-configuration';
@@ -16,10 +17,11 @@ export interface UseScenarioConfigurationOptions {
16
17
  setLoadingStatus: (loadingStatus: LoadingStatus) => void;
17
18
  getPayoutAccountFormatData?: () => Promise<GetPayoutAccountFormatResponse>;
18
19
  instantVerificationEnabled?: boolean;
20
+ existingBankAccountFormat?: BankAccountFormatType;
19
21
  }
20
22
  export interface ScenarioConfiguration {
21
23
  fieldConfigurations: FieldConfigurations<any> | undefined;
22
24
  requiredFields: PayoutRequiredFields | undefined;
23
25
  bankVerificationVendors: CountryBankVerificationVendors | undefined;
24
26
  }
25
- export declare const useScenarioConfiguration: ({ getConfigurationData, getPayoutAccountFormatData, parseConfiguration, country, instantVerificationEnabled, setLoadingStatus, }: UseScenarioConfigurationOptions) => ScenarioConfiguration;
27
+ export declare const useScenarioConfiguration: ({ getConfigurationData, getPayoutAccountFormatData, parseConfiguration, country, instantVerificationEnabled, setLoadingStatus, existingBankAccountFormat, }: UseScenarioConfigurationOptions) => ScenarioConfiguration;
@@ -46,7 +46,7 @@ interface NOLocalAccountIdentification {
46
46
  type: 'noLocal';
47
47
  accountNumber: string;
48
48
  }
49
- interface NZLocalAccountIdentification {
49
+ export interface NZLocalAccountIdentification {
50
50
  type: 'nzLocal';
51
51
  accountNumber: string;
52
52
  }
@@ -1,5 +1,6 @@
1
+ export type PageType = 'front' | 'back';
1
2
  export interface Attachment {
2
3
  content: string;
3
- pageType?: string;
4
- pageName?: string;
4
+ pageName: string;
5
+ pageType?: PageType;
5
6
  }
@@ -1,6 +1,6 @@
1
1
  import { SupportingEntityCapability } from './supporting-entity-capability';
2
2
  import { VerificationStatus } from './verification-status';
3
- export type CapabilityNames = 'acceptExternalFunding' | 'acceptPspFunding' | 'acceptTransactionInRestrictedCountries' | 'acceptTransactionInRestrictedCountriesCommercial' | 'acceptTransactionInRestrictedCountriesConsumer' | 'acceptTransactionInRestrictedIndustries' | 'acceptTransactionInRestrictedIndustriesCommercial' | 'acceptTransactionInRestrictedIndustriesConsumer' | 'acquiring' | 'atmWithdrawal' | 'atmWithdrawalCommercial' | 'atmWithdrawalConsumer' | 'atmWithdrawalInRestrictedCountries' | 'atmWithdrawalInRestrictedCountriesCommercial' | 'atmWithdrawalInRestrictedCountriesConsumer' | 'authorisedPaymentInstrumentUser' | 'getGrantOffers' | 'issueBankAccount' | 'issueCard' | 'issueCardCommercial' | 'issueCardConsumer' | 'localAcceptance' | 'payout' | 'payoutToTransferInstrument' | 'processing' | 'receiveFromBalanceAccount' | 'receiveFromPlatformPayments' | 'receiveFromThirdParty' | 'receiveFromTransferInstrument' | 'receiveGrants' | 'receivePayments' | 'sendToBalanceAccount' | 'sendToThirdParty' | 'sendToTransferInstrument' | 'thirdPartyFunding' | 'useCard' | 'useCardCommercial' | 'useCardConsumer' | 'useCardInRestrictedCountries' | 'useCardInRestrictedCountriesCommercial' | 'useCardInRestrictedCountriesConsumer' | 'useCardInRestrictedIndustries' | 'useCardInRestrictedIndustriesCommercial' | 'useCardInRestrictedIndustriesConsumer' | 'withdrawFromAtm' | 'withdrawFromAtmCommercial' | 'withdrawFromAtmConsumer' | 'withdrawFromAtmInRestrictedCountries' | 'withdrawFromAtmInRestrictedCountriesCommercial' | 'withdrawFromAtmInRestrictedCountriesConsumer';
3
+ export type CapabilityName = 'acceptExternalFunding' | 'acceptPspFunding' | 'acceptTransactionInRestrictedCountries' | 'acceptTransactionInRestrictedCountriesCommercial' | 'acceptTransactionInRestrictedCountriesConsumer' | 'acceptTransactionInRestrictedIndustries' | 'acceptTransactionInRestrictedIndustriesCommercial' | 'acceptTransactionInRestrictedIndustriesConsumer' | 'acquiring' | 'atmWithdrawal' | 'atmWithdrawalCommercial' | 'atmWithdrawalConsumer' | 'atmWithdrawalInRestrictedCountries' | 'atmWithdrawalInRestrictedCountriesCommercial' | 'atmWithdrawalInRestrictedCountriesConsumer' | 'authorisedPaymentInstrumentUser' | 'getGrantOffers' | 'issueBankAccount' | 'issueCard' | 'issueCardCommercial' | 'issueCardConsumer' | 'localAcceptance' | 'payout' | 'payoutToTransferInstrument' | 'processing' | 'receiveFromBalanceAccount' | 'receiveFromPlatformPayments' | 'receiveFromThirdParty' | 'receiveFromTransferInstrument' | 'receiveGrants' | 'receivePayments' | 'sendToBalanceAccount' | 'sendToThirdParty' | 'sendToTransferInstrument' | 'thirdPartyFunding' | 'useCard' | 'useCardCommercial' | 'useCardConsumer' | 'useCardInRestrictedCountries' | 'useCardInRestrictedCountriesCommercial' | 'useCardInRestrictedCountriesConsumer' | 'useCardInRestrictedIndustries' | 'useCardInRestrictedIndustriesCommercial' | 'useCardInRestrictedIndustriesConsumer' | 'withdrawFromAtm' | 'withdrawFromAtmCommercial' | 'withdrawFromAtmConsumer' | 'withdrawFromAtmInRestrictedCountries' | 'withdrawFromAtmInRestrictedCountriesCommercial' | 'withdrawFromAtmInRestrictedCountriesConsumer';
4
4
  export interface Capability {
5
5
  /** @description Indicates whether the capability is allowed. Adyen sets this to **true** if the verification is successful */
6
6
  allowed?: boolean;
@@ -18,41 +18,17 @@ export interface CompanySearchRequest {
18
18
  */
19
19
  limit?: number;
20
20
  }
21
- /**
22
- * @description Index search for company ID within kompany datastore using their current company data cache
23
- */
24
- export type CompanyIndexSearchRequest = CompanySearchRequest;
25
- /**
26
- * @description Deep search for company ID requesting new data from the external datastore (e.g. Secretary of State) that kompany uses to fetch results
27
- */
28
- export type CompanyDeepSearchRequest = CompanySearchRequest;
29
21
  export interface CompanySearchResult {
30
22
  id: string;
31
23
  name: string;
32
24
  registrationNumber: string;
33
25
  requestTime: string;
34
- lastUpdate: string;
26
+ lastUpdate?: string;
35
27
  }
36
- export type CompanyIndexSearchResponse = {
28
+ export type CompanySearchResponse = {
37
29
  results: Array<CompanySearchResult>;
38
30
  };
39
- export type CompanyDeepSearchResponse = {
40
- results: Array<CompanySearchResult>;
41
- };
42
- export interface TinVerificationRequest {
43
- /**
44
- * @description Nine letter Tax Identification Number with or without hyphens
45
- */
46
- tin: string;
47
- /**
48
- * @description Company name
49
- */
50
- name: string;
51
- }
52
- export interface TinVerificationResponse {
53
- matched: boolean;
54
- }
55
- export interface CompanyDataRequest {
31
+ export interface CompanyDatasetRequest {
56
32
  /**
57
33
  * @description Company Id returned from index search
58
34
  */
@@ -62,19 +38,25 @@ export interface CompanyDataRequest {
62
38
  */
63
39
  country?: CountryCode;
64
40
  }
65
- export type GetCompanyDataRequest = CompanyDataRequest;
66
- export type RefreshCompanyDataRequest = CompanyDataRequest;
67
- export interface CompanyDataResponse {
68
- id: string;
69
- name: string;
41
+ export interface CompanyDatasetResponse extends CompanySearchResult {
70
42
  country: CountryCode;
71
- registrationNumber: string;
72
43
  organizationType: string;
73
44
  address: string;
74
- requestTime: string;
75
- lastUpdate: string;
76
45
  street?: string;
77
46
  city?: string;
78
47
  state?: StateCodeUS;
79
48
  zipcode?: string;
80
49
  }
50
+ export interface TinVerificationRequest {
51
+ /**
52
+ * @description Nine letter Tax Identification Number with or without hyphens
53
+ */
54
+ tin: string;
55
+ /**
56
+ * @description Company name from index/deep search response
57
+ */
58
+ name: string;
59
+ }
60
+ export interface TinVerificationResponse {
61
+ matched: boolean;
62
+ }
@@ -11,6 +11,7 @@ export interface Individual {
11
11
  number?: string;
12
12
  type?: string;
13
13
  cardNumber?: string;
14
+ expiryDate?: string;
14
15
  };
15
16
  name: {
16
17
  firstName: string;
@@ -1,5 +1,5 @@
1
1
  import type { PartialDeep } from 'type-fest';
2
- import { Capability, CapabilityNames } from './capability';
2
+ import { Capability, CapabilityName } from './capability';
3
3
  import { DocumentDetail } from './documentDetail';
4
4
  import { Individual } from './individual';
5
5
  import { LegalEntityAssociation } from './legal-entity-association';
@@ -18,7 +18,7 @@ export interface LegalEntity {
18
18
  soleProprietorship?: SoleProprietor;
19
19
  trust?: Trust;
20
20
  type?: LegalEntityType;
21
- capabilities?: Partial<Record<CapabilityNames, Capability>>;
21
+ capabilities?: Partial<Record<CapabilityName, Capability>>;
22
22
  problems?: Problem[];
23
23
  transferInstruments?: TransferInstrumentOverview[];
24
24
  }
@@ -27,4 +27,5 @@ export type PatchLegalEntity = Omit<PartialDeep<LegalEntity, {
27
27
  }>, 'id'>;
28
28
  export interface ExistingLegalEntity extends LegalEntity {
29
29
  id: string;
30
+ type: LegalEntityType;
30
31
  }