@adyen/kyc-components 3.68.4 → 3.69.1

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 (109) hide show
  1. package/dist/{AcceptTermsOfServiceComponent-Bz8meNAN.js → AcceptTermsOfServiceComponent-Cnv5ZPl5.js} +35 -60
  2. package/dist/{AccountSetupRejected-D3E-9InR.js → AccountSetupRejected-CghDwOps.js} +3 -3
  3. package/dist/{BusinessTypeSelection-DGBwNzyu.js → BusinessTypeSelection-DeZuB2cX.js} +4 -4
  4. package/dist/{CXEL7IU7-Cxc9L1rB.js → CXEL7IU7-HK-98F6d.js} +3 -3
  5. package/dist/{CreateIndividualComponent-BhczFqlN.js → CreateIndividualComponent-CXcGc6Fg.js} +92 -194
  6. package/dist/{CustomerSupport-DZVVS0az.js → CustomerSupport-BWMKG7BY.js} +4 -4
  7. package/dist/{DebugModal-CZcPKrKr.js → DebugModal-DlUYp71H.js} +8 -8
  8. package/dist/{DecisionMakers-CJU3ufK2.js → DecisionMakers-jM2qEJYz.js} +4 -4
  9. package/dist/{EmbedShell-DB8x4Nem.js → EmbedShell-CAeuW7V3.js} +28 -8
  10. package/dist/{EventEmitter-DO8kcfAT.js → EventEmitter-BdbTrGMk.js} +418 -428
  11. package/dist/{HASRA6WW-BPxD6Lwy.js → HASRA6WW-Bu-29-oR.js} +2 -2
  12. package/dist/{I3HPI4QX-CX7OCqd9.js → I3HPI4QX-DB3vUJvp.js} +3 -3
  13. package/dist/{Introduction-DPpBzox4.js → Introduction-BleGRaa4.js} +3 -3
  14. package/dist/{Review-SsWCNJ4V.js → Review-B8zggWg2.js} +8 -14
  15. package/dist/{SingpassSelection-CoRcvnhu.js → SingpassSelection-DC-hVP9Y.js} +1 -1
  16. package/dist/{TaxReportingDropin-1DIISI1K.js → TaxReportingDropin-DqSPuzE8.js} +10 -16
  17. package/dist/adyen-kyc-components.js +1 -1
  18. package/dist/adyenConfig.js +1 -1
  19. package/dist/{bg-BG-CfJNzZu7.js → bg-BG-Ce7O3eFv.js} +15 -4
  20. package/dist/{core-DwWFwq-p.js → core-B13TZF_D.js} +275 -416
  21. package/dist/{cs-CZ-CRMGIz8x.js → cs-CZ-CrC0OM0G.js} +16 -5
  22. package/dist/{css-_LjM9pSU.js → css-D1NPnwah.js} +1 -1
  23. package/dist/{da-DK-C7ftGVR7.js → da-DK-qSfql5UY.js} +15 -4
  24. package/dist/{de-DE-C39k0axr.js → de-DE-3LOqfpiA.js} +15 -4
  25. package/dist/{el-GR-BGGUBqdt.js → el-GR-CTuJ6hn-.js} +15 -4
  26. package/dist/{es-ES-BojuwecZ.js → es-ES-DgVFlRYZ.js} +19 -8
  27. package/dist/{et-EE-DEVH-7IA.js → et-EE-Bgft_08b.js} +15 -4
  28. package/dist/{fi-FI-Bku_85E3.js → fi-FI-CQW_GIPa.js} +15 -4
  29. package/dist/{fr-FR-HnJ_pnor.js → fr-FR-dNqcyG5e.js} +15 -4
  30. package/dist/{hr-HR-DXiqG0wV.js → hr-HR-C8WCFUb9.js} +15 -4
  31. package/dist/{hu-HU-DctyKbNV.js → hu-HU-OdcVNvSN.js} +15 -4
  32. package/dist/individual.js +5 -4
  33. package/dist/{it-IT-tSaYFPHL.js → it-IT-CPBQVRCK.js} +15 -4
  34. package/dist/{ja-JP-DrupcLqM.js → ja-JP-Bh4irw6C.js} +15 -4
  35. package/dist/{json-BZrWRd0I.js → json-BfY90MIx.js} +1 -1
  36. package/dist/{listToRecord-1KbYZ5qe.js → listToRecord-CAqI3h_G.js} +1 -1
  37. package/dist/{lt-LT-C4y-mmdw.js → lt-LT-vglMkJcJ.js} +15 -4
  38. package/dist/{lv-LV-CqmNw1Ry.js → lv-LV-BbjKCqpN.js} +15 -4
  39. package/dist/{nl-NL-CALz56wW.js → nl-NL-D_O0KNNq.js} +15 -4
  40. package/dist/{no-NO-SyIXHgGV.js → no-NO-qkYiqc6y.js} +16 -5
  41. package/dist/{pl-PL-veuK_Fs-.js → pl-PL-Dt_cU3CC.js} +15 -4
  42. package/dist/{plaintext-CAPVlVKI.js → plaintext-BtvmsVMu.js} +1 -1
  43. package/dist/{pt-PT-KPmxJycM.js → pt-PT-ikqIUFTg.js} +15 -4
  44. package/dist/{ro-RO-DPXG-We0.js → ro-RO-gzqKZPHh.js} +15 -4
  45. package/dist/{sk-SK-ldAkSZl-.js → sk-SK-BY3g56qX.js} +16 -5
  46. package/dist/{sl-SI-CH3W5STZ.js → sl-SI-HorvDYvW.js} +15 -4
  47. package/dist/style.css +5 -2
  48. package/dist/styles-CLV89_hH.js +5 -2
  49. package/dist/{sv-SE-DFrDPziR.js → sv-SE-X6UKX96z.js} +16 -5
  50. package/dist/terms-of-service.js +5 -4
  51. package/dist/types/api/address/useSearchAddress.d.ts +1 -1
  52. package/dist/types/api/check/useCheck.d.ts +1 -1
  53. package/dist/types/api/companyDataSet/useCompanyDataset.d.ts +15 -3
  54. package/dist/types/api/companyDataSet/useRefreshCompanyDataset.d.ts +6 -2
  55. package/dist/types/api/companySearch/useCompanyDeepSearch.d.ts +12 -3
  56. package/dist/types/api/companySearch/useCompanyIndexSearch.d.ts +2 -3
  57. package/dist/types/api/companySearch/useCompanyRegistrationNumberDeepSearch.d.ts +2 -3
  58. package/dist/types/api/companySearch/useCompanyRegistrationNumberIndexSearch.d.ts +2 -3
  59. package/dist/types/api/configurations/useVersionConfiguration.d.ts +1 -1
  60. package/dist/types/api/idVerificationProviders/useIdVerificationToken.d.ts +15 -3
  61. package/dist/types/api/openId/useOpenIdAuthorizationLink.d.ts +1 -1
  62. package/dist/types/api/pciTemplate/usePciQuestionnaire.d.ts +1 -1
  63. package/dist/types/api/pciTemplate/usePciQuestionnaireList.d.ts +1 -1
  64. package/dist/types/api/queryKeys.d.ts +2 -1
  65. package/dist/types/api/termsOfService/useAcceptTermsOfService.d.ts +1 -1
  66. package/dist/types/api/termsOfService/useAcceptedTermsOfService.d.ts +1 -1
  67. package/dist/types/api/termsOfService/useTermsOfService.d.ts +1 -1
  68. package/dist/types/api/tinVerification/useVerifyTin.d.ts +4 -5
  69. package/dist/types/api/transferInstruments/useCreateTransferInstrument.d.ts +1 -1
  70. package/dist/types/api/validation/useValidateAccountIdentification.d.ts +1 -1
  71. package/dist/types/components/BankAccount/mapping/payoutKeyMappings.d.ts +1 -1
  72. package/dist/types/components/Business/forms/AdditionalInformation/VerifiedBusinessCard.d.ts +1 -1
  73. package/dist/types/components/Business/forms/AdditionalInformation/types.d.ts +1 -1
  74. package/dist/types/components/Business/forms/AdditionalInformation/utils.d.ts +1 -1
  75. package/dist/types/components/Business/forms/BasicInformation/types.d.ts +2 -1
  76. package/dist/types/components/Business/forms/BusinessDetails/types.d.ts +2 -1
  77. package/dist/types/components/Business/forms/BusinessSelection/BusinessInformationCard.d.ts +2 -1
  78. package/dist/types/components/Business/forms/BusinessSelection/types.d.ts +1 -1
  79. package/dist/types/components/Business/forms/CompanyStructure/types.d.ts +1 -1
  80. package/dist/types/components/Business/hooks/useBusinessData/types.d.ts +7 -12
  81. package/dist/types/components/Individual/forms/Individual/IdDocumentUpload/types.d.ts +0 -2
  82. package/dist/types/components/Individual/forms/Individual/IdVerification/IdVerification.d.ts +1 -1
  83. package/dist/types/components/Individual/forms/Individual/IdVerification/types.d.ts +0 -2
  84. package/dist/types/components/Individual/forms/Individual/types.d.ts +0 -2
  85. package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/IdVerificationMethod.types.d.ts +1 -4
  86. package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/OnfidoVerificationModal/OnfidoVerificationModal.d.ts +1 -1
  87. package/dist/types/components/Individual/forms/IndividualOnfido/IndividualOnfido.d.ts +1 -1
  88. package/dist/types/components/Individual/forms/IndividualOnfido/IndividualOnfido.types.d.ts +0 -2
  89. package/dist/types/components/Shared/FormWrapper/FormWrapper.d.ts +1 -3
  90. package/dist/types/components/Shared/fields/IdFieldTypeSelector/countryIdNumberTypes.d.ts +5 -0
  91. package/dist/types/components/Shared/forms/Address/types.d.ts +1 -1
  92. package/dist/types/components/Shared/forms/Address/utils.d.ts +1 -1
  93. package/dist/types/components/Trust/forms/Trust/rules.d.ts +4 -3
  94. package/dist/types/components/Trust/forms/TrustRegistrationDetails/types.d.ts +2 -1
  95. package/dist/types/components/UnincorporatedPartnership/types/types.d.ts +9 -0
  96. package/dist/types/context/ApiContext/ApiProvider.d.ts +3 -3
  97. package/dist/types/context/FormRouterContext/FormRouterContextProvider.d.ts +1 -1
  98. package/dist/types/context/FormRouterContext/types.d.ts +0 -2
  99. package/dist/types/core/EmbedShell/EmbedShell.d.ts +5 -2
  100. package/dist/types/core/UIElement/UIElement.d.ts +1 -1
  101. package/dist/types/core/core.d.ts +1 -1
  102. package/dist/types/core/services/types.d.ts +3 -15
  103. package/dist/types/core/services/utils.d.ts +1 -3
  104. package/dist/types/core/types.d.ts +0 -4
  105. package/dist/types/utils/entityStatusUtil.d.ts +1 -1
  106. package/dist/{yaml-CCRP53dZ.js → yaml-DdX1lwgo.js} +1 -1
  107. package/package.json +1 -1
  108. package/dist/types/components/Individual/hooks/useIdVerificationToken.d.ts +0 -13
  109. package/dist/types/core/models/api/company-search.d.ts +0 -70
@@ -2,18 +2,18 @@
2
2
  {
3
3
  try {
4
4
  let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
5
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "9a587e1b-fd52-4d7c-bbdd-012891e84717", e._sentryDebugIdIdentifier = "sentry-dbid-9a587e1b-fd52-4d7c-bbdd-012891e84717");
5
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "26f04b86-7dcf-405a-b429-ceda429a2e66", e._sentryDebugIdIdentifier = "sentry-dbid-26f04b86-7dcf-405a-b429-ceda429a2e66");
6
6
  } catch (e) {
7
7
  }
8
8
  }
9
9
  ;
