-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMayDayService.java
39 lines (29 loc) · 1.15 KB
/
MayDayService.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package dev.vality.alert.tg.bot.service;
import dev.vality.alerting.mayday.*;
import lombok.RequiredArgsConstructor;
import org.apache.thrift.TException;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
@RequiredArgsConstructor
public class MayDayService {
private final AlertingServiceSrv.Iface mayDayClient;
public void deleteAllAlerts(String userId) throws TException {
mayDayClient.deleteAllAlerts(userId);
}
public void deleteAlert(String userId, String userAlertId) throws TException {
mayDayClient.deleteAlert(userId, userAlertId);
}
public List<UserAlert> getUserAlerts(String userId) throws TException {
return mayDayClient.getUserAlerts(userId);
}
public List<Alert> getSupportedAlerts() throws TException {
return mayDayClient.getSupportedAlerts();
}
public AlertConfiguration getAlertConfiguration(String alertId) throws TException {
return mayDayClient.getAlertConfiguration(alertId);
}
public void createAlert(CreateAlertRequest createAlertRequest) throws TException {
mayDayClient.createAlert(createAlertRequest);
}
}