import type { CatalogId } from "@x12i/catalox-contracts/ids.js"; export type NativeCatalogQueryIndexContext = { catalogId: CatalogId; filterEq?: Record; filterArrayContains?: Record; sort?: Record; }; export type FirestoreIndexFieldSpec = { fieldPath: string; order: "ASCENDING" | "DESCENDING"; } | { fieldPath: string; arrayConfig: "CONTAINS"; }; export declare function nativeCatalogItemsCollectionGroup(catalogId: CatalogId): string; /** Build the composite index fields Firestore expects for a native catalog list query. */ export declare function buildNativeCatalogIndexFields(options: Pick): FirestoreIndexFieldSpec[]; export declare function buildNativeCatalogIndexDefinition(context: NativeCatalogQueryIndexContext): { collectionGroup: string; queryScope: "COLLECTION"; fields: FirestoreIndexFieldSpec[]; }; export declare function formatNativeCatalogIndexSnippet(context: NativeCatalogQueryIndexContext): string; export declare function isFirestoreIndexRequiredError(err: unknown): boolean; /** * When Firestore rejects a native catalog list query for a missing composite index, * rethrow with a structured error that includes the suggested index definition. */ export declare function rethrowNativeCatalogIndexError(err: unknown, context: NativeCatalogQueryIndexContext): never; //# sourceMappingURL=firestore-index-error.d.ts.map