31 lines
1.4 KiB
TypeScript
31 lines
1.4 KiB
TypeScript
import { EntityDict as BaseEntityDict } from 'oak-domain/lib/types/Entity';
|
|
import { FrontendRuntimeContext as Frc, SerializedData as Fsd } from 'oak-frontend-base/es/context/FrontendRuntimeContext';
|
|
import { BasicFeatures } from 'oak-frontend-base';
|
|
import { EntityDict } from '../oak-app-domain';
|
|
import { RuntimeContext } from './RuntimeContext';
|
|
import { SyncRowStore } from 'oak-domain/lib/store/SyncRowStore';
|
|
import { FeatureDict } from '../features';
|
|
export interface SerializedData extends Fsd {
|
|
a?: string;
|
|
t?: string;
|
|
userId?: string;
|
|
rm?: boolean;
|
|
v?: string;
|
|
}
|
|
export declare abstract class FrontendRuntimeContext<ED extends EntityDict & BaseEntityDict> extends Frc<ED> implements RuntimeContext {
|
|
private application;
|
|
private token;
|
|
constructor(store: SyncRowStore<ED, FrontendRuntimeContext<ED>>, features: FeatureDict<ED> & BasicFeatures<ED>);
|
|
protected getSerializedData(): Promise<SerializedData>;
|
|
getApplicationId(): string | undefined;
|
|
getSystemId(): ED["application"]["Schema"]["systemId"] | undefined;
|
|
getApplication(): Partial<ED["application"]["Schema"]>;
|
|
getTokenValue(): string | undefined;
|
|
getToken(allowUnloggedIn?: boolean): Partial<ED["token"]["Schema"]> | undefined;
|
|
getCurrentUserId(allowUnloggedIn?: boolean): string | undefined;
|
|
isRoot(): boolean;
|
|
isReallyRoot(): boolean;
|
|
allowUserUpdate(): boolean;
|
|
}
|
|
export default FrontendRuntimeContext;
|