-
Notifications
You must be signed in to change notification settings - Fork 88
/
shims.d.ts
41 lines (38 loc) · 1.11 KB
/
shims.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
interface Window {
createLemonSqueezy: () => void;
LemonSqueezy: {
/**
* Initialises Lemon.js on your page.
* @param options - An object with a single property, eventHandler, which is a function that will be called when Lemon.js emits an event.
*/
Setup: (options: {
eventHandler: (event: { event: string }) => void;
}) => void;
/**
* Refreshes `lemonsqueezy-button` listeners on the page.
*/
Refresh: () => void;
Url: {
/**
* Opens a given Lemon Squeezy URL, typically these are Checkout or Payment Details Update overlays.
* @param url - The URL to open.
*/
Open: (url: string) => void;
/**
* Closes the current opened Lemon Squeezy overlay checkout window.
*/
Close: () => void;
};
Affiliate: {
/**
* Retrieve the affiliate tracking ID
*/
GetID: () => string;
/**
* Append the affiliate tracking parameter to the given URL
* @param url - The URL to append the affiliate tracking parameter to.
*/
Build: (url: string) => string;
};
};
}