10 lines
792 B
TypeScript
10 lines
792 B
TypeScript
import { EntityDict } from "../../oak-app-domain";
|
|
import { BRC } from "../../types/RuntimeCxt";
|
|
import { Channel } from "../../types/Message";
|
|
export type NotificationHandler = (notification: EntityDict['notification']['OpSchema'], context: BRC<EntityDict>) => Promise<void>;
|
|
export type NotificationFailureHandler = (message: EntityDict['message']['Schema'], context: BRC<EntityDict>) => Promise<number>;
|
|
export declare function registerNotificationHandler(channel: Channel, handler: NotificationHandler): void;
|
|
export declare function getNotificationHandler(channel: Channel): NotificationHandler;
|
|
export declare function registerNotificationFailureHandler(handler: NotificationFailureHandler): void;
|
|
export declare function getNotificationFailureHandlers(): NotificationFailureHandler[];
|