Cosmos.Terceros.Notificaciones.Contratos 0.0.2-Beta

This is a prerelease version of Cosmos.Terceros.Notificaciones.Contratos.
dotnet add package Cosmos.Terceros.Notificaciones.Contratos --version 0.0.2-Beta
                    
NuGet\Install-Package Cosmos.Terceros.Notificaciones.Contratos -Version 0.0.2-Beta
                    
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="Cosmos.Terceros.Notificaciones.Contratos" Version="0.0.2-Beta" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Cosmos.Terceros.Notificaciones.Contratos" Version="0.0.2-Beta" />
                    
Directory.Packages.props
<PackageReference Include="Cosmos.Terceros.Notificaciones.Contratos" />
                    
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 Cosmos.Terceros.Notificaciones.Contratos --version 0.0.2-Beta
                    
#r "nuget: Cosmos.Terceros.Notificaciones.Contratos, 0.0.2-Beta"
                    
#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 Cosmos.Terceros.Notificaciones.Contratos@0.0.2-Beta
                    
#: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=Cosmos.Terceros.Notificaciones.Contratos&version=0.0.2-Beta&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Cosmos.Terceros.Notificaciones.Contratos&version=0.0.2-Beta&prerelease
                    
Install as a Cake Tool

Cosmos.Terceros.Notificaciones.Contratos

Contrato del gateway de notificaciones en tiempo real de Cosmos Terceros. Un servicio que necesite empujar una notificación al frontend referencia este paquete y publica el evento EnviarNotificacion sobre el bus; el gateway de notificaciones lo consume y lo reenvía por SignalR/WebSockets al navegador.

El paquete distribuye los tipos C# del contrato. Es agnóstico al transporte y al dominio: no incluye wiring de Wolverine ni de SignalR.


Instalación

<PackageReference Include="Cosmos.Terceros.Notificaciones.Contratos" Version="0.0.2-Beta" />

Depende de Cosmos.EventDriven.Abstractions (IPublicEvent).

Contrato

Namespace: Cosmos.Terceros.Notificaciones.Contratos.

Tipo Propósito
EnviarNotificacion Evento público (IPublicEvent) que empuja una notificación en tiempo real al frontend.
NotificacionesExchange Constante con el nombre del exchange RabbitMQ dedicado (Cosmos.Terceros.Notificaciones), compartido por publicador y gateway.

EnviarNotificacion

public record EnviarNotificacion(
    string Tipo,          // discriminador que el frontend usa para enrutar la notificación
    object Datos,         // payload arbitrario, serializado como JSON
    string? UsuarioId = null,  // si viene, se enruta solo al grupo SignalR de ese usuario
    string? GrupoId = null     // si viene (y no hay UsuarioId), se enruta solo a ese grupo
) : IPublicEvent;

Si UsuarioId y GrupoId vienen nulos, la notificación se difunde a todas las conexiones.

Publicar desde otro servicio

// El publicador enruta el evento al exchange dedicado:
options.PublishMessage<EnviarNotificacion>()
    .ToRabbitExchange(NotificacionesExchange.Nombre)
    .UseDurableOutbox();

// Y en un handler:
await bus.PublishAsync(new EnviarNotificacion(
    Tipo: "tercero-creado",
    Datos: new { TerceroId = id },
    UsuarioId: usuarioId));
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

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.0.2-Beta 61 6/4/2026