@lmzhen/dsh-evolution-state-storage 0.3.61 → 0.3.62
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/types/index.d.ts +8 -2
- package/package.json +1 -1
package/lib/types/index.d.ts
CHANGED
|
@@ -81,8 +81,14 @@ export interface EvolutionStateStorage {
|
|
|
81
81
|
transactCuratorState(task: (current: CuratorStateRecord | null) => CuratorStateRecord | null): Promise<void>;
|
|
82
82
|
listPending(status?: PendingStatus): Promise<PendingRecord[]>;
|
|
83
83
|
savePending(record: PendingRecord): Promise<void>;
|
|
84
|
-
/**
|
|
85
|
-
|
|
84
|
+
/**
|
|
85
|
+
* Atomically transition a pending record exactly once.
|
|
86
|
+
* @param expectedClaimId - when given, the transition applies only while the
|
|
87
|
+
* record is STILL claimed by this approver (P2-2, v14). A record resolved or
|
|
88
|
+
* re-claimed by another writer is left untouched and reported as
|
|
89
|
+
* `applied: false`, so an approve can never overwrite a concurrent reject.
|
|
90
|
+
*/
|
|
91
|
+
tryResolvePending(id: string, status: Exclude<PendingStatus, 'pending'>, expectedClaimId?: string): Promise<PendingResolution>;
|
|
86
92
|
/** Atomically mark a pending record as claimed by one approver, or return null. */
|
|
87
93
|
claimPending(id: string, claimId: string): Promise<PendingRecord | null>;
|
|
88
94
|
/** Release this claim when the replay runner cannot complete. */
|