10
- import { c as createLogger, u as useLegalEntity, a as useApiContext, b as useQuery, h as httpPost, d as httpGet, e as useMutation, f as useQueryClient, g as createFormRules, m as mapPayoutAccountSchemaToApiBankAccount, p as payoutComponentKeyMapping, k as keysOf, s as summaryItem, C as CountryCodes, i as useI18nContext, j as useAnalyticsContext, l as useToastContext, n as useExperimentsContext, o as useSettingsContext, q as getLegalEntityCountry, r as currencyByCountry, t as getLegalEntityNameBasedOnType, T as TaskTypes, v as useStateContext, w as getCapabilityProblems, x as isProviderWidgetInline, S as SettingNames, y as cloneObject, z as datasetUtilities, A as payoutSteps, L as LoaderWrapper, M as Modal, B as ModalHeader, D as ModalContent, E as Typography, F as ModalFooter, G as Button, P as PayoutDetails, H as isEmpty, I as useCoreContext, J as LegalEntityType, K as Loader, N as TaskStatus, O as Skeleton, Q as Icon, R as useInvalidateRootLegalEntity, U as httpDelete, V as Alert, W as Card, X as StructuredList, Y as Spacer, Z as IconButton, _ as Confirm, $ as entriesOf, a0 as useDataset, a1 as datasetIdentifier, a2 as useLocalStorage, a3 as getLegalRepresentative, a4 as doesLegalEntityRequiresLegalRepresentative, a5 as ProviderButton, a6 as isPartOfTrustFromLegalEntity, a7 as hasSolePropInLegalEntity, a8 as hasOwnEntityAssociationOfType, a9 as isEmptyEntity, aa as CompanyTypesValue, ab as EntityType, ac as DATA_MISSING_DECISION_MAKER_ERROR_CODE_MAPPING, ad as handleKeys, ae as noop, af as CardGroup, ag as useSetting, ah as useTasks, ai as useGetTaskStatus, aj as isPartOfUnincorporatedPartnership, ak as getOwnSignatories, al as getOwnDecisionMakersLegalEntityIds, am as getOwnSolePropProblems, an as getOwnTrustProblems, ao as getOwnUnincorporatedPartnershipProblems, ap as getCapabilities, aq as ALLOWED_UNINCORPORATED_PARTNERSHIP_COUNTRIES, ar as MemoizedDocumentUpload, as as List, at as useGlobalData, au as getForms, av as BasicInformation, aw as getFormProps, ax as CompanyStructure, ay as AdditionalInformation, az as MemoizedConstitutionalDocument, aA as FinancialInformation, aB as StateCodesUS, aC as objectsDeepEqual, aD as drop, aE as businessDetailsComponentsKeyMapping, aF as solePropBusinessDetailsKeyMapping, aG as operationalAddressIsSameIds, aH as COUNTRIES_USING_COMPANY_SEARCH, aI as FIELDS_NEEDED_FOR_COMPANY_SEARCH, aJ as isUndefinedOrNull, aK as solePropBusinessDetailsApiKeyMapping, aL as businessDetailsApiKeyMapping, aM as isEmpty$1, aN as COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT, aO as mapAddressLabels, aP as companyTypeMetadata, aQ as filterOutUnwantedAssociationsIfRootLE, aR as documentFormsIds, aS as resolveFieldMetadata, aT as defaultFieldMetadata, aU as inferCompanyRegistrationNumberType, aV as getCompanyRegistrationNumberOptions, aW as defaultFieldConfig, aX as defaultFieldMetadata$1, aY as countryToTaxInfoTypeMap, aZ as defaultFieldConfig$1, a_ as getKeyForField, a$ as getOwnEntityAssociations, b0 as doArraysMatch, b1 as setIsBankAccountRequestedForOrganization, b2 as getAssociatedLeAnalyticsPayload, b3 as rules$2, b4 as solePropBusinessDetailsDocumentMapping, b5 as businessDetailsDocumentMapping, b6 as reverseMapping, b7 as eeaCountries, b8 as localizeDateString, b9 as Field, ba as Select, bb as RadioGroup, bc as Link, bd as InputText, be as InputNumber, bf as InputDate, bg as Currency, bh as CURRENCY_FIELD, bi as InputCurrency, bj as useForm, bk as useGlobalDataSlice, bl as ErrorPanel, bm as createFormUtils, bn as getAddressSchemaForCountry, bo as COUNTRIES_WITH_STATES_DATASET, bp as Address, bq as getAddressSchemaLabelsByCountry, br as Currencies, bs as InputGroup, bt as TextArea, bu as CountryField, bv as useId, bw as KEYBOARD_KEYS, bx as Svg, by as Dropzone, bz as useLegalEntities, bA as addressValidators, bB as isTruthyValidator, bC as getSSNType, bD as defaultFieldMetadata$2, bE as defaultFieldConfig$2, bF as getAgeToday, bG as euCountries, bH as DecisionMakerType, bI as allowedCountriesForNominee, bJ as getLocalizedIdDocumentTypeOptions, bK as Scenarios, bL as licenseCardNumberDefaultMetadata, bM as licenseCardNumberDefaultConfig, bN as mergeFieldMetadataIntoProps, bO as useFormContext, bP as getFieldProps, bQ as idNumberFields, bR as IdentityNumber, bS as additionallIdNumberOptions, bT as MaskedInput, bU as formatDateObj, bV as DriversLicense, bW as addressFields, bX as getDefaultTaxIdNumberType, bY as FormHeader, bZ as IndividualIdNumberTypeSelector, b_ as TaxInformationField, b$ as PatriotActDisclosure, c0 as nameFields, c1 as decisionMakerRoleFields, c2 as nomineeFields, c3 as contactDetailFields, c4 as ContextGuidance, c5 as TrustedFieldsProvider, c6 as DecisionMakerRole, c7 as NomineeDecisionMakerRole, c8 as Name, c9 as ContactDetails, ca as RadioWithLabel, cb as pick, cc as IdVerification, cd as showIndividualMotionCapture, ce as IdDocumentManualUpload, cf as idDocumentUploadFields, cg as useFormRouterContext, ch as setShowIndividualMotionCapture, ci as shouldShowMotionCapture, cj as hasMotionCaptureScenario, ck as MemoizedProofOfRelationship, cl as MemoizedProofOfResidencyUpload, cm as useProviderStatus, cn as getAsyncIdNumberValidationRule, co as getAsyncPhoneValidationRules, cp as setHasMotionCaptureScenario, cq as getAllowedDecisionMakerRoles, cr as hasNomineesChanged, cs as attachNomineeToRole, ct as TrustMemberTypes, cu as useGlobalStore, cv as defaultFieldMetadata$3, cw as defaultFieldConfig$3, cx as MultiSelectList, cy as makeSelectItemForRole, cz as RadioGroupCard, cA as COUNTRY_FIELD, cB as LegalCompanyNameField, cC as LEGAL_COMPANY_NAME_FIELD, cD as getRoleName, cE as summaryStep, cF as FormNavigation, cG as Summary, cH as ActionBar, cI as updateTaxInformation, cJ as TrustTypes, cK as trustComponentsKeyMapping, cL as trustApiKeyMapping, cM as trustDocumentMapping, cN as trustForms, cO as Trust, cP as trustTypeOptions, cQ as trustConstitutionalDocumentFormId, cR as UnincorporatedPartnershipMemberTypes, cS as getDecisionMakerDescriptionMap, cT as TRUST_DEFAULT_DESCRIPTIONS_MAP, cU as getRoleTagVariant, cV as DEFAULT_TRUST_MEMBER_REQUIREMENTS, cW as deleteUnincorporatedPartnershipMember, cX as mapEntityAssociationsToUnincorporatedPartnershipMembers, cY as hasAllCapabilitiesResolved, cZ as hasRejectedCapabilities, c_ as getPayoutAccountHolderName, c$ as getOwnDecisionMakers, d0 as MaybeModal, d1 as Checkbox, d2 as listify, d3 as uuidv4, d4 as EventEmitter, d5 as SettingsProvider, d6 as ExperimentsContextProvider, d7 as ApiProvider, d8 as QueryClientProvider, d9 as StoreProvider, da as AnalyticsProvider, db as CoreProvider, dc as I18nProvider, dd as DebugListener, de as ToastContextProvider, df as StateProvider, dg as ReactQueryDevtools2, dh as FALLBACK_LOCALE, di as setSdkToken, dj as setSdkTokenHandler } from "./EventEmitter-DO8kcfAT.js";
11
- import { u as useTermsOfServiceAcceptanceInfos, a as useTermsOfServiceStatus, d as downloadFile, F as FormEndState, O as OutlinedIcon, C as ContractViewer, A as AcceptTermsOfServiceComponent } from "./AcceptTermsOfServiceComponent-Bz8meNAN.js";
12
- import { g as getDocument, m as mapExistingFile, a as getPageName, c as createDocumentRequest, b as mapWith, d as documentApiUtils, u as useScenarioConfiguration, e as getPropsFromConfigurations, f as useUnifyLoadingStatus, h as getRequiredForms, i as addValidityToForms, j as useFormComposer, F as FormWrapper, k as augmentWithCountryConfigs, o as omitObscuredFieldsIfUnchanged, l as isValidationError, p as processValidationErrors, n as isIdDocumentUploadError, q as isBankStatementUploadError, r as isMaintenanceModeError, s as mapCreateOrUpdateTransferInstrumentErrorMessageToTranslatable, t as getFileExtention, S as SOLE_PROP_COUNTRIES, v as formatObject, w as composePerScenarioFormConfigurations, x as getProp, y as getFieldsWithExistingData, z as hasDataChanged, A as useCreateLegalEntity, B as useUpdateLegalEntity, D as trackNavigation, E as fieldsPerScenario, G as nomineeDecisionMakerRoleValidationRules, H as contactDetailsValidationRules, I as nameValidationRulesV4, J as nameValidationRules, K as adjustIdentificationData, L as useIdVerificationToken, M as useValidatePhoneNumberImperatively, N as useVerifyIdNumber, O as useMultiForm, P as useScenarios, Q as mandateIdVerificationForMotionCapture, R as mapApiDocumentToIndividualDocuments, T as useIdVerificationStartCheck, U as FormContextProvider, V as mapIndividualDocumentToApiDocument, W as mergeAttachments, X as onfidoDocumentTypeMapping, Y as IndividualDropin, Z as useSingpassMyInfoLogin, C as CreateIndividualComponent } from "./CreateIndividualComponent-BhczFqlN.js";
10
+ import { c as createLogger, u as useLegalEntity, a as useApiContext, b as useQuery, h as httpPost, d as httpGet, e as useMutation, f as useQueryClient, g as createFormRules, m as mapPayoutAccountSchemaToApiBankAccount, p as payoutComponentKeyMapping, k as keysOf, s as summaryItem, C as CountryCodes, i as useI18nContext, j as useAnalyticsContext, l as useToastContext, n as useExperimentsContext, o as useSettingsContext, q as getLegalEntityCountry, r as currencyByCountry, t as getLegalEntityNameBasedOnType, T as TaskTypes, v as useStateContext, w as getCapabilityProblems, x as isProviderWidgetInline, S as SettingNames, y as cloneObject, z as datasetUtilities, A as payoutSteps, L as LoaderWrapper, M as Modal, B as ModalHeader, D as ModalContent, E as Typography, F as ModalFooter, G as Button, P as PayoutDetails, H as isEmpty, I as useCoreContext, J as LegalEntityType, K as Loader, N as TaskStatus, O as Skeleton, Q as Icon, R as useInvalidateRootLegalEntity, U as httpDelete, V as Alert, W as Card, X as StructuredList, Y as Spacer, Z as IconButton, _ as Confirm, $ as entriesOf, a0 as useDataset, a1 as datasetIdentifier, a2 as useLocalStorage, a3 as getLegalRepresentative, a4 as doesLegalEntityRequiresLegalRepresentative, a5 as ProviderButton, a6 as isPartOfTrustFromLegalEntity, a7 as hasSolePropInLegalEntity, a8 as hasOwnEntityAssociationOfType, a9 as isEmptyEntity, aa as CompanyTypesValue, ab as EntityType, ac as DATA_MISSING_DECISION_MAKER_ERROR_CODE_MAPPING, ad as handleKeys, ae as noop, af as CardGroup, ag as useSetting, ah as useTasks, ai as useGetTaskStatus, aj as isPartOfUnincorporatedPartnership, ak as getOwnSignatories, al as getOwnDecisionMakersLegalEntityIds, am as getOwnSolePropProblems, an as getOwnTrustProblems, ao as getOwnUnincorporatedPartnershipProblems, ap as getCapabilities, aq as ALLOWED_UNINCORPORATED_PARTNERSHIP_COUNTRIES, ar as MemoizedDocumentUpload, as as List, at as useGlobalData, au as getForms, av as BasicInformation, aw as getFormProps, ax as CompanyStructure, ay as AdditionalInformation, az as MemoizedConstitutionalDocument, aA as FinancialInformation, aB as StateCodesUS, aC as objectsDeepEqual, aD as drop, aE as businessDetailsComponentsKeyMapping, aF as solePropBusinessDetailsKeyMapping, aG as operationalAddressIsSameIds, aH as COUNTRIES_USING_COMPANY_SEARCH, aI as FIELDS_NEEDED_FOR_COMPANY_SEARCH, aJ as isUndefinedOrNull, aK as solePropBusinessDetailsApiKeyMapping, aL as businessDetailsApiKeyMapping, aM as isEmpty$1, aN as COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT, aO as mapAddressLabels, aP as companyTypeMetadata, aQ as filterOutUnwantedAssociationsIfRootLE, aR as documentFormsIds, aS as resolveFieldMetadata, aT as defaultFieldMetadata, aU as inferCompanyRegistrationNumberType, aV as getCompanyRegistrationNumberOptions, aW as defaultFieldConfig, aX as defaultFieldMetadata$1, aY as countryToTaxInfoTypeMap, aZ as defaultFieldConfig$1, a_ as getKeyForField, a$ as getOwnEntityAssociations, b0 as doArraysMatch, b1 as setIsBankAccountRequestedForOrganization, b2 as getAssociatedLeAnalyticsPayload, b3 as rules$2, b4 as solePropBusinessDetailsDocumentMapping, b5 as businessDetailsDocumentMapping, b6 as reverseMapping, b7 as eeaCountries, b8 as localizeDateString, b9 as Field, ba as Select, bb as RadioGroup, bc as Link, bd as InputText, be as InputNumber, bf as InputDate, bg as Currency, bh as CURRENCY_FIELD, bi as InputCurrency, bj as useForm, bk as useGlobalDataSlice, bl as ErrorPanel, bm as createFormUtils, bn as getAddressSchemaForCountry, bo as COUNTRIES_WITH_STATES_DATASET, bp as Address, bq as getAddressSchemaLabelsByCountry, br as Currencies, bs as InputGroup, bt as TextArea, bu as CountryField, bv as useId, bw as KEYBOARD_KEYS, bx as Svg, by as Dropzone, bz as useLegalEntities, bA as addressValidators, bB as isTruthyValidator, bC as getSSNType, bD as defaultFieldMetadata$2, bE as defaultFieldConfig$2, bF as getAgeToday, bG as euCountries, bH as DecisionMakerType, bI as allowedCountriesForNominee, bJ as getLocalizedIdDocumentTypeOptions, bK as Scenarios, bL as licenseCardNumberDefaultMetadata, bM as licenseCardNumberDefaultConfig, bN as mergeFieldMetadataIntoProps, bO as useFormContext, bP as getFieldProps, bQ as idNumberFields, bR as IdentityNumber, bS as additionallIdNumberOptions, bT as MaskedInput, bU as formatDateObj, bV as DriversLicense, bW as addressFields, bX as getDefaultTaxIdNumberType, bY as FormHeader, bZ as IndividualIdNumberTypeSelector, b_ as TaxInformationField, b$ as PatriotActDisclosure, c0 as nameFields, c1 as decisionMakerRoleFields, c2 as nomineeFields, c3 as contactDetailFields, c4 as ContextGuidance, c5 as TrustedFieldsProvider, c6 as DecisionMakerRole, c7 as NomineeDecisionMakerRole, c8 as Name, c9 as ContactDetails, ca as RadioWithLabel, cb as pick, cc as IdVerification, cd as showIndividualMotionCapture, ce as IdDocumentManualUpload, cf as idDocumentUploadFields, cg as useFormRouterContext, ch as setShowIndividualMotionCapture, ci as shouldShowMotionCapture, cj as hasMotionCaptureScenario, ck as MemoizedProofOfRelationship, cl as MemoizedProofOfResidencyUpload, cm as useProviderStatus, cn as getAsyncIdNumberValidationRule, co as getAsyncPhoneValidationRules, cp as setHasMotionCaptureScenario, cq as getAllowedDecisionMakerRoles, cr as hasNomineesChanged, cs as attachNomineeToRole, ct as TrustMemberTypes, cu as useGlobalStore, cv as defaultFieldMetadata$3, cw as defaultFieldConfig$3, cx as MultiSelectList, cy as makeSelectItemForRole, cz as RadioGroupCard, cA as COUNTRY_FIELD, cB as LegalCompanyNameField, cC as LEGAL_COMPANY_NAME_FIELD, cD as getRoleName, cE as summaryStep, cF as FormNavigation, cG as Summary, cH as ActionBar, cI as updateTaxInformation, cJ as TrustTypes, cK as UNINCORPORATED_PARTNERSHIP_COUNTRIES_VAT_NUMBER_OPTIONAL, cL as UNINCORPORATED_PARTNERSHIP_COUNTRIES_REGISTRATION_NUMBER_REQUIRED, cM as UNINCORPORATED_PARTNERSHIP_COUNTRIES_REGISTRATION_NUMBER_OPTIONAL, cN as UNINCORPORATED_PARTNERSHIP_COUNTRIES_TAX_INFORMATION_REQUIRED, cO as UNINCORPORATED_PARTNERSHIP_COUNTRIES_TAX_INFORMATION_OPTIONAL, cP as trustComponentsKeyMapping, cQ as trustApiKeyMapping, cR as trustDocumentMapping, cS as trustForms, cT as Trust, cU as trustTypeOptions, cV as trustConstitutionalDocumentFormId, cW as UnincorporatedPartnershipMemberTypes, cX as getDecisionMakerDescriptionMap, cY as TRUST_DEFAULT_DESCRIPTIONS_MAP, cZ as getRoleTagVariant, c_ as DEFAULT_TRUST_MEMBER_REQUIREMENTS, c$ as deleteUnincorporatedPartnershipMember, d0 as mapEntityAssociationsToUnincorporatedPartnershipMembers, d1 as hasAllCapabilitiesResolved, d2 as hasRejectedCapabilities, d3 as getPayoutAccountHolderName, d4 as getOwnDecisionMakers, d5 as MaybeModal, d6 as Checkbox, d7 as listify, d8 as uuidv4, d9 as EventEmitter, da as SettingsProvider, db as ExperimentsContextProvider, dc as ApiProvider, dd as QueryClientProvider, de as StoreProvider, df as AnalyticsProvider, dg as CoreProvider, dh as I18nProvider, di as DebugListener, dj as ToastContextProvider, dk as StateProvider, dl as ReactQueryDevtools2, dm as FALLBACK_LOCALE, dn as setSdkToken, dp as setSdkTokenHandler } from "./EventEmitter-BdbTrGMk.js";
11
+ import { u as useTermsOfServiceAcceptanceInfos, a as useTermsOfServiceStatus, d as downloadFile, F as FormEndState, O as OutlinedIcon, C as ContractViewer, A as AcceptTermsOfServiceComponent } from "./AcceptTermsOfServiceComponent-Cnv5ZPl5.js";
12
+ import { g as getDocument, m as mapExistingFile, a as getPageName, c as createDocumentRequest, b as mapWith, d as documentApiUtils, u as useScenarioConfiguration, e as getPropsFromConfigurations, f as useUnifyLoadingStatus, h as getRequiredForms, i as addValidityToForms, j as useFormComposer, F as FormWrapper, k as augmentWithCountryConfigs, o as omitObscuredFieldsIfUnchanged, l as isValidationError, p as processValidationErrors, n as isIdDocumentUploadError, q as isBankStatementUploadError, r as isMaintenanceModeError, s as mapCreateOrUpdateTransferInstrumentErrorMessageToTranslatable, t as getFileExtention, S as SOLE_PROP_COUNTRIES, v as formatObject, w as composePerScenarioFormConfigurations, x as getProp, y as getFieldsWithExistingData, z as hasDataChanged, A as useCreateLegalEntity, B as useUpdateLegalEntity, D as trackNavigation, E as fieldsPerScenario, G as nomineeDecisionMakerRoleValidationRules, H as contactDetailsValidationRules, I as nameValidationRulesV4, J as nameValidationRules, K as adjustIdentificationData, L as useValidatePhoneNumberImperatively, M as useVerifyIdNumber, N as useMultiForm, O as useScenarios, P as mandateIdVerificationForMotionCapture, Q as mapApiDocumentToIndividualDocuments, R as useIdVerificationStartCheck, T as FormContextProvider, U as mapIndividualDocumentToApiDocument, V as mergeAttachments, W as onfidoDocumentTypeMapping, X as IndividualDropin, Y as useSingpassMyInfoLogin, C as CreateIndividualComponent } from "./CreateIndividualComponent-CXcGc6Fg.js";
13
13
  import { jsxs, jsx, Fragment } from "preact/jsx-runtime";
