import { SecurityContext } from '../typings/common.js'; /** * service configuration */ interface ServiceEndpoints { /** * api endpoint url */ api?: string; /** * idp endpoint url */ idp?: string; /** * logger endpoint url */ logger: string; } interface Env { serviceEndpoints: ServiceEndpoints; } /** * Files specific to the mode of the micro-frontend application. */ type EnvConfig = { /** * Array of file paths specific to the environment (development or production). * relative or absolute URLs */ files: Array; }; /** * Modes in which a micro-frontend application can operate. */ export declare enum LaunchMode { DEVELOPMENT = "development", PRODUCTION = "production" } /** * Library that manages the micro-frontend application. */ export declare enum MicroAppManager { SSF = "ssf", APPSDK = "appsdk" } /** * guest micro frontend app configuration */ export type MicroFrontendApp = { /** * unique application id */ id: string; /** * application name */ name: string; /** * Optional title for the micro-frontend application. */ title?: string; /** * Mode in which the micro-frontend operates (e.g., 'development', 'production'). */ mode?: LaunchMode; /** * url where the application is hosted */ hostUrl: string; /** * location of the manifest file */ manifestPath?: string; /** * home route of the application */ homeRoute?: string; /** * If true, the micro-frontend is treated as a JavaScript module. */ isJsModule?: boolean; /** * Library that manages the micro-frontend application (e.g., 'ssf', 'appsdk'). * @default 'appsdk' */ microappManager?: MicroAppManager; /** * security context under which the guest application is running */ securityContext?: SecurityContext; /** * static files to be loaded in dev mode */ development: EnvConfig; /** * static files to be loaded in prod mode */ production: EnvConfig; }; /** * host frontend application configuration */ export interface IAppConfig { /** * unique application id */ appId: string; /** * brand name */ brand?: string; /** * current environment */ activeEnv: string; /** * time interval to warn user about session timeout. milliseconds */ sessionTimeoutWarnInterval?: string | number; /** * time interval to logout user after session timeout. milliseconds */ sessionTimeoutInterval?: string | number; /** * service configuration */ serviceEndpoints: ServiceEndpoints; /** * environment specific configs */ env: { [key: string]: Env; }; /** * micro frontend application configs */ microFrontendApps: Record>; } /** * Utility to manage application configuration */ export declare class CAppConfig { #private; constructor(params: { version?: string; baseUrl?: string; }); /** * Get value for the given app config key * @param key key to get value for * @param defaultValue default value to return if key is not found * @returns value for the given key */ get: (key?: string, defaultValue?: unknown) => Type; /** * Set value for the given app config key * @param key key to set value for * @param value value to set */ set: (key: string, value: Type) => void; /** * Check if the given key exists in app config * @param key key to check * @returns true if key exists */ has: (key?: string) => boolean; /** * Accept an already-parsed config object, skipping the HTTP fetch. * Useful when the caller (e.g. pui-app-sdk) has already loaded the config. * @param config */ setPreloadedConfig: (config: Record) => void; /** * load application configuration from the given asset path * @param assetPath url path to load app config from * @param configUrl */ load: (configUrl?: string) => Promise; } export {};