Skip to content

[ CONVEX COMPONENT · STABLE · MIT ]

@vllnt/convex-quota

Scheduled-reset per-subject allowances — calendar, rolling, or epoch windows with readable remaining

STABLE 0.1.0 · 0 GitHub stars

Package details

Install

The untagged install gets the latest stable version (0.1.0). The canary tag tracks main (0.1.1-canary.1d90c9f).

terminal
pnpm add @vllnt/convex-quota
pnpm add @vllnt/convex-quota@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 quota from "@vllnt/convex-quota/convex.config";
const app = defineApp();
app.use(quota);
export default app;

Use it

Usage, options and examples are in the package README.

Read the README

Downloads

Last 7 days
1,056
Since first publish
5,545

Downloads per week since 12 September 2026, oldest on the left. Weeks count back from 23 November 2026, so the first one may be shorter than seven days.

1,056 downloads in the last 7 days. 5,545 downloads since 12 September 2026. Source: npm, counted through 23 November 2026.

Show downloads per week as a table
WeekDownloads
12 September 2026 to 14 September 2026845
15 September 2026 to 21 September 2026313
22 September 2026 to 28 September 2026374
29 September 2026 to 5 October 2026197
6 October 2026 to 12 October 2026168
13 October 2026 to 19 October 2026321
20 October 2026 to 26 October 2026330
27 October 2026 to 2 November 20261,113
3 November 2026 to 9 November 2026441
10 November 2026 to 16 November 2026387
17 November 2026 to 23 November 20261,056

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 12 September 2026. Latest stable: 0.1.0 on 22 November 2026.

Show every release as a table
VersionKindPublished
0.1.1-canary.1d90c9fcanary23 November 2026
0.1.1-canary.9b7189ecanary23 November 2026
0.1.0stable22 November 2026
0.1.0-canary.2bd8928canary22 November 2026
0.1.0-canary.20d9329canary22 November 2026
0.1.0-canary.01d53ebcanary31 October 2026
0.1.0-canary.936ef1fcanary30 October 2026
0.1.0-canary.5210d71canary30 October 2026
0.1.0-canary.11242eccanary24 October 2026
0.1.0-canary.cbb12facanary12 September 2026
0.1.0-canary.0canary12 September 2026

Changelog

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

  1. 0.1.0

    First stable release.

    Added
    • Quota client with consume, remaining, refund and eraseSubject (batched, reschedules until clean). consume returns { allowed, used, remaining, limit, periodKey, resetsAt }, remaining the same without allowed, refund { refunded, used, remaining }, and eraseSubject the number of rows deleted in that pass.
    • Window kinds: calendar (day / week / month in an IANA timezone, Monday or Sunday week start), rolling (starts at the first allowed consume) and epoch. Time is read on the server. Skipped and repeated civil midnights resolve deterministically.
    • A fixed window policy per (scope, subjectRef, key); changing it throws POLICY_MISMATCH. The limit may change without resetting usage.
    • Fail-closed input validation with ConvexError codes: INVALID_REF, INVALID_LIMIT, INVALID_AMOUNT, INVALID_DURATION, INVALID_TIME_ZONE, INVALID_BATCH. Refs and scopes are 1..256 UTF-16 code units; limits, amounts and durations are positive safe integers.
    • refund only applies to the stored, unexpired period; otherwise it returns refunded: false.
    • @vllnt/convex-quota/test registers the component with convex-test; the consuming app needs convex-test and vitest. It type-checks under both bundler and nodenext module resolution.
    • Multiple named mounts and runtime scopes.
    Notes
    • consume and refund are not idempotent. See the README host rules.
    • Releases are published only from v*.*.* tags through npm trusted publishing with provenance. Builds from main use the canary dist-tag.
All releases of @vllnt/convex-quota
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.1d90c9f
GitHub stars
0 GitHub stars
Licence
MIT

Theme