type WriteMeta = { reason: string; source: string; actionType?: string; }; export type ProviderActionResult = boolean | { handled: boolean; persistHandled?: boolean; result?: unknown; }; export type ProviderActionOutput = { name: string; payload?: unknown; result: unknown; }; export type MenuAccountInfo = { id?: string; name: string; workspaceName?: string; index: number; isCurrent?: boolean; }; export type MenuActionAccount = { id?: string; name: string; }; type SharedActionResult = boolean | { changed: boolean; persistHandled?: boolean; }; export type MenuAction = { type: "add"; } | { type: "cancel"; } | { type: "remove"; account: MenuActionAccount; } | { type: "remove-all"; } | { type: "switch"; account: MenuActionAccount; } | { type: "provider"; name: string; payload?: unknown; }; export type ProviderMenuAdapter = { key: string; loadStore: () => Promise; writeStore: (store: TStore, meta: WriteMeta) => Promise; bootstrapAuthImport: (store: TStore) => Promise; authorizeNewAccount: (store: TStore) => Promise; refreshSnapshots: (store: TStore) => Promise; toMenuInfo: (store: TStore) => Promise; getCurrentEntry: (store: TStore) => TEntry | undefined; getRefreshConfig: (store: TStore) => { enabled: boolean; minutes: number; }; getAccountByName: (store: TStore, name: string) => { name: string; entry: TEntry; } | undefined; addAccount?: (store: TStore, entry: TEntry) => Promise | SharedActionResult; removeAccount?: (store: TStore, name: string) => Promise | SharedActionResult; removeAllAccounts?: (store: TStore) => Promise | SharedActionResult; switchAccount: (store: TStore, name: string, entry: TEntry) => Promise<{ persistHandled?: boolean; } | undefined>; applyAction?: (store: TStore, action: Extract) => Promise; }; export declare function runProviderMenu(input: { adapter: ProviderMenuAdapter; showMenu: (accounts: MenuAccountInfo[], store: TStore) => Promise; onProviderActionResult?: (output: ProviderActionOutput) => Promise | void; now?: () => number; }): Promise; export {};