import type { Middleware, RequestContext } from '@venturekit/runtime'; /** * Build the middleware that opens a `@venturekit/data` tenant scope for * the resolved `ctx.tenant`, so Postgres RLS policies apply to every * query in the request. * * Takes no options: the scope is derived entirely from `ctx.tenant`, * and "no tenant" is not configurable because inheriting a stale scope * is never the safe choice. * * @example * ```ts * import { handler } from '@venturekit/runtime'; * import { * createRuntimeTenantMiddleware, * createTenantRlsMiddleware, * } from '@venturekit-pro/tenancy'; * * const tenancy = createRuntimeTenantMiddleware({ resolver }); * const rls = createTenantRlsMiddleware(); * * export const main = handler(async () => listPosts(), { * middleware: [tenancy, rls], * }); * ``` */ export declare function createTenantRlsMiddleware(): Middleware; //# sourceMappingURL=rls-middleware.d.ts.map