@adyen/kyc-components 2.45.2 → 2.46.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/adyen-kyc-components.es.js +3131 -1054
- package/dist/style.css +285 -508
- package/dist/types/components/AdditionalInformation/component/AdditionalInformationComponent.d.ts +6 -0
- package/dist/types/components/AdditionalInformation/index.d.ts +1 -0
- package/dist/types/components/AdditionalInformation/types.d.ts +18 -0
- package/dist/types/components/BasicInformation/component/BasicInformationComponent.d.ts +6 -0
- package/dist/types/components/BasicInformation/index.d.ts +1 -0
- package/dist/types/components/BasicInformation/types.d.ts +23 -0
- package/dist/types/components/BusinessDetails/forms.d.ts +47 -23
- package/dist/types/components/BusinessDetails/types.d.ts +2 -1
- package/dist/types/components/Company/component/CompanyComponent.d.ts +1 -1
- package/dist/types/components/Company/rules.d.ts +1 -1
- package/dist/types/components/Dropins/BusinessDetailsDropin/components/BusinessDetailsDropinComponent.d.ts +1 -1
- package/dist/types/components/Dropins/BusinessDetailsDropin/types.d.ts +2 -0
- package/dist/types/components/Dropins/HighExposureDropin/components/AdditionalFieldsForHighExposureCompany.d.ts +1 -1
- package/dist/types/components/Dropins/HighExposureDropin/components/HighExposureBusinessInformation.d.ts +3 -0
- package/dist/types/components/Dropins/HighExposureDropin/components/HighExposureDropinComponent.d.ts +0 -1
- package/dist/types/components/Dropins/HighExposureDropin/types.d.ts +15 -0
- package/dist/types/components/Individual/validators.d.ts +13 -0
- package/dist/types/components/PayoutVerificationMethod/allowedBankCountriesPerCountry.d.ts +1 -0
- package/dist/types/components/SingpassBanner/index.d.ts +2 -0
- package/dist/types/components/SingpassSelection/index.d.ts +1 -0
- package/dist/types/components/SingpassSelection/types.d.ts +4 -0
- package/dist/types/components/SoleProp/component/SolePropComponent.d.ts +1 -1
- package/dist/types/components/internal/Address/utils.d.ts +2 -2
- package/dist/types/components/internal/BusinessNameField/BusinessNameField.d.ts +3 -0
- package/dist/types/components/internal/BusinessNameField/fieldConfig.d.ts +3 -0
- package/dist/types/components/internal/BusinessNameField/index.d.ts +1 -0
- package/dist/types/components/internal/BusinessNameField/types.d.ts +5 -0
- package/dist/types/components/internal/BusinessRegistrationNumber/fieldConfig.d.ts +2 -0
- package/dist/types/components/internal/BusinessRegistrationNumberField/BusinessRegistrationNumberField.d.ts +2 -2
- package/dist/types/components/internal/BusinessRegistrationNumberField/index.d.ts +0 -1
- package/dist/types/components/internal/Button/Button.d.ts +1 -1
- package/dist/types/components/internal/Button/types.d.ts +1 -6
- package/dist/types/components/internal/DBANameField/DBANameField.d.ts +4 -0
- package/dist/types/components/internal/DBANameField/fieldConfig.d.ts +3 -0
- package/dist/types/components/internal/DBANameField/index.d.ts +1 -0
- package/dist/types/components/internal/DBANameField/types.d.ts +6 -0
- package/dist/types/components/internal/Divider/Divider.d.ts +2 -0
- package/dist/types/components/internal/FormFields/InputEmail.d.ts +1 -1
- package/dist/types/components/internal/FormFields/RadioGroup/RadioGroup.d.ts +1 -1
- package/dist/types/components/internal/FormFields/RadioGroup/types.d.ts +1 -0
- package/dist/types/components/internal/IdFieldTypeSelector/countryIdNumberTypes.d.ts +9 -2
- package/dist/types/components/internal/IdFieldTypeSelector/inferTaxIdNumberType.d.ts +1 -1
- package/dist/types/components/internal/LegalFormField/LegalFormField.d.ts +3 -0
- package/dist/types/components/internal/LegalFormField/index.d.ts +1 -0
- package/dist/types/components/internal/LegalFormField/types.d.ts +8 -0
- package/dist/types/components/internal/NaceCodeField/NaceCodeField.d.ts +3 -0
- package/dist/types/components/internal/NaceCodeField/index.d.ts +1 -0
- package/dist/types/components/internal/NaceCodeField/types.d.ts +5 -0
- package/dist/types/components/internal/StateField/StateField.d.ts +1 -1
- package/dist/types/components/internal/StateField/fieldConfig.d.ts +9 -0
- package/dist/types/components/internal/StockExchangeMICField/StockExchangeMICField.d.ts +1 -1
- package/dist/types/components/internal/StockISINField/StockISINField.d.ts +1 -1
- package/dist/types/components/internal/StockTickerSymbol/StockTickerSymbolField.d.ts +1 -1
- package/dist/types/components/internal/TaxId/fieldConfig.d.ts +2 -2
- package/dist/types/components/internal/TaxInformationField/TaxInformationField.d.ts +1 -1
- package/dist/types/components/internal/TaxInformationField/types.d.ts +2 -0
- package/dist/types/components/internal/Toast/Toast.d.ts +1 -1
- package/dist/types/components/internal/Toast/types.d.ts +2 -5
- package/dist/types/components/internal/VatNumberField/VatNumberField.d.ts +1 -1
- package/dist/types/core/Context/ConfigurationApiContext/ConfigurationApiContext.d.ts +3 -0
- package/dist/types/core/Context/ExperimentContext/types.d.ts +3 -1
- package/dist/types/core/Services/componentApi/get-legal-forms.d.ts +3 -0
- package/dist/types/core/Services/componentApi/get-nace-codes.d.ts +2 -0
- package/dist/types/core/hooks/useFormComposer.d.ts +2 -0
- package/dist/types/core/hooks/useHideButton.d.ts +2 -0
- package/dist/types/core/models/api/phone.d.ts +0 -1
- package/dist/types/core/process-field-configurations.d.ts +1 -1
- package/dist/types/utils/mapping/businessDetails/mapLegalEntityToBusinessDetailsSchema.d.ts +2 -1
- package/dist/types/utils/mapping/componentApiMapping.d.ts +10 -9
- package/dist/types/utils/masking/masks/businessRegistrationNumberMasks.d.ts +213 -0
- package/dist/types/utils/perState.d.ts +8 -0
- package/dist/types/utils/regex/businessRegistrationNumberPatterns.d.ts +54 -0
- package/dist/types/utils/verification/helpers/verify-id-number-helper.d.ts +8 -3
- package/dist/types/utils/verification/verificationUtils.d.ts +14 -4
- package/package.json +1 -1
- package/dist/types/core/models/id-verification-status.d.ts +0 -7
|
@@ -11,10 +11,12 @@ export interface TaxInformationFieldSchema {
|
|
|
11
11
|
isUen?: boolean;
|
|
12
12
|
}
|
|
13
13
|
export interface TaxInformationFieldProps extends BaseFormFieldProps<TaxInformationFieldSchema> {
|
|
14
|
+
defaultData: TaxInformation[] | undefined;
|
|
14
15
|
country: CountryCode;
|
|
15
16
|
canExempt: boolean;
|
|
16
17
|
taxIdNumberType: TaxIdNumberType | undefined;
|
|
17
18
|
setTaxIdNumberType: Dispatch<StateUpdater<TaxIdNumberType | undefined>>;
|
|
18
19
|
companyType?: CompanyTypesValue | LegalEntityType.TRUST;
|
|
20
|
+
registrationNumber?: string;
|
|
19
21
|
isUen?: boolean;
|
|
20
22
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import './_toast.scss';
|
|
2
2
|
import type { ToastProps } from './types';
|
|
3
|
-
export declare
|
|
3
|
+
export declare const Toast: ({ label, subLabel, actionLabel, type, duration, onToastHide, onToastAction, }: ToastProps) => import("preact").JSX.Element;
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
LOADING = "loading",
|
|
3
|
-
SUCCESS = "success",
|
|
4
|
-
ERROR = "error"
|
|
5
|
-
}
|
|
1
|
+
type ToastType = 'loading' | 'success' | 'error';
|
|
6
2
|
export interface ToastOptions {
|
|
7
3
|
label: string;
|
|
8
4
|
subLabel?: string;
|
|
@@ -14,3 +10,4 @@ export interface ToastOptions {
|
|
|
14
10
|
export interface ToastProps extends ToastOptions {
|
|
15
11
|
onToastHide: () => void;
|
|
16
12
|
}
|
|
13
|
+
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { VatNumberFieldProps, VatNumberFieldSchema } from '.';
|
|
2
2
|
export declare const VAT_NUMBER_FIELD: Array<keyof VatNumberFieldSchema>;
|
|
3
|
-
export declare function VatNumberField({ data, valid, errors, labels, mask, guidanceText, placeholders, readonly, handleChangeFor, canExempt, country, vatNumberType, setVatNumberType, }: VatNumberFieldProps): import("preact").JSX.Element;
|
|
3
|
+
export declare function VatNumberField({ data, valid, errors, labels, mask, guidanceText, placeholders, readonly, shouldValidate, handleChangeFor, canExempt, country, vatNumberType, setVatNumberType, }: VatNumberFieldProps): import("preact").JSX.Element;
|
|
@@ -3,6 +3,7 @@ import type { GetAllowedCountriesResponse } from '../../models/api/get-allowed-c
|
|
|
3
3
|
import type { GetAllowedLocalesResponse } from '../../models/api/get-allowed-locales';
|
|
4
4
|
import type { GetConfigurationRequest, GetConfigurationResponse } from '../../models/api/get-configuration';
|
|
5
5
|
import type { VerifyIdNumberRequest, VerifyIdNumberResponse } from '../../models/api/verify-id-number';
|
|
6
|
+
import type { CountryCode } from '../../models/country-code';
|
|
6
7
|
import type { ValidationResponse } from '../../models/errors/validation-error';
|
|
7
8
|
export type ConfigurationApi = {
|
|
8
9
|
getConfiguration: (request: GetConfigurationRequest) => Promise<GetConfigurationResponse>;
|
|
@@ -13,5 +14,7 @@ export type ConfigurationApi = {
|
|
|
13
14
|
verifyIdNumber: (request: VerifyIdNumberRequest) => Promise<VerifyIdNumberResponse | undefined>;
|
|
14
15
|
validatePhoneNumber: (phoneNumber: string) => Promise<ValidationResponse>;
|
|
15
16
|
getImageUrl: () => string;
|
|
17
|
+
getLegalForms: (countryCode?: CountryCode) => Promise<DataSet>;
|
|
18
|
+
getNaceCodes: () => Promise<DataSet>;
|
|
16
19
|
};
|
|
17
20
|
export declare const ConfigurationApiContext: import("preact").Context<ConfigurationApi>;
|
|
@@ -11,10 +11,12 @@ export declare enum ExperimentNames {
|
|
|
11
11
|
AllowMoreRolesForMainRootTrustee = "AllowMoreRolesForMainRootTrustee",
|
|
12
12
|
ShowUnsupportedEntityType = "ShowUnsupportedEntityType",
|
|
13
13
|
ShowSingPassButtonForCompanies = "ShowSingPassButtonForCompanies",
|
|
14
|
+
ShowSingPassButtonForIndividuals = "ShowSingPassButtonForIndividuals",
|
|
14
15
|
ShowExtraTaxExemptionReasons = "ShowExtraTaxExemptionReasons",
|
|
15
16
|
EnableCountryOfGoverningLawForUKCompanies = "EnableCountryOfGoverningLawForUKCompanies",
|
|
16
17
|
HidePayoutAccountTask = "HidePayoutAccountTask",
|
|
17
|
-
HidePciTask = "HidePciTask"
|
|
18
|
+
HidePciTask = "HidePciTask",
|
|
19
|
+
EnableAgeVerification = "EnableAgeVerification"
|
|
18
20
|
}
|
|
19
21
|
export type ExperimentName = `${ExperimentNames}`;
|
|
20
22
|
export type Experiments = {
|
|
@@ -6,6 +6,8 @@ import type { BaseTrackingPayload } from '../utils';
|
|
|
6
6
|
export interface FormComposer {
|
|
7
7
|
handleNextClick(): void;
|
|
8
8
|
handleBackClick?(): void;
|
|
9
|
+
hideHomeButton?: boolean;
|
|
10
|
+
hideBackButton?: boolean;
|
|
9
11
|
nextButtonLabel: string;
|
|
10
12
|
gotoFormByFormIndex(index: number): void;
|
|
11
13
|
activeForm: FormModelWithValidity;
|
|
@@ -70,5 +70,5 @@ type PropsFromConfiguration<FormSchema> = Required<Pick<BaseOuterFormProps<FormS
|
|
|
70
70
|
* }
|
|
71
71
|
* ```
|
|
72
72
|
*/
|
|
73
|
-
export declare function getPropsFromConfigurations<FormSchema extends object>(scenarioConfiguration: FieldConfigurations<FormSchema> | undefined, forms: FormList, remediationActions: Remediation[], dataMissingErrors: VerificationError[], fieldsWithExistingData: AnyTLDSFieldName[], customRules?: {}, customLabels?: {}): PropsFromConfiguration<FormSchema> | undefined;
|
|
73
|
+
export declare function getPropsFromConfigurations<FormSchema extends object>(scenarioConfiguration: FieldConfigurations<FormSchema> | undefined, forms: FormList, remediationActions: Remediation[], dataMissingErrors: VerificationError[], fieldsWithExistingData: AnyTLDSFieldName[], customRules?: {}, customLabels?: {}, customValidators?: {}): PropsFromConfiguration<FormSchema> | undefined;
|
|
74
74
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { BusinessDetailsSchema } from '../../../components/BusinessDetails/types';
|
|
2
|
+
import type { AccountHolderOption } from '../../../components/internal/AccountHolder/types';
|
|
2
3
|
import type { ExistingLegalEntity } from '../../../core/models/api/legal-entity';
|
|
3
4
|
export declare const mapApiDocumentToBusinessDetailsDocuments: (entityId: string) => BusinessDetailsSchema;
|
|
4
|
-
export declare const mapLegalEntityToBusinessDetailsSchema: (legalEntity: ExistingLegalEntity, isChangingType: boolean) => BusinessDetailsSchema;
|
|
5
|
+
export declare const mapLegalEntityToBusinessDetailsSchema: (legalEntity: ExistingLegalEntity, isChangingType: boolean, accountHolder?: AccountHolderOption) => BusinessDetailsSchema;
|
|
@@ -40,23 +40,24 @@ export declare const individualComponentsKeyMapping: {
|
|
|
40
40
|
'address.otherAddressInformation': string;
|
|
41
41
|
};
|
|
42
42
|
export declare const individualApiKeyMapping: {
|
|
43
|
-
[x: string]: "personalDetails.firstName" | "personalDetails.lastName" | "personalDetails.issuerState" | "personalDetails.expiryDate" | "personalDetails.phoneNumber" | "personalDetails.email" | "personalDetails.birthDate" | "personalDetails.idNumber" | "personalDetails.licenseCardNumber" | "personalDetails.nationality" | "personalDetails.jobTitle" | "personalDetails.typeOfIdentity" | "personalDetails.idNumberExempt" | "address.
|
|
43
|
+
[x: string]: "personalDetails.firstName" | "personalDetails.lastName" | "personalDetails.issuerState" | "personalDetails.expiryDate" | "personalDetails.phoneNumber" | "personalDetails.email" | "personalDetails.birthDate" | "personalDetails.idNumber" | "personalDetails.licenseCardNumber" | "personalDetails.nationality" | "personalDetails.jobTitle" | "personalDetails.typeOfIdentity" | "personalDetails.idNumberExempt" | "address.postalCode" | "address.city" | "address.country" | "address.stateOrProvince" | "address.otherAddressInformation" | "address.address";
|
|
44
44
|
};
|
|
45
45
|
export declare const businessDetailsComponentsKeyMapping: {
|
|
46
46
|
'basicInformation.country': string;
|
|
47
47
|
'basicInformation.businessName': string;
|
|
48
48
|
'basicInformation.stateOrProvince': string;
|
|
49
|
-
'basicInformation.taxInformation': string;
|
|
50
49
|
'basicInformation.registrationNumber': string;
|
|
50
|
+
'basicInformation.taxInformation': string;
|
|
51
|
+
'basicInformation.isUen': string;
|
|
51
52
|
'companyStructure.entityType': string;
|
|
52
53
|
'additionalInformation.legalCompanyName': string;
|
|
53
|
-
'additionalInformation.
|
|
54
|
+
'additionalInformation.dbaName': string;
|
|
54
55
|
'additionalInformation.registrationNumber': string;
|
|
55
56
|
'additionalInformation.taxInformation': string;
|
|
57
|
+
'additionalInformation.isUen': string;
|
|
56
58
|
'additionalInformation.vatNumber': string;
|
|
57
59
|
'additionalInformation.vatAbsenceReason': string;
|
|
58
60
|
'additionalInformation.dateOfIncorporation': string;
|
|
59
|
-
'additionalInformation.isUen': string;
|
|
60
61
|
'additionalInformation.stockExchangeMIC': string;
|
|
61
62
|
'additionalInformation.stockISIN': string;
|
|
62
63
|
'additionalInformation.stockTickerSymbol': string;
|
|
@@ -75,7 +76,7 @@ export declare const businessDetailsComponentsKeyMapping: {
|
|
|
75
76
|
'additionalInformation.exemptedFromVat': string;
|
|
76
77
|
};
|
|
77
78
|
export declare const businessDetailsApiKeyMapping: {
|
|
78
|
-
[x: string]: "companyRegistrationAddress.registrationAddress.
|
|
79
|
+
[x: string]: "companyRegistrationAddress.registrationAddress.postalCode" | "companyRegistrationAddress.registrationAddress.city" | "companyRegistrationAddress.registrationAddress.country" | "companyRegistrationAddress.registrationAddress.stateOrProvince" | "companyRegistrationAddress.registrationAddress.otherAddressInformation" | "companyRegistrationAddress.registrationAddress.address" | "companyRegistrationAddress.operationalAddress.postalCode" | "companyRegistrationAddress.operationalAddress.city" | "companyRegistrationAddress.operationalAddress.country" | "companyRegistrationAddress.operationalAddress.stateOrProvince" | "companyRegistrationAddress.operationalAddress.otherAddressInformation" | "companyRegistrationAddress.operationalAddress.address" | "companyStructure.entityType" | "basicInformation.country" | "basicInformation.stateOrProvince" | "basicInformation.registrationNumber" | "basicInformation.isUen" | "basicInformation.taxInformation" | "basicInformation.businessName" | "additionalInformation.legalCompanyName" | "additionalInformation.dateOfIncorporation" | "additionalInformation.vatAbsenceReason" | "additionalInformation.vatNumber" | "additionalInformation.registrationNumber" | "additionalInformation.stockExchangeMIC" | "additionalInformation.stockISIN" | "additionalInformation.stockTickerSymbol" | "additionalInformation.isUen" | "additionalInformation.taxInformation" | "additionalInformation.dbaName";
|
|
79
80
|
};
|
|
80
81
|
export declare const companyComponentsKeyMapping: {
|
|
81
82
|
'companyNameAndCountry.country': string;
|
|
@@ -106,7 +107,7 @@ export declare const companyComponentsKeyMapping: {
|
|
|
106
107
|
'companyRegistrationDetails.exemptedFromVat': string;
|
|
107
108
|
};
|
|
108
109
|
export declare const companyApiKeyMapping: {
|
|
109
|
-
[x: string]: "companyType.entityType" | "companyNameAndCountry.country" | "companyNameAndCountry.legalCompanyName" | "companyNameAndCountry.countryOfGoverningLaw" | "companyRegistrationDetails.dateOfIncorporation" | "companyRegistrationDetails.tradingName" | "companyRegistrationDetails.vatAbsenceReason" | "companyRegistrationDetails.vatNumber" | "companyRegistrationDetails.registrationNumber" | "companyRegistrationDetails.stockExchangeMIC" | "companyRegistrationDetails.stockISIN" | "companyRegistrationDetails.stockTickerSymbol" | "companyRegistrationDetails.isUen" | "companyRegistrationAddress.registrationAddress.
|
|
110
|
+
[x: string]: "companyType.entityType" | "companyNameAndCountry.country" | "companyNameAndCountry.legalCompanyName" | "companyNameAndCountry.countryOfGoverningLaw" | "companyRegistrationDetails.dateOfIncorporation" | "companyRegistrationDetails.tradingName" | "companyRegistrationDetails.vatAbsenceReason" | "companyRegistrationDetails.vatNumber" | "companyRegistrationDetails.registrationNumber" | "companyRegistrationDetails.stockExchangeMIC" | "companyRegistrationDetails.stockISIN" | "companyRegistrationDetails.stockTickerSymbol" | "companyRegistrationDetails.isUen" | "companyRegistrationAddress.registrationAddress.postalCode" | "companyRegistrationAddress.registrationAddress.city" | "companyRegistrationAddress.registrationAddress.country" | "companyRegistrationAddress.registrationAddress.stateOrProvince" | "companyRegistrationAddress.registrationAddress.otherAddressInformation" | "companyRegistrationAddress.registrationAddress.address" | "companyRegistrationAddress.operationalAddress.postalCode" | "companyRegistrationAddress.operationalAddress.city" | "companyRegistrationAddress.operationalAddress.country" | "companyRegistrationAddress.operationalAddress.stateOrProvince" | "companyRegistrationAddress.operationalAddress.otherAddressInformation" | "companyRegistrationAddress.operationalAddress.address";
|
|
110
111
|
};
|
|
111
112
|
export declare const companySearchComponentsKeyMapping: {
|
|
112
113
|
'companyBasics.country': string;
|
|
@@ -139,7 +140,7 @@ export declare const companySearchComponentsKeyMapping: {
|
|
|
139
140
|
'companyOtherDetails.exemptedFromVat': string;
|
|
140
141
|
};
|
|
141
142
|
export declare const companySearchApiKeyMapping: {
|
|
142
|
-
[x: string]: "companyRegistrationAddress.registrationAddress.
|
|
143
|
+
[x: string]: "companyRegistrationAddress.registrationAddress.postalCode" | "companyRegistrationAddress.registrationAddress.city" | "companyRegistrationAddress.registrationAddress.country" | "companyRegistrationAddress.registrationAddress.stateOrProvince" | "companyRegistrationAddress.registrationAddress.otherAddressInformation" | "companyRegistrationAddress.registrationAddress.address" | "companyRegistrationAddress.operationalAddress.postalCode" | "companyRegistrationAddress.operationalAddress.city" | "companyRegistrationAddress.operationalAddress.country" | "companyRegistrationAddress.operationalAddress.stateOrProvince" | "companyRegistrationAddress.operationalAddress.otherAddressInformation" | "companyRegistrationAddress.operationalAddress.address" | "companyStructure.entityType" | "companyBasics.country" | "companyBasics.stateOrProvince" | "companyBasics.legalCompanyName" | "companyBasics.taxInformation" | "companyOtherDetails.dateOfIncorporation" | "companyOtherDetails.tradingName" | "companyOtherDetails.vatAbsenceReason" | "companyOtherDetails.vatNumber" | "companyOtherDetails.registrationNumber" | "companyOtherDetails.stockExchangeMIC" | "companyOtherDetails.stockISIN" | "companyOtherDetails.stockTickerSymbol" | "companyOtherDetails.isUen" | "companyOtherDetails.taxInformation";
|
|
143
144
|
};
|
|
144
145
|
export declare const payoutComponentKeyMapping: {
|
|
145
146
|
'payoutAccountDetails.transferInstrumentId': string;
|
|
@@ -177,7 +178,7 @@ export declare const trustComponentsKeyMapping: {
|
|
|
177
178
|
'trustRegistrationAddress.operationalAddress.otherAddressInformation': string;
|
|
178
179
|
};
|
|
179
180
|
export declare const trustApiKeyMapping: {
|
|
180
|
-
[x: string]: "trustRegistrationDetails.country" | "trustRegistrationDetails.registrationNumber" | "trustRegistrationDetails.trustType" | "trustRegistrationDetails.legalName" | "trustRegistrationAddress.registrationAddress.
|
|
181
|
+
[x: string]: "trustRegistrationDetails.country" | "trustRegistrationDetails.registrationNumber" | "trustRegistrationDetails.trustType" | "trustRegistrationDetails.legalName" | "trustRegistrationAddress.registrationAddress.postalCode" | "trustRegistrationAddress.registrationAddress.city" | "trustRegistrationAddress.registrationAddress.country" | "trustRegistrationAddress.registrationAddress.stateOrProvince" | "trustRegistrationAddress.registrationAddress.otherAddressInformation" | "trustRegistrationAddress.registrationAddress.address" | "trustRegistrationAddress.operationalAddress.postalCode" | "trustRegistrationAddress.operationalAddress.city" | "trustRegistrationAddress.operationalAddress.country" | "trustRegistrationAddress.operationalAddress.stateOrProvince" | "trustRegistrationAddress.operationalAddress.otherAddressInformation" | "trustRegistrationAddress.operationalAddress.address";
|
|
181
182
|
};
|
|
182
183
|
export declare const highExposureComponentsKeyMapping: {
|
|
183
184
|
'company.numberOfEmployees': string;
|
|
@@ -211,7 +212,7 @@ export declare const solePropComponentsKeyMapping: {
|
|
|
211
212
|
'solePropRegistrationDetails.exemptedFromVat': string;
|
|
212
213
|
};
|
|
213
214
|
export declare const solePropApiKeyMapping: {
|
|
214
|
-
[x: string]: "solePropNameAndCountry.country" | "solePropNameAndCountry.legalCompanyName" | "solePropRegistrationDetails.dateOfIncorporation" | "solePropRegistrationDetails.tradingName" | "solePropRegistrationDetails.exemptedFromTax" | "solePropRegistrationDetails.vatAbsenceReason" | "solePropRegistrationDetails.vatNumber" | "solePropRegistrationDetails.registrationNumber" | "solePropRegistrationAddress.registrationAddress.
|
|
215
|
+
[x: string]: "solePropNameAndCountry.country" | "solePropNameAndCountry.legalCompanyName" | "solePropRegistrationDetails.dateOfIncorporation" | "solePropRegistrationDetails.tradingName" | "solePropRegistrationDetails.exemptedFromTax" | "solePropRegistrationDetails.vatAbsenceReason" | "solePropRegistrationDetails.vatNumber" | "solePropRegistrationDetails.registrationNumber" | "solePropRegistrationAddress.registrationAddress.postalCode" | "solePropRegistrationAddress.registrationAddress.city" | "solePropRegistrationAddress.registrationAddress.country" | "solePropRegistrationAddress.registrationAddress.stateOrProvince" | "solePropRegistrationAddress.registrationAddress.otherAddressInformation" | "solePropRegistrationAddress.registrationAddress.address" | "solePropRegistrationAddress.operationalAddress.postalCode" | "solePropRegistrationAddress.operationalAddress.city" | "solePropRegistrationAddress.operationalAddress.country" | "solePropRegistrationAddress.operationalAddress.stateOrProvince" | "solePropRegistrationAddress.operationalAddress.otherAddressInformation" | "solePropRegistrationAddress.operationalAddress.address";
|
|
215
216
|
};
|
|
216
217
|
/**
|
|
217
218
|
* Base api mappings do not contain document mappings as the api used for document upload is different
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { Translatable } from '../../../language/types';
|
|
2
|
+
import type { PerStateWithDefault } from '../../perState';
|
|
1
3
|
export declare const businessRegistrationNumberMasks: {
|
|
2
4
|
AT: {
|
|
3
5
|
firmenbuchnummer: {
|
|
@@ -247,4 +249,215 @@ export declare const businessRegistrationNumberMasks: {
|
|
|
247
249
|
mask: import("../maskTypes").Mask;
|
|
248
250
|
};
|
|
249
251
|
};
|
|
252
|
+
US: {
|
|
253
|
+
AL: {
|
|
254
|
+
mask: import("../maskTypes").Mask;
|
|
255
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
256
|
+
};
|
|
257
|
+
AK: {
|
|
258
|
+
mask: import("../maskTypes").Mask;
|
|
259
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
260
|
+
};
|
|
261
|
+
AZ: {
|
|
262
|
+
mask: import("../maskTypes").Mask;
|
|
263
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
264
|
+
};
|
|
265
|
+
AR: {
|
|
266
|
+
mask: import("../maskTypes").Mask;
|
|
267
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
268
|
+
};
|
|
269
|
+
CA: {
|
|
270
|
+
mask: import("../maskTypes").Mask;
|
|
271
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
272
|
+
};
|
|
273
|
+
CO: {
|
|
274
|
+
mask: import("../maskTypes").Mask;
|
|
275
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
276
|
+
};
|
|
277
|
+
CT: {
|
|
278
|
+
mask: import("../maskTypes").Mask;
|
|
279
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
280
|
+
};
|
|
281
|
+
DE: {
|
|
282
|
+
mask: import("../maskTypes").Mask;
|
|
283
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
284
|
+
};
|
|
285
|
+
FL: {
|
|
286
|
+
mask: import("../maskTypes").Mask;
|
|
287
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
288
|
+
};
|
|
289
|
+
GA: {
|
|
290
|
+
mask: import("../maskTypes").Mask;
|
|
291
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
292
|
+
};
|
|
293
|
+
HI: {
|
|
294
|
+
mask: import("../maskTypes").Mask;
|
|
295
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
296
|
+
};
|
|
297
|
+
ID: {
|
|
298
|
+
mask: import("../maskTypes").Mask;
|
|
299
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
300
|
+
};
|
|
301
|
+
IL: {
|
|
302
|
+
mask: import("../maskTypes").Mask;
|
|
303
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
304
|
+
};
|
|
305
|
+
IN: {
|
|
306
|
+
mask: import("../maskTypes").Mask;
|
|
307
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
308
|
+
};
|
|
309
|
+
IA: {
|
|
310
|
+
mask: import("../maskTypes").Mask;
|
|
311
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
312
|
+
};
|
|
313
|
+
KS: {
|
|
314
|
+
mask: import("../maskTypes").Mask;
|
|
315
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
316
|
+
};
|
|
317
|
+
KY: {
|
|
318
|
+
mask: import("../maskTypes").Mask;
|
|
319
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
320
|
+
};
|
|
321
|
+
LA: {
|
|
322
|
+
mask: import("../maskTypes").Mask;
|
|
323
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
324
|
+
};
|
|
325
|
+
ME: {
|
|
326
|
+
mask: import("../maskTypes").Mask;
|
|
327
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
328
|
+
};
|
|
329
|
+
MD: {
|
|
330
|
+
mask: import("../maskTypes").Mask;
|
|
331
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
332
|
+
};
|
|
333
|
+
MA: {
|
|
334
|
+
mask: import("../maskTypes").Mask;
|
|
335
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
336
|
+
};
|
|
337
|
+
MI: {
|
|
338
|
+
mask: import("../maskTypes").Mask;
|
|
339
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
340
|
+
};
|
|
341
|
+
MN: {
|
|
342
|
+
mask: import("../maskTypes").Mask;
|
|
343
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
344
|
+
};
|
|
345
|
+
MS: {
|
|
346
|
+
mask: import("../maskTypes").Mask;
|
|
347
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
348
|
+
};
|
|
349
|
+
MO: {
|
|
350
|
+
mask: import("../maskTypes").Mask;
|
|
351
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
352
|
+
};
|
|
353
|
+
MT: {
|
|
354
|
+
mask: import("../maskTypes").Mask;
|
|
355
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
356
|
+
};
|
|
357
|
+
NE: {
|
|
358
|
+
mask: import("../maskTypes").Mask;
|
|
359
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
360
|
+
};
|
|
361
|
+
NV: {
|
|
362
|
+
mask: import("../maskTypes").Mask;
|
|
363
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
364
|
+
};
|
|
365
|
+
NH: {
|
|
366
|
+
mask: import("../maskTypes").Mask;
|
|
367
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
368
|
+
};
|
|
369
|
+
NJ: {
|
|
370
|
+
mask: import("../maskTypes").Mask;
|
|
371
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
372
|
+
};
|
|
373
|
+
NM: {
|
|
374
|
+
mask: import("../maskTypes").Mask;
|
|
375
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
376
|
+
};
|
|
377
|
+
NY: {
|
|
378
|
+
mask: import("../maskTypes").Mask;
|
|
379
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
380
|
+
};
|
|
381
|
+
NC: {
|
|
382
|
+
mask: import("../maskTypes").Mask;
|
|
383
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
384
|
+
};
|
|
385
|
+
ND: {
|
|
386
|
+
mask: import("../maskTypes").Mask;
|
|
387
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
388
|
+
};
|
|
389
|
+
OH: {
|
|
390
|
+
mask: import("../maskTypes").Mask;
|
|
391
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
392
|
+
};
|
|
393
|
+
OK: {
|
|
394
|
+
mask: import("../maskTypes").Mask;
|
|
395
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
396
|
+
};
|
|
397
|
+
OR: {
|
|
398
|
+
mask: import("../maskTypes").Mask;
|
|
399
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
400
|
+
};
|
|
401
|
+
PA: {
|
|
402
|
+
mask: import("../maskTypes").Mask;
|
|
403
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
404
|
+
};
|
|
405
|
+
RI: {
|
|
406
|
+
mask: import("../maskTypes").Mask;
|
|
407
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
408
|
+
};
|
|
409
|
+
SC: {
|
|
410
|
+
mask: import("../maskTypes").Mask;
|
|
411
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
412
|
+
};
|
|
413
|
+
SD: {
|
|
414
|
+
mask: import("../maskTypes").Mask;
|
|
415
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
416
|
+
};
|
|
417
|
+
TN: {
|
|
418
|
+
mask: import("../maskTypes").Mask;
|
|
419
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
420
|
+
};
|
|
421
|
+
TX: {
|
|
422
|
+
mask: import("../maskTypes").Mask;
|
|
423
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
424
|
+
};
|
|
425
|
+
UT: {
|
|
426
|
+
mask: import("../maskTypes").Mask;
|
|
427
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
428
|
+
};
|
|
429
|
+
VT: {
|
|
430
|
+
mask: import("../maskTypes").Mask;
|
|
431
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
432
|
+
};
|
|
433
|
+
VA: {
|
|
434
|
+
mask: import("../maskTypes").Mask;
|
|
435
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
436
|
+
};
|
|
437
|
+
WA: {
|
|
438
|
+
mask: import("../maskTypes").Mask;
|
|
439
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
440
|
+
};
|
|
441
|
+
WV: {
|
|
442
|
+
mask: import("../maskTypes").Mask;
|
|
443
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
444
|
+
};
|
|
445
|
+
WI: {
|
|
446
|
+
mask: import("../maskTypes").Mask;
|
|
447
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
448
|
+
};
|
|
449
|
+
WY: {
|
|
450
|
+
mask: import("../maskTypes").Mask;
|
|
451
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
452
|
+
};
|
|
453
|
+
DC: {
|
|
454
|
+
mask: import("../maskTypes").Mask;
|
|
455
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
456
|
+
};
|
|
457
|
+
default: {
|
|
458
|
+
mask: import("../maskTypes").Mask;
|
|
459
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
460
|
+
};
|
|
461
|
+
};
|
|
250
462
|
};
|
|
463
|
+
export declare const stateFormatGuidanceText: PerStateWithDefault<Translatable>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { StateCodeUS } from '../core/models/state-code';
|
|
2
|
+
export type PerState<T> = Partial<Record<StateCodeUS, T>>;
|
|
3
|
+
export type PerStateWithDefault<T> = PerState<T> & {
|
|
4
|
+
default: T;
|
|
5
|
+
};
|
|
6
|
+
export type PerStateAndOtherDiscriminant<T, Discriminant extends string, IncludeDefault extends boolean = true> = Partial<Record<StateCodeUS, (IncludeDefault extends true ? {
|
|
7
|
+
default: T;
|
|
8
|
+
} : object) & Partial<Record<Discriminant, T>>>>;
|
|
@@ -151,4 +151,58 @@ export declare const businessRegistrationNumberPatterns: {
|
|
|
151
151
|
default: RegExp;
|
|
152
152
|
nonProfit: RegExp;
|
|
153
153
|
};
|
|
154
|
+
US: {
|
|
155
|
+
AL: RegExp;
|
|
156
|
+
AK: RegExp;
|
|
157
|
+
AZ: RegExp;
|
|
158
|
+
AR: RegExp;
|
|
159
|
+
CA: RegExp;
|
|
160
|
+
CO: RegExp;
|
|
161
|
+
CT: RegExp;
|
|
162
|
+
DE: RegExp;
|
|
163
|
+
FL: RegExp;
|
|
164
|
+
GA: RegExp;
|
|
165
|
+
HI: RegExp;
|
|
166
|
+
ID: RegExp;
|
|
167
|
+
IL: RegExp;
|
|
168
|
+
IN: RegExp;
|
|
169
|
+
IA: RegExp;
|
|
170
|
+
KS: RegExp;
|
|
171
|
+
KY: RegExp;
|
|
172
|
+
LA: RegExp;
|
|
173
|
+
ME: RegExp;
|
|
174
|
+
MD: RegExp;
|
|
175
|
+
MA: RegExp;
|
|
176
|
+
MI: RegExp;
|
|
177
|
+
MN: RegExp;
|
|
178
|
+
MS: RegExp;
|
|
179
|
+
MO: RegExp;
|
|
180
|
+
MT: RegExp;
|
|
181
|
+
NE: RegExp;
|
|
182
|
+
NV: RegExp;
|
|
183
|
+
NH: RegExp;
|
|
184
|
+
NJ: RegExp;
|
|
185
|
+
NM: RegExp;
|
|
186
|
+
NY: RegExp;
|
|
187
|
+
NC: RegExp;
|
|
188
|
+
ND: RegExp;
|
|
189
|
+
OH: RegExp;
|
|
190
|
+
OK: RegExp;
|
|
191
|
+
OR: RegExp;
|
|
192
|
+
PA: RegExp;
|
|
193
|
+
RI: RegExp;
|
|
194
|
+
SC: RegExp;
|
|
195
|
+
SD: RegExp;
|
|
196
|
+
TN: RegExp;
|
|
197
|
+
TX: RegExp;
|
|
198
|
+
UT: RegExp;
|
|
199
|
+
VT: RegExp;
|
|
200
|
+
VA: RegExp;
|
|
201
|
+
WA: RegExp;
|
|
202
|
+
WV: RegExp;
|
|
203
|
+
WI: RegExp;
|
|
204
|
+
WY: RegExp;
|
|
205
|
+
DC: RegExp;
|
|
206
|
+
default: RegExp;
|
|
207
|
+
};
|
|
154
208
|
};
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
|
|
1
|
+
import type { PersonalDetailsSchema } from '../../../components/PersonalDetails/types';
|
|
2
|
+
import type { ConfigurationApi } from '../../../core/Context/ConfigurationApiContext/ConfigurationApiContext';
|
|
3
|
+
import { type CountryCode } from '../../../core/models/country-code';
|
|
4
|
+
import type { Verification } from '../verificationUtils';
|
|
5
|
+
export declare const COUNTRY_ID_NUMBER_MASKS: Partial<Record<CountryCode, {
|
|
6
|
+
length: number;
|
|
7
|
+
}>>;
|
|
8
|
+
export declare const handleVerifyIdNumber: (formData: PersonalDetailsSchema, country: CountryCode, verifyFn: ConfigurationApi["verifyIdNumber"]) => Promise<Verification>;
|
|
@@ -1,7 +1,17 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { FormState } from '../../core/hooks/useForm/types';
|
|
2
2
|
import type { CountryCode } from '../../core/models/country-code';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
interface VerificationFailure {
|
|
4
|
+
field: string;
|
|
5
|
+
isVerified: false;
|
|
6
|
+
messageKey: string;
|
|
7
|
+
}
|
|
8
|
+
interface VerificationSuccess {
|
|
9
|
+
field: string;
|
|
10
|
+
isVerified: true;
|
|
11
|
+
}
|
|
12
|
+
export type Verification = VerificationFailure | VerificationSuccess;
|
|
13
|
+
export declare function useVerification(fieldsToVerify: string[], country: CountryCode): {
|
|
5
14
|
hasFieldsToVerify: boolean;
|
|
6
|
-
verifyFields: (formState: Pick<
|
|
15
|
+
verifyFields: <T>(formState: Pick<FormState<T>, "data">, savedData: T) => Promise<Verification[]>;
|
|
7
16
|
};
|
|
17
|
+
export {};
|
package/package.json
CHANGED