import { AgentIntegrationConfig } from '@n8n/api-types'; import type { RichCardComponentType } from '@n8n/api-types'; import { Logger } from '@n8n/backend-common'; import { OutboundHttp } from '@n8n/backend-network'; import type { Thread, Author } from 'chat'; import { InstanceSettings } from 'n8n-core'; import { UrlService } from '@n8n/backend-services'; import { AgentRepository } from '../../../repositories/agent.repository'; import { AgentChatIntegration, type AgentChannelPreconditionContext, type AgentChatIntegrationContext, type ActionDecisionMessageParams, type BridgeExecutionContext, type BridgeMessageContextParams, type BridgeResumeExecutionContext, type VerifiedSender } from '../../agent-chat-integration'; import type { SuspendComponent } from '../../component-mapper'; import type { DecodedThread, OriginInput } from '../../integration-origin-support'; export declare class TelegramIntegration extends AgentChatIntegration { private readonly logger; private readonly urlService; private readonly agentRepository; private readonly instanceSettings; private readonly outboundHttp; readonly type = "telegram"; readonly credentialTypes: string[]; readonly displayLabel = "Telegram"; readonly displayIcon = "telegram"; readonly builderGuidance: { capabilities: string[]; useIntegrationWhen: string[]; useNodeToolWhen: string[]; }; readonly supportedComponents: readonly RichCardComponentType[]; readonly actionToolDefinitions: import("../../integration-tool-types").IntegrationActionDefinition[]; readonly contextToolGuidance: string[]; readonly actionToolGuidance: string[]; readonly fileUploadLimits: { maxFiles: number; maxFileBytes: number; maxCaptionLength: number; maxImageBytes: number; }; readonly sendFilesAsAttachments = true; readonly needsShortCallbackData = true; readonly deleteActionMessageBeforeResume = false; readonly disableStreaming = true; readonly maxMessageLength = 30000; groupOutboundFiles(files: T[]): T[][]; formatActionDecisionMessage({ approved, selectedLabel, raw, user, }: ActionDecisionMessageParams): string; readonly formatThreadId: { fromSdk: (thread: Thread) => string; toSdk: (threadId: string) => string; }; constructor(logger: Logger, urlService: UrlService, agentRepository: AgentRepository, instanceSettings: InstanceSettings, outboundHttp: OutboundHttp); buildOriginDraft(_input: OriginInput, decoded: DecodedThread): import("../../integration-origin-support").OriginDraft; resolveEpisodicScope(): null; createAdapter(ctx: AgentChatIntegrationContext): Promise; validateConfig(integration: AgentIntegrationConfig): void; requiresLeader({ ingressEnabled }?: { ingressEnabled: boolean; }): boolean; assertStartupPreconditions(ctx: AgentChannelPreconditionContext): Promise; onBeforeConnect(ctx: AgentChatIntegrationContext): Promise; onAfterConnect(ctx: AgentChatIntegrationContext): Promise; onBeforeDisconnect(ctx: AgentChatIntegrationContext): Promise; verifiedSender(raw: unknown): VerifiedSender | undefined; isUserAllowed(_author: Author, integration: AgentIntegrationConfig | undefined, sender?: VerifiedSender): boolean; createBridgeExecutionContext(params: BridgeMessageContextParams): Promise; createResumeExecutionContext(params: { thread: BridgeMessageContextParams['thread']; logger: BridgeMessageContextParams['logger']; agentId: string; }): Promise; normalizeComponents(components: SuspendComponent[]): SuspendComponent[]; private getMode; private deriveSecretToken; private extractBotToken; private botApiUrl; private botApiRequest; private isOkStatus; private stringifyBody; }