import type { Store } from './store'; import { feature as navigationFeature } from './store/reducers/embeddedApp/navigation'; import { feature as contextualSaveBarFeature } from './store/reducers/embeddedApp/contextualSaveBar'; import { feature as pickerFeature } from './store/reducers/embeddedApp/picker'; import { feature as titleBarFeature } from './store/reducers/embeddedApp/titleBar'; import type { SessionTokenFeature } from './features/sessionToken'; import { feature as toastFeature } from './store/reducers/embeddedApp/toast'; export interface ClientApi { navigation: ReturnType; contextualSaveBar: ReturnType; unstablePicker: ReturnType; titleBar: ReturnType; sessionToken: ReturnType; toast: ReturnType; } type Intersection = { [P in keyof A & keyof B]: A[P] | B[P]; }; export type ClientApiKeys = keyof Intersection; export interface ProxyResolver { (api: Api): boolean; } export interface ApiProxy { [key: string]: ProxyWithQueue; } export type ProxyWithQueue = { [key in typeof RESOLVE_QUEUE_KEY]: ProxyResolver; }; export interface ApiContext { readonly api: ClientApi; resolveApi: (proxyApi: ApiProxy) => void; setApi: (key: ClientApiKeys, newApi: any) => Promise; } export declare const RESOLVE_QUEUE_KEY = "__resolveQueue"; export declare function createApiContext(): ApiContext; export {};