import type { AppDefinition, ConnectionMethodDef } from "./types/app-definition.js"; /** * The four states every connect screen lands in (PAP-659, "one shell, four * states"). * * The point of naming them here rather than in the wizard is that two surfaces * have to agree: the gallery card decides its verb from the state, and the * connect screen decides its body from the same state. When each re-derived it * from raw method flags they drifted — a card offering "Connect" for something * that then demanded a pasted URL is exactly the inconsistency the ticket is * about. * * - `instant` nothing to supply: connect resolves entirely from the catalog. * - `authorize` one click, then the provider's own consent screen. * - `paste` one thing the operator has to bring: a key, a URL, a tenant. * - `register` the provider cannot issue a client, so one must be registered * in its console first. A recovery state, never a normal step. */ export type ConnectionSetupState = "instant" | "authorize" | "paste" | "register"; export declare function connectionSetupStateForMethod(method: ConnectionMethodDef | null | undefined): ConnectionSetupState | null; export declare function connectionSetupStateForApp(app: AppDefinition | null | undefined, methodKey?: string | null): ConnectionSetupState | null; /** * The gallery card's verb (PAP-659 C4). * * Only a method that genuinely wants a secret says so. "Add key" on a connector * that actually wants a pasted URL would be worse than the generic verb, so a * paste state without credential fields keeps "Connect" — the operator still * lands on one screen with one field, which the verb does not need to restate. */ export declare function connectionSetupVerbForMethod(method: ConnectionMethodDef | null | undefined): "Connect" | "Add key"; export declare function connectionSetupVerbForApp(app: AppDefinition | null | undefined, methodKey?: string | null): "Connect" | "Add key"; //# sourceMappingURL=connection-setup-state.d.ts.map