import type { Session, SessionListEntry, SessionListTotals, SiteConversationGroup } from "@opengeni/sdk"; import { type ClientOverride } from "../provider.js"; export type UseWorkspaceSessionsOptions = ClientOverride & { includeTotals?: boolean | undefined; needsYouOnly?: boolean | undefined; /** Only read-only sessions moved to the idle-session archive. */ contentArchivedOnly?: boolean | undefined; /** Only workstreams the signed-in person started or messaged. */ mineOnly?: boolean | undefined; /** Compact list records; detail reads remain full sessions. */ projection?: "summary" | undefined; limit?: number | undefined; parentSessionId?: string | null | undefined; cursor?: string | undefined; search?: string | undefined; /** Return only the complete personal pinned projection. */ pinsOnly?: boolean | undefined; /** Skip pinned details when the pinned section is loaded separately. */ includePinned?: boolean | undefined; archivedOnly?: boolean | undefined; sortBy?: "updatedAt" | "createdAt" | "name" | undefined; archiveStatus?: "active" | "archived" | "all" | undefined; /** * Conversations that run inside a Site: `include` lists them as rows, * `group` (root pages) returns them as `siteGroups` instead. */ siteConversations?: "include" | "group" | undefined; /** Refresh interval (ms) for fleet/manager views. Off by default. */ pollIntervalMs?: number | undefined; enabled?: boolean | undefined; /** Optional shared causal clock invoked when each network read starts. */ beginRead?: (() => number) | undefined; }; export type UseWorkspaceSessionsResult = { /** * All visible rows, with pins first. This preserves the pre-pinning hook * contract for consumers that only read `sessions`. */ sessions: T[]; /** The complete personal pinned section, also present in `sessions`. */ pinned: T[]; /** True when the server omitted older pins from its bounded pinned section. */ pinnedTruncated: boolean; totals: SessionListTotals | null; /** Complete Site rows for a `group` page; null when not requested or unsupported. */ siteGroups: SiteConversationGroup[] | null; /** True when the server omitted Site rows beyond its bound. */ siteGroupsTruncated: boolean; nextCursor: string | null; loading: boolean; error: Error | null; /** Monotonic revision of accepted authoritative list-page reads. */ readRevision: number; /** Causal generation captured when the accepted network read started. */ readGeneration: number; refresh: () => Promise; }; /** List the workspace's sessions — the data behind fleet and manager views. */ export declare function useWorkspaceSessions(options: UseWorkspaceSessionsOptions & { projection: "summary"; }): UseWorkspaceSessionsResult; export declare function useWorkspaceSessions(options?: UseWorkspaceSessionsOptions & { projection?: undefined; }): UseWorkspaceSessionsResult; export declare function useWorkspaceSessions(options: UseWorkspaceSessionsOptions): UseWorkspaceSessionsResult;