Class WebhookSubscriptionService
W1 — backing store for outbound webhook subscriptions. CRUD + filter
evaluation + secret generation / rotation. The HTTP delivery is the
route consumer's job (WebhookDeliveryRouteConsumer); this
service is admin-side only.
public sealed class WebhookSubscriptionService
Inheritance
Methods
CountAsync(CancellationToken)
public Task<int> CountAsync(CancellationToken ct = default)
CreateAsync(string, string?, string?, string?, bool, int, int, int, Dictionary<string, string>?, string?, CancellationToken)
public Task<RedbObject<WebhookSubscriptionProps>> CreateAsync(string url, string? displayName, string? description, string? eventTypeFilter, bool enabled, int timeoutMs, int maxAttempts, int retryBackoffMs, Dictionary<string, string>? extraHeaders, string? hmacSecret = null, CancellationToken ct = default)
DeleteAsync(long, CancellationToken)
public Task DeleteAsync(long id, CancellationToken ct = default)
GetAsync(long, CancellationToken)
public Task<RedbObject<WebhookSubscriptionProps>?> GetAsync(long id, CancellationToken ct = default)
ListAsync(int, int, CancellationToken)
public Task<List<RedbObject<WebhookSubscriptionProps>>> ListAsync(int offset, int count, CancellationToken ct = default)
ListEnabledAsync(CancellationToken)
Bulk-load every enabled subscription. Called once per event by the
public Task<List<RedbObject<WebhookSubscriptionProps>>> ListEnabledAsync(CancellationToken ct = default)
Matches(WebhookSubscriptionProps, string, string?)
True when the subscription should receive the given event id /
public static bool Matches(WebhookSubscriptionProps sub, string eventType, string? category)
RotateSecretAsync(long, CancellationToken)
Generate a fresh secret, update the row, return the new value. The
public Task<string> RotateSecretAsync(long id, CancellationToken ct = default)
UpdateAsync(long, string?, string?, string?, string?, bool?, int?, int?, int?, Dictionary<string, string>?, CancellationToken)
public Task UpdateAsync(long id, string? displayName, string? description, string? url, string? eventTypeFilter, bool? enabled, int? timeoutMs, int? maxAttempts, int? retryBackoffMs, Dictionary<string, string>? extraHeaders, CancellationToken ct = default)