import type { CatalogId } from "@x12i/catalox-contracts/ids.js"; import type { CatalogDescriptor } from "@x12i/catalox-contracts/descriptors.js"; import type { NativeCatalogItemRecord } from "@x12i/catalox-contracts/items.js"; import type { NativeItemStore } from "../firebase/native-item-store.js"; export type RelationFilterResolution = { /** Keys removed from direct filter (handled via relation index). */ relationFilterKeys: string[]; /** Primary catalog item ids to include (from relation catalog rows). */ primaryItemIds?: string[]; }; type RelationFilterDeps = { nativeItems: Pick; getDescriptor: (catalogId: CatalogId) => Promise<{ descriptor: CatalogDescriptor; } | null>; }; /** * Resolve relation-catalog list filters: e.g. GET /graphs?jobTypeId=x looks up relation rows * and returns matching primary item ids. */ export declare function resolveRelationListFilters(deps: RelationFilterDeps, primaryDescriptor: CatalogDescriptor, filter: Record): Promise; export declare function validateRelationCatalogUpsert(descriptor: CatalogDescriptor, data: Record): void; export declare function deriveRelationCatalogIndexed(descriptor: CatalogDescriptor, data: Record): Record | undefined; export declare function applyRelationDeletePolicy(deps: RelationFilterDeps & { deleteNativeItem: (catalogId: CatalogId, itemId: string) => Promise; softDeleteNativeItem: (catalogId: CatalogId, itemId: string) => Promise; }, relationCatalogId: CatalogId, descriptor: CatalogDescriptor, deletedSide: "primary" | "related", deletedItemId: string): Promise; export declare function filterRowsByPrimaryIds(rows: NativeCatalogItemRecord[], primaryItemIds: string[] | undefined): NativeCatalogItemRecord[]; export {}; //# sourceMappingURL=relation-catalog.d.ts.map