recoder-code
Version:
Complete AI-powered development platform with ML model training, plugin registry, real-time collaboration, monitoring, infrastructure automation, and enterprise deployment capabilities
27 lines (26 loc) • 1.52 kB
TypeScript
/**
* Notification Service - Handles sending notifications to users
*/
import { User } from '../entities/User';
import { Package } from '../entities/Package';
import { PackageVersion } from '../entities/PackageVersion';
export interface NotificationOptions {
type: 'email' | 'webhook' | 'push';
template?: string;
data?: Record<string, any>;
}
export declare class NotificationService {
private logger;
notifyPackagePublished(pkg: Package, version: PackageVersion, user: User, options?: NotificationOptions): Promise<void>;
notifyPackageUpdated(pkg: Package, version: PackageVersion, user: User, options?: NotificationOptions): Promise<void>;
notifyPackageDeprecated(pkg: Package, user: User, reason?: string, options?: NotificationOptions): Promise<void>;
notifySecurityAlert(pkg: Package, vulnerability: any, options?: NotificationOptions): Promise<void>;
notifyMaintainerAdded(pkg: Package, newMaintainer: User, addedBy: User, options?: NotificationOptions): Promise<void>;
notifyMaintainerRemoved(pkg: Package, removedMaintainer: string, removedBy: User, options?: NotificationOptions): Promise<void>;
sendEmail(to: string, subject: string, template: string, data: Record<string, any>): Promise<void>;
sendWebhook(url: string, payload: Record<string, any>, options?: {
retries?: number;
timeout?: number;
}): Promise<void>;
sendPushNotification(userId: string, title: string, message: string, data?: Record<string, any>): Promise<void>;
}