@adyen/kyc-components 3.8.2 → 3.10.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 (44) hide show
  1. package/dist/es/{NO-CjZgx8a-.js → NO-CjMA-wtT.js} +0 -1
  2. package/dist/es/adyen-kyc-components.es.js +655 -218
  3. package/dist/style.css +6 -13
  4. package/dist/types/components/BaseElement.d.ts +1 -1
  5. package/dist/types/components/CompanyStructure/component/CompanyStructureComponent.d.ts +1 -3
  6. package/dist/types/components/Dropins/types.d.ts +1 -1
  7. package/dist/types/components/EmbeddedDropins/OnboardingDropinComponent/OnboardingDropinComponent.d.ts +6 -0
  8. package/dist/types/components/EmbeddedDropins/{OnboardingRedirect/OnboardingRedirectComponent.d.ts → ViewVerificationStatus/ViewVerificationStatusComponent.d.ts} +6 -5
  9. package/dist/types/components/EmbeddedDropins/{OnboardingRedirect → ViewVerificationStatus}/content.d.ts +1 -1
  10. package/dist/types/components/EmbeddedDropins/ViewVerificationStatus/index.d.ts +2 -0
  11. package/dist/types/components/EmbeddedDropins/{OnboardingRedirect → ViewVerificationStatus}/types.d.ts +1 -1
  12. package/dist/types/components/UIElement.d.ts +2 -1
  13. package/dist/types/components/index.d.ts +4 -2
  14. package/dist/types/components/internal/CollapsibleContainer/types.d.ts +1 -1
  15. package/dist/types/core/Context/ConfigurationApiContext/ConfigurationApiProvider.d.ts +5 -1
  16. package/dist/types/core/Context/SettingsContext/types.d.ts +2 -2
  17. package/dist/types/core/Context/SettingsContext/useSetting.d.ts +1 -1
  18. package/dist/types/core/SDKValidation/index.d.ts +1 -1
  19. package/dist/types/core/Services/componentApi/accept-service-agreement.d.ts +3 -0
  20. package/dist/types/core/Services/componentApi/download-pci.d.ts +3 -0
  21. package/dist/types/core/Services/componentApi/generate-onboarding-link.d.ts +1 -1
  22. package/dist/types/core/Services/componentApi/get-analytics-session.d.ts +2 -0
  23. package/dist/types/core/Services/componentApi/get-onboarding-status.d.ts +1 -1
  24. package/dist/types/core/Services/componentApi/get-pci-questionnaire.d.ts +3 -0
  25. package/dist/types/core/Services/componentApi/get-pci-status.d.ts +3 -0
  26. package/dist/types/core/Services/componentApi/get-pci-template.d.ts +3 -0
  27. package/dist/types/core/Services/componentApi/get-service-agreement-acceptance-info.d.ts +3 -0
  28. package/dist/types/core/Services/componentApi/get-service-agreement-status.d.ts +3 -0
  29. package/dist/types/core/Services/componentApi/get-service-agreement.d.ts +3 -0
  30. package/dist/types/core/Services/componentApi/push-events.d.ts +2 -0
  31. package/dist/types/core/Services/componentApi/sign-pci.d.ts +3 -0
  32. package/dist/types/core/core.d.ts +1 -1
  33. package/dist/types/core/hooks/useAnalytics.d.ts +11 -0
  34. package/dist/types/core/hooks/useAssociatedLegalArrangement.d.ts +2 -0
  35. package/dist/types/core/hooks/useComponentApi.d.ts +13 -0
  36. package/dist/types/core/models/api/analytics.d.ts +9 -0
  37. package/dist/types/core/models/api/{onboarding-redirect.d.ts → view-verification-status.d.ts} +6 -6
  38. package/dist/types/core/user-events.d.ts +7 -8
  39. package/dist/types/utils/masking/maskTypes.d.ts +5 -0
  40. package/dist/types/utils/masking/matchAgainstMask.d.ts +3 -0
  41. package/dist/types/utils/masking/shiftRight.d.ts +15 -0
  42. package/package.json +1 -1
  43. package/dist/types/components/EmbeddedDropins/OnboardingRedirect/index.d.ts +0 -2
  44. package/dist/types/core/hooks/useTrust.d.ts +0 -11
package/dist/style.css CHANGED
@@ -101575,7 +101575,6 @@ a.adl-button:disabled, a.adl-button.adl-button--disabled {
101575
101575
  background-color: #fff;
101576
101576
  padding: 32px;
101577
101577
  border-radius: 8px;
101578
- z-index: 2;
101579
101578
  }/* #region Spacing */
