DotCruz.Notifications.Contracts 1.1.3

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

DotCruz.Notifications.Contracts

Pacote de contratos oficiais para integração com o serviço de Notificações da DotCruz. Este pacote contém as definições de mensagens e enums necessários para enviar notificações via RabbitMQ ou chamadas de API.

Instalação

Você pode instalar o pacote via NuGet CLI:

dotnet add package DotCruz.Notifications.Contracts

Ou via Gerenciador de Pacotes do Visual Studio procurando por DotCruz.Notifications.Contracts.

Conteúdo do Pacote

Enums

  • IntegrationNotificationType: Define o canal de envio (Email, Sms, Push).

Mensagens (Mensagens de Integração)

  • CreateNotificationMessage: Registro principal para solicitação de envio de notificações.

Exemplo de Uso

Abaixo um exemplo de como instanciar a mensagem principal para envio via MassTransit ou outro broker:

using DotCruz.Notifications.Contracts.Enums.Notifications;
using DotCruz.Notifications.Contracts.Messages.Notifications.CreateNotification;

var message = new CreateNotificationMessage(
    ServiceId: Guid.NewGuid(), // ID do seu serviço autenticado
    Type: IntegrationNotificationType.Email,
    Recipient: "usuario@exemplo.com",
    Title: "Bem-vindo!",
    Body: "Olá, seja bem-vindo ao sistema.",
    Culture: "pt-BR"
);

// Envie para a fila 'create-notification'
// await publishEndpoint.Publish(message);

Uso com Templates

Se você preferir usar um template pré-configurado no serviço de notificações:

var message = new CreateNotificationMessage(
    ServiceId: Guid.NewGuid(),
    Type: IntegrationNotificationType.Email,
    Recipient: "usuario@exemplo.com",
    TemplateCode: "WELCOME_EMAIL",
    TemplateData: new Dictionary<string, object> 
    {
        { "UserName", "Matheus" }
    }
);

Configuração de Repositório

Este projeto faz parte do ecossistema DotCruz.

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

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
1.1.3 165 7/16/2026
1.1.1 138 6/8/2026
1.1.0 109 6/5/2026
1.0.1 114 5/14/2026
1.0.0 104 5/13/2026