Hmz.Core.Notifications.Abstractions 0.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Hmz.Core.Notifications.Abstractions --version 0.1.0
                    
NuGet\Install-Package Hmz.Core.Notifications.Abstractions -Version 0.1.0
                    
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="Hmz.Core.Notifications.Abstractions" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Hmz.Core.Notifications.Abstractions" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Hmz.Core.Notifications.Abstractions" />
                    
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 Hmz.Core.Notifications.Abstractions --version 0.1.0
                    
#r "nuget: Hmz.Core.Notifications.Abstractions, 0.1.0"
                    
#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 Hmz.Core.Notifications.Abstractions@0.1.0
                    
#: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=Hmz.Core.Notifications.Abstractions&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Hmz.Core.Notifications.Abstractions&version=0.1.0
                    
Install as a Cake Tool

Hmz.Core.Notifications.Abstractions

The contracts of the Hmz in-app notification engine (Hmz.Core.Notifications): what an application declares (types, audiences, scopes) and what it calls (dispatch, resolve). The package has no dependency at all, so a Contracts or Domain project can reference it without pulling in EF Core or ASP.NET Core.

Namespace: Hmz.Core.Notifications.Abstractions.

Types

Type Purpose
NotificationType(Code, Priority, DefaultAudience, Resolvable, RetentionDays, Channels) A registered type. Code is a stable kebab string (account.access-pending) and is never renamed.
NotificationPriority, NotificationChannels P1..P3; InApp (the only channel today).
NotificationRequest(TypeCode, DedupKey, OccurredAt) What a source produces, plus Audience?, ActorUserId? (always excluded), Scope?, Target?, Payload?.
AudienceRule, UsersAudience, PermissionHoldersAudience, RoleHoldersAudience Who receives it. The engine resolves UsersAudience itself; the others need a resolver.
IAudienceRuleResolver<TRule> Resolves one rule type to user ids. Add your own rule types freely.
NotificationScope(Kind, Id), INotificationScopeAccess, NotificationScopeAccessSet The visibility scope (an organisation unit, a tenant, a brand) and its access check.
NotificationTarget(Kind, Values) The deep link, stored and returned as one flat JSON object.
INotificationDispatcher, INotificationResolver Store notifications; close the ones a later fact made obsolete.
IRealtimeSignalPublisher, NotificationSignal, NotificationSignalTypes The live-signal seam (losable, never throws).

The Payload holds data (ids, snapshots), never pre-rendered text, and is serialized with JsonSerializerDefaults.Web.

Usage

public static readonly NotificationType AccessPending = new(
    "account.access-pending",
    NotificationPriority.P1,
    DefaultAudience: [new PermissionHoldersAudience("users.approve", Scoped: true)],
    Resolvable: true);

await dispatcher.DispatchAsync(
    new NotificationRequest(AccessPending.Code, $"access:{userId}", occurredAt)
    {
        ActorUserId = actorId,
        Scope = new NotificationScope("tenant", tenantId),
        Target = new NotificationTarget("user", new Dictionary<string, object?> { ["userId"] = userId }),
        Payload = new { UserId = userId },
    },
    ct);

Registration, hosting and the endpoints are in the Hmz.Core.Notifications package.

Product Compatible and additional computed target framework versions.
.NET 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.
  • net10.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Hmz.Core.Notifications.Abstractions:

Package Downloads
Hmz.Core.Notifications

In-app notification engine for Hmz backends on EF Core and PostgreSQL: deduplicated per-recipient store, audience and scope rules, REST endpoints, live signals through Hmz.Core.Realtime after commit and retention.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.1 64 11/17/2026
0.1.0 58 11/16/2026