/** * Approval Notifiers * * Features: * - Console notifier for development * - Webhook notifier for HTTP integrations * - Composite notifier for multiple channels */ import type { ApprovalNotifier, ApprovalRequest } from '@cogitator-ai/types'; export declare class ConsoleNotifier implements ApprovalNotifier { private prefix; constructor(options?: { prefix?: string; }); notify(request: ApprovalRequest): Promise; notifyEscalation(request: ApprovalRequest, reason: string): Promise; notifyTimeout(request: ApprovalRequest): Promise; notifyDelegation(request: ApprovalRequest, from: string, to: string): Promise; } /** * Webhook notifier for HTTP integrations (Slack, Teams, custom) */ export declare class WebhookNotifier implements ApprovalNotifier { private url; private headers; private formatPayload; private timeout; constructor(options: { url: string; headers?: Record; formatPayload?: (event: 'request' | 'escalation' | 'timeout' | 'delegation', request: ApprovalRequest, extra?: Record) => unknown; timeout?: number; }); private defaultFormat; private send; notify(request: ApprovalRequest): Promise; notifyEscalation(request: ApprovalRequest, reason: string): Promise; notifyTimeout(request: ApprovalRequest): Promise; notifyDelegation(request: ApprovalRequest, from: string, to: string): Promise; } /** * Slack-formatted webhook notifier */ export declare function slackNotifier(webhookUrl: string, options?: { channel?: string; username?: string; iconEmoji?: string; }): WebhookNotifier; /** * Composite notifier that sends to multiple channels */ export declare class CompositeNotifier implements ApprovalNotifier { private notifiers; private continueOnError; constructor(notifiers: ApprovalNotifier[], options?: { continueOnError?: boolean; }); notify(request: ApprovalRequest): Promise; notifyEscalation(request: ApprovalRequest, reason: string): Promise; notifyTimeout(request: ApprovalRequest): Promise; notifyDelegation(request: ApprovalRequest, from: string, to: string): Promise; private fanOut; } /** * Filtered notifier that only notifies for certain requests */ export declare function filteredNotifier(notifier: ApprovalNotifier, filter: (request: ApprovalRequest) => boolean): ApprovalNotifier; /** * Priority-based notifier routing */ export declare function priorityRouter(options: { urgent?: ApprovalNotifier; high?: ApprovalNotifier; normal?: ApprovalNotifier; low?: ApprovalNotifier; default?: ApprovalNotifier; }): ApprovalNotifier; /** * Null notifier that does nothing (useful for testing) */ export declare const nullNotifier: ApprovalNotifier; //# sourceMappingURL=notifiers.d.ts.map