UNPKG

@asgerami/zemenay-blog

Version:

Plug-and-play blog system for Next.js - Get a fully functional blog running in minutes with zero configuration

112 lines (111 loc) 2.42 kB
export interface BlogPost { id: string; title: string; content: string; slug: string; created_at: string; updated_at: string; featured_image_id?: string; featured_image?: BlogImage; categories?: Category[]; tags?: Tag[]; } export interface Category { id: string; name: string; slug: string; description?: string; color: string; created_at: string; } export interface Tag { id: string; name: string; slug: string; color: string; created_at: string; } export interface PostCategory { id: string; post_id: string; category_id: string; created_at: string; } export interface PostTag { id: string; post_id: string; tag_id: string; created_at: string; } export interface BlogImage { id: string; filename: string; original_name: string; file_path: string; file_size: number; mime_type: string; alt_text?: string; uploaded_by?: string; created_at: string; } export interface CreatePostData { title: string; content: string; slug: string; } export interface UpdatePostData { title?: string; content?: string; slug?: string; } export interface ZemenayBlogConfig { supabaseUrl: string; supabaseAnonKey: string; } export interface SEOData { title: string; description: string; image?: string; url?: string; type?: "website" | "article"; publishedTime?: string; modifiedTime?: string; author?: string; tags?: string[]; } export interface PostView { id: string; post_id: string; visitor_id: string; user_agent: string; referrer: string; viewed_at: string; } export interface PostEngagement { id: string; post_id: string; visitor_id: string; event_type: "time_spent" | "scroll_depth" | "click" | "share"; value: number; created_at: string; } export interface BlogAnalytics { post_id: string; total_views: number; unique_views: number; reading_time: number; referrers: Record<string, number>; views_by_date: Record<string, number>; last_updated: string; } export interface PopularPost extends BlogPost { view_count: number; } export interface EngagementMetrics { total_posts: number; total_views: number; unique_visitors: number; views_last_30_days: number; average_views_per_post: number; last_updated: string; }