@adyen/kyc-components 2.55.0 → 2.56.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/es/adyen-kyc-components.es.js +1045 -502
  2. package/dist/style.css +127 -694
  3. package/dist/types/components/AdditionalInformation/VerifiedBusinessCard.d.ts +3 -1
  4. package/dist/types/components/AdditionalInformation/utils.d.ts +6 -0
  5. package/dist/types/components/BusinessSelection/types.d.ts +3 -1
  6. package/dist/types/components/Dropins/ServiceAgreementDropinComponent/components/ServiceAgreementDropinComponent.d.ts +1 -1
  7. package/dist/types/components/Dropins/ServiceAgreementDropinComponent/types.d.ts +1 -0
  8. package/dist/types/components/Dropins/types.d.ts +2 -2
  9. package/dist/types/components/EmbeddedDropins/CreateIndividualComponent/CreateIndividualComponent.d.ts +2 -1
  10. package/dist/types/components/PayoutAccount/component/CheckGuidance/CheckGuidance.d.ts +1 -0
  11. package/dist/types/components/RegistrationAddress/component/RegistrationAddressComponent.d.ts +2 -1
  12. package/dist/types/components/index.d.ts +14 -2
  13. package/dist/types/components/internal/Address/AddressComponent.d.ts +3 -0
  14. package/dist/types/components/internal/Address/AddressExperimentWrapper.d.ts +2 -0
  15. package/dist/types/components/internal/Address/components/FieldContainerComponent.d.ts +9 -0
  16. package/dist/types/components/internal/Address/types.d.ts +6 -10
  17. package/dist/types/components/internal/Address/validate.d.ts +2 -2
  18. package/dist/types/components/internal/FormFields/MultiSelectList/MultiSelectList.d.ts +1 -0
  19. package/dist/types/components/internal/FormFields/Select/Select.d.ts +2 -1
  20. package/dist/types/components/internal/FormFields/Select/components/SelectButton.d.ts +2 -1
  21. package/dist/types/components/internal/FormFields/Select/components/SelectList.d.ts +1 -0
  22. package/dist/types/components/internal/FormFields/Select/components/SelectListItem.d.ts +1 -0
  23. package/dist/types/components/internal/FormFields/Select/types.d.ts +4 -1
  24. package/dist/types/core/Context/ExperimentContext/types.d.ts +4 -1
  25. package/dist/types/core/Context/SettingsContext/types.d.ts +3 -1
  26. package/dist/types/core/SDKValidation/types.d.ts +2 -2
  27. package/dist/types/core/Services/componentApi/get-address.d.ts +2 -2
  28. package/dist/types/core/hooks/useBusinessData/types.d.ts +3 -1
  29. package/dist/types/core/hooks/useDebounce.d.ts +1 -0
  30. package/dist/types/core/models/api/address-search.d.ts +1 -8
  31. package/dist/types/core/models/api/company-search.d.ts +7 -0
  32. package/dist/types/core/models/form-rules.d.ts +2 -0
  33. package/package.json +1 -1
@@ -1,7 +1,9 @@
1
1
  import './VerifiedBusinessCard.scss';
2
2
  import type { CompanyDatasetResponse } from '../../core/models/api/company-search';
3
+ import type { AddressSchema } from '../../types';
3
4
  interface VerifiedBusinessDataProps {
4
5
  verifiedBusiness: CompanyDatasetResponse | undefined;
6
+ verifiedAddress: AddressSchema | undefined;
5
7
  }
6
- export declare function VerifiedBusinessCard({ verifiedBusiness }: VerifiedBusinessDataProps): import("preact").JSX.Element;
8
+ export declare function VerifiedBusinessCard({ verifiedBusiness, verifiedAddress, }: VerifiedBusinessDataProps): import("preact").JSX.Element;
7
9
  export {};
