@adyen/adyen-web 5.33.0 → 5.34.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 (93) hide show
  1. package/README.md +5 -1
  2. package/dist/adyen.css +5 -5
  3. package/dist/adyen.css.map +1 -1
  4. package/dist/adyen.js +1 -1
  5. package/dist/adyen.js.map +1 -1
  6. package/dist/cjs/adyen.css +5 -5
  7. package/dist/cjs/adyen.css.map +1 -1
  8. package/dist/cjs/index.js +1 -1
  9. package/dist/es/adyen.css +5 -5
  10. package/dist/es/adyen.css.map +1 -1
  11. package/dist/es/index.js +1 -1
  12. package/dist/es.modern/adyen.css +5 -5
  13. package/dist/es.modern/adyen.css.map +1 -1
  14. package/dist/es.modern/index.js +1 -1
  15. package/dist/types/components/Ach/components/AchInput/types.d.ts +1 -1
  16. package/dist/types/components/AmazonPay/types.d.ts +9 -9
  17. package/dist/types/components/ApplePay/types.d.ts +2 -2
  18. package/dist/types/components/Atome/config.d.ts +1 -1
  19. package/dist/types/components/BcmcMobile/BcmcMobile.d.ts +0 -1
  20. package/dist/types/components/Card/Bancontact.d.ts +5 -2
  21. package/dist/types/components/Card/Card.d.ts +6 -7
  22. package/dist/types/components/Card/ClickToPayHolder.d.ts +1 -1
  23. package/dist/types/components/Card/ClickToPayWrapper.d.ts +1 -1
  24. package/dist/types/components/Card/components/CardInput/components/AvailableBrands/AvailableBrands.d.ts +1 -1
  25. package/dist/types/components/Card/components/CardInput/components/types.d.ts +2 -2
  26. package/dist/types/components/Card/components/CardInput/types.d.ts +1 -1
  27. package/dist/types/components/Card/components/ClickToPay/ClickToPayComponent.d.ts +1 -1
  28. package/dist/types/components/Card/components/ClickToPay/components/CtPBrand/CtPBrand.d.ts +1 -1
  29. package/dist/types/components/Card/components/ClickToPay/components/CtPCards/CtPCards.d.ts +1 -1
  30. package/dist/types/components/Card/components/ClickToPay/components/CtPCards/CtPCardsList/CtPCardsList.d.ts +1 -1
  31. package/dist/types/components/Card/components/ClickToPay/components/CtPCards/CtPSingleCard/CtPSingleCard.d.ts +1 -1
  32. package/dist/types/components/Card/components/ClickToPay/components/CtPInfo/CtPInfoModal/CtPInfoModal.d.ts +1 -1
  33. package/dist/types/components/Card/components/ClickToPay/components/CtPLogin/CtPLoginInput.d.ts +11 -7
  34. package/dist/types/components/Card/components/ClickToPay/components/CtPOneTimePassword/CtPOneTimePassword.d.ts +1 -1
  35. package/dist/types/components/Card/components/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPOneTimePasswordInput.d.ts +11 -7
  36. package/dist/types/components/Card/components/ClickToPay/context/ClickToPayContext.d.ts +2 -0
  37. package/dist/types/components/Card/components/ClickToPay/context/ClickToPayProvider.d.ts +4 -2
  38. package/dist/types/components/Card/components/ClickToPay/services/ClickToPayService.d.ts +1 -1
  39. package/dist/types/components/Card/components/ClickToPay/services/sdks/AbstractSrcInitiator.d.ts +3 -4
  40. package/dist/types/components/Card/components/ClickToPay/services/sdks/MastercardSdk.d.ts +2 -3
  41. package/dist/types/components/Card/components/ClickToPay/services/sdks/SrciError.d.ts +2 -2
  42. package/dist/types/components/Card/components/ClickToPay/services/sdks/VisaSdk.d.ts +2 -3
  43. package/dist/types/components/Card/components/ClickToPay/services/sdks/types.d.ts +14 -10
  44. package/dist/types/components/Card/components/ClickToPay/services/types.d.ts +10 -10
  45. package/dist/types/components/Card/types.d.ts +17 -6
  46. package/dist/types/components/Dropin/types.d.ts +1 -1
  47. package/dist/types/components/DuitNow/DuitNow.d.ts +0 -1
  48. package/dist/types/components/Giftcard/components/types.d.ts +2 -2
  49. package/dist/types/components/Klarna/types.d.ts +2 -2
  50. package/dist/types/components/Oxxo/types.d.ts +1 -1
  51. package/dist/types/components/PayNow/PayNow.d.ts +0 -1
  52. package/dist/types/components/PayPal/Paypal.d.ts +1 -1
  53. package/dist/types/components/PayPal/types.d.ts +7 -4
  54. package/dist/types/components/Pix/PixInput/types.d.ts +1 -1
  55. package/dist/types/components/PromptPay/PromptPay.d.ts +0 -1
  56. package/dist/types/components/Swish/Swish.d.ts +0 -1
  57. package/dist/types/components/ThreeDS2/types.d.ts +4 -4
  58. package/dist/types/components/UPI/components/UPIComponent/UPIComponent.d.ts +8 -6
  59. package/dist/types/components/UPI/components/VpaInput/VpaInput.d.ts +11 -7
  60. package/dist/types/components/UPI/types.d.ts +1 -1
  61. package/dist/types/components/WeChat/WeChat.d.ts +0 -1
  62. package/dist/types/components/helpers/QRLoaderContainer.d.ts +0 -1
  63. package/dist/types/components/internal/Address/types.d.ts +3 -3
  64. package/dist/types/components/internal/Await/Await.d.ts +0 -1
  65. package/dist/types/components/internal/Await/types.d.ts +0 -1
  66. package/dist/types/components/internal/Button/types.d.ts +1 -1
  67. package/dist/types/components/internal/IbanInput/utils.d.ts +1 -1
  68. package/dist/types/components/internal/Modal/Modal.d.ts +2 -2
  69. package/dist/types/components/internal/Modal/useModal.d.ts +2 -2
  70. package/dist/types/components/internal/Modal/useTrapFocus.d.ts +1 -1
  71. package/dist/types/components/internal/PersonalDetails/types.d.ts +1 -1
  72. package/dist/types/components/internal/QRLoader/QRLoader.d.ts +1 -1
  73. package/dist/types/components/internal/QRLoader/types.d.ts +1 -2
  74. package/dist/types/components/internal/SecuredFields/lib/CSF/utils/processErrors.d.ts +1 -1
  75. package/dist/types/components/internal/SecuredFields/lib/securedField/AbstractSecuredField.d.ts +1 -1
  76. package/dist/types/components/internal/SecuredFields/lib/types.d.ts +5 -5
  77. package/dist/types/components/types.d.ts +3 -3
  78. package/dist/types/core/Analytics/Analytics.d.ts +2 -1
  79. package/dist/types/core/Analytics/EventsQueue.d.ts +1 -1
  80. package/dist/types/core/RiskModule/RiskModule.d.ts +1 -1
  81. package/dist/types/core/Services/analytics/post-telemetry.d.ts +3 -1
  82. package/dist/types/core/Services/analytics/types.d.ts +2 -2
  83. package/dist/types/core/Services/data-set.d.ts +1 -1
  84. package/dist/types/core/Services/http.d.ts +1 -1
  85. package/dist/types/core/types.d.ts +1 -1
  86. package/dist/types/language/Language.d.ts +3 -3
  87. package/dist/types/language/types.d.ts +2 -2
  88. package/dist/types/language/utils.d.ts +4 -3
  89. package/dist/types/types/index.d.ts +13 -13
  90. package/dist/types/utils/Formatters/types.d.ts +1 -1
  91. package/dist/types/utils/Validator/types.d.ts +9 -9
  92. package/dist/types/utils/useForm/types.d.ts +2 -2
  93. package/package.json +10 -10
