import Redis from 'ioredis'; import { ActionPayload, EventPayload, ISharedAgent } from '@magickml/shared-services'; import SlackEventClient from './services/slackEventClient'; import { WebSocketPlugin } from '@magickml/agent-plugin'; import { type CorePluginEvents } from '@magickml/core-plugin'; import Bolt from '@slack/bolt'; import { SLACK_DEPENDENCIES, SLACK_COMMANDS, SLACK_ACTIONS, SLACK_EVENTS, type SlackCredentials, type SlackPluginState, SlackEventPayload, SlackEvents, SendSlackMessage } from './configx'; import { RedisPubSub } from '@magickml/redis-pubsub'; export declare class SlackPlugin extends WebSocketPlugin, Record, Record, SlackPluginState> { defaultState: SlackPluginState; client: SlackEventClient; nodes: (import("@magickml/behave-graph").IFlowNodeDefinition<{ flow: import("@magickml/behave-graph").SocketDefinition; images: import("@magickml/behave-graph").SocketDefinition; comment: import("@magickml/behave-graph").SocketDefinition; }, { flow: import("@magickml/behave-graph").SocketDefinition; }, import("@magickml/behave-graph").NodeConfigurationDescription, undefined> | import("@magickml/behave-graph").IFlowNodeDefinition<{ flow: import("@magickml/behave-graph").SocketDefinition; content: import("@magickml/behave-graph").SocketDefinition; }, { flow: import("@magickml/behave-graph").SocketDefinition; }, import("@magickml/behave-graph").NodeConfigurationDescription, undefined> | import("@magickml/behave-graph").IFlowNodeDefinition<{ flow: import("@magickml/behave-graph").SocketDefinition; audioFile: import("@magickml/behave-graph").SocketDefinition; }, { flow: import("@magickml/behave-graph").SocketDefinition; }, import("@magickml/behave-graph").NodeConfigurationDescription, undefined> | Omit>, "init" | "dispose">)[]; values: never[]; slack: Bolt.App | null; credentials: readonly [{ readonly name: "slack-token"; readonly serviceType: "slack"; readonly credentialType: "plugin"; readonly initials: "SL"; readonly clientName: "Slack Token"; readonly icon: "https://a.slack-edge.com/80588/marketing/img/meta/favicon-32.png"; readonly helpLink: "https://api.slack.com/apps/"; readonly description: "Used to recieve events from Slack"; readonly available: true; readonly pluginName: "slack"; }, { readonly name: "slack-signing-secret"; readonly serviceType: "slack"; readonly credentialType: "plugin"; readonly initials: "SL"; readonly clientName: "Slack Signing Secret"; readonly icon: "https://a.slack-edge.com/80588/marketing/img/meta/favicon-32.png"; readonly helpLink: "https://api.slack.com/apps/"; readonly description: "Used to verify requests from Slack"; readonly available: true; readonly pluginName: "slack"; }, { readonly name: "slack-app-token"; readonly serviceType: "slack"; readonly credentialType: "plugin"; readonly initials: "SL"; readonly clientName: "Slack App Token"; readonly icon: "https://a.slack-edge.com/80588/marketing/img/meta/favicon-32.png"; readonly helpLink: "https://api.slack.com/apps/"; readonly description: "Used to send messages to Slack"; readonly available: true; readonly pluginName: "slack"; }]; constructor({ connection, agent, pubSub, projectId, }: { connection: Redis; agent: ISharedAgent; pubSub: RedisPubSub; projectId: string; }); getPluginConfig(): { events: { app_requested: "app_requested"; app_home_opened: "app_home_opened"; app_mention: "app_mention"; app_rate_limited: "app_rate_limited"; app_uninstalled: "app_uninstalled"; call_rejected: "call_rejected"; channel_archive: "channel_archive"; channel_created: "channel_created"; channel_deleted: "channel_deleted"; channel_history_changed: "channel_history_changed"; channel_id_changed: "channel_id_changed"; channel_left: "channel_left"; channel_rename: "channel_rename"; channel_shared: "channel_shared"; channel_unarchive: "channel_unarchive"; channel_unshared: "channel_unshared"; dnd_updated: "dnd_updated"; dnd_updated_user: "dnd_updated_user"; email_domain_changed: "email_domain_changed"; emoji_changed: "emoji_changed"; file_change: "file_change"; file_comment_deleted: "file_comment_deleted"; file_created: "file_created"; file_deleted: "file_deleted"; file_public: "file_public"; file_shared: "file_shared"; file_unshared: "file_unshared"; grid_migration_finished: "grid_migration_finished"; grid_migration_started: "grid_migration_started"; group_archive: "group_archive"; group_close: "group_close"; group_deleted: "group_deleted"; group_history_changed: "group_history_changed"; group_left: "group_left"; group_open: "group_open"; group_rename: "group_rename"; group_unarchive: "group_unarchive"; im_close: "im_close"; im_created: "im_created"; im_history_changed: "im_history_changed"; im_open: "im_open"; invite_requested: "invite_requested"; link_shared: "link_shared"; member_joined_channel: "member_joined_channel"; member_left_channel: "member_left_channel"; message: "message"; message_metadata_posted: "message_metadata_posted"; message_metadata_updated: "message_metadata_updated"; message_metadata_deleted: "message_metadata_deleted"; pin_added: "pin_added"; pin_removed: "pin_removed"; reaction_added: "reaction_added"; reaction_removed: "reaction_removed"; shared_channel_invite_received: "shared_channel_invite_received"; shared_channel_invite_accepted: "shared_channel_invite_accepted"; shared_channel_invite_approved: "shared_channel_invite_approved"; shared_channel_invite_declined: "shared_channel_invite_declined"; star_added: "star_added"; star_removed: "star_removed"; subteam_created: "subteam_created"; subteam_members_changed: "subteam_members_changed"; subteam_self_added: "subteam_self_added"; subteam_self_removed: "subteam_self_removed"; subteam_updated: "subteam_updated"; team_access_granted: "team_access_granted"; team_access_revoked: "team_access_revoked"; team_domain_changed: "team_domain_changed"; team_join: "team_join"; team_rename: "team_rename"; tokens_revoked: "tokens_revoked"; user_change: "user_change"; user_huddle_changed: "user_huddle_changed"; user_profile_changed: "user_profile_changed"; user_status_changed: "user_status_changed"; workflow_deleted: "workflow_deleted"; workflow_published: "workflow_published"; workflow_unpublished: "workflow_unpublished"; workflow_step_deleted: "workflow_step_deleted"; workflow_step_execute: "workflow_step_execute"; }; actions: { sendMessage: "sendMessage"; }; dependencyKeys: typeof SLACK_DEPENDENCIES; commands: typeof SLACK_COMMANDS; developerMode: boolean; credentials: readonly [{ readonly name: "slack-token"; readonly serviceType: "slack"; readonly credentialType: "plugin"; readonly initials: "SL"; readonly clientName: "Slack Token"; readonly icon: "https://a.slack-edge.com/80588/marketing/img/meta/favicon-32.png"; readonly helpLink: "https://api.slack.com/apps/"; readonly description: "Used to recieve events from Slack"; readonly available: true; readonly pluginName: "slack"; }, { readonly name: "slack-signing-secret"; readonly serviceType: "slack"; readonly credentialType: "plugin"; readonly initials: "SL"; readonly clientName: "Slack Signing Secret"; readonly icon: "https://a.slack-edge.com/80588/marketing/img/meta/favicon-32.png"; readonly helpLink: "https://api.slack.com/apps/"; readonly description: "Used to verify requests from Slack"; readonly available: true; readonly pluginName: "slack"; }, { readonly name: "slack-app-token"; readonly serviceType: "slack"; readonly credentialType: "plugin"; readonly initials: "SL"; readonly clientName: "Slack App Token"; readonly icon: "https://a.slack-edge.com/80588/marketing/img/meta/favicon-32.png"; readonly helpLink: "https://api.slack.com/apps/"; readonly description: "Used to send messages to Slack"; readonly available: true; readonly pluginName: "slack"; }]; }; getCommandHandlers(): {}; login(credentials: SlackCredentials): Promise; validateLogin(): Promise; validatePermissions(): boolean; logout(): Promise; getContext(): Promise<{ id: string; username: string; platform: "slack"; authTest: import("@slack/web-api").AuthTestResponse; }>; validateCredentials(credentials: SlackCredentials): false | SlackCredentials; private createMessageEventPayload; listen(eventName: SlackEvents): void; unlisten(eventName: SlackEvents): void; getActionHandlers(): { sendMessage: (actionPayload: ActionPayload) => void; }; getDependencies(): { slack: import("./dependencies/slackEmitter").SlackEmitterType; slackClient: Bolt.App | null; sendSlackMessage: SendSlackMessage; }; sendSlackMessage: SendSlackMessage; handleSendMessage(actionPayload: ActionPayload): void; formatPayload(event: string, payload: EventPayload): EventPayload; }