/// <reference types="node" />
import { BaseOAuthAction } from '@memberjunction/actions';
import { ActionParam } from '@memberjunction/actions-base';
/**
 * Common interfaces for social media actions
 */
export interface SocialPost {
    id: string;
    platform: string;
    profileId: string;
    content: string;
    mediaUrls: string[];
    publishedAt: Date;
    scheduledFor?: Date;
    analytics?: SocialAnalytics;
    platformSpecificData: Record<string, any>;
}
export interface SocialAnalytics {
    impressions: number;
    engagements: number;
    clicks: number;
    shares: number;
    comments: number;
    likes: number;
    reach: number;
    saves?: number;
    videoViews?: number;
    platformMetrics: Record<string, any>;
}
export interface SearchParams {
    query?: string;
    hashtags?: string[];
    startDate?: Date;
    endDate?: Date;
    limit?: number;
    offset?: number;
}
export interface MediaFile {
    filename: string;
    mimeType: string;
    data: Buffer | string;
    size: number;
}
export declare enum SocialMediaErrorCode {
    RATE_LIMIT_EXCEEDED = "RATE_LIMIT",
    INVALID_TOKEN = "INVALID_TOKEN",
    TOKEN_EXPIRED = "TOKEN_EXPIRED",
    PLATFORM_ERROR = "PLATFORM_ERROR",
    INVALID_MEDIA = "INVALID_MEDIA",
    POST_NOT_FOUND = "POST_NOT_FOUND",
    INSUFFICIENT_PERMISSIONS = "INSUFFICIENT_PERMISSIONS"
}
/**
 * Base class for all social media actions.
 * Provides common functionality for authentication, media handling,
 * analytics normalization, and rate limiting.
 */
export declare abstract class BaseSocialMediaAction extends BaseOAuthAction {
    /**
     * Common parameters for all social media actions
     */
    protected get commonSocialParams(): ActionParam[];
    /**
     * Get the platform name (e.g., 'Twitter', 'LinkedIn')
     */
    protected abstract get platformName(): string;
    /**
     * Get the API base URL for the platform
     */
    protected abstract get apiBaseUrl(): string;
    /**
     * Normalize platform-specific analytics to common format
     */
    protected normalizeAnalytics(platformData: any): SocialAnalytics;
    /**
     * Upload media files to the platform
     */
    protected uploadMedia(files: MediaFile[]): Promise<string[]>;
    /**
     * Platform-specific media upload implementation
     */
    protected abstract uploadSingleMedia(file: MediaFile): Promise<string>;
    /**
     * Validate media file meets platform requirements
     */
    protected validateMediaFile(file: MediaFile): void;
    /**
     * Handle rate limiting with exponential backoff
     */
    protected handleRateLimit(retryAfter?: number): Promise<void>;
    /**
     * Search for posts on the platform
     */
    protected abstract searchPosts(params: SearchParams): Promise<SocialPost[]>;
    /**
     * Convert platform-specific post data to common format
     */
    protected abstract normalizePost(platformPost: any): SocialPost;
    /**
     * Parse rate limit headers from API response
     */
    protected parseRateLimitHeaders(headers: any): {
        remaining: number;
        reset: Date;
        limit: number;
    } | null;
    /**
     * Build common API headers including authentication
     */
    protected buildHeaders(additionalHeaders?: Record<string, string>): Record<string, string>;
    /**
     * Format date for API requests (ISO 8601)
     */
    protected formatDate(date: Date | string): string;
    /**
     * Parse date from API response
     */
    protected parseDate(dateString: string): Date;
    /**
     * Get profile ID from parameters or default from integration
     */
    protected getProfileId(params: any): string;
    /**
     * Log API request for debugging
     */
    protected logApiRequest(method: string, url: string, data?: any): void;
    /**
     * Log API response for debugging
     */
    protected logApiResponse(response: any): void;
    /**
     * Helper to get parameter value from params array
     */
    protected getParamValue(params: ActionParam[], paramName: string): any;
}
//# sourceMappingURL=base-social.action.d.ts.map