@@ -3,7 +3,7 @@ package app.softnetwork.notification.api
33import akka .actor .typed .ActorSystem
44import akka .grpc .GrpcClientSettings
55import app .softnetwork .api .server .client .{GrpcClient , GrpcClientFactory }
6- import app .softnetwork .notification .model .{Mail , NotificationStatusResult , Push , SMS }
6+ import app .softnetwork .notification .model .{Mail , NotificationStatusResult , Push , SMS , Ws }
77
88import scala .concurrent .Future
99
@@ -26,6 +26,10 @@ trait NotificationClient extends GrpcClient {
2626 grpcClient.addPush(AddPushRequest (Some (push))) map (_.succeeded)
2727 }
2828
29+ def addWs (ws : Ws ): Future [Boolean ] = {
30+ grpcClient.addWs(AddWsRequest (Some (ws))) map (_.succeeded)
31+ }
32+
2933 def removeNotification (uuid : String ): Future [Boolean ] = {
3034 grpcClient.removeNotification(RemoveNotificationRequest (uuid)) map (_.succeeded)
3135 }
@@ -42,6 +46,10 @@ trait NotificationClient extends GrpcClient {
4246 grpcClient.sendPush(SendPushRequest (Some (push))) map (_.results)
4347 }
4448
49+ def sendWs (ws : Ws ): Future [Seq [NotificationStatusResult ]] = {
50+ grpcClient.sendWs(SendWsRequest (Some (ws))) map (_.results)
51+ }
52+
4553 def getNotificationStatus (uuid : String ): Future [Seq [NotificationStatusResult ]] = {
4654 grpcClient.getNotificationStatus(GetNotificationStatusRequest (uuid)) map (_.results)
4755 }
0 commit comments