/** * ObjectQL * Copyright (c) 2026-present ObjectStack Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ /** * Optimized Metadata Registry with O(k) package uninstall complexity * * Uses secondary indexes to achieve O(k) complexity for unregisterPackage * operation (where k is the number of items in the package) instead of * O(n*m) (where n is types and m is items per type). */ export declare class MetadataRegistry { private items; private packageIndex; constructor(); register(type: string, nameOrConfig: string | Record, config?: Record): void; get(type: string, name: string): T; list(type: string): T[]; getTypes(): string[]; getEntry(type: string, name: string): T; unregister(type: string, name: string): void; /** * Optimized package unregistration with O(k) complexity * where k is the number of items in the package. * * Previous complexity: O(n*m) - iterate all types and all items * New complexity: O(k) - direct lookup via secondary index */ unregisterPackage(packageName: string): void; } export type MetadataItem = Record; /** * Legacy Metadata interface - kept for backward compatibility * @deprecated Use MetadataItem from @objectstack/runtime instead */ export interface Metadata { type: string; id: string; path?: string; package?: string; content: unknown; }