import { InjectionToken, EnvironmentProviders } from '@angular/core'; import { AppPreferencesDefaults } from '@edsis/angular/block/themes'; import { EdsisAuthConfig } from '@edsis/angular/module/auth'; import { EdsisRuntimeConfig } from '@edsis/angular/services/runtime'; import { Routes } from '@angular/router'; import { NavigationItem } from '@edsis/navigation'; declare const APPLICATION_PROFILE_NAMES: readonly ["mfe-standalone"]; declare const DEFAULT_APPLICATION_PROFILE_NAME: "mfe-standalone"; type ApplicationProfileName = (typeof APPLICATION_PROFILE_NAMES)[number]; /** Centrally managed visual and structural defaults for a standalone MFE. */ interface ApplicationProfile { readonly name: ApplicationProfileName; readonly defaults: AppPreferencesDefaults; } declare const MFE_STANDALONE_APPLICATION_PROFILE: ApplicationProfile; declare const APPLICATION_PROFILES: Readonly<{ 'mfe-standalone': ApplicationProfile; }>; declare const MFE_APPLICATION_PROFILE: InjectionToken; interface StandaloneMfeConfig { readonly auth: EdsisAuthConfig; readonly runtime?: EdsisRuntimeConfig; /** Exact registry field; MFEs cannot invent per-app global profiles. */ readonly standaloneProfile: ApplicationProfileName; } declare function applicationProfile(name?: ApplicationProfileName): ApplicationProfile; /** * Composes the global providers used only by a standalone MFE application. * Federated feature routes must inherit these singletons from their host and * therefore must never call this provider. */ declare function provideStandaloneMfe(config: StandaloneMfeConfig): EnvironmentProviders; declare const MFE_CONTRACT_VERSION: 1; declare const MFE_ENTRY_EXPOSURE: "./Mfe"; declare const MFE_EXPOSURE_KINDS: readonly ["contract", "routes", "page", "component"]; declare const MFE_CAPABILITY_MODES: readonly ["required", "optional", "provided"]; declare const MFE_PLATFORM_CAPABILITIES: { readonly auth: "edsis.auth"; readonly loading: "edsis.loading"; readonly navigation: "edsis.navigation"; readonly runtime: "edsis.runtime"; readonly theme: "edsis.theme"; }; type MfeContractVersion = typeof MFE_CONTRACT_VERSION; type MfeExposureKind = (typeof MFE_EXPOSURE_KINDS)[number]; type MfeCapabilityMode = (typeof MFE_CAPABILITY_MODES)[number]; type MfeId = string; type MfeExposureKey = `./${string}`; type MfeCapabilityId = string; /** A host capability consumed or supplied by the MFE contract. */ interface MfeCapabilityDescriptor { readonly id: MfeCapabilityId; /** Capability compatibility is versioned by a positive major number. */ readonly version: number; readonly mode: MfeCapabilityMode; readonly description?: string; } /** Metadata for every module exposed in the remote federation configuration. */ interface MfeExposureDescriptor { readonly key: MfeExposureKey; readonly kind: MfeExposureKind; /** Contract major in which this exposure became public. */ readonly since: MfeContractVersion; /** Export to read from the loaded module. Omit for its default export. */ readonly exportName?: string; /** Capability IDs associated with this exposure when it is rendered directly. */ readonly capabilities?: readonly MfeCapabilityId[]; readonly description?: string; } /** * Public, shell-free contract exposed from `./Mfe` by every EDSIS remote. * * The host owns global shell, theme, authentication, navigation state, runtime, * and loading services. The remote contributes only feature routes, * navigation metadata, capabilities, and optional direct exposures. */ interface MfeContractV1 { readonly contractVersion: MfeContractVersion; readonly id: MfeId; readonly displayName: string; readonly featureRoutes: Routes; readonly navigation: readonly NavigationItem[]; readonly capabilities: readonly MfeCapabilityDescriptor[]; readonly exposures: readonly MfeExposureDescriptor[]; } type MfeContract = MfeContractV1; type MfeContractIssueCode = 'duplicate_capability' | 'duplicate_exposure' | 'invalid_capability' | 'invalid_contract' | 'invalid_exposure' | 'invalid_id' | 'invalid_navigation' | 'invalid_routes' | 'missing_entry_exposure' | 'unknown_capability' | 'unsupported_version'; interface MfeContractIssue { readonly code: MfeContractIssueCode; readonly path: string; readonly message: string; } /** Host-side registry expectations applied after the remote shape is trusted. */ interface MfeContractExpectation { readonly id: string; readonly supportedContractVersions: readonly number[]; } type MfeContractValidationResult = { readonly valid: true; readonly contract: MfeContract; readonly issues: readonly []; } | { readonly valid: false; readonly issues: readonly MfeContractIssue[]; }; declare class MfeContractValidationError extends Error { readonly issues: readonly MfeContractIssue[]; constructor(issuesOrMessage: readonly MfeContractIssue[] | string); } /** Keeps literal inference while rejecting an invalid contract during remote evaluation. */ declare function defineMfe(contract: Contract): Contract; declare function isMfeContract(value: unknown): value is MfeContract; declare function assertMfeContract(value: unknown): asserts value is MfeContract; /** * Reads the exact named `mfe` export from an untrusted federation namespace. * Shape validation runs before registry identity and supported-major checks. */ declare function readMfeContract(remoteModule: unknown, expectation: MfeContractExpectation): MfeContractV1; /** Validates an untrusted remote value before the host reads routes or exposures from it. */ declare function validateMfeContract(value: unknown): MfeContractValidationResult; export { APPLICATION_PROFILES, APPLICATION_PROFILE_NAMES, DEFAULT_APPLICATION_PROFILE_NAME, MFE_APPLICATION_PROFILE, MFE_CAPABILITY_MODES, MFE_CONTRACT_VERSION, MFE_ENTRY_EXPOSURE, MFE_EXPOSURE_KINDS, MFE_PLATFORM_CAPABILITIES, MFE_STANDALONE_APPLICATION_PROFILE, MfeContractValidationError, applicationProfile, assertMfeContract, defineMfe, isMfeContract, provideStandaloneMfe, readMfeContract, validateMfeContract }; export type { ApplicationProfile, ApplicationProfileName, MfeCapabilityDescriptor, MfeCapabilityId, MfeCapabilityMode, MfeContract, MfeContractExpectation, MfeContractIssue, MfeContractIssueCode, MfeContractV1, MfeContractValidationResult, MfeContractVersion, MfeExposureDescriptor, MfeExposureKey, MfeExposureKind, MfeId, StandaloneMfeConfig };