@voltro/plugin-webhooks 0.25.0 → 0.26.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.
- package/CHANGELOG.md +244 -0
- package/dist/index.d.ts +148 -1
- package/dist/index.js +307 -198
- package/dist/mixin.d.ts +48 -0
- package/dist/mixin.js +1 -0
- package/package.json +7 -7
package/dist/mixin.d.ts
CHANGED
|
@@ -118,6 +118,30 @@ export declare const _voltroWebhookTargetsTable: Table<"_voltro_webhook_targets"
|
|
|
118
118
|
readonly signing: ColumnBuilder<unknown, "json", boolean>;
|
|
119
119
|
/** Serialised `RetryPolicy` — see `retry.ts`. */
|
|
120
120
|
readonly retry: ColumnBuilder<unknown, "json", boolean>;
|
|
121
|
+
/**
|
|
122
|
+
* The APP's own scoping dimension. Opaque to the framework.
|
|
123
|
+
*
|
|
124
|
+
* Stored and returned verbatim, never interpreted — the framework does not
|
|
125
|
+
* know what a team, a project or a workspace is, and does not need to. Reads
|
|
126
|
+
* filter on equality against the json you wrote:
|
|
127
|
+
*
|
|
128
|
+
* subscribe({ event, url, scope: { teamId: 'q970…' } })
|
|
129
|
+
* listTargets({ scope: { teamId } })
|
|
130
|
+
*
|
|
131
|
+
* It exists because `.with(tenant())` is one level too coarse for real
|
|
132
|
+
* deployments. A consumer's endpoints are scoped to a TEAM and a tenant has
|
|
133
|
+
* many teams; every read filters by it and every write guards on it, so
|
|
134
|
+
* without this column the plugin cannot hold their rows at all and they keep
|
|
135
|
+
* a parallel table.
|
|
136
|
+
*
|
|
137
|
+
* The precedent is `_voltro_presence.meta`, and it is worth stating because
|
|
138
|
+
* it decided a migration: that column is json the framework stores and never
|
|
139
|
+
* interprets, and it is the ONLY reason the same consumer's presence
|
|
140
|
+
* migration was lossless — their three denormalised columns went straight in.
|
|
141
|
+
* The general form: a plugin that stores rows in an app's database on the
|
|
142
|
+
* app's behalf needs one place for the app's own dimension.
|
|
143
|
+
*/
|
|
144
|
+
readonly scope: ColumnBuilder<unknown, "json", boolean>;
|
|
121
145
|
/** Optional predicate filter (subset of `Predicate`) — the engine
|
|
122
146
|
* evaluates this against each emit's payload to decide whether
|
|
123
147
|
* this target receives the delivery. */
|
|
@@ -206,6 +230,30 @@ export declare const webhookTables: () => readonly [ Table<"_voltro_webhook_targ
|
|
|
206
230
|
readonly signing: ColumnBuilder<unknown, "json", boolean>;
|
|
207
231
|
/** Serialised `RetryPolicy` — see `retry.ts`. */
|
|
208
232
|
readonly retry: ColumnBuilder<unknown, "json", boolean>;
|
|
233
|
+
/**
|
|
234
|
+
* The APP's own scoping dimension. Opaque to the framework.
|
|
235
|
+
*
|
|
236
|
+
* Stored and returned verbatim, never interpreted — the framework does not
|
|
237
|
+
* know what a team, a project or a workspace is, and does not need to. Reads
|
|
238
|
+
* filter on equality against the json you wrote:
|
|
239
|
+
*
|
|
240
|
+
* subscribe({ event, url, scope: { teamId: 'q970…' } })
|
|
241
|
+
* listTargets({ scope: { teamId } })
|
|
242
|
+
*
|
|
243
|
+
* It exists because `.with(tenant())` is one level too coarse for real
|
|
244
|
+
* deployments. A consumer's endpoints are scoped to a TEAM and a tenant has
|
|
245
|
+
* many teams; every read filters by it and every write guards on it, so
|
|
246
|
+
* without this column the plugin cannot hold their rows at all and they keep
|
|
247
|
+
* a parallel table.
|
|
248
|
+
*
|
|
249
|
+
* The precedent is `_voltro_presence.meta`, and it is worth stating because
|
|
250
|
+
* it decided a migration: that column is json the framework stores and never
|
|
251
|
+
* interprets, and it is the ONLY reason the same consumer's presence
|
|
252
|
+
* migration was lossless — their three denormalised columns went straight in.
|
|
253
|
+
* The general form: a plugin that stores rows in an app's database on the
|
|
254
|
+
* app's behalf needs one place for the app's own dimension.
|
|
255
|
+
*/
|
|
256
|
+
readonly scope: ColumnBuilder<unknown, "json", boolean>;
|
|
209
257
|
/** Optional predicate filter (subset of `Predicate`) — the engine
|
|
210
258
|
* evaluates this against each emit's payload to decide whether
|
|
211
259
|
* this target receives the delivery. */
|
package/dist/mixin.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voltro/plugin-webhooks",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.0",
|
|
4
4
|
"description": "Webhooks plugin — first-class outgoing (multi-target, durable-workflow delivery, HMAC signing, retry policies, rate limits) + incoming (signature verification, idempotency, provider templates for Stripe / GitHub / Slack / generic).",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"voltro",
|
|
@@ -48,12 +48,12 @@
|
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@effect/workflow": "^0.19.0",
|
|
51
|
-
"@voltro/database": "0.
|
|
52
|
-
"@voltro/integration-http": "0.
|
|
53
|
-
"@voltro/logger": "0.
|
|
54
|
-
"@voltro/plugin-multitenancy": "0.
|
|
55
|
-
"@voltro/protocol": "0.
|
|
56
|
-
"@voltro/runtime": "0.
|
|
51
|
+
"@voltro/database": "0.26.0",
|
|
52
|
+
"@voltro/integration-http": "0.26.0",
|
|
53
|
+
"@voltro/logger": "0.26.0",
|
|
54
|
+
"@voltro/plugin-multitenancy": "0.26.0",
|
|
55
|
+
"@voltro/protocol": "0.26.0",
|
|
56
|
+
"@voltro/runtime": "0.26.0"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
59
|
"effect": "^3.22.0"
|