@@ -17,7 +17,7 @@ export interface ACHInputDataState {
17
17
  holderName?: string;
18
18
  billingAddress?: object;
19
19
  }
20
- declare type Placeholders = {
20
+ type Placeholders = {
21
21
  holderName?: string;
22
22
  };
23
23
  export interface ACHInputProps {
@@ -7,14 +7,14 @@ declare global {
7
7
  amazon: object;
8
8
  }
9
9
  }
10
- declare type ButtonColor = 'Gold' | 'LightGray' | 'DarkGray';
11
- declare type Placement = 'Home' | 'Product' | 'Cart' | 'Checkout' | 'Other';
12
- declare type ProductType = 'PayOnly' | 'PayAndShip';
13
- declare type ChargePermissionType = 'OneTime' | 'Recurring';
14
- declare type FrequencyUnit = 'Year' | 'Month' | 'Week' | 'Day' | 'Variable';
15
- export declare type Currency = 'EUR' | 'GBP' | 'USD';
16
- export declare type Region = 'EU' | 'UK' | 'US';
17
- export declare type SupportedLocale = typeof SUPPORTED_LOCALES_EU[number] | typeof SUPPORTED_LOCALES_US[number];
10
+ type ButtonColor = 'Gold' | 'LightGray' | 'DarkGray';
11
+ type Placement = 'Home' | 'Product' | 'Cart' | 'Checkout' | 'Other';
12
+ type ProductType = 'PayOnly' | 'PayAndShip';
13
+ type ChargePermissionType = 'OneTime' | 'Recurring';
14
+ type FrequencyUnit = 'Year' | 'Month' | 'Week' | 'Day' | 'Variable';
15
+ export type Currency = 'EUR' | 'GBP' | 'USD';
16
+ export type Region = 'EU' | 'UK' | 'US';
17
+ export type SupportedLocale = typeof SUPPORTED_LOCALES_EU[number] | typeof SUPPORTED_LOCALES_US[number];
18
18
  export interface RecurringMetadata {
19
19
  frequency: {
20
20
  unit: string;
@@ -169,7 +169,7 @@ export interface ChargeAmount {
169
169
  amount: string;
170
170
  currencyCode: Currency;
171
171
  }
172
- export declare type LedgerCurrencies = {
172
+ export type LedgerCurrencies = {
173
173
  [key in Region]: Currency;
174
174
  };
175
175
  export interface PayloadJSON {
@@ -6,8 +6,8 @@ declare global {
6
6
  ApplePaySession: ApplePaySession;
7
7
  }
8
8
  }
9
- declare type Initiative = 'web' | 'messaging';
10
- export declare type ApplePayButtonType = 'plain' | 'buy' | 'donate' | 'check-out' | 'book' | 'subscribe' | 'add-money' | 'contribute' | 'order' | 'reload' | 'rent' | 'support' | 'tip' | 'top-up';
9
+ type Initiative = 'web' | 'messaging';
10
+ export type ApplePayButtonType = 'plain' | 'buy' | 'donate' | 'check-out' | 'book' | 'subscribe' | 'add-money' | 'contribute' | 'order' | 'reload' | 'rent' | 'support' | 'tip' | 'top-up';
11
11
  export interface ApplePayElementProps extends UIElementProps {
12
12
  /**
13
13
  * The Apple Pay version number your website supports.
@@ -10,7 +10,7 @@ export declare const BILLING_ADDRESS_SPECIFICATION: {
10
10
  [x: string]: {
11
11
  hasDataset?: boolean;
12
12
  labels?: import("../internal/Address/types").StringObject;
13
- optionalFields?: ("street" | "houseNumberOrName" | "postalCode" | "city" | "stateOrProvince" | "country")[];
13
+ optionalFields?: ("city" | "postalCode" | "street" | "stateOrProvince" | "country" | "houseNumberOrName")[];
14
14
  placeholders?: import("../internal/Address/types").StringObject;
15
15
  schema?: import("../internal/Address/types").AddressSchema;
16
16
  } | {
@@ -7,7 +7,6 @@ declare class BCMCMobileElement extends QRLoaderContainer {
7
7
  type?: string;
8
8
  brandLogo?: string;
9
9
  buttonLabel: string;
10
- shouldRedirectOnMobile: boolean;
11
10
  qrCodeImage?: string;
12
11
  paymentData?: string;
13
12
  introduction: string;
@@ -7,6 +7,7 @@ declare class BancontactElement extends CardElement {
7
7
  onBinLookup: () => void;
8
8
  showBrandsUnderCardNumber: boolean;
9
9
  SRConfig: {};
10
+ _disableClickToPay: boolean;
10
11
  };
11
12
  /**
12
13
  * Now that the Bancontact (BCMC) Card component can accept a number dual branded with Visa (which requires a CVC) it has to be handled differently
@@ -49,12 +50,14 @@ declare class BancontactElement extends CardElement {
49
50
  installmentOptions: any;
50
51
  enableStoreDetails: boolean;
51
52
  clickToPayConfiguration: {
52
- shopperIdentityValue: any;
53
+ disableOtpAutoFocus: boolean;
54
+ shopperEmail: any;
55
+ telephoneNumber: any;
53
56
  locale: string;
54
- shopperIdentityType?: "email" | "mobilePhone";
55
57
  merchantDisplayName: string;
56
58
  };
57
59
  brand?: string;
60
+ _disableClickToPay?: boolean;
58
61
  brands?: string[];
59
62
  showBrandsUnderCardNumber?: boolean;
60
63
  showBrandIcon?: boolean;
@@ -15,6 +15,7 @@ export declare class CardElement extends UIElement<CardElementProps> {
15
15
  onBinLookup: () => void;
16
16
  showBrandsUnderCardNumber: boolean;
17
17
  SRConfig: {};
18
+ _disableClickToPay: boolean;
18
19
  };
19
20
  setStatus(status: UIElementStatus, props?: any): this;
20
21
  private setClickToPayRef;
@@ -29,11 +30,7 @@ export declare class CardElement extends UIElement<CardElementProps> {
29
30
  visaSrciDpaId?: string;
30
31
  visaSrcInitiatorId?: string;
31
32
  mcSrcClientId?: string;
32
- mcDpaId?: string; /**
33
- * this.props.brand is never set for the generic card only for a 'dedicated' single-branded card e.g. bcmc
34
- * this.state.selectedBrandValue will be set when /binLookup detects a single brand &/or when /binLookup detects a dual-branded card and
35
- * the shopper makes a brand selection
36
- */
33
+ mcDpaId?: string;
37
34
  merchantIdentifier?: string;
38
35
  merchantOrigin?: string;
39
36
  gatewayMerchantId?: string;
@@ -60,12 +57,14 @@ export declare class CardElement extends UIElement<CardElementProps> {
60
57
  * - If email is set explicitly in the configuration, then it can override the one used in the session creation
61
58
  */
62
59
  clickToPayConfiguration: {
63
- shopperIdentityValue: any;
60
+ disableOtpAutoFocus: boolean;
61
+ shopperEmail: any;
62
+ telephoneNumber: any;
64
63
  locale: string;
65
- shopperIdentityType?: "email" | "mobilePhone";
66
64
  merchantDisplayName: string;
67
65
  };
68
66
  brand?: string;
67
+ _disableClickToPay?: boolean;
69
68
  brands?: string[];
70
69
  showBrandsUnderCardNumber?: boolean;
71
70
  showBrandIcon?: boolean;
@@ -1,5 +1,5 @@
1
1
  import { h } from 'preact';
2
- declare type ClickToPayWrapperProps = {
2
+ type ClickToPayWrapperProps = {
3
3
  children(isCardPrimaryInput?: boolean): h.JSX.Element;
4
4
  };
5
5
  declare const ClickToPayHolder: ({ children }: ClickToPayWrapperProps) => h.JSX.Element;
@@ -1,4 +1,4 @@
1
1
  import { ClickToPayProviderProps } from './components/ClickToPay/context/ClickToPayProvider';
2
2
  import { h } from 'preact';
3
- declare const ClickToPayWrapper: ({ amount, clickToPayService, setClickToPayRef, onSetStatus, onSubmit, onError, ...props }: ClickToPayProviderProps) => h.JSX.Element;
3
+ declare const ClickToPayWrapper: ({ amount, configuration, clickToPayService, setClickToPayRef, onSetStatus, onSubmit, onError, ...props }: ClickToPayProviderProps) => h.JSX.Element;
4
4
  export default ClickToPayWrapper;
@@ -1,7 +1,7 @@
1
1
  import { h } from 'preact';
2
2
  import './AvailableBrands.scss';
3
3
  import { BrandConfiguration } from '../../../../types';
4
- declare type AvailableBrands = Array<BrandConfiguration>;
4
+ type AvailableBrands = Array<BrandConfiguration>;
5
5
  interface PaymentMethodBrandsProps {
6
6
  brands: AvailableBrands;
7
7
  activeBrand: string;
@@ -118,8 +118,8 @@ export interface KCPProps {
118
118
  value: string;
119
119
  disabled?: boolean;
120
120
  }
121
- export declare type RtnType_ParamBooleanFn = (tn: any) => boolean;
122
- export declare type RtnType_ParamVoidFn = (e: any) => void;
121
+ export type RtnType_ParamBooleanFn = (tn: any) => boolean;
122
+ export type RtnType_ParamVoidFn = (e: any) => void;
123
123
  export interface StoredCardFieldsProps {
124
124
  brand: string;
125
125
  errors: any;
@@ -36,7 +36,7 @@ export interface CardInputDataState {
36
36
  socialSecurityNumber?: string;
37
37
  taxNumber?: string;
38
38
  }
39
- declare type Placeholders = {
39
+ type Placeholders = {
40
40
  holderName?: string;
41
41
  };
42
42
  /**
@@ -1,5 +1,5 @@
1
1
  import { h } from 'preact';
2
- declare type ClickToPayComponentProps = {
2
+ type ClickToPayComponentProps = {
3
3
  onDisplayCardComponent?(): void;
4
4
  };
5
5
  declare const ClickToPayComponent: ({ onDisplayCardComponent }: ClickToPayComponentProps) => h.JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import { h } from 'preact';
2
2
  import './CtPBrand.scss';
3
- declare type CtPBrandProps = {
3
+ type CtPBrandProps = {
4
4
  classNameModifiers?: string[];
5
5
  };
6
6
  declare const CtPBrand: ({ classNameModifiers }: CtPBrandProps) => h.JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import { h } from 'preact';
2
2
  import './CtPCards.scss';
3
- declare type CtPCardsProps = {
3
+ type CtPCardsProps = {
4
4
  onDisplayCardComponent?(): void;
5
5
  };
6
6
  declare const CtPCards: ({ onDisplayCardComponent }: CtPCardsProps) => h.JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { h } from 'preact';
2
2
  import ShopperCard from '../../../models/ShopperCard';
3
3
  import './CtPCardsList.scss';
4
- declare type CtPCardsListProps = {
4
+ type CtPCardsListProps = {
5
5
  cards: ShopperCard[];
6
6
  cardSelected: ShopperCard;
7
7
  errorMessage?: string;
@@ -1,7 +1,7 @@
1
1
  import { h } from 'preact';
2
2
  import ShopperCard from '../../../models/ShopperCard';
3
3
  import './CtPSingleCard.scss';
4
- declare type CtPSingleCardProps = {
4
+ type CtPSingleCardProps = {
5
5
  card: ShopperCard;
6
6
  errorMessage?: string;
7
7
  };
@@ -1,6 +1,6 @@
1
1
  import { h } from 'preact';
2
2
  import './CtPInfoModal.scss';
3
- declare type CtPInfoModalProps = {
3
+ type CtPInfoModalProps = {
4
4
  isOpen: boolean;
5
5
  onClose(): void;
6
6
  focusAfterClose: HTMLElement;
@@ -1,17 +1,21 @@
1
1
  import { h } from 'preact';
2
+ type OnChangeProps = {
3
+ data: CtPLoginInputDataState;
4
+ valid: any;
5
+ errors: any;
6
+ isValid: boolean;
7
+ };
2
8
  interface CtPLoginInputProps {
3
9
  disabled: boolean;
4
10
  errorMessage?: string;
5
11
  onPressEnter(): void;
6
- onChange({ data: CtPLoginInputDataState, valid, errors, isValid: boolean }: {
7
- data: any;
8
- valid: any;
9
- errors: any;
10
- isValid: any;
11
- }): void;
12
+ onChange({ data, valid, errors, isValid }: OnChangeProps): void;
12
13
  onSetInputHandlers(handlers: CtPLoginInputHandlers): void;
13
14
  }
14
- export declare type CtPLoginInputHandlers = {
15
+ interface CtPLoginInputDataState {
16
+ shopperLogin?: string;
17
+ }
18
+ export type CtPLoginInputHandlers = {
15
19
  validateInput(): void;
16
20
  };
17
21
  declare const CtPLoginInput: (props: CtPLoginInputProps) => h.JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import { h } from 'preact';
2
2
  import './CtPOneTimePassword.scss';
3
- declare type CtPOneTimePasswordProps = {
3
+ type CtPOneTimePasswordProps = {
4
4
  onDisplayCardComponent?(): void;
5
5
  };
6
6
  declare const CtPOneTimePassword: ({ onDisplayCardComponent }: CtPOneTimePasswordProps) => h.JSX.Element;
@@ -1,5 +1,11 @@
1
1
  import { h } from 'preact';
2
2
  import './CtPOneTimePasswordInput.scss';
3
+ type OnChangeProps = {
4
+ data: CtPOneTimePasswordInputDataState;
5
+ valid: any;
6
+ errors: any;
7
+ isValid: boolean;
8
+ };
3
9
  interface CtPOneTimePasswordInputProps {
4
10
  hideResendOtpButton: boolean;
5
11
  disabled: boolean;
@@ -7,15 +13,13 @@ interface CtPOneTimePasswordInputProps {
7
13
  errorMessage?: string;
8
14
  onSetInputHandlers(handlers: CtPOneTimePasswordInputHandlers): void;
9
15
  onPressEnter(): Promise<void>;
10
- onChange({ data: CtPOneTimePasswordInputDataState, valid, errors, isValid: boolean }: {
11
- data: any;
12
- valid: any;
13
- errors: any;
14
- isValid: any;
15
- }): void;
16
+ onChange({ data, valid, errors, isValid }: OnChangeProps): void;
16
17
  onResendCode(): void;
17
18
  }
18
- export declare type CtPOneTimePasswordInputHandlers = {
19
+ interface CtPOneTimePasswordInputDataState {
20
+ otp?: string;
21
+ }
22
+ export type CtPOneTimePasswordInputHandlers = {
19
23
  validateInput(): void;
20
24
  };
21
25
  declare const CtPOneTimePasswordInput: (props: CtPOneTimePasswordInputProps) => h.JSX.Element;
@@ -4,6 +4,7 @@ import { PaymentAmount } from '../../../../../types';
4
4
  import ShopperCard from '../models/ShopperCard';
5
5
  import { UIElementStatus } from '../../../../types';
6
6
  import AdyenCheckoutError from '../../../../../core/Errors/AdyenCheckoutError';
7
+ import { ClickToPayConfiguration } from '../../../types';
7
8
  export interface IClickToPayContext extends Pick<IClickToPayService, 'checkout' | 'startIdentityValidation' | 'finishIdentityValidation' | 'verifyIfShopperIsEnrolled'> {
8
9
  isCtpPrimaryPaymentMethod: boolean;
9
10
  setIsCtpPrimaryPaymentMethod(isPrimary: boolean): void;
@@ -14,6 +15,7 @@ export interface IClickToPayContext extends Pick<IClickToPayService, 'checkout'
14
15
  otpMaskedContact: string;
15
16
  otpNetwork: string;
16
17
  amount: PaymentAmount;
18
+ configuration: ClickToPayConfiguration;
17
19
  status: UIElementStatus;
18
20
  onSubmit(payload: ClickToPayCheckoutPayload): void;
19
21
  onSetStatus(status: UIElementStatus): void;
@@ -3,8 +3,10 @@ import { ClickToPayCheckoutPayload, IClickToPayService } from '../services/types
3
3
  import { PaymentAmount } from '../../../../../types';
4
4
  import { UIElementStatus } from '../../../../types';
5
5
  import AdyenCheckoutError from '../../../../../core/Errors/AdyenCheckoutError';
6
- export declare type ClickToPayProviderProps = {
6
+ import { ClickToPayConfiguration } from '../../../types';
7
+ export type ClickToPayProviderProps = {
7
8
  clickToPayService: IClickToPayService | null;
9
+ configuration: ClickToPayConfiguration;
8
10
  amount: PaymentAmount;
9
11
  children: any;
10
12
  setClickToPayRef(ref: any): void;
@@ -12,5 +14,5 @@ export declare type ClickToPayProviderProps = {
12
14
  onSetStatus(status: UIElementStatus): void;
13
15
  onError(error: AdyenCheckoutError): void;
14
16
  };
15
- declare const ClickToPayProvider: ({ clickToPayService, amount, children, setClickToPayRef, onSubmit, onSetStatus, onError }: ClickToPayProviderProps) => h.JSX.Element;
17
+ declare const ClickToPayProvider: ({ clickToPayService, amount, configuration, children, setClickToPayRef, onSubmit, onSetStatus, onError }: ClickToPayProviderProps) => h.JSX.Element;
16
18
  export default ClickToPayProvider;
@@ -56,7 +56,7 @@ declare class ClickToPayService implements IClickToPayService {
56
56
  * Based on the responses from the Click to Pay Systems, we should do the validation process using the SDK that
57
57
  * that responds faster with 'consumerPresent=true'
58
58
  */
59
- verifyIfShopperIsEnrolled(value: string, type?: 'email' | 'mobilePhone'): Promise<{
59
+ verifyIfShopperIsEnrolled(shopperIdentity: IdentityLookupParams): Promise<{
60
60
  isEnrolled: boolean;
61
61
  }>;
62
62
  private setState;
@@ -1,5 +1,4 @@
1
- import { IdentityLookupParams } from '../types';
2
- import { CustomSdkConfiguration, SrcCheckoutParams, SrciCheckoutResponse, SrciCompleteIdentityValidationResponse, SrciIdentityLookupResponse, SrciInitiateIdentityValidationResponse, SrciIsRecognizedResponse, SrcInitParams, SrcProfile } from './types';
1
+ import { CustomSdkConfiguration, SrcCheckoutParams, SrciCheckoutResponse, SrciCompleteIdentityValidationResponse, SrcIdentityLookupParams, SrciIdentityLookupResponse, SrciInitiateIdentityValidationResponse, SrciIsRecognizedResponse, SrcInitParams, SrcProfile } from './types';
3
2
  import { ClickToPayScheme } from '../../../../types';
4
3
  export interface ISrcInitiator {
5
4
  schemeName: ClickToPayScheme;
@@ -7,7 +6,7 @@ export interface ISrcInitiator {
7
6
  removeSdkScript(): void;
8
7
  init(params: SrcInitParams, srciTransactionId: string): Promise<void>;
9
8
  isRecognized(): Promise<SrciIsRecognizedResponse>;
10
- identityLookup(params: IdentityLookupParams): Promise<SrciIdentityLookupResponse>;
9
+ identityLookup(params: SrcIdentityLookupParams): Promise<SrciIdentityLookupResponse>;
11
10
  initiateIdentityValidation(): Promise<SrciInitiateIdentityValidationResponse>;
12
11
  completeIdentityValidation(validationData: string): Promise<SrciCompleteIdentityValidationResponse>;
13
12
  getSrcProfile(idTokens: string[]): Promise<SrcProfile>;
@@ -66,7 +65,7 @@ export default abstract class AbstractSrcInitiator implements ISrcInitiator {
66
65
  * Obtains the user account associated with the consumer’s identity (an email address or phone
67
66
  * number).
68
67
  */
69
- abstract identityLookup(params: IdentityLookupParams): Promise<SrciIdentityLookupResponse>;
68
+ abstract identityLookup(params: SrcIdentityLookupParams): Promise<SrciIdentityLookupResponse>;
70
69
  /**
71
70
  * This method completes the identity validation by receiving the one-time password (OTP) sent to the
72
71
  * consumer to start validation.
@@ -1,13 +1,12 @@
1
- import { IdentityLookupParams } from '../types';
2
1
  import AbstractSrcInitiator from './AbstractSrcInitiator';
3
- import { CustomSdkConfiguration, SrciCompleteIdentityValidationResponse, SrciIdentityLookupResponse, SrcInitParams } from './types';
2
+ import { CustomSdkConfiguration, SrciCompleteIdentityValidationResponse, SrcIdentityLookupParams, SrciIdentityLookupResponse, SrcInitParams } from './types';
4
3
  declare class MastercardSdk extends AbstractSrcInitiator {
5
4
  readonly schemeName = "mc";
6
5
  constructor(environment: string, customSdkConfig: CustomSdkConfiguration);
7
6
  protected isSdkIsAvailableOnWindow(): boolean;
8
7
  protected assignSdkReference(): void;
9
8
  init(params: SrcInitParams, srciTransactionId: string): Promise<void>;
10
- identityLookup(params: IdentityLookupParams): Promise<SrciIdentityLookupResponse>;
9
+ identityLookup({ identityValue, type }: SrcIdentityLookupParams): Promise<SrciIdentityLookupResponse>;
11
10
  completeIdentityValidation(otp: string): Promise<SrciCompleteIdentityValidationResponse>;
12
11
  }
13
12
  export default MastercardSdk;
@@ -1,9 +1,9 @@
1
1
  import { ClickToPayScheme } from '../../../../types';
2
- declare type MastercardError = {
2
+ type MastercardError = {
3
3
  message: string;
4
4
  reason: string;
5
5
  };
6
- declare type VisaError = {
6
+ type VisaError = {
7
7
  error: {
8
8
  message: string;
9
9
  reason: string;
@@ -1,13 +1,12 @@
1
- import { IdentityLookupParams } from '../types';
2
1
  import AbstractSrcInitiator from './AbstractSrcInitiator';
3
- import { CustomSdkConfiguration, SrciCompleteIdentityValidationResponse, SrciIdentityLookupResponse, SrcInitParams } from './types';
2
+ import { CustomSdkConfiguration, SrciCompleteIdentityValidationResponse, SrcIdentityLookupParams, SrciIdentityLookupResponse, SrcInitParams } from './types';
4
3
  declare class VisaSdk extends AbstractSrcInitiator {
5
4
  readonly schemeName = "visa";
6
5
  constructor(environment: string, customSdkConfig: CustomSdkConfiguration);
7
6
  protected isSdkIsAvailableOnWindow(): boolean;
8
7
  protected assignSdkReference(): void;
9
8
  init(params: SrcInitParams, srciTransactionId: string): Promise<void>;
10
- identityLookup(params: IdentityLookupParams): Promise<SrciIdentityLookupResponse>;
9
+ identityLookup({ identityValue, type }: SrcIdentityLookupParams): Promise<SrciIdentityLookupResponse>;
11
10
  completeIdentityValidation(otp: string): Promise<SrciCompleteIdentityValidationResponse>;
12
11
  }
13
12
  export default VisaSdk;
@@ -1,41 +1,41 @@
1
1
  /**
2
2
  * Type that represent the object which contains the customizable properties of the SDK initialization
3
3
  */
4
- export declare type CustomSdkConfiguration = {
4
+ export type CustomSdkConfiguration = {
5
5
  dpaLocale: string;
6
6
  dpaPresentationName: string;
7
7
  };
8
8
  /**
9
9
  * Types used to define the interface with the SRCi SDK
10
10
  */
11
- export declare type SrciInitiateIdentityValidationResponse = {
11
+ export type SrciInitiateIdentityValidationResponse = {
12
12
  maskedValidationChannel: string;
13
13
  };
14
- export declare type SrciCompleteIdentityValidationResponse = {
14
+ export type SrciCompleteIdentityValidationResponse = {
15
15
  idToken: string;
16
16
  };
17
- export declare type SrciIsRecognizedResponse = {
17
+ export type SrciIsRecognizedResponse = {
18
18
  recognized: boolean;
19
19
  idTokens?: string[];
20
20
  };
21
- export declare type SrciCheckoutResponse = {
21
+ export type SrciCheckoutResponse = {
22
22
  dcfActionCode: string;
23
23
  checkoutResponse: string;
24
24
  checkoutResponseSignature: string;
25
25
  idToken: string;
26
26
  unbindAppInstance: boolean;
27
27
  };
28
- export declare type SrciIdentityLookupResponse = {
28
+ export type SrciIdentityLookupResponse = {
29
29
  consumerPresent: boolean;
30
30
  };
31
- export declare type SrcProfile = {
31
+ export type SrcProfile = {
32
32
  profiles: Array<{
33
33
  maskedCards: SrcCard[];
34
34
  }>;
35
35
  srcCorrelationId: string;
36
36
  };
37
- export declare type DigitalCardStatus = 'ACTIVE' | 'SUSPENDED' | 'EXPIRED' | 'PENDING';
38
- export declare type SrcCard = {
37
+ export type DigitalCardStatus = 'ACTIVE' | 'SUSPENDED' | 'EXPIRED' | 'PENDING';
38
+ export type SrcCard = {
39
39
  srcDigitalCardId: string;
40
40
  panLastFour: string;
41
41
  dateOfCardLastUsed: string;
@@ -49,7 +49,7 @@ export declare type SrcCard = {
49
49
  };
50
50
  tokenId?: string;
51
51
  };
52
- export declare type SrcCheckoutParams = {
52
+ export type SrcCheckoutParams = {
53
53
  srcCorrelationId: string;
54
54
  srcDigitalCardId: string;
55
55
  windowRef?: Window;
@@ -58,3 +58,7 @@ export interface SrcInitParams {
58
58
  srcInitiatorId: string;
59
59
  srciDpaId: string;
60
60
  }
61
+ export interface SrcIdentityLookupParams {
62
+ identityValue: string;
63
+ type: 'email' | 'telephoneNumber';
64
+ }
@@ -10,28 +10,28 @@ export interface IClickToPayService {
10
10
  initialize(): Promise<void>;
11
11
  checkout(card: ShopperCard): Promise<ClickToPayCheckoutPayload>;
12
12
  logout(): Promise<void>;
13
- verifyIfShopperIsEnrolled(value: string, type?: string): Promise<{
13
+ verifyIfShopperIsEnrolled(shopperIdentity: IdentityLookupParams): Promise<{
14
14
  isEnrolled: boolean;
15
15
  }>;
16
16
  subscribeOnStateChange(callback: CallbackStateSubscriber): void;
17
17
  startIdentityValidation(): Promise<void>;
18
18
  finishIdentityValidation(otpCode: string): Promise<void>;
19
19
  }
20
- export declare type IdentityValidationData = {
20
+ export type IdentityValidationData = {
21
21
  maskedShopperContact: string;
22
22
  selectedNetwork: string;
23
23
  };
24
- export declare type CallbackStateSubscriber = (state: CtpState) => void;
24
+ export type CallbackStateSubscriber = (state: CtpState) => void;
25
25
  export interface IdentityLookupParams {
26
- value: string;
27
- type?: 'email' | 'mobilePhone';
26
+ shopperEmail?: string;
27
+ telephoneNumber?: string;
28
28
  }
29
- export declare type MastercardCheckout = {
29
+ export type MastercardCheckout = {
30
30
  srcDigitalCardId: string;
31
31
  srcCorrelationId: string;
32
32
  srcScheme: string;
33
33
  };
34
- export declare type VisaCheckout = {
34
+ export type VisaCheckout = {
35
35
  srcCheckoutPayload?: string;
36
36
  srcTokenReference?: string;
37
37
  srcCorrelationId: string;
@@ -40,9 +40,9 @@ export declare type VisaCheckout = {
40
40
  export interface SrcProfileWithScheme extends SrcProfile {
41
41
  scheme: ClickToPayScheme;
42
42
  }
43
- export declare type CardTypes = {
43
+ export type CardTypes = {
44
44
  availableCards: ShopperCard[];
45
45
  expiredCards: ShopperCard[];
46
46
  };
47
- export declare type SchemesConfiguration = Partial<Record<ClickToPayScheme, SrcInitParams>>;
48
- export declare type ClickToPayCheckoutPayload = VisaCheckout | MastercardCheckout;
47
+ export type SchemesConfiguration = Partial<Record<ClickToPayScheme, SrcInitParams>>;
48
+ export type ClickToPayCheckoutPayload = VisaCheckout | MastercardCheckout;
@@ -84,10 +84,16 @@ export interface CardElementProps extends UIElementProps {
84
84
  onBinLookup?: (event: CbObjOnBinLookup) => void;
85
85
  [key: string]: any;
86
86
  }
87
- export declare type ClickToPayScheme = 'mc' | 'visa';
88
- export declare type ClickToPayConfiguration = {
89
- shopperIdentityValue: string;
90
- shopperIdentityType?: 'email' | 'mobilePhone';
87
+ export type ClickToPayScheme = 'mc' | 'visa';
88
+ export type ClickToPayConfiguration = {
89
+ /**
90
+ * Shopper email used to be recognized with the Network schemes
91
+ */
92
+ shopperEmail?: string;
93
+ /**
94
+ * Shopper telephone number used to be recognized with the Network schemes
95
+ */
96
+ telephoneNumber?: string;
91
97
  /**
92
98
  * Used to display the merchant name in case the DCF appears (ex: first time doing transaction in the device),
93
99
  */
@@ -97,11 +103,16 @@ export declare type ClickToPayConfiguration = {
97
103
  * defined during the creation of the Checkout.
98
104
  * Format: ISO language_country pair (e.g., en_US )
99
105
  *
100
- * @default en_US
106
+ * @defaultValue en_US
101
107
  */
102
108
  locale?: string;
109
+ /**
110
+ * Disable autofocus on the One Time Password input field when it is either displayed or when the OTP is resent
111
+ * @defaultValue false
112
+ */
113
+ disableOtpAutoFocus?: boolean;
103
114
  };
104
- export declare type SocialSecurityMode = 'show' | 'hide' | 'auto';
115
+ export type SocialSecurityMode = 'show' | 'hide' | 'auto';
105
116
  /** If the merchant wishes to set any of these properties in their local config they should do so via a "configuration" object */
106
117
  export interface CardConfiguration {
107
118
  visaSrciDpaId?: string;
@@ -2,7 +2,7 @@ import { PaymentMethod, StoredPaymentMethod, Order, OrderStatus } from '../../ty
2
2
  import UIElement from '../UIElement';
3
3
  import { UIElementProps, UIElementStatus } from '../types';
4
4
  import { PaymentMethodsConfiguration } from '../../core/types';
5
- export declare type InstantPaymentTypes = 'paywithgoogle' | 'googlepay' | 'applepay';
5
+ export type InstantPaymentTypes = 'paywithgoogle' | 'googlepay' | 'applepay';
6
6
  export interface DropinElementProps extends UIElementProps {
7
7
  /**
8
8
  * Configure each payment method displayed on the Drop-in
@@ -7,7 +7,6 @@ declare class DuitNowElement extends QRLoaderContainer {
7
7
  type?: string;
8
8
  brandLogo?: string;
9
9
  buttonLabel?: string;
10
- shouldRedirectOnMobile?: boolean;
11
10
  qrCodeImage?: string;
12
11
  paymentData?: string;
13
12
  introduction: string;
@@ -1,6 +1,6 @@
1
1
  import Language from '../../../language/Language';
2
2
  import { SFPState } from '../../internal/SecuredFields/SFP/types';
3
- export declare type GiftcardFieldsProps = {
3
+ export type GiftcardFieldsProps = {
4
4
  setRootNode: (input: HTMLElement) => void;
5
5
  i18n: Language;
6
6
  pinRequired: boolean;
@@ -9,7 +9,7 @@ export declare type GiftcardFieldsProps = {
9
9
  focusedElement: any;
10
10
  setFocusOn: any;
11
11
  };
12
- export declare type GiftcardFieldProps = {
12
+ export type GiftcardFieldProps = {
13
13
  i18n: Language;
14
14
  classNameModifiers?: Array<string>;
15
15
  sfpState: any;