@adyen/kyc-components 2.62.0 → 2.63.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.
@@ -17,7 +17,7 @@ export declare enum BankDocumentTypes {
17
17
  BANK_STATEMENT = "bankStatement",
18
18
  DEPOSIT_SLIP = "depositSlip",
19
19
  SCREENSHOT_OF_BANK = "screenshotOfOnlineBankingEnviroment",
20
- OFFICIAL_EMAIL = "officialEmailOrALetterFromYourBank",
20
+ A_LETTER_FROM_YOUR_BANK = "aLetterFromYourBank",
21
21
  CHECK = "check"
22
22
  }
23
23
  export interface DocumentsModifiers {
@@ -1,5 +1,4 @@
1
1
  import type { Dispatch, StateUpdater } from 'preact/hooks';
2
- import type { BaseTrackingPayload } from '../../core/analytics';
3
2
  import type { HookStatus } from '../../core/hooks/types';
4
3
  import type { BaseInnerFormProps } from '../../core/hooks/useForm/types';
5
4
  import type { CompanyDatasetResponse, CompanySearchResult } from '../../core/models/api/company-search';
@@ -15,7 +14,6 @@ export interface BasicInformationProps extends BaseInnerFormProps<BasicInformati
15
14
  country: CountryCode;
16
15
  companyType: CompanyTypesValue | undefined;
17
16
  isTopLevelEntity: boolean;
18
- baseTrackingPayload: BaseTrackingPayload;
19
17
  showBusinessSelection: boolean;
20
18
  showCompanyStructure: boolean;
21
19
  isActiveForm: boolean;
@@ -1,5 +1,4 @@
1
1
  import type { Dispatch, StateUpdater } from 'preact/hooks';
2
- import type { BaseTrackingPayload } from '../../core/analytics';
3
2
  import type { HookStatus } from '../../core/hooks/types';
4
3
  import type { BaseOuterFormProps } from '../../core/hooks/useForm/types';
5
4
  import type { CompanyDatasetResponse, CompanySearchResult } from '../../core/models/api/company-search';
@@ -20,7 +19,6 @@ export interface BusinessDetailsSchema {
20
19
  export interface BusinessDetailsProps extends BaseOuterFormProps<BusinessDetailsSchema> {
21
20
  country: CountryCode;
22
21
  isTopLevelEntity: boolean;
23
- baseTrackingPayload: BaseTrackingPayload;
24
22
  showCompanyStructure: boolean;
25
23
  showBusinessSelection: boolean;
26
24
  searching: HookStatus;
@@ -1,8 +1,8 @@
1
1
  import type { Dispatch, StateUpdater } from 'preact/hooks';
2
- import type { BaseTrackingPayload } from '../../../core/analytics';
3
2
  import type { ExistingLegalEntity, LegalEntity } from '../../../core/models/api/legal-entity';
4
3
  import type { EntityProblems } from '../../../core/models/errors/entity-problems';
5
4
  import type { FormModelWithValidity } from '../../../core/models/form';
5
+ import type { AdditionalEventProperties } from '../../../core/user-events';
6
6
  import type Language from '../../../language/Language';
7
7
  import type { DocumentApiUtils } from '../../../utils/api/documentUtils';
8
8
  import type { BusinessDetailsProps, BusinessDetailsSchema } from '../../BusinessDetails/types';
@@ -19,7 +19,7 @@ export type BusinessDetailsDropinApihandler = Required<Pick<DropinAPIHandlers, '
19
19
  handleVerifyTin?: DropinAPIHandlers['handleVerifyTin'];
20
20
  handleClearCompanyData?: DropinAPIHandlers['handleClearCompanyData'];
21
21
  };
22
- export type BusinessDetailsDropin = Omit<BusinessDetailsProps, 'isTopLevelEntity' | 'baseTrackingPayload' | 'handleNextClick' | 'showCompanyStructure' | 'showBusinessSelection' | 'searching' | 'fetching' | 'verifying' | 'resettingTrustedData' | 'searchResults' | 'invalidTin' | 'resetTinVerification' | 'verifiedBusiness' | 'fetchBusinessData' | 'verifyBusinessData' | 'proceedToManualDataEntry' | 'setShowBusinessSelection' | 'setShowCompanyStructure'>;
22
+ export type BusinessDetailsDropin = Omit<BusinessDetailsProps, 'isTopLevelEntity' | 'handleNextClick' | 'showCompanyStructure' | 'showBusinessSelection' | 'searching' | 'fetching' | 'verifying' | 'resettingTrustedData' | 'searchResults' | 'invalidTin' | 'resetTinVerification' | 'verifiedBusiness' | 'fetchBusinessData' | 'verifyBusinessData' | 'proceedToManualDataEntry' | 'setShowBusinessSelection' | 'setShowCompanyStructure'>;
23
23
  export interface BusinessDetailsDropinProps extends BusinessDetailsDropin, BusinessDetailsDropinApihandler, DropinProps {
24
24
  legalEntityResponse: ExistingLegalEntity;
25
25
  isTargetLegalEntityType?: boolean;
@@ -31,13 +31,13 @@ export interface SubmitDocumentsProps {
31
31
  legalEntity: ExistingLegalEntity;
32
32
  forms: FormModelWithValidity[];
33
33
  documentUtils: DocumentApiUtils;
34
- baseTrackingPayload: BaseTrackingPayload;
34
+ additionalTrackingParams: Partial<AdditionalEventProperties>;
35
35
  }
36
36
  export interface SubmitProps {
37
37
  data: BusinessDetailsSchema;
38
38
  legalEntityResponse: ExistingLegalEntity;
39
39
  isTargetLegalEntityType: boolean;
40
- baseTrackingPayload: BaseTrackingPayload;
40
+ additionalTrackingParams: Partial<AdditionalEventProperties>;
41
41
  forms: FormModelWithValidity[];
42
42
  documentUtils: DocumentApiUtils;
43
43
  i18n: Language;
@@ -9,4 +9,4 @@ export declare const canSubmit: (data: BusinessDetailsSchema) => boolean;
9
9
  export declare const isDocumentsRequired: (forms: FormModelWithValidity[]) => boolean;
10
10
  export declare const removeConditionalForms: (forms: FormModelWithValidity[], isSkippingCompanyStructure: boolean) => FormModelWithValidity[];
11
11
  export declare const formatDataForSummary: (data: BusinessDetailsSchema, forms: FormModelWithValidity[], labels: OuterFormLabels<BusinessDetailsSchema>, i18n: Language) => {};
12
- export declare function submit({ data, legalEntityResponse, baseTrackingPayload, forms, problems, documentUtils, i18n, setLoadingStatus, setProblems, showToast, clearToasts, handleUpdateLegalEntity, onExternalSubmit, accountHolder, }: SubmitProps): Promise<void>;
12
+ export declare function submit({ data, legalEntityResponse, additionalTrackingParams, forms, problems, documentUtils, i18n, setLoadingStatus, setProblems, showToast, clearToasts, handleUpdateLegalEntity, onExternalSubmit, accountHolder, }: SubmitProps): Promise<void>;
@@ -1,8 +1,8 @@
1
1
  import './FormWrapper.scss';
2
2
  import type { ComponentChildren } from 'preact';
3
- import type { BaseTrackingPayload } from '../../../core/analytics';
4
3
  import type { EntityProblems } from '../../../core/models/errors/entity-problems';
5
4
  import type { FormModelWithValidity } from '../../../core/models/form';
5
+ import { type AdditionalEventProperties } from '../../../core/user-events';
6
6
  import type { TranslationKey } from '../../../language/types';
7
7
  import type { LoadingStatus } from '../../internal/LoaderWrapper/constants';
8
8
  import type { DropinAPIHandlers } from '../types';
@@ -28,7 +28,7 @@ export interface FormWrapperProps {
28
28
  forms: FormModelWithValidity[];
29
29
  activeForm: FormModelWithValidity;
30
30
  validateForm(): void;
31
- baseTrackingPayload: BaseTrackingPayload;
31
+ navigationTrackingParams?: Partial<AdditionalEventProperties>;
32
32
  hideDropinLayout?: boolean;
33
33
  hideFooter?: boolean;
34
34
  hideHomeButton?: boolean;
@@ -42,4 +42,4 @@ export interface FormWrapperProps {
42
42
  currentStep?: number;
43
43
  totalSteps?: number;
44
44
  }
45
- export declare const FormWrapper: ({ summary, taskName, children, handleNextClick, handleBackClick, handleHomeClick, handleCloseClick, nextButtonLabel, backButtonLabel, homeButtonLabel, loadingStatus, gotoFormByFormIndex, forms, activeForm, handleGetIdVerificationToken, validateForm, baseTrackingPayload, hideDropinLayout, hideFooter, hideHomeButton, hideBackButton, hideNextButton, hideNavigation, asModal, canSubmit, onSubmit, problems, currentStep, totalSteps, }: FormWrapperProps) => import("preact").JSX.Element;
45
+ export declare const FormWrapper: ({ summary, taskName, children, handleNextClick, handleBackClick, handleHomeClick, handleCloseClick, nextButtonLabel, backButtonLabel, homeButtonLabel, loadingStatus, gotoFormByFormIndex, forms, activeForm, handleGetIdVerificationToken, validateForm, navigationTrackingParams, hideDropinLayout, hideFooter, hideHomeButton, hideBackButton, hideNextButton, hideNavigation, asModal, canSubmit, onSubmit, problems, currentStep, totalSteps, }: FormWrapperProps) => import("preact").JSX.Element;
@@ -1,4 +1,3 @@
1
- import type { BaseTrackingPayload } from '../../core/analytics';
2
1
  import type { State, TopLevelDataSchema } from '../../core/Context/StateContext/types';
3
2
  import type { AddressSearchRequest, AddressSearchResponse, LoqateAddress } from '../../core/models/api/address-search';
4
3
  import type { CapabilityName } from '../../core/models/api/capability';
@@ -71,7 +70,6 @@ export interface DropinAPIHandlers {
71
70
  }
72
71
  export interface DropinProps {
73
72
  legalEntityResponse?: ExistingLegalEntity;
74
- baseTrackingPayload?: BaseTrackingPayload;
75
73
  homeButtonLabel?: string;
76
74
  handleHomeClick?(): void;
77
75
  handleBackClick?(): void;
@@ -1,4 +1,3 @@
1
- import type { BaseTrackingPayload } from '../../../../../../core/analytics';
2
1
  import type { FormUtils } from '../../../../../../utils/formUtils';
3
2
  import type { IdentityNumberSchema } from '../../../../../IdentityNumber/type';
4
3
  import type { MultiSelectOnChangeProps, SingleSelectOnChangeProps } from '../../../../../internal/FormFields/Select/types';
@@ -19,7 +18,6 @@ interface DriversLicenseProps {
19
18
  isValid: Record<keyof AuDriversLicenseSchema, boolean>;
20
19
  errorMessages: Record<keyof AuDriversLicenseSchema, string | boolean>;
21
20
  shouldValidate?: boolean;
22
- baseTrackingPayload: BaseTrackingPayload;
23
21
  }
24
- export declare const DriversLicense: ({ driversLicense, onIssuerStateChange, onLicenseNumberInput, onLicenseNumberBlur, onCardNumberInput, onCardNumberBlur, formUtils, isValid, errorMessages, shouldValidate, baseTrackingPayload, }: DriversLicenseProps) => import("preact").JSX.Element;
22
+ export declare const DriversLicense: ({ driversLicense, onIssuerStateChange, onLicenseNumberInput, onLicenseNumberBlur, onCardNumberInput, onCardNumberBlur, formUtils, isValid, errorMessages, shouldValidate, }: DriversLicenseProps) => import("preact").JSX.Element;
25
23
  export {};
@@ -1,4 +1,3 @@
1
- import type { BaseTrackingPayload } from '../../../../../../core/analytics';
2
1
  import type { FormUtils } from '../../../../../../utils/formUtils';
3
2
  import type { IdentityNumberSchema } from '../../../../../IdentityNumber/type';
4
3
  import type { AdditionalIdentityInfoSchema } from '../../types';
@@ -16,7 +15,6 @@ interface DriversLicenseProps {
16
15
  isValid: Record<keyof NZDriversLicenseSchema, boolean>;
17
16
  errorMessages: Record<keyof NZDriversLicenseSchema, string | boolean>;
18
17
  shouldValidate?: boolean;
19
- baseTrackingPayload: BaseTrackingPayload;
20
18
  }
21
- export declare const DriversLicense: ({ driversLicense, onLicenseNumberInput, onLicenseNumberBlur, onCardNumberInput, onCardNumberBlur, formUtils, isValid, errorMessages, shouldValidate, baseTrackingPayload, }: DriversLicenseProps) => import("preact").JSX.Element;
19
+ export declare const DriversLicense: ({ driversLicense, onLicenseNumberInput, onLicenseNumberBlur, onCardNumberInput, onCardNumberBlur, formUtils, isValid, errorMessages, shouldValidate, }: DriversLicenseProps) => import("preact").JSX.Element;
22
20
  export {};
@@ -1,4 +1,3 @@
1
- import type { BaseTrackingPayload } from '../../core/analytics';
2
1
  import type { BaseOuterFormProps } from '../../core/hooks/useForm/types';
3
2
  import type { CountryCode } from '../../core/models/country-code';
4
3
  import type { FormModel } from '../../core/models/form';
@@ -16,7 +15,6 @@ export interface RegistrationAddressProps extends BaseOuterFormProps<Registratio
16
15
  country?: CountryCode;
17
16
  handleAddressSearch?: DropinAPIHandlers['handleAddressSearch'];
18
17
  handleFindAddress?: DropinAPIHandlers['handleFindAddress'];
19
- baseTrackingPayload: BaseTrackingPayload;
20
18
  }
21
19
  export declare enum operationalAddressIsSameIds {
22
20
  OPERATIONAL_ADDRESS_IS_SAME = "OperationAddressAnswerYes",
@@ -1,2 +1,2 @@
1
- import type { GuidanceProps } from './types';
2
- export declare function ContextGuidance({ page, title, content, titleId, contentId, baseTrackingPayload, }: GuidanceProps): import("preact").JSX.Element;
1
+ import type { ContextGuidanceProps } from './types';
2
+ export declare function ContextGuidance({ title, content, titleId, contentId, trackingParams, }: ContextGuidanceProps): import("preact").JSX.Element;
@@ -1,12 +1,11 @@
1
1
  import type { ComponentChildren } from 'preact';
2
- import type { BaseTrackingPayload } from '../../../core/analytics';
3
- export interface GuidanceProps {
4
- baseTrackingPayload: BaseTrackingPayload;
5
- page: string;
2
+ import type { AdditionalEventProperties } from '../../../core/user-events';
3
+ export interface ContextGuidanceProps {
6
4
  title: string;
7
5
  content: ComponentChildren;
8
6
  titleId: string;
9
7
  contentId: string;
8
+ trackingParams?: Partial<AdditionalEventProperties>;
10
9
  onOpen?: () => void;
11
10
  onClose?: () => void;
12
11
  }
@@ -1,19 +1,16 @@
1
1
  import type { SetOptional } from 'type-fest';
2
- import type { TaskTypes } from '../components/TaskList/types';
3
2
  import type { LegalEntity } from './models/api/legal-entity';
4
3
  import type { AdditionalEventProperties } from './user-events';
5
- type BaseTrackingPayloadParams = {
6
- task?: TaskTypes;
4
+ type GetAssociatedLeAnalyticsParams = {
7
5
  associatedLegalEntity?: LegalEntity;
8
6
  associatedLegalEntityOrg?: LegalEntity;
9
7
  };
10
- export type BaseTrackingPayload = {
11
- task?: TaskTypes;
8
+ export type AssociatedLeAnalyticsParams = {
12
9
  associatedLegalEntityId?: string;
13
10
  associatedLegalEntityType?: string;
14
11
  associatedLegalEntityOrgId?: string;
15
12
  associatedLegalEntityOrgType?: string;
16
13
  };
17
- export declare const getAssociatedLeAnalyticsPayload: ({ task, associatedLegalEntity, associatedLegalEntityOrg, }: BaseTrackingPayloadParams) => BaseTrackingPayload;
14
+ export declare const getAssociatedLeAnalyticsPayload: ({ associatedLegalEntity, associatedLegalEntityOrg, }: GetAssociatedLeAnalyticsParams) => AssociatedLeAnalyticsParams;
18
15
  export declare const debouncedInputEvent: import("lodash").DebouncedFunc<(properties: SetOptional<AdditionalEventProperties, "actionLevel">) => void>;
19
16
  export {};
@@ -1,8 +1,8 @@
1
1
  import type { Dispatch, StateUpdater } from 'preact/hooks';
2
2
  import type { TranslationKey } from '../../language/types';
3
- import type { BaseTrackingPayload } from '../analytics';
4
3
  import type { EntityProblems } from '../models/errors/entity-problems';
5
4
  import type { FormModelWithValidity } from '../models/form';
5
+ import type { AdditionalEventProperties } from '../user-events';
6
6
  export interface FormComposer {
7
7
  handleNextClick(): void;
8
8
  handleBackClick?(): void;
@@ -16,9 +16,9 @@ export interface FormComposer {
16
16
  currentStep?: number;
17
17
  totalSteps: number;
18
18
  }
19
- export declare const useFormComposer: ({ problems, baseTrackingPayload, forms, formRef, submitButtonLabel, externalBackClick, onSubmit, skipSubmit, onSkipSubmit, }: {
19
+ export declare const useFormComposer: ({ problems, navigationTrackingParams, forms, formRef, submitButtonLabel, externalBackClick, onSubmit, skipSubmit, onSkipSubmit, }: {
20
20
  problems?: EntityProblems;
21
- baseTrackingPayload: BaseTrackingPayload;
21
+ navigationTrackingParams?: Partial<AdditionalEventProperties>;
22
22
  forms: FormModelWithValidity[];
23
23
  formRef?: any;
24
24
  submitButtonLabel?: TranslationKey;
@@ -20,6 +20,7 @@ type BaseEventProperties = {
20
20
  capabilities?: string[];
21
21
  entityType?: LegalEntityType;
22
22
  task?: TaskTypes;
23
+ locale?: string;
23
24
  };
24
25
  /**
25
26
  * Additional event properties
@@ -64,6 +65,10 @@ declare class UserEvents {
64
65
  * Adds an analytics event.
65
66
  */
66
67
  addEvent(eventName: EventName, properties: AdditionalEventProperties): void;
68
+ /**
69
+ * Adds an event with context specific to task-related events
70
+ */
71
+ addTaskEvent(eventName: EventName, properties: SetOptional<AdditionalEventProperties, 'actionLevel'>): void;
67
72
  /**
68
73
  * Adds an event with context specific to page-related events
69
74
  */
@@ -5,6 +5,6 @@ export interface TrackNavigationProps {
5
5
  toForm?: TranslationKey;
6
6
  label: string;
7
7
  returnValue?: 'success' | 'validation error';
8
- baseTrackingPayload?: Partial<AdditionalEventProperties>;
8
+ additionalTrackingParams?: Partial<AdditionalEventProperties>;
9
9
  }
10
- export declare const trackNavigation: ({ actionType, toForm, label, returnValue, baseTrackingPayload, }: TrackNavigationProps) => void;
10
+ export declare const trackNavigation: ({ actionType, toForm, label, returnValue, additionalTrackingParams, }: TrackNavigationProps) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adyen/kyc-components",
3
- "version": "2.62.0",
3
+ "version": "2.63.0",
4
4
  "keywords": [
5
5
  "adyen",
6
6
  "adyen-kyc",