import type { ContextListing, IdentityDescription } from './types.js'; export interface DiscoveredWorkspace { id: string; displayName: string; } export interface DiscoveredOrganization { id: string; slug: string; displayName: string; role: string; workspaces: DiscoveredWorkspace[]; } export interface DiscoveryOptions { baseUrl: string; accessToken: string; /** Injected by tests. Defaults to the global fetch. */ fetch?: typeof globalThis.fetch; signal?: AbortSignal; } /** * Every organization this account belongs to, each with its workspaces. * * Organizations are listed even when they hold no workspaces yet, because * "you belong to this organization and it is empty" is a different and more * useful answer than omitting it and appearing to have found nothing. */ export declare function discoverOrganizations(options: DiscoveryOptions): Promise; /** * Every context this credential's grant may use right now, with canonical ids * (`GET /v1/contexts`). Follows `nextCursor` until the listing is complete, bounded. */ export declare function discoverContexts(options: DiscoveryOptions): Promise; /** Who this credential is: account, connection, grant, and effective context if selected. */ export declare function describeIdentity(options: DiscoveryOptions & { contextId?: string; }): Promise; /** Flattens discovery into the choices a person picks from. */ export declare function workspaceChoices(organizations: DiscoveredOrganization[]): Array<{ value: string; label: string; detail?: string; }>; //# sourceMappingURL=discover.d.ts.map