@@ -0,0 +1,6 @@
1
+ import type { CompanyDatasetResponse } from '../../core/models/api/company-search';
2
+ import type { ValidatorMode } from '../../utils/validation/types';
3
+ import type { AddressSchema } from '../internal/Address/types';
4
+ import type { AdditionalInformationSchema } from './types';
5
+ export declare const mapAddressData: (verifiedBusiness: CompanyDatasetResponse) => AddressSchema;
6
+ export declare const applyVerifiedBusinessData: (verifiedBusiness: CompanyDatasetResponse | undefined, handleChangeFor: (key: keyof AdditionalInformationSchema, mode?: ValidatorMode) => (e: any) => void) => void;
@@ -1,6 +1,8 @@
1
1
  import type { Dispatch, StateUpdater } from 'preact/hooks';
2
2
  import type { HookStatus } from '../../core/hooks/types';
3
3
  import type { CompanyDatasetResponse, CompanySearchResult } from '../../core/models/api/company-search';
4
+ import type { ProvinceCode } from '../../core/models/province-code';
5
+ import type { StateCode } from '../../core/models/state-code';
4
6
  export interface BusinessSelectionProps {
5
7
  showCompanyStructure: boolean;
6
8
  searching: HookStatus;
@@ -9,7 +11,7 @@ export interface BusinessSelectionProps {
9
11
  resettingTrustedData: HookStatus;
10
12
  searchResults: CompanySearchResult[] | undefined;
11
13
  invalidTin: boolean;
12
- fetchBusinessData: (company: CompanySearchResult) => Promise<CompanyDatasetResponse | undefined>;
14
+ fetchBusinessData: (company: CompanySearchResult, state?: StateCode | ProvinceCode) => Promise<CompanyDatasetResponse | undefined>;
13
15
  verifyBusinessData: (data: CompanyDatasetResponse, tin: string) => Promise<boolean | undefined>;
14
16
  resetTinVerification: () => void;
15
17
  proceedToManualDataEntry: () => Promise<void>;
@@ -1,3 +1,3 @@
1
1
  import './ServiceAgreementDropinComponent.scss';
2
2
  import type { ServiceAgreementDropinProps } from '../types';
3
- export declare function ServiceAgreementDropinComponent({ legalEntityResponse, handleGetServiceAgreement, handleViewAcceptedTermsOfServiceDocument, handleDownloadAcceptedTermsOfServiceDocument, handleDownloadUnacceptedTermsOfServiceDocument, handleHomeClick, handleSign, taskType, serviceAgreementTypes, serviceAgreementAcceptanceInfos, trackingConfig, }: ServiceAgreementDropinProps): import("preact").JSX.Element;
3
+ export declare function ServiceAgreementDropinComponent({ legalEntityResponse, handleGetServiceAgreement, handleViewAcceptedTermsOfServiceDocument, handleDownloadAcceptedTermsOfServiceDocument, handleDownloadUnacceptedTermsOfServiceDocument, handleHomeClick, handleAddSigner, handleSign, taskType, serviceAgreementTypes, serviceAgreementAcceptanceInfos, trackingConfig, }: ServiceAgreementDropinProps): import("preact").JSX.Element;
@@ -23,6 +23,7 @@ export interface ServiceAgreementDropinProps extends DropinProps {
23
23
  serviceAgreementTypes: ServiceAgreementType[];
24
24
  serviceAgreementAcceptanceInfos: ServiceAgreementAcceptanceInfoWithName[];
25
25
  handleHomeClick(): void;
26
+ handleAddSigner(): void;
26
27
  handleGetServiceAgreement(legalEntityId: string, data: ServiceAgreementRequest): Promise<ServiceAgreementResponse>;
27
28
  handleViewAcceptedTermsOfServiceDocument: DropinAPIHandlers['handleViewAcceptedTermsOfServiceDocument'];
28
29
  handleDownloadAcceptedTermsOfServiceDocument: DropinAPIHandlers['handleDownloadAcceptedTermsOfServiceDocument'];
@@ -1,5 +1,5 @@
1
1
  import type { State, TopLevelDataSchema } from '../../core/Context/StateContext/types';
2
- import type { Address, AddressSearchRequest, AddressSearchResponse } from '../../core/models/api/address-search';
2
+ import type { AddressSearchRequest, AddressSearchResponse, LoqateAddress } from '../../core/models/api/address-search';
3
3
  import type { CapabilityName } from '../../core/models/api/capability';
4
4
  import type { CompanyDatasetRequest, CompanyDatasetResponse, CompanySearchRequest, CompanySearchResponse, TinVerificationRequest, TinVerificationResponse } from '../../core/models/api/company-search';
5
5
  import type { DownloadPci, PciQuestionnaireIds, PciQuestionnaires, PciStatus, PciStatusRequest, PciTemplateRequest, PciTemplateResponse, ServiceAgreementAcceptanceInfos, ServiceAgreementAcceptedDocumentResponse, ServiceAgreementRequest, ServiceAgreementResponse, ServiceAgreementSignRequest, ServiceAgreementSignResponse, ServiceAgreementStatus, ServiceAgreementUnacceptedDocumentRequest, ServiceAgreementUnacceptedDocumentResponse, SignedBy } from '../../core/models/api/contracts';
@@ -55,7 +55,7 @@ export interface DropinAPIHandlers {
55
55
  handleDownloadUnacceptedTermsOfServiceDocument?(legalEntityId: string, data: ServiceAgreementUnacceptedDocumentRequest): Promise<ServiceAgreementUnacceptedDocumentResponse>;
56
56
  handleGetServiceAgreementAcceptanceInfos?(legalEntityId: string): Promise<ServiceAgreementAcceptanceInfos>;
57
57
  handleAddressSearch?(data: AddressSearchRequest, legalEntityId: string): Promise<AddressSearchResponse>;
58
- handleFindAddress?(addressId: string): Promise<Address>;
58
+ handleFindAddress?(addressId: string): Promise<LoqateAddress>;
59
59
  handleGetIdVerificationToken?(legalEntityId: string, data: InstantIdVerificationTokenRequest): Promise<InstantIdVerificationTokenResponse>;
60
60
  handleGetIdVerificationStartCheck?(legalEntityId: string, data: InstantIdVerificationStartCheckRequest): Promise<InstantIdVerificationStartCheckResponse>;
61
61
  handleCompanyIndexSearch?(data: CompanySearchRequest): Promise<CompanySearchResponse>;
@@ -7,10 +7,11 @@ interface CreateIndividualComponentPropsBase {
7
7
  handleBackClick?(): void;
8
8
  modalView?: boolean;
9
9
  onClose?(): void;
10
+ onUnmount?(): void;
10
11
  }
11
12
  export type CreateIndividualComponentProps = CreateIndividualComponentPropsBase & RequireAtLeastOne<{
12
13
  parentLegalEntityId: string;
13
14
  legalEntityId: string;
14
15
  }, 'parentLegalEntityId' | 'legalEntityId'>;
15
- export declare function CreateIndividualComponent({ parentLegalEntityId, legalEntityId, taskType, onSubmitSuccess, handleBackClick, modalView, onClose, }: CreateIndividualComponentProps): import("preact").JSX.Element;
16
+ export declare function CreateIndividualComponent({ parentLegalEntityId, legalEntityId, taskType, onSubmitSuccess, handleBackClick, modalView, onClose, onUnmount, }: CreateIndividualComponentProps): import("preact").JSX.Element;
16
17
  export {};
@@ -1,3 +1,4 @@
1
+ import './CheckGuidance.scss';
1
2
  export type CheckAnnotationType = 'account' | 'routing';
2
3
  interface CheckGuidanceProps {
3
4
  annotated?: CheckAnnotationType;
@@ -1,5 +1,6 @@
1
+ import type { JSX } from 'preact';
1
2
  import type { FormList } from '../../../core/models/form';
2
3
  import type { RegistrationAddressProps } from '../types';
3
4
  export declare const registrationAddressFields: string[];
4
5
  export declare const registrationAddressForms: FormList;
5
- export declare function RegistrationAddressComponent(props: RegistrationAddressProps): import("preact").JSX.Element;
6
+ export declare function RegistrationAddressComponent(props: RegistrationAddressProps): JSX.Element;
@@ -16,6 +16,7 @@ import { CreateTransferInstrumentComponent } from './EmbeddedDropins/CreateTrans
16
16
  import { ManageIndividualComponent } from './EmbeddedDropins/ManageIndividualComponent/ManageIndividualComponent';
17
17
  import { UpdateLegalEntityForHighExposure } from './EmbeddedDropins/UpdateLegalEntityForHighExposure/UpdateLegalEntityForHighExposure';
18
18
  import { ViewVerificationStatusComponent } from './EmbeddedDropins/ViewVerificationStatus';
19
+ import type EventEmitter from './EventEmitter';
19
20
  /**
20
21
  * Maps each component with a Component element.
21
22
  */
@@ -37,7 +38,18 @@ export declare const componentsMap: {
37
38
  };
38
39
  export type ComponentMap = typeof componentsMap;
39
40
  export type ComponentProps<Name extends keyof ComponentMap> = Parameters<ComponentMap[Name]>[0];
40
- export type ComponentPropsWithoutEventEmitter<Name extends keyof ComponentMap> = Omit<ComponentProps<Name>, 'eventEmitter'>;
41
- export type ComponentOptions<Name extends keyof ComponentMap> = ComponentPropsWithoutEventEmitter<Name> & Partial<CoreProviderProps> & Partial<SettingsProps> & Partial<ExperimentsProps> & {
41
+ export type ComponentPropsWithoutInternalProps<Name extends keyof ComponentMap> = Omit<ComponentProps<Name>, keyof CommonInternalProps>;
42
+ /** List componentProps (passed from UIElement to Component) which are internal
43
+ * and not exposed to consumers,
44
+ */
45
+ export interface CommonInternalProps {
46
+ /** Used when component itself needs to handle cleanup.
47
+ * Eg. When Close button is clicked in modal view
48
+ */
49
+ onUnMount(): void;
50
+ /** Used to update locale in components */
51
+ eventEmitter: EventEmitter;
52
+ }
53
+ export type ComponentOptions<Name extends keyof ComponentMap> = ComponentPropsWithoutInternalProps<Name> & Partial<CoreProviderProps> & Partial<SettingsProps> & Partial<ExperimentsProps> & {
42
54
  onUserEvent?: UserEventCallback;
43
55
  };
@@ -0,0 +1,3 @@
1
+ import './Address.scss';
2
+ import type { AddressProps } from './types';
3
+ export declare function AddressComponent({ data, labels, placeholders, helperText, readOnly, hideCountry, fieldValidationErrors, allFields, requiredFields, optionalFields, readOnlyFields, trustedFields, shouldValidate, handleAddressSearch, handleFindAddress, onChange, legalEntityId, verifiedAddress, }: AddressProps): import("preact").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { AddressProps } from './types';
2
+ export declare function AddressExperimentWrapper(props: AddressProps): import("preact").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import './FieldContainer.scss';
2
+ import type { FieldContainerProps } from '../types';
3
+ /**
4
+ * USAGE: Specifically defined as a util to provide a wrapper for fields created within the Address component
5
+ *
6
+ * NOT TO BE USED: if you just want to add a Country or State dropdown outside of an Address component
7
+ * - then you should implement <CountryField> or <StateField> directly
8
+ */
9
+ export declare function FieldContainerComponent({ legalEntityId, classNameModifiers, schema, data, valid, errors, fieldProblems, fieldName, trimOnBlur, hideField, maxlength, readOnly, optional, handleChangeFor, handleAddressSearch, handleFindAddress, }: FieldContainerProps): import("preact").JSX.Element;
@@ -16,15 +16,6 @@ export interface AddressSchema {
16
16
  country?: CountryCode;
17
17
  searchAddress?: string;
18
18
  }
19
- export interface LoqateAddressSchema {
20
- street?: string;
21
- street2?: string;
22
- houseNumberOrName?: string;
23
- postalCode?: string;
24
- city?: string;
25
- stateOrProvince?: string;
26
- country?: CountryCode;
27
- }
28
19
  export interface AddressProps extends BaseInnerFormProps<AddressSchema> {
29
20
  countryCode?: CountryCode;
30
21
  hideCountry?: boolean;
@@ -35,20 +26,25 @@ export interface AddressProps extends BaseInnerFormProps<AddressSchema> {
35
26
  legalEntityId?: string;
36
27
  verifiedBusiness?: CompanyDatasetResponse | undefined;
37
28
  kompanyAddress?: string;
29
+ verifiedAddress?: AddressSchema;
38
30
  }
39
31
  export interface FieldContainerProps {
32
+ legalEntityId?: string;
40
33
  classNameModifiers?: string[];
34
+ schema?: Array<keyof AddressSchema>;
41
35
  data: AddressSchema;
42
36
  fieldName: keyof AddressSchema;
43
37
  valid?: Record<keyof AddressSchema, boolean>;
44
38
  errors?: Record<keyof AddressSchema, ValidationRuleResult | null>;
45
39
  fieldProblems?: Record<keyof AddressSchema, boolean>;
46
- handleChangeFor: (key: keyof AddressSchema, mode?: ValidatorMode) => (e: any) => void;
47
40
  readOnly?: boolean;
48
41
  optional?: boolean;
49
42
  maxlength?: number;
50
43
  hideField?: boolean;
51
44
  trimOnBlur?: boolean;
45
+ handleChangeFor: (key: keyof AddressSchema, mode?: ValidatorMode) => (e: any) => void;
46
+ handleAddressSearch?: DropinAPIHandlers['handleAddressSearch'];
47
+ handleFindAddress?: DropinAPIHandlers['handleFindAddress'];
52
48
  }
53
49
  export interface ReadOnlyAddressProps {
54
50
  data: AddressSchema;
@@ -2,5 +2,5 @@ import type { CountryCode } from '../../../core/models/country-code';
2
2
  import type Language from '../../../language';
3
3
  import type { ValidatorRules } from '../../../utils/validation/types';
4
4
  import type { AddressSchema } from './types';
5
- export declare const addressValidationRules: (country: CountryCode) => ValidatorRules<AddressSchema>;
6
- export declare const addressValidationRulesV4: (country: CountryCode, i18n: Language) => ValidatorRules<AddressSchema>;
5
+ export declare const addressValidationRules: (country: CountryCode | undefined) => ValidatorRules<AddressSchema>;
6
+ export declare const addressValidationRulesV4: (country: CountryCode | undefined, i18n: Language) => ValidatorRules<AddressSchema>;
@@ -1,3 +1,4 @@
1
+ import './MultiSelectList.scss';
1
2
  import type { SelectItem } from '../Select/types';
2
3
  interface MultiSelectListProps<OptionType> {
3
4
  options: readonly OptionType[];
@@ -1,5 +1,6 @@
1
1
  import './Select.scss';
2
+ import './SelectGeneric.scss';
2
3
  import type { JSX } from 'preact';
3
4
  import type { SelectProps } from './types';
4
- declare const Select: ({ items, className, classNameModifiers, filterable, readonly, onChange, selected, name, isInvalid, isValid, placeholder, isMulti, uniqueId, showSelectedItemsAsTags, isSearch, onSearch, resetSearch, loading, getSearchItem, searchText, showSearchList, }: SelectProps) => JSX.Element;
5
+ declare const Select: ({ items, className, classNameModifiers, filterable, readonly, onChange, selected, name, isInvalid, isValid, placeholder, isMulti, uniqueId, showSelectedItemsAsTags, isSearch, onSearch, resetSearch, loading, getSearchItem, searchText, onSearchTextChange, showSearchList, }: SelectProps) => JSX.Element;
5
6
  export default Select;
@@ -1,3 +1,4 @@
1
+ import '../SelectGeneric.scss';
1
2
  import type { SelectButtonProps } from '../types';
2
- declare function SelectButton({ active, readonly, showList, isInvalid, isValid, toggleList, onButtonKeyDown, filterable, placeholder, toggleButtonRef, ariaDescribedBy, selectListId, filterInputRef, onInput, isMulti, id, isSearch, loading, textFilter, }: SelectButtonProps): import("preact").JSX.Element;
3
+ declare function SelectButton({ active, readonly, showList, isInvalid, isValid, toggleList, onButtonKeyDown, filterable, placeholder, toggleButtonRef, ariaDescribedBy, selectListId, filterInputRef, onInput, isMulti, id, isSearch, hideSearchIcon, loading, textFilter, }: SelectButtonProps): import("preact").JSX.Element;
3
4
  export default SelectButton;
@@ -1,3 +1,4 @@
1
+ import '../SelectGeneric.scss';
1
2
  import type { SelectListProps } from '../types';
2
3
  declare function SelectList({ active, items, showList, textFilter, isMulti, showAbove, isSearch, loading, getSearchItem, ...props }: SelectListProps): import("preact").JSX.Element;
3
4
  export default SelectList;
@@ -1,3 +1,4 @@
1
+ import '../SelectGeneric.scss';
1
2
  import type { SelectItemProps } from '../types';
2
3
  declare const SelectListItem: ({ item, selected, isMulti, isSearch, children, onSelect, onKeyDown, className, }: SelectItemProps) => import("preact").JSX.Element;
3
4
  export default SelectListItem;
@@ -22,7 +22,7 @@ interface BaseSelectProps {
22
22
  isInvalid?: boolean;
23
23
  items: ReadonlyArray<SelectItem>;
24
24
  name?: string;
25
- placeholder: string;
25
+ placeholder?: string;
26
26
  readonly?: boolean;
27
27
  selected: string | string[] | undefined;
28
28
  isValid?: boolean;
@@ -34,6 +34,7 @@ interface BaseSelectProps {
34
34
  loading?: boolean;
35
35
  getSearchItem?: (item: SelectItem) => ComponentChild;
36
36
  searchText?: string;
37
+ onSearchTextChange?: (text: string) => void;
37
38
  showSearchList?: boolean;
38
39
  }
39
40
  interface SingleSelectOnChangeTarget {
@@ -79,6 +80,7 @@ export interface SelectButtonProps {
79
80
  id?: string;
80
81
  showSelectedItemsAsTags?: boolean;
81
82
  isSearch?: boolean;
83
+ hideSearchIcon?: boolean;
82
84
  loading?: boolean;
83
85
  textFilter?: string;
84
86
  }
@@ -117,6 +119,7 @@ export interface SelectButtonContentSingleProps {
117
119
  showList: boolean;
118
120
  showSelectedItemsAsTags?: boolean;
119
121
  isSearch?: boolean;
122
+ hideSearchIcon?: boolean;
120
123
  loading?: boolean;
121
124
  textFilter?: string;
122
125
  }
@@ -6,6 +6,7 @@ import type { ComponentChildren } from 'preact';
6
6
  export declare enum ExperimentNames {
7
7
  EnableCompanySearchFlow = "EnableCompanySearchFlow",
8
8
  EnableNewBusinessDetailsFlow = "EnableNewBusinessDetailsFlow",
9
+ EnableNewAddressComponent = "EnableNewAddressComponent",
9
10
  EnableNewEntryFlow = "EnableNewEntryFlow",
10
11
  AllowOrganizationSettlorWithExemptionReason = "AllowOrganizationSettlorWithExemptionReason",
11
12
  AllowMoreRolesForMainRootTrustee = "AllowMoreRolesForMainRootTrustee",
@@ -18,7 +19,9 @@ export declare enum ExperimentNames {
18
19
  HidePciTask = "HidePciTask",
19
20
  EnableAgeVerification = "EnableAgeVerification",
20
21
  PreserveMismatchedInitialValues = "PreserveMismatchedInitialValues",
21
- StrictNameAndAddressValidationV4 = "StrictNameAndAddressValidationV4"
22
+ StrictNameAndAddressValidationV4 = "StrictNameAndAddressValidationV4",
23
+ EnableIdentificationNationalityCrossBorderAssociateCheck = "EnableIdentificationNationalityCrossBorderAssociateCheck",
24
+ EnableAUGovernmentalOrganizationSkipRegistrationNumber = "EnableAUGovernmentalOrganizationSkipRegistrationNumber"
22
25
  }
23
26
  export type ExperimentName = `${ExperimentNames}`;
24
27
  export type Experiments = {
@@ -20,7 +20,8 @@ export declare enum SettingNames {
20
20
  HideOnboardingIntroductionTrust = "hideOnboardingIntroductionTrust",
21
21
  HideOnboardingIntroductionSoleProprietor = "hideOnboardingIntroductionSoleProprietor",
22
22
  TransferInstrumentLimit = "transferInstrumentLimit",
23
- ViewOnboardingGuidance = "viewOnboardingGuidance"
23
+ ViewOnboardingGuidance = "viewOnboardingGuidance",
24
+ ShowServiceAgreementsFirst = "showServiceAgreementsFirst"
24
25
  }
25
26
  export type SettingName = `${SettingNames}`;
26
27
  export interface Settings {
@@ -40,6 +41,7 @@ export interface Settings {
40
41
  hideOnboardingIntroductionSoleProprietor: boolean;
41
42
  viewOnboardingGuidance: boolean;
42
43
  transferInstrumentLimit: number;
44
+ showServiceAgreementsFirst: boolean;
43
45
  }
44
46
  export type ProvidedSettings = Partial<Settings>;
45
47
  type BooleanSettingName = {
@@ -1,4 +1,4 @@
1
- import type { ComponentMap, ComponentPropsWithoutEventEmitter } from '../../components';
1
+ import type { ComponentMap, ComponentPropsWithoutInternalProps } from '../../components';
2
2
  interface ValueSchema<T> {
3
3
  required?: boolean;
4
4
  type: 'string' | 'number' | 'boolean' | 'array' | 'function';
@@ -14,6 +14,6 @@ export type PropertiesSchema<T> = {
14
14
  [Key in keyof T]: PropertySchema<NonNullable<T[Key]>>;
15
15
  };
16
16
  export type ComponentsSchemaMap = {
17
- [ComponentName in keyof ComponentMap]: PropertiesSchema<ComponentPropsWithoutEventEmitter<ComponentName>>;
17
+ [ComponentName in keyof ComponentMap]: PropertiesSchema<ComponentPropsWithoutInternalProps<ComponentName>>;
18
18
  };
19
19
  export {};
@@ -1,3 +1,3 @@
1
- import type { Address } from '../../models/api/address';
1
+ import type { LoqateAddress } from '../../models/api/address-search';
2
2
  import type { ComponentApiRequestContext } from '../types';
3
- export declare const getAddress: (context: ComponentApiRequestContext, addressId: string) => Promise<Address>;
3
+ export declare const getAddress: (context: ComponentApiRequestContext, addressId: string) => Promise<LoqateAddress>;
@@ -1,5 +1,7 @@
1
1
  import type { DropinAPIHandlers } from '../../../components/Dropins/types';
2
2
  import type { CompanyDatasetResponse, CompanySearchRequest, CompanySearchResult } from '../../models/api/company-search';
3
+ import type { ProvinceCode } from '../../models/province-code';
4
+ import type { StateCode } from '../../models/state-code';
3
5
  import type { HookStatus } from '../types';
4
6
  export interface UseBusinessDataOptions {
5
7
  handleCompanyIndexSearch: DropinAPIHandlers['handleCompanyIndexSearch'];
@@ -11,7 +13,7 @@ export interface UseBusinessDataOptions {
11
13
  }
12
14
  export type UseBusinessData = {
13
15
  searchForBusiness: (data: CompanySearchRequest) => Promise<CompanySearchResult[] | undefined>;
14
- fetchBusinessData: (company: CompanySearchResult) => Promise<CompanyDatasetResponse | undefined>;
16
+ fetchBusinessData: (company: CompanySearchResult, state?: StateCode | ProvinceCode) => Promise<CompanyDatasetResponse | undefined>;
15
17
  verifyBusinessData: (data: CompanyDatasetResponse, tin: string) => Promise<boolean | undefined>;
16
18
  clearTrustedBusinessData: () => Promise<void>;
17
19
  resetBusinessData: () => void;
@@ -0,0 +1 @@
1
+ export declare const useDebounce: <T extends string>(value: T, delay: number) => T;
@@ -7,15 +7,8 @@ export interface AddressSearchRequest {
7
7
  text: string;
8
8
  container?: string;
9
9
  }
10
- export interface Address {
11
- city?: string;
12
- country?: CountryCode;
13
- postalCode?: string;
14
- stateOrProvince?: string;
15
- address?: string;
16
- otherAddressInformation?: string;
17
- }
18
10
  export interface LoqateAddress {
11
+ line1?: string;
19
12
  street?: string;
20
13
  street2?: string;
21
14
  houseNumberOrName?: string;
@@ -38,13 +38,20 @@ export interface CompanyDatasetRequest {
38
38
  * @description (optional) Country code
39
39
  */
40
40
  country?: CountryCode;
41
+ /**
42
+ * @description (optional) State code
43
+ */
44
+ state?: StateCodeUS;
41
45
  }
42
46
  export interface CompanyDatasetResponse extends CompanySearchResult {
43
47
  country: CountryCode;
44
48
  organizationType: OrganizationType | null;
45
49
  address: string;
50
+ isPrincipalAddress: boolean;
51
+ isTrustedAddress: boolean;
46
52
  legalForm?: string;
47
53
  street?: string;
54
+ street2?: string;
48
55
  city?: string;
49
56
  state?: StateCodeUS;
50
57
  zipcode?: string;
@@ -3,6 +3,7 @@ import type { AccountFormatRequirements } from '../../datasets/accountFormats/ge
3
3
  import type { ExperimentName } from '../Context/ExperimentContext/types';
4
4
  import type { SettingName } from '../Context/SettingsContext/types';
5
5
  import type { TopLevelDataSchema } from '../Context/StateContext/types';
6
+ import type { ExistingLegalEntity } from './api/legal-entity';
6
7
  import type { CountryCode } from './country-code';
7
8
  export interface FormRulesParams<TLDS extends TopLevelDataSchema> {
8
9
  data: TLDS;
@@ -12,6 +13,7 @@ export interface FormRulesParams<TLDS extends TopLevelDataSchema> {
12
13
  isExperimentEnabled?: (experiment: ExperimentName) => boolean;
13
14
  requiredFields?: Partial<AccountFormatRequirements>;
14
15
  isEmbeddedDropin?: boolean;
16
+ rootLegalEntity?: ExistingLegalEntity;
15
17
  }
16
18
  export type FormRules<TLDS extends TopLevelDataSchema> = (params: FormRulesParams<TLDS>) => {
17
19
  [ruleName: string]: () => string | boolean | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adyen/kyc-components",
3
- "version": "2.55.0",
3
+ "version": "2.56.0",
4
4
  "keywords": [
5
5
  "adyen",
6
6
  "adyen-kyc",