import type { CatalogItemScope } from "@x12i/catalox-contracts/items.js"; /** True when scope has no dimensions (generic / catalog-wide item). */ export declare function isGenericScope(scope: CatalogItemScope | undefined | null): boolean; /** Detect legacy native scope shapes (v1 kind / v2 scoped). */ export declare function isLegacyScopeShape(raw: unknown): boolean; /** * Normalize persisted or write input to canonical flexible scope. * Rejects legacy shapes at runtime (post-migration contract). */ export declare function normalizeItemScope(raw: unknown, opts?: { allowLegacy?: boolean; }): CatalogItemScope; export declare function parseWriteScopeInput(raw: unknown): CatalogItemScope | undefined; /** Firestore document ids cannot contain `/`. */ export declare function itemIdNeedsEncodedStorageDocId(itemId: string): boolean; /** Stable Firestore document id for a logical catalog item id. */ export declare function storageDocIdForItem(itemId: string): string; /** Resolve logical itemId from a Firestore storage document id. */ export declare function logicalItemIdFromStorageDocId(docId: string): string; export declare function storageDocIdForNativeRecord(record: { itemId: string; }): string; /** Mirror non-empty scope dimensions under indexed.scope. for queries. */ export declare function indexedScopeFields(scope: CatalogItemScope): Record; /** Sync optional metadata display copies from canonical scope (not used for visibility). */ export declare function metadataFromScope(scope: CatalogItemScope): { domainIds: string[]; agentIds: string[]; }; export declare function scopeFromRecordField(scope: unknown): CatalogItemScope; export declare function assertWriteScopeAllowed(context: { superAdmin?: boolean; unrestrictedScope?: boolean; scope?: CatalogItemScope; }, itemScope: CatalogItemScope): void; //# sourceMappingURL=item-scope.d.ts.map