Interface IWebhookEvent
- Namespace
- BpNexT.Actions.Abstractions
- Assembly
- BpNexT.Actions.Abstractions.dll
Marks a type as a webhook event payload. Declare one class or record per event, decorated with WebhookEventAttribute naming it, and pass an instance to EmitAsync(IWebhookEvent, CancellationToken) — the type is the event's payload contract, so an emit cannot name an event that does not exist:
[WebhookEvent("invoice.created", Display = "Invoice created")]
public sealed record InvoiceCreated(string Number, decimal Total) : IWebhookEvent;
await webhooks.EmitAsync(new InvoiceCreated("RE-1001", 129.90m), cancellationToken);
Administrators see the declared events in Studio and configure where each one is delivered; the module never handles URLs or secrets.
public interface IWebhookEvent