import type { LoadingOptions, ParamOptions } from 'q2-tecton-common/lib/types/config'; import type { OverpanelOptions, OverpanelOverride } from 'q2-tecton-common/lib/types/overpanels'; /** * Dictionary mapping outlet names to their module, tab, or menu lookup configurations. * Used within module configs to define nested outlet content resolution. * * @see ModuleLookup - Module lookup entries for feature outlets * @see TabLookup - Tab lookup entries for tabbed outlets * @see MenuLookup - Menu lookup entries for menu outlets */ export interface ConfiguredOutlets { [outletName: string]: ModuleLookup[] | TabLookup[] | MenuLookup[]; } /** * Module lookup configuration for resolving feature outlets. * Contains the feature and module names plus nested outlet configurations. * Used by the feature resolver to find and render the appropriate module. * * @see resolveFeature.ts - Used in matchModulebyFeatureName() and feature resolution */ export interface ModuleLookup { featureName: string; moduleName: string; configuredOutlets: ConfiguredOutlets; } /** * Tab lookup configuration for resolving tabbed outlets. * Associates a tab label with an array of module lookups for that tab's content. * * @see resolveTabs.ts - Cast from configuredOutlets to resolve tab content */ export interface TabLookup { tabLabel: string; modules: ModuleLookup[]; } /** * Menu lookup configuration for resolving menu outlets. * Associates a menu item with its action, modules, and context parameter name. * * @see resolveMenu.ts - Cast from configuredOutlets to resolve menu items */ export interface MenuLookup { itemLabel: string; action: string; modules: ModuleLookup[]; contextIdParamName: string; } /** * Complete configuration for a Tecton module instance. * Contains identity, outlet configuration, security domains, and access rights. * Used throughout the platform for module resolution and rendering decisions. * * @see init.ts - Return type for dynamicConfigFetch and configLookup overloads * @see resolvers.ts - Used in path resolution info interfaces * @see resolveFeature.ts - Generic parameter and return type in resolution * @see resolveTabs.ts - Generic parameter in path resolution * @see resolveMenu.ts - Generic parameter in path resolution */ export interface ModuleConfig { moduleName: string; featureName: string; rightsEnabled?: boolean; tabLabelOverride?: string; configuredOutlets: ConfiguredOutlets; additionalDomains?: string[] | undefined; allowDirectives?: string[] | undefined; } /** * Extended module configuration for overpanel modules. * Adds public visibility flag and overpanel display options. * * @see FeatureManifest - Used in configuredOverpanels dictionary */ export interface OverpanelConfig extends ModuleConfig { public?: boolean; options?: OverpanelOptions; } /** * Authentication context types for application-level modules. * Determines when application modules are active based on auth state. * * @see applicationModules.ts - Used to filter modules by authentication state */ export type ApplicationModuleContexts = 'Application::Unauthenticated' | 'Application::Authenticated'; /** * Union of application contexts and arbitrary context strings. * Allows for custom context types beyond the standard application contexts. */ export type TectonDataTypes = ApplicationModuleContexts | string; /** * Context specifier for modules and outlets. * Controls when modules are rendered based on data context or 'None' for context-free modules. * * @see applicationModules.ts - Used in authentication context checking * @see platformOutlet.ts - Used in context comparison for outlet display */ export type ModuleContext = TectonDataTypes | 'None'; /** * Resolution strategy for outlet content. * Determines how the platform resolves outlet content to modules. * * @see OutletType - Used to specify outlet resolution behavior */ export type OutletResolveType = 'Feature' | 'Tabs' | 'Menu'; /** * Module type definition specifying context and optional minimum height. * * @typeParam C - The module context constraint * * @see OutletType - Extends this for outlet-specific properties * @see ModuleMeta - Uses this as the type property */ export interface ModuleType { context: C; minHeight?: string; } /** * Tab declaration for outlets that support tabbed content. * Specifies the tab label for the declared tab. */ export interface DeclaredTab { tabLabel: string; } /** * Menu item declaration for outlets that support menu content. * Specifies the menu item label. */ export interface DeclaredMenuItem { itemLabel: string; } /** * Outlet type definition extending module type with resolution configuration. * Specifies how outlets resolve their content and what content is declared. * * @see ModuleMeta - Used in the outlets property dictionary */ export interface OutletType extends ModuleType { resolveType: OutletResolveType; required: boolean; declaredTabs?: DeclaredTab[]; declaredMenuItems?: DeclaredMenuItem[]; } /** * Complete metadata definition for a Tecton module. * Describes the module's identity, parameters, outlets, and type constraints. * Generic parameters enable type-safe module definitions. * * @typeParam Type - The module's type constraints * @typeParam Outlets - Dictionary of outlet definitions * @typeParam Name - The module name literal type * @typeParam Options - Dictionary of parameter options * * @see actions.ts - Used as generic parameter for navigation options * @see platformOutlet.ts - Accessed via module.meta for outlet decisions */ export interface ModuleMeta = Record, Name extends string = string, Options extends Record = Record> { moduleName: Name; featureName: string; params?: Options; outlets?: Outlets; type: Type; } /** * Manifest entry for a single module within a feature. * Contains all configuration needed to load and render the module. * * @see resolveFeature.ts - Returned from resolveLookups() for feature resolution * @see platformOutlet.ts - Used in shouldDisplayOutlet() and createLoadingWrapper() */ export interface ModuleFeatureManifest { primary: boolean; overpanel: boolean; url: string; navigable?: boolean; meta: ModuleMeta; routeConfig: ModuleConfig; formPostAuth?: boolean; loadingOptions?: LoadingOptions; requiredUserCapabilities?: string[]; additionalContextRequirements?: string[]; rightsEnabled?: boolean; } /** * Complete manifest for a Tecton feature containing all modules and configuration. * Represents the full definition of a feature including its modules, overpanels, * routing, and capability requirements. * * @see setup.ts - Return type for dynamicConfigFetch() and configLookup() overloads * @see resolveFeature.ts - Awaited from dynamicConfigFetch() for feature resolution * @see resolveTabs.ts - Accessed for additional domains and directives * @see resolveMenu.ts - Awaited from dynamicConfigFetch() for menu resolution * @see platformOutlet.ts - Used to check MFA flag in shouldDisplayOutlet() * @see filterPublicOverpanels.ts - Filtered for public overpanels */ export interface FeatureManifest { additionalDomains?: string[]; allowDirectives?: string[]; configuredOverpanels: Record; configuredSystemVariables?: string[]; core: boolean; isMFA?: boolean; legacy?: boolean; legacyOverpanelName?: string; legacyRouteName?: string; modules: Record; requiredUserCapabilities?: string[]; rightsEnabled?: boolean; routeName?: string; } /** * Root runtime configuration containing all Tecton features. * Central configuration object passed to platform initialization and * wrapped in a BehaviorSubject observable for reactive updates. * * @see init.ts - Main parameter for platform initialization * @see setup.ts - Observable in TestingWindow and input API parameters * @see applicationModules.ts - Iterated to find Application:: context modules * @see platformOutlet.ts - Accessed for feature and module configs * @see filterPublicOverpanels.ts - Filtered for public overpanels * @see All resolver files - Passed through for feature, tab, and menu resolution */ export interface TectonRuntimeConfig { features: Record; overpanelOverrides?: OverpanelOverride[]; } /** * Extended module metadata for overpanel modules. * Adds optional response type for overpanel return values. * * @typeParam C - The module context constraint * @typeParam R - The overpanel response type * * @see ContentOverpanel - Specialization for content-shaped overpanels */ export interface OverpanelModuleMeta extends ModuleMeta> { response?: R; } /** * Overpanel metadata specialized for content-shaped overpanels. * Used to type navigation options for overpanel-based alert actions. * * @typeParam Context - The module context constraint * * @see actions.ts - Used in AlertNavigationViaOverpanelOptions generic parameter */ export interface ContentOverpanel extends OverpanelModuleMeta { } /** * Module metadata for standard navigable modules. * Constrained to None context. * * @see actions.ts - Used in PlatformNavigationOptions generic parameter */ export interface NavigableModule extends ModuleMeta> { } /** * Resolved menu item configuration. * Contains the display label, action identifier, and navigation targets. * * @see resolvers.ts - Used in ResolveMenuResponseBody.resolvedMenuItems * @see resolveMenu.ts - Created in resolveMenuItems() from menu lookup and resolved module */ export interface ResolvedMenuItem { itemLabel: string; action: string; featureName: string; moduleName?: string; overpanelPath?: string; 'tct-ctxid'?: string; } /** * Lookup entry for application-level modules. * Contains feature and module names plus optional rights flag. * * @see applicationModules.ts - Created in getApplicationModules() and used in setup */ export interface TectonApplicationModuleLookup { featureName: string; moduleName: string; rightsEnabled?: boolean; } /** * Dictionary of application modules grouped by authentication context. * Keys are authentication contexts (authenticated/unauthenticated), * values are arrays of module lookups for that context. * * @see applicationModules.ts - Returned from getApplicationModules() and used in setup */ export interface TectonApplicationModules { [authContext: string]: TectonApplicationModuleLookup[]; } //# sourceMappingURL=config.d.ts.map