Table of Contents

Interface IWebhookRejectionStore

Namespace
FlowOrchestrator.Core.Storage
Assembly
FlowOrchestrator.Core.dll

Persistence contract for the webhook receive log + DLQ. Stores both rejected (IsAccepted false) and accepted entries so the dashboard can render a unified recent-deliveries table with precise reason chips.

public interface IWebhookRejectionStore

Methods

CountsByReasonAsync(TimeSpan, CancellationToken)

Returns counts by reason for the last window. Keys are reason strings, values are occurrence counts.

ValueTask<IReadOnlyDictionary<string, long>> CountsByReasonAsync(TimeSpan window, CancellationToken ct = default)

Parameters

window TimeSpan

Look-back window (typically 24 h).

ct CancellationToken

Cancellation token.

Returns

ValueTask<IReadOnlyDictionary<string, long>>

QueryAsync(WebhookRejectionQuery, CancellationToken)

Filtered + paged query that also returns the matching total count. Supersedes QueryRecentAsync(Guid?, string?, bool, int, int, CancellationToken) for new callers — that method is kept for backwards compatibility with the v1.25.0 dashboard endpoint that lacked search + pagination.

ValueTask<WebhookRejectionPage> QueryAsync(WebhookRejectionQuery query, CancellationToken ct = default)

Parameters

query WebhookRejectionQuery

Filter + paging parameters.

ct CancellationToken

Cancellation token.

Returns

ValueTask<WebhookRejectionPage>

QueryRecentAsync(Guid?, string?, bool, int, int, CancellationToken)

Returns the most recent entries, optionally filtered by flow + reason.

ValueTask<IReadOnlyList<WebhookRejectionRecord>> QueryRecentAsync(Guid? flowId, string? reason, bool includeAccepted, int skip, int take, CancellationToken ct = default)

Parameters

flowId Guid?

Restrict to a single flow when supplied.

reason string

Restrict to a single reason chip when supplied (case-insensitive).

includeAccepted bool

false to return rejections only.

skip int

Pagination skip.

take int

Page size; capped at 500.

ct CancellationToken

Cancellation token.

Returns

ValueTask<IReadOnlyList<WebhookRejectionRecord>>

WriteAsync(WebhookRejectionRecord, CancellationToken)

Appends one row to the store.

ValueTask WriteAsync(WebhookRejectionRecord record, CancellationToken ct = default)

Parameters

record WebhookRejectionRecord

Row to persist; Id ignored on input.

ct CancellationToken

Cancellation token.

Returns

ValueTask