import type { Session as SessionDetails } from "../types.js"; import type { GetSessionOptions } from "@opengeni/sdk/browser"; import type { RailSession as Session } from "./session-list-entry.js"; type SessionChannelPointReadClient = { getSession: (workspaceId: string, sessionId: string, options?: GetSessionOptions) => Promise; }; export type SessionChannelMoveOverride = Readonly<{ channelId: string | null; operation: number; committed: boolean; }>; export type SessionChannelMoveOverrides = ReadonlyMap; /** Await a detail-read generation whose network request starts after this call. */ export declare function readSessionChannelMovePoint(client: SessionChannelPointReadClient, workspaceId: string, sessionId: string, onRequestStart?: () => void): Promise; /** Project one in-flight or committed move over a possibly stale list row. */ export declare function applySessionChannelMove(session: T, override: SessionChannelMoveOverride | undefined): T; /** Install the destination before the network request starts. */ export declare function beginSessionChannelMove(current: SessionChannelMoveOverrides, sessionId: string, channelId: string | null, operation: number): SessionChannelMoveOverrides; /** * Preserve the successful write response over stale list requests that began * before the mutation committed. A superseded operation cannot replace a * newer projection. */ export declare function commitSessionChannelMove(current: SessionChannelMoveOverrides, sessionId: string, channelId: string | null, operation: number): SessionChannelMoveOverrides; /** Roll back only the exact failed operation, never a newer move. */ export declare function rollbackSessionChannelMove(current: SessionChannelMoveOverrides, sessionId: string, operation: number): SessionChannelMoveOverrides; /** Retire an exact pending overlay when newer server evidence rejects its response. */ export declare function discardRejectedSessionChannelMove(current: SessionChannelMoveOverrides, sessionId: string, operation: number): SessionChannelMoveOverrides; /** * Drop committed overlays only after a server list projection confirms the * destination. Pending moves and rows omitted by pagination stay projected. */ export declare function reconcileSessionChannelMoves(current: SessionChannelMoveOverrides, authoritativeSessions: readonly Session[]): SessionChannelMoveOverrides; /** * Reconcile a committed optimistic move with an accepted exact point read * started after the write. Persistent read authority now owns either the * matching destination or a newer cross-client destination, so the temporary * priority overlay must retire in both cases. A missing session retires it too. */ export declare function reconcileSessionChannelMovePointRead(current: SessionChannelMoveOverrides, sessionId: string, operation: number, _authoritative: Pick | null): SessionChannelMoveOverrides; export {};