101580
101579
  /* #endregion */
101581
101580
  /* #region Colors */
@@ -111166,7 +111165,7 @@ a.adl-button:disabled, a.adl-button.adl-button--disabled {
111166
111165
  .adl-u-width-auto {
111167
111166
  width: auto !important;
111168
111167
  }
111169
- .adyen-onboarding-redirect {
111168
+ .adyen-view-verification-status {
111170
111169
  color: #00112c;
111171
111170
  font-family: fakt, -apple-system, blinkmacsystemfont, "Segoe UI", roboto, oxygen, ubuntu, cantarell, "Open Sans", "Helvetica Neue", sans-serif;
111172
111171
  font-size: 15px;
@@ -111178,24 +111177,18 @@ a.adl-button:disabled, a.adl-button.adl-button--disabled {
111178
111177
  overflow: hidden;
111179
111178
  position: relative;
111180
111179
  }
111181
- .adyen-onboarding-redirect *,
111182
- .adyen-onboarding-redirect *::before,
111183
- .adyen-onboarding-redirect *::after {
111180
+ .adyen-view-verification-status *,
111181
+ .adyen-view-verification-status *::before,
111182
+ .adyen-view-verification-status *::after {
111184
111183
  box-sizing: border-box;
111185
111184
  }
111186
- .adyen-onboarding-redirect__header {
111187
- margin: 0 0 18px 0;
111188
- color: #394962;
111189
- font-size: 21px;
111190
- line-height: 1.4;
111191
- }
111192
- .adyen-onboarding-redirect__description {
111185
+ .adyen-view-verification-status__description {
111193
111186
  color: #394962;
111194
111187
  font-size: 15px;
111195
111188
  line-height: 1.4;
111196
111189
  margin: 0 0 12px 0;
111197
111190
  }
111198
- .adyen-onboarding-redirect__button {
111191
+ .adyen-view-verification-status__button {
111199
111192
  font-size: 15px;
111200
111193
  line-height: 1.4;
111201
111194
  }
@@ -11,7 +11,7 @@ export declare abstract class BaseElement<P extends BaseElementProps> {
11
11
  _component?: JSX.Element;
12
12
  eventEmitter: EventEmitter;
13
13
  private readonly _parentInstance?;
14
- protected constructor(props: P);
14
+ constructor(props: P);
15
15
  abstract render(): JSX.Element;
16
16
  /**
17
17
  * Mounts an element into the dom
@@ -3,6 +3,4 @@ import { CompanySearchSchema } from '../../CompanySearch/types';
3
3
  import { CompanyStructureProps, CompanyStructureSchema } from '../types';
4
4
  export declare const COMPANY_STRUCTURE_FORM_ID: keyof CompanySearchSchema;
5
5
  export declare const companyStructureFields: Array<keyof CompanyStructureSchema>;
6
- declare function CompanyStructure({ data, labels, heading, description, formVerificationErrors, fieldValidationErrors, requiredFields, kompanyVerifiedData, }: CompanyStructureProps): import("preact/compat").JSX.Element;
7
- export declare const CompanyStructureComponent: typeof CompanyStructure;
8
- export {};
6
+ export declare function CompanyStructureComponent({ data, labels, heading, description, formVerificationErrors, fieldValidationErrors, requiredFields, kompanyVerifiedData, }: CompanyStructureProps): import("preact").JSX.Element;
@@ -6,9 +6,9 @@ import { Document, ExistingDocument } from '../../core/models/api/document';
6
6
  import { BankVerificationVendorsResponse } from '../../core/models/api/get-bankVerification-providers';
7
7
  import type { InstantIdVerificationStartCheckRequest, InstantIdVerificationStartCheckResponse, InstantIdVerificationTokenRequest, InstantIdVerificationTokenResponse } from '../../core/models/api/instant-id-verification';
8
8
  import { ExistingLegalEntity, LegalEntity, PatchLegalEntity } from '../../core/models/api/legal-entity';
9
- import { OnboardingLinkConfig, OnboardingLinkResponse, OnboardingStatusResponse } from '../../core/models/api/onboarding-redirect';
10
9
  import { ReviewCompletion } from '../../core/models/api/review';
11
10
  import { ExistingTransferInstrument, TransferInstrument } from '../../core/models/api/transfer-instrument';
11
+ import { OnboardingLinkConfig, OnboardingLinkResponse, OnboardingStatusResponse } from '../../core/models/api/view-verification-status';
12
12
  import { CountryCode } from '../../core/models/country-code';
13
13
  import { BaseTrackingPayload } from '../../core/utils';
14
14
  import { TranslationKey } from '../../language/types';
@@ -0,0 +1,6 @@
1
+ import EventEmitter from '../../EventEmitter';
2
+ export interface OnboardingDropinComponentProps {
3
+ legalEntityId: string;
4
+ eventEmitter?: EventEmitter;
5
+ }
6
+ export declare function OnboardingDropinComponent({ legalEntityId, eventEmitter, }: OnboardingDropinComponentProps): import("preact").JSX.Element;
@@ -1,15 +1,16 @@
1
- import './OnboardingRedirectComponent.scss';
1
+ import './ViewVerificationStatusComponent.scss';
2
2
  import { ExistingLegalEntity } from '../../../core/models/api/legal-entity';
3
- import { OnboardingStatus } from '../../../core/models/api/onboarding-redirect';
3
+ import { OnboardingStatus } from '../../../core/models/api/view-verification-status';
4
4
  import EventEmitter from '../../EventEmitter';
5
5
  import { ErrorEntity, OnboardingRedirectConfig, OnboardingUrlTarget } from './types';
6
- export interface OnboardingRedirectComponentProps {
6
+ export interface ViewVerificationStatusComponentProps {
7
7
  legalEntityId: ExistingLegalEntity['id'];
8
- redirectTarget?: OnboardingUrlTarget;
8
+ hideExplanation?: boolean;
9
9
  returnUrl?: string;
10
+ redirectTarget?: OnboardingUrlTarget;
10
11
  onStatusChange?: (status: OnboardingStatus) => void;
11
12
  onError?: (errorEntity: ErrorEntity) => void;
12
13
  onRedirect?: (config: OnboardingRedirectConfig) => void;
13
14
  eventEmitter?: EventEmitter;
14
15
  }
15
- export declare function OnboardingRedirectComponent({ legalEntityId, returnUrl, redirectTarget, onStatusChange, onError, onRedirect, eventEmitter, }: OnboardingRedirectComponentProps): import("preact").JSX.Element;
16
+ export declare function ViewVerificationStatusComponent({ legalEntityId, hideExplanation, returnUrl, redirectTarget, onStatusChange, onError, onRedirect, eventEmitter, }: ViewVerificationStatusComponentProps): import("preact").JSX.Element;
@@ -1,2 +1,2 @@
1
- import { OnboardingRedirectContent, OnboardingStatus } from '../../../core/models/api/onboarding-redirect';
1
+ import { OnboardingRedirectContent, OnboardingStatus } from '../../../core/models/api/view-verification-status';
2
2
  export declare function getContentByStatus(status: OnboardingStatus): OnboardingRedirectContent | undefined;
@@ -0,0 +1,2 @@
1
+ export * from './types';
2
+ export { ViewVerificationStatusComponent } from './ViewVerificationStatusComponent';
@@ -1,4 +1,4 @@
1
- import { OnboardingLinkConfig } from '../../../core/models/api/onboarding-redirect';
1
+ import { OnboardingLinkConfig } from '../../../core/models/api/view-verification-status';
2
2
  export interface IError {
3
3
  message: string;
4
4
  stack?: string;
@@ -7,15 +7,16 @@ import { SettingsProps } from '../core/Context/SettingsContext/types';
7
7
  import { UserEventCallback } from '../core/user-events';
8
8
  import { BaseElement, BaseElementProps } from './BaseElement';
9
9
  import EventEmitter from './EventEmitter';
10
+ import { ComponentMap } from './index';
10
11
  export interface BasicComponentProps {
11
12
  eventEmitter?: EventEmitter;
12
13
  }
13
14
  export interface UIElementProps<ComponentProps extends BasicComponentProps> extends BaseElementProps, CoreProviderProps, AuthProviderProps, I18nProviderProps, SettingsProps, ExperimentsProps {
14
15
  onUserEvent?: UserEventCallback;
15
16
  component: (props: ComponentProps) => JSX.Element;
17
+ componentName: keyof ComponentMap;
16
18
  componentProps: ComponentProps;
17
19
  }
18
20
  export declare class UIElement<ComponentProps extends BasicComponentProps = BasicComponentProps> extends BaseElement<UIElementProps<ComponentProps>> {
19
- constructor(props: UIElementProps<ComponentProps>);
20
21
  render: () => JSX.Element;
21
22
  }
@@ -13,7 +13,8 @@ import { TrustDropinComponent } from './Dropins/TrustDropin';
13
13
  import { CreateIndividualComponent } from './EmbeddedDropins/CreateIndividualComponent/CreateIndividualComponent';
14
14
  import { CreateTransferInstrumentComponent } from './EmbeddedDropins/CreateTransferInstrumentComponent/CreateTransferInstrumentComponent';
15
15
  import { ManageTransferInstrumentComponent } from './EmbeddedDropins/ManageTransferInstrumentComponent/ManageTransferInstrumentComponent';
16
- import { OnboardingRedirectComponent } from './EmbeddedDropins/OnboardingRedirect';
16
+ import { OnboardingDropinComponent } from './EmbeddedDropins/OnboardingDropinComponent/OnboardingDropinComponent';
17
+ import { ViewVerificationStatusComponent } from './EmbeddedDropins/ViewVerificationStatus';
17
18
  /**
18
19
  * Maps each component with a Component element.
19
20
  */
@@ -29,7 +30,8 @@ export declare const componentsMap: {
29
30
  readonly createTransferInstrumentComponent: typeof CreateTransferInstrumentComponent;
30
31
  readonly createIndividualComponent: typeof CreateIndividualComponent;
31
32
  readonly manageTransferInstrumentComponent: typeof ManageTransferInstrumentComponent;
32
- readonly onboardingRedirectComponent: typeof OnboardingRedirectComponent;
33
+ readonly onboardingDropinComponent: typeof OnboardingDropinComponent;
34
+ readonly viewVerificationStatusComponent: typeof ViewVerificationStatusComponent;
33
35
  };
34
36
  export type ComponentMap = typeof componentsMap;
35
37
  export type ComponentProps<Name extends keyof ComponentMap> = Parameters<ComponentMap[Name]>[0];
@@ -2,5 +2,5 @@ import { ComponentChildren } from 'preact';
2
2
  export interface CollapsibleContainerProps {
3
3
  children: ComponentChildren;
4
4
  collapsed?: boolean;
5
- animationDuration?: string;
5
+ animationDuration?: number;
6
6
  }
@@ -1,7 +1,11 @@
1
1
  import { ComponentChildren } from 'preact';
2
+ import { ComponentMap } from '../../../components';
3
+ import { UserEventCallback } from '../../user-events';
2
4
  interface ConfigurationApiContextProviderProps {
3
5
  children: ComponentChildren;
6
+ onUserEvent?: UserEventCallback;
4
7
  rootLegalEntityId: string;
8
+ componentName: keyof ComponentMap;
5
9
  }
6
- export declare const ConfigurationApiProvider: ({ children, rootLegalEntityId, }: ConfigurationApiContextProviderProps) => import("preact").JSX.Element;
10
+ export declare const ConfigurationApiProvider: ({ children, onUserEvent, rootLegalEntityId, componentName, }: ConfigurationApiContextProviderProps) => import("preact").JSX.Element;
7
11
  export {};
@@ -10,7 +10,6 @@ export declare enum SettingNames {
10
10
  AllowIntraRegionCrossBorderPayout = "allowIntraRegionCrossBorderPayout",
11
11
  AllowLegalEntityTypeChange = "changeLegalEntityType",
12
12
  AllowPrefilledCountryEdit = "editPrefilledCountry",
13
- LimitToOneTransferInstrument = "limitToOneTransferInstrument",
14
13
  RequirePciSignEcommerce = "requirePciSignEcommerce",
15
14
  RequirePciSignPos = "requirePciSignPos",
16
15
  RequirePciSignEcomMoto = "requirePciSignEcomMoto",
@@ -19,6 +18,7 @@ export declare enum SettingNames {
19
18
  HideOnboardingIntroductionOrganization = "hideOnboardingIntroductionOrganization",
20
19
  HideOnboardingIntroductionTrust = "hideOnboardingIntroductionTrust",
21
20
  HideOnboardingIntroductionSoleProprietor = "hideOnboardingIntroductionSoleProprietor",
21
+ TransferInstrumentLimit = "transferInstrumentLimit",
22
22
  ViewOnboardingGuidance = "viewOnboardingGuidance"
23
23
  }
24
24
  export type SettingName = `${SettingNames}`;
@@ -37,7 +37,7 @@ export interface Settings {
37
37
  hideOnboardingIntroductionTrust: boolean;
38
38
  hideOnboardingIntroductionSoleProprietor: boolean;
39
39
  viewOnboardingGuidance: boolean;
40
- limitToOneTransferInstrument: boolean;
40
+ transferInstrumentLimit: number;
41
41
  }
42
42
  export type ProvidedSettings = Partial<Settings>;
43
43
  type BooleanSettingName = {
@@ -1,2 +1,2 @@
1
1
  import { Settings } from './types';
2
- export declare const useSetting: <S extends "acceptedCountries" | "allowBankAccountFormatSelection" | "allowIntraRegionCrossBorderPayout" | "changeLegalEntityType" | "editPrefilledCountry" | "limitToOneTransferInstrument" | "requirePciSignEcommerce" | "requirePciSignPos" | "requirePciSignEcomMoto" | "requirePciSignPosMoto" | "hideOnboardingIntroductionIndividual" | "hideOnboardingIntroductionOrganization" | "hideOnboardingIntroductionTrust" | "hideOnboardingIntroductionSoleProprietor" | "viewOnboardingGuidance">(settingName: S) => Settings[S];
2
+ export declare const useSetting: <S extends "acceptedCountries" | "allowBankAccountFormatSelection" | "allowIntraRegionCrossBorderPayout" | "changeLegalEntityType" | "editPrefilledCountry" | "requirePciSignEcommerce" | "requirePciSignPos" | "requirePciSignEcomMoto" | "requirePciSignPosMoto" | "hideOnboardingIntroductionIndividual" | "hideOnboardingIntroductionOrganization" | "hideOnboardingIntroductionTrust" | "hideOnboardingIntroductionSoleProprietor" | "transferInstrumentLimit" | "viewOnboardingGuidance">(settingName: S) => Settings[S];
@@ -1,4 +1,4 @@
1
1
  import { ComponentOptions } from '../../components';
2
2
  import { CoreOptions } from '../types';
3
3
  export declare const validateCoreOptions: (coreOptions: CoreOptions) => void;
4
- export declare const validateForComponent: <Name extends "payoutAccount" | "pci" | "taskList" | "individualDropin" | "companyDropin" | "companySearchDropin" | "trustDropin" | "soleProprietorDropin" | "createTransferInstrumentComponent" | "createIndividualComponent" | "manageTransferInstrumentComponent" | "onboardingRedirectComponent">(componentName: Name, options: ComponentOptions<Name>) => void;
4
+ export declare const validateForComponent: <Name extends "payoutAccount" | "pci" | "individualDropin" | "companyDropin" | "companySearchDropin" | "taskList" | "trustDropin" | "soleProprietorDropin" | "createTransferInstrumentComponent" | "createIndividualComponent" | "manageTransferInstrumentComponent" | "onboardingDropinComponent" | "viewVerificationStatusComponent">(componentName: Name, options: ComponentOptions<Name>) => void;
@@ -0,0 +1,3 @@
1
+ import { ServiceAgreementSignRequest, ServiceAgreementSignResponse } from '../../models/api/contracts';
2
+ import { ComponentApiRequestContext } from '../types';
3
+ export declare const acceptServiceAgreement: (context: ComponentApiRequestContext, termsOfServiceDocumentId: string, data: ServiceAgreementSignRequest) => Promise<ServiceAgreementSignResponse>;
@@ -0,0 +1,3 @@
1
+ import { DownloadPci } from '../../models/api/contracts';
2
+ import { ComponentApiRequestContext } from '../types';
3
+ export declare const downloadPci: (context: ComponentApiRequestContext, pciDocumentReference: string) => Promise<DownloadPci>;
@@ -1,3 +1,3 @@
1
- import { OnboardingLinkConfig, OnboardingLinkResponse } from '../../models/api/onboarding-redirect';
1
+ import { OnboardingLinkConfig, OnboardingLinkResponse } from '../../models/api/view-verification-status';
2
2
  import { ComponentApiRequestContext } from '../types';
3
3
  export declare const generateOnboardingLink: (context: ComponentApiRequestContext, config: OnboardingLinkConfig) => Promise<OnboardingLinkResponse>;
@@ -0,0 +1,2 @@
1
+ import { EmbeddedAnalyticsSessionRequest, EmbeddedAnalyticsSessionResponse } from '../../models/api/analytics';
2
+ export declare const getAnalyticsSession: (loadingContext: string, data: EmbeddedAnalyticsSessionRequest) => Promise<EmbeddedAnalyticsSessionResponse>;
@@ -1,3 +1,3 @@
1
- import { OnboardingStatusResponse } from '../../models/api/onboarding-redirect';
1
+ import { OnboardingStatusResponse } from '../../models/api/view-verification-status';
2
2
  import { ComponentApiRequestContext } from '../types';
3
3
  export declare const getOnboardingStatus: (context: ComponentApiRequestContext) => Promise<OnboardingStatusResponse>;
@@ -0,0 +1,3 @@
1
+ import { PciQuestionnaires } from '../../models/api/contracts';
2
+ import { ComponentApiRequestContext } from '../types';
3
+ export declare const getPciQuestionnaires: (context: ComponentApiRequestContext) => Promise<PciQuestionnaires>;
@@ -0,0 +1,3 @@
1
+ import { PciStatus, PciStatusRequest } from '../../models/api/contracts';
2
+ import { ComponentApiRequestContext } from '../types';
3
+ export declare const getPciStatus: (context: ComponentApiRequestContext, data: PciStatusRequest) => Promise<PciStatus>;
@@ -0,0 +1,3 @@
1
+ import { PciTemplateRequest, PciTemplateResponse } from '../../models/api/contracts';
2
+ import { ComponentApiRequestContext } from '../types';
3
+ export declare const getPciTemplate: (context: ComponentApiRequestContext, data: PciTemplateRequest) => Promise<PciTemplateResponse>;
@@ -0,0 +1,3 @@
1
+ import { ServiceAgreementAcceptanceInfos } from '../../models/api/contracts';
2
+ import { ComponentApiRequestContext } from '../types';
3
+ export declare const getServiceAgreementAcceptanceInfo: (context: ComponentApiRequestContext) => Promise<ServiceAgreementAcceptanceInfos>;
@@ -0,0 +1,3 @@
1
+ import { type ServiceAgreementStatus } from '../../models/api/contracts';
2
+ import { ComponentApiRequestContext } from '../types';
3
+ export declare const getServiceAgreementStatus: (context: ComponentApiRequestContext) => Promise<ServiceAgreementStatus>;
@@ -0,0 +1,3 @@
1
+ import { type ServiceAgreementRequest, type ServiceAgreementResponse } from '../../models/api/contracts';
2
+ import { ComponentApiRequestContext } from '../types';
3
+ export declare const getServiceAgreement: (context: ComponentApiRequestContext, data: ServiceAgreementRequest) => Promise<ServiceAgreementResponse>;
@@ -0,0 +1,2 @@
1
+ import { EmbeddedEventItem } from '../../user-events';
2
+ export declare const pushEvents: (loadingContext: string, sessionId: string, event: EmbeddedEventItem) => Promise<void>;
@@ -0,0 +1,3 @@
1
+ import { PciQuestionnaireIds, SignedBy } from '../../models/api/contracts';
2
+ import { ComponentApiRequestContext } from '../types';
3
+ export declare const signPci: (context: ComponentApiRequestContext, data: SignedBy) => Promise<PciQuestionnaireIds>;
@@ -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" | "taskList" | "individualDropin" | "companyDropin" | "companySearchDropin" | "trustDropin" | "soleProprietorDropin" | "createTransferInstrumentComponent" | "createIndividualComponent" | "manageTransferInstrumentComponent" | "onboardingRedirectComponent">(componentName: Name, componentOptions: ComponentOptions<Name>) => UIElement;
11
+ create: <Name extends "payoutAccount" | "pci" | "individualDropin" | "companyDropin" | "companySearchDropin" | "taskList" | "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
@@ -0,0 +1,11 @@
1
+ import { ComponentMap } from '../../components';
2
+ import { EmbeddedEventItem, EventQueueItem, UserEventCallback } from '../user-events';
3
+ export type useAnalyticsProps = {
4
+ isEmbeddedDropin: boolean;
5
+ legalEntityId: string;
6
+ onUserEvent?: UserEventCallback;
7
+ sdkVersion: string;
8
+ componentName: keyof ComponentMap;
9
+ };
10
+ export declare const convertToEmbeddedEvent: (eventQueueItem: EventQueueItem) => EmbeddedEventItem;
11
+ export declare const useAnalytics: ({ onUserEvent, isEmbeddedDropin, legalEntityId, sdkVersion, componentName, }: useAnalyticsProps) => Promise<void>;
@@ -6,6 +6,8 @@ interface UseAssociatedLegalArrangementOptions {
6
6
  }
7
7
  interface UseAssociatedLegalArrangement {
8
8
  associatedLegalArrangement: ExistingLegalEntity | undefined;
9
+ setAssociatedLegalArrangement: (le: ExistingLegalEntity) => void;
10
+ refreshAssociatedLegalArrangement: () => void;
9
11
  }
10
12
  export declare function useAssociatedLegalArrangement({ rootLegalEntity, getLegalEntity, }: UseAssociatedLegalArrangementOptions): UseAssociatedLegalArrangement;
11
13
  export {};
@@ -1,6 +1,8 @@
1
1
  import { DropinAPIHandlers } from '../../components/Dropins/types';
2
+ import { EmbeddedAnalyticsSessionRequest, EmbeddedAnalyticsSessionResponse } from '../models/api/analytics';
2
3
  import { TransferInstrumentReference } from '../models/api/transfer-instrument-reference';
3
4
  import { BankVerificationErrorResponse, CreateTrustedTransferInstrumentResponse } from '../models/api/trusted-transferInstrument';
5
+ import { EmbeddedEventItem } from '../user-events';
4
6
  export type ComponentApi = {
5
7
  getLegalEntity: Required<DropinAPIHandlers>['handleGetLegalEntity'];
6
8
  updateLegalEntity: Required<DropinAPIHandlers>['handleUpdateLegalEntity'];
@@ -22,6 +24,17 @@ export type ComponentApi = {
22
24
  getTransferInstruments(): Promise<TransferInstrumentReference[]>;
23
25
  getOnboardingStatus: Required<DropinAPIHandlers>['handleGetOnboardingStatus'];
24
26
  generateOnboardingLink: Required<DropinAPIHandlers>['handleGenerateOnboardingLink'];
27
+ getAnalyticsSession(data: EmbeddedAnalyticsSessionRequest): Promise<EmbeddedAnalyticsSessionResponse>;
28
+ pushEvents(sessionId: string, event: EmbeddedEventItem): Promise<void>;
29
+ getPciStatus: Required<DropinAPIHandlers>['handleGetPciStatus'];
30
+ getPciTemplate: Required<DropinAPIHandlers>['handleGetPciTemplate'];
31
+ getPciQuestionnaires: Required<DropinAPIHandlers>['handleGetPciQuestionnaires'];
32
+ signPci: Required<DropinAPIHandlers>['handleSignPci'];
33
+ downloadPci: Required<DropinAPIHandlers>['handleDownloadPci'];
34
+ getServiceAgreementStatus: Required<DropinAPIHandlers>['handleGetServiceAgreementStatus'];
35
+ getServiceAgreementAcceptanceInfos: Required<DropinAPIHandlers>['handleGetServiceAgreementAcceptanceInfos'];
36
+ getServiceAgreement: Required<DropinAPIHandlers>['handleGetServiceAgreement'];
37
+ acceptServiceAgreement: Required<DropinAPIHandlers>['handleSignServiceAgreement'];
25
38
  };
26
39
  export declare const COMPONENTS_API_VERSION = "v1";
27
40
  /**
@@ -0,0 +1,9 @@
1
+ export interface EmbeddedAnalyticsSessionRequest {
2
+ sdkVersion: string;
3
+ componentName: string;
4
+ userAgent: string;
5
+ legalEntityId: string;
6
+ }
7
+ export interface EmbeddedAnalyticsSessionResponse {
8
+ id: string;
9
+ }
@@ -1,14 +1,14 @@
1
1
  import { TranslationKey } from '../../../language/types';
2
2
  export declare enum OnboardingStatus {
3
- INCOMPLETE = "INCOMPLETE",
4
- PROCESSING = "PROCESSING",
5
- ERROR = "ERROR",
6
- FINISHED = "FINISHED"
3
+ AWAITING_DATA = "AWAITING_DATA",
4
+ IN_REVIEW = "IN_REVIEW",
5
+ UNSUCCESSFUL = "UNSUCCESSFUL",
6
+ REJECTED = "REJECTED",
7
+ VERIFIED = "VERIFIED"
7
8
  }
8
9
  export interface OnboardingRedirectContent {
9
- header: TranslationKey;
10
10
  description: TranslationKey[];
11
- ctaButton: TranslationKey;
11
+ ctaButton?: TranslationKey;
12
12
  }
13
13
  export interface OnboardingStatusResponse {
14
14
  status: OnboardingStatus;
@@ -1,10 +1,4 @@
1
1
  export interface UserEvent {
2
- /** How many times has the event occurred */
3
- count?: number;
4
- /** Duration of the event */
5
- dur?: number;
6
- /** Sum to report with the event */
7
- sum?: number;
8
2
  /** Object with segments should be a flat object (arbitrary key/value pairs for event data) */
9
3
  segmentation?: {
10
4
  [key: string]: string | number | boolean | any[] | null;
@@ -13,9 +7,14 @@ export interface UserEvent {
13
7
  type UserEventWithKey = UserEvent & {
14
8
  key: string;
15
9
  };
16
- type EventType = 'track_pageview' | 'add_event' | 'start_event' | 'end_event';
17
- type EventQueueItem = [EventType, string | UserEventWithKey];
10
+ export type EventType = 'track_pageview' | 'add_event' | 'start_event' | 'end_event';
11
+ export type EventQueueItem = [EventType, string | UserEventWithKey];
18
12
  export type UserEventCallback = (eventQueueItem: EventQueueItem) => void;
13
+ export type EmbeddedEventItem = {
14
+ eventType: EventType;
15
+ eventName: string;
16
+ eventData?: UserEvent;
17
+ };
19
18
  declare class UserEvents {
20
19
  private readonly queue;
21
20
  private readonly subscriptions;
@@ -10,6 +10,11 @@ export interface InputToken {
10
10
  optional?: boolean;
11
11
  }
12
12
  export type MaskToken = NonInputToken | InputToken;
13
+ export interface PossibleShift {
14
+ fromIndex: number;
15
+ shiftDistance: number;
16
+ }
13
17
  export interface Mask {
14
18
  tokens: MaskToken[];
19
+ possibleShifts: PossibleShift[];
15
20
  }
@@ -12,6 +12,9 @@ export interface MismatchResult {
12
12
  partialDisplayValue: string;
13
13
  }
14
14
  export type MaskResult = CorrectResult | MismatchResult;
15
+ export type MatchedToken = MaskToken & {
16
+ char: string;
17
+ };
15
18
  /**
16
19
  * Takes some pure value e.g. `NL123456` and a {@link Mask}, and returns a `partialCorrect`,
17
20
  * `correct` or `mismatch` {@link MaskResult} accordingly.
@@ -0,0 +1,15 @@
1
+ import { MaskToken, PossibleShift } from './maskTypes';
2
+ import type { MatchedToken } from './matchAgainstMask';
3
+ export declare const shiftRight: (possibleShifts: PossibleShift[], matchedTokens: MatchedToken[], remainingTokens: MaskToken[]) => {
4
+ matchedTokens: MatchedToken[];
5
+ remainingTokens: MaskToken[];
6
+ };
7
+ /**
8
+ * Returns all possible shifts of optional inputs, sorted by best to worst
9
+ * @param mask
10
+ */
11
+ export declare const findPossibleShifts: (mask: MaskToken[]) => PossibleShift[];
12
+ export declare const tryShift: (matchedTokens: MatchedToken[], remainingTokens: MaskToken[], fromIndex: number, shiftDistance: number) => {
13
+ matchedTokens: MatchedToken[];
14
+ remainingTokens: MaskToken[];
15
+ } | "notPossible";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adyen/kyc-components",
3
- "version": "3.8.2",
3
+ "version": "3.10.0",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -1,2 +0,0 @@
1
- export { OnboardingRedirectComponent } from './OnboardingRedirectComponent';
2
- export * from './types';
@@ -1,11 +0,0 @@
1
- import { DropinAPIHandlers } from '../../components/Dropins/types';
2
- import { ExistingLegalEntity } from '../models/api/legal-entity';
3
- interface UseTrustArgs {
4
- rootLegalEntity: ExistingLegalEntity;
5
- handleGetLegalEntity: NonNullable<DropinAPIHandlers['handleGetLegalEntity']>;
6
- }
7
- export declare const useTrust: ({ rootLegalEntity, handleGetLegalEntity, }: UseTrustArgs) => [
8
- ExistingLegalEntity | undefined,
9
- () => Promise<ExistingLegalEntity | undefined>
10
- ];
11
- export {};