import type { FeishuCredentials } from "../channels/feishu/onboard.js"; /** What the caller gets back: a verdict, plus the API's own words on failure. */ export interface SubscriptionResult { status: "applied" | "failed"; /** The API's `msg`/`code` or the thrown message, verbatim — never rewritten. */ reason?: string; } /** The slice of the SDK client this module uses, so tests can hand in a stub. */ export interface ConfigPatchingClient { application: { v7: { applicationConfig: { patch(payload: { data: { event: { subscription_type: "webhook" | "websocket"; }; }; path: { app_id: string; }; }): Promise<{ code?: number; msg?: string; } | null | undefined>; }; }; }; } /** Builds the authenticated client for one app. Injectable for tests. */ export type AppConfigClientFactory = (credentials: FeishuCredentials) => ConfigPatchingClient; /** * PATCH the app's event subscription to long-connection (WebSocket) mode. * * Never throws and never guesses: the endpoint's failure modes (a refusal for * this app's origin, a permission error, a network fault) all come back as * `{status: "failed", reason}` so the pane can print the API's own explanation. */ export declare function setEventSubscription(credentials: FeishuCredentials, deps?: { clientFactory?: AppConfigClientFactory; }): Promise; //# sourceMappingURL=app-config.d.ts.map