first init
This commit is contained in:
Vendored
+27
@@ -0,0 +1,27 @@
|
||||
import { FieldLockInfo } from '../types/index.js';
|
||||
export declare class LockManager {
|
||||
private static locks;
|
||||
private static LOCK_EXPIRATION_MS;
|
||||
private static getLockKey;
|
||||
/**
|
||||
* Attempt to acquire or refresh a lock.
|
||||
* Returns { success: boolean, lock?: FieldLockInfo, currentLock?: FieldLockInfo }
|
||||
*/
|
||||
static acquireLock(ticketId: string, field: 'title' | 'description', socketId: string, userId: string, userName: string): {
|
||||
success: boolean;
|
||||
lock?: FieldLockInfo;
|
||||
currentHolder?: FieldLockInfo;
|
||||
};
|
||||
/**
|
||||
* Release a lock by ticketId and field.
|
||||
*/
|
||||
static releaseLock(ticketId: string, field: 'title' | 'description', socketId?: string): FieldLockInfo | null;
|
||||
/**
|
||||
* Release all locks held by a disconnected socket.
|
||||
*/
|
||||
static releaseSocketLocks(socketId: string): FieldLockInfo[];
|
||||
/**
|
||||
* Get all active (non-expired) locks for a board/tickets.
|
||||
*/
|
||||
static getActiveLocks(): FieldLockInfo[];
|
||||
}
|
||||
Reference in New Issue
Block a user