-
Notifications
You must be signed in to change notification settings - Fork 8
/
shims.d.ts
49 lines (46 loc) · 1.41 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
42
43
44
45
46
47
48
49
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
}
}
}
interface CloudflareEnv {
// The DB Namespace binding type used here comes
// from `@cloudflare/workers-types`. To use it in such
// a way make sure that you have installed the package
// as a dev dependency and you have added it to your
// `tsconfig.json` file under `compilerOptions.types`.
DB: D1Database
}