@paydock/client-sdk 1.116.2 → 1.116.8-beta
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/README.md +245 -35
- package/bundles/index.cjs +1698 -365
- package/bundles/index.cjs.d.ts +2376 -2046
- package/bundles/index.mjs +1694 -362
- package/bundles/index.mjs.d.ts +2376 -2046
- package/bundles/types/api/api-base.d.ts +3 -3
- package/bundles/types/api/api-base.d.ts.map +1 -1
- package/bundles/types/api/api-checkout-internal.d.ts +1 -0
- package/bundles/types/api/api-checkout-internal.d.ts.map +1 -1
- package/bundles/types/checkout/helpers/instruction-module.d.ts +1 -1
- package/bundles/types/checkout/helpers/instruction-module.d.ts.map +1 -1
- package/bundles/types/checkout/helpers/resource-helper.d.ts +4 -3
- package/bundles/types/checkout/helpers/resource-helper.d.ts.map +1 -1
- package/bundles/types/checkout/helpers/session-helper.d.ts +3 -0
- package/bundles/types/checkout/helpers/session-helper.d.ts.map +1 -1
- package/bundles/types/checkout/instructions/v1/instruction.afterpay_checkout_form.show.d.ts.map +1 -1
- package/bundles/types/checkout/instructions/v1/instruction.card_form.show.d.ts.map +1 -1
- package/bundles/types/checkout/instructions/v1/instruction.payment_methods.show.d.ts.map +1 -1
- package/bundles/types/checkout/instructions/v1/instruction.zip_checkout_form.show.d.ts.map +1 -1
- package/bundles/types/checkout/layout-widgets/additionals.d.ts +1 -1
- package/bundles/types/checkout/layout-widgets/additionals.d.ts.map +1 -1
- package/bundles/types/checkout/layout-widgets/payment-methods-template.d.ts.map +1 -1
- package/bundles/types/checkout/layout-widgets/payment-methods.d.ts +1 -0
- package/bundles/types/checkout/layout-widgets/payment-methods.d.ts.map +1 -1
- package/bundles/types/components/iframe-event.d.ts +39 -29
- package/bundles/types/components/iframe-event.d.ts.map +1 -1
- package/bundles/types/components/iframe.d.ts +2 -2
- package/bundles/types/components/iframe.d.ts.map +1 -1
- package/bundles/types/components/param.d.ts +2 -0
- package/bundles/types/components/param.d.ts.map +1 -1
- package/bundles/types/configs/env/environment.cba.d.ts +8 -7
- package/bundles/types/configs/env/environment.cba.d.ts.map +1 -1
- package/bundles/types/configs/env/environment.interface.d.ts +6 -6
- package/bundles/types/configs/env/environment.interface.d.ts.map +1 -1
- package/bundles/types/configs/env/environment.paydock.d.ts +8 -7
- package/bundles/types/configs/env/environment.paydock.d.ts.map +1 -1
- package/bundles/types/fraud-prevention/fraud-prevention.constants.d.ts +9 -0
- package/bundles/types/fraud-prevention/fraud-prevention.constants.d.ts.map +1 -0
- package/bundles/types/fraud-prevention/fraud-prevention.events.d.ts +42 -0
- package/bundles/types/fraud-prevention/fraud-prevention.events.d.ts.map +1 -0
- package/bundles/types/fraud-prevention/fraud-prevention.service.d.ts +163 -0
- package/bundles/types/fraud-prevention/fraud-prevention.service.d.ts.map +1 -0
- package/bundles/types/fraud-prevention/index.d.ts +3 -0
- package/bundles/types/fraud-prevention/index.d.ts.map +1 -0
- package/bundles/types/fraud-prevention/providers/forter/forter-device-agent.service.d.ts +79 -0
- package/bundles/types/fraud-prevention/providers/forter/forter-device-agent.service.d.ts.map +1 -0
- package/bundles/types/fraud-prevention/providers/forter/templates/forter-snippet-2025-02-06t14:19:34z.template.d.ts +2 -0
- package/bundles/types/fraud-prevention/providers/forter/templates/forter-snippet-2025-02-06t14:19:34z.template.d.ts.map +1 -0
- package/bundles/types/fraud-prevention/resources/find-service-config.repository.d.ts +20 -0
- package/bundles/types/fraud-prevention/resources/find-service-config.repository.d.ts.map +1 -0
- package/bundles/types/helper/access-token.d.ts +1 -0
- package/bundles/types/helper/access-token.d.ts.map +1 -1
- package/bundles/types/helper/browser.d.ts.map +1 -1
- package/bundles/types/helper/custom-error.d.ts +8 -0
- package/bundles/types/helper/custom-error.d.ts.map +1 -0
- package/bundles/types/index-cba.d.ts +3 -1
- package/bundles/types/index-cba.d.ts.map +1 -1
- package/bundles/types/index.d.ts +2 -1
- package/bundles/types/index.d.ts.map +1 -1
- package/bundles/types/paypal-data-collector/paypal-data-collector.d.ts +4 -4
- package/bundles/types/paypal-save-payment-source/paypal-save-payment-source.interfaces.d.ts +0 -1
- package/bundles/types/paypal-save-payment-source/paypal-save-payment-source.interfaces.d.ts.map +1 -1
- package/bundles/types/paypal-save-payment-source/paypal-save-payment-source.service.d.ts +0 -1
- package/bundles/types/paypal-save-payment-source/paypal-save-payment-source.service.d.ts.map +1 -1
- package/bundles/types/secure-remote-commerce/click-to-pay-secure-remote-commerce.d.ts +1 -1
- package/bundles/types/secure-remote-commerce/click-to-pay-secure-remote-commerce.d.ts.map +1 -1
- package/bundles/types/secure-remote-commerce/index.d.ts +2 -0
- package/bundles/types/secure-remote-commerce/index.d.ts.map +1 -1
- package/bundles/types/secure-remote-commerce/interfaces.d.ts +1 -0
- package/bundles/types/secure-remote-commerce/interfaces.d.ts.map +1 -1
- package/bundles/types/shared/http/authorization-strategy.d.ts +41 -0
- package/bundles/types/shared/http/authorization-strategy.d.ts.map +1 -0
- package/bundles/types/shared/http/http-fetcher.d.ts +28 -0
- package/bundles/types/shared/http/http-fetcher.d.ts.map +1 -0
- package/bundles/types/shared/http/http-fetcher.factory.d.ts +17 -0
- package/bundles/types/shared/http/http-fetcher.factory.d.ts.map +1 -0
- package/bundles/types/shared/http/http-request.d.ts +1 -1
- package/bundles/types/shared/http/http-request.d.ts.map +1 -1
- package/bundles/types/shared/http/http-response.dto.d.ts +19 -0
- package/bundles/types/shared/http/http-response.dto.d.ts.map +1 -0
- package/bundles/types/shared/services/configuration-validation/configuration-validation.d.ts +12 -0
- package/bundles/types/shared/services/configuration-validation/configuration-validation.d.ts.map +1 -0
- package/bundles/types/shared/services/configuration-validation/types.d.ts +73 -0
- package/bundles/types/shared/services/configuration-validation/types.d.ts.map +1 -0
- package/bundles/types/shared/services/instrumentation/instrumentation.types.d.ts +1 -1
- package/bundles/types/shared/services/instrumentation/instrumentation.types.d.ts.map +1 -1
- package/bundles/types/shared/shared.constants.d.ts +2 -0
- package/bundles/types/shared/shared.constants.d.ts.map +1 -0
- package/bundles/types/wallet-buttons/enums.d.ts +12 -0
- package/bundles/types/wallet-buttons/enums.d.ts.map +1 -0
- package/bundles/types/wallet-buttons/index.d.ts +2 -1
- package/bundles/types/wallet-buttons/index.d.ts.map +1 -1
- package/bundles/types/wallet-buttons/wallet-buttons.d.ts +28 -15
- package/bundles/types/wallet-buttons/wallet-buttons.d.ts.map +1 -1
- package/bundles/types/wallet-buttons-express/base.wallet-button-express.d.ts +10 -10
- package/bundles/types/wallet-buttons-express/base.wallet-button-express.d.ts.map +1 -1
- package/bundles/types/wallet-buttons-express/index.d.ts +1 -0
- package/bundles/types/wallet-buttons-express/index.d.ts.map +1 -1
- package/bundles/types/wallet-buttons-express/services/paypal/interfaces/paypal-wallet-meta.interface.d.ts +1 -0
- package/bundles/types/wallet-buttons-express/services/paypal/interfaces/paypal-wallet-meta.interface.d.ts.map +1 -1
- package/bundles/types/widget/configuration.d.ts +13 -9
- package/bundles/types/widget/configuration.d.ts.map +1 -1
- package/bundles/types/widget/html-multi-widget.d.ts +1 -2
- package/bundles/types/widget/html-multi-widget.d.ts.map +1 -1
- package/bundles/types/widget/html-widget.d.ts +15 -14
- package/bundles/types/widget/html-widget.d.ts.map +1 -1
- package/bundles/types/widget/multi-widget.d.ts +5 -1
- package/bundles/types/widget/multi-widget.d.ts.map +1 -1
- package/bundles/widget.umd.js +1698 -365
- package/bundles/widget.umd.js.d.ts +2376 -2046
- package/bundles/widget.umd.js.min.d.ts +2376 -2046
- package/bundles/widget.umd.min.js +1 -61
- package/docs/api-widget.md +25 -20
- package/docs/click-to-pay.md +1 -0
- package/docs/fraud-prevention-examples.md +154 -0
- package/docs/fraud-prevention.md +0 -0
- package/docs/install/npm.example.md +1 -1
- package/docs/paypal-data-collector-examples.md +6 -5
- package/docs/paypal-data-collector.md +6 -6
- package/docs/wallet-buttons-express.md +1 -0
- package/docs/wallet-buttons.md +1 -0
- package/docs/widget-examples.md +48 -3
- package/examples/multi-html-widget/extend.html +5 -0
- package/package.json +15 -10
- package/slate.md +204 -4
- package/bundles/types/shared/http/index.d.ts +0 -2
- package/bundles/types/shared/http/index.d.ts.map +0 -1
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { type Mode } from './fraud-prevention.constants';
|
|
2
|
+
import type { FraudPreventionProvider } from './fraud-prevention.events';
|
|
3
|
+
import { ForterDeviceAgent } from './providers/forter/forter-device-agent.service';
|
|
4
|
+
type FraudPreventionConfig = {
|
|
5
|
+
mode: Mode;
|
|
6
|
+
environmentAlias?: string;
|
|
7
|
+
environmentId: string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* A class to manage integration fraud prevention integrations.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
*
|
|
14
|
+
* ```js
|
|
15
|
+
* const fps = new FraudPreventionService({
|
|
16
|
+
* environmentId: 'production',
|
|
17
|
+
* mode: 'live',
|
|
18
|
+
* });
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export declare class FraudPreventionService {
|
|
22
|
+
private readonly environment;
|
|
23
|
+
private readonly httpFetcherFactory;
|
|
24
|
+
private readonly mode;
|
|
25
|
+
private authorizationStrategy;
|
|
26
|
+
private forterDeviceAgent;
|
|
27
|
+
/**
|
|
28
|
+
* @constructs
|
|
29
|
+
*
|
|
30
|
+
* @param {Object} config - FraudPreventionService configuration object
|
|
31
|
+
* @param {string} config.mode - Environment mode, must be either 'test' or 'live'
|
|
32
|
+
* @param {string} config.environmentId - Environment identifier
|
|
33
|
+
* @param {string} [config.environmentAlias] - Optional environment alias for API requests
|
|
34
|
+
*/
|
|
35
|
+
constructor(config: FraudPreventionConfig);
|
|
36
|
+
/**
|
|
37
|
+
* Automatically detects and sets the authorization strategy the service should use
|
|
38
|
+
* based on the shape of the provided string.
|
|
39
|
+
*
|
|
40
|
+
* If the value is a JWT token, it will use an access token strategy, otherwise it will use
|
|
41
|
+
* a public key strategy.
|
|
42
|
+
*
|
|
43
|
+
* @param value - The authorization value (either JWT token or public key)
|
|
44
|
+
*
|
|
45
|
+
* @returns The FraudPreventionService instance for method chaining
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```ts
|
|
49
|
+
* // With JWT token
|
|
50
|
+
* fps.withAuthorization('eyJhbGciOiJIUzI1NiIs...');
|
|
51
|
+
*
|
|
52
|
+
* // With public key
|
|
53
|
+
* fps.withAuthorization('pk_example_...');
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
withAuthorization(value: string): FraudPreventionService;
|
|
57
|
+
/**
|
|
58
|
+
* Sets the authorization strategy to use access token authentication.
|
|
59
|
+
*
|
|
60
|
+
* @param accessToken - The JWT access token
|
|
61
|
+
* @returns The FraudPreventionService instance for method chaining
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
*
|
|
65
|
+
* ```ts
|
|
66
|
+
* fps.withAccessTokenStrategy('eyJhbGciOiJIUzI1NiIs...');
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
withAccessTokenStrategy(accessToken: string): FraudPreventionService;
|
|
70
|
+
/**
|
|
71
|
+
* Sets the authorization strategy to use public key authentication.
|
|
72
|
+
*
|
|
73
|
+
* @param publicKey - The public key
|
|
74
|
+
* @returns The FraudPreventionService instance for method chaining
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
*
|
|
78
|
+
* ```ts
|
|
79
|
+
* fps.withPublicKeyStrategy('pk_example_...');
|
|
80
|
+
* ```
|
|
81
|
+
*/
|
|
82
|
+
withPublicKeyStrategy(publicKey: string): FraudPreventionService;
|
|
83
|
+
/**
|
|
84
|
+
* Initializes Forter integration with the provided configuration. This method injects
|
|
85
|
+
* Forter's JavaScript snippet into the page and starts tracking user behavior.
|
|
86
|
+
*
|
|
87
|
+
* @param {Object} config - Configuration object for Forter integration
|
|
88
|
+
* @param {string} [config.siteId] - Your Forter site ID or subsite merchant ID
|
|
89
|
+
* @param {string} [config.providerId] - Your Paydock integrated Forter Service ID.
|
|
90
|
+
* @param {boolean} [config.csp] - Set to true if your site uses Content-Security-Policies
|
|
91
|
+
*
|
|
92
|
+
* @throws If neither siteId nor providerId are provided in the configuration
|
|
93
|
+
* @throws If providerId fails to resolve to a siteId through Paydock integration services
|
|
94
|
+
*
|
|
95
|
+
* @returns Promise with existing FraudPreventionService instance
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
*
|
|
99
|
+
* ```js
|
|
100
|
+
* await fps.withForter({
|
|
101
|
+
* providerId: 'your-paydock-forter-service-id'
|
|
102
|
+
* });
|
|
103
|
+
* ```
|
|
104
|
+
*
|
|
105
|
+
* @example
|
|
106
|
+
*
|
|
107
|
+
* ```js
|
|
108
|
+
* await fps.withForter({
|
|
109
|
+
* siteId: 'your-forter-site-id',
|
|
110
|
+
* });
|
|
111
|
+
* ```
|
|
112
|
+
*/
|
|
113
|
+
withForter(config: {
|
|
114
|
+
csp?: boolean;
|
|
115
|
+
} & ({
|
|
116
|
+
siteId: string;
|
|
117
|
+
providerId?: never;
|
|
118
|
+
} | {
|
|
119
|
+
siteId?: never;
|
|
120
|
+
providerId: string;
|
|
121
|
+
})): Promise<this>;
|
|
122
|
+
/**
|
|
123
|
+
* Returns the initialized Forter device agent instance if available.
|
|
124
|
+
*
|
|
125
|
+
* Make sure to call withForter() before accessing this getter.
|
|
126
|
+
*
|
|
127
|
+
* @returns {ForterDeviceAgent | null} The Forter device agent instance or null if not initialized
|
|
128
|
+
*
|
|
129
|
+
* @example
|
|
130
|
+
*
|
|
131
|
+
* ```js
|
|
132
|
+
* const fps = new FraudPreventionService();
|
|
133
|
+
*
|
|
134
|
+
* fps.withForter({
|
|
135
|
+
* siteId: 'your-site-id',
|
|
136
|
+
* mode: 'test'
|
|
137
|
+
* });
|
|
138
|
+
*
|
|
139
|
+
* const token = fps.forter?.token;
|
|
140
|
+
* ```
|
|
141
|
+
*/
|
|
142
|
+
get forter(): ForterDeviceAgent | null;
|
|
143
|
+
/**
|
|
144
|
+
* Gets the credentials for a specific fraud prevention provider.
|
|
145
|
+
*
|
|
146
|
+
* Returns different credential types based on the selected provider.
|
|
147
|
+
*
|
|
148
|
+
* @param provider - The fraud prevention provider
|
|
149
|
+
* @param providerId - The ID of the provider instance
|
|
150
|
+
*
|
|
151
|
+
* @returns a tuple with shape [providerSpecificCredentials, error]
|
|
152
|
+
*/
|
|
153
|
+
getProviderCredentials<P extends FraudPreventionProvider>(provider: P, providerId: string): Promise<import("../shared/shared.constants").Result<P extends "forter" ? {
|
|
154
|
+
provider: "forter";
|
|
155
|
+
siteId: string;
|
|
156
|
+
subsiteId: string;
|
|
157
|
+
} : never, unknown>>;
|
|
158
|
+
private validateEnvironmentId;
|
|
159
|
+
private validateEnvironmentAlias;
|
|
160
|
+
private validateMode;
|
|
161
|
+
}
|
|
162
|
+
export {};
|
|
163
|
+
//# sourceMappingURL=fraud-prevention.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fraud-prevention.service.d.ts","sourceRoot":"","sources":["../../src/fraud-prevention/fraud-prevention.service.ts"],"names":[],"mappings":"AASA,OAAO,EAAS,KAAK,IAAI,EAA0B,MAAM,8BAA8B,CAAC;AACxF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAC;AAGnF,KAAK,qBAAqB,GAAG;IAC3B,IAAI,EAAE,IAAI,CAAC;IACX,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,qBAAa,sBAAsB;IACjC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAM;IAClC,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAqB;IACxD,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAO;IAE5B,OAAO,CAAC,qBAAqB,CAAkD;IAC/E,OAAO,CAAC,iBAAiB,CAAkC;IAE3D;;;;;;;OAOG;gBACS,MAAM,EAAE,qBAAqB;IAmBzC;;;;;;;;;;;;;;;;;;;OAmBG;IACI,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,sBAAsB;IAQ/D;;;;;;;;;;;OAWG;IACI,uBAAuB,CAAC,WAAW,EAAE,MAAM,GAAG,sBAAsB;IAM3E;;;;;;;;;;;OAWG;IACI,qBAAqB,CAAC,SAAS,EAAE,MAAM,GAAG,sBAAsB;IAMvE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACU,UAAU,CACrB,MAAM,EAAE;QACN,GAAG,CAAC,EAAE,OAAO,CAAC;KACf,GAAG,CACA;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,KAAK,CAAA;KAAE,GACtC;QAAE,MAAM,CAAC,EAAE,KAAK,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CACzC,GACA,OAAO,CAAC,IAAI,CAAC;IA4ChB;;;;;;;;;;;;;;;;;;;OAmBG;IACH,IAAW,MAAM,IAAI,iBAAiB,GAAG,IAAI,CAE5C;IAED;;;;;;;;;OASG;IACU,sBAAsB,CAAC,CAAC,SAAS,uBAAuB,EACnE,QAAQ,EAAE,CAAC,EACX,UAAU,EAAE,MAAM;;;;;IAOpB,OAAO,CAAC,qBAAqB;IAQ7B,OAAO,CAAC,wBAAwB;IAQhC,OAAO,CAAC,YAAY;CAOrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/fraud-prevention/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { type Mode } from '../../fraud-prevention.constants';
|
|
2
|
+
/**
|
|
3
|
+
* Configuration options for the Forter Device Agent
|
|
4
|
+
*
|
|
5
|
+
* @typedef {Object} ForterDeviceAgentConfig
|
|
6
|
+
* @property {string} siteId - Your Forter site ID or subsite merchant ID
|
|
7
|
+
* @property {boolean} csp - Set to true if your site uses Content-Security-Policy
|
|
8
|
+
* @property {'live' | 'test'} mode - Environment mode, must be either 'live' or 'test'
|
|
9
|
+
*/
|
|
10
|
+
export type ForterDeviceAgentConfig = {
|
|
11
|
+
siteId: string;
|
|
12
|
+
csp: boolean;
|
|
13
|
+
mode: Mode;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* A class that manages Forter's device fingerprinting integration.
|
|
17
|
+
* It handles script injection and token management.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
*
|
|
21
|
+
* ```js
|
|
22
|
+
* const agent = new ForterDeviceAgent({
|
|
23
|
+
* siteId: 'your-site-id',
|
|
24
|
+
* csp: false,
|
|
25
|
+
* mode: 'test'
|
|
26
|
+
* }).init();
|
|
27
|
+
*
|
|
28
|
+
* // Later, access the token
|
|
29
|
+
* const token = agent.token;
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export declare class ForterDeviceAgent {
|
|
33
|
+
private readonly config;
|
|
34
|
+
private cookieToken;
|
|
35
|
+
/**
|
|
36
|
+
* Creates a new instance of ForterDeviceAgent
|
|
37
|
+
*
|
|
38
|
+
* @param {ForterDeviceAgentConfig} config - Configuration object for Forter integration
|
|
39
|
+
*/
|
|
40
|
+
constructor(config: ForterDeviceAgentConfig);
|
|
41
|
+
/**
|
|
42
|
+
* Returns the current Forter token if available
|
|
43
|
+
*
|
|
44
|
+
* @returns {string | null} The Forter token or null if not yet available
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
*
|
|
48
|
+
* ```js
|
|
49
|
+
* const token = forterAgent.token;
|
|
50
|
+
* if (token) {
|
|
51
|
+
* // Use the token
|
|
52
|
+
* }
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
get token(): string | null;
|
|
56
|
+
/**
|
|
57
|
+
* Initializes the Forter Device Agent by injecting the required script
|
|
58
|
+
* and setting up event listeners.
|
|
59
|
+
*
|
|
60
|
+
* @returns {ForterDeviceAgent} The current instance for method chaining
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
*
|
|
64
|
+
* ```js
|
|
65
|
+
* const agent = new ForterDeviceAgent(config).init();
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
init(): ForterDeviceAgent;
|
|
69
|
+
private emit;
|
|
70
|
+
private emitFingerprintTokenWrongTypeError;
|
|
71
|
+
private emitFingerprintTokenReady;
|
|
72
|
+
private getScriptContent;
|
|
73
|
+
private injectScript;
|
|
74
|
+
private subscribeSdkEvents;
|
|
75
|
+
private validateCsp;
|
|
76
|
+
private validateMode;
|
|
77
|
+
private validateSiteId;
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=forter-device-agent.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forter-device-agent.service.d.ts","sourceRoot":"","sources":["../../../../src/fraud-prevention/providers/forter/forter-device-agent.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,EAAe,MAAM,kCAAkC,CAAC;AAW1E;;;;;;;GAOG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,OAAO,CAAC;IACb,IAAI,EAAE,IAAI,CAAC;CACZ,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA0B;IAEjD,OAAO,CAAC,WAAW,CAAuB;IAE1C;;;;OAIG;gBACS,MAAM,EAAE,uBAAuB;IAQ3C;;;;;;;;;;;;;OAaG;IACH,IAAW,KAAK,IAAI,MAAM,GAAG,IAAI,CAEhC;IAED;;;;;;;;;;;OAWG;IACI,IAAI,IAAI,iBAAiB;IAOhC,OAAO,CAAC,IAAI;IAQZ,OAAO,CAAC,kCAAkC;IAY1C,OAAO,CAAC,yBAAyB;IAUjC,OAAO,CAAC,gBAAgB;IASxB,OAAO,CAAC,YAAY;IAWpB,OAAO,CAAC,kBAAkB;IAc1B,OAAO,CAAC,WAAW;IAQnB,OAAO,CAAC,YAAY;IAQpB,OAAO,CAAC,cAAc;CAOvB"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const FORTER_SDK_SCRIPT_TEMPLATE = "\n(function () {\n var merchantConfig = {\n csp: %CSP%\n };\n\n var siteId = \"%SITE_ID%\";\n\n function t(t,e){for(var n=t.split(\"\"),r=0;r<n.length;++r)n[r]=String.fromCharCode(n[r].charCodeAt(0)+e);return n.join(\"\")}function e(e){return t(e,-_).replace(/%SN%/g,siteId)}function n(t){try{if(\"number\"==typeof t&&window.location&&window.location.pathname){for(var e=window.location.pathname.split(\"/\"),n=[],r=0;r<=Math.min(e.length-1,Math.abs(t));r++)n.push(e[r]);return n.join(\"/\")||\"/\"}}catch(t){}return\"/\"}function r(t){try{Q.ex=t,o()&&-1===Q.ex.indexOf(X.uB)&&(Q.ex+=X.uB),i()&&-1===Q.ex.indexOf(X.uBr)&&(Q.ex+=X.uBr),a()&&-1===Q.ex.indexOf(X.nIL)&&(Q.ex+=X.nIL),window.ftr__snp_cwc||(Q.ex+=X.s),B(Q)}catch(t){}}function o(){var t=\"no\"+\"op\"+\"fn\",e=\"g\"+\"a\",n=\"n\"+\"ame\";return window[e]&&window[e][n]===t}function i(){return!(!navigator.brave||\"function\"!=typeof navigator.brave.isBrave)}function a(){return document.currentScript&&document.currentScript.src}function c(t,e){function n(o){try{o.blockedURI===t&&(e(),document.removeEventListener(r,n))}catch(t){document.removeEventListener(r,n)}}var r=\"securitypolicyviolation\";document.addEventListener(r,n),setTimeout(function(){document.removeEventListener(r,n)},2*60*1e3)}function u(t,e,n,r){var o=!1;t=\"https://\"+t,c(t,function(){r(!0),o=!0});var i=document.createElement(\"script\");i.onerror=function(){if(!o)try{r(!1),o=!0}catch(t){}},i.onload=n,i.type=\"text/javascript\",i.id=\"ftr__script\",i.async=!0,i.src=t;var a=document.getElementsByTagName(\"script\")[0];a.parentNode.insertBefore(i,a)}function f(){tt(X.uDF),setTimeout(w,N,X.uDF)}function s(t,e,n,r){var o=!1,i=new XMLHttpRequest;if(c(\"https:\"+t,function(){n(new Error(\"CSP Violation\"),!0),o=!0}),\"//\"===t.slice(0,2)&&(t=\"https:\"+t),\"withCredentials\"in i)i.open(\"GET\",t,!0);else{if(\"undefined\"==typeof XDomainRequest)return;i=new XDomainRequest,i.open(\"GET\",t)}Object.keys(r).forEach(function(t){i.setRequestHeader(t,r[t])}),i.onload=function(){\"function\"==typeof e&&e(i)},i.onerror=function(t){if(\"function\"==typeof n&&!o)try{n(t,!1),o=!0}catch(t){}},i.onprogress=function(){},i.ontimeout=function(){\"function\"==typeof n&&n(\"tim\"+\"eo\"+\"ut\",!1)},setTimeout(function(){i.send()},0)}function d(t,siteId,e){function n(t){var e=t.toString(16);return e.length%2?\"0\"+e:e}function r(t){if(t<=0)return\"\";for(var e=\"0123456789abcdef\",n=\"\",r=0;r<t;r++)n+=e[Math.floor(Math.random()*e.length)];return n}function o(t){for(var e=\"\",r=0;r<t.length;r++)e+=n(t.charCodeAt(r));return e}function i(t){for(var e=t.split(\"\"),n=0;n<e.length;++n)e[n]=String.fromCharCode(255^e[n].charCodeAt(0));return e.join(\"\")}e=e?\"1\":\"0\";var a=[];return a.push(t),a.push(siteId),a.push(e),function(t){var e=40,n=\"\";return t.length<e/2&&(n=\",\"+r(e/2-t.length-1)),o(i(t+n))}(a.join(\",\"))}function h(){function t(){F&&(tt(X.dUAL),setTimeout(w,N,X.dUAL))}function e(t,e){r(e?X.uAS+X.uF+X.cP:X.uAS+X.uF),F=\"F\"+\"T\"+\"R\"+\"A\"+\"U\",setTimeout(w,N,X.uAS)}window.ftr__fdad(t,e)}function l(){function t(){F&&setTimeout(w,N,X.uDAD)}function e(t,e){r(e?X.uDS+X.uF+X.cP:X.uDS+X.uF),F=\"F\"+\"T\"+\"R\"+\"A\"+\"U\",setTimeout(w,N,X.uDS)}window.ftr__radd(t,e)}function w(t){try{var e;switch(t){case X.uFP:e=O;break;case X.uDF:e=M;break;default:e=F}if(!e)return;var n=function(){try{et(),r(t+X.uS)}catch(t){}},o=function(e){try{et(),Q.td=1*new Date-Q.ts,r(e?t+X.uF+X.cP:t+X.uF),t===X.uFP&&f(),t===X.uDF&&(I?l():h()),t!==X.uAS&&t!==X.dUAL||I||l(),t!==X.uDS&&t!==X.uDAD||I&&h()}catch(t){r(X.eUoe)}};if(e===\"F\"+\"T\"+\"R\"+\"A\"+\"U\")return void o();u(e,void 0,n,o)}catch(e){r(t+X.eTlu)}}var g=\"22ge:t7mj8unkn;1forxgiurqw1qhw2vwdwxv\",v=\"fort\",p=\"erTo\",m=\"ken\",_=3;window.ftr__config={m:merchantConfig,s:\"24\",si:siteId};var y=!1,U=!1,T=v+p+m,x=400*24*60,A=10,S={write:function(t,e,r,o){void 0===o&&(o=!0);var i=0;window.ftr__config&&window.ftr__config.m&&window.ftr__config.m.ckDepth&&(i=window.ftr__config.m.ckDepth);var a,c,u=n(i);if(r?(a=new Date,a.setTime(a.getTime()+60*r*1e3),c=\"; expires=\"+a.toGMTString()):c=\"\",!o)return void(document.cookie=escape(t)+\"=\"+escape(e)+c+\"; path=\"+u);for(var f=1,s=document.domain.split(\".\"),d=A,h=!0;h&&s.length>=f&&d>0;){var l=s.slice(-f).join(\".\");document.cookie=escape(t)+\"=\"+escape(e)+c+\"; path=\"+u+\"; domain=\"+l;var w=S.read(t);null!=w&&w==e||(l=\".\"+l,document.cookie=escape(t)+\"=\"+escape(e)+c+\"; path=\"+u+\"; domain=\"+l),h=-1===document.cookie.indexOf(t+\"=\"+e),f++,d--}},read:function(t){var e=null;try{for(var n=escape(t)+\"=\",r=document.cookie.split(\";\"),o=32,i=0;i<r.length;i++){for(var a=r[i];a.charCodeAt(0)===o;)a=a.substring(1,a.length);0===a.indexOf(n)&&(e=unescape(a.substring(n.length,a.length)))}}finally{return e}}},D=window.ftr__config.s;D+=\"ck\";var L=function(t){var e=!1,n=null,r=function(){try{if(!n||!e)return;n.remove&&\"function\"==typeof n.remove?n.remove():document.head.removeChild(n),e=!1}catch(t){}};document.head&&(!function(){n=document.createElement(\"link\"),n.setAttribute(\"rel\",\"pre\"+\"con\"+\"nect\"),n.setAttribute(\"cros\"+\"sori\"+\"gin\",\"anonymous\"),n.onload=r,n.onerror=r,n.setAttribute(\"href\",t),document.head.appendChild(n),e=!0}(),setTimeout(r,3e3))},E=e(g||\"22ge:t7mj8unkn;1forxgiurqw1qhw2vwdwxv\"),C=t(\"[0Uhtxhvw0LG\",-_),R=t(\"[0Fruuhodwlrq0LG\",-_),P=t(\"Li0Qrqh0Pdwfk\",-_),k=e(\"dss1vlwhshuirupdqfhwhvw1qhw\"),q=e(\"2241414142gqv0txhu|\"),F,b=\"fgq71iruwhu1frp\",M=e(\"(VQ(1\"+b+\"2vq2(VQ(2vfulsw1mv\"),V=e(\"(VQ(1\"+b+\"2vqV2(VQ(2vfulsw1mv\"),O;window.ftr__config&&window.ftr__config.m&&window.ftr__config.m.fpi&&(O=window.ftr__config.m.fpi+e(\"2vq2(VQ(2vfulsw1mv\"));var I=!1,N=10;window.ftr__startScriptLoad=1*new Date;var j=function(t){var e=\"ft\"+\"r:tok\"+\"enR\"+\"eady\";window.ftr__tt&&clearTimeout(window.ftr__tt),window.ftr__tt=setTimeout(function(){try{delete window.ftr__tt,t+=\"_tt\";var n=document.createEvent(\"Event\");n.initEvent(e,!1,!1),n.detail=t,document.dispatchEvent(n)}catch(t){}},1e3)},B=function(t){var e=function(t){return t||\"\"},n=e(t.id)+\"_\"+e(t.ts)+\"_\"+e(t.td)+\"_\"+e(t.ex)+\"_\"+e(D),r=x;!isNaN(window.ftr__config.m.ckTTL)&&window.ftr__config.m.ckTTL&&(r=window.ftr__config.m.ckTTL),S.write(T,n,r,!0),j(n),window.ftr__gt=n},G=function(){var t=S.read(T)||\"\",e=t.split(\"_\"),n=function(t){return e[t]||void 0};return{id:n(0),ts:n(1),td:n(2),ex:n(3),vr:n(4)}},H=function(){for(var t={},e=\"fgu\",n=[],r=0;r<256;r++)n[r]=(r<16?\"0\":\"\")+r.toString(16);var o=function(t,e,r,o,i){var a=i?\"-\":\"\";return n[255&t]+n[t>>8&255]+n[t>>16&255]+n[t>>24&255]+a+n[255&e]+n[e>>8&255]+a+n[e>>16&15|64]+n[e>>24&255]+a+n[63&r|128]+n[r>>8&255]+a+n[r>>16&255]+n[r>>24&255]+n[255&o]+n[o>>8&255]+n[o>>16&255]+n[o>>24&255]},i=function(){if(window.Uint32Array&&window.crypto&&window.crypto.getRandomValues){var t=new window.Uint32Array(4);return window.crypto.getRandomValues(t),{d0:t[0],d1:t[1],d2:t[2],d3:t[3]}}return{d0:4294967296*Math.random()>>>0,d1:4294967296*Math.random()>>>0,d2:4294967296*Math.random()>>>0,d3:4294967296*Math.random()>>>0}},a=function(){var t=\"\",e=function(t,e){for(var n=\"\",r=t;r>0;--r)n+=e.charAt(1e3*Math.random()%e.length);return n};return t+=e(2,\"0123456789\"),t+=e(1,\"123456789\"),t+=e(8,\"0123456789\")};return t.safeGenerateNoDash=function(){try{var t=i();return o(t.d0,t.d1,t.d2,t.d3,!1)}catch(t){try{return e+a()}catch(t){}}},t.isValidNumericalToken=function(t){return t&&t.toString().length<=11&&t.length>=9&&parseInt(t,10).toString().length<=11&&parseInt(t,10).toString().length>=9},t.isValidUUIDToken=function(t){return t&&32===t.toString().length&&/^[a-z0-9]+$/.test(t)},t.isValidFGUToken=function(t){return 0==t.indexOf(e)&&t.length>=12},t}(),X={uDF:\"UDF\",dUAL:\"dUAL\",uAS:\"UAS\",uDS:\"UDS\",uDAD:\"UDAD\",uFP:\"UFP\",mLd:\"1\",eTlu:\"2\",eUoe:\"3\",uS:\"4\",uF:\"9\",tmos:[\"T5\",\"T10\",\"T15\",\"T30\",\"T60\"],tmosSecs:[5,10,15,30,60],bIR:\"43\",uB:\"u\",uBr:\"b\",cP:\"c\",nIL:\"i\",s:\"s\"};try{var Q=G();try{Q.id&&(H.isValidNumericalToken(Q.id)||H.isValidUUIDToken(Q.id)||H.isValidFGUToken(Q.id))?window.ftr__ncd=!1:(Q.id=H.safeGenerateNoDash(),window.ftr__ncd=!0),Q.ts=window.ftr__startScriptLoad,B(Q),window.ftr__snp_cwc=!!S.read(T),window.ftr__snp_cwc||(M=V);for(var $=\"for\"+\"ter\"+\".co\"+\"m\",z=\"ht\"+\"tps://c\"+\"dn9.\"+$,J=\"ht\"+\"tps://\"+Q.id+\"-\"+siteId+\".cd\"+\"n.\"+$,K=\"http\"+\"s://cd\"+\"n3.\"+$,W=[z,J,K],Y=0;Y<W.length;Y++)L(W[Y]);var Z=new Array(X.tmosSecs.length),tt=function(t){for(var e=0;e<X.tmosSecs.length;e++)Z[e]=setTimeout(r,1e3*X.tmosSecs[e],t+X.tmos[e])},et=function(){for(var t=0;t<X.tmosSecs.length;t++)clearTimeout(Z[t])};window.ftr__fdad=function(e,n){if(!y){y=!0;var r={};r[P]=d(window.ftr__config.s,siteId,window.ftr__config.m.csp),s(E,function(n){try{var r=n.getAllResponseHeaders().toLowerCase();if(r.indexOf(R.toLowerCase())>=0){var o=n.getResponseHeader(R);window.ftr__altd2=t(atob(o),-_-1)}if(r.indexOf(C.toLowerCase())<0)return;var i=n.getResponseHeader(C),a=t(atob(i),-_-1);if(a){var c=a.split(\":\");if(c&&2===c.length){for(var u=c[0],f=c[1],s=\"\",d=0,h=0;d<20;++d)s+=d%3>0&&h<12?siteId.charAt(h++):Q.id.charAt(d);var l=f.split(\",\");if(l.length>1){var w=l[0],g=l[1];F=u+\"/\"+w+\".\"+s+\".\"+g}}}e()}catch(t){}},function(t,e){n&&n(t,e)},r)}},window.ftr__radd=function(t,e){function n(e){try{var n=e.response,r=function(t){function e(t,o,i){try{if(i>=n)return{name:\"\",nextOffsetToProcess:o,error:\"Max pointer dereference depth exceeded\"};for(var a=[],c=o,u=t.getUint8(c),f=0;f<r;){if(f++,192==(192&u)){var s=(63&u)<<8|t.getUint8(c+1),d=e(t,s,i+1);if(d.error)return d;var h=d.name;return a.push(h),{name:a.join(\".\"),nextOffsetToProcess:c+2}}if(!(u>0)){if(0!==u)return{name:\"\",nextOffsetToProcess:c,error:\"Unexpected length at the end of name: \"+u.toString()};return{name:a.join(\".\"),nextOffsetToProcess:c+1}}for(var l=\"\",w=1;w<=u;w++)l+=String.fromCharCode(t.getUint8(c+w));a.push(l),c+=u+1,u=t.getUint8(c)}return{name:\"\",nextOffsetToProcess:c,error:\"Max iterations exceeded\"}}catch(t){return{name:\"\",nextOffsetToProcess:o,error:\"Unexpected error while parsing response: \"+t.toString()}}}for(var n=4,r=100,o=16,i=new DataView(t),a=i.getUint16(0),c=i.getUint16(2),u=i.getUint16(4),f=i.getUint16(6),s=i.getUint16(8),d=i.getUint16(10),h=12,l=[],w=0;w<u;w++){var g=e(i,h,0);if(g.error)throw new Error(g.error);if(h=g.nextOffsetToProcess,!Number.isInteger(h))throw new Error(\"invalid returned offset\");var v=g.name,p=i.getUint16(h);h+=2;var m=i.getUint16(h);h+=2,l.push({qname:v,qtype:p,qclass:m})}for(var _=[],w=0;w<f;w++){var g=e(i,h,0);if(g.error)throw new Error(g.error);if(h=g.nextOffsetToProcess,!Number.isInteger(h))throw new Error(\"invalid returned offset\");var y=g.name,U=i.getUint16(h);if(U!==o)throw new Error(\"Unexpected record type: \"+U.toString());h+=2;var T=i.getUint16(h);h+=2;var x=i.getUint32(h);h+=4;var A=i.getUint16(h);h+=2;for(var S=\"\",D=h,L=0;D<h+A&&L<r;){L++;var E=i.getUint8(D);D+=1;S+=(new TextDecoder).decode(t.slice(D,D+E)),D+=E}if(L>=r)throw new Error(\"Max iterations exceeded while reading TXT data\");h+=A,_.push({name:y,type:U,class:T,ttl:x,data:S})}return{transactionId:a,flags:c,questionCount:u,answerCount:f,authorityCount:s,additionalCount:d,questions:l,answers:_}}(n);if(!r)throw new Error(\"Error parsing DNS response\");if(!(\"answers\"in r))throw new Error(\"Unexpected response\");var o=r.answers;if(0===o.length)throw new Error(\"No answers found\");var i=o[0].data;if(i=i.replace(/^\"(.*)\"$/,\"$1\"),decodedVal=function(t){var e=40,n=32,r=126;try{for(var o=atob(t),i=\"\",a=0;a<o.length;a++)i+=function(t){var o=t.charCodeAt(0),i=o-e;return i<n&&(i=r-(n-i)+1),String.fromCharCode(i)}(o[a]);return atob(i)}catch(t){return}}(i),!decodedVal)throw new Error(\"failed to decode the value\");var a=function(t){var e=\"_\"+\"D\"+\"L\"+\"M\"+\"_\",n=t.split(e);if(!(n.length<2)){var r=n[0],o=n[1];if(!(r.split(\".\").length-1<1))return{jURL:r,eURL:o}}}(decodedVal);if(!a)throw new Error(\"failed to parse the value\");var c=a.jURL,u=a.eURL;F=function(t){for(var e=\"\",n=0,r=0;n<20;++n)e+=n%3>0&&r<12?siteId.charAt(r++):Q.id.charAt(n);return t.replace(\"/PRM1\",\"\").replace(\"/PRM2\",\"/main.\").replace(\"/PRM3\",e).replace(\"/PRM4\",\".js\")}(c),window.ftr__altd3=u,t()}catch(t){}}function r(t,n){e&&e(t,n)}if(!U){window.ftr__config.m.dr===\"N\"+\"D\"+\"R\"&&e(new Error(\"N\"+\"D\"+\"R\"),!1),q&&k||e(new Error(\"D\"+\"P\"+\"P\"),!1),U=!0;try{var o=function(t){for(var e=new Uint8Array([0,0]),n=new Uint8Array([1,0]),r=new Uint8Array([0,1]),o=new Uint8Array([0,0]),i=new Uint8Array([0,0]),a=new Uint8Array([0,0]),c=t.split(\".\"),u=[],f=0;f<c.length;f++){var s=c[f];u.push(s.length);for(var d=0;d<s.length;d++)u.push(s.charCodeAt(d))}u.push(0);var h=16,l=new Uint8Array([0,h]),w=new Uint8Array([0,1]),g=new Uint8Array(e.length+n.length+r.length+o.length+i.length+a.length+u.length+l.length+w.length);return g.set(e,0),g.set(n,e.length),g.set(r,e.length+n.length),g.set(o,e.length+n.length+r.length),g.set(i,e.length+n.length+r.length+o.length),g.set(a,e.length+n.length+r.length+o.length+i.length),g.set(u,e.length+n.length+r.length+o.length+i.length+a.length),g.set(l,e.length+n.length+r.length+o.length+i.length+a.length+u.length),g.set(w,e.length+n.length+r.length+o.length+i.length+a.length+u.length+l.length),g}(k);!function(t,e,n,r,o){var i=!1,a=new XMLHttpRequest;if(c(\"https:\"+t,function(){o(new Error(\"CSP Violation\"),!0),i=!0}),\"//\"===t.slice(0,2)&&(t=\"https:\"+t),\"withCredentials\"in a)a.open(\"POST\",t,!0);else{if(\"undefined\"==typeof XDomainRequest)return;a=new XDomainRequest,a.open(\"POST\",t)}a.responseType=\"arraybuffer\",a.setRequestHeader(\"Content-Type\",e),a.onload=function(){\"function\"==typeof r&&r(a)},a.onerror=function(t){if(\"function\"==typeof o&&!i)try{o(t,!1),i=!0}catch(t){}},a.onprogress=function(){},a.ontimeout=function(){\"function\"==typeof o&&o(\"tim\"+\"eo\"+\"ut\",!1)},setTimeout(function(){a.send(n)},0)}(q,\"application/dns-message\",o,n,r)}catch(t){e(t,!1)}}};var nt=O?X.uFP:X.uDF;tt(nt),setTimeout(w,N,nt)}catch(t){r(X.mLd)}}catch(t){}}\n)();\n";
|
|
2
|
+
//# sourceMappingURL=forter-snippet-2025-02-06t14:19:34z.template.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forter-snippet-2025-02-06t14:19:34z.template.d.ts","sourceRoot":"","sources":["../../../../../src/fraud-prevention/providers/forter/templates/forter-snippet-2025-02-06t14:19:34z.template.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,0BAA0B,qybAUtC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { HttpFetcher } from '../../shared/http/http-fetcher';
|
|
2
|
+
import type { Result } from '../../shared/shared.constants';
|
|
3
|
+
import { PROVIDERS } from '../fraud-prevention.constants';
|
|
4
|
+
import type { FraudPreventionProvider } from '../fraud-prevention.events';
|
|
5
|
+
export type ServiceConfigResource = {
|
|
6
|
+
type: string;
|
|
7
|
+
merchant: string;
|
|
8
|
+
username: string;
|
|
9
|
+
password: string;
|
|
10
|
+
certificate: string;
|
|
11
|
+
certificate_passphrase: string;
|
|
12
|
+
};
|
|
13
|
+
type ForterCredentials = {
|
|
14
|
+
provider: typeof PROVIDERS.FORTER;
|
|
15
|
+
siteId: string;
|
|
16
|
+
subsiteId: string;
|
|
17
|
+
};
|
|
18
|
+
export declare function findServiceConfig<P extends FraudPreventionProvider>(httpFetcher: HttpFetcher, provider: P, providerId: string): Promise<Result<P extends typeof PROVIDERS.FORTER ? ForterCredentials : never, unknown>>;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=find-service-config.repository.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-service-config.repository.d.ts","sourceRoot":"","sources":["../../../src/fraud-prevention/resources/find-service-config.repository.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC1D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAE1E,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,sBAAsB,EAAE,MAAM,CAAC;CAChC,CAAC;AAEF,KAAK,iBAAiB,GAAG;IACvB,QAAQ,EAAE,OAAO,SAAS,CAAC,MAAM,CAAC;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAQF,wBAAsB,iBAAiB,CAAC,CAAC,SAAS,uBAAuB,EACvE,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,CAAC,EACX,UAAU,EAAE,MAAM,GACjB,OAAO,CACR,MAAM,CAAC,CAAC,SAAS,OAAO,SAAS,CAAC,MAAM,GAAG,iBAAiB,GAAG,KAAK,EAAE,OAAO,CAAC,CAC/E,CAyBA"}
|
|
@@ -20,5 +20,6 @@ export declare class AccessToken {
|
|
|
20
20
|
static extractMeta<T>(body: IAccessToken['body']): T;
|
|
21
21
|
static extractEnv<T>(body: IAccessToken['body']): T;
|
|
22
22
|
static getAccessHeaderNameByToken(token: string): string;
|
|
23
|
+
static isJwt(value: string): boolean;
|
|
23
24
|
}
|
|
24
25
|
//# sourceMappingURL=access-token.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"access-token.d.ts","sourceRoot":"","sources":["../../src/helper/access-token.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IACzB,IAAI,EAAE;QACF,GAAG,EAAE,MAAM,CAAC;QACZ,GAAG,EAAE,MAAM,CAAC;KACf,CAAC;IACF,IAAI,EAAE;QACF,GAAG,EAAE,MAAM,CAAC;QACZ,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,SAAS,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,kBAAkB;;;CAG9B,CAAA;AAED,qBAAa,WAAW;WACN,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY;WAkBtC,WAAW,CAAC,CAAC,EAAE,IAAI,EAAC,YAAY,CAAC,MAAM,CAAC,GAAE,CAAC;WAQ3C,WAAW,CAAC,CAAC,EAAE,IAAI,EAAE,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC;WAS7C,UAAU,CAAC,CAAC,EAAE,IAAI,EAAE,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC;WAS5C,0BAA0B,CAAC,KAAK,EAAE,MAAM;
|
|
1
|
+
{"version":3,"file":"access-token.d.ts","sourceRoot":"","sources":["../../src/helper/access-token.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IACzB,IAAI,EAAE;QACF,GAAG,EAAE,MAAM,CAAC;QACZ,GAAG,EAAE,MAAM,CAAC;KACf,CAAC;IACF,IAAI,EAAE;QACF,GAAG,EAAE,MAAM,CAAC;QACZ,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,SAAS,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,kBAAkB;;;CAG9B,CAAA;AAED,qBAAa,WAAW;WACN,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY;WAkBtC,WAAW,CAAC,CAAC,EAAE,IAAI,EAAC,YAAY,CAAC,MAAM,CAAC,GAAE,CAAC;WAQ3C,WAAW,CAAC,CAAC,EAAE,IAAI,EAAE,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC;WAS7C,UAAU,CAAC,CAAC,EAAE,IAAI,EAAE,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC;WAS5C,0BAA0B,CAAC,KAAK,EAAE,MAAM;WAIxC,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;CAI9C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../src/helper/browser.ts"],"names":[],"mappings":"AAAA,qBAAa,OAAO;
|
|
1
|
+
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../src/helper/browser.ts"],"names":[],"mappings":"AAAA,qBAAa,OAAO;WAEJ,UAAU,IAAI,OAAO;WAMrB,WAAW,IAAI,OAAO;WAMtB,cAAc,IAAI,OAAO;WAIzB,WAAW,IAAI,MAAM;WAIrB,iBAAiB,IAAI,MAAM;WAI3B,cAAc,IAAI,MAAM;WA4BxB,aAAa,IAAI,OAAO;WAIxB,aAAa,IAAI,MAAM;WAIvB,eAAe,IAAI,MAAM;WAIzB,cAAc,IAAI,MAAM;WAIxB,cAAc,IAAI;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE;CA0BlE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custom-error.d.ts","sourceRoot":"","sources":["../../src/helper/custom-error.ts"],"names":[],"mappings":"AAAA,qBAAa,WAAY,SAAQ,KAAK;IAC7B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,IAAI,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;KAAE,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;gBAE7C,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG;CAMzD"}
|
|
@@ -2,16 +2,18 @@ export * from './api';
|
|
|
2
2
|
export * from './canvas-3ds';
|
|
3
3
|
export * from './checkout-button';
|
|
4
4
|
export * from './external-checkout';
|
|
5
|
+
export * from './fraud-prevention';
|
|
5
6
|
export * from './payment-source-widget';
|
|
6
7
|
export * from './payment-source';
|
|
7
8
|
export * from './secure-remote-commerce';
|
|
8
9
|
export * from './checkout/index';
|
|
9
10
|
export * from './wallet-buttons';
|
|
11
|
+
export * from './wallet-buttons-express';
|
|
10
12
|
export * from './checkout/index';
|
|
11
13
|
export * from './widget';
|
|
12
14
|
export * from './paypal-data-collector';
|
|
13
15
|
export * from './paypal-save-payment-source';
|
|
14
|
-
export { ELEMENT, FORM_FIELD, STYLE, SUPPORTED_CARD_TYPES, TEXT, VAULT_DISPLAY_STYLE, type IPayPalMeta, type IStyles, type ITexts, type VaultDisplayStyle, } from './components/param';
|
|
16
|
+
export { ELEMENT, FORM_FIELD, STYLE, SUPPORTED_CARD_TYPES, TEXT, VAULT_DISPLAY_STYLE, type IPayPalMeta, type IStyles, type ITexts, type VaultDisplayStyle, IWalletMeta, } from './components/param';
|
|
15
17
|
export { EVENT } from './components/iframe-event';
|
|
16
18
|
export { TRIGGER } from './components/trigger';
|
|
17
19
|
//# sourceMappingURL=index-cba.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-cba.d.ts","sourceRoot":"","sources":["../src/index-cba.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAE7C,OAAO,
|
|
1
|
+
{"version":3,"file":"index-cba.d.ts","sourceRoot":"","sources":["../src/index-cba.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAE7C,OAAO,EACL,OAAO,EACP,UAAU,EACV,KAAK,EACL,oBAAoB,EACpB,IAAI,EACJ,mBAAmB,EACnB,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,KAAK,MAAM,EACX,KAAK,iBAAiB,EACtB,WAAW,GACZ,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC"}
|
package/bundles/types/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export * from './api';
|
|
|
2
2
|
export * from './canvas-3ds';
|
|
3
3
|
export * from './checkout-button';
|
|
4
4
|
export * from './external-checkout';
|
|
5
|
+
export * from './fraud-prevention';
|
|
5
6
|
export * from './payment-source-widget';
|
|
6
7
|
export * from './payment-source';
|
|
7
8
|
export * from './secure-remote-commerce';
|
|
@@ -12,7 +13,7 @@ export * from './checkout/index';
|
|
|
12
13
|
export * from './wallet-buttons-express';
|
|
13
14
|
export * from './paypal-data-collector';
|
|
14
15
|
export * from './paypal-save-payment-source';
|
|
15
|
-
export { ELEMENT, FORM_FIELD, STYLE, SUPPORTED_CARD_TYPES, TEXT, VAULT_DISPLAY_STYLE, type IPayPalMeta, type IStyles, type ITexts, type VaultDisplayStyle, } from './components/param';
|
|
16
|
+
export { ELEMENT, FORM_FIELD, STYLE, SUPPORTED_CARD_TYPES, TEXT, VAULT_DISPLAY_STYLE, type IPayPalMeta, type IStyles, type ITexts, type VaultDisplayStyle, type IWalletMeta, } from './components/param';
|
|
16
17
|
export { EVENT } from './components/iframe-event';
|
|
17
18
|
export { TRIGGER } from './components/trigger';
|
|
18
19
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAE7C,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAE7C,OAAO,EACL,OAAO,EACP,UAAU,EACV,KAAK,EACL,oBAAoB,EACpB,IAAI,EACJ,mBAAmB,EACnB,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,KAAK,MAAM,EACX,KAAK,iBAAiB,EACtB,KAAK,WAAW,GACjB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -3,8 +3,8 @@ import { type CollectedDeviceData, type IOnErrorEventData, type IPayPalDataColle
|
|
|
3
3
|
/**
|
|
4
4
|
* PayPal Data Collector Widget constructor
|
|
5
5
|
*
|
|
6
|
-
* @param {string} flowId - This string identifies the source website of the FraudNet request.
|
|
7
|
-
* @param {PayPalDataCollectorConfig} config - Extra configuration for the widget.
|
|
6
|
+
* @param {string} [flowId] - This string identifies the source website of the FraudNet request.
|
|
7
|
+
* @param {PayPalDataCollectorConfig} [config] - Extra configuration for the widget.
|
|
8
8
|
*
|
|
9
9
|
* @example
|
|
10
10
|
* var payPalDataCollector = new PayPalDataCollector('FLOW_ID', {});
|
|
@@ -15,9 +15,9 @@ declare class PayPalDataCollector {
|
|
|
15
15
|
/** @constructs */ constructor(flowId?: string, config?: PayPalDataCollectorConfig);
|
|
16
16
|
/**
|
|
17
17
|
* After configuring the PayPalDataCollector Widget, starts the process and returns
|
|
18
|
-
* the correlation id used among the requests.
|
|
18
|
+
* the correlation id used among the requests asynchronously.
|
|
19
19
|
*
|
|
20
|
-
* @returns {Promise<CollectedDeviceData>} Promise when resolved,
|
|
20
|
+
* @returns {Promise<CollectedDeviceData>} Promise when resolved, returns an object
|
|
21
21
|
* that contains the `correlation_id` key.
|
|
22
22
|
*
|
|
23
23
|
* @example
|
package/bundles/types/paypal-save-payment-source/paypal-save-payment-source.interfaces.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paypal-save-payment-source.interfaces.d.ts","sourceRoot":"","sources":["../../src/paypal-save-payment-source/paypal-save-payment-source.interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEzD,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;CACtB;AACD,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,MAAM,CAAC;CACpB;AACD,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"paypal-save-payment-source.interfaces.d.ts","sourceRoot":"","sources":["../../src/paypal-save-payment-source/paypal-save-payment-source.interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEzD,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;CACtB;AACD,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,MAAM,CAAC;CACpB;AACD,MAAM,WAAW,oBAAoB;I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AE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3C;AAED,oBAAY,UAAU;IACpB,WAAW,gBAAgB;IAC3B,iCAAiC,iCAAiC;IAClE,qBAAqB,sBAAsB;IAC3C,0BAA0B,2BAA2B;IACrD,wBAAwB,yBAAyB;IACjD,uBAAuB,wBAAwB;CAChD;AAED,oBAAY,MAAM;IAChB,UAAU,eAAe;IACzB,QAAQ,aAAa;IACrB,SAAS,cAAc;CACxB;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC,UAAU,CAAC;IACzB,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;CACH;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC,QAAQ,CAAC;IACvB,IAAI,EAAE;QACJ,UAAU,EAAE,UAAU,CAAC;QACvB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;CACH;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC,SAAS,CAAC;CACzB"}
|
|
@@ -17,7 +17,6 @@ export declare class PayPalSavePaymentSourceService implements IPayPalSavePaymen
|
|
|
17
17
|
protected api: ApiInternal;
|
|
18
18
|
protected walletConfig: GetWalletConfigResponse;
|
|
19
19
|
protected idToken: string;
|
|
20
|
-
protected accessToken: string;
|
|
21
20
|
constructor(publicKey: string, gatewayId: string, eventEmitter: EventEmitter, config?: PayPalSavePaymentSourceWidgetConfig);
|
|
22
21
|
static fromConfig(publicKey: string, gatewayId: string, eventEmitter: EventEmitter, config?: PayPalSavePaymentSourceWidgetConfig): PayPalSavePaymentSourceService;
|
|
23
22
|
private getApiAuthType;
|
package/bundles/types/paypal-save-payment-source/paypal-save-payment-source.service.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paypal-save-payment-source.service.d.ts","sourceRoot":"","sources":["../../src/paypal-save-payment-source/paypal-save-payment-source.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAC3E,OAAO,EAAiB,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAEL,KAAK,8BAA8B,EAEnC,KAAK,mCAAmC,EAOzC,MAAM,yCAAyC,CAAC;AAEjD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,MAAM,EAAE,GAAG,CAAC;KACb;CACF;AAWD,qBAAa,8BAA+B,YAAW,8BAA8B;
|
|
1
|
+
{"version":3,"file":"paypal-save-payment-source.service.d.ts","sourceRoot":"","sources":["../../src/paypal-save-payment-source/paypal-save-payment-source.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAC3E,OAAO,EAAiB,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAEL,KAAK,8BAA8B,EAEnC,KAAK,mCAAmC,EAOzC,MAAM,yCAAyC,CAAC;AAEjD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,MAAM,EAAE,GAAG,CAAC;KACb;CACF;AAWD,qBAAa,8BAA+B,YAAW,8BAA8B;IAOjF,SAAS,CAAC,SAAS,EAAE,MAAM;IAC3B,SAAS,CAAC,SAAS,EAAE,MAAM;IAC3B,SAAS,CAAC,YAAY,EAAE,YAAY;IACpC,SAAS,CAAC,MAAM,CAAC,EAAE,mCAAmC;IATxD,SAAS,CAAC,MAAM,EAAE,GAAG,CAAC;IACtB,SAAS,CAAC,GAAG,EAAE,WAAW,CAAC;IAC3B,SAAS,CAAC,YAAY,EAAE,uBAAuB,CAAC;IAChD,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC;gBAGd,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,YAAY,EAC1B,MAAM,CAAC,EAAE,mCAAmC;IAKxD,MAAM,CAAC,UAAU,CACf,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,YAAY,EAC1B,MAAM,CAAC,EAAE,mCAAmC;IAU9C,OAAO,CAAC,cAAc;IAOf,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI;IAIzC,IAAI,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI;IAcvC,OAAO,CAAC,sCAAsC;IA4C9C,OAAO,CAAC,6BAA6B;IAIrC,OAAO,CAAC,aAAa;IAqBrB,SAAS,CAAC,yBAAyB,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAsB3E,SAAS,CAAC,sBAAsB,CAAC,KAAK,KAAA,GAAG,IAAI;IAO7C,SAAS,CAAC,uBAAuB,IAAI,IAAI;IAIzC,OAAO,CAAC,UAAU;IAkBlB,OAAO,CAAC,eAAe;IAgBvB,OAAO,CAAC,mBAAmB;CAQ5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"click-to-pay-secure-remote-commerce.d.ts","sourceRoot":"","sources":["../../src/secure-remote-commerce/click-to-pay-secure-remote-commerce.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"click-to-pay-secure-remote-commerce.d.ts","sourceRoot":"","sources":["../../src/secure-remote-commerce/click-to-pay-secure-remote-commerce.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAE/C;;;;;;;;;;;;;;GAcG;AACH,cAAM,UAAW,SAAQ,GAAG;IAEZ,SAAS,CAAC,eAAe,EAAE,MAAM;IAAE,SAAS,CAAC,UAAU,EAAE,MAAM;IAAE,SAAS,CAAC,0BAA0B,EAAE,MAAM;IAAE,SAAS,CAAC,IAAI,EAAE,eAAe;IAD1J,kBAAkB,aACI,eAAe,EAAE,MAAM,EAAY,UAAU,EAAE,MAAM,EAAY,0BAA0B,EAAE,MAAM,EAAY,IAAI,EAAE,eAAe;IAI1J;;;OAGG;IACI,IAAI,IAAI,IAAI;CAmBtB;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { ClickToPay } from './click-to-pay-secure-remote-commerce';
|
|
2
|
+
export { IClickToPayMeta } from './interfaces';
|
|
2
3
|
/**
|
|
3
4
|
* Interface of data used for the Mastercard Checkout. For further information refer to [the documentation](https://developer.mastercard.com/unified-checkout-solutions/documentation/sdk-reference/init).
|
|
4
5
|
* @interface IMastercardSRCMeta
|
|
@@ -67,6 +68,7 @@ export { ClickToPay } from './click-to-pay-secure-remote-commerce';
|
|
|
67
68
|
* @type {object}
|
|
68
69
|
* @param {string} type type of the checkout, can be `src` or `manual`.
|
|
69
70
|
* @param {string} token one time token value.
|
|
71
|
+
* @param {string} token_type one time token type value, can be `card` or `card_scheme_token`.
|
|
70
72
|
* @param {object} [checkoutData] Optional checkout data related to the checkout information. Only available on src flow.
|
|
71
73
|
* @param {string} [checkoutData.card_number_bin] The BIN of the card used for the transaction.
|
|
72
74
|
* @param {string} [checkoutData.card_number_last4] The last four digits of the card number.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/secure-remote-commerce/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/secure-remote-commerce/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAEH;;;;;;;GAOG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH;;;;;;;;;;;GAWG"}
|
|
@@ -44,6 +44,7 @@ interface EventDataRecognitionTokenRequested {
|
|
|
44
44
|
interface EventDataCheckoutCompletedData {
|
|
45
45
|
type: 'src' | 'manual';
|
|
46
46
|
token: string;
|
|
47
|
+
token_type: 'card' | 'card_scheme_token';
|
|
47
48
|
checkoutData?: {
|
|
48
49
|
card_number_bin?: string;
|
|
49
50
|
card_number_last4?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../src/secure-remote-commerce/interfaces.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,oBAAY,KAAK;IACb,aAAa,iBAAiB;IAC9B,cAAc,kBAAkB;IAChC,kBAAkB,sBAAsB;IACxC,cAAc,kBAAkB;IAChC,mBAAmB,sBAAsB;IACzC,oBAAoB,uBAAuB;CAC9C;AAED,MAAM,WAAW,SAAS;IACtB,IAAI,EAAE,eAAe,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,GAAG,8BAA8B,GAAG,kCAAkC,CAAC;CACvF;AAED;;;;;;;;GAQG;AACH,oBAAY,eAAe;IACvB,cAAc,kBAAkB;IAChC,UAAU,cAAc;IACxB,OAAO,YAAY;CACtB;AAED,UAAU,kCAAkC;IACxC,IAAI,EAAE;QACF,gBAAgB,EAAE,MAAM,CAAC;KAC5B,CAAC;CACL;AAED,UAAU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UAAU,CAAC;AAE/C,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,cAAc,GAAG,gBAAgB,CAAC;AAE9E,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,GAAG,gBAAgB,CAAC;AAExE,MAAM,WAAW,OAAO;IACpB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,eAAO,MAAM,KAAK;;;;;;;CAOjB,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { HttpFetcher } from './http-fetcher';
|
|
2
|
+
export declare abstract class AuthorizationStrategy {
|
|
3
|
+
abstract apply(httpFetch: HttpFetcher): void;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Implementation of AuthorizationStrategy that uses an access token for authorization.
|
|
7
|
+
*
|
|
8
|
+
* This strategy configures the SDK Services and Widgets to use access token authentication.
|
|
9
|
+
*/
|
|
10
|
+
export declare class AccessTokenStrategy extends AuthorizationStrategy {
|
|
11
|
+
private readonly accessToken;
|
|
12
|
+
/**
|
|
13
|
+
* @constructor Creates an instance of AuthorizationStrategy which enables authorization by access token
|
|
14
|
+
*
|
|
15
|
+
* @param accessToken
|
|
16
|
+
*/
|
|
17
|
+
constructor(accessToken: string);
|
|
18
|
+
apply(httpFetch: HttpFetcher): void;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Implementation of AuthorizationStrategy that preserves Services and Widgets in an anonymous state.
|
|
22
|
+
*/
|
|
23
|
+
export declare class AnonymousStrategy extends AuthorizationStrategy {
|
|
24
|
+
apply(_: HttpFetcher): void;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Implementation of AuthorizationStrategy that uses a public key for authorization.
|
|
28
|
+
*
|
|
29
|
+
* This strategy configures the SDK Services and Widgets to use public key authentication.
|
|
30
|
+
*/
|
|
31
|
+
export declare class PublicKeyStrategy extends AuthorizationStrategy {
|
|
32
|
+
private readonly publicKey;
|
|
33
|
+
/**
|
|
34
|
+
* @constructor Creates an instance of AuthorizationStrategy which enables authorization by public key
|
|
35
|
+
*
|
|
36
|
+
* @param publicKey
|
|
37
|
+
*/
|
|
38
|
+
constructor(publicKey: string);
|
|
39
|
+
apply(httpFetch: HttpFetcher): void;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=authorization-strategy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authorization-strategy.d.ts","sourceRoot":"","sources":["../../../src/shared/http/authorization-strategy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,8BAAsB,qBAAqB;aACzB,KAAK,CAAC,SAAS,EAAE,WAAW,GAAG,IAAI;CACpD;AAED;;;;GAIG;AACH,qBAAa,mBAAoB,SAAQ,qBAAqB;IAMhD,OAAO,CAAC,QAAQ,CAAC,WAAW;IALxC;;;;OAIG;gBAC0B,WAAW,EAAE,MAAM;IAUzC,KAAK,CAAC,SAAS,EAAE,WAAW,GAAG,IAAI;CAG3C;AAED;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,qBAAqB;IACnD,KAAK,CAAC,CAAC,EAAE,WAAW,GAAG,IAAI;CAGnC;AAED;;;;GAIG;AACH,qBAAa,iBAAkB,SAAQ,qBAAqB;IAM9C,OAAO,CAAC,QAAQ,CAAC,SAAS;IALtC;;;;OAIG;gBAC0B,SAAS,EAAE,MAAM;IAUvC,KAAK,CAAC,SAAS,EAAE,WAAW,GAAG,IAAI;CAG3C"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type IReportError, type ReportErrorFn } from '../../shared/services/instrumentation/repositories';
|
|
2
|
+
import type { Result } from '../shared.constants';
|
|
3
|
+
import type { HttpResponseFailure, HttpResponseSuccess } from './http-response.dto';
|
|
4
|
+
type SerializablePrimitive = string | number | bigint | boolean | null;
|
|
5
|
+
type BodyInit = SerializablePrimitive | Record<string, SerializablePrimitive> | Array<SerializablePrimitive>;
|
|
6
|
+
export declare class HttpFetcher implements IReportError {
|
|
7
|
+
private baseUrl;
|
|
8
|
+
private body;
|
|
9
|
+
private headers;
|
|
10
|
+
constructor();
|
|
11
|
+
reportError: ReportErrorFn;
|
|
12
|
+
setAccessToken(accessToken: string): HttpFetcher;
|
|
13
|
+
setBaseUrl(baseUrl: string): HttpFetcher;
|
|
14
|
+
setBody<TBody extends BodyInit>(body: TBody): HttpFetcher;
|
|
15
|
+
setContentTypeJson(): HttpFetcher;
|
|
16
|
+
setHeaders(headers: HeadersInit): HttpFetcher;
|
|
17
|
+
setPublicKey(publicKey: string): HttpFetcher;
|
|
18
|
+
setSdkVersion(): HttpFetcher;
|
|
19
|
+
execute<S = unknown, E = unknown>(method: 'DELETE' | 'GET' | 'POST' | 'PUT' | 'PATCH', path: string): Promise<Result<{
|
|
20
|
+
statusCode: number;
|
|
21
|
+
body: HttpResponseSuccess<S>;
|
|
22
|
+
}, {
|
|
23
|
+
statusCode: number;
|
|
24
|
+
body: HttpResponseFailure<E>;
|
|
25
|
+
}>>;
|
|
26
|
+
}
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=http-fetcher.d.ts.map
|