Skip to content

[ 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).

terminal
pnpm add @vllnt/convex-consent
pnpm add @vllnt/convex-consent@canary

Register the component

Add it to your app’s convex/convex.config.ts, then run npx convex dev to generate the references.

convex/convex.config.ts
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.

Read the 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
WeekDownloads
14 June 2026 to 15 June 2026126
16 June 2026 to 22 June 2026386
23 June 2026 to 29 June 2026348
30 June 2026 to 6 July 2026383
7 July 2026 to 13 July 2026102
14 July 2026 to 20 July 2026241
21 July 2026 to 27 July 202624
28 July 2026 to 3 August 20265
4 August 2026 to 10 August 2026368
11 August 2026 to 17 August 2026153
18 August 2026 to 24 August 202626
25 August 2026 to 31 August 2026689
1 September 2026 to 7 September 2026668
8 September 2026 to 14 September 20261,612
15 September 2026 to 21 September 2026589
22 September 2026 to 28 September 2026423
29 September 2026 to 5 October 2026171
6 October 2026 to 12 October 202637
13 October 2026 to 19 October 202657
20 October 2026 to 26 October 202668
27 October 2026 to 2 November 2026465
3 November 2026 to 9 November 2026226
10 November 2026 to 16 November 202680
17 November 2026 to 23 November 2026101

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
VersionKindPublished
0.1.1-canary.d7f56a0canary31 October 2026
0.1.1-canary.6894cc6canary31 October 2026
0.1.0stable1 September 2026
0.1.0-canary.591da41canary1 September 2026
0.1.0-canary.84f95bfcanary31 August 2026
0.1.0-canary.600dfc5canary31 August 2026
0.1.0-canary.af90e0fcanary31 August 2026
0.1.0-canary.b84785dcanary16 June 2026
0.1.0-canary.df2b4a6canary16 June 2026
0.1.0-canary.e1e6fb0canary16 June 2026
0.1.0-canary.799596fcanary14 June 2026

Changelog

The newest stable releases of @vllnt/convex-consent, with the notes from its changelog.

  1. 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 immutable consentEvents row (the legal proof) and updates the O(1) consentState projection; decision is granted/denied/withdrawn.
    • withdraw(subjectRef, purpose, proof?) (GDPR Art. 7(3)) revokes a grant by appending a withdrawn event — only when a grant is currently held, else throws ConvexError({ code: "NO_CONSENT" }) or ConvexError({ code: "NOT_GRANTED" }).
    • check(subjectRef, purpose, requiredVersion?) is the runtime gate, returning { granted, stale, decision, version, at }; a grant for an older policy version returns stale: true so the host re-prompts.
    • getState, getStatesForSubject, and paginated history read the record; history pages 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 at is stamped from Date.now() inside the handler — no caller-supplied clock.
    • Typed generics: Consent<TProof> with an optional proofValidator host parser narrowing the opaque stored proof at the client boundary on write and read — no v.any() dump, no unchecked cast — plus a configurable defaultVersion.
    • 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 _generated output 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.0 and update convex-test to ^0.0.56.
All releases of @vllnt/convex-consent
Stable releases
RSSAtomJSON Feed
Canary builds
RSSAtomJSON Feed

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

Theme