n8n
Version:
n8n Workflow Automation Tool
57 lines (56 loc) • 2.49 kB
TypeScript
import type { CreateSlackAgentAppResponse, SlackAgentAppManifestResponse } from '@n8n/api-types';
import { OutboundHttp } from '@n8n/backend-network';
import type { User } from '@n8n/db';
import { UserRepository } from '@n8n/db';
import { Cipher } from 'n8n-core';
import { CredentialsService } from '../../../credentials/credentials.service';
import { CacheService } from '../../../services/cache/cache.service';
import { UrlService } from '../../../services/url.service';
import { AgentIntegrationPersistenceService } from '../agent-integration-persistence.service';
import { AgentPublishService } from '../agent-publish.service';
import { AgentRepository } from '../repositories/agent.repository';
import { ChatIntegrationService } from './chat-integration.service';
interface CreateSlackAppOptions {
projectId: string;
agentId: string;
appConfigurationToken: string;
user: User;
}
interface GetSlackAppManifestOptions {
projectId: string;
agentId: string;
}
interface CompleteSlackAppInstallOptions {
projectId: string;
agentId: string;
code: string;
state: string;
}
export declare class SlackAppSetupService {
private readonly cacheService;
private readonly cipher;
private readonly credentialsService;
private readonly userRepository;
private readonly agentRepository;
private readonly agentIntegrationPersistenceService;
private readonly agentPublishService;
private readonly chatIntegrationService;
private readonly urlService;
private readonly outboundHttp;
constructor(cacheService: CacheService, cipher: Cipher, credentialsService: CredentialsService, userRepository: UserRepository, agentRepository: AgentRepository, agentIntegrationPersistenceService: AgentIntegrationPersistenceService, agentPublishService: AgentPublishService, chatIntegrationService: ChatIntegrationService, urlService: UrlService, outboundHttp: OutboundHttp);
createApp(options: CreateSlackAppOptions): Promise<CreateSlackAgentAppResponse>;
getManualManifest(options: GetSlackAppManifestOptions): Promise<SlackAgentAppManifestResponse>;
completeInstall(options: CompleteSlackAppInstallOptions): Promise<void>;
private getAgent;
private buildManifest;
private webhookUrl;
private callbackUrl;
private installUrl;
private consumeSession;
private cacheKey;
private credentialName;
private sanitiseSlackAppName;
private callSlackApi;
private slackError;
}
export {};