first init

This commit is contained in:
Power BI Dev
2026-08-17 10:52:09 +07:00
commit 88c7c653c2
9281 changed files with 2156575 additions and 0 deletions
+27
View File
@@ -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[];
}