Skip to content

Commit 0880654

Browse files
committed
added comments & updated TS doc
1 parent 7f3bbef commit 0880654

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

packages/lib/delivery/src/notifications/broker/NotificationBroker.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ export const _setupNotficationBroker = (
5050

5151
/**
5252
* Creates a notification broker based on the provided notification channels.
53-
* @param {DeliveryServiceProperties} options - Delivery service properties including notification channels.
53+
* @param {NotificationChannel[]} notificationChannel - All notification channels of a delivery service.
54+
* @param {NotificationType} notificationType - Specifies type of notifications like : New message , OTP etc..
5455
* @returns {INotificationBroker} An instance of the notification broker.
5556
* @throws {Error} If an unsupported channel type is encountered.
5657
*/

packages/lib/delivery/src/notifications/types.ts

+7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
import { DeliveryInformation } from '@dm3-org/dm3-lib-messaging';
22

33
//Every notification channel that is supported by the delivery service must be listed here
4+
// Notification channel is medium of getting notified. It can be email, phone no. push notification etc...
45
export enum NotificationChannelType {
56
EMAIL = 'EMAIL',
67
}
78

9+
/**
10+
* Notification type describes which kind of notification it is :
11+
* 1. New Message
12+
* 2. Verification OTP
13+
* etc...
14+
*/
815
export enum NotificationType {
916
NEW_MESSAGE = 'NEW_MESSAGE',
1017
OTP = 'OTP',

0 commit comments

Comments
 (0)