Path: redb-identity/src/redb.Identity.Client/IdentityClient.Webhooks.cs Snapshot: redb-identity, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages. License: Apache-2.0. Repository: https://github.com/redbase-app/redb-identity Page: https://redbase.app/src/dev-2026-12-06/redb-identity/src/redb.Identity.Client/IdentityClient.Webhooks.cs ---- using redb.Identity.Client.Internal; using redb.Identity.Contracts.Common; using redb.Identity.Contracts.Webhooks; namespace redb.Identity.Client; public partial interface IIdentityClient { Task> ListWebhooksAsync(int offset = 0, int count = 25, CancellationToken ct = default); Task GetWebhookAsync(long id, CancellationToken ct = default); Task CreateWebhookAsync(CreateWebhookSubscriptionRequest request, CancellationToken ct = default); Task UpdateWebhookAsync(long id, UpdateWebhookSubscriptionRequest request, CancellationToken ct = default); Task DeleteWebhookAsync(long id, CancellationToken ct = default); Task RotateWebhookSecretAsync(long id, CancellationToken ct = default); } public sealed partial class IdentityClient { private const string WebhooksBase = "/api/v1/identity/webhooks"; public async Task> ListWebhooksAsync(int offset = 0, int count = 25, CancellationToken ct = default) { using var resp = await _http.GetAsync($"{WebhooksBase}?offset={offset}&count={count}", ct).ConfigureAwait(false); return await resp.ReadJsonAsync>(ct).ConfigureAwait(false); } public async Task GetWebhookAsync(long id, CancellationToken ct = default) { using var resp = await _http.GetAsync($"{WebhooksBase}/{id}", ct).ConfigureAwait(false); return await resp.ReadJsonAsync(ct).ConfigureAwait(false); } public async Task CreateWebhookAsync(CreateWebhookSubscriptionRequest request, CancellationToken ct = default) { using var resp = await _http.PostAsJsonAsync(WebhooksBase, request, _json, ct).ConfigureAwait(false); return await resp.ReadJsonAsync(ct).ConfigureAwait(false); } public async Task UpdateWebhookAsync(long id, UpdateWebhookSubscriptionRequest request, CancellationToken ct = default) { using var resp = await _http.PutAsJsonAsync($"{WebhooksBase}/{id}", request, _json, ct).ConfigureAwait(false); await resp.EnsureSuccessOrThrowAsync(ct).ConfigureAwait(false); } public async Task DeleteWebhookAsync(long id, CancellationToken ct = default) { using var resp = await _http.DeleteAsync($"{WebhooksBase}/{id}", ct).ConfigureAwait(false); await resp.EnsureSuccessOrThrowAsync(ct).ConfigureAwait(false); } public async Task RotateWebhookSecretAsync(long id, CancellationToken ct = default) { using var resp = await _http.PostAsJsonAsync($"{WebhooksBase}/{id}/rotate-secret", new { }, _json, ct).ConfigureAwait(false); return await resp.ReadJsonAsync(ct).ConfigureAwait(false); } }