import {ResolveInit} from "./init.js"; import {BoundaryContextValue} from "./boundary.js"; import {APIParams, ResolveAPI} from "./api.js"; export interface APIOptions { isMulti?: boolean; } export type BridgeAPIOptions = Partial>; export interface BaseOptions = BridgeAPIOptions, P = any> { contextValue?: BoundaryContextValue; } export interface GetAPIOptions, P = any> extends BaseOptions { onInit?: ResolveInit; } export type AllAPI = BridgeAPIOptions> = { [N in keyof A]?: ResolveAPI | undefined }; export interface UpperOptions = BridgeAPIOptions, P = any> extends BaseOptions { shouldForwardYield?: (boundaryDetail: Pick, 'payload' | 'parent'> & { allAPI: AllAPI } ) => any; } export interface GetUpperAPIOptions, P = any> extends GetAPIOptions, UpperOptions { } export interface GetAPIAsyncOptions, P = any> extends BaseOptions { initial?: boolean; }