import type { ConnectionMetadata } from "@opengeni/sdk"; /** The workspaces a person can see, for naming where an account was added. */ export type AccountOriginWorkspace = { id: string; name: string; kind: "personal" | "shared"; }; export type ConnectionAccountRow = { /** Who the account is: its identity, or " account" when the provider gave none. */ label: string; /** "Shared", "Yours", "Yours · From Personal workspace", or "Shared · From * " for a shared account added in another workspace. */ scope: string; /** The workspace it was added in, when that is not the one being viewed. * Removing or reconnecting it acts there. */ origin: string | null; }; /** Why another account of a service can't be added yet. */ export type AddAccountLimit = "single" | "reconnect"; export declare const ADD_ACCOUNT_LIMIT_COPY: Readonly>; /** * Mirrors the server's account rule for adding one more account in the given * ownership. A service that can't identify accounts allows each person one * connection: none beside one in the same place, no personal one beside a * shared one, and no shared one beside the person's own. A service that can * identify accounts first needs any older account in the same place signed in * again. Only the viewer's own and shared accounts count. The API decides. */ export declare function addAccountLimit(accounts: readonly Pick[], input: { viewerSubjectId: string | null; ownership: "personal" | "workspace"; }): AddAccountLimit | null; /** * Rows a person can tell apart: each account's identity, who can use it and, * for one of their own accounts added in another workspace, where it came * from. Accounts that would still read the same also get when they were * connected. Display only; never used to select credentials. */ export declare function connectionAccountRows(accounts: readonly ConnectionMetadata[], input: { /** " account" when the provider gave no identity. */ fallbackName: string; /** The workspace being viewed; omit when unknown (no origin is shown). */ workspaceId?: string | null | undefined; workspaces?: readonly AccountOriginWorkspace[] | undefined; /** The base label, when the caller words unfinished sign-ins differently. */ labelOf?: ((account: ConnectionMetadata) => string) | undefined; }): Map;