Table of Contents

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

connectionString string

PostgreSQL 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

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.

public 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.

public 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.

public ValueTask WriteAsync(WebhookRejectionRecord record, CancellationToken ct = default)

Parameters

record WebhookRejectionRecord

Row to persist; Id ignored on input.

ct CancellationToken

Cancellation token.

Returns

ValueTask