UNPKG

nexus-react-core

Version:

A comprehensive React toolkit with services, hooks, and Redux store management

130 lines 3.71 kB
export interface FacebookPost { postId: string; platform: 'facebook'; title: string; content: string; image: string; createdAt: string; engagementRate: number; reach: number; impressions: number; saved: number; engagement: number; likes: number; comments: number; shares: number; } export interface FacebookSummary { totalPosts: number; totalImpressions: number; totalReach: number; totalEngagement: number; totalLikes: number; totalComments: number; totalShares: number; totalSaved: number; avgEngagementRate: number; } export interface FacebookDemographics { locations: Array<{ country: string; percentage: number; }>; genders: Array<{ gender: string; percentage: number; }>; ages: Array<{ range: string; percentage: number; }>; } export interface FacebookDirectData { summary: FacebookSummary; recentPosts: FacebookPost[]; demographics: FacebookDemographics; trends: any[]; isConnected: boolean; source: string; permissions: { pageAccess: boolean; insights: boolean; posts: boolean; }; } export interface TwitterTweet { id: string; text: string; createdAt: string; metrics: { likes: number; retweets: number; replies: number; impressions: number; engagement: number; }; } export interface TwitterSummary { totalTweets: number; totalLikes: number; totalRetweets: number; totalReplies: number; totalImpressions: number; followers: number; following: number; avgEngagementRate: number; } export interface TwitterUser { id: string; username: string; name: string; description: string; profileImageUrl: string | null; verified: boolean; createdAt: string; followers: number; following: number; tweetCount: number; } export interface TwitterDirectData { summary: TwitterSummary; user: TwitterUser; recentTweets: TwitterTweet[]; isConnected: boolean; source: string; note?: string; } export interface ApiResponse<T> { success: boolean; data: T; message: string; error?: any; fallback?: string; } /** * Fetch Facebook direct page data from the backend * @param pageId - Optional Facebook page ID (uses backend default if not provided) * @param token - Authentication token (optional, will try to get from localStorage) * @returns Promise with Facebook page data */ export declare function fetchFacebookDirectData(pageId?: string, token?: string): Promise<ApiResponse<FacebookDirectData>>; /** * Fetch Twitter user analytics data from the backend * @param username - Optional Twitter username (uses backend default if not provided) * @param token - Authentication token (optional, will try to get from localStorage) * @returns Promise with Twitter user data */ export declare function fetchTwitterDirectData(username?: string, token?: string): Promise<ApiResponse<TwitterDirectData>>; /** * Fetch test data for development/testing purposes * @param token - Authentication token (optional, will try to get from localStorage) * @returns Promise with test data */ export declare function fetchTestData(token?: string): Promise<ApiResponse<FacebookDirectData>>; /** * Fetch realistic test data with proper formatting * @param token - Authentication token (optional, will try to get from localStorage) * @returns Promise with realistic test data */ export declare function fetchRealisticTestData(token?: string): Promise<ApiResponse<FacebookDirectData>>; //# sourceMappingURL=socialEngagementService.d.ts.map