import { type ApiRouteDeps } from "@opengeni/core"; import type { Hono } from "hono"; /** * Upper bound on the workspace page reads one request performs. The * organization list fans out over every shared workspace in stable id order, * one RLS-scoped transaction per workspace, so an organization with many empty * tenant workspaces would otherwise turn a single request into an unbounded * scan. When the budget runs out the page is returned short with `nextCursor` * pointing at the next unread position. */ export declare const ORGANIZATION_SESSION_LIST_MAX_WORKSPACE_READS = 25; /** * Base64url JSON `{ workspaceId, cursor, pinnedOffset? }`; `cursor` is the * workspace list cursor or null. A subject's pinned sessions precede the * ordinary keyset page of a workspace; when a page boundary falls inside that * pinned prefix, `pinnedOffset` records how many pinned rows were already * returned so the next page resumes after them instead of repeating them. */ export type OrganizationSessionListCursor = { workspaceId: string; cursor: string | null; pinnedOffset?: number | undefined; }; export declare function encodeOrganizationSessionListCursor(cursor: OrganizationSessionListCursor): string; export declare function decodeOrganizationSessionListCursor(value: string): OrganizationSessionListCursor | null; export declare function registerOrganizationSessionRoutes(app: Hono, deps: ApiRouteDeps): void;