@telcomdataperu/zeus-vue-model-manager
Version:
Vue 3 Model Manager for Microfrontends with OpenUI5-style API - Part of ZEUS Platform by TelcomdataPeru
40 lines (39 loc) • 1.52 kB
TypeScript
import { ModelManager } from './ModelManager';
import { JsonModel } from './JsonModel';
export interface RegistryStatistics {
totalManagers: number;
totalModels: number;
scopes: string[];
lastActivity: Date;
}
export interface CrossScopeModelAccess {
sourceScope: string;
targetScope: string;
modelName: string;
accessType: 'read' | 'write';
timestamp: Date;
}
declare class GlobalRegistryClass {
private managers;
private accessLog;
private enableAudit;
register(scope: string, manager: ModelManager): void;
get(scope: string): ModelManager | undefined;
unregister(scope: string): void;
hasModel(scope: string, modelName: string): boolean;
removeModel(scope: string, modelName: string): boolean;
getAllScopes(): string[];
clear(): void;
enableAuditing(enabled?: boolean): void;
getModelFromScope<T extends Record<string, unknown> = Record<string, unknown>>(sourceScope: string, targetScope: string, modelName: string): JsonModel<T> | undefined;
getStatistics(): RegistryStatistics;
getManagerStatistics(scope?: string): Record<string, any>;
broadcastToScope(targetScope: string, event: string, data: any): boolean;
shareModel(sourceScope: string, targetScope: string, modelName: string, newName?: string): boolean;
inspectScope(scope: string): any;
getAccessLog(): CrossScopeModelAccess[];
private logAccess;
dumpState(): void;
}
export declare const GlobalRegistry: GlobalRegistryClass;
export {};