Learn more about Mintlify
Enter your email to receive updates about new features and product releases.
TypeScript interfaces and type definitions for the CAFH Platform
export enum UserRole {
SUPER_ADMIN = 'SUPER_ADMIN',
ADMIN = 'ADMIN',
EDITOR = 'EDITOR',
MEMBER = 'MEMBER',
GUEST = 'GUEST'
}
export interface User {
id: string;
name: string;
email: string;
role: UserRole;
avatarUrl: string;
tenantId: string;
interests: string[];
joinedDate: string;
coverUrl?: string;
phone?: string;
city?: string;
}
export interface UserActivity {
id: string;
type: 'Event' | 'Reading' | 'Donation' | 'Meditation';
title: string;
date: string;
status: 'Completed' | 'Registered';
}
export interface ContentItem {
id: string;
title: string;
type: 'Article' | 'Page' | 'Event' | 'Resource';
status: 'Published' | 'Draft';
author: string;
publishDate: string;
views: number;
tags: string[];
imageUrl?: string;
seo?: SEOConfig;
}
export interface BlogPost {
id: string;
title: string;
excerpt: string;
category: string;
imageUrl: string;
date: string;
author: string;
content?: string;
seo?: SEOConfig;
}
export interface CustomPage {
id: string;
slug: string;
title: string;
status: 'Published' | 'Draft';
sections: PageSection[];
seo: SEOConfig;
}
export interface PageSection {
id: string;
type: 'Text' | 'Image' | 'Gallery' | 'Stats' | 'Cards' | 'IconGrid' |
'Hero' | 'Video' | 'CTA' | 'Accordion' | 'ResourcesGrid' |
'EventsCalendar' | 'Timeline' | 'MethodPillars';
content: any;
order: number;
settings?: {
backgroundColor?: string;
padding?: 'small' | 'medium' | 'large';
containerSize?: 'narrow' | 'standard' | 'full';
};
}
export interface SEOConfig {
title: string;
description: string;
keywords: string[];
ogImage?: string;
schemaType?: string;
}
export interface ChangeLog {
id: string;
userId: string;
userName: string;
section: string;
action: 'Create' | 'Update' | 'Delete' | 'Rollback';
timestamp: string;
details: string;
previousState?: string;
}
export interface HomeConfig {
hero: HeroConfig;
searchSubtitle: string;
searchItems: SearchItem[];
threeColumns: HomeThreeColumn[];
blogSection: BlogConfig;
activitiesSection: {
title: string;
subtitle: string;
maxEvents: number;
order: number;
};
sectionOrder: string[];
footer: FooterConfig;
}
export interface HeroConfig {
title: string;
highlightWord: string;
subtitle: string;
backgrounds: HeroMedia[];
modalVideoId: string;
ctaText: string;
ctaLink: string;
sliderSpeed: number;
showControls: boolean;
textAlignment: 'left' | 'center' | 'right';
}
export interface FooterConfig {
columns: FooterColumn[];
socialLinks: { platform: string; url: string; icon: string }[];
subscriptionTitle: string;
subscriptionSubtitle: string;
leadSourceTag: string;
copyright: string;
}
export interface MegaMenuItem {
label: string;
path: string;
description?: string;
columns?: MegaMenuColumn[];
}
export interface MegaMenuColumn {
title: string;
items: { label: string; path: string; icon?: string; desc?: string }[];
}
export interface Contact {
id: string;
name: string;
firstName?: string;
lastName?: string;
email: string;
phone: string;
role: string;
status: 'Subscribed' | 'Unsubscribed' | 'Bounced' | 'Pending' | 'new';
lastContact: string;
tags: string[];
notes?: string;
engagementScore?: number;
mailrelayId?: string;
city?: string;
country?: string;
createdAt?: string;
listIds?: string[];
}
export interface ContactList {
id: string;
name: string;
description: string;
createdAt: string;
contactCount?: number;
}
export interface Campaign {
id: string;
name: string;
subject: string;
content: string;
status: 'Draft' | 'Scheduled' | 'Sent' | 'Testing';
recipientType: 'all' | 'subscribed' | 'list';
listId?: string;
recipientCount: number;
createdAt: string;
sentAt?: string;
scheduledAt?: string;
testEmail?: string;
metrics: {
sent: number;
opened: number;
clicked: number;
bounced: number;
};
}
export interface EmailLog {
id: string;
contactId: string;
subject: string;
sentAt: string;
status: 'Delivered' | 'Opened' | 'Clicked' | 'Bounced' | 'Failed' | 'Queued';
openedAt?: string;
clickedAt?: string;
errorMessage?: string;
campaignName?: string;
}
export interface SMTPConfig {
host: string;
port: string;
secure: boolean;
user: string;
pass: string;
fromEmail: string;
fromName: string;
}
export interface AutomationRule {
id: string;
name: string;
description?: string;
status: 'Active' | 'Paused' | 'Draft';
trigger: AutomationTrigger;
nodes: AutomationNode[];
nodePositions?: Record<string, { x: number; y: number }>;
createdAt: string;
updatedAt: string;
stats: {
totalExecutions: number;
completed: number;
emailsSent: number;
tagsApplied: number;
};
}
export type AutomationNode =
| SendEmailNode
| WaitNode
| ConditionNode
| UpdateTagNode
| MoveToListNode
| EndNode;
export interface SendEmailNode {
id: string;
type: 'send_email';
subject: string;
content: string;
fromName?: string;
}
export interface ConditionNode {
id: string;
type: 'condition';
check: 'email_opened' | 'email_clicked' | 'has_tag' | 'in_list';
value?: string;
branchTrue: AutomationNode[];
branchFalse: AutomationNode[];
}
export interface MediaAsset {
id: string;
name: string;
type: 'image' | 'video' | 'document' | 'audio';
url: string;
size: string;
dimensions?: string;
uploadedAt: string;
tags: string[];
folderId?: string;
}
export interface CalendarEvent {
id: string;
title: string;
date: string;
day: string;
month: string;
time: string;
location: string;
type: 'Presencial' | 'Online' | 'Híbrido';
color: string;
meetingUrl?: string;
zoomId?: string;
zoomPassword?: string;
platform?: 'Zoom';
agenda?: string[];
resources?: EventResource[];
seo?: SEOConfig;
organizerContactId?: string;
mediaRefs?: MeetingMediaRef[];
agendaItems?: MeetingAgendaItem[];
zoomWidgetConfig?: ZoomWidgetConfig;
eventStatus?: 'Programada' | 'En curso' | 'Finalizada';
linkedActivityId?: string;
}
export interface ActivityEvent {
id: string;
title: string;
description: string;
category: string;
tags: string[];
startDate: string;
endDate: string;
startTime: string;
endTime: string;
modality: 'Virtual' | 'Presencial' | 'Híbrida';
organizerContactId?: string;
status: 'Borrador' | 'Publicado' | 'Archivado';
imageUrl?: string;
seo?: SEOConfig;
featuredInDashboard: boolean;
linkedMeetingId?: string;
zoomUrl?: string;
createdAt: string;
updatedAt: string;
}
export interface MemberBadge {
id: string;
userId: string;
type: BadgeType;
label: string;
reason: string;
awardedAt: string;
awardedBy: string;
}
export type BadgeType = 'estrella' | 'medalla_bronce' | 'medalla_plata' | 'medalla_oro' | 'especial';
export interface ParticipationRecord {
id: string;
userId: string;
eventId: string;
eventTitle: string;
participatedAt: string;
feedbackSubmitted: boolean;
feedbackBlocksNext: boolean;
}
export interface FeedbackResponse {
id: string;
eventId: string;
userId: string;
userName: string;
submittedAt: string;
answers: {
questionId: string;
questionText: string;
value: string | number;
}[];
overallRating: number;
}
export interface ContentInteraction {
id: string;
userId?: string;
assetId: string;
assetName: string;
assetType: string;
tags: string[];
timestamp: string;
}
export interface EmailMetrics {
totalSent: number;
openRate: number;
clickRate: number;
bounceRate: number;
history: { date: string; sent: number; opened: number; clicked: number }[];
}