base-event-handler.ts 411 B

123456789101112
  1. import { WebClient } from '@slack/web-api';
  2. import { GrowiBotEvent } from '@growi/slack';
  3. import { EventActionsPermission } from '../../interfaces/slack-integration/events';
  4. export interface SlackEventHandler<T> {
  5. shouldHandle(eventType: string, permission: EventActionsPermission, channel?: string): boolean
  6. handleEvent(client: WebClient, growiBotEvent: GrowiBotEvent<T>, data?: any): Promise<void>
  7. }