Convex component: convex-envelope-store
- TypeScript 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| dist | ||
| example | ||
| src | ||
| .gitignore | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tsconfig.build.json | ||
| tsconfig.json | ||
| vitest.config.ts | ||
convex-envelope-store
Generic JSON documents partitioned by tenantId and collection.
Use it for catalogs, settings blobs, or any { recordId, data } record that
should not become a one-off table.
This is a Convex component. Call it from your app's queries and mutations. Do not expose these functions directly to clients.
Install
npm install convex-envelope-store
// convex/convex.config.ts
import { defineApp } from "convex/server";
import envelopeStore from "convex-envelope-store/convex.config.js";
const app = defineApp();
app.use(envelopeStore);
export default app;
await ctx.runMutation(components.envelopeStore.envelopes.upsert, {
collection: "catalog:items",
recordId: itemId,
slug: "my-item",
data: payload,
tenantId: orgId,
});
Reads: get, getBySlug, list, listPage (paginated). Writes: upsert,
remove. tenantId defaults to "default".