@whop/elements 0.0.0 → 1.0.0-beta.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/LICENSE +21 -0
- package/README.md +29 -0
- package/_framework.d.cts +179 -0
- package/_framework.d.ts +179 -0
- package/ads.d.cts +581 -0
- package/ads.d.ts +581 -0
- package/checkout.d.cts +139 -0
- package/checkout.d.ts +139 -0
- package/index.cjs +86 -0
- package/index.d.cts +61 -0
- package/index.d.ts +61 -0
- package/index.js +63 -0
- package/package.json +80 -5
- package/payments.d.cts +1142 -0
- package/payments.d.ts +1142 -0
- package/tracking.d.cts +517 -0
- package/tracking.d.ts +517 -0
- package/wallet.d.cts +1441 -0
- package/wallet.d.ts +1441 -0
- package/websites.d.cts +356 -0
- package/websites.d.ts +356 -0
package/websites.d.cts
ADDED
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Options for `whop.websites.create()`: the controller's props plus its `on<Event>` callbacks. In React, these are the `<Websites>` component's props.
|
|
3
|
+
* @example
|
|
4
|
+
* ```ts
|
|
5
|
+
* import { loadWhop } from "@whop/elements";
|
|
6
|
+
*
|
|
7
|
+
* const whop = (await loadWhop())({ locale: "en" });
|
|
8
|
+
* const websites = whop.websites.create({}); // options: props + on<Event> callbacks
|
|
9
|
+
* ```
|
|
10
|
+
* @see https://docs.whop.com/elements/latest/websites/overview
|
|
11
|
+
*/
|
|
12
|
+
export interface WebsitesOptions {
|
|
13
|
+
/**
|
|
14
|
+
* How many days of traffic the table covers, from 1 to 90. @default 30
|
|
15
|
+
* @default 30
|
|
16
|
+
*/
|
|
17
|
+
windowDays?: number;
|
|
18
|
+
/**
|
|
19
|
+
* List websites built on whop.app from the moment they exist, with zeros until traffic arrives. Turn off to show only domains the pixel reports. @default true
|
|
20
|
+
* @default true
|
|
21
|
+
*/
|
|
22
|
+
includeApps?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Websites you have just added that are not live yet — `{ domain, kind }`, where `kind` is `deploy` for a whop.app site waiting on its first deploy or `events` for a site waiting on its first pixel events. They render as waiting rows so a site never looks lost right after setup, and the table polls while any is outstanding. Sites the mounted `pixel-setup` wizard proves live are added for you, kept across a reload, and are NOT your job — this is for the waits the handle cannot see for itself, above all a whop.app site you just created, which no element here reports. Entries you add are yours to remove: a row stops being drawn once its domain reaches the table, but the list itself only changes when you change it, so drop an entry when `websitesLoaded` names its domain and give the rest a timeout of your own.
|
|
25
|
+
* @default []
|
|
26
|
+
*/
|
|
27
|
+
pendingWebsites?: PendingWebsite[];
|
|
28
|
+
/**
|
|
29
|
+
* Add a pixel-check button to each row. The element only reports the press through `onVerifyRequested` — opening the site and deciding the outcome is yours, because a popup opened by your own page is the one browsers trust.
|
|
30
|
+
* @default false
|
|
31
|
+
*/
|
|
32
|
+
showVerify?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Add a settings button to whop.app rows. The element only reports the press through `onSettingsRequested` — the editing surface is yours.
|
|
35
|
+
* @default false
|
|
36
|
+
*/
|
|
37
|
+
showSettings?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Add an edit button to whop.app rows, styled as the row’s primary action. The element only reports the press through `onEditRequested` — the editing surface is yours.
|
|
40
|
+
* @default false
|
|
41
|
+
*/
|
|
42
|
+
showEdit?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Which row the check in progress belongs to — the `target` from the `verifyRequested` event you are handling.
|
|
45
|
+
* @default ""
|
|
46
|
+
*/
|
|
47
|
+
verifyTarget?: string;
|
|
48
|
+
/**
|
|
49
|
+
* How the check in progress is going, shown on that row’s button: `waiting`, `connected`, `not-detected`, or `blocked` when the popup was blocked.
|
|
50
|
+
* @default "idle"
|
|
51
|
+
*/
|
|
52
|
+
verifyStatus?: "idle" | "waiting" | "connected" | "not-detected" | "blocked";
|
|
53
|
+
/**
|
|
54
|
+
* A scoped token for the reads — stats need `stats:read`, and the whop.app website list reads apps (rows degrade to traffic-only if the token can’t). Mint it on your server with `POST /api/v1/access_tokens` and set a fresh one before it expires. `pixel-setup` is the one child this is not projected into — it authenticates its own scans from its own `accessToken` — so mint a single token carrying both sets of scopes and pass that same string to both, rather than one token per element. Omitted, the reads carry the viewer’s own session, which only answers same-origin.
|
|
55
|
+
*/
|
|
56
|
+
accessToken?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Account ID, prefixed `biz_`, whose websites these surfaces read.
|
|
59
|
+
*/
|
|
60
|
+
accountId: string;
|
|
61
|
+
/**
|
|
62
|
+
* Runs when the grouped loading state changes. The value is `true` while any mounted element is still loading.
|
|
63
|
+
*/
|
|
64
|
+
onLoadingChange?: ((loading: boolean) => void);
|
|
65
|
+
/**
|
|
66
|
+
* Visual customization for this group's elements. Overrides the global `WhopElements({ appearance })`. Change it live with `update({ appearance })`.
|
|
67
|
+
*/
|
|
68
|
+
appearance?: import("./_framework.js").Appearance;
|
|
69
|
+
/**
|
|
70
|
+
* Locale for this group's element UI text. Set it to one of the app's built locales to override the global configuration. Any other value falls back to the default locale.
|
|
71
|
+
*/
|
|
72
|
+
locale?: import("./_framework.js").WhopElementsLocale;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Consumer props for the "websites" element. Set at create (or as `<WebsitesElement />` JSX props), and updatable live via `update()`.
|
|
77
|
+
* @see https://docs.whop.com/elements/latest/websites/websites
|
|
78
|
+
*/
|
|
79
|
+
export interface WebsitesElementProps {}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* The live handle for a mounted "websites" element. Returned by `create("websites")`; in React, the component's `ref`.
|
|
83
|
+
* @see https://docs.whop.com/elements/latest/websites/websites
|
|
84
|
+
*/
|
|
85
|
+
export interface WebsitesElementHandle {
|
|
86
|
+
/**
|
|
87
|
+
* Mounts the element in `target` and starts loading. React components mount themselves.
|
|
88
|
+
*/
|
|
89
|
+
mount: (target: string | HTMLElement) => void;
|
|
90
|
+
/**
|
|
91
|
+
* Removes the element and releases its frame and subscriptions. You can call it more than once. React removes the element automatically.
|
|
92
|
+
*/
|
|
93
|
+
destroy: () => void;
|
|
94
|
+
/**
|
|
95
|
+
* Merges new props into the mounted element. In React, change the component props instead.
|
|
96
|
+
*/
|
|
97
|
+
update: (options: Partial<WebsitesElementProps>) => void;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Options for `create("websites")`: the consumer props plus event callbacks and lifecycle hooks.
|
|
102
|
+
* @example
|
|
103
|
+
* ```ts
|
|
104
|
+
* const websites = websites.create("websites", {}); // this interface: props + on<Event> callbacks
|
|
105
|
+
* websites.mount("#websites-websites");
|
|
106
|
+
* ```
|
|
107
|
+
* @see https://docs.whop.com/elements/latest/websites/websites
|
|
108
|
+
*/
|
|
109
|
+
export interface WebsitesElementCreateOptions {
|
|
110
|
+
/**
|
|
111
|
+
* A domain row was expanded or collapsed to show or hide its pages.
|
|
112
|
+
*/
|
|
113
|
+
onWebsiteToggled?: ((payload: { domain: string; expanded: boolean; }) => void);
|
|
114
|
+
/**
|
|
115
|
+
* The table settled on a list of domains. Fires on every load, not only when the list changes, so a poll that comes back the same still reports — use it to drop any `pendingWebsites` that are now live.
|
|
116
|
+
*/
|
|
117
|
+
onWebsitesLoaded?: ((payload: { domains: string[]; }) => void);
|
|
118
|
+
/**
|
|
119
|
+
* The pixel-check button was pressed. Open `url` and watch for pixel events on your side, then push the outcome back through the handle’s `verifyStatus` so the button reflects it.
|
|
120
|
+
*/
|
|
121
|
+
onVerifyRequested?: ((payload: { target: string; url: string; }) => void);
|
|
122
|
+
/**
|
|
123
|
+
* The settings button on a whop.app row was pressed. The element only reports the click — open your own editing surface for the app.
|
|
124
|
+
*/
|
|
125
|
+
onSettingsRequested?: ((payload: { appId: string; route: string; domain: string; }) => void);
|
|
126
|
+
/**
|
|
127
|
+
* The edit button on a whop.app row was pressed. The element only reports the click — open your own editing surface for the app.
|
|
128
|
+
*/
|
|
129
|
+
onEditRequested?: ((payload: { appId: string; route: string; domain: string; }) => void);
|
|
130
|
+
/**
|
|
131
|
+
* Runs after the loading skeleton first paints and before `onReady`.
|
|
132
|
+
*/
|
|
133
|
+
onLoaderStart?: (() => void);
|
|
134
|
+
/**
|
|
135
|
+
* Runs after the element's first complete paint.
|
|
136
|
+
*/
|
|
137
|
+
onReady?: (() => void);
|
|
138
|
+
/**
|
|
139
|
+
* Runs when the element fails to load or crashes. The fallback remains visible. Use `code` for programmatic handling. `sourceKey` identifies a failed host-state source.
|
|
140
|
+
*/
|
|
141
|
+
onError?: ((e: { message: string; code?: string | undefined; sourceKey?: string | undefined; }) => void);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Consumer props for the "pixel-setup" element. Set at create (or as `<PixelSetupElement />` JSX props), and updatable live via `update()`.
|
|
146
|
+
* @see https://docs.whop.com/elements/latest/websites/pixel-setup
|
|
147
|
+
*/
|
|
148
|
+
export interface PixelSetupElementProps {
|
|
149
|
+
/**
|
|
150
|
+
* Account ID, prefixed `biz_`, whose pixel this is. Required; the snippet, scans, and invites all run against it.
|
|
151
|
+
* @default ""
|
|
152
|
+
*/
|
|
153
|
+
accountId?: string;
|
|
154
|
+
/**
|
|
155
|
+
* A scoped token for the scans and the developer invite. The scans need `company:basic:read`; “Invite a developer” additionally needs `authorized_user:create`, and the event presets read the account with `company:balance:read` (without it the wizard still works, on a generic preset list). Mint it on your server with `POST /api/v1/access_tokens` and set a fresh one before it expires. Another element that opens this wizard inside itself — the ads `campaign-creator` does — runs these calls on its own token, so add these scopes to that one token rather than minting a second: this element has no way to read a credential you set elsewhere. Omitted, the calls carry the viewer’s own session, which only answers same-origin.
|
|
156
|
+
*/
|
|
157
|
+
accessToken?: string;
|
|
158
|
+
/**
|
|
159
|
+
* The page to check, scanned on mount. Leave it blank and the wizard asks for one. Also what gates "Verify live" on the events step — that button walks the account owner through their own funnel to catch events a server-side scan cannot see, so it only appears once a destination is known, from here or named in the wizard. Read once at boot, so `update()` will not retarget mid-flow — mint a fresh mount for a different page.
|
|
160
|
+
* @default ""
|
|
161
|
+
*/
|
|
162
|
+
destinationUrl?: string;
|
|
163
|
+
/**
|
|
164
|
+
* Optional. An event that must fire on that page (`lead`, `schedule`, `view_content`, …); the events step blocks until it is detected. Unset, every event is offered and none is required. Events Whop records server-side (`purchase`, `subscribe`, trials, checkout steps) are ignored. Read once at boot.
|
|
165
|
+
* @default ""
|
|
166
|
+
*/
|
|
167
|
+
eventName?: string;
|
|
168
|
+
/**
|
|
169
|
+
* A URL the destination redirects to, when the event fires there instead. The account owner can also set one in the wizard — listen for `redirectUrlChanged` and pass it back next time.
|
|
170
|
+
* @default ""
|
|
171
|
+
*/
|
|
172
|
+
redirectUrl?: string;
|
|
173
|
+
/**
|
|
174
|
+
* Where the wizard opens: the install step, or straight onto `events` when the pixel is already there and only the conversion event is missing.
|
|
175
|
+
* @default "install"
|
|
176
|
+
*/
|
|
177
|
+
initialStep?: "events" | "install";
|
|
178
|
+
/**
|
|
179
|
+
* Open on the "why a pixel" splash. Turn it off where the account owner already knows why they are here — a campaign flow that sends them in mid-launch — and the wizard opens straight on the install step.
|
|
180
|
+
* @default true
|
|
181
|
+
*/
|
|
182
|
+
showIntro?: boolean;
|
|
183
|
+
/**
|
|
184
|
+
* Offer the "Invite a developer to install it" path. Hide it where the people using your embed should not be inviting members onto the Whop team behind it.
|
|
185
|
+
* @default true
|
|
186
|
+
*/
|
|
187
|
+
showInviteDeveloper?: boolean;
|
|
188
|
+
/**
|
|
189
|
+
* Show the "your pixel is live" screen after a page checks out, which offers conversion events as the next thing to do. Turn it off where the account owner came for the events themselves — a passing check then goes straight to them instead of pausing on a screen they would click through.
|
|
190
|
+
* @default true
|
|
191
|
+
*/
|
|
192
|
+
showOptimizePrompt?: boolean;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* The live handle for a mounted "pixel-setup" element. Returned by `create("pixel-setup")`; in React, the component's `ref`.
|
|
197
|
+
* @see https://docs.whop.com/elements/latest/websites/pixel-setup
|
|
198
|
+
*/
|
|
199
|
+
export interface PixelSetupElementHandle {
|
|
200
|
+
/**
|
|
201
|
+
* Mounts the element in `target` and starts loading. React components mount themselves.
|
|
202
|
+
*/
|
|
203
|
+
mount: (target: string | HTMLElement) => void;
|
|
204
|
+
/**
|
|
205
|
+
* Removes the element and releases its frame and subscriptions. You can call it more than once. React removes the element automatically.
|
|
206
|
+
*/
|
|
207
|
+
destroy: () => void;
|
|
208
|
+
/**
|
|
209
|
+
* Merges new props into the mounted element. In React, change the component props instead.
|
|
210
|
+
*/
|
|
211
|
+
update: (options: Partial<PixelSetupElementProps>) => void;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Options for `create("pixel-setup")`: the consumer props plus event callbacks and lifecycle hooks.
|
|
216
|
+
* @example
|
|
217
|
+
* ```ts
|
|
218
|
+
* const pixel_setup = websites.create("pixel-setup", {}); // this interface: props + on<Event> callbacks
|
|
219
|
+
* pixel_setup.mount("#websites-pixel-setup");
|
|
220
|
+
* ```
|
|
221
|
+
* @see https://docs.whop.com/elements/latest/websites/pixel-setup
|
|
222
|
+
*/
|
|
223
|
+
export interface PixelSetupElementCreateOptions {
|
|
224
|
+
/**
|
|
225
|
+
* Account ID, prefixed `biz_`, whose pixel this is. Required; the snippet, scans, and invites all run against it.
|
|
226
|
+
* @default ""
|
|
227
|
+
*/
|
|
228
|
+
accountId?: string;
|
|
229
|
+
/**
|
|
230
|
+
* A scoped token for the scans and the developer invite. The scans need `company:basic:read`; “Invite a developer” additionally needs `authorized_user:create`, and the event presets read the account with `company:balance:read` (without it the wizard still works, on a generic preset list). Mint it on your server with `POST /api/v1/access_tokens` and set a fresh one before it expires. Another element that opens this wizard inside itself — the ads `campaign-creator` does — runs these calls on its own token, so add these scopes to that one token rather than minting a second: this element has no way to read a credential you set elsewhere. Omitted, the calls carry the viewer’s own session, which only answers same-origin.
|
|
231
|
+
*/
|
|
232
|
+
accessToken?: string;
|
|
233
|
+
/**
|
|
234
|
+
* The page to check, scanned on mount. Leave it blank and the wizard asks for one. Also what gates "Verify live" on the events step — that button walks the account owner through their own funnel to catch events a server-side scan cannot see, so it only appears once a destination is known, from here or named in the wizard. Read once at boot, so `update()` will not retarget mid-flow — mint a fresh mount for a different page.
|
|
235
|
+
* @default ""
|
|
236
|
+
*/
|
|
237
|
+
destinationUrl?: string;
|
|
238
|
+
/**
|
|
239
|
+
* Optional. An event that must fire on that page (`lead`, `schedule`, `view_content`, …); the events step blocks until it is detected. Unset, every event is offered and none is required. Events Whop records server-side (`purchase`, `subscribe`, trials, checkout steps) are ignored. Read once at boot.
|
|
240
|
+
* @default ""
|
|
241
|
+
*/
|
|
242
|
+
eventName?: string;
|
|
243
|
+
/**
|
|
244
|
+
* A URL the destination redirects to, when the event fires there instead. The account owner can also set one in the wizard — listen for `redirectUrlChanged` and pass it back next time.
|
|
245
|
+
* @default ""
|
|
246
|
+
*/
|
|
247
|
+
redirectUrl?: string;
|
|
248
|
+
/**
|
|
249
|
+
* Where the wizard opens: the install step, or straight onto `events` when the pixel is already there and only the conversion event is missing.
|
|
250
|
+
* @default "install"
|
|
251
|
+
*/
|
|
252
|
+
initialStep?: "events" | "install";
|
|
253
|
+
/**
|
|
254
|
+
* Open on the "why a pixel" splash. Turn it off where the account owner already knows why they are here — a campaign flow that sends them in mid-launch — and the wizard opens straight on the install step.
|
|
255
|
+
* @default true
|
|
256
|
+
*/
|
|
257
|
+
showIntro?: boolean;
|
|
258
|
+
/**
|
|
259
|
+
* Offer the "Invite a developer to install it" path. Hide it where the people using your embed should not be inviting members onto the Whop team behind it.
|
|
260
|
+
* @default true
|
|
261
|
+
*/
|
|
262
|
+
showInviteDeveloper?: boolean;
|
|
263
|
+
/**
|
|
264
|
+
* Show the "your pixel is live" screen after a page checks out, which offers conversion events as the next thing to do. Turn it off where the account owner came for the events themselves — a passing check then goes straight to them instead of pausing on a screen they would click through.
|
|
265
|
+
* @default true
|
|
266
|
+
*/
|
|
267
|
+
showOptimizePrompt?: boolean;
|
|
268
|
+
/**
|
|
269
|
+
* The account owner set or cleared a redirect URL in the wizard. Persist it and pass it back as `redirectUrl` next time.
|
|
270
|
+
*/
|
|
271
|
+
onRedirectUrlChanged?: ((payload: { url: string; }) => void);
|
|
272
|
+
/**
|
|
273
|
+
* A pixel scan settled. Fires for every URL the wizard checks, so your own install badge can follow it. `primary` marks the page being set up: the funnel checker scans whatever else the account owner lists, other hostnames included, so gate on it before you treat a result as being about their site. You do not need this to keep a `websites` table honest — mounted under that handle, a site proven live already gets its waiting row.
|
|
274
|
+
*/
|
|
275
|
+
onScanned?: ((payload: { url: string; status: "installed" | "missing" | "unreachable"; installed: boolean; primary: boolean; }) => void);
|
|
276
|
+
/**
|
|
277
|
+
* Done was pressed. Re-check the page yourself — this says the wizard finished, not that your requirements are met.
|
|
278
|
+
*/
|
|
279
|
+
onFinished?: ((payload: Record<string, never>) => void);
|
|
280
|
+
/**
|
|
281
|
+
* The account owner walked their funnel with "Verify live" and this event fired — proof it is wired where a server-side scan cannot reach.
|
|
282
|
+
*/
|
|
283
|
+
onEventVerified?: ((payload: { url: string; event: string; }) => void);
|
|
284
|
+
/**
|
|
285
|
+
* Runs after the loading skeleton first paints and before `onReady`.
|
|
286
|
+
*/
|
|
287
|
+
onLoaderStart?: (() => void);
|
|
288
|
+
/**
|
|
289
|
+
* Runs after the element's first complete paint.
|
|
290
|
+
*/
|
|
291
|
+
onReady?: (() => void);
|
|
292
|
+
/**
|
|
293
|
+
* Runs when the element fails to load or crashes. The fallback remains visible. Use `code` for programmatic handling. `sourceKey` identifies a failed host-state source.
|
|
294
|
+
*/
|
|
295
|
+
onError?: ((e: { message: string; code?: string | undefined; sourceKey?: string | undefined; }) => void);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* The overlay handle for "pixel-setup". Returned by `createOverlay("pixel-setup")`; drives the modal presentation imperatively.
|
|
300
|
+
* @see https://docs.whop.com/elements/latest/websites/pixel-setup
|
|
301
|
+
*/
|
|
302
|
+
export interface PixelSetupElementOverlayHandle {
|
|
303
|
+
/**
|
|
304
|
+
* Open the overlay. The first call mounts the element. Later calls reuse it.
|
|
305
|
+
*/
|
|
306
|
+
open(): void;
|
|
307
|
+
/**
|
|
308
|
+
* Close the overlay without destroying it. Keep the handle and `open()` again.
|
|
309
|
+
*/
|
|
310
|
+
close(): void;
|
|
311
|
+
/**
|
|
312
|
+
* Removes the element and releases its frame and subscriptions. You can call it more than once. React removes the element automatically.
|
|
313
|
+
*/
|
|
314
|
+
destroy(): void;
|
|
315
|
+
/**
|
|
316
|
+
* Merges new props into the mounted element. In React, change the component props instead.
|
|
317
|
+
*/
|
|
318
|
+
update(options: Partial<PixelSetupElementProps>): void;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* The Websites handle, returned by `whop.websites.create()` (React: `useWebsites()`). Mounts the elements and carries the controller's actions.
|
|
323
|
+
* @see https://docs.whop.com/elements/latest/websites/overview
|
|
324
|
+
*/
|
|
325
|
+
export interface WebsitesHandle {
|
|
326
|
+
/**
|
|
327
|
+
* An account's websites in one table: every site built on whop.app — listed from the moment it exists, zeros until traffic arrives — merged by hostname with every domain the Whop Pixel reports. Rows for the whop.app sites carry a Whop mark, so the two sources stay apart even when both have traffic. Each row shows a page-view trend, unique visitors, page views, attributed sales, USD revenue, and the last day an event arrived. Expanding a domain loads its most-viewed pages, and each page-view figure opens the breakdown of which events made it up. Set `showVerify` to add a per-row button that asks the page hosting this element to open the site and confirm the pixel is firing; set `showSettings` to add a settings button on whop.app rows that reports the click through `onSettingsRequested`, and `showEdit` to add a primary edit button reporting through `onEditRequested` — your page owns the actual editing.
|
|
328
|
+
*/
|
|
329
|
+
create(name: "websites", options?: WebsitesElementCreateOptions): WebsitesElementHandle;
|
|
330
|
+
/**
|
|
331
|
+
* Installs the Whop Pixel and wires conversion events: copy the snippet, check a page for it, confirm the events fire. Mount it inline, or inside your own overlay.
|
|
332
|
+
*/
|
|
333
|
+
create(name: "pixel-setup", options?: PixelSetupElementCreateOptions): PixelSetupElementHandle;
|
|
334
|
+
/**
|
|
335
|
+
* Installs the Whop Pixel and wires conversion events: copy the snippet, check a page for it, confirm the events fire. Mount it inline, or inside your own overlay.
|
|
336
|
+
*/
|
|
337
|
+
createOverlay(name: "pixel-setup", options?: PixelSetupElementCreateOptions): PixelSetupElementOverlayHandle;
|
|
338
|
+
/**
|
|
339
|
+
* Merges new handle options into every mounted element. In React, change the namespace props instead.
|
|
340
|
+
*/
|
|
341
|
+
update(options: Partial<WebsitesOptions>): void;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* Websites's static actions, callable with nothing mounted: `whop.websites.<method>()` (React: `useWhop().websites.<method>()`).
|
|
346
|
+
* @see https://docs.whop.com/elements/latest/websites/overview
|
|
347
|
+
*/
|
|
348
|
+
export interface WebsitesStatics {}
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* Declared from the app's `PendingWebsite`, referenced by a host-capability surface.
|
|
352
|
+
*/
|
|
353
|
+
export interface PendingWebsite {
|
|
354
|
+
domain: string;
|
|
355
|
+
kind: "events" | "deploy";
|
|
356
|
+
}
|