palbase 0.71.0 → 0.73.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/dist/ai/index.js +2 -2
- package/dist/ai-sdk/index.js +2 -2
- package/dist/backend/engine.js +2 -2
- package/dist/backend/env.js +1 -1
- package/dist/backend/index.js +8 -8
- package/dist/backend/stack.js +1 -1
- package/dist/backend/test.js +2 -2
- package/dist/chunks/{NNFT2MAJ.js → 25HECIZY.js} +1 -1
- package/dist/chunks/{WYZDZ7QZ.js → 3DUDNEMM.js} +2 -2
- package/dist/chunks/4XSSQAES.js +95 -0
- package/dist/chunks/{C7I5HJWB.js → 5OOA4R4H.js} +1 -1
- package/dist/chunks/{6I2XBWUM.js → 757A6AR6.js} +2 -2
- package/dist/chunks/76W5ZO2L.js +2 -0
- package/dist/chunks/{KWAJFRHM.js → CY6KUFZW.js} +2 -2
- package/dist/chunks/DIQMCEMJ.js +19 -0
- package/dist/chunks/{NWKQOVQV.js → EKOEK6LR.js} +2 -2
- package/dist/chunks/{P2PPTVZS.js → IICQMY2Z.js} +2 -2
- package/dist/chunks/{5EP5JREH.js → J7Z2PYL4.js} +1 -1
- package/dist/chunks/{6G26LJYB.js → J7ZNBBRN.js} +1 -1
- package/dist/chunks/{AVLXOKYL.js → JG4V6LNY.js} +2 -2
- package/dist/chunks/{STC7LMPR.js → LCDNCPQW.js} +1 -1
- package/dist/chunks/{FHSOCZK5.js → MVKZWEHL.js} +2 -2
- package/dist/chunks/{WDNAIUED.js → P36C47FS.js} +1 -1
- package/dist/chunks/{WMXNVSHQ.js → P4NZ4NZD.js} +2 -2
- package/dist/chunks/{F5D2WPY6.js → PAQCJT7M.js} +2 -2
- package/dist/chunks/{P2ZR3LIZ.js → PEQZDT6P.js} +2 -2
- package/dist/chunks/SMECWMF7.js +2 -0
- package/dist/chunks/SRN7N2WX.js +13 -0
- package/dist/chunks/UFP6GLLW.js +23 -0
- package/dist/chunks/{4RTYKYU6.js → VEL7X2G3.js} +2 -2
- package/dist/chunks/{6DOVOQD7.js → YMIK6HLK.js} +2 -2
- package/dist/cli.js +347 -347
- package/dist/cloud/index.js +2 -2
- package/dist/refuse/ai-sdk.js +1 -1
- package/dist/refuse/ai.js +1 -1
- package/dist/refuse/backend.js +1 -1
- package/dist/refuse/cloud.js +1 -1
- package/dist/refuse/server.js +1 -1
- package/dist/server/index.js +2 -2
- package/dist/server/testing.js +2 -2
- package/dist/web/index.js +2 -2
- package/dist/web/message.js +2 -2
- package/dist/web/palbe.js +2 -2
- package/dist/web/payments-ui.js +2 -2
- package/dist/web/paywall.js +2 -2
- package/dist/web/push-sw.js +1 -1
- package/dist/web/ssr.js +2 -2
- package/dist/web/vite.js +2 -2
- package/package.json +2 -2
- package/types/backend/src/index.d.ts +1 -1
- package/types/backend/src/services.d.ts +78 -0
- package/types/cloud/src/generated/project.d.ts +4 -2
- package/types/internal/src/modules/analytics.d.ts +58 -4
- package/types/internal/src/modules/campaigns.d.ts +616 -0
- package/types/internal/src/modules/commerce.d.ts +4244 -0
- package/types/internal/src/modules/events.d.ts +5 -3
- package/types/internal/src/modules/index.d.ts +2 -0
- package/types/internal/src/modules/journeys.d.ts +145 -0
- package/types/internal/src/modules/notify.d.ts +7 -6
- package/types/internal/src/modules/payments.d.ts +851 -2
- package/types/server/src/campaigns.d.ts +31 -0
- package/types/server/src/commerce.d.ts +78 -0
- package/types/server/src/index.d.ts +3 -1
- package/types/server/src/payments.d.ts +6 -0
- package/types/server/src/server.d.ts +6 -0
- package/types/web/src/campaigns.d.ts +59 -0
- package/types/web/src/client.d.ts +6 -0
- package/types/web/src/commerce.d.ts +130 -0
- package/types/web/src/inapp.d.ts +4 -0
- package/types/web/src/index.d.ts +2 -0
- package/types/web/src/screen/render.d.ts +6 -1
- package/types/web/src/screen/resolve.d.ts +10 -0
- package/dist/chunks/AYPODLGK.js +0 -23
- package/dist/chunks/E3JCXDTW.js +0 -2
- package/dist/chunks/LCZZSEYY.js +0 -2
- package/dist/chunks/PZEHNKUJ.js +0 -95
- package/dist/chunks/S6FTHDCG.js +0 -13
- package/dist/chunks/WL7Z55QJ.js +0 -13
|
@@ -0,0 +1,616 @@
|
|
|
1
|
+
import { type Reply, type Transport } from '../transport.js';
|
|
2
|
+
export type Broadcast = {
|
|
3
|
+
attributed_currency?: string;
|
|
4
|
+
attributed_revenue?: number;
|
|
5
|
+
audience_id: string;
|
|
6
|
+
channel: string;
|
|
7
|
+
completed_at?: string | null;
|
|
8
|
+
conversion_event?: string;
|
|
9
|
+
conversion_window_hours?: number;
|
|
10
|
+
created_at?: string;
|
|
11
|
+
holdout_bps?: number;
|
|
12
|
+
id: string;
|
|
13
|
+
incentive?: Incentive;
|
|
14
|
+
local_time?: string | null;
|
|
15
|
+
name: string;
|
|
16
|
+
on_promo_exhausted?: string;
|
|
17
|
+
rate_limit_per_sec?: number;
|
|
18
|
+
scheduled_at?: string | null;
|
|
19
|
+
started_at?: string | null;
|
|
20
|
+
status: string;
|
|
21
|
+
total_converted?: number;
|
|
22
|
+
total_holdout?: number;
|
|
23
|
+
total_sent?: number;
|
|
24
|
+
total_targeted?: number;
|
|
25
|
+
updated_at?: string;
|
|
26
|
+
variants: BroadcastVariant[];
|
|
27
|
+
};
|
|
28
|
+
export type BroadcastArmStats = {
|
|
29
|
+
converted: number;
|
|
30
|
+
key: string;
|
|
31
|
+
revenue: number;
|
|
32
|
+
sent: number;
|
|
33
|
+
};
|
|
34
|
+
export type BroadcastConversionResult = {
|
|
35
|
+
attributed_broadcast_ids: string[];
|
|
36
|
+
};
|
|
37
|
+
export type BroadcastConversionWrite = {
|
|
38
|
+
event?: string;
|
|
39
|
+
subject?: string;
|
|
40
|
+
user_id?: string;
|
|
41
|
+
value?: number;
|
|
42
|
+
};
|
|
43
|
+
export type BroadcastList = {
|
|
44
|
+
broadcasts: Broadcast[];
|
|
45
|
+
};
|
|
46
|
+
export type BroadcastStats = {
|
|
47
|
+
attributed_revenue?: number;
|
|
48
|
+
broadcast_id: string;
|
|
49
|
+
holdout_converted?: number;
|
|
50
|
+
status: string;
|
|
51
|
+
total_converted?: number;
|
|
52
|
+
total_holdout?: number;
|
|
53
|
+
total_sent?: number;
|
|
54
|
+
total_targeted?: number;
|
|
55
|
+
variants: BroadcastArmStats[];
|
|
56
|
+
};
|
|
57
|
+
export type BroadcastVariant = {
|
|
58
|
+
body?: string;
|
|
59
|
+
key: string;
|
|
60
|
+
locale?: string;
|
|
61
|
+
template?: string;
|
|
62
|
+
title?: {
|
|
63
|
+
[key: string]: string;
|
|
64
|
+
};
|
|
65
|
+
variables?: {
|
|
66
|
+
[key: string]: string;
|
|
67
|
+
};
|
|
68
|
+
weight: number;
|
|
69
|
+
};
|
|
70
|
+
export type BroadcastWrite = {
|
|
71
|
+
attributed_currency?: string;
|
|
72
|
+
audience_id: string;
|
|
73
|
+
channel: "email" | "sms" | "whatsapp" | "push" | "inbox";
|
|
74
|
+
conversion_event?: string;
|
|
75
|
+
conversion_window_hours?: number;
|
|
76
|
+
holdout_bps?: number;
|
|
77
|
+
incentive?: Incentive;
|
|
78
|
+
local_time?: string;
|
|
79
|
+
name: string;
|
|
80
|
+
on_promo_exhausted?: "pause" | "skip" | "send_without_promo";
|
|
81
|
+
rate_limit_per_sec?: number;
|
|
82
|
+
scheduled_at?: string;
|
|
83
|
+
variants: BroadcastVariant[];
|
|
84
|
+
};
|
|
85
|
+
export type CampaignEventPayload = {
|
|
86
|
+
[key: string]: unknown;
|
|
87
|
+
};
|
|
88
|
+
export type ErrorResponse = {
|
|
89
|
+
error: string;
|
|
90
|
+
error_description: string;
|
|
91
|
+
request_id: string;
|
|
92
|
+
status: number;
|
|
93
|
+
};
|
|
94
|
+
export type Incentive = {
|
|
95
|
+
coupon_key?: string;
|
|
96
|
+
kind: "commerce_promo" | "iap_coupon" | "iap_offer";
|
|
97
|
+
offer_key?: string;
|
|
98
|
+
prefix?: string;
|
|
99
|
+
rule_id?: string;
|
|
100
|
+
};
|
|
101
|
+
export type LinkAttributeResult = {
|
|
102
|
+
attributed: boolean;
|
|
103
|
+
link_id: string;
|
|
104
|
+
};
|
|
105
|
+
export type LinkAttributeWrite = {
|
|
106
|
+
click_token?: string;
|
|
107
|
+
slug?: string;
|
|
108
|
+
value?: number;
|
|
109
|
+
};
|
|
110
|
+
export type OnSiteCampaign = {
|
|
111
|
+
audience_id?: string | null;
|
|
112
|
+
conversion?: {
|
|
113
|
+
[key: string]: unknown;
|
|
114
|
+
};
|
|
115
|
+
coupon?: string | null;
|
|
116
|
+
created_at?: string;
|
|
117
|
+
definition?: {
|
|
118
|
+
[key: string]: unknown;
|
|
119
|
+
};
|
|
120
|
+
ends_at?: string | null;
|
|
121
|
+
for_journeys?: boolean;
|
|
122
|
+
id: string;
|
|
123
|
+
incentive?: Incentive;
|
|
124
|
+
key: string;
|
|
125
|
+
limits?: {
|
|
126
|
+
[key: string]: unknown;
|
|
127
|
+
};
|
|
128
|
+
name: string;
|
|
129
|
+
platforms: string[];
|
|
130
|
+
priority?: number;
|
|
131
|
+
screen?: {
|
|
132
|
+
[key: string]: unknown;
|
|
133
|
+
};
|
|
134
|
+
starts_at?: string | null;
|
|
135
|
+
status: string;
|
|
136
|
+
surface: string;
|
|
137
|
+
trigger?: {
|
|
138
|
+
[key: string]: unknown;
|
|
139
|
+
};
|
|
140
|
+
trigger_event?: string;
|
|
141
|
+
trigger_filter?: {
|
|
142
|
+
[key: string]: string;
|
|
143
|
+
};
|
|
144
|
+
updated_at?: string;
|
|
145
|
+
variables?: {
|
|
146
|
+
[key: string]: string;
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
export type OnSiteCampaignList = {
|
|
150
|
+
campaigns: OnSiteCampaign[];
|
|
151
|
+
};
|
|
152
|
+
export type OnSiteCampaignWrite = {
|
|
153
|
+
audience_id?: string | null;
|
|
154
|
+
conversion?: {
|
|
155
|
+
[key: string]: unknown;
|
|
156
|
+
};
|
|
157
|
+
coupon?: string | null;
|
|
158
|
+
definition?: {
|
|
159
|
+
[key: string]: unknown;
|
|
160
|
+
};
|
|
161
|
+
ends_at?: string | null;
|
|
162
|
+
for_journeys?: boolean;
|
|
163
|
+
incentive?: Incentive;
|
|
164
|
+
key?: string;
|
|
165
|
+
limits?: {
|
|
166
|
+
[key: string]: unknown;
|
|
167
|
+
};
|
|
168
|
+
max_per_user?: number;
|
|
169
|
+
min_hours_between?: number;
|
|
170
|
+
name: string;
|
|
171
|
+
platforms?: string[];
|
|
172
|
+
priority?: number;
|
|
173
|
+
screen?: {
|
|
174
|
+
[key: string]: unknown;
|
|
175
|
+
};
|
|
176
|
+
starts_at?: string | null;
|
|
177
|
+
status?: string;
|
|
178
|
+
surface?: string;
|
|
179
|
+
trigger?: {
|
|
180
|
+
[key: string]: unknown;
|
|
181
|
+
};
|
|
182
|
+
trigger_event?: string;
|
|
183
|
+
trigger_filter?: {
|
|
184
|
+
[key: string]: string;
|
|
185
|
+
};
|
|
186
|
+
variables?: {
|
|
187
|
+
[key: string]: string;
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
export type OnSiteEventWrite = {
|
|
191
|
+
action?: string;
|
|
192
|
+
type: "clicked" | "dismissed" | "converted";
|
|
193
|
+
};
|
|
194
|
+
export type OnSiteImpression = {
|
|
195
|
+
id: string;
|
|
196
|
+
variables?: {
|
|
197
|
+
[key: string]: string;
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
export type OnSiteImpressionWrite = {
|
|
201
|
+
campaign_id: string;
|
|
202
|
+
installation_id?: string;
|
|
203
|
+
session_id: string;
|
|
204
|
+
};
|
|
205
|
+
export type OnSiteMessage = {
|
|
206
|
+
[key: string]: unknown;
|
|
207
|
+
};
|
|
208
|
+
export type OnSiteMessageList = {
|
|
209
|
+
limits: OnSiteSettings;
|
|
210
|
+
messages: OnSiteMessage[];
|
|
211
|
+
shown: {
|
|
212
|
+
[key: string]: unknown;
|
|
213
|
+
};
|
|
214
|
+
};
|
|
215
|
+
export type OnSiteSettings = {
|
|
216
|
+
min_minutes: number;
|
|
217
|
+
per_day: number;
|
|
218
|
+
per_session: number;
|
|
219
|
+
};
|
|
220
|
+
export type OnSiteStats = {
|
|
221
|
+
clicked: number;
|
|
222
|
+
converted: number;
|
|
223
|
+
dismissed: number;
|
|
224
|
+
people: number;
|
|
225
|
+
shown: number;
|
|
226
|
+
};
|
|
227
|
+
export type OnSiteTemplate = {
|
|
228
|
+
[key: string]: unknown;
|
|
229
|
+
};
|
|
230
|
+
export type OnSiteTemplateList = {
|
|
231
|
+
templates: OnSiteTemplate[];
|
|
232
|
+
};
|
|
233
|
+
export type TrackingLink = {
|
|
234
|
+
attributed_revenue?: number;
|
|
235
|
+
clicks?: number;
|
|
236
|
+
conversions?: number;
|
|
237
|
+
cookieless?: boolean;
|
|
238
|
+
created_at?: string;
|
|
239
|
+
id: string;
|
|
240
|
+
name: string;
|
|
241
|
+
promo_code?: string;
|
|
242
|
+
slug: string;
|
|
243
|
+
store_id?: string | null;
|
|
244
|
+
target_url: string;
|
|
245
|
+
updated_at?: string;
|
|
246
|
+
utm_campaign?: string;
|
|
247
|
+
utm_content?: string;
|
|
248
|
+
utm_medium?: string;
|
|
249
|
+
utm_source?: string;
|
|
250
|
+
};
|
|
251
|
+
export type TrackingLinkList = {
|
|
252
|
+
links: TrackingLink[];
|
|
253
|
+
};
|
|
254
|
+
export type TrackingLinkStats = {
|
|
255
|
+
attributed_revenue: number;
|
|
256
|
+
bot_clicks: number;
|
|
257
|
+
clicks: number;
|
|
258
|
+
conversions: number;
|
|
259
|
+
link_id: string;
|
|
260
|
+
};
|
|
261
|
+
export type TrackingLinkWrite = {
|
|
262
|
+
cookieless?: boolean;
|
|
263
|
+
name: string;
|
|
264
|
+
promo_code?: string;
|
|
265
|
+
slug: string;
|
|
266
|
+
store_id?: string | null;
|
|
267
|
+
target_url: string;
|
|
268
|
+
utm_campaign?: string;
|
|
269
|
+
utm_content?: string;
|
|
270
|
+
utm_medium?: string;
|
|
271
|
+
utm_source?: string;
|
|
272
|
+
};
|
|
273
|
+
/** The events this module sends the project's webhooks (x-palbase-events), by type: each one's payload, the event's data. */
|
|
274
|
+
export interface Events {
|
|
275
|
+
/**
|
|
276
|
+
* A broadcast was canceled.
|
|
277
|
+
*/
|
|
278
|
+
"campaigns.broadcast.canceled": CampaignEventPayload;
|
|
279
|
+
/**
|
|
280
|
+
* A broadcast completed dispatching.
|
|
281
|
+
*/
|
|
282
|
+
"campaigns.broadcast.completed": CampaignEventPayload;
|
|
283
|
+
/**
|
|
284
|
+
* A broadcast started dispatching.
|
|
285
|
+
*/
|
|
286
|
+
"campaigns.broadcast.started": CampaignEventPayload;
|
|
287
|
+
/**
|
|
288
|
+
* An on-site / in-app campaign CTA was clicked.
|
|
289
|
+
*/
|
|
290
|
+
"campaigns.onsite.clicked": CampaignEventPayload;
|
|
291
|
+
/**
|
|
292
|
+
* An on-site / in-app campaign converted.
|
|
293
|
+
*/
|
|
294
|
+
"campaigns.onsite.converted": CampaignEventPayload;
|
|
295
|
+
/**
|
|
296
|
+
* An on-site / in-app campaign was shown.
|
|
297
|
+
*/
|
|
298
|
+
"campaigns.onsite.shown": CampaignEventPayload;
|
|
299
|
+
}
|
|
300
|
+
/** Palbase Campaigns API */
|
|
301
|
+
export declare function client(t: Transport): {
|
|
302
|
+
/**
|
|
303
|
+
* List broadcasts
|
|
304
|
+
*
|
|
305
|
+
* Lists project broadcasts.
|
|
306
|
+
*/
|
|
307
|
+
listBroadcasts(input?: {
|
|
308
|
+
signal?: AbortSignal;
|
|
309
|
+
}): Promise<Reply<200, BroadcastList>>;
|
|
310
|
+
/**
|
|
311
|
+
* Create broadcast
|
|
312
|
+
*
|
|
313
|
+
* Creates a draft or scheduled broadcast.
|
|
314
|
+
*/
|
|
315
|
+
createBroadcast(input: {
|
|
316
|
+
body: BroadcastWrite; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
317
|
+
signal?: AbortSignal;
|
|
318
|
+
}): Promise<Reply<201, Broadcast>>;
|
|
319
|
+
/**
|
|
320
|
+
* Record broadcast conversion
|
|
321
|
+
*
|
|
322
|
+
* Attributes a conversion event to recent broadcast recipients (including holdout lift).
|
|
323
|
+
*/
|
|
324
|
+
recordBroadcastConversion(input: {
|
|
325
|
+
body: BroadcastConversionWrite; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
326
|
+
signal?: AbortSignal;
|
|
327
|
+
}): Promise<Reply<200, BroadcastConversionResult>>;
|
|
328
|
+
/**
|
|
329
|
+
* Get broadcast
|
|
330
|
+
*
|
|
331
|
+
* Gets a broadcast by id.
|
|
332
|
+
*/
|
|
333
|
+
getBroadcast(input: {
|
|
334
|
+
path: {
|
|
335
|
+
id: string;
|
|
336
|
+
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
337
|
+
signal?: AbortSignal;
|
|
338
|
+
}): Promise<Reply<200, Broadcast>>;
|
|
339
|
+
/**
|
|
340
|
+
* Update broadcast
|
|
341
|
+
*
|
|
342
|
+
* Updates a draft, scheduled, or paused broadcast.
|
|
343
|
+
*/
|
|
344
|
+
updateBroadcast(input: {
|
|
345
|
+
path: {
|
|
346
|
+
id: string;
|
|
347
|
+
};
|
|
348
|
+
body: BroadcastWrite; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
349
|
+
signal?: AbortSignal;
|
|
350
|
+
}): Promise<Reply<200, Broadcast>>;
|
|
351
|
+
/**
|
|
352
|
+
* Delete broadcast
|
|
353
|
+
*
|
|
354
|
+
* Deletes a broadcast.
|
|
355
|
+
*/
|
|
356
|
+
deleteBroadcast(input: {
|
|
357
|
+
path: {
|
|
358
|
+
id: string;
|
|
359
|
+
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
360
|
+
signal?: AbortSignal;
|
|
361
|
+
}): Promise<Reply<204, undefined>>;
|
|
362
|
+
/**
|
|
363
|
+
* Cancel broadcast
|
|
364
|
+
*
|
|
365
|
+
* Cancels a broadcast and notifies notify to cancel queued batches.
|
|
366
|
+
*/
|
|
367
|
+
cancelBroadcast(input: {
|
|
368
|
+
path: {
|
|
369
|
+
id: string;
|
|
370
|
+
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
371
|
+
signal?: AbortSignal;
|
|
372
|
+
}): Promise<Reply<200, Broadcast>>;
|
|
373
|
+
/**
|
|
374
|
+
* Pause broadcast
|
|
375
|
+
*
|
|
376
|
+
* Pauses a running broadcast.
|
|
377
|
+
*/
|
|
378
|
+
pauseBroadcast(input: {
|
|
379
|
+
path: {
|
|
380
|
+
id: string;
|
|
381
|
+
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
382
|
+
signal?: AbortSignal;
|
|
383
|
+
}): Promise<Reply<200, Broadcast>>;
|
|
384
|
+
/**
|
|
385
|
+
* Start broadcast
|
|
386
|
+
*
|
|
387
|
+
* Starts dispatching a broadcast.
|
|
388
|
+
*/
|
|
389
|
+
startBroadcast(input: {
|
|
390
|
+
path: {
|
|
391
|
+
id: string;
|
|
392
|
+
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
393
|
+
signal?: AbortSignal;
|
|
394
|
+
}): Promise<Reply<200, Broadcast>>;
|
|
395
|
+
/**
|
|
396
|
+
* Get broadcast stats
|
|
397
|
+
*
|
|
398
|
+
* Gets broadcast delivery, holdout, and variant conversion metrics.
|
|
399
|
+
*/
|
|
400
|
+
getBroadcastStats(input: {
|
|
401
|
+
path: {
|
|
402
|
+
id: string;
|
|
403
|
+
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
404
|
+
signal?: AbortSignal;
|
|
405
|
+
}): Promise<Reply<200, BroadcastStats>>;
|
|
406
|
+
/**
|
|
407
|
+
* List tracking links
|
|
408
|
+
*
|
|
409
|
+
* Lists project tracking links.
|
|
410
|
+
*/
|
|
411
|
+
listTrackingLinks(input?: {
|
|
412
|
+
signal?: AbortSignal;
|
|
413
|
+
}): Promise<Reply<200, TrackingLinkList>>;
|
|
414
|
+
/**
|
|
415
|
+
* Create tracking link
|
|
416
|
+
*
|
|
417
|
+
* Creates an allowlist-validated tracking link.
|
|
418
|
+
*/
|
|
419
|
+
createTrackingLink(input: {
|
|
420
|
+
body: TrackingLinkWrite; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
421
|
+
signal?: AbortSignal;
|
|
422
|
+
}): Promise<Reply<201, TrackingLink>>;
|
|
423
|
+
/**
|
|
424
|
+
* Attribute link conversion
|
|
425
|
+
*
|
|
426
|
+
* Attributes a conversion value to a click token or slug.
|
|
427
|
+
*/
|
|
428
|
+
attributeLinkConversion(input: {
|
|
429
|
+
body: LinkAttributeWrite; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
430
|
+
signal?: AbortSignal;
|
|
431
|
+
}): Promise<Reply<200, LinkAttributeResult>>;
|
|
432
|
+
/**
|
|
433
|
+
* Get tracking link
|
|
434
|
+
*
|
|
435
|
+
* Gets a tracking link by id.
|
|
436
|
+
*/
|
|
437
|
+
getTrackingLink(input: {
|
|
438
|
+
path: {
|
|
439
|
+
id: string;
|
|
440
|
+
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
441
|
+
signal?: AbortSignal;
|
|
442
|
+
}): Promise<Reply<200, TrackingLink>>;
|
|
443
|
+
/**
|
|
444
|
+
* Update tracking link
|
|
445
|
+
*
|
|
446
|
+
* Updates an allowlist-validated tracking link.
|
|
447
|
+
*/
|
|
448
|
+
updateTrackingLink(input: {
|
|
449
|
+
path: {
|
|
450
|
+
id: string;
|
|
451
|
+
};
|
|
452
|
+
body: TrackingLinkWrite; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
453
|
+
signal?: AbortSignal;
|
|
454
|
+
}): Promise<Reply<200, TrackingLink>>;
|
|
455
|
+
/**
|
|
456
|
+
* Delete tracking link
|
|
457
|
+
*
|
|
458
|
+
* Deletes a tracking link.
|
|
459
|
+
*/
|
|
460
|
+
deleteTrackingLink(input: {
|
|
461
|
+
path: {
|
|
462
|
+
id: string;
|
|
463
|
+
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
464
|
+
signal?: AbortSignal;
|
|
465
|
+
}): Promise<Reply<204, undefined>>;
|
|
466
|
+
/**
|
|
467
|
+
* Get tracking link stats
|
|
468
|
+
*
|
|
469
|
+
* Gets click, bot click, conversion, and revenue metrics.
|
|
470
|
+
*/
|
|
471
|
+
getTrackingLinkStats(input: {
|
|
472
|
+
path: {
|
|
473
|
+
id: string;
|
|
474
|
+
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
475
|
+
signal?: AbortSignal;
|
|
476
|
+
}): Promise<Reply<200, TrackingLinkStats>>;
|
|
477
|
+
/**
|
|
478
|
+
* List on-site campaigns
|
|
479
|
+
*
|
|
480
|
+
* Lists project on-site and in-app campaigns.
|
|
481
|
+
*/
|
|
482
|
+
listOnSiteCampaigns(input?: {
|
|
483
|
+
signal?: AbortSignal;
|
|
484
|
+
}): Promise<Reply<200, OnSiteCampaignList>>;
|
|
485
|
+
/**
|
|
486
|
+
* Create on-site campaign
|
|
487
|
+
*
|
|
488
|
+
* Creates an on-site / in-app campaign.
|
|
489
|
+
*/
|
|
490
|
+
createOnSiteCampaign(input: {
|
|
491
|
+
body: OnSiteCampaignWrite; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
492
|
+
signal?: AbortSignal;
|
|
493
|
+
}): Promise<Reply<201, OnSiteCampaign>>;
|
|
494
|
+
/**
|
|
495
|
+
* Record on-site impression
|
|
496
|
+
*
|
|
497
|
+
* Records a campaign showing while enforcing frequency caps.
|
|
498
|
+
*/
|
|
499
|
+
createOnSiteImpression(input: {
|
|
500
|
+
body: OnSiteImpressionWrite; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
501
|
+
signal?: AbortSignal;
|
|
502
|
+
}): Promise<Reply<201, OnSiteImpression>>;
|
|
503
|
+
/**
|
|
504
|
+
* Record on-site interaction
|
|
505
|
+
*
|
|
506
|
+
* Records clicked, dismissed, or converted for an impression.
|
|
507
|
+
*/
|
|
508
|
+
recordOnSiteEvent(input: {
|
|
509
|
+
path: {
|
|
510
|
+
id: string;
|
|
511
|
+
};
|
|
512
|
+
body: OnSiteEventWrite; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
513
|
+
signal?: AbortSignal;
|
|
514
|
+
}): Promise<Reply<204, undefined>>;
|
|
515
|
+
/**
|
|
516
|
+
* Fetch eligible on-site messages
|
|
517
|
+
*
|
|
518
|
+
* Returns active on-site / in-app campaigns eligible for the current user or installation.
|
|
519
|
+
*/
|
|
520
|
+
listOnSiteMessages(input?: {
|
|
521
|
+
signal?: AbortSignal;
|
|
522
|
+
}): Promise<Reply<200, OnSiteMessageList>>;
|
|
523
|
+
/**
|
|
524
|
+
* Get on-site settings
|
|
525
|
+
*
|
|
526
|
+
* Gets project-wide on-site frequency cap settings.
|
|
527
|
+
*/
|
|
528
|
+
getOnSiteSettings(input?: {
|
|
529
|
+
signal?: AbortSignal;
|
|
530
|
+
}): Promise<Reply<200, OnSiteSettings>>;
|
|
531
|
+
/**
|
|
532
|
+
* Update on-site settings
|
|
533
|
+
*
|
|
534
|
+
* Updates project-wide on-site frequency cap settings.
|
|
535
|
+
*/
|
|
536
|
+
putOnSiteSettings(input: {
|
|
537
|
+
body: OnSiteSettings; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
538
|
+
signal?: AbortSignal;
|
|
539
|
+
}): Promise<Reply<200, OnSiteSettings>>;
|
|
540
|
+
/**
|
|
541
|
+
* List on-site templates
|
|
542
|
+
*
|
|
543
|
+
* Lists starter on-site / in-app templates.
|
|
544
|
+
*/
|
|
545
|
+
listOnSiteTemplates(input?: {
|
|
546
|
+
signal?: AbortSignal;
|
|
547
|
+
}): Promise<Reply<200, OnSiteTemplateList>>;
|
|
548
|
+
/**
|
|
549
|
+
* Get on-site campaign
|
|
550
|
+
*
|
|
551
|
+
* Gets an on-site campaign by id.
|
|
552
|
+
*/
|
|
553
|
+
getOnSiteCampaign(input: {
|
|
554
|
+
path: {
|
|
555
|
+
id: string;
|
|
556
|
+
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
557
|
+
signal?: AbortSignal;
|
|
558
|
+
}): Promise<Reply<200, OnSiteCampaign>>;
|
|
559
|
+
/**
|
|
560
|
+
* Update on-site campaign
|
|
561
|
+
*
|
|
562
|
+
* Replaces an on-site campaign.
|
|
563
|
+
*/
|
|
564
|
+
updateOnSiteCampaign(input: {
|
|
565
|
+
path: {
|
|
566
|
+
id: string;
|
|
567
|
+
};
|
|
568
|
+
body: OnSiteCampaignWrite; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
569
|
+
signal?: AbortSignal;
|
|
570
|
+
}): Promise<Reply<200, OnSiteCampaign>>;
|
|
571
|
+
/**
|
|
572
|
+
* Delete on-site campaign
|
|
573
|
+
*
|
|
574
|
+
* Deletes an on-site campaign.
|
|
575
|
+
*/
|
|
576
|
+
deleteOnSiteCampaign(input: {
|
|
577
|
+
path: {
|
|
578
|
+
id: string;
|
|
579
|
+
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
580
|
+
signal?: AbortSignal;
|
|
581
|
+
}): Promise<Reply<204, undefined>>;
|
|
582
|
+
/**
|
|
583
|
+
* Get on-site campaign stats
|
|
584
|
+
*
|
|
585
|
+
* Gets shown, clicked, dismissed, and converted counts.
|
|
586
|
+
*/
|
|
587
|
+
getOnSiteCampaignStats(input: {
|
|
588
|
+
path: {
|
|
589
|
+
id: string;
|
|
590
|
+
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
591
|
+
signal?: AbortSignal;
|
|
592
|
+
}): Promise<Reply<200, OnSiteStats>>;
|
|
593
|
+
/**
|
|
594
|
+
* Redirect tracking link
|
|
595
|
+
*
|
|
596
|
+
* Resolves an allowlisted tracking link, records non-bot clicks, and returns 302 with UTM and optional promo parameters.
|
|
597
|
+
*/
|
|
598
|
+
redirectTrackingLink(input: {
|
|
599
|
+
path: {
|
|
600
|
+
slug: string;
|
|
601
|
+
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
602
|
+
signal?: AbortSignal;
|
|
603
|
+
}): Promise<Reply<302, undefined>>;
|
|
604
|
+
/**
|
|
605
|
+
* Check tracking link redirect
|
|
606
|
+
*
|
|
607
|
+
* Resolves a tracking link header without recording a click.
|
|
608
|
+
*/
|
|
609
|
+
headTrackingLink(input: {
|
|
610
|
+
path: {
|
|
611
|
+
slug: string;
|
|
612
|
+
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
613
|
+
signal?: AbortSignal;
|
|
614
|
+
}): Promise<Reply<302, undefined>>;
|
|
615
|
+
};
|
|
616
|
+
export type Client = ReturnType<typeof client>;
|