@adyen/adyen-web 5.58.0 → 5.60.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/adyen.js +1 -1
- package/dist/adyen.js.map +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/es/index.js +1 -1
- package/dist/es.modern/index.js +1 -1
- package/dist/types/components/Ach/Ach.d.ts +2 -1
- package/dist/types/components/ApplePay/types.d.ts +1 -8
- package/dist/types/components/BaseElement.d.ts +3 -0
- package/dist/types/components/BcmcMobile/BcmcMobile.d.ts +2 -1
- package/dist/types/components/Card/Bancontact.d.ts +4 -2
- package/dist/types/components/Card/Card.d.ts +23 -9
- package/dist/types/components/Card/components/CardInput/components/CardFieldsWrapper.d.ts +4 -2
- package/dist/types/components/Card/components/CardInput/components/CardHolderName.d.ts +1 -1
- package/dist/types/components/Card/components/CardInput/components/types.d.ts +4 -0
- package/dist/types/components/Card/components/CardInput/types.d.ts +5 -3
- package/dist/types/components/Card/components/CardInput/utils.d.ts +1 -1
- package/dist/types/components/Card/types.d.ts +13 -4
- package/dist/types/components/CashAppPay/CashAppPay.d.ts +2 -1
- package/dist/types/components/ClickToPay/ClickToPay.d.ts +2 -1
- package/dist/types/components/Donation/Donation.d.ts +4 -1
- package/dist/types/components/Donation/components/types.d.ts +2 -2
- package/dist/types/components/Donation/types.d.ts +17 -0
- package/dist/types/components/Dragonpay/Dragonpay.d.ts +2 -1
- package/dist/types/components/Dropin/Dropin.d.ts +2 -1
- package/dist/types/components/DuitNow/DuitNow.d.ts +2 -1
- package/dist/types/components/PayMe/PayMe.d.ts +2 -1
- package/dist/types/components/PayNow/PayNow.d.ts +2 -1
- package/dist/types/components/PayPal/Paypal.d.ts +25 -1
- package/dist/types/components/PayPal/components/PaypalButtons.d.ts +1 -1
- package/dist/types/components/PayPal/types.d.ts +44 -1
- package/dist/types/components/PromptPay/PromptPay.d.ts +2 -1
- package/dist/types/components/Riverty/Riverty.d.ts +2 -1
- package/dist/types/components/SecuredFields/SecuredFields.d.ts +1 -0
- package/dist/types/components/Swish/Swish.d.ts +2 -1
- package/dist/types/components/ThreeDS2/ThreeDS2Challenge.d.ts +6 -1
- package/dist/types/components/ThreeDS2/ThreeDS2DeviceFingerprint.d.ts +12 -7
- package/dist/types/components/ThreeDS2/components/Challenge/DoChallenge3DS2.d.ts +2 -1
- package/dist/types/components/ThreeDS2/components/Challenge/PrepareChallenge3DS2.d.ts +4 -3
- package/dist/types/components/ThreeDS2/components/Challenge/types.d.ts +3 -0
- package/dist/types/components/ThreeDS2/components/DeviceFingerprint/DoFingerprint3DS2.d.ts +2 -1
- package/dist/types/components/ThreeDS2/components/DeviceFingerprint/PrepareFingerprint3DS2.d.ts +7 -4
- package/dist/types/components/ThreeDS2/components/DeviceFingerprint/types.d.ts +6 -1
- package/dist/types/components/ThreeDS2/components/Form/ThreeDS2Form.d.ts +1 -0
- package/dist/types/components/ThreeDS2/components/utils.d.ts +9 -3
- package/dist/types/components/ThreeDS2/config.d.ts +9 -0
- package/dist/types/components/ThreeDS2/types.d.ts +4 -0
- package/dist/types/components/UIElement.d.ts +11 -0
- package/dist/types/components/WeChat/WeChat.d.ts +3 -1
- package/dist/types/components/internal/Address/Address.d.ts +2 -0
- package/dist/types/components/internal/Address/types.d.ts +8 -12
- package/dist/types/components/internal/Address/utils.d.ts +0 -2
- package/dist/types/components/internal/FormFields/Select/Select.d.ts +1 -1
- package/dist/types/components/internal/FormFields/Select/types.d.ts +6 -4
- package/dist/types/components/internal/IssuerList/types.d.ts +2 -0
- package/dist/types/components/internal/QRLoader/types.d.ts +2 -0
- package/dist/types/components/internal/SecuredFields/lib/configuration/constants.d.ts +2 -1
- package/dist/types/components/internal/SecuredFields/utils.d.ts +3 -13
- package/dist/types/components/internal/SocialSecurityNumberBrazil/SocialSecurityNumberBrazil.d.ts +3 -1
- package/dist/types/components/types.d.ts +23 -3
- package/dist/types/core/Analytics/Analytics.d.ts +3 -13
- package/dist/types/core/Analytics/EventsQueue.d.ts +13 -5
- package/dist/types/core/Analytics/analyticsPreProcessor.d.ts +3 -0
- package/dist/types/core/Analytics/constants.d.ts +72 -0
- package/dist/types/core/Analytics/types.d.ts +54 -1
- package/dist/types/core/Analytics/utils.d.ts +21 -0
- package/dist/types/core/Environment/Environment.d.ts +2 -0
- package/dist/types/core/Environment/index.d.ts +1 -1
- package/dist/types/core/Errors/types.d.ts +4 -0
- package/dist/types/core/Errors/utils.d.ts +1 -0
- package/dist/types/core/Services/analytics/collect-id.d.ts +5 -4
- package/dist/types/core/Services/analytics/log-event.d.ts +2 -1
- package/dist/types/core/Services/analytics/types.d.ts +17 -7
- package/dist/types/core/Services/http.d.ts +1 -1
- package/dist/types/core/core.d.ts +1 -0
- package/dist/types/core/types.d.ts +3 -1
- package/dist/types/utils/Formatters/formatters.d.ts +1 -0
- package/dist/types/utils/Storage.d.ts +3 -0
- package/dist/types/utils/base64.d.ts +4 -1
- package/dist/types/utils/debounce.d.ts +2 -0
- package/dist/types/utils/textUtils.d.ts +1 -0
- package/package.json +2 -2
- package/dist/types/core/Services/analytics/post-telemetry.d.ts +0 -13
|
@@ -3,12 +3,14 @@ import { Order, PaymentAction, PaymentAmount, PaymentAmountExtended } from '../t
|
|
|
3
3
|
import Language from '../language/Language';
|
|
4
4
|
import UIElement from './UIElement';
|
|
5
5
|
import Core from '../core';
|
|
6
|
-
import Analytics from '../core/Analytics';
|
|
7
6
|
import RiskElement from '../core/RiskModule';
|
|
8
7
|
import { PayButtonProps } from './internal/PayButton/PayButton';
|
|
9
8
|
import Session from '../core/CheckoutSession';
|
|
10
9
|
import { SRPanel } from '../core/Errors/SRPanel';
|
|
11
10
|
import { Resources } from '../core/Context/Resources';
|
|
11
|
+
import { AnalyticsInitialEvent, AnalyticsObject, CreateAnalyticsEventObject, SendAnalyticsObject } from '../core/Analytics/types';
|
|
12
|
+
import { EventsQueueModule } from '../core/Analytics/EventsQueue';
|
|
13
|
+
import { CbObjOnFocus } from './internal/SecuredFields/lib/types';
|
|
12
14
|
export interface PaymentMethodData {
|
|
13
15
|
paymentMethod: {
|
|
14
16
|
[key: string]: any;
|
|
@@ -56,12 +58,20 @@ export interface PaymentResponse {
|
|
|
56
58
|
export interface RawPaymentResponse extends PaymentResponse {
|
|
57
59
|
[key: string]: any;
|
|
58
60
|
}
|
|
61
|
+
export interface AnalyticsModule {
|
|
62
|
+
setUp: (a: AnalyticsInitialEvent) => Promise<any>;
|
|
63
|
+
getCheckoutAttemptId: () => string;
|
|
64
|
+
getEventsQueue: () => EventsQueueModule;
|
|
65
|
+
createAnalyticsEvent: (a: CreateAnalyticsEventObject) => AnalyticsObject;
|
|
66
|
+
getEnabled: () => boolean;
|
|
67
|
+
sendAnalytics: (component: string, analyticsObj: SendAnalyticsObject) => void;
|
|
68
|
+
}
|
|
59
69
|
export interface BaseElementProps {
|
|
60
70
|
_parentInstance?: Core;
|
|
61
71
|
order?: Order;
|
|
62
72
|
modules?: {
|
|
63
73
|
srPanel?: SRPanel;
|
|
64
|
-
analytics?:
|
|
74
|
+
analytics?: AnalyticsModule;
|
|
65
75
|
resources?: Resources;
|
|
66
76
|
risk?: RiskElement;
|
|
67
77
|
};
|
|
@@ -84,7 +94,7 @@ export interface IUIElement {
|
|
|
84
94
|
setState(newState: object): void;
|
|
85
95
|
}
|
|
86
96
|
export type UIElementStatus = 'ready' | 'loading' | 'error' | 'success';
|
|
87
|
-
export type ActionDescriptionType = 'qr-code-loaded' | 'polling-started' |
|
|
97
|
+
export type ActionDescriptionType = 'qr-code-loaded' | 'polling-started' | string;
|
|
88
98
|
export type PayButtonFunctionProps = Omit<PayButtonProps, 'amount'>;
|
|
89
99
|
export interface ActionHandledReturnObject {
|
|
90
100
|
componentType: string;
|
|
@@ -109,6 +119,7 @@ export interface UIElementProps extends BaseElementProps {
|
|
|
109
119
|
icon?: string;
|
|
110
120
|
amount?: PaymentAmount;
|
|
111
121
|
secondaryAmount?: PaymentAmountExtended;
|
|
122
|
+
brand?: string;
|
|
112
123
|
/**
|
|
113
124
|
* Show/Hide pay button
|
|
114
125
|
* @defaultValue true
|
|
@@ -142,3 +153,12 @@ export interface ComponentMethodsRef {
|
|
|
142
153
|
showValidation?: () => void;
|
|
143
154
|
setStatus?(status: UIElementStatus): void;
|
|
144
155
|
}
|
|
156
|
+
export type DecodeObject = {
|
|
157
|
+
success: boolean;
|
|
158
|
+
error?: string;
|
|
159
|
+
data?: string;
|
|
160
|
+
};
|
|
161
|
+
export type ComponentFocusObject = {
|
|
162
|
+
fieldType: string;
|
|
163
|
+
event: Event | CbObjOnFocus;
|
|
164
|
+
};
|
|
@@ -1,14 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
declare
|
|
4
|
-
private static defaultProps;
|
|
5
|
-
checkoutAttemptId: string;
|
|
6
|
-
props: any;
|
|
7
|
-
private readonly logEvent;
|
|
8
|
-
private readonly logTelemetry;
|
|
9
|
-
private readonly queue;
|
|
10
|
-
readonly collectId: any;
|
|
11
|
-
constructor({ loadingContext, locale, clientKey, analytics, amount }: AnalyticsProps);
|
|
12
|
-
send(event: any): void;
|
|
13
|
-
}
|
|
1
|
+
import { AnalyticsProps } from './types';
|
|
2
|
+
import { AnalyticsModule } from '../../components/types';
|
|
3
|
+
declare const Analytics: ({ loadingContext, locale, clientKey, analytics, amount, analyticsContext }: AnalyticsProps) => AnalyticsModule;
|
|
14
4
|
export default Analytics;
|
|
@@ -1,7 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { AnalyticsObject, EventQueueProps } from './types';
|
|
2
|
+
interface CAActions {
|
|
3
|
+
channel: 'Web';
|
|
4
|
+
platform: 'Web';
|
|
5
|
+
info: AnalyticsObject[];
|
|
6
|
+
errors: AnalyticsObject[];
|
|
7
|
+
logs: AnalyticsObject[];
|
|
6
8
|
}
|
|
9
|
+
export interface EventsQueueModule {
|
|
10
|
+
add: (t: string, o: AnalyticsObject) => void;
|
|
11
|
+
run: (id: string) => Promise<any>;
|
|
12
|
+
getQueue: () => CAActions;
|
|
13
|
+
}
|
|
14
|
+
declare const EventsQueue: ({ analyticsContext, clientKey, analyticsPath }: EventQueueProps) => EventsQueueModule;
|
|
7
15
|
export default EventsQueue;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
export declare const ANALYTICS_PATH = "v3/analytics";
|
|
2
|
+
export declare const ANALYTICS_INFO_TIMER_INTERVAL: number;
|
|
3
|
+
export declare const ANALYTICS_SEARCH_DEBOUNCE_TIME = 3000;
|
|
4
|
+
export declare const ANALYTICS_EVENT_LOG = "log";
|
|
5
|
+
export declare const ANALYTICS_EVENT_ERROR = "error";
|
|
6
|
+
export declare const ANALYTICS_EVENT_INFO = "info";
|
|
7
|
+
export declare const ANALYTICS_ACTION_STR = "action";
|
|
8
|
+
export declare const ANALYTICS_SUBMIT_STR = "submit";
|
|
9
|
+
export declare const ANALYTICS_SELECTED_STR = "selected";
|
|
10
|
+
export declare const ANALYTICS_RENDERED_STR = "rendered";
|
|
11
|
+
export declare const ANALYTICS_DISPLAYED_STR = "displayed";
|
|
12
|
+
export declare const ANALYTICS_INPUT_STR = "input";
|
|
13
|
+
export declare const ANALYTICS_DOWNLOAD_STR = "download";
|
|
14
|
+
export declare const ANALYTICS_VALIDATION_ERROR_STR = "validationError";
|
|
15
|
+
export declare const ANALYTICS_FOCUS_STR = "focus";
|
|
16
|
+
export declare const ANALYTICS_UNFOCUS_STR = "unfocus";
|
|
17
|
+
export declare const ANALYTICS_CONFIGURED_STR = "configured";
|
|
18
|
+
export declare const ANALYTICS_QR_CODE_DOWNLOAD = "qr_download_button";
|
|
19
|
+
export declare const ANALYTICS_INSTANT_PAYMENT_BUTTON = "instant_payment_button";
|
|
20
|
+
export declare const ANALYTICS_FEATURED_ISSUER = "featured_issuer";
|
|
21
|
+
export declare const ANALYTICS_LIST = "list";
|
|
22
|
+
export declare const ANALYTICS_LIST_SEARCH = "list_search";
|
|
23
|
+
export declare const ANALYTICS_IMPLEMENTATION_ERROR = "ImplementationError";
|
|
24
|
+
export declare const ANALYTICS_API_ERROR = "ApiError";
|
|
25
|
+
export declare const ANALYTICS_SDK_ERROR = "SdkError";
|
|
26
|
+
export declare const ANALYTICS_NETWORK_ERROR = "Network";
|
|
27
|
+
export declare const ANALYTICS_INTERNAL_ERROR = "Internal";
|
|
28
|
+
export declare const ANALYTICS_ERROR_CODE_ACTION_IS_MISSING_PAYMENT_DATA = "web_700";
|
|
29
|
+
export declare const ANALYTICS_ERROR_CODE_ACTION_IS_MISSING_TOKEN = "web_701";
|
|
30
|
+
export declare const ANALYTICS_ERROR_CODE_TOKEN_IS_MISSING_THREEDSMETHODURL = "web_702";
|
|
31
|
+
/**
|
|
32
|
+
* Decoded token is missing one or more of the following properties:
|
|
33
|
+
* fingerprint: (threeDSMethodNotificationURL | postMessageDomain | threeDSServerTransID)
|
|
34
|
+
* challenge: (acsTransID | messageVersion | threeDSServerTransID)
|
|
35
|
+
*/
|
|
36
|
+
export declare const ANALYTICS_ERROR_CODE_TOKEN_IS_MISSING_OTHER_PROPS = "web_703";
|
|
37
|
+
export declare const ANALYTICS_ERROR_CODE_TOKEN_DECODE_OR_PARSING_FAILED = "web_704";
|
|
38
|
+
export declare const ANALYTICS_ERROR_CODE_3DS2_TIMEOUT = "web_705";
|
|
39
|
+
export declare const ANALYTICS_ERROR_CODE_TOKEN_IS_MISSING_ACSURL = "web_800";
|
|
40
|
+
export declare const ANALYTICS_ERROR_CODE_NO_TRANSSTATUS = "web_801";
|
|
41
|
+
export declare const errorCodeMapping: {
|
|
42
|
+
"error.va.sf-cc-num.02": string;
|
|
43
|
+
"error.va.sf-cc-num.04": string;
|
|
44
|
+
"error.va.sf-cc-num.01": string;
|
|
45
|
+
"error.va.sf-cc-num.03": string;
|
|
46
|
+
"error.va.sf-cc-dat.04": string;
|
|
47
|
+
"error.va.sf-cc-dat.05": string;
|
|
48
|
+
"error.va.sf-cc-dat.01": string;
|
|
49
|
+
"error.va.sf-cc-dat.02": string;
|
|
50
|
+
"error.va.sf-cc-dat.03": string;
|
|
51
|
+
"error.va.sf-cc-mth.01": string;
|
|
52
|
+
"error.va.sf-cc-yr.01": string;
|
|
53
|
+
"error.va.sf-cc-yr.02": string;
|
|
54
|
+
"error.va.sf-cc-cvc.01": string;
|
|
55
|
+
"error.va.sf-cc-cvc.02": string;
|
|
56
|
+
"creditCard.holderName.invalid": string;
|
|
57
|
+
"boleto.socialSecurityNumber.invalid": string;
|
|
58
|
+
"error.va.gen.01.country": string;
|
|
59
|
+
"error.va.gen.01.street": string;
|
|
60
|
+
"error.va.gen.01.house_number_or_name": string;
|
|
61
|
+
"error.va.gen.01.postal_code": string;
|
|
62
|
+
"invalidFormatExpects.postal_code": string;
|
|
63
|
+
"error.va.gen.01.city": string;
|
|
64
|
+
"error.va.gen.01.state_or_province": string;
|
|
65
|
+
"error.va.sf-kcp-pwd.01": string;
|
|
66
|
+
"error.va.sf-kcp-pwd.02": string;
|
|
67
|
+
"creditCard.taxNumber.invalid": string;
|
|
68
|
+
"error.va.sf-ach-num.01": string;
|
|
69
|
+
"error.va.sf-ach-num.02": string;
|
|
70
|
+
"error.va.sf-ach-loc.01": string;
|
|
71
|
+
"error.va.sf-ach-loc.02": string;
|
|
72
|
+
};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { PaymentAmount } from '../../types';
|
|
2
|
+
import { CoreOptions } from '../types';
|
|
1
3
|
export interface Experiment {
|
|
2
4
|
controlGroup: boolean;
|
|
3
5
|
experimentId: string;
|
|
@@ -21,7 +23,58 @@ export interface AnalyticsOptions {
|
|
|
21
23
|
*/
|
|
22
24
|
payload?: any;
|
|
23
25
|
/**
|
|
24
|
-
* List of experiments to be sent in the collectId call
|
|
26
|
+
* List of experiments to be sent in the collectId call // TODO - still used?
|
|
25
27
|
*/
|
|
26
28
|
experiments?: Experiment[];
|
|
27
29
|
}
|
|
30
|
+
export type AnalyticsProps = Pick<CoreOptions, 'loadingContext' | 'locale' | 'clientKey' | 'analytics' | 'amount'> & {
|
|
31
|
+
analyticsContext?: string;
|
|
32
|
+
};
|
|
33
|
+
export interface AnalyticsObject {
|
|
34
|
+
timestamp: string;
|
|
35
|
+
component: string;
|
|
36
|
+
id: string;
|
|
37
|
+
code?: string;
|
|
38
|
+
errorType?: string;
|
|
39
|
+
message?: string;
|
|
40
|
+
type?: string;
|
|
41
|
+
subtype?: string;
|
|
42
|
+
target?: string;
|
|
43
|
+
metadata?: Record<string, any>;
|
|
44
|
+
isStoredPaymentMethod?: boolean;
|
|
45
|
+
brand?: string;
|
|
46
|
+
validationErrorCode?: string;
|
|
47
|
+
validationErrorMessage?: string;
|
|
48
|
+
issuer?: string;
|
|
49
|
+
}
|
|
50
|
+
export type ANALYTICS_EVENT = 'log' | 'error' | 'info';
|
|
51
|
+
export type CreateAnalyticsObject = Omit<AnalyticsObject, 'timestamp' | 'id'> & {
|
|
52
|
+
event: ANALYTICS_EVENT;
|
|
53
|
+
};
|
|
54
|
+
export type AnalyticsInitialEvent = {
|
|
55
|
+
containerWidth: number;
|
|
56
|
+
component: string;
|
|
57
|
+
flavor: string;
|
|
58
|
+
paymentMethods?: any[];
|
|
59
|
+
sessionId?: string;
|
|
60
|
+
};
|
|
61
|
+
export type AnalyticsConfig = {
|
|
62
|
+
analyticsContext?: string;
|
|
63
|
+
clientKey?: string;
|
|
64
|
+
locale?: string;
|
|
65
|
+
amount?: PaymentAmount;
|
|
66
|
+
loadingContext?: string;
|
|
67
|
+
};
|
|
68
|
+
export type CreateAnalyticsEventData = Omit<AnalyticsObject, 'timestamp' | 'id'>;
|
|
69
|
+
export type CreateAnalyticsEventObject = {
|
|
70
|
+
event: ANALYTICS_EVENT;
|
|
71
|
+
data: CreateAnalyticsEventData;
|
|
72
|
+
};
|
|
73
|
+
export type EventQueueProps = Pick<AnalyticsConfig, 'analyticsContext' | 'clientKey'> & {
|
|
74
|
+
analyticsPath: string;
|
|
75
|
+
};
|
|
76
|
+
export type SendAnalyticsObject = Omit<AnalyticsObject, 'timestamp' | 'component' | 'id'>;
|
|
77
|
+
export type FieldErrorAnalyticsObject = {
|
|
78
|
+
fieldType: string;
|
|
79
|
+
errorCode: string;
|
|
80
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { AnalyticsObject, CreateAnalyticsObject } from './types';
|
|
2
|
+
export declare const getUTCTimestamp: () => number;
|
|
3
|
+
/**
|
|
4
|
+
* All objects for the /checkoutanalytics endpoint have base props:
|
|
5
|
+
* "timestamp" & "component"
|
|
6
|
+
*
|
|
7
|
+
* Error objects have, in addition to the base props:
|
|
8
|
+
* "code", "errorType" & "message"
|
|
9
|
+
*
|
|
10
|
+
* Log objects have, in addition to the base props:
|
|
11
|
+
* "message" & "type" &
|
|
12
|
+
* "subtype" (e.g. when an action is handled)
|
|
13
|
+
*
|
|
14
|
+
* Info objects have, in addition to the base props:
|
|
15
|
+
* "type" & "target" &
|
|
16
|
+
* "isStoredPaymentMethod" & "brand" (when a storedCard is "selected"), or,
|
|
17
|
+
* "validationErrorCode" & "validationErrorMessage" (when the event is describing a validation error)
|
|
18
|
+
*
|
|
19
|
+
* All objects can also have a "metadata" object of key-value pairs
|
|
20
|
+
*/
|
|
21
|
+
export declare const createAnalyticsObject: (aObj: CreateAnalyticsObject) => AnalyticsObject;
|
|
@@ -2,3 +2,5 @@ export declare const FALLBACK_CONTEXT = "https://checkoutshopper-live.adyen.com/
|
|
|
2
2
|
export declare const resolveEnvironment: (env?: string, environmentUrl?: string) => string;
|
|
3
3
|
export declare const FALLBACK_CDN_CONTEXT = "https://checkoutshopper-live.adyen.com/checkoutshopper/";
|
|
4
4
|
export declare const resolveCDNEnvironment: (env?: string, environmentUrl?: string) => any;
|
|
5
|
+
export declare const FALLBACK_ANALYTICS_CONTEXT = "https://checkoutanalytics-live.adyen.com/checkoutanalytics/";
|
|
6
|
+
export declare const resolveAnalyticsEnvironment: (env?: string) => any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { resolveCDNEnvironment, resolveEnvironment } from './Environment';
|
|
1
|
+
export { resolveCDNEnvironment, resolveEnvironment, resolveAnalyticsEnvironment } from './Environment';
|
|
@@ -14,6 +14,7 @@ export declare const addAriaErrorTranslationsObject: (i18n: any) => {};
|
|
|
14
14
|
* @returns a duplicate of the original object with a new property: "error" whose value is a object containing the translated errors
|
|
15
15
|
*/
|
|
16
16
|
export declare const addErrorTranslationsToObject: (originalObj: any, i18n: any) => any;
|
|
17
|
+
export declare const getErrorMessageFromCode: (errorCode: string, codeMap: Record<string, string>) => string;
|
|
17
18
|
/**
|
|
18
19
|
* sortErrorsByLayout - takes a list of errors and a layout, and returns a sorted array of error objects with translated error messages
|
|
19
20
|
*
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { CollectIdProps } from './types';
|
|
2
|
+
export declare const FAILURE_MSG = "WARNING: Failed to retrieve \"checkoutAttemptId\". Consequently, analytics will not be available for this payment. The payment process, however, will not be affected.";
|
|
2
3
|
/**
|
|
3
|
-
*
|
|
4
|
-
* @param config -
|
|
5
|
-
* @returns a function returning a promise containing the response of the call
|
|
4
|
+
* Send an event to Adyen with some basic telemetry info and receive a checkoutAttemptId in response
|
|
5
|
+
* @param config - object containing values needed to calculate the url for the request; and also some that need to be serialized and included in the body of request
|
|
6
|
+
* @returns a function returning a promise containing the response of the call (an object containing a checkoutAttemptId property)
|
|
6
7
|
*/
|
|
7
|
-
declare const collectId: ({
|
|
8
|
+
declare const collectId: ({ analyticsContext, clientKey, locale, analyticsPath }: CollectIdProps) => (event: any) => Promise<string>;
|
|
8
9
|
export default collectId;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { LogEventProps } from './types';
|
|
1
2
|
/**
|
|
2
3
|
* Log event to Adyen
|
|
3
4
|
* @param config - ready to be serialized and included in the request
|
|
4
5
|
* @returns A log event function
|
|
5
6
|
*/
|
|
6
|
-
declare const logEvent: (config:
|
|
7
|
+
declare const logEvent: (config: LogEventProps) => (initialEvent: any) => void;
|
|
7
8
|
export default logEvent;
|
|
@@ -1,11 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { AnalyticsConfig } from '../../Analytics/types';
|
|
2
|
+
import { PaymentAmount } from '../../../types';
|
|
3
|
+
export type CheckoutAttemptIdSession = {
|
|
3
4
|
id: string;
|
|
4
5
|
timestamp: number;
|
|
5
6
|
};
|
|
6
|
-
type CollectIdProps = {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
export type CollectIdProps = Pick<AnalyticsConfig, 'clientKey' | 'analyticsContext' | 'locale' | 'amount'> & {
|
|
8
|
+
analyticsPath: string;
|
|
9
|
+
};
|
|
10
|
+
export type LogEventProps = Pick<AnalyticsConfig, 'loadingContext' | 'locale'>;
|
|
11
|
+
export type TelemetryEvent = {
|
|
12
|
+
version: string;
|
|
13
|
+
channel: 'Web';
|
|
14
|
+
locale: string;
|
|
15
|
+
referrer: string;
|
|
16
|
+
screenWidth: number;
|
|
17
|
+
containerWidth: number;
|
|
18
|
+
component: string;
|
|
19
|
+
flavor: string;
|
|
20
|
+
amount?: PaymentAmount;
|
|
10
21
|
};
|
|
11
|
-
export { CheckoutAttemptIdSession, CollectIdProps };
|
|
@@ -126,7 +126,9 @@ type PaymentMethodsConfigurationMap = {
|
|
|
126
126
|
[key in keyof PaymentMethods]?: Partial<PaymentMethodOptions<key>>;
|
|
127
127
|
};
|
|
128
128
|
type PaymentActionTypesMap = {
|
|
129
|
-
[key in PaymentActionsType]?: Partial<UIElementProps
|
|
129
|
+
[key in PaymentActionsType]?: Partial<UIElementProps> & {
|
|
130
|
+
challengeWindowSize?: string;
|
|
131
|
+
};
|
|
130
132
|
};
|
|
131
133
|
/**
|
|
132
134
|
* Type must be loose, otherwise it will take priority over the rest
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import { DecodeObject } from '../components/types';
|
|
2
|
+
export declare const NOT_BASE64_ERROR = "not base64";
|
|
3
|
+
export declare const BASE64_MALFORMED_URI_ERROR = "malformed URI sequence";
|
|
1
4
|
/**
|
|
2
5
|
* @internal
|
|
3
6
|
*/
|
|
4
7
|
declare const base64: {
|
|
5
|
-
decode: (pData:
|
|
8
|
+
decode: (pData: string) => DecodeObject;
|
|
6
9
|
encode: (pData: any) => string;
|
|
7
10
|
isBase64: (pDataStr: any) => boolean;
|
|
8
11
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const camelCaseToSnakeCase: (camelCaseString: any) => any;
|
package/package.json
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"./dist/es/adyen.css": "./dist/es/adyen.css",
|
|
26
26
|
"./package.json": "./package.json"
|
|
27
27
|
},
|
|
28
|
-
"version": "5.
|
|
28
|
+
"version": "5.60.0",
|
|
29
29
|
"license": "MIT",
|
|
30
30
|
"homepage": "https://docs.adyen.com/checkout",
|
|
31
31
|
"repository": "github:Adyen/adyen-web",
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
"dependencies": {
|
|
125
125
|
"@babel/runtime": "^7.15.4",
|
|
126
126
|
"@babel/runtime-corejs3": "^7.20.1",
|
|
127
|
-
"@types/applepayjs": "
|
|
127
|
+
"@types/applepayjs": "14.0.6",
|
|
128
128
|
"@types/googlepay": "^0.7.0",
|
|
129
129
|
"classnames": "^2.3.1",
|
|
130
130
|
"core-js-pure": "^3.25.3",
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { PaymentAmount } from '../../../types';
|
|
2
|
-
type LogTelemetryConfig = {
|
|
3
|
-
loadingContext: string;
|
|
4
|
-
locale: string;
|
|
5
|
-
clientKey: string;
|
|
6
|
-
amount: PaymentAmount;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Log event to Adyen
|
|
10
|
-
* @param config -
|
|
11
|
-
*/
|
|
12
|
-
declare const logTelemetry: (config: LogTelemetryConfig) => (event: any) => Promise<any>;
|
|
13
|
-
export default logTelemetry;
|