Update remote soul-content with local content

This commit is contained in:
卡若
2026-01-09 11:58:08 +08:00
parent 2bdf275cba
commit d781dc07ed
172 changed files with 16577 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
export type CampaignType = 'popup' | 'banner' | 'modal' | 'toast';
export interface Campaign {
id: string;
name: string;
type: CampaignType;
isActive: boolean;
rules: CampaignRule[];
content: CampaignContent;
startDate?: Date;
endDate?: Date;
}
export interface CampaignRule {
type: 'time_on_page' | 'scroll_depth' | 'exit_intent' | 'user_segment';
value: number | string; // e.g., 30 (seconds), 50 (percent)
}
export interface CampaignContent {
title?: string;
body?: string;
imageUrl?: string;
ctaText?: string;
ctaUrl?: string;
}
export interface MarketingService {
getActiveCampaigns(context: UserContext): Promise<Campaign[]>;
trackImpression(campaignId: string): void;
trackClick(campaignId: string): void;
}
export interface UserContext {
userId?: string;
pageUrl: string;
device: 'mobile' | 'desktop';
}