/** * Notification service * Handles creating and managing notifications for webhook events, ticket creation, etc. */ export type NotificationType = 'webhook' | 'ticket_created' | 'ticket_updated' | 'ticket_assigned' | 'ticket_transitioned' | 'ticket_commented' | 'github_push' | 'github_pr' | 'github_commit' | 'github_branch' | 'error' | 'info'; export type NotificationSource = 'CLI' | 'JM-GUI' | 'JIRA' | 'WEBHOOK' | 'GITHUB' | 'SYSTEM'; export interface CreateNotificationInput { type: NotificationType | string; source: NotificationSource | string; title: string; message?: string; jiraKey?: string | null; jiraUrl?: string | null; projectKey?: string | null; metadata?: Record; userId?: string | null; } /** * Create a notification * * Invalidates cache for the user's notifications when a new notification is created */ export declare function createNotification(input: CreateNotificationInput): Promise; /** * Legacy alias for createNotification (for backward compatibility) */ export declare const recordNotification: typeof createNotification; /** * Mark notification as read * * Verifies the notification belongs to the user before updating. * * @param id - Notification ID * @param userId - User ID to verify ownership (required for security) * * Note: Cache invalidation should be handled by the caller (API route) since * this function doesn't have access to Next.js cache context */ export declare function markNotificationRead(id: string, userId: string): Promise; /** * Mark all notifications as read for a specific user * * @param userId - User ID to mark notifications for (required) */ export declare function markAllNotificationsRead(userId: string): Promise; /** * Get all notifications (paginated) * * CRITICAL: userId is REQUIRED to prevent cross-user data leaks. * This function will always filter by userId - there is no "all users" mode. */ export declare function getNotifications(options: { limit?: number; offset?: number; unreadOnly?: boolean; type?: NotificationType | string; source?: NotificationSource | string; userId?: string | null; }): Promise<{ notifications: { id: any; type: any; source: any; title: any; message: any; jiraKey: any; jiraUrl: any; projectKey: any; metadata: any; read: any; createdAt: any; userId: any; }[]; total: number; unread: number; }>; //# sourceMappingURL=notifications.d.ts.map