@adyen/kyc-components 3.16.1 → 3.17.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 +2929 -1457
- package/dist/style.css +1392 -1154
- package/dist/types/components/BaseElement.d.ts +3 -0
- package/dist/types/components/BusinessDetails/component/BusinessDetailsComponent.d.ts +2 -0
- package/dist/types/components/BusinessDetails/forms.d.ts +23 -0
- package/dist/types/components/BusinessDetails/index.d.ts +1 -0
- package/dist/types/components/BusinessDetails/types.d.ts +33 -0
- package/dist/types/components/Company/component/CompanyComponent.d.ts +2 -2
- package/dist/types/components/Company/rules.d.ts +4 -10
- package/dist/types/components/CompanyNameAndCountry/component/CompanyNameAndCountryComponent.d.ts +1 -0
- package/dist/types/components/CompanyNameAndCountry/types.d.ts +2 -1
- package/dist/types/components/CompanySearch/forms.d.ts +1 -1
- package/dist/types/components/Dropins/BusinessDetailsDropin/components/BusinessDetailsDropinComponent.d.ts +2 -0
- package/dist/types/components/Dropins/BusinessDetailsDropin/index.d.ts +1 -0
- package/dist/types/components/Dropins/BusinessDetailsDropin/types.d.ts +55 -0
- package/dist/types/components/Dropins/BusinessDetailsDropin/utils.d.ts +12 -0
- package/dist/types/components/Dropins/CompanyDropin/components/CompanyDropinComponent.d.ts +1 -1
- package/dist/types/components/Dropins/CompanySearchDropin/components/CompanySearchDropinComponent.d.ts +1 -1
- package/dist/types/components/Dropins/CompanySearchDropin/types.d.ts +2 -0
- package/dist/types/components/Dropins/DropinComposer/components/DropinComposerComponent.d.ts +1 -1
- package/dist/types/components/Dropins/IndividualDropin/components/IndividualDropinComponent.d.ts +1 -1
- package/dist/types/components/Dropins/PayoutDetailsDropin/components/PayoutDetailsDropinComponent.d.ts +1 -1
- package/dist/types/components/Dropins/PciDropin/components/PciDropinComponent.d.ts +1 -1
- package/dist/types/components/Dropins/ServiceAgreementDropinComponent/components/ServiceAgreementDropinComponent.d.ts +1 -1
- package/dist/types/components/Dropins/ServiceAgreementDropinComponent/types.d.ts +1 -0
- package/dist/types/components/Dropins/SolePropDropin/components/SolePropDropinComponent.d.ts +1 -1
- package/dist/types/components/Dropins/types.d.ts +3 -5
- package/dist/types/components/EmbeddedDropins/CreateIndividualComponent/CreateIndividualComponent.d.ts +1 -3
- package/dist/types/components/EmbeddedDropins/CreateTransferInstrumentComponent/CreateTransferInstrumentComponent.d.ts +1 -3
- package/dist/types/components/EmbeddedDropins/OnboardingDropinComponent/OnboardingDropinComponent.d.ts +1 -3
- package/dist/types/components/EmbeddedDropins/ViewVerificationStatus/ViewVerificationStatusComponent.d.ts +1 -3
- package/dist/types/components/EventEmitter.d.ts +2 -0
- package/dist/types/components/PayoutDetails/types.d.ts +0 -2
- package/dist/types/components/SoleProp/component/SolePropComponent.d.ts +1 -1
- package/dist/types/components/TaskList/component/TaskListItem.d.ts +1 -1
- package/dist/types/components/TaskList/types.d.ts +1 -0
- package/dist/types/components/UIElement.d.ts +4 -6
- package/dist/types/components/index.d.ts +2 -0
- package/dist/types/components/internal/CountryField/CountryField.d.ts +1 -1
- package/dist/types/components/internal/CountryOfGoverningLawField/CountryOfGoverningLawField.d.ts +3 -0
- package/dist/types/components/internal/CountryOfGoverningLawField/index.d.ts +1 -0
- package/dist/types/components/internal/CountryOfGoverningLawField/types.d.ts +9 -0
- package/dist/types/components/internal/Modal/Modal.d.ts +21 -0
- package/dist/types/components/internal/Summary/Summary.d.ts +1 -1
- package/dist/types/components/internal/Summary/types.d.ts +1 -0
- package/dist/types/core/Context/ExperimentContext/types.d.ts +4 -2
- package/dist/types/core/Context/ExpiryContext/ExpiredBanner.d.ts +1 -0
- package/dist/types/core/Context/ExpiryContext/ExpiryContext.d.ts +11 -0
- package/dist/types/core/Context/ExpiryContext/ExpiryModal.d.ts +6 -0
- package/dist/types/core/Context/ExpiryContext/useExpiryThreshold.d.ts +12 -0
- package/dist/types/core/Context/I18nProvider/I18nProvider.d.ts +3 -1
- package/dist/types/core/Context/StateContext/types.d.ts +3 -2
- package/dist/types/core/SDKValidation/index.d.ts +1 -1
- package/dist/types/core/core.d.ts +2 -1
- package/dist/types/core/hooks/useForm/types.d.ts +11 -0
- package/dist/types/core/hooks/useScenarioConfiguration.d.ts +2 -1
- package/dist/types/core/models/api/contracts.d.ts +4 -0
- package/dist/types/core/models/api/organization.d.ts +9 -3
- package/dist/types/core/models/company.d.ts +4 -0
- package/dist/types/core/process-field-configurations.d.ts +3 -4
- package/dist/types/core/types.d.ts +11 -0
- package/dist/types/utils/company-util.d.ts +7 -1
- package/dist/types/utils/getFieldsWithExistingData.d.ts +2 -1
- package/dist/types/utils/mapping/businessDetails/index.d.ts +2 -0
- package/dist/types/utils/mapping/businessDetails/mapBusinessDetailsSchemaToLegalEntity.d.ts +5 -0
- package/dist/types/utils/mapping/businessDetails/mapLegalEntityToBusinessDetailsSchema.d.ts +4 -0
- package/dist/types/utils/mapping/companySearch/mapLegalEntityToCompanySearchSchema.d.ts +2 -1
- package/dist/types/utils/mapping/componentApiMapping.d.ts +35 -1
- package/dist/types/utils/mapping/documentGuidanceMap.d.ts +1 -1
- package/package.json +1 -1
|
@@ -5,12 +5,14 @@ import type { ComponentChildren } from 'preact';
|
|
|
5
5
|
*/
|
|
6
6
|
export declare enum ExperimentNames {
|
|
7
7
|
EnableCompanySearchFlow = "EnableCompanySearchFlow",
|
|
8
|
-
|
|
8
|
+
EnableNewBusinessDetailsFlow = "EnableNewBusinessDetailsFlow",
|
|
9
9
|
EnableNewEntryFlow = "EnableNewEntryFlow",
|
|
10
10
|
AllowOrganizationSettlorWithExemptionReason = "AllowOrganizationSettlorWithExemptionReason",
|
|
11
11
|
AllowMoreRolesForMainRootTrustee = "AllowMoreRolesForMainRootTrustee",
|
|
12
12
|
ShowUnsupportedEntityType = "ShowUnsupportedEntityType",
|
|
13
|
-
ShowSingPassButtonForCompanies = "ShowSingPassButtonForCompanies"
|
|
13
|
+
ShowSingPassButtonForCompanies = "ShowSingPassButtonForCompanies",
|
|
14
|
+
ShowExtraTaxExemptionReasons = "ShowExtraTaxExemptionReasons",
|
|
15
|
+
EnableCountryOfGoverningLawForUKCompanies = "EnableCountryOfGoverningLawForUKCompanies"
|
|
14
16
|
}
|
|
15
17
|
export type ExperimentName = `${ExperimentNames}`;
|
|
16
18
|
export type Experiments = {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ExpiredBanner: () => import("preact").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ComponentChildren } from 'preact';
|
|
2
|
+
import type EventEmitter from '../../../components/EventEmitter';
|
|
3
|
+
export declare const ExpiryContext: import("preact").Context<boolean>;
|
|
4
|
+
export interface ExpiryProviderProps {
|
|
5
|
+
expiry?: number;
|
|
6
|
+
eventEmitter?: EventEmitter;
|
|
7
|
+
refreshExpiry?: () => Promise<number>;
|
|
8
|
+
children?: ComponentChildren;
|
|
9
|
+
}
|
|
10
|
+
export declare const ExpiryProvider: ({ expiry: initialExpiry, eventEmitter, refreshExpiry, children, }: ExpiryProviderProps) => import("preact").JSX.Element;
|
|
11
|
+
export declare const useHasExpired: () => boolean;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type UseExpiryThreshold = {
|
|
2
|
+
expiryStatus: 'notYetCloseToExpiry';
|
|
3
|
+
secondsUntilExpiry: undefined;
|
|
4
|
+
} | {
|
|
5
|
+
expiryStatus: 'almostExpired';
|
|
6
|
+
secondsUntilExpiry: number;
|
|
7
|
+
} | {
|
|
8
|
+
expiryStatus: 'expired';
|
|
9
|
+
secondsUntilExpiry: 0;
|
|
10
|
+
};
|
|
11
|
+
export declare const useExpiryThreshold: (expiry: number | undefined) => UseExpiryThreshold;
|
|
12
|
+
export {};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { ComponentChildren } from 'preact';
|
|
2
|
+
import type EventEmitter from '../../../components/EventEmitter';
|
|
2
3
|
import type { CustomTranslations } from '../../../language/types';
|
|
3
4
|
export interface I18nProviderProps {
|
|
4
5
|
locale: string;
|
|
5
6
|
customTranslations?: CustomTranslations;
|
|
6
7
|
children?: ComponentChildren;
|
|
8
|
+
eventEmitter?: EventEmitter;
|
|
7
9
|
}
|
|
8
|
-
export declare const I18nProvider: ({ locale: initialLocale, customTranslations, children, }: I18nProviderProps) => import("preact").JSX.Element;
|
|
10
|
+
export declare const I18nProvider: ({ locale: initialLocale, customTranslations, eventEmitter, children, }: I18nProviderProps) => import("preact").JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { BusinessDetailsSchema } from '../../../components/BusinessDetails/types';
|
|
1
2
|
import type { CompanySchema } from '../../../components/Company/types';
|
|
2
3
|
import type { CompanySearchSchema } from '../../../components/CompanySearch/types';
|
|
3
4
|
import type { TrustMemberSchema } from '../../../components/Dropins/RoleAndTypeDropin/types';
|
|
@@ -47,8 +48,8 @@ export type StateModel<TLDS extends TopLevelDataSchema = TopLevelDataSchema> = {
|
|
|
47
48
|
prevState?: State<TLDS>;
|
|
48
49
|
};
|
|
49
50
|
};
|
|
50
|
-
export type TopLevelDataSchema = IndividualSchema | CompanySchema | CompanySearchSchema | PayoutDetailsSchema | TrustSchema | TrustMemberSchema | SolePropSchema;
|
|
51
|
-
export type AnyFormIdOfTLDS = keyof IndividualSchema | keyof CompanySchema | keyof CompanySearchSchema | keyof PayoutDetailsSchema | keyof TrustSchema | keyof TrustMemberSchema | keyof SolePropSchema;
|
|
51
|
+
export type TopLevelDataSchema = IndividualSchema | BusinessDetailsSchema | CompanySchema | CompanySearchSchema | PayoutDetailsSchema | TrustSchema | TrustMemberSchema | SolePropSchema;
|
|
52
|
+
export type AnyFormIdOfTLDS = keyof IndividualSchema | keyof BusinessDetailsSchema | keyof CompanySchema | keyof CompanySearchSchema | keyof PayoutDetailsSchema | keyof TrustSchema | keyof TrustMemberSchema | keyof SolePropSchema;
|
|
52
53
|
export interface State<TLDS extends TopLevelDataSchema> {
|
|
53
54
|
data: TLDS;
|
|
54
55
|
allData: TLDS;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { ComponentOptions } from '../../components';
|
|
2
2
|
import type { CoreOptions } from '../types';
|
|
3
3
|
export declare const validateCoreOptions: (coreOptions: CoreOptions) => void;
|
|
4
|
-
export declare const validateForComponent: <Name extends "payoutAccount" | "pci" | "individualDropin" | "
|
|
4
|
+
export declare const validateForComponent: <Name extends "payoutAccount" | "pci" | "taskList" | "individualDropin" | "businessDetailsDropin" | "companyDropin" | "companySearchDropin" | "trustDropin" | "soleProprietorDropin" | "createTransferInstrumentComponent" | "createIndividualComponent" | "manageTransferInstrumentComponent" | "onboardingDropinComponent" | "viewVerificationStatusComponent">(componentName: Name, options: ComponentOptions<Name>) => void;
|
|
@@ -8,7 +8,7 @@ export declare class Core {
|
|
|
8
8
|
};
|
|
9
9
|
components: UIElement[];
|
|
10
10
|
constructor(coreOptions: CoreOptions);
|
|
11
|
-
create: <Name extends "payoutAccount" | "pci" | "individualDropin" | "
|
|
11
|
+
create: <Name extends "payoutAccount" | "pci" | "taskList" | "individualDropin" | "businessDetailsDropin" | "companyDropin" | "companySearchDropin" | "trustDropin" | "soleProprietorDropin" | "createTransferInstrumentComponent" | "createIndividualComponent" | "manageTransferInstrumentComponent" | "onboardingDropinComponent" | "viewVerificationStatusComponent">(componentName: Name, componentOptions: ComponentOptions<Name>) => UIElement;
|
|
12
12
|
/**
|
|
13
13
|
* Updates global configurations, resets the internal state and remounts each element.
|
|
14
14
|
* @param options - props to update
|
|
@@ -16,6 +16,7 @@ export declare class Core {
|
|
|
16
16
|
*/
|
|
17
17
|
update: (options: Partial<CoreOptions>) => this;
|
|
18
18
|
updateLocale: ({ locale }: Pick<CoreOptions, 'locale'>) => this;
|
|
19
|
+
updateExpiry: ({ expiry }: Pick<CoreOptions, 'expiry'>) => this;
|
|
19
20
|
/**
|
|
20
21
|
* Remove the reference of a component
|
|
21
22
|
* @param component - reference to the component to be removed
|
|
@@ -37,6 +37,7 @@ export interface BaseFormFieldProps<FieldSchema> {
|
|
|
37
37
|
className?: string;
|
|
38
38
|
classNameModifiers?: string[];
|
|
39
39
|
stateSliceId?: AnyFormIdOfTLDS;
|
|
40
|
+
name?: string;
|
|
40
41
|
handleChangeFor: (key: keyof FieldSchema, mode?: ValidatorMode) => (e: any) => void;
|
|
41
42
|
}
|
|
42
43
|
export type FieldValue<FormSchema> = FormSchema[keyof FormSchema];
|
|
@@ -51,6 +52,12 @@ export interface FormState<FormSchema> {
|
|
|
51
52
|
dataStoreId?: string;
|
|
52
53
|
local?: FormState<FormSchema> | Partial<FormState<FormSchema>>;
|
|
53
54
|
}
|
|
55
|
+
export type InnerFormLabels<InnerFormSchema> = {
|
|
56
|
+
[Field in keyof InnerFormSchema]: TranslationKey;
|
|
57
|
+
};
|
|
58
|
+
export type OuterFormLabels<OuterFormSchema> = {
|
|
59
|
+
[Form in keyof OuterFormSchema]: InnerFormLabels<OuterFormSchema[Form]>;
|
|
60
|
+
};
|
|
54
61
|
export interface Form<FormSchema> extends FormState<FormSchema> {
|
|
55
62
|
setData: (key: keyof FormSchema, value: FieldValue<FormSchema>) => void;
|
|
56
63
|
setValid: (key: keyof FormSchema, value: boolean) => void;
|
|
@@ -91,6 +98,9 @@ export interface BaseOuterFormProps<FormSchema> extends BaseFormProps<FormSchema
|
|
|
91
98
|
capabilities?: CapabilityName[];
|
|
92
99
|
country?: CountryCode;
|
|
93
100
|
activeForm?: FormModel;
|
|
101
|
+
allFields?: {
|
|
102
|
+
[InnerFormName in keyof FormSchema]: Array<keyof FormSchema[InnerFormName]>;
|
|
103
|
+
};
|
|
94
104
|
requiredFields?: {
|
|
95
105
|
[InnerFormName in keyof FormSchema]: Array<keyof FormSchema[InnerFormName]>;
|
|
96
106
|
};
|
|
@@ -119,6 +129,7 @@ export interface BaseOuterFormProps<FormSchema> extends BaseFormProps<FormSchema
|
|
|
119
129
|
export interface BaseInnerFormProps<FormSchema> extends BaseFormProps<FormSchema> {
|
|
120
130
|
formVerificationErrors?: FormVerificationErrors;
|
|
121
131
|
fieldValidationErrors?: Record<keyof FormSchema, boolean>;
|
|
132
|
+
allFields?: Array<keyof FormSchema>;
|
|
122
133
|
requiredFields?: Array<keyof FormSchema>;
|
|
123
134
|
obscuredFields?: Array<keyof FormSchema>;
|
|
124
135
|
optionalFields?: Array<keyof FormSchema>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Dispatch, StateUpdater } from 'preact/hooks';
|
|
1
2
|
import type { CountryBankVerificationVendors } from '../../components/BankVerification/types';
|
|
2
3
|
import type { BankAccountFormatType } from '../../components/internal/BankAccountFormat/types';
|
|
3
4
|
import type { LoadingStatus } from '../../components/internal/LoaderWrapper/constants';
|
|
@@ -14,7 +15,7 @@ export interface UseScenarioConfigurationOptions {
|
|
|
14
15
|
getConfigurationData: () => Promise<GetConfigurationResponse>;
|
|
15
16
|
parseConfiguration: ParseConfiguration;
|
|
16
17
|
country: CountryCode;
|
|
17
|
-
setLoadingStatus:
|
|
18
|
+
setLoadingStatus: Dispatch<StateUpdater<LoadingStatus>>;
|
|
18
19
|
getPayoutAccountFormatData?: () => Promise<PayoutAccountFormats>;
|
|
19
20
|
instantVerificationEnabled?: boolean;
|
|
20
21
|
existingBankAccountFormat?: BankAccountFormatType;
|
|
@@ -42,6 +42,9 @@ export interface ServiceAgreementResponse extends ServiceAgreementRequest {
|
|
|
42
42
|
termsOfServiceDocumentId: string;
|
|
43
43
|
document: string | undefined;
|
|
44
44
|
}
|
|
45
|
+
export interface ServiceAgreementUnacceptedDocumentRequest extends ServiceAgreementRequest {
|
|
46
|
+
termsOfServiceDocumentFormat?: string;
|
|
47
|
+
}
|
|
45
48
|
export interface ServiceAgreementSignRequest {
|
|
46
49
|
acceptedBy: string;
|
|
47
50
|
}
|
|
@@ -60,6 +63,7 @@ export interface ServiceAgreementAcceptedDocumentResponse {
|
|
|
60
63
|
termsOfServiceAcceptanceReference: string;
|
|
61
64
|
termsOfServiceDocumentFormat: string;
|
|
62
65
|
}
|
|
66
|
+
export type ServiceAgreementUnacceptedDocumentResponse = ServiceAgreementResponse;
|
|
63
67
|
export interface ServiceAgreementAcceptanceInfos {
|
|
64
68
|
data: ServiceAgreementAcceptanceInfo[];
|
|
65
69
|
}
|
|
@@ -8,9 +8,11 @@ import type { Phone } from './phone';
|
|
|
8
8
|
export interface Organization {
|
|
9
9
|
legalName: string;
|
|
10
10
|
registeredAddress: Address;
|
|
11
|
+
countryOfGoverningLaw?: CountryCode;
|
|
11
12
|
description?: string;
|
|
12
13
|
doingBusinessAs?: string;
|
|
13
14
|
email?: string;
|
|
15
|
+
headOfficeIndicator?: boolean;
|
|
14
16
|
phone?: Phone;
|
|
15
17
|
principalPlaceOfBusiness?: Address;
|
|
16
18
|
registrationNumber?: string;
|
|
@@ -21,11 +23,15 @@ export interface Organization {
|
|
|
21
23
|
};
|
|
22
24
|
taxInformation?: TaxInformation[];
|
|
23
25
|
vatNumber?: string;
|
|
24
|
-
vatAbsenceReason?: VatAbsenceReason;
|
|
26
|
+
vatAbsenceReason?: VatAbsenceReason[];
|
|
25
27
|
type?: CompanyTypesValue | '';
|
|
26
28
|
}
|
|
27
|
-
export declare
|
|
28
|
-
|
|
29
|
+
export declare enum VatAbsenceReason {
|
|
30
|
+
IndustryExemption = "industryExemption",
|
|
31
|
+
BelowTaxThreshold = "belowTaxThreshold",
|
|
32
|
+
CountryWithoutVatOrGstSystem = "countryWithoutVatOrGstSystem"
|
|
33
|
+
}
|
|
34
|
+
export declare const vatAbsenceReasons: VatAbsenceReason[];
|
|
29
35
|
export type TaxInformation = {
|
|
30
36
|
country: CountryCode;
|
|
31
37
|
number: string;
|
|
@@ -13,6 +13,9 @@ export declare const companyBase: {
|
|
|
13
13
|
export declare const companySearchBase: {
|
|
14
14
|
[key: string]: ScenarioFieldSettings;
|
|
15
15
|
};
|
|
16
|
+
export declare const businessDetailsBase: {
|
|
17
|
+
[key: string]: ScenarioFieldSettings;
|
|
18
|
+
};
|
|
16
19
|
export declare const taxIdBase: {
|
|
17
20
|
[key: string]: ScenarioFieldSettings;
|
|
18
21
|
};
|
|
@@ -22,5 +25,6 @@ export declare const taxInformationBase: {
|
|
|
22
25
|
export declare const companyTypes: readonly CompanyTypeModel[];
|
|
23
26
|
export declare const fieldsPerScenario: ScenarioFields<typeof companyBase>;
|
|
24
27
|
export declare const companySearchFieldsPerScenario: ScenarioFields<typeof companySearchBase>;
|
|
28
|
+
export declare const businessDetailsFieldsPerScenario: ScenarioFields<typeof businessDetailsBase>;
|
|
25
29
|
export declare const countryConfig: CountryConfig;
|
|
26
30
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { BusinessDetailsSchema } from '../components/BusinessDetails/types';
|
|
1
2
|
import type { CompanySchema } from '../components/Company/types';
|
|
2
3
|
import type { CompanySearchSchema } from '../components/CompanySearch/types';
|
|
3
4
|
import type { IndividualSchema } from '../components/Individual/types';
|
|
@@ -14,6 +15,7 @@ import type { Remediation } from './models/errors/remediation';
|
|
|
14
15
|
import type { FieldConfigurations } from './models/field-configurations';
|
|
15
16
|
import type { FormList } from './models/form';
|
|
16
17
|
export declare const parseIndividualScenarios: (scenario: Scenario[] | undefined) => FieldConfigurations<IndividualSchema>;
|
|
18
|
+
export declare function parseBusinessDetailsScenarios(scenario: Scenario[] | undefined, country: CountryCode): FieldConfigurations<BusinessDetailsSchema>;
|
|
17
19
|
export declare function parseCompanyScenarios(scenario: Scenario[], country: CountryCode): FieldConfigurations<CompanySchema>;
|
|
18
20
|
export declare function parseCompanySearchScenarios(scenario: Scenario[] | undefined, country: CountryCode): FieldConfigurations<CompanySearchSchema>;
|
|
19
21
|
export declare function parseTrustScenarios(scenario: Scenario[], country: CountryCode): FieldConfigurations<TrustSchema>;
|
|
@@ -23,11 +25,8 @@ export declare function parsePayoutScenarios({ requiredFields, country, bankVeri
|
|
|
23
25
|
country: CountryCode;
|
|
24
26
|
bankVerificationAvailable: boolean | undefined;
|
|
25
27
|
}): Partial<FieldConfigurations<PayoutAccountSchema>>;
|
|
26
|
-
type PropsFromConfiguration<FormSchema> = Required<Pick<BaseOuterFormProps<FormSchema>, 'verifyFields' | 'requiredFields' | 'placeholders' | 'helperText' | 'masks' | 'optionalFields' | 'labels' | 'obscuredFields'>> & {
|
|
28
|
+
type PropsFromConfiguration<FormSchema> = Required<Pick<BaseOuterFormProps<FormSchema>, 'allFields' | 'verifyFields' | 'requiredFields' | 'placeholders' | 'helperText' | 'masks' | 'optionalFields' | 'labels' | 'obscuredFields'>> & {
|
|
27
29
|
validators: ValidatorRules<FormSchema>;
|
|
28
|
-
allFields: {
|
|
29
|
-
[Field in keyof FormSchema]: FormSchema[Field];
|
|
30
|
-
};
|
|
31
30
|
};
|
|
32
31
|
/**
|
|
33
32
|
* function: getPropsFromScenarios
|
|
@@ -24,4 +24,15 @@ export interface CoreOptions {
|
|
|
24
24
|
*/
|
|
25
25
|
sdkToken?: string;
|
|
26
26
|
getSdkToken?(): Promise<TokenResponse>;
|
|
27
|
+
/**
|
|
28
|
+
* When the user's session is set to expire.
|
|
29
|
+
* Should be provided as a Unix timestamp, i.e. milliseconds since epoch (e.g. 1721054807209).
|
|
30
|
+
*
|
|
31
|
+
* N.B. if `expiry` is provided, you **must** also provide `refreshExpiry()`.
|
|
32
|
+
*/
|
|
33
|
+
expiry?: number;
|
|
34
|
+
/**
|
|
35
|
+
* A way to refresh the current session. Should return the new {@link expiry} timestamp.
|
|
36
|
+
*/
|
|
37
|
+
refreshExpiry?: () => Promise<number>;
|
|
27
38
|
}
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
+
import type { CompanyNameAndCountrySchema } from '../components/CompanyNameAndCountry/types';
|
|
2
|
+
import type { LegalArrangement } from '../core/models/api/legal-arrangement';
|
|
1
3
|
import type { Organization, TaxInformationType } from '../core/models/api/organization';
|
|
4
|
+
import type { SoleProprietor } from '../core/models/api/sole-proprietor';
|
|
2
5
|
import type { Trust } from '../core/models/api/trust';
|
|
3
6
|
import type { CountryCode } from '../core/models/country-code';
|
|
4
7
|
export declare const countryToTaxInfoTypeMap: Record<string, TaxInformationType>;
|
|
5
|
-
export declare const updateTaxInformation: <T extends Organization |
|
|
8
|
+
export declare const updateTaxInformation: <T extends Organization | LegalArrangement | Trust>({ taxId, country, exemptedFromTax, isUen, entity, }: {
|
|
6
9
|
taxId: string;
|
|
7
10
|
country: CountryCode;
|
|
8
11
|
exemptedFromTax?: boolean;
|
|
9
12
|
isUen?: boolean;
|
|
10
13
|
entity: T;
|
|
11
14
|
}) => T;
|
|
15
|
+
export declare const getUpdatedCountryOfGoverningLaw: (nameAndCountry: CompanyNameAndCountrySchema) => CompanyNameAndCountrySchema;
|
|
16
|
+
export declare const transformCountryOfGoverningLawToLegalEntity: (nameAndCountry: CompanyNameAndCountrySchema, organization: Organization | LegalArrangement) => Organization | LegalArrangement;
|
|
17
|
+
export declare const transformCountryOfGoverningLawToSchema: (nameAndCountry: CompanyNameAndCountrySchema, organization: Organization | SoleProprietor) => CompanyNameAndCountrySchema;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { BusinessDetailsSchema } from '../components/BusinessDetails/types';
|
|
1
2
|
import type { CompanySchema } from '../components/Company/types';
|
|
2
3
|
import type { CompanySearchSchema } from '../components/CompanySearch/types';
|
|
3
4
|
import type { IndividualSchema } from '../components/Individual/types';
|
|
@@ -6,5 +7,5 @@ import type { TrustSchema } from '../components/Trust/types';
|
|
|
6
7
|
import type { ExperimentName } from '../core/Context/ExperimentContext/types';
|
|
7
8
|
import type { ExistingLegalEntity } from '../core/models/api/legal-entity';
|
|
8
9
|
import type { RecursiveKeyOf } from './getNestedPropertyKeys';
|
|
9
|
-
export type AnyTLDSFieldName = RecursiveKeyOf<IndividualSchema> | RecursiveKeyOf<CompanySchema> | RecursiveKeyOf<CompanySearchSchema> | RecursiveKeyOf<SolePropSchema> | RecursiveKeyOf<TrustSchema>;
|
|
10
|
+
export type AnyTLDSFieldName = RecursiveKeyOf<IndividualSchema> | RecursiveKeyOf<CompanySchema> | RecursiveKeyOf<CompanySearchSchema> | RecursiveKeyOf<BusinessDetailsSchema> | RecursiveKeyOf<SolePropSchema> | RecursiveKeyOf<TrustSchema>;
|
|
10
11
|
export declare const getFieldsWithExistingData: (legalEntity: ExistingLegalEntity, isExperimentEnabled?: (key: ExperimentName) => boolean) => AnyTLDSFieldName[];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { BusinessDetailsSchema } from '../../../components/BusinessDetails/types';
|
|
2
|
+
import type { Document } from '../../../core/models/api/document';
|
|
3
|
+
import type { LegalEntity } from '../../../core/models/api/legal-entity';
|
|
4
|
+
export declare const mapBusinessDetailsDocumentToApiDocument: (data: BusinessDetailsSchema, entityId: string) => Promise<Document[]>;
|
|
5
|
+
export declare const mapBusinessDetailsSchemaToLegalEntity: (data: BusinessDetailsSchema) => LegalEntity;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { BusinessDetailsSchema } from '../../../components/BusinessDetails/types';
|
|
2
|
+
import type { ExistingLegalEntity } from '../../../core/models/api/legal-entity';
|
|
3
|
+
export declare const mapApiDocumentToBusinessDetailsDocuments: (entityId: string) => BusinessDetailsSchema;
|
|
4
|
+
export declare const mapLegalEntityToBusinessDetailsSchema: (legalEntity: ExistingLegalEntity, isChangingType: boolean) => BusinessDetailsSchema;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { CompanySearchSchema } from '../../../components/CompanySearch/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 mapApiDocumentToCompanySearchDocuments: (entityId: string) => CompanySearchSchema;
|
|
4
|
-
export declare const mapLegalEntityToCompanySearchSchema: (legalEntity: ExistingLegalEntity, isChangingType: boolean) => CompanySearchSchema;
|
|
5
|
+
export declare const mapLegalEntityToCompanySearchSchema: (legalEntity: ExistingLegalEntity, isChangingType: boolean, accountHolder?: AccountHolderOption) => CompanySearchSchema;
|
|
@@ -41,9 +41,42 @@ export declare const individualComponentsKeyMapping: {
|
|
|
41
41
|
};
|
|
42
42
|
export declare const individualApiKeyMapping: {};
|
|
43
43
|
export declare const payoutBaseMapping: Partial<Record<RecursiveKeyOf<ExistingTransferInstrument>, RecursiveKeyOf<PayoutDetailsSchema>>>;
|
|
44
|
+
export declare const businessDetailsComponentsKeyMapping: {
|
|
45
|
+
'basicInformation.country': string;
|
|
46
|
+
'basicInformation.businessName': string;
|
|
47
|
+
'basicInformation.stateOrProvince': string;
|
|
48
|
+
'basicInformation.taxInformation': string;
|
|
49
|
+
'basicInformation.registrationNumber': string;
|
|
50
|
+
'companyStructure.entityType': string;
|
|
51
|
+
'additionalInformation.legalCompanyName': string;
|
|
52
|
+
'additionalInformation.tradingName': string;
|
|
53
|
+
'additionalInformation.registrationNumber': string;
|
|
54
|
+
'additionalInformation.taxInformation': string;
|
|
55
|
+
'additionalInformation.vatNumber': string;
|
|
56
|
+
'additionalInformation.vatAbsenceReason': string;
|
|
57
|
+
'additionalInformation.dateOfIncorporation': string;
|
|
58
|
+
'additionalInformation.isUen': string;
|
|
59
|
+
'additionalInformation.stockExchangeMIC': string;
|
|
60
|
+
'additionalInformation.stockISIN': string;
|
|
61
|
+
'companyRegistrationAddress.registrationAddress.city': string;
|
|
62
|
+
'companyRegistrationAddress.registrationAddress.country': string;
|
|
63
|
+
'companyRegistrationAddress.registrationAddress.postalCode': string;
|
|
64
|
+
'companyRegistrationAddress.registrationAddress.stateOrProvince': string;
|
|
65
|
+
'companyRegistrationAddress.registrationAddress.address': string;
|
|
66
|
+
'companyRegistrationAddress.registrationAddress.otherAddressInformation': string;
|
|
67
|
+
'companyRegistrationAddress.operationalAddress.city': string;
|
|
68
|
+
'companyRegistrationAddress.operationalAddress.country': string;
|
|
69
|
+
'companyRegistrationAddress.operationalAddress.postalCode': string;
|
|
70
|
+
'companyRegistrationAddress.operationalAddress.stateOrProvince': string;
|
|
71
|
+
'companyRegistrationAddress.operationalAddress.address': string;
|
|
72
|
+
'companyRegistrationAddress.operationalAddress.otherAddressInformation': string;
|
|
73
|
+
'additionalInformation.exemptedFromVat': string;
|
|
74
|
+
};
|
|
75
|
+
export declare const businessDetailsApiKeyMapping: {};
|
|
44
76
|
export declare const companyComponentsKeyMapping: {
|
|
45
77
|
'companyNameAndCountry.country': string;
|
|
46
78
|
'companyNameAndCountry.legalCompanyName': string;
|
|
79
|
+
'companyNameAndCountry.countryOfGoverningLaw': string;
|
|
47
80
|
'companyType.entityType': string;
|
|
48
81
|
'companyRegistrationDetails.tradingName': string;
|
|
49
82
|
'companyRegistrationDetails.registrationNumber': string;
|
|
@@ -606,7 +639,6 @@ export declare const payoutComponentKeyMapping: {
|
|
|
606
639
|
"capabilities.withdrawFromAtmInRestrictedCountriesConsumer.requestedLevel"?: RecursiveKeyOf<PayoutDetailsSchema>;
|
|
607
640
|
"bankAccount.countryCode"?: RecursiveKeyOf<PayoutDetailsSchema>;
|
|
608
641
|
"bankAccount.bankName"?: RecursiveKeyOf<PayoutDetailsSchema>;
|
|
609
|
-
"bankAccount.trustedSource"?: RecursiveKeyOf<PayoutDetailsSchema>;
|
|
610
642
|
"bankAccount.accountIdentification.type"?: RecursiveKeyOf<PayoutDetailsSchema>;
|
|
611
643
|
"bankAccount.accountIdentification.iban"?: RecursiveKeyOf<PayoutDetailsSchema>;
|
|
612
644
|
"bankAccount.accountIdentification.bic"?: RecursiveKeyOf<PayoutDetailsSchema>;
|
|
@@ -622,6 +654,7 @@ export declare const payoutComponentKeyMapping: {
|
|
|
622
654
|
"bankAccount.accountIdentification.clearingNumber"?: RecursiveKeyOf<PayoutDetailsSchema>;
|
|
623
655
|
"bankAccount.accountIdentification.sortCode"?: RecursiveKeyOf<PayoutDetailsSchema>;
|
|
624
656
|
"bankAccount.accountIdentification.routingNumber"?: RecursiveKeyOf<PayoutDetailsSchema>;
|
|
657
|
+
"bankAccount.trustedSource"?: RecursiveKeyOf<PayoutDetailsSchema>;
|
|
625
658
|
};
|
|
626
659
|
export declare const payoutApiKeyMapping: {
|
|
627
660
|
payoutVerificationMethod?: import("../../components/PayoutVerificationMethod/types").PayoutVerificationMethodSchema;
|
|
@@ -677,6 +710,7 @@ export declare const solePropApiKeyMapping: {};
|
|
|
677
710
|
* For remediation mappings adding document mapping additionally along with the apiKeyMapping
|
|
678
711
|
*/
|
|
679
712
|
export declare const remediationCompanyApiKeyMapping: Record<string, string>;
|
|
713
|
+
export declare const remediationBusinessDetailsApiKeyMapping: Record<string, string>;
|
|
680
714
|
export declare const remediationCompanySearchApiKeyMapping: Record<string, string>;
|
|
681
715
|
export declare const remediationIndividualApiKeyMapping: Record<string, string>;
|
|
682
716
|
export declare const remediationPayoutApiKeyMapping: {
|
|
@@ -2,4 +2,4 @@ import { DocumentType } from '../../core/models/api/document';
|
|
|
2
2
|
/**
|
|
3
3
|
* Returns the appropriate prefix for the document guidance image based on api documentType.
|
|
4
4
|
*/
|
|
5
|
-
export declare const getDocumentGuidancePrefix: (documentType: DocumentType, isIcon?: boolean, isFront?: boolean) => "
|
|
5
|
+
export declare const getDocumentGuidancePrefix: (documentType: DocumentType, isIcon?: boolean, isFront?: boolean) => "passport" | "id" | "id-front" | "id-back" | "generic-document";
|