refactor: centralize slack threading helpers

This commit is contained in:
Peter Steinberger
2026-01-09 16:01:47 +00:00
parent d0b06b4334
commit d099dabf37
8 changed files with 141 additions and 63 deletions

38
src/slack/types.ts Normal file
View File

@@ -0,0 +1,38 @@
export type SlackFile = {
id?: string;
name?: string;
mimetype?: string;
size?: number;
url_private?: string;
url_private_download?: string;
};
export type SlackMessageEvent = {
type: "message";
user?: string;
bot_id?: string;
subtype?: string;
username?: string;
text?: string;
ts?: string;
thread_ts?: string;
event_ts?: string;
parent_user_id?: string;
channel: string;
channel_type?: "im" | "mpim" | "channel" | "group";
files?: SlackFile[];
};
export type SlackAppMentionEvent = {
type: "app_mention";
user?: string;
bot_id?: string;
username?: string;
text?: string;
ts?: string;
thread_ts?: string;
event_ts?: string;
parent_user_id?: string;
channel: string;
channel_type?: "im" | "mpim" | "channel" | "group";
};