import { EventRequest, MessageEventHandler } from "../app"; import { SlackAppEnv } from "../app-env"; import { BlockAction, BlockElementAction, BlockElementActions, BlockElementTypes } from "../request/payload/block-action"; import { BlockSuggestion } from "../request/payload/block-suggestion"; import { GlobalShortcut } from "../request/payload/global-shortcut"; import { MessageShortcut } from "../request/payload/message-shortcut"; import { SlashCommand } from "../request/payload/slash-command"; import { ViewClosed } from "../request/payload/view-closed"; import { ViewSubmission } from "../request/payload/view-submission"; import { SlackRequest, SlackRequestWithAssistantUtilities, SlackRequestWithOptionalRespond, SlackRequestWithRespond } from "../request/request"; import { SlackResponse } from "../response/response"; import { MessageAckResponse } from "./message-handler"; import { OptionsAckResponse } from "./options-handler"; import { ViewAckResponse } from "./view-handler"; import { AssistantThreadContextChangedEvent, AssistantThreadStartedEvent, FileShareMessageEvent, GenericMessageEvent, SupportedEventType } from "../request/payload/event"; import { AppRateLimited } from "../request/payload/app-rate-limited"; /** * Returned data from an ack function. */ export type AckResponse = SlackResponse | string | void; /** * The set of ack and lazy handlers. */ export interface SlackHandler { ack(request: SlackRequest): Promise; lazy(request: SlackRequest): Promise; } /** * ack function for slash command handling. */ export type SlashCommandAckHandler = (req: SlackRequestWithRespond) => Promise; /** * lazy function for slash command handling. */ export type SlashCommandLazyHandler = (req: SlackRequestWithRespond) => Promise; /** * lazy function for Events API handling. */ export type EventLazyHandler = (req: EventRequest) => Promise; /** * lazy function for message event handling. */ export type MessageEventLazyHandler = MessageEventHandler; export type AssistantThreadEventRequest = SlackRequestWithAssistantUtilities; export type AssistantEventLazyHandler = (req: AssistantThreadEventRequest) => Promise; export type AssistantUserMessageEventRequest = SlackRequestWithAssistantUtilities; export type AssistantBotMessageEventRequest = SlackRequestWithAssistantUtilities; /** * ack function for global/message shortcut handling. */ export type ShortcutAckHandler = (req: SlackRequest | SlackRequestWithRespond) => Promise; /** * ack function for global shortcut handling. */ export type GlobalShortcutAckHandler = (req: SlackRequest) => Promise; /** * ack function for message shortcut handling. */ export type MessageShortcutAckHandler = (req: SlackRequestWithRespond) => Promise; /** * lazy function for global/message shortcut handling. */ export type ShortcutLazyHandler = (req: SlackRequest | SlackRequestWithRespond) => Promise; /** * lazy function for global shortcut handling. */ export type GlobalShortcutLazyHandler = (req: SlackRequest) => Promise; /** * lazy function for message shortcut handling. */ export type MessageShortcutLazyHandler = (req: SlackRequestWithRespond) => Promise; /** * ack function for block_actions request handling. */ export type BlockActionAckHandler> = BlockAction>> = (req: SlackRequestWithOptionalRespond) => Promise; /** * ack function for block_actions request handling. */ export type SourceSpecifiedBlockActionAckHandler = BlockAction> = (req: SlackRequestWithOptionalRespond) => Promise; /** * lazy function for block_actions request handling. */ export type BlockActionLazyHandler> = BlockAction>> = (req: SlackRequestWithOptionalRespond) => Promise; export type SourceSpecifiedBlockActionLazyHandler = BlockAction> = (req: SlackRequestWithOptionalRespond) => Promise; /** * ack function for block_suggestion request handling. */ export type BlockSuggestionAckHandler = (req: SlackRequest) => Promise; /** * ack function for view_submission/view_closed request handling. */ export type ViewAckHandler = (req: SlackRequestWithOptionalRespond | SlackRequest) => Promise; /** * ack function for view_submission request handling. */ export type ViewSubmissionAckHandler = (req: SlackRequestWithOptionalRespond) => Promise; /** * ack function for view_closed request handling. */ export type ViewClosedAckHandler = (req: SlackRequest) => Promise; /** * lazy function for view_submission/view_closed request handling. */ export type ViewLazyHandler = (req: SlackRequestWithOptionalRespond | SlackRequest) => Promise; /** * lazy function for view_submission request handling. */ export type ViewSubmissionLazyHandler = (req: SlackRequestWithOptionalRespond) => Promise; /** * lazy function for view_closed request handling. */ export type ViewClosedLazyHandler = (req: SlackRequest) => Promise; /** * lazy function for app_rate_limited request handling. */ export type AppRateLimitedLazyHandler = (req: SlackRequest) => Promise; //# sourceMappingURL=handler.d.ts.map