Winche.Webhooks 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Winche.Webhooks --version 1.0.0
                    
NuGet\Install-Package Winche.Webhooks -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Winche.Webhooks" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Winche.Webhooks" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Winche.Webhooks" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Winche.Webhooks --version 1.0.0
                    
#r "nuget: Winche.Webhooks, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Winche.Webhooks@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Winche.Webhooks&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Winche.Webhooks&version=1.0.0
                    
Install as a Cake Tool

Winche.Webhooks

Webhooks for the Winche stack, set up in the Winche console: when documents, files or users change, call a webhook (signed, retried, logged). No code per webhook — the app adds the packages once. To do something on the server instead (delete a user's files, set claims, …), write a function with that trigger (Winche.Functions): its runs are delivered through this package's queue too.

Database, storage and Winche Auth publish their own changes (Winche.Core's WincheChange); this package receives them (it is an IWincheChangeSink), matches them against the webhooks and delivers them. No adapter packages.

Source Changes
Winche.Database (PublishChanges()) created, updated, deleted
Winche.Storage (PublishChanges()) uploaded, deleted, metadataUpdated
Winche.Auth (always) created, deleted, disabled, enabled, claimsChanged, signedIn

Setup

builder.Services.AddWincheConfig(c => { c.ConnectionString = conn; c.MasterKey = masterKey; });
builder.Services.AddWincheHooks(o => o.ConnectionString = conn);

builder.Services.AddWincheDatabase(o => { /* … */ o.UseHooks(h => h.PublishChanges()); });
builder.Services.AddWincheStorage(o => { /* … */ o.UseHooks(h => h.PublishChanges()); });
builder.Services.AddWincheAuth(o => { /* … */ });

Then, in each product's Webhooks page in the console: when (events, path pattern) → the address to call.

Path patterns

Winche.Core's path patterns, the same as in rules and function triggers: patients/{patientId} matches one segment per name; uploads/{rest=**} matches one or more (and {dir=**}/report.pdf zero or more). Captures are sent in the body's vars. Events also carry their own values: {path}, {id}, {collection} (documents), {path}, {name}, {directory} (files), {uid}, {email}, {provider} (users).

Webhooks

A POST with a JSON body:

{ "id": "…", "hook": { "id": "…", "name": "…" }, "source": "database", "type": "created",
  "path": "patients/p1", "at": "2026-11-12T20:00:00Z", "vars": { "patientId": "p1" },
  "data": { "path": "patients/p1", "fields": { "ward": "A3" } }, "before": null }

Headers: Winche-Event (database.created), Winche-Delivery (the event id — the same on retries, so receivers can ignore repeats) and Winche-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of "t.body"> with the hook's signing secret (shown in the console). In .NET: WebhookSignature.Verify(secret, header, body).

Any 2xx is delivered. 5xx, 408, 429 and network errors are retried after 30 s, 2 min, 10 min, 30 min, 1 h, 3 h and 6 h; other answers fail at once. Each delivery is listed in the console (each product's Webhooks → Deliveries: waiting, retrying with its tries so far and the last reason, delivered, failed), and failed ones can be retried from there. A webhook that can't be reached is logged by name with the reason; a function trigger's failure is logged by the function.

Guarantees

Database and storage events come from those packages' durable hooks, so each change is delivered at least once. User events are queued right after the change is saved (a crash in between can lose one). Function triggers run from the same queue and are retried the same way.

Hooks saved before 1.0 with a ready-made action (delete documents, delete files, copy claims) are dropped when the app starts, with a version in the hooks' history saying so: write a function for them.

License

See LICENSE.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Winche.Webhooks:

Package Downloads
Winche.Functions

JavaScript and TypeScript functions for the Winche stack, run by Deno in sandboxed workers: on document, file and user changes, on a schedule, or called by apps. Written in the console or VS Code.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.0 78 11/17/2026
1.0.0 83 11/16/2026