import type { AccessContext, WorkspaceMember } from "@opengeni/sdk"; export type WorkspaceSharingClient = { listWorkspaceMembers(workspaceId: string): Promise; getAccessContext(): Promise; }; /** Who is looking at the card, as far as sharing is concerned. */ export type SharingViewer = Pick & Partial>; /** * True only when the signed-in person is the workspace's only person. Unknown * (a failed read, or a principal that is not a person) is false, so the card * keeps asking rather than guessing. */ export declare function workspaceHasNobodyToShareWith(client: WorkspaceSharingClient, workspaceId: string, now?: () => number): Promise; /** * People are `user:` subjects, and on a local install the one local person * signed in without a key. API keys and other principals are not someone to * share with. */ export declare function soleWorkspacePerson(members: readonly Pick[], viewer: SharingViewer): boolean; /** {@link workspaceHasNobodyToShareWith} for a component; false until known. */ export declare function useNobodyToShareWith(client: WorkspaceSharingClient | null | undefined, workspaceId: string): boolean;