mirror of
https://github.com/bitwarden/server
synced 2025-12-06 00:03:34 +00:00
* Enable NRT for Core/Jobs files * Enable NRT for Core/HostedServices files * Enable NRT for Core/Exceptions files * Enable NRT for Core/NotificationHub files --------- Co-authored-by: Bernd Schoolmann <mail@quexten.com>
34 lines
765 B
C#
34 lines
765 B
C#
namespace Bit.Core.NotificationHub;
|
|
|
|
#nullable enable
|
|
|
|
public record struct WebPushRegistrationData
|
|
{
|
|
public string Endpoint { get; init; }
|
|
public string P256dh { get; init; }
|
|
public string Auth { get; init; }
|
|
}
|
|
|
|
public record class PushRegistrationData
|
|
{
|
|
public string? Token { get; set; }
|
|
public WebPushRegistrationData? WebPush { get; set; }
|
|
public PushRegistrationData(string? token)
|
|
{
|
|
Token = token;
|
|
}
|
|
|
|
public PushRegistrationData(string Endpoint, string P256dh, string Auth) : this(new WebPushRegistrationData
|
|
{
|
|
Endpoint = Endpoint,
|
|
P256dh = P256dh,
|
|
Auth = Auth
|
|
})
|
|
{ }
|
|
|
|
public PushRegistrationData(WebPushRegistrationData webPush)
|
|
{
|
|
WebPush = webPush;
|
|
}
|
|
}
|