UNPKG

remcode

Version:

Turn your AI assistant into a codebase expert. Intelligent code analysis, semantic search, and software engineering guidance through MCP integration.

91 lines (90 loc) 2.46 kB
export interface NotificationConfig { slack?: { webhook: string; channel?: string; username?: string; }; email?: { enabled: boolean; recipients: string[]; smtpConfig?: { host: string; port: number; username: string; password: string; }; }; github?: { createIssue: boolean; assignees?: string[]; labels?: string[]; }; } export interface NotificationPayload { type: 'success' | 'failure' | 'warning' | 'info'; title: string; message: string; repository: string; runId?: number; url?: string; metadata?: Record<string, any>; } export declare class NotificationService { private config; constructor(config?: NotificationConfig); /** * Send notification via all configured channels */ sendNotification(payload: NotificationPayload): Promise<{ success: boolean; results: Record<string, { success: boolean; error?: string; }>; }>; /** * Send Slack notification */ private sendSlackNotification; /** * Send email notification (placeholder implementation) */ private sendEmailNotification; /** * Create GitHub issue for critical failures */ private createGitHubIssue; /** * Get Slack color based on notification type */ private getSlackColor; /** * Get Slack emoji based on notification type */ private getSlackEmoji; /** * Create notification for workflow completion */ static createWorkflowNotification(repository: string, runId: number, status: 'success' | 'failure', duration: number, stats?: any): NotificationPayload; /** * Create notification for workflow health issues */ static createHealthNotification(repository: string, issues: string[], recommendations: string[]): NotificationPayload; } /** * Default notification configurations for common scenarios */ export declare const defaultNotificationConfigs: { /** * Basic Slack-only configuration */ slackOnly: (webhookUrl: string, channel?: string) => NotificationConfig; /** * Comprehensive notification configuration */ comprehensive: (config: { slackWebhook?: string; emailRecipients?: string[]; createGitHubIssues?: boolean; }) => NotificationConfig; };