UNPKG

@nsmp/js-api

Version:

Types for jsApi

12 lines (10 loc) 606 B
import {deepMergeJsApi} from '../../helpers'; export const getUIJsApi = (jsApi, context) => deepMergeJsApi(jsApi, { extractSubjectUuid: () => jsApi.extractSubjectUuid(context), findApplicationCode: () => jsApi.findApplicationCode(context), findContentCode: () => jsApi.findContentCode(context), getAppBaseUrl: () => jsApi.getAppBaseUrl(context), getCurrentUser: () => jsApi.getCurrentUser(context), restCallAsJson: (url, options) => jsApi.restCallAsJson(context, url, options), restCallModule: (moduleCode, methodName, ...args) => jsApi.restCallModule(context, moduleCode, methodName, ...args) });