Add Slack integration types and update NodeType for enhanced functionality

- Introduced a new 'slack' entry in NodeType to support Slack operations.
- Added SlackOperation type and SlackConfig interface to define various Slack operations and their configurations, enhancing integration capabilities.
This commit is contained in:
Nikhil-Doye
2025-10-23 15:04:05 -04:00
parent fde48770f1
commit 800328f166
2 changed files with 78 additions and 1 deletions
+3 -1
View File
@@ -18,7 +18,9 @@ export type NodeType =
| "dataInput"
| "dataOutput"
// Unified database connector
| "database";
| "database"
// Slack integration
| "slack";
export type NodeStatus =
| "idle"
+75
View File
@@ -0,0 +1,75 @@
export type SlackOperation =
| "message"
| "channel"
| "user"
| "file"
| "reaction"
| "reminder";
export interface SlackConfig {
// Operation selection
operation: SlackOperation;
// Authentication
botToken: string;
appToken?: string; // For socket mode
// Message operation
channel?: string;
text?: string;
blocks?: any[];
attachments?: any[];
threadTs?: string; // For replying to threads
replyBroadcast?: boolean;
// Channel operation
channelName?: string;
channelPurpose?: string;
channelTopic?: string;
isPrivate?: boolean;
inviteUsers?: string[];
// User operation
userId?: string;
userEmail?: string;
userPresence?: "auto" | "away";
// File operation
fileContent?: string;
fileName?: string;
fileType?: string;
fileTitle?: string;
fileComment?: string;
// Reaction operation
emoji?: string;
timestamp?: string;
// Reminder operation
reminderText?: string;
reminderTime?: string; // Unix timestamp or natural language
reminderUser?: string;
// Advanced options
parse?: "full" | "none";
linkNames?: boolean;
unfurlLinks?: boolean;
unfurlMedia?: boolean;
username?: string;
iconEmoji?: string;
iconUrl?: string;
asUser?: boolean;
}
export interface SlackResponse {
success: boolean;
data?: any;
error?: string;
metadata?: {
operation: SlackOperation;
channelId?: string;
messageTs?: string;
userId?: string;
executionTime?: number;
};
}