import type { AccessContext } from "@opengeni/sdk"; export type SessionDeepLinkLocation = Pick; export type SessionReadGrant = Pick; export type SessionDeepLinkResolution = { status: "resolved"; workspaceId: string; } | { status: "not-found"; } | { status: "error"; error: unknown; }; export type AuthorizedSessionReader = { getSession: (workspaceId: string, sessionId: string) => Promise; }; export declare function isSessionId(value: string): boolean; export declare function sessionReadWorkspaceIds(grants: readonly SessionReadGrant[]): string[]; export declare function authorizedSessionReadWorkspaceIds(context: AccessContext, workspaces: readonly { id: string; accountId: string; }[]): string[]; /** * Resolve only through workspace-scoped session reads that the caller already * has permission to make. A 401/403/404 is intentionally indistinguishable * from a miss so foreign, inaccessible, and nonexistent sessions do not gain * a discovery oracle. Other failures remain a generic unavailable state for * the route to render safely. */ export declare function resolveAuthorizedSessionWorkspace(client: AuthorizedSessionReader, grants: readonly SessionReadGrant[], sessionId: string, options?: { authorizedWorkspaceIds?: readonly string[] | undefined; excludeWorkspaceId?: string | undefined; }): Promise; export declare function sessionDeepLinkReturnPath(location: SessionDeepLinkLocation): string; export declare function canonicalSessionDeepLinkTarget(workspaceId: string, sessionId: string, location: SessionDeepLinkLocation): string; export declare function shouldRedirectSessionDeepLink(pathname: string, canonicalPathname: string): boolean;