14
14
  import { useMemo, useState, useEffect, useCallback, useRef } from "preact/hooks";
15
15
  import cx from "classnames";
16
- import { T as Tag, a as TaskItemStatus, l as listToRecord } from "./listToRecord-1KbYZ5qe.js";
16
+ import { T as Tag, a as TaskItemStatus, l as listToRecord } from "./listToRecord-CAqI3h_G.js";
17
17
  import { lazy, Suspense } from "preact/compat";
18
18
  import { signal } from "@preact/signals";
19
19
  import isURL from "validator/es/lib/isURL.js";
@@ -38,30 +38,24 @@ function useAssociatedLegalEntity(parentLegalEntity, associationType) {
38
38
  });
39
39
  return { data, refetch, isLoading };
40
40
  }
41
- const getCheck = async (legalEntityId, url, data) => {
41
+ const getCheck = async (legalEntityId, baseUrl, data) => {
42
42
  return httpPost(
43
43
  {
44
- loadingContext: url,
45
- errorLevel: "warn",
46
- errorMessage: "Failed to check bank account",
47
- path: `legalEntities/${legalEntityId}/checks/bankAccount`,
48
- authentication: "jwt",
49
- headers: {
50
- "Content-Type": "application/json"
51
- }
44
+ baseUrl,
45
+ path: `legalEntities/${legalEntityId}/checks/bankAccount`
52
46
  },
53
47
  data
54
48
  );
55
49
  };
56
50
  const useCheck = (data, options) => {
57
- const { legalEntityId, baseUrl: url } = useApiContext();
51
+ const { rootLegalEntityId, baseUrl: url } = useApiContext();
58
52
  return useQuery({
59
53
  queryKey: ["checkAsAService", data],
60
- queryFn: () => getCheck(legalEntityId.value, url.value, data),
54
+ queryFn: () => getCheck(rootLegalEntityId.value, url.value, data),
61
55
  ...options
62
56
  });
63
57
  };
64
- const getBankVerificationProviders = async (legalEntityId, loadingContext, queryParams) => {
58
+ const getBankVerificationProviders = async (legalEntityId, baseUrl, queryParams) => {
65
59
  const { country, locale, configId } = queryParams;
66
60
  const providerParams = new URLSearchParams({
67
61
  country,
@@ -69,103 +63,73 @@ const getBankVerificationProviders = async (legalEntityId, loadingContext, query
69
63
  ...configId && { configId }
70
64
  });
71
65
  return httpGet({
72
- loadingContext,
73
- errorLevel: "warn",
74
- errorMessage: `Failed to fetch bank verification providers.`,
75
- path: `legalEntities/${legalEntityId}/transferInstruments/trusted/providers?${providerParams}`,
76
- authentication: "jwt",
77
- headers: {
78
- "Content-Type": "application/json"
79
- }
66
+ baseUrl,
67
+ path: `legalEntities/${legalEntityId}/transferInstruments/trusted/providers?${providerParams}`
80
68
  });
81
69
  };
82
70
  const useBankVerificationProviders = (queryParams, options) => {
83
- const { legalEntityId, baseUrl } = useApiContext();
71
+ const { rootLegalEntityId, baseUrl } = useApiContext();
84
72
  return useQuery({
85
73
  queryKey: ["bankVerificationProviders", queryParams],
86
- queryFn: () => getBankVerificationProviders(legalEntityId.value, baseUrl.value, queryParams),
74
+ queryFn: () => getBankVerificationProviders(rootLegalEntityId.value, baseUrl.value, queryParams),
87
75
  ...options
88
76
  });
89
77
  };
90
- const createTransferInstrument = async (rootLegalEntityId, url, transferInstrument) => {
78
+ const createTransferInstrument = async (rootLegalEntityId, baseUrl, transferInstrument) => {
91
79
  return httpPost(
92
80
  {
93
- loadingContext: url,
94
- errorLevel: "warn",
95
- errorMessage: `Failed to create transferInstrument`,
96
- path: `legalEntities/${rootLegalEntityId}/transferInstruments`,
97
- authentication: "jwt",
98
- headers: {
99
- "Content-Type": "application/json"
100
- }
81
+ baseUrl,
82
+ path: `legalEntities/${rootLegalEntityId}/transferInstruments`
101
83
  },
102
84
  transferInstrument
103
85
  );
104
86
  };
105
- const createTrustedTransferInstrument = async (legalEntityId, loadingContext, data) => {
87
+ const createTrustedTransferInstrument = async (legalEntityId, baseUrl, data) => {
106
88
  return httpPost(
107
89
  {
108
- loadingContext,
109
- errorLevel: "warn",
110
- errorMessage: `Failed to create trusted transfer instrument`,
111
- path: `legalEntities/${legalEntityId}/transferInstruments/trusted`,
112
- authentication: "jwt",
113
- headers: {
114
- "Content-Type": "application/json"
115
- }
90
+ baseUrl,
91
+ path: `legalEntities/${legalEntityId}/transferInstruments/trusted`
116
92
  },
117
93
  data
118
94
  );
119
95
  };
120
96
  const useCreateTrustedTransferInstrument = (options) => {
121
- const { legalEntityId, baseUrl } = useApiContext();
97
+ const { rootLegalEntityId, baseUrl } = useApiContext();
122
98
  return useMutation({
123
- mutationFn: (data) => createTrustedTransferInstrument(legalEntityId.value, baseUrl.value, data),
99
+ mutationFn: (data) => createTrustedTransferInstrument(rootLegalEntityId.value, baseUrl.value, data),
124
100
  ...options
125
101
  });
126
102
  };
127
- const getTransferInstrument = async (legalEntityId, loadingContext, transferInstrumentId) => {
103
+ const getTransferInstrument = async (legalEntityId, baseUrl, transferInstrumentId) => {
128
104
  return httpGet({
129
- loadingContext,
130
- errorLevel: "warn",
131
- errorMessage: `Failed to get the transfer instrument`,
132
- path: `legalEntities/${legalEntityId}/transferInstruments/${transferInstrumentId}`,
133
- authentication: "jwt",
134
- headers: {
135
- "Content-Type": "application/json"
136
- }
105
+ baseUrl,
106
+ path: `legalEntities/${legalEntityId}/transferInstruments/${transferInstrumentId}`
137
107
  });
138
108
  };
139
109
  const useTransferInstrument = (transferInstrumentId = "", options) => {
140
- const { legalEntityId, baseUrl } = useApiContext();
110
+ const { rootLegalEntityId, baseUrl } = useApiContext();
141
111
  return useQuery({
142
112
  queryKey: ["transferInstrument", transferInstrumentId],
143
- queryFn: () => getTransferInstrument(legalEntityId.value, baseUrl.value, transferInstrumentId),
113
+ queryFn: () => getTransferInstrument(rootLegalEntityId.value, baseUrl.value, transferInstrumentId),
144
114
  enabled: !!transferInstrumentId,
145
115
  ...options
146
116
  });
147
117
  };
148
- const updateTransferInstrument = async (legalEntityId, loadingContext, transferInstrument, transferInstrumentId) => {
118
+ const updateTransferInstrument = async (legalEntityId, baseUrl, transferInstrument, transferInstrumentId) => {
149
119
  return httpPost(
150
120
  {
151
- loadingContext,
152
- errorLevel: "warn",
153
- errorMessage: `Failed to update transfer instrument`,
154
- path: `legalEntities/${legalEntityId}/transferInstruments/${transferInstrumentId}`,
155
- authentication: "jwt",
156
- headers: {
157
- "Content-Type": "application/json"
158
- }
121
+ baseUrl,
122
+ path: `legalEntities/${legalEntityId}/transferInstruments/${transferInstrumentId}`
159
123
  },
160
124
  transferInstrument
161
125
  );
162
126
  };
163
127
  const useUpdateTransferInstrument = (options) => {
164
- const { legalEntityId, baseUrl } = useApiContext();
128
+ const { rootLegalEntityId, baseUrl } = useApiContext();
165
129
  const queryClient = useQueryClient();
166
130
  return useMutation({
167
131
  mutationFn: ({ transferInstrument, transferInstrumentId }) => updateTransferInstrument(
168
- legalEntityId.value,
132
+ rootLegalEntityId.value,
169
133
  baseUrl.value,
170
134
  transferInstrument,
171
135
  transferInstrumentId
@@ -450,7 +414,7 @@ function PayoutDetailsDropin({
450
414
  openBankingPartnerConfigId
451
415
  }) {
452
416
  var _a, _b, _c, _d, _e, _f, _g, _h;
453
- const { baseUrl, legalEntityId } = useApiContext();
417
+ const { baseUrl, rootLegalEntityId } = useApiContext();
454
418
  const {
455
419
  data: transferInstrument,
456
420
  refetch: refetchTransferInstrument,
@@ -497,8 +461,8 @@ function PayoutDetailsDropin({
497
461
  }
498
462
  };
499
463
  const documentUtils = documentApiUtils({
500
- loadingContext: baseUrl.value,
501
- legalEntityId: legalEntityId.value
464
+ baseUrl: baseUrl.value,
465
+ rootLegalEntityId: rootLegalEntityId.value
502
466
  });
503
467
  const {
504
468
  state: { currentState }
@@ -723,7 +687,7 @@ function PayoutDetailsDropin({
723
687
  transferInstrument: transferInstrumentFromInput,
724
688
  transferInstrumentId: transferInstrument.id
725
689
  }) : createTransferInstrument(
726
- legalEntityId.value,
690
+ rootLegalEntityId.value,
727
691
  baseUrl.value,
728
692
  transferInstrumentFromInput
729
693
  ));
@@ -1008,7 +972,7 @@ function CreateTransferInstrumentComponent({
1008
972
  }
1009
973
  onClose == null ? void 0 : onClose();
1010
974
  };
1011
- return isLegalEntityLoading || !legalEntity ? /* @__PURE__ */ jsx(Loader, { size: "medium" }) : /* @__PURE__ */ jsx(
975
+ return isLegalEntityLoading || !legalEntity ? /* @__PURE__ */ jsx(Loader, {}) : /* @__PURE__ */ jsx(
1012
976
  PayoutDetailsDropin,
1013
977
  {
1014
978
  legalEntityResponse: legalEntity,
@@ -1025,23 +989,17 @@ function CreateTransferInstrumentComponent({
1025
989
  }
1026
990
  );
1027
991
  }
1028
- const getOnboardingStatus = async (legalEntityId, url) => {
992
+ const getOnboardingStatus = async (legalEntityId, baseUrl) => {
1029
993
  return httpGet({
1030
- loadingContext: url,
1031
- errorLevel: "warn",
1032
- errorMessage: `Fetching onboarding status was not successful`,
1033
- path: `legalEntities/${legalEntityId}/onboardingStatus`,
1034
- authentication: "jwt",
1035
- headers: {
1036
- "Content-Type": "application/json"
1037
- }
994
+ baseUrl,
995
+ path: `legalEntities/${legalEntityId}/onboardingStatus`
1038
996
  });
1039
997
  };
1040
998
  const useOnboardingStatus = (options) => {
1041
- const { legalEntityId, baseUrl } = useApiContext();
999
+ const { rootLegalEntityId, baseUrl } = useApiContext();
1042
1000
  return useQuery({
1043
1001
  queryKey: ["onboardingStatus"],
1044
- queryFn: () => getOnboardingStatus(legalEntityId.value, baseUrl.value),
1002
+ queryFn: () => getOnboardingStatus(rootLegalEntityId.value, baseUrl.value),
1045
1003
  ...options
1046
1004
  });
1047
1005
  };
@@ -1134,7 +1092,7 @@ function ManageIndividualComponent({
1134
1092
  onClick
1135
1093
  }) {
1136
1094
  var _a, _b;
1137
- const { legalEntityId: currentLegalEntityId } = useApiContext();
1095
+ const { rootLegalEntityId: currentLegalEntityId } = useApiContext();
1138
1096
  currentLegalEntityId.value = legalEntityId;
1139
1097
  const { data: legalEntityData } = useLegalEntity();
1140
1098
  const { isPending, data: onboardingStatusData } = useOnboardingStatus({
@@ -1158,26 +1116,20 @@ function ManageIndividualComponent({
1158
1116
  }
1159
1117
  );
1160
1118
  }
1161
- const getPciStatus = async (legalEntityId, url, data) => {
1119
+ const getPciStatus = async (legalEntityId, baseUrl, data) => {
1162
1120
  return httpPost(
1163
1121
  {
1164
- loadingContext: url,
1165
- errorLevel: "warn",
1166
- errorMessage: `Failed to get pci status`,
1167
- path: `legalEntities/${legalEntityId}/pci/signingRequired`,
1168
- authentication: "jwt",
1169
- headers: {
1170
- "Content-Type": "application/json"
1171
- }
1122
+ baseUrl,
1123
+ path: `legalEntities/${legalEntityId}/pci/signingRequired`
1172
1124
  },
1173
1125
  data
1174
1126
  );
1175
1127
  };
1176
1128
  const usePciStatus = (data, options) => {
1177
- const { legalEntityId, baseUrl } = useApiContext();
1129
+ const { rootLegalEntityId, baseUrl } = useApiContext();
1178
1130
  return useQuery({
1179
1131
  queryKey: ["pciStatus", data],
1180
- queryFn: () => getPciStatus(legalEntityId.value, baseUrl.value, data),
1132
+ queryFn: () => getPciStatus(rootLegalEntityId.value, baseUrl.value, data),
1181
1133
  ...options
1182
1134
  });
1183
1135
  };
@@ -1205,7 +1157,7 @@ function ManagePCIComponent({ legalEntityId, onClick }) {
1205
1157
  const title = i18n.get("pciDssQuestionnaire");
1206
1158
  const additionalSalesChannels = useSalesChannelsSettings();
1207
1159
  const { data, isLoading } = usePciStatus({ additionalSalesChannels });
1208
- const { legalEntityId: currentLegalEntityId } = useApiContext();
1160
+ const { rootLegalEntityId: currentLegalEntityId } = useApiContext();
1209
1161
  currentLegalEntityId.value = legalEntityId;
1210
1162
  return (data == null ? void 0 : data.signingRequired) ? /* @__PURE__ */ jsx(
1211
1163
  EmbeddedStatus,
@@ -1222,7 +1174,7 @@ function ManageTermsOfServiceComponent({
1222
1174
  onClick
1223
1175
  }) {
1224
1176
  var _a;
1225
- const { legalEntityId: currentLegalEntityId } = useApiContext();
1177
+ const { rootLegalEntityId: currentLegalEntityId } = useApiContext();
1226
1178
  currentLegalEntityId.value = legalEntityId;
1227
1179
  const { i18n } = useI18nContext();
1228
1180
  const { isLoading: isLoadingSigned, data: signedData } = useTermsOfServiceAcceptanceInfos();
@@ -1242,46 +1194,34 @@ function ManageTermsOfServiceComponent({
1242
1194
  }
1243
1195
  );
1244
1196
  }
1245
- const deleteTransferInstrument = async (legalEntityId, loadingContext, transferInstrumentId) => {
1197
+ const deleteTransferInstrument = async (legalEntityId, baseUrl, transferInstrumentId) => {
1246
1198
  return httpDelete({
1247
- loadingContext,
1248
- errorLevel: "warn",
1249
- errorMessage: `Failed to delete transfer instrument`,
1250
- path: `legalEntities/${legalEntityId}/transferInstruments/${transferInstrumentId}`,
1251
- authentication: "jwt",
1252
- headers: {
1253
- "Content-Type": "application/json"
1254
- }
1199
+ baseUrl,
1200
+ path: `legalEntities/${legalEntityId}/transferInstruments/${transferInstrumentId}`
1255
1201
  });
1256
1202
  };
1257
1203
  const useDeleteTransferInstrument = (options) => {
1258
- const { legalEntityId, baseUrl } = useApiContext();
1204
+ const { rootLegalEntityId, baseUrl } = useApiContext();
1259
1205
  const invalidateRootLegalEntity = useInvalidateRootLegalEntity();
1260
1206
  return useMutation({
1261
- mutationFn: (transferInstrumentId) => deleteTransferInstrument(legalEntityId.value, baseUrl.value, transferInstrumentId),
1207
+ mutationFn: (transferInstrumentId) => deleteTransferInstrument(rootLegalEntityId.value, baseUrl.value, transferInstrumentId),
1262
1208
  onSuccess: async () => {
1263
1209
  await invalidateRootLegalEntity();
1264
1210
  },
1265
1211
  ...options
1266
1212
  });
1267
1213
  };
1268
- const getTransferInstruments = async (legalEntityId, loadingContext) => {
1214
+ const getTransferInstruments = async (legalEntityId, baseUrl) => {
1269
1215
  return httpGet({
1270
- loadingContext,
1271
- errorLevel: "warn",
1272
- errorMessage: `Failed to get transfer instruments`,
1273
- path: `legalEntities/${legalEntityId}/transferInstruments`,
1274
- authentication: "jwt",
1275
- headers: {
1276
- "Content-Type": "application/json"
1277
- }
1216
+ baseUrl,
1217
+ path: `legalEntities/${legalEntityId}/transferInstruments`
1278
1218
  });
1279
1219
  };
1280
1220
  const useTransferInstruments = (options) => {
1281
- const { legalEntityId, baseUrl } = useApiContext();
1221
+ const { rootLegalEntityId, baseUrl } = useApiContext();
1282
1222
  return useQuery({
1283
1223
  queryKey: ["transferInstruments"],
1284
- queryFn: () => getTransferInstruments(legalEntityId.value, baseUrl.value),
1224
+ queryFn: () => getTransferInstruments(rootLegalEntityId.value, baseUrl.value),
1285
1225
  ...options
1286
1226
  });
1287
1227
  };
@@ -1538,7 +1478,7 @@ function ManageTransferInstrumentComponent({
1538
1478
  onInitiateRemove,
1539
1479
  onRemoveSuccess
1540
1480
  }) {
1541
- const { legalEntityId: currentLegalEntityId } = useApiContext();
1481
+ const { rootLegalEntityId: currentLegalEntityId } = useApiContext();
1542
1482
  currentLegalEntityId.value = legalEntityId;
1543
1483
  const { i18n } = useI18nContext();
1544
1484
  const { showToast } = useToastContext();
@@ -1594,23 +1534,17 @@ function ManageTransferInstrumentComponent({
1594
1534
  };
1595
1535
  return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-manage-transfer-instrument", children: render2() });
1596
1536
  }
1597
- const getTaskTypes = async (id, url) => {
1537
+ const getTaskTypes = async (id, baseUrl) => {
1598
1538
  return httpGet({
1599
- loadingContext: url,
1600
- errorLevel: "warn",
1601
- errorMessage: `Tasks not available`,
1602
- path: `legalEntities/${id}/configurations/tasks`,
1603
- authentication: "jwt",
1604
- headers: {
1605
- "Content-Type": "application/json"
1606
- }
1539
+ baseUrl,
1540
+ path: `legalEntities/${id}/configurations/tasks`
1607
1541
  });
1608
1542
  };
1609
1543
  const useTaskTypes = (options) => {
1610
- const { legalEntityId, baseUrl } = useApiContext();
1544
+ const { rootLegalEntityId, baseUrl } = useApiContext();
1611
1545
  return useQuery({
1612
1546
  queryKey: ["taskTypes"],
1613
- queryFn: () => getTaskTypes(legalEntityId.value, baseUrl.value),
1547
+ queryFn: () => getTaskTypes(rootLegalEntityId.value, baseUrl.value),
1614
1548
  ...options
1615
1549
  });
1616
1550
  };
@@ -1730,55 +1664,37 @@ const SingpassBanner = ({
1730
1664
  }
1731
1665
  );
1732
1666
  };
1733
- const getPciQuestionnaire = async (legalEntityId, url, documentId) => {
1667
+ const getPciQuestionnaire = async (legalEntityId, baseUrl, documentId) => {
1734
1668
  return httpGet({
1735
- loadingContext: url,
1736
- errorLevel: "warn",
1737
- errorMessage: `Failed to download pci document`,
1738
- path: `legalEntities/${legalEntityId}/pci/questionnaires/${documentId}`,
1739
- authentication: "jwt",
1740
- headers: {
1741
- "Content-Type": "application/json"
1742
- }
1669
+ baseUrl,
1670
+ path: `legalEntities/${legalEntityId}/pci/questionnaires/${documentId}`
1743
1671
  });
1744
1672
  };
1745
- const getPciQuestionnaireList = async (legalEntityId, url) => {
1673
+ const getPciQuestionnaireList = async (legalEntityId, baseUrl) => {
1746
1674
  return httpGet({
1747
- loadingContext: url,
1748
- errorLevel: "warn",
1749
- errorMessage: `Failed to get pci questionnaires`,
1750
- path: `legalEntities/${legalEntityId}/pci/questionnaires`,
1751
- authentication: "jwt",
1752
- headers: {
1753
- "Content-Type": "application/json"
1754
- }
1675
+ baseUrl,
1676
+ path: `legalEntities/${legalEntityId}/pci/questionnaires`
1755
1677
  });
1756
1678
  };
1757
1679
  const usePciQuestionnaireList = (options) => {
1758
- const { legalEntityId, baseUrl } = useApiContext();
1680
+ const { rootLegalEntityId, baseUrl } = useApiContext();
1759
1681
  return useQuery({
1760
1682
  queryKey: ["pciQuestionnaireList"],
1761
- queryFn: () => getPciQuestionnaireList(legalEntityId.value, baseUrl.value),
1683
+ queryFn: () => getPciQuestionnaireList(rootLegalEntityId.value, baseUrl.value),
1762
1684
  ...options
1763
1685
  });
1764
1686
  };
1765
- const getTaskStatus = async (legalEntityId, url) => {
1687
+ const getTaskStatus = async (legalEntityId, baseUrl) => {
1766
1688
  return httpGet({
1767
- loadingContext: url,
1768
- errorLevel: "warn",
1769
- errorMessage: `Failed to fetch Business lines`,
1770
- path: `legalEntities/${legalEntityId}/taskStatus`,
1771
- authentication: "jwt",
1772
- headers: {
1773
- "Content-Type": "application/json"
1774
- }
1689
+ baseUrl,
1690
+ path: `legalEntities/${legalEntityId}/taskStatus`
1775
1691
  });
1776
1692
  };
1777
1693
  const useTaskStatus = (options) => {
1778
- const { legalEntityId, baseUrl } = useApiContext();
1694
+ const { rootLegalEntityId, baseUrl } = useApiContext();
1779
1695
  return useQuery({
1780
1696
  queryKey: ["taskStatus"],
1781
- queryFn: () => getTaskStatus(legalEntityId.value, baseUrl.value),
1697
+ queryFn: () => getTaskStatus(rootLegalEntityId.value, baseUrl.value),
1782
1698
  ...options
1783
1699
  });
1784
1700
  };
@@ -2226,15 +2142,15 @@ function TaskList({
2226
2142
  const showDecisionMakersWarning = Boolean(
2227
2143
  getOwnDecisionMakersLegalEntityIds(legalEntityResponse).length && remediationMessages.DECISION_MAKER
2228
2144
  );
2229
- const { legalEntityId, baseUrl } = useApiContext();
2145
+ const { rootLegalEntityId, baseUrl } = useApiContext();
2230
2146
  const onPciDownload = async () => {
2231
2147
  try {
2232
- const response = await getPciQuestionnaireList(legalEntityId.value, baseUrl.value);
2148
+ const response = await getPciQuestionnaireList(rootLegalEntityId.value, baseUrl.value);
2233
2149
  if (!response.data) return;
2234
2150
  await Promise.all(
2235
2151
  response.data.map(async (pciQuestionnaireInfo) => {
2236
2152
  const pciQuestionnaire = await getPciQuestionnaire(
2237
- legalEntityId.value,
2153
+ rootLegalEntityId.value,
2238
2154
  baseUrl.value,
2239
2155
  pciQuestionnaireInfo.id
2240
2156
  );
@@ -2557,185 +2473,149 @@ function TaskList({
2557
2473
  ] })
2558
2474
  ] });
2559
2475
  }
2560
- const clearCompanyData = async (legalEntityId, url) => {
2476
+ const clearCompanyData = async (legalEntityId, baseUrl) => {
2561
2477
  return httpPost({
2562
- loadingContext: url,
2563
- errorLevel: "warn",
2564
- errorMessage: `Failed to refresh company dataset`,
2565
- path: `legalEntities/${legalEntityId}/companyDataset/clearCompanyData`,
2566
- authentication: "jwt",
2567
- headers: {
2568
- "Content-Type": "application/json"
2569
- }
2478
+ baseUrl,
2479
+ path: `legalEntities/${legalEntityId}/companyDataset/clearCompanyData`
2570
2480
  });
2571
2481
  };
2572
2482
  const useClearCompanyData = (options) => {
2573
- const { legalEntityId, baseUrl } = useApiContext();
2483
+ const { rootLegalEntityId, baseUrl } = useApiContext();
2574
2484
  return useMutation({
2575
2485
  mutationFn: () => {
2576
- return clearCompanyData(legalEntityId.value, baseUrl.value);
2486
+ return clearCompanyData(rootLegalEntityId.value, baseUrl.value);
2577
2487
  },
2578
2488
  retry: 0,
2579
2489
  ...options
2580
2490
  });
2581
2491
  };
2582
- const getCompanyDataset = async (rootLegalEntityId, url, data) => {
2492
+ const getCompanyDataset = async (rootLegalEntityId, baseUrl, data) => {
2583
2493
  return httpPost(
2584
2494
  {
2585
- loadingContext: url,
2586
- errorLevel: "warn",
2587
- errorMessage: `Failed to get company dataset`,
2588
- path: `legalEntities/${rootLegalEntityId}/companyDataset`,
2589
- authentication: "jwt",
2590
- headers: { "Content-Type": "application/json" }
2495
+ baseUrl,
2496
+ path: `legalEntities/${rootLegalEntityId}/companyDataset`
2591
2497
  },
2592
2498
  data
2593
2499
  );
2594
2500
  };
2595
2501
  const useCompanyDataset = (options) => {
2596
- const { legalEntityId, baseUrl } = useApiContext();
2502
+ const { rootLegalEntityId, baseUrl } = useApiContext();
2597
2503
  return useMutation({
2598
2504
  mutationFn: (payload) => {
2599
- return getCompanyDataset(legalEntityId.value, baseUrl.value, payload);
2505
+ return getCompanyDataset(rootLegalEntityId.value, baseUrl.value, payload);
2600
2506
  },
2601
2507
  retry: 0,
2602
2508
  ...options
2603
2509
  });
2604
2510
  };
2605
- const refreshCompanyDataset = async (rootLegalEntityId, url, data) => {
2511
+ const refreshCompanyDataset = async (rootLegalEntityId, baseUrl, data) => {
2606
2512
  return httpPost(
2607
2513
  {
2608
- loadingContext: url,
2609
- errorLevel: "warn",
2610
- errorMessage: `Failed to get company dataset`,
2611
- path: `legalEntities/${rootLegalEntityId}/companyDataset/refreshed`,
2612
- authentication: "jwt",
2613
- headers: { "Content-Type": "application/json" }
2514
+ baseUrl,
2515
+ path: `legalEntities/${rootLegalEntityId}/companyDataset/refreshed`
2614
2516
  },
2615
2517
  data
2616
2518
  );
2617
2519
  };
2618
2520
  const useRefreshCompanyDataset = (options) => {
2619
- const { legalEntityId, baseUrl } = useApiContext();
2521
+ const { rootLegalEntityId, baseUrl } = useApiContext();
2620
2522
  return useMutation({
2621
2523
  mutationFn: (payload) => {
2622
- return refreshCompanyDataset(legalEntityId.value, baseUrl.value, payload);
2524
+ return refreshCompanyDataset(rootLegalEntityId.value, baseUrl.value, payload);
2623
2525
  },
2624
2526
  retry: 0,
2625
2527
  ...options
2626
2528
  });
2627
2529
  };
2628
- const companyDeepSearch = async (rootLegalEntityId, url, data) => {
2530
+ const companyDeepSearch = async (rootLegalEntityId, baseUrl, data) => {
2629
2531
  return httpPost(
2630
2532
  {
2631
- loadingContext: url,
2632
- errorLevel: "warn",
2633
- errorMessage: `Failed to use company deep search`,
2634
- path: `legalEntities/${rootLegalEntityId}/companySearch/deep`,
2635
- authentication: "jwt",
2636
- headers: { "Content-Type": "application/json" }
2533
+ baseUrl,
2534
+ path: `legalEntities/${rootLegalEntityId}/companySearch/deep`
2637
2535
  },
2638
2536
  data
2639
2537
  );
2640
2538
  };
2641
2539
  const useCompanyDeepSearch = (options) => {
2642
- const { legalEntityId, baseUrl } = useApiContext();
2540
+ const { rootLegalEntityId, baseUrl } = useApiContext();
2643
2541
  return useMutation({
2644
2542
  mutationFn: (payload) => {
2645
- return companyDeepSearch(legalEntityId.value, baseUrl.value, payload);
2543
+ return companyDeepSearch(rootLegalEntityId.value, baseUrl.value, payload);
2646
2544
  },
2647
2545
  retry: 0,
2648
2546
  ...options
2649
2547
  });
2650
2548
  };
2651
- const companyIndexSearch = async (rootLegalEntityId, url, data) => {
2549
+ const companyIndexSearch = async (rootLegalEntityId, baseUrl, data) => {
2652
2550
  return httpPost(
2653
2551
  {
2654
- loadingContext: url,
2655
- errorLevel: "warn",
2656
- errorMessage: `Failed to use company index search`,
2657
- path: `legalEntities/${rootLegalEntityId}/companySearch`,
2658
- authentication: "jwt",
2659
- headers: { "Content-Type": "application/json" }
2552
+ baseUrl,
2553
+ path: `legalEntities/${rootLegalEntityId}/companySearch`
2660
2554
  },
2661
2555
  data
2662
2556
  );
2663
2557
  };
2664
2558
  const useCompanyIndexSearch = (options) => {
2665
- const { legalEntityId, baseUrl } = useApiContext();
2559
+ const { rootLegalEntityId, baseUrl } = useApiContext();
2666
2560
  return useMutation({
2667
2561
  mutationFn: (payload) => {
2668
- return companyIndexSearch(legalEntityId.value, baseUrl.value, payload);
2562
+ return companyIndexSearch(rootLegalEntityId.value, baseUrl.value, payload);
2669
2563
  },
2670
2564
  retry: 0,
2671
2565
  ...options
2672
2566
  });
2673
2567
  };
2674
- const companyRegistrationNumberDeepSearch = async (rootLegalEntityId, url, data) => {
2568
+ const companyRegistrationNumberDeepSearch = async (rootLegalEntityId, baseUrl, data) => {
2675
2569
  return httpPost(
2676
2570
  {
2677
- loadingContext: url,
2678
- errorLevel: "warn",
2679
- errorMessage: `Failed to use company deep search by registration number`,
2680
- path: `legalEntities/${rootLegalEntityId}/companySearch/deepSearchByRegistrationNumber`,
2681
- authentication: "jwt",
2682
- headers: { "Content-Type": "application/json" }
2571
+ baseUrl,
2572
+ path: `legalEntities/${rootLegalEntityId}/companySearch/deepSearchByRegistrationNumber`
2683
2573
  },
2684
2574
  data
2685
2575
  );
2686
2576
  };
2687
2577
  const useCompanyRegistrationNumberDeepSearch = (options) => {
2688
- const { legalEntityId, baseUrl } = useApiContext();
2578
+ const { rootLegalEntityId, baseUrl } = useApiContext();
2689
2579
  return useMutation({
2690
2580
  mutationFn: (payload) => {
2691
- return companyRegistrationNumberDeepSearch(legalEntityId.value, baseUrl.value, payload);
2581
+ return companyRegistrationNumberDeepSearch(rootLegalEntityId.value, baseUrl.value, payload);
2692
2582
  },
2693
2583
  retry: 0,
2694
2584
  ...options
2695
2585
  });
2696
2586
  };
2697
- const companyRegistrationNumberIndexSearch = async (rootLegalEntityId, url, data) => {
2587
+ const companyRegistrationNumberIndexSearch = async (rootLegalEntityId, baseUrl, data) => {
2698
2588
  return httpPost(
2699
2589
  {
2700
- loadingContext: url,
2701
- errorLevel: "warn",
2702
- errorMessage: `Failed to use company index search by registration number`,
2703
- path: `legalEntities/${rootLegalEntityId}/companySearch/searchByRegistrationNumber`,
2704
- authentication: "jwt",
2705
- headers: { "Content-Type": "application/json" }
2590
+ baseUrl,
2591
+ path: `legalEntities/${rootLegalEntityId}/companySearch/searchByRegistrationNumber`
2706
2592
  },
2707
2593
  data
2708
2594
  );
2709
2595
  };
2710
2596
  const useCompanyRegistrationNumberIndexSearch = (options) => {
2711
- const { legalEntityId, baseUrl } = useApiContext();
2597
+ const { rootLegalEntityId, baseUrl } = useApiContext();
2712
2598
  return useMutation({
2713
2599
  mutationFn: (payload) => {
2714
- return companyRegistrationNumberIndexSearch(legalEntityId.value, baseUrl.value, payload);
2600
+ return companyRegistrationNumberIndexSearch(rootLegalEntityId.value, baseUrl.value, payload);
2715
2601
  },
2716
2602
  retry: 0,
2717
2603
  ...options
2718
2604
  });
2719
2605
  };
2720
- const verifyTin = async (legalEntityId, url, data) => {
2606
+ const verifyTin = async (legalEntityId, baseUrl, data) => {
2721
2607
  return httpPost(
2722
2608
  {
2723
- loadingContext: url,
2724
- errorLevel: "warn",
2725
- errorMessage: `Failed to verify tin`,
2726
- path: `legalEntities/${legalEntityId}/verifyTin`,
2727
- authentication: "jwt",
2728
- headers: {
2729
- "Content-Type": "application/json"
2730
- }
2609
+ baseUrl,
2610
+ path: `legalEntities/${legalEntityId}/verifyTin`
2731
2611
  },
2732
2612
  data
2733
2613
  );
2734
2614
  };
2735
2615
  const useVerifyTin = (options) => {
2736
- const { legalEntityId, baseUrl } = useApiContext();
2616
+ const { rootLegalEntityId, baseUrl } = useApiContext();
2737
2617
  return useMutation({
2738
- mutationFn: (data) => verifyTin(legalEntityId.value, baseUrl.value, data),
2618
+ mutationFn: (data) => verifyTin(rootLegalEntityId.value, baseUrl.value, data),
2739
2619
  ...options
2740
2620
  });
2741
2621
  };
@@ -4646,7 +4526,7 @@ function BusinessDetailsDropin({
4646
4526
  const userEvents = useAnalyticsContext();
4647
4527
  const { isExperimentEnabled } = useExperimentsContext();
4648
4528
  const { isSettingEnabled } = useSettingsContext();
4649
- const { baseUrl, legalEntityId } = useApiContext();
4529
+ const { baseUrl, rootLegalEntityId } = useApiContext();
4650
4530
  const {
4651
4531
  state: { currentState }
4652
4532
  } = useStateContext();
@@ -4710,8 +4590,8 @@ function BusinessDetailsDropin({
4710
4590
  const [loadingStatus, setLoadingStatus] = useState("success");
4711
4591
  const [businessMismatchModalOpen, setBusinessMismatchModalOpen] = useState(false);
4712
4592
  const documentUtils = documentApiUtils({
4713
- loadingContext: baseUrl.value,
4714
- legalEntityId: legalEntityId.value
4593
+ baseUrl: baseUrl.value,
4594
+ rootLegalEntityId: rootLegalEntityId.value
4715
4595
  });
4716
4596
  useEffect(() => {
4717
4597
  var _a2;
@@ -5625,16 +5505,10 @@ const canSubmit = (data) => MANDATORY_FIELDS_HIGH_EXPOSURE.every((detail) => {
5625
5505
  return !isEmpty(value);
5626
5506
  });
5627
5507
  const mapLegalEntityToHighExposure = (legalEntity) => formatObject(legalEntity, highExposureComponentsKeyMapping);
5628
- const getLegalForms = async (countryCode, loadingContext) => {
5508
+ const getLegalForms = async (countryCode, baseUrl) => {
5629
5509
  return httpGet({
5630
- loadingContext,
5631
- errorLevel: "warn",
5632
- errorMessage: `Failed to get legal forms`,
5633
- path: `datasets/legalForms/${countryCode}`,
5634
- authentication: "jwt",
5635
- headers: {
5636
- "Content-Type": "application/json"
5637
- }
5510
+ baseUrl,
5511
+ path: `datasets/legalForms/${countryCode}`
5638
5512
  });
5639
5513
  };
5640
5514
  const useLegalForms = (countryCode, options) => {
@@ -5698,16 +5572,10 @@ function LegalFormField({
5698
5572
  }
5699
5573
  );
5700
5574
  }
5701
- const getNaceCodes = async (loadingContext) => {
5575
+ const getNaceCodes = async (baseUrl) => {
5702
5576
  return httpGet({
5703
- loadingContext,
5704
- errorLevel: "warn",
5705
- errorMessage: `Failed to get legal forms`,
5706
- path: `datasets/naceCodes`,
5707
- authentication: "jwt",
5708
- headers: {
5709
- "Content-Type": "application/json"
5710
- }
5577
+ baseUrl,
5578
+ path: `datasets/naceCodes`
5711
5579
  });
5712
5580
  };
5713
5581
  const useNaceCodes = (options) => {
@@ -7231,7 +7099,7 @@ function HighExposureDropin(props) {
7231
7099
  ) })
7232
7100
  ] });
7233
7101
  if (!(defaultData == null ? void 0 : defaultData.company)) {
7234
- return /* @__PURE__ */ jsx(Loader, { size: "medium" });
7102
+ return /* @__PURE__ */ jsx(Loader, {});
7235
7103
  }
7236
7104
  return showEndState ? /* @__PURE__ */ jsxs(FormEndState, { variant: "success", children: [
7237
7105
  /* @__PURE__ */ jsx("template", { slot: "title", children: i18n.get("applicationSubmittedSuccessfully") }),
@@ -7266,44 +7134,34 @@ function HighExposureDropin(props) {
7266
7134
  }
7267
7135
  );
7268
7136
  }
7269
- const getBusinessLines = async (legalEntityId, url) => {
7137
+ const getBusinessLines = async (legalEntityId, baseUrl) => {
7270
7138
  return httpGet({
7271
- loadingContext: url,
7272
- errorLevel: "warn",
7273
- errorMessage: `Failed to fetch Business lines`,
7274
- path: `legalEntities/${legalEntityId}/businessLines`,
7275
- authentication: "jwt",
7276
- headers: {
7277
- "Content-Type": "application/json"
7278
- }
7139
+ baseUrl,
7140
+ path: `legalEntities/${legalEntityId}/businessLines`
7279
7141
  });
7280
7142
  };
7281
7143
  const useBusinessLines = (options) => {
7282
- const { legalEntityId, baseUrl } = useApiContext();
7144
+ const { rootLegalEntityId, baseUrl } = useApiContext();
7283
7145
  return useQuery({
7284
7146
  queryKey: ["businessLines"],
7285
- queryFn: () => getBusinessLines(legalEntityId.value, baseUrl.value),
7147
+ queryFn: () => getBusinessLines(rootLegalEntityId.value, baseUrl.value),
7286
7148
  ...options
7287
7149
  });
7288
7150
  };
7289
- const updateSourceOfFunds = async (businessLineId, legalEntityId, url, data) => {
7151
+ const updateSourceOfFunds = async (businessLineId, legalEntityId, baseUrl, data) => {
7290
7152
  return httpPost(
7291
7153
  {
7292
- loadingContext: url,
7293
- errorLevel: "warn",
7294
- errorMessage: `Failed to sign pci`,
7295
- path: `legalEntities/${legalEntityId}/businessLines/${businessLineId}/sourceOfFunds`,
7296
- authentication: "jwt",
7297
- headers: { "Content-Type": "application/json" }
7154
+ baseUrl,
7155
+ path: `legalEntities/${legalEntityId}/businessLines/${businessLineId}/sourceOfFunds`
7298
7156
  },
7299
7157
  data
7300
7158
  );
7301
7159
  };
7302
7160
  const useUpdateSourceOfFunds = (options) => {
7303
- const { legalEntityId, baseUrl } = useApiContext();
7161
+ const { rootLegalEntityId, baseUrl } = useApiContext();
7304
7162
  const invalidateRootLegalEntity = useInvalidateRootLegalEntity();
7305
7163
  return useMutation({
7306
- mutationFn: ({ businessLineId, ...requestData }) => updateSourceOfFunds(businessLineId, legalEntityId.value, baseUrl.value, requestData),
7164
+ mutationFn: ({ businessLineId, ...requestData }) => updateSourceOfFunds(businessLineId, rootLegalEntityId.value, baseUrl.value, requestData),
7307
7165
  onSuccess: async () => {
7308
7166
  await invalidateRootLegalEntity();
7309
7167
  },
@@ -7339,16 +7197,10 @@ const setSofErrorMessage = (message) => {
7339
7197
  const clearSofErrorMessage = () => {
7340
7198
  sofErrorMessage.value = void 0;
7341
7199
  };
7342
- const getSourceOfFundsTypes = async (loadingContext) => {
7200
+ const getSourceOfFundsTypes = async (baseUrl) => {
7343
7201
  return httpGet({
7344
- loadingContext,
7345
- errorLevel: "warn",
7346
- errorMessage: `Failed to get legal forms`,
7347
- path: `datasets/sourceOfFundsTypes`,
7348
- authentication: "jwt",
7349
- headers: {
7350
- "Content-Type": "application/json"
7351
- }
7202
+ baseUrl,
7203
+ path: `datasets/sourceOfFundsTypes`
7352
7204
  });
7353
7205
  };
7354
7206
  const useSourceOfFundsTypes = (options) => {
@@ -9673,7 +9525,7 @@ function SourceOfFunds(props) {
9673
9525
  () => getPageHeadings(sourceOfFundsType ?? "adyen"),
9674
9526
  [sourceOfFundsType]
9675
9527
  );
9676
- return isLoading || !activeBusinessLine ? /* @__PURE__ */ jsx("div", { className: sofStyles.sourceOfFundsWrapperLoading, children: /* @__PURE__ */ jsx(Loader, { size: "medium" }) }) : /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-form-wrapper", children: [
9528
+ return isLoading || !activeBusinessLine ? /* @__PURE__ */ jsx("div", { className: sofStyles.sourceOfFundsWrapperLoading, children: /* @__PURE__ */ jsx(Loader, {}) }) : /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-form-wrapper", children: [
9677
9529
  /* @__PURE__ */ jsxs("div", { className: sofStyles.sourceOfFundsWrapperHeading, children: [
9678
9530
  /* @__PURE__ */ jsx(Typography, { el: "h1", variant: "title-l", children: i18n.get(
9679
9531
  (activeForm == null ? void 0 : activeForm.formId) === "additionalData" ? pageHeadings.heading : {
@@ -10282,7 +10134,7 @@ function SourceOfFundsDropin({
10282
10134
  state: { currentState }
10283
10135
  } = useStateContext();
10284
10136
  const formValidity = currentState.validityByForm;
10285
- const { baseUrl, legalEntityId } = useApiContext();
10137
+ const { baseUrl, rootLegalEntityId } = useApiContext();
10286
10138
  const { i18n } = useI18nContext();
10287
10139
  const userEvents = useAnalyticsContext();
10288
10140
  const { showToast } = useToastContext();
@@ -10509,8 +10361,8 @@ function SourceOfFundsDropin({
10509
10361
  onSubmit: handleSubmit
10510
10362
  });
10511
10363
  const documentUtils = documentApiUtils({
10512
- loadingContext: baseUrl.value,
10513
- legalEntityId: legalEntityId.value
10364
+ baseUrl: baseUrl.value,
10365
+ rootLegalEntityId: rootLegalEntityId.value
10514
10366
  });
10515
10367
  const handleNavigateToSummary = async () => {
10516
10368
  setShowUploadPage(false);
@@ -10519,7 +10371,7 @@ function SourceOfFundsDropin({
10519
10371
  const handleNavigateToUploadPage = () => {
10520
10372
  setShowUploadPage(true);
10521
10373
  };
10522
- return /* @__PURE__ */ jsx("div", { className: sofStyles.sourceOfFunds, children: loading || isLoadingRootLegalEntity ? /* @__PURE__ */ jsx(Loader, { size: "medium" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
10374
+ return /* @__PURE__ */ jsx("div", { className: sofStyles.sourceOfFunds, children: loading || isLoadingRootLegalEntity ? /* @__PURE__ */ jsx(Loader, {}) : /* @__PURE__ */ jsxs(Fragment, { children: [
10523
10375
  gettingStarted && !showUploadPage && legalEntity && /* @__PURE__ */ jsx(
10524
10376
  SourceOfFundsGettingStarted,
10525
10377
  {
@@ -11524,23 +11376,17 @@ function BasicDetails(props) {
11524
11376
  )
11525
11377
  ] });
11526
11378
  }
11527
- const extractDocumentInformation = async (legalEntityId, url, data) => httpPost(
11379
+ const extractDocumentInformation = async (legalEntityId, baseUrl, data) => httpPost(
11528
11380
  {
11529
- loadingContext: url,
11530
- errorLevel: "warn",
11531
- errorMessage: `Failed to extract document information`,
11532
- path: `legalEntities/${legalEntityId}/providers/idVerification/extract`,
11533
- authentication: "jwt",
11534
- headers: {
11535
- "Content-Type": "application/json"
11536
- }
11381
+ baseUrl,
11382
+ path: `legalEntities/${legalEntityId}/providers/idVerification/extract`
11537
11383
  },
11538
11384
  data
11539
11385
  );
11540
11386
  const useExtractDocumentInformation = (options) => {
11541
- const { legalEntityId, baseUrl } = useApiContext();
11387
+ const { rootLegalEntityId, baseUrl } = useApiContext();
11542
11388
  return useMutation({
11543
- mutationFn: (data) => extractDocumentInformation(legalEntityId.value, baseUrl.value, data),
11389
+ mutationFn: (data) => extractDocumentInformation(rootLegalEntityId.value, baseUrl.value, data),
11544
11390
  ...options
11545
11391
  });
11546
11392
  };
@@ -11974,7 +11820,6 @@ const mapAddressToSchema = ({
11974
11820
  const OnfidoVerificationModal = ({
11975
11821
  closeModal,
11976
11822
  minimumApplicantDetails,
11977
- handleGetIdVerificationToken,
11978
11823
  legalEntityId,
11979
11824
  onError,
11980
11825
  onComplete
@@ -11983,7 +11828,6 @@ const OnfidoVerificationModal = ({
11983
11828
  return /* @__PURE__ */ jsx(Modal, { size: "medium", onClose: closeModal, ariaLabel: i18n.get("identityVerification"), children: minimumApplicantDetails && /* @__PURE__ */ jsx(
11984
11829
  IdVerification,
11985
11830
  {
11986
- handleGetIdVerificationToken,
11987
11831
  minimumApplicantDetails,
11988
11832
  legalEntityId,
11989
11833
  onIdVerificationComplete: onComplete,
@@ -12179,10 +12023,9 @@ function IdVerificationMethod({ legalEntityId, handlers }) {
12179
12023
  ),
12180
12024
  /* @__PURE__ */ jsx(IdVerificationDisclaimer, {})
12181
12025
  ] }) }),
12182
- status === "onfidoModal" && handlers.handleGetIdVerificationToken && /* @__PURE__ */ jsx(
12026
+ status === "onfidoModal" && /* @__PURE__ */ jsx(
12183
12027
  OnfidoVerificationModal,
12184
12028
  {
12185
- handleGetIdVerificationToken: handlers.handleGetIdVerificationToken,
12186
12029
  closeModal: () => setStatus("ready"),
12187
12030
  onError: handleOnfidoError,
12188
12031
  onComplete: handleOnfidoComplete,
@@ -12297,13 +12140,6 @@ const manualIdUploadFormID = individualOnfidoForms.manualIdUpload.formId;
12297
12140
  const proofOfResidencyFormID = individualOnfidoForms.proofOfResidency.formId;
12298
12141
  const proofOfNationalIdFormID = individualOnfidoForms.proofOfNationalId.formId;
12299
12142
  const proofOfRelationshipFormID = individualOnfidoForms.proofOfRelationship.formId;
12300
- const individualOnfidoDocumentForms = [
12301
- idVerificationMethodFormID,
12302
- manualIdUploadFormID,
12303
- proofOfResidencyFormID,
12304
- proofOfNationalIdFormID,
12305
- proofOfRelationshipFormID
12306
- ];
12307
12143
  function IndividualOnfido(props) {
12308
12144
  var _a, _b, _c, _d;
12309
12145
  const { i18n } = useI18nContext();
@@ -12321,7 +12157,6 @@ function IndividualOnfido(props) {
12321
12157
  trustedFieldsProvider,
12322
12158
  trustedRoles,
12323
12159
  capabilities,
12324
- handleGetIdVerificationToken,
12325
12160
  legalEntityId
12326
12161
  } = props;
12327
12162
  const basicDetailsFormProps = getFormProps(props, basicDetailsFormID);
@@ -12388,8 +12223,7 @@ function IndividualOnfido(props) {
12388
12223
  handlers: {
12389
12224
  handleContinueToAdditionalDetails,
12390
12225
  handleDeleteDocument,
12391
- handleUpdateDocument,
12392
- handleGetIdVerificationToken
12226
+ handleUpdateDocument
12393
12227
  }
12394
12228
  }
12395
12229
  );
@@ -12761,8 +12595,8 @@ function IndividualOnfidoDropin({
12761
12595
  trustedFieldsProvider,
12762
12596
  trustedRoles
12763
12597
  }) {
12764
- var _a, _b, _c, _d, _e, _f, _g;
12765
- const { baseUrl, legalEntityId } = useApiContext();
12598
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
12599
+ const { baseUrl, rootLegalEntityId } = useApiContext();
12766
12600
  const { accountHolder, setAccountHolder, idVerificationProviderId } = useCoreContext();
12767
12601
  const { i18n } = useI18nContext();
12768
12602
  const userEvents = useAnalyticsContext();
@@ -12776,7 +12610,6 @@ function IndividualOnfidoDropin({
12776
12610
  country: legalEntityResponse ? getLegalEntityCountry(legalEntityResponse) : defaultCountry
12777
12611
  });
12778
12612
  const isInstantVerificationEnabled = ((_b = (_a = providerStatus == null ? void 0 : providerStatus.statuses) == null ? void 0 : _a.idDocument) == null ? void 0 : _b.enabled) ?? true;
12779
- const { mutateAsync: handleGetIdVerificationToken } = useIdVerificationToken();
12780
12613
  const { mutateAsync: updateLegalEntity } = useUpdateLegalEntity();
12781
12614
  const isRoleFieldNeeded = taskType === TaskTypes.DECISION_MAKER || taskType === TaskTypes.TRUST_MEMBER_COMPANY_OWNER || taskType === TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY_OWNER;
12782
12615
  const dataFromResponse = useMemo(() => {
@@ -12824,7 +12657,7 @@ function IndividualOnfidoDropin({
12824
12657
  }, []);
12825
12658
  const individualFieldValidations = useCallback(
12826
12659
  (data2) => {
12827
- var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h, _i, _j;
12660
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2;
12828
12661
  return {
12829
12662
  basicDetails: basicDetailsValidators({
12830
12663
  isExperimentEnabled
@@ -12840,7 +12673,7 @@ function IndividualOnfidoDropin({
12840
12673
  existingIdNumber: (_e2 = dataFromResponse.additionalPersonalDetails) == null ? void 0 : _e2.idNumber,
12841
12674
  formVerificationErrors: (_f2 = propProblems == null ? void 0 : propProblems.verificationErrors) == null ? void 0 : _f2.additionalPersonalDetails,
12842
12675
  i18n,
12843
- taxIdNumberType: ((_h = (_g2 = data2 == null ? void 0 : data2.additionalPersonalDetails) == null ? void 0 : _g2.taxInformation) == null ? void 0 : _h.length) ? (_j = (_i = data2 == null ? void 0 : data2.additionalPersonalDetails) == null ? void 0 : _i.taxInformation[0]) == null ? void 0 : _j.type : void 0
12676
+ taxIdNumberType: ((_h2 = (_g2 = data2 == null ? void 0 : data2.additionalPersonalDetails) == null ? void 0 : _g2.taxInformation) == null ? void 0 : _h2.length) ? (_j2 = (_i2 = data2 == null ? void 0 : data2.additionalPersonalDetails) == null ? void 0 : _i2.taxInformation[0]) == null ? void 0 : _j2.type : void 0
12844
12677
  })
12845
12678
  };
12846
12679
  },
@@ -12886,8 +12719,8 @@ function IndividualOnfidoDropin({
12886
12719
  optionalFields: derivedProps == null ? void 0 : derivedProps.optionalFields
12887
12720
  });
12888
12721
  const documentUtils = documentApiUtils({
12889
- loadingContext: baseUrl.value,
12890
- legalEntityId: legalEntityId.value
12722
+ baseUrl: baseUrl.value,
12723
+ rootLegalEntityId: rootLegalEntityId.value
12891
12724
  });
12892
12725
  const { data, requiredFields } = form;
12893
12726
  useEffect(() => {
@@ -12977,11 +12810,11 @@ function IndividualOnfidoDropin({
12977
12810
  return addValidityToForms(filteredForms, form.isValid, problems);
12978
12811
  }, [derivedProps, form.isValid, isInstantVerificationEnabled, problems]);
12979
12812
  const { mutateAsync: getIdVerificationStartCheck } = useIdVerificationStartCheck();
12980
- const handleInstantIdVerificationStartCheck = async (onfidoResponse, legalEntityId2) => {
12813
+ const handleInstantIdVerificationStartCheck = async (onfidoResponse, legalEntityId) => {
12981
12814
  const data2 = {
12982
12815
  // providerId is not required in HO as this is already present in the startCheck endpoint
12983
12816
  providerId: idVerificationProviderId,
12984
- legalEntityId: legalEntityId2,
12817
+ legalEntityId,
12985
12818
  captureMetadata: onfidoResponse
12986
12819
  };
12987
12820
  await getIdVerificationStartCheck(data2);
@@ -13071,8 +12904,8 @@ function IndividualOnfidoDropin({
13071
12904
  });
13072
12905
  }
13073
12906
  };
13074
- const hasRolesChanged = (legalEntityId2, existingEntityAssociations, newRoles) => {
13075
- const existingRoles = existingEntityAssociations == null ? void 0 : existingEntityAssociations.filter((association) => association.legalEntityId === legalEntityId2).map(({ type }) => type);
12907
+ const hasRolesChanged = (legalEntityId, existingEntityAssociations, newRoles) => {
12908
+ const existingRoles = existingEntityAssociations == null ? void 0 : existingEntityAssociations.filter((association) => association.legalEntityId === legalEntityId).map(({ type }) => type);
13076
12909
  return !doArraysMatch(existingRoles, newRoles);
13077
12910
  };
13078
12911
  const attachAssociationToParentLegalEntity = async ({
@@ -13186,11 +13019,6 @@ function IndividualOnfidoDropin({
13186
13019
  });
13187
13020
  };
13188
13021
  const datasetUtils = datasetUtilities(i18n.locale);
13189
- const isDocumentsRequired2 = (forms2) => forms2.some(
13190
- (form2) => individualOnfidoDocumentForms.includes(
13191
- form2.formId
13192
- )
13193
- );
13194
13022
  const formatIdDocument = (idDocument) => {
13195
13023
  var _a2, _b2;
13196
13024
  if (!idDocument) return void 0;
@@ -13247,16 +13075,19 @@ function IndividualOnfidoDropin({
13247
13075
  }
13248
13076
  };
13249
13077
  };
13078
+ const isManualVerificationOrExistingDoc = (idVerificationMethod) => idVerificationMethod === "manualVerification" || idVerificationMethod === "existingDocument";
13250
13079
  const formatDataForSummary2 = () => {
13251
- var _a2, _b2, _c2, _d2, _e2;
13080
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
13252
13081
  let summaryData = cloneObject(data);
13253
- delete summaryData.idVerificationMethod;
13254
- if ((_a2 = summaryData.additionalPersonalDetails) == null ? void 0 : _a2.country) {
13082
+ if ((_a2 = summaryData == null ? void 0 : summaryData.basicDetails) == null ? void 0 : _a2.phoneNumber) {
13083
+ summaryData.basicDetails.phoneNumber = summaryData.basicDetails.phoneNumber.number;
13084
+ }
13085
+ if ((_b2 = summaryData.additionalPersonalDetails) == null ? void 0 : _b2.country) {
13255
13086
  summaryData.additionalPersonalDetails.country = datasetUtils.getCountryName(
13256
13087
  summaryData.additionalPersonalDetails.country
13257
13088
  );
13258
13089
  }
13259
- if ((_b2 = summaryData.additionalPersonalDetails) == null ? void 0 : _b2.nationality) {
13090
+ if ((_c2 = summaryData.additionalPersonalDetails) == null ? void 0 : _c2.nationality) {
13260
13091
  summaryData.additionalPersonalDetails.nationality = datasetUtils.getCountryName(
13261
13092
  summaryData.additionalPersonalDetails.nationality
13262
13093
  );
@@ -13264,20 +13095,22 @@ function IndividualOnfidoDropin({
13264
13095
  if (summaryData.additionalPersonalDetails) {
13265
13096
  summaryData.address = mapAddressLabels(summaryData.additionalPersonalDetails, datasetUtils);
13266
13097
  }
13267
- if ((_c2 = summaryData.basicDetails) == null ? void 0 : _c2.accountHolder) {
13098
+ if ((_d2 = summaryData.basicDetails) == null ? void 0 : _d2.accountHolder) {
13268
13099
  summaryData.basicDetails.accountHolder = i18n.get(summaryData.basicDetails.accountHolder);
13269
13100
  }
13270
- if ((_d2 = summaryData.additionalPersonalDetails) == null ? void 0 : _d2.birthDate) {
13101
+ if ((_e2 = summaryData.additionalPersonalDetails) == null ? void 0 : _e2.birthDate) {
13271
13102
  summaryData.additionalPersonalDetails.birthDate = localizeDateString(
13272
13103
  summaryData.additionalPersonalDetails.birthDate,
13273
13104
  i18n.locale
13274
13105
  );
13275
13106
  }
13276
- if (isDocumentsRequired2(forms)) {
13277
- individualOnfidoDocumentForms.forEach((formId) => delete summaryData[formId]);
13278
- summaryData = { ...summaryData, ...formatFileSummaryData(data) };
13107
+ if (isManualVerificationOrExistingDoc((_f2 = summaryData.idVerificationMethod) == null ? void 0 : _f2.idVerificationMethod)) {
13108
+ const fileSummaryData = formatFileSummaryData(data);
13109
+ summaryData = { ...summaryData, ...fileSummaryData };
13110
+ summaryData.manualIdUpload = { ...summaryData.idDocument };
13111
+ summaryData.idVerificationMethod.idDocument = { ...summaryData.idDocument };
13279
13112
  }
13280
- if ((_e2 = summaryData.additionalPersonalDetails) == null ? void 0 : _e2.taxInformation) {
13113
+ if ((_g2 = summaryData.additionalPersonalDetails) == null ? void 0 : _g2.taxInformation) {
13281
13114
  const taxInformation = summaryData.additionalPersonalDetails.taxInformation.find(
13282
13115
  (taxId) => {
13283
13116
  var _a3;
@@ -13291,10 +13124,18 @@ function IndividualOnfidoDropin({
13291
13124
  }
13292
13125
  return summaryData;
13293
13126
  };
13294
- const summaryOmittedKeys = [
13127
+ const omittedKeysForSummary = [
13295
13128
  ...taskType === TaskTypes.DECISION_MAKER ? ["role"] : [],
13296
- ...((_g = data == null ? void 0 : data.additionalPersonalDetails) == null ? void 0 : _g.idNumberExempt) ? ["idNumber"] : []
13129
+ ...((_g = data == null ? void 0 : data.additionalPersonalDetails) == null ? void 0 : _g.idNumberExempt) ? ["idNumber"] : [],
13130
+ ...isManualVerificationOrExistingDoc((_h = data == null ? void 0 : data.idVerificationMethod) == null ? void 0 : _h.idVerificationMethod) ? ["idVerificationMethod", "modificationDate"] : []
13131
+ ];
13132
+ const omittedFormsForSummary = [
13133
+ ...((_i = data == null ? void 0 : data.idVerificationMethod) == null ? void 0 : _i.idVerificationMethod) === "instantVerification" ? ["idDocument"] : [],
13134
+ ...((_j = data == null ? void 0 : data.idVerificationMethod) == null ? void 0 : _j.idVerificationMethod) === "manualVerification" ? ["idVerificationMethod"] : []
13297
13135
  ];
13136
+ const customLabelsForSummary = {
13137
+ idVerificationMethod: ((_k = data == null ? void 0 : data.idVerificationMethod) == null ? void 0 : _k.idVerificationMethod) === "instantVerification" ? "idVerificationMethod" : "idDocument"
13138
+ };
13298
13139
  const {
13299
13140
  handleNextClick,
13300
13141
  handleBackClick,
@@ -13323,8 +13164,10 @@ function IndividualOnfidoDropin({
13323
13164
  summary: {
13324
13165
  data: formatDataForSummary2(),
13325
13166
  omitted: {
13326
- keys: summaryOmittedKeys
13327
- }
13167
+ keys: omittedKeysForSummary,
13168
+ forms: omittedFormsForSummary
13169
+ },
13170
+ labels: customLabelsForSummary
13328
13171
  },
13329
13172
  handleBackClick,
13330
13173
  handleNextClick,
@@ -13335,7 +13178,6 @@ function IndividualOnfidoDropin({
13335
13178
  loadingStatus,
13336
13179
  forms,
13337
13180
  onSubmit,
13338
- handleGetIdVerificationToken,
13339
13181
  gotoFormByFormIndex,
13340
13182
  validateForm: () => form.triggerValidation(activeForm.formId),
13341
13183
  canSubmit: canSubmit2() && hasDataChanged(dataFromResponse, data),
@@ -13356,7 +13198,6 @@ function IndividualOnfidoDropin({
13356
13198
  problems,
13357
13199
  onNext: handleNextClick,
13358
13200
  onBack: handleBackClick,
13359
- handleGetIdVerificationToken,
13360
13201
  legalEntityId: legalEntityResponse == null ? void 0 : legalEntityResponse.id,
13361
13202
  allowedRoles: roleTypes,
13362
13203
  shouldValidate,
@@ -14576,6 +14417,7 @@ const unincorporatedPartnershipBaseMapping = {
14576
14417
  "trustRegistrationDetails.country": "unincorporatedPartnership.countryOfGoverningLaw",
14577
14418
  "trustRegistrationDetails.registrationNumber": "unincorporatedPartnership.registrationNumber",
14578
14419
  "trustRegistrationDetails.taxInformation": "unincorporatedPartnership.taxInformation",
14420
+ "trustRegistrationDetails.vatNumber": "unincorporatedPartnership.vatNumber",
14579
14421
  "trustRegistrationAddress.registrationAddress.city": "unincorporatedPartnership.registeredAddress.city",
14580
14422
  "trustRegistrationAddress.registrationAddress.country": "unincorporatedPartnership.registeredAddress.country",
14581
14423
  "trustRegistrationAddress.registrationAddress.postalCode": "unincorporatedPartnership.registeredAddress.postalCode",
@@ -14590,6 +14432,7 @@ const unincorporatedPartnershipBaseMapping = {
14590
14432
  "trustRegistrationAddress.operationalAddress.otherAddressInformation": "unincorporatedPartnership.principalPlaceOfBusiness.street2"
14591
14433
  };
14592
14434
  const unincorporatedPartnershipComponentsKeyMapping = {
14435
+ "trustRegistrationDetails.exemptedFromVat": "unincorporatedPartnership.vatAbsenceReason",
14593
14436
  ...unincorporatedPartnershipBaseMapping
14594
14437
  };
14595
14438
  const unincorporatedPartnershipApiKeyMapping = {
@@ -14684,17 +14527,45 @@ const mapUnincorporatedPartnershipToLegalEntity = (data, isExperimentEnabled) =>
14684
14527
  return requestObj;
14685
14528
  };
14686
14529
  const COUNTRIES_THAT_USE_REGISTRATION_NUMBER = [CountryCodes.NewZealand];
14687
- const rules = ({ data, country, isExperimentEnabled }) => createFormRules({
14530
+ const rules = ({
14531
+ data,
14532
+ country,
14533
+ isExperimentEnabled,
14534
+ taskType
14535
+ }) => createFormRules({
14688
14536
  countryUsesTaxId: () => {
14537
+ if (taskType === TaskTypes.UNINCORPORATED_PARTNERSHIP) {
14538
+ if (UNINCORPORATED_PARTNERSHIP_COUNTRIES_TAX_INFORMATION_REQUIRED.includes(country)) {
14539
+ return "REQUIRED";
14540
+ }
14541
+ if (UNINCORPORATED_PARTNERSHIP_COUNTRIES_TAX_INFORMATION_OPTIONAL.includes(country)) {
14542
+ return "OPTIONAL";
14543
+ }
14544
+ }
14689
14545
  if (country !== CountryCodes.NewZealand && COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT.includes(country)) {
14690
14546
  return "REQUIRED";
14691
14547
  }
14692
14548
  },
14693
14549
  countryRequiresRegistrationNumberForTrust: () => {
14550
+ if (taskType === TaskTypes.UNINCORPORATED_PARTNERSHIP) {
14551
+ if (UNINCORPORATED_PARTNERSHIP_COUNTRIES_REGISTRATION_NUMBER_REQUIRED.includes(country)) {
14552
+ return "REQUIRED";
14553
+ }
14554
+ if (UNINCORPORATED_PARTNERSHIP_COUNTRIES_REGISTRATION_NUMBER_OPTIONAL.includes(country)) {
14555
+ return "OPTIONAL";
14556
+ }
14557
+ }
14694
14558
  if (COUNTRIES_THAT_USE_REGISTRATION_NUMBER.includes(country)) {
14695
14559
  return "REQUIRED";
14696
14560
  }
14697
14561
  },
14562
+ countryUsesVatNumber: () => {
14563
+ if (taskType === TaskTypes.UNINCORPORATED_PARTNERSHIP) {
14564
+ if (UNINCORPORATED_PARTNERSHIP_COUNTRIES_VAT_NUMBER_OPTIONAL.includes(country)) {
14565
+ return "OPTIONAL";
14566
+ }
14567
+ }
14568
+ },
14698
14569
  trustTypeHasDescription: () => {
14699
14570
  var _a;
14700
14571
  if (((_a = data == null ? void 0 : data.trustRegistrationDetails) == null ? void 0 : _a.trustType) === TrustTypes.CHARITABLE_TRUST) {
@@ -14845,7 +14716,8 @@ const trustBase = {
14845
14716
  constitutionalDocument: {
14846
14717
  rule: "REQUIRED"
14847
14718
  },
14848
- registrationNumber: { rule: "countryRequiresRegistrationNumberForTrust" }
14719
+ registrationNumber: { rule: "countryRequiresRegistrationNumberForTrust" },
14720
+ vatNumber: { rule: "countryUsesVatNumber" }
14849
14721
  };
14850
14722
  const trustFieldsPerScenario = {
14851
14723
  L0: {
@@ -14884,7 +14756,7 @@ function TrustDropin({
14884
14756
  useEffect(() => {
14885
14757
  onChange == null ? void 0 : onChange(currentState);
14886
14758
  }, [currentState, onChange]);
14887
- const { baseUrl, legalEntityId } = useApiContext();
14759
+ const { baseUrl, rootLegalEntityId } = useApiContext();
14888
14760
  const { i18n } = useI18nContext();
14889
14761
  const userEvents = useAnalyticsContext();
14890
14762
  const [problems, setProblems] = useState(problemsProp);
@@ -14943,6 +14815,7 @@ function TrustDropin({
14943
14815
  () => rules({
14944
14816
  data: currentState.data,
14945
14817
  country: currentCountry,
14818
+ taskType,
14946
14819
  isExperimentEnabled
14947
14820
  }),
14948
14821
  [
@@ -15057,8 +14930,8 @@ function TrustDropin({
15057
14930
  return updatedTrust;
15058
14931
  };
15059
14932
  const documentUtils = documentApiUtils({
15060
- loadingContext: baseUrl.value,
15061
- legalEntityId: legalEntityId.value
14933
+ baseUrl: baseUrl.value,
14934
+ rootLegalEntityId: rootLegalEntityId.value
15062
14935
  });
15063
14936
  const submitDocuments2 = async ({ forms: forms2, legalEntity, dataSubmitted }) => {
15064
14937
  if (isDocumentsRequired2(forms2)) {
@@ -15642,7 +15515,7 @@ const TrustMembersOverview = (props) => {
15642
15515
  LegalEntityType.TRUST
15643
15516
  );
15644
15517
  if (isLoading || !legalEntity || !associatedLegalArrangement) {
15645
- return /* @__PURE__ */ jsx(Loader, {});
15518
+ return /* @__PURE__ */ jsx(Loader, { size: "large" });
15646
15519
  }
15647
15520
  return /* @__PURE__ */ jsx(
15648
15521
  TrustMembersOverviewInner,
@@ -15848,7 +15721,7 @@ const createDefaultMember = (selectedMember, selectedEntityType, selectedRoles)
15848
15721
  };
15849
15722
  const useUnincorporatedPartnershipNavigation = ({ navigateTo }) => {
15850
15723
  const [activeMember, setActiveMember] = useState();
15851
- const { legalEntityId: rootLegalEntityId } = useApiContext();
15724
+ const { rootLegalEntityId } = useApiContext();
15852
15725
  const { data: activeMemberLe } = useLegalEntity(activeMember == null ? void 0 : activeMember.legalEntityId, {
15853
15726
  enabled: Boolean(activeMember == null ? void 0 : activeMember.legalEntityId)
15854
15727
  });
@@ -16410,32 +16283,32 @@ const hasProgressedBeyondEntitySelection = (legalEntity) => {
16410
16283
  return hasOwnEntityAssocation || !!hasOrganizationType;
16411
16284
  };
16412
16285
  const Introduction = lazy(
16413
- async () => (await import("./Introduction-DPpBzox4.js")).Introduction
16286
+ async () => (await import("./Introduction-BleGRaa4.js")).Introduction
16414
16287
  );
16415
16288
  const BusinessTypeSelection = lazy(
16416
- async () => (await import("./BusinessTypeSelection-DGBwNzyu.js")).BusinessTypeSelection
16289
+ async () => (await import("./BusinessTypeSelection-DeZuB2cX.js")).BusinessTypeSelection
16417
16290
  );
16418
16291
  const SingpassSelection = lazy(
16419
- async () => (await import("./SingpassSelection-CoRcvnhu.js")).SingpassSelection
16292
+ async () => (await import("./SingpassSelection-DC-hVP9Y.js")).SingpassSelection
16420
16293
  );
16421
16294
  const AccountSetupRejected = lazy(
16422
- async () => (await import("./AccountSetupRejected-D3E-9InR.js")).AccountSetupRejected
16295
+ async () => (await import("./AccountSetupRejected-CghDwOps.js")).AccountSetupRejected
16423
16296
  );
16424
16297
  const DecisionMakers = lazy(
16425
- async () => (await import("./DecisionMakers-CJU3ufK2.js")).DecisionMakers
16298
+ async () => (await import("./DecisionMakers-jM2qEJYz.js")).DecisionMakers
16426
16299
  );
16427
16300
  const CustomerSupport = lazy(
16428
- async () => (await import("./CustomerSupport-DZVVS0az.js")).CustomerSupport
16301
+ async () => (await import("./CustomerSupport-BWMKG7BY.js")).CustomerSupport
16429
16302
  );
16430
- const Review = lazy(async () => (await import("./Review-SsWCNJ4V.js")).Review);
16303
+ const Review = lazy(async () => (await import("./Review-B8zggWg2.js")).Review);
16431
16304
  const SignPCIComponent$2 = lazy(
16432
16305
  async () => (await Promise.resolve().then(() => SignPCIComponent$1)).SignPCIComponent
16433
16306
  );
16434
16307
  const AcceptTermsOfService = lazy(
16435
- async () => (await import("./AcceptTermsOfServiceComponent-Bz8meNAN.js").then((n) => n.b)).AcceptTermsOfServiceComponent
16308
+ async () => (await import("./AcceptTermsOfServiceComponent-Cnv5ZPl5.js").then((n) => n.b)).AcceptTermsOfServiceComponent
16436
16309
  );
16437
16310
  const TaxReportingDropin = lazy(
16438
- async () => (await import("./TaxReportingDropin-1DIISI1K.js")).TaxReportingDropin
16311
+ async () => (await import("./TaxReportingDropin-DqSPuzE8.js")).TaxReportingDropin
16439
16312
  );
16440
16313
  const PAGES_WITH_POLLING = [TaskTypes.DECISION_MAKER_OVERVIEW, TaskTypes.TASKS_OVERVIEW];
16441
16314
  const logger$1 = createLogger();
@@ -16644,8 +16517,8 @@ function DropinComposer({
16644
16517
  if (newAccountHolder !== accountHolder) setAccountHolder(newAccountHolder);
16645
16518
  }, [accountHolder, rootLegalEntity]);
16646
16519
  useEffect(() => setAccountHolderInGlobalStore(accountHolder), [accountHolder]);
16647
- const { legalEntityId } = useApiContext();
16648
- legalEntityId.value = rootLegalEntity.id;
16520
+ const { rootLegalEntityId } = useApiContext();
16521
+ rootLegalEntityId.value = rootLegalEntity.id;
16649
16522
  useEffect(() => {
16650
16523
  const enabledExperimentNames = Object.entries(experiments).filter(([key, value]) => key.includes("_") && value).map(([key]) => key);
16651
16524
  if (!enabledExperimentNames.length) return;
@@ -16748,7 +16621,7 @@ function DropinComposer({
16748
16621
  return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
16749
16622
  DecisionMakers,
16750
16623
  {
16751
- onNavigateToIndividual: (legalEntityId2) => onNavigateToDecisionMakerIndividual(TaskTypes.DECISION_MAKER, legalEntityId2),
16624
+ onNavigateToIndividual: (legalEntityId) => onNavigateToDecisionMakerIndividual(TaskTypes.DECISION_MAKER, legalEntityId),
16752
16625
  navigateBackToTaskList: navigateBack,
16753
16626
  capabilityProblems,
16754
16627
  trustedEntityAssociations
@@ -16819,6 +16692,7 @@ function DropinComposer({
16819
16692
  onChange: handleOnChange,
16820
16693
  onSubmit: async (data) => {
16821
16694
  await handleOnSubmit(data);
16695
+ await refetchTrust();
16822
16696
  },
16823
16697
  handleHomeClick: navigateBack
16824
16698
  }
@@ -16836,6 +16710,7 @@ function DropinComposer({
16836
16710
  onChange: handleOnChange,
16837
16711
  onSubmit: async (data) => {
16838
16712
  await handleOnSubmit(data);
16713
+ await refetchUnincorporatedPartnership();
16839
16714
  },
16840
16715
  handleHomeClick: navigateBack
16841
16716
  }
@@ -17154,47 +17029,37 @@ function OnboardingDropinComponent({
17154
17029
  }
17155
17030
  );
17156
17031
  }
17157
- const getPciTemplate = async (legalEntityId, url, data) => {
17032
+ const getPciTemplate = async (legalEntityId, baseUrl, data) => {
17158
17033
  return httpPost(
17159
17034
  {
17160
- loadingContext: url,
17161
- errorLevel: "warn",
17162
- errorMessage: `Failed to generate pciTemplate`,
17163
- path: `legalEntities/${legalEntityId}/pci/generatePciTemplates`,
17164
- authentication: "jwt",
17165
- headers: {
17166
- "Content-Type": "application/json"
17167
- }
17035
+ baseUrl,
17036
+ path: `legalEntities/${legalEntityId}/pci/generatePciTemplates`
17168
17037
  },
17169
17038
  data
17170
17039
  );
17171
17040
  };
17172
17041
  const usePciTemplate = (data, options) => {
17173
- const { legalEntityId, baseUrl } = useApiContext();
17042
+ const { rootLegalEntityId, baseUrl } = useApiContext();
17174
17043
  return useQuery({
17175
17044
  queryKey: ["pciTemplate", data],
17176
- queryFn: () => getPciTemplate(legalEntityId.value, baseUrl.value, data),
17045
+ queryFn: () => getPciTemplate(rootLegalEntityId.value, baseUrl.value, data),
17177
17046
  ...options
17178
17047
  });
17179
17048
  };
17180
- const signPci = async (legalEntityId, url, data) => {
17049
+ const signPci = async (legalEntityId, baseUrl, data) => {
17181
17050
  return httpPost(
17182
17051
  {
17183
- loadingContext: url,
17184
- errorLevel: "warn",
17185
- errorMessage: `Failed to sign pci`,
17186
- path: `legalEntities/${legalEntityId}/pci/signPciTemplates`,
17187
- authentication: "jwt",
17188
- headers: { "Content-Type": "application/json" }
17052
+ baseUrl,
17053
+ path: `legalEntities/${legalEntityId}/pci/signPciTemplates`
17189
17054
  },
17190
17055
  data
17191
17056
  );
17192
17057
  };
17193
17058
  const useSignPci = (options) => {
17194
- const { legalEntityId, baseUrl } = useApiContext();
17059
+ const { rootLegalEntityId, baseUrl } = useApiContext();
17195
17060
  const invalidateRootLegalEntity = useInvalidateRootLegalEntity();
17196
17061
  return useMutation({
17197
- mutationFn: (data) => signPci(legalEntityId.value, baseUrl.value, data),
17062
+ mutationFn: (data) => signPci(rootLegalEntityId.value, baseUrl.value, data),
17198
17063
  onSuccess: async () => {
17199
17064
  await invalidateRootLegalEntity();
17200
17065
  },
@@ -17408,7 +17273,7 @@ function SignPCIComponent({
17408
17273
  onClose == null ? void 0 : onClose();
17409
17274
  };
17410
17275
  if (isLegalEntityLoading || isPciStatusLoading || isPciTemplateDataLoading || !legalEntityData || !pciTemplateData) {
17411
- return /* @__PURE__ */ jsx(Loader, { size: "medium" });
17276
+ return /* @__PURE__ */ jsx(Loader, {});
17412
17277
  }
17413
17278
  if (isLegalEntityError || isPciStatusError) {
17414
17279
  return /* @__PURE__ */ jsx(MaybeModal, { inline: !modalView, onClose: handleOnClose, children: /* @__PURE__ */ jsx(ModalContent, { children: /* @__PURE__ */ jsxs(FormEndState, { children: [
@@ -17450,7 +17315,7 @@ function UpdateLegalEntityForHighExposure({
17450
17315
  [rootLegalEntity]
17451
17316
  );
17452
17317
  if (!rootLegalEntity || !country) {
17453
- return /* @__PURE__ */ jsx(Loader, { size: "medium" });
17318
+ return /* @__PURE__ */ jsx(Loader, {});
17454
17319
  }
17455
17320
  return /* @__PURE__ */ jsx(
17456
17321
  HighExposureDropin,
@@ -17463,25 +17328,19 @@ function UpdateLegalEntityForHighExposure({
17463
17328
  }
17464
17329
  );
17465
17330
  }
17466
- const generateOnboardingLink = async (legalEntityId, url, data) => {
17331
+ const generateOnboardingLink = async (legalEntityId, baseUrl, data) => {
17467
17332
  return httpPost(
17468
17333
  {
17469
- loadingContext: url,
17470
- errorLevel: "warn",
17471
- errorMessage: `Generating onboarding link was not successful`,
17472
- path: `legalEntities/${legalEntityId}/onboardingStatus`,
17473
- authentication: "jwt",
17474
- headers: {
17475
- "Content-Type": "application/json"
17476
- }
17334
+ baseUrl,
17335
+ path: `legalEntities/${legalEntityId}/onboardingStatus`
17477
17336
  },
17478
17337
  data
17479
17338
  );
17480
17339
  };
17481
17340
  const useGenerateOnboardingLink = (options) => {
17482
- const { legalEntityId, baseUrl } = useApiContext();
17341
+ const { rootLegalEntityId, baseUrl } = useApiContext();
17483
17342
  return useMutation({
17484
- mutationFn: (data) => generateOnboardingLink(legalEntityId.value, baseUrl.value, data),
17343
+ mutationFn: (data) => generateOnboardingLink(rootLegalEntityId.value, baseUrl.value, data),
17485
17344
  ...options
17486
17345
  });
17487
17346
  };
@@ -17535,7 +17394,7 @@ function ViewVerificationStatusComponent({
17535
17394
  onError,
17536
17395
  onRedirect
17537
17396
  }) {
17538
- const { legalEntityId: currentLegalEntityId } = useApiContext();
17397
+ const { rootLegalEntityId: currentLegalEntityId } = useApiContext();
17539
17398
  currentLegalEntityId.value = legalEntityId;
17540
17399
  const { i18n } = useI18nContext();
17541
17400
  const config = {
@@ -17610,7 +17469,7 @@ function ViewVerificationStatusComponent({
17610
17469
  const statusesWithoutActions = [OnboardingStatus.REJECTED, OnboardingStatus.VERIFIED];
17611
17470
  const hideButton = onboardingStatus && statusesWithoutActions.includes(onboardingStatus) || !(content == null ? void 0 : content.ctaButton);
17612
17471
  if (!showAlert && (isLoading || !content)) {
17613
- return /* @__PURE__ */ jsx(Loader, { size: "medium" });
17472
+ return /* @__PURE__ */ jsx(Loader, {});
17614
17473
  }
17615
17474
  return /* @__PURE__ */ jsx("section", { className: styles.verification, children: showAlert ? /* @__PURE__ */ jsx(Alert, { title: i18n.get(alertContent ?? "onboardingRedirectLinkError"), variant: "error" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
17616
17475
  !hideExplanation && (content == null ? void 0 : content.description.map((key) => /* @__PURE__ */ jsx("p", { className: styles.verificationDescription, children: i18n.get(key) }, key))),
@@ -17728,11 +17587,11 @@ const validateComponentName = (componentName) => {
17728
17587
  const validateCoreOptions = (coreOptions) => {
17729
17588
  const requiredOptions = ["locale", "environment", "country"];
17730
17589
  const missing = requiredOptions.filter((option) => !coreOptions[option]);
17731
- if (!(coreOptions.sdkToken && coreOptions.getSdkToken) && !coreOptions.clientKey) {
17590
+ if (!(coreOptions.sdkToken && coreOptions.getSdkToken)) {
17732
17591
  throw new Error(
17733
17592
  `
17734
17593
 
17735
- Missing or invalid parameters. Specify either the sdkToken and getSdkToken handler or a clientKey in your request to initialize the component.`
17594
+ Missing or invalid parameters. Specify the sdkToken and getSdkToken your in request to initialize the component.`
17736
17595
  );
17737
17596
  }
17738
17597
  if (missing.length > 0) {
@@ -17906,11 +17765,11 @@ class UIElement extends BaseElement {
17906
17765
  children: /* @__PURE__ */ jsx(
17907
17766
  ApiProvider,
17908
17767
  {
17909
- legalEntityId: this.props.componentProps.legalEntityId,
17910
- baseUrl: this.props.loadingContext,
17768
+ rootLegalEntityId: this.props.componentProps.legalEntityId,
17769
+ baseUrl: this.props.baseUrl,
17911
17770
  children: /* @__PURE__ */ jsx(QueryClientProvider, { children: /* @__PURE__ */ jsxs(Fragment, { children: [
17912
17771
  /* @__PURE__ */ jsxs(StoreProvider, { children: [
17913
- /* @__PURE__ */ jsx("span", { className: "adyen-kyc__sdk-version", hidden: true, children: "3.68.4" }),
17772
+ /* @__PURE__ */ jsx("span", { className: "adyen-kyc__sdk-version", hidden: true, children: "3.69.1" }),
17914
17773
  /* @__PURE__ */ jsx(
17915
17774
  AnalyticsProvider,
17916
17775
  {
@@ -17975,7 +17834,7 @@ class Core {
17975
17834
  this.getUpdatedOptions = (options) => {
17976
17835
  const newOptions = { ...this.options, ...options };
17977
17836
  validateCoreOptions(newOptions);
17978
- newOptions.loadingContext = normalizeEnvironment(newOptions.environment);
17837
+ newOptions.baseUrl = normalizeEnvironment(newOptions.environment);
17979
17838
  if (!newOptions.locale) newOptions.locale = FALLBACK_LOCALE;
17980
17839
  return newOptions;
17981
17840
  };