@adyen/kyc-components 2.26.0 → 2.26.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.
- package/dist/es/adyen-kyc-components.es.js +52 -38
- package/dist/types/components/CompanyBasics/types.d.ts +2 -0
- package/dist/types/components/CompanySearch/types.d.ts +2 -0
- package/dist/types/components/CompanyStructure/types.d.ts +1 -1
- package/dist/types/components/Dropins/CompanySearchDropin/components/CompanySearchDropinComponent.d.ts +1 -1
- package/dist/types/core/models/api/capability.d.ts +33 -25
- package/dist/types/core/models/api/legal-entity.d.ts +2 -2
- package/dist/types/utils/mapping/companySearch/mapLegalEntityToCompanySearchSchema.d.ts +1 -1
- package/package.json +1 -1
|
@@ -24319,13 +24319,8 @@ function TradingNameField({
|
|
|
24319
24319
|
}
|
|
24320
24320
|
}, [handleChangeFor, legalCompanyName2]);
|
|
24321
24321
|
useEffect(() => {
|
|
24322
|
-
if (
|
|
24323
|
-
|
|
24324
|
-
}
|
|
24325
|
-
}, [data.tradingName, handleSameAsLegalName]);
|
|
24326
|
-
useEffect(() => {
|
|
24327
|
-
if (data.sameNameAsLegalName && legalCompanyName2 !== data.tradingName) {
|
|
24328
|
-
handleChangeFor("tradingName")(legalCompanyName2);
|
|
24322
|
+
if (data.sameNameAsLegalName && data.tradingName && legalCompanyName2 && data.tradingName !== legalCompanyName2) {
|
|
24323
|
+
return handleChangeFor("tradingName")(legalCompanyName2);
|
|
24329
24324
|
}
|
|
24330
24325
|
}, [legalCompanyName2, data.sameNameAsLegalName, data.tradingName, handleChangeFor]);
|
|
24331
24326
|
return jsxs(Fragment, {
|
|
@@ -25296,13 +25291,22 @@ const mapApiDocumentToCompanySearchDocuments = (entityId) => {
|
|
|
25296
25291
|
} : void 0
|
|
25297
25292
|
};
|
|
25298
25293
|
};
|
|
25299
|
-
const mapLegalEntityToCompanySearchSchema = (legalEntity
|
|
25294
|
+
const mapLegalEntityToCompanySearchSchema = (legalEntity) => {
|
|
25300
25295
|
const companySearchSchema = {
|
|
25301
|
-
|
|
25302
|
-
|
|
25296
|
+
companyBasics: {},
|
|
25297
|
+
companyRegistrationAddress: {},
|
|
25298
|
+
companyStructure: {},
|
|
25299
|
+
companyOtherDetails: {},
|
|
25300
|
+
companyRegistrationDocument: {},
|
|
25301
|
+
companyTaxDocument: {},
|
|
25302
|
+
...formatObject(legalEntity, companySearchComponentsKeyMapping)
|
|
25303
25303
|
};
|
|
25304
|
+
const {
|
|
25305
|
+
companyRegistrationDocument: companyRegistrationDocument2,
|
|
25306
|
+
companyTaxDocument
|
|
25307
|
+
} = mapApiDocumentToCompanySearchDocuments(legalEntity == null ? void 0 : legalEntity.id);
|
|
25304
25308
|
return entriesOf(companySearchSchema).reduce((componentData, [key, value]) => {
|
|
25305
|
-
var _a, _b;
|
|
25309
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
25306
25310
|
switch (key) {
|
|
25307
25311
|
case "companyBasics": {
|
|
25308
25312
|
return {
|
|
@@ -25324,7 +25328,8 @@ const mapLegalEntityToCompanySearchSchema = (legalEntity, documents2) => {
|
|
|
25324
25328
|
...componentData,
|
|
25325
25329
|
[key]: {
|
|
25326
25330
|
...value,
|
|
25327
|
-
|
|
25331
|
+
tradingName: !((_b = legalEntity.organization) == null ? void 0 : _b.doingBusinessAs) ? (_c = legalEntity.organization) == null ? void 0 : _c.legalName : (_d = legalEntity.organization) == null ? void 0 : _d.doingBusinessAs,
|
|
25332
|
+
sameNameAsLegalName: !((_e = legalEntity.organization) == null ? void 0 : _e.doingBusinessAs) || ((_f = legalEntity.organization) == null ? void 0 : _f.doingBusinessAs) === ((_g = legalEntity.organization) == null ? void 0 : _g.legalName)
|
|
25328
25333
|
}
|
|
25329
25334
|
};
|
|
25330
25335
|
}
|
|
@@ -25337,13 +25342,17 @@ const mapLegalEntityToCompanySearchSchema = (legalEntity, documents2) => {
|
|
|
25337
25342
|
case "companyRegistrationDocument": {
|
|
25338
25343
|
return {
|
|
25339
25344
|
...componentData,
|
|
25340
|
-
[key]:
|
|
25345
|
+
[key]: {
|
|
25346
|
+
...companyRegistrationDocument2
|
|
25347
|
+
}
|
|
25341
25348
|
};
|
|
25342
25349
|
}
|
|
25343
25350
|
case "companyTaxDocument": {
|
|
25344
25351
|
return {
|
|
25345
25352
|
...componentData,
|
|
25346
|
-
[key]:
|
|
25353
|
+
[key]: {
|
|
25354
|
+
...companyTaxDocument
|
|
25355
|
+
}
|
|
25347
25356
|
};
|
|
25348
25357
|
}
|
|
25349
25358
|
default:
|
|
@@ -25483,12 +25492,12 @@ function useCompanySearchTaskSubmit({
|
|
|
25483
25492
|
};
|
|
25484
25493
|
}
|
|
25485
25494
|
function CompanySearchComponent(props) {
|
|
25486
|
-
var _a, _b
|
|
25495
|
+
var _a, _b;
|
|
25487
25496
|
const {
|
|
25488
25497
|
i18n
|
|
25489
25498
|
} = useI18nContext();
|
|
25490
25499
|
const {
|
|
25491
|
-
|
|
25500
|
+
country: country2,
|
|
25492
25501
|
activeForm,
|
|
25493
25502
|
problems,
|
|
25494
25503
|
handleAddressSearch,
|
|
@@ -25501,10 +25510,6 @@ function CompanySearchComponent(props) {
|
|
|
25501
25510
|
} = props;
|
|
25502
25511
|
const globalData = useGlobalData();
|
|
25503
25512
|
const [kompanyAddress, setKompanyAddress] = useState();
|
|
25504
|
-
const country2 = useMemo(() => {
|
|
25505
|
-
var _a2, _b2;
|
|
25506
|
-
return ((_a2 = globalData.companyBasics) == null ? void 0 : _a2.country) ?? ((_b2 = data == null ? void 0 : data.companyBasics) == null ? void 0 : _b2.country);
|
|
25507
|
-
}, [globalData, (_a = data == null ? void 0 : data.companyBasics) == null ? void 0 : _a.country]);
|
|
25508
25513
|
const formWrapperClasses = (formId) => (activeForm == null ? void 0 : activeForm.formId) !== formId ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper";
|
|
25509
25514
|
return jsxs("div", {
|
|
25510
25515
|
className: "adyen-kyc-company",
|
|
@@ -25514,6 +25519,7 @@ function CompanySearchComponent(props) {
|
|
|
25514
25519
|
...getFormProps(props, forms.companyBasics.formId),
|
|
25515
25520
|
id: forms.companyBasics.formId,
|
|
25516
25521
|
heading: i18n.get(forms.companyBasics.formName),
|
|
25522
|
+
country: country2,
|
|
25517
25523
|
handleCompanyIndexSearch,
|
|
25518
25524
|
handleCompanyDeepSearch,
|
|
25519
25525
|
handleGetCompanyDataset,
|
|
@@ -25552,8 +25558,8 @@ function CompanySearchComponent(props) {
|
|
|
25552
25558
|
id: forms.companyOtherDetails.formId,
|
|
25553
25559
|
heading: i18n.get(forms.companyOtherDetails.formName),
|
|
25554
25560
|
country: country2,
|
|
25555
|
-
legalCompanyName: (
|
|
25556
|
-
companyType: (
|
|
25561
|
+
legalCompanyName: (_a = globalData == null ? void 0 : globalData.companyBasics) == null ? void 0 : _a.legalCompanyName,
|
|
25562
|
+
companyType: (_b = globalData == null ? void 0 : globalData.companyStructure) == null ? void 0 : _b.entityType
|
|
25557
25563
|
})
|
|
25558
25564
|
}), jsx("div", {
|
|
25559
25565
|
className: formWrapperClasses(forms.companyRegistrationDocument.formId),
|
|
@@ -25623,11 +25629,14 @@ function CompanySearchComponent(props) {
|
|
|
25623
25629
|
});
|
|
25624
25630
|
}
|
|
25625
25631
|
function CompanySearchDropinComponent({
|
|
25632
|
+
country: parentCountry,
|
|
25633
|
+
problems: propProblems,
|
|
25626
25634
|
legalEntityResponse,
|
|
25627
25635
|
parentLegalEntity,
|
|
25628
25636
|
trackingConfig,
|
|
25629
25637
|
eventEmitter,
|
|
25630
25638
|
taskType = TaskTypes.COMPANY_SEARCH,
|
|
25639
|
+
capabilities,
|
|
25631
25640
|
taskName,
|
|
25632
25641
|
hideDropinLayout,
|
|
25633
25642
|
homeButtonLabel,
|
|
@@ -25646,7 +25655,7 @@ function CompanySearchDropinComponent({
|
|
|
25646
25655
|
handleRefreshCompanyDataset,
|
|
25647
25656
|
handleVerifyTin
|
|
25648
25657
|
}) {
|
|
25649
|
-
var _a, _b, _c
|
|
25658
|
+
var _a, _b, _c;
|
|
25650
25659
|
const {
|
|
25651
25660
|
state: {
|
|
25652
25661
|
currentState
|
|
@@ -25670,30 +25679,32 @@ function CompanySearchDropinComponent({
|
|
|
25670
25679
|
isExperimentEnabled
|
|
25671
25680
|
} = useExperimentsContext();
|
|
25672
25681
|
const [loadingStatus, setLoadingStatus] = useState("success");
|
|
25673
|
-
const [
|
|
25674
|
-
const [problems, setProblems] = useState((_b = (_a = getCapabilityProblems(legalEntityResponse, isExperimentEnabled)) == null ? void 0 : _a.LegalEntity) == null ? void 0 : _b[legalEntityResponse.id]);
|
|
25675
|
-
const legalEntityResponseData = useMemo(() => mapLegalEntityToCompanySearchSchema(legalEntityResponse, documents2), [legalEntityResponse, documents2]);
|
|
25676
|
-
const capabilities = useMemo(() => Object.keys(legalEntityResponse.capabilities), [legalEntityResponse]);
|
|
25682
|
+
const [initialData, setInitialData] = useState(mapLegalEntityToCompanySearchSchema(legalEntityResponse));
|
|
25683
|
+
const [problems, setProblems] = useState(propProblems ?? ((_b = (_a = getCapabilityProblems(legalEntityResponse, isExperimentEnabled)) == null ? void 0 : _a.LegalEntity) == null ? void 0 : _b[legalEntityResponse.id]));
|
|
25677
25684
|
const country2 = useMemo(() => {
|
|
25678
|
-
var _a2
|
|
25679
|
-
return ((_a2 = currentState.data.companyBasics) == null ? void 0 : _a2.country) ??
|
|
25680
|
-
}, [(_c = currentState.data.companyBasics) == null ? void 0 : _c.country,
|
|
25685
|
+
var _a2;
|
|
25686
|
+
return ((_a2 = currentState.data.companyBasics) == null ? void 0 : _a2.country) ?? parentCountry;
|
|
25687
|
+
}, [(_c = currentState.data.companyBasics) == null ? void 0 : _c.country, parentCountry]);
|
|
25681
25688
|
const documentUtils = documentApiUtils(handleCreateDocument, handleGetDocument, handleUpdateDocument);
|
|
25682
25689
|
useEffect(() => {
|
|
25683
25690
|
var _a2;
|
|
25691
|
+
eventEmitter.on("updateLocale", (locale) => setLocale(locale));
|
|
25684
25692
|
const documentIds = ((_a2 = legalEntityResponse == null ? void 0 : legalEntityResponse.documentDetails) == null ? void 0 : _a2.map((documentReference) => documentReference.id)) || [];
|
|
25685
25693
|
if (!documentIds.length)
|
|
25686
25694
|
return;
|
|
25687
25695
|
documentUtils.fetchDocuments(documentIds, legalEntityResponse.id).then(() => {
|
|
25688
|
-
|
|
25696
|
+
setInitialData({
|
|
25697
|
+
...initialData,
|
|
25698
|
+
...mapApiDocumentToCompanySearchDocuments(legalEntityResponse.id)
|
|
25699
|
+
});
|
|
25689
25700
|
}).catch(() => showToast({
|
|
25690
25701
|
label: i18n.get("failedToFetchRelevantDocuments"),
|
|
25691
25702
|
type: ToastType.ERROR
|
|
25692
25703
|
}));
|
|
25693
|
-
}, [i18n, legalEntityResponse]);
|
|
25704
|
+
}, [documentUtils, eventEmitter, i18n, initialData, legalEntityResponse, setLocale, showToast]);
|
|
25694
25705
|
const getConfigurationData = useCallback(() => getConfiguration2({
|
|
25695
25706
|
legalEntityType: LegalEntityType.ORGANIZATION,
|
|
25696
|
-
capabilities,
|
|
25707
|
+
capabilities: capabilities ?? [],
|
|
25697
25708
|
country: country2
|
|
25698
25709
|
}), [getConfiguration2, capabilities, country2]);
|
|
25699
25710
|
const {
|
|
@@ -25731,7 +25742,7 @@ function CompanySearchDropinComponent({
|
|
|
25731
25742
|
data: formatDataForSummary(currentState.data, forms$1, i18n),
|
|
25732
25743
|
omittedKeys: ["operationalAddressIsSame"]
|
|
25733
25744
|
}), [currentState.data, forms$1, i18n]);
|
|
25734
|
-
const canSubmitForm = useMemo(() => canSubmit(currentState.data) && hasDataChanged(
|
|
25745
|
+
const canSubmitForm = useMemo(() => canSubmit(currentState.data) && hasDataChanged(initialData, currentState.data), [initialData, currentState.data]);
|
|
25735
25746
|
const baseTrackingPayload = useMemo(() => getBaseTrackingPayload({
|
|
25736
25747
|
trackingConfig,
|
|
25737
25748
|
parentLegalEntity,
|
|
@@ -25770,12 +25781,11 @@ function CompanySearchDropinComponent({
|
|
|
25770
25781
|
})
|
|
25771
25782
|
});
|
|
25772
25783
|
useEffect(() => {
|
|
25773
|
-
eventEmitter.on("updateLocale", (locale) => setLocale(locale));
|
|
25774
25784
|
userEvents.addPageView("Company search dropin");
|
|
25775
25785
|
userEvents.addEvent("Started company search task", {
|
|
25776
25786
|
segmentation: baseTrackingPayload
|
|
25777
25787
|
});
|
|
25778
|
-
}, [baseTrackingPayload
|
|
25788
|
+
}, [baseTrackingPayload]);
|
|
25779
25789
|
return jsx(FormWrapper, {
|
|
25780
25790
|
taskName,
|
|
25781
25791
|
gotoFormByFormIndex,
|
|
@@ -25799,7 +25809,8 @@ function CompanySearchDropinComponent({
|
|
|
25799
25809
|
children: jsx(CompanySearchComponent, {
|
|
25800
25810
|
...derivedProps,
|
|
25801
25811
|
ref: formRef,
|
|
25802
|
-
data:
|
|
25812
|
+
data: initialData,
|
|
25813
|
+
country: country2,
|
|
25803
25814
|
problems,
|
|
25804
25815
|
activeForm,
|
|
25805
25816
|
shouldValidate,
|
|
@@ -31883,7 +31894,7 @@ function DropinComposerComponent({
|
|
|
31883
31894
|
const [serviceAgreementTypes, setServiceAgreementTypes] = useState([]);
|
|
31884
31895
|
const [serviceAgreementAcceptanceInfos, setServiceAgreementAcceptanceInfos] = useState([]);
|
|
31885
31896
|
const [transferInstrument, setTransferInstrument] = useState(null);
|
|
31886
|
-
const [capabilityProblems, setCapabilityProblems] = useState(getCapabilityProblems(legalEntityResponse));
|
|
31897
|
+
const [capabilityProblems, setCapabilityProblems] = useState(getCapabilityProblems(legalEntityResponse, isExperimentEnabled));
|
|
31887
31898
|
const [bankVerificationVendors, setBankVerificationVendors] = useState();
|
|
31888
31899
|
const rootLegalEntityCountry = rootLegalEntity.type === LegalEntityType.INDIVIDUAL ? (_a = rootLegalEntity.individual.residentialAddress) == null ? void 0 : _a.country : (_b = rootLegalEntity.organization.registeredAddress) == null ? void 0 : _b.country;
|
|
31889
31900
|
const hasTrust = accountHolder2 === "aTrust" || isPartOfTrustFromLegalEntity(legalEntityResponse);
|
|
@@ -32580,7 +32591,10 @@ function DropinComposerComponent({
|
|
|
32580
32591
|
taskType: TaskTypes.COMPANY_SEARCH,
|
|
32581
32592
|
taskName: hasTrust ? "companyTrusteeDetails" : "companyDetails",
|
|
32582
32593
|
legalEntityResponse: rootLegalEntity,
|
|
32594
|
+
capabilities: Object.keys((legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities) ?? {}),
|
|
32595
|
+
problems: getLegalEntityProblems(rootLegalEntity),
|
|
32583
32596
|
homeButtonLabel: i18n.get("saveAndGoToOverview"),
|
|
32597
|
+
country: legalEntityResponse.organization.registeredAddress.country ?? contextCountry,
|
|
32584
32598
|
onChange: componentOnChange,
|
|
32585
32599
|
onSubmit: async (data) => {
|
|
32586
32600
|
onSubmit == null ? void 0 : onSubmit(data);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { StateUpdater } from 'preact/hooks';
|
|
2
2
|
import type { BaseInnerFormProps } from '../../core/hooks/useForm';
|
|
3
|
+
import type { CountryCode } from '../../core/models/country-code';
|
|
3
4
|
import type { DropinAPIHandlers } from '../Dropins/types';
|
|
4
5
|
import type { CountryFieldSchema } from '../internal/CountryField/types';
|
|
5
6
|
import type { LegalCompanyNameFieldSchema } from '../internal/LegalCompanyNameField/types';
|
|
@@ -8,6 +9,7 @@ import type { TaxInformationFieldSchema } from '../internal/TaxInformationField/
|
|
|
8
9
|
export interface CompanyBasicsSchema extends LegalCompanyNameFieldSchema, CountryFieldSchema, StateFieldSchema, TaxInformationFieldSchema {
|
|
9
10
|
}
|
|
10
11
|
export interface CompanyBasicsProps extends BaseInnerFormProps<CompanyBasicsSchema> {
|
|
12
|
+
country: CountryCode;
|
|
11
13
|
kompanyAddress?: string;
|
|
12
14
|
setKompanyAddress: StateUpdater<string | undefined>;
|
|
13
15
|
handleCompanyIndexSearch: DropinAPIHandlers['handleCompanyIndexSearch'];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { BaseOuterFormProps } from '../../core/hooks/useForm';
|
|
2
|
+
import type { CountryCode } from '../../core/models/country-code';
|
|
2
3
|
import type { FormModel } from '../../core/models/form';
|
|
3
4
|
import type { CompanyBasicsSchema } from '../CompanyBasics/types';
|
|
4
5
|
import type { CompanyOtherDetailsSchema } from '../CompanyOtherDetails/types';
|
|
@@ -15,6 +16,7 @@ export interface CompanySearchSchema {
|
|
|
15
16
|
companyTaxDocument?: DocumentUploadSchema;
|
|
16
17
|
}
|
|
17
18
|
export interface CompanySearchProps extends BaseOuterFormProps<CompanySearchSchema> {
|
|
19
|
+
country: CountryCode;
|
|
18
20
|
forms?: FormModel[];
|
|
19
21
|
handleAddressSearch: DropinAPIHandlers['handleAddressSearch'];
|
|
20
22
|
handleFindAddress: DropinAPIHandlers['handleFindAddress'];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { BaseInnerFormProps } from '../../core/hooks/useForm';
|
|
2
2
|
import type { CompanyTypesValue } from '../../core/models/api/company-types-value';
|
|
3
3
|
export interface CompanyStructureSchema {
|
|
4
|
-
entityType
|
|
4
|
+
entityType?: CompanyTypesValue;
|
|
5
5
|
}
|
|
6
6
|
export type CompanyStructureProps = BaseInnerFormProps<CompanyStructureSchema>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { CompanySearchDropinProps } from '../types';
|
|
2
|
-
export declare function CompanySearchDropinComponent({ legalEntityResponse, parentLegalEntity, trackingConfig, eventEmitter, taskType, taskName, hideDropinLayout, homeButtonLabel, onChange, onSubmit: onExternalSubmit, handleHomeClick, handleCreateDocument, handleGetDocument, handleUpdateDocument, handleAddressSearch, handleFindAddress, handleUpdateLegalEntity, handleCompanyIndexSearch, handleCompanyDeepSearch, handleGetCompanyDataset, handleRefreshCompanyDataset, handleVerifyTin, }: CompanySearchDropinProps): import("preact").JSX.Element;
|
|
2
|
+
export declare function CompanySearchDropinComponent({ country: parentCountry, problems: propProblems, legalEntityResponse, parentLegalEntity, trackingConfig, eventEmitter, taskType, capabilities, taskName, hideDropinLayout, homeButtonLabel, onChange, onSubmit: onExternalSubmit, handleHomeClick, handleCreateDocument, handleGetDocument, handleUpdateDocument, handleAddressSearch, handleFindAddress, handleUpdateLegalEntity, handleCompanyIndexSearch, handleCompanyDeepSearch, handleGetCompanyDataset, handleRefreshCompanyDataset, handleVerifyTin, }: CompanySearchDropinProps): import("preact").JSX.Element;
|
|
@@ -1,30 +1,38 @@
|
|
|
1
1
|
import { Problem } from './problem';
|
|
2
2
|
import { VerificationStatus } from './verification-status';
|
|
3
|
-
export
|
|
4
|
-
AUTHORISED_PAYMENT_INSTRUMENT_USER = "authorisedPaymentInstrumentUser",
|
|
5
|
-
GET_GRANT_OFFERS = "getGrantOffers",
|
|
6
|
-
ISSUE_BANK_ACCOUNT = "issueBankAccount",
|
|
7
|
-
ISSUE_CARD = "issueCard",
|
|
8
|
-
RECEIVE_FROM_TRANSFER_INSTRUMENT = "receiveFromTransferInstrument",
|
|
9
|
-
RECEIVE_FROM_BALANCE_ACCOUNT = "receiveFromBalanceAccount",
|
|
10
|
-
RECEIVE_FROM_PLATFORM_PAYMENTS = "receiveFromPlatformPayments",
|
|
11
|
-
RECEIVE_FROM_THIRD_PARTY = "receiveFromThirdParty",
|
|
12
|
-
RECEIVE_PAYMENTS = "receivePayments",
|
|
13
|
-
RECEIVE_GRANTS = "receiveGrants",
|
|
14
|
-
SEND_TO_BALANCE_ACCOUNT = "sendToBalanceAccount",
|
|
15
|
-
SEND_TO_TRANSFER_INSTRUMENT = "sendToTransferInstrument",
|
|
16
|
-
SEND_TO_THIRD_PARTY = "sendToThirdParty",
|
|
17
|
-
USE_CARD = "useCard",
|
|
18
|
-
USE_CARD_IN_RESTRICTED_COUNTRIES = "useCardInRestrictedCountries",
|
|
19
|
-
USE_CARD_IN_RESTRICTED_INDUSTRIES = "useCardInRestrictedIndustries",
|
|
20
|
-
WITHDRAW_FROM_ATM = "withdrawFromAtm",
|
|
21
|
-
WITHDRAW_FROM_ATM_IN_RESTRICTED_COUNTRIES = "withdrawFromAtmInRestrictedCountries"
|
|
22
|
-
}
|
|
23
|
-
export type CapabilityType = `${Capabilities}`;
|
|
3
|
+
export type CapabilityName = 'acceptExternalFunding' | 'acceptPspFunding' | 'acceptTransactionInRestrictedCountries' | 'acceptTransactionInRestrictedCountriesCommercial' | 'acceptTransactionInRestrictedCountriesConsumer' | 'acceptTransactionInRestrictedIndustries' | 'acceptTransactionInRestrictedIndustriesCommercial' | 'acceptTransactionInRestrictedIndustriesConsumer' | 'acquiring' | 'atmWithdrawal' | 'atmWithdrawalCommercial' | 'atmWithdrawalConsumer' | 'atmWithdrawalInRestrictedCountries' | 'atmWithdrawalInRestrictedCountriesCommercial' | 'atmWithdrawalInRestrictedCountriesConsumer' | 'authorisedPaymentInstrumentUser' | 'getGrantOffers' | 'issueBankAccount' | 'issueCard' | 'issueCardCommercial' | 'issueCardConsumer' | 'localAcceptance' | 'payout' | 'payoutToTransferInstrument' | 'processing' | 'receiveFromBalanceAccount' | 'receiveFromPlatformPayments' | 'receiveFromThirdParty' | 'receiveFromTransferInstrument' | 'receiveGrants' | 'receivePayments' | 'sendToBalanceAccount' | 'sendToThirdParty' | 'sendToTransferInstrument' | 'thirdPartyFunding' | 'useCard' | 'useCardCommercial' | 'useCardConsumer' | 'useCardInRestrictedCountries' | 'useCardInRestrictedCountriesCommercial' | 'useCardInRestrictedCountriesConsumer' | 'useCardInRestrictedIndustries' | 'useCardInRestrictedIndustriesCommercial' | 'useCardInRestrictedIndustriesConsumer' | 'withdrawFromAtm' | 'withdrawFromAtmCommercial' | 'withdrawFromAtmConsumer' | 'withdrawFromAtmInRestrictedCountries' | 'withdrawFromAtmInRestrictedCountriesCommercial' | 'withdrawFromAtmInRestrictedCountriesConsumer';
|
|
24
4
|
export interface Capability {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
5
|
+
/** @description Indicates whether the capability is allowed. Adyen sets this to **true** if the verification is successful */
|
|
6
|
+
allowed?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* @description The capability level that is allowed for the legal entity.
|
|
9
|
+
*
|
|
10
|
+
* Possible values: **notApplicable**, **low**, **medium**, **high**.
|
|
11
|
+
* @enum {string}
|
|
12
|
+
*/
|
|
13
|
+
allowedLevel?: 'high' | 'low' | 'medium' | 'notApplicable';
|
|
14
|
+
/** @description Indicates whether the capability is requested. To check whether the Legal Entity is permitted to use the capability, */
|
|
15
|
+
requested?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* @description The requested level of the capability. Some capabilities, such as those used in [card issuing](https://docs.adyen.com/issuing/add-capabilities#capability-levels), have different levels. Levels increase the capability, but also require additional checks and increased monitoring.
|
|
18
|
+
*
|
|
19
|
+
* Possible values: **notApplicable**, **low**, **medium**, **high**.
|
|
20
|
+
* @enum {string}
|
|
21
|
+
*/
|
|
22
|
+
requestedLevel?: 'high' | 'low' | 'medium' | 'notApplicable';
|
|
23
|
+
/**
|
|
24
|
+
* @description The status of the verification checks for the capability.
|
|
25
|
+
*
|
|
26
|
+
* Possible values:
|
|
27
|
+
*
|
|
28
|
+
* * **pending**: Adyen is running the verification.
|
|
29
|
+
*
|
|
30
|
+
* * **invalid**: The verification failed. Check if the `errors` array contains more information.
|
|
31
|
+
*
|
|
32
|
+
* * **valid**: The verification has been successfully completed.
|
|
33
|
+
*
|
|
34
|
+
* * **rejected**: Adyen has verified the information, but found reasons to not allow the capability.
|
|
35
|
+
*/
|
|
36
|
+
verificationStatus?: VerificationStatus;
|
|
28
37
|
problems: Problem[];
|
|
29
|
-
verificationStatus: VerificationStatus;
|
|
30
38
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PartialDeep } from 'type-fest';
|
|
2
|
-
import { Capability,
|
|
2
|
+
import { Capability, CapabilityName } from './capability';
|
|
3
3
|
import { DocumentDetail } from './documentDetail';
|
|
4
4
|
import { Individual } from './individual';
|
|
5
5
|
import { LegalEntityAssociation } from './legal-entity-association';
|
|
@@ -18,7 +18,7 @@ export interface LegalEntity {
|
|
|
18
18
|
trust?: Trust;
|
|
19
19
|
type?: LegalEntityType;
|
|
20
20
|
capabilities?: {
|
|
21
|
-
[key in
|
|
21
|
+
[key in CapabilityName]?: Capability;
|
|
22
22
|
};
|
|
23
23
|
transferInstruments?: TransferInstrumentOverview[];
|
|
24
24
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { CompanySearchSchema } from '../../../components/CompanySearch/types';
|
|
2
2
|
import { ExistingLegalEntity } from '../../../core/models/api/legal-entity';
|
|
3
3
|
export declare const mapApiDocumentToCompanySearchDocuments: (entityId: string) => CompanySearchSchema;
|
|
4
|
-
export declare const mapLegalEntityToCompanySearchSchema: (legalEntity: ExistingLegalEntity
|
|
4
|
+
export declare const mapLegalEntityToCompanySearchSchema: (legalEntity: ExistingLegalEntity) => CompanySearchSchema;
|