import { type SQL } from "drizzle-orm"; /** * The identity every Personal workspace carries: `external_source` is this * value and `external_id` is `:`. Migration 1159 * keeps it immutable and refuses any `workspace_memberships` row in such a * workspace other than its owner's. */ export declare const PERSONAL_WORKSPACE_EXTERNAL_SOURCE = "opengeni:organization-membership"; /** * Excludes a Personal workspace's own row from a `workspace_memberships` read. * * Migration 1159 makes a Personal workspace hold at most one row, its owner's, * and migration 1231 keeps that row in step with the owner's organization * membership. That row is not membership evidence here. A membership row admits whoever * names its subject: a delegated bearer, a host token, a seam that never * checks who is asking. The owner reaches their Personal workspace only * through the `organization_memberships.personal_workspace_id` pointer, and only * with verified owning-user proof (`hasVerifiedOwningUserAuthorization`, * `personalWorkspaceOwnerException`). Every membership read in the runtime * applies this predicate, so a row in a Personal workspace changes nothing * about who can reach it. Only the SQL functions, which take their subject * from the scoped transaction, see the row. * * Renders against the unaliased `workspace_memberships` table. */ export declare function membershipOutsidePersonalWorkspace(): SQL; /** {@link membershipOutsidePersonalWorkspace} for a query that already joins `workspaces`. */ export declare function joinedWorkspaceIsNotPersonal(): SQL; /** {@link membershipOutsidePersonalWorkspace} for raw SQL naming the membership table `alias`. */ export declare function rawMembershipOutsidePersonalWorkspace(alias: string): SQL;