import { Loaf, Logger } from '@azerothian/sandwich'; import { LRUCache } from 'lru-cache'; import { Config } from './types/config'; import { SystemContextRef } from './types/events'; import { Role } from './types/models/models/role'; import { User } from './types/models/models/user'; import { Context } from './types/system'; import type { Site } from './types/models/models/site'; import type { SiteRole } from './types/models/models/site-role'; import { IRole, ISite, IUser } from './modules/core/types'; import { Namespaced } from '@azerothian/nspaced'; export declare const clsSession: Namespaced; export declare class System extends Loaf { private readonly config; readonly cache: LRUCache; constructor(config: Config); getConfig: () => T; readonly start: () => Promise; readonly execute: (...args: [string, any, ...unknown[]]) => any; readonly sync: (...args: [string, any, ...unknown[]]) => any; readonly all: (...args: [string, any, ...unknown[]]) => any; readonly condition: (...args: [string, (o: T2) => Promise, T1, ...unknown[]]) => any; readonly configure: () => any; readonly configureComplete: () => any; } export interface SystemContext extends Context { system: System; role: Role; override: boolean; user?: User | undefined; site: Site; siteRole: SiteRole; } export declare function getLoggerFromContext(context: Context): Logger; export declare function getSystemFromContext(context: Context): System; export declare function createContext(system: System, user?: IUser, site?: ISite, role?: IRole, override?: boolean, initContext?: Context | undefined, ref?: SystemContextRef | undefined): Promise; export declare function withSession(cb: (session?: Namespaced) => T1, system: System, context?: Context): T1 extends Promise ? Promise : T; export declare function withContext(cb: (session?: Namespaced) => T1, context: Context): T1 extends Promise ? Promise : T; export declare function getContextFromSession(): Context; export declare function getSystemFromSession(): System; //# sourceMappingURL=system.d.ts.map