import * as StateManager from './store/state/state-manager'; import * as ContainerUtils from './container/container-utils'; import { LocaleUtils } from './locale/locale-utils'; import FollowerApi from './case-follower'; import FeedUtils from './feed'; import EnvironmentInfo from './environment-info'; import getPersonalizationUtils from './personalization'; import DataApi from './data-view/index'; import DataApiUtils from './data-view/data-api-utils'; import AnalyticsUtils from './analytics'; import RemoteCase from './case/remote-case'; import CoexistenceManager from './coexistence'; import MashupApi from './mashup/apis'; import * as MashupBridge from './constellation-mashup-bridge'; import Events from './events'; import FormUtils from './form/form-utils'; import AnnotationUtils from './annotation/utils'; import FieldUtils from './fields/index'; import MessagingServiceManager from './messagingservice/manager'; import * as MetadataUtils from './rules/rules-store'; import DataStore from './datapage/index'; import DataTypeUtils from './datatype'; import CaseUtils from './case/utils'; import StateUtils from './store/state/utils/state-utils'; import * as ExpressionEngine from './expression/expression-engine'; import * as RestClient from './rest-client'; import AuthUtils from './utils/authentication-utils'; import * as ViewResources from './utils/view-resources'; import PubSubUtils from './utils/pubsub-utils'; import './validation/validators/validators'; import './annotation/handlers'; import BootstrapUtils from './bootstrap/bootstrap-utils'; import ContextTreeManager from './contextree/treemanager'; import type ComponentsRegistry from './components-registry'; import AccessPrivilege from './access-privilege'; import NamespaceUtils from './utils/namespace-utils'; import type { NetworkUtils } from './utils/network-status-manager'; import type { ConfirmDialogService } from './services/confirm-dialog-service'; import AutosaveUtils from './autosave/utils'; /** * The PCore object provides access to methods * that are available * for use by Bridge layers that connect the Constellation * Core to a UI Library implementation. (For example, Nebula * is a bridge layer between Constellation Core and React.) * Methods defined on this class are available via the * PCore object. */ declare class PCore { /** * JSON object that stores any behavior overrides. *

Supported override flag is:

*

dynamicLoadComponents - when false, do not attempt to load components dynamically

* @private */ static behaviorOverrides: { [key: string]: boolean; }; /** * This API provides an entry point to the {@link PersonalizationUtils} object that contains utility APIs * to manage the personalization instances of a list component. * To view the APIs in the {@link PersonalizationUtils} module, * see {@link PersonalizationUtils} Module. * * @param listId - A unique ID referencing a list component. The length of the ID should be limited to 32 characters. * * @example In this example, the API obtains the PersonalizationUtils object for the list whose ID is 443533r555. * const listId = "443533r555"; * PCore.getPersonalizationUtils(listId); * * @returns - {@link PersonalizationUtils} object * @function */ getPersonalizationUtils: typeof getPersonalizationUtils; /** * Constructor - Not for use outside of Core! Included for reference only. */ constructor(); /** * Returns the version of the PConnect/PCore APIs for this implementation. * @returns The major/minor/patch version (ex: "8.6.1") * @function */ getPCoreVersion: () => string; /** * 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. * It is expected that the component object and container ID information * passed into the callback will be used to call a * function that will render the component tree specified by the results of the * component object's getPConnect(). * * Example use can be found in src/bridge/react_root.js: * PCore.onPCoreReady((root, target) => { render(root, target)}); * where the incoming root and target arguments are passed along to the method * that renders the application * * @param callback The callback takes 2 arguments: root and target. * root is a JSON * object containing a "props" key. This is the component object that provides * access to the initial getPConnect() for the top-level component * of the application. The root object may also provides a "domContainerID" key. * If that key exists, it used to get the DOM element with the given ID which is * then used as the target element in order the component object will be rendered. * If that key is null, the target argument passed to the callback is used as the * initial point of rendering. * * target will be null when the application is first being rendered and may * be a string such "app/primary" to indicate the target container in which the * application should be rendered. If target is not defined, the component object * is rendered in the DOM's element or in the element with id="app" if * there is no element. * * @function */ onPCoreReady: (callback: Function) => void; /** * This API registers a callback that will be called once the application infrastructure * is to be dismounted. It is invoked in the Web Embed scenario when the Web Embed * web component receives a disconnectedCallback or when the user explicitly * invokes the logout API. * It is expected that the portalTarget and styleSheetTarget information * passed into the callback will be used to call the proper React methods * to unmount the component tree previously mounted at that target as well * as any stylesheet related cleanup. * * Example use can be found in src/bridge/react_root.js: * PCore.onPCoreCleanup((config) => { unmount(config)}); * where the config object includes portalTarget and styleSheetTarget attributes * which were specified when originally bootstrapping Constellation * * @param callback The callback takes 1 argument: config. * config is a JSON object containing key attributes passed in when initially * rendering the Web Embed via bootstrapping Constellation and invoking the * appropriate MashupAPI. Some relevant attributes include "domContainerID", * "portalTarget" and "styleSheetTarget". * * @function */ onPCoreCleanup: (callback: (config: { domContainerID: string | null; portalTarget: HTMLDivElement; styleSheetTarget: HTMLDivElement; }) => void) => void; /** * This function returns the component registry bound to core. * It has methods to register or override existing components, this is exposed * so that components from other lib like mobile can replace desktop one. * @example Example for getComponentsRegistry() * const componentRegistry = PCore.getComponentsRegistry(); * @returns the Component registry * @function */ getComponentsRegistry: () => typeof ComponentsRegistry; /** * Utility function to check for a semantic URL * @function */ checkIfSemanticURL: () => boolean; /** * Utility function to check for a valid semantic URL * @function */ isValidSemanticURL: () => boolean; /** * This api provides utilities to update routing table. * @example Example for getRoutingUtils() * // this example will return the RoutingUtils API object * const routingUtils = PCore.getRoutingUtils(); * * @returns the API object * @function * @private */ getRoutingUtils: () => { addRoutes: (appRoutingTable: any) => void; }; /** * Obtains an entry point to the {@link ViewResources} object that contains APIs to manage view metadata in rule store * * @example In this example, the getViewResources API is used to obtain the updateViewResources API. * const { updateViewResources } = PCore.getViewResources(); * * @returns An object of {@link ViewResources} APIs * @function */ getViewResources: () => typeof ViewResources; /** * Utility function to configure for browser bookmarking * @param payload need better description * @function */ configureForBrowserBookmark: (payload: object) => void; /** * Returns the Redux Store * @returns the Redux Store * @function * * @example Example for getStore() * const store = PCore.getStore(); */ getStore: () => any; /** * Reset the Store to its initial state. Note: This is typically only * used by Mashups when they are exiting out of their flow and want * to leave the Store in a state that is initialized for the next use. * On the initial loading of the app, the store is automatically * initialized. * @function * @private * @returns object with actionMgrID and promise keys: { actionMgrID: , promise: } * * @example Example for resetStore() * const store = PCore.resetStore(); */ resetStore: () => Promise; /** * Returns the {@link MessageManager} API's. It exposes below API's *
    *
  • addMessages
  • *
  • getMessages
  • *
  • clearMessages
  • *
* * @example Example for addMessages api * const { addMessages } = PCore.getMessageManager(); * addMessages({ * messages: [ * { * type: 'error', * message: 'Validation Error' * } * ], * category: 'HTTP' * context: 'app/primary_2' * }); * // above example shows how to use addMessages api to add HTTP message * // for the context app/primary_2 * * @example Example for clearMessages api * const { clearMessages } = PCore.getMessageManager(); * clearMessages({ * type: 'error', * property: '.firstName', * context: 'app/primary_2' * }); * // above example shows how to use clearMessages api to clear messages of type error * // on firstName property * * @returns the API object * @function */ getMessageManager: () => { addMessages: (config: import("./messages/types").MessagesConfigObject) => void; getValidationErrorMessages: (context: string, localizationService?: import("./locale/LocalizationService").LocalizationService) => (string | { label: string; description: string; })[]; getMessages: (config: Omit & { context: string | null; }) => any; clearMessages: (config: import("./messages/types").MessagesConfigObject) => void; getRootContainerHttpMessages: (isNonPortalRootContainer: boolean, activeContainerItemName: string) => object; clearContextMessagesInActiveWorkArea: (context: string) => void; clearContextMessages: (config: Pick) => void; isCustomPageErrorExist: (context: string) => boolean; }; /** * This api provides Coexistence related api. * @example Example for getCoexistenceManager() * Example usage - PCore.getCoexistenceManager(); * * @returns the API object * @function * @private */ getCoexistenceManager: () => typeof CoexistenceManager; /** * Returns the value of prop from Redux Store. This is a syntactical sugar to StateManager.getValue() * * @param propReference property reference e.g. .FirstName or pyWorkPage.FirstName * @param pageReference page reference e.g. .pyWorkPage, D_Accounts.pxResults(1) * @param context context of the property * @returns - value of the prop * @function * */ getStoreValue: (propReference: string, pageReference: string, context: string) => any; /** * Returns the Container Manager Utils * This exposes the container manager utility APIs like *
    *
  • getContainers
  • *
  • getContainerData
  • *
  • isContainerItemExists
  • *
  • getContainerItemName
  • * and others *
* * @example Example for getContainerUtils() * Example usage - PCore.getContainerUtils() * // returns -- ContainerUtils Object which containers the utility APIs * * @example Example for getContainerUtils().getContainerItemName * Example usage - PCore.getContainerUtils().getContainerItemName('app/primary') * // returns -- container item name if container already exists in store * * @returns The {@link ContainerUtils} object * @function */ getContainerUtils: () => typeof ContainerUtils; /** * Obtains an entry point to the {@link AnnotationUtils} class that is used to access utility APIs to handle the annotation to a property. * * @example Example for getAnnotationUtils() * Example usage - PCore.getAnnotationUtils() * // returns -- AnnotationUtils class containing the utility APIs * * @example Example for getAnnotationUtils().isProperty() * Example usage - PCore.getAnnotationUtils().isProperty('@P .EmployeeName') * // returns -- true if the passed argument is property otherwise it returns false * * @returns the AnnotationUtils API object * @function */ getAnnotationUtils: () => typeof AnnotationUtils; /** * Obtains an entry point to the {@link FieldUtils} class that is used to access utility APIs to handle the field related operations. * * @example Example for getFieldUtils() * Example usage - PCore.getFieldUtils() * // returns -- FieldUtils class containing the utility APIs * * @example Example for getFieldUtils().formatPageReference() * Example usage - PCore.getFieldUtils().formatPageReference('.Questionsets[0].Questions') * // returns -- '.Questionsets(1).Questions' * * @returns the FieldUtils API object * @function */ getFieldUtils: () => typeof FieldUtils; /** * Obtains an entry point to the {@link FieldDefaultUtils} instance that is used to access APIs to handle the fields default related operations. * * @example Example for getFieldDefaultUtils() * Example usage - PCore.getFieldDefaultUtils() * // returns -- FieldDefaultUtils class instance containing the APIs * * @example Example for getFieldDefaultUtils().getDefaultsforType() * Example usage - PCore.getFieldDefaultUtils().getDefaultsforType("Email") * * @returns the FieldDefaultUtils object * @function * @public */ getFieldDefaultUtils: () => { fieldDefaults: { [fieldType: string]: import("./fields/types").FieldDefaultsObj; }; updateFieldDefaults(configs: import("./fields/types").FieldDefaultsObj): void; setFieldDefault(type: string, key: string, value: import("./fields/types").FieldDefault): void; getDefaultsforType(type: string): import("./fields/types").FieldDefaultsObj; }; /** * Returns the Asset Loader Class * This exposes the Asset Loader utility APIs including: *
    *
  • getStaticServerUrl
  • *
  • getConstellationServiceUrl
  • *
  • initServer
  • *
  • register
  • *
  • getLoader
  • *
  • loadAssets
  • *
* * @example Example for getAssetLoader() * Example usage - PCore.getAssetLoader() * // returns -- AssetLoader Object which containers the utility APIs * * @example Example for getAssetLoader().getLoader * Example usage - PCore.getAssetLoader().getLoader('font-loader') * // returns -- Font Loader Function to load font assets if font-loader is defined * // else returns default loader * * * @returns the Asset Loader Object * @function */ getAssetLoader: () => { loaderObj: { [key: string]: Function; }; staticServerURL: string | null; appStaticUrl: string | null; pegaOnlyUrl: boolean; loadedAssets: { [key: string]: boolean; }; componentsConfig: import("./utils/types").ComponentConfig[] | null; appAlias: string; b2sJWT: string | null; ccV2LibId: string | null; imageBlobUrlCache: { [key: string]: Promise; }; getTypes: { SCRIPT: string; STYLE: string; }; getStaticServerUrl(): string | null; setCCV2LibId(ccV2LibId: string): void; getCCV2LibId(): string | null; getThemeSchemaJSON(): Promise; getConstellationServiceUrl(): string | null; setAppAlias(appAlias: string): void; getAppAlias(): string; getSvcComponentsConfig(criteriaToMatch: import("./utils/types").ComponentSearchCriteria[], options?: { alternateDesignSystemURL?: string; skipLoadCustomerComponents?: boolean; }): Promise; getSvcComponentsConfigSeparatedUrls(criteriaToMatch: import("./utils/types").ComponentSearchCriteria[], params: string, options: { alternateDesignSystemURL?: string; skipLoadCustomerComponents?: boolean; }): Promise<{ data: { components: import("./utils/types").ComponentConfig[]; }; }>; mergeComponentList: (componentConfigList: [import("./utils/types").ComponentConfig[], import("./utils/types").ComponentConfig[], import("./utils/types").ComponentConfig[]]) => import("./utils/types").ComponentConfig[]; fetchSDKComponent(params: string): Promise; loadAndFilterPegaComponentsConfig(criteriaToMatch: import("./utils/types").ComponentSearchCriteria[], builtOnApps?: string): Promise; loadPegaComponentsConfig(): Promise; loadLibraryComponentsConfig(libId: string): Promise; loadAndCustomerComponentsConfig(params: string, criteriaToMatch: import("./utils/types").ComponentSearchCriteria[]): Promise; checkForBuiltOnSupport(builtOnApps: string | undefined, allowedApplicationsFromConfig: string[]): boolean; getSvcComponentsConfigCombinedUrl(criteriaToMatch: import("./utils/types").ComponentSearchCriteria[], params: string, options: { alternateDesignSystemURL?: string; skipLoadCustomerComponents?: boolean; }): Promise; getSvcComponentsConfigADS(criteriaToMatch: import("./utils/types").ComponentSearchCriteria[], params: string, options: { alternateDesignSystemURL?: string; }): Promise; getSvcImage(key: string): Promise; getSvcImageUrl(key: string): Promise; buildImageRequest(key: string, infinityStaticService: string | undefined): { callUrlKey: string; queryPayload: { fileID: string; user_ID?: undefined; } | { user_ID: string; fileID?: undefined; } | undefined; callUrl: string; }; fetchImage(callUrlKey: string, queryPayload: import("./router/types").BuildRestAPIPayload | undefined, callUrl: string, infinityStaticService: string | undefined): Promise; decodeBase64ToByteArray(base64String: string): Uint8Array; getMimeTypeFromKey(fileKey: string): string; getSvcLocale(locale: string | unknown, key: string): Promise; getSvcAvailableLocales(): Promise; getSvcComponent(name: string): Promise; importCustomComponentMap(libId: string, libUpdateDateTime?: string): Promise; appendCustomScriptToHead(data: string): Promise; loadSvcComponent(name: string): Promise; initServer(url: string, appUrl: string | null, b2sJWT: string): void; register(name: string, loaderFn: Function): void; getLoader(name?: string): Function; loadAssets(assets: import("./utils/types").Asset[], options: import("./utils/types").LoadAssetOptions): Promise | Promise<(string | undefined)[]>; getAssetsFromIsolations(assetPath: string): Promise; }; /** * Obtains an entry point to the {@link module:AttachmentUtils|AttachmentUtils} object that contains utility APIs to handle the attachments of a case. * * @example In this example, the getAttachmentUtils API is used to obtain the uploadAttachment API. * // To access uploadAttachment API * const { uploadAttachment } = PCore.getAttachmentUtils(); * // returns -- An object of Attachment utility APIs * * @returns An object of AttachmentUtils APIs * @function */ getAttachmentUtils: () => { uploadAttachment: (file: Blob & import("./attachment/types").Attachment, onUploadProgress: import("./service_broker/fetch").Config["onUploadProgress"], errorHandler: Function, context: string, caseID?: string, attachmentCategory?: string) => Promise; linkAttachmentsToCase: (caseID: string, attachments: import("./attachment/types").CaseLinkedAttachmentObject[], attachmentType: string, context: string) => Promise; getCaseAttachments: (caseID: string, context: string, includeThumbnail?: boolean) => Promise; getAttachmentCategories: (caseID: string, type: string, context: string) => Promise; downloadAttachment: (attachmentID: string, context: string, responseEncoding: string, storageType?: string, encoding?: string) => Promise; editAttachment: (attachmentID: string, attachmentMetaData: Pick & Partial>, context: string) => Promise; deleteAttachment: (attachmentID: string, context: string) => Promise>; downloadDocument: (documentID: string, context: string) => Promise; deleteDocument: (caseID: string, documentID: string, context: string) => Promise>; getDocumentURL: (pConnectObj: import("./interpreter/c11n-env").C11nEnv) => Promise; cancelRequest: (fileID: string) => void; buildFilePropsFromResponse: (respObj: import("./attachment/types").FileResponseObject) => { props: { meta: string; name: string; icon: string; error: string | null; thumbnail: string | null; }; responseProps: { fileName: string; name: string; category: string; extension: string | undefined; ID: string; mimeType: string; attachmentURL: string; createUser: string; createDateTime: string; responseType: string | null; localAttachment: boolean; storageType: string | undefined; fileSize: string | undefined; isLargeAttachment: boolean | undefined; }; }; getAttachmentURL: (attachmentID: string) => string | undefined; prepareAttachmentData: (attachmentResponse: import("./attachment/types").AttachmentObject) => import("./attachment/types").AttachmentData; validateAttachments: (value: import("./attachment/types").AttachmentValidate, contextTreeNodeValue: import("./attachment/types").AttachmentData | import("./attachment/types").AttachmentObject) => string | import("./attachment/types").AttachmentValidate; streamDownloadAttachment: (attachmentID: string, fileName: string, context: string) => Promise; }; /** * Obtains an entry point to the {@link module:ViewRule|ViewRule} object that contains APIs to handle performing * CRUD operations to View Rules * * @example In this example, the getViewRuleApi is used to obtain the getViewRule API. * // To access getViewRule API * const { getViewRule } = PCore.getViewRuleApi(); * // returns -- An object of ViewRule utility APIs * * In particular, the full list of utility APIs are: *
    *
  • createViewRule
  • *
  • getViewRule
  • *
  • updateViewRule
  • *
  • deleteViewRule
  • *
* * @returns An object of ViewRule APIs * @function * @private */ getViewRuleApi: () => { createViewRule: (requestConfig: import("./view-rule/types").RequestConfig, context: string) => Promise; getViewRule: (ID: string, context?: string) => Promise; updateViewRule: (ID: string, requestConfig: import("./view-rule/types").RequestConfig, context?: string) => Promise; deleteViewRule: (ID: string, context?: string) => Promise; getCalculatedFields: (caseID: string, viewID: string, fieldsConfig: import("./view-rule/types").CalculatedFieldsConfig[]) => Promise; }; /** * Obtains an entry point to the {@link FeedUtils} object that contains APIs to handle the feeds of a case. * @example In this example, the FeedApi is used to obtain the postMessage API. * // To access postMessage API * const feedUtils = PCore.getFeedUtils(); * feedUtils.postMessage().then(()=>{ * // success case * }).catch(()=>{ * // error case * }) * * @returns An object of FeedUtils APIs * @function */ getFeedUtils: () => typeof FeedUtils; /** * Obtains an entry point to the {@link TagUtils} object that contains APIs to handle the tags of a case. * * @example In this example, the API returns the tagUtils object containing the APIs that handle the tags of a case. * const { getTaggedCases, getTags, postTags, removeTag , getTagsLandingPageURL } = PCore.getTagUtils(); * * @returns This API returns the {@link TagUtils} object. * @function */ getTagUtils: () => { getTaggedCases: (caseID: string, pConnectObj: import("./interpreter/c11n-env").C11nEnv) => Promise; getTags: (caseID: string, pConnectObj: import("./interpreter/c11n-env").C11nEnv) => Promise; postTags: (caseID: string, tags: { Name: string; }[], pConnectObj: import("./interpreter/c11n-env").C11nEnv) => Promise; removeTag: (caseID: string, tagID: string, pConnectObj: import("./interpreter/c11n-env").C11nEnv) => Promise>; getTagsLandingPageURL: (pConnectObj: import("./interpreter/c11n-env").C11nEnv) => Promise; }; /** * Obtains an entry point to the {@link GenAIAssistantUtils} object that contains APIs to handle the GenAI Assistant. * @example In this example, the API returns the genAiAssistantUtils object containing the APIs that handle the genai functionalities in a case. * const { createConversation, sendMessage, createConversationForAgent, sendMessageForAgent, likeAgentMessage, unLikeAgentMessage, getConversations, getConversationsForAgent, getMessages, getMessagesForAgent } = PCore.getGenAIAssistantUtils(); * * @returns Returns the {@link GenAIAssistantUtils} object. * @function */ getGenAIAssistantUtils: () => { createConversation: (contextID: string, assistantID: string, context: string, cancelTokenSource?: import("axios").CancelTokenSource[]) => Promise; sendMessage: (assistantID: string, conversationID: string, message: string, context: string, config?: import("./genai-assistant").SendMessageConfig) => Promise>; createConversationForAgent: (contextID: string, agentID: string, context: string, cancelTokenSource?: import("axios").CancelTokenSource[], config?: import("./genai-assistant").CreateConversationConfig) => Promise; sendMessageForAgent: (agentID: string, conversationID: string, message: string, context: string, attachments?: import("./genai-assistant").Attachment[], config?: import("./genai-assistant").SendMessageConfig) => Promise>; getAgent: (agentID: string, context: string, contextID: string, cancelTokenSource?: import("axios").CancelTokenSource[]) => Promise>; getCoach: (assistantID: string, context: string, contextID: string, cancelTokenSource?: import("axios").CancelTokenSource[]) => Promise>; likeAgentMessage: (agentID: string, conversationID: string, messageID: string, context: string) => Promise>; unLikeAgentMessage: (agentID: string, conversationID: string, messageID: string, context: string, feedbackText?: string) => Promise>; getConversations: (assistantID: string, contextID: string, pageSize: number, pageIndex: number, context: string, cancelTokenSource?: import("axios").CancelTokenSource[]) => Promise>; getConversationsForAgent: (agentID: string, contextID: string, pageSize: number, pageIndex: number, context: string, cancelTokenSource?: import("axios").CancelTokenSource[]) => Promise>; getMessages: (assistantID: string, conversationID: string, context: string, cancelTokenSource?: import("axios").CancelTokenSource[]) => Promise>; getMessagesForAgent: (agentID: string, conversationID: string, context: string, cancelTokenSource?: import("axios").CancelTokenSource[]) => Promise>; }; /** * Obtains an entry point to the {@link GenAIUtils} object that contains APIs for GenAI text operations. * @example In this example, the API checks if GenAI is enabled and rewrites text. * const genAIUtils = PCore.getGenAIUtils(); * const enabled = await genAIUtils.isEnabled(); * if (enabled) { * const result = await genAIUtils.rewriteText({ * originalText: 'Draft message', * rewriteAction: 'professional', * additionalInstructions: 'Keep it brief', * context: pConnect.getContextName() * }); * } * * @returns Returns the {@link GenAIUtils} object. * @function */ getGenAIUtils: () => { rewriteText(params: import("./genai-utils").RewriteTextParams): Promise; }; /** * Obtains an entry point to the {@link module:StakeholderUtils|StakeholderUtils} object that contains APIs to handle the participants of a case. * * @example In this example, the API returns the StakeholderUtils object containing the APIs that handle the participants of a case. * const { getParticipants, getRoleView, getParticipantRoles, getParticipant, createParticipant, updateParticipant, deleteParticipant } = PCore.getStakeholderUtils(); * * @returns This API returns the {@link StakeholderUtils} object. * @function */ getStakeholderUtils: () => { getParticipants: (caseID: string, pConnectObj: import("./interpreter/c11n-env").C11nEnv) => Promise; getRoleView: (caseID: string, participantRoleID: string, pConnectObj: import("./interpreter/c11n-env").C11nEnv) => Promise; getParticipantRoles: (caseID: string, pConnectObj: import("./interpreter/c11n-env").C11nEnv) => Promise; getParticipant: (caseID: string, participantID: string, pConnectObj: import("./interpreter/c11n-env").C11nEnv) => Promise; createParticipant: (caseID: string, participantRoleID: string, participantData: import("./stakeholders/types").ParticipantData, pConnectObj: import("./interpreter/c11n-env").C11nEnv, transientContext?: string) => Promise; updateParticipant: (caseID: string, participantID: string, participantData: import("./stakeholders/types").ParticipantData, pConnectObj: import("./interpreter/c11n-env").C11nEnv, transientContext?: string) => Promise; deleteParticipant: (caseID: string, participantID: string, pConnectObj: import("./interpreter/c11n-env").C11nEnv) => Promise; }; /** * Obtains an entry point to the {@link UserApi} object that contains APIs to handle the user data. * * @example In this example, the getUserApi API is used to obtain the getOperatorDetails API. * // To access Users API * const { getOperatorDetails } = PCore.getUserApi(); * // returns -- An object of User APIs * * @returns An object of {@link UserApi} APIs * @function */ getUserApi: () => { getOperatorDetails: (userID: string, isBusinessID?: boolean) => Promise; }; /** * Obtains an entry point to the {@link CaseFollowerApi} object that contains APIs to handle the followers of a case. * * @example In this example, the getCaseFollowerApi API is used to obtain the addCaseFollower API. * // To access Followers API * const { addCaseFollower } = PCore.getCaseFollowerApi(); * // returns -- An object of Follower APIs * * @returns An object of {@link CaseFollowerApi} APIs * @function */ getCaseFollowerApi: () => typeof FollowerApi; /** * Obtains an entry point to the {@link CaseUtils} object that contains utility APIs for the Case. * * @example In this example, the getCaseUtils API is used to obtain the isCaseActive API. * const CaseUtils = PCore.getCaseUtils(); * * @returns An object of {@link CaseUtils} APIs * @function */ getCaseUtils: () => typeof CaseUtils; /** * Obtains an entry point to the {@link StateUtils} object that contains utility APIs for the Redux State. * * @example In this example, the getStateUtils API is used to obtain API's like getSharedState, setSharedState. * const StateUtils = PCore.getStateUtils(); * * @returns An object of StateUtils APIs * @function */ getStateUtils: () => typeof StateUtils; /** * This API provides an entry point to the RelatedCasesApi object that contains APIs to handle the related cases of a case. * To view the APIs in the RelatedCasesApi module, see {@link RelatedCasesApi}. * * @example In this example, the API returns the RelatedCasesApi object containing the APIs that handle the related cases of a case. * PCore.getRelatedCasesApi(); * * @returns This API returns the {@link RelatedCasesApi} object. * @function */ getRelatedCasesApi: () => { addRelatedCases: (caseID: string, relatedCases: object[], context: string) => Promise; removeRelatedCase: (caseID: string, relatedCaseID: string, context: string) => Promise>; getRelatedCases: (caseID: string, context: string) => Promise; }; /** * This API obtains the metadata associated with the datasource contained in the config object * * @example Example for getDataApi() * Example usage - PCore.getDataApi().init(dataConfig); * // the API obtains the metadata associated with the data source contained in the dataConfig object. * @function */ getDataApi: () => typeof DataApi; /** * This API provides an entry point to the {@link DataApiUtils} object that contains utility APIs to retrieve information from data views. * To view the APIs in the {@link DataApiUtils} module, see {@link DataApiUtils} Module. * * @example In this example, the API obtains the entry point to the DataApiUtils object. * PCore.getDataApiUtils(); * * @returns The DataApiUtils object * @function */ getDataApiUtils: () => typeof DataApiUtils; /** * Returns an object of Analytics utils like: *
    *
  • getDataObjects
  • *
  • getDefaultColumns
  • *
  • getInsightIDs
  • *
  • getInsightByID
  • *
  • createInsight
  • *
  • exportToExcel
  • *
  • exportToCSV
  • *
  • translateStrings
  • *
* * All APIs return a Promise. * * @example Examples for getAnalyticsUtils() * // To retrieve a list of all insights * PCore.getAnalyticsUtils().getInsightIDs().then(response => { ... }).catch(() => { ... }); * * // To create an insight * const insightMetadata = { ... }; * PCore.getAnalyticsUtils().createInsight(insightMetadata).then(response => { ... }).catch(() => { ... }); * * @returns An object of {@link AnalyticsUtils} APIs * @function */ getAnalyticsUtils: () => typeof AnalyticsUtils; /** * Returns an instance of the LocaleUtils class. * @example PCore.getLocaleUtils() * //Returns the instance of the localeUtils with the following API's on it. *
    *
  • setLocaleForRule
  • *
  • getLocaleForRule
  • *
  • resetLocaleStore
  • *
  • getLocaleValue
  • *
  • setTimezone
  • *
  • getTimeZoneInUse
  • *
* @function * @returns the localeUtils Object */ getLocaleUtils: (locale?: string) => LocaleUtils; /** * Registers the custom LocaleUtils APIs overriding the existing ones. * @example PCore.getLocaleUtils().registerLocaleManager(customLocaleUtilApis) * customLocaleUtilApis - { * "setLocaleForRule" : function(){ //custom implementation}, * "getLocaleForRule" : function(){ //custom implementation}, * "resetLocaleStore" : function(){ //custom implementation}, * "getLocaleValue" : function(){ //custom implementation}, * "setTimezone" : function(){ //custom implementation}, * "getTimeZoneInUse" : function(){ //custom implementation} * } * @function * @param customLocaleUtilApis An object with the custom implementation if the LocaleUtils API's */ registerLocaleManager: (customLocaleUtilApis: Partial) => void; /** * Access for a runtime environment to set some flags to override some * default behaviors. Note that this action replaces * any previous overrides. To add to the existing overrides, use * setBehaviorOverride * @param overridesObj

The JSON object containing any behavior override flags

*

Supported override flag:

*

dynamicLoadComponents - when false, do not attempt to load components dynamically

* @example PCore.setBehaviorOverrides( { "dynamicLoadComponents": false } ); * @function */ setBehaviorOverrides: (overridesObj: { [key: string]: boolean; }) => void; /** * Access for a runtime environment to set/update a flag to override some * default behaviors. Note that this action adds or updates * the override key value. Other keys/values are left intact. * To replace the existing overrides, use * setBehaviorOverrides * @param overrideKey

The key value for the behavior override flag. (Ex: "dynamicLoadComponents")

* @param overrideValue

the desired value of the override. (Ex: true, false)

*

Supported override flags:

*

dynamicLoadComponents - when false, do not attempt to load components dynamically

*

dynamicSemanticUrl - when false, do not attempt to update the app's semantic URL dynamically

*

dynamicSetCookie - when false, do not attempt to set the app's C11n cookie dynamically

* * @example PCore.setBehaviorOverride("dynamicLoadComponents", true); * @function */ setBehaviorOverride: (overrideKey: string, overrideValue: boolean) => void; /** * Returns the current JSON object of behavior overrides. * @example PCore.getBehaviorOverrides() could return { "dynamicLoadComponents": false } * @returns The current JSON object of behavior overrides. * @function */ getBehaviorOverrides: () => { [key: string]: boolean; }; /** * Returns the current value of the requested behavior override flag. * If the requested flag has not been sent, this returns undefined. * @param theOverride The requested override flag. Ex: dynamicLoadComponents * @example PCore.getBehaviorOverride("dynamicLoadComponents") could return false * @function */ getBehaviorOverride: (theOverride: string) => boolean; /** * This API obtains an entry point to the AsynchronousUtils object that contains utility APIs that perform asynchronous operations using Observable patterns. * To view the APIs in the AsynchronousUtils class, see {@link AsynchronousUtils} Class. * @example In this example, the API returns the AsynchronousUtils object. * const asyncUtils = PCore.getAsynchronousUtils(); * @function */ getAsynchronousUtils: () => { getDebouncedSubject(delay: number): import("rxjs").Observable; }; /** * Creates a PConnect object from the input configuration of a component. * The PConnect object represents a newly created component context for the given input configuration and has access to all public PConnect APIs. * * Use the createPConnect(config) API if you need to explicitly create a PConnect object for a component. * * For example, in a table, each column has its own type and configuration. To render the cells in the table, you can use the createPConnect(config) API to create * a PConnect object by passing the config object that contains the details of the cells along with the context and pageReference of the parent component. * * The configuration object passed to this API should include: * - meta.type: Denotes the type of the component. In the example, the type is "DropDown". This is a required property * - options.context: The name of the context under which the component is rendered. context must be passed if the component has to render on a context that is different from the parent component's context. * - options.pageReference: The data reference path of the store where the data value is stored for the current component. pageReference must be passed if the component has to render on a page reference that is different from the parent component's page reference. * * These three properties are of type string. * * @example Example usage of createPConnect * Example: * const config = { * "meta": { * "type": "DropDown", * "config": { * label: "@L Type" * } * }, * "options": { * context: "contextName", * pageReference: "pageRef" * } * } * * const dropDownPConn = createPConnect(config); * In this example, the API creates a PConnect object for a dropdown component based on the input configuration of the config object. * * @param config payload to create a PConnect Object * @returns A PConnect object created from the configuration object. * @function */ createPConnect: (config: { meta?: { type: string; config?: Record; }; options?: { context?: string; pageReference?: string; referenceList?: string; hasForm?: boolean; contextName?: string; }; }) => import("./interpreter/types").CreateC11nEnv; /** * This API provides an entry point to the PubSubUtils object that is used to access the * utility APIs in the Constellation Core that publish and subscribe events * This exposes the Event PubSub UtilsAPIs like *
    *
  • subscribe
  • *
  • publish
  • *
* * @example Example for getPubSubUtils() * Example usage - PCore.getPubSubUtils(); * // returns the PubSubUtils object containing the utility APIs that publish and subscribe events * @function */ getPubSubUtils: () => typeof PubSubUtils; /** * Call registerComponentCreator with component creator function, such that it will be registered and receives the C11nEnv object. * * @param creator function which is called to register a component creator. * This function will receive the C11nEnv as first argument * and if there are any additionalProps object as second argument. * * @example Example for registerComponentCreator() * Example Usage: * PCore.registerComponentCreator((c11nEnv, additionalProps = {}) => { * return React.createElement(PConnectHOC(), { * ...c11nEnv, * ...c11nEnv.getPConnect().getConfigProps(), * ...c11nEnv.getPConnect().getActions(), * ...{ additionalProps } * }); * * All the components, which render will be using this registered component create function to create the component instance * Note: Here the usage shows React.createElement which indicates, the components are created using React. * @function */ registerComponentCreator: (creator: Function) => void; /** * Call getConstants function to get the public constants * which are supposed to be used at appropriate places. * * @example Example for getConstants() * Example Usage: * const constants = PCore.getConstants(); * * constants will have un-modifiable constants object which you can use at places Infra expects. * for example: you have to use constants.MESSAGES.MESSAGES_TYPE_ERROR if you want to add or delete error messages in the application state. * * @function */ getConstants: () => Readonly<{ APP: { APP: string; ROOT: string; INFINITY_RUNTIME: string; PXREQUESTOR: string; PXUSERNAME: string; OPERATORID: string; USERNAME: string; PXUSERIDENTIFIER: string; USERIDENTIFIER: string; PYIMAGEINSKEY: string; OPERATORID_IMG_INSKEY: string; OPERATORID_LOCALE: string; APPLICATION_LABEL: string; APPLICATION_RULE_NAME: string; }; RESOURCE_TYPES: { ASSIGNMENT: string; CASE: string; DATA: string; PAGE: string; OBJECT: string; }; RESOURCE_STATUS: { CREATE: string; UPDATE: string; OPEN_FLOW_ACTION: string; }; VIEW_NAMES: { PY_CASE_TAB: string; DATA_OBJECT_CREATE_VIEW: string; DATA_OBJECT_EDIT_VIEW: string; PY_DATA_PREVIEW: string; PY_DETAILS: string; OBJECT_CREATE_VIEW: string; SUBSCRIPT_CREATE_VIEW: string; }; CONTAINERS: { ROOT_CONTAINER: string; VIEW_CONTAINER: string; FLOW_CONTAINER: string; MODAL_VIEW_CONTAINER: string; PREVIEW_VIEW_CONTAINER: string; HYBRID_VIEW_CONTAINER: string; }; WORK_BASKET: { MY_WORK_LIST: string; REPORTEE: string; WORK_QUEUE: string; DATA_PAGES: { D__PY_GET_USER_WORK_LIST_BY_USER_ID: string; D__WORK_BASKET: string; D__PY_MY_WORK_LIST: string; }; }; CONTEXT_TREE_NODE_TYPES: { VIEW: string; FIELD: string; DECLARATIVE_TARGET: string; WHEN: string; CONTEXT: string; PAGELIST: string; }; WORKLIST: string; WAIT: string; TODO: string; STANDARD_FLOW: string; CASE: string; ASSIGNMENT: string; FIX_BROKEN_ASSIGNMENTS: string; PAGE: string; PZINSKEY: string; CREATE_DETAILS_VIEW_NAME: string; PREVIEW_VIEW_NAME: string; CASESUMMARY_VIEW_NAME: string; APPSHELL_ACTIVE_CASES: string; TRACE_ID: string; LOAD_VIEW_STRING: string; PRIMARY: string; DEFER_UPDATE_CASESUMMARY_VIEW: string; NEXT_ASSIGNMENT_INFO_ID: string; WORKCLASS: string; DATA_INFO: { DATA_INFO: string; DATA_INFO_CONTENT: string; DATA_INFO_CONTEXT_KEY: string; }; OBJECT_INFO: { OBJECT_INFO: string; OBJECT_INFO_ID: string; OBJECT_INFO_CONTENT: string; ACTIVE_ACTION_ID: string; OBJECT_INFO_CONTENT_CLASS_ID: string; }; CASE_INFO: { CASE_INFO: string; CASE_INFO_COLLABORATORS: string; CASE_INFO_CONTENT: string; CASE_INFO_ENCRYPTED_CONTENT: string; CASE_INFO_NAME: string; CASE_INFO_ID: string; CASE_INFO_CLASSID: string; CASE_INFO_CLASSNAME: string; CASE_TYPE_ID: string; CASE_TYPE_NAME: string; CASE_INFO_PZINSKEY: string; CASE_INFO_ACTIONS: string; VIEW_NAME: string; ACTION_BUTTONS: string; ACTIVE_ACTION_ID: string; ASSIGNMENT_LABEL: string; ASSIGNMENT_ID: string; ASSIGNMENTS: string; INSTRUCTIONS: string; NAVIGATION: string; STAGES: string; STAGEID: string; CASECLASS: string; AVAILABLEACTIONS: string; AVAILABLEPROCESSES: string; D_CASE_ASSIGNMENTS_RESULTS: string; CHILD_ASSIGNMENTS: string; ASSIGNMENTACTION_ID: string; ISINCREATESTAGE: string; APPROVALFLAG: string; DUPLICATECASEFLAG: string; DUPLICATECASEID: string; DUPLICATECASEINSKEY: string; HEADERS: string; PARENTCASEINFO: string; REMOTESYSTEMID: string; CASE_RELATED_CASE_TYPES: string; CASES: string; IS_ASSIGNMENT: string; GETNEXTWORK: string; ACTION_REFRESH_CONDITIONS: string; IS_LOCAL_ACTION: string; BUSINESS_ID: string; IS_FIRST_ASSIGNMENT: string; CASE_INFO_ATTACHMENTS: string; }; ACTIONS: { ACTION_ID: string; ACTIONS: string; DELETEAVIALACTIONS: string; FLOWACTION: string; DATA_PAGES: { D_PY_ADDITIONAL_CASE_ACTIONS: string; }; }; PROCESS: { FLOWPROBLEMS: string; }; PAGE_TYPES: { PAGE: string; LANDINGPAGE: string; LISTPAGE: string; }; LOCAL_ACTION_TYPE: { CASE_WIDE: string; EXPRESS: string; ASSIGNMENT: string; LOCAL_ACTION: string; }; LOCAL_ACTIONS: { TRANSFER_ASSIGNMENT: string; }; CONTENT: string; MODAL: string; ACTIONAREA: string; STOPMERGEACTIONS: string; IS_CREATE_DATA_OBJECT: string; SUMMARY_OF_ASSIGNMENT_LAST_SUBMIT_TIME: string; SUMMARY_OF_ATTACHMENTS_LAST_REFRESH_TIME: string; CONTEXT_DATA_ASSIGNMENTID: string; BANNER_VARIANT_SUCCESS: string; BANNER_VARIANT_WARNING: string; BANNER_VARIANT_URGENT: string; BANNER_VARIANT_INFO: string; INVALID_INPUTS: string; VALIDATION_FAIL: string; MESSAGES: { MESSAGES_TYPE_SUCCESS: string; MESSAGES_TYPE_INFO: string; MESSAGES_TYPE_ERROR: string; }; PUB_SUB_EVENTS: { EVENT_RENDER_APP: string; EVENT_UNMOUNT_APP: string; EVENT_REAUTH: string; EVENT_FULL_REAUTH: string; EVENT_CUSTOM_REAUTH: string; EVENT_CANCEL: string; EVENT_MINIMIZE: string; EVENT_EXPRESS_LOCALACTION: string; EVENT_BULKACTION: string; EVENT_FINISH_ASSIGNMENT_DONE: string; EVENT_SHOW_CANCEL_ALERT: string; EVENT_SHOW_DELETE_ALERT: string; EVENT_DASHBOARD_FILTER_CHANGE: string; EVENT_DASHBOARD_FILTER_CLEAR_ALL: string; EVENT_PROMOTED_FILTERS_CHANGE: string; EVENT_LOCALACTION_SUBMISSION: string; EVENT_LOGOFF: string; EVENT_TRANSIENT_ITEMS: { UPDATE_PROMOTED_FILTERS: string; }; UI_EVENTS: { INSPECTOR: string; INSPECTOR_SHOW_ALL: string; UI_DESIGNER: string; UI_DESIGNER_TOOLBAR_EXPANDED: string; SHOW_PAGE_INIT: string; SHOW_PAGE_DONE: string; SHOW_PAGE_STARTED: string; THEME_CHANGE: string; THEME_MODE_CHANGE: string; NAV_ORIENTATION_CHANGE: string; CASE_VIEW_TEMPLATE_CHANGE: string; }; CASE_EVENTS: { CASE_ATTACHMENTS_UPDATED_FROM_CASEVIEW: string; CASE_FOLLOWER_UPDATED_BY_OPERATOR_FROM_CASEVIEW: string; CASE_FOLLOWER_UPDATE_BY_OPERATOR_FROM_WIDGET: string; CASE_CREATED: string; CREATE_STAGE_DONE: string; CREATE_STAGE_CANCELLED: string; CREATE_STAGE_SAVED: string; CREATE_STAGE_DELETED: string; ASSIGNMENT_SUBMISSION: string; END_OF_ASSIGNMENT_PROCESSING: string; CLOSE_CONFIRM_VIEW: string; CASE_OPENED: string; CASE_VIEW_OPENED_AFTER_CREATE: string; CASE_CLOSED: string; ASSIGNMENT_OPENED: string; CASE_PREVIEW: string; CURRENT_ASSIGNMENT_UPDATED: string; CASE_LOCK_EVENT: string; GET_NEXT_WORK: string; SAVE_ASSIGNMENT_COMPLETE: string; CASE_LOAD: string; CASE_UNLOAD: string; CASE_EDIT_OPEN: string; CASE_EDIT_CLOSE: string; }; ASSIGNMENT_EVENTS: { ASSIGNMENT_LOAD: string; ASSIGNMENT_UNLOAD: string; }; WORK_EVENTS: { WORK_DELETED: string; }; BOOTSTRAP_SHELL_EVENTS: { CONSTELLATION_LOADED: string; }; CONTAINER_EVENTS: { CLOSE_CONTAINER_ITEM: string; CLOSE_MULTI_TYPE_PRIMARY_CONTAINER_ITEM: string; }; DISPLAY_CASE_CREATED_TOASTER: string; DISPLAY_CASE_SUBMITTED_TOASTER: string; DATA_EVENTS: { DATA_OBJECT_CREATED: string; DATA_OBJECT_DELETED: string; DATA_OBJECT_UPDATED: string; }; FETCH_SUCCESS: string; FETCH_FAILURE: string; REVERSE_COEXISTENCE_EVENTS: { HANDLE_DISCARD: string; CHECK_IS_FORM_DIRTY: string; }; TIMEOUT_REMINDER: string; RESET_TIMER: string; PEGA_EMBED_CUSTOM: string; SUGGESTION_PROCESSED: string; ERROR_ON_FINISH_ASSIGNMENT: string; URL_NAVIGATION: string; ON_REFRESH_START: string; ON_REFRESH_COMPLETE: string; EVENT_LOCALE_CHANGED: string; }; ERROR_TYPE: { CLIENT: string; SERVER: string; }; CONTAINER_TYPE: { MULTIPLE: string; SINGLE: string; HYBRID: string; }; REMOTE_SYSTEM_ID: string; LIST_SELECTION_MODE: { MULTI: string; SINGLE: string; MULTI_ON_HOVER: string; }; SUBMISSION_FAILURE_TYPE: { FORM_VALIDATION_ERROR: string; }; USER_SETTINGS: { UTILITY_PANEL_USER_STATE_PATH: string; SUMMARY_PANEL_USER_STATE_PATH: string; ASSIGNMENT_COLLAPSED_STATE_PATH: string; CASE_VIEW_PATH: string; PORTAL_AGENT_SPLIT_VIEW_PATH: string; PORTAL_AGENT_WIDTH_PATH: string; }; PROMISE_VALUE: { RESOLVE: string; REJECT: string; }; APP_TYPE: { UIKIT: string; THEME_COSMOS: string; }; PORTAL_TYPE: { WSS: string; }; VIEW_TYPE: { PY_EMBEDASSIGNMENT: string; PY_DETAILS: string; }; ACTION: string; CONTEXT_DATA_MODAL_VIEW: { CONTEXT_DATA_MODAL_VIEW: string; IS_MULTI_RECORD_DATA: string; VIEW_NAME: string; PARENT_CONTEXT: string; INTERESTPAGE: string; EDIT_TYPE: string; ACTION_ID: string; }; FEED: { MESSAGE_VIEW_REFERENCE: string; PARENT_MESSAGE_ID: string; PX_RESULTS: string; NAME: string; POSTED_BY_USER: string; UPDATED_TIME: string; POST_MESSAGE: string; PZ_INS_KEY: string; PZ_PRIVATE_POST_DETAILS: string; PY_SELECTED: string; PY_LABEL: string; PY_RECIPIENTS: string; MENTIONS: string; PY_IS_DELETE_ENABLED: string; TAGS: string; PZ_POST_DETAILS: string; PY_FEED_SOURCE_REFERENCE: string; IS_EDITED: string; PY_LIKES: string; PY_POST_TYPE: string; POSTED_TIME: string; PY_MESSAGE_VIEW_REFERENCE: string; ID: string; PY_COMMENT_CONTEXT: string; PX_LIKE_COUNT: string; MESSAGE: string; }; CASE_VIEW_MODE: { PERFORM: string; REVIEW: string; CONFIRM: string; }; }>; /** * Call getResolvedConstantValue function to get the resolved constant value for objects. * * @example Example for getResolvedConstantValue() * Example Usage: * const property = PCore.getResolvedConstantValue('property'); * * @function */ getResolvedConstantValue: (key: string) => string; /** * Call getEvents function to get all the case related events * which are supposed to be used to subscribe using getPubSubUtils. * This exposes Events like: *
    *
  • getCaseEvents
  • *
* * @example Example for getEvents() * Example Usage: * const CaseEvent = PCore.getEvents().getCaseEvent(); * * @function */ getEvents: () => typeof Events; /** * This API provides an entry point to the {@link module:RestClient|REST Client} API object. * This exposes APIs that include: *
    *
  • invokeRestApi
  • *
  • getCancelTokenSource
  • *
  • isRequestCanceled
  • *
* * @example Example for invokeRestApi api * const { invokeRestApi } = PCore.getRestClient(); * const cancelTokenSource = getCancelTokenSource(); * invokeRestApi('getFeedMessages', { * queryPayload: { * filterForContext: 'DATA-PORTAL $SpaceTra', * filterByContext: 'context' * }, * body: {}, * headers: {}, * // passing cancel token so that we can cancel the request using cancelTokenSource * cancelTokenSource: cancelTokenSource.token * }) * .then(() => { * // handle the response * }) * .catch((error) => { * // handle error * if(isRequestCanceled(error)) { * // handle the canceled request using cancelTokenSource.cancel(); * } * }); * // above example shows how to use invokeRestApi api to make REST API call to get Feed messages. * * @example Example for getCancelTokenSource api * const { getCancelTokenSource } = PCore.getRestClient(); * const cancelTokenSource = getCancelTokenSource(); * // cancel the ongoing request using the cancelTokenSource * cancelTokenSource.cancel(); * // above example shows how to use getCancelTokenSource api to get the cancel token source using which we can cancel the ongoing request. * * @example Example for isRequestCanceled api * const { isRequestCanceled } = PCore.getRestClient(); * if(isRequestCanceled(error)) { * // handle the canceled request using cancelTokenSource.cancel(); * } * // above example shows how to use isRequestCanceled api to know if the request is canceled using cancel token source. * * * @returns the REST Client API object * @function */ getRestClient: () => typeof RestClient; /** * This api provides api to mashup cases and views. * @example Example for getMashupApi() * Example usage - PCore.getMashupApi(); * // returns the MashupApi object containing the utility APIs to work with cases and pages * * @returns - the {@link MashupApi} API object * @function */ getMashupApi: () => typeof MashupApi; /** * Call getEnvironmentInfo function to get the Environment Information * such as Locale, Operator info, Application info. * * @example Example for getEnvironmentInfo * Example Usage: * const envInfo = PCore.getEnvironmentInfo(); * // to get application name * const appName = envInfo.getApplicationName(); * * @function * @returns - the {@link EnvironmentInfo} API object */ getEnvironmentInfo: () => typeof EnvironmentInfo; /** * Switches the application locale at runtime. * Updates the URL with a `lang` query parameter so the router's * GLOBAL_QUERYPARAMS propagates it to new tabs, * updates the document lang parameter for accessibility, * and hot-reloads locale bundles so the UI updates without a full page reload. * * @param locale - The new locale to switch to. Example: 'fr-FR', 'de-DE', 'en-GB' * @example * PCore.switchLocale('fr-FR'); */ switchLocale: (locale: string) => Promise; /** * Call getRuntimeParamsAPI to get RuntimeParamsAPI * which is used to set parameters object while authoring and to be made available in runtime * * @example Example for getRuntimeParamsAPI * Example Usage: * const runtimeParamsAPI = PCore.getRuntimeParamsAPI(); * // to set runtimeParams * runtimeParamsAPI.setRuntimeParams({}); * * @function * @private * @returns - the {@link RuntimeParamsAPI} API object */ getRuntimeParamsAPI: () => { runtimeParams: { [key: string]: object; }; runtimeParamsMap: { [key: string]: string; }; setRuntimeParams(runtimeParams: { [key: string]: object; }): void; getRuntimeParams(): { [key: string]: object; }; setRuntimeParam(key: string, value: string): void; getRuntimeParam(key: string): string; }; /** * This api provides utilities to build semantic URLs. * @example Example for getSemanticUrlUtils() * // this example will return the SemanticUrlUtils API object * const semanticUrlUtils = PCore.getSemanticUrlUtils(); * * @returns - the {@link SemanticUrlUtils} API object * @function */ getSemanticUrlUtils: () => { getResolvedSemanticURL: (routeKey: string, payload: import("./router/types").RoutePayload, params: Record, locale?: string) => string; getActions: () => { ACTION_OPENWORKBYHANDLE: string; ACTION_SHOWDATA: string; ACTION_SHOWVIEW: string; ACTION_GETOBJECT: string; ACTION_SHOWINSIGHT: string; ACTION_SHOWDASHBOARD: string; }; updateSemanticURLAndDocumentTitle: (data: import("./globals").RemoteCaseActionObject, locale?: string) => void; getSemanticURLForToaster: (caseTypeID: string, caseID: string, isObjectType?: boolean, locale?: string) => string; }; /** * This api provides remote case utils. * @example Example for getRemoteCaseUtils() * Example usage - PCore.getRemoteCaseUtils(); * * @returns - the {@link RemoteCase} API object * @function * @private */ getRemoteCaseUtils: () => typeof RemoteCase; /** * This api provides NavigationUtils * @example Example for getNavigationUtils() * Example usage - PCore.getNavigationUtils(); * @returns - the {@link NavigationUtils} API object * @function */ getNavigationUtils: () => { userSettings: any; componentCache: { [key: string]: import("./utils/types").ComponentState; }; contextMapToClearOnCancel: { [context: string]: Set; }; "__#2@#isClearOnCancelRegistered": boolean; getNormalizedKey(key: string): string; setComponentState: (key: string, state: unknown, options?: import("./utils/types").ComponentStateOptions) => void; getComponentState: (key: string, options?: import("./utils/types").ComponentStateOptions) => string | true | object | null | undefined; removeComponentState: (key: string, options?: import("./utils/types").ComponentStateOptions) => void; fetchUserSettings: () => Promise; init: () => void; getUserSettings: (path: string) => any; setUserSettings: (path: string, value: string) => Promise; setComponentCache(key: string, value: import("./utils/types").ComponentState, options?: import("./utils/types").CacheOptions): void; getComponentCache(key: string): import("./utils/types").ComponentState | void; getURLParam(key: string, decode: boolean): string | null; setURLParam(key: string, value: string, encode?: boolean): void; setURLParams(params: Record): void; resetComponentCache(key: string): boolean; }; /** * This api provides registering module on demand. * @example Example for registerModule() * Example usage - PCore.registerModule("getFollowersApi", { * getFollowers: () => {} * }); * * @param moduleName Name of the module to be exposed * eq., getFollowersApi() * @param module module object to be returned * @function * @private */ registerModule: (moduleName: string, module: { [key: string]: unknown; }) => void; /** * This api provides Error Handling * @example Example for getErrorHandler() * Example usage - PCore.getErrorHandler().setGenericFailedMessage('Failed to load preview'); * Example usage - PCore.getErrorHandler().getGenericFailedMessage(); * @returns - the {@link ErrorHandler} API object * @function */ getErrorHandler: () => { genericFailedMessage: string; getGenericFailedMessage(): string; setGenericFailedMessage(message: string): void; }; /** * Obtains an entry point to the {@link FormUtils} object that contains APIs that handle form related cases. * @example In this example, the getFormUtils is used to obtain the getChanges API. * // To access getChanges API * const formUtils = PCore.getFormUtils(); * const changes = formUtils.getChanges('app/primary_1'); * @returns - the {@link FormUtils} API object * @function */ getFormUtils: () => typeof FormUtils; /** * Provides autosave utility APIs for the dx layer: status subscription, * context registration checks, debug events, and activity notification. * @example * const autosaveUtils = PCore.getAutosaveUtils(); * const enabled = autosaveUtils.isAutosaveEnabledForContext(itemKey); * @returns the {@link AutosaveUtils} API object * @function */ getAutosaveUtils: () => typeof AutosaveUtils; /** * This api provides messaging service (web sockets) related APIs * @example Example getMessagingServiceManager() * Example usage - PCore.getMessagingServiceManager().subscribe({matcher: "interaction"}, message => { * // Do process message here * })); * PCore.getMessagingServiceManager().unsubscribe(subId); * @returns - the {@link MessagingServiceManager} API object * @function */ getMessagingServiceManager: () => typeof MessagingServiceManager; /** * This api provides metadata access like views, data-pages, fields etc., * @example Example getMetadataUtils() * Example usage - PCore.getMetadataUtils().getDatapageMetadata("D_TestPage") * @returns - the {@link RuleStore} API object * @function * @private */ getMetadataUtils: () => typeof MetadataUtils; /** * This API contains utility methods to retrieve data from data pages. * @example Example getDataPageUtils() * Example usage - PCore.getDataPageUtils() * @returns - the {@link DataStore} API object * @function */ getDataPageUtils: () => typeof DataStore; /** * This API contains utility methods to retrieve information about data types. * @example Example getDataTypeUtils() * Example usage - PCore.getDataTypeUtils().getSavableDataPage(); * @returns - the {@link DataTypeUtils} API object * @function */ getDataTypeUtils: () => typeof DataTypeUtils; /** * This api is to register Datapage parameters for callback subscription * @example Example getCascadeManager() * Example usage - PCore.getCascadeManager() * @returns - the {@link CascadeManager} API object * @function */ getCascadeManager: () => { readonly name: string; cascadeSubscribers: import("./cascade/types").CascadeSubscribersObj; cascadeResetSubscribers: import("./cascade/types").CascadeResetSubscribersObj; listChangeSubscribers: Function[]; registerResetDependencies(contextName: string, pageReference: string, target: string, dependentProperties: string[], fieldType: string, mode?: string): void; deregisterResetDependencies(contextName: string, pageReference: string, target: string, dependentProperties: string[], fieldType: string): void; getResetDependencies(contextName: string, propertyName: string): import("./globals").PropertyInfo[]; purgeResetDependencies(contextName: string): void; registerFields(context: string, pageReference: string, fields: string[] | undefined, callback: import("./cascade/types").CascadeSubscriptionCallback, subscriptionId: string): void; registerListField(context: string, pageReference: string, listField: string, callback: import("./cascade/types").CascadeSubscriptionCallback, subscriptionId: string): void; unRegisterListField(context: string, pageReference: string, listField: string, subscriptionId: string): void; unRegisterFields(context: string, pageReference: string, fields: string[] | undefined, subscriptionId: string): void; triggerCascade(context: string, propertyReference: string, propertyValue: string, changeSet?: Set): void; purgeCascadeFields(context: string): void; handleServerChanges(context: string, changedListProperty?: string[], leafProperty?: string[]): void; _updateChangedProperties(previousValue: unknown, serverFields: unknown, isChangedListPropertyExist: boolean, pathPrefix: string, context: string, changedListProperty: string[], changedPropertyWithError: string[], lengthMismatchPageListArr: string[]): void; isChangedListPropertyExist(pathPrefix: string): boolean; _getServerProperties(serverFields: any, context: string, pathPrefix: string, changedListProperty: string[], leafProperty: string[], changedPropertyWithError: string[], lengthMismatchPageListArr: string[]): void; getServerProperties(serverData: object, context: string, path?: string): { changedListProperty: string[]; leafProperty: string[]; changedPropertyWithError: string[]; }; _handlePageReference(pageReference: string, target: string, fieldType: string): string; registerForListChanges(callback?: Function): void; unRegisterForListChanges(): void; }; /** * Determines if the values of two objects are the same by performing a deep comparison. * @example In this example isDeepEqual is used to compare 2 objects * Example usage - PCore.isDeepEqual({'a': '123'}, {'a': '123'}); * @param oldValue The value of the first object. * @param newValue The value of the second object. * @returns returns true if both object are same in terms to value else return false * @function */ isDeepEqual: (oldValue: object, newValue: object) => any; /** * This API provides an entry point to the {@link AuthUtils} API object that contains utility APIs to * to handle authentication tokens utilized for REST API calls. *
    *
  • setTokens
  • *
* * @example Example for getAuthUtils() * Example usage - PCore.getAuthUtils().setTokens(tokenObj) * Example usage - PCore.getAuthUtils().revokeTokens().then() * Example usage - PCore.getAuthUtils().getAuthInstance(authConfig) * * @returns - the {@link AuthUtils} Object * @function */ getAuthUtils: () => typeof AuthUtils; /** * This API provides an entry point to the {@link module:Debugger} API object that contains utility APIs to * to enable Xray. * * @example Example for getDebugger() * Example usage - PCore.getDebugger().toggleXRay(true) * * @returns - the {@link module:Debugger} Object * @function * @private */ getDebugger: () => { "__#1@#inspectorEnabled": boolean; "__#1@#inspectorShowAll": boolean; "__#1@#uiDesignerEnabled": boolean; "__#1@#uiDesignerToolbarExpanded": boolean; isPreview: boolean; debugLevels: string; "__#1@#blocksInspectorEnable"(): boolean; toggleXRay(enable: boolean): void; readonly inspectorEnabled: boolean; readonly inspectorShowAll: boolean; toggleInspector(): void; disableInspectorIfEnabled(): void; toggleInspectorShowAll(): void; readonly uiDesignerEnabled: boolean; setDesignerToolbarExpanded(expanded: boolean): void; readonly uiDesignerToolbarExpanded: boolean; toggleUIDesigner(): void; setPreviewMode(): void; getPreviewMode(): boolean; enableTracer: () => void; disableTracer: () => void; getDebugLevels: () => string; }; /** * This API provides an entry point to the {@link module:DeferLoadManager} API object that exposes methods to * manager defer loaded components *
    *
  • start
  • *
  • stop
  • *
* * @example Example for getDeferLoadManager() * Example usage - PCore.getDeferLoadManager().start(viewName, caseKey, pageReference, contextName, uniqueId) * Example usage - PCore.getDeferLoadManager().stop(uniqueId, contextName) * * @returns - the {@link DeferLoadManager} Object * @function * @private */ getDeferLoadManager: () => { components: { [contextName: string]: { [uniqueId: string]: import("./deferload/types").DeferLoadComponentObj; }; }; _checkComponent(uniqueId: string, contextName: string): boolean; start(viewName: string, caseKey: string, pageReference: string, contextName: string, uniqueId: string): void; stop(uniqueId: string, contextName: string): void; remove(uniqueId: string, contextName: string): void; removeContext(contextName: string): void; enableCascade(contextName: string): void; activate(uniqueId: string, contextName: string): void; deactivate(uniqueId: string, contextName: string): void; refreshActiveComponents(contextName: string): void; refreshComponent(uniqueId: string, contextName: string): void; }; /** * Obtains an entry point to the {@link ExpressionEngine} object that contains API to evaluate expression on given data * * @example Example for getExpressionEngine * Example Usage: * const expressionEngine = PCore.getExpressionEngine(); * // to evaluate an expression on localData * const result = expressionEngine.evaluate(); * * @function * @returns - the {@link ExpressionEngine} API object */ getExpressionEngine: () => typeof ExpressionEngine; /** * Obtains an entry point to the ActionsSequencer object that contains APIs to sequence different type of actions in the Constellation Infrastructure. * To view the APIs in the ActionsSequencer class, see {@link ActionsSequencer|APIs in the ActionsSequencer class} * * @example In this example , the API returns the ActionsSequencer object containing the utility APIs * PCore.getActionsSequencer(); * * @returns The ActionsSequencer Object * @function */ getActionsSequencer: () => { MISSING_CONTEXT_PARAM: string; INVALID_CONTEXT_DETAILS: string; INVALID_CONTEXT_OPERATION: string; schedulePendingActionOnCompletion(context: string, contextDataObject: { context_data: { blocking_action_counter: number; deferred_action_queue: StateManager.Action[]; is_deferred_action_in_progress: boolean; }; }): void; executeOrQueueDeferredAction(actionPayload: StateManager.Action): Promise; handleDeferredActionCompletion(context: string): Promise; registerBlockingAction(context: string): Promise; deRegisterBlockingAction(context: string): Promise; cancelDeferredActionsOnError(context: string): void; isDeferredActionInProgress(context: string): boolean | Promise; }; /** * This API create unique id and registers given property in passed context * @example Example for RefreshManager * const callback = refreshCaseView.bind(params); * PCore.getRefreshManager().registerForRefresh('PROP_CHANGE',callback,'caseInfo.content.Name','app/modal_1/caseInfo.content','app/modal_1'); * * options parameter is optional * @returns return the RefreshManager instance * @private */ getRefreshManager: () => { readonly refreshMap: import("./refresh/types").RefreshMap; readonly propChangeRefreshMap: import("./refresh/types").RefreshMap; registerForRefresh(refreshType: string, callback: Function, propOrTabToRegister: string, uniqueIds: string, context: string): void; triggerPropChangeRefresh(propOrTabChanged: string, context: string): boolean; triggerRefreshForType(refreshType: string, propOrTabChanged: string, context: string): boolean; deRegisterForRefresh(context: string): void; }; getInitialiser: () => { init(configObj: import("./initialiser/configurations").ConfigurationType): Promise; getBootstrapConfig: (restServerUrl: string, tokenInfo: { token_type: string; access_token: string; }) => Promise; initCoreContainers: (options?: { containerType?: string; }) => { props: { getPConnect: () => any; }; }; importReactRoot: () => Promise[]>; importDesignSystemComponentMap: (appStaticContentServer: string, environmentId: string, alternateDesignSystemName: string) => Promise; buildSemanticUrl: (constellationPathInfo: string, queryParams: URLSearchParams, noPortal: string, restServer: string, viewName: string) => string; initCoreConfig: (config: import("./initialiser/configurations").ConfigurationType) => Promise; launchViewByName: (targetDom: string, viewName: string, portalName: string, viewClass: string, additionalComponents: string[], portalTarget: string, styleSheetTarget: string, containerTargetName: string, // returns -- An object of User APIs ccLibs?: (string | import("./types").CustomComponentConfig)[]) => Promise; launchView: (targetDom: string, viewMetadata: { [key: string]: any; }, preLoadComponents: string[] | undefined, runtimeParams: { [key: string]: any; }, portalTarget: string, styleSheetTarget: string, containerTargetName: string) => void; launchPortal: (targetDom: string, portalName: string, containerTargetName?: string, preLoadComponents?: string[], ccLibs?: (string | import("./types").CustomComponentConfig)[]) => Promise; launchMashup: (targetDom: string, usePegaMashupStyling?: boolean, ccLibs?: (string | import("./types").CustomComponentConfig)[]) => void; loadEnvironmentInfoFromDataPage: (config: import("./initialiser/configurations").default) => Promise; loadDataPagesIntoEnvironmentInfo: (dataPages: { pxObjClass: string; pyName: string; pyPath: string; }[]) => Promise; "__#8@#isPlainObjectRecord"(value: unknown): value is Record; setNestedProperty(obj: Record, path: string, value: unknown): void; start: (config: any, callback?: () => void) => Promise; registerForDebugInfo: (channel: { [key: string]: any; }) => void; toggleTracerHeaders: (channel: BroadcastChannel) => void; loadEnvironmentInfo: (config: { theme: { definition: string; }; darkTheme: { definition: string; }; keyMapping: any; cookieComplianceMethod: import("./environment-info/types").CookieComplianceMethod; }) => Promise; loadCustomComponentLibrariesIfEnabled(ccLibs: (string | import("./types").CustomComponentConfig)[]): Promise; loadCustomComponentLibraries(ccLibs: (string | import("./types").CustomComponentConfig)[]): Promise; importSingleCustomComponent(ccLib: string | import("./types").CustomComponentConfig): Promise; "__#8@#initRouting"(appRoutingTable: import("./router/types").RoutingInfo, actionsTargetModel?: { [key: string]: any; }, servicesObj?: import("./services/types").ServicesType): void; "__#8@#resolveHeadFaviconLinkUrls"(): void; "__#8@#setThemeFromConfig"(themeConfig: string | object, options?: { type: "dark"; }): void; }; getBootstrapUtils: () => typeof BootstrapUtils; /** * Obtains an entry point to the ContextTreeManager object which provides apis to register and handle mutations confined to a view and its children. * @example Example for getContextTreeManager * PCore.getContextTreeManager().onViewMutate( * tab.getPConnect().getContextName(), * tab.getPConnect().getPageReference(), * tab.getPConnect()._rawConfig.config?.name, * (errors) => { * setTabErrors((tabErrors) => { * const errors = [...tabErrors]; * ... * } * @returns return the ContextTreeManager instance */ getContextTreeManager: () => typeof ContextTreeManager; /** * This API provides with access related information * @example Example for AccessPrivilege * if(PCore.getAccessPrivilege().hasCreateAccess("Person")){ * hasAccess = true; * } * @returns return the AccessPrivilege instance * @private */ getAccessPrivilege: () => AccessPrivilege; /** * Obtains an entry point to the ObjectTransformer object that contains APIs to transform keys * * @example In this example , the API returns the ObjectTransformer object containing the utility APIs * PCore.getObjectTransformer(); * * @returns The ObjectTransformer Object * @private */ getObjectTransformer: () => { needsMapping: boolean; getNeedsMapping(): boolean; setNeedsMapping(needsMapping: boolean): void; map(inputString: string): string; transformObjectToCase(response: object): any; transformCaseData(response: import("./case/types").DxAPIResponseObject): { data: { objectInfo: { content: any; }; }; uiResources: any; }; analyseResponse(response: any): void; replacer(inputString: string): string; replaceToCase(inputString: string): string; }; /** * This API returns all the stateMachines for the given * context, pageReference & target * @example Example for getAllStateMachines * getAllStateMachines("app/primary/workarea_2", "caseInfo.content", ".var1") * @returns return the available stateMachines * @private */ getAllStateMachines: (context: string, pageReference?: string, target?: string) => { states: any; unConnectedStates: any; }; /** * Determines whether namespacing is enabled for the current application. * * @example Example for isNamespaceEnabled() * Example usage - PCore.isNamespaceEnabled(); * // returns -- false (namespacing disabled) * @returns `true` if namespacing is enabled; otherwise, `false`. * @private */ isNamespaceEnabled: () => boolean; /** * Returns the fully qualified rule name with the given namespace. * * @example Example for getQualifiedName() * Example usage - PCore.getQualifiedName('TestRule', 'AgileStudio'); * // returns -- 'AgileStudio__TestRule' * @param ruleName - The name of the rule to be qualified. * @param namespace - The namespace to prefix to the rule name. * @returns The namespace-qualified rule name. * @public */ getQualifiedName: (ruleName: string, namespace: string) => string; /** * Returns the rule name qualified with the default namespace `"PegaPlatform"`. * * @example Example for getDefaultQualifiedName() * Example usage - PCore.getDefaultQualifiedName('TestRule'); * // returns -- 'PegaPlatform__TestRule' * @param ruleName - The name of the rule to be qualified. * @returns The namespace-qualified rule name using `"PegaPlatform"` as the default namespace. * @public */ getDefaultQualifiedName: (ruleName: string) => string; /** * This API provides an entry point to the {@link NamespaceUtils} object that contains utility APIs to handle namespace-related operations. * @example Example for getNameSpaceUtils() * Example usage - PCore.getNameSpaceUtils(); * // returns the NamespaceUtils object containing the utility APIs to work with namespaced rule names * * @returns - the {@link NamespaceUtils} API object * @function */ getNameSpaceUtils: () => typeof NamespaceUtils; /** * Returns the NetworkUtils API — the central controller for online/offline state. * * Use this instead of reading `navigator.onLine` directly or adding your own * `window.addEventListener('online'/'offline')` listeners. * * @example * // Check current status * PCore.getNetworkUtils().isOnline(); * * // Subscribe to transitions * const unsub = PCore.getNetworkUtils().onStatusChange((online) => { ... }); * unsub(); // unsubscribe when done * * // Override for tests / embedding apps * PCore.getNetworkUtils().setOnlineOverride(false); // force offline * PCore.getNetworkUtils().setOnlineOverride(null); // restore real navigator * * @returns the {@link NetworkStatusManager} instance * @function */ getNetworkUtils: () => NetworkUtils; /** * This API provides an entry point to the {@link MashupBridge} object that contains utility APIs to handle mashup-related operations. * @example Example for getMashupBridge() * Example usage - PCore.getMashupBridge(); * // returns the MashupBridge object containing the utility APIs to work with mashups * * @returns - the {@link MashupBridge} API object * @function */ getMashupBridge: () => typeof MashupBridge; /** * Returns the ConfirmDialogService singleton, which manages the confirmation * dialog shown when orchestration requires user confirmation (e.g., navigating * away from unsaved changes, exceeding container limits). * The DXComponent layer can register a handler via `registerConfirmHandler` so that * a Constellation UI Modal is used instead of the native `window.confirm`. * * @example * PCore.getConfirmDialogService().registerConfirmHandler((message) => { * return new Promise((resolve) => { * // show modal and call resolve(true) to discard or resolve(false) to go back * }); * }); * * @returns the {@link ConfirmDialogService} singleton * @function */ getConfirmDialogService: () => ConfirmDialogService; } export type { PCore }; declare const PCoreInstance: PCore; export default PCoreInstance;