Goldpath.Notification 0.1.0-preview.8

This is a prerelease version of Goldpath.Notification.
dotnet add package Goldpath.Notification --version 0.1.0-preview.8
                    
NuGet\Install-Package Goldpath.Notification -Version 0.1.0-preview.8
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Goldpath.Notification" Version="0.1.0-preview.8" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Goldpath.Notification" Version="0.1.0-preview.8" />
                    
Directory.Packages.props
<PackageReference Include="Goldpath.Notification" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Goldpath.Notification --version 0.1.0-preview.8
                    
#r "nuget: Goldpath.Notification, 0.1.0-preview.8"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Goldpath.Notification@0.1.0-preview.8
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Goldpath.Notification&version=0.1.0-preview.8&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Goldpath.Notification&version=0.1.0-preview.8&prerelease
                    
Install as a Cake Tool

Goldpath.Notification

One domain decision → one message to one person, with the discipline every project rewrites badly:

  • Evidence: every notification is a durable row — "did the customer get the notice?" is a QUERY. After body retention nulls the content, the template hash still proves exactly WHAT was sent. Sent means accepted by the channel (not delivered/read — named honestly).
  • Idempotent: the REQUIRED unique dedupKey makes a retry storm land ONCE.
  • At-most-once-or-repair: the send run CLAIMS rows (persisted) before any channel call; an interrupted send goes to the repair queue for a human-confirmed replay — never a silent double-send.
  • Channels are seams: email (MailKit SMTP) + webhook ship; your SMS gateway plugs in as an IGoldpathNotificationChannel. Attachments are in the contract from day one.

Wire it

builder.AddGoldpathNotification<WebApplicationBuilder, OrdersDbContext>(notification =>
{
    notification.AddTemplate("policy-renewal", t => t
        .Channel("email", c => c
            .Subject("tr", "Poliçeniz {{PolicyNo}} yenilenmek üzere")
            .Body("tr", "Sayın {{Name}}, poliçeniz {{RenewalDate}} tarihinde yenilenecektir.")
            .Subject("", "Your policy {{PolicyNo}} is up for renewal")
            .Body("", "Dear {{Name}}, your policy renews on {{RenewalDate}}."))
        .DeleteBodyAfter(TimeSpan.FromDays(90)));   // evidence survives, content goes
});

builder.AddGoldpathJobs<WebApplicationBuilder, OrdersDbContext>(jobs =>
{
    jobs.ConnectionName = "ordersdb";
    jobs.AddGoldpathNotificationJobs<OrdersDbContext>();   // send (frequent) + retention (nightly)
});

// DbContext: modelBuilder.AddGoldpathNotification();  modelBuilder.AddGoldpathJobs();
// Config:    Goldpath:Notification:Email { Host, Port, UseSsl, User, Password, From }

Request (the app never sends directly — GP1601)

await notifier.RequestAsync(new GoldpathNotificationRequest(
    template: "policy-renewal", channel: "email", recipient: policy.HolderEmail,
    culture: "tr",
    tokens: new Dictionary<string, string> { ["Name"] = holder, ["PolicyNo"] = policy.No, ["RenewalDate"] = date },
    dedupKey: $"renewal:{policy.No}:2026-08")
{
    NotBefore = tomorrowMorning,          // quiet hours are a field, not a policy engine
    Attachments = [new("policy.pdf", "application/pdf", pdfBytes)],
}, ct);

Rendering happens AT REQUEST TIME: a missing token throws into YOUR transaction — a bad notice never persists. The MaySend hook records refusals as Suppressed rows — suppression is evidence too.

Ops surface (admin API, panel, runbooks) ships in S2; the send run is visible in the JOBS console today.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0-preview.8 67 9/7/2026
0.1.0-preview.7 70 9/1/2026
0.1.0-preview.6 289 8/4/2026
0.1.0-preview.5 65 7/28/2026
0.1.0-preview.4 68 7/27/2026
0.1.0-preview.3 67 7/25/2026
0.1.0-preview.2 83 7/13/2026
0.1.0-preview.1 105 7/13/2026