import { ScopeConfig, ScopeLevel, ScopedTable } from "../../db/manage/scope-definitions.js"; import { SQL } from "drizzle-orm"; //#region src/data-access/manage/scope-helpers.d.ts /** * Build a WHERE clause that filters by all scope columns for the given level. * * The columns and config shape are both derived from `SCOPE_KEYS` in * `scope-definitions.ts`, so they cannot drift apart. */ declare function scopedWhere(level: L, table: ScopedTable, scopes: ScopeConfig): SQL | undefined; declare const tenantScopedWhere: >(table: T, scopes: ScopeConfig<"tenant">) => SQL | undefined; declare const projectScopedWhere: >(table: T, scopes: ScopeConfig<"project">) => SQL | undefined; declare const agentScopedWhere: >(table: T, scopes: ScopeConfig<"agent">) => SQL | undefined; declare const subAgentScopedWhere: >(table: T, scopes: ScopeConfig<"subAgent">) => SQL | undefined; declare const toolScopedWhere: >(table: T, scopes: ScopeConfig<"tool">) => SQL | undefined; //#endregion export { agentScopedWhere, projectScopedWhere, scopedWhere, subAgentScopedWhere, tenantScopedWhere, toolScopedWhere };