ConusAI vendor v0.1.0-dev.20261027+9b1131fb
ci / gate (push) Waiting to run

This commit is contained in:
ConusAI vendor v0.1.0-dev.20261027+9b1131fb
2026-10-27 18:05:17 +00:00
commit 3102273ec7
538 changed files with 80203 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
// SPDX-License-Identifier: LicenseRef-ConusAI-Template-1.0
// The tenant function builders the generated wrappers are built with (spec §5.4: convex-helpers
// custom functions + the repository predicate are the tenant wall). Each adds `ctx.run`, which
// runs a procedure of the registry inside this function's transaction (lib/runtime.ts) or, in an
// action, an effect procedure through the action composition (lib/effects.ts).
import { makeTenantFunctions } from "@conusai-kit/data-convex/runtime"
import { action, mutation, query } from "../_generated/server"
import { callEffectProcedure, type EffectActionCtx } from "./effects"
import { callProcedure } from "./runtime"
export const { tenantQuery, tenantMutation, tenantAction } = makeTenantFunctions(
{ query, mutation, action },
(ctx) => (name, input, options) =>
"db" in ctx
? callProcedure(ctx, name, input, options)
: callEffectProcedure(ctx as unknown as EffectActionCtx, name, input, options),
)