trekoon 0.1.5 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/sync/types.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export type SyncResolution = "ours" | "theirs";
2
+ export type SyncConflictMode = "pending" | "all";
2
3
 
3
4
  export interface GitContextSnapshot {
4
5
  readonly worktreePath: string;
@@ -20,6 +21,15 @@ export interface PullSummary {
20
21
  readonly appliedEvents: number;
21
22
  readonly createdConflicts: number;
22
23
  readonly cursorToken: string | null;
24
+ readonly diagnostics: SyncPullDiagnostics;
25
+ }
26
+
27
+ export interface SyncPullDiagnostics {
28
+ readonly malformedPayloadEvents: number;
29
+ readonly applyRejectedEvents: number;
30
+ readonly quarantinedEvents: number;
31
+ readonly conflictEvents: number;
32
+ readonly errorHints: readonly string[];
23
33
  }
24
34
 
25
35
  export interface ResolveSummary {
@@ -29,3 +39,37 @@ export interface ResolveSummary {
29
39
  readonly entityId: string;
30
40
  readonly fieldName: string;
31
41
  }
42
+
43
+ export interface SyncConflictListItem {
44
+ readonly id: string;
45
+ readonly event_id: string;
46
+ readonly entity_kind: string;
47
+ readonly entity_id: string;
48
+ readonly field_name: string;
49
+ readonly ours_value: string | null;
50
+ readonly theirs_value: string | null;
51
+ readonly resolution: string;
52
+ readonly created_at: number;
53
+ readonly updated_at: number;
54
+ }
55
+
56
+ export interface SyncConflictDetail {
57
+ readonly id: string;
58
+ readonly eventId: string;
59
+ readonly entityKind: string;
60
+ readonly entityId: string;
61
+ readonly fieldName: string;
62
+ readonly oursValue: unknown;
63
+ readonly theirsValue: unknown;
64
+ readonly resolution: string;
65
+ readonly createdAt: number;
66
+ readonly updatedAt: number;
67
+ readonly event: {
68
+ readonly id: string;
69
+ readonly operation: string;
70
+ readonly payload: string;
71
+ readonly git_branch: string | null;
72
+ readonly git_head: string | null;
73
+ readonly created_at: number;
74
+ } | null;
75
+ }