@kubun/store-graph 0.10.1 → 0.11.0

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/lib/api.d.ts CHANGED
@@ -36,8 +36,17 @@ export type GraphStoreAPI = {
36
36
  updateMutationStatus(mutationHash: string, status: string): Promise<void>;
37
37
  getMutationLogForDocuments(documentIDs: Array<string>): Promise<Array<MutationLogEntry>>;
38
38
  getPendingMutations(documentID: string): Promise<Array<MutationLogEntry>>;
39
+ /**
40
+ * Return the lexicographically greatest `hlc` across the entire mutation log,
41
+ * or null when the log is empty. With the fixed-width counter pad, the string
42
+ * MAX equals the true HLC maximum — usable as a monotonic clock floor on
43
+ * restart so a fresh local write out-orders the node's own prior writes even
44
+ * after the wall clock stepped backward.
45
+ */
46
+ getMaxMutationHLC(): Promise<string | null>;
39
47
  getFieldHLCs(documentID: string): Promise<Record<string, string> | null>;
40
- updateFieldHLCs(docID: DocumentID, fieldHLCs: Record<string, string>): Promise<void>;
48
+ getFieldValues(documentID: string): Promise<Record<string, unknown> | null>;
49
+ updateFieldHLCs(docID: DocumentID, fieldHLCs: Record<string, string>, fieldValues: Record<string, unknown>): Promise<void>;
41
50
  listGraphs(): Promise<Array<GraphModel>>;
42
51
  createGraph(params: CreateGraphParams): Promise<string>;
43
52
  getGraph(id: string): Promise<GraphModelWithRecord | null>;