Skip to Content
WhatsApp MCPAPI Reference (generated)DbScopedVariablesSCOPED QUERIES PLACEHOLDER

whatsapp-mcp


whatsapp-mcp / db/scoped / SCOPED_QUERIES_PLACEHOLDER

Variable: SCOPED_QUERIES_PLACEHOLDER

const SCOPED_QUERIES_PLACEHOLDER: true = true;

Defined in: src/db/scoped.ts:29 

File

The only module allowed to issue queries against tenant tables.

Trust

internal

No-log

clientId may appear in error metadata but never the resolved rows in error messages.

Remarks

This file is a deliberate Phase-4 placeholder. The full set of scoped query helpers lands when the auth pipeline is wired up — until then the file exists so:

  1. The ESLint rule that forbids raw pool.query against tenant tables outside src/db/scoped.ts has a definite path to point at, and
  2. Any developer reaching for a WHERE client_id = ... query in another module immediately sees that this is the canonical home.

The contract (filled in by Phase 4) is:

  • Every exported function takes clientId: string as its first argument.
  • Every function injects WHERE <table>.client_id = $1 (or equivalent via join) before any caller-supplied where clause.
  • Cross-tenant isolation tests in CI assert client B cannot read/write client A’s rows via any exported function here.

See

docs/plan/architecture.md §1 — Row-level isolation strategy