import type { ConfigurationType } from '../initialiser/configurations';
import type { CookieComplianceMethod, EnvironmentInfoObj, Bundle } from './types';
/**
* Provides APIs to access state-full properties like properties from pxRequestor, OperatorID and Application pages
*/
declare class EnvironmentInfo {
environmentInfoObject: EnvironmentInfoObj | null;
isPortalLoaded: boolean;
pageName: string | null;
KeyMapping: any;
isAssignmentHeaderHidden: boolean;
coexistenceMeta: {
appType: string;
isCoexistence: boolean;
};
brandingInfo: any;
brandingInfoDark: any;
themeOverrides: ConfigurationType['theme'];
darkThemeOverrides: ConfigurationType['darkTheme'];
locale?: string;
private cookieComplianceMethod;
private isExtraCallRequiredForDefaultHome;
private enablePriorityAndUrgencyImprovements;
private isWebEmbed?;
private caseLabelFirstInTitle?;
private navOrientation?;
constructor();
setEnvironmentInfo(environmentInfoObject: EnvironmentInfoObj): void;
/**
* Returns operator user name
*
* @example
PCore.getEnvironmentInfo().getOperatorName()
* const operatorName = PCore.getEnvironmentInfo().getOperatorName();
*
* @returns user name
*/
getOperatorName(): string | undefined;
/**
* Returns operator work group
*
* @example PCore.getEnvironmentInfo().getOperatorWorkGroup()
* const operatorWorkGroup = PCore.getEnvironmentInfo().getOperatorWorkGroup();
*
* @returns work group name
*/
getOperatorWorkGroup(): string | undefined;
/**
* Returns operator identifier
*
* @example PCore.getEnvironmentInfo().getOperatorIdentifier()
* const operatorIdentifier = PCore.getEnvironmentInfo().getOperatorIdentifier();
*
* @returns identifier
*/
getOperatorIdentifier(): string | undefined;
/**
* Returns operator image insKey
*
* @example PCore.getEnvironmentInfo().getOperatorImageInsKey()
* const operatorImgInsKey = PCore.getEnvironmentInfo().getOperatorImageInsKey();
*
* @returns image insKey
*/
getOperatorImageInsKey(): string | undefined;
/**
* Returns application label
*
* @example PCore.getEnvironmentInfo().getApplicationLabel()
* const applicationLabel = PCore.getEnvironmentInfo().getApplicationLabel();
*
* @returns application label
*/
getApplicationLabel(): string | undefined;
getPortalName(): string;
setCaseLabelFirstInTitle(useDefaultTitleFormat?: boolean): void;
getCaseLabelFirstInTitle(): boolean | undefined;
/**
* Returns application name
*
* @example PCore.getEnvironmentInfo().getApplicationName()
* const applicationLabel = PCore.getEnvironmentInfo().getApplicationName();
*
* @returns application name
*/
getApplicationName(): string | undefined;
/**
* Returns useLocale defined
*
* @example PCore.getEnvironmentInfo().getUseLocale()
* const useLocale = PCore.getEnvironmentInfo().getUseLocale();
*
* @returns useLocale
*/
getUseLocale(): string | undefined;
/**
* Return Access group
*
* @example PCore.getEnvironmentInfo().getAccessGroup()
* const accessGroup = PCore.getEnvironmentInfo().getAccessGroup();
*/
getAccessGroup(): string | undefined;
/**
* Return Application Id
*
* @example PCore.getEnvironmentInfo().getApplicationId()
* const applicationId = PCore.getEnvironmentInfo().getApplicationId();
*/
getApplicationID(): string | undefined;
/**
* Returns timeZone defined
*
* @example PCore.getEnvironmentInfo().getTimeZone()
* const timeZone = PCore.getEnvironmentInfo().getTimeZone();
*
* @returns timezone
*/
getTimeZone(): string | undefined;
/**
* Returns theme overrides defined
*
* @example PCore.getEnvironmentInfo().getTheme()
* const theme = PCore.getEnvironmentInfo().getTheme();
* @param options - optional object with type property to specify 'light' or 'dark' theme
* @returns theme
*/
getTheme(options?: {
type: 'light' | 'dark';
}): any;
/**
* updates theme overrides defined and publishes a `THEME_CHANGE` pubsub event so that
* listening components (e.g. the ThemeProvider in react_config_root) can update without
* a portal reload.
*
* @example PCore.getEnvironmentInfo().setTheme(theme)
* PCore.getEnvironmentInfo().setTheme(theme);
* @param theme - object with overrides to the theme definition
* @param options - optional object with type property to specify 'light' or 'dark' theme
*/
setTheme(theme: ConfigurationType['theme'], options?: {
type: 'light' | 'dark';
}): ConfigurationType['theme'];
/**
* Returns the current nav orientation, preferring the in-memory value set via
* `setNavOrientation` over the value from the environment info object.
*
* @example PCore.getEnvironmentInfo().getNavOrientation()
* const orientation = PCore.getEnvironmentInfo().getNavOrientation();
* @returns 'side-rail' | 'top-bar' | undefined
*/
getNavOrientation(): 'side-rail' | 'top-bar' | undefined;
/**
* Sets the nav orientation and publishes a `NAV_ORIENTATION_CHANGE` pubsub event so
* that listening components (e.g. the AppShell DX component) can update without a
* portal reload.
*
* @example PCore.getEnvironmentInfo().setNavOrientation('top-bar')
* PCore.getEnvironmentInfo().setNavOrientation('top-bar');
* @param orientation - 'side-rail' | 'top-bar'
*/
setNavOrientation(orientation: 'side-rail' | 'top-bar'): "side-rail" | "top-bar";
setIsWebEmbed(isWebEmbed: boolean): boolean;
isWSSPortal(): boolean;
isDefaultWSSPortal(): boolean;
/**
* Returns whether the current runtime is Infinity.
* Reads `pyExecutionRuntimeName` directly from the environment info object.
*
* @example PCore.getEnvironmentInfo().isInfinityRuntime()
* const isInfinity = PCore.getEnvironmentInfo().isInfinityRuntime();
*
* @returns `true` on Infinity, `false` on Launchpad or when environment info is not yet set
*/
isInfinityRuntime(): boolean;
/**
* Returns whether the GenAI feature is enabled.
* Reads `pyGenAIEnabled` directly from the environment info object.
* On Infinity this is a top-level field; on Launchpad it is set by the bootstrap component.
*
* @example PCore.getEnvironmentInfo().isGenAIEnabled()
* const enabled = PCore.getEnvironmentInfo().isGenAIEnabled();
*
* @returns `true` if enabled, `false` otherwise
*/
isGenAIEnabled(): boolean;
/**
* Returns the data page name to use for the GenAI rewrite operation.
* Reads `pyRewriteGenAIDP` directly from the environment info object.
* On Infinity this is a top-level field; on Launchpad it is set by the bootstrap component.
*
* @example PCore.getEnvironmentInfo().getRewriteGenAIDP()
* const dp = PCore.getEnvironmentInfo().getRewriteGenAIDP() ?? 'D_RewriteWithAI';
*
* @returns Data page name string or `undefined`
*/
getRewriteGenAIDP(): string | undefined;
/**
* Returns whether the application is from Blueprint Experience.
* Reads `fromBlueprintExperience` from the features object in environment info.
*
* @example PCore.getEnvironmentInfo().isBlueprintExperience()
* const isFromBlueprint = PCore.getEnvironmentInfo().isBlueprintExperience();
*
* @returns `true` if from Blueprint Experience, `false` otherwise
*/
isBlueprintExperience(): boolean;
/**
* Returns theme branding info defined
*
* @example PCore.getEnvironmentInfo().getBrandingInfo()
* const theme = PCore.getEnvironmentInfo().getBrandingInfo();
*
* @param options - optional object with type property to specify 'light' or 'dark' theme
* @returns theme branding info
*/
private getBrandingInfo;
/**
* updates theme branding info defined
* @param brandingInfo - object with overrides to the theme branding info
* @example PCore.getEnvironmentInfo().setBrandingInfo(brandingInfo)
* PCore.getEnvironmentInfo().setBrandingInfo(brandingInfo);
* @param options - optional object with type property to specify 'light' or 'dark' theme
*/
setBrandingInfo(brandingInfo: object, options?: {
type: 'light' | 'dark';
}): any;
/**
* Returns cookie compliance/privacy compliance method value defined on currently rendered portal.
*
* @example getCookieComplianceMethod()
* Below api, returns 'default' as privacy compliance method for current rendered portal
* ```
* const cookieComplianceMethod = PCore.getEnvironmentInfo().getCookieComplianceMethod();
* ```
*/
getCookieComplianceMethod(): CookieComplianceMethod;
/**
* Sets cookie compliance/privacy compliance method value for current portal.
* @param cookieComplianceMethod - selected privacy compliance method
*
* @example setCookieComplianceMethod()
* Below api, sets default privacy compliance method value for current portal
* ```
* PCore.getEnvironmentInfo().setCookieComplianceMethod('default');
* ```
*/
setCookieComplianceMethod(cookieComplianceMethod: CookieComplianceMethod): void;
/**
* Use this API to change user's locale info on portal
* to load localized application content.
* This API must be called when portal is being loaded.
* This API only changes locale in the portal but does not user's defined locale.
* @param locale - User locale info that will be set on portal Example: de_DE, en_GB
* @example In this example API sets user's locale to de_DE when portal is loading
* PCore.getEnvironmentInfo().setLocale('de_DE')
*/
setLocale(locale: string): void;
getLocale: () => string | undefined;
/**
* Returns array containing all global environmental keys
*
* @example PCore.getEnvironmentInfo().getEnvironmentKeys()
* const environmentKeys = PCore.getEnvironmentInfo().getEnvironmentKeys();
*
* @returns array containing all global environmental keys
*/
getEnvironmentKeys(): string[];
/**
*This API obtains the system configured size limit in MB for attachments.
*If the size limit is not configured in the system, then the default value of the size limit is 5.
*
* @returns the size limit.
*
* @example In this example, the API returns the system configured size limit for attachments.
*
* const maxAttachmentSize = PCore.getEnvironmentInfo().getMaxAttachmentSize();
*
*/
getMaxAttachmentSize(): string | undefined;
/**
*This API obtains the datapage to get the operators list.
*
* @returns the operator datapage name.
*
* @example In this example, the API returns the datapage name to get the operators list.
*
* const defaultOperatorDP = PCore.getEnvironmentInfo().getDefaultOperatorDP();
*
*/
getDefaultOperatorDP(): string | undefined;
/**
*This API obtains the datapage to get the document url list.
*
* @returns the document datapage name.
*
* @example In this example, the API returns the datapage name to get the document url list.
*
* const documentUrlDP = PCore.getEnvironmentInfo().getDocumentUrlDP();
* @private
*/
getDocumentUrlDP(): string | undefined;
/**
*This API obtains the datapage to get the case instance list.
*
* @returns the case instance datapage name.
*
* @example In this example, the API returns the datapage name to get the case instance list.
*
* const caseInstanceListDP = PCore.getEnvironmentInfo().getCaseInstanceListDP();
*
*/
getCaseInstanceListDP(): string | undefined;
/**
* Returns the base locale
*
* @example PCore.getEnvironmentInfo().getBaseLocale()
* const applicationLabel = PCore.getEnvironmentInfo().getBaseLocale();
* //Returns en_EN if the base locale is set to en_EN during application creation.
* @returns application name
* @ignore
*/
getBaseLocale(): string;
/**
* Description: Constellation UI can be rendered in three different modes
* 1. FULL_PORTAL - which includes portal rendering of the constellation
* 2. EMBED - It is a mashup scenario, where cases or views will be rendered
* 3. HYBRID - Constellation redered in the legacy sections or harnesses
* 4. PREVIEW - Constellation rendered during authoring time
* This API returns the rederingMode value, which can be any value from the above four
* @example PCore.getEnvironmentInfo().getRenderingMode()
* const renderingMode = PCore.getEnvironmentInfo().getRenderingMode();
* @returns renderingMode
*/
getRenderingMode(): "EMBED" | "FULL_PORTAL" | "HYBRID" | "PREVIEW" | undefined;
/**
* Checks whether the current environment is Pega Mobile.
*
* @example PCore.getEnvironmentInfo().isPegaMobile()
* const isMobile = PCore.getEnvironmentInfo().isPegaMobile();
*
* @returns true if running inside a Pega Mobile shell.
*/
isPegaMobile(): boolean;
/**
*This API obtains if the URL params needs to be updated.
*
* @returns true if the URL params needs to be updated, false otherwise.
*
* @example In this example, the API returns if the URL params needs to be updated with UI state info.
*
* const shouldUseURLParams = PCore.getEnvironmentInfo().shouldUseURLParams();
* @private
*/
shouldUseURLParams(): boolean | undefined;
/**
* Returns a csv list of built-on app names
*
* @example PCore.getEnvironmentInfo().getBuiltOnAppNames()
* const builtOnAppNames = PCore.getEnvironmentInfo().getBuiltOnAppNames();
*
* @returns user name
* @ignore
*/
getBuiltOnAppNames(): string | undefined;
/**
* This API set the previewMode to true
* @example PCore.getEnvironmentInfo().setPreviewMode()
* @private
*/
setPreviewMode(): void;
/**
* This API sets the defaultCasePage value
* @example PCore.getEnvironmentInfo().setDefaultCasePage("pyEmbedAssignment")
* @ignore
*/
setDefaultCasePage(pageName: string): void;
/**
* This API gets the defaultCasePage value
* @example PCore.getEnvironmentInfo().getDefaultCasePage()
* @returns pageName value which has been already set
* @ignore
*/
getDefaultCasePage(): string | null;
/**
* This API sets the DisableAssignmentHeader value
* @example PCore.getEnvironmentInfo().disableAssignmentHeader(true)
* @ignore
*/
disableAssignmentHeader(value: boolean): void;
/**
* This API gets the DisableAssignmentHeader value
* @example PCore.getEnvironmentInfo().isAssignmentHeaderDisabled()
* @returns disableAssignmentHeader value which has been already set
*/
private isAssignmentHeaderDisabled;
/**
* This API gets the name of default portal assigned to an operator
* @example if Operator has WebPortal as their default portal, PCore.getEnvironmentInfo().getDefaultPortal() will return "WebPortal"
* @returns default portal name set to the operator
*/
getDefaultPortal(): string | undefined;
/**
* This API is used to update additional feature info to environmentInfo Object
* @example , PCore.getEnvironmentInfo().updateFeatureMap() will return feature updated object
* @returns feature value
*/
private updateFeatureMap;
/**
* This API exposes configured overrides for features
* @example , PCore.getEnvironmentInfo().getFeatureMap() will return feature override object
* @returns default is empty object
* @ignore
*/
getFeatureMap(): import("./types").Features;
/**
* This API is to store keyMapping for launchpad
* @example PCore.getEnvironmentInfo().setKeyMapping({"pxCreateDateTime" : "CreateDateTime"})
* @private
*/
setKeyMapping(keyMap: any): any;
/**
* This API retrieves the corresponding Launchpad identifier with the default namespace (if applicable) for the specified identifier. This API does not alter the name of the identifier for Infinity.
* If corresponding launchpad identifier is missing it will return null
* @param keyValue - Specific constellation identifier for which we obtain corresponding launchpad identifier
* @example PCore.getEnvironmentInfo().getKeyMapping("pzInsKey") (i.e. mapping of Constellation identifier with launchpad identifier ex. pzInskey to PegaPlatform__ID)
* @returns Launchpad identifier with the default namespace (if applicable) for the specified identifier. This API does not alter the name of the identifier for Infinity.
*/
getKeyMapping(keyValue: string): string | null;
setCoexistenceMeta(data: any): {
appType: string;
isCoexistence: boolean;
};
getCoexistenceMeta(): {
appType: string;
isCoexistence: boolean;
};
isCoexistenceAppOfType(type: string): boolean;
isOptimizedCaseLoadingEnabled(): boolean;
/**
* Returns list of cases added in application cases and data
* @example PCore.getEnvironmentInfo().getCaseTypeList()
* const caselist = PCore.getEnvironmentInfo().getCaseTypeList();
*
* @returns theme
* @ignore
*/
getCaseTypeList(): (({
hasCreateAccess?: boolean;
pyHasCreateAccess?: never;
} | {
hasCreateAccess?: never;
pyHasCreateAccess?: boolean;
}) & {
[key: string]: string;
})[];
/**
* Returns list of classes added in application cases and data
* @example PCore.getEnvironmentInfo().getClassesList()
* const classeslist = PCore.getEnvironmentInfo().getClassesList();
*
* @returns list of access objects
* @ignore
*/
getClassesAccessList(): ({
pyHasCreateAccess: boolean;
} & {
[key: string]: string;
})[];
/**
* Returns userSettings
*
* @example PCore.getEnvironmentInfo().getUserSettings
* const userSettings = PCore.getEnvironmentInfo().getUserSettings();
* @returns userSettings
* @ignore
*/
getUserSettings(): string | null;
/**
* Returns localization version
*
* @example PCore.getEnvironmentInfo().getLocalizationVersion()
* @returns number
* @ignore
*/
getLocalizationVersion(): number;
/**
* This function returns sorted localization bundles based on pyOrder for a given language code.
* If the specified language is unavailable, it falls back to the default bundle which may contain overrides.
*
* @example PCore.getEnvironmentInfo().getLocalizationBundles()
* @returns Bundle[]
*
* @example PCore.getEnvironmentInfo().getLocalizationBundles('de-DE')
* @returns Bundle[]
* @ignore
*/
getLocalizationBundles(langCode?: string | undefined): Bundle[];
/**
* Returns Available Locale Packs based on environment and version
*
* For Launchpad availableLanguagePacks is populated in the featuremap so we return it
* For Infinity we return undefined as we are dependent on the getLocalizationBundles
*
* @example PCore.getEnvironmentInfo().getAvailableLocalePacks()
* @returns string[]
* @ignore
*/
getAvailableLocalePacks(): string[] | undefined;
/**
* Returns flag to make extra call for loading default home
*
* @example PCore.getEnvironmentInfo().getIsExtraCallRequiredForDefaultHome()
* const isExtraCallRequiredForDefaultHome = PCore.getEnvironmentInfo().getIsExtraCallRequiredForDefaultHome();
*
* @returns flag to make extra call for loading default home
* @private
*/
getIsExtraCallRequiredForDefaultHome(): string | boolean;
/**
* Sets if extra call is required to load default home data.
* @param isExtraCallRequiredForDefaultHome - flag to make extra call for loading default home
*
* @example PCore.getEnvironmentInfo().setIsExtraCallRequiredForDefaultHome(true)
* PCore.getEnvironmentInfo().setIsExtraCallRequiredForDefaultHome(true);
*
* @private
*/
setIsExtraCallRequiredForDefaultHome(isExtraCallRequiredForDefaultHome: string | boolean): void;
/**
* Returns flag to enable priority and urgency improvements
*
* @example PCore.getEnvironmentInfo().getEnablePriorityAndUrgencyImprovements()
* const enablePriorityAndUrgencyImprovements = PCore.getEnvironmentInfo().getEnablePriorityAndUrgencyImprovements();
*
* @returns flag to enable priority and urgency improvements
* @private
*/
getEnablePriorityAndUrgencyImprovements(): boolean;
/**
* Sets if priority and urgency improvements are enabled.
* @param enablePriorityAndUrgencyImprovements - flag to enable priority and urgency improvements
*
* @example PCore.getEnvironmentInfo().setEnablePriorityAndUrgencyImprovements(true)
* PCore.getEnvironmentInfo().setEnablePriorityAndUrgencyImprovements(true);
*
* @private
*/
setEnablePriorityAndUrgencyImprovements(enablePriorityAndUrgencyImprovements: boolean): void;
/**
* Returns Authentication timeout value configured on access group
*
* @example PCore.getEnvironmentInfo().getInactivityTimeout()
* const authenticationTimeout = PCore.getEnvironmentInfo().getInactivityTimeout();
*
* @returns Authentication timeout value
* @private
*/
getInactivityTimeout(): number | undefined;
/**
* This API exposes isUnifiedObject flag present in environment-info of launchpad
* @example PCore.getEnvironmentInfo().isUnifiedObject() will return isUnifiedObject flag
* @returns default false
* @private
*/
isUnifiedObject(): boolean;
getRuntime(): string;
/**
* Returns all action names for inline edit actions matching the given class name.
*
* @example PCore.getEnvironmentInfo().getInlineEditActions('PegaCS-Work-Interaction')
* const actionNames = PCore.getEnvironmentInfo().getInlineEditActions('PegaCS-Work-Interaction');
*
* @param pyClassName - the class name to look up
* @returns array of matching pyActionName values, or an empty array if none found
* @private
*/
getInlineEditActions(pyClassName: string): string[];
/**
* Returns all action names for inline edit actions matching the given class name.
*
* @example PCore.getEnvironmentInfo().getInlineEditActionViews('PegaCS-Work-Interaction')
* const actionNames = PCore.getEnvironmentInfo().getInlineEditActionViews('PegaCS-Work-Interaction');
*
* @param pyClassName - the class name to look up
* @returns array of matching pyViewName values, or an empty array if none found
* @private
*/
getInlineEditActionViews(pyClassName: string): string[];
/**
* Returns the currently configured full-object display template name used by CaseView.
*
* @example PCore.getEnvironmentInfo().getFullObjectDisplayTemplate()
* const template = PCore.getEnvironmentInfo().getFullObjectDisplayTemplate();
*
* @returns template name string or `undefined`
*/
getFullObjectDisplayTemplate(): string | undefined;
/**
* Updates the full-object display template on the environment info object and publishes
* a `CASE_VIEW_TEMPLATE_CHANGE` pubsub event so that CaseView components re-render
* without requiring a full page refresh.
*
* @param template - the new template name, or `undefined` to revert to the default layout
*
* @example PCore.getEnvironmentInfo().setFullObjectDisplayTemplate('MyCustomCaseView')
* PCore.getEnvironmentInfo().setFullObjectDisplayTemplate('MyCustomCaseView');
*/
setFullObjectDisplayTemplate(template: string | undefined): void;
}
declare const _default: EnvironmentInfo;
export default _default;