WebPush-and-photo-upload-fixes
This commit is contained in:
24
LittleShop/Services/IPushNotificationService.cs
Normal file
24
LittleShop/Services/IPushNotificationService.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using LittleShop.DTOs;
|
||||
using LittleShop.Models;
|
||||
|
||||
namespace LittleShop.Services;
|
||||
|
||||
public interface IPushNotificationService
|
||||
{
|
||||
Task<bool> SubscribeUserAsync(Guid userId, PushSubscriptionDto subscriptionDto, string? userAgent = null, string? ipAddress = null);
|
||||
Task<bool> SubscribeCustomerAsync(Guid customerId, PushSubscriptionDto subscriptionDto, string? userAgent = null, string? ipAddress = null);
|
||||
Task<bool> UnsubscribeAsync(string endpoint);
|
||||
|
||||
Task<bool> SendNotificationToUserAsync(Guid userId, PushNotificationDto notification);
|
||||
Task<bool> SendNotificationToCustomerAsync(Guid customerId, PushNotificationDto notification);
|
||||
Task<bool> SendNotificationToAllUsersAsync(PushNotificationDto notification);
|
||||
Task<bool> SendNotificationToAllCustomersAsync(PushNotificationDto notification);
|
||||
|
||||
Task<bool> SendOrderNotificationAsync(Guid orderId, string title, string body);
|
||||
Task<bool> SendTestNotificationAsync(string? userId = null, string title = "Test Notification", string body = "This is a test notification from LittleShop");
|
||||
|
||||
Task<int> CleanupExpiredSubscriptionsAsync();
|
||||
Task<List<Models.PushSubscription>> GetActiveSubscriptionsAsync();
|
||||
|
||||
string GetVapidPublicKey();
|
||||
}
|
||||
Reference in New Issue
Block a user