import type { CaseOptions } from './types'; /** * Provides APIs useful for Mashup use cases. */ declare class MashupApi { /** * Loads the case by caseId into target mashup * @function * @public * * @param caseId to openCase * @param targetContext to target different container * @param options - object containing extra infomation like pageName * @returns promise * * @example Example for loadCase api * PCore.getMashupApi().openCase('OPB1HW-SPACE-WORK RA-10001'); */ static openCase(caseId: string, targetContext?: string, options?: CaseOptions): Promise; /** * Creates case and loads view into target mashup * @function * @public * * @param className Name of the case class * @param targetContext to target different container * @param options object containing extra infomation like startingFields and pageName * @returns promise * * @example Example for createCase api * const options = { * pageName: "pyEmbedAssignment", * startingFields: { * FirstName: "Adam", * LastName: "Smith", * Vehicle: { * Make: "Honda", * Model: "Accord" * } * } *} * PCore.getMashupApi().createCase('OXJ4P4-CoWin-Work-Feedback', options); */ static createCase(className: string, targetContext?: string, options?: CaseOptions): Promise; /** * Obtains the assignment that contains the highest priority and loads it into a target context. * @function * @public * * @param targetContext The context where the assignment must be loaded. If the value of targetContext is not provided, the default value is app. * @param options The JavaScript object containing the property that can be used to load a specific view. By Default only pageName property is passed * @returns promise * * @example In this example, the API loads the assignment with the highest priority into the workarea context. * PCore.getMashupApi().getNextWork('workarea', { pageName: 'pyEmbedAssignment' }); */ static getNextWork(targetContext?: string, options?: CaseOptions): Promise; /** * Loads the assignment into target mashup * @function * @public * * @param assignmentId assignment id to load * @param targetContext to target different container * @param options object containing extra infomation like pageName * @returns promise * * @example Example for loadCase api * PCore.getMashupApi().openAssignment('Work-Test M-12!Assignment_id'); */ static openAssignment(assignmentId: string, targetContext?: string, options?: CaseOptions): Promise; /** * Opens the page view into the target mashup * @function * @public * @param pageName Name of the page * @param className Name of the page class * @param targetContext to target different container * @param options object containing extra infomation like defaultCasePage * @returns promise * * @example Example for openPage api * PCore.getMashupApi().openCase('pyHome','Data-Portal'); */ static openPage(pageName: string, className: string, targetContext?: string, options?: CaseOptions): Promise; /** * Returns context API * @function * @public * * @param pageReference Page reference * @param targetContext to target different container * @returns This API returns the PConnect object which provides access to context APIs * * @example Example for using Context APIs * const contextAPI = PCore.getMashupApi().getCurrentContextAPI("MashupPage"); * contextAPI.setValue(".BannerLabel", "Welcome!"); * * const contextAPI = PCore.getMashupApi().getCurrentContextAPI("caseInfo.content", "app/primary_1/workarea_2"); * contextAPI.setValue(".CustomerName", "Connor"); */ static getCurrentContextAPI(pageReference: string, targetContext?: string): import("../interpreter/c11n-env").C11nEnv; } export default MashupApi;