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;
themeOverrides: ConfigurationType['theme'];
locale?: string;
private cookieComplianceMethod;
private isExtraCallRequiredForDefaultHome;
private isWebEmbed?;
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;
/**
* 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;
/**
* 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();
*
* @returns theme
*/
getTheme(): any;
/**
* updates theme overrides defined
* @param theme - object with overrides to the theme definition
* @example PCore.getEnvironmentInfo().setTheme(theme)
* PCore.getEnvironmentInfo().setTheme(theme);
*/
setTheme(theme: ConfigurationType['theme']): any;
setIsWebEmbed(isWebEmbed: boolean): boolean;
isWSSPortal(): boolean;
/**
* Returns theme branding info defined
*
* @example PCore.getEnvironmentInfo().getBrandingInfo()
* const theme = PCore.getEnvironmentInfo().getBrandingInfo();
*
* @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);
*/
setBrandingInfo(brandingInfo: object): 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(): string | undefined;
/**
*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 gets the corresponding launchpad identifier for the specified constellation identifier.
* 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 ID)
* @returns Launchpad identifier if available else null
*/
getKeyMapping(keyValue: string): string | null;
setCoexistenceMeta(data: any): {
appType: string;
isCoexistence: boolean;
};
getCoexistenceMeta(): {
appType: string;
isCoexistence: boolean;
};
isCoexistenceAppOfType(type: string): 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 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 {string} flag to make extra call for loading default home
* @private
*/
getIsExtraCallRequiredForDefaultHome(): string;
/**
* Sets if extra call is required to load default home data.
* @param {boolean} isExtraCallRequiredForDefaultHome - flag to make extra call for loading default home
*
* @example PCore.getEnvironmentInfo().setIsExtraCallRequiredForDefaultHome(true)
* PCore.getEnvironmentInfo().setIsExtraCallRequiredForDefaultHome("true");
*
* @returns {undefined}
* @private
*/
setIsExtraCallRequiredForDefaultHome(isExtraCallRequiredForDefaultHome: string): void;
/**
* Returns Authentication timeout value configured on access group
*
* @example PCore.getEnvironmentInfo().getInactivityTimeout()
* const authenticationTimeout = PCore.getEnvironmentInfo().getInactivityTimeout();
*
* @returns {Number|undefined} 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;
}
declare const _default: EnvironmentInfo;
export default _default;