29 lines
938 B
TypeScript
29 lines
938 B
TypeScript
import { SelectRowShape } from 'oak-domain/lib/types';
|
|
import { UniversalContext } from 'oak-domain/lib/store/UniversalContext';
|
|
import { EntityDict } from '../general-app-domain';
|
|
export declare type GetApplicationShape = {
|
|
id: 1;
|
|
name: 1;
|
|
config: 1;
|
|
type: 1;
|
|
systemId: 1;
|
|
system: {
|
|
id: 1;
|
|
name: 1;
|
|
config: 1;
|
|
};
|
|
};
|
|
export declare type GetTokeShape = {
|
|
id: 1;
|
|
userId: 1;
|
|
playerId: 1;
|
|
};
|
|
export interface RuntimeContext<ED extends EntityDict> extends UniversalContext<ED> {
|
|
getApplicationId(): Promise<string | undefined>;
|
|
getSystemId(): Promise<string | undefined>;
|
|
getApplication(): Promise<SelectRowShape<EntityDict['application']['Schema'], GetApplicationShape> | undefined>;
|
|
getToken(): Promise<SelectRowShape<EntityDict['token']['Schema'], GetTokeShape> | undefined>;
|
|
getTokenValue(): Promise<string | undefined>;
|
|
isRoot(): Promise<boolean>;
|
|
}
|