feat(templates): add localized push templates and actions
Share template keys across email and push with independent editors and revisions. Render localized actions and preserve version-one delivery. Ref: IT-1627
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
namespace HrynCo.NotificationService.Contracts.Messages;
|
||||
|
||||
public sealed record PushActionMetadata
|
||||
{
|
||||
public string? ObjectId { get; init; }
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace HrynCo.NotificationService.Contracts.Messages;
|
||||
|
||||
public sealed record PushTemplateData
|
||||
{
|
||||
public required IReadOnlyDictionary<string, string> Bindings { get; init; }
|
||||
public required IReadOnlyDictionary<string, PushActionMetadata> Actions { get; init; }
|
||||
}
|
||||
@@ -6,9 +6,12 @@ public sealed record SendPushMessageData
|
||||
public required Guid BindingId { get; init; }
|
||||
public required Guid UserId { get; init; }
|
||||
public required string ServiceName { get; init; }
|
||||
public required string Title { get; init; }
|
||||
public required string Body { get; init; }
|
||||
public string? Title { get; init; }
|
||||
public string? Body { get; init; }
|
||||
public string Route { get; init; } = "/home";
|
||||
public string? TemplateKey { get; init; }
|
||||
public string? LanguageCode { get; init; }
|
||||
public PushTemplateData? TemplateData { get; init; }
|
||||
public int Version { get; init; } = 1;
|
||||
public required DateTimeOffset ExpiresAt { get; init; }
|
||||
public string? Token { get; init; }
|
||||
|
||||
Reference in New Issue
Block a user