/**
 * Telegram Initializer
 *
 * Handles automatic Telegram connection on application startup.
 * Checks for environment variables or saved credentials and initializes
 * the TelegramService + bridge if configured.
 *
 * @module services/telegram/telegram-initializer
 */
import { TelegramConfig } from './telegram-credentials.service.js';
import type { MessageQueueService } from '../messaging/message-queue.service.js';
/**
 * Result of initialization attempt.
 */
export interface TelegramInitResult {
    /** Whether initialization was attempted */
    attempted: boolean;
    /** Whether initialization succeeded */
    success: boolean;
    /** Error message if failed */
    error?: string;
}
/**
 * Check if Telegram is configured via environment variables.
 *
 * @returns True if TELEGRAM_BOT_TOKEN is set
 */
export declare function isTelegramConfigured(): boolean;
/**
 * Get Telegram configuration from environment variables.
 *
 * @returns TelegramConfig object or null if not configured
 */
export declare function getTelegramConfigFromEnv(): TelegramConfig | null;
/**
 * Get Telegram configuration from environment variables or saved credentials.
 * Environment variables take priority over saved credentials.
 *
 * @returns TelegramConfig object or null if not configured
 */
export declare function getTelegramConfig(): Promise<TelegramConfig | null>;
/**
 * Options for Telegram initialization.
 */
export interface TelegramInitOptions {
    /** Optional MessageQueueService for enqueuing messages to orchestrator */
    messageQueueService?: MessageQueueService;
}
/**
 * Initialize Telegram integration if configured via environment variables
 * or saved credentials.
 *
 * This function is designed to be called during application startup.
 * It safely handles cases where Telegram is not configured.
 *
 * @param options - Optional initialization options
 * @returns Result object indicating success or failure
 *
 * @example
 * ```typescript
 * const result = await initializeTelegramIfConfigured({
 *   messageQueueService: myQueueService,
 * });
 * if (result.success) {
 *   console.log('Telegram connected!');
 * }
 * ```
 */
export declare function initializeTelegramIfConfigured(options?: TelegramInitOptions): Promise<TelegramInitResult>;
/**
 * Gracefully shutdown Telegram integration.
 *
 * Call this during application shutdown to disconnect cleanly.
 */
export declare function shutdownTelegram(): Promise<void>;
//# sourceMappingURL=telegram-initializer.d.ts.map