import type { Kysely } from 'kysely'; import type { FrameworkContext } from '@rangka/shared'; import type { SchemaRegistry } from './schema/registry.js'; import type { EventBus } from './events/bus.js'; import type { RequestContext } from './auth/types.js'; import type { ServiceRegistry } from './services/registry.js'; import type { AdapterRegistry } from './plugins/adapter-registry.js'; import type { DatabaseClient } from './db/client.js'; export interface FrameworkContextOptions { db: DatabaseClient; schema: SchemaRegistry; eventBus: EventBus; serviceRegistry: ServiceRegistry; config?: Record; adapterRegistry?: AdapterRegistry; } /** * Creates the root framework context used by services, hooks, and jobs. * This context has no authenticated user — use createRequestContext to add auth. */ export declare function createFrameworkContext(opts: FrameworkContextOptions): FrameworkContext; export interface RequestScopedContextOptions { base: FrameworkContext; auth: RequestContext; roles?: string[]; trx?: Kysely; adapterRegistry?: AdapterRegistry; } /** * Creates a request-scoped context by layering authentication info * and an optional transaction on top of the base framework context. */ export declare function createRequestContext(opts: RequestScopedContextOptions): FrameworkContext; //# sourceMappingURL=context.d.ts.map