import * as StateManager from '../store/state/state-manager'; import * as ActionCreators from '../store/state/actions/action-creators'; import * as RoutingManager from '../router/routing-manager'; import * as StreamObservable from '../observables/stream-observable'; import ActionProcessor from '../actions/processor'; import * as ContextUtils from '../utils/context-utils'; import CaseApis from '../case/apis'; import MashupApis from '../mashup/apis'; declare class BootstrapUtils { createC11nEnv: (meta: any) => import("../interpreter/types").CreateC11nEnv; getContextUtils: () => typeof ContextUtils; getRoutingManager: () => typeof RoutingManager; getComponentsRegistry: () => { customComponentLazyMap: { [x: string]: (((props: Record) => unknown) | (new (props: Record) => unknown)) | undefined; }; componentMap: { [x: string]: import("../components-registry").ComponentDescriptor; }; overrideMap: { [x: string]: import("../components-registry").ComponentDescriptor; }; lazyMap: { [x: string]: (((props: Record) => unknown) | (new (props: Record) => unknown)) | undefined; }; register(componentName: string, component: import("../components-registry").ComponentDescriptor): void; registerLazyMap(componentName: string, component: ((props: Record) => unknown) | (new (props: Record) => unknown)): void; registerCustomComponentLazyMap(componentName: string, component: ((props: Record) => unknown) | (new (props: Record) => unknown)): void; getComponent(componentName: string): import("../components-registry").ComponentDescriptor | undefined; getLazyComponent(componentName: string): (((props: Record) => unknown) | (new (props: Record) => unknown)) | undefined; getCustomComponent(componentName: string): (((props: Record) => unknown) | (new (props: Record) => unknown)) | undefined; mergeComponentsMap(componentsMap?: { [x: string]: import("../components-registry").ComponentDescriptor; }): void; mergeOverrideMap(overrideMap?: { [x: string]: import("../components-registry").ComponentDescriptor; }): void; getOverrideMap(): { [x: string]: import("../components-registry").ComponentDescriptor; }; getLazyMap(): { [x: string]: (((props: Record) => unknown) | (new (props: Record) => unknown)) | undefined; }; }; getStateManager: () => typeof StateManager; getActionCreators: () => typeof ActionCreators; getStreamObservable: () => typeof StreamObservable; getActionProcessor: () => typeof ActionProcessor; getActionHandler: () => { actionHandlers: { [key: string]: import("../actions/types").ActionHandler; }; getHandler(actionName: string | number): import("../actions/types").ActionHandler; registerHandler(actionName: string | number, handler: import("../actions/types").ActionHandler): void; }; renderApp: (translatedDXAPIResponse: any, domContainerID: any) => void; /** updates store with apiResponse * @public * @param dxAPIResponse - uiResources response * @param containerName - container name * @param isPortal - is portal */ updateStoreWithUiRoot: (dxAPIResponse: any, containerName: any, isPortal: any) => Promise; fetchEndPointResource: (endPoint: any, containerName: any, isPortal: any) => void; loadComponent: (componentConfig: any, domContainerID: any, additionalComponents: any) => Promise; setStaticServerUrl: (staticUrl: any, appStaticUrl: any, b2sJWT: any) => void; loadView: (dxAPIResponse: any, domContainerID: any, additionalComponents?: never[]) => Promise; /** * This is common method to initialize app shell and it gets invoked from pxBootstrapShell * @param appRoutingTable - appRoutingTable * @param actionsTargetModel - actionsTargetModel * @param servicesObj - servicesObj */ initAppShell: (appRoutingTable: any, actionsTargetModel: any, servicesObj: any) => void; /** * This method on the bootstrap is used to initialize just the routing table - this is used in scenarios such as the constellation * bridge wherein actions targeting and service objects are not useful * @param appRoutingTable - appRoutingTable * @param servicesObj - servicesObj */ initRoutingTable: (appRoutingTable: any, servicesObj: any) => void; setAppAlias: (appAlias: any) => void; getHomeRestApi: (portalName: any) => string; /** * Returns the full path to the view endpoint * @param viewID - View Name passed in the queryparam * @param viewClass - View Name passed in the queryparam * @returns Full path to the view endpoint */ getViewRestApi: (viewID: any, viewClass: any) => string; /** * Renders RootContainer initially * @param domContainerID - Container under which view must be loaded * @param componentMetaData - componentMetaData of RootContainer * @param additionalComponents - Additional components * @param portalTarget - (optional), DOM element into which view will be loaded and used as cosmos portal target(usually a shadowdom element) * @param styleSheetTarget - (optional), DOM element into which cosmos styles will be injected * @param removeContainer - check to remove the container */ loadRootComponent: (domContainerID: string, componentMetaData: { [key: string]: any; }, additionalComponents?: string[], portalTarget?: string, styleSheetTarget?: string, removeContainer?: boolean) => Promise; /** * Loads the view under the given container after hitting the view endpoint and getting the view response. * @param viewName - View Name passed in the queryparam * @param portalName - Default portal, used for a fallback when the viewName can not be resolved * @param viewClass - View Name passed in the queryparam * @param containerName - container name */ loadViewByName: (viewName: any, portalName: any, viewClass: any, containerName: any) => void; loadPortalView: (portalName: any, containerName: any) => void; configureForBrowserBookmark: (payload: any) => void; checkIfSemanticURL: () => boolean; /** * onPCoreReady API ensures that PCore is loaded and ready to use. This accepts a callback function, * that will be called once the application (PCore) infrastructure has established and is ready to perform its initial render. * * This API registers a callback that will be called once the application infrastructure has established the store and is ready to perform its initial render. * * @param callback callback function * @example Usage of onPCoreReady * Usage: * const render = function(){ * // logic to render and bootstrap your application. * }; * onPCoreReady usage: onPCoreReady((args) => render(args)); * * the callback function with render is called once the infrastructure is ready. */ onPCoreReady: (callback: any) => void; /** * onPCoreCleanup API ensures that PCore is properly unmounted. This accepts a callback function, * that will be called once the application (PCore) should be unmounted. This need not be invoked for * regular Constellation portal where the React root is the entire page, but is critical for Constellation * Web Embeddings. * * This API registers a callback that will be called when PCore should be unmounted. * * @param callback callback function * @example Usage of onPCoreCleanup * Usage: * const unmount = function(){ * // logic to cleanup application as PCore as Constellation is about to be unmounted * }; * onPCoreCleanup usage: onPCoreCleanup((args) => unmount(args)); * * the callback function with unount is invoked when Constellation should be unmounted. */ onPCoreCleanup: (callback: any) => void; setFieldsDefaultConfigs: (config: any) => void; setGoogleMapsAPIKey: (googleMapsAPIKey: any) => void; setFetchDefaultHeaders: (headersObj: any) => void; setFetchAuthInfo: (authInfo: any) => void; getCaseApi: () => typeof CaseApis; getMashupApi: () => typeof MashupApis; enableAppRouting: (enableRouting: any) => void; initStore: () => void; getBootstrapConfig: (restServerUrl: any, tokenInfo: any) => Promise; getBootstrapConfigViaSB: (restServerUrl: any, additionalHeaders: any, themeID: any) => Promise; initCoreContainers: (options?: {}) => { props: { getPConnect: () => import("../interpreter/c11n-env").C11nEnv; }; }; /** * Loads a mashup into a target DOM element. * * @param targetDom - The target DOM element identifier or tag name where the mashup will be loaded. * @param usePegaMashupStyling - (Optional by default it will be true) Indicates whether to use Pega mashup styling. * @example In the below example we are loading constellation mashup in the given "targetElementId". * * const targetElementId = 'mashupContainer'; * * bootstrapUtils.loadMashup(targetElementId); */ loadMashup: (targetDom: string, usePegaMashupStyling?: boolean) => Promise; /** * Bootstrap the application with authentication header and configuration. * This is the full bootstrap implementation that handles auth, config fetching, and initialization. * * @param config - This object contains properties needed to bootstrap the application. * @param config.restServerUrl - The REST server URL where DXAPI calls will be routed. * @param config.customRendering - (Optional) Indicates whether custom rendering to be honored. * @param config.onPCoreReadyCallback - Callback function when Pega Core is ready. * @param config.staticContentServerUrl - The static content server URL. * @param config.authInfo - (Optional) Authentication information. * @param config.renderingMode - Rendering mode for the application. * @param config.customCookies - (Optional) True if authentication is based on custom cookies. * @param target - The target DOM element to load the application. * @param preLoadComponents - (Optional) Preloaded components. * @param portalTarget - (Optional) DOM element for cosmos portal target. * @param styleSheetTarget - (Optional) DOM element for cosmos styles injection. * @returns A Promise that resolves once the application is bootstrapped. */ bootstrapWithAuthHeader: (config: any, target: any, preLoadComponents: never[] | undefined, portalTarget: any, styleSheetTarget: any) => Promise; loadRootContainerWithHybrid: (targetDom: any, preLoadComponents: never[] | undefined, portalTarget: any, styleSheetTarget: any) => Promise; getBootstrapConfigExtended: (restServerUrl: any, authorizationHeader: any, additionalHeaders: any, themeID: any, customCookies: any, locale: any) => Promise; getLPConfig: (restServerUrl: any, authorizationHeader: any, additionalHeaders: any, customCookies: any) => Promise; applyEnvironmentInfoResponse: (config: any) => Promise<{ isEnvInfoValid: boolean; theme: any; keyMapping: any; features: any; }>; importReactRoot: () => Promise[]>; preInitBootstrapConfig: (config: any, appAlias: any, additionalHeaders: any, themeID: any) => Promise; } declare const _default: BootstrapUtils; export default _default;