import { SlackEvent as BoltEvents } from '@slack/bolt'; import { EventPayload } from '@magickml/shared-services'; import type { App, EventFromType } from '@slack/bolt'; import type { CreateCredentialsRecord, PluginStateType } from '@magickml/agent-plugin'; export declare const slackPluginName: "slack"; export declare const SLACK_DEVELOPER_MODE: boolean; type SlackAuthTest = Awaited>; export type SlackAgentContext = { id: string | undefined; username: string | undefined; authTest: SlackAuthTest | undefined; platform: 'slack'; }; export interface SlackPluginState extends PluginStateType { enabled: boolean; context: SlackAgentContext; } export declare const slackDefaultState: SlackPluginState; export declare const slackPluginCredentials: 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"; }]; export type SlackCredentials = CreateCredentialsRecord; export type SlackEvents = BoltEvents['type']; export declare const slackEventNames: SlackEvents[]; export declare const SLACK_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"; }; export type SlackMessageSubtypes = Exclude['subtype'], undefined>; export type SlackBaseMessageEvent = EventFromType<'message'> & { subtype: undefined; }; export type SlackMessageEvents = { [key in SlackMessageSubtypes]: EventFromType<'message'>; }; export type BaseSlackEventPayload = { SlackEvents: EventFromType; }; export type SlackEventMetadata = Record & { context: SlackAgentContext | null | undefined; }; export type SlackEventPayload = EventPayload; export type SlackEvent = EventPayload; export declare const SLACK_ACTIONS: { sendMessage: "sendMessage"; }; export declare enum SLACK_DEPENDENCIES { SLACK_CLIENT = "slackClient", SLACK_SEND_MESSAGE = "sendSlackMessage" } export declare enum SLACK_COMMANDS { } export type SendSlackMessage = (content: string, channel: string) => Promise; export {};