export type AppContextAddon = { jcrUuid: string; jcrPrimaryType: string; displayName: string; }; export type AppContextCertificate = { signed: boolean; }; export type AppContextRuntime = { sitevisionVersion: string; scriptEngineLanguageVersion: string; scriptEngineName: string; serverName: string; scriptEngineVersion: string; }; export type AppContext = { appId: string; contextNodeId: string; servletPath: string; portletId: string; dashboardId: string; appVersion: string; maxUploadSizeInMB: number; appHelpURL: string; addon: AppContextAddon; appName: string; appDescription: string; certificate: AppContextCertificate; active: boolean; runtime: AppContextRuntime; jcrUuid: string; requirePrivileged: boolean; appIdentifier: string; appAuthor: string; appType: string; appImportDate: number; jcrPrimaryType: string; csrfProtection: boolean; pageId: string; siteId: string; siteName: string; }; export type AppContextKey = "appId" | "contextNodeId" | "servletPath" | "portletId" | "dashboardId" | "appVersion" | "maxUploadSizeInMB" | "appHelpURL" | "addon" | "appName" | "appDescription" | "certificate" | "active" | "runtime" | "jcrUuid" | "requirePrivileged" | "appIdentifier" | "appAuthor" | "appType" | "appImportDate" | "jcrPrimaryType" | "csrfProtection" | "pageId" | "siteId" | "siteName"; /** * Get app context object that is created for app when rendering. * @returns App context object. */ export default function getAppContext(): AppContext; /** * Get app context object that is created for app when rendering. * @param key - Key of the app context property to retrieve. * @returns App context object. */ export default function getAppContext(key: K): AppContext[K];