feat(convex): add full domain schema and snapshot sync bridge

This commit is contained in:
Codex
2026-02-18 15:06:53 +00:00
parent d1fbff481b
commit 489972c6dc
4 changed files with 970 additions and 2 deletions

View File

@@ -7,8 +7,26 @@ const fs = require("node:fs");
test("convex state functions are present for configured function names", () => {
const schema = fs.readFileSync("convex/schema.ts", "utf8");
const state = fs.readFileSync("convex/state.ts", "utf8");
const domain = fs.readFileSync("convex/domain.ts", "utf8");
assert.match(schema, /users: defineTable/);
assert.match(schema, /wallets: defineTable/);
assert.match(schema, /wallet_transactions: defineTable/);
assert.match(schema, /mention_events: defineTable/);
assert.match(schema, /articles: defineTable/);
assert.match(schema, /audio_jobs: defineTable/);
assert.match(schema, /audio_assets: defineTable/);
assert.match(schema, /audio_access_grants: defineTable/);
assert.match(schema, /payment_events: defineTable/);
assert.match(schema, /state_snapshots/);
assert.match(state, /export const getLatestSnapshot = query/);
assert.match(state, /export const saveSnapshot = mutation/);
assert.match(domain, /export const upsertUser = mutation/);
assert.match(domain, /export const applyWalletTransaction = mutation/);
assert.match(domain, /export const recordMentionEvent = mutation/);
assert.match(domain, /export const upsertArticle = mutation/);
assert.match(domain, /export const createAudioJob = mutation/);
assert.match(domain, /export const createAudioAsset = mutation/);
assert.match(domain, /export const grantAudioAccess = mutation/);
assert.match(domain, /export const recordPaymentEvent = mutation/);
});