import { NormalizedSchemaSnapshot, SchemaSnapshot, TailorDBSnapshotType } from "./snapshot-types.mjs"; import { MigrationDiff } from "./diff-calculator.mjs"; import { FieldRenameSpec, NestedMemberRenameSpec, TypeRenameSpec } from "./rename-detection.mjs"; //#region src/cli/commands/tailordb/migrate/snapshot-comparison.d.ts /** * Options for {@link compareSnapshots}. */ export interface CompareSnapshotsOptions { /** * Confirmed field renames. Each spec replaces the corresponding * `field_removed` + `field_added` pair with a single breaking * `field_renamed` change. Specs are validated against both snapshots. */ fieldRenames?: readonly FieldRenameSpec[]; /** * Confirmed table renames. Each spec replaces the corresponding * `table_removed` + `table_added` pair with a single breaking * `table_renamed` change. Specs are validated against both snapshots. */ typeRenames?: readonly TypeRenameSpec[]; /** * Confirmed renames of members inside nested fields. Each spec is recorded on * the field's `field_modified` change as a breaking `memberRenames` entry * instead of a removal warning. Specs are validated against both snapshots. */ nestedMemberRenames?: readonly NestedMemberRenameSpec[]; } /** * Compare two normalized snapshots and generate a diff * @param {NormalizedSchemaSnapshot} previous - Previous normalized snapshot * @param {NormalizedSchemaSnapshot} current - Current normalized snapshot * @param {CompareSnapshotsOptions} [options] - Comparison options * @returns {MigrationDiff} Migration diff between snapshots */ export declare function compareSnapshots(previous: NormalizedSchemaSnapshot, current: NormalizedSchemaSnapshot, options?: CompareSnapshotsOptions): MigrationDiff; /** * Compare a snapshot against canonical TailorDBSnapshotType-shaped local tables. * Callers are expected to pre-convert TailorDBService.types to TailorDBSnapshotType via * `createSnapshotType`. As a safety net, both sides are re-run through idempotent * normalization here, so a caller that forgets will still get correct * comparisons (no silent false drift). * @param {SchemaSnapshot} snapshot - Schema snapshot to compare against * @param {Record} localTypes - Local snapshot-shaped tables * @param {string} namespace - Namespace for comparison * @returns {MigrationDiff} Migration diff */ export declare function compareLocalTypesWithSnapshot(snapshot: SchemaSnapshot, localTypes: Record, namespace: string): MigrationDiff; //#endregion