import { SchemaStatement, VectorIndexCreationConfig, VectorIndexNeedingConfig } from '../schema/index-statements'; import type { SchemaMetadata } from '../schema/types'; /** Normalized row from SHOW CONSTRAINTS / SHOW INDEXES. */ export interface LiveSchemaItem { name: string; /** * SHOW type column — UNIQUENESS for constraints; RANGE / FULLTEXT / * VECTOR / TEXT / POINT / LOOKUP for indexes. */ type: string; } export interface LiveSchema { constraints: LiveSchemaItem[]; indexes: LiveSchemaItem[]; } export interface PushPlanOrphan { name: string; dropCypher: string; } export interface PushPlan { /** Declared in SDL, missing in the database. */ create: SchemaStatement[]; /** Declared in SDL and already present. */ inSync: SchemaStatement[]; /** * Present in the database, attributable to grafeo by naming convention * (`{Label}_{prop}_unique` over a label the schema still defines), but * no longer declared. Reported always; dropped only under --force-drop. */ orphans: PushPlanOrphan[]; /** Present in the database, NOT grafeo-attributable — never touched. */ unmanaged: string[]; /** `@vector` indexes that cannot be created without config dimensions. */ needsConfig: VectorIndexNeedingConfig[]; } /** * Pure diff between the SDL-declared schema artifacts and the live * database state (cli-db-push spec). No driver, no I/O — callers feed it * normalized SHOW output, tests feed it fixtures. * * Matching is BY NAME: grafeo names unique constraints itself, and * fulltext/vector index names come verbatim from the SDL directives. * * Orphan scoping (design decision): SDL index names are user-chosen, so a * live index absent from the SDL cannot be attributed to grafeo — those * are always `unmanaged`. Only `{Label}_{prop}_unique` constraints over a * label the current schema defines are safe to call orphans. LOOKUP * indexes are Neo4j system infrastructure and are excluded from the * report entirely. */ export declare function planSchemaSync(schema: SchemaMetadata, live: LiveSchema, vectorConfig?: Record): PushPlan; //# sourceMappingURL=push-planner.d.ts.map