@nsmp/js-api
Version:
Types for jsApi
11 lines (9 loc) • 571 B
JavaScript
import {deepMergeJsApi} from '../../helpers';
export const getUIFrameJsApi = (jsApi, context, window) => deepMergeJsApi(jsApi, {
extractSubjectUuid: () => jsApi.extractSubjectUuid(context, window),
findApplicationCode: () => jsApi.findApplicationCode(window),
findContentCode: () => jsApi.findContentCode(window),
getCurrentUser: () => jsApi.getCurrentUser(context),
restCallAsJson: (url, options) => jsApi.restCallAsJson(window, url, options),
restCallModule: (moduleCode, methodName, ...args) => jsApi.restCallModule(window, moduleCode, methodName, ...args)
});