Eaf.Notifications.Push 9.4.6

Prefix Reserved
dotnet add package Eaf.Notifications.Push --version 9.4.6
                    
NuGet\Install-Package Eaf.Notifications.Push -Version 9.4.6
                    
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="Eaf.Notifications.Push" Version="9.4.6" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Eaf.Notifications.Push" Version="9.4.6" />
                    
Directory.Packages.props
<PackageReference Include="Eaf.Notifications.Push" />
                    
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 Eaf.Notifications.Push --version 9.4.6
                    
#r "nuget: Eaf.Notifications.Push, 9.4.6"
                    
#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 Eaf.Notifications.Push@9.4.6
                    
#: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=Eaf.Notifications.Push&version=9.4.6
                    
Install as a Cake Addin
#tool nuget:?package=Eaf.Notifications.Push&version=9.4.6
                    
Install as a Cake Tool

Eaf.Notifications.Push

Módulo de envio de notificações push para o Enterprise Application Foundation (EAF). Suporta Web Push (VAPID) e providers HTTP genéricos para gateways como Zenvia, Firebase, OneSignal etc.

Dependências

  • Abp (>= 10.5.0)
  • Microsoft.Extensions.Http (>= 10.0.9)
  • WebPush (>= 1.0.12)

Configuração

Exemplo Web Push:

{
  "Eaf": {
    "Push": {
      "Provider": "WebPush",
      "WebPush": {
        "PublicKey": "B...",
        "PrivateKey": "...",
        "Subject": "mailto:admin@example.com"
      }
    }
  }
}

Exemplo genérico HTTP (Zenvia ou outro gateway):

{
  "Eaf": {
    "Push": {
      "Provider": "GenericHttp",
      "GenericHttp": {
        "BaseUrl": "https://api.zenvia.com",
        "Endpoint": "/services/push",
        "AuthenticationType": "Bearer",
        "Token": "...",
        "ContentType": "Json",
        "Template": "{\"to\":\"{{endpoint}}\",\"title\":\"{{title}}\",\"body\":\"{{body}}\"}"
      }
    }
  }
}

Uso

public class MyAppService : ApplicationService
{
    private readonly IPushNotificationSender _pushSender;

    public MyAppService(IPushNotificationSender pushSender)
    {
        _pushSender = pushSender;
    }

    public async Task SendAsync(PushSubscription subscription)
    {
        await _pushSender.SendAsync(subscription, new PushNotificationMessage
        {
            Title = "Alerta",
            Body = "Você tem uma nova mensagem.",
            Icon = "/assets/icon.png"
        });
    }
}

Providers

  • WebPushNotificationProvider — envio via Web Push (VAPID).
  • GenericHttpPushProvider — envio através de qualquer API HTTP.

Extensão

Implemente IPushNotificationProvider e registre-o no IocManager para adicionar novos gateways.

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.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Eaf.Notifications.Push:

Package Downloads
Eaf.Middleware.Web.Core

Enterprise Application Foundation - Module Middleware - WebCore Classes

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
9.4.6 95 8/18/2026