import type { NgModuleRef, Type, Provider } from '@angular/core' with { 'resolution-mode': 'import' }; import type { ApplicationRemotePlugins } from '@c8y/client'; import type { Options } from '../resolvers/options-resolver'; export interface RemoteModuleFactoryWithMetadata { name: T; factory: Factory; fullContextPath: string; } type Factory = { [key in T]: NgModuleRef | Type | Provider[]; }; export interface PluginsConfig { remotes: ApplicationRemotePlugins; excludedRemotes?: ApplicationRemotePlugins; } /** * Takes a list of remotes and turns it into an object containing union of corresponding remotes. * @param remotes List of the remotes. * @returns Returns object with merged remotes. * * **Example** * ```typescript * const remotesA:ApplicationRemotePlugins = { contextPathA: ['moduleA', 'moduleB'] }; * const remotesB:ApplicationRemotePlugins = { contextPathA: ['moduleA'], contextPathB: ['moduleZ'] }; * const mergedRemotes:ApplicationRemotePlugins = mergeRemotes([remotesA, remotesB]); * // Result * { * contextPathA: ['moduleA', 'moduleB'], * contextPathB: ['moduleZ'] * } * * ``` */ export declare function mergeRemotes(remotes: ApplicationRemotePlugins[]): ApplicationRemotePlugins; export declare function removeRemotes(remotesToRemoveFrom: ApplicationRemotePlugins, remotesToRemove?: ApplicationRemotePlugins): ApplicationRemotePlugins; /** * Loads a list of remotes so that a particular application can use them. * The request is made to the following address: /apps//remoteEntry.js * @param remotes List of remotes to be loaded. * @returns Returns the list of loaded modules from remotes. */ export declare function loadRemotes(remotes: ApplicationRemotePlugins, options: Options): Promise; export declare function clearURLRemotesCache(): void; /** * Retrieves the remotes list from the URL. * @returns Returns the list of remotes. */ export declare function loadUrlRemotes(): ApplicationRemotePlugins; export declare function bootstrapGetRemotes(config: PluginsConfig, options: any): ApplicationRemotePlugins | undefined; export {};