import type { NativeConnectCatalog } from "./native-connect-readiness.js"; import type { ApiIntegrationInstallationSummary, CapabilityCatalogItem, ConnectionMetadata, IntegrationDefinitionSummary, SlackInstallationBinding, SocialConnection } from "../../types.js"; export type CapabilitiesCatalog = { /** Setup readiness for this exact verified actor and workspace. */ nativeConnectCatalog: NativeConnectCatalog; authorityKey: string; items: CapabilityCatalogItem[]; setItems: (items: CapabilityCatalogItem[]) => void; /** * null = connections have not loaded (or the load failed, e.g. the grant lacks * connections:read); an array = loaded, even when empty. Health must not treat a * failed load as "every connection was deleted". */ connections: ConnectionMetadata[] | null; /** * True when the last connections fetch failed. Combined with a still-null * `connections`, the integration adapters surface a visible failure with a * retry instead of pinning their tiles at Loading forever. */ connectionsLoadFailed: boolean; connectionsAccessDenied: boolean; /** Merge one freshly returned connection row into the loaded list. */ replaceConnection: (connection: ConnectionMetadata) => void; /** Fetch connection rows independently of the catalog (also used on OAuth return). */ fetchConnections: () => Promise; /** * The curated multi-account ApiIntegration catalog (Outlook Mail/Calendar/ * Contacts, OneDrive, extra Drive accounts). */ apiIntegrationDefinitions: IntegrationDefinitionSummary[]; /** Every installed instance of it, curated and custom alike. */ apiIntegrationInstances: ApiIntegrationInstallationSummary[]; socialConnections: SocialConnection[]; slackInstallationBindings: SlackInstallationBinding[]; loading: boolean; loadError: Error | null; /** Bumped after every accepted load, so per-instance surfaces can reload themselves. */ revision: number; refresh: () => Promise; }; /** * The Capabilities page's whole workspace-scoped data load. * * Both rendered state and responses are fenced on the exact client + workspace. * A new read identity sees no previous rows even before its first request settles; * within one identity a transient connection failure still retains cached rows. */ export declare function useCapabilitiesCatalog(workspaceId: string): CapabilitiesCatalog;