import type { Schema, Model } from './types/schema.js'; import type { ActiveSort } from './query/sortQuery.js'; import { type RelationGraph } from './introspection/relations.js'; import type { ViewModel } from './views/types.js'; import type { DataAdapter, SchemaIntrospector, Filter } from './adapters/types.js'; import type { AdminHandlerConfig } from './handler.js'; export declare function scopeFrom(relConfig: { where?: (ctx: any) => any; } | undefined, ctx: { locals?: any; }): any; export declare function listScopeFrom(runtime: AdminRuntime, model: Model, ctx: { locals?: any; }): Record | undefined; export declare function modelScopeFrom(runtime: AdminRuntime, model: Model, ctx: { locals?: any; }): Filter | undefined; /** Extract equality predicates so create can force tenant-owned columns. */ export declare function modelScopeValues(runtime: AdminRuntime, model: Model, ctx: { locals?: any; }): Record; export interface AdminRuntime { adapter: { introspector: SchemaIntrospector; data: DataAdapter; }; schema: Schema | null; relationGraph: RelationGraph | null; models: Model[]; modelList: Array<{ name: string; label: string; }>; config: AdminHandlerConfig; basePath: string; perPage: number; /** Tailles sélectionnables, vide quand le mécanisme est désactivé. */ pageSizes: number[]; /** `models[].defaultSort` validé au démarrage, par nom de modèle. */ defaultSortOf(model: Model): ActiveSort | undefined; selectThreshold: number; filterLinkThreshold: number; labelFieldCandidates: string[]; findModel(name?: string): Model | undefined; labelOf(model: Model): string; hiddenFieldsOf(model: Model): Set; viewModel(model: Model): ViewModel; resolveLabel(target: Model, row: Record, labelTemplate?: string): string; resolveFilterableFields(model: Model): Set; } export declare function createAdminRuntime(config: AdminHandlerConfig): AdminRuntime;