[ CONVEX COMPONENT · STABLE · MIT ]
@vllnt/convex-consent
Append-only consent ledger (GDPR Art. 6/7) — record, withdraw, and gate consent per subject + purpose
STABLE 0.1.0 · 1 GitHub star
Package details
Install
The untagged install gets the latest stable version (0.1.0). The canary tag tracks main (0.1.1-canary.d7f56a0).
pnpm add @vllnt/convex-consent
pnpm add @vllnt/convex-consent@canaryRegister the component
Add it to your app’s convex/convex.config.ts, then run npx convex dev to generate the references.
import { defineApp } from "convex/server";
import consent from "@vllnt/convex-consent/convex.config";
const app = defineApp();
app.use(consent);
export default app;Use it
Usage, options and examples are in the package README.
Downloads
- Last 7 days
- 101
- Since first publish
- 7,348
Downloads per week since 14 June 2026, oldest on the left. Weeks count back from 23 November 2026, so the first one may be shorter than seven days.
101 downloads in the last 7 days. 7,348 downloads since 14 June 2026. Source: npm, counted through 23 November 2026.
Show downloads per week as a table
| Week | Downloads |
|---|---|
| 14 June 2026 to 15 June 2026 | 126 |
| 16 June 2026 to 22 June 2026 | 386 |
| 23 June 2026 to 29 June 2026 | 348 |
| 30 June 2026 to 6 July 2026 | 383 |
| 7 July 2026 to 13 July 2026 | 102 |
| 14 July 2026 to 20 July 2026 | 241 |
| 21 July 2026 to 27 July 2026 | 24 |
| 28 July 2026 to 3 August 2026 | 5 |
| 4 August 2026 to 10 August 2026 | 368 |
| 11 August 2026 to 17 August 2026 | 153 |
| 18 August 2026 to 24 August 2026 | 26 |
| 25 August 2026 to 31 August 2026 | 689 |
| 1 September 2026 to 7 September 2026 | 668 |
| 8 September 2026 to 14 September 2026 | 1,612 |
| 15 September 2026 to 21 September 2026 | 589 |
| 22 September 2026 to 28 September 2026 | 423 |
| 29 September 2026 to 5 October 2026 | 171 |
| 6 October 2026 to 12 October 2026 | 37 |
| 13 October 2026 to 19 October 2026 | 57 |
| 20 October 2026 to 26 October 2026 | 68 |
| 27 October 2026 to 2 November 2026 | 465 |
| 3 November 2026 to 9 November 2026 | 226 |
| 10 November 2026 to 16 November 2026 | 80 |
| 17 November 2026 to 23 November 2026 | 101 |
Release history
Every release on a timeline, oldest on the left. A tall mark with its version is a stable release; a short mark is a canary build. The time axis is the one of the downloads chart, so a release stands above the week it shipped in.
1 stable release and 10 canary builds since 14 June 2026. Latest stable: 0.1.0 on 1 September 2026.
Show every release as a table
| Version | Kind | Published |
|---|---|---|
| 0.1.1-canary.d7f56a0 | canary | 31 October 2026 |
| 0.1.1-canary.6894cc6 | canary | 31 October 2026 |
| 0.1.0 | stable | 1 September 2026 |
| 0.1.0-canary.591da41 | canary | 1 September 2026 |
| 0.1.0-canary.84f95bf | canary | 31 August 2026 |
| 0.1.0-canary.600dfc5 | canary | 31 August 2026 |
| 0.1.0-canary.af90e0f | canary | 31 August 2026 |
| 0.1.0-canary.b84785d | canary | 16 June 2026 |
| 0.1.0-canary.df2b4a6 | canary | 16 June 2026 |
| 0.1.0-canary.e1e6fb0 | canary | 16 June 2026 |
| 0.1.0-canary.799596f | canary | 14 June 2026 |
Changelog
The newest stable releases of @vllnt/convex-consent, with the notes from its changelog.
0.1.0
Added
- First release of
@vllnt/convex-consent— an append-only consent ledger (GDPR Art. 6/7) per(subjectRef, purpose). record(subjectRef, purpose, decision, { version?, proof? })appends an immutableconsentEventsrow (the legal proof) and updates the O(1)consentStateprojection;decisionisgranted/denied/withdrawn.withdraw(subjectRef, purpose, proof?)(GDPR Art. 7(3)) revokes a grant by appending awithdrawnevent — only when a grant is currently held, else throwsConvexError({ code: "NO_CONSENT" })orConvexError({ code: "NOT_GRANTED" }).check(subjectRef, purpose, requiredVersion?)is the runtime gate, returning{ granted, stale, decision, version, at }; a grant for an older policy version returnsstale: trueso the host re-prompts.getState,getStatesForSubject, and paginatedhistoryread the record;historypages the immutable ledger newest-first for an audit or data subject request.- Append-only ledger: a recorded decision is never mutated — withdrawal is a new event, not an edit — so the proof trail can't be silently rewritten.
- Server-sourced time: every event's
atis stamped fromDate.now()inside the handler — no caller-supplied clock. - Typed generics:
Consent<TProof>with an optionalproofValidatorhost parser narrowing the opaque storedproofat the client boundary on write and read — nov.any()dump, no unchecked cast — plus a configurabledefaultVersion. - Bounded, self-rescheduling
prune(take(batch)+ scheduler) that removes only superseded ledger events past the cutoff, plus a built-in daily prune cron (crons.ts); idempotent. The current-state projection is never pruned. Default retention 365 days. - Mount-safe: correct under multiple
app.use(component, { name })mounts — each instance is sandboxed, the cron is registered per instance.
Fixed
- Apply the documented 365-day default ledger retention and reject invalid prune batches to prevent premature proof deletion and scheduler loops.
Changed
- Treat Convex
_generatedoutput as CLI-owned, exclude it from formatting, and expose a dedicated codegen script. - Refresh all direct dependencies to their latest compatible releases.
- Require
convex@^1.45.0and updateconvex-testto^0.0.56.
- First release of
Licence
Released under the MIT licence. The full text is in the source repository.
[ PACKAGE ]
- Stable
- 0.1.0
- Canary
- 0.1.1-canary.d7f56a0
- GitHub stars
- 1 GitHub star
- Licence
- MIT
- Issues
- Open an issue