import { RetryOptions } from './types'; /** * Utility functions for Instagram n8n integration */ export declare class Utils { /** * Execute a function with retry logic and exponential backoff */ static executeWithRetry(operation: () => Promise, options?: Partial): Promise; /** * Create a delay promise */ static delay(ms: number): Promise; /** * Sanitize text input to prevent issues with Instagram API */ static sanitizeText(text: string): string; /** * Generate random delay to avoid rate limiting */ static randomDelay(min?: number, max?: number): Promise; /** * Formats error messages consistently */ static formatError(error: any): string; /** * Validates username format */ static validateUsername(username: string): boolean; /** * Validates hashtag format */ static validateHashtag(hashtag: string): string; /** * Validates image buffer */ static validateImageBuffer(buffer: Buffer): boolean; /** * Validates and formats media ID */ static validateMediaId(mediaId: string): string; /** * Extracts user ID from Instagram URL */ static extractUserIdFromUrl(url: string): string | null; /** * Formats timestamp to human readable date */ static formatTimestamp(timestamp: number): string; /** * Validates and limits numeric values */ static validateLimit(limit: number | undefined, defaultValue: number, maxValue: number): number; /** * Creates a retry mechanism for API calls */ static retry(operation: () => Promise, maxRetries?: number, baseDelay?: number): Promise; /** * Checks if error is rate limit related */ static isRateLimitError(error: any): boolean; /** * Generates a unique request ID for tracking */ static generateRequestId(): string; }