import { RuntimeContext } from './RuntimeContext'; import { EntityDict } from '../oak-app-domain'; import { SerializedData } from './FrontendRuntimeContext'; import { EntityDict as BaseEntityDict } from 'oak-domain/lib/types/Entity'; import { OakException } from 'oak-domain/lib/types/Exception'; import { BackendRuntimeContext as BRC } from 'oak-frontend-base/lib/context/BackendRuntimeContext'; /** * general数据结构要求的后台上下文 */ export declare abstract class BackendRuntimeContext extends BRC implements RuntimeContext { protected application?: Partial; protected token?: Partial; protected amIRoot?: boolean; protected amIReallyRoot?: boolean; protected rootMode?: boolean; private userId?; protected platformManager?: boolean; protected appVersion?: string; protected applicationProjection: EntityDict['user']['Projection']; refineOpRecords(): Promise; setPlatformManager(tokenValue?: string, userId?: string): Promise; setTokenValue(tokenValue?: string, userId?: string): Promise; setApplication(appId: string): Promise; initialize(data?: SerializedData, later?: boolean): Promise; getApplicationId

(allowNull?: P): P extends undefined ? (string | undefined) : string; getSystemId

(allowNull?: P): P extends undefined ? (string | undefined) : string; getApplication

(allowNull?: P): P extends undefined ? (Partial | undefined) : Partial; openRootMode(): () => void; getTokenValue(allowUnloggedIn?: boolean): "oak-root-token" | ED["token"]["Schema"]["value"] | undefined; getToken(allowUnloggedIn?: boolean): Partial | undefined; getCurrentUserId(allowUnloggedIn?: boolean): string; setCurrentUserId(userId: string | undefined): void; protected getSerializedData(): Promise; isRoot(): boolean; isReallyRoot(): boolean; sendMessage(data: ED['message']['CreateOperationData']): Promise>; allowUserUpdate(): boolean; protected sortDomains(domains: ED['domain']['Schema'][]): ED['domain']['Schema'][]; /** * 获得当前系统的访问路径,根据application/system/domain之间的关联 * http://www.xxx.com/oak-api */ composeAccessPath(): string; tryDeduceException(err: Error): Promise | void>; } export default BackendRuntimeContext;