n8n
Version:
n8n Workflow Automation Tool
53 lines (52 loc) • 2.12 kB
TypeScript
import type { CreateSlackAgentAppResponse, SlackAgentAppManifestResponse } from '@n8n/api-types';
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 { AgentsService } from '../agents.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 agentsService;
private readonly chatIntegrationService;
private readonly urlService;
constructor(cacheService: CacheService, cipher: Cipher, credentialsService: CredentialsService, userRepository: UserRepository, agentRepository: AgentRepository, agentsService: AgentsService, chatIntegrationService: ChatIntegrationService, urlService: UrlService);
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 {};