UNPKG

n8n

Version:

n8n Workflow Automation Tool

37 lines (36 loc) 2.11 kB
import type { SlackAgentAppManifest } from '@n8n/api-types'; import { OutboundHttp } from '@n8n/backend-network'; import type { User } from '@n8n/db'; import { CredentialsService } from '../../../../../credentials/credentials.service'; import { BadRequestError } from '../../../../../errors/response-errors/bad-request.error'; import { UrlService } from '../../../../../services/url.service'; import { AgentIntegrationManagementService } from '../../../agent-integration-management.service'; import type { Agent } from '../../../entities/agent.entity'; import { AgentRepository } from '../../../repositories/agent.repository'; export declare class SlackMethodsService { private readonly credentialsService; private readonly agentRepository; private readonly integrationManagementService; private readonly urlService; private readonly outboundHttp; constructor(credentialsService: CredentialsService, agentRepository: AgentRepository, integrationManagementService: AgentIntegrationManagementService, urlService: UrlService, outboundHttp: OutboundHttp); callSlackApi(method: string, params: Record<string, string>, headers?: Record<string, string>): Promise<Record<string, unknown>>; slackError(action: string, response: Record<string, unknown>): BadRequestError; getAgent(agentId: string, projectId: string): Promise<Agent>; buildManifest(agentName: string, projectId: string, agentId: string, options?: { redirectUrl?: string; }): SlackAgentAppManifest; callbackUrl(projectId: string, agentId: string): string; installUrl(oauthAuthorizeUrl: string, state: string, redirectUrl: string): string; createAndConnectBotCredential(options: { agent: Agent; user: User; accessToken: string; signingSecret: string; }): Promise<string>; childRecord(record: Record<string, unknown>, key: string): Record<string, unknown> | undefined; stringProperty(record: Record<string, unknown> | undefined, key: string): string | undefined; private webhookUrl; private credentialName; private sanitiseSlackAppName; }