import MessageBus from '../../../utility/message-bus/messageBus'; import { Maybe } from 'maybe-not'; import { BehaviorSubject } from 'rxjs'; import { ResolveFeatureResponseBody, PathResolutionInfo, GenerateTectonConfigPathArgs } from '../../../types/resolvers'; import type { TectonRuntimeConfig, ModuleLookup, ModuleConfig } from '../../../types/config'; import type { TectonPlatformControls, ParamsChanged } from '../../../types/setup'; import type { HierarchyNode } from '../../../types'; /** * Sets up the `resolveFeature` message handler for dynamic feature resolution. * Resolves outlet configurations to specific feature modules based on context and type matching. * * @param platformControlBus - Platform control bus with handler implementations * @param messageBus - The platform message bus for feature communication * @param tectonConfig$ - Observable containing the Tecton runtime configuration * @param params$ - Observable of parameter changes * @param teardowns - Array to collect cleanup functions for unsubscribing * @param contextHierarchy - Hierarchy of context nodes for validation * * @internal */ export default function setupResolveFeature(platformControlBus: TectonPlatformControls, messageBus: MessageBus, tectonConfig$: BehaviorSubject, params$: BehaviorSubject, teardowns: (() => void)[], contextHierarchy: HierarchyNode): void; /** * Resolves a feature from module lookups based on context and type matching. * Performs typed resolution when context is available, otherwise returns first matching module. * * @param platformControlBus - Platform control bus with handler implementations * @param params$ - Observable of parameter changes * @param outletPath - The outlet path being resolved * @param baseContextM - Maybe containing the base context type * @param contextValueIdM - Maybe containing the context value ID * @param moduleLookups - Array of module lookups to resolve from * @param providedTypeM - Maybe containing the provided type for resolution * @param additionalContextM - Maybe containing additional context requirements * @param tectonConfig - The current Tecton runtime configuration * @param hostFeatureName - Name of the host feature * @param hostModuleName - Name of the host module * @param contextHierarchy - Hierarchy of context nodes for validation * @returns Promise resolving to Maybe containing the resolved feature response */ export declare function resolveFeature(platformControlBus: TectonPlatformControls, params$: BehaviorSubject, outletPath: string, baseContextM: Maybe, contextValueIdM: Maybe, moduleLookups: ModuleLookup[], providedTypeM: Maybe, additionalContextM: Maybe, tectonConfig: TectonRuntimeConfig, hostFeatureName: string, hostModuleName: string, contextHierarchy?: HierarchyNode): Promise>; /** * Returns the provided type if both base context and context value are present. * * @param baseContextM - Maybe containing the base context type * @param contextValueIdM - Maybe containing the context value ID * @param providedTypeM - Maybe containing the provided type * @returns Promise resolving to Maybe containing the type value if contextual */ export declare function getTypeValueIfContextual(baseContextM: Maybe, contextValueIdM: Maybe, providedTypeM: Maybe): Promise>; /** * Construct a dotnation path through the actual config for this request (configPath). * It also returns some ancillary information to that path. * * @remarks * * using the modulo 3 check to determine if the path that is passed in ends at a module definition or a outlet definition: * outlet : platform.AccountDetails.configuredOutlets.topBanner * module : tectonRoute.TectonCanary.canary */ export declare function getPathResolutionInfo(path: string[], dynamicFetch: TectonPlatformControls['dynamicConfigFetch']): Promise; export declare function generateTectonConfigPathFromModuleId({ path, outletModuloVal, }: GenerateTectonConfigPathArgs): string[]; export declare function resolveTectonPath(path: string[], moduleTree: ModuleConfig): T; export declare function findModuleInArrayConfig(arr: { modules: ModuleConfig[]; }[], testFn: (item: any) => boolean): ModuleConfig | undefined; export declare function matchModulebyFeatureName(featureName: string, moduleName: string): (item: ModuleLookup) => boolean; //# sourceMappingURL=resolveFeature.d.ts.map