@dintero/checkout-web-sdk 0.5.9 → 0.6.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/README.md +4 -2
- package/coverage/{Chrome Headless 115.0.5790.98 (Linux x86_64) → Chrome Headless 117.0.5938.92 (Linux x86_64)}/html/checkout.ts.html +92 -5
- package/coverage/{Chrome Headless 115.0.5790.98 (Linux x86_64) → Chrome Headless 117.0.5938.92 (Linux x86_64)}/html/createIframeAsync.ts.html +15 -15
- package/coverage/{Chrome Headless 115.0.5790.98 (Linux x86_64) → Chrome Headless 117.0.5938.92 (Linux x86_64)}/html/index.html +88 -43
- package/coverage/{Chrome Headless 115.0.5790.98 (Linux x86_64) → Chrome Headless 117.0.5938.92 (Linux x86_64)}/html/index.ts.html +1085 -95
- package/coverage/Chrome Headless 117.0.5938.92 (Linux x86_64)/html/popOut.ts.html +377 -0
- package/coverage/Chrome Headless 117.0.5938.92 (Linux x86_64)/html/popOutBackdrop.ts.html +1046 -0
- package/coverage/Chrome Headless 117.0.5938.92 (Linux x86_64)/html/popOutButton.ts.html +374 -0
- package/coverage/{Chrome Headless 115.0.5790.98 (Linux x86_64) → Chrome Headless 117.0.5938.92 (Linux x86_64)}/html/subscribe.ts.html +218 -29
- package/coverage/Chrome Headless 117.0.5938.92 (Linux x86_64)/html/url.ts.html +284 -0
- package/dist/declarations/src/checkout.d.ts +45 -17
- package/dist/declarations/src/index.d.ts +17 -1
- package/dist/declarations/src/session.d.ts +19 -35
- package/dist/declarations/src/subscribe.d.ts +62 -0
- package/dist/dintero-checkout-web-sdk.cjs.dev.js +927 -63
- package/dist/dintero-checkout-web-sdk.cjs.prod.js +927 -63
- package/dist/dintero-checkout-web-sdk.esm.js +927 -63
- package/dist/dintero-checkout-web-sdk.umd.min.js +1 -1
- package/dist/dintero-checkout-web-sdk.umd.min.js.map +1 -1
- package/package.json +5 -5
- package/coverage/Chrome Headless 115.0.5790.98 (Linux x86_64)/html/url.ts.html +0 -185
- /package/coverage/{Chrome Headless 115.0.5790.98 (Linux x86_64) → Chrome Headless 117.0.5938.92 (Linux x86_64)}/html/base.css +0 -0
- /package/coverage/{Chrome Headless 115.0.5790.98 (Linux x86_64) → Chrome Headless 117.0.5938.92 (Linux x86_64)}/html/block-navigation.js +0 -0
- /package/coverage/{Chrome Headless 115.0.5790.98 (Linux x86_64) → Chrome Headless 117.0.5938.92 (Linux x86_64)}/html/favicon.png +0 -0
- /package/coverage/{Chrome Headless 115.0.5790.98 (Linux x86_64) → Chrome Headless 117.0.5938.92 (Linux x86_64)}/html/prettify.css +0 -0
- /package/coverage/{Chrome Headless 115.0.5790.98 (Linux x86_64) → Chrome Headless 117.0.5938.92 (Linux x86_64)}/html/prettify.js +0 -0
- /package/coverage/{Chrome Headless 115.0.5790.98 (Linux x86_64) → Chrome Headless 117.0.5938.92 (Linux x86_64)}/html/sort-arrow-sprite.png +0 -0
- /package/coverage/{Chrome Headless 115.0.5790.98 (Linux x86_64) → Chrome Headless 117.0.5938.92 (Linux x86_64)}/html/sorter.js +0 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { CheckoutEvents, InternalCheckoutEvents, SessionEvent, SessionValidationCallback } from "./checkout.js";
|
|
2
|
+
import { DinteroCheckoutInstance } from "./index.js";
|
|
3
|
+
/**
|
|
4
|
+
* Unsubscribe handler from event(s).
|
|
5
|
+
*/
|
|
6
|
+
export type SubscriptionHandler = (sessionEvent: SessionEvent, checkout: DinteroCheckoutInstance) => void;
|
|
7
|
+
interface SubscriptionOptions {
|
|
8
|
+
sid: string;
|
|
9
|
+
endpoint: string;
|
|
10
|
+
handler: SubscriptionHandler;
|
|
11
|
+
eventTypes: (CheckoutEvents | InternalCheckoutEvents)[];
|
|
12
|
+
checkout: DinteroCheckoutInstance;
|
|
13
|
+
source: Window;
|
|
14
|
+
}
|
|
15
|
+
export type Subscription = {
|
|
16
|
+
/**
|
|
17
|
+
* Unsubscribe handler from event(s).
|
|
18
|
+
*/
|
|
19
|
+
unsubscribe: () => void;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Post a SessionLock-event to the checkout iframe.
|
|
23
|
+
*/
|
|
24
|
+
export declare const postSessionLock: (iframe: HTMLIFrameElement, sid: string) => void;
|
|
25
|
+
/**
|
|
26
|
+
* Post the validation result to the checkout iframe
|
|
27
|
+
*/
|
|
28
|
+
export declare const postValidationResult: (iframe: HTMLIFrameElement, sid: string, result: SessionValidationCallback) => void;
|
|
29
|
+
/**
|
|
30
|
+
* Post RefreshSession-event to the checkout iframe.
|
|
31
|
+
*/
|
|
32
|
+
export declare const postSessionRefresh: (iframe: HTMLIFrameElement, sid: string) => void;
|
|
33
|
+
/**
|
|
34
|
+
* Post SetActivePaymentProductType-event to the checkout iframe.
|
|
35
|
+
*/
|
|
36
|
+
export declare const postActivePaymentProductType: (iframe: HTMLIFrameElement, sid: string, paymentProductType?: string) => void;
|
|
37
|
+
/**
|
|
38
|
+
* Post ClosePopOut-event to the checkout iframe.
|
|
39
|
+
*/
|
|
40
|
+
export declare const postValidatePopOutEvent: (iframe: HTMLIFrameElement, sid: string) => void;
|
|
41
|
+
/**
|
|
42
|
+
* Post OpenPopOutFailed-event to the checkout iframe.
|
|
43
|
+
*/
|
|
44
|
+
export declare const postOpenPopOutFailedEvent: (iframe: HTMLIFrameElement, sid: string) => void;
|
|
45
|
+
/**
|
|
46
|
+
* Post OpenedPopOut-event to the checkout iframe.
|
|
47
|
+
*/
|
|
48
|
+
export declare const postOpenPopOutEvent: (iframe: HTMLIFrameElement, sid: string) => void;
|
|
49
|
+
/**
|
|
50
|
+
* Post ClosePopOut-event to the checkout iframe.
|
|
51
|
+
*/
|
|
52
|
+
export declare const postClosePopOutEvent: (iframe: HTMLIFrameElement, sid: string) => void;
|
|
53
|
+
/**
|
|
54
|
+
* Post SetLanguage-event to the checkout iframe.
|
|
55
|
+
*/
|
|
56
|
+
export declare const postSetLanguage: (iframe: HTMLIFrameElement, sid: string, language: string) => void;
|
|
57
|
+
/**
|
|
58
|
+
* Subscribe to events from an iframe given a handler and a set
|
|
59
|
+
* of event types.
|
|
60
|
+
*/
|
|
61
|
+
export declare const subscribe: (options: SubscriptionOptions) => Subscription;
|
|
62
|
+
export {};
|