diff --git a/packages/lix-plugin-csv/src/detectConflicts.ts b/packages/lix-plugin-csv/src/detectConflicts.ts index 2ba6e12195..50d6684a63 100644 --- a/packages/lix-plugin-csv/src/detectConflicts.ts +++ b/packages/lix-plugin-csv/src/detectConflicts.ts @@ -2,14 +2,14 @@ import { getLowestCommonAncestor, getLeafChange, type LixPlugin, - type Conflict, getLeafChangesOnlyInSource, + type DetectedConflict, } from "@lix-js/sdk"; export const detectConflicts: NonNullable< LixPlugin["detectConflicts"] > = async ({ sourceLix, targetLix }) => { - const result: Conflict[] = []; + const result: DetectedConflict[] = []; const leafChangesOnlyInSource = await getLeafChangesOnlyInSource({ sourceLix, @@ -67,8 +67,6 @@ export const detectConflicts: NonNullable< conflicting_change_id: change.id, reason: "The snapshots of the change do not match. More sophisticated reasoning will be added later.", - metadata: null, - resolved_change_id: null, }); } diff --git a/packages/lix-sdk/src/plugin.ts b/packages/lix-sdk/src/plugin.ts index 3889bf6a83..6cc1765975 100644 --- a/packages/lix-sdk/src/plugin.ts +++ b/packages/lix-sdk/src/plugin.ts @@ -1,9 +1,4 @@ -import type { - Change, - LixFile, - NewConflict, - Snapshot, -} from "./database/schema.js"; +import type { Change, LixFile, Snapshot } from "./database/schema.js"; import type { LixReadonly } from "./types.js"; // named lixplugin to avoid conflict with built-in plugin type @@ -41,7 +36,7 @@ export type LixPlugin = { detectConflicts?: (args: { sourceLix: LixReadonly; targetLix: LixReadonly; - }) => Promise; + }) => Promise; applyChanges?: (args: { lix: LixReadonly; file: LixFile; @@ -71,3 +66,9 @@ export type DetectedChange = { */ snapshot?: Snapshot["content"]; }; + +export type DetectedConflict = { + change_id: string; + conflicting_change_id: string; + reason?: string; +}; \ No newline at end of file