Class PostgreSqlWebhookRejectionStore
- Namespace
- FlowOrchestrator.PostgreSQL
- Assembly
- FlowOrchestrator.PostgreSQL.dll
Dapper-based PostgreSQL implementation of IWebhookRejectionStore.
Persists DLQ + accepted-delivery rows in the webhook_rejections table
created by PostgreSqlFlowOrchestratorMigrator.
public sealed class PostgreSqlWebhookRejectionStore : IWebhookRejectionStore
- Inheritance
-
PostgreSqlWebhookRejectionStore
- Implements
- Inherited Members
Constructors
PostgreSqlWebhookRejectionStore(string)
Creates the store bound to the given connection string.
public PostgreSqlWebhookRejectionStore(string connectionString)
Parameters
connectionStringstringPostgreSQL connection string.
Methods
CountsByReasonAsync(TimeSpan, CancellationToken)
Returns counts by reason for the last window.
Keys are reason strings, values are occurrence counts.
public ValueTask<IReadOnlyDictionary<string, long>> CountsByReasonAsync(TimeSpan window, CancellationToken ct = default)
Parameters
windowTimeSpanLook-back window (typically 24 h).
ctCancellationTokenCancellation token.
Returns
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.
public ValueTask<WebhookRejectionPage> QueryAsync(WebhookRejectionQuery query, CancellationToken ct = default)
Parameters
queryWebhookRejectionQueryFilter + paging parameters.
ctCancellationTokenCancellation token.
Returns
QueryRecentAsync(Guid?, string?, bool, int, int, CancellationToken)
Returns the most recent entries, optionally filtered by flow + reason.
public ValueTask<IReadOnlyList<WebhookRejectionRecord>> QueryRecentAsync(Guid? flowId, string? reason, bool includeAccepted, int skip, int take, CancellationToken ct = default)
Parameters
flowIdGuid?Restrict to a single flow when supplied.
reasonstringRestrict to a single reason chip when supplied (case-insensitive).
includeAcceptedboolfalse to return rejections only.
skipintPagination skip.
takeintPage size; capped at 500.
ctCancellationTokenCancellation token.
Returns
WriteAsync(WebhookRejectionRecord, CancellationToken)
Appends one row to the store.
public ValueTask WriteAsync(WebhookRejectionRecord record, CancellationToken ct = default)
Parameters
recordWebhookRejectionRecordRow to persist; Id ignored on input.
ctCancellationTokenCancellation token.