@sitepulse/web 1.0.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.
@@ -0,0 +1,779 @@
1
+ import { z } from "zod";
2
+ export declare const IngestEventSchema: z.ZodObject<{
3
+ eventName: z.ZodString;
4
+ anonymousId: z.ZodString;
5
+ sessionId: z.ZodString;
6
+ userId: z.ZodOptional<z.ZodString>;
7
+ properties: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
8
+ page: z.ZodObject<{
9
+ url: z.ZodString;
10
+ referrer: z.ZodOptional<z.ZodString>;
11
+ title: z.ZodOptional<z.ZodString>;
12
+ }, z.core.$strip>;
13
+ deviceType: z.ZodOptional<z.ZodEnum<{
14
+ desktop: "desktop";
15
+ mobile: "mobile";
16
+ tablet: "tablet";
17
+ }>>;
18
+ browser: z.ZodOptional<z.ZodString>;
19
+ os: z.ZodOptional<z.ZodString>;
20
+ timestamp: z.ZodString;
21
+ }, z.core.$strip>;
22
+ export declare const CollectRequestSchema: z.ZodObject<{
23
+ siteId: z.ZodString;
24
+ events: z.ZodArray<z.ZodObject<{
25
+ eventName: z.ZodString;
26
+ anonymousId: z.ZodString;
27
+ sessionId: z.ZodString;
28
+ userId: z.ZodOptional<z.ZodString>;
29
+ properties: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
30
+ page: z.ZodObject<{
31
+ url: z.ZodString;
32
+ referrer: z.ZodOptional<z.ZodString>;
33
+ title: z.ZodOptional<z.ZodString>;
34
+ }, z.core.$strip>;
35
+ deviceType: z.ZodOptional<z.ZodEnum<{
36
+ desktop: "desktop";
37
+ mobile: "mobile";
38
+ tablet: "tablet";
39
+ }>>;
40
+ browser: z.ZodOptional<z.ZodString>;
41
+ os: z.ZodOptional<z.ZodString>;
42
+ timestamp: z.ZodString;
43
+ }, z.core.$strip>>;
44
+ }, z.core.$strip>;
45
+ export type IngestEvent = z.infer<typeof IngestEventSchema>;
46
+ export type CollectRequest = z.infer<typeof CollectRequestSchema>;
47
+ export interface Organization {
48
+ id: string;
49
+ name: string;
50
+ created_at: string;
51
+ }
52
+ export type OrgRole = "owner" | "admin" | "analyst" | "marketer" | "developer";
53
+ export interface OrganizationMember {
54
+ organization_id: string;
55
+ user_id: string;
56
+ role: OrgRole;
57
+ created_at: string;
58
+ }
59
+ export interface OrgInvitation {
60
+ id: string;
61
+ organization_id: string;
62
+ email: string;
63
+ role: OrgRole;
64
+ token: string;
65
+ invited_by: string;
66
+ created_at: string;
67
+ expires_at: string;
68
+ accepted_at: string | null;
69
+ }
70
+ export interface Site {
71
+ id: string;
72
+ organization_id: string;
73
+ name: string;
74
+ url: string;
75
+ site_key: string;
76
+ created_at: string;
77
+ }
78
+ export interface ApiKey {
79
+ id: string;
80
+ organization_id: string;
81
+ label: string | null;
82
+ created_at: string;
83
+ revoked_at: string | null;
84
+ }
85
+ export interface SiteOverview {
86
+ visitors: number;
87
+ sessions: number;
88
+ live_count: number;
89
+ }
90
+ export declare const HeadingBlockSchema: z.ZodObject<{
91
+ type: z.ZodLiteral<"heading">;
92
+ text: z.ZodString;
93
+ level: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]>>;
94
+ }, z.core.$strip>;
95
+ export declare const ParagraphBlockSchema: z.ZodObject<{
96
+ type: z.ZodLiteral<"paragraph">;
97
+ text: z.ZodString;
98
+ }, z.core.$strip>;
99
+ export declare const ButtonBlockSchema: z.ZodObject<{
100
+ type: z.ZodLiteral<"button">;
101
+ text: z.ZodString;
102
+ action: z.ZodDefault<z.ZodEnum<{
103
+ close: "close";
104
+ event: "event";
105
+ link: "link";
106
+ submit: "submit";
107
+ }>>;
108
+ url: z.ZodOptional<z.ZodString>;
109
+ eventName: z.ZodOptional<z.ZodString>;
110
+ styleVariant: z.ZodDefault<z.ZodEnum<{
111
+ ghost: "ghost";
112
+ outline: "outline";
113
+ primary: "primary";
114
+ secondary: "secondary";
115
+ }>>;
116
+ }, z.core.$strip>;
117
+ export declare const ImageBlockSchema: z.ZodObject<{
118
+ type: z.ZodLiteral<"image">;
119
+ src: z.ZodString;
120
+ alt: z.ZodOptional<z.ZodString>;
121
+ width: z.ZodOptional<z.ZodNumber>;
122
+ height: z.ZodOptional<z.ZodNumber>;
123
+ }, z.core.$strip>;
124
+ export declare const InputBlockSchema: z.ZodObject<{
125
+ type: z.ZodLiteral<"input">;
126
+ inputType: z.ZodDefault<z.ZodEnum<{
127
+ email: "email";
128
+ number: "number";
129
+ text: "text";
130
+ }>>;
131
+ name: z.ZodString;
132
+ label: z.ZodOptional<z.ZodString>;
133
+ placeholder: z.ZodOptional<z.ZodString>;
134
+ required: z.ZodDefault<z.ZodBoolean>;
135
+ }, z.core.$strip>;
136
+ export declare const CountdownBlockSchema: z.ZodObject<{
137
+ type: z.ZodLiteral<"countdown">;
138
+ targetDate: z.ZodString;
139
+ format: z.ZodDefault<z.ZodEnum<{
140
+ dhms: "dhms";
141
+ hms: "hms";
142
+ ms: "ms";
143
+ }>>;
144
+ label: z.ZodOptional<z.ZodString>;
145
+ endMessage: z.ZodOptional<z.ZodString>;
146
+ }, z.core.$strip>;
147
+ export declare const SocialProofActivityItemSchema: z.ZodObject<{
148
+ id: z.ZodOptional<z.ZodString>;
149
+ title: z.ZodDefault<z.ZodString>;
150
+ message: z.ZodDefault<z.ZodString>;
151
+ timeAgo: z.ZodDefault<z.ZodString>;
152
+ avatarType: z.ZodDefault<z.ZodEnum<{
153
+ avatar: "avatar";
154
+ cart: "cart";
155
+ flame: "flame";
156
+ map_pin: "map_pin";
157
+ sparkles: "sparkles";
158
+ verified_check: "verified_check";
159
+ }>>;
160
+ avatarUrl: z.ZodOptional<z.ZodString>;
161
+ linkUrl: z.ZodOptional<z.ZodString>;
162
+ }, z.core.$strip>;
163
+ export type SocialProofActivityItem = z.infer<typeof SocialProofActivityItemSchema>;
164
+ export declare const SocialProofBlockSchema: z.ZodObject<{
165
+ type: z.ZodLiteral<"social_proof">;
166
+ mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
167
+ aggregate: "aggregate";
168
+ live_visitors: "live_visitors";
169
+ recent_activity: "recent_activity";
170
+ review: "review";
171
+ }>>>;
172
+ events: z.ZodOptional<z.ZodArray<z.ZodObject<{
173
+ id: z.ZodOptional<z.ZodString>;
174
+ title: z.ZodDefault<z.ZodString>;
175
+ message: z.ZodDefault<z.ZodString>;
176
+ timeAgo: z.ZodDefault<z.ZodString>;
177
+ avatarType: z.ZodDefault<z.ZodEnum<{
178
+ avatar: "avatar";
179
+ cart: "cart";
180
+ flame: "flame";
181
+ map_pin: "map_pin";
182
+ sparkles: "sparkles";
183
+ verified_check: "verified_check";
184
+ }>>;
185
+ avatarUrl: z.ZodOptional<z.ZodString>;
186
+ linkUrl: z.ZodOptional<z.ZodString>;
187
+ }, z.core.$strip>>>;
188
+ metric: z.ZodOptional<z.ZodEnum<{
189
+ live_visitors: "live_visitors";
190
+ recent_conversions: "recent_conversions";
191
+ today_views: "today_views";
192
+ }>>;
193
+ windowMinutes: z.ZodOptional<z.ZodNumber>;
194
+ formatString: z.ZodOptional<z.ZodString>;
195
+ liveSubtitle: z.ZodOptional<z.ZodString>;
196
+ reviewerName: z.ZodOptional<z.ZodString>;
197
+ reviewerTitle: z.ZodOptional<z.ZodString>;
198
+ rating: z.ZodOptional<z.ZodNumber>;
199
+ reviewText: z.ZodOptional<z.ZodString>;
200
+ reviewerAvatar: z.ZodOptional<z.ZodString>;
201
+ aggregateCount: z.ZodOptional<z.ZodNumber>;
202
+ aggregateLabel: z.ZodOptional<z.ZodString>;
203
+ displayDurationSeconds: z.ZodOptional<z.ZodNumber>;
204
+ cycleIntervalSeconds: z.ZodOptional<z.ZodNumber>;
205
+ showVerifiedBadge: z.ZodOptional<z.ZodBoolean>;
206
+ }, z.core.$strip>;
207
+ export type SocialProofBlock = z.infer<typeof SocialProofBlockSchema>;
208
+ export declare const RatingBlockSchema: z.ZodObject<{
209
+ type: z.ZodLiteral<"rating">;
210
+ styleVariant: z.ZodDefault<z.ZodEnum<{
211
+ moods: "moods";
212
+ nps: "nps";
213
+ stars: "stars";
214
+ }>>;
215
+ name: z.ZodDefault<z.ZodString>;
216
+ label: z.ZodOptional<z.ZodString>;
217
+ required: z.ZodDefault<z.ZodBoolean>;
218
+ }, z.core.$strip>;
219
+ export declare const DividerBlockSchema: z.ZodObject<{
220
+ type: z.ZodLiteral<"divider">;
221
+ }, z.core.$strip>;
222
+ export declare const ContentBlockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
223
+ type: z.ZodLiteral<"heading">;
224
+ text: z.ZodString;
225
+ level: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]>>;
226
+ }, z.core.$strip>, z.ZodObject<{
227
+ type: z.ZodLiteral<"paragraph">;
228
+ text: z.ZodString;
229
+ }, z.core.$strip>, z.ZodObject<{
230
+ type: z.ZodLiteral<"button">;
231
+ text: z.ZodString;
232
+ action: z.ZodDefault<z.ZodEnum<{
233
+ close: "close";
234
+ event: "event";
235
+ link: "link";
236
+ submit: "submit";
237
+ }>>;
238
+ url: z.ZodOptional<z.ZodString>;
239
+ eventName: z.ZodOptional<z.ZodString>;
240
+ styleVariant: z.ZodDefault<z.ZodEnum<{
241
+ ghost: "ghost";
242
+ outline: "outline";
243
+ primary: "primary";
244
+ secondary: "secondary";
245
+ }>>;
246
+ }, z.core.$strip>, z.ZodObject<{
247
+ type: z.ZodLiteral<"image">;
248
+ src: z.ZodString;
249
+ alt: z.ZodOptional<z.ZodString>;
250
+ width: z.ZodOptional<z.ZodNumber>;
251
+ height: z.ZodOptional<z.ZodNumber>;
252
+ }, z.core.$strip>, z.ZodObject<{
253
+ type: z.ZodLiteral<"input">;
254
+ inputType: z.ZodDefault<z.ZodEnum<{
255
+ email: "email";
256
+ number: "number";
257
+ text: "text";
258
+ }>>;
259
+ name: z.ZodString;
260
+ label: z.ZodOptional<z.ZodString>;
261
+ placeholder: z.ZodOptional<z.ZodString>;
262
+ required: z.ZodDefault<z.ZodBoolean>;
263
+ }, z.core.$strip>, z.ZodObject<{
264
+ type: z.ZodLiteral<"rating">;
265
+ styleVariant: z.ZodDefault<z.ZodEnum<{
266
+ moods: "moods";
267
+ nps: "nps";
268
+ stars: "stars";
269
+ }>>;
270
+ name: z.ZodDefault<z.ZodString>;
271
+ label: z.ZodOptional<z.ZodString>;
272
+ required: z.ZodDefault<z.ZodBoolean>;
273
+ }, z.core.$strip>, z.ZodObject<{
274
+ type: z.ZodLiteral<"countdown">;
275
+ targetDate: z.ZodString;
276
+ format: z.ZodDefault<z.ZodEnum<{
277
+ dhms: "dhms";
278
+ hms: "hms";
279
+ ms: "ms";
280
+ }>>;
281
+ label: z.ZodOptional<z.ZodString>;
282
+ endMessage: z.ZodOptional<z.ZodString>;
283
+ }, z.core.$strip>, z.ZodObject<{
284
+ type: z.ZodLiteral<"social_proof">;
285
+ mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
286
+ aggregate: "aggregate";
287
+ live_visitors: "live_visitors";
288
+ recent_activity: "recent_activity";
289
+ review: "review";
290
+ }>>>;
291
+ events: z.ZodOptional<z.ZodArray<z.ZodObject<{
292
+ id: z.ZodOptional<z.ZodString>;
293
+ title: z.ZodDefault<z.ZodString>;
294
+ message: z.ZodDefault<z.ZodString>;
295
+ timeAgo: z.ZodDefault<z.ZodString>;
296
+ avatarType: z.ZodDefault<z.ZodEnum<{
297
+ avatar: "avatar";
298
+ cart: "cart";
299
+ flame: "flame";
300
+ map_pin: "map_pin";
301
+ sparkles: "sparkles";
302
+ verified_check: "verified_check";
303
+ }>>;
304
+ avatarUrl: z.ZodOptional<z.ZodString>;
305
+ linkUrl: z.ZodOptional<z.ZodString>;
306
+ }, z.core.$strip>>>;
307
+ metric: z.ZodOptional<z.ZodEnum<{
308
+ live_visitors: "live_visitors";
309
+ recent_conversions: "recent_conversions";
310
+ today_views: "today_views";
311
+ }>>;
312
+ windowMinutes: z.ZodOptional<z.ZodNumber>;
313
+ formatString: z.ZodOptional<z.ZodString>;
314
+ liveSubtitle: z.ZodOptional<z.ZodString>;
315
+ reviewerName: z.ZodOptional<z.ZodString>;
316
+ reviewerTitle: z.ZodOptional<z.ZodString>;
317
+ rating: z.ZodOptional<z.ZodNumber>;
318
+ reviewText: z.ZodOptional<z.ZodString>;
319
+ reviewerAvatar: z.ZodOptional<z.ZodString>;
320
+ aggregateCount: z.ZodOptional<z.ZodNumber>;
321
+ aggregateLabel: z.ZodOptional<z.ZodString>;
322
+ displayDurationSeconds: z.ZodOptional<z.ZodNumber>;
323
+ cycleIntervalSeconds: z.ZodOptional<z.ZodNumber>;
324
+ showVerifiedBadge: z.ZodOptional<z.ZodBoolean>;
325
+ }, z.core.$strip>, z.ZodObject<{
326
+ type: z.ZodLiteral<"divider">;
327
+ }, z.core.$strip>], "type">;
328
+ export type ContentBlock = z.infer<typeof ContentBlockSchema>;
329
+ export declare const CampaignContentSchema: z.ZodObject<{
330
+ title: z.ZodOptional<z.ZodString>;
331
+ blocks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
332
+ type: z.ZodLiteral<"heading">;
333
+ text: z.ZodString;
334
+ level: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]>>;
335
+ }, z.core.$strip>, z.ZodObject<{
336
+ type: z.ZodLiteral<"paragraph">;
337
+ text: z.ZodString;
338
+ }, z.core.$strip>, z.ZodObject<{
339
+ type: z.ZodLiteral<"button">;
340
+ text: z.ZodString;
341
+ action: z.ZodDefault<z.ZodEnum<{
342
+ close: "close";
343
+ event: "event";
344
+ link: "link";
345
+ submit: "submit";
346
+ }>>;
347
+ url: z.ZodOptional<z.ZodString>;
348
+ eventName: z.ZodOptional<z.ZodString>;
349
+ styleVariant: z.ZodDefault<z.ZodEnum<{
350
+ ghost: "ghost";
351
+ outline: "outline";
352
+ primary: "primary";
353
+ secondary: "secondary";
354
+ }>>;
355
+ }, z.core.$strip>, z.ZodObject<{
356
+ type: z.ZodLiteral<"image">;
357
+ src: z.ZodString;
358
+ alt: z.ZodOptional<z.ZodString>;
359
+ width: z.ZodOptional<z.ZodNumber>;
360
+ height: z.ZodOptional<z.ZodNumber>;
361
+ }, z.core.$strip>, z.ZodObject<{
362
+ type: z.ZodLiteral<"input">;
363
+ inputType: z.ZodDefault<z.ZodEnum<{
364
+ email: "email";
365
+ number: "number";
366
+ text: "text";
367
+ }>>;
368
+ name: z.ZodString;
369
+ label: z.ZodOptional<z.ZodString>;
370
+ placeholder: z.ZodOptional<z.ZodString>;
371
+ required: z.ZodDefault<z.ZodBoolean>;
372
+ }, z.core.$strip>, z.ZodObject<{
373
+ type: z.ZodLiteral<"rating">;
374
+ styleVariant: z.ZodDefault<z.ZodEnum<{
375
+ moods: "moods";
376
+ nps: "nps";
377
+ stars: "stars";
378
+ }>>;
379
+ name: z.ZodDefault<z.ZodString>;
380
+ label: z.ZodOptional<z.ZodString>;
381
+ required: z.ZodDefault<z.ZodBoolean>;
382
+ }, z.core.$strip>, z.ZodObject<{
383
+ type: z.ZodLiteral<"countdown">;
384
+ targetDate: z.ZodString;
385
+ format: z.ZodDefault<z.ZodEnum<{
386
+ dhms: "dhms";
387
+ hms: "hms";
388
+ ms: "ms";
389
+ }>>;
390
+ label: z.ZodOptional<z.ZodString>;
391
+ endMessage: z.ZodOptional<z.ZodString>;
392
+ }, z.core.$strip>, z.ZodObject<{
393
+ type: z.ZodLiteral<"social_proof">;
394
+ mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
395
+ aggregate: "aggregate";
396
+ live_visitors: "live_visitors";
397
+ recent_activity: "recent_activity";
398
+ review: "review";
399
+ }>>>;
400
+ events: z.ZodOptional<z.ZodArray<z.ZodObject<{
401
+ id: z.ZodOptional<z.ZodString>;
402
+ title: z.ZodDefault<z.ZodString>;
403
+ message: z.ZodDefault<z.ZodString>;
404
+ timeAgo: z.ZodDefault<z.ZodString>;
405
+ avatarType: z.ZodDefault<z.ZodEnum<{
406
+ avatar: "avatar";
407
+ cart: "cart";
408
+ flame: "flame";
409
+ map_pin: "map_pin";
410
+ sparkles: "sparkles";
411
+ verified_check: "verified_check";
412
+ }>>;
413
+ avatarUrl: z.ZodOptional<z.ZodString>;
414
+ linkUrl: z.ZodOptional<z.ZodString>;
415
+ }, z.core.$strip>>>;
416
+ metric: z.ZodOptional<z.ZodEnum<{
417
+ live_visitors: "live_visitors";
418
+ recent_conversions: "recent_conversions";
419
+ today_views: "today_views";
420
+ }>>;
421
+ windowMinutes: z.ZodOptional<z.ZodNumber>;
422
+ formatString: z.ZodOptional<z.ZodString>;
423
+ liveSubtitle: z.ZodOptional<z.ZodString>;
424
+ reviewerName: z.ZodOptional<z.ZodString>;
425
+ reviewerTitle: z.ZodOptional<z.ZodString>;
426
+ rating: z.ZodOptional<z.ZodNumber>;
427
+ reviewText: z.ZodOptional<z.ZodString>;
428
+ reviewerAvatar: z.ZodOptional<z.ZodString>;
429
+ aggregateCount: z.ZodOptional<z.ZodNumber>;
430
+ aggregateLabel: z.ZodOptional<z.ZodString>;
431
+ displayDurationSeconds: z.ZodOptional<z.ZodNumber>;
432
+ cycleIntervalSeconds: z.ZodOptional<z.ZodNumber>;
433
+ showVerifiedBadge: z.ZodOptional<z.ZodBoolean>;
434
+ }, z.core.$strip>, z.ZodObject<{
435
+ type: z.ZodLiteral<"divider">;
436
+ }, z.core.$strip>], "type">>;
437
+ }, z.core.$strip>;
438
+ export type CampaignContent = z.infer<typeof CampaignContentSchema>;
439
+ export declare const DesignSchema: z.ZodObject<{
440
+ theme: z.ZodDefault<z.ZodEnum<{
441
+ custom: "custom";
442
+ dark: "dark";
443
+ light: "light";
444
+ }>>;
445
+ position: z.ZodDefault<z.ZodEnum<{
446
+ bottom: "bottom";
447
+ "bottom-left": "bottom-left";
448
+ "bottom-right": "bottom-right";
449
+ center: "center";
450
+ top: "top";
451
+ "top-left": "top-left";
452
+ "top-right": "top-right";
453
+ }>>;
454
+ backgroundColor: z.ZodOptional<z.ZodString>;
455
+ textColor: z.ZodOptional<z.ZodString>;
456
+ accentColor: z.ZodOptional<z.ZodString>;
457
+ buttonTextColor: z.ZodOptional<z.ZodString>;
458
+ borderRadius: z.ZodDefault<z.ZodNumber>;
459
+ padding: z.ZodDefault<z.ZodNumber>;
460
+ overlay: z.ZodDefault<z.ZodBoolean>;
461
+ closeButton: z.ZodDefault<z.ZodBoolean>;
462
+ animationStyle: z.ZodOptional<z.ZodEnum<{
463
+ fade: "fade";
464
+ none: "none";
465
+ "slide-down": "slide-down";
466
+ "slide-up": "slide-up";
467
+ zoom: "zoom";
468
+ }>>;
469
+ socialProofOpacity: z.ZodOptional<z.ZodNumber>;
470
+ }, z.core.$strip>;
471
+ export type Design = z.infer<typeof DesignSchema>;
472
+ export declare const TriggerSchema: z.ZodObject<{
473
+ type: z.ZodDefault<z.ZodEnum<{
474
+ click: "click";
475
+ delay: "delay";
476
+ event: "event";
477
+ exit_intent: "exit_intent";
478
+ scroll_percent: "scroll_percent";
479
+ }>>;
480
+ seconds: z.ZodOptional<z.ZodNumber>;
481
+ scrollPercent: z.ZodOptional<z.ZodNumber>;
482
+ elementSelector: z.ZodOptional<z.ZodString>;
483
+ eventName: z.ZodOptional<z.ZodString>;
484
+ }, z.core.$strip>;
485
+ export type Trigger = z.infer<typeof TriggerSchema>;
486
+ export declare const AudienceSchema: z.ZodObject<{
487
+ type: z.ZodDefault<z.ZodEnum<{
488
+ all: "all";
489
+ device: "device";
490
+ new_visitors: "new_visitors";
491
+ returning_visitors: "returning_visitors";
492
+ specific_pages: "specific_pages";
493
+ }>>;
494
+ pagePaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
495
+ deviceTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
496
+ desktop: "desktop";
497
+ mobile: "mobile";
498
+ tablet: "tablet";
499
+ }>>>;
500
+ }, z.core.$strip>;
501
+ export type Audience = z.infer<typeof AudienceSchema>;
502
+ export declare const ScheduleSchema: z.ZodObject<{
503
+ startDate: z.ZodOptional<z.ZodString>;
504
+ endDate: z.ZodOptional<z.ZodString>;
505
+ timezone: z.ZodDefault<z.ZodString>;
506
+ daysOfWeek: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
507
+ }, z.core.$strip>;
508
+ export type Schedule = z.infer<typeof ScheduleSchema>;
509
+ export declare const CampaignTypeSchema: z.ZodEnum<{
510
+ announcement: "announcement";
511
+ banner: "banner";
512
+ countdown: "countdown";
513
+ feedback_collection: "feedback_collection";
514
+ modal: "modal";
515
+ newsletter: "newsletter";
516
+ popup: "popup";
517
+ scrolling_banner: "scrolling_banner";
518
+ social_proof: "social_proof";
519
+ toast: "toast";
520
+ }>;
521
+ export type CampaignType = z.infer<typeof CampaignTypeSchema>;
522
+ export declare const CampaignStatusSchema: z.ZodEnum<{
523
+ active: "active";
524
+ draft: "draft";
525
+ paused: "paused";
526
+ }>;
527
+ export type CampaignStatus = z.infer<typeof CampaignStatusSchema>;
528
+ export interface Campaign {
529
+ id: string;
530
+ organization_id: string;
531
+ site_id: string;
532
+ name: string;
533
+ type: CampaignType;
534
+ status: CampaignStatus;
535
+ source_template_id?: string | null;
536
+ content: CampaignContent;
537
+ design: Design;
538
+ trigger: Trigger;
539
+ audience: Audience;
540
+ schedule: Schedule;
541
+ created_at: string;
542
+ updated_at: string;
543
+ }
544
+ export interface CampaignTemplate {
545
+ id: string;
546
+ organization_id: string | null;
547
+ name: string;
548
+ description?: string | null;
549
+ type: CampaignType;
550
+ content: CampaignContent;
551
+ design: Design;
552
+ preview_image_url?: string | null;
553
+ created_at: string;
554
+ }
555
+ export interface CampaignSubmission {
556
+ id: number;
557
+ organization_id: string;
558
+ site_id: string;
559
+ campaign_id: string;
560
+ email: string | null;
561
+ data: Record<string, unknown>;
562
+ responses?: Record<string, unknown>;
563
+ submitted_at: string;
564
+ }
565
+ export type PlanId = "starter" | "growth" | "scale";
566
+ export type SubscriptionStatus = "active" | "past_due" | "cancelled";
567
+ export type BillingInterval = "monthly" | "quarterly" | "yearly";
568
+ export interface PlanPricing {
569
+ monthlyRate: number;
570
+ totalAmount: number;
571
+ totalAmountMinor: number;
572
+ discountPercent: number;
573
+ savingsNgn: number;
574
+ months: number;
575
+ billingText: string;
576
+ }
577
+ export declare function calculatePlanPricing(planId: PlanId, interval: BillingInterval): PlanPricing;
578
+ export interface PlanEntitlements {
579
+ maxSites: number | null;
580
+ maxMembers: number | null;
581
+ campaignTypes: CampaignType[];
582
+ customTemplates: boolean;
583
+ storageBytes: number;
584
+ monitorIntervalSeconds: number;
585
+ retentionDays: number;
586
+ aiInsights: boolean;
587
+ abTesting: boolean;
588
+ revenueAttribution: "none" | "view" | "full";
589
+ }
590
+ export interface Plan {
591
+ id: PlanId;
592
+ name: string;
593
+ paystack_plan_code: string | null;
594
+ price_minor: number;
595
+ currency: string;
596
+ entitlements: PlanEntitlements;
597
+ }
598
+ export interface Subscription {
599
+ organization_id: string;
600
+ plan_id: PlanId;
601
+ paystack_customer_code?: string | null;
602
+ paystack_subscription_code?: string | null;
603
+ status: SubscriptionStatus;
604
+ current_period_end?: string | null;
605
+ updated_at: string;
606
+ }
607
+ export interface WebhookEvent {
608
+ provider: string;
609
+ external_event_id: string;
610
+ received_at: string;
611
+ processed_at?: string | null;
612
+ }
613
+ export type MonitorType = "http" | "api" | "ssl" | "keyword";
614
+ export type MonitorStatus = "unknown" | "up" | "down";
615
+ export type IncidentStatus = "open" | "resolved";
616
+ export interface Monitor {
617
+ id: string;
618
+ organization_id: string;
619
+ site_id: string;
620
+ type: MonitorType;
621
+ target_url: string;
622
+ method: string;
623
+ expected_status: number;
624
+ expected_body_contains: string | null;
625
+ headers: Record<string, string>;
626
+ interval_seconds: number;
627
+ status: MonitorStatus;
628
+ created_at: string;
629
+ last_checked_at?: string | null;
630
+ }
631
+ export interface MonitorCheck {
632
+ id: number;
633
+ monitor_id: string;
634
+ organization_id: string;
635
+ status: "up" | "down";
636
+ response_time_ms: number | null;
637
+ status_code: number | null;
638
+ checked_at: string;
639
+ }
640
+ export interface Incident {
641
+ id: string;
642
+ organization_id: string;
643
+ monitor_id: string;
644
+ status: IncidentStatus;
645
+ started_at: string;
646
+ resolved_at: string | null;
647
+ cause_summary: string | null;
648
+ }
649
+ export interface FunnelStep {
650
+ name: string;
651
+ eventName: string;
652
+ match?: {
653
+ property?: string;
654
+ value?: string;
655
+ page_url?: string;
656
+ };
657
+ }
658
+ export interface Funnel {
659
+ id: string;
660
+ organization_id: string;
661
+ site_id: string;
662
+ name: string;
663
+ steps: FunnelStep[];
664
+ created_at: string;
665
+ }
666
+ export interface FunnelStepMetric {
667
+ stepIndex: number;
668
+ name: string;
669
+ eventName: string;
670
+ sessionCount: number;
671
+ conversionFromStart: number;
672
+ dropoffFromPrevious: number;
673
+ }
674
+ export interface FunnelAnalysisResult {
675
+ funnelId: string;
676
+ name: string;
677
+ totalStartedSessions: number;
678
+ totalCompletedSessions: number;
679
+ overallConversionRate: number;
680
+ steps: FunnelStepMetric[];
681
+ }
682
+ export interface SearchTermMetric {
683
+ query: string;
684
+ totalSearches: number;
685
+ distinctUsers: number;
686
+ resultsCount: number;
687
+ isZeroResult: boolean;
688
+ lastSearchedAt: string;
689
+ }
690
+ export interface AITheme {
691
+ theme: string;
692
+ sentiment: "positive" | "neutral" | "negative";
693
+ }
694
+ export interface Review {
695
+ id: number;
696
+ organization_id: string;
697
+ site_id: string;
698
+ source: string;
699
+ rating: number;
700
+ body: string | null;
701
+ author_email?: string | null;
702
+ rating_style?: "stars" | "moods" | "nps" | string | null;
703
+ metadata?: Record<string, unknown> | null;
704
+ ai_themes: AITheme[] | null;
705
+ submitted_at: string;
706
+ }
707
+ export interface ReviewSummaryMetrics {
708
+ totalReviews: number;
709
+ averageRating: number;
710
+ positivePercentage: number;
711
+ negativePercentage: number;
712
+ ratingDistribution: {
713
+ 1: number;
714
+ 2: number;
715
+ 3: number;
716
+ 4: number;
717
+ 5: number;
718
+ };
719
+ topThemes: {
720
+ theme: string;
721
+ sentiment: "positive" | "neutral" | "negative";
722
+ count: number;
723
+ }[];
724
+ }
725
+ export type IntelligenceIntent = "traffic_trend" | "outages_and_monitors" | "campaign_performance" | "funnel_conversion" | "search_and_reviews" | "general_overview";
726
+ export interface CitedFigure {
727
+ label: string;
728
+ value: string | number;
729
+ change?: string;
730
+ sourceTable: "events" | "incidents" | "campaigns" | "funnels" | "reviews";
731
+ }
732
+ export interface AskSitePulseResponse {
733
+ question: string;
734
+ intent: IntelligenceIntent;
735
+ timeWindowLabel: string;
736
+ hasSufficientData: boolean;
737
+ answer: string;
738
+ citedFigures: CitedFigure[];
739
+ suggestedFollowUps?: string[];
740
+ }
741
+ export type PaymentProvider = "paystack" | "flutterwave" | "stripe";
742
+ export interface Transaction {
743
+ id: number;
744
+ organization_id: string;
745
+ site_id: string;
746
+ provider: PaymentProvider;
747
+ external_id: string;
748
+ amount_minor: number;
749
+ currency: string;
750
+ status: string;
751
+ customer_ref: string | null;
752
+ order_ref: string | null;
753
+ campaign_id: string | null;
754
+ occurred_at: string;
755
+ raw_payload: Record<string, any>;
756
+ }
757
+ export type ExperimentStatus = "running" | "concluded";
758
+ export type ExperimentVariant = "A" | "B";
759
+ export type ExperimentWinner = "A" | "B" | "inconclusive";
760
+ export interface Experiment {
761
+ id: string;
762
+ organization_id: string;
763
+ site_id: string;
764
+ name: string;
765
+ variant_a_campaign_id: string;
766
+ variant_b_campaign_id: string;
767
+ split_percentage: number;
768
+ min_sample_size: number;
769
+ status: ExperimentStatus;
770
+ winner_variant?: ExperimentWinner | null;
771
+ started_at: string;
772
+ ended_at?: string | null;
773
+ }
774
+ export interface VariantAssignment {
775
+ experiment_id: string;
776
+ variant: ExperimentVariant;
777
+ campaign_id: string;
778
+ bucket: number;
779
+ }