@open-wa/integration-webhook 5.1.0 → 5.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +9 -2
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -19,10 +19,13 @@ The plugin config is validated by the plugin SDK schema in `src/plugin.ts`.
19
19
  | `url` | Yes | Target URL for webhook delivery. Must be a URL. |
20
20
  | `events` | No | `all` or an array of event names. Defaults to `all`. Non-matching events are skipped. |
21
21
  | `concurrency` | No | Max concurrent deliveries. Defaults to 10. |
22
+ | `queueCapacity` | No | Maximum queued deliveries in memory. Defaults to 1000. |
23
+ | `overload` | No | A full queue waits for room with `backpressure` (default), or rejects with `dropping`. |
22
24
  | `retries` | No | Number of retry attempts after a failed delivery. Defaults to 3. |
23
25
  | `retryDelay` | No | Base retry delay in milliseconds. Defaults to 1000 and is exponentially backed off per attempt. |
24
26
  | `headers` | No | Additional headers merged into each request. |
25
27
  | `timeout` | No | Request timeout in milliseconds. Defaults to 30000. |
28
+ | `durability` | No | When enabled, stores pending deliveries in a SQLite journal and replays up to `replayLimit` after startup. Disabled by default. |
26
29
 
27
30
  Each delivery also sends `Content-Type: application/json`.
28
31
 
@@ -45,8 +48,12 @@ The payload shape is defined by `WebhookPayload` in `src/config.ts` and produced
45
48
  - `WebhookDeliverer` posts JSON with native `fetch` and aborts requests with `AbortController` when the timeout elapses.
46
49
  - Non-2xx responses throw an error and enter the retry path.
47
50
  - Retry delay is `retryDelay * 2 ** attempt` until the configured retry count is exhausted.
48
- - The deliverer logs failed deliveries after all attempts. The final retry path does not throw the error again.
49
- - On `dispose`, the plugin waits for the queue to become idle and logs that the queue drained.
51
+ - The default queue and its waiting deliveries live in memory. A process exit or restart loses deliveries that were not accepted successfully.
52
+ - After the final attempt, the deliverer logs the failure and the plugin hook rejects. With durability enabled, the delivery row is marked `dead_letter`; without it, no record remains for automatic replay.
53
+ - With durability enabled, pending rows are replayed on a later startup up to `replayLimit`, and the sender includes the durable row ID as `Idempotency-Key`. Duplicate requests can still arrive if the receiver committed its work but the response was lost.
54
+ - The plugin closes its delivery runtime on `dispose`; pending durable rows remain in SQLite for a later startup. The integration does not expose a built-in dead-letter inspection or replay route.
55
+
56
+ Persist the receiver's inbox record or idempotency key before returning `2xx`. The sender does not create an HMAC signature, and its retry policy does not promise eventual delivery. Keep credentials out of logs and use a receiver-side secret or a signature scheme implemented by your gateway.
50
57
 
51
58
  ## Exports
52
59
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-wa/integration-webhook",
3
- "version": "5.1.0",
3
+ "version": "5.3.0",
4
4
  "description": "Webhook delivery integration plugin for open-wa",
5
5
  "type": "module",
6
6
  "exports": {
@@ -10,12 +10,12 @@
10
10
  }
11
11
  },
12
12
  "dependencies": {
13
- "@open-wa/plugin-sdk": "5.1.0",
13
+ "@open-wa/plugin-sdk": "5.3.0",
14
14
  "@open-wa/runtime-core": "5.0.1",
15
15
  "effect": "4.0.0-beta.100"
16
16
  },
17
17
  "devDependencies": {
18
- "@open-wa/logger": "5.1.0",
18
+ "@open-wa/logger": "5.3.0",
19
19
  "@types/node": "^26.6.3",
20
20
  "typescript": "^7.0.2",
21
21
  "vitest": "5.0.2"